summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2016-10-25 18:59:55 +0200
committeremkael <emkael@tlen.pl>2016-10-25 18:59:55 +0200
commit286bf4fec67a94dc7650644d353f469469e67406 (patch)
tree9b7f1e9df2550c80416c3239a2715ed942e883c6 /app
parentf337e63ef70f5f3210577e494e04acf642570ef9 (diff)
* auto-login checkbox in login box
Diffstat (limited to 'app')
-rw-r--r--app/frontend/controls/LoginBox.php3
-rw-r--r--app/frontend/controls/LoginBox.tpl3
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">