You must give a reason for suspending a user

This commit is contained in:
Neil Lalonde
2014-02-04 11:03:35 -05:00
parent 612001aa74
commit dc77e7e27c
2 changed files with 6 additions and 1 deletions
@@ -9,8 +9,13 @@
**/
Discourse.AdminSuspendUserController = Discourse.ObjectController.extend(Discourse.ModalFunctionality, {
submitDisabled: function() {
return (!this.get('reason') || this.get('reason').length < 1);
}.property('reason'),
actions: {
suspend: function() {
if (this.get('submitDisabled')) return;
var duration = parseInt(this.get('duration'), 10);
if (duration > 0) {
var self = this;