Ejemplo n.º 1
0
 public function getInput()
 {
     $attrs = array('class' => @$this->element['class'], 'id' => $this->id);
     $disable = '';
     if (isset($this->element['disabled']) && $this->element['disabled'] == 'true') {
         $attrs['class'] .= ' disabled';
         $attrs['disabled'] = 'disabled';
         $disable = 'disabled';
     }
     $html = '<div class="input-append jsn-media-input">';
     $html .= JSNTplFormHelper::input($this->name, $this->value, $attrs);
     $html .= '<a href="index.php?widget=image-selector" id="' . $this->id . '_select" class="add-on btn btn-media ' . $disable . '" data-target="#' . $this->id . '"> ... </a>';
     $html .= '<a href="javascript:void(0)" class="add-on btn btn-media-clear ' . $disable . '" id="' . $this->id . '_clear" data-default="' . (string) $this->element['defaultValue'] . '" data-target="#' . $this->id . '">' . JText::_('JSN_TPLFW_DEFAULT') . '</a>';
     $html .= '</div>';
     return $html;
 }
Ejemplo n.º 2
0
 /**
  * Return HTML markup for the field
  *
  * @return  string
  */
 public function getInput()
 {
     // Prepare field attributes
     $this->disabled = (string) $this->element['disabled'] == 'true';
     $attrs = array('id' => $this->id, 'class' => (string) $this->element['class']);
     !$this->disabled or $attrs['disabled'] = 'disabled';
     $label = JText::_(isset($this->element['verifyLabel']) ? $this->element['verifyLabel'] : 'JSN_TPLFW_VERIFY');
     $html[] = '<div class="input-append">';
     $html[] = JSNTplFormHelper::input($this->name, $this->value, $attrs);
     if ($this->disabled) {
         $html[] = '	<span class="add-on">' . $label . '</span>';
     } else {
         $html[] = '	<a href="javascript:void(0)" class="add-on btn btn-verify-folder">' . $label . '</a>';
     }
     $html[] = '</div>';
     $html[] = '<div class="clear"></div>';
     $html[] = '<p class="pull-left label hide" style="margin-bottom:0"></p>';
     return implode("\n", $html);
 }