mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-16 01:24:38 +00:00
(Captiveportal, new) only redirect if redirurl is provided in default web template
This commit is contained in:
parent
a0b554a9e7
commit
31a8d9e68f
@ -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">×</span></button>
|
||||
<span id="errorMSGtext"></span>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user