diff --git a/app/assets/javascripts/admin/models/admin_user.js b/app/assets/javascripts/admin/models/admin_user.js index 8b7583acb..871deb1f8 100644 --- a/app/assets/javascripts/admin/models/admin_user.js +++ b/app/assets/javascripts/admin/models/admin_user.js @@ -238,9 +238,13 @@ Discourse.AdminUser = Discourse.User.extend({ return (!this.get('can_be_deleted') || this.get('post_count') > 0); }.property('post_count'), - deleteButtonTitle: function() { + deleteExplanation: function() { if (this.get('deleteForbidden')) { - return I18n.t('admin.user.delete_forbidden', {count: Discourse.SiteSettings.delete_user_max_age}); + if (this.get('staff')) { + return I18n.t('admin.user.delete_forbidden_because_staff'); + } else { + return I18n.t('admin.user.delete_forbidden', {count: Discourse.SiteSettings.delete_user_max_age}); + } } else { return null; } diff --git a/app/assets/javascripts/admin/templates/user.js.handlebars b/app/assets/javascripts/admin/templates/user.js.handlebars index 8cbb07e1d..31fa254f8 100644 --- a/app/assets/javascripts/admin/templates/user.js.handlebars +++ b/app/assets/javascripts/admin/templates/user.js.handlebars @@ -313,9 +313,13 @@

- + {{#if deleteExplanation}} +
+
{{deleteExplanation}}
+ {{/if}}
diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index 415c5bb84..f50d4b0b3 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -1410,12 +1410,11 @@ en: flags_received_count: Flags Received approve: 'Approve' approved_by: "approved by" - approve_success: "User approved and email sent with activation - instructions." - approve_bulk_success: "Success! All selected users have been approved - and notified." + approve_success: "User approved and email sent with activation instructions." + approve_bulk_success: "Success! All selected users have been approved and notified." time_read: "Read Time" delete: "Delete User" + delete_forbidden_because_staff: "Admins and moderators can't be deleted." delete_forbidden: one: "Users can't be deleted if they registered more than %{count} day ago, or if they have posts. Delete all posts before trying to delete a user." other: "Users can't be deleted if they registered more than %{count} days ago, or if they have posts. Delete all posts before trying to delete a user."