summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--framework/Web/UI/TTemplate.php6
-rw-r--r--framework/Web/UI/TThemeManager.php2
2 files changed, 7 insertions, 1 deletions
diff --git a/framework/Web/UI/TTemplate.php b/framework/Web/UI/TTemplate.php
index 160a00f0..c441d7c1 100644
--- a/framework/Web/UI/TTemplate.php
+++ b/framework/Web/UI/TTemplate.php
@@ -141,7 +141,13 @@ class TTemplate extends TComponent implements ITemplate
throw new TTemplateRuntimeException('property_read_only',get_class($component).'.'.$name);
}
else if($component->getAllowCustomAttributes())
+ {
+ if(is_array($value) && $value[0]===1)
+ $value=$component->evaluateExpression($value[1]);
+ else
+ throw new TTemplateRuntimeException('template_attribute_unbindable',$name);
$component->getAttributes()->add($name,$value);
+ }
else
throw new TTemplateRuntimeException('property_not_defined',get_class($component).'.'.$name);
}
diff --git a/framework/Web/UI/TThemeManager.php b/framework/Web/UI/TThemeManager.php
index 8edae2e1..019ccc85 100644
--- a/framework/Web/UI/TThemeManager.php
+++ b/framework/Web/UI/TThemeManager.php
@@ -150,7 +150,7 @@ class TTheme extends TTemplate
foreach($this->_skins[$type][$id] as $name=>$value)
{
if(is_array($value))
- $value=$this->evaluateExpression($value);
+ $value=$this->evaluateExpression($value[1]);
if(strpos($name,'.')===false) // is simple property or custom attribute
{
if($control->hasProperty($name))