<% # encoding: utf-8 %> <%= stylesheet_link_tag "lib/jquery-ui-1.12.1/jquery-ui.min.css" %> <%= stylesheet_link_tag "venue_management" %> <%= javascript_include_tag 'basic.js' %> <% @@session = session %> <%= yield %> <% data = action_data @con = data["con"] @venue_management = data["venue_management"] @venue_management_signup = data["venue_management_signup"] @form_index = 0 %> <% if !session[:venue_management_signup_id].blank? %> <% if ( @venue_management.contribute_file_count.blank? or @venue_management_signup.venue_management_signup_contributes.count < @venue_management.contribute_file_count.to_i ) %> <%= form_for @con, url: add_file_proc_venue_managements_path, html: {class: "content form-horizontal" , :id=>"new-venue_management-signup-contribute"} do |f| %>
<% if @venue_management.venue_management_submission_field_sets.count != 0 data1 = @venue_management.venue_management_submission_field_sets.select{|v| v.field_name=='title'}[0] data2 = @venue_management.venue_management_submission_field_sets.select{|v| v.field_name=='description'}[0] data3 = @venue_management.venue_management_submission_field_sets.select{|v| v.field_name=='file'}[0] show1 = !(data1.disabled) show2 = !(data2.disabled) show3 = !(data3.disabled) name1 = data1['name'][I18n.locale] name2 = data2['name'][I18n.locale] name3 = data3['name'][I18n.locale] plc1 = data1['placeholder'][I18n.locale] plc2 = data2['placeholder'][I18n.locale]==t('venue_management_signup.description') ? '' : data2['placeholder'][I18n.locale] plc3 = data3['placeholder'][I18n.locale]==t('venue_management_signup.file') ? '' : data3['placeholder'][I18n.locale] else show1 = true show2 = true show3 = true name1 = t('venue_management_signup.title') name2 = t('venue_management_signup.description') name3 = t('venue_management_signup.file') plc1 = t('venue_management_signup.title') plc2 = '' plc3 = '' end %> <% if show1 %>
<%= f.text_field :title, :class=>"input-medium form-control", :id=>'name', :placeholder=> plc1, :required => true %>
<% end %> <% if show2 %>

<%= "(#{plc2})" if !(plc2.to_s.blank?) %>
<%= f.text_area :description, rows: 5, :class=>"ckeditor input-medium form-control", :placeholder=> plc2 %>
<% end %> <% if show3 %>

<%= "(#{plc3})" if !(plc3.to_s.blank?) %>
<%= f.file_field :file, :required => true %>
<% end %> <% @venue_management.venue_management_submission_fields.asc(:_id).each do |rf| %>
<%= rf.block_helper(@venue_management,@form_index,false,"venue_management_signup_contribute",@con, rf.to_require,rf) %>
<% @form_index = @form_index +1 %> <% end %>
"> <%= f.submit t('submit'), class: 'btn btn-primary', :id => 'button-mail' %> <%= f.button t('cancel'), type: 'reset', class: 'btn' %>
<% end %> <% else %> 上傳檔案數已滿 <% end %> <% else %> 請先登入
回列表頁 <% end %>