Merge branch 'master' into 'master'

fix error



See merge request !5
This commit is contained in:
chiu 2020-05-05 22:04:05 +08:00
commit 3518ce2525
3 changed files with 14 additions and 10 deletions

View File

@ -178,17 +178,21 @@ class SeminarsController < ApplicationController
update_params = seminar_signup_contribute_params.merge('seminar_submission_values'=>params['seminar_submission_values'])
flag = true
update_params.permit!
if update_params['seminar_submission_values']['0']['value'].class==String
value = update_params['seminar_submission_values']['0']['value']
if !value.to_s.blank?
flag = false
end
else
update_params['seminar_submission_values']['0']['value'].each do |key,value|
if !value.to_s.blank?
if !update_params['seminar_submission_values'].nil?
if update_params['seminar_submission_values']['0']['value'].class==String
value = update_params['seminar_submission_values']['0']['value']
if !value.to_s.blank?
flag = false
end
else
update_params['seminar_submission_values']['0']['value'].each do |key,value|
if !value.to_s.blank?
flag = false
end
end
end
else
flag = false
end
if flag
update_params['seminar_submission_values']['0']['value']['en'] = ' '

View File

@ -2,7 +2,7 @@
wb = xlsx_package.workbook
wb.add_worksheet(name: @seminar.title) do |sheet|
wb.add_worksheet(name: (@seminar.title.to_s[0..27]+'...')) do |sheet|
row = [t('seminar_signup.signup_time')]

View File

@ -80,7 +80,7 @@
</div>
<% elsif field_set.field_name== 'status' %>
<%= t("seminar.registration_status_#{seminar_signup.status}") if !seminar_signup.status.blank? %>
<% else %>
<% elsif field_set.field_name != 'recaptcha' %>
<%= seminar_signup.send("#{field_set.field_name}") %>
<% end %>
</td>