diff --git a/app/controllers/seminars_controller.rb b/app/controllers/seminars_controller.rb index 3f68848..628c987 100644 --- a/app/controllers/seminars_controller.rb +++ b/app/controllers/seminars_controller.rb @@ -3,7 +3,7 @@ class SeminarsController < ApplicationController include MemberHelper include ActionView::Context #vary important (only add this can access @@session from view) include Admin::SeminarsHelper - FrontendMethods = ["show_privacy", "show_data", "check_email", "check_availability", "signup_ok", "add_file", "edit_file", "con_login", "con_upload", "con_logout","confirm_email_page","reset_password_page"] + FrontendMethods = ["show_privacy", "show_data", "check_email", "check_availability", "signup_ok", "add_file", "edit_file", "con_login", "con_upload", "con_logout","confirm_email_page","reset_password_page","edit_login_seminar_signup"] # include SimpleCaptcha::ControllerHelpers def index @@ -520,6 +520,29 @@ class SeminarsController < ApplicationController end + def update_signup_form + params = OrbitHelper.params + @seminar_signup = SeminarSignup.find(params[:signup_id]) + @seminar_signup.update_attributes(seminar_signup_params) + + if !params[:seminar_signup_values].nil? + params[:seminar_signup_values].each_with_index do |r,i| + field_value = r.last[:id].present? + @custom_field_value = SeminarSignupValue.put_field_values(@seminar_signup, r.last, r.last[:id], field_value) + end + seminar_reviews = SeminarReview.where(:seminar_main_id=>@seminar_signup.seminar_main_id).to_a + seminar_reviews.each{|sr| sr.save} + @seminar = @seminar_signup.seminar_main + unassigned_seminar_signup_ids = @seminar.seminar_signup_ids.map{|s| s.to_s} + @seminar.seminar_reviews.each do |sr| + unassigned_seminar_signup_ids = unassigned_seminar_signup_ids - sr.all_seminar_signup_ids + end + @seminar.unassigned_seminar_signup_ids = unassigned_seminar_signup_ids + @seminar.save + end + redirect_to "#{params[:referer_url].to_s.chomp('/').gsub(/\/([^\/?#]+)(|[^\/]+)$/){|f| '/'+$1}}?method=con_upload" + end + def signup_ok params = OrbitHelper.params msg = SeminarMain.where(:uid => params[:seminar]).first.signup_success @@ -706,6 +729,16 @@ class SeminarsController < ApplicationController seminar_signup = SeminarSignup.find_by(_id: @@session[:seminar_signup_id], seminar_main_id: @@session[:seminar_main_id] ) rescue nil + show = true + seminar.seminar_submission_field_sets.each do |ssf| + if ssf.disabled && ssf.hidden + show = false + else + show = true + break + end + end + else seminar = {} @@ -716,11 +749,32 @@ class SeminarsController < ApplicationController { 'time_now' => time_now, 'seminar' => seminar, - 'seminar_signup' => seminar_signup + 'seminar_signup' => seminar_signup, + "show" => show } end + def edit_login_seminar_signup + if !@@session[:seminar_main_id].blank? + seminar = SeminarMain.find_by(id: @@session[:seminar_main_id]) + seminar_signup = SeminarSignup.find_by(_id: @@session[:seminar_signup_id], seminar_main_id: @@session[:seminar_main_id] ) rescue nil + else + seminar = {} + seminar_signup = {} + end + module_app = ModuleApp.where(:key => "seminar").first + + categories = module_app.categories + + time_now = Time.now + { + "seminar" => seminar, + "seminar_signup" => seminar_signup, + "time_now" => time_now + } + end + def con_logout # redirect_to page_for_seminar_url @@ -770,6 +824,7 @@ class SeminarsController < ApplicationController if(!signup.nil?) signup.token = nil signup.is_confirmed = true + signup.is_confirmed_date = DateTime.now signup.save confirm = true end @@ -845,8 +900,11 @@ class SeminarsController < ApplicationController extra_text += "
#{t("seminar.click_here_to_confirm")}" end send_mail(params[:type], seminar_signup.email, @seminar.id.to_s, extra_text) + seminar_signup.emails_sent << params[:type] + seminar_signup.save end render :json => { + "type" => t("seminar.#{params[:type]}"), "success" => true }.to_json end diff --git a/app/helpers/admin/seminars_field_helper.rb b/app/helpers/admin/seminars_field_helper.rb index 21ffe5c..942df54 100644 --- a/app/helpers/admin/seminars_field_helper.rb +++ b/app/helpers/admin/seminars_field_helper.rb @@ -50,14 +50,14 @@ module Admin::SeminarsFieldHelper def render_checkbox @prefiled_value ||=[] - control_group_wrapper_for_sm do + control_group_wrapper_for_sm do a = self.typeE[:option_list].collect do |key,value| label_tag("#{get_basic_field_name_org}_#{self.id}_#{key}",check_box_tag(get_field_name_base+"[#{key}]", true , (@prefiled_value.include?(key) ? true : false), { :id=>"#{get_basic_field_name_org}_#{self.id}_#{key}"})+value[I18n.locale.to_s],@markup_options.merge(:class=>"checkbox inline")) end.join.html_safe rescue "" end end - def render_date + def render_date d = DateTime.now() if date_is_range? @@ -81,13 +81,13 @@ module Admin::SeminarsFieldHelper when 'format3' fill_from = (@prefiled_value && @prefiled_value["from"] ) ? @prefiled_value["from"] : d.strftime("%Y/%m") fill_to = (@prefiled_value && @prefiled_value["to"] ) ? @prefiled_value["to"] : d.strftime("%Y/%m/") - buf = datetime_picker(get_field_name_base+'[from]', fill_from, 'yyyy/MM') + buf = datetime_picker(get_field_name_base+'[from]', fill_from, 'yyyy/MM') buf << ' ~ ' buf << datetime_picker(get_field_name_base+'[to]', fill_to, 'yyyy/MM') when 'format4' fill_from = (@prefiled_value && @prefiled_value["from"] ) ? @prefiled_value["from"] : d.strftime("%Y") fill_to = (@prefiled_value && @prefiled_value["to"] ) ? @prefiled_value["to"] : d.strftime("%Y") - buf = datetime_picker(get_field_name_base+'[from]', fill_from, 'yyyy') + buf = datetime_picker(get_field_name_base+'[from]', fill_from, 'yyyy') buf << ' ~ ' buf << datetime_picker(get_field_name_base+'[to]', fill_to, 'yyyy') end @@ -107,13 +107,13 @@ module Admin::SeminarsFieldHelper when 'format2' tmp = datetime_picker(get_field_name_base, (@prefiled_value ? @prefiled_value : d.strftime("%Y/%m/%d")), 'yyyy/MM/dd') when 'format3' - tmp = datetime_picker(get_field_name_base, (@prefiled_value ? @prefiled_value : d.strftime("%Y/%m")), 'yyyy/MM') + tmp = datetime_picker(get_field_name_base, (@prefiled_value ? @prefiled_value : d.strftime("%Y/%m")), 'yyyy/MM') when 'format4' - tmp = datetime_picker(get_field_name_base, (@prefiled_value ? @prefiled_value : d.strftime("%Y")), 'yyyy') + tmp = datetime_picker(get_field_name_base, (@prefiled_value ? @prefiled_value : d.strftime("%Y")), 'yyyy') end - - control_group_wrapper_for_sm{tmp} - # control_group_wrapper_for_sm{date_select(get_field_name_base,nil,@markup_options.merge(:default=>@prefiled_value),:class=>"input-small")} + + control_group_wrapper_for_sm{tmp} + # control_group_wrapper_for_sm{date_select(get_field_name_base,nil,@markup_options.merge(:default=>@prefiled_value),:class=>"input-small")} end end @@ -131,7 +131,7 @@ module Admin::SeminarsFieldHelper end def render_date_durnation #Need re-write low priority - + end def render_radio_button @@ -179,7 +179,7 @@ module Admin::SeminarsFieldHelper place_holder= typeA["placeholder"][key_field] rescue '' name1 = can_muti_lang_input_for_sm? ? ([get_field_name_base,add_more_blank,"[#{key_field}]"].join) : ([get_field_name_base,add_more_blank].join) text_field_tag(name1, value, @markup_options.merge(:placeholder=>place_holder,:class=>'input-medium form-control')) - end + end end def render_file_field @@ -192,16 +192,16 @@ module Admin::SeminarsFieldHelper #{I18n.t('file.upload')}
#{value}".html_safe - end + end end def date_is_range? is_range = "false" data = get_data if !data.nil? - is_range = data['is_range'] if data.has_key? "is_range" + is_range = data['is_range'] if data.has_key? "is_range" end - is_range == "true" + is_range == "true" end protected @@ -239,7 +239,7 @@ protected div_class << (key == I18n.locale ? " active in" : '') content_tag(:div,yield(key,value), :id=>div_id,:class=>div_class) end# of VALID_LOCALES.collect for tabed input - tmp2 = content_tag(:div,:class => 'btn-group', :data=>{:toggle=>"buttons-radio"}) do + tmp2 = content_tag(:div,:class => 'btn-group', :data=>{:toggle=>"buttons-radio"}) do buff2 = valid_locales.each.collect do |key| # link_entry = self.add_more ? "#{add_more_tab(:tab_btn,loop_counter,key)}" : "#tab"+id.to_s+"_#{key}" if @show_set_field_for_sm && @markup=='text_area' @@ -262,7 +262,7 @@ protected else # tmp = content_tag :div,:class=> (add_more || self.markup=='address') ? "input-append" : "tab-content" do - tmp1 = + tmp1 = content_tag :div,:class=> "tab-content" do buff = valid_locales.collect do |key| @@ -289,7 +289,7 @@ protected end - tmp2 = content_tag(:div,:class => 'btn-group', :data=>{:toggle=>"buttons-radio"}) do + tmp2 = content_tag(:div,:class => 'btn-group', :data=>{:toggle=>"buttons-radio"}) do buff2 = valid_locales.each.collect do |key| # link_entry = self.add_more ? "#{add_more_tab(:tab_btn,loop_counter,key)}" : "#tab"+id.to_s+"_#{key}" link_entry_ary = ["##{get_pairing_tab_class({})}","_#{key}"] @@ -304,7 +304,7 @@ protected end # of content ul - + tmp = content_tag :div,:class=> "input-append" do tmp1 << tmp2 end @@ -319,8 +319,8 @@ protected add_more_counter = "" if can_add_more - add_more_counter = add_more_params[0][:counter] - add_more_value = add_more_params[0][:value] + add_more_counter = add_more_params[0][:counter] + add_more_value = add_more_params[0][:value] end if can_muti_lang_input_for_sm? @@ -330,7 +330,7 @@ protected else #cross lang field case can_add_more when true - value = add_more_params[0][:value] + value = add_more_params[0][:value] result << content_tag(:div,:class=>"input-append"){yield(nil,value) + link_to((content_tag :i,'',:class=>'icon-trash'),"#",:class=>"btn remove-input") } # result << add_more_unt else @@ -346,7 +346,7 @@ protected end # of def controls_wrapper_for_sm(&block) - def control_group_wrapper_for_sm(&block) + def control_group_wrapper_for_sm(&block) div_class = can_muti_lang_input_for_sm? ? "col-sm-10 controls" : "col-sm-10 controls" # div_class = can_muti_lang_input_for_sm? ? "control-group language-swich" : "control-group" result = "" @@ -357,7 +357,7 @@ protected if can_add_more - multipleInputs = + multipleInputs = content_tag(:div,:class=>"add-target") do @attribute_value.add_more_counter.times.collect do |t| controls_wrapper_for_sm(:value=>(@prefiled_value[t] rescue nil),:counter=>t,&block) @@ -366,8 +366,8 @@ protected temp = content_tag(:div, multipleInputs + add_more_unt, :class=>'add-input') - - result = form_label + content_tag(:div,temp,:class=>div_class) + + result = form_label + content_tag(:div,temp,:class=>div_class) # result = label + multipleInputs + add_more_unt # result = label + 一堆的輸入框(要用 multipleInput editMore 包起來) + add_more btn + hidden_fields @@ -393,7 +393,7 @@ protected end - def add_more_unt + def add_more_unt temp_field_name = get_basic_field_name_base + '[temp]' add_more = content_tag :p,:class=> 'add-btn' do content = link_to (content_tag :i,I18n.t(:add),:class=>"icon-plus"),"#","data-roles"=>"role_a",:class=>"trigger #{can_muti_lang_input_for_sm? ? 'textLengInput' : 'textInput' } btn btn-small btn-primary" @@ -432,7 +432,7 @@ protected prefix = opts[:prefix] suffix = opts[:suffix] str = get_basic_field_name_base.gsub("[","_").gsub("]",'') - str = prefix.nil? ? str : prefix+ str + str = prefix.nil? ? str : prefix+ str suffix.nil? ? str : str + suffix end @@ -454,7 +454,8 @@ protected def form_label if self.markup == "text_area" - plc = typeD["placeholder"][I18n.locale].to_s.blank? ? nil : "(#{typeD["placeholder"][I18n.locale]})" + # plc = typeD["placeholder"][I18n.locale].to_s.blank? ? nil : "(#{typeD["placeholder"][I18n.locale]})" + plc = nil label_tag(key, '' , :class=>"col-sm-2 control-label muted") do concat (!@require.blank? ? '*'+title : title) if plc @@ -471,7 +472,7 @@ protected if self.markup == "address" return true else - $seminar_list[:markups][markup]["muti_lang_input_supprt"] and !(get_data["cross_lang"] == "true") + $seminar_list[:markups][markup]["muti_lang_input_supprt"] and !(get_data["cross_lang"] == "true") end end @@ -538,7 +539,7 @@ protected if markup=='text_field' if key_field == 'seminar_email_sets' inside = text_field_tag([get_field_name_base,"[#{key}]"].join,value,:class=>'input-medium form-control') - else + else inside = text_field_tag([get_field_name_base,"[#{key}]"].join,value) end else @@ -552,4 +553,4 @@ protected @show_set_field_for_sm = nil return a.html_safe end -end \ No newline at end of file +end diff --git a/app/models/seminar_signup.rb b/app/models/seminar_signup.rb index 7e8c060..7df930c 100644 --- a/app/models/seminar_signup.rb +++ b/app/models/seminar_signup.rb @@ -11,6 +11,9 @@ class SeminarSignup field :token field :is_confirmed, type: Boolean, default: false # for email confirmation field :signup_confirmed, type: Boolean, default: false + field :is_confirmed_date, type: DateTime + field :signup_confirmed_date, type: DateTime + field :emails_sent, type: Array, default: [] field :name # become Last Name for TICC field :tel, type: String # become First Name for TICC field :unit, localize: true #Only localize for preserving old record @@ -54,9 +57,10 @@ class SeminarSignup [l, (tmp ? tmp : unit)] end.to_h if self.serial_number.nil? - last_serial_number = SeminarMain.where(:id=>self.seminar_main_id).max(:last_serial_number).to_i - self.serial_number = last_serial_number + 1 - SeminarMain.where(:id=>self.seminar_main_id).update_all({"$inc"=>{"last_serial_number"=>1}}) + # last_serial_number = SeminarMain.where(:id=>self.seminar_main_id).max(:last_serial_number).to_i + # self.serial_number = last_serial_number + 1 + # SeminarMain.where(:id=>self.seminar_main_id).update_all({"$inc"=>{"last_serial_number"=>1}}) + self.serial_number = DateTime.now.to_i end self.token = SecureRandom.hex(5) end diff --git a/app/models/seminar_signup_field.rb b/app/models/seminar_signup_field.rb index 2025454..1cbd39e 100644 --- a/app/models/seminar_signup_field.rb +++ b/app/models/seminar_signup_field.rb @@ -15,9 +15,9 @@ class SeminarSignupField field :built_in, type: Boolean, default: false field :disabled, type: Boolean, default: false # field :to_delete, type: Boolean, default: false - + field :to_require,type: Boolean, default: true - + field :typeA, type: Hash, default: {cross_lang: false} field :typeB, type: Hash, default: {} field :typeC, type: Hash, default: {calendar: "west_calendar", format: "format3"} @@ -57,8 +57,8 @@ class SeminarSignupField def option_list if self_defined_markup_options? - #Class need to have corresponding field and value agent - # Ex: For "status" the class must have field called "statuses" for the relation and "statuses_for_select" for the select function + #Class need to have corresponding field and value agent + # Ex: For "status" the class must have field called "statuses" for the relation and "statuses_for_select" for the select function method = self.seminar.method(self[:key].pluralize+"_for_"+markup) return (method.call rescue {}) elsif self[:option_list].nil? || (self[:option_list].empty?) @@ -103,7 +103,7 @@ class SeminarSignupField def is_built_in? self.built_in end - + def is_disabled? self.disabled end @@ -131,7 +131,7 @@ class SeminarSignupField if self[field]["cross_lang"] != var["cross_lang"] case var["cross_lang"] when "true" #from no-add_more to add_more - cross_lang_convert(:to_cross_lang) + cross_lang_convert(:to_cross_lang) else #from add_more to no-add_more cross_lang_convert(:to_no_cross_lang) end # of case @@ -142,23 +142,23 @@ class SeminarSignupField if self["typeA"]["add_more"] != var["add_more"] case var["add_more"] when "true" #from no-add_more to add_more - add_more_convert(:to_add_more) + add_more_convert(:to_add_more) else #from add_more to no-add_more add_more_convert(:to_no_add_more) end # of case end # of if end - def cross_lang_convert(opt) - + def cross_lang_convert(opt) + end def check_option_list self[:option_list] = self[panel]["option_list"] rescue nil end - def add_more_convert(opt) + def add_more_convert(opt) end -end \ No newline at end of file +end diff --git a/app/views/admin/seminar_signups/edit.html.erb b/app/views/admin/seminar_signups/edit.html.erb index 1928537..bc5f1c0 100644 --- a/app/views/admin/seminar_signups/edit.html.erb +++ b/app/views/admin/seminar_signups/edit.html.erb @@ -1,4 +1,4 @@ -<%= form_for @seminar_signup, url: admin_seminar_signup_path(@seminar_signup), html: {class: "form-horizontal main-forms"} do |f| %> +<%= form_for @seminar_signup, url: admin_seminar_signup_path(@seminar_signup), html: {class: "form-horizontal main-forms", multipart: true} do |f| %>
<% content_for :page_specific_css do %> @@ -123,6 +123,15 @@ <%= t("seminar.send_email_button") %> +
+
+ +
+ <% @seminar_signup.emails_sent.each do |em| %> + <%= t("seminar.#{em}") %> + <% end %> +
+
<% elsif signup_field.field_name == 'note' %>
@@ -212,6 +221,7 @@
@@ -267,6 +277,7 @@ $(document).ready(function(){ success : function(data){ if( data.success == true ){ alert("Email Sent"); + $("#emails_sent").append(''+ data.type +''); } } }) @@ -274,4 +285,19 @@ $(document).ready(function(){ return false; }) }) +$(".upload").on("change",function(){ + filenamedom = $(this).parent().parent().find(".filename"); + filenameA = $(this).val().split('\\'); + filenamedom.text(filenameA[filenameA.length - 1]); +}) +$("#seminar_signup_signup_confirmed").on("change",function () { + if(this.checked){ + dt = new Date(); + format = dt.getFullYear() + "/" + dt.getMonth() + "/" + dt.getDate() + " " + dt.getHours() + ":" + dt.getMinutes(); + $("#seminar_signup_signup_confirmed_date").val(format); + }else{ + $("#seminar_signup_signup_confirmed_date").val(""); + } +}) + \ No newline at end of file diff --git a/app/views/seminars/con_upload.html.erb b/app/views/seminars/con_upload.html.erb index c197961..8ca4b51 100644 --- a/app/views/seminars/con_upload.html.erb +++ b/app/views/seminars/con_upload.html.erb @@ -21,17 +21,17 @@ else prefix_url = OrbitHelper.url_to_show(@seminar.to_param) end + %> +

<%= @seminar.title %>

<% if @seminar.contribute_start_date <= @time_now and ( @seminar.contribute_end_date.nil? or @seminar.contribute_end_date+1 >= @time_now ) %> <% begin %> <% if !session[:seminar_signup_id].blank? %> - <%=t('seminar_signup.serial_number') %>: <%=@seminar_signup.display_serial_number rescue ""%> - <%= t('seminar_signup.logout') %> - + <%= t('seminar_signup.serial_number') %>: <%=@seminar_signup.display_serial_number rescue ""%> + <%= t('seminar_signup.logout') %> + <%= t('seminar_signup.edit_form') %> + <% if data["show"] %> - <% if show1 %> @@ -91,6 +91,7 @@ <%= link_to content_tag(:i, nil, :class => 'icon-plus') +' '+ t('seminar_signup.new_'), prefix_url + '?method=add_file', :class => 'btn btn-primary' %> + <% end %> <% end %>

diff --git a/app/views/seminars/edit_login_seminar_signup.html.erb b/app/views/seminars/edit_login_seminar_signup.html.erb new file mode 100644 index 0000000..de08a4e --- /dev/null +++ b/app/views/seminars/edit_login_seminar_signup.html.erb @@ -0,0 +1,353 @@ +<% + data = action_data + @seminar = data["seminar"] + @seminar_signup = data["seminar_signup"] + @time_now = data["time_now"] + @form_index = 0 + if data["prefix_url"] + prefix_url = data["prefix_url"] + else + prefix_url = OrbitHelper.url_to_show(@seminar.to_param) + end + registration_is_open = @seminar.registration_status.present? + sign_up_not_yet = @seminar.signup_start_date && @time_now && @seminar.signup_start_date > @time_now + sign_up_overdue = @seminar.signup_end_date && @time_now && (@seminar.signup_end_date + 1.day <= @time_now) + signup_is_full = @seminar.signup_is_full? +%> +<% if !registration_is_open %> + +<%= t('seminar.sign_up_not_open') %> + +<% elsif sign_up_not_yet %> + +<%= t('seminar.sign_up_not_yet') %> + +<% elsif sign_up_overdue %> + +<%= t('seminar.sign_up_overdue') %> + +<% elsif signup_is_full %> + +<%= t('seminar.sign_up_is_full') %> + +<% else %> + <%#= stylesheet_link_tag "lib/main-forms" %> + <%= stylesheet_link_tag "basic/bootstrap-datetimepicker" %> + <%= javascript_include_tag "lib/bootstrap-datetimepicker" %> + <%= javascript_include_tag "lib/datetimepicker/date.time.picker.js" %> + <%= javascript_include_tag "lib/datetimepicker/datetimepicker.js" %> +<% notice = flash["notice"] || params[:notice] %> +<% flash.each do |key, msg| %> + <% next if key.to_s == "notice" %> + <%= content_tag :p, msg, :class => [key, "alert alert-error in fade"], :style => "color: red; font-weight: bold;" %> +<% end %> +<% if notice.present? %> + <%= content_tag :p, params[:notice], :class => ["notice alert alert-error in fade"], :style => "color: red; font-weight: bold;" %> + +<% end %> + +<%= form_for @seminar_signup, url: update_signup_form_seminars_path, html: {class: "content form-horizontal" , :id=>"new-seminar-signup", multipart: true} do |f| %> +
+ + +
+ +
+ <%= @seminar.title %> +
+
+ <% if !@seminar.signup_note.blank? %> +
+ +
+ <%= @seminar.signup_note.html_safe %> +
+
+ <% end %> +
+
*(<%= t('seminar.required') %>)
+
+ <% if @seminar.seminar_signup_field_sets.count != 0 %> + <% @seminar.seminar_signup_field_sets.each do |signup_field| %> + <% if !(signup_field.disabled) && signup_field.field_name != 'recaptcha' %> + + <% end %> + <% end %> + <% else %> +
+ +
+ <% if @seminar.registration_status.include?('G') %> + + <% end %> + <% if @seminar.registration_status.include?('C') %> + + <% end %> +
+
+ + +
+ +
+ <%= f.text_field :name, :class=>"input-medium form-control", :id=>'name', :placeholder=> t('seminar_signup.name'), :required => true %> +
+
+ + +
+ +
+ <%= f.text_field :tel, :class=>"input-medium form-control", :placeholder=> t('seminar_signup.tel'), :required => true %> +
+
+ + +
+ +
+ <%= f.email_field :email, :class=>"input-medium form-control availibility", :placeholder=> t(:email), :required => true %> check mail +
+
+ +
+ +
+ <%= f.text_field :password, :class=>"input-medium form-control", :placeholder=> t('seminar_signup.password') %> + <%= t('seminar_signup.password_message') %> +
+
+ + <% end %> + <% @seminar.seminar_signup_fields.where(:disabled=>false).asc(:sort_number, :_id).each do |rf| %> + +
+ + <%= rf.block_helper(@seminar,@form_index,false,"seminar_signup",@seminar_signup, rf.to_require) %> + +
+ + <% @form_index = @form_index +1 %> + + <% end %> + + + + <% if @seminar.seminar_signup_field_sets.count != 0 %> + <% if !(@seminar.seminar_signup_field_sets.select{|v| v.field_name=='recaptcha'}[0].disabled) %> +
+ +
+ <%= gotcha_error %> + <%= gotcha %> +
+
+ <% end %> + <% end %> + + + + + +
+
+ "> + + + <%= f.submit "Submit", class: 'btn btn-primary', :id => 'button-mail' %> + <%= f.button "Delete", type: 'reset', class: 'btn' %> +
+
+ +
+<% end %> + + + + +<% end %> \ No newline at end of file diff --git a/config/locales/en.yml b/config/locales/en.yml index e7a598e..9ee06a6 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -104,6 +104,7 @@ en: auto_send_email_set: Auto send email setting email_forgot_password: Forgot Password email_special_reminder: Special Reminder + special_reminder: Special Reminder email_reset_password_content: Forgot Password email_reset_password_success: Forgot Password email_special_reminder_content: Special Reminder @@ -173,6 +174,7 @@ en: sign_up_failed: "Sign up failed!" contribute_file_count: Count of Contribute Files #投稿檔案數 seminar_signup_success: Signup Success Message + reset_password: Reset Password frontend: seminar: Semianr #研討會前台 @@ -210,7 +212,7 @@ en: recaptcha: Verification code signup_field: Sign Up Field #圈選項目 uploads: Uploads #上傳檔案 - con_login: Submission #投稿者登入 + con_login: Login #投稿者登入 file_name: File Name #稿件名稱 file_note: Summary #摘要 files: Files #檔案 @@ -228,7 +230,7 @@ en: checkbox: Multiple choice radio: Single choice choices: Choices - forgot_password: Forgot Password + forgot_password: Set Password reset_email_sent: Reset Email Sent login_failed: Login Failed email_not_found: Email not found @@ -247,4 +249,6 @@ en: email_confirmed: Email Confirmed email_not_confirmed: Email not confirmed signup_not_confirmed: Signup not confirmed - send_email: Send Email \ No newline at end of file + send_email: Send Email + edit_form: Edit Form + emails_already_sent: Emails Already Sent \ No newline at end of file diff --git a/config/locales/zh_tw.yml b/config/locales/zh_tw.yml index 974b3f5..e22d49a 100644 --- a/config/locales/zh_tw.yml +++ b/config/locales/zh_tw.yml @@ -105,14 +105,15 @@ zh_tw: auto_send_email_set: 自動發信設定 email_forgot_password: 忘記密碼 email_special_reminder: 特殊通知 + special_reminder: 特殊通知 email_reset_password_content: 忘記密碼 email_reset_password_success: 忘記密碼 email_special_reminder_content: 特殊通知 email_special_reminder_success: 特殊通知 is_confirmation: 認證Email click_here_to_confirm: Please click this link / 請點選此連結 - confirm_ok: Email已認證 - confirm_not_ok: Email未認證 + confirm_ok: 認證通過 + confirm_not_ok: 連結已失效 select_email_type: 選擇Email種類 send_email_text: 附加額外文字內容 predefined_text: 預設郵件內容 @@ -174,6 +175,7 @@ zh_tw: sign_up_failed: "報名失敗" contribute_file_count: 投稿檔案數 seminar_signup_success: Signup Success Message + reset_password: Reset Password frontend: seminar: 研討會前台 @@ -211,7 +213,7 @@ zh_tw: recaptcha: 驗證碼 signup_field: 圈選項目 uploads: 上傳檔案 - con_login: Submission + con_login: 登入 file_name: 稿件名稱 file_note: 摘要 files: 檔案 @@ -229,7 +231,7 @@ zh_tw: checkbox: 多選 radio: 單選 choices: 選項 - forgot_password: 忘記密碼 + forgot_password: 設定密碼 reset_email_sent: 重設密碼Email已送出 login_failed: 登入失敗 email_not_found: 找不到Email @@ -247,4 +249,6 @@ zh_tw: email_confirmed: Email已確認 email_not_confirmed: Email尚未確認 signup_not_confirmed: 註冊尚未查核確認 - send_email: 寄送Email \ No newline at end of file + send_email: 寄送Email + edit_form: Edit Form + emails_already_sent: Emails Already Sent \ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb index 455e63e..9fb825b 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -109,6 +109,7 @@ Rails.application.routes.draw do post 'add_file_proc', to: 'seminars#add_file_proc' post 'edit_file_proc', to: 'seminars#edit_file_proc' post 'del_file', to: 'seminars#del_file' + patch 'update_signup_form', to: 'seminars#update_signup_form' end end post "/xhr/seminars/send_notifying_email" => "seminars#send_notifying_email"
-

<%= @seminar.title %>

-