summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2017-01-30 15:12:39 +0545
committerPhil Davis <phil.davis@inf.org>2017-01-30 15:12:39 +0545
commit24b82516e0baac87316245427e870a36fbcda4ac (patch)
treefc8efd86284967135a8013c490bed7c9d451e232
parent47f2a4b9eb22ea6f1f6baad83e3786ecb53c5394 (diff)
downloadpfsense-24b82516e0baac87316245427e870a36fbcda4ac.zip
pfsense-24b82516e0baac87316245427e870a36fbcda4ac.tar.gz
Required fields in Services pages
-rw-r--r--src/usr/local/www/services_checkip_edit.php4
-rw-r--r--src/usr/local/www/services_dhcp.php2
-rw-r--r--src/usr/local/www/services_dhcpv6.php2
-rw-r--r--src/usr/local/www/services_dhcpv6_edit.php2
-rw-r--r--src/usr/local/www/services_dhcpv6_relay.php4
-rw-r--r--src/usr/local/www/services_dnsmasq.php2
-rw-r--r--src/usr/local/www/services_dnsmasq_domainoverride_edit.php4
-rw-r--r--src/usr/local/www/services_dnsmasq_edit.php4
-rw-r--r--src/usr/local/www/services_dyndns_edit.php8
-rw-r--r--src/usr/local/www/services_igmpproxy_edit.php4
-rw-r--r--src/usr/local/www/services_pppoe_edit.php16
-rw-r--r--src/usr/local/www/services_rfc2136_edit.php14
-rw-r--r--src/usr/local/www/services_router_advertisements.php4
-rw-r--r--src/usr/local/www/services_snmp.php22
-rw-r--r--src/usr/local/www/services_unbound.php6
-rw-r--r--src/usr/local/www/services_unbound_acls.php4
-rw-r--r--src/usr/local/www/services_unbound_domainoverride_edit.php4
-rw-r--r--src/usr/local/www/services_unbound_host_edit.php4
-rw-r--r--src/usr/local/www/services_wol.php4
-rw-r--r--src/usr/local/www/services_wol_edit.php4
20 files changed, 71 insertions, 47 deletions
diff --git a/src/usr/local/www/services_checkip_edit.php b/src/usr/local/www/services_checkip_edit.php
index fe4cad7..e2475fe 100644
--- a/src/usr/local/www/services_checkip_edit.php
+++ b/src/usr/local/www/services_checkip_edit.php
@@ -124,14 +124,14 @@ $section->addInput(new Form_Checkbox(
$section->addInput(new Form_Input(
'name',
- 'Name',
+ '*Name',
'text',
$pconfig['name']
))->setHelp('The name of the service may only consist of the characters "a-z, A-Z, 0-9 and _".');
$section->addInput(new Form_Input(
'url',
- 'URL',
+ '*URL',
'text',
$pconfig['url']
));
diff --git a/src/usr/local/www/services_dhcp.php b/src/usr/local/www/services_dhcp.php
index b62cd5d..81277fb 100644
--- a/src/usr/local/www/services_dhcp.php
+++ b/src/usr/local/www/services_dhcp.php
@@ -887,7 +887,7 @@ if ($is_olsr_enabled) {
));
}
-$group = new Form_Group('Range');
+$group = new Form_Group('*Range');
$group->add(new Form_IpAddress(
'range_from',
diff --git a/src/usr/local/www/services_dhcpv6.php b/src/usr/local/www/services_dhcpv6.php
index aed8e15..f120688 100644
--- a/src/usr/local/www/services_dhcpv6.php
+++ b/src/usr/local/www/services_dhcpv6.php
@@ -635,7 +635,7 @@ $f2 = new Form_Input(
$f2->setHelp('To');
-$group = new Form_Group('Range');
+$group = new Form_Group('*Range');
$group->add($f1);
$group->add($f2);
diff --git a/src/usr/local/www/services_dhcpv6_edit.php b/src/usr/local/www/services_dhcpv6_edit.php
index 43df90d..1c3b0bb 100644
--- a/src/usr/local/www/services_dhcpv6_edit.php
+++ b/src/usr/local/www/services_dhcpv6_edit.php
@@ -214,7 +214,7 @@ $section = new Form_Section('Static DHCPv6 Mapping');
$section->addInput(new Form_Input(
'duid',
- 'DUID',
+ '*DUID',
'text',
$pconfig['duid'],
['placeholder' => 'DUID-LLT - ETH -- TIME --- ---- address ---- xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx']
diff --git a/src/usr/local/www/services_dhcpv6_relay.php b/src/usr/local/www/services_dhcpv6_relay.php
index 8f4135b..516bca6 100644
--- a/src/usr/local/www/services_dhcpv6_relay.php
+++ b/src/usr/local/www/services_dhcpv6_relay.php
@@ -152,7 +152,7 @@ $section->addInput(new Form_Checkbox(
$section->addInput(new Form_Select(
'interface',
- 'Interface(s)',
+ '*Interface(s)',
$pconfig['interface'],
$iflist,
true
@@ -170,7 +170,7 @@ $section->addInput(new Form_Checkbox(
);
function createDestinationServerInputGroup($value = null) {
- $group = new Form_Group('Destination server');
+ $group = new Form_Group('*Destination server');
$group->add(new Form_IpAddress(
'server',
diff --git a/src/usr/local/www/services_dnsmasq.php b/src/usr/local/www/services_dnsmasq.php
index 2885edd..7221408 100644
--- a/src/usr/local/www/services_dnsmasq.php
+++ b/src/usr/local/www/services_dnsmasq.php
@@ -327,7 +327,7 @@ $iflist = build_if_list();
$section->addInput(new Form_Select(
'interface',
- 'Interfaces',
+ '*Interfaces',
$iflist['selected'],
$iflist['options'],
true
diff --git a/src/usr/local/www/services_dnsmasq_domainoverride_edit.php b/src/usr/local/www/services_dnsmasq_domainoverride_edit.php
index 9015588..6df731c 100644
--- a/src/usr/local/www/services_dnsmasq_domainoverride_edit.php
+++ b/src/usr/local/www/services_dnsmasq_domainoverride_edit.php
@@ -132,7 +132,7 @@ $section = new Form_Section('Domain Override Options');
$section->addInput(new Form_Input(
'domain',
- 'Domain',
+ '*Domain',
'text',
$pconfig['domain']
))->setHelp('Domain to override (NOTE: this does not have to be a valid TLD!)' . '<br />' .
@@ -140,7 +140,7 @@ $section->addInput(new Form_Input(
$section->addInput(new Form_IpAddress(
'ip',
- 'IP Address',
+ '*IP Address',
$pconfig['ip']
))->setPattern('[a-f0-9:.#!]*')
->setHelp('IP address of the authoritative DNS server for this domain' . '<br />' .
diff --git a/src/usr/local/www/services_dnsmasq_edit.php b/src/usr/local/www/services_dnsmasq_edit.php
index 3b5c3c5..ec27418 100644
--- a/src/usr/local/www/services_dnsmasq_edit.php
+++ b/src/usr/local/www/services_dnsmasq_edit.php
@@ -205,7 +205,7 @@ $section->addInput(new Form_Input(
$section->addInput(new Form_Input(
'domain',
- 'Domain',
+ '*Domain',
'text',
$pconfig['domain']
))->setHelp('Domain of the host' . '<br />' .
@@ -213,7 +213,7 @@ $section->addInput(new Form_Input(
$section->addInput(new Form_IpAddress(
'ip',
- 'IP Address',
+ '*IP Address',
$pconfig['ip']
))->setHelp('IP address of the host' . '<br />' .
'e.g.: 192.168.100.100 or fd00:abcd::1');
diff --git a/src/usr/local/www/services_dyndns_edit.php b/src/usr/local/www/services_dyndns_edit.php
index 6165586..a385326 100644
--- a/src/usr/local/www/services_dyndns_edit.php
+++ b/src/usr/local/www/services_dyndns_edit.php
@@ -262,7 +262,7 @@ $section->addInput(new Form_Checkbox(
$section->addInput(new Form_Select(
'type',
- 'Service Type',
+ '*Service Type',
$pconfig['type'],
build_type_list()
));
@@ -271,19 +271,19 @@ $interfacelist = build_if_list();
$section->addInput(new Form_Select(
'interface',
- 'Interface to monitor',
+ '*Interface to monitor',
$pconfig['interface'],
$interfacelist
));
$section->addInput(new Form_Select(
'requestif',
- 'Interface to send update from',
+ '*Interface to send update from',
$pconfig['requestif'],
$interfacelist
))->setHelp('This is almost always the same as the Interface to Monitor. ');
-$group = new Form_Group('Hostname');
+$group = new Form_Group('*Hostname');
$group->add(new Form_Input(
'host',
diff --git a/src/usr/local/www/services_igmpproxy_edit.php b/src/usr/local/www/services_igmpproxy_edit.php
index c68890d..c28c5f5 100644
--- a/src/usr/local/www/services_igmpproxy_edit.php
+++ b/src/usr/local/www/services_igmpproxy_edit.php
@@ -153,7 +153,7 @@ foreach ($iflist as $ifnam => $ifdescr) {
$section->addInput(new Form_Select(
'ifname',
- 'Interface',
+ '*Interface',
$pconfig['ifname'],
$optionlist
));
@@ -167,7 +167,7 @@ $section->addInput(new Form_Input(
$section->addInput(new Form_Select(
'type',
- 'Type',
+ '*Type',
$pconfig['type'],
['upstream' => gettext('Upstream Interface'), 'downstream' => gettext('Downstream Interface')]
))->setHelp('The upstream network interface is the outgoing interface which is responsible for communicating to available multicast data sources. ' .
diff --git a/src/usr/local/www/services_pppoe_edit.php b/src/usr/local/www/services_pppoe_edit.php
index 832b673..ebc3093 100644
--- a/src/usr/local/www/services_pppoe_edit.php
+++ b/src/usr/local/www/services_pppoe_edit.php
@@ -300,7 +300,7 @@ $section->addInput(new Form_Checkbox(
$section->addInput(new Form_Select(
'interface',
- 'Interface',
+ '*Interface',
$pconfig['interface'],
build_interface_list()
@@ -308,21 +308,21 @@ $section->addInput(new Form_Select(
$section->addInput(new Form_Select(
'n_pppoe_units',
- 'Total User Count',
+ '*Total User Count',
$pconfig['n_pppoe_units'],
array_combine(range(1, 255, 1), range(1, 255, 1))
))->setHelp('The number of PPPoE users allowed to connect to this server simultaneously.');
$section->addInput(new Form_Select(
'n_pppoe_maxlogin',
- 'User Max Logins',
+ '*User Max Logins',
$pconfig['n_pppoe_maxlogin'],
array_combine(range(1, 255, 1), range(1, 255, 1))
))->setHelp('The number of times a single user may be logged in at the same time.');
$section->addInput(new Form_IpAddress(
'localip',
- 'Server Address',
+ '*Server Address',
$pconfig['localip']
))->setHelp('Enter the IP address the PPPoE server should give to clients for use as their "gateway".' . '<br />' .
'Typically this is set to an unused IP just outside of the client range.'. '<br />' .
@@ -330,13 +330,13 @@ $section->addInput(new Form_IpAddress(
$section->addInput(new Form_IpAddress(
'remoteip',
- 'Remote Address Range',
+ '*Remote Address Range',
$pconfig['remoteip']
))->setHelp('Specify the starting address for the client IP address subnet.');
$section->addInput(new Form_Select(
'pppoe_subnet',
- 'Subnet mask',
+ '*Subnet mask',
$pconfig['pppoe_subnet'],
array_combine(range(0, 32, 1), range(0, 32, 1))
))->setHelp('Hint: 24 is 255.255.255.0');
@@ -585,6 +585,8 @@ events.push(function() {
disableInput('radius_nasip', hide);
disableInput('radius_acct_update', hide);
disableInput('radiussecenable', hide);
+ setRequired('radiusserver', !hide);
+ setRequired('radiussecret', !hide);
hide_radius2(hide);
}
// show/hide radius server 2 controls
@@ -594,6 +596,8 @@ events.push(function() {
disableInput('radiussecret2_confirm', hide);
disableInput('radiusserver2port', hide);
disableInput('radiusserver2acctport', hide);
+ setRequired('radiusserver2', !hide);
+ setRequired('radiussecret2', !hide);
}
// When the RADIUS checkbox is clicked . .
diff --git a/src/usr/local/www/services_rfc2136_edit.php b/src/usr/local/www/services_rfc2136_edit.php
index add0f8e..8da130d 100644
--- a/src/usr/local/www/services_rfc2136_edit.php
+++ b/src/usr/local/www/services_rfc2136_edit.php
@@ -170,33 +170,33 @@ $iflist = build_if_list();
$section->addInput(new Form_Select(
'interface',
- 'Interface',
+ '*Interface',
$pconfig['interface'],
$iflist
));
$section->addInput(new Form_Input(
'host',
- 'Hostname',
+ '*Hostname',
'text',
$pconfig['host']
))->setHelp('Fully qualified hostname of the host to be updated.');
$section->addInput(new Form_Input(
'ttl',
- 'TTL (seconds)',
+ '*TTL (seconds)',
'number',
$pconfig['ttl']
));
$section->addInput(new Form_Input(
'keyname',
- 'Key name',
+ '*Key name',
'text',
$pconfig['keyname']
))->setHelp('This must match the setting on the DNS server.');
-$group = new Form_Group('Key Type');
+$group = new Form_Group('*Key Type');
$group->add(new Form_Checkbox(
'keytype',
@@ -226,7 +226,7 @@ $section->add($group);
$section->addInput(new Form_Input(
'keydata',
- 'Key',
+ '*Key',
'text',
$pconfig['keydata']
))->setHelp('Paste an HMAC-MD5 key here.');
@@ -252,7 +252,7 @@ $section->addInput(new Form_Checkbox(
$pconfig['usepublicip']
));
-$group = new Form_Group('Record Type');
+$group = new Form_Group('*Record Type');
$group->add(new Form_Checkbox(
'recordtype',
diff --git a/src/usr/local/www/services_router_advertisements.php b/src/usr/local/www/services_router_advertisements.php
index 2c6f13c..c9aeaa5 100644
--- a/src/usr/local/www/services_router_advertisements.php
+++ b/src/usr/local/www/services_router_advertisements.php
@@ -312,14 +312,14 @@ $section = new Form_Section('Advertisements');
$section->addInput(new Form_Select(
'ramode',
- 'Router mode',
+ '*Router mode',
$pconfig['ramode'],
$advertise_modes
))->setHelp($ramode_help);
$section->addInput(new Form_Select(
'rapriority',
- 'Router priority',
+ '*Router priority',
$pconfig['rapriority'],
$priority_modes
))->setHelp('Select the Priority for the Router Advertisement (RA) Daemon.');
diff --git a/src/usr/local/www/services_snmp.php b/src/usr/local/www/services_snmp.php
index 0811cc9..1947740 100644
--- a/src/usr/local/www/services_snmp.php
+++ b/src/usr/local/www/services_snmp.php
@@ -378,8 +378,21 @@ events.push(function() {
noMibii = false;
$('#junk').hide();
+ enableChange();
+ trapenableChange();
hostresChange();
+ function enableChange() {
+ setRequired('pollport', $('#enable').prop('checked'));
+ setRequired('rocommunity', $('#enable').prop('checked'));
+ }
+
+ function trapenableChange() {
+ setRequired('trapserver', $('#trapenable').prop('checked'));
+ setRequired('trapserverport', $('#trapenable').prop('checked'));
+ setRequired('trapstring', $('#trapenable').prop('checked'));
+ }
+
function hostresChange() {
if ($('#hostres').prop('checked')) {
$('#mibii').prop('checked', true);
@@ -389,11 +402,18 @@ events.push(function() {
}
}
+ $('#enable').change(function() {
+ enableChange();
+ });
+
+ $('#trapenable').change(function() {
+ trapenableChange();
+ });
+
$('#hostres').change(function() {
hostresChange();
});
-
$('#mibii').change(function() {
if (noMibii) {
$('#mibii').prop('checked', 'true');
diff --git a/src/usr/local/www/services_unbound.php b/src/usr/local/www/services_unbound.php
index ecc64d2..93f4b7e 100644
--- a/src/usr/local/www/services_unbound.php
+++ b/src/usr/local/www/services_unbound.php
@@ -282,7 +282,7 @@ $activeiflist = build_if_list($pconfig['active_interface']);
$section->addInput(new Form_Select(
'active_interface',
- 'Network Interfaces',
+ '*Network Interfaces',
$activeiflist['selected'],
$activeiflist['options'],
true
@@ -293,7 +293,7 @@ $outiflist = build_if_list($pconfig['outgoing_interface']);
$section->addInput(new Form_Select(
'outgoing_interface',
- 'Outgoing Network Interfaces',
+ '*Outgoing Network Interfaces',
$outiflist['selected'],
$outiflist['options'],
true
@@ -301,7 +301,7 @@ $section->addInput(new Form_Select(
$section->addInput(new Form_Select(
'system_domain_local_zone_type',
- 'System Domain Local Zone Type',
+ '*System Domain Local Zone Type',
$pconfig['system_domain_local_zone_type'],
unbound_local_zone_types()
))->setHelp('The local-zone type used for the pfSense system domain (System | General Setup | Domain). Transparent is the default. Local-Zone type descriptions are available in the unbound.conf(5) manual pages.');
diff --git a/src/usr/local/www/services_unbound_acls.php b/src/usr/local/www/services_unbound_acls.php
index 89e2a3a..42ab941 100644
--- a/src/usr/local/www/services_unbound_acls.php
+++ b/src/usr/local/www/services_unbound_acls.php
@@ -229,7 +229,7 @@ if ($act == "new" || $act == "edit") {
$section->addInput(new Form_Select(
'aclaction',
- 'Action',
+ '*Action',
strtolower($pconfig['aclaction']),
array('allow' => gettext('Allow'), 'deny' => gettext('Deny'), 'refuse' => gettext('Refuse'), 'allow snoop' => gettext('Allow Snoop'), 'deny nonlocal' => gettext('Deny Nonlocal'), 'refuse nonlocal' => gettext('Refuse Nonlocal'))
))->setHelp($actionHelp);
@@ -249,7 +249,7 @@ if ($act == "new" || $act == "edit") {
$cidr = $item['mask'];
$description = $item['description'];
- $group = new Form_Group($counter == 0 ? 'Networks':'');
+ $group = new Form_Group($counter == 0 ? '*Networks':'');
$group->add(new Form_IpAddress(
'acl_network'.$counter,
diff --git a/src/usr/local/www/services_unbound_domainoverride_edit.php b/src/usr/local/www/services_unbound_domainoverride_edit.php
index 0b40329..4268186 100644
--- a/src/usr/local/www/services_unbound_domainoverride_edit.php
+++ b/src/usr/local/www/services_unbound_domainoverride_edit.php
@@ -124,14 +124,14 @@ $section = new Form_Section('Domain Override');
$section->addInput(new Form_Input(
'domain',
- 'Domain',
+ '*Domain',
'text',
$pconfig['domain']
))->setHelp('Domain to override (NOTE: this does not have to be a valid TLD!) e.g.: test or mycompany.localdomain or 1.168.192.in-addr.arpa');
$section->addInput(new Form_IpAddress(
'ip',
- 'IP Address',
+ '*IP Address',
$pconfig['ip']
))->setHelp('IP address of the authoritative DNS server for this domain. e.g.: 192.168.100.100' . '<br />' .
'To use a non-default port for communication, append an \'@\' with the port number.')->setPattern('[a-zA-Z0-9@.:]+');
diff --git a/src/usr/local/www/services_unbound_host_edit.php b/src/usr/local/www/services_unbound_host_edit.php
index 6942c11..173c563 100644
--- a/src/usr/local/www/services_unbound_host_edit.php
+++ b/src/usr/local/www/services_unbound_host_edit.php
@@ -220,7 +220,7 @@ $section->addInput(new Form_Input(
$section->addInput(new Form_Input(
'domain',
- 'Domain',
+ '*Domain',
'text',
$pconfig['domain']
))->setHelp('Domain of the host' . '<br />' .
@@ -228,7 +228,7 @@ $section->addInput(new Form_Input(
$section->addInput(new Form_IpAddress(
'ip',
- 'IP Address',
+ '*IP Address',
$pconfig['ip']
))->setHelp('IP address of the host' . '<br />' .
'e.g.: 192.168.100.100 or fd00:abcd::1');
diff --git a/src/usr/local/www/services_wol.php b/src/usr/local/www/services_wol.php
index 7aefd0b..8e84b27 100644
--- a/src/usr/local/www/services_wol.php
+++ b/src/usr/local/www/services_wol.php
@@ -137,14 +137,14 @@ $section = new Form_Section('Wake-on-LAN');
$section->addInput(new Form_Select(
'interface',
- 'Interface',
+ '*Interface',
(link_interface_to_bridge($if) ? null : $if),
get_configured_interface_with_descr()
))->setHelp('Choose which interface the host to be woken up is connected to.');
$section->addInput(new Form_Input(
'mac',
- 'MAC address',
+ '*MAC address',
'text',
$mac
))->setHelp(gettext('Enter a MAC address in the following format: xx:xx:xx:xx:xx:xx'));
diff --git a/src/usr/local/www/services_wol_edit.php b/src/usr/local/www/services_wol_edit.php
index b93aab5..e549e22 100644
--- a/src/usr/local/www/services_wol_edit.php
+++ b/src/usr/local/www/services_wol_edit.php
@@ -131,14 +131,14 @@ $section = new Form_Section('Edit WOL Entry');
$section->addInput(new Form_Select(
'interface',
- 'Interface',
+ '*Interface',
(link_interface_to_bridge($pconfig['interface']) ? null : $pconfig['interface']),
get_configured_interface_with_descr()
))->setHelp('Choose which interface this host is connected to.');
$section->addInput(new Form_Input(
'mac',
- 'MAC address',
+ '*MAC address',
'text',
$pconfig['mac']
))->setHelp(gettext('Enter a MAC address in the following format: xx:xx:xx:xx:xx:xx'));
OpenPOWER on IntegriCloud