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
24 # with Koha; if not, write to the Free Software Foundation, Inc.,
25 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
28 #use warnings; FIXME - Bug 2505
35 use C4
::Dates
qw(format_date);
39 my $dbh = C4
::Context
->dbh;
42 my ($template, $loggedinuser, $cookie)
43 = get_template_and_user
({template_name
=> "members/borrowers_details.tmpl",
47 flagsrequired
=> {borrowers
=> 1},
52 my $categorycode=$input->param('categorycode');
53 my $borrowernumber=$input->param('borrowernumber');
54 my $description=$input->param('description');
55 my $category_type=$input->param('category_type');
57 $data=GetMember
('borrowernumber' => $borrowernumber);
59 $template->param( borrowernumber
=> $borrowernumber,#register number
60 #transform value in capital or capital for first letter of the word
61 firstname
=> ucfirst($data->{'firstname'}),
62 surname
=> uc($data->{'surname'}),
63 categorycode
=> $data->{'categorycode'},
64 title
=> $data->{'title'},
65 category_type
=> $data->{'category_type'},
66 "title_".$data->{'title'} => " SELECTED ",
67 dateofbirth
=> format_date
($data->{'dateofbirth'}),
68 description
=> $data->{'description'}
70 $template->param(Institution
=> 1) if ($category_type eq "I");
71 output_html_with_http_headers
$input, $cookie, $template->output;