<% 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" %> <%= javascript_include_tag "validator" %> <% end %>
<%= select_category(f, @module_app) %>
<%= f.datetime_picker :act_start_date, :no_label => true %>
<%= f.datetime_picker :act_end_date, :no_label => true %>
<%= f.datetime_picker :sign_start_date, :no_label => true %>
<%= f.datetime_picker :sign_end_date, :no_label => true %>
<% @site_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: (@act.title_translations[locale] rescue nil) %> <% end %>
<%= f.fields_for :content_translations do |f| %> <%= f.cktext_area locale, rows: 5, class: "input-block-level", :value => (@act.content_translations[locale] rescue nil) %> <% end %>
<%= f.fields_for :place_translations do |f| %> <%= f.text_field locale, class: "input-block-level", placeholder: t('act.place'), value: (@act.place_translations[locale] rescue nil) %> <% end %>
<%= f.fields_for :note_translations do |f| %> <%= f.text_area locale, rows: 2, class: "input-block-level", value: (@act.note_translations[locale] rescue nil) %> <% end %>
<% end %>
<% if @act && !@act.act_links.blank? %>
<% @act.act_links.each_with_index do |act_link, i| %> <%= f.fields_for :act_links, act_link do |f| %> <%= render :partial => 'form_link', :object => act_link, :locals => {:f => f, :i => i} %> <% end %> <% end %>
<% end %>

<%= hidden_field_tag 'act_link_field_count', @act.act_links.count %> <%= t(:add) %>

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

<%= hidden_field_tag 'act_file_field_count', @act.act_files.count %> <%= t(:add) %>

<%= get_referer_url[:action] rescue "" %> <%= f.submit t('submit'), class: 'btn btn-primary' %> <%= link_to t('cancel'), admin_actives_path, :class=>"btn" %>
<% content_for :page_specific_javascript do %> <% end %>