Update chkstatic/chkdhcp radio btns classes

This commit is contained in:
billz
2024-10-24 23:13:14 -07:00
parent 87f95ab9f9
commit 9a1d362d30
2 changed files with 7 additions and 7 deletions

View File

@@ -242,15 +242,15 @@ function loadInterfaceDHCPSelect() {
$('#txtmetric').val(jsonData.Metric);
if (jsonData.StaticIP !== null && jsonData.StaticIP !== '' && !jsonData.FallbackEnabled) {
$('#chkstatic').closest('.btn').button('toggle');
$('#chkstatic').closest('.btn').button('toggle').blur();
$('#chkstatic').blur();
$('#chkstatic').prop('checked', true);
$('#chkstatic').closest('.btn').addClass('active').removeClass('btn-light');
$('#chkdhcp').closest('.btn').removeClass('active').addClass('btn-light');
$('#chkfallback').prop('disabled', true);
$('#dhcp-iface').removeAttr('disabled');
} else {
$('#chkdhcp').closest('.btn').button('toggle');
$('#chkdhcp').closest('.btn').button('toggle').blur();
$('#chkdhcp').blur();
$('#chkdhcp').prop('checked', true);
$('#chkdhcp').closest('.btn').addClass('active').removeClass('btn-light');
$('#chkstatic').closest('.btn').removeClass('active').addClass('btn-light');
$('#chkfallback').prop('disabled', false);
}
if (jsonData.FallbackEnabled || $('#chkdhcp').is(':checked')) {