diff options
author | ctrlaltca@gmail.com <> | 2011-05-21 18:14:36 +0000 |
---|---|---|
committer | ctrlaltca@gmail.com <> | 2011-05-21 18:14:36 +0000 |
commit | 0892b27e326f14bd3f6229b55077ef5f9d5280b4 (patch) | |
tree | 24039ec47ba8977bf14ba435c058e758e901f185 /framework/Web/UI/WebControls/TTextBox.php | |
parent | 6f00b28a1d9c7409c956a83866eac48a9493e83c (diff) |
branch/3.1: merged bugfixes from trunk/ up to current
Diffstat (limited to 'framework/Web/UI/WebControls/TTextBox.php')
-rw-r--r-- | framework/Web/UI/WebControls/TTextBox.php | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/framework/Web/UI/WebControls/TTextBox.php b/framework/Web/UI/WebControls/TTextBox.php index 8ab548a3..46e7f551 100644 --- a/framework/Web/UI/WebControls/TTextBox.php +++ b/framework/Web/UI/WebControls/TTextBox.php @@ -122,25 +122,6 @@ class TTextBox extends TWebControl implements IPostBackDataHandler, IValidatable $writer->addAttribute('type','text');
if(($text=$this->getText())!=='')
$writer->addAttribute('value',$text);
- if(($act=$this->getAutoCompleteType())!=='None')
- {
- if($act==='Disabled')
- $writer->addAttribute('autocomplete','off');
- else if($act==='Search')
- $writer->addAttribute('vcard_name','search');
- else if($act==='HomeCountryRegion')
- $writer->addAttribute('vcard_name','HomeCountry');
- else if($act==='BusinessCountryRegion')
- $writer->addAttribute('vcard_name','BusinessCountry');
- else
- {
- if(strpos($act,'Business')===0)
- $act='Business'.'.'.substr($act,8);
- else if(strpos($act,'Home')===0)
- $act='Home'.'.'.substr($act,4);
- $writer->addAttribute('vcard_name','vCard.'.$act);
- }
- }
}
else
{
@@ -148,6 +129,27 @@ class TTextBox extends TWebControl implements IPostBackDataHandler, IValidatable $writer->addAttribute('value',$text);
$writer->addAttribute('type','password');
}
+ + if(($act=$this->getAutoCompleteType())!=='None')
+ {
+ if($act==='Disabled')
+ $writer->addAttribute('autocomplete','off');
+ else if($act==='Search')
+ $writer->addAttribute('vcard_name','search');
+ else if($act==='HomeCountryRegion')
+ $writer->addAttribute('vcard_name','HomeCountry');
+ else if($act==='BusinessCountryRegion')
+ $writer->addAttribute('vcard_name','BusinessCountry');
+ else
+ {
+ if(strpos($act,'Business')===0)
+ $act='Business'.'.'.substr($act,8);
+ else if(strpos($act,'Home')===0)
+ $act='Home'.'.'.substr($act,4);
+ $writer->addAttribute('vcard_name','vCard.'.$act);
+ }
+ }
+ if(($cols=$this->getColumns())>0)
$writer->addAttribute('size',"$cols");
if(($maxLength=$this->getMaxLength())>0)
|