i1. Signup form: remove member button(hide added fields and content), all fields become required after add member, hide page title

2. Login refill form interface
3. Back office file upload field problem, files will disappear after edit and submit
4. Signup number change to day and time or any other form that user cannot recognize order
5. Add 1 more field: “ Sent Email 寄送郵件“, show sent Email type and time
6. Show time log in the back office signee list page for: form submission, Email Confirmed, Signup Confirmed, Sent Email
7. Wordings:
Forgot password link to reset page: “重設密碼” change to  設定密碼 Set Password
Confirmation Email link to the page: “Confirm OK” —> ” 認證通過 “ ; “Confirm Not OK” —> “連結已失效”
This commit is contained in:
Bomrah Harry 2023-10-07 22:34:07 +08:00
parent 64a8077e5b
commit dbff09dbc0
10 changed files with 514 additions and 62 deletions

View File

@ -3,7 +3,7 @@ class SeminarsController < ApplicationController
include MemberHelper include MemberHelper
include ActionView::Context #vary important (only add this can access @@session from view) include ActionView::Context #vary important (only add this can access @@session from view)
include Admin::SeminarsHelper 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 # include SimpleCaptcha::ControllerHelpers
def index def index
@ -520,6 +520,29 @@ class SeminarsController < ApplicationController
end 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 def signup_ok
params = OrbitHelper.params params = OrbitHelper.params
msg = SeminarMain.where(:uid => params[:seminar]).first.signup_success 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 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 else
seminar = {} seminar = {}
@ -716,11 +749,32 @@ class SeminarsController < ApplicationController
{ {
'time_now' => time_now, 'time_now' => time_now,
'seminar' => seminar, 'seminar' => seminar,
'seminar_signup' => seminar_signup 'seminar_signup' => seminar_signup,
"show" => show
} }
end 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 def con_logout
# redirect_to page_for_seminar_url # redirect_to page_for_seminar_url
@ -770,6 +824,7 @@ class SeminarsController < ApplicationController
if(!signup.nil?) if(!signup.nil?)
signup.token = nil signup.token = nil
signup.is_confirmed = true signup.is_confirmed = true
signup.is_confirmed_date = DateTime.now
signup.save signup.save
confirm = true confirm = true
end end
@ -845,8 +900,11 @@ class SeminarsController < ApplicationController
extra_text += "<br><a href='#{request.protocol + request.host_with_port + "/" + I18n.locale.to_s + "/seminar/" + @seminar.to_param}/?method=reset_password_page&token=#{token}&cid=#{seminar_signup.id.to_s}'>#{t("seminar.click_here_to_confirm")}</a>" extra_text += "<br><a href='#{request.protocol + request.host_with_port + "/" + I18n.locale.to_s + "/seminar/" + @seminar.to_param}/?method=reset_password_page&token=#{token}&cid=#{seminar_signup.id.to_s}'>#{t("seminar.click_here_to_confirm")}</a>"
end end
send_mail(params[:type], seminar_signup.email, @seminar.id.to_s, extra_text) send_mail(params[:type], seminar_signup.email, @seminar.id.to_s, extra_text)
seminar_signup.emails_sent << params[:type]
seminar_signup.save
end end
render :json => { render :json => {
"type" => t("seminar.#{params[:type]}"),
"success" => true "success" => true
}.to_json }.to_json
end end

View File

@ -50,14 +50,14 @@ module Admin::SeminarsFieldHelper
def render_checkbox def render_checkbox
@prefiled_value ||=[] @prefiled_value ||=[]
control_group_wrapper_for_sm do control_group_wrapper_for_sm do
a = self.typeE[:option_list].collect do |key,value| 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")) 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.join.html_safe rescue ""
end end
end end
def render_date def render_date
d = DateTime.now() d = DateTime.now()
if date_is_range? if date_is_range?
@ -81,13 +81,13 @@ module Admin::SeminarsFieldHelper
when 'format3' when 'format3'
fill_from = (@prefiled_value && @prefiled_value["from"] ) ? @prefiled_value["from"] : d.strftime("%Y/%m") 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/") 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 << ' ~ '
buf << datetime_picker(get_field_name_base+'[to]', fill_to, 'yyyy/MM') buf << datetime_picker(get_field_name_base+'[to]', fill_to, 'yyyy/MM')
when 'format4' when 'format4'
fill_from = (@prefiled_value && @prefiled_value["from"] ) ? @prefiled_value["from"] : d.strftime("%Y") 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") 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 << ' ~ '
buf << datetime_picker(get_field_name_base+'[to]', fill_to, 'yyyy') buf << datetime_picker(get_field_name_base+'[to]', fill_to, 'yyyy')
end end
@ -107,13 +107,13 @@ module Admin::SeminarsFieldHelper
when 'format2' when 'format2'
tmp = datetime_picker(get_field_name_base, (@prefiled_value ? @prefiled_value : d.strftime("%Y/%m/%d")), 'yyyy/MM/dd') tmp = datetime_picker(get_field_name_base, (@prefiled_value ? @prefiled_value : d.strftime("%Y/%m/%d")), 'yyyy/MM/dd')
when 'format3' 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' 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 end
control_group_wrapper_for_sm{tmp} 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{date_select(get_field_name_base,nil,@markup_options.merge(:default=>@prefiled_value),:class=>"input-small")}
end end
end end
@ -131,7 +131,7 @@ module Admin::SeminarsFieldHelper
end end
def render_date_durnation #Need re-write low priority def render_date_durnation #Need re-write low priority
end end
def render_radio_button def render_radio_button
@ -179,7 +179,7 @@ module Admin::SeminarsFieldHelper
place_holder= typeA["placeholder"][key_field] rescue '' 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) 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')) text_field_tag(name1, value, @markup_options.merge(:placeholder=>place_holder,:class=>'input-medium form-control'))
end end
end end
def render_file_field def render_file_field
@ -192,16 +192,16 @@ module Admin::SeminarsFieldHelper
<input style=\"position: absolute;width:0.1em;opacity: 0;padding: 0;border: 0;opacity: 0;left: 50%;top: 0;\" class=\"upload\" name=\"#{field_name}\" #{file_required} type=\"file\" /> <input style=\"position: absolute;width:0.1em;opacity: 0;padding: 0;border: 0;opacity: 0;left: 50%;top: 0;\" class=\"upload\" name=\"#{field_name}\" #{file_required} type=\"file\" />
<i class=\"fa fa-file\"></i> #{I18n.t('file.upload')} <i class=\"fa fa-file\"></i> #{I18n.t('file.upload')}
</label><div class=\"filename\"></div></div>#{value}".html_safe </label><div class=\"filename\"></div></div>#{value}".html_safe
end end
end end
def date_is_range? def date_is_range?
is_range = "false" is_range = "false"
data = get_data data = get_data
if !data.nil? 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 end
is_range == "true" is_range == "true"
end end
protected protected
@ -239,7 +239,7 @@ protected
div_class << (key == I18n.locale ? " active in" : '') div_class << (key == I18n.locale ? " active in" : '')
content_tag(:div,yield(key,value), :id=>div_id,:class=>div_class) content_tag(:div,yield(key,value), :id=>div_id,:class=>div_class)
end# of VALID_LOCALES.collect for tabed input 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| 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 = 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' if @show_set_field_for_sm && @markup=='text_area'
@ -262,7 +262,7 @@ protected
else else
# tmp = content_tag :div,:class=> (add_more || self.markup=='address') ? "input-append" : "tab-content" do # tmp = content_tag :div,:class=> (add_more || self.markup=='address') ? "input-append" : "tab-content" do
tmp1 = tmp1 =
content_tag :div,:class=> "tab-content" do content_tag :div,:class=> "tab-content" do
buff = valid_locales.collect do |key| buff = valid_locales.collect do |key|
@ -289,7 +289,7 @@ protected
end 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| 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 = self.add_more ? "#{add_more_tab(:tab_btn,loop_counter,key)}" : "#tab"+id.to_s+"_#{key}"
link_entry_ary = ["##{get_pairing_tab_class({})}","_#{key}"] link_entry_ary = ["##{get_pairing_tab_class({})}","_#{key}"]
@ -304,7 +304,7 @@ protected
end # of content ul end # of content ul
tmp = content_tag :div,:class=> "input-append" do tmp = content_tag :div,:class=> "input-append" do
tmp1 << tmp2 tmp1 << tmp2
end end
@ -319,8 +319,8 @@ protected
add_more_counter = "" add_more_counter = ""
if can_add_more if can_add_more
add_more_counter = add_more_params[0][:counter] add_more_counter = add_more_params[0][:counter]
add_more_value = add_more_params[0][:value] add_more_value = add_more_params[0][:value]
end end
if can_muti_lang_input_for_sm? if can_muti_lang_input_for_sm?
@ -330,7 +330,7 @@ protected
else #cross lang field else #cross lang field
case can_add_more case can_add_more
when true 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 << 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 # result << add_more_unt
else else
@ -346,7 +346,7 @@ protected
end # of def controls_wrapper_for_sm(&block) 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? ? "col-sm-10 controls" : "col-sm-10 controls"
# div_class = can_muti_lang_input_for_sm? ? "control-group language-swich" : "control-group" # div_class = can_muti_lang_input_for_sm? ? "control-group language-swich" : "control-group"
result = "" result = ""
@ -357,7 +357,7 @@ protected
if can_add_more if can_add_more
multipleInputs = multipleInputs =
content_tag(:div,:class=>"add-target") do content_tag(:div,:class=>"add-target") do
@attribute_value.add_more_counter.times.collect do |t| @attribute_value.add_more_counter.times.collect do |t|
controls_wrapper_for_sm(:value=>(@prefiled_value[t] rescue nil),:counter=>t,&block) 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') 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 + multipleInputs + add_more_unt
# result = label + 一堆的輸入框(要用 multipleInput editMore 包起來) + add_more btn + hidden_fields # result = label + 一堆的輸入框(要用 multipleInput editMore 包起來) + add_more btn + hidden_fields
@ -393,7 +393,7 @@ protected
end end
def add_more_unt def add_more_unt
temp_field_name = get_basic_field_name_base + '[temp]' temp_field_name = get_basic_field_name_base + '[temp]'
add_more = content_tag :p,:class=> 'add-btn' do 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" 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] prefix = opts[:prefix]
suffix = opts[:suffix] suffix = opts[:suffix]
str = get_basic_field_name_base.gsub("[","_").gsub("]",'') 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 suffix.nil? ? str : str + suffix
end end
@ -454,7 +454,8 @@ protected
def form_label def form_label
if self.markup == "text_area" 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 label_tag(key, '' , :class=>"col-sm-2 control-label muted") do
concat (!@require.blank? ? '*'+title : title) concat (!@require.blank? ? '*'+title : title)
if plc if plc
@ -471,7 +472,7 @@ protected
if self.markup == "address" if self.markup == "address"
return true return true
else 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
end end
@ -538,7 +539,7 @@ protected
if markup=='text_field' if markup=='text_field'
if key_field == 'seminar_email_sets' if key_field == 'seminar_email_sets'
inside = text_field_tag([get_field_name_base,"[#{key}]"].join,value,:class=>'input-medium form-control') 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) inside = text_field_tag([get_field_name_base,"[#{key}]"].join,value)
end end
else else
@ -552,4 +553,4 @@ protected
@show_set_field_for_sm = nil @show_set_field_for_sm = nil
return a.html_safe return a.html_safe
end end
end end

View File

@ -11,6 +11,9 @@ class SeminarSignup
field :token field :token
field :is_confirmed, type: Boolean, default: false # for email confirmation field :is_confirmed, type: Boolean, default: false # for email confirmation
field :signup_confirmed, type: Boolean, default: false 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 :name # become Last Name for TICC
field :tel, type: String # become First Name for TICC field :tel, type: String # become First Name for TICC
field :unit, localize: true #Only localize for preserving old record field :unit, localize: true #Only localize for preserving old record
@ -54,9 +57,10 @@ class SeminarSignup
[l, (tmp ? tmp : unit)] [l, (tmp ? tmp : unit)]
end.to_h end.to_h
if self.serial_number.nil? if self.serial_number.nil?
last_serial_number = SeminarMain.where(:id=>self.seminar_main_id).max(:last_serial_number).to_i # last_serial_number = SeminarMain.where(:id=>self.seminar_main_id).max(:last_serial_number).to_i
self.serial_number = last_serial_number + 1 # self.serial_number = last_serial_number + 1
SeminarMain.where(:id=>self.seminar_main_id).update_all({"$inc"=>{"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 end
self.token = SecureRandom.hex(5) self.token = SecureRandom.hex(5)
end end

View File

@ -15,9 +15,9 @@ class SeminarSignupField
field :built_in, type: Boolean, default: false field :built_in, type: Boolean, default: false
field :disabled, type: Boolean, default: false field :disabled, type: Boolean, default: false
# field :to_delete, type: Boolean, default: false # field :to_delete, type: Boolean, default: false
field :to_require,type: Boolean, default: true field :to_require,type: Boolean, default: true
field :typeA, type: Hash, default: {cross_lang: false} field :typeA, type: Hash, default: {cross_lang: false}
field :typeB, type: Hash, default: {} field :typeB, type: Hash, default: {}
field :typeC, type: Hash, default: {calendar: "west_calendar", format: "format3"} field :typeC, type: Hash, default: {calendar: "west_calendar", format: "format3"}
@ -57,8 +57,8 @@ class SeminarSignupField
def option_list def option_list
if self_defined_markup_options? if self_defined_markup_options?
#Class need to have corresponding field and value agent #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 # 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) method = self.seminar.method(self[:key].pluralize+"_for_"+markup)
return (method.call rescue {}) return (method.call rescue {})
elsif self[:option_list].nil? || (self[:option_list].empty?) elsif self[:option_list].nil? || (self[:option_list].empty?)
@ -103,7 +103,7 @@ class SeminarSignupField
def is_built_in? def is_built_in?
self.built_in self.built_in
end end
def is_disabled? def is_disabled?
self.disabled self.disabled
end end
@ -131,7 +131,7 @@ class SeminarSignupField
if self[field]["cross_lang"] != var["cross_lang"] if self[field]["cross_lang"] != var["cross_lang"]
case var["cross_lang"] case var["cross_lang"]
when "true" #from no-add_more to add_more 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 else #from add_more to no-add_more
cross_lang_convert(:to_no_cross_lang) cross_lang_convert(:to_no_cross_lang)
end # of case end # of case
@ -142,23 +142,23 @@ class SeminarSignupField
if self["typeA"]["add_more"] != var["add_more"] if self["typeA"]["add_more"] != var["add_more"]
case var["add_more"] case var["add_more"]
when "true" #from no-add_more to 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 else #from add_more to no-add_more
add_more_convert(:to_no_add_more) add_more_convert(:to_no_add_more)
end # of case end # of case
end # of if end # of if
end end
def cross_lang_convert(opt) def cross_lang_convert(opt)
end end
def check_option_list def check_option_list
self[:option_list] = self[panel]["option_list"] rescue nil self[:option_list] = self[panel]["option_list"] rescue nil
end end
def add_more_convert(opt) def add_more_convert(opt)
end end
end end

View File

@ -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| %>
<fieldset> <fieldset>
<% content_for :page_specific_css do %> <% content_for :page_specific_css do %>
@ -123,6 +123,15 @@
<a class="btn" id="send_email_button"><%= t("seminar.send_email_button") %></a> <a class="btn" id="send_email_button"><%= t("seminar.send_email_button") %></a>
</div> </div>
</div> </div>
<br />
<div class="controls">
<label for="" class="control-label muted"><%= t("seminar_signup.emails_already_sent") %></label>
<div class="controls" id="emails_sent">
<% @seminar_signup.emails_sent.each do |em| %>
<span class="label label-success"><%= t("seminar.#{em}") %></span>
<% end %>
</div>
</div>
<% elsif signup_field.field_name == 'note' %> <% elsif signup_field.field_name == 'note' %>
<div class="controls"> <div class="controls">
<div class="input-append"> <div class="input-append">
@ -212,6 +221,7 @@
<div class="controls"> <div class="controls">
<label class="radio-inline"> <label class="radio-inline">
<%= f.check_box :signup_confirmed, :checked => (@seminar_signup.signup_confirmed)%> <%= f.check_box :signup_confirmed, :checked => (@seminar_signup.signup_confirmed)%>
<%= f.hidden_field :signup_confirmed_date %>
<%= t('seminar_signup.registration_complete') %> <%= t('seminar_signup.registration_complete') %>
</label> </label>
</div> </div>
@ -267,6 +277,7 @@ $(document).ready(function(){
success : function(data){ success : function(data){
if( data.success == true ){ if( data.success == true ){
alert("Email Sent"); alert("Email Sent");
$("#emails_sent").append('<span class="label label-success">'+ data.type +'</span>');
} }
} }
}) })
@ -274,4 +285,19 @@ $(document).ready(function(){
return false; 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("");
}
})
</script> </script>

View File

@ -21,17 +21,17 @@
else else
prefix_url = OrbitHelper.url_to_show(@seminar.to_param) prefix_url = OrbitHelper.url_to_show(@seminar.to_param)
end end
%> %>
<h3 style="display:block;"><%= @seminar.title %></h3>
<% if @seminar.contribute_start_date <= @time_now and ( @seminar.contribute_end_date.nil? or @seminar.contribute_end_date+1 >= @time_now ) %> <% if @seminar.contribute_start_date <= @time_now and ( @seminar.contribute_end_date.nil? or @seminar.contribute_end_date+1 >= @time_now ) %>
<% begin %> <% begin %>
<% if !session[:seminar_signup_id].blank? %> <% if !session[:seminar_signup_id].blank? %>
<%=t('seminar_signup.serial_number') %>: <%=@seminar_signup.display_serial_number rescue ""%> <%= t('seminar_signup.serial_number') %>: <%=@seminar_signup.display_serial_number rescue ""%>
<a href="<%= prefix_url %>?method=con_logout&con_no=<%= @seminar.id %>" class='btn btn-primary'><%= t('seminar_signup.logout') %></a> <a href="<%= prefix_url %>?method=con_logout&con_no=<%= @seminar.id %>" class='btn btn-primary' style="display:inline;"><%= t('seminar_signup.logout') %></a>
<a href="<%= prefix_url %>?method=edit_login_seminar_signup&con_no=<%= @seminar.id %>" class='btn btn-primary' style="display:inline;"><%= t('seminar_signup.edit_form') %></a>
<% if data["show"] %>
<table class="table table-hover table-striped seminar-index"> <table class="table table-hover table-striped seminar-index">
<caption>
<h3><%= @seminar.title %></h3>
</caption>
<thead> <thead>
<tr> <tr>
<% if show1 %> <% 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' %> <%= link_to content_tag(:i, nil, :class => 'icon-plus') +' '+ t('seminar_signup.new_'), prefix_url + '?method=add_file', :class => 'btn btn-primary' %>
<% end %>
<% end %> <% end %>
<br /> <br />
<br /> <br />

View File

@ -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;" %>
<script type="text/javascript">
window.alert("<%=notice%>");
</script>
<% end %>
<style type="text/css">
.checkbox input[type=checkbox], .checkbox-inline input[type=checkbox], .radio input[type=radio], .radio-inline input[type=radio] {
position: relative;
margin: 0;
}
</style>
<%= form_for @seminar_signup, url: update_signup_form_seminars_path, html: {class: "content form-horizontal" , :id=>"new-seminar-signup", multipart: true} do |f| %>
<fieldset>
<!-- Title -->
<div class="form-group">
<label for="title" class="col-sm-2 control-label"><%= t('seminar.title') %></label>
<div class="col-sm-10">
<%= @seminar.title %>
</div>
</div>
<% if !@seminar.signup_note.blank? %>
<div class="form-group">
<label for="note" class="col-sm-2 control-label"><%= t('seminar.note') %></label>
<div class="col-sm-10">
<%= @seminar.signup_note.html_safe %>
</div>
</div>
<% end %>
<div>
<div class="col-sm-12" style="text-align: center;"> *(<%= t('seminar.required') %>) </div>
</div>
<% 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' %>
<div class="form-group<%= (@seminar.registration_status[0] == 'G' && signup_field.field_name == 'password') ? ' hide' : '' %>" id="<%= signup_field.field_name == 'password' ? 'registration_status' : '' %>">
<label for="<%= signup_field['name'][I18n.locale] %>" class="col-sm-2 control-label">
<% if !(['address','note'].include? signup_field.field_name) %>
*
<% end %>
<%= signup_field['name'][I18n.locale] %>
</label>
<% if signup_field.field_name == 'status' %>
<% status_translations = ['G','C'].map{|c| [c, t("seminar.registration_status_#{c}")] }.to_h %>
<% status_translations = {'G'=>'No','C'=>'Yes'} if (signup_field.name.values.select{|v| v.include?('?') || v.include?('是否')}.count != 0 rescue false) %>
<div class="col-sm-10">
<% if @seminar.registration_status.include?('G') %>
<label class="radio-inline">
<%= f.radio_button :status, 'G', :checked => true , :onclick => "$('#registration_status').addClass('hide');" %> <%= status_translations['G'] %>
</label>
<% end %>
<% if @seminar.registration_status.include?('C') %>
<label class="radio-inline">
<%= f.radio_button :status, 'C', :onclick => "$('#registration_status').removeClass('hide');", :checked => (@seminar.registration_status.count == 1 and @seminar.registration_status.include?('C') ? true : false) %> <%= status_translations['C'] %>
</label>
<% end %>
</div>
<% elsif signup_field.field_name == 'unit' %>
<div class="col-sm-10">
<%= f.text_field 'unit', :class=>"input-medium form-control", :value => (@seminar_signup.send("unit_translations")[locale] rescue nil), :placeholder=> "#{signup_field.placeholder[I18n.locale]}", :required => true %>
</div>
<% elsif signup_field.field_name == 'address' %>
<div class="col-sm-10">
<div class="input-append">
<div class="tab-content">
<% @site_in_use_locales.each_with_index do |locale, i| %>
<div class="tab-pane fade <%= ( i == 0 ) ? "active in" : '' %>" id="address_<%= locale %>">
<%= f.fields_for "address_translations".to_sym do |f| %>
<%= f.text_field locale, :class=>"input-medium form-control", :value => (@seminar_signup.send("address_translations")[locale] rescue nil), :placeholder=> "#{signup_field.placeholder[I18n.locale]}" %>
<% end %>
</div>
<% end %>
</div>
<div class="btn-group" data-toggle="buttons-radio">
<% @site_in_use_locales.each_with_index do |locale, i| %>
<a class="btn <%= ( i == 0 ) ? "active" : '' %>" href="#address_<%= locale %>" data-toggle="tab"><%= t(locale.to_s) %></a>
<% end %>
</div>
</div>
</div>
<% elsif signup_field.field_name == 'email' %>
<div class="col-sm-10">
<%= f.email_field :email, :class=>"input-medium form-control availibility", :placeholder=> signup_field.placeholder[I18n.locale], :required => true, :title => t("seminar_signup.email_check") %> <a href="#" onclick="window.open(' <%= prefix_url %>?method=check_email&no=<%=@seminar.id%>&layout=false&email='+ $('input[type=email]').val() , 'check mail', config='height=100,width=300');" class="btn btn-primary">check mail</a>
</div>
<% elsif signup_field.field_name == 'password' %>
<div class="col-sm-10">
<%= f.password_field :password, :class=>"input-medium form-control availibility", :id=>signup_field['field_name'], :placeholder=> signup_field.placeholder[I18n.locale], :pattern => signup_field.validator, :title => t("seminar_signup.password_check") %>
</div>
<% elsif signup_field.field_name == 'note' %>
<div class="col-sm-10">
<div class="input-append">
<div class="tab-content">
<% @site_in_use_locales.each_with_index do |locale, i| %>
<div class="tab-pane fade <%= ( i == 0 ) ? "active in" : '' %>" id="note_<%= locale %>">
<%= f.fields_for "note_translations".to_sym do |f| %>
<%= f.text_area locale, rows: 5, :class=>"input-medium form-control", :value => (@seminar_signup.send("note_translations")[locale] rescue nil), :placeholder=> "#{signup_field.placeholder[I18n.locale]}" %>
<% end %>
</div>
<% end %>
</div>
<div class="btn-group" data-toggle="buttons-radio">
<% @site_in_use_locales.each_with_index do |locale, i| %>
<a class="btn <%= ( i == 0 ) ? "active" : '' %>" href="#note_<%= locale %>" data-toggle="tab"><%= t(locale.to_s) %></a>
<% end %>
</div>
</div>
</div>
<% else %>
<div class="col-sm-10">
<%= f.text_field signup_field['field_name'], :class=>"input-medium form-control", :id=>signup_field['field_name'], :placeholder=> signup_field.placeholder[I18n.locale], :required => true %>
</div>
<% end %>
</div>
<% end %>
<% end %>
<% else %>
<div class="form-group">
<label for="status" class="col-sm-2 control-label"><%= t('seminar.registration_status') %></label>
<div class="col-sm-10">
<% if @seminar.registration_status.include?('G') %>
<label class="radio-inline">
<%= f.radio_button :status, 'G', :checked => true , :onclick => "$('#registration_status').addClass('hide');" %> <%= t('seminar.registration_status_G') %>
</label>
<% end %>
<% if @seminar.registration_status.include?('C') %>
<label class="radio-inline">
<%= f.radio_button :status, 'C', :onclick => "$('#registration_status').removeClass('hide');", :checked => (@seminar.registration_status.count == 1 and @seminar.registration_status.include?('C') ? true : false) %> <%= t('seminar.registration_status_C') %>
</label>
<% end %>
</div>
</div>
<!-- Name to Last Name -->
<div class="form-group">
<label for="name" class="col-sm-2 control-label">*<%= t('seminar_signup.name') %></label>
<div class="col-sm-10">
<%= f.text_field :name, :class=>"input-medium form-control", :id=>'name', :placeholder=> t('seminar_signup.name'), :required => true %>
</div>
</div>
<!-- Tel to First Name -->
<div class="form-group">
<label for="tel" class="col-sm-2 control-label">*<%= t('seminar_signup.tel') %></label>
<div class="col-sm-10">
<%= f.text_field :tel, :class=>"input-medium form-control", :placeholder=> t('seminar_signup.tel'), :required => true %>
</div>
</div>
<!-- Email -->
<div class="form-group">
<label for="email" class="col-sm-2 control-label">*<%= t(:email) %></label>
<div class="col-sm-10">
<%= f.email_field :email, :class=>"input-medium form-control availibility", :placeholder=> t(:email), :required => true %> <a href="#" onclick="window.open(' <%= prefix_url %>?method=check_email&no=<%=@seminar.id%>&layout=false&email='+ $('input[type=email]').val() , 'check mail', config='height=100,width=300');" class="btn btn-primary">check mail</a>
</div>
</div>
<div class="form-group <%= @seminar.registration_status[0] == 'C' ? '' : 'hide' %>" id="registration_status">
<label for="password" class="col-sm-2 control-label">*<%= t('seminar_signup.password') %></label>
<div class="col-sm-10">
<%= f.text_field :password, :class=>"input-medium form-control", :placeholder=> t('seminar_signup.password') %>
<%= t('seminar_signup.password_message') %>
</div>
</div>
<% end %>
<% @seminar.seminar_signup_fields.where(:disabled=>false).asc(:sort_number, :_id).each do |rf| %>
<div class="form-group">
<%= rf.block_helper(@seminar,@form_index,false,"seminar_signup",@seminar_signup, rf.to_require) %>
</div>
<% @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) %>
<div class="form-group">
<label for="note" class="col-sm-2 control-label"><%= t('seminar_signup.recaptcha') %></label>
<div class="col-sm-10">
<%= gotcha_error %>
<%= gotcha %>
</div>
</div>
<% end %>
<% end %>
<!-- <div class="form-group">
<label for="note" class="col-sm-2 control-label"><%#= t('nkuht_donate.recaptcha') %></label>
<div class="col-sm-10">
<%#= show_simple_captcha %>
</div>
</div> -->
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<label>
<input id="agree" name="agree" value="1" type="checkbox" required="required">
<a href="<%= prefix_url %>?method=show_privacy" target="_blank"><%= t("seminar_signup.agree")%></a>
</label>
</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 rescue "/" %>">
<input type="hidden" name="seminar_signup[seminar_main_id]" value="<%= @seminar.id %>">
<input type="hidden" name="signup_id" value="<%= @seminar_signup.id %>">
<%= f.submit "Submit", class: 'btn btn-primary', :id => 'button-mail' %>
<%= f.button "Delete", type: 'reset', class: 'btn' %>
</div>
</div>
</fieldset>
<% end %>
<script type="text/javascript">
(function(){
$(".rucaptcha-image").siblings("input[type=\"text\"]").attr("placeholder","Verification");
var validated = false,
chks = false,
pwd = $('#seminar_signup_password')
$("form.content").submit(function(event) {
if ($('#seminar_signup_status_c:checked').val() == 'C'){
if (pwd.val() == ''){
pwd.attr('required', true);
pwd.focus();
alert( '<%= t('seminar_signup.password') %>' + ' is required');
return false;
}
}
<%
@seminar.seminar_signup_fields.where(:disabled=>false).asc(:sort_number, :_id).each do |rf|
if rf.markup == 'checkbox'
%>
var checkedCount = $("input[type=checkbox][id^=seminar_signup_values_<%= rf.id %>]:checked").length;
if (checkedCount == 0){
alert( '<%= rf.title %>' + ' is required');
return false;
}
<%
end
end
%>
var form = $(this),
isChecked = $('#agree:checked').val()?true:false;
if(!isChecked){
return false;
}
});
$(".availibility").blur(function(){
var type = $(this).attr("id"),
loader = $(this).parent().find('.loader'),
elem = $(this),
value = $(this).val() || null;
var checkAvailability = function(){
$.ajax({
url : "<%= "#{prefix_url}?method=check_availability&no=#{@seminar.id}" %>",
data : {"type" : type, "value" : value},
dataType : "json",
type : "get",
success : function(data){
if( data.success == true ){
alert("1tttt");
}else{
alert("1ssss2");
}
}
})
}
if( value ){
if(type == "seminar_signup_email"){
checkAvailability();
}
}
})
$(".upload").on("change",function(){
let filenamedom = $(this).parent().parent().find(".filename");
let filenameA = $(this).val().split('\\');
filenamedom.text(filenameA[filenameA.length - 1]);
})
})();
</script>
<% end %>

View File

@ -104,6 +104,7 @@ en:
auto_send_email_set: Auto send email setting auto_send_email_set: Auto send email setting
email_forgot_password: Forgot Password email_forgot_password: Forgot Password
email_special_reminder: Special Reminder email_special_reminder: Special Reminder
special_reminder: Special Reminder
email_reset_password_content: Forgot Password email_reset_password_content: Forgot Password
email_reset_password_success: Forgot Password email_reset_password_success: Forgot Password
email_special_reminder_content: Special Reminder email_special_reminder_content: Special Reminder
@ -173,6 +174,7 @@ en:
sign_up_failed: "Sign up failed!" sign_up_failed: "Sign up failed!"
contribute_file_count: Count of Contribute Files #投稿檔案數 contribute_file_count: Count of Contribute Files #投稿檔案數
seminar_signup_success: Signup Success Message seminar_signup_success: Signup Success Message
reset_password: Reset Password
frontend: frontend:
seminar: Semianr #研討會前台 seminar: Semianr #研討會前台
@ -210,7 +212,7 @@ en:
recaptcha: Verification code recaptcha: Verification code
signup_field: Sign Up Field #圈選項目 signup_field: Sign Up Field #圈選項目
uploads: Uploads #上傳檔案 uploads: Uploads #上傳檔案
con_login: Submission #投稿者登入 con_login: Login #投稿者登入
file_name: File Name #稿件名稱 file_name: File Name #稿件名稱
file_note: Summary #摘要 file_note: Summary #摘要
files: Files #檔案 files: Files #檔案
@ -228,7 +230,7 @@ en:
checkbox: Multiple choice checkbox: Multiple choice
radio: Single choice radio: Single choice
choices: Choices choices: Choices
forgot_password: Forgot Password forgot_password: Set Password
reset_email_sent: Reset Email Sent reset_email_sent: Reset Email Sent
login_failed: Login Failed login_failed: Login Failed
email_not_found: Email not found email_not_found: Email not found
@ -247,4 +249,6 @@ en:
email_confirmed: Email Confirmed email_confirmed: Email Confirmed
email_not_confirmed: Email not confirmed email_not_confirmed: Email not confirmed
signup_not_confirmed: Signup not confirmed signup_not_confirmed: Signup not confirmed
send_email: Send Email send_email: Send Email
edit_form: Edit Form
emails_already_sent: Emails Already Sent

View File

@ -105,14 +105,15 @@ zh_tw:
auto_send_email_set: 自動發信設定 auto_send_email_set: 自動發信設定
email_forgot_password: 忘記密碼 email_forgot_password: 忘記密碼
email_special_reminder: 特殊通知 email_special_reminder: 特殊通知
special_reminder: 特殊通知
email_reset_password_content: 忘記密碼 email_reset_password_content: 忘記密碼
email_reset_password_success: 忘記密碼 email_reset_password_success: 忘記密碼
email_special_reminder_content: 特殊通知 email_special_reminder_content: 特殊通知
email_special_reminder_success: 特殊通知 email_special_reminder_success: 特殊通知
is_confirmation: 認證Email is_confirmation: 認證Email
click_here_to_confirm: Please click this link / 請點選此連結 click_here_to_confirm: Please click this link / 請點選此連結
confirm_ok: Email已認證 confirm_ok: 認證通過
confirm_not_ok: Email未認證 confirm_not_ok: 連結已失效
select_email_type: 選擇Email種類 select_email_type: 選擇Email種類
send_email_text: 附加額外文字內容 send_email_text: 附加額外文字內容
predefined_text: 預設郵件內容 predefined_text: 預設郵件內容
@ -174,6 +175,7 @@ zh_tw:
sign_up_failed: "報名失敗" sign_up_failed: "報名失敗"
contribute_file_count: 投稿檔案數 contribute_file_count: 投稿檔案數
seminar_signup_success: Signup Success Message seminar_signup_success: Signup Success Message
reset_password: Reset Password
frontend: frontend:
seminar: 研討會前台 seminar: 研討會前台
@ -211,7 +213,7 @@ zh_tw:
recaptcha: 驗證碼 recaptcha: 驗證碼
signup_field: 圈選項目 signup_field: 圈選項目
uploads: 上傳檔案 uploads: 上傳檔案
con_login: Submission con_login: 登入
file_name: 稿件名稱 file_name: 稿件名稱
file_note: 摘要 file_note: 摘要
files: 檔案 files: 檔案
@ -229,7 +231,7 @@ zh_tw:
checkbox: 多選 checkbox: 多選
radio: 單選 radio: 單選
choices: 選項 choices: 選項
forgot_password: 忘記密碼 forgot_password: 設定密碼
reset_email_sent: 重設密碼Email已送出 reset_email_sent: 重設密碼Email已送出
login_failed: 登入失敗 login_failed: 登入失敗
email_not_found: 找不到Email email_not_found: 找不到Email
@ -247,4 +249,6 @@ zh_tw:
email_confirmed: Email已確認 email_confirmed: Email已確認
email_not_confirmed: Email尚未確認 email_not_confirmed: Email尚未確認
signup_not_confirmed: 註冊尚未查核確認 signup_not_confirmed: 註冊尚未查核確認
send_email: 寄送Email send_email: 寄送Email
edit_form: Edit Form
emails_already_sent: Emails Already Sent

View File

@ -109,6 +109,7 @@ Rails.application.routes.draw do
post 'add_file_proc', to: 'seminars#add_file_proc' post 'add_file_proc', to: 'seminars#add_file_proc'
post 'edit_file_proc', to: 'seminars#edit_file_proc' post 'edit_file_proc', to: 'seminars#edit_file_proc'
post 'del_file', to: 'seminars#del_file' post 'del_file', to: 'seminars#del_file'
patch 'update_signup_form', to: 'seminars#update_signup_form'
end end
end end
post "/xhr/seminars/send_notifying_email" => "seminars#send_notifying_email" post "/xhr/seminars/send_notifying_email" => "seminars#send_notifying_email"