diff options
Diffstat (limited to 'framework/Web/UI/WebControls/TTextBox.php')
-rw-r--r-- | framework/Web/UI/WebControls/TTextBox.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/framework/Web/UI/WebControls/TTextBox.php b/framework/Web/UI/WebControls/TTextBox.php index 047a3084..3517c73a 100644 --- a/framework/Web/UI/WebControls/TTextBox.php +++ b/framework/Web/UI/WebControls/TTextBox.php @@ -142,6 +142,8 @@ class TTextBox extends TWebControl implements IPostBackDataHandler, IValidatable }
else
{
+ if($this->getPersistPassword() && ($text=$this->getText())!=='')
+ $writer->addAttribute('value',$text);
$writer->addAttribute('type','password');
}
if(($cols=$this->getColumns())>0)
@@ -406,6 +408,22 @@ class TTextBox extends TWebControl implements IPostBackDataHandler, IValidatable }
/**
+ * @return boolean whether password should be displayed in the textbox during postback. Defaults to false. This property only applies when TextMode='Password'.
+ */
+ public function getPersistPassword()
+ {
+ return $this->getViewState('PersistPassword',false);
+ }
+
+ /**
+ * @param boolean whether password should be displayed in the textbox during postback. This property only applies when TextMode='Password'.
+ */
+ public function setPersistPassword($value)
+ {
+ $this->setViewState('PersistPassword',TPropertyValue::ensureBoolean($value),false);
+ }
+
+ /**
* @return string the text content of the TTextBox control.
*/
public function getText()
|