2
2
3
3
/**
4
4
* The login form.
5
+ *
5
6
* This Source Code Form is subject to the terms of the Mozilla Public License,
6
7
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
7
8
* obtain one at https://mozilla.org/MPL/2.0/.
8
9
*
9
- * @package phpMyFAQ
10
- * @author Thorsten Rinne <[email protected] >
11
- * @author Alexander M. Turek <[email protected] >
12
- * @copyright 2005 -2022 phpMyFAQ Team
13
- * @license https://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0
14
- * @link https://www.phpmyfaq.de
15
- * @since 2013-02-05
10
+ * @package phpMyFAQ
11
+ * @author Thorsten Rinne <[email protected] >
12
+ * @author Alexander M. Turek <[email protected] >
13
+ * @copyright 2013 -2022 phpMyFAQ Team
14
+ * @license https://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0
15
+ * @link https://www.phpmyfaq.de
16
+ * @since 2013-02-05
16
17
*/
17
18
18
19
use phpMyFAQ \Component \Alert ;
20
+ use phpMyFAQ \Translation ;
19
21
20
22
if (isset ($ error ) && 0 < strlen ($ error )) {
21
23
$ message = sprintf (
25
27
$ error
26
28
);
27
29
} else {
28
- $ message = sprintf ('<p>%s</p> ' , $ PMF_LANG [ 'ad_auth_insert ' ] );
30
+ $ message = sprintf ('<p>%s</p> ' , Translation:: get ( 'ad_auth_insert ' ) );
29
31
}
30
32
if ($ action === 'logout ' ) {
31
33
$ message = Alert::success ('ad_logout ' );
52
54
accept-charset="utf-8" role="form">
53
55
<input type="hidden" name="redirect-action" value="<?= $ action ?> ">
54
56
<div class="form-floating mb-3">
55
- <input class="form-control" id="faqusername" name=' faqusername' type="text"
56
- placeholder="<?= $ PMF_LANG [ 'ad_auth_user ' ] ?> " />
57
- <label for="faqusername"><?= $ PMF_LANG [ 'ad_auth_user ' ] ?> </label>
57
+ <input class="form-control" id="faqusername" name=" faqusername" type="text"
58
+ placeholder="<?= Translation:: get ( 'ad_auth_user ' ) ?> " />
59
+ <label for="faqusername"><?= Translation:: get ( 'ad_auth_user ' ) ?> </label>
58
60
</div>
59
61
<div class="form-floating mb-3">
60
- <input class="form-control" id="faqpassword" name='faqpassword'
61
- type="password" placeholder="<?= $ PMF_LANG ['ad_auth_passwd ' ] ?> " />
62
- <label for="faqpassword"><?= $ PMF_LANG ['ad_auth_passwd ' ] ?> </label>
62
+ <input class="form-control" id="faqpassword" name="faqpassword"
63
+ type="password" autocomplete="off"
64
+ placeholder="<?= Translation::get ('ad_auth_passwd ' ) ?> " />
65
+ <label for="faqpassword"><?= Translation::get ('ad_auth_passwd ' ) ?> </label>
63
66
</div>
64
67
<div class="form-check mb-3">
65
68
<input class="form-check-input" id="faqrememberme" type="checkbox"
66
69
value="rememberMe" />
67
70
<label class="form-check-label"
68
- for="faqrememberme"><?= $ PMF_LANG [ 'rememberMe ' ] ?> </label>
71
+ for="faqrememberme"><?= Translation:: get ( 'rememberMe ' ) ?> </label>
69
72
</div>
70
73
<div class="d-flex align-items-center justify-content-between mt-4 mb-0">
71
74
<a class="small"
72
- href="../?action=password"><?= $ PMF_LANG [ 'lostPassword ' ] ?> </a>
75
+ href="../?action=password"><?= Translation:: get ( 'lostPassword ' ) ?> </a>
73
76
<button type="submit"
74
- class="btn btn-primary"><?= $ PMF_LANG [ 'msgLoginUser ' ] ?> </button>
77
+ class="btn btn-primary"><?= Translation:: get ( 'msgLoginUser ' ) ?> </button>
75
78
</div>
76
79
</form>
77
80
</div>
78
81
<?php
79
82
if ($ faqConfig ->get ('security.enableRegistration ' )) { ?>
80
83
<div class="card-footer text-center py-3">
81
84
<div class="small"><a
82
- href="../?action=register"><?= $ PMF_LANG [ 'msgRegistration ' ] ?> </a></div>
85
+ href="../?action=register"><?= Translation:: get ( 'msgRegistration ' ) ?> </a></div>
83
86
</div>
84
87
<?php
85
88
} ?>
@@ -97,6 +100,6 @@ class="btn btn-primary"><?= $PMF_LANG['msgLoginUser'] ?></button>
97
100
'<p><a href="https://%s%s">%s</a></p> ' ,
98
101
$ _SERVER ['HTTP_HOST ' ],
99
102
$ _SERVER ['REQUEST_URI ' ],
100
- $ PMF_LANG [ 'msgSecureSwitch ' ]
103
+ Translation:: get ( 'msgSecureSwitch ' )
101
104
);
102
105
}
0 commit comments