Revision b0a92688
Von Sven Schöling vor fast 17 Jahren hinzugefügt
bin/mozilla/login.pl | ||
---|---|---|
64 | 64 |
|
65 | 65 |
sub login_screen { |
66 | 66 |
$lxdebug->enter_sub(); |
67 |
my ($msg) = @_; |
|
67 | 68 |
|
68 | 69 |
if (-f "css/lx-office-erp.css") { |
69 | 70 |
$form->{stylesheet} = "lx-office-erp.css"; |
70 | 71 |
} |
71 | 72 |
|
73 |
$form->{msg} = $msg; |
|
72 | 74 |
$form->{fokus} = "loginscreen.login"; |
73 | 75 |
$form->header; |
74 | 76 |
|
... | ... | |
80 | 82 |
sub login { |
81 | 83 |
$lxdebug->enter_sub(); |
82 | 84 |
|
83 |
$form->error($locale->text('You did not enter a name!')) unless ($form->{login}); |
|
85 |
unless ($form->{login}) { |
|
86 |
login_screen($locale->text('You did not enter a name!')); |
|
87 |
exit; |
|
88 |
} |
|
84 | 89 |
|
85 | 90 |
$user = new User $memberfile, $form->{login}; |
86 | 91 |
|
87 | 92 |
# if we get an error back, bale out |
88 | 93 |
if (($result = $user->login(\%$form, $userspath)) <= -1) { |
89 |
if ($result == -2) { |
|
90 |
exit; |
|
91 |
} |
|
92 |
|
|
93 |
$form->error($locale->text('Incorrect username or password!')); |
|
94 |
exit if $result == -2; |
|
95 |
login_screen($locale->text('Incorrect username or password!')); |
|
96 |
exit; |
|
94 | 97 |
} |
95 | 98 |
|
96 | 99 |
my %style_to_script_map = ( 'v3' => 'v3', |
templates/webpages/login/login_screen_de.html | ||
---|---|---|
27 | 27 |
</tr> |
28 | 28 |
</table> |
29 | 29 |
|
30 |
[%- IF msg %] |
|
31 |
<br> |
|
32 |
<b>[% msg %]</b> |
|
33 |
<br> |
|
34 |
[%- END %] |
|
30 | 35 |
<br> |
31 | 36 |
<input type="submit" name="action" value="Anmeldung" tabindex="3"> |
32 | 37 |
|
templates/webpages/login/login_screen_master.html | ||
---|---|---|
27 | 27 |
</tr> |
28 | 28 |
</table> |
29 | 29 |
|
30 |
[%- IF msg %] |
|
31 |
<br> |
|
32 |
<b>[% msg %]</b> |
|
33 |
<br> |
|
34 |
[%- END %] |
|
30 | 35 |
<br> |
31 | 36 |
<input type="submit" name="action" value="<translate>Login</translate>" tabindex="3"> |
32 | 37 |
|
Auch abrufbar als: Unified diff
Fehler etwas abgefedert bei falschem/fehlendem Login.
(Wie sieht denn das aus, sofort die nackte Fehlermeldung zu kriegen....)