Пример #1
0
 function buildControl($value, $mode, $fieldNum, $validate, $additionalCtrlParams, $data)
 {
     parent::buildControl($value, $mode, $fieldNum, $validate, $additionalCtrlParams, $data);
     $nWidth = $this->pageObject->pSetEdit->getNCols($this->field);
     $nHeight = $this->pageObject->pSetEdit->getNRows($this->field);
     if ($this->pageObject->pSetEdit->isUseRTE($this->field)) {
         $value = $this->RTESafe($value);
         // creating src url
         $browser = "";
         if (@$_REQUEST["browser"] == "ie") {
             $browser = "&browser=ie";
         }
         // add JS code
         echo "<iframe frameborder=\"0\" vspace=\"0\" hspace=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\" id=\"" . $this->cfield . "\" " . (($mode == MODE_INLINE_EDIT || $mode == MODE_INLINE_ADD) && $this->is508 == true ? "alt=\"" . $this->strLabel . "\" " : "") . "name=\"" . $this->cfield . "\" title=\"Basic rich text editor\" style='";
         if (!isMobile()) {
             echo "width: " . ($nWidth + 1) . "px;";
         }
         echo "height: " . ($nHeight + 100) . "px;'";
         echo " src=\"" . GetTableLink("rte", "", "ptype=" . $this->pageObject->pageType . "&table=" . GetTableURL($this->pageObject->tName) . "&" . "id=" . $this->id . "&" . $this->iquery . $browser . "&" . ($mode == MODE_ADD || $mode == MODE_INLINE_ADD ? "action=add" : '')) . "\">";
         echo "</iframe>";
     } else {
         echo '<textarea id="' . $this->cfield . '" ' . (($mode == MODE_INLINE_EDIT || $mode == MODE_INLINE_ADD) && $this->is508 == true ? 'alt="' . $this->strLabel . '" ' : '') . 'name="' . $this->cfield . '" style="';
         if (!isMobile()) {
             echo "width: " . $nWidth . "px;";
         }
         echo 'height: ' . $nHeight . 'px;">' . runner_htmlspecialchars($value) . '</textarea>';
     }
     $this->buildControlEnd($validate);
 }
Пример #2
0
    function buildControl($value, $mode, $fieldNum, $validate, $additionalCtrlParams, $data) {
	parent::buildControl($value, $mode, $fieldNum, $validate, $additionalCtrlParams, $data);

	$inputType = $this->pageObject->pSetEdit->getHTML5InputType($this->field);
	$altAttr = ( $mode == MODE_INLINE_EDIT || $mode == MODE_INLINE_ADD ) && $this->is508 == true ? ' alt="' . $this->strLabel . '" ' : '';

	//Alterado por Helbert em 04/06/2015
	//Se o campo for de data, cria a class do input como datepiker

	if ($this->cfield == "value_DATA_VENCIMENTO_1"
		OR $this->cfield == "value_DATA_RECEBIMENTO_1"
		OR $this->cfield == "value_DATA_PAGAMENTO_1"
		OR $this->cfield == "value1_DATA_VENCIMENTO_1"
		OR $this->cfield == "value1_DATA_PAGAMENTO_1"
		OR $this->cfield == "value1_DATA_RECEBIMENTO_1"
	) {
	    $class = 'class="datepicker" readonly = "true"';
	}


	echo '<input id="' . $this->cfield . '" ' . $this->inputStyle . $class . ' type="' . $inputType . '" '
	. ($mode == MODE_SEARCH ? '  ' : '') . $altAttr
	. 'name="' . $this->cfield . '" ' . $this->pageObject->pSetEdit->getEditParams($this->field) .
	' value="' . runner_htmlspecialchars($value) . '">';

	$this->buildControlEnd($validate);
    }
Пример #3
0
 function buildControl($value, $mode, $fieldNum, $validate, $additionalCtrlParams, $data)
 {
     parent::buildControl($value, $mode, $fieldNum, $validate, $additionalCtrlParams, $data);
     $inputType = $this->pageObject->pSetEdit->getHTML5InputType($this->field);
     $altAttr = ($mode == MODE_INLINE_EDIT || $mode == MODE_INLINE_ADD) && $this->is508 == true ? ' alt="' . $this->strLabel . '" ' : '';
     echo '<input id="' . $this->cfield . '" ' . $this->inputStyle . ' type="' . $inputType . '" ' . ($mode == MODE_SEARCH ? 'autocomplete="off" ' : '') . $altAttr . 'name="' . $this->cfield . '" ' . $this->pageObject->pSetEdit->getEditParams($this->field) . ' value="' . runner_htmlspecialchars($value) . '">';
     $this->buildControlEnd($validate);
 }
Пример #4
0
 function buildControl($value, $mode, $fieldNum = 0, $validate, $additionalCtrlParams, $data)
 {
     parent::buildControl($value, $mode, $fieldNum, $validate, $additionalCtrlParams, $data);
     if ($mode == MODE_EDIT || $mode == MODE_ADD || $mode == MODE_INLINE_EDIT || $mode == MODE_INLINE_ADD) {
         echo '<span id="readonly_' . $this->cfield . '" ' . $this->inputStyle . '>' . $this->pageObject->readOnlyFields[$this->field] . '</span>';
     }
     echo '<input id="' . $this->cfield . '" type="Hidden" name="' . $this->cfield . '" value="' . htmlspecialchars($value) . '">';
     $this->buildControlEnd($validate);
 }
Пример #5
0
 function buildControl($value, $mode, $fieldNum = 0, $validate, $additionalCtrlParams, $data)
 {
     parent::buildControl($value, $mode, $fieldNum, $validate, $additionalCtrlParams, $data);
     $nWidth = $this->pageObject->pSetEdit->getNCols($this->field);
     $nHeight = $this->pageObject->pSetEdit->getNRows($this->field);
     if ($this->pageObject->pSetEdit->isUseRTE($this->field)) {
         $value = RTESafe($value);
     } else {
         echo '<textarea id="' . $this->cfield . '" ' . (($mode == MODE_INLINE_EDIT || $mode == MODE_INLINE_ADD) && $this->is508 == true ? 'alt="' . $this->strLabel . '" ' : '') . 'name="' . $this->cfield . '" style="';
         if (!isMobile()) {
             echo "width: " . $nWidth . "px;";
         }
         echo 'height: ' . $nHeight . 'px;">' . htmlspecialchars($value) . '</textarea>';
     }
     $this->buildControlEnd($validate);
 }
Пример #6
0
 function buildControl($value, $mode, $fieldNum, $validate, $additionalCtrlParams, $data)
 {
     parent::buildControl($value, $mode, $fieldNum, $validate, $additionalCtrlParams, $data);
     echo '<input id="' . $this->cfield . '" type="Hidden" name="' . $this->cfield . '" value="' . runner_htmlspecialchars($value) . '">';
     $this->buildControlEnd($validate);
 }
Пример #7
0
 function buildControl($value, $mode, $fieldNum, $validate, $additionalCtrlParams, $data)
 {
     parent::buildControl($value, $mode, $fieldNum, $validate, $additionalCtrlParams, $data);
     echo '<input ' . $this->inputStyle . ' id="' . $this->cfield . '" type="Password" ' . (($mode == MODE_INLINE_EDIT || $mode == MODE_INLINE_ADD) && $this->is508 == true ? 'alt="' . $this->strLabel . '" ' : '') . 'name="' . $this->cfield . '" ' . $this->pageObject->pSetEdit->getEditParams($this->field) . ' value="' . runner_htmlspecialchars($value) . '">';
     $this->buildControlEnd($validate);
 }
Пример #8
0
 function __construct($field)
 {
     $this->addClassName('numeric');
     parent::__construct($field);
 }