summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2010-10-20 20:59:07 -0400
committerjim-p <jimp@pfsense.org>2010-10-20 20:59:07 -0400
commit27319e173b475f00e70a7256bb6ee47e6f376689 (patch)
tree13340b639a855b33ccc9060538d621894bf6c5cf /usr
parent8f87a4a2aa746a44b6bd5f0ef4b4eea63c7703de (diff)
downloadpfsense-27319e173b475f00e70a7256bb6ee47e6f376689.zip
pfsense-27319e173b475f00e70a7256bb6ee47e6f376689.tar.gz
Add a patch to wizard.php to support input_errors from sullrich (with some modifications).
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/www/wizard.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/usr/local/www/wizard.php b/usr/local/www/wizard.php
index 9a4a8fe..14a1802 100755
--- a/usr/local/www/wizard.php
+++ b/usr/local/www/wizard.php
@@ -92,7 +92,7 @@ if($pkg['step'][$stepid]['stepsubmitbeforesave']) {
eval($pkg['step'][$stepid]['stepsubmitbeforesave']);
}
-if ($_POST) {
+if ($_POST && !$input_errors) {
foreach ($pkg['step'][$stepid]['fields']['field'] as $field) {
if(!empty($field['bindstofield']) and $field['type'] <> "submit") {
$fieldname = $field['name'];
@@ -116,7 +116,8 @@ if ($_POST) {
if($pkg['step'][$stepid]['stepsubmitphpaction'] <> "") {
eval($pkg['step'][$stepid]['stepsubmitphpaction']);
}
- write_config();
+ if (!$input_errors)
+ write_config();
$stepid++;
if($stepid > $totalsteps)
$stepid = $totalsteps;
@@ -322,6 +323,8 @@ function showchange() {
<p>
<div style="width:800px;background-color:#ffffff" id="roundme">
<?php
+ if ($input_errors)
+ print_input_errors($input_errors);
if ($savemsg)
print_info_box($savemsg);
if ($_GET['message'] != "")
@@ -942,4 +945,3 @@ function is_timezone($elt) {
</body>
</html>
-
OpenPOWER on IntegriCloud