当前位置: 首页>>代码示例>>PHP>>正文


PHP Mage_Adminhtml_Block_System_Config_Form_Field类代码示例

本文整理汇总了PHP中Mage_Adminhtml_Block_System_Config_Form_Field的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Adminhtml_Block_System_Config_Form_Field类的具体用法?PHP Mage_Adminhtml_Block_System_Config_Form_Field怎么用?PHP Mage_Adminhtml_Block_System_Config_Form_Field使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了Mage_Adminhtml_Block_System_Config_Form_Field类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _getElementHtml

 /**
  * Override for disabling support information until API token is set
  *
  * @param Varien_Data_Form_Element_Abstract $element
  *
  * @return string
  */
 protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
 {
     if (!Mage::helper('bronto_verify/apitoken')->getStatus()) {
         $element->setDisabled('disabled');
     }
     return parent::_getElementHtml($element);
 }
开发者ID:xiaoguizhidao,项目名称:blingjewelry-prod,代码行数:14,代码来源:Support.php

示例2: _getElementHtml

    /**
     * Override field method to add js
     *
     * @param Varien_Data_Form_Element_Abstract $element
     * @return String
     */
    protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
    {
        // Get the default HTML for this option
        $html = parent::_getElementHtml($element);
        if (!Mage::registry('mColorPicker')) {
            $html .= '
                <script type="text/javascript">
					jQuery.fn.mColorPicker.init.replace = false;
					jQuery.fn.mColorPicker.init.enhancedSwatches = false;
					jQuery.fn.mColorPicker.init.allowTransparency = true;
					jQuery.fn.mColorPicker.init.showLogo = false;
					jQuery.fn.mColorPicker.defaults.imageFolder = "' . $this->getJsUrl('shopshark/mColorPicker/') . '";
                </script>
                ';
            Mage::register('mColorPicker', 1);
        }
        $html .= '
        <script type="text/javascript">
			jQuery(function($){
				$("#' . $element->getHtmlId() . '").width("200px").attr("data-hex", true).mColorPicker();
			});
        </script>
        ';
        return $html;
    }
开发者ID:xiaoguizhidao,项目名称:storebaby.it,代码行数:31,代码来源:Color.php

示例3: _getElementHtml

 /**
  * Ajax Create the addressbooks.
  *
  * @param Varien_Data_Form_Element_Abstract $element
  *
  * @return string
  */
 protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
 {
     $url = Mage::helper('adminhtml')->getUrl('*/connector/createnewaddressbook');
     $website = Mage::app()->getRequest()->getParam('website', 0);
     $element->setData('after_element_html', "<script>\n                function createAddressbook(form, element) {\n                    var name       = \$('connector_sync_settings_dynamic_addressbook_addressbook_name').value;\n                    var visibility = \$('connector_sync_settings_dynamic_addressbook_visibility').value;\n                    var reloadurl  = '{$url}';\n                    if(name && visibility){\n                        new Ajax.Request(reloadurl, {\n                            method: 'post',\n                            parameters: {'name' : name, 'visibility' : visibility, 'website': '{$website}'},\n                            onComplete: function(transport) {\n                                window.location.reload();\n                            }\n                        });\n                    }\n                    return false;\n                }\n            </script>");
     return parent::_getElementHtml($element);
 }
开发者ID:dotmailer,项目名称:dotmailer-magento-extension,代码行数:14,代码来源:Addressbook.php

示例4: toggleDisabled

 public function toggleDisabled($element)
 {
     if (!$element->getValue() || $element->getValue() != 1) {
         $element->getForm()->getElement($this->_getSplitPaymentElementId($element))->setDisabled('disabled');
     }
     return parent::getHtml();
 }
开发者ID:hipay,项目名称:hipay-fullservice-sdk-magento1,代码行数:7,代码来源:Allowsplitpayment.php

示例5: __construct

 public function __construct()
 {
     parent::__construct();
     if (!$this->getTemplate()) {
         $this->setTemplate('udtiercom/system/form_field/category_rates_config.phtml');
     }
 }
开发者ID:xiaoguizhidao,项目名称:magento,代码行数:7,代码来源:Rates.php

示例6: _getElementHtml

 protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
 {
     $time = $element->getHtmlId();
     // Get the default HTML for this option
     $html = parent::_getElementHtml($element);
     return $html;
 }
开发者ID:sshegde123,项目名称:wmp8,代码行数:7,代码来源:Textarea.php

示例7: _getElementHtml

 /**
  * Override method to output our custom HTML with JavaScript
  *
  * @param Varien_Data_Form_Element_Abstract $element
  *
  * @return String
  */
 protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
 {
     $_html = array();
     $element->setData('after_element_html', "\n            <span id=\"classpath-loadingmask\" style=\"display: none; width: 100px;\">\n                <span class=\"loader\" id=\"classpath-loading-mask-loader\" style=\"background: url(" . $this->getSkinUrl('bronto/images/ajax-loader-tr.gif') . ") no-repeat 0 50%; background-size: 20px; padding:3px 0 3px 25px;\">" . $this->__(' Searching For Class Path...') . "</span>\n                <span id=\"classpath-loading-mask\"></span>\n            </span>\n\n            <script>\n            //<![CDATA[\n                Event.observe(window, 'load', function() {\n                    var newTr = '<tr id=\"bronto_verify_advanced_classpath_results\"><td class=\"classpath_results\" colspan=\"4\"><div id=\"bronto-classpath-results\"></div></td></tr>';\n                    \$('" . $this->_getRowElementId($element) . "').insert({after: newTr});\n                });\n                function searchClasspath() {\n                    var reloadUrl  = '{$this->getUrl('*/advanced/ajaxclasspath')}';\n                    var statusText = \$('bronto-classpath-results');\n\n                    var searchText = \$('bronto_verify_advanced_classpath_search').value;\n                    var classType  = \$('classpath-type').value;\n\n                    statusText.innerHTML = \$('classpath-loadingmask').innerHTML;\n\n                    new Ajax.Request(reloadUrl, {\n                        method: 'post',\n                        parameters: {class: searchText, type: classType},\n                        onComplete: function(transport) {\n                            Element.hide('classpath-loadingmask');\n                            statusText.innerHTML = transport.responseText;\n                        }\n                    });\n\n                    return false;\n                }\n            //]]>\n            </script>\n        ");
     // Add Class Type Selector to Input
     $classTypeHtml = '<select id="classpath-type"><option value="model">Model (Default)</option><option value="helper">Helper</option><option value="block">Block</option><option value="controller">Controller</option></select>';
     // Add Search Button
     $button = $this->getLayout()->createBlock('bronto_verify/adminhtml_widget_button_classpath')->toHtml();
     $buttonHtml = "<p class=\"form-buttons\" id=\"events-button\" style=\"float:none;\">{$button}</p>";
     // Add Button to Html
     $_html[] = $buttonHtml;
     // Show everything Else
     if (!empty($_html)) {
         $elementHtml = $element->getElementHtml();
         $elementHtml .= $classTypeHtml;
         if ($element->getComment()) {
             $elementHtml .= '<p class="note"><span>' . $element->getComment() . '</span></p>';
             $element->setComment(null);
         }
         $elementHtml .= '<div style="margin-top:10px">';
         $elementHtml .= implode('<br />', $_html);
         $elementHtml .= '</div>';
         return $elementHtml;
     }
     return parent::_getElementHtml($element);
 }
开发者ID:Rodrifer,项目名称:candyclub,代码行数:33,代码来源:Classpath.php

示例8: _getElementHtml

 protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
 {
     $element->setData('onchange', "apiValidation(this.form, this);");
     $url = Mage::helper('adminhtml')->getUrl('*/connector/ajaxvalidation');
     $element->setData('after_element_html', "\n            <script>\n                document.observe('dom:loaded', function(){\n                    apiValidation();\n\n                 });\n                function apiValidation(form, element) {\n                    var api_user       = \$('connector_transactional_emails_credentials_api_username');\n                    var api_password   = \$('connector_transactional_emails_credentials_api_password');\n                    var reloadurl  = '{$url}';\n                    var encoded = btoa(api_password.value);\n                    new Ajax.Request(reloadurl, {\n                        method: 'post',\n                        parameters: {'api_username' : api_user.value, 'api_password' : encoded},\n                        onComplete: function(transport) {\n                            Element.hide('loadingmask');\n                            if(transport.responseText == '\"Credentials Valid.\"'){\n                                api_user.setStyle({\n                                    fontWeight: 'bold',\n                                    color:  'green' ,\n                                    background: 'transparent url(\"" . $this->getSkinUrl('images/success_msg_icon.gif') . "\") no-repeat right center'\n                                })\n                            }else{\n                                api_user.setStyle({\n                                    fontWeight: 'bold',\n                                    color:  'red',\n                                    background: 'transparent url(\"" . $this->getSkinUrl('images/error_msg_icon.gif') . "\") no-repeat right center'\n                                });\n\n                            }\n                        }\n                    });\n\n                    return false;\n                }\n\n            </script>\n        ");
     return parent::_getElementHtml($element);
 }
开发者ID:vdimitrovv,项目名称:dotmailer-magento-extension,代码行数:7,代码来源:Emailapivalidate.php

示例9: _getElementHtml

 /**
  * Override field method to add js
  *
  * @param Varien_Data_Form_Element_Abstract $element
  * @return String
  */
 protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
 {
     // Get the default HTML for this option
     $html = parent::_getElementHtml($element);
     $html .= '<script>jQuery(function(){ jQuery("#' . $element->getHtmlId() . '").attr("style", "width: 200px !important").attr("data-hex", true).mColorPicker({ imageFolder: "' . $this->getJsUrl('olegnax/mColorPicker/') . '" }); });</script>';
     return $html;
 }
开发者ID:bigtailbear14,项目名称:rosstheme,代码行数:13,代码来源:Color.php

示例10: _getElementHtml

 protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
 {
     $extra = '';
     if ($current_store = Mage::app()->getRequest()->getParam('store')) {
         $store = Mage::getModel('core/store')->load($current_store);
         $url = parse_url($store->getBaseUrl());
         $host = $url['host'];
         //$ok = Mage::getStoreConfig('j2tonecheckout/'.base64_decode("bW9kdWxlX3NlcmlhbA==").'/ok', $store->getId());
         /*$ok = Mage::getStoreConfig('rewardpoints/verser/ok', $store->getId());
           if ($ok === null){
               $extra = '<div style="color:red;">'.Mage::helper('rewardpoints')->__('Please insert / verify your serial for "%s" domain', $host).'</div>';
           } else if ($ok === "0"){
               $extra = '<div style="color:red;">'.Mage::helper('rewardpoints')->__('Serial is not valid for "%s" domain', $host).'</div>';
           } else if ($ok == "1"){
               $extra = '<div style="color:green;">'.Mage::helper('rewardpoints')->__('Serial is valid for "%s" domain', $host).'</div>';
           }*/
         $extra = '<div>' . Mage::helper('rewardpoints')->__("Serial defined for store domain '%s'", $host) . '</div>';
     } else {
         $websites = Mage::app()->getWebsites();
         $code = Mage::app()->getWebsite(true)->getDefaultGroup()->getDefaultStore()->getCode();
         $store = Mage::getModel('core/store')->load($code);
         $url = parse_url($store->getBaseUrl());
         $host = $url['host'];
         $extra = '<div>' . Mage::helper('rewardpoints')->__("Serial defined for store domain '%s'", $host) . '</div>';
     }
     //$checkbox_name = $element->getName();
     //$checkbox_name = str_replace("key", "key_validation", $checkbox_name);
     $html = $extra;
     //.'<input type="checkbox" name="'.$checkbox_name.'" id="revalidate" value="1" /> <label for="revalidate">'.Mage::helper('rewardpoints')->__('First time validation / Re-validate').'</label>';
     return parent::_getElementHtml($element) . $html;
 }
开发者ID:xiaoguizhidao,项目名称:devfashion,代码行数:31,代码来源:Serialtext.php

示例11: render

 /**
  * @param Varien_Data_Form_Element_Abstract $element
  *
  * @return string
  */
 public function render(Varien_Data_Form_Element_Abstract $element)
 {
     if (!extension_loaded('soap') || !extension_loaded('openssl') || !Mage::helper('bronto_common')->getApiToken()) {
         return null;
     }
     return parent::render($element);
 }
开发者ID:bevello,项目名称:bevello,代码行数:12,代码来源:Hidden.php

示例12: _getElementHtml

 protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
 {
     // Get the default HTML for this option
     $output = parent::_getElementHtml($element);
     // return $output;
     return $this->_getUrl();
 }
开发者ID:xiaoguizhidao,项目名称:autotech_design,代码行数:7,代码来源:Image.php

示例13: _getElementHtml

 /**
  * Loading background on save.
  * @param Varien_Data_Form_Element_Abstract $element
  *
  * @return string
  */
 protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
 {
     // Get the default HTML for this option
     $html = parent::_getElementHtml($element);
     $html .= sprintf('<div id="loadingmask" style="position: fixed;">
         <div class="loader" id="loading-mask-loader">
         <img src="%sskin/adminhtml/default/default/images/ajax-loader-tr.gif" alt="%s"/>%s', preg_replace('/index.php\\//', '', $this->getBaseUrl()), $this->__('Loading...'), $this->__('Loading...')) . '<div id="loading-mask"></div></div>';
     $jQuery = '<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" ></script>';
     $jQuery .= '<script type="text/javascript">
         jQuery.noConflict();
         jQuery(document).ready(function() {
             //hide the load image field
             jQuery("#row_connector_api_credentials_api_credentials_validator").hide();
             jQuery("#row_connector_sync_settings_sync_customer_schedule_validator").hide();
             var loadingmask = jQuery("#loadingmask");
             loadingmask.hide();
             loadingmask.css({top : "50\\%", left: "50\\%"});
             //var thisButton = jQuery("button");
             //console.log(thisButton);
             //jQuery("button").click(function(){
             //    jQuery("body").css({"background-color": "black", "opacity": "0.4"});
             //    jQuery("#row_connector_api_settings_api_credentials_validator").show();
             //    jQuery("#row_connector_sync_settings_sync_customer_schedule_validator").show();
             //    loadingmask.show();
             //    loadingmask.css({"display": "block", "opacity" : "1"});
             //})
         });
         </script>';
     $html .= $jQuery;
     return $html;
 }
开发者ID:vdimitrovv,项目名称:dotmailer-magento-extension,代码行数:37,代码来源:Waitingfield.php

示例14: render

 public function render(Varien_Data_Form_Element_Abstract $element)
 {
     $this->setData('scope', $element->getScope());
     // Remove the inheritance checkbox
     $element->unsCanUseWebsiteValue()->unsCanUseDefaultValue();
     return parent::render($element);
 }
开发者ID:mSupply,项目名称:runnable_test_repo,代码行数:7,代码来源:Label.php

示例15: _getElementHtml

    /**
     * Override method to output our custom image
     *
     * @param Varien_Data_Form_Element_Abstract $element
     * @return String
     */
    protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
    {
        // Get the default HTML for this option
        $html = parent::_getElementHtml($element);
        $html = '<div class="title"><h2>Click on element to remove it from the widget</h2></div><div class="title-2"><h2>Click on element to add it to widget</h2></div><div class="widget-holder"><div class="widget-content">';
        $value = $element->getValue();
        if ($values = $element->getValues()) {
            foreach ($values as $option) {
                $html .= $this->_optionToHtml($element, $option, $value);
            }
        }
        $html .= $element->getAfterElementHtml();
        $html .= '</div><div class="items-container">
			<div class="product_name-holder"><div class="product_name-sub"></div></div>
			<div class="rating_stars-holder"><div class="rating_stars-sub"></div></div>
			<div class="reviews">
				<div class="rating_cust_link-holder"><div class="rating_cust_link-sub"></div></div>
				<div class="rating_add_review_link-holder"><div class="rating_add_review_link-sub"></div></div>
			</div>
			<div class="add_to_cart-holder"><div class="add_to_cart-sub"></div></div>
			<div class="price"><div class="price-holder"><div class="price-sub"></div></div></div>
			<div class="wishlist-holder"><div class="wishlist-sub"></div></div>
			<div class="compare-holder"><div class="compare-sub"></div></div>
		</div></div>';
        return $html;
    }
开发者ID:victorkho,项目名称:telor,代码行数:32,代码来源:Widgetcontent.php


注:本文中的Mage_Adminhtml_Block_System_Config_Form_Field类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。