/contentmanager/code/trunk/administrator/components/com_contentmanager/libraries/jxtended/form/fields/password.php
PHP | 41 lines | 15 code | 5 blank | 21 comment | 1 complexity | 2a3e8c2cb3c2ff37b22dea1198833cd1 MD5 | raw file
- <?php
- /**
- * @version $Id: password.php 160 2009-07-09 00:06:09Z eddieajau $
- * @package JXtended.Libraries
- * @subpackage Form
- * @copyright Copyright (C) 2008 - 2009 JXtended, LLC. All rights reserved.
- * @license GNU General Public License <http://www.gnu.org/copyleft/gpl.html>
- * @link http://jxtended.com
- */
- defined('JPATH_BASE') or die;
- jximport2('jxtended.form.field');
- /**
- * JXtended Form Field Type Class for a password input.
- *
- * @package JXtended.Libraries
- * @subpackage Form
- * @version 1.0
- */
- class JXFieldTypePassword extends JXFieldType
- {
- /**
- * Field type
- *
- * @access protected
- * @var string
- */
- var $_type = 'Password';
- function fetchField($name, $value, &$node, $controlName)
- {
- $id = str_replace(']', '', str_replace('[', '_', $controlName.'_'.$name));
- $size = ($node->attributes('size') ? 'size="'.$node->attributes('size').'"' : '');
- $class = ($node->attributes('class') ? 'class="'.$node->attributes('class').'"' : 'class="text_area"');
- $auto = $node->attributes('autocomplete') == 'off' ? 'autocomplete="off"' : '';
- return '<input type="password" name="'.$controlName.'['.$name.']" id="'.$id.'" value="'.htmlspecialchars($value).'" '.$auto.' '.$class.' '.$size.' />';
- }
- }