2020-12-01 18:50:35 +01:00
|
|
|
import BootstrapModal from "./base.js";
|
|
|
|
import tpl_alert_modal from "./templates/alert.js";
|
|
|
|
import { __ } from '../i18n';
|
|
|
|
|
|
|
|
|
|
|
|
const Alert = BootstrapModal.extend({
|
2020-12-02 18:37:32 +01:00
|
|
|
id: 'alert-modal',
|
2020-12-01 18:50:35 +01:00
|
|
|
|
|
|
|
initialize () {
|
|
|
|
BootstrapModal.prototype.initialize.apply(this, arguments);
|
|
|
|
this.listenTo(this.model, 'change', this.render)
|
|
|
|
},
|
|
|
|
|
|
|
|
toHTML () {
|
|
|
|
return tpl_alert_modal(Object.assign({__}, this.model.toJSON()));
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
export default Alert;
|