[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb: [587] trunk/bin/admin.pl
- Subject: SF.net SVN: ledger-smb: [587] trunk/bin/admin.pl
- From: ..hidden..
- Date: Mon, 13 Nov 2006 22:40:49 -0800
Revision: 587
http://svn.sourceforge.net/ledger-smb/?rev=587&view=rev
Author: christopherm
Date: 2006-11-13 22:40:49 -0800 (Mon, 13 Nov 2006)
Log Message:
-----------
When the user enters an incorrect password, they're redirect to the login screen again with an 'Access Denied' message instead of the ugly input field only.
Modified Paths:
--------------
trunk/bin/admin.pl
Modified: trunk/bin/admin.pl
===================================================================
--- trunk/bin/admin.pl 2006-11-14 06:33:40 UTC (rev 586)
+++ trunk/bin/admin.pl 2006-11-14 06:40:49 UTC (rev 587)
@@ -85,6 +85,8 @@
sub adminlogin {
+ my ($errorMessage) = @_;
+
$form->{title} = qq|LedgerSMB $form->{version} |.$locale->text('Administration');
$myheaderadd = qq|
@@ -114,12 +116,19 @@
<input type="hidden" name="action" value="login" />
<input type="hidden" name="path" value="$form->{path}" />
</form>
+ |;
+ if($errorMessage){
+ print qq|<p><span style="font-weight:bold; color:red;">$errorMessage</span></p><br />|;
+ }
+
+ print qq|
+ <br /><br />
<p><a href="login.pl"
>|.$locale->text("Application Login").qq|</a></p>
-
- <a href="http://www.ledgersmb.org/">|.$locale->text('LedgerSMB website').qq|</a>
+ <br /><br />
+ <a style="font-size: 0.8em;" href="http://www.ledgersmb.org/">|.$locale->text('LedgerSMB website').qq|</a>
</div>
</body>
</html>
@@ -930,7 +939,7 @@
$form->{callback} .= "&password=$form->{password}" if $form->{callback};
if ($root->{password} ne (Digest::MD5::md5_hex $form->{password}) ) {
- &getpassword;
+ &adminlogin($locale->text('Access Denied!'));
exit;
}
else{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.