diff options
Diffstat (limited to 'framework/Web/UI/WebControls/TTextBox.php')
-rw-r--r-- | framework/Web/UI/WebControls/TTextBox.php | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/framework/Web/UI/WebControls/TTextBox.php b/framework/Web/UI/WebControls/TTextBox.php index af73de35..9427bb1f 100644 --- a/framework/Web/UI/WebControls/TTextBox.php +++ b/framework/Web/UI/WebControls/TTextBox.php @@ -141,21 +141,11 @@ class TTextBox extends TWebControl implements IPostBackDataHandler, IValidatable $writer->addAttribute('readonly','readonly');
if(!$this->getEnabled(true) && $this->getEnabled()) // in this case parent will not render 'disabled'
$writer->addAttribute('disabled','disabled');
- if($this->getAutoPostBack() && $page->getClientSupportsJavaScript())
+ if($this->getEnabled(true) && $this->getAutoPostBack() && $page->getClientSupportsJavaScript())
{
$writer->addAttribute('id',$this->getClientID());
$this->getPage()->getClientScript()->registerPostBackControl($this);
- /*$options = $this->getAutoPostBackOptions();
- $scripts = $this->getPage()->getClientScript();
- $postback = $scripts->getPostBackEventReference($this,'',$options,false);
- $scripts->registerClientEvent($this, "change", $postback);
- *
- if($this->getTextMode() !== 'MultiLine')
- {
- $code = "if(Prado.TextBox.handleReturnKey(e)==false) Event.stop(e);";
- $scripts->registerClientEvent($this, "keypress", $code);
- }*/
- }
+ }
parent::addAttributesToRender($writer);
}
@@ -170,16 +160,6 @@ class TTextBox extends TWebControl implements IPostBackDataHandler, IValidatable $options['ValidationGroup'] = $this->getValidationGroup();
$options['TextMode'] = $this->getTextMode();
return $options;
- /*
- $option=new TPostBackOptions();
- $group = $this->getValidationGroup();
- $hasValidators = $this->getPage()->getValidators($group)->getCount()>0;
- if($this->getCausesValidation() && $hasValidators)
- {
- $option->setPerformValidation(true);
- $option->setValidationGroup($group);
- }
- $option->setAutoPostBack(true);*/
}
/**
|