public function getFormHtml() { $html = ''; $tabs = $this->getChild('tabs'); // --------------------------------------- $html .= $this->getLayout()->createBlock('M2ePro/adminhtml_ebay_listing_template_switcher_initialization')->toHtml(); // --------------------------------------- // initiate template switcher url // --------------------------------------- $html .= Ess_M2ePro_Block_Adminhtml_Ebay_Listing_Template_Switcher::getSwitcherUrlHtml(); // --------------------------------------- // --------------------------------------- $html .= <<<HTML <script type="text/javascript"> EbayListingTemplateSwitcherHandlerObj.checkAttributesAvailability = true; </script> HTML; // --------------------------------------- // hide tabs selector if only one tab is allowed for displaying // --------------------------------------- if (count($this->getAllowedTabs()) == 1) { $html .= <<<HTML <script type="text/javascript"> \$('{$tabs->getId()}').hide(); </script> HTML; } // --------------------------------------- return $html . $tabs->toHtml() . parent::getFormHtml(); }
public function getFormHtml() { $html = ''; $tabs = $this->getChild('tabs'); //------------------------------ $html .= $this->getLayout()->createBlock('M2ePro/adminhtml_ebay_listing_template_switcher_initialization')->toHtml(); //------------------------------ // initiate template switcher url //------------------------------ $html .= Ess_M2ePro_Block_Adminhtml_Ebay_Listing_Template_Switcher::getSwitcherUrlHtml(); //------------------------------ //------------------------------ $data = array('display_tab_buttons' => false); $block = $this->getLayout()->createBlock('M2ePro/adminhtml_widget_floatingToolbarFixer'); $block->addData($data); $html .= $block->toHtml(); //------------------------------ //------------------------------ $listing = Mage::helper('M2ePro/Data_Global')->getValue('ebay_listing'); $headerHtml = ''; if ($listing) { $headerHtml = $this->getLayout()->createBlock('M2ePro/adminhtml_listing_view_header', '', array('listing' => $listing))->toHtml(); } //------------------------------ // hide tabs selector if only one tab is allowed for displaying //------------------------------ if (count($this->getAllowedTabs()) == 1) { $html .= <<<HTML <script type="text/javascript"> Event.observe(window, 'load', function() { \$('{$tabs->getId()}').hide(); }); </script> HTML; } //------------------------------ return $html . $headerHtml . $tabs->toHtml() . parent::getFormHtml(); }