[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb:[2886] trunk



Revision: 2886
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=2886&view=rev
Author:   einhverfr
Date:     2010-02-10 22:57:09 +0000 (Wed, 10 Feb 2010)

Log Message:
-----------
Beginning of logout code, new templates for info

Modified Paths:
--------------
    trunk/scripts/login.pl

Added Paths:
-----------
    trunk/UI/info.html
    trunk/UI/logout.html

Added: trunk/UI/info.html
===================================================================
--- trunk/UI/info.html	                        (rev 0)
+++ trunk/UI/info.html	2010-02-10 22:57:09 UTC (rev 2886)
@@ -0,0 +1,8 @@
+<?lsmb INCLUDE 'ui-header.html' 
+	titlebar = "LedgerSMB $VERSION"
+?>
+<?lsmb PROCESS elements.html ?>
+<body>
+<h2 class="info"><?lsmb message ?></h2>
+</body>
+</html>

Added: trunk/UI/logout.html
===================================================================
--- trunk/UI/logout.html	                        (rev 0)
+++ trunk/UI/logout.html	2010-02-10 22:57:09 UTC (rev 2886)
@@ -0,0 +1,6 @@
+<?lsmb INCLUDE 'ui-header.html' include_scripts = scripts ?> 
+<?lsmb PROCESS elements.html ?> 
+<body>
+<h1 class="info">Logout Successful</h1>
+</body>
+</html>

Modified: trunk/scripts/login.pl
===================================================================
--- trunk/scripts/login.pl	2010-02-10 22:33:58 UTC (rev 2885)
+++ trunk/scripts/login.pl	2010-02-10 22:57:09 UTC (rev 2886)
@@ -88,12 +88,18 @@
 
 sub logout {
     my ($request) = @_;
+    @{$request->{scripts}} = qw(ie_logout.js moz_logout.js);
     $request->{callback}   = "";
     $request->{endsession} = 1;
     LedgerSMB::Auth::session_destroy($request);
-    print "Location: login.pl\n";
-    print "Content-type: text/html\n\n";
-    exit;
+     my $template = LedgerSMB::Template->new(
+        user =>$request->{_user}, 
+        locale => $request->{_locale},
+        path => 'UI',
+        template => 'logout',
+        format => 'HTML'
+    );
+    $template->render($request);
 }
 
 sub continue {


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.