From 88481a774eadcb5ede73569bd2ac9263458c65b6 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Tue, 31 May 2005 19:24:04 +0000 Subject: If the field type is checkbox then set the value in config.xml to TRUE if its "on" --- usr/local/www/wizard.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'usr') 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); } -- cgit v1.1