[Bug 16457] New: Remove the use of "onclick" from the patron entry form
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16457 Bug ID: 16457 Summary: Remove the use of "onclick" from the patron entry form Change sponsored?: --- Product: Koha Version: master Hardware: All URL: /cgi-bin/koha/members/memberentry.pl OS: All Status: ASSIGNED Severity: enhancement Priority: P5 - low Component: Templates Assignee: oleonard@myacpl.org Reporter: oleonard@myacpl.org QA Contact: testopia@bugs.koha-community.org CC: testopia@bugs.koha-community.org Depends on: 13041, 16386, 16450 There are several instances of "onclick" in memberentrygen.tt. It should be rewritten so that JS functionality can be separate from the markup. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13041 [Bug 13041] Can't add user as manager of basket if name includes a single quote https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16386 [Bug 16386] Replace the use of "onclick" from patron card creator templates https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16450 [Bug 16450] Remove the use of "onclick" from guarantor search template -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16457 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=16457 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |NEW -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16457 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |17858 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17858 [Bug 17858] Omnibus: Move staff client JavaScript to the footer -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16457 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16457 --- Comment #1 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 100971 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=100971&action=edit Bug 16457: Remove the use of "onclick" from the patron entry form This patch removes several event attributes from the patron entry form and replaces them with event handlers in the <script> block. Some event attributes were removed altogether because they weren't functional: Onchange events on jQueryUI datepickers don't work, and they would have been redundant even if they did work. To test you should have some patron attributes configured (Administration -> Patron attribute types). At least one attribute should be configured to apply to one particular patron category. Apply the patch and begin the process of adding a new patron. 1. Try to add a patron with details matching a patron which already exists. You should get a confirmation message on screen which asks if the patron is a duplicte. Test the link which shows the existing record. It should trigger a popup window with details about the patron. 2. Test the process of setting a patron's date of birth. Selecting a date should trigger the display of the patron's age immedately below the field. 3. Test that you cannot set a patron's expiration to a date which precedes the date in the registration date field. 4. Test that you can add a manual restriction's expiration date, and that the "Clear date" link works correctly. 5. Test that the "clear" and "new" controls links work with additional attributes and identifiers. 6. Test that changing the patron's category correctly affects the display of available attributes and identifiers: The attribute you have associated with a particular patron category should only show if that category is selected under "Category." -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16457 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16457 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #100971|0 |1 is obsolete| | --- Comment #2 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Created attachment 101391 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=101391&action=edit Bug 16457: Remove the use of "onclick" from the patron entry form This patch removes several event attributes from the patron entry form and replaces them with event handlers in the <script> block. Some event attributes were removed altogether because they weren't functional: Onchange events on jQueryUI datepickers don't work, and they would have been redundant even if they did work. To test you should have some patron attributes configured (Administration -> Patron attribute types). At least one attribute should be configured to apply to one particular patron category. Apply the patch and begin the process of adding a new patron. 1. Try to add a patron with details matching a patron which already exists. You should get a confirmation message on screen which asks if the patron is a duplicte. Test the link which shows the existing record. It should trigger a popup window with details about the patron. 2. Test the process of setting a patron's date of birth. Selecting a date should trigger the display of the patron's age immedately below the field. 3. Test that you cannot set a patron's expiration to a date which precedes the date in the registration date field. 4. Test that you can add a manual restriction's expiration date, and that the "Clear date" link works correctly. 5. Test that the "clear" and "new" controls links work with additional attributes and identifiers. 6. Test that changing the patron's category correctly affects the display of available attributes and identifiers: The attribute you have associated with a particular patron category should only show if that category is selected under "Category." Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Easy to follow test plan, all works, but on point 5. I found one 'clear' but no 'new' control link, it's my only comment. No errors. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16457 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de QA Contact|testopia@bugs.koha-communit |katrin.fischer@bsz-bw.de |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16457 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Bernardo Gonzalez Kriegel from comment #2)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Easy to follow test plan, all works, but on point 5. I found one 'clear' but no 'new' control link, it's my only comment. No errors.
The 'new' button will be visible for repeatable attributes. Thanks to the note I tested this and found that when you click on 'new' for a second time to add a third field you are thrown to the top of the screen. It depends on which 'new' link you use. Owen, can you please check? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16457 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16457 --- Comment #4 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 101554 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=101554&action=edit Bug 16457: (follow-up) Enable click event on dynamically-created elements This patch moves the click handler for patron attribute actions ("new", "clear") from the links themselves to the container. This allows jQuery to correctly target dynamically-created copies of the links. To test you should have extended patron attributes enabled and you should have some repeatable attributes defined. - Create or edit a patron record - In the "Additional attributes and identifiers" section, test the "Clear" and "New" links. Confirm that the controls work with both the original instance of the field and those created by clicking "New." -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16457 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16457 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #101391|0 |1 is obsolete| | --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 101770 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=101770&action=edit Bug 16457: Remove the use of "onclick" from the patron entry form This patch removes several event attributes from the patron entry form and replaces them with event handlers in the <script> block. Some event attributes were removed altogether because they weren't functional: Onchange events on jQueryUI datepickers don't work, and they would have been redundant even if they did work. To test you should have some patron attributes configured (Administration -> Patron attribute types). At least one attribute should be configured to apply to one particular patron category. Apply the patch and begin the process of adding a new patron. 1. Try to add a patron with details matching a patron which already exists. You should get a confirmation message on screen which asks if the patron is a duplicte. Test the link which shows the existing record. It should trigger a popup window with details about the patron. 2. Test the process of setting a patron's date of birth. Selecting a date should trigger the display of the patron's age immedately below the field. 3. Test that you cannot set a patron's expiration to a date which precedes the date in the registration date field. 4. Test that you can add a manual restriction's expiration date, and that the "Clear date" link works correctly. 5. Test that the "clear" and "new" controls links work with additional attributes and identifiers. 6. Test that changing the patron's category correctly affects the display of available attributes and identifiers: The attribute you have associated with a particular patron category should only show if that category is selected under "Category." Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Easy to follow test plan, all works, but on point 5. I found one 'clear' but no 'new' control link, it's my only comment. No errors. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16457 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #101554|0 |1 is obsolete| | --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 101771 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=101771&action=edit Bug 16457: (follow-up) Enable click event on dynamically-created elements This patch moves the click handler for patron attribute actions ("new", "clear") from the links themselves to the container. This allows jQuery to correctly target dynamically-created copies of the links. To test you should have extended patron attributes enabled and you should have some repeatable attributes defined. - Create or edit a patron record - In the "Additional attributes and identifiers" section, test the "Clear" and "New" links. Confirm that the controls work with both the original instance of the field and those created by clicking "New." Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16457 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |20.05.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16457 --- Comment #7 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Nice work everyone! Pushed to master for 20.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16457 --- Comment #8 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Nice work everyone! Pushed to master for 20.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16457 Joy Nelson <joy@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |joy@bywatersolutions.com --- Comment #9 from Joy Nelson <joy@bywatersolutions.com> --- enhancement not backported to 19.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16457 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@openfifth.c | |o.uk Depends on|13041, 16386 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13041 [Bug 13041] Can't add user as manager of basket if name includes a single quote https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16386 [Bug 16386] Replace the use of "onclick" from patron card creator templates -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org