From 01726e68ab7d7ebb0dbb7e681621338ddae8de98 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Wed, 10 Jan 2018 12:52:31 -0500 Subject: [PATCH] Add extensibility for suspension reasons --- .../components/suspension-details.hbs | 25 ++++++++++++++++++ .../templates/modal/admin-suspend-user.hbs | 26 +------------------ 2 files changed, 26 insertions(+), 25 deletions(-) create mode 100644 app/assets/javascripts/admin/templates/components/suspension-details.hbs diff --git a/app/assets/javascripts/admin/templates/components/suspension-details.hbs b/app/assets/javascripts/admin/templates/components/suspension-details.hbs new file mode 100644 index 00000000000..0f2aa0fc848 --- /dev/null +++ b/app/assets/javascripts/admin/templates/components/suspension-details.hbs @@ -0,0 +1,25 @@ +
+ + {{text-field + value=reason + class="suspend-reason" + placeholderKey="admin.user.suspend_reason_placeholder"}} +
+ + +{{textarea + value=message + class="suspend-message" + placeholder=(i18n "admin.user.suspend_message_placeholder")}} diff --git a/app/assets/javascripts/admin/templates/modal/admin-suspend-user.hbs b/app/assets/javascripts/admin/templates/modal/admin-suspend-user.hbs index fc6025a6a63..4c0af11512e 100644 --- a/app/assets/javascripts/admin/templates/modal/admin-suspend-user.hbs +++ b/app/assets/javascripts/admin/templates/modal/admin-suspend-user.hbs @@ -11,32 +11,8 @@ input=suspendUntil}} + {{suspension-details reason=reason message=message}} -
- - {{text-field - value=reason - class="suspend-reason" - placeholderKey="admin.user.suspend_reason_placeholder"}} -
- - - {{textarea - value=message - class="suspend-message" - placeholder=(i18n "admin.user.suspend_message_placeholder")}} {{else}}
{{i18n "admin.user.cant_suspend"}}