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
30 use C4::Interface::CGI::Output;
34 my ($template, $loggedinuser, $cookie)
35 = get_template_and_user({template_name => "members/jmemberentry.tmpl",
39 flagsrequired => {borrowers => 1},
43 my $member=$input->param('bornum');
45 $member=NewBorrowerNumber();
47 my $type=$input->param('type');
49 my $data=borrdata('',$member);
51 my @titles = ('Miss', 'Mrs', 'Ms', 'Mr', 'Dr', 'Sir');
52 # FIXME - Assumes English. This ought to be made part of i18n.
55 my $title = shift @titles;
56 my %row = ('title' => $title);
57 if ($data->{'title'} eq $title) {
58 $row{'selected'}=' selected';
62 push(@titledata, \%row);
65 # get the data for children
66 my $cmember1=NewBorrowerNumber();
68 for (my $i=0;$i<3;$i++){
70 $row{'cmember'}=$cmember1+$i;
73 push(@cmemdata, \%row);
77 $template->param( startmenumember => join('', startmenu('member')),
78 endmenumember => join('', endmenu('member')),
79 endmenumember => endmenu('member'),
81 firstname => $data->{'firstname'},
82 surname => $data->{'surname'},
83 cardnumber => $data->{'cardnumber'},
84 area => $data->{'area'},
85 city => $data->{'city'},
86 address => $data->{'address'},
87 streetaddress => $data->{'streetaddress'},
88 streetcity => $data->{'streetcity'},
89 phone => $data->{'phone'},
90 phoneday => $data->{'phoneday'},
91 faxnumber => $data->{'faxnumber'},
92 emailaddress => $data->{'emailaddress'},
93 contactname => $data->{'contactname'},
94 altphone => $data->{'altphone'},
95 titleloop => \@titledata,
96 cmemloop => \@cmemdata );
98 output_html_with_http_headers $input, $cookie, $template->output;