mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
use d-buttons, and other small tweaks
This commit is contained in:
parent
b5263b9b9b
commit
be446b7e50
4 changed files with 26 additions and 10 deletions
|
@ -92,6 +92,14 @@ export default ObjectController.extend(CanCheckEmails, {
|
|||
self.get('model').revokeApiKey();
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
anonymize: function() {
|
||||
this.get('model').anonymize();
|
||||
},
|
||||
|
||||
destroy: function() {
|
||||
this.get('model').destroy();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -336,7 +336,6 @@ Discourse.AdminUser = Discourse.User.extend({
|
|||
var performAnonymize = function() {
|
||||
Discourse.ajax("/admin/users/" + user.get('id') + '/anonymize.json', {type: 'PUT'}).then(function(data) {
|
||||
if (data.success) {
|
||||
bootbox.alert(I18n.t("admin.user.anonymize_successful"));
|
||||
if (data.username) {
|
||||
document.location = "/admin/users/" + data.username;
|
||||
} else {
|
||||
|
|
|
@ -450,17 +450,27 @@
|
|||
|
||||
<section>
|
||||
<hr/>
|
||||
<button {{bind-attr class=":btn :btn-danger :pull-right anonymizeForbidden:hidden"}} {{action "anonymize" target="content"}} {{bind-attr disabled="anonymizeForbidden"}}>
|
||||
<i class="fa fa-exclamation-triangle"></i>
|
||||
{{i18n 'admin.user.anonymize'}}
|
||||
</button>
|
||||
<div class="pull-right">
|
||||
{{#unless anonymizeForbidden}}
|
||||
{{d-button label="admin.user.anonymize"
|
||||
icon="exclamation-triangle"
|
||||
class="btn btn-danger"
|
||||
disabled=anonymizeForbidden
|
||||
action="anonymize"}}
|
||||
{{/unless}}
|
||||
|
||||
{{#unless deleteForbidden}}
|
||||
{{d-button label="admin.user.delete"
|
||||
icon="exclamation-triangle"
|
||||
class="btn btn-danger"
|
||||
disabled=deleteForbidden
|
||||
action="destroy"}}
|
||||
{{/unless}}
|
||||
</div>
|
||||
|
||||
<button {{bind-attr class=":btn :btn-danger :pull-right deleteForbidden:hidden"}} {{action "destroy" target="content"}} {{bind-attr disabled="deleteForbidden"}}>
|
||||
<i class="fa fa-exclamation-triangle"></i>
|
||||
{{i18n 'admin.user.delete'}}
|
||||
</button>
|
||||
{{#if deleteExplanation}}
|
||||
<div class="clearfix"></div>
|
||||
<br/>
|
||||
<div class="pull-right"><i class="fa fa-exclamation-triangle"></i> {{deleteExplanation}}</div>
|
||||
{{/if}}
|
||||
</section>
|
||||
|
|
|
@ -2052,7 +2052,6 @@ en:
|
|||
anonymize: "Anonymize User"
|
||||
anonymize_confirm: "Are you SURE you want to anonymize this account? This will change the username and email, and reset all profile information."
|
||||
anonymize_yes: "Yes, anonymize this account"
|
||||
anonymize_successful: "The user was anonymized successfully."
|
||||
anonymize_failed: "There was a problem anonymizing the account."
|
||||
delete: "Delete User"
|
||||
delete_forbidden_because_staff: "Admins and moderators can't be deleted."
|
||||
|
|
Loading…
Reference in a new issue