Bugzilla – Attachment 182009 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), 3.73 KB, created by
Roman Dolny
on 2025-05-06 22:04:44 UTC
(
hide
)
Description:
Bug 39773: Add 'required' attribute for required fields
Filename:
MIME Type:
Creator:
Roman Dolny
Created:
2025-05-06 22:04:44 UTC
Size:
3.73 KB
patch
obsolete
>From 35bc3c1b446674d299c8f03ba15db85cc6249bb1 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. > >Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> >--- > .../en/includes/ill/backends/Standard/create.inc | 2 +- > .../ill/backends/Standard/shared/form_input_helpers.inc | 8 ++++---- > 2 files changed, 5 insertions(+), 5 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/create.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/create.inc >index 4ef7691762..1790337caa 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/create.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/create.inc >@@ -111,7 +111,7 @@ > <li> > <label for="captcha" class="required">Verification:</label> > >- <input type="text" name="captcha" id="captcha" class="form-control input-fluid" style="text-transform: uppercase;" /> >+ <input required type="text" name="captcha" id="captcha" class="form-control input-fluid" style="text-transform: uppercase;" /> > <div class="required_label required">Required</div> > <input type="hidden" name="captcha_digest" value="[% captcha_digest | html %]" /> > >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 79d26fba13..fe5e6eb36f 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