You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
68 lines
3.5 KiB
HTML
68 lines
3.5 KiB
HTML
<div id="loading">
|
|
<div style="position: absolute; width: 100%; height: 100%; top: 0; left: 0; background-color: #324150;">
|
|
<img src="assets/logonobg.svg" alt="" style="display: block; position: absolute; max-width: 90%; top: 0; left: 0; right: 0; bottom: 25%; margin: auto; max-height: 20%;" />
|
|
<p style="font-family: sans-serif; color: white; position: absolute; max-width: 90%; left: 0; right: 0; bottom: 30%; margin: auto; text-align: center;">
|
|
Logging in...
|
|
<br /><i class="fa fa-spinner fa-pulse fa-fw"></i>
|
|
<br />
|
|
<span id="loading-error"></span></p>
|
|
<div style="background: url(assets/mountains-simple.svg) repeat-x; background-size: auto 100%; height: 20%; position: absolute; bottom: 0; width: 100%;"></div>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-lg-12 text-center">
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading whitetext" id="loginheader" style="color: white;">
|
|
Login to TerranQuest
|
|
</div>
|
|
<div class="panel-body">
|
|
<div id="errorbase" class="alert alert-danger alert-dismissable" style="display: none;">
|
|
<p id="errormsg">An error occurred.</p>
|
|
</div>
|
|
<div class="input-group">
|
|
<span class="input-group-addon" id="basic-addon-usericon"><i class="fa fa-user fa-fw"></i></span>
|
|
<input type="text" placeholder="Username" id="usernameBox" class="form-control" aria-describedby="basic-addon-usericon" autocorrect="off" autocapitalize="off" spellcheck="false" />
|
|
</div>
|
|
<br />
|
|
<div class="input-group">
|
|
<span class="input-group-addon" id="basic-addon-passicon"><i class="fa fa-key fa-fw"></i></span>
|
|
<input type="password" placeholder="Password" id="passwordBox" class="form-control" aria-describedby="basic-addon-passicon" autocorrect="off" autocapitalize="off" spellcheck="false" />
|
|
</div>
|
|
</div>
|
|
<div class="panel-footer">
|
|
<a href="#" onclick="dologin()" id="loginBtn" class="btn btn-success btn-wide"><i class="fa fa-sign-in"></i> Login</a><br /><br />
|
|
<p><i>Don't have a Netsyms account?</i></p>
|
|
<a href="#" onclick="openscreen('signup')" id="openSignupBtn" class="btn btn-primary btn-wide"><i class="fa fa-user-plus"></i> Sign Up</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script>
|
|
userset = false;
|
|
passset = false;
|
|
if (localStorage.getItem("username") !== null && localStorage.getItem("username") !== '') {
|
|
$('#usernameBox').val(localStorage.getItem("username"));
|
|
userset = true;
|
|
}
|
|
if (localStorage.getItem("password") !== null && localStorage.getItem("password") !== '') {
|
|
$('#passwordBox').val(localStorage.getItem("password"));
|
|
passset = true;
|
|
}
|
|
|
|
if (userset && passset) {
|
|
// Try to login with stored credentials
|
|
$.post("https://sso.netsyms.com/api/simpleauth.php",
|
|
{user: localStorage.getItem("username"), pass: localStorage.getItem("password")},
|
|
function (data) {
|
|
if (data === 'OK') {
|
|
dologin();
|
|
}
|
|
}).fail(function () {
|
|
$('#loading').css('display', 'none');
|
|
});
|
|
} else {
|
|
$('#loading').css('display', 'none');
|
|
}
|
|
navigator.splashscreen.hide();
|
|
</script>
|
|
<script src="js/auth.js"></script> |