For closed systems, still handle login through the modal
authorArt Cancro <ajc@citadel.org>
Tue, 11 Jan 2011 16:42:01 +0000 (11:42 -0500)
committerWilfried Goesgens <dothebart@citadel.org>
Sun, 4 Sep 2011 13:54:10 +0000 (13:54 +0000)
webcit/auth.c
webcit/static/styles/login.css
webcit/static/t/login.html
webcit/webcit.c

index 4d90105524f96d933b3bd3d9080febf30c2bc296..6d5d75706529e5713dbc215adf5b2dd5f87afc90 100644 (file)
@@ -1077,7 +1077,7 @@ InitModule_AUTH
        WebcitAddUrlHandler(HKEY("finalize_openid_login"), "", 0, finalize_openid_login, ANONYMOUS);
        WebcitAddUrlHandler(HKEY("openid_manual_create"), "", 0, openid_manual_create, ANONYMOUS);
        WebcitAddUrlHandler(HKEY("do_logout"), "", 0, do_logout, ANONYMOUS|COOKIEUNNEEDED|FORCE_SESSIONCLOSE);
-       WebcitAddUrlHandler(HKEY("ajax_login_username_password"), "", 0, ajax_login_username_password, AJAX);
+       WebcitAddUrlHandler(HKEY("ajax_login_username_password"), "", 0, ajax_login_username_password, AJAX|ANONYMOUS);
        WebcitAddUrlHandler(HKEY("validate"), "", 0, validate, 0);
        WebcitAddUrlHandler(HKEY("do_welcome"), "", 0, do_welcome, 0);
        WebcitAddUrlHandler(HKEY("display_reg"), "", 0, _display_reg, 0);
index 8de9516d41ef5cd3d20d4c5b9d9dd41ac54613fd..e90502b068ceb59f209b7427c126675260a1ccdc 100644 (file)
@@ -39,6 +39,7 @@
 #login_form br { clear: left }
 
 .login_infos {
+       bottom: 0;
        display: block;
        margin: 20px auto 0 auto;
        width: 80%;
index a138e2816a11a9ed2a38a79b75dc79e7ff815d23..22c3cc567fa5b1fbf1ab7a025db6e73105628f2b 100644 (file)
 <?!("COND:IMPMSG", 1)>
 <div class="login_message"><?IMPORTANTMESSAGE></div>
 <?!("X", 1)>
-<div class="login_image"><img src="image?name=hello" alt=""></div>
-<form action="login" method="POST"  class="box" id="login_form">
-<div>
-        <label for="uname"><?_("User name:")></label>
-        <input type="text" name="name" id="uname" > <br>
-        <label for="pname"><?_("Password:")></label>
-        <input type="password" name="pass" id="pname" > <br>
-        <label for="lname"><?_("Language:")></label>
-        <?LANG:SELECT> <br>
-</div>
-        <div class="logbuttons">
-        <input type="submit" name="login_action" value="<?_("Log in")>" class="button">
-       <??("COND:SERV:NEWU", 1)>
-        <input name="newuser_action" value="<?_("New User")>" class="button" type="submit">
-       <??("X", 1)>
-        <input type="submit" name="exit_action" value="<?_("Exit")>" class="button">
-        <br>
-        </div>
-</form>
-<?!("COND:SERV:OPENID", 3)>
-  <div id="openid" class="login_using_openid_link">
-  <a href="display_openid_login">
-  <img src="static/openid-small.gif" alt="" border="0" valign="middle">
-  <?_("Log in using OpenID")></a>
-  </div>
-<??("X", 3)>
-<div class="login_infos">
-<ul><li><b><?_("If you already have an account on")> <?SERV:HUMANNODE></b>,
-<?_("enter your user name and password and click &quot;Log in.&quot;")></li>
-<li><?_("<b>If you are a new user</b>, enter the name and password you wish to use, and click &quot;New User.&quot; ")></li>
-<li><?_("Please log off properly when finished. ")></li>
-<li><?_("See the")> <a href="http://www.citadel.org/doku.php/faq:everydayuse:webcit_browser"><?_("recommended browser list")></a> <?_("if you have trouble using Webcit.</li> <li>You must have <i>cookies</i> turned on. ")></li>
-<li><?_("Also keep in mind that if your browser is configured to block pop-up windows, you will not be able to receive any instant messages.")></li></ul>
+<div class="login_image"><img src="image?name=hello" alt="">
+<span class=\"button_link\"><a href="javascript:GetLoggedInFirst('do_welcome');"><?_("Log in")></a></span>
 </div>
 </div>
 <!-- end login.html -->
 <?=("endbox")>
+<script type="text/javascript">
+       GetLoggedInFirst('do_welcome');
+</script>
 <?=("trailing")>
index 3c094cd1e0c1fd1490640f4314a9e48419b1d5c4..5d213a5f0389bd036b7ebc3e92d175a240a10110 100644 (file)
@@ -511,7 +511,7 @@ void push_destination(void) {
 void pop_destination(void) {
        wcsession *WCC = WC;
 
-       if (!WCC) {
+       if ( (!WCC) || (WCC->PushedDestination == NULL) || (StrLength(WCC->PushedDestination) == 0) ) {
                do_welcome();
                return;
        }