DEV: refactor bootbox alerts (#18292)

This commit is contained in:
Penar Musaraj
2022-09-27 14:47:13 -04:00
committed by GitHub
parent 5dea425ee9
commit cc4af80c7d
45 changed files with 243 additions and 186 deletions

View File

@ -8,9 +8,10 @@ import discourseComputed from "discourse-common/utils/decorators";
import { htmlSafe } from "@ember/template";
import loadScript from "discourse/lib/load-script";
import { popupAjaxError } from "discourse/lib/ajax-error";
import bootbox from "bootbox";
import { inject as service } from "@ember/service";
export default Controller.extend(ModalFunctionality, {
dialog: service(),
model: null,
charts: null,
groupedBy: null,
@ -64,7 +65,7 @@ export default Controller.extend(ModalFunctionality, {
if (error) {
popupAjaxError(error);
} else {
bootbox.alert(I18n.t("poll.error_while_fetching_voters"));
this.dialog.alert(I18n.t("poll.error_while_fetching_voters"));
}
})
.then((result) => {