DEV: Replace bootbox alert dialog (#13)
This commit is contained in:
parent
be75773375
commit
3918061c50
|
@ -3,9 +3,10 @@ import ModalFunctionality from "discourse/mixins/modal-functionality";
|
||||||
import EmberObject, { action } from "@ember/object";
|
import EmberObject, { action } from "@ember/object";
|
||||||
import { isBlank } from "@ember/utils";
|
import { isBlank } from "@ember/utils";
|
||||||
import I18n from "I18n";
|
import I18n from "I18n";
|
||||||
import bootbox from "bootbox";
|
import { inject as service } from "@ember/service";
|
||||||
|
|
||||||
export default Controller.extend(ModalFunctionality, {
|
export default Controller.extend(ModalFunctionality, {
|
||||||
|
dialog: service(),
|
||||||
form: null,
|
form: null,
|
||||||
|
|
||||||
onShow() {
|
onShow() {
|
||||||
|
@ -24,7 +25,7 @@ export default Controller.extend(ModalFunctionality, {
|
||||||
@action
|
@action
|
||||||
insertPlaceholder() {
|
insertPlaceholder() {
|
||||||
if (isBlank(this.form.key)) {
|
if (isBlank(this.form.key)) {
|
||||||
bootbox.alert(I18n.t(themePrefix("builder.errors.no_key")));
|
this.dialog.alert(I18n.t(themePrefix("builder.errors.no_key")));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue