aboutsummaryrefslogtreecommitdiff
path: root/views/installation/install/forms/template.php
blob: 98cdcadabbff6c4969073efbc6e6a8636ccedb6c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?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>';
}

$form_body .= elgg_view('input/submit', array('value' => elgg_echo('next')));

echo $form_body;