summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorFabio Bas <ctrlaltca@gmail.com>2014-04-20 19:42:36 +0200
committerFabio Bas <ctrlaltca@gmail.com>2014-04-20 19:42:36 +0200
commitf95623e43ce5829b91d1fde0e7978aca96e3e936 (patch)
tree4edafb317e7598692113085f087821b0604c829b /framework
parent3abca1f10ace63b2daa93870f17049c047b53abe (diff)
Fix #515
Diffstat (limited to 'framework')
-rw-r--r--framework/Web/UI/WebControls/THtmlArea.php2
-rw-r--r--framework/Web/UI/WebControls/THtmlArea4.php7
2 files changed, 9 insertions, 0 deletions
diff --git a/framework/Web/UI/WebControls/THtmlArea.php b/framework/Web/UI/WebControls/THtmlArea.php
index fd26d0ab..6c2985f8 100644
--- a/framework/Web/UI/WebControls/THtmlArea.php
+++ b/framework/Web/UI/WebControls/THtmlArea.php
@@ -469,6 +469,8 @@ class THtmlArea extends TTextBox
$options['theme_advanced_toolbar_align'] = 'left';
$options['theme_advanced_path_location'] = 'bottom';
$options['extended_valid_elements'] = 'a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]';
+ if($this->getReadOnly())
+ $options['readonly'] = true;
$options = array_merge($options, $this->parseEditorOptions($this->getOptions()));
return $options;
diff --git a/framework/Web/UI/WebControls/THtmlArea4.php b/framework/Web/UI/WebControls/THtmlArea4.php
index 7ae4aa4e..d5410eae 100644
--- a/framework/Web/UI/WebControls/THtmlArea4.php
+++ b/framework/Web/UI/WebControls/THtmlArea4.php
@@ -406,6 +406,13 @@ class THtmlArea4 extends TTextBox
$options['height'] = $this->getHeight();
$options['resize'] = 'both';
$options['menubar'] = false;
+ if($this->getReadOnly())
+ {
+ $options['readonly'] = true;
+ $options['toolbar'] = false;
+ $options['menubar'] = false;
+ $options['statusbar'] = false;
+ }
$options['extended_valid_elements'] = 'a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]';