Browse Source

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>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
24.05.x
Katrin Fischer 1 year ago
committed by Katrin Fischer
parent
commit
0615bd757c
Signed by: kfischer GPG Key ID: 0EF6E2C03357A834
  1. 14
      koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt

14
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt

@ -1006,10 +1006,18 @@
[% 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 %]
<div class="attr-control">
<a href="#" class="btn btn-sm btn-link clear-attribute"><i class="fa fa-remove" aria-hidden="true"></i> Clear</a>
[% IF ( !pa.type.is_date ) %]
<a href="#" class="btn btn-sm btn-link clear-attribute"><i class="fa fa-remove" aria-hidden="true"></i> Clear</a>
[% END %]
[% IF ( pa.type.repeatable ) %]
<a href="#" class="btn btn-sm btn-link clone-attribute"><i class="fa fa-plus" aria-hidden="true"></i> New</a>
[% END %]
@ -1020,6 +1028,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 %]

Loading…
Cancel
Save