Ejemplo n.º 1
0
    echo $this->subject;
    ?>
" size="20" />
			</label>
		</li>
		<?php 
}
?>
		<li>
			<label>
				<?php 
echo JText::_('MESSAGE');
?>
<br />
				<?php 
echo FabrikHelperHTML::getEditorArea('message', $this->message, 'message', 75, 10, 75, 10);
?>
			</label>
		</li>
		<?php 
if ($this->allowAttachment) {
    ?>
		<li class="attachement">
			<label>
				<?php 
    echo JText::_('ATTACHMENT');
    ?>
<br />
				<input class="inputbox fabrikinput" name="attachement[]" type="file" id="attachement" />
			</label>
			<a href="#" class="addattachement">
Ejemplo n.º 2
0
 /**
  * draws the form element
  * @param int repeat group counter
  * @return string returns element html
  */
 function render($data, $repeatCounter = 0)
 {
     $name = $this->getHTMLName($repeatCounter);
     $id = $this->getHTMLId($repeatCounter);
     $element =& $this->getElement();
     if ($element->hidden == '1') {
         return $this->getHiddenField($name, $data[$name], $id);
     }
     $params =& $this->getParams();
     $cols = $element->width;
     $rows = $element->height;
     $value = $this->getValue($data, $repeatCounter);
     $bits = array();
     if (!$this->_editable) {
         if ($params->get('use_wysiwyg', 0) == 0) {
             $value = nl2br($value);
         }
         if ($params->get('textarea-tagify') == true) {
             $value = $this->tagify($value);
         }
         $value = $this->_replaceWithIcons($value);
         return $value;
     }
     $bits['class'] = "fabrikinput inputbox";
     if (isset($this->_elementError) && $this->_elementError != '') {
         $bits['class'] .= " elementErrorHighlight";
     }
     if ($params->get('use_wysiwyg')) {
         $str = FabrikHelperHTML::getEditorArea($name, $value, $name, $cols, $rows, $cols, $rows);
     } else {
         if ($params->get('disable')) {
             $bits['class'] .= " disabled";
             $bits['disabled'] = 'disabled';
         }
         $str = "<textarea ";
         foreach ($bits as $key => $val) {
             $str .= "{$key}=\"{$val}\" ";
         }
         $str .= "name=\"{$name}\" id=\"" . $id . "\" cols=\"{$cols}\" rows=\"{$rows}\">" . $value . "</textarea>\n";
     }
     if ($params->get('textarea-showmax')) {
         $charsLeft = $params->get('textarea-maxlength') - strlen($value);
         $str .= "<div class=\"fabrik_characters_left\"><span>" . $charsLeft . "</span> " . JText::_('Characters left') . "</div>";
     }
     return $str;
 }