X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=js%2Fkivi.RecordTemplate.js;h=af8484043340333ae7f1e441428d1fdfc9c64b27;hb=cfb029307ecd356f377952f3190df655cbd447c6;hp=61c1b0f98cd3390c07ca4db5e9c38b632d784f36;hpb=962ae5f991c9a533b22632860edb43a644ed449e;p=kivitendo-erp.git diff --git a/js/kivi.RecordTemplate.js b/js/kivi.RecordTemplate.js index 61c1b0f98..af8484043 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 }); @@ -69,4 +72,12 @@ namespace('kivi.RecordTemplate', function(ns) { id: id }, kivi.eval_json_result); }; + + ns.filter_templates = function() { + $.post('controller.pl', { + action: 'RecordTemplate/filter_templates', + template_filter: $("#template_filter").val(), + template_type: $("#record_template_dialog_template_type").val(), + }, kivi.eval_json_result); + }; });