From fe449a919654373506e7eae6a59810f81b34059b Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Thu, 21 Feb 2019 20:44:20 +0000 Subject: [PATCH] Bug 15400: (followup) Adding age to check out search dropdown Confirm age shows in the suggestions dropdown when using the checkout search in header (if user set DOB). Confirm 'Age unknown' shows if no DOB set. --- circ/ysearch.pl | 1 + koha-tmpl/intranet-tmpl/prog/en/includes/js_includes.inc | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/circ/ysearch.pl b/circ/ysearch.pl index b9e75d0..71b48ca 100755 --- a/circ/ysearch.pl +++ b/circ/ysearch.pl @@ -85,6 +85,7 @@ while ( my $b = $borrowers_rs->next ) { firstname => $b->firstname // '', cardnumber => $b->cardnumber // '', dateofbirth => format_sqldatetime($b->dateofbirth, undef, undef, 1) // '', + age => $b->get_age // 'Age unknown', address => $b->address // '', city => $b->city // '', zipcode => $b->zipcode // '', diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/js_includes.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/js_includes.inc index 6c02936b..bee29cf 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/js_includes.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/js_includes.inc @@ -105,7 +105,7 @@ obj._renderItem = function( ul, item ) { return $( "
  • " ) .data( "ui-autocomplete-item", item ) - .append( "" + item.surname + ", " + item.firstname + " (" + item.cardnumber + ") " + item.dateofbirth + " " + item.address + " " + item.city + " " + item.zipcode + " " + item.country + "" ) + .append( "" + item.surname + ", " + item.firstname + " (" + item.cardnumber + ") " + item.dateofbirth + " (" + item.age + ") " + item.address + " " + item.city + " " + item.zipcode + " " + item.country + "" ) .appendTo( ul ); }; } -- 2.1.4