*/ class Mage_Widget_Block_Adminhtml_Widget_Instance_Edit_Chooser_Template extends Mage_Adminhtml_Block_Widget { /** * Prepare html output * * @return string */ protected function _toHtml() { if (!$this->getWidgetTemplates()) { $html = '

' . Mage::helper('widget')->__('Please Select Block Reference First') . '

'; } elseif (count($this->getWidgetTemplates()) == 1) { $widgetTemplate = current($this->getWidgetTemplates()); $html = ''; $html .= $widgetTemplate['label']; } else { $html = $this->getLayout()->createBlock('core/html_select') ->setName('template') ->setClass('select') ->setOptions($this->getWidgetTemplates()) ->setValue($this->getSelected())->toHtml(); } return parent::_toHtml().$html; } }