up update

This commit is contained in:
Devdatt Bhatt 2026-06-08 01:13:14 +00:00
parent 7ed793d13f
commit e637dce2c0
1 changed files with 3 additions and 2 deletions

View File

@ -235,9 +235,10 @@ $selected_interface = $_GET['interface'] ?? array_keys($interface_data)[0] ?? nu
<script>
// Toggle static IP fields based on method selection
document.querySelectorAll('input[name^="method"]').forEach(radio => {
document.querySelectorAll('input[name="method"]').forEach(radio => {
radio.addEventListener('change', function() {
const interfaceName = this.name.replace('method', '');
// Get the interface name from the radio button's ID
const interfaceName = this.id.split('-')[1]; // Get interface name from ID like "static-eth0"
const staticFields = document.getElementById(`static-ip-fields-${interfaceName}`);
if (this.value === 'static') {