Summary: | Use noEnterSubmit CSS class instead of prevent_submit.js | ||
---|---|---|---|
Product: | Koha | Reporter: | Owen Leonard <oleonard> |
Component: | Templates | Assignee: | Owen Leonard <oleonard> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | jdemuth, jonathan.druart, martin.renvoize, nick |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9507 | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Attachments: |
Bug 15911: Use noEnterSubmit CSS class instead of prevent_submit.js
Bug 15911: Use noEnterSubmit CSS class instead of prevent_submit.js Bug 15911: (follow-up) Allow enter to submit using the submit button Bug 15911: Use noEnterSubmit CSS class instead of prevent_submit.js Bug 15911: (follow-up) Allow enter to submit using the submit button |
Description
Owen Leonard
2016-02-24 19:43:00 UTC
Created attachment 85539 [details] [review] Bug 15911: Use noEnterSubmit CSS class instead of prevent_submit.js This patch removes the use of a separate js file, prevent_submit.js, in favor of using a CSS class to trigger the same functionality in staff-global.js. To test, apply the patch and test the following pages to confirm that pressing "Enter" when the cursor is in any field in the main form does not submit the form. - In Acquisitions, add to a basket from a new (empty) record - In Acquisitions, receive an order line - In Serials, locate a subscription and open the "Edit serials" page from the "Serial collection" page. Created attachment 86046 [details] [review] Bug 15911: Use noEnterSubmit CSS class instead of prevent_submit.js This patch removes the use of a separate js file, prevent_submit.js, in favor of using a CSS class to trigger the same functionality in staff-global.js. To test, apply the patch and test the following pages to confirm that pressing "Enter" when the cursor is in any field in the main form does not submit the form. - In Acquisitions, add to a basket from a new (empty) record - In Acquisitions, receive an order line - In Serials, locate a subscription and open the "Edit serials" page from the "Serial collection" page. Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz> I think the following part was important: - && e.target.nodeName == "INPUT" - && e.target.type != "submit" We want to submit form when pressing enter on the submit button, right? :) Created attachment 86205 [details] [review] Bug 15911: (follow-up) Allow enter to submit using the submit button This patch modifies the checkEnter function so that it is possible to submit a form by tabbing to the submit button and hitting ENTER to submit. Created attachment 86412 [details] [review] Bug 15911: Use noEnterSubmit CSS class instead of prevent_submit.js This patch removes the use of a separate js file, prevent_submit.js, in favor of using a CSS class to trigger the same functionality in staff-global.js. To test, apply the patch and test the following pages to confirm that pressing "Enter" when the cursor is in any field in the main form does not submit the form. - In Acquisitions, add to a basket from a new (empty) record - In Acquisitions, receive an order line - In Serials, locate a subscription and open the "Edit serials" page from the "Serial collection" page. Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Created attachment 86413 [details] [review] Bug 15911: (follow-up) Allow enter to submit using the submit button This patch modifies the checkEnter function so that it is possible to submit a form by tabbing to the submit button and hitting ENTER to submit. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Awesome work all! Pushed to master for 19.05 Enhancement, will not be backported to 18.11.x series. |