PageRenderTime 37ms CodeModel.GetById 14ms RepoModel.GetById 0ms app.codeStats 0ms

/contentmanager/code/trunk/administrator/components/com_contentmanager/libraries/jxtended/form/fields/password.php

https://bitbucket.org/eddieajau/the-art-of-joomla-archive
PHP | 41 lines | 15 code | 5 blank | 21 comment | 1 complexity | 2a3e8c2cb3c2ff37b22dea1198833cd1 MD5 | raw file
  1. <?php
  2. /**
  3. * @version $Id: password.php 160 2009-07-09 00:06:09Z eddieajau $
  4. * @package JXtended.Libraries
  5. * @subpackage Form
  6. * @copyright Copyright (C) 2008 - 2009 JXtended, LLC. All rights reserved.
  7. * @license GNU General Public License <http://www.gnu.org/copyleft/gpl.html>
  8. * @link http://jxtended.com
  9. */
  10. defined('JPATH_BASE') or die;
  11. jximport2('jxtended.form.field');
  12. /**
  13. * JXtended Form Field Type Class for a password input.
  14. *
  15. * @package JXtended.Libraries
  16. * @subpackage Form
  17. * @version 1.0
  18. */
  19. class JXFieldTypePassword extends JXFieldType
  20. {
  21. /**
  22. * Field type
  23. *
  24. * @access protected
  25. * @var string
  26. */
  27. var $_type = 'Password';
  28. function fetchField($name, $value, &$node, $controlName)
  29. {
  30. $id = str_replace(']', '', str_replace('[', '_', $controlName.'_'.$name));
  31. $size = ($node->attributes('size') ? 'size="'.$node->attributes('size').'"' : '');
  32. $class = ($node->attributes('class') ? 'class="'.$node->attributes('class').'"' : 'class="text_area"');
  33. $auto = $node->attributes('autocomplete') == 'off' ? 'autocomplete="off"' : '';
  34. return '<input type="password" name="'.$controlName.'['.$name.']" id="'.$id.'" value="'.htmlspecialchars($value).'" '.$auto.' '.$class.' '.$size.' />';
  35. }
  36. }