From 0815c61d9b29141daebeddd35d42dbc978814c2f Mon Sep 17 00:00:00 2001 From: JT Smith Date: Mon, 17 Oct 2005 13:59:50 +0000 Subject: [PATCH] fix [ 1216810 ] anonymous registration errors persist --- docs/changelog/6.x.x.txt | 1 + lib/WebGUI/Auth/WebGUI.pm | 10 +++++----- lib/WebGUI/TabForm.pm | 6 +----- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/docs/changelog/6.x.x.txt b/docs/changelog/6.x.x.txt index 6d53ce30d..f51928776 100644 --- a/docs/changelog/6.x.x.txt +++ b/docs/changelog/6.x.x.txt @@ -40,6 +40,7 @@ - fix [ 1216810 ] anonymous registration errors persist - fix [ 1327237 ] 6.7.5 Shortcuts - fix [ 1328105 ] Pages should contain "no-cache" tags + - fix [ 1216810 ] anonymous registration errors persist 6.7.6 diff --git a/lib/WebGUI/Auth/WebGUI.pm b/lib/WebGUI/Auth/WebGUI.pm index e63dc0567..509a5d00a 100644 --- a/lib/WebGUI/Auth/WebGUI.pm +++ b/lib/WebGUI/Auth/WebGUI.pm @@ -177,9 +177,9 @@ sub createAccount { } $vars->{'create.form.username'} = WebGUI::Form::text({"name"=>"authWebGUI.username","value"=>$session{form}{"authWebGUI.username"}}); $vars->{'create.form.username.label'} = WebGUI::International::get(50); - $vars->{'create.form.password'} = WebGUI::Form::password({"name"=>"authWebGUI.identifier","value"=>$session{form}{"authWebGUI.identifier"}}); + $vars->{'create.form.password'} = WebGUI::Form::password({"name"=>"authWebGUI.identifier"}); $vars->{'create.form.password.label'} = WebGUI::International::get(51); - $vars->{'create.form.passwordConfirm'} = WebGUI::Form::password({"name"=>"authWebGUI.identifierConfirm","value"=>$session{form}{"authWebGUI.identifierConfirm"}}); + $vars->{'create.form.passwordConfirm'} = WebGUI::Form::password({"name"=>"authWebGUI.identifierConfirm"}); $vars->{'create.form.passwordConfirm.label'} = WebGUI::International::get(2,'AuthWebGUI'); $vars->{'create.form.hidden'} = WebGUI::Form::hidden({"name"=>"confirm","value"=>$session{form}{confirm}}); $vars->{'recoverPassword.isAllowed'} = $self->getSetting("passwordRecovery"); @@ -199,14 +199,14 @@ sub createAccountSave { my $passConfirm = $session{form}{'authWebGUI.identifierConfirm'}; my $error = $self->error if(!$self->validUsername($username)); - $error.= $self->error if(!$self->_isValidPassword($password,$passConfirm)); - my ($profile, $temp, $warning) = WebGUI::Operation::Profile::validateProfileData(); - $error .= $temp; if ($session{setting}{webguiUseCaptcha}) { unless ($session{form}{'authWebGUI.captcha.validation'} eq Digest::MD5::md5_base64(lc($session{form}{'authWebGUI.captcha'}))) { $error .= WebGUI::International::get("captcha failure","AuthWebGUI"); } } + $error.= $self->error if(!$self->_isValidPassword($password,$passConfirm)); + my ($profile, $temp, $warning) = WebGUI::Operation::Profile::validateProfileData(); + $error .= $temp; return $self->createAccount($error) unless ($error eq ""); diff --git a/lib/WebGUI/TabForm.pm b/lib/WebGUI/TabForm.pm index 7eda4d2d9..ce28c77f1 100644 --- a/lib/WebGUI/TabForm.pm +++ b/lib/WebGUI/TabForm.pm @@ -186,10 +186,6 @@ A string containing the link to the tab-CascadingStyleSheet default = extrasPath.'/tabs/tabs.css' -=head3 cancelUrl - -A URL to go to when the cancel button is pressed. - =cut sub new { @@ -207,7 +203,7 @@ sub new { } my $cancel = WebGUI::Form::button({ value=>WebGUI::International::get('cancel'), - extras=>q|onclick="location.href='|.$cancelUrl.q|'"| + extras=>q|onclick="history.go(-1);"| }); bless { _uiLevelOverride=>$uiLevelOverride, _cancel=>$cancel, _submit=>WebGUI::Form::submit(), _form=>WebGUI::Form::formHeader(), _hidden=>"", _tab=>\%tabs, _css=>$css }, $class; }