%= form_for @mailing do |f| %> <%= f.error_messages %> <% if @all_mailing_lists.length == 1 %><%= hidden_field_tag 'mailing[mailing_list_ids][]', @mailing.mailing_lists.first.try(:id) %><% end %>
<%= f.label :subject %> | <%= f.text_field :subject %> |
<%= f.label :from_email_address %> | <%= f.text_field :from_email_address %> |
<%= f.label "Select Mailable Item" %> | <%= select_tag 'mailing[mailable_class_and_id]', options_for_select(@mailables_for_select, @mailing.mailable_thing_and_id), :onChange => "if($('mailing_mailable')."+ "getValue() == 'Mailable_new') {$('new_mailable').show();}else"+ "{$('new_mailable').hide();}" %> |
<%= fm.label :email_html %> | <%= fm.text_area :email_html %> |
<%= fm.label :email_text %> | <%= fm.text_area :email_html %> |
<%= f.label :scheduled_at %> | <%= f.text_field :scheduled_at, {class: 'datetime-picker', value: l(f.object.scheduled_at || Time.now)} %> |
<%= f.label :include_images %> | <%= f.check_box :include_images %> |
<% end %> | |
<%= f.submit "Submit", :class => 'button' %> |