bug 5326 fix link to old prefs editor on patron attributes
[koha.git] / members / borrowers_details.pl
blobc861ad42c6b82b35b38248f252011cc8b2dbbeee
1 #!/usr/bin/perl
2 # NOTE: This file uses standard 8-space tabs
3 # DO NOT SET TAB SIZE TO 4
6 #script to set up screen for modification of borrower details
7 #written 20/12/99 by chris@katipo.co.nz
10 # Copyright 2000-2002 Katipo Communications
12 # This file is part of Koha.
14 # Koha is free software; you can redistribute it and/or modify it under the
15 # terms of the GNU General Public License as published by the Free Software
16 # Foundation; either version 2 of the License, or (at your option) any later
17 # version.
19 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
20 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
21 # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
23 # You should have received a copy of the GNU General Public License along
24 # with Koha; if not, write to the Free Software Foundation, Inc.,
25 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
27 use strict;
28 #use warnings; FIXME - Bug 2505
29 use CGI;
30 use C4::Auth;
31 use C4::Context;
32 use C4::Output;
33 use C4::Members;
34 use C4::Koha;
35 use C4::Dates qw(format_date);
36 use C4::Input;
37 use C4::Log;
38 my $input = new CGI;
39 my $dbh = C4::Context->dbh;
40 my %data;
42 my ($template, $loggedinuser, $cookie)
43 = get_template_and_user({template_name => "members/borrowers_details.tmpl",
44 query => $input,
45 type => "intranet",
46 authnotrequired => 0,
47 flagsrequired => {borrowers => 1},
48 debug => 1,
49 });
51 my $data;
52 my $categorycode=$input->param('categorycode');
53 my $borrowernumber=$input->param('borrowernumber');
54 my $description=$input->param('description');
55 my $category_type=$input->param('category_type');
57 $data=GetMember('borrowernumber' => $borrowernumber);
59 $template->param( borrowernumber => $borrowernumber,#register number
60 #transform value in capital or capital for first letter of the word
61 firstname => ucfirst($data->{'firstname'}),
62 surname => uc($data->{'surname'}),
63 categorycode => $data->{'categorycode'},
64 title => $data->{'title'},
65 category_type => $data->{'category_type'},
66 "title_".$data->{'title'} => " SELECTED ",
67 dateofbirth => format_date($data->{'dateofbirth'}),
68 description => $data->{'description'}
70 $template->param(Institution => 1) if ($category_type eq "I");
71 output_html_with_http_headers $input, $cookie, $template->output;
73 # Local Variables:
74 # tab-width: 8
75 # End: