Bug 15146: Format date of birth on patrons requesting modification page
authorMarc Véron <veron@veron.ch>
Fri, 6 Nov 2015 07:50:20 +0000 (08:50 +0100)
committerTomas Cohen Arazi <tomascohen@theke.io>
Fri, 6 Nov 2015 18:03:48 +0000 (15:03 -0300)
To reproduce / test

- Log in to Opac
- Go to "your personal details"
- Request a change of the date of birth
- Log in to Staff client
- Follow link to Patrons requesting modifications
  (/koha/members/members-update.pl)
=> The date is not formatted in syspref format

- Apply patch, reload members-update.pl
=> The date is formatted in syspref format

- Approve changes
- Verify that changes are saved

This is independent from C4::Dates removal.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised. Changes saved Ok, Update patron record follows
dateformat syspref

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
koha-tmpl/intranet-tmpl/prog/en/modules/members/members-update.tt

index 64cffa2..cb23410 100644 (file)
@@ -1,4 +1,5 @@
 [% USE Branches %]
+[% USE KohaDates %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Patrons &rsaquo; Update patron records</title>
 [% INCLUDE 'doc-head-close.inc' %]
                                                     [% IF ( ( pm.$key OR borrowers.$borrowernumber.$key ) && ( pm.$key != borrowers.$borrowernumber.$key ) ) %]
                                                         <tr>
                                                             <td>[% PROCESS display_names field = key %]</td>
-                                                            <td>[% borrowers.$borrowernumber.$key %]</td>
-                                                            <td>[% pm.$key %]</td>
+                                                            [% IF ( key == "dateofbirth" ) %]
+                                                                <td>[% borrowers.$borrowernumber.$key | $KohaDates %]</td>
+                                                                <td>[% pm.$key | $KohaDates %]</td>
+                                                            [% ELSE %]
+                                                                <td>[% borrowers.$borrowernumber.$key %]</td>
+                                                                <td>[% pm.$key %]</td>
+                                                            [% END %]
                                                         </tr>
                                                     [% END %]
                                                 [% END %]