21 defined(
'XOOPS_ROOT_PATH') or die('Restricted access');
59 var $autoComplete =
false;
72 function XoopsFormPassword($caption, $name, $size, $maxlength, $value =
'', $autoComplete =
false)
74 $this->setCaption($caption);
75 $this->setName($name);
76 $this->_size = intval($size);
77 $this->_maxlength = intval($maxlength);
78 $this->setValue($value);
79 $this->autoComplete = ! empty($autoComplete);
97 function getMaxlength()
99 return $this->_maxlength;
108 function getValue($encode =
false)
110 return $encode ? htmlspecialchars($this->_value, ENT_QUOTES) : $this->_value;
118 function setValue($value)
120 $this->_value = $value;
130 return '<input type="password" name="' . $this->getName() .
'" id="' . $this->getName() .
'" size="' . $this->getSize() .
'" maxlength="' . $this->getMaxlength() .
'" value="' . $this->getValue() .
'"' . $this->getExtra() .
' ' . ($this->autoComplete ?
'' :
'autocomplete="off" ') .
'/>';