-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Unified Popup Login Prompt with static
- Loading branch information
1 parent
9a81f94
commit 030e671
Showing
2 changed files
with
59 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,71 +1,71 @@ | ||
<table id="loginPopupContainer"> | ||
<tr> | ||
<th> | ||
<?php | ||
echo $appConfig["webAppName"]; | ||
?> | ||
</th> | ||
</tr> | ||
<tr> | ||
<td> | ||
<div style="width:100%;text-align:center;"> | ||
<?php | ||
if(isset($_POST['badpass'])){ | ||
|
||
?> | ||
<script>var toast = new iqwerty.toast.Toast('Bad Username/Password');</script> | ||
<tr> | ||
<th> | ||
<?php | ||
echo $appConfig["webAppName"]; | ||
?> | ||
</th> | ||
</tr> | ||
<tr> | ||
<td> | ||
<div style="width:100%;text-align:center;"> | ||
<?php | ||
if(isset($_POST['badpass'])){ | ||
|
||
?> | ||
<script>var toast = new iqwerty.toast.Toast('Bad Username/Password');</script> | ||
<span style="color:red;font-size:0.6em;">Bad Username/Password</span><br/> | ||
|
||
<?php | ||
<?php | ||
|
||
} | ||
?> | ||
<span id="badPassMessage" style="display:none">Bad Username/Password</span> | ||
<?php | ||
if(isset($_POST['notauthorized'])){ | ||
} | ||
if(isset($_POST['notauthorized'])){ | ||
|
||
?> | ||
<script>var toast = new iqwerty.toast.Toast('Not Authorized');</script> | ||
?> | ||
<script>var toast = new iqwerty.toast.Toast('Not Authorized');</script> | ||
<span style="color:red;font-size:0.6em;">Not Authorized</span><br/> | ||
|
||
<?php | ||
|
||
<?php | ||
} | ||
if(isset($_SESSION)){ | ||
if(isset($timedOut)){ | ||
if($timedOut=="true"){ | ||
$timedOut=""; | ||
session_unset(); | ||
?> | ||
|
||
} | ||
?> | ||
<span id="notAuthorizedMessage" style="display:none">Not Authorized</span> | ||
<?php | ||
if(isset($_SESSION)){ | ||
if(isset($timedOut)){ | ||
if($timedOut=="true"){ | ||
$timedOut=""; | ||
session_unset(); | ||
?> | ||
<span style="color:black;font-size:0.6em;">Your session has timed out. Please log in again.</span><br/> | ||
|
||
<!-- <span style="color:black;">Your session has timed out. Please log in again.</span><br/>//--> | ||
<?php | ||
} | ||
} | ||
} | ||
|
||
<?php | ||
} | ||
} | ||
} | ||
?> | ||
?> | ||
|
||
Username | ||
<input name="intent" value="<?php echo $goto;?>" hidden> | ||
</div> | ||
<input <?php if (!isset($_COOKIE["username"])) { ?>autofocus<?php } ?> type="text" name="username" value="<?php if (isset($_COOKIE["username"])) { echo $_COOKIE["username"]; } ?>" autocomplete /><br/> | ||
Password | ||
<input id="passwordInput" <?php if (isset($_COOKIE["username"])) { ?>autofocus<?php } ?> type="password" name="password" autocomplete onkeypress="javascript:password_onkeypress(event);" /><br/> | ||
Username | ||
<input name="intent" value="<?php echo $goto;?>" hidden> | ||
</div> | ||
<input <?php if (!isset($_COOKIE["username"])) { ?>autofocus<?php } ?> type="text" name="username" value="<?php if (isset($_COOKIE["username"])) { echo $_COOKIE["username"];} ?>" autocomplet /><br/> | ||
Password | ||
<input <?php if (isset($_COOKIE["username"])) { ?>autofocus<?php } ?> type="password" name="password" value="<?php if (isset($_COOKIE["token"])) { echo json_decode($_COOKIE["token"],true)[0];} ?>" autocomplet/><br/> | ||
|
||
<br /> | ||
<br /><div style="cursor:hand;" style="width:50%;height:3em;vertical-align:middle;display:inline"> | ||
<text onclick="checkOnPage('rememberUsernameCheckbox')">Remember Username</text> | ||
<input id="rememberUsernameCheckbox" style="cursor:hand;width:2em;vertical-align:middle;" type="checkbox" name="rememberUsername" <?php if (isset($_COOKIE["username"])) { echo 'checked=true'; }?>/> | ||
<?php //print_r($_COOKIE);?> | ||
</div><br/><br/> | ||
<button type="button" onclick="reauthenticateSession()">Login</button> | ||
<!-- <button type="submit" hidden>Login</button>//--> | ||
<br /> | ||
<br /><div style="cursor:hand;" style="width:50%;height:3em;vertical-align:middle;display:inline"> | ||
<text onclick="checkOnPage('rememberUsernameCheckbox')">Remember Username</text> | ||
<input id="rememberUsernameCheckbox" style="cursor:hand;width:2em;vertical-align:middle;" type="checkbox" name="rememberUsername" <?php if (isset($_COOKIE["username"])) { echo 'checked=true'; }?>/> | ||
<?php //print_r($_COOKIE);?> | ||
</div> | ||
<br/> | ||
<div style="cursor:hand;" style="width:50%;height:3em;vertical-align:middle;display:inline"> | ||
<text onclick="checkOnPage('rememberMeCheckbox')">Remember Me</text> | ||
<input id="rememberMeCheckbox" style="cursor:hand;width:2em;vertical-align:middle;" type="checkbox" name="rememberMe" <?php if (isset($_COOKIE["token"])) { echo 'checked=true'; }?>/> | ||
<?php //print_r($_COOKIE);?> | ||
</div><br/> | ||
<button type="submit">Login</button> | ||
|
||
</td> | ||
</tr> | ||
</td> | ||
</tr> | ||
|
||
</table> |