interfave name ui upadte
This commit is contained in:
parent
a718f7eff0
commit
c094498ed8
|
|
@ -151,8 +151,8 @@ $selected_interface = $_GET['interface'] ?? array_keys($interface_data)[0] ?? nu
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label class="form-label">Interface Name</label>
|
<label class="form-label">Interface Name</label>
|
||||||
<input type="text" class="form-control" name="interface_name"
|
<input type="text" class="form-control" name="interface"
|
||||||
value="<?php echo htmlspecialchars($interface_data[$selected_interface]['config']['interface_name'] ?? ''); ?>"
|
value="<?php echo htmlspecialchars($interface_data[$selected_interface]['config']['interface'] ?? $selected_interface); ?>"
|
||||||
placeholder="Enter interface name">
|
placeholder="Enter interface name">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -268,7 +268,7 @@ $selected_interface = $_GET['interface'] ?? array_keys($interface_data)[0] ?? nu
|
||||||
checkbox.addEventListener('change', function() {
|
checkbox.addEventListener('change', function() {
|
||||||
const switchContainer = this.closest('.switch-container');
|
const switchContainer = this.closest('.switch-container');
|
||||||
const label = switchContainer.querySelector('.switch-label');
|
const label = switchContainer.querySelector('.switch-label');
|
||||||
|
|
||||||
if (label) {
|
if (label) {
|
||||||
label.textContent = this.checked ? 'Enabled' : 'Disabled';
|
label.textContent = this.checked ? 'Enabled' : 'Disabled';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue