[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha newjmember.pl,1.4,1.5 newmember.pl,1.3,1.4
From: |
Henri-Damien LAURENT |
Subject: |
[Koha-cvs] CVS: koha newjmember.pl,1.4,1.5 newmember.pl,1.3,1.4 |
Date: |
Wed, 18 Dec 2002 08:58:31 -0800 |
Update of /cvsroot/koha/koha
In directory sc8-pr-cvs1:/tmp/cvs-serv4049
Modified Files:
newjmember.pl newmember.pl
Log Message:
Templating newmember.pl
newjmember.tmpl bugfixes
Index: newjmember.pl
===================================================================
RCS file: /cvsroot/koha/koha/newjmember.pl,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** newjmember.pl 17 Dec 2002 12:33:54 -0000 1.4
--- newjmember.pl 18 Dec 2002 16:58:28 -0000 1.5
***************
*** 119,121 ****
string =>
$string);
! print "Content-Type:Text/html\n\n",$template->output;
--- 119,121 ----
string =>
$string);
! print "Content-Type: text/html\n\n", $template->output;
Index: newmember.pl
===================================================================
RCS file: /cvsroot/koha/koha/newmember.pl,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** newmember.pl 13 Oct 2002 07:51:44 -0000 1.3
--- newmember.pl 18 Dec 2002 16:58:28 -0000 1.4
***************
*** 5,8 ****
--- 5,9 ----
#script to print confirmation screen, then if accepted calls itself to insert
data
# FIXME - Yes, but what does it _do_?
+ # 2002/12/18 address@hidden templating
# Copyright 2000-2002 Katipo Communications
***************
*** 28,31 ****
--- 29,33 ----
use CGI;
use Date::Manip;
+ use HTML::Template;
my %env;
***************
*** 41,47 ****
$data{$key}=$input->param($key);
}
! print $input->header;
! print startpage();
! print startmenu('member');
my $main="#99cc33";
my $image="/images/background-mem.gif";
--- 43,51 ----
$data{$key}=$input->param($key);
}
!
! my $template = gettemplate("newmember.tmpl");
! #print $input->header;
! #print startpage();
! #print startmenu('member');
my $main="#99cc33";
my $image="/images/background-mem.gif";
***************
*** 88,95 ****
}
#we are printing confirmation page
! print mkheadr(1,'Confirm Record');
if ($ok ==0){
- print mktablehdr;
- print mktablerow(2,$main,bold('NEW MEMBER'),"",$image);
my $name=$data{'title'}." ";
if ($data{'othernames'} ne ''){
--- 92,98 ----
}
#we are printing confirmation page
! $template->param( OK=> ($ok==0),
! string=>
$string);
if ($ok ==0){
my $name=$data{'title'}." ";
if ($data{'othernames'} ne ''){
***************
*** 99,134 ****
}
$name.="$data{'surname'} ( $data{'firstname'}, $data{'initials'})";
! print mktablerow(2,'white',bold('Name'),$name);
! print mktablerow(2,$main,bold('MEMBERSHIP DETAILS'),"",$image);
! print mktablerow(2,'white',bold('Membership
Number'),$data{'borrowernumber'});
! print mktablerow(2,'white',bold('Cardnumber'),$data{'cardnumber'});
! print mktablerow(2,'white',bold('Membership
Category'),$data{'categorycode'});
! print mktablerow(2,'white',bold('Area'),$data{'area'});
! print mktablerow(2,'white',bold('Fee'),$data{'fee'});
if ($data{'joining'} eq ''){
$data{'joining'}=ParseDate('today');
$data{'joining'}=&UnixDate($data{'joining'},'%Y-%m-%d');
}
- print mktablerow(2,'white',bold('Joining Date'),$data{'joining'});
if ($data{'expiry'} eq ''){
$data{'expiry'}=ParseDate('in 1 year');
$data{'expiry'}=&UnixDate($data{'expiry'},'%Y-%m-%d');
}
- print mktablerow(2,'white',bold('Expiry Date'),$data{'expiry'});
- print mktablerow(2,'white',bold('Joining Branch'),$data{'joinbranch'});
- print mktablerow(2,$main,bold('PERSONAL DETAILS'),"",$image);
my $ethnic=$data{'ethnicity'}." ".$data{'ethnicnotes'};
- print mktablerow(2,'white',bold('Ethnicity'),$ethnic);
- $data{'dateofbirth'}=ParseDate($data{'dateofbirth'});
- $data{'dateofbirth'}=UnixDate($data{'dateofbirth'},'%Y-%m-%d');
- print mktablerow(2,'white',bold('Date of Birth'),$data{'dateofbirth'});
- my $sex;
- if ($data{'sex'} eq 'M'){
- $sex="Male";
- } else {
- $sex="Female";
- }
- print mktablerow(2,'white',bold('Sex'),$sex);
- print mktablerow(2,$main,bold('MEMBER ADDRESS'),"",$image);
my $postal=$data{'address'}."<br>".$data{'city'};
my $home;
--- 102,120 ----
}
$name.="$data{'surname'} ( $data{'firstname'}, $data{'initials'})";
! my $sex;
! if ($data{'sex'} eq 'M'){
! $sex="Male";
! } else {
! $sex="Female";
! }
if ($data{'joining'} eq ''){
$data{'joining'}=ParseDate('today');
$data{'joining'}=&UnixDate($data{'joining'},'%Y-%m-%d');
}
if ($data{'expiry'} eq ''){
$data{'expiry'}=ParseDate('in 1 year');
$data{'expiry'}=&UnixDate($data{'expiry'},'%Y-%m-%d');
}
my $ethnic=$data{'ethnicity'}." ".$data{'ethnicnotes'};
my $postal=$data{'address'}."<br>".$data{'city'};
my $home;
***************
*** 138,176 ****
$home=$postal;
}
! print mktablerow(2,'white',bold('Postal Address'),$postal);
! print mktablerow(2,'white',bold('Home Address'),$home);
! print mktablerow(2,$main,bold('MEMBER CONTACT DETAILS'),"",$image);
! print mktablerow(2,'white',bold('Phone (Home)'),$data{'phone'});
! print mktablerow(2,'white',bold('Phone (Daytime)'),$data{'phoneday'});
! print mktablerow(2,'white',bold('Fax'),$data{'faxnumber'});
! print mktablerow(2,'white',bold('Email'),$data{'emailaddress'});
! print mktablerow(2,$main,bold('ALTERNATIVE CONTACT DETAILS'),"",$image);
! print mktablerow(2,'white',bold('Name'),$data{'contactname'});
! print mktablerow(2,'white',bold('Phone'),$data{'altphone'});
! print mktablerow(2,'white',bold('Relationship'),$data{'altrelationship'});
! print mktablerow(2,'white',bold('Notes'),$data{'altnotes'});
! print mktablerow(2,$main,bold('Notes'),"",$image);
! print mktablerow(2,'white',bold('General Notes'),$data{'borrowernotes'});
!
! print mktableft;
! #set up form to post data thru for modification or insertion
! my $i=0;
! my @inputs;
while (my ($key, $value) = each %data) {
$value=~ s/\"/%22/g;
! $inputs[$i]=["hidden","$key","$value"];
! $i++;
! }
! $inputs[$i]=["submit","submit","submit"];
! print mkformnotable("/cgi-bin/koha/insertdata.pl",@inputs);
! } else {
! print $string;
}
! }
! #print $input->dump;
- print mktablehdr;
- print mktableft;
- print endmenu('member');
- print endpage();
--- 124,162 ----
$home=$postal;
}
! my @inputsloop;
while (my ($key, $value) = each %data) {
$value=~ s/\"/%22/g;
! my %line;
! $line{'key'}=$key;
! $line{'value'}=$value;
! push(@inputsloop, \%line);
! }
!
! $template->param(name => $name,
! bornum
=> $data{'borrowernumber'},
! cardnum
=> $data{'cardnumber'},
! memcat
=> $data{'categorycode'},
! area =>
$data{'area'},
! fee =>
$data{'fee'},
!
joindate => $data{'joining'},
! expdate
=> $data{'expiry'},
!
joinbranch => $data{'joinbranch'},
! ethnic
=> $ethnic,
! dob =>
$data{'dateofbirth'},
! sex =>
$sex,
! postal
=> $postal,
! home =>
$home,
! phone
=> $data{'phone'},
!
phoneday => $data{'phoneday'},
!
faxnumber => $data{'faxnumber'},
!
emailaddress => $data{'emailaddress'},
!
contactname => $data{'contactname'},
!
altphone => $data{'altphone'},
!
altrelationship => $data{'altrelationship'},
!
altnotes => $data{'altnotes'},
!
bornotes => $data{'borrowernotes'},
!
inputsloop => address@hidden);
}
! print "Content-Type: text/html\n\n", $template->output;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha newjmember.pl,1.4,1.5 newmember.pl,1.3,1.4,
Henri-Damien LAURENT <=
- Prev by Date:
[Koha-cvs] CVS: koha/koha-tmpl/intranet-tmpl/default/en/acqui.simple addbiblio.tmpl,1.5,1.6
- Next by Date:
[Koha-cvs] CVS: koha/koha-tmpl/intranet-tmpl/default/en newmember.tmpl,NONE,1.1 newjmember.tmpl,1.1,1.2
- Previous by thread:
[Koha-cvs] CVS: koha/koha-tmpl/intranet-tmpl/default/en/acqui.simple addbiblio.tmpl,1.5,1.6
- Next by thread:
[Koha-cvs] CVS: koha/koha-tmpl/intranet-tmpl/default/en newmember.tmpl,NONE,1.1 newjmember.tmpl,1.1,1.2
- Index(es):