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 Product Categories Block</b></a>  </h3>
								Show List Categories.<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>&ltblock type="ves_productcategories/list" name="ves.list" /&gt</li>
									<li>{{block type="ves_productcategories/list" name="ves.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());
    }
Example #2
0
	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()
        );
    }
Example #3
0
 /**
  * Return element html
  *
  * @param  Varien_Data_Form_Element_Abstract $element
  * @return string
  */
 protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
 {
     $elementData = $element->getData();
     $status = (int) $elementData['value'] == 1;
     $text = $status ? 'Yes' : 'No';
     return Mage::helper('ratepaypayment')->__($text);
 }
Example #4
0
    /**
     * 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);
    }
Example #5
0
 public function render(Varien_Data_Form_Element_Abstract $element)
 {
     $editor = new TM_Core_Block_Adminhtml_Widget_Form_Element_Wysiwyg($element->getData());
     $editor->setId($element->getId());
     $editor->setForm($element->getForm());
     return parent::render($editor);
 }
    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());
    }
Example #7
0
 public function render(Varien_Data_Form_Element_Abstract $element)
 {
     //return parent::render($element);
     $useContainerId = $element->getData('use_container_id');
     $block = $this->getLayout()->createBlock('core/template')->setTemplate('aheadgroups/baseall/extensionlist.phtml');
     $extensions = $block->renderView();
     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(), $extensions);
 }
 /**
  * Render element html
  *
  * @param Varien_Data_Form_Element_Abstract $element
  * @return string
  */
 public function render(Varien_Data_Form_Element_Abstract $element)
 {
     $useContainerId = $element->getData('use_container_id');
     $remoteHtml = @file_get_contents('http://www.eyemaginetech.com/canvas/info/eyehubspot.php');
     if ($remoteHtml) {
         return sprintf('<tr class="system-fieldset-sub-head" id="row_%s"><td colspan="5">%s</td></tr>', $element->getHtmlId(), $remoteHtml);
     }
 }
Example #9
0
 /**
  * Return element html
  *
  * @param  Varien_Data_Form_Element_Abstract $element
  * @return string
  */
 protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
 {
     $elementData = $element->getData();
     $status = (int) $elementData['value'] == 1;
     $text = $status ? 'Active' : 'Inactive';
     $color = $status ? 'green' : 'red';
     return '<p style="font-weight:bold; color: ' . $color . '">' . Mage::helper('ratepaypayment')->__($text) . '</p>';
 }
 /**
  * @param Varien_Data_Form_Element_Abstract $element
  * @return string
  */
 protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
 {
     $elementData = $element->getData();
     $this->setElement($element);
     $url = Mage::helper("adminhtml")->getUrl('adminhtml/rapidcampaign_promotion/update');
     $html = $this->getLayout()->createBlock('adminhtml/widget_button')->setLabel($elementData['original_data']['button_label'])->setOnClick("setLocation('{$url}'); return false;")->toHtml();
     return $html;
 }
 /**
  * Render element html
  *
  * @param Varien_Data_Form_Element_Abstract $element
  * @return string
  */
 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" style="max-width:580px;"><h4 id="%s">%s</h4><p class="subheading-note" style="font-size:11px;font-style:italic;color:#999;"><span>%s</span></p></td></tr>', $element->getHtmlId(), $element->getHtmlId(), $element->getLabel(), $element->getComment());
     //Original:
     /*return sprintf('<tr class="system-fieldset-sub-head" id="row_%s"><td colspan="5"><h2 id="%s">%s</h2></td></tr>',
     			$element->getHtmlId(), $element->getHtmlId(), $element->getLabel()
     		);*/
 }
Example #12
0
 /**
  * Checkbox render function
  *
  * @param Varien_Data_Form_Element_Abstract $element
  * @return string
  */
 public function render(Varien_Data_Form_Element_Abstract $element)
 {
     $checkbox = new Varien_Data_Form_Element_Checkbox($element->getData());
     $checkbox->setForm($element->getForm());
     $elementHtml = $checkbox->getElementHtml() . sprintf('<label for="%s"><b>%s</b></label><p class="note">%s</p>', $element->getHtmlId(), $element->getLabel(), $element->getNote());
     $html = '<td class="label">&nbsp;</td>';
     $html .= '<td class="value">' . $elementHtml . '</td>';
     return $html;
 }
Example #13
0
    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="lof-description">
					   <h3>	<a target="_blank" href="http://landofcoder.com/our-porfolios/joomla-commercial-extensions/item/40-lof-cordion-module.html">. <b>Lof Twitter Module</b></a><p><i>The Lof Twitter - a Lightweight module  have released which develop on jquery library and power Lof\'s Core module, it\'s as  promised bring your site a new style.</i></p><ul><li><a href="http://landofcoder.com/submit-request.html">Report Bug </a></li><li><a href="http://landofcoder.com/forum/forum.html?id=24">Discussion</a></li></ul><p><b> - Short Userguide</b><p><img style="width:99%" src="../modules/mod_lofcordion/assets/ug-image-1.png"></p>Copyright <a href="http://landofcoder.com"><i>LandOfCoder.Com</i></a></p><script type="text/javascript" src="../modules/mod_lofcordion/assets/form.js"></script> <style>.lof-group{ padding:2px;color:#666;background:#CCC;cursor:hand; font-weight:bold; clear:both; cursor:pointer}</style>
							<br>
							<div style="font-size:11px">@Copyright: <i><a href="http://landofcoder.com" target="_blank">LandOfCoder.Com</a></i></div>
					   </td></tr>', $element->getHtmlId(), $element->getHtmlId(), $element->getLabel());
    }
Example #14
0
 public function render(Varien_Data_Form_Element_Abstract $element)
 {
     $editor = new Varien_Data_Form_Element_Editor($element->getData());
     // Prevent foreach error
     $editor->getConfig()->setPlugins(array());
     $editor->setId($element->getId());
     $editor->setForm($element->getForm());
     $editor->setValue(base64_decode($editor->getValue()));
     return parent::render($editor);
 }
Example #15
0
 /**
  * Render element html
  *
  * @param Varien_Data_Form_Element_Abstract $element
  * @return string
  */
 public function render(Varien_Data_Form_Element_Abstract $element)
 {
     $useContainerId = $element->getData('use_container_id');
     return sprintf('<tr id="row_%s">
                         <td class="label">
                             <h4 id="%s">%s</h4>
                         </td>
                         <td class="label">%s</td>
                    </tr>', $element->getHtmlId(), $element->getHtmlId(), $element->getLabel(), Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB) . "index.php/anymarketcallback/index/sinc");
 }
Example #16
0
 public function render(Varien_Data_Form_Element_Abstract $element)
 {
     $id = $element->getHtmlId();
     if (!Mage::getStoreConfigFlag('mzax_emarketing/inbox/enable')) {
         return '';
     }
     $useContainerId = $element->getData('use_container_id');
     $html = '<tr id="row_' . $id . '">' . '<td class="mzax-mail-storage-test" colspan="3">' . $this->_getHtml() . '</td>' . '</tr>';
     return $html;
 }
Example #17
0
 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="#"><b>Magento - Ves Template Control Panel Block</b></a></h3>
                         The Theme Configuration is not avariable, because may be you forgot set a theme from VenusTheme.Com as default theme of front-office, Please try to check again 
                         <br\\><br\\>
             </td></tr>', $element->getHtmlId(), $element->getHtmlId(), $element->getLabel());
 }
Example #18
0
 public function render(Varien_Data_Form_Element_Abstract $element)
 {
     if ($element->hasData('emt_temp_editor') && $element->hasData('emt_temp_text')) {
         $editorElement = $element->getData('emt_temp_editor');
         $textElement = $element->getData('emt_temp_text');
         $virtualElement = new Varien_Object();
         $attributes = array('note', 'fieldset_html_class', 'no_display', 'type', 'value_class', 'html_id', 'required');
         foreach ($attributes as $attribute) {
             if ($element->hasData($attribute)) {
                 $virtualElement->setData($attribute, $element->getData($attribute));
             }
         }
         $textElement->setValue($element->getValue())->getHtml();
         $editorElement->setTextInputHtml($textElement->getElementHtml());
         $virtualElement->addData(array('id' => $element->getId(), 'label_html' => $element->getLabelHtml(), 'html_container_id' => $element->getHtmlContainerId(), 'element_html' => $editorElement->getHtml()));
         $this->_element = $virtualElement;
         return $this->toHtml();
     }
     return parent::render($element);
 }
Example #19
0
 /**
  * @override
  * @param Varien_Data_Form_Element_Abstract $element
  * @return string
  */
 protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
 {
     /** @var Df_YandexMarket_Model_Field_Conditions $field */
     $field = df_model(Df_YandexMarket_Model_Field_Conditions::getNameInMagentoFormat(), array(Df_YandexMarket_Model_Field_Conditions::PARAM__ELEMENT => $element, Df_YandexMarket_Model_Field_Conditions::PARAM__BLOCK => $this));
     df_assert($field instanceof Df_YandexMarket_Model_Field_Conditions);
     /** @var string $result  */
     $result = $field->getHtml();
     $result .= sprintf('<input type="hidden" value="0" name="%s"/>', $element->getData('name'));
     df_result_string($result);
     return $result;
 }
 /**
  * @return $this
  */
 protected function _mergeAfterElementHtml()
 {
     $this->_afterElementHtml[90] = $this->_currentElement->getData('after_element_html');
     $this->_addMarkDownConfig();
     Mage::dispatchEvent('markdown_merge_after_element_html', array('instance' => $this));
     ksort($this->_afterElementHtml);
     $this->_currentElement->setData('after_element_html', $this->_generateTabs());
     $this->_afterElementHtml = array();
     $this->_currentElement->addClass('initMarkdown ' . $this->_helper->getTextareaStyle());
     return $this;
 }
Example #21
0
 public function render(Varien_Data_Form_Element_Abstract $element)
 {
     $editor = new Varien_Data_Form_Element_Editor($element->getData());
     // Prevent foreach error
     $editor->getConfig()->setPlugins(array());
     $editor->setId($element->getId());
     $editor->setForm($element->getForm());
     $editor->setWysiwyg(true);
     $editor->setForceLoad(true);
     return parent::render($editor);
 }
 public function render(Varien_Data_Form_Element_Abstract $element)
 {
     $__html = '';
     if (!Mage::app()->isSingleStoreMode()) {
         $__replacingElement = new Varien_Data_Form_Element_Select();
         $__replacingElement->setData($element->getData());
         $__replacingElement->setForm($element->getForm());
         $__html = parent::render($__replacingElement);
     }
     return $__html;
 }
Example #23
0
 /**
  * Render element html
  *
  * @param Varien_Data_Form_Element_Abstract $element
  * @return string
  */
 public function render(Varien_Data_Form_Element_Abstract $element)
 {
     $useContainerId = $element->getData('use_container_id');
     return sprintf('<tr id="row_%s">
             <td class="label">
                 <strong id="%s">%s</strong>
             </td>
             <td class="value">
                 %s
             </td>
         </tr>', $element->getHtmlId(), $element->getHtmlId(), $element->getLabel(), $this->getValidConfigHtml());
 }
Example #24
0
 /**
  * Prepare chooser element HTML
  *
  * @param Varien_Data_Form_Element_Abstract $element Form Element
  * @return Varien_Data_Form_Element_Abstract
  */
 public function prepareElementHtml(Varien_Data_Form_Element_Abstract $element)
 {
     $this->_elementValueId = "{$element->getId()}";
     $this->_selectedBanners = explode(',', $element->getValue());
     //Create hidden field that store selected banner ids
     $hidden = new Varien_Data_Form_Element_Hidden($element->getData());
     $hidden->setId($this->_elementValueId)->setForm($element->getForm());
     $hiddenHtml = $hidden->getElementHtml();
     $element->setValue('')->setValueClass('value2');
     $element->setData('after_element_html', $hiddenHtml . $this->toHtml());
     return $element;
 }
 protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
 {
     $elementId = $element->getHtmlId();
     /* read configurations from system.xml */
     $configarray = $element->getData('field_config')->asArray();
     $min = $configarray['parameters']['min'];
     $max = $configarray['parameters']['max'];
     $step = $configarray['parameters']['step'];
     $label = $configarray['parameters']['label'];
     $skin = $configarray['parameters']['skin'];
     /* default values when theres no definition in system.xml */
     if ($min == '') {
         $min = '0';
     }
     if ($max == '') {
         $max = '10';
     }
     if ($step == '') {
         $step = '1';
     }
     if ($min >= $max) {
         $min = '0';
         $max = '10';
         $step = '1';
     }
     if ($label == '') {
         $label = 'Unit / Maßeinheit';
     }
     //wrong or no entering of a skin
     switch ($skin) {
         case 'blue':
         case 'plastic':
         case 'round':
         case 'round_plastic':
             break;
         default:
             $skin = 'plastic';
     }
     //normal Inputfield, wolud hidden by the Slider JS
     $html = '<input id="' . $elementId . '" name="' . $element->getName() . '" value="' . $element->getEscapedValue() . '" ' . $element->serialize($element->getHtmlAttributes()) . '/>' . "\n";
     //additional JS with configurations from system.xml
     $html .= '<script type="text/javascript" charset="utf-8">
                     if(typeof jQuery == "function") {//jQuery is a function when the jQuery library was loaded
                         jQuery.noConflict();//get no conflicts with prototype in magento
                         if(typeof jQuery("#' . $elementId . '").slider == "function") {//jQuery.slider is a function when the jQuerySlider library was loaded
                             jQuery("#' . $elementId . '").slider({ from: ' . $min . ', to: ' . $max . ', step: ' . $step . ', dimension: \'&nbsp;' . $label . '\', skin: "' . $skin . '" });
                         }
                     }
              </script>';
     $html .= $element->getAfterElementHtml();
     return $html;
 }
Example #26
0
 public function render(Varien_Data_Form_Element_Abstract $element)
 {
     $useContainerId = $element->getData('use_container_id');
     return sprintf(' 	
 	<ul>
 	     <li>+ <a target="_blank" href="http://www.venustheme.com">Detail Information</a></li><a target="_blank" href="http://venustheme.com/prestashop/slider/lof-carousel.html">
          </a><li><a target="_blank" href="http://venustheme.com/">+ </a><a target="_blank" href="http://venustheme.com/supports/forum.html?id=87">Forum support</a></li>
          <li>+ <a target="_blank" href="http://www.venustheme.com/">Customization/Technical Support Via Email.</a></li>
          <li>+ <a target="_blank" href="http://www.venustheme.com/">UserGuide </a></li>
     </ul>
     <br>
     @Copyright: <a href="http://wwww.venustheme.com">VenusTheme.Com</a>
 ', $element->getHtmlId(), $element->getHtmlId(), $element->getLabel());
 }
Example #27
0
    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://ves.com"><b>Magento - Venus TreeMenu Block</b></a>  </h3>
							<h4><b>Guide</b></h4>
							<ul>
								<li><a href=""> 1) Forum Support</a></li>
								<li><a href=""> 2) Submit A Request</a></li>
								<li><a href=""> 3) Submit A Ticket</a></li>
							</ul>
							<br>
							<div style="font-size:11px">@Copyright: <i><a href="http://ves.com" target="_blank">Ves.Com</a></i></div>
					   </td></tr>', $element->getHtmlId(), $element->getHtmlId(), $element->getLabel());
    }
Example #28
0
 public function render(Varien_Data_Form_Element_Abstract $element)
 {
     $storeId = 0;
     $storeMediaUrl = Mage::app()->getStore($storeId)->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA);
     $config = Mage::getSingleton('cms/wysiwyg_config')->getConfig(array('wysiwyg' => true, 'add_widgets' => false, 'add_variables' => false, 'add_images' => true, 'encode_directives' => true, 'document_base_url' => $storeMediaUrl, 'store_id' => $storeId, 'add_directives' => true, 'directives_url' => Mage::getSingleton('adminhtml/url')->getUrl('*/cms_wysiwyg/directive'), 'files_browser_window_url' => Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/cms_wysiwyg_images/index'), 'files_browser_window_width' => (int) Mage::getConfig()->getNode('adminhtml/cms/browser/window_width'), 'files_browser_window_height' => (int) Mage::getConfig()->getNode('adminhtml/cms/browser/window_height')));
     $editor = new Varien_Data_Form_Element_Editor($element->getData());
     //$editor->setData("config", $config);
     // Prevent foreach error
     $editor->getConfig()->setPlugins(array());
     $editor->setId($element->getId());
     $editor->setForm($element->getForm());
     $editor->setWysiwyg(true);
     $editor->setForceLoad(true);
     $editor->setValue(base64_decode($editor->getValue()));
     return parent::render($editor) . '<script type="text/javascript>turnoffTinyMCEs.push(function(){ tinyMceEditors.get("' . $element->getId() . '").turnOff();});getContentTinyMCEs.push(function(){ return (typeof tinyMCE != \'undefined\') && tinyMCE.get("' . $element->getId() . '")? tinyMCE.get("' . $element->getId() . '").getContent({format : "raw"}):document.getElementById("' . $element->getId() . '").value;});getTinyMCEFields.push(function(){ return "' . $element->getName() . '";});</script>';
 }
Example #29
0
 /**
  * Prepares the element's html.
  *
  * @param Varien_Data_Form_Element_Abstract $element
  *
  * @return string
  */
 protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
 {
     /** @var Mage_Core_Model_Config_Element $configField */
     $config = $element->getData('field_config');
     $helperUrl = (string) $config->helper_url;
     if (empty($helperUrl)) {
         return parent::_getElementHtml($element);
     }
     list($model, $method) = explode('::', $helperUrl);
     $helper = Mage::helper(implode('/', array('rede_clickpag', $model)));
     if (!$helper || !method_exists($helper, $method)) {
         return parent::_getElementHtml($element);
     }
     $element->setData('value', str_replace('/index.php', '', $helper->{$method}()));
     return '<span class="red">' . parent::_getElementHtml($element) . '</span>';
 }
 protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
 {
     $elementId = $element->getHtmlId();
     /*read configurations from system.xml*/
     $configarray = $element->getData('field_config')->asArray();
     $iframeurl = $configarray['parameters']['iframeurl'];
     $iframeheight = $configarray['parameters']['iframeheight'];
     /* default values when theres no definition in system.xml or a wrong entry */
     if ($iframeheight == '') {
         $iframeheight = '400px';
     } else {
         if (strlen($iframeheight) >= 3) {
             /* the last both chars build the unit of length */
             $unitOfLength = substr($iframeheight, -2, 2);
             switch ($unitOfLength) {
                 case 'em':
                 case 'ex':
                 case 'px':
                 case 'in':
                 case 'cm':
                 case 'mm':
                 case 'pt':
                 case 'pc':
                     break;
                 default:
                     $iframeheight = '400px';
             }
         } else {
             $iframeheight = '400px';
         }
     }
     /* open the url in the iframe, when its readable */
     if ($iframeurl != '' && @fopen($iframeurl, 'r')) {
         $iframe = '<iframe src="' . $iframeurl . '" width="100%" height="100%" name="Netresearch" marginheight="0" marginwidth="0" frameborder="0"></iframe>';
         $html = '<div style="width:100%;height:' . $iframeheight . '">' . $iframe . '</div>';
     } else {
         $html = $this->getLayout()->createBlock('core/template')->setTemplate('jcslider/promotion/iframe.phtml')->toHtml();
         /*when you need functions use:
           $html = $this->getLayout()->createBlock('jcslider/promotion_iframe')->setTemplate('jcslider/promotion/iframe.phtml')->toHtml() ;
           
           ...an define functions in:
           app\code\community\Netresearch\JCarouselSlider\Block\Promotion\Iframe.php
           */
     }
     $html .= $element->getAfterElementHtml();
     return $html;
 }