From f5c1ee67ba9f64bf720ca79783b0193b7c8b1b6d Mon Sep 17 00:00:00 2001 From: Katrin Fischer 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 --- .../bootstrap/en/modules/opac-memberentry.tt | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 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 978c592b67..915761ff3b 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt @@ -1004,10 +1004,18 @@ [% END %] [% ELSE %] - + [% IF ( pa.type.is_date && pa.type.mandatory ) %] + + [% ELSIF ( pa.type.is_date && !pa.type.mandatory ) %] + + [% ELSE %] + + [% END %] [% END %]
- Clear + [% IF ( !pa.type.is_date ) %] + Clear + [% END %] [% IF ( pa.type.repeatable ) %] New [% END %] @@ -1018,6 +1026,8 @@ [% 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