diff options
Diffstat (limited to 'addons/web/static/src/js/widgets/data_export.js')
| -rw-r--r-- | addons/web/static/src/js/widgets/data_export.js | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/addons/web/static/src/js/widgets/data_export.js b/addons/web/static/src/js/widgets/data_export.js index 712adfb89e5..24fb6a41f75 100644 --- a/addons/web/static/src/js/widgets/data_export.js +++ b/addons/web/static/src/js/widgets/data_export.js @@ -304,16 +304,21 @@ var DataExport = Dialog.extend({ }); self.$('.o_delete_exported_list').click(function() { var select_exp = self.$('.o_exported_lists_select option:selected'); - if(select_exp.val()) { - self.exports.unlink([parseInt(select_exp.val(), 10)]); - select_exp.remove(); - self.$fields_list.empty(); - if (self.$('.o_exported_lists_select option').length <= 1) { - self.$('.o_exported_lists').hide(); + var options = { + confirm_callback: function () { + if (select_exp.val()) { + self.exports.unlink([parseInt(select_exp.val(), 10)]); + select_exp.remove(); + self.$fields_list.empty(); + if (self.$('.o_exported_lists_select option').length <= 1) { + self.$('.o_exported_lists').hide(); + } + } } - } + }; + Dialog.confirm(this, _t("Do you really want to delete this export template?"), options); }); - }); + }); function do_load_export_field(field_list) { _.each(field_list, function (field) { |
