diff --git a/setup/setuppage.class.inc.php b/setup/setuppage.class.inc.php index 9001ed131..591f1755c 100644 --- a/setup/setuppage.class.inc.php +++ b/setup/setuppage.class.inc.php @@ -37,13 +37,13 @@ SetupLog::Enable(APPROOT.'/log/setup.log'); */ class SetupPage extends NiceWebPage { - public function __construct($sTitle) - { - parent::__construct($sTitle); - $this->add_linked_script("../js/jquery.blockUI.js"); - $this->add_linked_script("../setup/setup.js"); - $this->add_style( - <<add_linked_script("../js/jquery.blockUI.js"); + $this->add_linked_script("../setup/setup.js"); + $this->add_style( + <<GetAbsoluteUrlAppRoot().utils::GetCurrentEnvironment(); @@ -196,7 +196,7 @@ CSS /** * Overriden because the application is not fully loaded when the setup is being run - */ + */ function GetApplicationContext() { return ''; @@ -207,29 +207,29 @@ CSS $this->add("

$sText

\n"); $this->log_info($sText); } - + public function ok($sText) { $this->add("

$sText

\n"); $this->log_ok($sText); } - + public function warning($sText) { $this->add("

$sText

\n"); $this->log_warning($sText); } - + public function error($sText) { $this->add("

$sText

\n"); $this->log_error($sText); } - + public function form($aData) { $this->add("\n"); - foreach($aData as $aRow) + foreach ($aData as $aRow) { $this->add("\n"); if (isset($aRow['label']) && isset($aRow['input']) && isset($aRow['help'])) @@ -238,47 +238,58 @@ CSS $this->add("\n"); $this->add("\n"); } - else if (isset($aRow['label']) && isset($aRow['help'])) + else { - $this->add("\n"); - $this->add("\n"); - } - else if (isset($aRow['label']) && isset($aRow['input'])) - { - $this->add("\n"); - $this->add("\n"); - } - else if (isset($aRow['label'])) - { - $this->add("\n"); + if (isset($aRow['label']) && isset($aRow['help'])) + { + $this->add("\n"); + $this->add("\n"); + } + else + { + if (isset($aRow['label']) && isset($aRow['input'])) + { + $this->add("\n"); + $this->add("\n"); + } + else + { + if (isset($aRow['label'])) + { + $this->add("\n"); + } + } + } } $this->add("\n"); } $this->add("
{$aRow['input']}{$aRow['help']}{$aRow['label']}{$aRow['help']}{$aRow['label']}{$aRow['input']}{$aRow['label']}{$aRow['label']}{$aRow['help']}{$aRow['label']}{$aRow['input']}{$aRow['label']}
\n"); } - + public function collapsible($sId, $sTitle, $aItems, $bOpen = true) { $this->add("

$sTitle

"); $this->p(''); $this->add_ready_script("$('#{$sId}').click( function() { $(this).toggleClass('open'); $('#{$sId}_list').toggle();} );\n"); if (!$bOpen) { $this->add_ready_script("$('#{$sId}').toggleClass('open'); $('#{$sId}_list').toggle();\n"); - } + } } - + public function output() { - $this->s_content = "

 ".htmlentities($this->s_title, ENT_QUOTES, 'UTF-8')."

\n
{$this->s_content}\n
\n"; + $this->s_content = "

 ".htmlentities($this->s_title, + ENT_QUOTES, 'UTF-8')."

\n
{$this->s_content}\n
\n"; + return parent::output(); } - + public static function log_error($sText) { SetupLog::Error($sText);