forked from spen/seminar
63 lines
2.2 KiB
Plaintext
63 lines
2.2 KiB
Plaintext
<% # encoding: utf-8 %>
|
|
<%= stylesheet_link_tag "lib/jquery-ui-1.12.1/jquery-ui.min.css" %>
|
|
<%= javascript_include_tag 'basic.js' %>
|
|
<% @@session = session %>
|
|
<%= yield %>
|
|
<%
|
|
data = action_data
|
|
@con = data["con"]
|
|
@seminar = data["seminar"]
|
|
@seminar_signup = data["seminar_signup"]
|
|
%>
|
|
<% if !session[:seminar_signup_id].blank? %>
|
|
|
|
<% if ( @seminar.contribute_file_count.blank? or @seminar_signup.seminar_signup_contributes.count < @seminar.contribute_file_count.to_i ) %>
|
|
|
|
<%= form_for @con, url: add_file_proc_seminars_path, html: {class: "content form-horizontal" , :id=>"new-seminar-signup-contribute"} do |f| %>
|
|
<fieldset>
|
|
|
|
<div class="form-group">
|
|
<label for="file_name" class="col-sm-2 control-label">*<%= t('seminar_signup.file_name') %></label>
|
|
<div class="col-sm-10">
|
|
<%= f.text_field :title, :class=>"input-medium form-control", :id=>'name', :placeholder=> t('seminar_signup.file_name'), :required => true %>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="note" class="col-sm-2 control-label"><%= t('seminar_signup.file_note') %></label>
|
|
<div class="col-sm-10">
|
|
<%= f.text_area :description, rows: 5, :class=>"ckeditor input-medium form-control", :placeholder=> t('seminar_signup.file_note') %>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="file" class="col-sm-2 control-label"><%= t('seminar_signup.files') %></label>
|
|
<div class="col-sm-10">
|
|
<%= f.file_field :file %>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<div class="col-sm-offset-2 col-sm-10">
|
|
<input type="hidden" name="referer_url" value="<%= request.original_url.split(request.env["HTTP_HOST"]).last.split('?').first %>">
|
|
<input type="hidden" name="seminar_signup_contribute[seminar_signup_id]" value="<%= session[:seminar_signup_id] %>">
|
|
<%= f.submit t('submit'), class: 'btn btn-primary', :id => 'button-mail' %>
|
|
<%= f.button t('cancel'), type: 'reset', class: 'btn' %>
|
|
</div>
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
<% else %>
|
|
|
|
上傳檔案數已滿
|
|
|
|
<% end %>
|
|
|
|
<% else %>
|
|
|
|
請先登入
|
|
<br />
|
|
<a href="<%= page_for_seminar_url %>">回列表頁</a>
|
|
|
|
<% end %> |