From 9f200d7172d2a1b76c7150c24e0688cae70593ff Mon Sep 17 00:00:00 2001 From: jim-p Date: Wed, 20 Oct 2010 21:00:22 -0400 Subject: Change OpenVPN wizard to set input_errors when there is a fatal condition that will require preventing a config save. --- usr/local/www/wizards/openvpn_wizard.inc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'usr/local/www/wizards/openvpn_wizard.inc') diff --git a/usr/local/www/wizards/openvpn_wizard.inc b/usr/local/www/wizards/openvpn_wizard.inc index 059d50d..35bca7c 100644 --- a/usr/local/www/wizards/openvpn_wizard.inc +++ b/usr/local/www/wizards/openvpn_wizard.inc @@ -185,7 +185,7 @@ function step6_submitphpaction() { } function step7_submitphpaction() { - global $stepid, $savemsg, $_POST, $config; + global $input_errors, $stepid, $savemsg, $_POST, $config; $canames = array(); $cacns = array(); @@ -205,7 +205,7 @@ function step7_submitphpaction() { } elseif (has_special_chars($_POST['country']) || has_special_chars($_POST['state']) || has_special_chars($_POST['city']) || has_special_chars($_POST['organization'])) { $stepid--; - $savemsg = "Please do not use special characters in Certificate Authority field names."; + $input_errors[] = "Please do not use special characters in Certificate field names."; } elseif (in_array($_POST['descr'], $canames) || in_array($_POST['descr'], $cacns)) { $stepid--; $savemsg = "Please enter a different name for the Certicicate Authority. A Certificate Authority with that name already exists."; @@ -275,7 +275,7 @@ function step9_stepbeforeformdisplay() { } function step9_submitphpaction() { - global $stepid, $savemsg, $_POST, $config; + global $input_errors, $stepid, $savemsg, $_POST, $config; $certnames = array(); $certcns = array(); @@ -295,7 +295,7 @@ function step9_submitphpaction() { } elseif (has_special_chars($_POST['country']) || has_special_chars($_POST['state']) || has_special_chars($_POST['city']) || has_special_chars($_POST['organization'])) { $stepid--; - $savemsg = "Please do not use special characters in Certificate field names."; + $input_errors[] = "Please do not use special characters in Certificate field names."; } elseif (in_array($_POST['descr'], $certnames) || in_array($_POST['descr'], $certcns)) { $stepid--; $savemsg = "Please enter a different name for the Certicicate. A Certificate with that name/common name already exists."; -- cgit v1.1