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;
36 my ($template, $loggedinuser, $cookie)
37 = get_template_and_user({template_name => "members/jmemberentry.tmpl",
41 flagsrequired => {borrowers => 1},
45 my $member=$input->param('bornum');
47 $member=NewBorrowerNumber();
49 my $type=$input->param('type');
51 my $data=borrdata('',$member);
53 my @titles = ('Miss', 'Mrs', 'Ms', 'Mr', 'Dr', 'Sir');
54 # FIXME - Assumes English. This ought to be made part of i18n.
57 my $title = shift @titles;
58 my %row = ('title' => $title);
59 if ($data->{'title'} eq $title) {
60 $row{'selected'}=' selected';
64 push(@titledata, \%row);
67 # get the data for children
68 my $cmember1=NewBorrowerNumber();
70 for (my $i=0;$i<1;$i++){
72 $row{'cmember'}=$cmember1+$i;
75 push(@cmemdata, \%row);
78 my $jcardnumber=C4::Members::fixup_cardnumber("");
80 $template->param( member => $member,
81 firstname => $data->{'firstname'},
82 surname => $data->{'surname'},
83 cardnumber => $data->{'cardnumber'},
84 jcardnumber => $jcardnumber,
85 area => $data->{'area'},
86 city => $data->{'city'},
87 physstreet => $data->{'physstreet'},
88 streetaddress => $data->{'streetaddress'},
89 streetcity => $data->{'streetcity'},
90 phone => $data->{'phone'},
91 phoneday => $data->{'phoneday'},
92 faxnumber => $data->{'faxnumber'},
93 emailaddress => $data->{'emailaddress'},
94 contactname => $data->{'contactname'},
95 altphone => $data->{'altphone'},
96 dateformat => display_date_format(),
97 titleloop => \@titledata,
98 cmemloop => \@cmemdata );
101 output_html_with_http_headers $input, $cookie, $template->output;