mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-27 03:07:43 +02:00
ids.cgi: Prevent from chainging the provider when editing an existing
one. This commit locks the dropdown menu for selecting a provider, in case an existing one should be edited. Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
This commit is contained in:
@@ -1621,9 +1621,21 @@ print <<END
|
||||
<tr>
|
||||
<td width='40%'>
|
||||
<input type='hidden' name='ID' value='$cgiparams{'ID'}'>
|
||||
<select name='PROVIDER' id='PROVIDER'>
|
||||
END
|
||||
;
|
||||
# Value to allow disabling the dropdown menu.
|
||||
my $disabled;
|
||||
|
||||
# Check if we are in edit mode.
|
||||
if ($cgiparams{'PROVIDERS'} eq "$Lang::tr{'edit'}") {
|
||||
$disabled = "disabled";
|
||||
|
||||
# Add hidden input with the provider because the disable select does not provider
|
||||
# this.
|
||||
print "<input type='hidden' name='PROVIDER' value='$used_providers{$cgiparams{'ID'}}[0]'>\n";
|
||||
}
|
||||
|
||||
print "<select name='PROVIDER' id='PROVIDER' $disabled>\n";
|
||||
# Loop through the array of ruleset providers.
|
||||
foreach my $provider (@ruleset_providers) {
|
||||
# Get the provider name.
|
||||
|
||||
Reference in New Issue
Block a user