From b0a92688aa0280c8614c8b173691045798a1767e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Thu, 20 Dec 2007 14:04:41 +0000 Subject: [PATCH] Fehler etwas abgefedert bei falschem/fehlendem Login. (Wie sieht denn das aus, sofort die nackte Fehlermeldung zu kriegen....) --- bin/mozilla/login.pl | 15 +++++++++------ templates/webpages/login/login_screen_de.html | 5 +++++ templates/webpages/login/login_screen_master.html | 5 +++++ 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/bin/mozilla/login.pl b/bin/mozilla/login.pl index b9a29c3ed..06e95fa14 100644 --- a/bin/mozilla/login.pl +++ b/bin/mozilla/login.pl @@ -64,11 +64,13 @@ if ($form->{action}) { sub login_screen { $lxdebug->enter_sub(); + my ($msg) = @_; if (-f "css/lx-office-erp.css") { $form->{stylesheet} = "lx-office-erp.css"; } + $form->{msg} = $msg; $form->{fokus} = "loginscreen.login"; $form->header; @@ -80,17 +82,18 @@ sub login_screen { sub login { $lxdebug->enter_sub(); - $form->error($locale->text('You did not enter a name!')) unless ($form->{login}); + unless ($form->{login}) { + login_screen($locale->text('You did not enter a name!')); + exit; + } $user = new User $memberfile, $form->{login}; # if we get an error back, bale out if (($result = $user->login(\%$form, $userspath)) <= -1) { - if ($result == -2) { - exit; - } - - $form->error($locale->text('Incorrect username or password!')); + exit if $result == -2; + login_screen($locale->text('Incorrect username or password!')); + exit; } my %style_to_script_map = ( 'v3' => 'v3', diff --git a/templates/webpages/login/login_screen_de.html b/templates/webpages/login/login_screen_de.html index 400036250..6dc00f791 100644 --- a/templates/webpages/login/login_screen_de.html +++ b/templates/webpages/login/login_screen_de.html @@ -27,6 +27,11 @@ +[%- IF msg %] +
+ [% msg %] +
+[%- END %]
diff --git a/templates/webpages/login/login_screen_master.html b/templates/webpages/login/login_screen_master.html index db6eb83dd..310668479 100644 --- a/templates/webpages/login/login_screen_master.html +++ b/templates/webpages/login/login_screen_master.html @@ -27,6 +27,11 @@ +[%- IF msg %] +
+ [% msg %] +
+[%- END %]
-- 2.20.1