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