Bugzilla – Attachment 181649 Details for
Bug 39773
OPAC ILL form does not use client-side form validation for required fields
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39773: Add 'required' attribute for required fields
Bug-39773-Add-required-attribute-for-required-fiel.patch (text/plain), 2.66 KB, created by
Pedro Amorim
on 2025-04-29 12:26:08 UTC
(
hide
)
Description:
Bug 39773: Add 'required' attribute for required fields
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2025-04-29 12:26:08 UTC
Size:
2.66 KB
patch
obsolete
>From b49cb8b0c7e853441b805de699a761011143607d Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@openfifth.co.uk> >Date: Tue, 29 Apr 2025 12:23:35 +0000 >Subject: [PATCH] Bug 39773: Add 'required' attribute for required fields > >Test plan, apply patch: >1) Enable ILLModule >2) Create a new OPAC request, visit: >http://localhost:8080/cgi-bin/koha/opac-illrequests.pl?op=add_form&backend=Standard >3) Press 'Create'. Notice the required 'type 'is now validated before the form is submitted. > >Additional testing: >1) Enable ILLOpacUnauthenticatedRequest. Log out. Repeat 2) >2) Press 'Create'. Notice the required unauthenticated fields are highlighted as required. >--- > .../ill/backends/Standard/shared/form_input_helpers.inc | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/shared/form_input_helpers.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/shared/form_input_helpers.inc >index 79d26fba132..fe5e6eb36f9 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/shared/form_input_helpers.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/shared/form_input_helpers.inc >@@ -3,9 +3,9 @@ > <li> > <label for="[% id | html %]">[% label | html %]:</label> > [% IF opac %] >- <input class="form-control input-fluid" type="text" name="[% id | html %]" id="[% id | html %]" value="[% value | html %]" /> >+ <input [% IF required %]required[% END %] class="form-control input-fluid" type="text" name="[% id | html %]" id="[% id | html %]" value="[% value | html %]" /> > [% ELSE %] >- <input type="text" name="[% id | html %]" id="[% id | html %]" value="[% value | html %]" /> >+ <input [% IF required %]required[% END %] type="text" name="[% id | html %]" id="[% id | html %]" value="[% value | html %]" /> > [% END %] > [% IF required %] > <div class="required_label required">Required</div> >@@ -18,11 +18,11 @@ > <li> > <label for="[% id | html %]">[% label | html %]:</label> > [% IF opac %] >- <select class="form-select input-fluid" name="[% id | html %]" id="[% id | html %]" >+ <select [% IF required %]required[% END %] class="form-select input-fluid" name="[% id | html %]" id="[% id | html %]" > >[% content | $raw %]</select > > > [% ELSE %] >- <select name="[% id | html %]" id="[% id | html %]" >+ <select [% IF required %]required[% END %] name="[% id | html %]" id="[% id | html %]" > >[% content | $raw %]</select > > > [% END %] >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 39773
:
181649
|
181650
|
182009