password.php 583 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. /**
  3. * Elgg password input
  4. * Displays a password input field
  5. *
  6. * @package Elgg
  7. * @subpackage Core
  8. *
  9. * @uses $vars['value'] The current value, if any
  10. * @uses $vars['name'] The name of the input field
  11. * @uses $vars['class'] Additional CSS class
  12. */
  13. $vars['class'] = (array) elgg_extract('class', $vars, []);
  14. $vars['class'][] = 'elgg-input-password';
  15. $defaults = array(
  16. 'disabled' => false,
  17. 'value' => '',
  18. 'autocapitalize' => 'off',
  19. 'autocorrect' => 'off',
  20. 'type' => 'password'
  21. );
  22. $vars = array_merge($defaults, $vars);
  23. echo elgg_format_element('input', $vars);