Bugzilla – Attachment 157866 Details for
Bug 32610
Add ability to specify patron attribute as a date
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32610: Add date extended patron attributes to the OPAC
Bug-32610-Add-date-extended-patron-attributes-to-t.patch (text/plain), 4.68 KB, created by
Shi Yao Wang
on 2023-10-25 18:56:17 UTC
(
hide
)
Description:
Bug 32610: Add date extended patron attributes to the OPAC
Filename:
MIME Type:
Creator:
Shi Yao Wang
Created:
2023-10-25 18:56:17 UTC
Size:
4.68 KB
patch
obsolete
>From 80472f7bf177c5213005b4b062916573f5046ee6 Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <katrin.fischer.83@web.de> >Date: Sat, 18 Mar 2023 10:19:42 +0000 >Subject: [PATCH] Bug 32610: Add date extended patron attributes to the OPAC > >This makes sure that the attributes are handled correctly >when displayed and edited in the OPAC during address changes >or self registration. > >To test: > * You will need to test different configuration options for > extended patron attributes (PA) in combination with the date option: > * PA displays in OPAC, but is not editable > * The date will show nicely formatted on the personal details tab. > * PA displays and is editable in the OPAC > * The date can be edited using the calendar widget > * PA displays, is editabe and mandatory > * The date is marked as required and you can't save without > it being set. > * Test the form behaves correctly when requesting changes for an > existing patron account and when self registering. > >Signed-off-by: Philip Orr <philip.orr@lmscloud.de> >--- > .../bootstrap/en/modules/opac-memberentry.tt | 16 +++++++++++++--- > 1 file changed, 13 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt >index fd9587ce3d..888780444c 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt >@@ -974,18 +974,28 @@ > [% END %] > </select> > [% ELSE %] >- <textarea rows="2" cols="30" id="[% form_id | html %]" name="patron_attribute_value">[% pa_value | html %]</textarea> >+ [% IF ( pa.type.is_date && pa.type.mandatory ) %] >+ <input type="text" id="[% form_id | html %]" name="patron_attribute_value" value="[% pa_value | html %]" size="10" required="required" class="flatpickr" /> >+ [% ELSIF ( pa.type.is_date && !pa.type.mandatory ) %] >+ <input type="text" id="[% form_id | html %]" name="patron_attribute_value" value="[% pa_value | html %]" size="10" class="flatpickr" /> >+ [% ELSE %] >+ <textarea rows="2" cols="30" id="[% form_id | html %]" name="patron_attribute_value">[% pa_value | html %]</textarea> >+ [% END %] > [% END %] > [% IF pa.type.mandatory %] >- <div class="required">Required</div> >+ <div class="required_label required">Required</div> >+ [% END %] >+ [% IF ( !pa.type.is_date ) %] >+ <a href="#" class="clear-attribute">Clear</a> > [% END %] >- <a href="#" class="clear-attribute">Clear</a> > [% IF ( pa.type.repeatable ) %] > <a href="#" class="clone-attribute">New</a> > [% END %] > [% ELSE %] > [% IF ( pa.type.authorised_value_category ) %] > [% AuthorisedValues.GetByCode( pa.type.authorised_value_category, pa_value, 1 ) | html_line_break %] >+ [% ELSIF ( pa.type.is_date ) %] >+ [% pa_value | $KohaDates %] > [% ELSE %] > [% pa_value | html_line_break %] > [% END %] >-- >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 32610
:
148400
|
148401
|
148402
|
148403
|
148404
|
148405
|
148825
|
148826
|
148827
|
148828
|
148829
|
148830
|
157862
|
157863
|
157864
|
157865
|
157866
|
157867
|
157868
|
158994
|
158995
|
158996
|
158997
|
158998
|
158999
|
159000
|
165747
|
165750
|
165854
|
165855
|
165856
|
165857
|
165858
|
165859
|
165860
|
165861
|
165862
|
165863
|
165864
|
165865
|
165925
|
165926