summaryrefslogtreecommitdiffstats
path: root/usr/local
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2010-03-10 22:57:52 +0000
committerErmal Luçi <eri@pfsense.org>2010-03-10 22:57:52 +0000
commit9b4e659a7f753e83be450684ac3d7fedd753790f (patch)
treea9318e2a88a984aa772c785c1f11e653d48d9d43 /usr/local
parent72a5f4246cbd0ab39f1581dbfd54066a8ea2febb (diff)
downloadpfsense-9b4e659a7f753e83be450684ac3d7fedd753790f.zip
pfsense-9b4e659a7f753e83be450684ac3d7fedd753790f.tar.gz
More fixes.
Diffstat (limited to 'usr/local')
-rw-r--r--usr/local/www/wizards/openvpn_wizard.inc42
-rw-r--r--usr/local/www/wizards/openvpn_wizard.xml11
2 files changed, 20 insertions, 33 deletions
diff --git a/usr/local/www/wizards/openvpn_wizard.inc b/usr/local/www/wizards/openvpn_wizard.inc
index d534a29..fb9da32 100644
--- a/usr/local/www/wizards/openvpn_wizard.inc
+++ b/usr/local/www/wizards/openvpn_wizard.inc
@@ -32,22 +32,20 @@ function step3_stepbeforeformdisplay() {
}
function step3_submitphpaction() {
+ global $stepid;
+
if (!$_POST['uselist'] && empty($_POST['authserv'])) {
$message = "Please choose an authentication server or create a new one.";
header("Location:wizard.php?xml=openvpn_wizard.xml&stepid=1&message={$message}");
exit;
} else if (!$_POST['uselist'] && !empty($_POST['authserv'])) {
- header("Location:wizard.php?xml=openvpn_wizard.xml&stepid=3");
- exit;
- }
-
- if (empty($_POST['name']) || empty($_POST['ip']) || empty($_POST['port']) ||
+ $stepid = 2;
+ } else if (empty($_POST['name']) || empty($_POST['ip']) || empty($_POST['port']) ||
empty($_POST['transport']) || empty($_POST['scope']) || empty($_POST['authscope']) || empty($_POST['nameattr'])) {
$message = "Please enter all information for authentication server.";
header("Location:wizard.php?xml=openvpn_wizard.xml&stepid=1&message={$message}");
exit;
}
-
}
function step4_stepbeforeformdisplay() {
@@ -69,69 +67,61 @@ function step4_stepbeforeformdisplay() {
}
function step4_submitphpaction() {
+ global $stepid;
+
if ($_POST['uselist'] == "yes" && !empty($_POST['authserv'])) {
$message = "Please choose an authentication server or create a new one.";
header("Location:wizard.php?xml=openvpn_wizard.xml&stepid=2&message={$message}");
exit;
} else if (!$_POST['uselist'] && !empty($_POST['authserv'])) {
- header("Location:wizard.php?xml=openvpn_wizard.xml&stepid=3");
- exit;
- }
-
- if (empty($_POST['name']) || empty($_POST['ip']) || empty($_POST['port']) ||
+ $stepid = 2;
+ } else if (empty($_POST['name']) || empty($_POST['ip']) || empty($_POST['port']) ||
empty($_POST['passowrd'])) {
$message = "Please enter all information for authentication server.";
header("Location:wizard.php?xml=openvpn_wizard.xml&stepid=2&message={$message}");
exit;
}
-
}
function step5_submitphpaction() {
+ global $stepid;
+
if ($_POST['uselist'] == "yes" && !empty($_POST['certca'])) {
$message = "Please choose an certificate authority or create a new one.";
header("Location:wizard.php?xml=openvpn_wizard.xml&stepid=3&message={$message}");
exit;
} else if (!$_POST['uselist'] && !empty($_POST['certca'])) {
- header("Location:wizard.php?xml=openvpn_wizard.xml&stepid=4");
- exit;
- }
-
- if (empty($_POST['name']) || empty($_POST['keylength']) || empty($_POST['lifetime']) ||
+ $stepid = 3;
+ } else if (empty($_POST['name']) || empty($_POST['keylength']) || empty($_POST['lifetime']) ||
empty($_POST['country']) || empty($_POST['state']) || empty($_POST['city']) ||
empty($_POST['organization']) || empty($_POST['email']) || empty($_POST['cn'])) {
$message = "Please enter all information for the new CA authority.";
header("Location:wizard.php?xml=openvpn_wizard.xml&stepid=3&message={$message}");
exit;
}
-
}
function step6_submitphpaction() {
+ global $stepid;
+
if ($_POST['uselist'] == "yes" && !empty($_POST['certname'])) {
$message = "Please choose an certificate or create a new one.";
header("Location:wizard.php?xml=openvpn_wizard.xml&stepid=4&message={$message}");
exit;
} else if (!$_POST['uselist'] && !empty($_POST['certname'])) {
- header("Location:wizard.php?xml=openvpn_wizard.xml&stepid=5");
- exit;
- }
-
- if (empty($_POST['name']) || empty($_POST['keylength']) || empty($_POST['lifetime']) ||
+ $stepid = 4;
+ } else if (empty($_POST['name']) || empty($_POST['keylength']) || empty($_POST['lifetime']) ||
empty($_POST['country']) || empty($_POST['state']) || empty($_POST['city']) ||
empty($_POST['organization']) || empty($_POST['email']) || empty($_POST['cn'])) {
$message = "Please enter all information for the new certificate.";
header("Location:wizard.php?xml=openvpn_wizard.xml&stepid=4&message={$message}");
exit;
}
-
}
function step7_submitphpaction() {
}
-function step8_submitphpaction() {
-}
function step9_submitphpaction() {
global $config;
diff --git a/usr/local/www/wizards/openvpn_wizard.xml b/usr/local/www/wizards/openvpn_wizard.xml
index 945c721..2e36763 100644
--- a/usr/local/www/wizards/openvpn_wizard.xml
+++ b/usr/local/www/wizards/openvpn_wizard.xml
@@ -86,7 +86,7 @@
<name>authserv</name>
<displayname>Authentication servers</displayname>
<type>select</type>
- <bindstofield>ovpnserver->step2->authtype</bindstofield>
+ <bindstofield>ovpnserver->step2->authserv</bindstofield>
<options>
<option>
<name>dummy</name>
@@ -202,7 +202,7 @@
<name>authserv</name>
<displayname>Authentication servers</displayname>
<type>select</type>
- <bindstofield>ovpnserver->step2->authtype</bindstofield>
+ <bindstofield>ovpnserver->step2->authserv</bindstofield>
<options>
<option>
<name>dummy</name>
@@ -270,7 +270,7 @@
<type>certca_selection</type>
<name>certca</name>
<displayname>Certificate Authority</displayname>
- <bindstofield>ovpnserver->step5->certca</bindstofield>
+ <bindstofield>ovpnserver->step5->authcertca</bindstofield>
</field>
<field>
<name>Next</name>
@@ -385,7 +385,7 @@
<type>cert_selection</type>
<name>certname</name>
<displayname>Certificate</displayname>
- <bindstofield>ovpnserver->step6->certname</bindstofield>
+ <bindstofield>ovpnserver->step6->authcertname</bindstofield>
</field>
<field>
<name>Next</name>
@@ -736,9 +736,6 @@
<type>submit</type>
</field>
</fields>
- <stepsubmitphpaction>step8_submitphpaction();</stepsubmitphpaction>
- <includefile>/usr/local/www/wizards/openvpn_wizard.inc</includefile>
- <javascriptafterformdisplay>enablechange();</javascriptafterformdisplay>
</step>
<step>
<id>8</id>
OpenPOWER on IntegriCloud