summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/firewall_rules_edit.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/usr/local/www/firewall_rules_edit.php')
-rw-r--r--src/usr/local/www/firewall_rules_edit.php30
1 files changed, 2 insertions, 28 deletions
diff --git a/src/usr/local/www/firewall_rules_edit.php b/src/usr/local/www/firewall_rules_edit.php
index 1012906..e880537 100644
--- a/src/usr/local/www/firewall_rules_edit.php
+++ b/src/usr/local/www/firewall_rules_edit.php
@@ -1746,36 +1746,10 @@ $section->add($group)->setHelp('Choose the Acknowledge Queue only if there is a
'selected Queue.'
);
-$has_created_time = (isset($a_filter[$id]['created']) && is_array($a_filter[$id]['created']));
-$has_updated_time = (isset($a_filter[$id]['updated']) && is_array($a_filter[$id]['updated']));
-
-
-if ($has_created_time || $has_updated_time) {
- $form->add($section);
- $section = new Form_Section('Rule Information');
-
- if ($has_created_time) {
- $section->addInput(new Form_StaticText(
- 'Created',
- sprintf(
- gettext('%1$s by %2$s'),
- date(gettext("n/j/y H:i:s"), $a_filter[$id]['created']['time']),
- '<b>' . $a_filter[$id]['created']['username'] . '</b>')
- ));
- }
+$form->add($section);
- if ($has_updated_time) {
- $section->addInput(new Form_StaticText(
- 'Updated',
- sprintf(
- gettext('%1$s by %2$s'),
- date(gettext("n/j/y H:i:s"), $a_filter[$id]['updated']['time']),
- '<b>' . $a_filter[$id]['updated']['username'] . '</b>')
- ));
- }
-}
+gen_created_updated_fields($form, $a_filter[$id]['created'], $a_filter[$id]['updated']);
-$form->add($section);
echo $form;
?>
OpenPOWER on IntegriCloud