Commit 06e59880 authored by Fabian Franz's avatar Fabian Franz Committed by Franco Fichtner

fixes for #427 in firewall_rules_edit.php

(cherry picked from commit 94e16143)
parent 6e328839
...@@ -664,13 +664,13 @@ include("head.inc"); ...@@ -664,13 +664,13 @@ include("head.inc");
<td width="78%"> <td width="78%">
<select name="type" class="selectpicker" data-live-search="true" data-size="5" > <select name="type" class="selectpicker" data-live-search="true" data-size="5" >
<?php <?php
$type_options = array('Pass', 'Block', 'Reject'); $type_options = array('Pass' => gettext('Pass'), 'Block' => gettext('Block'), 'Reject' => gettext('Reject'));
if (!empty($pconfig['floating'])) { if (!empty($pconfig['floating'])) {
$type_options[] = 'Match'; $type_options['Match'] = gettext('Match');
} }
foreach ($type_options as $type): ?> foreach ($type_options as $type => $type_translated): ?>
<option value="<?=strtolower($type);?>" <?= strtolower($type) == strtolower($pconfig['type']) ? "selected=\"selected\"" :""; ?>> <option value="<?=strtolower($type);?>" <?= strtolower($type) == strtolower($pconfig['type']) ? "selected=\"selected\"" :""; ?>>
<?=$type;?> <?=$type_translated;?>
</option> </option>
<?php <?php
endforeach; ?> endforeach; ?>
...@@ -1124,7 +1124,7 @@ include("head.inc"); ...@@ -1124,7 +1124,7 @@ include("head.inc");
<td><a id="help_for_sourceos" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Source OS");?></td> <td><a id="help_for_sourceos" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Source OS");?></td>
<td> <td>
<select name="os" class="selectpicker" data-live-search="true" data-size="5" data-width="auto"> <select name="os" class="selectpicker" data-live-search="true" data-size="5" data-width="auto">
<option value="" <?= empty($pconfig['os']) ? "selected=\"selected\"" : ""; ?>>Any</option> <option value="" <?= empty($pconfig['os']) ? "selected=\"selected\"" : ""; ?>><?= gettext('Any') ?></option>
<?php <?php
foreach ($ostypes as $ostype): ?> foreach ($ostypes as $ostype): ?>
<option value="<?=$ostype;?>" <?= $ostype == $pconfig['os'] ? "selected=\"selected\"" : ""; ?>> <option value="<?=$ostype;?>" <?= $ostype == $pconfig['os'] ? "selected=\"selected\"" : ""; ?>>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment