From bd31336e1e52cb9a943bae72c8b12ce6e476c1f7 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Mon, 4 Apr 2005 23:11:01 +0000 Subject: * Move indvidual xml subnet items to its own widget * Move indvidual xml time zones items to its own widget --- usr/local/www/wizard.php | 44 +- usr/local/www/wizards/setup_wizard.xml | 1903 +------------------------------- 2 files changed, 46 insertions(+), 1901 deletions(-) diff --git a/usr/local/www/wizard.php b/usr/local/www/wizard.php index 2700c90..4371eb4 100755 --- a/usr/local/www/wizard.php +++ b/usr/local/www/wizard.php @@ -50,7 +50,7 @@ if($xml == "") { print_info_box_np("ERROR: Could not open " . $xml . "."); die; } else { - if (file_exists("{$g['www_path']}/wizards/{$xml}")) + if (file_exists("{$g['www_path']}/wizards/{$xml}")) $pkg = parse_xml_config_pkg("{$g['www_path']}/wizards/" . $xml, "pfsensewizard"); else { print_info_box_np("ERROR: Could not open " . $xml . "."); @@ -62,6 +62,10 @@ $title = $pkg['step'][$stepid]['title']; $description = $pkg['step'][$stepid]['description']; $totalsteps = $pkg['totalsteps']; +exec('/usr/bin/tar -tzf /usr/share/zoneinfo.tgz', $timezonelist); +$timezonelist = array_filter($timezonelist, 'is_timezone'); +sort($timezonelist); + if($pkg['step'][$stepid]['stepsubmitbeforesave']) { eval($pkg['step'][$stepid]['stepsubmitbeforesave']); } @@ -252,6 +256,39 @@ function FieldValidate(userinput, regexp, message) } else if ($field['type'] == "listtopic") { echo " "; echo "" . $field['name'] . "
\n"; + } else if ($field['type'] == "subnet_select") { + if(!$field['dontdisplayname']) { + echo "\n"; + echo fixup_string($field['name']); + echo ":"; + } + if(!$field['dontcombinecells']) + echo ""; + echo "\n"; + } else if ($field['type'] == "timezone_select") { + if(!$field['dontdisplayname']) { + echo "\n"; + echo fixup_string($field['name']); + echo ":"; + } + if(!$field['dontcombinecells']) + echo ""; + echo "\n"; } else if ($field['type'] == "checkbox") { if(!$field['dontdisplayname']) { echo "\n"; @@ -376,5 +413,8 @@ function fixup_string($string) { return $newstring; } -?> +function is_timezone($elt) { + return !preg_match("/\/$/", $elt); +} +?> \ No newline at end of file diff --git a/usr/local/www/wizards/setup_wizard.xml b/usr/local/www/wizards/setup_wizard.xml index ae214e6..625f335 100644 --- a/usr/local/www/wizards/setup_wizard.xml +++ b/usr/local/www/wizards/setup_wizard.xml @@ -71,1650 +71,8 @@ Timezone - select - system->timezone - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + timezone_select + system->timezone Next @@ -1816,133 +174,7 @@ true Subnet Mask interfaces->wan->subnet - select - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + subnet_select Gateway @@ -2063,134 +295,7 @@ true pptplocalsubnet pptp->subnet - select - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + subnet_select PPTP Remote IP Address -- cgit v1.1