@@ 7-25 (lines=19) @@ | ||
4 | ||
5 | use Modules\Auth, Utils\Form, Language; |
|
6 | ||
7 | class Login extends Form { |
|
8 | ||
9 | # Constructor |
|
10 | ||
11 | public function __construct() { |
|
12 | ||
13 | parent::__construct('login'); |
|
14 | ||
15 | # Add fields |
|
16 | ||
17 | $this->addText('name', '', FORM_FIELD_TEXT, CONFIG_USER_NAME_MAX_LENGTH, |
|
18 | ||
19 | ['placeholder' => (Auth::admin() ? Language::get('USER_FIELD_NAME') : ''), 'required' => true]); |
|
20 | ||
21 | $this->addText('password', '', FORM_FIELD_PASSWORD, CONFIG_USER_PASSWORD_MAX_LENGTH, |
|
22 | ||
23 | ['placeholder' => (Auth::admin() ? Language::get('USER_FIELD_PASSWORD') : ''), 'required' => true]); |
|
24 | } |
|
25 | } |
|
26 | } |
|
27 |
@@ 7-25 (lines=19) @@ | ||
4 | ||
5 | use Modules\Auth, Utils\Form, Language; |
|
6 | ||
7 | class Recover extends Form { |
|
8 | ||
9 | # Constructor |
|
10 | ||
11 | public function __construct() { |
|
12 | ||
13 | parent::__construct('recover'); |
|
14 | ||
15 | # Add fields |
|
16 | ||
17 | $this->addText('password_new', '', FORM_FIELD_PASSWORD, CONFIG_USER_PASSWORD_MAX_LENGTH, |
|
18 | ||
19 | ['placeholder' => (Auth::admin() ? Language::get('USER_FIELD_PASSWORD_NEW') : ''), 'required' => true]); |
|
20 | ||
21 | $this->addText('password_retype', '', FORM_FIELD_PASSWORD, CONFIG_USER_PASSWORD_MAX_LENGTH, |
|
22 | ||
23 | ['placeholder' => (Auth::admin() ? Language::get('USER_FIELD_PASSWORD_RETYPE') : ''), 'required' => true]); |
|
24 | } |
|
25 | } |
|
26 | } |
|
27 |
@@ 7-25 (lines=19) @@ | ||
4 | ||
5 | use Modules\Auth, Utils\Form, Language; |
|
6 | ||
7 | class Reset extends Form { |
|
8 | ||
9 | # Constructor |
|
10 | ||
11 | public function __construct() { |
|
12 | ||
13 | parent::__construct('reset'); |
|
14 | ||
15 | # Add fields |
|
16 | ||
17 | $this->addText('name', '', FORM_FIELD_TEXT, CONFIG_USER_NAME_MAX_LENGTH, |
|
18 | ||
19 | ['placeholder' => (Auth::admin() ? Language::get('USER_FIELD_NAME') : ''), 'required' => true]); |
|
20 | ||
21 | $this->addText('captcha', '', FORM_FIELD_CAPTCHA, CONFIG_USER_CAPTCHA_MAX_LENGTH, |
|
22 | ||
23 | ['placeholder' => (Auth::admin() ? Language::get('USER_FIELD_CAPTCHA') : ''), 'required' => true]); |
|
24 | } |
|
25 | } |
|
26 | } |
|
27 |