Bug 33882: Add spans in dateofbirth column on member.tt

To test:
1 Apply patch
2 Do a patron search that will return multiple patrons.
3 Look at the date of birth column and notice the text is now wrapped in a class called 'dateofbirth'
4. Notice that the age hint is wrapped in a class called 'agehint'.
5. Add '.agehint { display: none }' to intranetusercss.
6. Now notice the date of birth still displays but no age information.

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Lucas Gass 2023-06-01 20:03:53 +00:00 committed by Tomas Cohen Arazi
parent 536f860038
commit 9eb62ef191
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F

View file

@ -428,7 +428,7 @@
"searchable": true,
"orderable": true,
"render": function( data, type, row, meta ) {
return data ? escape_str($date(data) + " (" + _("%s years").format($get_age(data)) + ")") : "";
return data ? "<span class=\"dateofbirth\">" + escape_str($date(data)) + "<span class=\"agehint\"> (" + _("%s years").format($get_age(data)) + ")</span></span>" : "";
}
}
[% CASE 'address' %]