about summary refs log tree commit diff
path: root/app/views/admin/account_actions/new.html.haml
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2020-03-12 17:57:59 +0100
committerGitHub <noreply@github.com>2020-03-12 17:57:59 +0100
commitf556f79b7733834430b93109ac2c7f87529c8574 (patch)
tree27686f762b65eff63f06f173542a749e52991397 /app/views/admin/account_actions/new.html.haml
parentaeebbe90dc8224ae8bc9ac81fb68435105edb293 (diff)
Add titles to warning presets in admin UI (#13252)
Diffstat (limited to 'app/views/admin/account_actions/new.html.haml')
-rw-r--r--app/views/admin/account_actions/new.html.haml2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/views/admin/account_actions/new.html.haml b/app/views/admin/account_actions/new.html.haml
index 20fbeef33..aa88b1448 100644
--- a/app/views/admin/account_actions/new.html.haml
+++ b/app/views/admin/account_actions/new.html.haml
@@ -21,7 +21,7 @@
 
     - unless @warning_presets.empty?
       .fields-group
-        = f.input :warning_preset_id, collection: @warning_presets, label_method: :text, wrapper: :with_block_label
+        = f.input :warning_preset_id, collection: @warning_presets, label_method: ->(warning_preset) { [warning_preset.title.presence, truncate(warning_preset.text)].compact.join(' - ') }, wrapper: :with_block_label
 
     .fields-group
       = f.input :text, as: :text, wrapper: :with_block_label, hint: t('simple_form.hints.admin_account_action.text_html', path: admin_warning_presets_path)