- modal.js: don't use a function pointer - simply name the function as the pointer.
- head.html: if we're not logged in, we add the login dialog to the page; its hidden anyways.
- login.html: since we get printed into existing pages, we don't need <html><body> - its wrong in first place to have them.
- authmethods.js: GetLoggedInFirst(): we don't need to send an ajax request to retrieve the login mask; if its needed, head.html already contains it. Simply uncover it to the user.
new Ajax.Request(p, { method: 'get' } );
/* If not logged in, go modal and ask the user to log in first. */
- new Ajax.Updater(
- 'md-content',
- 'do_template?template=get_logged_in',
- {
- method: 'get',
- onSuccess: function() {
- toggleModal(1);
- }
- }
- );
+ toggleModal(1);
}
// need to do some special stuff to handle MSIE.
-var toggleModal = function (b) {
+function toggleModal (b) {
if (modalShowing && b) return;
if (!modalShowing && !b) return;
-<html>
-<body>
<div id="loginbox_topline_container">
<div id="loginbox_title">
<?_("You must be logged in to access this page.")>
</div>
<div id="loginbox_closebutton">
<a href="javascript:toggleModal(0);">
-<?_("Close window")> <img src="static/webcit_icons/closewindow.gif" border="0"></a>
+<?_("Close window")> <img src="static/webcit_icons/closewindow.gif" border="0" alt='<?_("Close window")>'></a>
</div>
</div>
<br><br>
</div>
</div>
-</body>
-</html>
<div class="md-dialog-wrap">
<div class="md-dialog" id="dialog">
<div class="md-content" id="md-content">
+ <?!("COND:LOGGEDIN", 1><?=("get_logged_in")><??("X", 1)>
<!-- contents of modal box go here -->
</div>
</div>
<?=("head")>
+
+
<!-- start login.html -->
<div id="login_screen">
<div class="box">