From 49f6f393d2a1c66daebb1e13f45a45c6856d8dff Mon Sep 17 00:00:00 2001 From: jirislav Date: Tue, 14 Apr 2015 12:33:37 +0200 Subject: [PATCH] Bug 13931 - Implemented patron's dateofbirth autocompletion into newest version of circ/ysearch.pl --- circ/ysearch.pl | 2 ++ koha-tmpl/intranet-tmpl/prog/en/includes/patron-search-box.inc | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/circ/ysearch.pl b/circ/ysearch.pl index ae4ae42..0175bb7 100755 --- a/circ/ysearch.pl +++ b/circ/ysearch.pl @@ -29,6 +29,7 @@ use CGI qw ( -utf8 ); use C4::Context; use C4::Auth qw/check_cookie_auth/; use Koha::Borrowers; +use Koha::DateUtils qw/format_sqldatetime/; use JSON qw( to_json ); @@ -74,6 +75,7 @@ while ( my $b = $borrowers_rs->next ) { surname => $b->surname // '', firstname => $b->firstname // '', cardnumber => $b->cardnumber // '', + dateofbirth => format_sqldatetime($b->dateofbirth, undef, undef, 1) // '', address => $b->address // '', city => $b->city // '', zipcode => $b->zipcode // '', diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search-box.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search-box.inc index 87f1969..87555a5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search-box.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search-box.inc @@ -14,7 +14,7 @@ $(document).ready(function(){ .data( "ui-autocomplete" )._renderItem = function( ul, item ) { return $( "
  • " ) .data( "ui-autocomplete-item", item ) - .append( "" + item.surname + ", " + item.firstname + " (" + item.cardnumber + ") " + item.address + " " + item.city + " " + item.zipcode + " " + item.country + "" ) + .append( "" + item.surname + ", " + item.firstname + " (" + item.cardnumber + ") " + item.dateofbirth + " " + item.address + " " + item.city + " " + item.zipcode + " " + item.country + "" ) .appendTo( ul ); }; -- 1.7.10.4