Commit 31a8d9e6 authored by Ad Schellevis's avatar Ad Schellevis

(Captiveportal, new) only redirect if redirurl is provided in default web template

parent a0b554a9
......@@ -51,7 +51,12 @@
}).done(function(data) {
// redirect on successful login
if (data['clientState'] == 'AUTHORIZED') {
window.location = 'http://'+getURLparams()['redirurl']+'?refresh';
if (getURLparams()['redirurl'] != undefined) {
window.location = 'http://'+getURLparams()['redirurl']+'?refresh';
} else {
// no target, reload page
window.location.reload();
}
} else {
$("#inputUsername").val("");
$("#inputPassword").val("");
......@@ -80,7 +85,11 @@
}).done(function(data) {
// redirect on successful login
if (data['clientState'] == 'AUTHORIZED') {
window.location = 'http://'+getURLparams()['redirurl']+'?refresh';
if (getURLparams()['redirurl'] != undefined) {
window.location = 'http://'+getURLparams()['redirurl']+'?refresh';
} else {
window.location.reload();
}
} else {
$("#inputUsername").val("");
$("#inputPassword").val("");
......@@ -182,6 +191,7 @@
<button class="btn btn-primary btn-block" id="logoff" type="button">Logout</button>
</form>
</div>
<!-- Message dialog -->
<div class="alert alert-danger alert-dismissible hidden" role="alert" id="alertMSG">
<button type="button" class="close" id="btnCloseError" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<span id="errorMSGtext"></span>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment