Elgg  Version master
login.php
Go to the documentation of this file.
1 <?php
6 echo elgg_view_field([
7  '#type' => 'text',
8  'name' => 'username',
9  'autofocus' => true,
10  'required' => true,
11  '#label' => elgg_echo('loginusername'),
12 ]);
13 
14 echo elgg_view_field([
15  '#type' => 'password',
16  '#label' => elgg_echo('password'),
17  'name' => 'password',
18  'required' => true,
19  'autocomplete' => 'current-password',
20 ]);
21 
22 echo elgg_view('login/extend', $vars);
23 
24 if (isset($vars['returntoreferer'])) {
25  echo elgg_view_field([
26  '#type' => 'hidden',
27  'name' => 'returntoreferer',
28  'value' => 'true'
29  ]);
30 }
31 
32 ob_start();
33 ?>
34  <div class="elgg-foot">
35  <div class="elgg-level">
36  <label class="float-alt">
37  <input type="checkbox" name="persistent" value="true"/>
38  <?php echo elgg_echo('user:persistent'); ?>
39  </label>
40 
41  <?php
42  echo elgg_view('input/submit', ['text' => elgg_echo('login')]);
43  ?>
44  </div>
45  <?php
46  echo elgg_view_menu('login');
47  ?>
48  </div>
49 <?php
50 $footer = ob_get_clean();
elgg_view_field(array $params=[])
Renders a form field, usually with a wrapper element, a label, help text, etc.
Definition: views.php:1112
$footer
Definition: login.php:50
elgg_echo(string $message_key, array $args=[], string $language= '')
Elgg language module Functions to manage language and translations.
Definition: languages.php:17
$data value
Definition: default.php:23
elgg_view_menu($menu, array $vars=[])
Render a menu.
Definition: views.php:441
elgg_view(string $view, array $vars=[], string $viewtype= '')
Return a parsed view.
Definition: views.php:156
elgg_set_form_footer(string $footer= '')
Sets form footer and defers its rendering until the form view and extensions have been rendered...
Definition: views.php:1046
$vars
Definition: theme.php:5
$data label
Definition: default.php:22
$site name
Definition: settings.php:15