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.
MobileApp/www/views/setup2.html

39 lines
1.4 KiB
HTML

<br />
<div class="panel panel-blue">
<div class="panel-heading">
<h3 class="panel-title">Setup</h3>
</div>
<div class="panel-body">
<p>Almost done!
<br /><br />
Please enter your password, then press Finish.
</p>
<input type="password" id="passbox" class="form-control" placeholder="Password" style="display: block;" />
<br />
<div class="btn btn-primary" onclick="savePassword()"><i class="fa fa-check"></i> Finish</div>
</div>
</div>
<script>
function savePassword() {
$.post(localStorage.getItem("portalurl"), {
username: localStorage.getItem("username"),
key: localStorage.getItem("key"),
password: $('#passbox').val(),
action: "check_password"
}, function (data) {
if (data.status === 'OK') {
localStorage.setItem("password", $('#passbox').val());
localStorage.setItem("setupcomplete", true);
navigator.notification.alert("Setup complete!", null, "Success", 'Continue');
openscreen("home");
} else {
navigator.notification.alert(data.msg, null, "Error", 'Dismiss');
}
}, "json").fail(function () {
navigator.notification.alert("Could not connect to the server. Try again later.", null, "Error", 'Dismiss');
});
}
setnavbar("home");
</script>