From 0892b27e326f14bd3f6229b55077ef5f9d5280b4 Mon Sep 17 00:00:00 2001 From: "ctrlaltca@gmail.com" <> Date: Sat, 21 May 2011 18:14:36 +0000 Subject: branch/3.1: merged bugfixes from trunk/ up to current --- framework/Web/UI/WebControls/TTextBox.php | 40 ++++++++++++++++--------------- 1 file changed, 21 insertions(+), 19 deletions(-) (limited to 'framework/Web/UI/WebControls/TTextBox.php') 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) -- cgit v1.2.3