diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-05-31 19:24:04 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-05-31 19:24:04 +0000 |
commit | 88481a774eadcb5ede73569bd2ac9263458c65b6 (patch) | |
tree | 219e2e6e0282dcadee4bd5bd2bf9706ae46ee900 /usr/local/www/wizard.php | |
parent | d2b26274d0651073f1c040e534bfc085ac235e73 (diff) | |
download | pfsense-88481a774eadcb5ede73569bd2ac9263458c65b6.zip pfsense-88481a774eadcb5ede73569bd2ac9263458c65b6.tar.gz |
If the field type is checkbox then set the value in config.xml to TRUE if its "on"
Diffstat (limited to 'usr/local/www/wizard.php')
-rwxr-xr-x | usr/local/www/wizard.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr/local/www/wizard.php b/usr/local/www/wizard.php index 5982568..55c02ae 100755 --- a/usr/local/www/wizard.php +++ b/usr/local/www/wizard.php @@ -99,6 +99,8 @@ $description = $pkg['step'][$stepid]['description']; function update_config_field($field, $updatetext, $unset, $arraynum) { global $config; + if($field['type'] == "checkbox" and $updatetext == "on") + $updatetext = TRUE; $field_split = split("->",$field); foreach ($field_split as $f) $field_conv .= "['" . $f . "']"; if($field_conv == "") return; @@ -185,7 +187,7 @@ function FieldValidate(userinput, regexp, message) foreach ($field_split as $f) $field_conv .= "['" . $f . "']"; $toeval = "\$value = \$config" . $field_conv . $arraynum . ";"; eval($toeval); - if ($field['type'] == "checkbox") { + if ($field['type'] == "x") { $toeval = "if(isset(\$config" . $field_conv . $arraynum . ")) \$value = \" CHECKED\";"; eval($toeval); } |