Example #1
0
 /**
  *
  * @param object $poView
  * @return string
  */
 public function render($poView = null)
 {
     $laMessage = $this->getFieldMessage();
     if ($this->getDataOptsVal('format-date', true)) {
         $this->_sValue = Translator::dateS2P($this->_sValue);
     }
     Layout::parseTemplate($this->_sTemplate, "#%COLLENGTH%#", $this->_nColLength);
     Layout::parseTemplate($this->_sTemplate, "#%FOR%#", $this->getOptsVal('for'));
     Layout::parseTemplate($this->_sTemplate, "#%LABEL%#", $this->getOptsVal('label'));
     Layout::parseTemplate($this->_sTemplate, "#%HELPICON%#", $this->getHelpArea());
     Layout::parseTemplate($this->_sTemplate, "#%REQUIREDICON%#", $this->getRequiredArea());
     Layout::parseTemplate($this->_sTemplate, "#%MSGICON%#", $this->getMessageArea($laMessage));
     Layout::parseTemplate($this->_sTemplate, "#%CLASSERROR%#", $laMessage['class']);
     Layout::parseTemplate($this->_sTemplate, "#%TYPE%#", $this->getAttrVal('type'));
     Layout::parseTemplate($this->_sTemplate, "#%ID%#", $this->getAttrVal('id'));
     Layout::parseTemplate($this->_sTemplate, "#%NAME%#", $this->_sName);
     Layout::parseTemplate($this->_sTemplate, "#%CLASS%#", $this->getAttrVal('class') . $laMessage['class']);
     Layout::parseTemplate($this->_sTemplate, "#%VALUE%#", $this->_sValue);
     Layout::parseTemplate($this->_sTemplate, "#%TITLE%#", $this->getAttrVal('title'));
     Layout::parseTemplate($this->_sTemplate, "#%PLACEHOLDER%#", $this->getAttrVal('placeholder'));
     Layout::parseTemplate($this->_sTemplate, "#%REQUIRED%#", $this->getAttrVal('required'));
     Layout::parseTemplate($this->_sTemplate, "#%READONLY%#", $this->getAttrVal('readonly'));
     Layout::parseTemplate($this->_sTemplate, "#%PATTERN%#", $this->getAttrVal('pattern'));
     Layout::parseTemplate($this->_sTemplate, "#%DATAMASK%#", $this->getAttrVal('data-mask'));
     Layout::parseTemplate($this->_sTemplate, "#%DATAMASKALT%#", $this->getAttrVal('data-maskalt'));
     Layout::parseTemplate($this->_sTemplate, "#%BTNID%#", $this->getDataOptsVal("id", $this->_sName . 'Btn'));
     Layout::parseTemplate($this->_sTemplate, "#%BTNTITLE%#", $this->getDataOptsVal('title', $this->getAttrVal('title')));
     Layout::parseTemplate($this->_sTemplate, "#%BTNCLASS%#", $this->getDataOptsVal("class", "btn btn-default"));
     Layout::parseTemplate($this->_sTemplate, "#%DATAICON%#", $this->getDataOptsVal("data-icon", "glyphicon glyphicon-calendar"));
     return $this->_sTemplate;
 }