*/
+/*
+ * Are we logged in right now?
+ */
+function IsLoggedIn() {
+ if ($('is_logged_in').innerHTML == "yes") {
+ return 1;
+ }
+ else {
+ return 0;
+ }
+}
+
+
+
/*
* 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 (IsLoggedIn()) {
+ window.location = destination_url;
+ return;
+ }
/* 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;
<script type="text/javascript" src="static/modal.js"></script>
</head>
<body>
- <?ICONBAR>
+<div id="is_logged_in" style="display:none"><?%("COND:LOGGEDIN", 1, 1, 1, "no", "yes")></div>
+<?ICONBAR>
<!--("begin modal container")-->
<div id="modal">
<div class="md-overlay-decorator"></div>