protected function _toHtml()
 {
     $country = Mage::getModel('directory/country')->load($this->getCountryId());
     $countryName = '';
     if ($country && $country->getId()) {
         $countryName = ' (' . $country->getName() . ')';
     }
     $container = $this->getLayout()->createBlock('eltrino_region/adminhtml_system_config_fieldset_container')->setCountryId($this->getCountryId())->setDisabledRegions($this->getDisabledRegions());
     $this->addItem('region_configuration', array('title' => Mage::helper('eltrino_region')->__('Region Configuration%s', $countryName), 'content' => $container->toHtml(), 'open' => true));
     return parent::_toHtml();
 }
예제 #2
0
 /**
  * Add accordion items based on layout updates
  */
 protected function _toHtml()
 {
     if (!Mage::getSingleton('admin/session')->isAllowed('sales/enterprise_checkout/update')) {
         return parent::_toHtml();
     }
     foreach ($this->getChild() as $child) {
         $data = array('title' => $child->getHeaderText(), 'open' => false);
         if ($child->hasData('open')) {
             $data['open'] = $child->getData('open');
         }
         if ($child->hasData('content_url')) {
             $data['content_url'] = $child->getData('content_url');
         } else {
             $data['content'] = $child->toHtml();
         }
         $this->addItem($child->getNameInLayout(), $data);
     }
     return parent::_toHtml();
 }
 /**
  * {@inheritdoc}
  */
 protected function _toHtml()
 {
     $this->addItem('lastRequest', array('title' => Mage::helper('customer')->__('Request XML'), 'ajax' => false, 'content' => '<div class="entry-edit"><div style="word-wrap: break-word;" class="fieldset"><pre>' . htmlentities($this->getExport()->getRequestBody()) . '</pre></div></div>'));
     $this->addItem('lastResponse', array('title' => Mage::helper('customer')->__('Response XML'), 'ajax' => false, 'content' => '<div class="entry-edit"><div  style="word-wrap: break-word;" class="fieldset"><pre>' . htmlentities($this->getExport()->getResponseBody()) . '</pre></div></div>'));
     return parent::_toHtml();
 }