Example #1
0
 /**
  * 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;
 }
Example #2
0
 /**
  * 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;
 }
Example #3
0
 /**
  * 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'] == 'light' ? 'right' : 'left';
     $html = '<div class="' . $float . ' a-center meigee-radio">';
     $html .= '<div class="meigee-thumb" style="background:url(' . Mage::getDesign()->getSkinUrl('images/paterns/' . $option['value'] . '.png') . ') 0 0 repeat;"></div>';
     $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;
 }