]> git.plutz.net Git - cgilite/commitdiff
autocomplete controls in user forms master
authorPaul Hänsch <paul@plutz.net>
Tue, 11 Nov 2025 04:56:54 +0000 (05:56 +0100)
committerPaul Hänsch <paul@plutz.net>
Tue, 11 Nov 2025 04:56:54 +0000 (05:56 +0100)
users.sh

index 32299ff1e3f97f26f7cb2c7d3860d56c1a3e83d2..9dfbdfb624b835625757be3d90a7407b93bdf748 100755 (executable)
--- a/users.sh
+++ b/users.sh
@@ -490,9 +490,9 @@ w_user_update(){
        [form #user_update method=POST
          [hidden "uid" "$USER_ID"]
          [p .username Logged in as $USER_NAME]
-         [input type=password name=oldpw placeholder="Current Passphrase"]
-         [input type=password name=pw placeholder="New Passphrase" pattern=".{6,}"]
-         [input type=password name=pwconfirm placeholder="Confirm New Passphrase" pattern=".{6,}"]
+         [input type=password name=oldpw autocomplete="current-password" placeholder="Current Passphrase"]
+         [input type=password name=pw autocomplete="new-password" placeholder="New Passphrase" pattern=".{6,}"]
+         [input type=password name=pwconfirm autocomplete="new-password" placeholder="Confirm New Passphrase" pattern=".{6,}"]
          [submit "action" "user_update" Update Passphrase]
        ]
        EOF
@@ -512,7 +512,7 @@ w_user_register_sendmail(){  # TRANSLATION
          [p We will send an activation mail to your email address.
            You can continue the signup process when you click on the
            activation link in this email.]
-         [input type=email name=email placeholder="Email"]
+         [input type=email name=email autocomplete="email" placeholder="Email"]
          [submit "action" "user_register" Sign Up]
        ]
        EOF
@@ -520,9 +520,9 @@ w_user_register_sendmail(){  # TRANSLATION
 w_user_register_direct(){  # TRANSLATION
   cat <<-EOF
        [form #user_register .registername method=POST
-          [input name=uname placeholder="Choose Username" tooltip="Your username may contain any character but the @ sign. It must be at least 3 characters long, and it must start with a letter." pattern="^\[\\\\p{L}\]\[\\\\p{L}0-9 -~\]{2,127}$" autocomplete=off]
-         [input type=password name=pw placeholder="Choose Passphrase" pattern=".{6,}"]
-         [input type=password name=pwconfirm placeholder="Confirm Passphrase" pattern=".{6,}"]
+          [input name=uname autocomplete="username" placeholder="Choose Username" tooltip="Your username may contain any character but the @ sign. It must be at least 3 characters long, and it must start with a letter." pattern="^\[\\\\p{L}\]\[\\\\p{L}0-9 -~\]{2,127}$"]
+         [input type=password name=pw autocomplete="new-password" placeholder="Choose Passphrase" pattern=".{6,}"]
+         [input type=password name=pwconfirm autocomplete="new-password" placeholder="Confirm Passphrase" pattern=".{6,}"]
          [submit "action" "user_register" Sign Up]
        ]
        EOF
@@ -548,9 +548,9 @@ w_user_confirm_proceed(){  # TRANSLATION
          $([ "$EMAIL" != '\' ] && printf \
            '[input disabled=disabled value="%s" placeholder="Email"]' "$(UNSTRING "$EMAIL" |HTML)"
          )
-          [input name=uname placeholder="Choose Username" tooltip="Your username may contain any character but the @ sign. It must be at least 3 characters long, and it must start with a letter." pattern="^\[\\\\p{L}\]\[\\\\p{L}0-9 -~\]{2,127}$" autocomplete=off]
-         [input type=password name=pw placeholder="Choose Passphrase" pattern=".{6,}"]
-         [input type=password name=pwconfirm placeholder="Confirm Passphrase" pattern=".{6,}"]
+          [input name=uname autocomplete="username" placeholder="Choose Username" tooltip="Your username may contain any character but the @ sign. It must be at least 3 characters long, and it must start with a letter." pattern="^\[\\\\p{L}\]\[\\\\p{L}0-9 -~\]{2,127}$"]
+         [input type=password name=pw autocomplete="new-password" placeholder="Choose Passphrase" pattern=".{6,}"]
+         [input type=password name=pwconfirm autocomplete="new-password" placeholder="Confirm Passphrase" pattern=".{6,}"]
          [submit "action" "user_confirm" Finish Registration]
        ]
        EOF
@@ -637,8 +637,8 @@ w_user_invite(){
 w_user_login_logon(){  # TRANSLATION
   cat <<-EOF
        [form #user_login .login method=POST
-         [input name=uname placeholder="Username or Email"]
-         [input type=password name=pw placeholder="Passphrase"]
+         [input name=uname autocomplete="username" placeholder="Username or Email"]
+         [input type=password name=pw autocomplete="current-password" placeholder="Passphrase"]
          [submit "action" "user_login" Login]
        ]
        EOF