diff options
author | carlgmathisen <> | 2009-07-20 10:36:48 +0000 |
---|---|---|
committer | carlgmathisen <> | 2009-07-20 10:36:48 +0000 |
commit | 975bad9be0777a28326291f0d8fcae41d788200c (patch) | |
tree | cd0df5236c98b1d639e0de1271b253572bca84f5 | |
parent | dca4b44183e65bd1252a8f224548152279d63ee8 (diff) |
Fixed #105
-rw-r--r-- | HISTORY | 1 | ||||
-rw-r--r-- | framework/Web/UI/WebControls/TFileUpload.php | 43 |
2 files changed, 24 insertions, 20 deletions
@@ -5,6 +5,7 @@ BUG: Issue#117 - Consider TValidationSummary.DisplayMode="HeaderOnly" if TValida BUG: Issue#164 - CultureInfo::validCulture should be declared as a static method (Christophe) BUG: Issue#168 - TSqlMapXmlConfiguration: CacheModel properties are not set (Yves) BUG: Issue#172 - TDbCache fails to recognize need to re-create cache table (Yves) +BUG: Issue#105 - Enabling/disabling TFileUpload on TPanel (Carl) ENH: Issue#174 - TErrorHandler: HTTP error messages contains sensitive information (Yves) ENH: Issue#175 - TBulletedList: Introduce TBulletStyle::None (Yves) ENH: Issue#176 - THttpResponse::writeFile() add additional parameters to take more influence on behavior (forceDownload, clientFileName, fileSize), add png to defaultMimeTypes (Yves) diff --git a/framework/Web/UI/WebControls/TFileUpload.php b/framework/Web/UI/WebControls/TFileUpload.php index 6658e93d..fbd14703 100644 --- a/framework/Web/UI/WebControls/TFileUpload.php +++ b/framework/Web/UI/WebControls/TFileUpload.php @@ -4,7 +4,7 @@ *
* @author Marcus Nyeholt <tanus@users.sourceforge.net>, Qiang Xue <qiang.xue@gmail.com>
* @link http://www.pradosoft.com/
- * @copyright Copyright © 2005-2008 PradoSoft + * @copyright Copyright © 2005-2008 PradoSoft
* @license http://www.pradosoft.com/license/
* @version $Id$
* @package System.Web.UI.WebControls
@@ -59,7 +59,7 @@ class TFileUpload extends TWebControl implements IPostBackDataHandler, IValidata */
private $_errorCode=UPLOAD_ERR_NO_FILE;
private $_dataChanged=false;
- private $_isValid=true; + private $_isValid=true;
/**
* @return string tag name of the file upload control
@@ -80,6 +80,9 @@ class TFileUpload extends TWebControl implements IPostBackDataHandler, IValidata parent::addAttributesToRender($writer);
$writer->addAttribute('type','file');
$writer->addAttribute('name',$this->getUniqueID());
+ $isEnabled=$this->getEnabled(true);
+ if(!$isEnabled && $this->getEnabled()) // in this case parent will not render 'disabled'
+ $writer->addAttribute('disabled','disabled');
}
/**
@@ -256,23 +259,23 @@ class TFileUpload extends TWebControl implements IPostBackDataHandler, IValidata {
return $this->getFileName();
}
- - /** - * Returns true if this control validated successfully. - * Defaults to true. - * @return bool wether this control validated successfully. - */ - public function getIsValid() - { - return $this->_isValid; - } - /** - * @param bool wether this control is valid. - */ - public function setIsValid($value) - { - $this->_isValid=TPropertyValue::ensureBoolean($value); - } - +
+ /**
+ * Returns true if this control validated successfully.
+ * Defaults to true.
+ * @return bool wether this control validated successfully.
+ */
+ public function getIsValid()
+ {
+ return $this->_isValid;
+ }
+ /**
+ * @param bool wether this control is valid.
+ */
+ public function setIsValid($value)
+ {
+ $this->_isValid=TPropertyValue::ensureBoolean($value);
+ }
+
}
|