mirror of
https://github.com/RaspAP/raspap-webgui.git
synced 2024-11-21 15:10:22 +00:00
Merge branch 'master' into maint/bootstrap5.3
This commit is contained in:
commit
f1e093404c
1 changed files with 12 additions and 7 deletions
|
@ -242,16 +242,13 @@ function loadInterfaceDHCPSelect() {
|
||||||
$('#txtmetric').val(jsonData.Metric);
|
$('#txtmetric').val(jsonData.Metric);
|
||||||
|
|
||||||
if (jsonData.StaticIP !== null && jsonData.StaticIP !== '' && !jsonData.FallbackEnabled) {
|
if (jsonData.StaticIP !== null && jsonData.StaticIP !== '' && !jsonData.FallbackEnabled) {
|
||||||
$('#chkstatic').prop('checked', true);
|
$('#chkstatic').prop('checked', true).closest('.btn').addClass('active');
|
||||||
$('#chkstatic').closest('.btn').addClass('active').removeClass('btn-light');
|
$('#chkdhcp').prop('checked', false).closest('.btn').removeClass('active');
|
||||||
$('#chkdhcp').closest('.btn').removeClass('active').addClass('btn-light');
|
|
||||||
$('#chkfallback').prop('disabled', true);
|
$('#chkfallback').prop('disabled', true);
|
||||||
$('#dhcp-iface').removeAttr('disabled');
|
$('#dhcp-iface').removeAttr('disabled');
|
||||||
} else {
|
} else {
|
||||||
$('#chkdhcp').prop('checked', true);
|
$('#chkdhcp').closest('.btn').addClass('active');
|
||||||
$('#chkdhcp').closest('.btn').addClass('active').removeClass('btn-light');
|
$('#chkdhcp').closest('.btn').button.blur();
|
||||||
$('#chkstatic').closest('.btn').removeClass('active').addClass('btn-light');
|
|
||||||
$('#chkfallback').prop('disabled', false);
|
|
||||||
}
|
}
|
||||||
if (jsonData.FallbackEnabled || $('#chkdhcp').is(':checked')) {
|
if (jsonData.FallbackEnabled || $('#chkdhcp').is(':checked')) {
|
||||||
$('#dhcp-iface').prop('disabled', true);
|
$('#dhcp-iface').prop('disabled', true);
|
||||||
|
@ -272,6 +269,14 @@ function setDHCPToggles(state) {
|
||||||
$('#dhcp-iface').prop('disabled', !state);
|
$('#dhcp-iface').prop('disabled', !state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$('#chkfallback').change(function() {
|
||||||
|
if ($('#chkfallback').is(':checked')) {
|
||||||
|
setStaticFieldsEnabled();
|
||||||
|
} else {
|
||||||
|
setStaticFieldsDisabled();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
$('#debugModal').on('shown.bs.modal', function (e) {
|
$('#debugModal').on('shown.bs.modal', function (e) {
|
||||||
var csrfToken = $('meta[name=csrf_token]').attr('content');
|
var csrfToken = $('meta[name=csrf_token]').attr('content');
|
||||||
$.post('ajax/system/sys_debug.php',{'csrf_token': csrfToken},function(data){
|
$.post('ajax/system/sys_debug.php',{'csrf_token': csrfToken},function(data){
|
||||||
|
|
Loading…
Reference in a new issue