diff --git a/assets/javascripts/discourse/controllers/staff-notes.js.es6 b/assets/javascripts/discourse/controllers/staff-notes.js.es6 index be1e0ec..2736d71 100644 --- a/assets/javascripts/discourse/controllers/staff-notes.js.es6 +++ b/assets/javascripts/discourse/controllers/staff-notes.js.es6 @@ -37,11 +37,16 @@ export default Ember.Controller.extend({ }, removeNote(note) { - note.destroyRecord().then(() => { - const notes = this.get('model'); - notes.removeObject(note); - this._refreshCount(); - }).catch(popupAjaxError); + + bootbox.confirm(I18n.t("staff_notes.delete_confirm"), I18n.t("no_value"), I18n.t("yes_value"), result => { + if (result) { + note.destroyRecord().then(() => { + const notes = this.get('model'); + notes.removeObject(note); + this._refreshCount(); + }).catch(popupAjaxError); + } + }); } } }); diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index 01b4df3..09f67f6 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -5,3 +5,4 @@ en: attach: "Attach Staff Note" remove: "Remove Note" show: "Staff Notes ({{count}})" + delete_confirm: "Are you sure you want to delete that staff note?"