Beispiel #1
0
 /**
  * Get image preview url
  *
  * @return string
  */
 protected function _getUrl()
 {
     $url = parent::_getUrl();
     $config = $this->getFieldConfig();
     /* @var $config Varien_Simplexml_Element */
     if (!empty($config->base_url)) {
         $el = $config->descend('base_url');
         $urlType = empty($el['type']) ? 'link' : (string) $el['type'];
         $url = Mage::getBaseUrl($urlType) . (string) $config->base_url . '/' . $url;
     }
     return $url;
 }
Beispiel #2
0
 /**
  * Get image preview url
  *
  * @return string
  */
 protected function _getUrl()
 {
     $url = parent::_getUrl();
     $config = $this->getFieldConfig();
     /* @var $config array */
     if (array_key_exists('base_url', $config)) {
         $el = $config['base_url'];
         $urlType = empty($el['type']) ? 'link' : (string) $el['type'];
         $url = Mage::getBaseUrl($urlType) . $el['value'] . '/' . $url;
     }
     return $url;
 }
 /**
  * Enter description here...
  *
  * @return string
  */
 protected function _getDeleteCheckbox()
 {
     $html = '';
     if ($this->getValue()) {
         $label = $this->_getHelper()->__('Delete File');
         $html .= '<span style="display:block;">';
         $html .= '<input type="checkbox" name="' . parent::getName() . '[delete]" value="1" class="checkbox" id="' . $this->getHtmlId() . '_delete"' . ($this->getDisabled() ? ' disabled="disabled"' : '') . '/>';
         $html .= '<label for="' . $this->getHtmlId() . '_delete"' . ($this->getDisabled() ? ' class="disabled"' : '') . '> ' . $label . '</label>';
         $html .= $this->_getHiddenInput();
         $html .= '</span>';
     }
     return $html;
 }
Beispiel #4
0
 protected function _getDeleteCheckbox()
 {
     $html = '';
     if ($attribute = $this->getEntityAttribute()) {
         if (!$attribute->getIsRequired()) {
             $html .= parent::_getDeleteCheckbox();
         } else {
             $html .= '<input value="' . $this->getValue() . '" id="' . $this->getHtmlId() . '_hidden" type="hidden" class="required-entry" />';
             $html .= '<script type="text/javascript">
                 syncOnchangeValue(\'' . $this->getHtmlId() . '\', \'' . $this->getHtmlId() . '_hidden\');
             </script>';
         }
     } else {
         $html .= parent::_getDeleteCheckbox();
     }
     return $html;
 }
 public function getHtmlAttributes()
 {
     return array_merge(parent::getHtmlAttributes(), array('multiple'));
 }