2 # NOTE: This file uses standard 8-space tabs
3 # DO NOT SET TAB SIZE TO 4
6 #script to set up screen for modification of borrower details
7 #written 20/12/99 by chris@katipo.co.nz
10 # Copyright 2000-2002 Katipo Communications
12 # This file is part of Koha.
14 # Koha is free software; you can redistribute it and/or modify it under the
15 # terms of the GNU General Public License as published by the Free Software
16 # Foundation; either version 2 of the License, or (at your option) any later
19 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
20 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
21 # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
23 # You should have received a copy of the GNU General Public License along with
24 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
25 # Suite 330, Boston, MA 02111-1307 USA
34 use C4
::Dates
qw(format_date);
38 my $dbh = C4
::Context
->dbh;
41 my ($template, $loggedinuser, $cookie)
42 = get_template_and_user
({template_name
=> "members/borrowers_details.tmpl",
46 flagsrequired
=> {borrowers
=> 1},
51 my $categorycode=$input->param('categorycode');
52 my $borrowernumber=$input->param('borrowernumber');
53 my $description=$input->param('description');
54 my $category_type=$input->param('category_type');
56 $data=GetMember
($borrowernumber,'borrowernumber');
58 $template->param( borrowernumber
=> $borrowernumber,#register number
59 #transform value in capital or capital for first letter of the word
60 firstname
=> ucfirst($data->{'firstname'}),
61 surname
=> uc($data->{'surname'}),
62 categorycode
=> $data->{'categorycode'},
63 title
=> $data->{'title'},
64 category_type
=> $data->{'category_type'},
65 "title_".$data->{'title'} => " SELECTED ",
66 dateofbirth
=> format_date
($data->{'dateofbirth'}),
67 description
=> $data->{'description'}
69 $template->param(Institution
=> 1) if ($category_type eq "I");
70 output_html_with_http_headers
$input, $cookie, $template->output;