Fix to the assign dynaforms in steps by the processmap interface.

This commit is contained in:
Gustavo Adolfo Cruz Laura
2011-01-13 22:32:10 +00:00
parent 8cd9ccdf56
commit 7668679051

View File

@@ -395,7 +395,13 @@ class propelTable
if(is_object($value)){
$value = '';
}
$this->tpl->assign( "value" , (preg_match('^[[:space:]]^', $value) && (substr($fieldName,0,3)!="PRO"))? str_ireplace(" "," ",$htmlField):$htmlField );
// checking if the value variable is a html field, a html tag content can't contain   as white spaces
$testValue = preg_match( "/<\/?\w+((\s+(\w|\w[\w-]*\w)(\s*=\s*(?:\".*?\"|'.*?'|[^'\">\s]+))?)+\s*|\s*)\/?>/i", $value, $matches );
if (empty($matches)){
$this->tpl->assign( "value" , (preg_match('^[[:space:]]^', $value) && (substr($fieldName,0,3)!="PRO"))? str_ireplace(" ","&nbsp;",$htmlField):$htmlField );
} else {
$this->tpl->assign( "value" , $htmlField );
}
}
return $this->fields[$r]['Type'];
}