Public Member Functions | |
render (Varien_Data_Form_Element_Abstract $element) |
Definition at line 28 of file Editable.php.
render | ( | Varien_Data_Form_Element_Abstract $ | element | ) |
Implements Varien_Data_Form_Element_Renderer_Interface.
Definition at line 31 of file Editable.php.
00032 { 00033 $valueName = $element->getValueName(); 00034 00035 if ($valueName==='') { 00036 $valueName = '...'; 00037 } else { 00038 $valueName = Mage::helper('core/string')->truncate($valueName, 30); 00039 } 00040 if ($element->getShowAsText()) { 00041 $html = ' <input type="hidden" class="hidden" id="'.$element->getHtmlId().'" name="'.$element->getName().'" value="'.$element->getValue().'"/> '; 00042 00043 $html.= htmlspecialchars($valueName).' '; 00044 } else { 00045 $html = ' <span class="rule-param"' . ($element->getParamId() ? ' id="' . $element->getParamId() . '"' : '') . '>'; 00046 00047 $html.= '<a href="javascript:void(0)" class="label">'; 00048 00049 $html.= htmlspecialchars($valueName); 00050 00051 $html.= '</a><span class="element"> '; 00052 00053 $html.= $element->getElementHtml(); 00054 00055 if ($element->getExplicitApply()) { 00056 $html.= ' <a href="javascript:void(0)" class="rule-param-apply"><img src="'.$this->getSkinUrl('images/rule_component_apply.gif').'" class="v-middle" alt="'.$this->__('Apply').'" title="'.$this->__('Apply').'" /></a> '; 00057 } 00058 00059 $html.= '</span></span> '; 00060 } 00061 return $html; 00062 }