mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-10 23:42:37 -07:00
Fix "Please verify your server" setting bug
This commit is contained in:
parent
558f7873f5
commit
1d86187f79
1 changed files with 17 additions and 9 deletions
|
@ -1168,17 +1168,22 @@ $(document).ready(function() {
|
||||||
}
|
}
|
||||||
|
|
||||||
var configForm = $("#configUpdate");
|
var configForm = $("#configUpdate");
|
||||||
|
function saveSettings() {
|
||||||
|
if (configForm.parsley().validate()) {
|
||||||
|
doAjaxCall('configUpdate', $(this), 'tabs', true);
|
||||||
|
postSaveChecks();
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
showMsg('<i class="fa fa-exclamation-circle"></i> Please verify your settings.', false, true, 2000, true)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$('.save-button').click(function() {
|
$('.save-button').click(function() {
|
||||||
if ($("#pms_identifier").val() == "") {
|
if ($("#pms_identifier").val() == "") {
|
||||||
showMsg('<i class="fa fa-exclamation-circle"></i> Please verify your server.',false,true,2000,true)
|
//showMsg('<i class="fa fa-exclamation-circle"></i> Please verify your server.', false, true, 2000, true)
|
||||||
|
verifyServer(function () { saveSettings() });
|
||||||
} else {
|
} else {
|
||||||
if (configForm.parsley().validate()) {
|
saveSettings();
|
||||||
doAjaxCall('configUpdate',$(this),'tabs',true);
|
|
||||||
postSaveChecks();
|
|
||||||
return false;
|
|
||||||
} else {
|
|
||||||
showMsg('<i class="fa fa-exclamation-circle"></i> Please verify your settings.',false,true,2000,true)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -1264,7 +1269,7 @@ $(document).ready(function() {
|
||||||
verifyServer();
|
verifyServer();
|
||||||
});
|
});
|
||||||
|
|
||||||
function verifyServer() {
|
function verifyServer(_callback) {
|
||||||
var pms_ip = $("#pms_ip").val()
|
var pms_ip = $("#pms_ip").val()
|
||||||
var pms_port = $("#pms_port").val()
|
var pms_port = $("#pms_port").val()
|
||||||
if (($("#pms_ip").val() !== '') || ($("#pms_port").val() !== '')) {
|
if (($("#pms_ip").val() !== '') || ($("#pms_port").val() !== '')) {
|
||||||
|
@ -1292,6 +1297,9 @@ $(document).ready(function() {
|
||||||
$('#pms-verify').fadeIn('fast');
|
$('#pms-verify').fadeIn('fast');
|
||||||
$("#pms-ip-group").addClass("has-error");
|
$("#pms-ip-group").addClass("has-error");
|
||||||
}
|
}
|
||||||
|
if (_callback) {
|
||||||
|
_callback();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue