From 40e1f13ce88dd7a56c7e3abd4c09de490a2ac0c6 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 Signed-off-by: Katrin Fischer Signed-off-by: Michal Denar Signed-off-by: Katrin Fischer --- 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 5db55ff4e1..ee16d10b7e 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 bd833a4e76..6676ea4cb7 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/js_includes.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/js_includes.inc @@ -109,7 +109,7 @@ } return $( "
  • " ) .data( "ui-autocomplete-item", item ) - .append( "" + item.surname + ", " + item.firstname + cardnumber + " " + item.dateofbirth + " " + item.address + " " + item.city + " " + item.zipcode + " " + item.country + "" ) + .append( "" + item.surname + ", " + item.firstname + cardnumber + " " + item.dateofbirth + " (" + item.age + ") " + item.address + " " + item.city + " " + item.zipcode + " " + item.country + "" ) .appendTo( ul ); }; } -- 2.11.0