[add] Logout

Also made general fixes to the css
This commit is contained in:
2018-08-12 10:03:25 -06:00
parent de84da4482
commit d4fadf08bc
6 changed files with 48 additions and 33 deletions

View File

@@ -0,0 +1,18 @@
function logout() {
var baseUrl = getbaseUrl();
$.ajax({
url: baseUrl + '/api/session/logout',
type: 'GET',
dataType: 'json',
success:function(data){
window.location.replace(baseUrl + '/html/login.php');
},
error:function(x) {
if (x.status==500){
$('#modalLoginError').modal('show');
document.getElementById('modalLoginErrorBody').innerHTML = "The user or password didnt match, please try again";
}
},
});
}