diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js b/koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js index f491773690..24b785d1e5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js +++ b/koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js @@ -92,4 +92,13 @@ function checkEnter(e){ //e is event object passed from function invocation function clearHoldFor(){ $.cookie("holdfor",null, { path: "/", expires: 0 }); -} \ No newline at end of file +} + +jQuery.fn.preventDoubleFormSubmit = function() { + jQuery(this).submit(function() { + if (this.beenSubmitted) + return false; + else + this.beenSubmitted = true; + }); +}; \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt index 1719af4b76..fa45e26637 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt @@ -127,6 +127,8 @@ function checkMultiHold() { $("#requestany").attr("checked","checked"); } }); + + $('#hold-request-form').preventDoubleFormSubmit(); }); // ]]> @@ -238,7 +240,7 @@ function checkMultiHold() {