From 05a13eba96b5d9bcb75750a37f174e8834e2b879 Mon Sep 17 00:00:00 2001 From: derelict-pf Date: Sun, 8 Jan 2017 18:03:04 -0800 Subject: Add requirestatefilter. Implements #7069. (cherry picked from commit 0a3150896bc412868cfb79473293ed81c87a50a7) --- src/etc/inc/pfsense-utils.inc | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/etc/inc/pfsense-utils.inc') diff --git a/src/etc/inc/pfsense-utils.inc b/src/etc/inc/pfsense-utils.inc index 9251f85..1df790b 100644 --- a/src/etc/inc/pfsense-utils.inc +++ b/src/etc/inc/pfsense-utils.inc @@ -398,6 +398,26 @@ function gen_user_settings_fields(&$section, $pconfig) { gen_pagenamefirst_field($section, $pconfig['pagenamefirst']); } +/****f* pfsense-utils/gen_requirestatefilter_field + * NAME + * gen_requirestatefilter_field + * INPUTS + * Pointer to section object + * Initial value for the field + * RESULT + * no return value, section object is updated + ******/ +function gen_requirestatefilter_field(&$section, $value) { + $section->addInput(new Form_Checkbox( + 'requirestatefilter', + 'Require State Filter', + 'Do not display state table without a filter', + $value + ))->setHelp('By default, the entire state table is displayed when entering '. + 'Diagnostics > States. This option requires a filter to be entered '. + 'before the states are displayed. Useful for systems with large state tables.'); +} + function hardware_offloading_applyflags($iface) { global $config; -- cgit v1.1