DEV: Replace bootbox alert dialog (#13)

This commit is contained in:
Jan Cernik 2022-10-31 08:04:38 -03:00 committed by GitHub
parent be75773375
commit 3918061c50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -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;
} }