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;
35 my ($template, $loggedinuser, $cookie)
36 = get_template_and_user({template_name => "members/jmemberentry.tmpl",
40 flagsrequired => {borrowers => 1},
44 my $member=$input->param('bornum');
46 $member=NewBorrowerNumber();
48 my $type=$input->param('type');
50 my $data=borrdata('',$member);
52 my @titles = ('Miss', 'Mrs', 'Ms', 'Mr', 'Dr', 'Sir');
53 # FIXME - Assumes English. This ought to be made part of i18n.
56 my $title = shift @titles;
57 my %row = ('title' => $title);
58 if ($data->{'title'} eq $title) {
59 $row{'selected'}=' selected';
63 push(@titledata, \%row);
66 # get the data for children
67 my $cmember1=NewBorrowerNumber();
69 for (my $i=0;$i<3;$i++){
71 $row{'cmember'}=$cmember1+$i;
74 push(@cmemdata, \%row);
78 $template->param( member => $member,
79 firstname => $data->{'firstname'},
80 surname => $data->{'surname'},
81 cardnumber => $data->{'cardnumber'},
82 area => $data->{'area'},
83 city => $data->{'city'},
84 physstreet => $data->{'physstreet'},
85 streetaddress => $data->{'streetaddress'},
86 streetcity => $data->{'streetcity'},
87 phone => $data->{'phone'},
88 phoneday => $data->{'phoneday'},
89 faxnumber => $data->{'faxnumber'},
90 emailaddress => $data->{'emailaddress'},
91 contactname => $data->{'contactname'},
92 altphone => $data->{'altphone'},
93 dateformat => display_date_format(),
94 titleloop => \@titledata,
95 cmemloop => \@cmemdata );
98 output_html_with_http_headers $input, $cookie, $template->output;