summaryrefslogtreecommitdiffstats
path: root/usr/local/www
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2010-03-18 15:56:44 +0000
committerErmal <eri@pfsense.org>2010-03-18 15:56:44 +0000
commita314bebc79a775d5a82aec18c6f38fb258c4bb98 (patch)
tree25db2864814ee35af5dc2a30bc3952206760b259 /usr/local/www
parent3b4b9ff3cf39b2655ed652d687dcb7f30556c29f (diff)
downloadpfsense-a314bebc79a775d5a82aec18c6f38fb258c4bb98.zip
pfsense-a314bebc79a775d5a82aec18c6f38fb258c4bb98.tar.gz
Actually get values from the CA based on what was choosen during wizard.
Diffstat (limited to 'usr/local/www')
-rwxr-xr-xusr/local/www/wizard.php28
-rw-r--r--usr/local/www/wizards/openvpn_wizard.inc2
-rw-r--r--usr/local/www/wizards/openvpn_wizard.xml1
3 files changed, 16 insertions, 15 deletions
diff --git a/usr/local/www/wizard.php b/usr/local/www/wizard.php
index 5415479..af57abd 100755
--- a/usr/local/www/wizard.php
+++ b/usr/local/www/wizard.php
@@ -86,7 +86,7 @@ if ($pkg['step'][$stepid]['includefile'])
require_once($pkg['step'][$stepid]['includefile']);
if($pkg['step'][$stepid]['stepsubmitbeforesave']) {
- eval($pkg['step'][$stepid]['stepsubmitbeforesave']);
+ eval($pkg['step'][$stepid]['stepsubmitbeforesave']);
}
if ($_POST) {
@@ -162,11 +162,12 @@ function update_config_field($field, $updatetext, $unset, $arraynum, $field_type
}
}
-if($pkg['step'][$stepid]['stepbeforeformdisplay'] <> "") {
- // handle before form display event.
- // good for modifying posted values, etc.
- eval($pkg['step'][$stepid]['stepbeforeformdisplay']);
-}
+// handle before form display event.
+do {
+ $oldstepid = $stepid;
+ if($pkg['step'][$stepid]['stepbeforeformdisplay'] <> "")
+ eval($pkg['step'][$stepid]['stepbeforeformdisplay']);
+} while ($oldstepid != $stepid);
$pgtitle = array($title);
include("head.inc");
@@ -332,14 +333,12 @@ function showchange() {
$field_split = split("->", $field['bindstofield']);
// arraynum is used in cases where there is an array of the same field
// name such as dnsserver (2 of them)
- if($field['arraynum'] <> "") $arraynum = "[" . $field['arraynum'] . "]";
- foreach ($field_split as $f) $field_conv .= "['" . $f . "']";
- $toeval = "\$value = \$config" . $field_conv . $arraynum . ";";
- eval($toeval);
- if ($field['type'] == "checkbox") {
- $toeval = "if(isset(\$config" . $field_conv . $arraynum . ")) \$value = \" CHECKED\";";
- eval($toeval);
- }
+ if($field['arraynum'] <> "")
+ $arraynum = "[" . $field['arraynum'] . "]";
+ foreach ($field_split as $f)
+ $field_conv .= "['" . $f . "']";
+ $toeval = "if (isset(\$config" . $field_conv . $arraynum . ")) \$value = \$config" . $field_conv . $arraynum . ";";
+ eval($toeval);
}
if(!$field['combinefieldsend'])
@@ -572,6 +571,7 @@ function showchange() {
echo "</option>\n";
}
echo "</select>\n";
+ echo "<!-- {$value} -->\n";
if($field['description'] <> "") {
echo $field['description'];
diff --git a/usr/local/www/wizards/openvpn_wizard.inc b/usr/local/www/wizards/openvpn_wizard.inc
index 7a8a03d..48eb7be 100644
--- a/usr/local/www/wizards/openvpn_wizard.inc
+++ b/usr/local/www/wizards/openvpn_wizard.inc
@@ -189,7 +189,7 @@ function step8_submitphpaction() {
}
function step9_stepbeforeformdisplay() {
- global $pkg, $stepid;
+ global $config, $pkg, $stepid;
$pconfig = $config['ovpnserver'];
diff --git a/usr/local/www/wizards/openvpn_wizard.xml b/usr/local/www/wizards/openvpn_wizard.xml
index 01b0f9e..ff7ca07 100644
--- a/usr/local/www/wizards/openvpn_wizard.xml
+++ b/usr/local/www/wizards/openvpn_wizard.xml
@@ -517,6 +517,7 @@
<type>submit</type>
</field>
</fields>
+ <stepbeforeformdisplay>step9_stepbeforeformdisplay();</stepbeforeformdisplay>
<stepsubmitphpaction>step9_submitphpaction();</stepsubmitphpaction>
<includefile>/usr/local/www/wizards/openvpn_wizard.inc</includefile>
</step>
OpenPOWER on IntegriCloud