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')) {

View file

@ -10,7 +10,7 @@
<h5 class="mt-1"><?php echo _("Adapter IP Address Settings"); ?></h5>
<div class="row">
<div class="mb-3 col-md-6">
<div class="btn-group" data-bs-toggle="buttons">
<div class="btn-group" role="group" data-bs-toggle="buttons">
<label class="btn btn-light active" checked onclick="setDHCPToggles(false)">
<input type="radio" name="adapter-ip" id="chkdhcp" autocomplete="off"> DHCP
</label>