issue #0001264 : Add style in editable field

This commit is contained in:
Michael RICOIS 2012-09-03 08:06:20 +00:00
parent 4799b31240
commit 6abfdf26de

View File

@ -3,13 +3,16 @@ class Zend_View_Helper_Editable extends Zend_View_Helper_Abstract
{
public function Editable($name, $value, $defaultValue, $category)
{
$html = '';
$html.= '<span id="'.$name.'" class="editable '.$category.'">';
$class = 'editable-change';
if ($value===null) {
$html.= $defaultValue;
} else {
$html.= $value;
$value = $defaultValue;
$class = 'editable';
}
if ( !empty($class) ) {
$class = 'class="'.$class.' '.$category.'"';
}
$html = '<span id="'.$name.'" '.$class.'>';
$html.= $value;
$html.= '</span>';
return $html;
}