<% content_for :page_specific_css do %> <%= stylesheet_link_tag "lib/main-forms" %> <%= stylesheet_link_tag "lib/fileupload" %> <%= stylesheet_link_tag "lib/main-list" %> <% end %> <% content_for :page_specific_javascript do %> <%= javascript_include_tag "lib/bootstrap-fileupload" %> <%= javascript_include_tag "lib/bootstrap-datetimepicker" %> <%= javascript_include_tag "lib/datetimepicker/datetimepicker.js" %> <%= javascript_include_tag "lib/file-type" %> <%= javascript_include_tag "lib/module-area" %> <% end %>
<%= select_category(f, @module_app) %>
<%= render partial: 'admin/member_selects/email_selection_box', locals: {field: 'email_entry[email_member_ids][]', email_members: @email.email_members} %>
<%= "#{t("emailer.other_mailaddress")}(#{t("emailer.other_mailaddress_note")})"%> <%= f.text_area :other_mailaddress, :class=>"span12", :cols=>"25", :rows=>"10" %>
<%= f.datetime_picker :email_sentdate, :no_label => true, :new_record => @email.new_record?%>
<%= f.text_field :mail_subject, class: "input-block-level", placeholder: t("emailer.mail_subject") %>
<%= f.cktext_area :mail_content, rows: 5, class: "input-block-level" %>
<% if @email && !@email.email_entry_files.blank? %>
<% @email.email_entry_files.each_with_index do |email_file, i| %> <%= f.fields_for :email_entry_files, email_file do |f| %> <%= render :partial => 'form_file', :object => email_file, :locals => {:f => f, :i => i} %> <% end %> <% end %>
<% end %>

<%= hidden_field_tag 'email_entry_file_field_count', @email.email_entry_files.count %> <%= t(:add) %>

<%= f.submit t('submit'), class: 'btn btn-primary' %> <%#= button_tag t("preview"), id: "button_for_preview", name: "commit", class: 'btn', type: :button %> <%= link_to t('cancel'), admin_emailers_path(:page => params[:page]), :class=>"btn" %>