Bugzilla – Attachment 148987 Details for
Bug 33349
Patron attributes don't have identifying info in the staff interface
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33349: Patron Attributes don't have identifying information in intranet
Bug-33349-Patron-Attributes-dont-have-identifying-.patch (text/plain), 4.05 KB, created by
Nick Clemens (kidclamp)
on 2023-03-30 13:19:30 UTC
(
hide
)
Description:
Bug 33349: Patron Attributes don't have identifying information in intranet
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2023-03-30 13:19:30 UTC
Size:
4.05 KB
patch
obsolete
>From a681a91c9258cddc76eac8d2bf4c9d071969281f Mon Sep 17 00:00:00 2001 >From: Pasi Kallinen <pasi.kallinen@koha-suomi.fi> >Date: Tue, 28 Mar 2023 09:23:50 +0300 >Subject: [PATCH] Bug 33349: Patron Attributes don't have identifying > information in intranet > >Patron Attributes have no identifying info in the template page, no stable ID to >style or effect with javascript, so when new patron attributes are added or >removed, their order may change, requiring extra work to make sure CSS and >javascript don't change the wrong patron attributes. > >Test plan: > >0) in intranet: >1) create patron attribute types with different codes: > "TESTPA", "test2 PA", and "At%tr:X" >2) add those patron attributes to a patron, with some values >3) in a browser, go to a patron information page, and inspect > the page source where the patron attributes are >4) note how the PA entries have no identifying information usable > to css or javascript >5) apply patch >6) inspect the page source, note how the patron attributes have > data-pa_code -value with the following values: > "TESTPA", "test2PA", and "AttrX" > (The attribute codes are sanitized to remove possibly problematic > characters; those shouldn't be used in PA codes anyway) >7) Go to the page where you edit the patron's Additional attributes > and identifiers, and repeat 6 for that page. > >Signed-off-by: Pasi Kallinen <pasi.kallinen@koha-suomi.fi> >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > .../intranet-tmpl/prog/en/modules/members/memberentrygen.tt | 2 +- > koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt | 2 +- > 2 files changed, 2 insertions(+), 2 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 83e1cfd4f1..ec2eb0a889 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >@@ -1548,7 +1548,7 @@ legend:hover { > <legend id="[% pa_loo.class | html %]_lgd">[% pa_loo.lib | html %]</legend> > [% END %] > [% FOREACH patron_attribute IN pa_loo.items %] >- <li data-category_code="[% patron_attribute.category_code | html %]"> >+ <li data-category_code="[% patron_attribute.category_code | html %]" data-pa_code="[% patron_attribute.code | replace('[^a-zA-Z0-9_-]', '') %]"> > [% IF patron_attribute.mandatory %] > <label for="[% patron_attribute.form_id | html %]" class="required" required="required">[% patron_attribute.description | html %]: </label> > [% ELSE %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >index 9cadcd5709..b8d7743303 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >@@ -318,7 +318,7 @@ > <h4>[% attribute.lib | html %]</h4> > <ol> > [% FOREACH item IN attribute.items %] >- <li> >+ <li data-pa_code="[% item.type.code | replace('[^a-zA-Z0-9_-]', '') %]"> > <span class="label">[% item.type.description | html %]: </span> > [% item.description | html_line_break %] > </li> >-- >2.30.2
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 33349
:
148792
|
148811
| 148987