From 6fafc934ee768c519fd2166219391b2f94c7941c Mon Sep 17 00:00:00 2001 From: Eric Phetteplace Date: Mon, 16 Sep 2019 12:53:32 -0700 Subject: [PATCH] Bug 23625: ArticleRequestsMandatoryFields* only affects field labels, does not make inputs required Test plan: 1. Enable article requests ( syspref: ArticleRequests => Enable, Circ and fine rules ALL/ALL (or a given category/itemtype): Article requests => Yes ) 2. Set one or more fields to require in the ArticleRequestsMandatoryFields, ArticleRequestsMandatoryFieldsItemOnly, and/or ArticleRequestsMandatoryFieldsRecordOnly settings (all these settings are affected in the same manner) 3. Search for a title and select the "Request Article" button from the OPAC search results 4. Authenticate as a patron 5. Neglect to fill out at least one of the mandatory fields 6. Select the "Place Request" button at the bottom of the form 7. The form submits despite the empty mandatory fields 8. Apply patch 9. Repeat steps 3, 5, & 6 10 . The form should refuse to submit, show a browser-native message about the missing required fields. Sponsored-by: California College of the Arts Signed-off-by: Kyle M Hall --- .../en/modules/opac-request-article.tt | 23 ++++++++++++------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-request-article.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-request-article.tt index 25af23ee21..2da2bf95ef 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-request-article.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-request-article.tt @@ -36,64 +36,71 @@
  • [% IF mandatory_fields.search('title') %] + [% ELSE %] + [% END %] -
  • [% IF mandatory_fields.search('author') %] + [% ELSE %] + [% END %] -
  • [% IF mandatory_fields.search('volume') %] + [% ELSE %] + [% END %] -
  • [% IF mandatory_fields.search('issue') %] + [% ELSE %] + [% END %] -
  • [% IF mandatory_fields.search('date') %] + [% ELSE %] + [% END %] -
  • [% IF mandatory_fields.search('pages') %] + [% ELSE %] + [% END %] -
  • [% IF mandatory_fields.search('chapters') %] + [% ELSE %] + [% END %] -
  • @@ -104,7 +111,7 @@