https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23625 Bug ID: 23625 Summary: ArticleRequestsMandatoryFields* only affects field labels, does not make inputs required Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: OPAC Assignee: oleonard@myacpl.org Reporter: ephetteplace@cca.edu QA Contact: testopia@bugs.koha-community.org Steps to recreate: 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 (their <label>s will have a "required" class making them appear red in the default theme) 6) Select the "Place Request" button at the bottom of the form 7) The form should not submit without the required fields but it does anyways. The basic issue is that the opac-request-article.tt template https://github.com/Koha-Community/Koha/blob/master/koha-tmpl/opac-tmpl/boots... creates the same non-required <input> elements regardless of whether a field is required or not. Here is one example: <li> [% IF mandatory_fields.search('title') %] <label for="title" class="required">Title:</label> [% ELSE %] <label for="title">Title:</label> [% END %] <input type="text" name="title" id="title" size="50"/> </li> I believe that all of the form fields should be modified such that both the <label> AND <input> are different depending on whether a field is required or not: <li> [% IF mandatory_fields.search('title') %] <label for="title" class="required">Title:</label> <input type="text" required name="title" id="title" size="50"/> [% ELSE %] <label for="title">Title:</label> <input type="text" name="title" id="title" size="50"/> [% END %] </li> -- You are receiving this mail because: You are watching all bug changes.