3 #script to set up screen for modification of borrower details
4 #written 20/12/99 by chris@katipo.co.nz
7 # Copyright 2000-2002 Katipo Communications
9 # This file is part of Koha.
11 # Koha is free software; you can redistribute it and/or modify it under the
12 # terms of the GNU General Public License as published by the Free Software
13 # Foundation; either version 2 of the License, or (at your option) any later
16 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
17 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
18 # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
20 # You should have received a copy of the GNU General Public License along with
21 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
22 # Suite 330, Boston, MA 02111-1307 USA
33 my ($template, $loggedinuser, $cookie)
34 = get_template_and_user({template_name => "members/jmemberentry.tmpl",
38 flagsrequired => {borrowers => 1},
42 my $member=$input->param('bornum');
44 $member=NewBorrowerNumber();
46 my $type=$input->param('type');
48 my $data=borrdata('',$member);
50 my @titles = ('Miss', 'Mrs', 'Ms', 'Mr', 'Dr', 'Sir');
51 # FIXME - Assumes English. This ought to be made part of i18n.
54 my $title = shift @titles;
55 my %row = ('title' => $title);
56 if ($data->{'title'} eq $title) {
57 $row{'selected'}=' selected';
61 push(@titledata, \%row);
64 # get the data for children
65 my $cmember1=NewBorrowerNumber();
67 for (my $i=0;$i<3;$i++){
69 $row{'cmember'}=$cmember1+$i;
72 push(@cmemdata, \%row);
76 $template->param( startmenumember => join('', startmenu('member')),
77 endmenumember => join('', endmenu('member')),
78 endmenumember => endmenu('member'),
80 firstname => $data->{'firstname'},
81 surname => $data->{'surname'},
82 cardnumber => $data->{'cardnumber'},
83 area => $data->{'area'},
84 city => $data->{'city'},
85 address => $data->{'address'},
86 streetaddress => $data->{'streetaddress'},
87 streetcity => $data->{'streetcity'},
88 phone => $data->{'phone'},
89 phoneday => $data->{'phoneday'},
90 faxnumber => $data->{'faxnumber'},
91 emailaddress => $data->{'emailaddress'},
92 contactname => $data->{'contactname'},
93 altphone => $data->{'altphone'},
94 titleloop => \@titledata,
95 cmemloop => \@cmemdata );
97 output_html_with_http_headers $input, $cookie, $template->output;