Fix bug.
This commit is contained in:
parent
22c37e3cb8
commit
350127fdf1
|
@ -395,8 +395,9 @@ class ApplicationFormsController < ApplicationController
|
|||
def agree_link
|
||||
signup = ApplicationFormSignup.find(params[:id]) rescue nil
|
||||
stage_num = signup ? signup.get_stage_num(params[:cipher]) : nil
|
||||
@error_message = nil
|
||||
if stage_num.nil?
|
||||
render_404
|
||||
@error_message = I18n.t('application_form.this_link_has_expired')
|
||||
else
|
||||
@type = params[:type]
|
||||
application_form = signup.application_form_main
|
||||
|
@ -444,7 +445,7 @@ class ApplicationFormsController < ApplicationController
|
|||
form_params = params[:application_form_signup]
|
||||
form_params_email = form_params[:email]
|
||||
form_params_main_id = form_params[:application_form_main_id]
|
||||
@signup = ApplicationFormSignup.where(email: form_params_email, application_form_main_id: form_params_main_id ).first
|
||||
@signup = nil #ApplicationFormSignup.where(email: form_params_email, application_form_main_id: form_params_main_id ).first
|
||||
|
||||
@application_form = ApplicationFormMain.where(id: form_params_main_id).first
|
||||
@application_form_signup = ApplicationFormSignup.new(application_form_signup_params)
|
||||
|
@ -453,10 +454,6 @@ class ApplicationFormsController < ApplicationController
|
|||
else
|
||||
flag = false
|
||||
end
|
||||
if @signup.present?
|
||||
@signup.destroy
|
||||
@signup = nil
|
||||
end
|
||||
begin
|
||||
if gotcha_valid? || flag
|
||||
if @signup.blank? && @application_form_signup.save
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
background: #00ff7f;
|
||||
color: #000000;
|
||||
}
|
||||
.disagree_text{
|
||||
.disagree_text, .error_text{
|
||||
background: #ff004a;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
@ -16,11 +16,17 @@
|
|||
position: absolute;
|
||||
}
|
||||
</style>
|
||||
<h3 style="text-align: center;"><span class="<%=@type%>_text"><% if @type == 'agree' %>
|
||||
<% @type = 'error' if @error_message %>
|
||||
<h3 style="text-align: center;">
|
||||
<span class="<%=@type%>_text">
|
||||
<% if @error_message %>
|
||||
<%= @error_message.html_safe %>
|
||||
<%elsif @type == 'agree' %>
|
||||
<%=t('application_form.send_email_to_next_stage_reviewer')%>
|
||||
<% elsif @type == 'disagree' %>
|
||||
<%=t('application_form.email_add_file_success')%>
|
||||
<% elsif @type == 'finish' %>
|
||||
<%=t('application_form.email_edit_file_success')%>
|
||||
<% end %></span></h3>
|
||||
<% end %>
|
||||
</span></h3>
|
||||
<button class="close_btn" onclick="window.close()"><%=t('application_form.close')%></button>
|
|
@ -27,6 +27,7 @@ en:
|
|||
abstract_number: Abstract number
|
||||
presentation_type: Presentation
|
||||
application_form:
|
||||
this_link_has_expired: "This link has expired!"
|
||||
close: "Close"
|
||||
send_email_to_next_stage_reviewer: "Email has been sent to reviewer of next stage!"
|
||||
denied_stage: "Denied Stage"
|
||||
|
|
|
@ -28,6 +28,7 @@ zh_tw:
|
|||
abstract_number: 摘要編號
|
||||
presentation_type: 發表方式
|
||||
application_form:
|
||||
this_link_has_expired: "此連結已失效!"
|
||||
close: "關閉"
|
||||
send_email_to_next_stage_reviewer: "已寄送email給下個階段審核者!"
|
||||
denied_stage: "未通過階段"
|
||||
|
|
Loading…
Reference in New Issue