當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Varien_Data_Form_Element_Abstract::getHtmlId方法代碼示例

本文整理匯總了PHP中Varien_Data_Form_Element_Abstract::getHtmlId方法的典型用法代碼示例。如果您正苦於以下問題:PHP Varien_Data_Form_Element_Abstract::getHtmlId方法的具體用法?PHP Varien_Data_Form_Element_Abstract::getHtmlId怎麽用?PHP Varien_Data_Form_Element_Abstract::getHtmlId使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Varien_Data_Form_Element_Abstract的用法示例。


在下文中一共展示了Varien_Data_Form_Element_Abstract::getHtmlId方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: render

    /**
     * Render element html
     *
     * @param Varien_Data_Form_Element_Abstract $element
     * @return string
     */
    public function render(Varien_Data_Form_Element_Abstract $element)
    {
        $imageDirectoryBaseUrl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'infortis/system/css/images';
        $elementData = $element->getOriginalData();
        $url1 = $this->getUrl('dataporter/adminhtml_cfgporter/index/action_type/import/package/Infortis_Ultimo');
        $url2 = $this->getUrl('dataporter/adminhtml_cfgporter/index/action_type/export/package/Infortis_Ultimo');
        //Start base HTML
        $html = '';
        $html .= sprintf('<tr class="system-fieldset-sub-head" id="row_%s"><td colspan="5"><h4 id="%s">%s</h4></td></tr>', $element->getHtmlId(), $element->getHtmlId(), $element->getLabel());
        //Open row
        $html .= sprintf('<tr class="" id="row_%s_content">', $element->getHtmlId());
        //Add label cell
        $html .= sprintf('<td class="label"><label>%s</label></td>', $elementData['sublabel']);
        //Open main cell
        $html .= '<td class="value">';
        //Buttons
        $html .= $this->getLayout()->createBlock('adminhtml/widget_button')->setType('button')->setClass('go-to-page')->setLabel('Import')->setOnClick("setLocation('{$url1}')")->toHtml();
        $html .= '&nbsp;';
        $html .= $this->getLayout()->createBlock('adminhtml/widget_button')->setType('button')->setClass('go-to-page')->setLabel('Export')->setOnClick("setLocation('{$url2}')")->toHtml();
        //Close all wrappers: cell and row
        $html .= '</td>';
        $html .= '</tr>';
        //Add CSS
        $html .= '<style>
button.go-to-page span {
	background-repeat: no-repeat;
	background-position: 100% 50%;
	background-image: url(' . $imageDirectoryBaseUrl . '/btn-go-to-page-icon.png);
	padding-right: 26px;
}
</style>';
        return $html;
    }
開發者ID:platonicsolution,項目名稱:local-server,代碼行數:39,代碼來源:Configimpex.php

示例2: render

 /**
  * Output the region element and javasctipt that makes it dependent from country element
  *
  * @param Varien_Data_Form_Element_Abstract $element
  * @return string
  */
 public function render(Varien_Data_Form_Element_Abstract $element)
 {
     $country = $element->getForm()->getElement('country_id');
     if (!is_null($country)) {
         $countryId = $country->getValue();
     } else {
         return $element->getDefaultHtml();
     }
     $regionId = $element->getForm()->getElement('region_id')->getValue();
     $quoteStoreId = $element->getEntityAttribute()->getStoreId();
     $html = '<tr>';
     $element->setClass('input-text');
     $element->setRequired(true);
     $html .= '<td class="label">' . $element->getLabelHtml() . '</td><td class="value">';
     $html .= $element->getElementHtml();
     $selectName = str_replace('region', 'region_id', $element->getName());
     $selectId = $element->getHtmlId() . '_id';
     $html .= '<select id="' . $selectId . '" name="' . $selectName . '" class="select required-entry" style="display:none">';
     $html .= '<option value="">' . $this->_factory->getHelper('customer')->__('Please select') . '</option>';
     $html .= '</select>';
     $html .= '<script type="text/javascript">' . "\n";
     $html .= '$("' . $selectId . '").setAttribute("defaultValue", "' . $regionId . '");' . "\n";
     $html .= 'new regionUpdater("' . $country->getHtmlId() . '", "' . $element->getHtmlId() . '", "' . $selectId . '", ' . $this->helper('directory')->getRegionJsonByStore($quoteStoreId) . ');' . "\n";
     $html .= '</script>' . "\n";
     $html .= '</td></tr>' . "\n";
     return $html;
 }
開發者ID:cewolf2002,項目名稱:magento,代碼行數:33,代碼來源:Region.php

示例3: _getElementHtml

 protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
 {
     $real_val = $element->getValue();
     $many_val = $element->getValues();
     $output = '';
     if ($many_val) {
         foreach ($many_val as $curr_val) {
             $output .= '<div  style="padding: 0 15px 15px 0; float: left; width: 130px;">';
             $output .= '<input type="radio"' . $element->serialize(array('style', 'class', 'name'));
             if ($curr_val instanceof Varien_Object) {
                 $output .= 'id="' . $element->getHtmlId() . $curr_val->getValue() . '" ' . $curr_val->serialize(array('title', 'label', 'style', 'class', 'value'));
                 if (in_array($curr_val->getValue(), $real_val)) {
                     $output .= ' checked="checked"';
                 }
                 $output .= ' /><span>' . $curr_val->getLabel() . '</span>';
             } elseif (is_array($curr_val)) {
                 $output .= 'id="' . $element->getHtmlId() . $curr_val['value'] . '" value="' . htmlspecialchars($curr_val['value'], ENT_COMPAT) . '"';
                 if ($curr_val['value'] == $real_val) {
                     $output .= ' checked="checked"';
                 }
                 $output .= ' /><span>' . $curr_val['label'] . '</span>';
             }
             if ($curr_val['value']) {
                 $output .= '<div style="height:30px;background:url(' . Mage::getDesign()->getSkinUrl('magentothem/images/' . $curr_val['value'] . '.png') . ')">&nbsp;</div>';
             }
             $output .= '</div>' . "\n";
         }
     }
     return $output . '<div class="clear"></div>';
 }
開發者ID:quyip8818,項目名稱:Mag,代碼行數:30,代碼來源:Customfieldpattern.php

示例4: _getElementHtml

 protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
 {
     $after_element_html = $element->getAfterElementHtml();
     $javaScript = "\n            <script type=\"text/javascript\">\n                Event.observe('{$element->getHtmlId()}', 'change', function(){\n                    var value = \$('{$element->getHtmlId()}').value;                    \n                    var elements = eval({$this->_getAssociatedElements()});\n                    if (value == " . GoMage_Navigation_Model_Layer::FILTER_TYPE_IMAGE . "){\n                    \tfor (var i = 0; i < elements.length; i++) {\n                    \t\tvar id = '{$this->_getBasePartName($element)}' + elements[i]; \n                            if (\$(id)){\n                            \t\$(id).up('td').up('tr').show();\t\n    \t\t\t\t\t\t}\n                        }\n                        var id = '{$this->_getBasePartName($element)}' + 'inblock_height'; \n                        if (\$(id)){\n                        \t\$(id).up('td').up('tr').hide();\t\n\t\t\t\t\t\t}\n    \t\t\t\t}else if (value == " . GoMage_Navigation_Model_Layer::FILTER_TYPE_DEFAULT_INBLOCK . "){\n    \t\t\t\t\tfor (var i = 0; i < elements.length; i++) {\n                    \t\tvar id = '{$this->_getBasePartName($element)}' + elements[i]; \n                            if (\$(id)){\n                            \t\$(id).up('td').up('tr').hide();\t\n    \t\t\t\t\t\t}\n                        }\n    \t\t\t\t\tvar id = '{$this->_getBasePartName($element)}' + 'inblock_height'; \n                        if (\$(id)){\n                        \t\$(id).up('td').up('tr').show();\t\n\t\t\t\t\t\t}\n    \t\t\t\t}else{\n    \t\t\t\t\tfor (var i = 0; i < elements.length; i++) {\n                    \t\tvar id = '{$this->_getBasePartName($element)}' + elements[i]; \n                            if (\$(id)){\n                            \t\$(id).up('td').up('tr').hide();\t\n    \t\t\t\t\t\t}\n                        }\n                        var id = '{$this->_getBasePartName($element)}' + 'inblock_height'; \n                        if (\$(id)){\n                        \t\$(id).up('td').up('tr').hide();\t\n\t\t\t\t\t\t}\n    \t\t\t\t}\n                });\n                document.observe('dom:loaded', function() {   \t\n                \tinit_{$element->getHtmlId()}();                \t\n                });\n                document.onreadystatechange = init_{$element->getHtmlId()};\n                \n                function init_{$element->getHtmlId()}() {\n                \tGomage_Navigation_fireEvent(\$('{$element->getHtmlId()}'), 'change');\n                }\n            </script>";
     $element->setData('after_element_html', $javaScript . $after_element_html);
     return $element->getElementHtml();
 }
開發者ID:evinw,項目名稱:project_bloom_magento,代碼行數:7,代碼來源:Navigationtype.php

示例5: _getElementHtml

 protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
 {
     $after_element_html = $element->getAfterElementHtml();
     $javaScript = "\r\n            <script type=\"text/javascript\">\r\n                Event.observe('{$element->getHtmlId()}', 'change', function(){\r\n                    var value = \$('{$element->getHtmlId()}').value;                    \r\n                    var elements = eval({$this->_getAssociatedElements()});\r\n\r\n                    if (value == " . GoMage_Navigation_Model_Adminhtml_System_Config_Source_Filter_Type_Inblock::TYPE_FIXED . "){\r\n                    \tfor (var i = 0; i < elements.length; i++) {\r\n                    \t\tvar id = '{$this->_getBasePartName($element)}' + elements[i]; \r\n                            if (\$(id)){\r\n                            \t\$(id).up('td').up('tr').show();\t\r\n    \t\t\t\t\t\t}\r\n                        }\r\n                        var id = '{$this->_getBasePartName($element)}' + 'max_inblock_height'; \r\n                        if (\$(id)){\r\n                        \t\$(id).up('td').up('tr').hide();\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tvar id = '{$this->_getBasePartName($element)}' + 'inblock_height';\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n                        if (\$(id) && \$('row_'+ '{$this->_getBasePartName($element)}' + 'inblock_type').visible() == true){\r\n                        \t\$(id).up('td').up('tr').show();\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\$(id).up('td').up('tr').hide();\r\n\t\t\t\t\t\t}\r\n    \t\t\t\t}else if (value == " . GoMage_Navigation_Model_Adminhtml_System_Config_Source_Filter_Type_Inblock::TYPE_AUTO . "){\r\n    \t\t\t\t\tfor (var i = 0; i < elements.length; i++) {\r\n                    \t\tvar id = '{$this->_getBasePartName($element)}' + elements[i]; \r\n                            if (\$(id)){\r\n                            \t\$(id).up('td').up('tr').hide();\t\r\n    \t\t\t\t\t\t}\r\n                        }\r\n    \t\t\t\t\tvar id = '{$this->_getBasePartName($element)}' + 'max_inblock_height';\r\n    \t\t\t\t\tvar filter_type = \$('{$this->_getBasePartName($element)}' + 'filter_type').value;\r\n                        if (\$(id) && filter_type == 9){\r\n                        \t\$(id).up('td').up('tr').show();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tvar id = '{$this->_getBasePartName($element)}' + 'inblock_height'; \r\n                        if (\$(id)){\r\n                        \t\$(id).up('td').up('tr').hide();\t\r\n\t\t\t\t\t\t}\r\n    \t\t\t\t}else{\r\n    \t\t\t\t\tfor (var i = 0; i < elements.length; i++) {\r\n                    \t\tvar id = '{$this->_getBasePartName($element)}' + elements[i]; \r\n                            if (\$(id)){\r\n                            \t\$(id).up('td').up('tr').hide();\t\r\n    \t\t\t\t\t\t}\r\n                        }\r\n                        var id = '{$this->_getBasePartName($element)}' + 'inblock_height'; \r\n                        if (\$(id)){\r\n                        \t\$(id).up('td').up('tr').hide();\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tvar id = '{$this->_getBasePartName($element)}' + 'max_inblock_height'; \r\n                        if (\$(id)){\r\n                        \t\$(id).up('td').up('tr').hide();\t\r\n\t\t\t\t\t\t}\r\n    \t\t\t\t}\r\n                });\r\n                document.observe('dom:loaded', function() {   \t\r\n                \tinit_{$element->getHtmlId()}();                \t\r\n                });\r\n                document.onreadystatechange = init_{$element->getHtmlId()};\r\n                \r\n                function init_{$element->getHtmlId()}() {\r\n                \tGomage_Navigation_fireEvent(\$('{$element->getHtmlId()}'), 'change');\r\n                }\r\n            </script>";
     $element->setData('after_element_html', $javaScript . $after_element_html);
     return $element->getElementHtml();
 }
開發者ID:vstorm83,項目名稱:ausport,代碼行數:7,代碼來源:Inblocktype.php

示例6: _getScriptHtml

    /**
     * @return string
     */
    protected function _getScriptHtml(Varien_Data_Form_Element_Abstract $element)
    {
        return <<<SCRIPT
<script type="text/javascript">
//<![CDATA[
    \$\$('#_accountnew_password,#account-send-pass').each(function(elem) {
        \$(elem).on('change', function() {
            if (\$('_accountnew_password').getValue() || \$('account-send-pass').checked) {
                \$('{$element->getHtmlId()}_container').show();
                \$('{$element->getHtmlId()}').enable();
            } else {
                \$('{$element->getHtmlId()}_container').hide();
                \$('{$element->getHtmlId()}').disable();
            }
        });
        \$(elem).on('focus', function() {
            \$('{$element->getHtmlId()}_container').show();
            \$('{$element->getHtmlId()}').enable();
        });
        \$(elem).on('blur', function() {
            if (!\$('_accountnew_password').getValue() && !\$('account-send-pass').checked) {
                \$('{$element->getHtmlId()}_container').hide();
                \$('{$element->getHtmlId()}').disable();
            }
        });
        document.observe("dom:loaded", function() {
            \$('{$element->getHtmlId()}_container').hide();
            \$('{$element->getHtmlId()}').disable();
        });
    });
//]]></script>
SCRIPT;
    }
開發者ID:hientruong90,項目名稱:ee_14_installer,代碼行數:36,代碼來源:Adminpass.php

示例7: render

    public function render(Varien_Data_Form_Element_Abstract $element)
    {
        $useContainerId = $element->getData('use_container_id');
        return sprintf('<tr class="system-fieldset-sub-head" id="row_%s"><td colspan="5" class="ves-description">
					   <h3>	<a href="http://www.venustheme.com"><b>Magento - Venus Deals Block</b></a>  </h3>
								The most elegant way to show list products of your magento store inside the smooth ProductCarousel. 
								the module supports multiple themes for fitting your design, easy to make owner themes by yourself, 
								and many kind of selecting products sources. 
								When you used, sure you will get highest effects while introducing your customers great products, featured products .<br>
							<br>
							
							<h4><b>Guide</b></h4>
							<ul>
								<li><a href="http://www.venustheme.com"> 1) Forum Support</a></li>
								<li><a href="http://www.venustheme.com"> 2) Submit A Request</a></li>
								<li><a href="http://www.venustheme.com"> 3) Submit A Ticket</a></li>
							</ul>
							<div>
								<h4>How to implement</h4>
								<ul>
									<li>&lt block type="ves_deals/deal_productlist" name="deals.list" /&gt</li>
									<li>{{block type="ves_deals/deal_productlist" name="deals.list"}}</li>
								</ul>
								
							</div>
							<br>
							<div style="font-size:11px">@Copyright: <i><a href="http://www.venustheme.com" target="_blank">VenusTheme.Com</a></i></div>
					   </td></tr>', $element->getHtmlId(), $element->getHtmlId(), $element->getLabel());
    }
開發者ID:quanghuynt93,項目名稱:VesSmartshop,代碼行數:29,代碼來源:Information.php

示例8: render

 public function render(Varien_Data_Form_Element_Abstract $element)
 {
     if ($country = $element->getForm()->getElement('country_id')) {
         $countryId = $country->getValue();
     } else {
         return $element->getDefaultHtml();
     }
     $regionId = $element->getForm()->getElement('region_id')->getValue();
     $html = '<tr>';
     $element->setClass('input-text');
     $html .= '<td class="label">' . $element->getLabelHtml() . '</td><td class="value">';
     $html .= $element->getElementHtml();
     $selectName = str_replace('region', 'region_id', $element->getName());
     $selectId = $element->getHtmlId() . '_id';
     $html .= '<select id="' . $selectId . '" name="' . $selectName . '" class="select required-entry" style="display:none">';
     $html .= '<option value="">' . AO::helper('customer')->__('Please select') . '</option>';
     $html .= '</select>';
     $html .= '<script type="text/javascript">
     if ($("' . $country->getHtmlId() . '") != undefined) {
         new regionUpdater("' . $country->getHtmlId() . '", "' . $element->getHtmlId() . '", "' . $selectId . '", ' . $this->helper('directory')->getRegionJson() . ');
     }
     </script>';
     $html .= '</td></tr>' . "\n";
     return $html;
 }
開發者ID:ronseigel,項目名稱:agent-ohm,代碼行數:25,代碼來源:Customer_Edit_Renderer_Region.php

示例9: render

 public function render(Varien_Data_Form_Element_Abstract $element)
 {
     $html = '<tr>' . "\n";
     $countryId = false;
     if ($country = $element->getForm()->getElement('country_id')) {
         $countryId = $country->getValue();
     }
     $regionCollection = false;
     if ($countryId) {
         if (!isset(self::$_regionCollections[$countryId])) {
             self::$_regionCollections[$countryId] = Mage::getModel('directory/country')->setId($countryId)->getLoadedRegionCollection();
         }
         $regionCollection = self::$_regionCollections[$countryId];
     }
     $regionId = $element->getForm()->getElement('region_id')->getValue();
     if ($regionCollection && $regionCollection->getSize()) {
         $elementClass = $element->getClass();
         $element->setClass(str_replace('input-text', '', $elementClass));
         $html .= '<td class="label">' . $element->getLabelHtml() . '</td>';
         $html .= '<td class="value"><select id="' . $element->getHtmlId() . '" name="' . $element->getName() . '" ' . $element->serialize($element->getHtmlAttributes()) . '>' . "\n";
         foreach ($regionCollection as $region) {
             $selected = $regionId == $region->getId() ? ' selected' : '';
             $html .= '<option value="' . $region->getId() . '"' . $selected . '>' . $region->getName() . '</option>';
         }
         $html .= '</select></td>';
         $element->setClass($elementClass);
     } else {
         $element->setClass('input-text');
         $html .= '<td class="label"><label for="' . $element->getHtmlId() . '">' . $element->getLabel() . ' <span class="required" style="display:none">*</span></label></td>';
         $element->setRequired(false);
         $html .= '<td class="value"><input id="' . $element->getHtmlId() . '" name="' . $element->getName() . '" value="' . $element->getEscapedValue() . '"' . $element->serialize($element->getHtmlAttributes()) . '/></td>' . "\n";
     }
     $html .= '</tr>' . "\n";
     return $html;
 }
開發者ID:arslbbt,項目名稱:mangentovies,代碼行數:35,代碼來源:Region.php

示例10: render

	public function render(Varien_Data_Form_Element_Abstract $element)
    {
        $useContainerId = $element->getData('use_container_id');
        return sprintf('<tr class="system-fieldset-sub-head" id="row_%s"><td colspan="5"><h4 id="%s">%s</h4></td></tr>',
            $element->getHtmlId(), $element->getHtmlId(), $element->getLabel()
        );
    }
開發者ID:amal-nibaya,項目名稱:PB-BEERSHOP,代碼行數:7,代碼來源:Spacer.php

示例11: _optionToHtml

 /**
  * Override method to output wrapper
  *
  * @param Varien_Data_Form_Element_Abstract $element
  * @param Array $option
  * @param String $selected
  * @return String
  */
 protected function _optionToHtml($element, $option, $selected)
 {
     $html = '<div class="left a-center meigee-radio">';
     $html .= '<div class="meigee-thumb"></div>';
     if (is_array($option)) {
         $html .= '<label class="inline" for="' . $element->getHtmlId() . $option['value'] . '"><i class="fa ' . $option['label'] . '"></i></label>';
     } elseif ($option instanceof Varien_Object) {
         $html .= '<label class="inline" for="' . $element->getHtmlId() . $option->getValue() . '"><i class="fa ' . $option->getLabel() . '"></i></label>';
     }
     $html .= '<input type="radio"' . $element->serialize(array('name', 'class', 'style'));
     if (is_array($option)) {
         $html .= 'value="' . htmlspecialchars($option['value'], ENT_COMPAT) . '"  id="' . $element->getHtmlId() . $option['value'] . '"';
         if ($option['value'] == $selected) {
             $html .= ' checked="checked"';
         }
         $html .= ' />';
     } elseif ($option instanceof Varien_Object) {
         $html .= 'id="' . $element->getHtmlId() . $option->getValue() . '"' . $option->serialize(array('label', 'title', 'value', 'class', 'style'));
         if (in_array($option->getValue(), $selected)) {
             $html .= ' checked="checked"';
         }
         $html .= ' />';
     }
     $html .= '</div>';
     $html .= $element->getSeparator() . "\n";
     return $html;
 }
開發者ID:zaiats85,項目名稱:blacknwhite,代碼行數:35,代碼來源:Awesome.php

示例12: _getElementHtml

    protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
    {
        $html = $element->getElementHtml();
        $jsUrl = $this->getJsUrl('smartwave/jquery/jquery-1.8.3.min.js');
        $textureUrl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . Mage::helper('mango')->getTexturePath();
        $bgcPickerId = str_replace('_texture', '_bg_color', $element->getHtmlId());
        $previewId = $element->getHtmlId() . '-texture-preview';
        if (Mage::registry('jqueryLoaded') == false) {
            $html .= '<script type="text/javascript" src="' . $jsUrl . '"></script>
			    <script type="text/javascript">jQuery.noConflict();</script>';
            Mage::register('jqueryLoaded', 1);
        }
        $html .= '<br/><div id="' . $previewId . '" style="width:280px; height:160px; margin:10px 0; background-color:transparent;"></div>
		    <script type="text/javascript">
			    jQuery(function($){
				    var texture		= $("#' . $element->getHtmlId() . '");
				    var bgcolor		= $("#' . $bgcPickerId . '");
				    var preview 	= $("#' . $previewId . '");
				    
				    preview.css("background-color", bgcolor.attr("value"));
				    texture.change(function() {
                        var bg_image = "url(' . $textureUrl . '" + texture.val() + ".png)";
                        if(texture.val() == 0)
                            bg_image = "none";
					    preview.css({
						    "background-color": bgcolor.css("background-color"),
						    "background-image": bg_image
					    });
				    }).change();
                    bgcolor.change(function(){texture.change();});
			    });
		    </script>';
        return $html;
    }
開發者ID:perseusl,項目名稱:kingdavid,代碼行數:34,代碼來源:Texture.php

示例13: _optionToHtml

 /**
  * Override method to output wrapper
  *
  * @param Varien_Data_Form_Element_Abstract $element
  * @param Array $option
  * @param String $selected
  * @return String
  */
 protected function _optionToHtml($element, $option, $selected)
 {
     $float = $option['value'] == 'fixed' ? 'right' : 'left';
     $html = '<div class="' . $float . ' a-center">';
     $html .= '<img src="' . Mage::getDesign()->getSkinUrl('images/magik/lamby/appearance_width_' . $option['value'] . '.jpg') . '" alt="" /><br/>';
     $html .= '<input type="radio"' . $element->serialize(array('name', 'class', 'style'));
     if (is_array($option)) {
         $html .= 'value="' . htmlspecialchars($option['value'], ENT_COMPAT) . '"  id="' . $element->getHtmlId() . $option['value'] . '"';
         if ($option['value'] == $selected) {
             $html .= ' checked="checked"';
         }
         $html .= ' />';
         $html .= '<label class="inline" for="' . $element->getHtmlId() . $option['value'] . '"> ' . $option['label'] . '</label>';
     } elseif ($option instanceof Varien_Object) {
         $html .= 'id="' . $element->getHtmlId() . $option->getValue() . '"' . $option->serialize(array('label', 'title', 'value', 'class', 'style'));
         if (in_array($option->getValue(), $selected)) {
             $html .= ' checked="checked"';
         }
         $html .= ' />';
         $html .= '<label class="inline" for="' . $element->getHtmlId() . $option->getValue() . '">' . $option->getLabel() . '</label>';
     }
     $html .= '</div>';
     $html .= $element->getSeparator() . "\n";
     return $html;
 }
開發者ID:newedge-media,項目名稱:medpage-easylink,代碼行數:33,代碼來源:Width.php

示例14: render

 /**
  * Render element html
  *
  * @param Varien_Data_Form_Element_Abstract $element
  * @return string
  */
 public function render(Varien_Data_Form_Element_Abstract $element)
 {
     return sprintf('<tr class="system-fieldset-sub-head" id="row_%s">
             <td class="label"><label for="%s">%s</label></td>
             <td class="value" colspan="4">%s</td>
         </tr>', $element->getHtmlId(), $element->getHtmlId(), $element->getLabel(), Mage::helper('eyehubspot')->getVersion());
 }
開發者ID:shopgo-magento1,項目名稱:Magento-HubspotIntegration,代碼行數:13,代碼來源:Version.php

示例15: render

    /**
     * Render element html
     *
     * @param Varien_Data_Form_Element_Abstract $element
     * @return string
     */
    public function render(Varien_Data_Form_Element_Abstract $element)
    {
        $fieldIdSuffix = strstr($element->getHtmlId(), '_product_previewjs');
        //Replace the suffix with suffix appropriate for the background color picker in the current options group
        $bgcPickerId = str_replace($fieldIdSuffix, '_bg_color', $element->getHtmlId());
        $elements = array();
        $elements['product-item'] = array('bg_color' => 'background-color', 'hover_bg_color' => 'background-color', 'padding_top' => 'padding-top', 'padding_right' => 'padding-right', 'padding_bottom' => 'padding-bottom', 'padding_left' => 'padding-left', 'border_width' => 'border-width', 'border_color' => 'border-color', 'border_style' => 'border-style');
        $elements['product-name'] = array('name_fonts' => 'font-family', 'name_color' => 'color', 'name_hover_color' => 'color', '');
        $elements['price-box'] = array('price_color' => 'color');
        $elements['old-price'] = array('old_price_color' => 'color');
        $elements['special-price'] = array('special_price_color' => 'color');
        $elements['btn-cart'] = array('addtocart_color' => 'color', 'addtocart_hover_color' => 'color', 'addtocart_bg_color' => 'background-color', 'addtocart_hover_bg_color' => 'background-color');
        $elements['quickview'] = array('quickview_color' => 'color', 'quickview_hover_color' => 'color', 'quickview_bg_color' => 'background-color', 'quickview_hover_bg_color' => 'background-color');
        $elements['link-compare'] = array('compare_color' => 'color', 'compare_hover_color' => 'color', 'compare_bg_color' => 'background-color', 'compare_hover_bg_color' => 'background-color');
        $elements['link-wishlist'] = array('whishlist_color' => 'color', 'whishlist_hover_color' => 'color', 'whishlist_bg_color' => 'background-color', 'whishlist_hover_bg_color' => 'background-color');
        $elements['desc'] = array('short_description_color' => 'color');
        $elements['countdown-timmer'] = array('countdown_timer_color' => 'color');
        $elements['new-icon'] = array('new_label_color' => 'color', 'new_label_bg_color' => 'background-color');
        $elements['onsale'] = array('sale_label_color' => 'color', 'sale_label_bg_color' => 'background-color');
        $script = '';
        $script .= '<script type="text/javascript">
		jQuery(function(){
			';
        foreach ($elements as $k => $v) {
            if (is_array($v)) {
                foreach ($v as $key => $val) {
                    $htmlId = str_replace($fieldIdSuffix, '_' . $key, $element->getHtmlId());
                    $id = time();
                    $script .= '
						var tex' . $id . '	= jQuery("#' . $htmlId . '");
						tex' . $id . '.change(function() {
						var val = jQuery(this).val();
						var elemenClass = ".' . $k . '";
						';
                    if (preg_match('/hover/', $key)) {
                        $script .= 'var originalData = "";
								if(jQuery(elemenClass).css("' . $val . '") !== "undefined"){
									originalData = jQuery(elemenClass).css("' . $val . '");
								}
							';
                        $script .= 'jQuery(elemenClass).hover(function(){
								jQuery(elemenClass).css({"' . $val . '": val});
							},function(){
								if(originalData!=""){
									jQuery(elemenClass).css({"' . $val . '": originalData});
								}
							});';
                    } else {
                        $script .= 'jQuery(elemenClass).css({"' . $val . '": val});';
                    }
                    $script .= '}).change();';
                }
            }
        }
        $script .= '			
						});
						</script>';
        $useContainerId = $element->getData('use_container_id');
        return sprintf('<tr class="system-fieldset-sub-head fieldset-hidden" id="row_%s"><td colspan="5">%s</td></tr>', $element->getHtmlId(), $script);
    }
開發者ID:adrienManikon,項目名稱:iPong,代碼行數:66,代碼來源:ProductPreviewJs.php


注:本文中的Varien_Data_Form_Element_Abstract::getHtmlId方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。