<% 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/modal-preview" %> <%= javascript_include_tag "lib/file-type" %> <%= javascript_include_tag "lib/module-area" %> <%= javascript_include_tag "member-selection" %> <% end %>
<%= select_category(f, @module_app) %>
<%= f.datetime_picker :postdate, :no_label => true %>
<%= f.datetime_picker :deadline, :no_label => true %>
<%# end %>
<%= select_tag(f, @module_app) %>
<% if @bulletin.image.file %> <%= image_tag @bulletin.image %> <% else %> <% end %>
<%= t(:select_image) %> <%= t(:change) %> <%= f.file_field :image %> <%= t(:cancel) %>

<%#= render partial: 'admin/member_selects/email_selection_box', locals: {field: 'bulletin[email_user_ids][]', users: @email_users} %>

<%= "#{t("announcement.other_mailaddress")}(#{t("announcement.other_mailaddress_note")})"%> <%= f.text_area :other_mailaddress, :class=>"span12", :cols=>"25", :rows=>"10" %>
<%#= f.datetime_picker :email_sentdate, :no_label => true %>
<% Site.first.in_use_locales.each_with_index do |locale, i| %>
">
<%= f.fields_for :title_translations do |f| %> <%= f.text_field locale, class: "input-block-level", placeholder: t(:title), value: (@bulletin.title_translations[locale] rescue nil) %> <% end %>
<%= f.fields_for :subtitle_translations do |f| %> <%= f.text_area locale, rows: 2, class: "input-block-level", value: (@bulletin.subtitle_translations[locale] rescue nil) %> <% end %>
<%= f.fields_for :text_translations do |f| %> <%= f.cktext_area locale, rows: 5, class: "input-block-level", :value => (@bulletin.text_translations[locale] rescue nil) %> <% end %>
<% end %>
<% if @bulletin && !@bulletin.bulletin_links.blank? %>
<% @bulletin.bulletin_links.each_with_index do |bulletin_link, i| %> <%= f.fields_for :bulletin_links, bulletin_link do |f| %> <%= render :partial => 'form_link', :object => bulletin_link, :locals => {:f => f, :i => i} %> <% end %> <% end %>
<% end %>

<%= hidden_field_tag 'bulletin_link_field_count', @bulletin.bulletin_links.count %> <%= t(:add) %>

<% if @bulletin && !@bulletin.bulletin_files.blank? %>
<% @bulletin.bulletin_files.each_with_index do |bulletin_file, i| %> <%= f.fields_for :bulletin_files, bulletin_file do |f| %> <%= render :partial => 'form_file', :object => bulletin_file, :locals => {:f => f, :i => i} %> <% end %> <% end %>
<% end %>

<%= hidden_field_tag 'bulletin_file_field_count', @bulletin.bulletin_files.count %> <%= t(:add) %>

<%= f.submit t('submit'), class: 'btn btn-primary' %> <%= button_tag t("preview"), id: "button_for_preview", name: "commit", class: 'btn post_preview', type: :button, url: admin_announcements_path %> <%= link_to t('cancel'), admin_announcements_path, :class=>"btn" %>
<% content_for :page_specific_javascript do %> <% end %>