From: Paul Hänsch Date: Tue, 11 Nov 2025 04:56:54 +0000 (+0100) Subject: autocomplete controls in user forms X-Git-Url: http://git.plutz.net/?a=commitdiff_plain;h=751908ea1a91ed4aa6daf13cbf50450fc0c90863;p=cgilite autocomplete controls in user forms --- diff --git a/users.sh b/users.sh index 32299ff..9dfbdfb 100755 --- 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