From 1ea6736f8fe2d641eecbbc9977bd28f97236b213 Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Fri, 19 May 2017 13:40:27 +0545 Subject: Make consistent rule information section (cherry picked from commit f0dc8b688c2b7d973bc18769579ee8cc6d3d2dad) (cherry picked from commit 4c4504b1e785396d92be853072a9c557c55b3c4a) --- src/usr/local/www/firewall_nat_out_edit.php | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) (limited to 'src/usr/local/www/firewall_nat_out_edit.php') diff --git a/src/usr/local/www/firewall_nat_out_edit.php b/src/usr/local/www/firewall_nat_out_edit.php index 0ca8933..3df52b8 100644 --- a/src/usr/local/www/firewall_nat_out_edit.php +++ b/src/usr/local/www/firewall_nat_out_edit.php @@ -686,28 +686,7 @@ $section->addInput(new Form_Input( $form->add($section); -$has_created_time = (isset($a_out[$id]['created']) && is_array($a_out[$id]['created'])); -$has_updated_time = (isset($a_out[$id]['updated']) && is_array($a_out[$id]['updated'])); - -if ($has_created_time || $has_updated_time) { - $section = new Form_Section('Rule Information'); - - if ($has_created_time) { - $section->addInput(new Form_StaticText( - 'Created', - date(gettext("n/j/y H:i:s"), $a_out[$id]['created']['time']) . gettext(" by ") . $a_out[$id]['created']['username'] - )); - } - - if ($has_updated_time) { - $section->addInput(new Form_StaticText( - 'Updated', - date(gettext("n/j/y H:i:s"), $a_out[$id]['updated']['time']) . gettext(" by ") . $a_out[$id]['updated']['username'] - )); - } - - $form->add($section); -} +gen_created_updated_fields($form, $a_out[$id]['created'], $a_out[$id]['updated']); print($form); -- cgit v1.1