<% 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 %> <%= f.error_messages %>
<%= select_category(f, @module_app) %>
<%= f.datetime_picker :mail_sentdate, :no_label => true %>
<%= render partial: 'admin/member_selects/email_selection_box', locals: {field: 'email_er[email_member_ids][]', email_members: @email_er.email_members} %>
<%= "#{t("er_email.other_mailaddress")}(#{t("er_email.other_mailaddress_note")})"%> <%= f.text_area :other_mailaddress, :class=>"span12", :cols=>"25", :rows=>"10" %> <%= "#{t("er_email.mail_to_note")}"%>
<%= f.text_field :mail_subject, class: "input-block-level", placeholder: t("er_email.mail_subject") %>
<%#= f.text_area :mail_content, :style=>"width:100%", :class => 'ckeditor input-block-level' %> <%= f.cktext_area :mail_content, rows: 5, class: "input-block-level" %>
<%= t("er_email.email_file_limit") %> <% if @email_er && !@email_er.email_er_files.blank? %>
<% @email_er.email_er_files.each_with_index do |email_er_file, i| %> <%= f.fields_for :email_er_files, email_er_file do |f| %> <%= render :partial => 'form_file', :object => email_er_file, :locals => {:f => f, :i => i} %> <% end %> <% end %>
<% end %>

<%= hidden_field_tag 'email_er_file_field_count', @email_er.email_er_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_er_emails_path, :class=>"btn" %>
<% content_for :page_specific_javascript do %> <% end %>