Bug 27894: Add visual feedback on overridden pickup locations
authorTomas Cohen Arazi <tomascohen@theke.io>
Thu, 11 Mar 2021 13:46:58 +0000 (10:46 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 7 Apr 2021 14:08:04 +0000 (16:08 +0200)
commitd2a46916380f5793cf586b3ce10ecfd43d741b1e
treed662fee3be7ac54bebb80c8e71e6aaed5159fdd3
parentd8be3d5084bf6d74a40c162a6b6e221bbbfc86ae
Bug 27894: Add visual feedback on overridden pickup locations

This patch takes advantage of the previous changes, and makes the
select2 dropdown display a warning sign (with a tooltip) on pickup
locations that, if chosen, it would mean a circ rule would be
overridden.

To test:
1. Have some pickup locations that are not valid for existing holds and
   AllowHoldPolicyOverride set to "Don't allow"
2. Visit a biblio with some holds
3. Choose a hold that cannot use some pickup location and use the
   dropdown
=> SUCCESS: Only valid pickup locations are retrieved
4. Set Allow HoldPolicyOverride to "Allow"
5. Refresh the page (I usually click on the Holds tab)
6 .Repeat 3
=> SUCCESS: All pickup locations in the system are displayed
=> FAIL: No visual feedback on overridden pickup locations :-(
7. Apply this patch and refresh the page
8. Repeat 3
=> SUCCESS: All pickup locations in the systema are displayed
=> SUCCESS: Visual feedback on overridden pickup locations is shown!
9. Set AllowHoldPolicyOverride to "Don't allow"
10. Repeat 3
=> SUCCESS: Only valid pickup locations are retrieved
=> SUCCESS: No overrridden warn/symbol, as expected
11. Sign off :-D

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.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/reserve/request.tt