[Bug 15855] New: Disabling multiple submission on search form
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15855 Bug ID: 15855 Summary: Disabling multiple submission on search form Change sponsored?: --- Product: Koha Version: 3.18 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: OPAC Assignee: oleonard@myacpl.org Reporter: arthur.suzuki@univ-lyon3.fr QA Contact: testopia@bugs.koha-community.org Created attachment 48203 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=48203&action=edit Extract from koha-opac-access_log Some impatient users tends to click several times on the “Go” button of the search form on OPAC. Probably in a desperate hope that this will speed up the whole process. However the result is quite opposite, as Zebra is then queried multiple times which increases the server cpu load, until it reach 100% and cause Denial of Service (boooh…) We had the idea of disabling the “searchsubmit” button upon first click. This is done by adding onclick=”this.disabled=true;this.form.submit();return true;” after “id=searchsubmit” in masthead.inc. It is also possible to solve this issue by adding the following section to opacuser.js: $(document).ready(function() { $('#searchform').submit(function() { $('#searchsubmit').prop('disabled',true).text('searching...'); }); }); Thanks to Frederic Demians and Olivier Crouzet for their help. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15855 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org Version|3.18 |unspecified -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15855 --- Comment #1 from Arthur Suzuki <arthur.suzuki@univ-lyon3.fr> --- Here is the code designed by Olivier : // multi soumission Enter var submitted; $('#translControl1').bind('keyup',function() { submitted = false; }); $('#translControl1').bind('keydown',function(event) { code = event.keyCode||event.which||event.charCode||event.char||0; if(code == 13) { if (submitted == false) { submitted = true; $('#searchform').submit(); } else { event.preventDefault(); event.returnValue = false; return false; } } }); The use of keyCode permits to submit form only once, and only uppon key down event. It prevents the users to fire multiple searches while holding the "Return" key down (a behavior which is still possible with previously shared code). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15855 Marjorie Barry-Vila <marjorie.barry-vila@ccsr.qc.ca> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |marjorie.barry-vila@ccsr.qc | |.ca -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15855 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |veron@veron.ch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15855 --- Comment #2 from Marc Véron <veron@veron.ch> --- Created attachment 63240 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63240&action=edit Bug 18555: Create patron list from patron import Create a patron list from imported patrons to be used for printing patron cards and other patron list related actions. To test: - Apply patch - Go to Home > Tools > Import patrons - Select a file to import and check new checkbox 'Create patron list' - Import file - Verify that in import results you see the time stamped name of the patronlist containig the imported patrons (if any patrons were imported) - Go to Home > Tools > Patron lists - Verify that the list shows up and contains the imported patrons -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15855 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #63240|0 |1 is obsolete| | --- Comment #3 from Marc Véron <veron@veron.ch> --- Comment on attachment 63240 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63240 Bug 18555: Create patron list from patron import Sorry, mistaked with bug number, should put my glasses... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15855 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=17523 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15855 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|NEW |CLOSED --- Comment #4 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- This is a very old ticket and I can't reproduce the issue anymore. Closing fixed :) -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org