mirror of
https://github.com/discourse/discourse.git
synced 2025-01-18 17:02:45 +08:00
Update a couple buttons to use correct markup (#11926)
This commit is contained in:
parent
e8b82724fd
commit
75d766499f
|
@ -22,6 +22,13 @@ export default Controller.extend(ModalFunctionality, {
|
|||
});
|
||||
},
|
||||
|
||||
@discourseComputed("username")
|
||||
mergeButtonText(username) {
|
||||
return I18n.t(`admin.user.merge.confirmation.transfer_and_delete`, {
|
||||
username,
|
||||
});
|
||||
},
|
||||
|
||||
@discourseComputed("value", "text")
|
||||
mergeDisabled(value, text) {
|
||||
return !value || text !== value;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import Controller, { inject as controller } from "@ember/controller";
|
||||
import I18n from "I18n";
|
||||
import ModalFunctionality from "discourse/mixins/modal-functionality";
|
||||
import { action, get } from "@ember/object";
|
||||
import { alias } from "@ember/object/computed";
|
||||
|
@ -17,6 +18,13 @@ export default Controller.extend(ModalFunctionality, {
|
|||
return !targetUsername || username === targetUsername;
|
||||
},
|
||||
|
||||
@discourseComputed("username")
|
||||
mergeButtonText(username) {
|
||||
return I18n.t(`admin.user.merge.confirmation.transfer_and_delete`, {
|
||||
username,
|
||||
});
|
||||
},
|
||||
|
||||
@action
|
||||
showConfirmation() {
|
||||
this.send("closeModal");
|
||||
|
|
|
@ -5,14 +5,13 @@
|
|||
{{/d-modal-body}}
|
||||
|
||||
<div class="modal-footer">
|
||||
{{#d-button
|
||||
{{d-button
|
||||
class="btn-danger"
|
||||
action=(action "confirm")
|
||||
icon="trash-alt"
|
||||
disabled=mergeDisabled
|
||||
translatedLabel=mergeButtonText
|
||||
}}
|
||||
{{i18n "admin.user.merge.confirmation.transfer_and_delete" username=username}}
|
||||
{{/d-button}}
|
||||
{{d-button
|
||||
action=(action "close")
|
||||
label="admin.user.merge.confirmation.cancel"
|
||||
|
|
|
@ -13,14 +13,13 @@
|
|||
{{/d-modal-body}}
|
||||
|
||||
<div class="modal-footer">
|
||||
{{#d-button
|
||||
{{d-button
|
||||
class="btn-primary"
|
||||
action=(action "showConfirmation")
|
||||
icon="trash-alt"
|
||||
disabled=mergeDisabled
|
||||
translatedLabel=mergeButtonText
|
||||
}}
|
||||
{{i18n "admin.user.merge.prompt.transfer_and_delete" username=username}}
|
||||
{{/d-button}}
|
||||
{{d-button
|
||||
action=(action "close")
|
||||
label="admin.user.merge.prompt.cancel"
|
||||
|
|
Loading…
Reference in New Issue
Block a user