[Koha-bugs] [Bug 4054] Double-clicking the 'place hold' button can result in duplicate holds
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Mon Nov 12 14:00:51 CET 2012
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=4054
--- Comment #12 from Paul Poulain <paul.poulain at biblibre.com> ---
(In reply to comment #11)
> I just ran in a problem with this new function preventDoubleFormSubmit(). If
> you place a hold and you have an error in the function check() then you
> won't be able to submit the form.
> The only idea I have to fix this is to add a setTimeout :
>
> setTimeout(function(){$('#hold-request-form')[0].beenSubmitted = false;},
> 2000)
>
> after "this.beenSubmitted = true;" in preventDoubleFormSubmit(). This way
> you can submit the form again in 2 seconds.
> Anyone has a better idea ? If not I will send a patch.
Good catch maxime ! my opinion is that it's an acceptable way to fix this
problem, but I see a -uncommon- problem with it:
* I click to validate
* server very high load and/or network prolem, so no answer for 3 or 4 seconds
* click again (with your proposal it would be possible)
* 2 hold placed
Would it be possible to declare "unbusmitted" a form if the check() is false ?
That would be a better option
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are watching all bug changes.
More information about the Koha-bugs
mailing list