Add zxcvbn to NewPasswordForm
[GitHub/WoltLab/WCF.git] / com.woltlab.wcf / templates / newPassword.tpl
1 {include file='header' __disableAds=true}
2
3 {include file='formError'}
4
5 <p class="info" role="status">{lang}wcf.user.newPassword.info{/lang}</p>
6
7 <form method="post" action="{link controller='NewPassword'}{/link}">
8 <div class="section">
9 <dl{if $errorField == 'newPassword'} class="formError"{/if}>
10 <dt><label for="newPassword">{lang}wcf.user.newPassword{/lang}</label></dt>
11 <dd>
12 <input type="password" id="newPassword" name="newPassword" value="{$newPassword}" class="medium" autocomplete="new-password" passwordrules="{$passwordRulesAttributeValue}">
13
14 {if $errorField == 'newPassword'}
15 <small class="innerError">
16 {if $errorType == 'empty'}{lang}wcf.global.form.error.empty{/lang}{/if}
17 {if $errorType == 'notSecure'}{lang}wcf.user.password.error.notSecure{/lang}{/if}
18 </small>
19 {/if}
20 </dd>
21 </dl>
22
23 <dl{if $errorField == 'confirmNewPassword'} class="formError"{/if}>
24 <dt><label for="confirmNewPassword">{lang}wcf.user.confirmPassword{/lang}</label></dt>
25 <dd>
26 <input type="password" id="confirmNewPassword" name="confirmNewPassword" value="{$confirmNewPassword}" class="medium" autocomplete="new-password" passwordrules="{$passwordRulesAttributeValue}">
27
28 {if $errorField == 'confirmNewPassword'}
29 <small class="innerError">
30 {if $errorType == 'empty'}{lang}wcf.global.form.error.empty{/lang}{/if}
31 {if $errorType == 'notEqual'}{lang}wcf.user.confirmPassword.error.notEqual{/lang}{/if}
32 </small>
33 {/if}
34 </dd>
35 </dl>
36
37 {event name='fields'}
38
39 <script data-relocate="true">
40 require(['WoltLabSuite/Core/Ui/User/PasswordStrength'], function (PasswordStrength) {
41 new PasswordStrength(elById('newPassword'), {
42 staticDictionary: [
43 '{$user->username|encodeJS}',
44 '{$user->email|encodeJS}',
45 ]
46 });
47 })
48 </script>
49 </div>
50
51 {event name='sections'}
52
53 <div class="formSubmit">
54 <input type="submit" value="{lang}wcf.global.button.submit{/lang}" accesskey="s">
55 {@SECURITY_TOKEN_INPUT_TAG}
56 </div>
57 </form>
58
59 {include file='footer' __disableAds=true}