Bug 28273: Add form validation for pickup locations
authorTomas Cohen Arazi <tomascohen@theke.io>
Thu, 13 May 2021 12:03:52 +0000 (09:03 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 20 May 2021 06:43:34 +0000 (08:43 +0200)
commita2510a51b58609fc62f80dce2b567d2f95e2687c
tree70667855a7a020daed885e9e0d99e21b5d372086
parent26b6b10d34153c3fac8537706789f9873ff1f289
Bug 28273: Add form validation for pickup locations

This patch introduces validation on the new pickup locations column.
This way, if a selected title doesn't have a pickup location set, it
will prevent form submission and a suitable error message will pop-up.

To test:
1. Apply this patch
2. Attempt to place multi-title level holds
3. Make sure some selected titles don't have the pickup location set
4. Submit
=> SUCCESS: Form submission halts, an idiomatic error message shows.
5. Unselect all biblios and repeat 4
=> SUCCESS: You are not allowed to proceed, a message is displayed.
6. Have all selected titles set a pickup location, submit
=> SUCCESS: Holds are placed as they should.
7. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt