Force reloading VPN Settings page after validating form.
This commit is contained in:
@@ -87,14 +87,12 @@ function ready() {
|
|||||||
headers: {
|
headers: {
|
||||||
'X-Requested-With': 'jQuery',
|
'X-Requested-With': 'jQuery',
|
||||||
},
|
},
|
||||||
|
timeout: 5000,
|
||||||
dataType: "html",
|
dataType: "html",
|
||||||
success: function(data){
|
// success: function() {}, // XXX will never happen because the VPN connection will be restarted after the form is posted.
|
||||||
document.body.innerHTML = new DOMParser().parseFromString(data, "text/html").body.innerHTML
|
complete: function() {
|
||||||
ready()
|
console.log("Forcing page reload after a few seconds...");
|
||||||
},
|
setTimeout(function() {document.location.reload();}, 45000)
|
||||||
error: function() {
|
|
||||||
$('#save').prop('disabled', false);
|
|
||||||
$('#save-loading').hide();
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
Reference in New Issue
Block a user