Bug 16457: Remove the use of "onclick" from the patron entry form
authorOwen Leonard <oleonard@myacpl.org>
Tue, 17 Mar 2020 23:57:06 +0000 (23:57 +0000)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Thu, 26 Mar 2020 12:03:42 +0000 (12:03 +0000)
commit2f998ab38d213ceb8868380a8042c05e41209deb
treeeb8b2602d2cb6fea65bc2fceb01c4d20a63ff380
parentb3806e24e0b3b4b3af7685c659321e9375bfdf47
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>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt