Commit 6c0c6b6b authored by Franco Fichtner's avatar Franco Fichtner

wizard: fix misalignment of titles

PR: https://forum.opnsense.org/index.php?topic=3305
parent 41b05365
...@@ -69,11 +69,13 @@ function find_ip_interface($ip, $bits = null) { ...@@ -69,11 +69,13 @@ function find_ip_interface($ip, $bits = null) {
} }
$stepid = htmlspecialchars($_GET['stepid']); $stepid = '0';
if (isset($_POST['stepid']))
if (isset($_POST['stepid'])) {
$stepid = htmlspecialchars($_POST['stepid']); $stepid = htmlspecialchars($_POST['stepid']);
if (!$stepid) } elseif (isset($_GET['stepid'])) {
$stepid = "0"; $stepid = htmlspecialchars($_GET['stepid']);
}
$xml = ''; $xml = '';
if (isset($_GET['xml'])) { if (isset($_GET['xml'])) {
...@@ -122,8 +124,6 @@ if (!is_array($pkg)) { ...@@ -122,8 +124,6 @@ if (!is_array($pkg)) {
die; die;
} }
$description = $pkg['step'][$stepid]['description'];
$title = $pkg['step'][$stepid]['title'];
$totalsteps = $pkg['totalsteps']; $totalsteps = $pkg['totalsteps'];
if ($pkg['includefile']) { if ($pkg['includefile']) {
...@@ -154,17 +154,26 @@ if ($_POST && !$input_errors) { ...@@ -154,17 +154,26 @@ if ($_POST && !$input_errors) {
} }
} }
// run custom php code embedded in xml config. // run custom php code embedded in xml config.
if($pkg['step'][$stepid]['stepsubmitphpaction'] <> "") { if($pkg['step'][$stepid]['stepsubmitphpaction'] <> "") {
eval($pkg['step'][$stepid]['stepsubmitphpaction']); eval($pkg['step'][$stepid]['stepsubmitphpaction']);
} }
if (!$input_errors)
if (!$input_errors) {
write_config(); write_config();
}
$stepid++; $stepid++;
if($stepid > $totalsteps)
if($stepid > $totalsteps) {
$stepid = $totalsteps; $stepid = $totalsteps;
}
} }
$description = $pkg['step'][$stepid]['description'];
$title = $pkg['step'][$stepid]['title'];
function update_config_field($field, $updatetext, $unset, $arraynum, $field_type) { function update_config_field($field, $updatetext, $unset, $arraynum, $field_type) {
global $config; global $config;
$field_split = explode("->",$field); $field_split = explode("->",$field);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment