Bug 22657: Remove JavaScript from OPAC suggestion validation of required fields
authorOwen Leonard <oleonard@myacpl.org>
Wed, 20 Mar 2019 18:58:02 +0000 (18:58 +0000)
committerNick Clemens <nick@bywatersolutions.com>
Wed, 15 May 2019 16:58:50 +0000 (16:58 +0000)
commit3bcde5d91fb19e30ee14c8ecc82c8f3985a22c2c
tree1efa07d5c5572cdcd4ee9a833eab5bd42a2d1c13
parentf2d886c3b3513ace62f428d4e42d4d144a689172
Bug 22657: Remove JavaScript from OPAC suggestion validation of required fields

This patch modifies the OPAC suggestion form so that it doesn't require
JavaScript for form validation. This change doesn't alter the behavior
of the form for users but does fit with the general goal of progressive
enhancement for the OPAC.

The patch adds "required" labels to required fields to better identify
required fields.

To test, apply the patch and make sure there are required fields
specified in the OPACSuggestionMandatoryFields system preference.

 - Log in to the OPAC and go to Your purchase suggestions -> New
   purchase suggestion.
 - Verify that the fields specified in OPACSuggestionMandatoryFields are
   highlighted and marked "required."
 - Verify that you can't submit the form without filling out these
   fields.

Signed-off-by: Bin Wen <bin.wen@inlibro.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt
opac/opac-suggestions.pl