From 2cd08c47319bfefcfd923110cc0860351b068751 Mon Sep 17 00:00:00 2001 From: Bohung Date: Wed, 8 Jun 2022 22:22:24 +0800 Subject: [PATCH] Fix bug. --- app/controllers/seminars_controller.rb | 10 ++++++---- app/views/seminars/con_upload.html.erb | 9 ++++----- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/app/controllers/seminars_controller.rb b/app/controllers/seminars_controller.rb index 9137d7a..0d8ae90 100644 --- a/app/controllers/seminars_controller.rb +++ b/app/controllers/seminars_controller.rb @@ -172,8 +172,10 @@ class SeminarsController < ApplicationController time_now = Time.now params = OrbitHelper.params seminar = SeminarMain.find_by(uid: params[:uid]) + registration_url = prefix_url + @registration_postfix + submission_url = prefix_url + '/home/submission' if !seminar.registration_status.blank? && seminar.signup_start_date <= time_now && ( seminar.signup_end_date.nil? || seminar.signup_end_date+1 >= time_now ) - sign_up = ('' + t('seminar.signup') + '').html_safe + sign_up = ('' + t('seminar.signup') + '').html_safe elsif seminar.registration_status.blank? sign_up = t('seminar.sign_up_not_open') elsif seminar.signup_start_date > time_now @@ -184,12 +186,12 @@ class SeminarsController < ApplicationController if !seminar.registration_status.blank? && seminar.registration_status.include?('C') && seminar.contribute_start_date <= time_now && ( seminar.contribute_end_date.nil? || seminar.contribute_end_date+1 >= time_now ) if !@@session[:seminar_signup_id].blank? if @@session[:seminar_main_id] == seminar.id - contribute_action = ('' + t('seminar_signup.uploads') + '').html_safe + contribute_action = ('' + t('seminar_signup.uploads') + '').html_safe else - contribute_action = ('' + t('seminar_signup.con_login') + '').html_safe + contribute_action = ('' + t('seminar_signup.con_login') + '').html_safe end else - contribute_action = ('' + t('seminar_signup.con_login') + '').html_safe + contribute_action = ('' + t('seminar_signup.con_login') + '').html_safe end end data = { diff --git a/app/views/seminars/con_upload.html.erb b/app/views/seminars/con_upload.html.erb index d184fb4..90ff858 100644 --- a/app/views/seminars/con_upload.html.erb +++ b/app/views/seminars/con_upload.html.erb @@ -70,12 +70,11 @@ <% end %> <%= link_to t(:edit), prefix_url + '?method=edit_file&con_no=' + seminar_signup_contribute.id, :class => 'btn btn-primary' %> - <%= form_with url: del_file_seminars_path, method: "post" do |f| %> - <%= f.submit_tag t(:delete_), class: "btn btn-primary" %> - <%= f.hidden_field_tag "referer_url", request.original_url.split(request.env["HTTP_HOST"]).last.split('?').first %> - <%= f.hidden_field_tag "con_no", seminar_signup_contribute.id %> + <%= form_tag(del_file_seminars_path, {method: "post"}) do |f| %> + <%= submit_tag t(:delete_), class: "btn btn-primary" %> + <%= hidden_field_tag "referer_url", request.original_url.split(request.env["HTTP_HOST"]).last.split('?').first %> + <%= hidden_field_tag "con_no", seminar_signup_contribute.id %> <% end %> - <% end %>