Commit 2a3229f1 authored by Stephen Shkardoon's avatar Stephen Shkardoon

Merge pull request #71 from IgorNadj/patch-1

ENH customise confirm delete messages for clarity
parents 0a9f5127 2c9ebd74
......@@ -16,8 +16,17 @@
$("#Form_ItemEditForm_action_doDelete").entwine({
onclick: function(e) {
// customise confirm delete messages for clarity
var item = 'record';
var pageAction = $('#Form_ItemEditForm').attr('action');
if(pageAction.indexOf('ItemEditForm/field/Recipients/item/') != -1){
item = 'Recipient';
}else if(pageAction.indexOf('admin/newsletter/MailingList/EditForm/field/MailingList/') == 0){
item = 'Mailing List';
}
var message = ss.i18n._t('NEWSLETTERADMIN.DELETECONFIRMMESSAGE',
'Are you sure you want to delete this record?');
'Are you sure you want to delete this '+item+'?');
if (confirm(message)) {
this._super(e);
} else {
......@@ -40,4 +49,4 @@
});
}(jQuery));
\ No newline at end of file
}(jQuery));
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment