<%= t(:category) %>
<%= select_category(f, @module_app) %>
<%= t(:start_date) %>
<%= f.datetime_picker :postdate, :no_label => true, :new_record => @bulletin.new_record?, :data=>{"picker-type" => "range", "range" => "start"} %>
<%= t(:end_date) %>
<%= f.datetime_picker :deadline, :no_label => true, :new_record => @bulletin.new_record?, :data=>{"picker-type" => "range", "range" => "end"} %>
<%= f.label :is_external_link, t("announcement.is_external_link"), :class => "control-label muted" %>
<%= f.check_box :is_external_link %>
<%= f.label :external_link, t("announcement.external_link"), :class => "control-label muted" %>
<%= f.text_field :external_link %>
<%= t("announcement.external_link_hint") %>
<%= t(:status) %>
<%= f.check_box :is_top %> <%= t(:top) %>
<%= f.check_box :is_hot %> <%= t(:hot) %>
<%= f.check_box :is_hidden %> <%= t(:hide) %>
<% if !@bulletin.is_top? && !AnnouncementSetting.check_limit_for_user((@bulletin.new_record? ? current_user.id : @bulletin.create_user_id)) %>
Top limit has been reached. The bulletin wont be marked as top even if you click on it.
<% end %>
" data-for="is_top">
Top end time
<%= f.datetime_picker :top_end_date, :no_label => true, :new_record => @bulletin.new_record? %>
<%# end %>
<%= t(:tags) %>
<%= select_tags(f, @module_app) %>
<%= t(:image) %>
<% if @bulletin.image.file %>
<%= image_tag @bulletin.image %>
<% else %>
<% end %>
<%= t(:select_image) %>
<%= t(:change) %>
<%= f.file_field :image %>
<%= t(:cancel) %>
<%= f.check_box :remove_image %><%= t(:remove) %>
<% @site_in_use_locales.each do |locale| %>
<%= f.fields_for :image_description_translations do |f| %>
<%= t(:description) + " (#{t(locale.to_s)})" %>
<%= f.text_field locale, value: (@bulletin.image_description_translations[locale.to_s] rescue nil) %>
<% end %>
<% end %>
<%= t("announcement.email_to") %>
<%= check_box_tag('bulletin[email_sent]', '1', (!@bulletin.email_sent.blank? ? true : false), :id=>'remind-check') %><%= t('announcement.activate_email_reminder')%>
<%= render partial: 'admin/member_selects/email_selection_box', locals: {field: 'bulletin[email_member_ids][]', email_members: @bulletin.email_members} %>
<%= "#{t("announcement.other_mailaddress")}(#{t("announcement.other_mailaddress_note")})"%>
<%= f.text_area :other_mailaddress, :class=>"span12", :cols=>"25", :rows=>"10" %>
<%= t("announcement.email_sentdate") %>
<%= f.datetime_picker :email_sentdate, :no_label => true %>
<% if (@bulletin.email.is_sent rescue false) %>
<% end %>
<% @site_in_use_locales.each_with_index do |locale, i| %>
">
<%= t(:content) %>
<%= 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 %>
<%= t(:file_) %>
<% 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) %>