From 47731f187f32d889ea45a2c2d567d67189d4753a Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Fri, 6 Nov 2020 14:04:49 +0000 Subject: [PATCH] Bug 24786: (QA follow-up) Reset beenSubmitted on validation failure When the form submision fails due to validation errors we need to also reset the preventFormDoubleSubmit state to allow for a second submission with corrected form fields. Signed-off-by: Jonathan Druart --- .../intranet-tmpl/prog/en/modules/members/paycollect.tt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt index 31d6a0151e..b267d55082 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt @@ -389,6 +389,12 @@ } } [% END %] + }, + invalidHandler: function(event, validator) { + // reset beenSubmitted for prevenDoubleFormSubmit + event.target.beenSubmitted = false; + // remove class added by preventDoubleFormSubmit + $("body, form input[type='submit'], form button[type='submit'], form a").removeClass('waiting'); } }); }); -- 2.39.5