new.html.erb
1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<% if profile.person? %>
<h1><%= _('Send an e-mail to %s') % profile.name %></h1>
<% else %>
<h1><%= _('Send an e-mail to administrators') %></h1>
<div class='tooltip'><%= _("The e-mail will be sent to the administrators of '%s'") % profile.name %></div>
<% end %>
<%= error_messages_for 'contact' %>
<%= labelled_form_for :contact do |f| %>
<%= hidden_field_tag(:confirm, 'false') %>
<%= required_fields_message %>
<% unless logged_in? %>
<%= required f.text_field(:name) %>
<%= required f.text_field(:email) %>
<% end %>
<% location_fields = select_city(true) %>
<% unless environment.enabled?('disable_select_city_for_contact') || location_fields.blank? %>
<%= labelled_form_field _('City and state'), location_fields %>
<% end %>
<%= required f.text_field(:subject) %>
<%= render :file => 'shared/tiny_mce' %>
<%= required f.text_area(:message, :class => 'mceEditor') %>
<%= labelled_form_field check_box(:contact, :receive_a_copy) + _('I want to receive a copy of the message in my e-mail.'), '' %>
<% unless logged_in? %>
<%= recaptcha_tags :ajax => true, :display => {:theme => 'clean'} %>
<% end %>
<%= submit_button(:send, _('Send'), :onclick => "jQuery('#confirm').val('true')") %>
<% end %>