From b0fb408f5921212dc62a69b862af663ba652f152 Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Thu, 21 Feb 2019 20:44:20 +0000 Subject: [PATCH] Bug 15400: (follow-up) Adding age to check out search dropdown MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. Signed-off-by: Séverine QUEUNE Signed-off-by: Séverine QUEUNE --- 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 b9e75d0d4d..71b48ca4f3 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 6c02936bef..bee29cf62d 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.11.0