<%= t(:category) %>
<%= select_category(f, @module_app) %>
<%= t("event_ann.event_date") %>
<%= f.datetime_picker :eventdate, :no_label => true, :new_record => @bulletin_event.new_record?, :data=>{"picker-type" => "range", "range" => "event_date"} %>
<%= t("event_ann.start_date") %>
<%= f.datetime_picker :postdate, :no_label => true, :new_record => @bulletin_event.new_record?, :data=>{"picker-type" => "range", "range" => "start"} %>
<%= t("event_ann.end_date") %>
<%= f.datetime_picker :deadline, :no_label => true, :new_record => @bulletin_event.new_record?, :data=>{"picker-type" => "range", "range" => "end"} %>
<%= f.label :is_external_link, t("event_ann.is_external_link"), :class => "control-label muted" %>
<%= f.check_box :is_external_link %>
<%= f.label :external_link, t("event_ann.external_link"), :class => "control-label muted" %>
<%= f.text_field :external_link %>
<%= t("event_ann.external_link_hint") %>
<%= f.label :display_subtitle, t("event_ann.display_subtitle"), :class => "control-label muted" %>
<%= f.check_box :display_subtitle %>
<%= f.label :display_img, t("event_ann.display_img"), :class => "control-label muted" %>
<%= f.check_box :display_img %>
<% if defined? Calendar %>
<%= t('event_ann.add_to_calendar') %>
<%= f.check_box :add_to_calendar,onchange: 'trigger_on_add_calendar(this)' %>
>
<%= t('calendar.calendar') %>
<%= f.select :calendar_type_id, @calendar_categories.collect{|t| [ t.title, t.id ]} %>
<%= t("event_ann.event_date") %>
<%= t('event_ann.blank_to_set') %>
<%= f.datetime_picker :calendar_end_date, :new_record => @bulletin_event.new_record?, :no_label => true, :data=>{"picker-type" => "range", "range" => "end"} %>
<%= t("event_ann.start_date") %>
<%= t('event_ann.blank_to_set') %>
<%= f.datetime_picker :calendar_start_date, :new_record => @bulletin_event.new_record?, :no_label => true, :data=>{"picker-type" => "range", "range" => "start"} %>
<%= t("event_ann.end_date") %>
<%= t('event_ann.blank_to_set') %>
<%= f.datetime_picker :calendar_end_date, :new_record => @bulletin_event.new_record?, :no_label => true, :data=>{"picker-type" => "range", "range" => "end"} %>
<%= t('calendar.all_day') %>
<%= f.check_box :calendar_all_day %>
<%= f.hidden_field :event_id %>
<% end %>
<% if((!EventAnnSetting.first.only_manager_can_edit_status) || (EventAnnSetting.first.only_manager_can_edit_status && (@current_user.is_admin? || @current_user.is_manager?(@module_app))) ) %>
<%= t(:status) %>
<% if !(@reach_limit.include?('is_top') && @bulletin_event.is_top != true) || current_user.is_admin? %>
<%= f.check_box :is_top %> <%= t(:top) %>
<% else %>
<%= t(:top) %>
<% end %>
<% if !(@reach_limit.include?('is_hot') && @bulletin_event.is_hot != true) || current_user.is_admin? %>
<%= f.check_box :is_hot %> <%= t(:hot) %>
<% else %>
<%= t(:hot) %>
<% end %>
<%= f.check_box :is_hidden %> <%= t(:hide) %>
<% if !@bulletin_event.is_top? && !EventAnnSetting.check_limit_for_user((@bulletin_event.new_record? ? current_user.id : @bulletin_event.create_user_id)) %>
Top limit has been reached. The bulletin_event 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_event.new_record? %>
<% end %>
<%= t(:tags) %>
<%= select_tags(f, @module_app) %>
<%= t(:image) %>
<% if @bulletin_event.image.file %>
<%= image_tag @bulletin_event.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_event.image_description_translations[locale.to_s] rescue nil) %>
<% end %>
<% end %>
<%= t("event_ann.email_to") %>
<%= check_box_tag('bulletin_event[email_sent]', '1', (!@bulletin_event.email_sent.blank? ? true : false), :id=>'remind-check') %><%= t('event_ann.activate_email_reminder')%>
<%= render partial: 'admin/member_selects/email_selection_box', locals: {field: 'bulletin_event[email_member_ids][]', email_members: @bulletin_event.email_members} %>
<%= "#{t("event_ann.other_mailaddress")}(#{t("event_ann.other_mailaddress_note")})"%>
<%= f.text_area :other_mailaddress, :class=>"span12", :cols=>"25", :rows=>"10" %>
<%= t("event_ann.email_sentdate") %>
<%= f.datetime_picker :email_sentdate, :no_label => true %>
<% if (@bulletin_event.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_event.text_translations[locale] rescue nil) %>
<% end %>
<% end %>
<%= t(:file_) %>
<% if @bulletin_event && !@bulletin_event.bulletin_event_files.blank? %>
<% @bulletin_event.bulletin_event_files.each_with_index do |bulletin_event_file, i| %>
<%= f.fields_for :bulletin_event_files, bulletin_event_file do |f| %>
<%= render :partial => 'form_file', :object => bulletin_event_file, :locals => {:f => f, :i => i} %>
<% end %>
<% end %>
<% end %>
<%= hidden_field_tag 'bulletin_event_file_field_count', @bulletin_event.bulletin_event_files.count %>
<%= t(:add) %>