Commit 074724cdab82a468ebc56f7bfeb03ee4713fa5b8

Authored by Braulio Bhavamitra
1 parent d354a1df

Put tinymce into contact view

app/views/contact/new.rhtml
@@ -18,8 +18,11 @@ @@ -18,8 +18,11 @@
18 <% unless environment.enabled?('disable_select_city_for_contact') || location_fields.blank? %> 18 <% unless environment.enabled?('disable_select_city_for_contact') || location_fields.blank? %>
19 <%= labelled_form_field _('City and state'), location_fields %> 19 <%= labelled_form_field _('City and state'), location_fields %>
20 <% end %> 20 <% end %>
21 - <%= required f.text_field(:subject) %>  
22 - <%= required f.text_area(:message, :rows => 10, :cols => 60) %> 21 + <%= f.text_field :subject %>
  22 +
  23 + <%= render :file => 'shared/tiny_mce' %>
  24 + <%= f.text_area :message, :class => 'mceEditor' %>
  25 +
23 <%= labelled_form_field check_box(:contact, :receive_a_copy) + _('I want to receive a copy of the message in my e-mail.'), '' %> 26 <%= labelled_form_field check_box(:contact, :receive_a_copy) + _('I want to receive a copy of the message in my e-mail.'), '' %>
24 27
25 <%= submit_button(:send, _('Send'), :onclick => "$('confirm').value = 'true'") %> 28 <%= submit_button(:send, _('Send'), :onclick => "$('confirm').value = 'true'") %>
app/views/profile/send_mail.rhtml
@@ -4,11 +4,13 @@ @@ -4,11 +4,13 @@
4 4
5 <%= error_messages_for :mailing %> 5 <%= error_messages_for :mailing %>
6 6
7 -<%= render :file => 'shared/tiny_mce' %>  
8 -  
9 <% form_for :mailing, :url => {:action => 'send_mail'}, :html => {:id => 'mailing-form'} do |f| %> 7 <% form_for :mailing, :url => {:action => 'send_mail'}, :html => {:id => 'mailing-form'} do |f| %>
  8 +
10 <%= labelled_form_field(_('Subject:'), f.text_field(:subject)) %> 9 <%= labelled_form_field(_('Subject:'), f.text_field(:subject)) %>
  10 +
  11 + <%= render :file => 'shared/tiny_mce' %>
11 <%= labelled_form_field(_('Body:'), f.text_area(:body, :class => 'mceEditor')) %> 12 <%= labelled_form_field(_('Body:'), f.text_area(:body, :class => 'mceEditor')) %>
  13 +
12 <%= submit_button(:send, _('Send')) %> 14 <%= submit_button(:send, _('Send')) %>
13 <%= button :cancel, _('Cancel e-mail'), :back %> 15 <%= button :cancel, _('Cancel e-mail'), :back %>
14 <% end %> 16 <% end %>