Skip to content

Commit

Permalink
Give a better popup when whitelisting
Browse files Browse the repository at this point in the history
  • Loading branch information
edwh committed Jun 21, 2018
1 parent 56b6757 commit 8ee6613
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 4 deletions.
12 changes: 8 additions & 4 deletions http/js/iznik/views/user/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,10 @@ define([
whitelist: function () {
var self = this

var v = new Iznik.Views.ModTools.EnterReason()
var v = new Iznik.Views.ModTools.EnterReason({
whitelist: true
});

self.listenToOnce(v, 'reason', function (reason) {
$.ajax({
url: API + 'spammers',
Expand Down Expand Up @@ -907,8 +910,6 @@ define([
})

Iznik.Views.ModTools.EnterReason = Iznik.Views.Modal.extend({
template: 'modtools_members_spam_reason',

events: {
'click .js-cancel': 'close',
'click .js-confirm': 'confirm'
Expand All @@ -927,7 +928,10 @@ define([
},

render: function () {
var self = this
var self = this;

this.template = this.options.whitelist ? 'modtools_members_spam_reasonwhitelist' : 'modtools_members_spam_reason';

this.open(this.template)

return (this)
Expand Down
25 changes: 25 additions & 0 deletions http/template/modtools/members/spam/reasonwhitelist.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<div class="modal fade" tabindex="-1">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title js-modal-title">Please enter a whitelist reason</h4>
</div>
<div class="modal-body js-modal-body">
<p>
You can use this to request that someone is whitelisted.</p>
<p>
For example, if you have a member who
is enthusiastic and joins many groups, then they might show up as a possible spammer - this way
people will know that they aren't.
</p>
<p>Similarly, volunteers who might need to join many groups are often whitelisted.</p>
<p>This reason will be visible to other moderators, so please make sure it's helpful.</p>
<input type="text" class="topspace form-control js-reason" placeholder="Enter a reason" />
</div>
<div class="modal-footer">
<button type="button" class="btn btn-success js-confirm">Confirm</button>
<button type="button" class="btn btn-error js-cancel">Cancel</button>
</div>
</div>
</div>
</div>

0 comments on commit 8ee6613

Please sign in to comment.