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