Fix bug.
This commit is contained in:
parent
f4b1e7abd6
commit
9aecf5963c
|
@ -305,7 +305,7 @@ class ApplicationFormsController < ApplicationController
|
||||||
|
|
||||||
application_form = ApplicationFormMain.find_by(uid: params[:uid].to_s)
|
application_form = ApplicationFormMain.find_by(uid: params[:uid].to_s)
|
||||||
|
|
||||||
if application_form.application_form_start_date <= time_now && ( application_form.application_form_end_date.nil? || application_form.application_form_end_date+1 >= time_now )
|
if (application_form.application_form_start_date.nil? || application_form.application_form_start_date <= time_now) && ( application_form.application_form_end_date.nil? || application_form.application_form_end_date+1 >= time_now )
|
||||||
sign_up = ('<a href="'+ OrbitHelper.url_to_show(application_form.to_param) + '">' + t('application_form.signup') + '</a>').html_safe
|
sign_up = ('<a href="'+ OrbitHelper.url_to_show(application_form.to_param) + '">' + t('application_form.signup') + '</a>').html_safe
|
||||||
elsif application_form.registration_status.blank?
|
elsif application_form.registration_status.blank?
|
||||||
sign_up = t('application_form.sign_up_not_open')
|
sign_up = t('application_form.sign_up_not_open')
|
||||||
|
|
|
@ -13,11 +13,7 @@
|
||||||
%>
|
%>
|
||||||
<% if @application_form.application_form_start_date < @time_now and ( @application_form.application_form_end_date.nil? or @application_form.application_form_end_date+1.days > @time_now ) %>
|
<% if @application_form.application_form_start_date < @time_now and ( @application_form.application_form_end_date.nil? or @application_form.application_form_end_date+1.days > @time_now ) %>
|
||||||
|
|
||||||
<%#= stylesheet_link_tag "lib/main-forms" %>
|
<%#= 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] %>
|
<% notice = flash["notice"] || params[:notice] %>
|
||||||
<% flash.each do |key, msg| %>
|
<% flash.each do |key, msg| %>
|
||||||
<% next if key.to_s == "notice" %>
|
<% next if key.to_s == "notice" %>
|
||||||
|
@ -367,17 +363,17 @@
|
||||||
elem = $(this),
|
elem = $(this),
|
||||||
value = $(this).val() || null;
|
value = $(this).val() || null;
|
||||||
var checkAvailability = function(){
|
var checkAvailability = function(){
|
||||||
$.ajax({
|
// $.ajax({
|
||||||
url : "<%= "#{prefix_url}?method=check_availability&no=#{@application_form.id}" %>",
|
// url : "/xhr/application_forms/check_availability",
|
||||||
data : {"type" : type, "value" : value},
|
// data : {"type" : type, "value" : value},
|
||||||
dataType : "json",
|
// dataType : "json",
|
||||||
type : "get",
|
// type : "get",
|
||||||
success : function(data){
|
// success : function(data){
|
||||||
if( data.success == true ){
|
// if( data.success == true ){
|
||||||
}else{
|
// }else{
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
}
|
}
|
||||||
|
|
||||||
if( value ){
|
if( value ){
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
<div class="highlight application_form_privacy">
|
<div class="highlight application_form_privacy">
|
||||||
|
|
||||||
<%= @application_form_agreement.content.html_safe %>
|
<%= @application_form_agreement.content.to_s.html_safe %>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -70,6 +70,7 @@ Rails.application.routes.draw do
|
||||||
post 'del_file', to: 'application_forms#del_file'
|
post 'del_file', to: 'application_forms#del_file'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
get '/xhr/application_forms/check_availability', to: 'application_forms#check_availability'
|
||||||
get '/xhr/application_forms/agree_link' , to: 'application_forms#agree_link'
|
get '/xhr/application_forms/agree_link' , to: 'application_forms#agree_link'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue