template.php 746 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. /**
  3. * Generic form template for install forms
  4. *
  5. * @uses $vars['variables']
  6. * @uses $vars['type'] Type of form: admin, database, settings
  7. */
  8. $variables = $vars['variables'];
  9. $type = $vars['type'];
  10. foreach ($variables as $name => $params) {
  11. $label = elgg_echo("install:$type:label:$name");
  12. $help = elgg_echo("install:$type:help:$name");
  13. $params['name'] = $name;
  14. $input = elgg_view("input/{$params['type']}", $params);
  15. $field = <<<FIELD
  16. <label class="elgg-form-field">
  17. <span class="elgg-form-field-label">$label</span>
  18. <span class="elgg-form-field-help">$help</span>
  19. $input
  20. </label>
  21. FIELD;
  22. $form_body .= $field;
  23. }
  24. $form_body .= elgg_view('input/submit', array(
  25. 'value' => elgg_echo('install:next'),
  26. ));
  27. echo $form_body;