<% 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" %> <% end %> <%#= f.error_messages %>
<%= f.label :category ,t(:category), :class=>"control-label muted" %>
<%= select_category(f, @module_app) %>
<%= render partial: 'admin/member_selects/email_selection_box', locals: {field: 'subject[email_member_ids][]', email_members: @subject.email_members} %>
<%= render partial: 'admin/member_selects/email_selection_box', locals: {field: 'subject[co_professor_ids][]', email_members: @subject.co_professors,index:'1',select_name:'co_professors'} %>
<%= select_tags(f, @module_app) %>
<% if @subject.image.file %> <%= image_tag @subject.image %> <% else %> <% end %>
<%= t(:select_image) %> <%= t(:change) %> <%= f.file_field :image %> <%= t(:cancel) %>
<% @site_in_use_locales.each do |locale| %> <%= f.fields_for :image_description_translations do |f| %>
<%= f.text_field locale, value: (@subject.image_description_translations[locale.to_s] rescue nil) %>
<% end %> <% end %>
<% @site_in_use_locales.each_with_index do |locale, i| %>
">
<%= f.label :title , t('experiment.subject'), :class=>"control-label muted" %>
<%= f.fields_for :title_translations do |f| %> <%= f.text_field locale, :class=>'input-block-level', :value => (@subject.title_translations[locale] rescue nil) %> <% end %>
<%= f.label :venue ,t('experiment.venue'), :class => "control-label muted" %> <%= f.fields_for :venue_translations do |f| %>
<%= f.text_field locale, :class=>'post-title', :value => (@subject.venue_translations[locale] rescue nil) %>
<% end %>
<%= f.label :tel ,t('experiment.tel'), :class => "control-label muted" %> <%= f.fields_for :tel_translations do |f| %>
<%= f.text_field locale, :class=>'post-title', :value => (@subject.tel_translations[locale] rescue nil) %>
<% end %>
<%= f.label :facility ,t('experiment.facility'), :class => "control-label muted" %> <%= f.fields_for :facility_translations do |f| %>
<%= f.text_area locale, :class=>'input-block-level ckeditor', :value => (@subject.facility_translations[locale] rescue nil) %>
<% end %>
<%= f.label :direction ,t('experiment.direction'), :class => "control-label muted" %> <%= f.fields_for :direction_translations do |f| %>
<%= f.text_area locale, :class=>'input-block-level ckeditor', :value => (@subject.direction_translations[locale] rescue nil) %>
<% end %>
<%= f.label :student ,t('experiment.student'), :class => "control-label muted" %> <%= f.fields_for :student_translations do |f| %>
<%= f.text_area locale, :class=>'input-block-level ckeditor', :value => (@subject.student_translations[locale] rescue nil) %>
<% end %>
<% end %>
<% if @subject && !@subject.subject_links.blank? %>
<% @subject.subject_links.each_with_index do |subject_link, i| %> <%= f.fields_for :subject_links, subject_link do |f| %> <%= render :partial => 'form_link', :object => subject_link, :locals => {:f => f, :i => i} %> <% end %> <% end %>
<% end %>

<%= hidden_field_tag 'subject_link_field_count', @subject.subject_links.count %> <%= t(:add) %>

<%= f.submit t('submit'), class: 'btn btn-primary' %>
<% content_for :page_specific_javascript do %> <% end %>