summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2017-01-24 17:46:20 +0545
committerRenato Botelho <renato@netgate.com>2017-01-30 10:26:24 -0200
commit5c9dcd194ffe38b7009e0955ea6f029f15e93966 (patch)
treec748a77b7cade8ac8731055cad618132cb1294ad /src
parenta6caa27eb615dbfb298553249fecb8f2734c9339 (diff)
downloadpfsense-5c9dcd194ffe38b7009e0955ea6f029f15e93966.zip
pfsense-5c9dcd194ffe38b7009e0955ea6f029f15e93966.tar.gz
Required fields for firewall*.php
(cherry picked from commit 8a1b5c561f93611b711eb4e7b58ccb4990577d8e)
Diffstat (limited to 'src')
-rw-r--r--src/usr/local/www/firewall_rules_edit.php14
-rw-r--r--src/usr/local/www/firewall_schedule_edit.php6
-rw-r--r--src/usr/local/www/firewall_virtual_ip_edit.php16
3 files changed, 23 insertions, 13 deletions
diff --git a/src/usr/local/www/firewall_rules_edit.php b/src/usr/local/www/firewall_rules_edit.php
index 9c385d4..43c60fd 100644
--- a/src/usr/local/www/firewall_rules_edit.php
+++ b/src/usr/local/www/firewall_rules_edit.php
@@ -1190,7 +1190,7 @@ if ($if == "FloatingRules" || isset($pconfig['floating'])) {
$section->addInput(new Form_Select(
'type',
- 'Action',
+ '*Action',
$pconfig['type'],
$values
))->setHelp('Choose what to do with packets that match the criteria specified '.
@@ -1256,7 +1256,7 @@ if ($edit_disabled) {
if ($if == "FloatingRules" || isset($pconfig['floating'])) {
$section->addInput($input = new Form_Select(
'interface',
- 'Interface',
+ '*Interface',
$pconfig['interface'],
build_if_list(),
true
@@ -1264,7 +1264,7 @@ if ($if == "FloatingRules" || isset($pconfig['floating'])) {
} else {
$section->addInput($input = new Form_Select(
'interface',
- 'Interface',
+ '*Interface',
$pconfig['interface'],
build_if_list()
))->setHelp('Choose the interface from which packets must come to match this rule.');
@@ -1273,7 +1273,7 @@ if ($if == "FloatingRules" || isset($pconfig['floating'])) {
if ($if == "FloatingRules" || isset($pconfig['floating'])) {
$section->addInput(new Form_Select(
'direction',
- 'Direction',
+ '*Direction',
$pconfig['direction'],
array(
'any' => gettext('any'),
@@ -1292,7 +1292,7 @@ if ($if == "FloatingRules" || isset($pconfig['floating'])) {
$section->addInput(new Form_Select(
'ipprotocol',
- 'Address Family',
+ '*Address Family',
$pconfig['ipprotocol'],
array(
'inet' => 'IPv4',
@@ -1303,7 +1303,7 @@ $section->addInput(new Form_Select(
$section->addInput(new Form_Select(
'proto',
- 'Protocol',
+ '*Protocol',
$pconfig['proto'],
array(
'any' => gettext('Any'),
@@ -1343,7 +1343,7 @@ $form->add($section);
foreach (['src' => 'Source', 'dst' => 'Destination'] as $type => $name) {
$section = new Form_Section($name);
- $group = new Form_Group($name);
+ $group = new Form_Group('*' . $name);
$group->add(new Form_Checkbox(
$type .'not',
$name .' not',
diff --git a/src/usr/local/www/firewall_schedule_edit.php b/src/usr/local/www/firewall_schedule_edit.php
index c4a999d..ee9ab56 100644
--- a/src/usr/local/www/firewall_schedule_edit.php
+++ b/src/usr/local/www/firewall_schedule_edit.php
@@ -384,7 +384,7 @@ $section = new Form_Section('Schedule Information');
$input = new Form_Input(
'name',
- 'Schedule Name',
+ '*Schedule Name',
'text',
$pconfig['name']
);
@@ -413,11 +413,11 @@ $section->addInput(new Form_Select(
));
$section->addInput(new Form_StaticText(
- 'Date',
+ '*Date',
build_date_table()
));
-$group = new Form_Group('Time');
+$group = new Form_Group('*Time');
$group->add(new Form_Select(
'starttimehour',
diff --git a/src/usr/local/www/firewall_virtual_ip_edit.php b/src/usr/local/www/firewall_virtual_ip_edit.php
index fdb2186..a6ae2f4 100644
--- a/src/usr/local/www/firewall_virtual_ip_edit.php
+++ b/src/usr/local/www/firewall_virtual_ip_edit.php
@@ -359,7 +359,7 @@ $form = new Form();
$section = new Form_Section('Edit Virtual IP');
-$group = new Form_Group('Type');
+$group = new Form_Group('*Type');
$group->add(new Form_Checkbox(
'mode',
@@ -397,7 +397,7 @@ $section->add($group);
$section->addInput(new Form_Select(
'interface',
- 'Interface',
+ '*Interface',
$pconfig['interface'],
build_if_list()
));
@@ -414,7 +414,7 @@ $section->addInput(new Form_Select(
$section->addInput(new Form_IpAddress(
'subnet',
- 'Address(es)',
+ '*Address(es)',
$pconfig['subnet']
))->addMask('subnet_bits', $pconfig['subnet_bits'])->setHelp('<span id="address_note"></span>');
@@ -521,10 +521,14 @@ events.push(function() {
disableInput('password', true);
disableInput('password_confirm', true);
hideCheckbox('noexpand', true);
+ setRequired('password', false);
+ setRequired('vhid', false);
+ setRequired('advbase', false);
if (mode == 'ipalias') {
$('#address_note').html("<?=$ipaliashelp?>");
$('#type').val('single');
+ setRequired('type', false);
disableInput('subnet_bits', false);
} else if (mode == 'carp') {
@@ -536,13 +540,19 @@ events.push(function() {
disableInput('password_confirm', false);
disableInput('subnet_bits', false);
$('#type').val('single');
+ setRequired('type', false);
+ setRequired('password', true);
+ setRequired('vhid', true);
+ setRequired('advbase', true);
} else if (mode == 'proxyarp') {
$('#address_note').html("<?=$proxyarphelp?>");
disableInput('type', false);
+ setRequired('type', true);
disableInput('subnet_bits', ($('#type').val() == 'single'));
} else {
$('#address_note').html('');
disableInput('type', false);
+ setRequired('type', true);
disableInput('subnet_bits', ($('#type').val() == 'single'));
}
}
OpenPOWER on IntegriCloud