Add autocomplete feature for password fields
authorJoshua Rüsweg <josh@bastelstu.be>
Mon, 27 Aug 2018 11:16:39 +0000 (13:16 +0200)
committerJoshua Rüsweg <josh@bastelstu.be>
Mon, 27 Aug 2018 11:16:39 +0000 (13:16 +0200)
See #2694

com.woltlab.wcf/templates/accountManagement.tpl
com.woltlab.wcf/templates/login.tpl
com.woltlab.wcf/templates/pageHeaderUser.tpl
com.woltlab.wcf/templates/register.tpl
wcfsetup/install/files/acp/templates/login.tpl

index c32acd48f5a3609051da8078d8c1fae8849e37ed..d1bd5e5c8a1cb1ccb2d0866944101ca0b87ecef2 100644 (file)
@@ -24,7 +24,7 @@
                        <dl{if $errorField == 'password'} class="formError"{/if}>
                                <dt><label for="password">{lang}wcf.user.password{/lang}</label></dt>
                                <dd>
-                                       <input type="password" id="password" name="password" value="" required class="medium">
+                                       <input type="password" id="password" name="password" value="" required class="medium" autocomplete="current-password">
                                        {if $errorField == 'password'}
                                                <small class="innerError">
                                                        {if $errorType == 'empty'}{lang}wcf.global.form.error.empty{/lang}{/if}
@@ -47,7 +47,7 @@
                        <dl{if $errorField == 'username'} class="formError"{/if}>
                                <dt><label for="username">{lang}wcf.user.newUsername{/lang}</label></dt>
                                <dd>
-                                       <input type="text" id="username" name="username" value="{$username}" required pattern="^[^,]{ldelim}{REGISTER_USERNAME_MIN_LENGTH},{REGISTER_USERNAME_MAX_LENGTH}}$" class="medium">
+                                       <input type="text" id="username" name="username" value="{$username}" required pattern="^[^,]{ldelim}{REGISTER_USERNAME_MIN_LENGTH},{REGISTER_USERNAME_MAX_LENGTH}}$" class="medium" autocomplete="username">
                                                
                                        {if $errorField == 'username'}
                                                <small class="innerError">
@@ -74,7 +74,7 @@
                        <dl{if $errorField == 'newPassword'} class="formError"{/if}>
                                <dt><label for="newPassword">{lang}wcf.user.newPassword{/lang}</label></dt>
                                <dd>
-                                       <input type="password" id="newPassword" name="newPassword" value="{$newPassword}" class="medium">
+                                       <input type="password" id="newPassword" name="newPassword" value="{$newPassword}" class="medium" autocomplete="new-password">
                                                
                                        {if $errorField == 'newPassword'}
                                                <small class="innerError">
@@ -88,7 +88,7 @@
                        <dl{if $errorField == 'confirmNewPassword'} class="formError"{/if}>
                                <dt><label for="confirmNewPassword">{lang}wcf.user.confirmPassword{/lang}</label></dt>
                                <dd>
-                                       <input type="password" id="confirmNewPassword" name="confirmNewPassword" value="{$confirmNewPassword}" class="medium">
+                                       <input type="password" id="confirmNewPassword" name="confirmNewPassword" value="{$confirmNewPassword}" class="medium" autocomplete="new-password">
                                                
                                        {if $errorField == 'confirmNewPassword'}
                                                <small class="innerError">
index 4b31acac7fcf1b83c192ef62b830f1c52f11738f..8338c097121db4255efb5c4697e15ab9919da345 100644 (file)
@@ -16,7 +16,7 @@
                        <dl{if $errorField == 'username'} class="formError"{/if}>
                                <dt><label for="username">{lang}wcf.user.usernameOrEmail{/lang}</label></dt>
                                <dd>
-                                       <input type="text" id="username" name="username" value="{$username}" required class="long">
+                                       <input type="text" id="username" name="username" value="{$username}" required class="long" autocomplete="username">
                                        {if $errorField == 'username'}
                                                <small class="innerError">
                                                        {if $errorType == 'empty'}
@@ -32,7 +32,7 @@
                        <dl{if $errorField == 'password'} class="formError"{/if}>
                                <dt><label for="password">{lang}wcf.user.password{/lang}</label></dt>
                                <dd>
-                                       <input type="password" id="password" name="password" value="{$password}" class="long">
+                                       <input type="password" id="password" name="password" value="{$password}" class="long" autocomplete="current-password">
                                        {if $errorField == 'password'}
                                                <small class="innerError">
                                                        {if $errorType == 'empty'}
index c9acebfd5c02cdfedb6fde6af7a327a6fbd338dc..60796f72a9932e3a80ee07417f736bbebc61e5f1 100644 (file)
                                                                <dl>
                                                                        <dt><label for="username">{lang}wcf.user.usernameOrEmail{/lang}</label></dt>
                                                                        <dd>
-                                                                               <input type="text" id="username" name="username" value="" required class="long jsDialogAutoFocus">
+                                                                               <input type="text" id="username" name="username" value="" required class="long jsDialogAutoFocus" autocomplete="username">
                                                                        </dd>
                                                                </dl>
                                                                
                                                                <dl>
                                                                        <dt><label for="password">{lang}wcf.user.password{/lang}</label></dt>
                                                                        <dd>
-                                                                               <input type="password" id="password" name="password" value="" class="long">
+                                                                               <input type="password" id="password" name="password" value="" class="long" autocomplete="current-password">
                                                                                <small><a href="{link controller='LostPassword'}{/link}">{lang}wcf.user.lostPassword{/lang}</a></small>
                                                                        </dd>
                                                                </dl>
index 99399df2124eedbe9a596b1e2d230c6d01951643..17424c9ed3e14147c29bb507b65a2f6ad38952cd 100644 (file)
@@ -21,7 +21,7 @@
                                <label for="{@$randomFieldNames[username]}">{lang}wcf.user.username{/lang}</label>
                        </dt>
                        <dd>
-                               <input type="text" id="{@$randomFieldNames[username]}" name="{@$randomFieldNames[username]}" value="{$username}" required class="medium">
+                               <input type="text" id="{@$randomFieldNames[username]}" name="{@$randomFieldNames[username]}" value="{$username}" required class="medium" autocomplete="username">
                                {if $errorType.username|isset}
                                        <small class="innerError">
                                                {if $errorType.username == 'empty'}{lang}wcf.global.form.error.empty{/lang}{/if}
                                        <label for="{@$randomFieldNames[password]}">{lang}wcf.user.password{/lang}</label>
                                </dt>
                                <dd>
-                                       <input type="password" id="{@$randomFieldNames[password]}" name="{@$randomFieldNames[password]}" value="{$password}" required class="medium">
+                                       <input type="password" id="{@$randomFieldNames[password]}" name="{@$randomFieldNames[password]}" value="{$password}" required class="medium" autocomplete="new-password">
                                        {if $errorType.password|isset}
                                                <small class="innerError">
                                                        {if $errorType.password == 'empty'}{lang}wcf.global.form.error.empty{/lang}{/if}
                                        <label for="{@$randomFieldNames[confirmPassword]}">{lang}wcf.user.confirmPassword{/lang}</label>
                                </dt>
                                <dd>
-                                       <input type="password" id="{@$randomFieldNames[confirmPassword]}" name="{@$randomFieldNames[confirmPassword]}" value="{$confirmPassword}" required class="medium">
+                                       <input type="password" id="{@$randomFieldNames[confirmPassword]}" name="{@$randomFieldNames[confirmPassword]}" value="{$confirmPassword}" required class="medium" autocomplete="new-password">
                                        {if $errorType.confirmPassword|isset}
                                                <small class="innerError">
                                                        {if $errorType.confirmPassword == 'notEqual'}{lang}wcf.user.confirmPassword.error.notEqual{/lang}{/if}
index 99d2f50474949b5048e40f8b9475f5220bb8a30e..ebd6dfd5a5e3c2e60fddff0980ea1ee0bc5d9f1e 100644 (file)
@@ -10,7 +10,7 @@
                
                <dl{if $errorField == 'username'} class="formError"{/if}>
                        <dt><label for="username">{lang}wcf.user.username{/lang}</label></dt>
-                       <dd><input type="text" id="username" name="username" value="{$username}" class="long">
+                       <dd><input type="text" id="username" name="username" value="{$username}" class="long" autocomplete="username">
                                {if $errorField == 'username'}
                                        <small class="innerError">
                                                {if $errorType == 'empty'}
@@ -25,7 +25,7 @@
                
                <dl{if $errorField == 'password'} class="formError"{/if}>
                        <dt><label for="password">{lang}wcf.user.password{/lang}</label></dt>
-                       <dd><input type="password" id="password" name="password" value="" class="long">
+                       <dd><input type="password" id="password" name="password" value="" class="long" autocomplete="current-password">
                                {if $errorField == 'password'}
                                        <small class="innerError">
                                                {if $errorType == 'empty'}