issue #0001264 : Add style in editable field
This commit is contained in:
parent
4799b31240
commit
6abfdf26de
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user