@@ -, +, @@ if form has not been submitted yet - click the submit button - it submits the form - we disable the submit button - we prevent the form to be submitted before something is wrong - click the submit button - we prevent the form to be submitted before something is wrong - stage a marc record - acquisitions: have a basket - click on "Add to basket" - "From a staged file" - Don't tick the record - Save - You should see an expected error message - Tick the record - Save - You should see an expected error message - Choose a fund - Click the "Save" button as many times as you can, to try double submit --- koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt | 2 +- koha-tmpl/intranet-tmpl/prog/js/addorderiso2709.js | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt @@ -379,7 +379,7 @@
- Cancel + Cancel
[% ELSE %] --- a/koha-tmpl/intranet-tmpl/prog/js/addorderiso2709.js +++ a/koha-tmpl/intranet-tmpl/prog/js/addorderiso2709.js @@ -48,7 +48,9 @@ $(document).ready(function() { return false; }); - $("#Aform").on("submit", function(){ + $("input#add_order").on("click", function(e){ + e.preventDefault(); + if ( $("input:checkbox[name='import_record_id']:checked").length < 1 ) { alert( ERR_NO_RECORD_SELECTED ); return false; @@ -72,7 +74,9 @@ $(document).ready(function() { return false; } - return disableUnchecked($(this)); + disableUnchecked($(this.form)); + + $(this.form).submit(); }); $('#tabs').tabs(); --