};
ns.send_email = function() {
+ // push button only once -> slow response from mail server
+ ns.email_dialog_disable_send();
+
var data = $('#order_form').serializeArray();
data = data.concat($('[name^="email_form."]').serializeArray());
data = data.concat($('[name^="print_options."]').serializeArray());
pp.o.multiple=1;
pp.open_dialog();
};
+ns.email_dialog_disable_send = function() {
+ // disable mail send event to prevent
+ // impatient users to send multiple times
+ $('#send_email').prop('disabled', true);
+ };
ns.add_multi_items = function(data) {
var insert_before_item_id = ns.get_insert_before_item_id($('#multi_items_position').val());
<div id="email_form_print_options"></div>
<p>
- [% L.button_tag(email_form.js_send_function, LxERP.t8("Send email")) %]
+ [% L.button_tag(email_form.js_send_function, LxERP.t8("Send email"), id='send_email') %]
[% L.button_tag("\$('#send_email_dialog').dialog('close');", LxERP.t8("Abort")) %]
</p>