diff options
author | emkael <emkael@tlen.pl> | 2016-10-25 18:59:55 +0200 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2016-10-25 18:59:55 +0200 |
commit | 286bf4fec67a94dc7650644d353f469469e67406 (patch) | |
tree | 9b7f1e9df2550c80416c3239a2715ed942e883c6 /app | |
parent | f337e63ef70f5f3210577e494e04acf642570ef9 (diff) |
* auto-login checkbox in login box
Diffstat (limited to 'app')
-rw-r--r-- | app/frontend/controls/LoginBox.php | 3 | ||||
-rw-r--r-- | app/frontend/controls/LoginBox.tpl | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/app/frontend/controls/LoginBox.php b/app/frontend/controls/LoginBox.php index 1136a79..8ab0c94 100644 --- a/app/frontend/controls/LoginBox.php +++ b/app/frontend/controls/LoginBox.php @@ -30,7 +30,8 @@ class LoginBox extends TemplateControl { public function validatePassword($sender, $param) { $param->IsValid = $this->Application->getModule('auth')->login( $this->Login->Text, - $this->Password->Text + $this->Password->Text, + $this->Remember->Checked ? PHP_INT_MAX : 0 ); } diff --git a/app/frontend/controls/LoginBox.tpl b/app/frontend/controls/LoginBox.tpl index 070ab86..1f80743 100644 --- a/app/frontend/controls/LoginBox.tpl +++ b/app/frontend/controls/LoginBox.tpl @@ -26,6 +26,9 @@ <prop:ErrorMessage><%[ Username and password don't match ]%></prop:ErrorMessage> </com:TCustomValidator> <br /> +<%[ Remember login: ]%> +<com:TCheckBox ID="Remember" /> +<br /> <com:TButton OnCommand="loginUser" ValidationGroup="LoginGroup"> |