diff --git a/app/views/shared/_user_form_fields.html.haml b/app/views/shared/_user_form_fields.html.haml index a0afffd6..deb574ef 100644 --- a/app/views/shared/_user_form_fields.html.haml +++ b/app/views/shared/_user_form_fields.html.haml @@ -33,8 +33,6 @@ %h5{class: 'controls'} = t 'simple_form.labels.settings.settings_group.messages' - = s.simple_fields_for :messages, defaults: { inline_label: true, label: false } do |messages| - = messages.input 'send_as_email', as: :boolean, input_html: { checked: f.object.settings.messages['send_as_email'] } = s.simple_fields_for :notify, defaults: { inline_label: true, label: false } do |notify| = notify.input 'order_finished', as: :boolean, input_html: { checked: f.object.settings.notify['order_finished'] } = notify.input 'negative_balance', as: :boolean, input_html: { checked: f.object.settings.notify['negative_balance'] } diff --git a/lib/foodsoft_messages/app/overrides/shared/_user_form_fields/add_messages_prefs.html.haml.deface b/lib/foodsoft_messages/app/overrides/shared/_user_form_fields/add_messages_prefs.html.haml.deface new file mode 100644 index 00000000..4769106c --- /dev/null +++ b/lib/foodsoft_messages/app/overrides/shared/_user_form_fields/add_messages_prefs.html.haml.deface @@ -0,0 +1,4 @@ +/ insert_before 'erb:contains("simple_fields_for :notify")' +- if FoodsoftMessages.enabled? + = s.simple_fields_for :messages, defaults: { inline_label: true, label: false } do |messages| + = messages.input 'send_as_email', as: :boolean, input_html: { checked: f.object.settings.messages['send_as_email'] }