Bug 19641: (follow-up) Fix update child menu option
authorOwen Leonard <oleonard@myacpl.org>
Fri, 26 Jan 2018 13:12:16 +0000 (13:12 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 15 Feb 2018 16:30:23 +0000 (13:30 -0300)
commitde454ff55282f31f1d273f0be1481224613ecd2d
treef9df6a9b0977b4e52b6992dea238165a054cae01
parent4fc473e04db151d346429caa144b6051094ffeaf
Bug 19641: (follow-up) Fix update child menu option

This follow-up corrects handling of clicks on the "Update child" menu
option when the patron is an adult. Previously the click handler was
conditionally added via template markup. This patch modifies it to use
the data-tooltip attribute as an indicator that the option is disabled.

To test, apply the patch and clear your browser cache if necessary.

- Open an adult patron's record for viewing.
- Choose More -> Update child from the toolbar menu.
- The menu item should be disabled, and should show a tooltip.
- Clicking the menu item should do nothing.

- Open a child patron's record for viewing.
- Choose More -> Update child from the toolbar menu.
- The patron should be updated to an adult category.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
koha-tmpl/intranet-tmpl/prog/js/members-menu.js