diff options
Diffstat (limited to 'views/installation/install')
| -rw-r--r-- | views/installation/install/footer.php | 10 | ||||
| -rw-r--r-- | views/installation/install/forms/admin.php | 19 | ||||
| -rw-r--r-- | views/installation/install/forms/database.php | 19 | ||||
| -rw-r--r-- | views/installation/install/forms/settings.php | 19 | ||||
| -rw-r--r-- | views/installation/install/forms/template.php | 42 | ||||
| -rw-r--r-- | views/installation/install/header.php | 8 | ||||
| -rw-r--r-- | views/installation/install/js_rewrite_check.php | 12 | ||||
| -rw-r--r-- | views/installation/install/nav.php | 8 | ||||
| -rw-r--r-- | views/installation/install/pages/admin.php | 13 | ||||
| -rw-r--r-- | views/installation/install/pages/complete.php | 4 | ||||
| -rw-r--r-- | views/installation/install/pages/database.php | 16 | ||||
| -rw-r--r-- | views/installation/install/pages/requirements.php | 10 | ||||
| -rw-r--r-- | views/installation/install/pages/settings.php | 13 | ||||
| -rw-r--r-- | views/installation/install/pages/welcome.php | 2 | ||||
| -rw-r--r-- | views/installation/install/sidebar.php | 26 |
15 files changed, 59 insertions, 162 deletions
diff --git a/views/installation/install/footer.php b/views/installation/install/footer.php deleted file mode 100644 index 69cd27f66..000000000 --- a/views/installation/install/footer.php +++ /dev/null @@ -1,10 +0,0 @@ -<?php -/** - * Install footer - offers help links - */ -?> -<ul> - <li><a href="http://docs.elgg.org/wiki/Installation">Install instructions</a></li> - <li><a href="http://docs.elgg.org/wiki/Install_Troubleshooting">Install troubleshooting</a></li> - <li><a href="http://community.elgg.org/pg/groups/world/">Elgg community forums</a></li> -</ul>
\ No newline at end of file diff --git a/views/installation/install/forms/admin.php b/views/installation/install/forms/admin.php deleted file mode 100644 index 1ecb389a3..000000000 --- a/views/installation/install/forms/admin.php +++ /dev/null @@ -1,19 +0,0 @@ -<?php -/** - * Admin account form - * - * @uses $vars['variables'] Array of form variables. See ElggInstaller. - */ - -$vars['type'] = 'admin'; -$form_body = elgg_view('install/forms/template', $vars); - -$url = current_page_url(); - -$params = array( - 'body' => $form_body, - 'action' => $url, - 'disable_security' => TRUE, - 'js' => 'onsubmit="return elggCheckFormSubmission()"', -); -echo elgg_view('input/form', $params); diff --git a/views/installation/install/forms/database.php b/views/installation/install/forms/database.php deleted file mode 100644 index 0e798db09..000000000 --- a/views/installation/install/forms/database.php +++ /dev/null @@ -1,19 +0,0 @@ -<?php -/** - * Database form - * - * @uses $vars['variables'] Array of form variables. See ElggInstaller. - */ - -$vars['type'] = 'database'; -$form_body = elgg_view('install/forms/template', $vars); - -$url = current_page_url(); - -$params = array( - 'body' => $form_body, - 'action' => $url, - 'disable_security' => TRUE, - 'js' => 'onsubmit="return elggCheckFormSubmission()"', -); -echo elgg_view('input/form', $params); diff --git a/views/installation/install/forms/settings.php b/views/installation/install/forms/settings.php deleted file mode 100644 index e9a818b92..000000000 --- a/views/installation/install/forms/settings.php +++ /dev/null @@ -1,19 +0,0 @@ -<?php -/** - * Site settings form - * - * @uses $vars['variables'] Array of form variables. See ElggInstaller. - */ - -$vars['type'] = 'settings'; -$form_body = elgg_view('install/forms/template', $vars); - -$url = current_page_url(); - -$params = array( - 'body' => $form_body, - 'action' => $url, - 'disable_security' => TRUE, - 'js' => 'onsubmit="return elggCheckFormSubmission()"', -); -echo elgg_view('input/form', $params); diff --git a/views/installation/install/forms/template.php b/views/installation/install/forms/template.php deleted file mode 100644 index 626bfc6c8..000000000 --- a/views/installation/install/forms/template.php +++ /dev/null @@ -1,42 +0,0 @@ -<?php -/** - * Generic form template for install forms - * - * @uses $vars['variables'] - * @uses $vars['type'] Type of form: admin, database, settings - */ - -$variables = $vars['variables']; -$type = $vars['type']; - -$form_body = ''; -foreach ($variables as $field => $params) { - $label = elgg_echo("install:$type:label:$field"); - $help = elgg_echo("install:$type:help:$field"); - $params['internalname'] = $field; - - $form_body .= '<p>'; - $form_body .= "<label>$label</label>"; - $form_body .= elgg_view("input/{$params['type']}", $params); - $form_body .= "<span class=\"install-help\">$help</span>"; - $form_body .= '</p>'; -} - -$submit_params = array( - 'value' => elgg_echo('next'), -); -$form_body .= elgg_view('input/submit', $submit_params); - -echo $form_body; - -?> -<script type="text/javascript"> - var was_submitted = false; - function elggCheckFormSubmission() { - if (was_submitted == false) { - was_submitted = true; - return true; - } - return false; - } -</script> diff --git a/views/installation/install/header.php b/views/installation/install/header.php deleted file mode 100644 index 8c18dbffd..000000000 --- a/views/installation/install/header.php +++ /dev/null @@ -1,8 +0,0 @@ -<?php -/** - * Install header - */ - -$url = elgg_get_site_url()."_graphics/elgg_logo.png"; -?> -<img src="<?php echo $url; ?>" alt="Elgg" /> diff --git a/views/installation/install/js_rewrite_check.php b/views/installation/install/js_rewrite_check.php new file mode 100644 index 000000000..04d81171d --- /dev/null +++ b/views/installation/install/js_rewrite_check.php @@ -0,0 +1,12 @@ +<?php +/** + * Some servers don't allow PHP to check the rewrite, so try via AJAX + */ +?> +<script type="text/javascript"> + elgg.installer.rewriteTest( + '<?php echo $vars['url'];?>', + '<?php echo elgg_echo('install:check:rewrite:success'); ?>', + '<?php echo $vars['config']->wwwroot; ?>install.php?step=database' + ); +</script>
\ No newline at end of file diff --git a/views/installation/install/nav.php b/views/installation/install/nav.php index 1ecc07d1c..c150cb2cb 100644 --- a/views/installation/install/nav.php +++ b/views/installation/install/nav.php @@ -12,22 +12,22 @@ // has a refresh button been requested $refresh = ''; if (isset($vars['refresh']) && $vars['refresh']) { - $refresh_text = elgg_echo('Refresh'); + $refresh_text = elgg_echo('install:refresh'); $refresh = "<a href=\"\">$refresh_text</a>"; } // create next button and selectively disable -$next_text = elgg_echo('next'); +$next_text = elgg_echo('install:next'); $next_link = elgg_get_site_url()."install.php?step={$vars['next_step']}"; $next = "<a href=\"$next_link\">$next_text</a>"; if (isset($vars['advance']) && !$vars['advance']) { // disable the next button - $next = "<a class=\"disabled\">$next_text</a>"; + $next = "<a class=\"elgg-state-disabled\">$next_text</a>"; } echo <<<___END -<div class="install-nav"> +<div class="elgg-install-nav"> $next $refresh </div> diff --git a/views/installation/install/pages/admin.php b/views/installation/install/pages/admin.php index 1fdd5dced..e810aa701 100644 --- a/views/installation/install/pages/admin.php +++ b/views/installation/install/pages/admin.php @@ -3,6 +3,15 @@ * Install create admin account page */ -echo autop(elgg_echo('install:admin:instructions')); +echo elgg_autop(elgg_echo('install:admin:instructions')); -echo elgg_view('install/forms/admin', $vars); +$vars['type'] = 'admin'; + +$url = current_page_url(); + +$form_vars = array( + 'action' => $url, + 'disable_security' => TRUE, +); + +echo elgg_view_form('install/template', $form_vars, $vars); diff --git a/views/installation/install/pages/complete.php b/views/installation/install/pages/complete.php index 0c9821fc2..80f8e7434 100644 --- a/views/installation/install/pages/complete.php +++ b/views/installation/install/pages/complete.php @@ -3,11 +3,11 @@ * Install completion page */ -echo autop(elgg_echo('install:complete:instructions')); +echo elgg_autop(elgg_echo('install:complete:instructions')); ?> -<div class="install-nav"> +<div class="elgg-install-nav"> <?php $url = elgg_get_site_url() . $vars['destination']; $text = elgg_echo('install:complete:gotosite'); diff --git a/views/installation/install/pages/database.php b/views/installation/install/pages/database.php index 7765c6e48..d24b4f57b 100644 --- a/views/installation/install/pages/database.php +++ b/views/installation/install/pages/database.php @@ -6,11 +6,21 @@ */ if (isset($vars['failure']) && $vars['failure']) { - echo autop(elgg_echo('install:database:error')); + echo elgg_autop(elgg_echo('install:database:error')); $vars['refresh'] = TRUE; $vars['advance'] = FALSE; echo elgg_view('install/nav', $vars); } else { - echo autop(elgg_echo('install:database:instructions')); - echo elgg_view('install/forms/database', $vars); + echo elgg_autop(elgg_echo('install:database:instructions')); + + $vars['type'] = 'database'; + + $url = current_page_url(); + + $form_vars = array( + 'action' => $url, + 'disable_security' => TRUE, + ); + + echo elgg_view_form('install/template', $form_vars, $vars); }
\ No newline at end of file diff --git a/views/installation/install/pages/requirements.php b/views/installation/install/pages/requirements.php index b6516840f..3f0941c95 100644 --- a/views/installation/install/pages/requirements.php +++ b/views/installation/install/pages/requirements.php @@ -14,26 +14,26 @@ if ($vars['num_failures'] != 0) { $instruct_text = elgg_echo('install:requirements:instructions:success'); } -echo autop($instruct_text); +echo elgg_autop($instruct_text); $report = $vars['report']; foreach ($report as $category => $checks) { $title = elgg_echo("install:require:$category"); echo "<h3>$title</h3>"; - echo "<ul>"; + echo "<ul class=\"elgg-require-$category\">"; foreach ($checks as $check) { echo "<li class=\"{$check['severity']}\">"; - echo autop($check['message']); + echo elgg_autop($check['message']); echo "</li>"; } echo "</ul>"; } -$vars['refresh'] = TRUE; +$vars['refresh'] = true; // cannot advance to next step with a failure if ($vars['num_failures'] != 0) { - $vars['advance'] = FALSE; + $vars['advance'] = false; } echo elgg_view('install/nav', $vars); diff --git a/views/installation/install/pages/settings.php b/views/installation/install/pages/settings.php index 6f20573ef..04f23c0ea 100644 --- a/views/installation/install/pages/settings.php +++ b/views/installation/install/pages/settings.php @@ -1,5 +1,14 @@ <?php -echo autop(elgg_echo('install:settings:instructions')); +echo elgg_autop(elgg_echo('install:settings:instructions')); -echo elgg_view('install/forms/settings', $vars); +$vars['type'] = 'settings'; + +$url = current_page_url(); + +$form_vars = array( + 'action' => $url, + 'disable_security' => TRUE, +); + +echo elgg_view_form('install/template', $form_vars, $vars); diff --git a/views/installation/install/pages/welcome.php b/views/installation/install/pages/welcome.php index f069e4ba7..f370c15f3 100644 --- a/views/installation/install/pages/welcome.php +++ b/views/installation/install/pages/welcome.php @@ -3,6 +3,6 @@ * Install welcome page */ -echo autop(elgg_echo('install:welcome:instructions')); +echo elgg_autop(elgg_echo('install:welcome:instructions')); echo elgg_view('install/nav', $vars); diff --git a/views/installation/install/sidebar.php b/views/installation/install/sidebar.php deleted file mode 100644 index 8136cd898..000000000 --- a/views/installation/install/sidebar.php +++ /dev/null @@ -1,26 +0,0 @@ -<?php -/** - * Install sidebar - * - * @uses $vars['step'] Current step - * @uses $vars['steps'] Array of steps - */ - -$current_step = $vars['step']; -$steps = $vars['steps']; - -$current_step_index = array_search($current_step, $steps); - -echo '<ol>'; -foreach ($steps as $index => $step) { - if ($index < $current_step_index) { - $class = 'past'; - } elseif ($index == $current_step_index) { - $class = 'present'; - } else { - $class = 'future'; - } - $text = elgg_echo("install:$step"); - echo "<li class=\"$class\">$text</li>"; -} -echo '</ol>'; |
