Esempio n. 1
0
 public function getLoginForm($aRow = null, $bReload = false)
 {
     if ($this->aLoginForm != null) {
         return $this->aLoginForm;
     }
     if (!empty($aRow["error"])) {
         FlexiPlatformHandler::getPlatformHandler()->addMessage($aRow["error"], "error");
     }
     $iSize = 25;
     $this->aLoginForm = $aForm = array("txtLogin" => array("#type" => "textfield", "#title" => flexiT("User-Id", "first"), "#weight" => 5, "#maxlength" => 100, "#required" => true, "#size" => $iSize, "#default_value" => ""), "txtPassword" => array("#type" => "password", "#title" => flexiT("Password", "first"), "#weight" => 7, "#maxlength" => 50, "#required" => true, "#size" => $iSize, "#default_value" => ""), "txtURL" => array("#type" => "hidden", "#default_value" => FlexiConfig::$sBaseURL), "bSubmit" => array("#type" => "submit", "#value" => flexiT("Login", "first"), "#weight" => 57));
     //fill in form value
     FlexiFormUtil::mergeFormWithData($aForm, $aRow);
     $aTheForm = array_merge($aForm, array("#type" => "form", "#upload" => false, "#method" => "post", "#action" => flexiURL("mod=FlexiLogin&method=login")));
     $aTheLoginForm = array("#type" => "div", "#title" => flexiUCFirstT("login form"), "form" => $aTheForm, "#attributes" => array("class" => "flexiphp_login_div"));
     //todo event for form before output
     $this->aLoginForm = $aTheLoginForm;
     return $this->aLoginForm;
 }
Esempio n. 2
0
 public function prepareForm(&$aForm, $asValues = null)
 {
     return FlexiFormUtil::mergeFormWithData($aForm, $asValues);
 }