didn't work with new Macro::Process

This commit is contained in:
Len Kranendonk 2003-02-28 15:51:47 +00:00
parent 60f41a83b9
commit b22a847d76

View file

@ -24,43 +24,44 @@ sub _createURL {
#-------------------------------------------------------------------
sub process {
my ($temp,$boxSize,@param,$text,$f);
@param = WebGUI::Macro::getParams($_[0]);
my ($temp,$boxSize,@param,$text,$f);
my $debug;
@param = WebGUI::Macro::getParams($_[0]);
$temp = '<div class="loginBox">';
if ($session{user}{userId} != 1) {
$text = $param[1];
if (not defined $text){
$temp .= WebGUI::International::get(48);
$temp .= ' <a href="'.WebGUI::URL::page('op=displayAccount').
'">'.$session{user}{username}.'</a>. ';
$temp .= WebGUI::International::get(49);
} else {
$text =~ s/%(.*?)%/_createURL($1)/ge;
}
$temp = WebGUI::Macro::process($temp);
$text = $param[1];
if (not defined $text){
$temp .= WebGUI::International::get(48);
$temp .= ' <a href="'.WebGUI::URL::page('op=displayAccount').
'">'.$session{user}{username}.'</a>. ';
$temp .= WebGUI::International::get(49);
} else {
$text =~ s/%(.*?)%/_createURL($1)/ge;
$temp .= $text;
}
} else {
$boxSize = $param[0];
if (not defined $boxSize) {
$boxSize = 12;
}
if (index(lc($ENV{HTTP_USER_AGENT}),"msie") < 0) {
$boxSize = int($boxSize=$boxSize*2/3);
}
$f = WebGUI::HTMLForm->new(1);
$f->hidden("op","login");
$f->raw('<span class="formSubtext">'.WebGUI::International::get(50).'<br></span>');
$boxSize = $param[0];
if (not defined $boxSize) {
$boxSize = 12;
}
if (index(lc($ENV{HTTP_USER_AGENT}),"msie") < 0) {
$boxSize = int($boxSize=$boxSize*2/3);
}
$f = WebGUI::HTMLForm->new(1);
$f->hidden("op","login");
$f->raw('<span class="formSubtext">'.WebGUI::International::get(50).'<br></span>');
$f->text("username",'','','','','',$boxSize);
$f->raw('<span class="formSubtext"><br>'.WebGUI::International::get(51).'<br></span>');
$f->raw('<span class="formSubtext"><br>'.WebGUI::International::get(51).'<br></span>');
$f->password("identifier",'','','','','',$boxSize);
$f->raw('<span class="formSubtext"><br></span>');
$f->submit(WebGUI::International::get(52));
$temp .= $f->print;
if ($session{setting}{anonymousRegistration}) {
$temp .= '<a href="'.WebGUI::URL::page('op=createAccount').'">'.WebGUI::International::get(407).'</a>';
}
$f->raw('<span class="formSubtext"><br></span>');
$f->submit(WebGUI::International::get(52));
$temp .= $f->print;
if ($session{setting}{anonymousRegistration}) {
$temp .= '<a href="'.WebGUI::URL::page('op=createAccount').'">'.WebGUI::International::get(407).'</a>';
}
}
$temp .= '</div>';
return $temp;
return $temp;
}
1;