summaryrefslogtreecommitdiff
path: root/framework/Web/UI/WebControls/TTextBox.php
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Web/UI/WebControls/TTextBox.php')
-rw-r--r--framework/Web/UI/WebControls/TTextBox.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/framework/Web/UI/WebControls/TTextBox.php b/framework/Web/UI/WebControls/TTextBox.php
index bc490cdc..feea6227 100644
--- a/framework/Web/UI/WebControls/TTextBox.php
+++ b/framework/Web/UI/WebControls/TTextBox.php
@@ -139,13 +139,14 @@ class TTextBox extends TWebControl implements IPostBackDataHandler, IValidatable
}
if($this->getReadOnly())
$writer->addAttribute('readonly','readonly');
- if(!$this->getEnabled(true) && $this->getEnabled()) // in this case parent will not render 'disabled'
+ $isEnabled=$this->getEnabled(true);
+ if(!$isEnabled && $this->getEnabled()) // in this case parent will not render 'disabled'
$writer->addAttribute('disabled','disabled');
- if($this->getEnabled(true) && $this->getAutoPostBack() && $page->getClientSupportsJavaScript())
+ if($isEnabled && $this->getAutoPostBack() && $page->getClientSupportsJavaScript())
{
$writer->addAttribute('id',$this->getClientID());
$this->getPage()->getClientScript()->registerPostBackControl('Prado.WebUI.TTextBox',$this->getPostBackOptions());
- }
+ }
parent::addAttributesToRender($writer);
}