This commit is contained in:
BoHung Chiu 2023-01-16 18:23:39 +08:00
parent 8d96eedb51
commit 7b2f354b96
2 changed files with 2 additions and 2 deletions

View File

@ -597,7 +597,7 @@ class Admin::AsksController < OrbitAdminController
param_clone['default_setting'].each { |k, v| param_clone['default_setting'][k] = (v == 'true'? true : false) if param_clone['default_setting'][k].class==String}
param_clone['default_setting_required'].each { |k, v| param_clone['default_setting_required'][k] = (v == 'true'? true : false) if param_clone['default_setting_required'][k].class==String}
param_clone.delete('custom_fields')
param_clone.delete('email_regex')
param_clone.delete('email_regex') unless collection_name == 'ask_setting'
ask_setting.custom_fields_will_change!
custom_fields = params['not_clone_attrs'] ? {} : ask_setting['custom_fields'].clone
params_custom_fields = (params.require(collection_name).require('custom_fields') rescue {})

View File

@ -171,7 +171,7 @@
<%= t("ask.email_regex") %>:
</div>
<div class="controls">
<%= check_box_tag :email_regex_enable, @default_ask_setting.email_regex_enable , nil , {:id=>"",:disabled=>'disabled'} %><%= t("ask.enable") %>
<%= check_box_tag :email_regex_enable, @default_ask_setting.email_regex_enable , @default_ask_setting.email_regex_enable , {:id=>"",:disabled=>'disabled'} %><%= t("ask.enable") %>
<div style="clear: both;"></div>
<div class="show_field">
<%= @default_ask_setting.email_regex %>