mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-13 00:07:26 +00:00
mvc: allow referencing disabled interfaces in LinkAddressField
This prevents validation errors when interfaces are temporarily disabled. Other device components received similar fixes in the past due to this "glitch" of not offering valid devices and selectpickers would lose their correct value on save too (the field is a bit different here but the same principle applies).
This commit is contained in:
parent
25585eb6b9
commit
f30c28ca79
@ -53,7 +53,7 @@ class LinkAddressField extends BaseField
|
||||
self::$option_groups['ipalias'] = ['items' => [], 'title' => gettext('IP Alias')];
|
||||
foreach ($cfg->interfaces->children() as $ifname => $node) {
|
||||
$descr = !empty((string)$node->descr) ? (string)$node->descr : strtoupper($ifname);
|
||||
if (!empty((string)$node->virtual) || empty((string)$node->enable)) {
|
||||
if (!empty((string)$node->virtual)) {
|
||||
continue;
|
||||
}
|
||||
self::$known_addresses[$ifname] = $descr;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user