diff --git a/app/views/origami/surveys/_form.html.erb b/app/views/origami/surveys/_form.html.erb index 77f59d41..d9a80bce 100755 --- a/app/views/origami/surveys/_form.html.erb +++ b/app/views/origami/surveys/_form.html.erb @@ -31,7 +31,7 @@ <%= f.input :total_customer, input_html: { value:@survey_data.total_customer , :readonly => true, class: 'col-md-11'} %> - <%= f.input :local , input_html: { value: @survey_data.local, class: 'col-md-11' }%> + <%= f.input :local , input_html: { value: @survey_data.local, class: 'col-md-11', :onkeypress => "return isNumberKey(event);", :onkeyup => "surveyLocal(this.value);" }%>
@@ -268,6 +268,10 @@ var aa = parseInt(val); if(isNaN(aa)) $("#survey_female").val(""); } + function surveyLocal(val){ + var aa = parseInt(val); + if(isNaN(aa)) $("#survey_local").val(""); + } var cashier_type = "<%= @cashier_type %>"; $(document).ready(function(){ diff --git a/config/initializers/action_controller.rb b/config/initializers/action_controller.rb index fb212f13..04204a73 100644 --- a/config/initializers/action_controller.rb +++ b/config/initializers/action_controller.rb @@ -18,13 +18,13 @@ class ActionController::Base # redirect_to root_url(:host => request.domain) + "store_error" render :json => [{ status: false, message: 'Invalid Access!'}] end - else - # check for license file - if check_license - current_license(ENV["SX_PROVISION_URL"]) - else - redirect_to activate_path - end + # else + # # check for license file + # if check_license + # current_license(ENV["SX_PROVISION_URL"]) + # else + # redirect_to activate_path + # end end end