Make it possible that the two hold dates on opac-reserve (starts on and not needed after) are mandatory. Enable OPACAllowHoldDateInFuture to see the first one. A new pref could include the various (4) combinations.
Created attachment 130745 [details] [review] Bug 30108: Database revision, adding new preference Test plan: Run upgrade or new install. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 130746 [details] [review] Bug 30108: Preference description Test plan: Check the preferences form, tab Circulation, tab Hold policy. Look for OPACMandatoryHoldDates. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 130747 [details] [review] Bug 30108: Allow making hold dates required Side note: Template still referred to class holddateto while not being used any longer. Replaced this occurrence by futuredate. Test plan: [1] Disable OPACAllowHoldDateInFuture. [2] Set pref OPACMandatoryHoldDates to "end date". [3] Verify that the end date is mandatory on opac-reserve. [4] Set pref OPACMandatoryHoldDates to "start date". [5] Verify that no dates are required. [6] Enable OPACAllowHoldDateInFuture. [7] Verify that start dates are required. [8] Set pref OPACMandatoryHoldDates to "no dates". [9] Verify that no dates are required again. Bonus: Check that more options box is opened when a date still is required. In case of item level being forced, verify that more options is opened regardless of pref setting. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Everything works as excepted but I think a few small things can be done to make the user experience easier: 1. On other OPAC pages (self-reg, suggestions ) we add a required div that makes it clear that the field is required: <div class="required_label required">Required</div> That would be nice so that users can see what is required. 2. The alert message 'Date should be filled.' is generic. We should tell the user exactly which field needs attention. The "Hold starts on date" field is required The "Hold not needed after" field is required
Marking Failed QA based on Lucas's comment.
Created attachment 131372 [details] [review] Bug 30108: (follow-up) Add required indication, differentiate alert As asked on comment4: [1] Add a required div as a visible hint when applicable. [2] Differentiate alert for hold start and end date. Test plan: See former patch. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
(In reply to Lucas Gass from comment #4) > Everything works as excepted but I think a few small things can be done to > make the user experience easier: > > 1. On other OPAC pages (self-reg, suggestions ) we add a required div that > makes it clear that the field is required: > > <div class="required_label required">Required</div> > > That would be nice so that users can see what is required. > > > 2. The alert message 'Date should be filled.' is generic. We should tell the > user exactly which field needs attention. > > The "Hold starts on date" field is required > The "Hold not needed after" field is required Thx Lucas for your testing and observations. Hope they are fixed now.
Created attachment 131376 [details] [review] Bug 30108: Database revision, adding new preference Test plan: Run upgrade or new install. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Created attachment 131377 [details] [review] Bug 30108: Preference description Test plan: Check the preferences form, tab Circulation, tab Hold policy. Look for OPACMandatoryHoldDates. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Created attachment 131378 [details] [review] Bug 30108: Allow making hold dates required Side note: Template still referred to class holddateto while not being used any longer. Replaced this occurrence by futuredate. Test plan: [1] Disable OPACAllowHoldDateInFuture. [2] Set pref OPACMandatoryHoldDates to "end date". [3] Verify that the end date is mandatory on opac-reserve. [4] Set pref OPACMandatoryHoldDates to "start date". [5] Verify that no dates are required. [6] Enable OPACAllowHoldDateInFuture. [7] Verify that start dates are required. [8] Set pref OPACMandatoryHoldDates to "no dates". [9] Verify that no dates are required again. Bonus: Check that more options box is opened when a date still is required. In case of item level being forced, verify that more options is opened regardless of pref setting. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Created attachment 131379 [details] [review] Bug 30108: (follow-up) Add required indication, differentiate alert As asked on comment4: [1] Add a required div as a visible hint when applicable. [2] Differentiate alert for hold start and end date. Test plan: See former patch. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Created attachment 133462 [details] [review] Bug 30108: Database revision, adding new preference Test plan: Run upgrade or new install. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 133463 [details] [review] Bug 30108: Preference description Test plan: Check the preferences form, tab Circulation, tab Hold policy. Look for OPACMandatoryHoldDates. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 133464 [details] [review] Bug 30108: Allow making hold dates required Side note: Template still referred to class holddateto while not being used any longer. Replaced this occurrence by futuredate. Test plan: [1] Disable OPACAllowHoldDateInFuture. [2] Set pref OPACMandatoryHoldDates to "end date". [3] Verify that the end date is mandatory on opac-reserve. [4] Set pref OPACMandatoryHoldDates to "start date". [5] Verify that no dates are required. [6] Enable OPACAllowHoldDateInFuture. [7] Verify that start dates are required. [8] Set pref OPACMandatoryHoldDates to "no dates". [9] Verify that no dates are required again. Bonus: Check that more options box is opened when a date still is required. In case of item level being forced, verify that more options is opened regardless of pref setting. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 133465 [details] [review] Bug 30108: (follow-up) Add required indication, differentiate alert As asked on comment4: [1] Add a required div as a visible hint when applicable. [2] Differentiate alert for hold start and end date. Test plan: See former patch. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 134476 [details] [review] Bug 30108: (follow-up) Make require label translatable
Maybe in the future this could be rewritten with JQuery validator like opac-memberentry.tt
Pushed to master for 22.05, thanks to everybody involved [U+1F984]
Wrong bug... too many tabs.