Bugzilla – Attachment 190024 Details for
Bug 34671
Collapsing fields in patron form allows saving without mandatory fields
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34671: Fix validating hidden mandatory patron attribute fields
0002-Bug-34671-Fix-validating-hidden-mandatory-patron-att.patch (text/plain), 4.31 KB, created by
Emmi Takkinen
on 2025-11-28 11:59:45 UTC
(
hide
)
Description:
Bug 34671: Fix validating hidden mandatory patron attribute fields
Filename:
MIME Type:
Creator:
Emmi Takkinen
Created:
2025-11-28 11:59:45 UTC
Size:
4.31 KB
patch
obsolete
>From 05809159a7f4dc20fa188e7a9b72ed3f064ef3c0 Mon Sep 17 00:00:00 2001 >From: Emmi Takkinen <emmi.takkinen@koha-suomi.fi> >Date: Fri, 7 Nov 2025 13:11:53 +0200 >Subject: [PATCH 2/2] Bug 34671: Fix validating hidden mandatory patron > attribute fields > >Hidden mandatory patron attribute field were still causing problems >while saving. Class required was added even if the attribute wasn't >tied to patrons category. > >To test: >1. Add patron attribute to some patron category and set it as >mandatory. >2. Add or modify patron with different category. >3. Attempt to save. >=> Make sure saving the patron is succesful. >4. Add or modify patron with category where you added mandatory >attribute. >=> Make sure that attribute is displayed in form and it's manadatory. > >Sponsored-by: Koha-Suomi Oy >--- > .../intranet-tmpl/prog/en/modules/members/memberentrygen.tt | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >index 7c657c2430..04c8f66d3b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >@@ -1523,7 +1523,7 @@ > [% END %] > [% FOREACH patron_attribute IN pa_loo.items %] > <li data-category_code="[% patron_attribute.category_code | html %]" data-pa_code="[% patron_attribute.code | replace('[^a-zA-Z0-9_-]', '') %]"> >- [% IF patron_attribute.mandatory && patron_attribute.category_code == patron_category.categorycode %] >+ [% IF patron_attribute.mandatory && (patron_attribute.category_code == patron_category.categorycode || !patron_attribute.category_code) %] > <label for="[% patron_attribute.form_id | html %]" class="required" required="required">[% patron_attribute.description | html %]: </label> > [% ELSE %] > <label for="[% patron_attribute.form_id | html %]">[% patron_attribute.description | html %]: </label> >@@ -1532,7 +1532,7 @@ > <select > id="[% patron_attribute.form_id | html %]" > name="[% patron_attribute.form_id | html %]" >- [% IF patron_attribute.mandatory && patron_attribute.category_code == patron_category.categorycode %]required="required"[% END %] >+ [% IF patron_attribute.mandatory && (patron_attribute.category_code == patron_category.categorycode || !patron_attribute.category_code) %]required="required"[% END %] > > > <option value=""></option> > [% FOREACH auth_val_loo IN patron_attribute.auth_val_loop %] >@@ -1544,7 +1544,7 @@ > [% END %] > </select> > [% ELSE %] >- [% IF patron_attribute.mandatory %] >+ [% IF patron_attribute.mandatory && (patron_attribute.category_code == patron_category.categorycode || !patron_attribute.category_code) %] > [% IF patron_attribute.is_date %] > <input > type="text" >-- >2.34.1 >
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 34671
:
155643
|
156145
|
156263
|
156264
|
156453
|
156454
|
158168
|
158299
|
158524
|
158525
|
158526
|
184067
|
184068
|
184069
|
185285
|
186952
|
190021
| 190024