PageRenderTime 40ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 0ms

/content/code/trunk/administrator/components/com_artofcontent/libraries/jxtended/form/fields/password.php

https://bitbucket.org/eddieajau/the-art-of-joomla-archive
PHP | 44 lines | 14 code | 5 blank | 25 comment | 1 complexity | 960daba9b7c58d1c32545a8094f14c0c MD5 | raw file
  1. <?php
  2. /**
  3. * @version $Id: password.php 484 2010-12-20 23:40:27Z eddieajau $
  4. * @package JXtended.Libraries
  5. * @subpackage Form
  6. * @copyright Copyright 2005 - 2010 New Life in IT Pty Ltd. All rights reserved.
  7. * @license GNU General Public License
  8. * @link http://www.theartofjoomla.com
  9. */
  10. defined('JPATH_BASE') or die;
  11. juimport('jxtended.form.formfield');
  12. /**
  13. * Form Field class for JXtended Libraries.
  14. *
  15. * @package JXtended.Libraries
  16. * @subpackage Form
  17. * @since 1.1
  18. */
  19. class JFormFieldPassword extends JFormField
  20. {
  21. /**
  22. * The field type.
  23. *
  24. * @var string
  25. */
  26. protected $type = 'Password';
  27. /**
  28. * Method to get the field input.
  29. *
  30. * @return string The field input.
  31. */
  32. protected function _getInput()
  33. {
  34. $size = $this->_element->attributes('size') ? 'size="'.$this->_element->attributes('size').'"' : '';
  35. $class = $this->_element->attributes('class') ? 'class="'.$this->_element->attributes('class').'"' : 'class="text_area"';
  36. $auto = $this->_element->attributes('autocomplete') == 'off' ? 'autocomplete="off"' : '';
  37. return '<input type="password" name="'.$this->inputName.'" id="'.$this->inputId.'" value="'.htmlspecialchars($this->value).'" '.$auto.' '.$class.' '.$size.' />';
  38. }
  39. }