From b22a847d76928aa6cd05827b495f74aa3fecf554 Mon Sep 17 00:00:00 2001 From: Len Kranendonk Date: Fri, 28 Feb 2003 15:51:47 +0000 Subject: [PATCH] didn't work with new Macro::Process --- lib/WebGUI/Macro/L_loginBox.pm | 61 +++++++++++++++++----------------- 1 file changed, 31 insertions(+), 30 deletions(-) diff --git a/lib/WebGUI/Macro/L_loginBox.pm b/lib/WebGUI/Macro/L_loginBox.pm index 5caf46fa6..41a402fa7 100644 --- a/lib/WebGUI/Macro/L_loginBox.pm +++ b/lib/WebGUI/Macro/L_loginBox.pm @@ -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 = '
'; if ($session{user}{userId} != 1) { - $text = $param[1]; - if (not defined $text){ - $temp .= WebGUI::International::get(48); - $temp .= ' '.$session{user}{username}.'. '; - $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 .= ' '.$session{user}{username}.'. '; + $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(''.WebGUI::International::get(50).'
'); + $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(''.WebGUI::International::get(50).'
'); $f->text("username",'','','','','',$boxSize); - $f->raw('
'.WebGUI::International::get(51).'
'); + $f->raw('
'.WebGUI::International::get(51).'
'); $f->password("identifier",'','','','','',$boxSize); - $f->raw('
'); - $f->submit(WebGUI::International::get(52)); - $temp .= $f->print; - if ($session{setting}{anonymousRegistration}) { - $temp .= ''.WebGUI::International::get(407).''; - } + $f->raw('
'); + $f->submit(WebGUI::International::get(52)); + $temp .= $f->print; + if ($session{setting}{anonymousRegistration}) { + $temp .= ''.WebGUI::International::get(407).''; + } } $temp .= '
'; - return $temp; + return $temp; } 1;