Commit 9df294b6 authored by Ad Schellevis's avatar Ad Schellevis Committed by Franco Fichtner

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

(cherry picked from commit 31a8d9e6)
parent 5857842f
......@@ -51,7 +51,12 @@
}).done(function(data) {
// redirect on successful login
if (data['clientState'] == 'AUTHORIZED') {
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') {
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