fix ask setting

This commit is contained in:
邱博亞 2023-09-19 21:53:22 +08:00
parent 81f546c902
commit 905020f18d
2 changed files with 3 additions and 3 deletions

View File

@ -85,7 +85,7 @@ class Admin::AsksController < OrbitAdminController
redirect_to "/#{locale}/admin/asks/category_setting"
end
def setting
@ask_setting = AskSetting.first
@default_ask_setting = AskSetting.first
@url = setting_save_admin_asks_path
end
def backend_table_setting

View File

@ -28,6 +28,6 @@
$('.add_new_options').sortable({'handle':'.icons-list-2'});
})
</script>
<%= form_for @ask_setting,method: 'post',url: @url,html: { class: 'form-horizontal main-forms previewable' } do |f| %>
<%= render partial: 'ask_setting',locals:{ask_setting: @ask_setting,f: f,submit_text: t('submit'), :@has_email_regex => true} %>
<%= form_for @default_ask_setting,method: 'post',url: @url,html: { class: 'form-horizontal main-forms previewable' } do |f| %>
<%= render partial: 'ask_setting',locals:{ask_setting: @default_ask_setting,f: f,submit_text: t('submit'), :@has_email_regex => true} %>
<% end %>