X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=js%2Fkivi.RecordTemplate.js;h=8318098e726bb7e756f4dc99705d75152e906f2e;hb=ef26fcdecd49177fd52a0741aa76c0621b1af38e;hp=791bcbac6265fbc507e697b89daacfad7689666a;hpb=cbdc5c3786939e37bcd3c2fcaf0cb5e5607c54b7;p=kivitendo-erp.git diff --git a/js/kivi.RecordTemplate.js b/js/kivi.RecordTemplate.js index 791bcbac6..8318098e7 100644 --- a/js/kivi.RecordTemplate.js +++ b/js/kivi.RecordTemplate.js @@ -27,6 +27,9 @@ namespace('kivi.RecordTemplate', function(ns) { return false; } + if ((id !== undefined) && !confirm(kivi.t8('Are you sure you want to update the selected record template with the current values? This cannot be undone.'))) + return false; + var data = $form.serializeArray().filter(function(val) { return val.name !== 'action'; }); data.push({ name: 'action', value: $type.data('save_action') }); data.push({ name: 'record_template_id', value: id }); @@ -36,9 +39,6 @@ namespace('kivi.RecordTemplate', function(ns) { }; ns.load = function(id) { - if (!confirm(kivi.t8('Do you really want to load this record template? All unsaved data will be lose.'))) - return false; - var $type = $("#record_template_dialog_template_type"); var url = encodeURIComponent($type.data('controller')) + '?action=' + encodeURIComponent($type.data('load_action'))