Add support for suspension message
This commit is contained in:
parent
daceeb9700
commit
4020409bbf
|
@ -1,18 +1,39 @@
|
||||||
{{#d-modal-body title="admin.user.suspend_modal_title"}}
|
{{#d-modal-body title="admin.user.suspend_modal_title"}}
|
||||||
<form>
|
<div class='duration-controls'>
|
||||||
{{i18n 'admin.user.suspend_duration'}}
|
<label>
|
||||||
{{text-field value=duration maxlength="5" autofocus="autofocus" class="suspend-duration"}}
|
{{i18n 'admin.user.suspend_duration'}}
|
||||||
{{i18n 'admin.user.suspend_duration_units'}}<br/>
|
{{text-field value=duration maxlength="5" autofocus="autofocus" class="suspend-duration"}}
|
||||||
<br/>
|
{{i18n 'admin.user.suspend_duration_units'}}
|
||||||
{{#if siteSettings.hide_suspension_reasons}}
|
</label>
|
||||||
{{{i18n 'admin.user.suspend_reason_hidden_label'}}}<br/>
|
</div>
|
||||||
{{else}}
|
|
||||||
{{{i18n 'admin.user.suspend_reason_label'}}}<br/>
|
<div class='reason-controls'>
|
||||||
{{/if}}
|
<label>
|
||||||
|
<div class='suspend-reason-label'>
|
||||||
|
{{#if siteSettings.hide_suspension_reasons}}
|
||||||
|
{{{i18n 'admin.user.suspend_reason_hidden_label'}}}
|
||||||
|
{{else}}
|
||||||
|
{{{i18n 'admin.user.suspend_reason_label'}}}
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{text-field
|
||||||
|
value=reason
|
||||||
|
class="suspend-reason"
|
||||||
|
placeholderKey="admin.user.suspend_reason_placeholder"}}
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<label>
|
||||||
|
<div class='suspend-message-label'>
|
||||||
|
{{i18n "admin.user.suspend_message"}}
|
||||||
|
</div>
|
||||||
|
{{textarea
|
||||||
|
value=message
|
||||||
|
class="suspend-message"
|
||||||
|
placeholder=(i18n "admin.user.suspend_message_placeholder")}}
|
||||||
|
</label>
|
||||||
|
|
||||||
<br/>
|
|
||||||
{{text-field value=reason class="suspend-reason"}}
|
|
||||||
</form>
|
|
||||||
{{/d-modal-body}}
|
{{/d-modal-body}}
|
||||||
|
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
|
|
||||||
@import "common/admin/customize";
|
@import "common/admin/customize";
|
||||||
@import "common/admin/flagging";
|
@import "common/admin/flagging";
|
||||||
|
@import "common/admin/suspend";
|
||||||
|
|
||||||
$mobile-breakpoint: 700px;
|
$mobile-breakpoint: 700px;
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
.suspend-user-modal {
|
||||||
|
font-size: 1.1em;
|
||||||
|
|
||||||
|
.duration-controls {
|
||||||
|
margin-bottom: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.suspend-reason {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.suspend-reason-label, .suspend-message-label {
|
||||||
|
margin-bottom: 0.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.textarea, input[type=text] {
|
||||||
|
box-sizing: border-box;
|
||||||
|
height: 2.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -3268,6 +3268,9 @@ en:
|
||||||
suspend_reason_label: "Why are you suspending? This text <b>will be visible to everyone</b> on this user's profile page, and will be shown to the user when they try to log in. Keep it short."
|
suspend_reason_label: "Why are you suspending? This text <b>will be visible to everyone</b> on this user's profile page, and will be shown to the user when they try to log in. Keep it short."
|
||||||
suspend_reason_hidden_label: "Why are you suspending? This text will be shown to the user when they try to log in. Keep it short."
|
suspend_reason_hidden_label: "Why are you suspending? This text will be shown to the user when they try to log in. Keep it short."
|
||||||
suspend_reason: "Reason"
|
suspend_reason: "Reason"
|
||||||
|
suspend_reason_placeholder: "Suspension Reason"
|
||||||
|
suspend_message: "Email Message"
|
||||||
|
suspend_message_placeholder: "Optionally, provide more information about the suspension and it will be emailed to the user."
|
||||||
suspended_by: "Suspended by"
|
suspended_by: "Suspended by"
|
||||||
delete_all_posts: "Delete all posts"
|
delete_all_posts: "Delete all posts"
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,7 @@ QUnit.test("suspend a user", assert => {
|
||||||
});
|
});
|
||||||
fillIn('.suspend-duration', 12);
|
fillIn('.suspend-duration', 12);
|
||||||
fillIn('.suspend-reason', "for breaking the rules");
|
fillIn('.suspend-reason', "for breaking the rules");
|
||||||
|
fillIn('.suspend-message', "this is an email reason why");
|
||||||
andThen(() => {
|
andThen(() => {
|
||||||
assert.equal(find('.perform-suspend[disabled]').length, 0);
|
assert.equal(find('.perform-suspend[disabled]').length, 0);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue