X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/f372dca8af799141b0bc19e4ede7951ae579a967..ac1a9e8e357375b2426041eefee1f555fc5139b5:/js/kivi.SalesPurchase.js diff --git a/js/kivi.SalesPurchase.js b/js/kivi.SalesPurchase.js index 5dc81f50c..c19c10a68 100644 --- a/js/kivi.SalesPurchase.js +++ b/js/kivi.SalesPurchase.js @@ -245,7 +245,7 @@ namespace('kivi.SalesPurchase', function(ns) { $('#send_email_dialog').children().remove().appendTo('#email_inputs'); $('#send_email_dialog').dialog('close'); - kivi.submit_form_with_action('#form', 'send_sales_purchase_email'); + kivi.submit_form_with_action('#form', $('#form').data('send-email-action')); return true; }; @@ -265,7 +265,9 @@ namespace('kivi.SalesPurchase', function(ns) { return true; }; - this.show_email_dialog = function() { + this.show_email_dialog = function(send_action) { + $('#form').data('send-email-action', send_action || 'send_sales_purchase_email'); + kivi.popup_dialog({ id: 'send_email_dialog', url: 'io.pl',