diff options
author | Matt Smith <mgsmith@netgate.com> | 2015-11-11 15:46:56 -0600 |
---|---|---|
committer | Matt Smith <mgsmith@netgate.com> | 2015-11-11 15:48:43 -0600 |
commit | a5c51e9af4329a9ba635b109de9be6499ebab7a1 (patch) | |
tree | e8384d684da4b886f506a7febc53871eae640c87 | |
parent | fa1b0cb0bc4d1d4b4f41ad2438c3798795838de1 (diff) | |
download | pfsense-a5c51e9af4329a9ba635b109de9be6499ebab7a1.zip pfsense-a5c51e9af4329a9ba635b109de9be6499ebab7a1.tar.gz |
Make the unbound advanced page show input error messages and prompts to apply changes when they are made. Move statement that saves _POST to pconfig so that values are displayed correctly after you apply changes.
-rw-r--r-- | src/usr/local/www/services_unbound_advanced.php | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/usr/local/www/services_unbound_advanced.php b/src/usr/local/www/services_unbound_advanced.php index 3e648db..919b5e7 100644 --- a/src/usr/local/www/services_unbound_advanced.php +++ b/src/usr/local/www/services_unbound_advanced.php @@ -113,9 +113,6 @@ if (isset($config['unbound']['use_caps'])) { } if ($_POST) { - unset($input_errors); - $pconfig = $_POST; - if ($_POST['apply']) { $retval = services_unbound_configure(); $savemsg = get_std_save_message($retval); @@ -123,6 +120,9 @@ if ($_POST) { clear_subsystem_dirty('unbound'); } } else { + unset($input_errors); + $pconfig = $_POST; + if (isset($_POST['msgcachesize']) && !in_array($_POST['msgcachesize'], array('4', '10', '20', '50', '100', '250', '512'), true)) { $input_errors[] = "A valid value for Message Cache Size must be specified."; } @@ -226,6 +226,18 @@ $pgtitle = array(gettext("Services"), gettext("DNS Resolver"), gettext("Advanced $shortcut_section = "resolver"; include_once("head.inc"); +if ($input_errors) { + print_input_errors($input_errors); +} + +if ($savemsg) { + print_info_box($savemsg, 'success'); +} + +if (is_subsystem_dirty('unbound')) { + print_info_box_np(gettext("The configuration of the DNS Resolver has been changed. You must apply changes for them to take effect.")); +} + $tab_array = array(); $tab_array[] = array(gettext("General settings"), false, "services_unbound.php"); $tab_array[] = array(gettext("Advanced settings"), true, "services_unbound_advanced.php"); |