From 45541aae63596ea28aa18c84b65946bce6adbffd Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Sat, 3 Dec 2016 19:21:07 +0545 Subject: Form_IpAddress add types remove patterns 1) Add alias and host types to Form_IpAddress with the appropriate hover text. 2) Remove the patterns - the UI of those is not so effective anyway, so leave the validation of input to the back end. 3) Update uses of Form_IpAddress to use the appropriate Alias or Host type as needed. 4) Remove explicit setPattern() from those uses of Form_IpAddress. --- src/usr/local/www/firewall_rules_edit.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/usr/local/www/firewall_rules_edit.php') diff --git a/src/usr/local/www/firewall_rules_edit.php b/src/usr/local/www/firewall_rules_edit.php index 1a7d40a..a76832f 100644 --- a/src/usr/local/www/firewall_rules_edit.php +++ b/src/usr/local/www/firewall_rules_edit.php @@ -1320,8 +1320,9 @@ foreach (['src' => 'Source', 'dst' => 'Destination'] as $type => $name) { $group->add(new Form_IpAddress( $type, $name .' Address', - $pconfig[$type] - ))->addMask($type .'mask', $pconfig[$type.'mask'])->setPattern('[a-zA-Z0-9_.:]+'); + $pconfig[$type], + 'ALIASV4V6' + ))->addMask($type .'mask', $pconfig[$type.'mask']); $section->add($group); -- cgit v1.1