firewall: simplify layout and fix (unused) element ID; closes #6552

This commit is contained in:
Franco Fichtner 2023-05-10 08:10:01 +02:00
parent c2f407ca4c
commit 14966b5391

View File

@ -801,7 +801,7 @@ include("head.inc");
<td><a id="help_for_disabled" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Disabled"); ?></td>
<td>
<input name="disabled" type="checkbox" id="disabled" value="yes" <?= !empty($pconfig['disabled']) ? "checked=\"checked\"" : ""; ?> />
<strong><?=gettext("Disable this rule"); ?></strong>
<?= gettext('Disable this rule') ?>
<div class="hidden" data-for="help_for_disabled">
<?=gettext("Set this option to disable this rule without removing it from the list."); ?>
</div>
@ -823,7 +823,7 @@ include("head.inc");
</td>
<td>
<input name="quick" type="checkbox" id="quick" value="yes" <?= !empty($is_quick) ? "checked=\"checked\"" : "";?> />
<strong><?=gettext("Apply the action immediately on match.");?></strong>
<?= gettext('Apply the action immediately on match.') ?>
<div class="hidden" data-for="help_for_quick">
<?=gettext("If a packet matches a rule specifying quick, ".
"then that rule is considered the last matching rule and the specified action is taken. ".
@ -837,7 +837,7 @@ include("head.inc");
<td><?=gettext("Associated filter rule");?></td>
<td>
<input name='associated-rule-id' id='associated-rule-id' type='hidden' value='<?=$pconfig['associated-rule-id'];?>' />
<span class="text-danger"><strong><?= gettext('Note:') ?></strong></span> <?= gettext('This is associated to a NAT rule.') ?><br />
<span class="text-danger"><?= gettext('This is associated to a NAT rule.') ?><br />
<?=gettext("You cannot edit the interface, protocol, source, or destination of associated filter rules.");?>
<br />
<?php
@ -1032,12 +1032,10 @@ include("head.inc");
</td>
</tr>
<tr>
<td> <a id="help_for_src_invert" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Source") . " / ".gettext("Invert");?> </td>
<td><i class="fa fa-info-circle text-muted"></i> <?=gettext("Source") . " / ".gettext("Invert");?> </td>
<td>
<input <?=!empty($pconfig['associated-rule-id']) ? "disabled" : "";?> name="srcnot" type="checkbox" value="yes" <?= !empty($pconfig['srcnot']) ? "checked=\"checked\"" : "";?> />
<div class="hidden" data-for="help_for_src_invert">
<?=gettext("Use this option to invert the sense of the match."); ?>
</div>
<?= gettext('Use this option to invert the sense of the match.') ?>
</td>
</tr>
<tr>
@ -1162,12 +1160,10 @@ include("head.inc");
</td>
</tr>
<tr>
<td> <a id="help_for_dst_invert" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Destination") . " / ".gettext("Invert");?> </td>
<td><i class="fa fa-info-circle text-muted"></i> <?=gettext("Destination") . " / ".gettext("Invert");?> </td>
<td>
<input <?=!empty($pconfig['associated-rule-id']) ? "disabled" : "";?> name="dstnot" type="checkbox" id="srcnot" value="yes" <?= !empty($pconfig['dstnot']) ? "checked=\"checked\"" : "";?> />
<div class="hidden" data-for="help_for_dst_invert">
<?=gettext("Use this option to invert the sense of the match."); ?>
</div>
<input <?=!empty($pconfig['associated-rule-id']) ? "disabled" : "";?> name="dstnot" type="checkbox" id="dstnot" value="yes" <?= !empty($pconfig['dstnot']) ? "checked=\"checked\"" : "";?> />
<?= gettext('Use this option to invert the sense of the match.') ?>
</td>
</tr>
<tr>
@ -1283,7 +1279,7 @@ include("head.inc");
<td><a id="help_for_log" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Log");?></td>
<td>
<input name="log" type="checkbox" id="log" value="yes" <?= !empty($pconfig['log']) ? "checked=\"checked\"" : ""; ?> />
<strong><?=gettext("Log packets that are handled by this rule");?></strong>
<?= gettext('Log packets that are handled by this rule') ?>
<div class="hidden" data-for="help_for_log">
<?=sprintf(gettext("Hint: the firewall has limited local log space. Don't turn on logging for everything. If you want to do a lot of logging, consider using a %sremote syslog server%s."),'<a href="diag_logs_settings.php">','</a>') ?>
</div>
@ -1312,9 +1308,6 @@ include("head.inc");
<?=gettext("You may enter a description here for your reference (not parsed)."); ?>
</div>
</tr>
<tr>
<th colspan="2"><?=gettext("Advanced features");?></th>
</tr>
<tr>
<td><a id="help_for_nosync" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("No XMLRPC Sync"); ?></td>
<td>
@ -1374,14 +1367,10 @@ include("head.inc");
</td>
</tr>
<tr>
<td><?=gettext("Advanced Options");?></td>
<td>
<th><?= gettext('Advanced features') ?></th>
<th>
<input id="toggleAdvanced" type="button" class="btn btn-default" value="<?= html_safe(gettext('Show/Hide')) ?>" />
</td>
</tr>
<tr class="opt_advanced hidden">
<td></td>
<td><strong><?=gettext("Note: Leave fields blank to disable the feature.");?></strong></td>
</th>
</tr>
<tr class="opt_advanced hidden">
<td><a id="help_for_allowopts" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("allow options");?> </td>