]> git.koha-community.org Git - koha.git/commit
Bug 29278: Fix selector of hint used to show age
authorOwen Leonard <oleonard@myacpl.org>
Tue, 19 Oct 2021 16:20:19 +0000 (16:20 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 25 Oct 2021 11:56:35 +0000 (13:56 +0200)
commit79960f3c6581390137ee431f00a46e34064e6290
tree2568f3b0d80393849abdaf1a66d7fcbd8f102c4e
parentf4cae315940fbda9e2ac2a5f4632861c0615b151
Bug 29278: Fix selector of hint used to show age

This patch modifies the patron entry form to correct a problem with the
write_age() function introduced by the switch to Flatpickr on this page
(Bug 28937).

Rather than selecting the element based on the sequence of elements on
the page, we should add an ID for direct selection.

To test, apply the patch and go to Patrons.

- Locate a patron record which has a date of birth saved.
  - When you open that patron for editing, you should see their age
    displayed below the date of birth input field, e.g. "Age: 23 years 9
    months."
  - Changing the date in the date of birth field should update the age
    string correctly.
- Go to Patrons -> New patron.
  - The date of birth field should have a hint showing the required date
    format, e.g. "(DD.MM.YYYY)".
  - When you select a date of birth using the Flatpickr calendar the age
    string should be updated correctly.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt
koha-tmpl/intranet-tmpl/prog/js/members.js