Example #1
0
 /**
  * Renders the editable form fields
  *
  * @return string
  */
 protected function renderFormFields()
 {
     echo $this->parseTemplate('templateBefore');
     echo Html::hiddenInput('hasEditable', 0) . "\n";
     $before = $this->beforeInput;
     $after = $this->afterInput;
     if ($before !== null && is_string($before) || is_callable($before)) {
         echo (is_callable($before) ? call_user_func($before, $this->_form, $this) : $before) . "\n";
     }
     if ($this->inputType === self::INPUT_HTML5_INPUT) {
         echo $this->renderHtml5Input() . "\n";
     } elseif ($this->inputType === self::INPUT_WIDGET) {
         echo $this->renderWidget($this->widgetClass) . "\n";
     } elseif (Config::isHtmlInput($this->inputType)) {
         echo $this->renderInput() . "\n";
     } elseif (Config::isInputWidget($this->inputType)) {
         echo $this->renderWidget($this->inputType) . "\n";
     }
     if ($after !== null && is_string($after) || is_callable($after)) {
         echo (is_callable($after) ? call_user_func($after, $this->_form, $this) : $after) . "\n";
     }
     echo $this->parseTemplate('templateAfter');
 }
Example #2
0
 /**
  * Renders the editable form fields
  *
  * @return string
  */
 protected function renderFormFields()
 {
     echo $this->parseTemplate('templateBefore');
     echo Html::hiddenInput('hasEditable', 0) . "\n";
     if ($this->beforeInput !== null) {
         if (is_string($this->beforeInput)) {
             echo $this->beforeInput . "\n";
         } else {
             echo call_user_func($this->beforeInput, $this->_form, $this) . "\n";
         }
     }
     if ($this->inputType === self::INPUT_HTML5_INPUT) {
         echo $this->renderHtml5Input() . "\n";
     } elseif ($this->inputType === self::INPUT_WIDGET) {
         echo $this->renderWidget($this->widgetClass) . "\n";
     } elseif (Config::isHtmlInput($this->inputType)) {
         echo $this->renderInput() . "\n";
     } elseif (Config::isInputWidget($this->inputType)) {
         echo $this->renderWidget($this->inputType) . "\n";
     }
     if ($this->afterInput !== null) {
         if (is_string($this->afterInput)) {
             echo $this->afterInput . "\n";
         } else {
             echo call_user_func($this->afterInput, $this->_form, $this) . "\n";
         }
     }
     echo $this->parseTemplate('templateAfter');
 }
Example #3
0
 /**
  * Renders the editable form fields
  *
  * @return string
  */
 protected function renderFormFields()
 {
     $out = Html::hiddenInput('hasEditable', 0) . "\n";
     if ($this->beforeInput !== null) {
         if (is_string($this->beforeInput)) {
             $out .= $this->beforeInput . "\n";
         } else {
             $out .= call_user_func($this->beforeInput, $this->_form, $this) . "\n";
         }
     }
     if ($this->inputType === self::INPUT_HTML5_INPUT) {
         $out .= $this->renderHtml5Input() . "\n";
     } elseif ($this->inputType === self::INPUT_WIDGET) {
         $out .= $this->renderWidget($this->widgetClass) . "\n";
     } elseif (Config::isHtmlInput($this->inputType)) {
         $out .= $this->renderInput() . "\n";
     } elseif (Config::isInputWidget($this->inputType)) {
         $out .= $this->renderWidget($this->inputType) . "\n";
     }
     if ($this->afterInput !== null) {
         if (is_string($this->afterInput)) {
             $out .= $this->afterInput . "\n";
         } else {
             $out .= call_user_func($this->afterInput, $this->_form, $this) . "\n";
         }
     }
     return $out;
 }