--- /dev/null
+<html>
+<body>
+<center>
+FIXME
+You have to log in now<br>
+<a href="<?BSTR("destination_url")>">Proceed and fail</a><br>
+<a href="javascript:toggleModal(0);"><img src="static/closewindow.gif" border="0"> <?_("Cancel")></a>
+</center>
+</body>
+</html>
</a>
</li>
<li class="newmess">
- <a href="display_enter">
+ <a href="javascript:GetLoggedInFirst('display_enter')">
<img src="static/newmess3_24x.gif" alt="" width="24" height="24">
<span class="navbar_link"><?_("Enter a message")></span>
</a>
}
);
}
+
+
+/*
+ * Wrapper script to require logging in before completing an action
+ */
+function GetLoggedInFirst(destination_url) {
+
+ /* If logged in already, go directly to the destination. */
+ /* FIXME implement this */
+
+ /* If not logged in, go modal and ask the user to log in first. */
+ p = 'do_template?template=get_logged_in?destination_url=' + destination_url;
+ new Ajax.Updater(
+ 'md-content',
+ p,
+ {
+ method: 'get',
+ onSuccess: function(cl_success) {
+ toggleModal(1);
+ }
+ }
+ );
+}