didn't work with new Macro::Process
This commit is contained in:
parent
60f41a83b9
commit
b22a847d76
1 changed files with 31 additions and 30 deletions
|
|
@ -24,43 +24,44 @@ sub _createURL {
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
sub process {
|
sub process {
|
||||||
my ($temp,$boxSize,@param,$text,$f);
|
my ($temp,$boxSize,@param,$text,$f);
|
||||||
@param = WebGUI::Macro::getParams($_[0]);
|
my $debug;
|
||||||
|
@param = WebGUI::Macro::getParams($_[0]);
|
||||||
$temp = '<div class="loginBox">';
|
$temp = '<div class="loginBox">';
|
||||||
if ($session{user}{userId} != 1) {
|
if ($session{user}{userId} != 1) {
|
||||||
$text = $param[1];
|
$text = $param[1];
|
||||||
if (not defined $text){
|
if (not defined $text){
|
||||||
$temp .= WebGUI::International::get(48);
|
$temp .= WebGUI::International::get(48);
|
||||||
$temp .= ' <a href="'.WebGUI::URL::page('op=displayAccount').
|
$temp .= ' <a href="'.WebGUI::URL::page('op=displayAccount').
|
||||||
'">'.$session{user}{username}.'</a>. ';
|
'">'.$session{user}{username}.'</a>. ';
|
||||||
$temp .= WebGUI::International::get(49);
|
$temp .= WebGUI::International::get(49);
|
||||||
} else {
|
} else {
|
||||||
$text =~ s/%(.*?)%/_createURL($1)/ge;
|
$text =~ s/%(.*?)%/_createURL($1)/ge;
|
||||||
}
|
$temp .= $text;
|
||||||
$temp = WebGUI::Macro::process($temp);
|
}
|
||||||
} else {
|
} else {
|
||||||
$boxSize = $param[0];
|
$boxSize = $param[0];
|
||||||
if (not defined $boxSize) {
|
if (not defined $boxSize) {
|
||||||
$boxSize = 12;
|
$boxSize = 12;
|
||||||
}
|
}
|
||||||
if (index(lc($ENV{HTTP_USER_AGENT}),"msie") < 0) {
|
if (index(lc($ENV{HTTP_USER_AGENT}),"msie") < 0) {
|
||||||
$boxSize = int($boxSize=$boxSize*2/3);
|
$boxSize = int($boxSize=$boxSize*2/3);
|
||||||
}
|
}
|
||||||
$f = WebGUI::HTMLForm->new(1);
|
$f = WebGUI::HTMLForm->new(1);
|
||||||
$f->hidden("op","login");
|
$f->hidden("op","login");
|
||||||
$f->raw('<span class="formSubtext">'.WebGUI::International::get(50).'<br></span>');
|
$f->raw('<span class="formSubtext">'.WebGUI::International::get(50).'<br></span>');
|
||||||
$f->text("username",'','','','','',$boxSize);
|
$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->password("identifier",'','','','','',$boxSize);
|
||||||
$f->raw('<span class="formSubtext"><br></span>');
|
$f->raw('<span class="formSubtext"><br></span>');
|
||||||
$f->submit(WebGUI::International::get(52));
|
$f->submit(WebGUI::International::get(52));
|
||||||
$temp .= $f->print;
|
$temp .= $f->print;
|
||||||
if ($session{setting}{anonymousRegistration}) {
|
if ($session{setting}{anonymousRegistration}) {
|
||||||
$temp .= '<a href="'.WebGUI::URL::page('op=createAccount').'">'.WebGUI::International::get(407).'</a>';
|
$temp .= '<a href="'.WebGUI::URL::page('op=createAccount').'">'.WebGUI::International::get(407).'</a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$temp .= '</div>';
|
$temp .= '</div>';
|
||||||
return $temp;
|
return $temp;
|
||||||
}
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue