ui upadte
This commit is contained in:
parent
69c1c6f2bd
commit
283d663306
|
|
@ -163,13 +163,20 @@ $selected_interface = $_GET['interface'] ?? array_keys($interface_data)[0] ?? nu
|
|||
name="multicast" value="on" <?php echo ($interface_data[$selected_interface]['config']['multicast'] ?? 'off') === 'on' ? 'checked' : ''; ?>>
|
||||
<span class="slider"></span>
|
||||
</div>
|
||||
<label for="multicast-<?php echo $selected_interface; ?>" class="switch-label">
|
||||
<label for="multicast-<?php echo $selected_interface; ?>" class="switch-label" id="multicast-label-<?php echo $selected_interface; ?>">
|
||||
<?php echo ($interface_data[$selected_interface]['config']['multicast'] ?? 'off') === 'on' ? 'Enabled' : 'Disabled'; ?>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Configuration Method</label>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="radio" name="method" id="disable-<?php echo $selected_interface; ?>"
|
||||
value="disable" <?php echo ($interface_data[$selected_interface]['config']['method'] ?? '') === 'disable' ? 'checked' : ''; ?>>
|
||||
<label class="form-check-label" for="disable-<?php echo $selected_interface; ?>">
|
||||
Disable
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="radio" name="method" id="dhcp-<?php echo $selected_interface; ?>"
|
||||
value="dhcp" <?php echo ($interface_data[$selected_interface]['config']['method'] ?? '') === 'dhcp' ? 'checked' : ''; ?>>
|
||||
|
|
@ -184,13 +191,6 @@ $selected_interface = $_GET['interface'] ?? array_keys($interface_data)[0] ?? nu
|
|||
Static IP
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="radio" name="method" id="disable-<?php echo $selected_interface; ?>"
|
||||
value="disable" <?php echo ($interface_data[$selected_interface]['config']['method'] ?? '') === 'disable' ? 'checked' : ''; ?>>
|
||||
<label class="form-check-label" for="disable-<?php echo $selected_interface; ?>">
|
||||
Disable
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mb-3" id="static-ip-fields-<?php echo $selected_interface; ?>"
|
||||
|
|
@ -262,6 +262,20 @@ $selected_interface = $_GET['interface'] ?? array_keys($interface_data)[0] ?? nu
|
|||
window.location.href = '?interface=' + encodeURIComponent(interfaceName);
|
||||
});
|
||||
});
|
||||
|
||||
// Multicast toggle switch functionality
|
||||
document.querySelectorAll('.switch input[type="checkbox"]').forEach(checkbox => {
|
||||
checkbox.addEventListener('change', function() {
|
||||
const interfaceName = this.id.split('-')[2]; // Get interface name from ID like "multicast-eth0"
|
||||
const label = document.getElementById(`multicast-label-${interfaceName}`);
|
||||
|
||||
if (this.checked) {
|
||||
label.textContent = 'Enabled';
|
||||
} else {
|
||||
label.textContent = 'Disabled';
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<?php include 'footer.php' ?>
|
||||
Loading…
Reference in New Issue