Add default values and mark fields as required. Signed-off-by: Leo-Andres Hofmann --- html/cgi-bin/zoneconf.cgi | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/html/cgi-bin/zoneconf.cgi b/html/cgi-bin/zoneconf.cgi index 9d01d06ce..bbd042ffc 100644 --- a/html/cgi-bin/zoneconf.cgi +++ b/html/cgi-bin/zoneconf.cgi @@ -478,6 +478,9 @@ END if ($access_selected{"NONE"} eq "") { $highlight = $_; } + + # default VLAN tag if not configured + $zone_vlan_id = 1 unless looks_like_number($zone_vlan_id); print < @@ -486,7 +489,7 @@ END - + END ; @@ -513,6 +516,9 @@ foreach (@zones) { # load settings and prepare form elements for each zone my $stp_available = $ethsettings{"${uc}_MODE"} eq "bridge"; # STP is only available in bridge mode my $stp_enabled = $ethsettings{"${uc}_STP"} eq "on"; my $stp_priority = $ethsettings{"${uc}_STP_PRIORITY"}; + + # set priority to default value if no numerical value is configured + $stp_priority = 32768 unless looks_like_number($stp_priority); # form element modifiers my $checked = ""; @@ -532,7 +538,7 @@ END # priority input box HTML my $row_2 = < - + END ; -- 2.27.0.windows.1