diff options
author | Phil Davis <phil.davis@inf.org> | 2017-01-30 15:12:39 +0545 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2017-01-30 10:25:46 -0200 |
commit | 57965f9b79ed0971cf2bf17161d7c0ec7af9f937 (patch) | |
tree | ce5089a61567726d46cfaf3f70d5ea71523fb15b /src/usr/local/www | |
parent | 19c25a5377dbdb6a1ea35c479038571b669e1df3 (diff) | |
download | pfsense-57965f9b79ed0971cf2bf17161d7c0ec7af9f937.zip pfsense-57965f9b79ed0971cf2bf17161d7c0ec7af9f937.tar.gz |
Required fields in Services pages
(cherry picked from commit 24b82516e0baac87316245427e870a36fbcda4ac)
Diffstat (limited to 'src/usr/local/www')
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 e1b1c7d..250bff5 100644 --- a/src/usr/local/www/services_checkip_edit.php +++ b/src/usr/local/www/services_checkip_edit.php @@ -157,14 +157,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 f2e3baf..5baf228 100644 --- a/src/usr/local/www/services_dhcp.php +++ b/src/usr/local/www/services_dhcp.php @@ -914,7 +914,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 d70961e..287fc37 100644 --- a/src/usr/local/www/services_dhcpv6.php +++ b/src/usr/local/www/services_dhcpv6.php @@ -662,7 +662,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 3acde07..ba35aae 100644 --- a/src/usr/local/www/services_dhcpv6_edit.php +++ b/src/usr/local/www/services_dhcpv6_edit.php @@ -245,7 +245,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 f4b270b..915955f 100644 --- a/src/usr/local/www/services_dhcpv6_relay.php +++ b/src/usr/local/www/services_dhcpv6_relay.php @@ -184,7 +184,7 @@ $section->addInput(new Form_Checkbox( $section->addInput(new Form_Select( 'interface', - 'Interface(s)', + '*Interface(s)', $pconfig['interface'], $iflist, true @@ -202,7 +202,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 782846a..a18b3c8 100644 --- a/src/usr/local/www/services_dnsmasq.php +++ b/src/usr/local/www/services_dnsmasq.php @@ -360,7 +360,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 70712f0..077bd94 100644 --- a/src/usr/local/www/services_dnsmasq_domainoverride_edit.php +++ b/src/usr/local/www/services_dnsmasq_domainoverride_edit.php @@ -163,7 +163,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 />' . @@ -171,7 +171,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 6708c0b..90dd343 100644 --- a/src/usr/local/www/services_dnsmasq_edit.php +++ b/src/usr/local/www/services_dnsmasq_edit.php @@ -236,7 +236,7 @@ $section->addInput(new Form_Input( $section->addInput(new Form_Input( 'domain', - 'Domain', + '*Domain', 'text', $pconfig['domain'] ))->setHelp('Domain of the host' . '<br />' . @@ -244,7 +244,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 6842a7e..fe86760 100644 --- a/src/usr/local/www/services_dyndns_edit.php +++ b/src/usr/local/www/services_dyndns_edit.php @@ -293,7 +293,7 @@ $section->addInput(new Form_Checkbox( $section->addInput(new Form_Select( 'type', - 'Service Type', + '*Service Type', $pconfig['type'], build_type_list() )); @@ -302,19 +302,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 c87c8e5..c6a270d 100644 --- a/src/usr/local/www/services_igmpproxy_edit.php +++ b/src/usr/local/www/services_igmpproxy_edit.php @@ -184,7 +184,7 @@ foreach ($iflist as $ifnam => $ifdescr) { $section->addInput(new Form_Select( 'ifname', - 'Interface', + '*Interface', $pconfig['ifname'], $optionlist )); @@ -198,7 +198,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 e7f48e1..569598b 100644 --- a/src/usr/local/www/services_pppoe_edit.php +++ b/src/usr/local/www/services_pppoe_edit.php @@ -331,7 +331,7 @@ $section->addInput(new Form_Checkbox( $section->addInput(new Form_Select( 'interface', - 'Interface', + '*Interface', $pconfig['interface'], build_interface_list() @@ -339,21 +339,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 />' . @@ -361,13 +361,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'); @@ -616,6 +616,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 @@ -625,6 +627,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 ce4fbb3..78d72e7 100644 --- a/src/usr/local/www/services_rfc2136_edit.php +++ b/src/usr/local/www/services_rfc2136_edit.php @@ -201,33 +201,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', @@ -257,7 +257,7 @@ $section->add($group); $section->addInput(new Form_Input( 'keydata', - 'Key', + '*Key', 'text', $pconfig['keydata'] ))->setHelp('Paste an HMAC-MD5 key here.'); @@ -283,7 +283,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 eaeeca1..a6c64c6 100644 --- a/src/usr/local/www/services_router_advertisements.php +++ b/src/usr/local/www/services_router_advertisements.php @@ -336,14 +336,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 16eb037..b463112 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 34765ca..4e55186 100644 --- a/src/usr/local/www/services_unbound.php +++ b/src/usr/local/www/services_unbound.php @@ -313,7 +313,7 @@ $activeiflist = build_if_list($pconfig['active_interface']); $section->addInput(new Form_Select( 'active_interface', - 'Network Interfaces', + '*Network Interfaces', $activeiflist['selected'], $activeiflist['options'], true @@ -324,7 +324,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 @@ -332,7 +332,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 36e6d40..e4f150d 100644 --- a/src/usr/local/www/services_unbound_acls.php +++ b/src/usr/local/www/services_unbound_acls.php @@ -260,7 +260,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); @@ -280,7 +280,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 4a9a332..d70bdc1 100644 --- a/src/usr/local/www/services_unbound_domainoverride_edit.php +++ b/src/usr/local/www/services_unbound_domainoverride_edit.php @@ -155,14 +155,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 5a5f944..3124343 100644 --- a/src/usr/local/www/services_unbound_host_edit.php +++ b/src/usr/local/www/services_unbound_host_edit.php @@ -251,7 +251,7 @@ $section->addInput(new Form_Input( $section->addInput(new Form_Input( 'domain', - 'Domain', + '*Domain', 'text', $pconfig['domain'] ))->setHelp('Domain of the host' . '<br />' . @@ -259,7 +259,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 4b732c3..6179d25 100644 --- a/src/usr/local/www/services_wol.php +++ b/src/usr/local/www/services_wol.php @@ -169,14 +169,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 66064d5..28ab5b0 100644 --- a/src/usr/local/www/services_wol_edit.php +++ b/src/usr/local/www/services_wol_edit.php @@ -162,14 +162,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')); |