Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add/update autocomplete, inputmode, and required where appropriate #1503

Merged
merged 1 commit into from
Dec 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion weasyl/templates/control/2fa/disable.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ <h3>Disable Two-Factor Authentication (2FA)</h3>
</p>

<label for="disable-tfa">2FA token or Recovery Code</label>
<input type="text" class="input" maxlength="24" id="disable-tfa" name="tfaresponse" autocomplete="off" required />
<input type="text" class="input" maxlength="24" id="disable-tfa" name="tfaresponse" autocomplete="one-time-code" required />
<div style="padding-top: 1em;">
<label><input class="checkbox" type="checkbox" name="verify" required /> I confirm that I want to disable 2FA</label>
</div>
Expand Down
2 changes: 1 addition & 1 deletion weasyl/templates/control/2fa/generate_recovery_codes.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ <h3>Your new recovery codes will be:</h3>
</p>

<label for="tfa-regenerate-codes">Enter 2FA token or Recovery Code</label>
<input type="text" id="tfa-regenerate-codes" maxlength="24" name="tfaresponse" placeholder="012345" autocomplete="off" required /><br />
<input type="text" id="tfa-regenerate-codes" maxlength="24" name="tfaresponse" placeholder="012345" autocomplete="one-time-code" required /><br />
<label><input class="checkbox" type="checkbox" name="verify" required /> I confirm that I have saved the above new recovery codes.</label>

<div style="padding-top: 1em;">
Expand Down
2 changes: 1 addition & 1 deletion weasyl/templates/control/2fa/init_qrcode.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ <h3>Or manually enter your key</h3>
</p>

<label for="tfa-init-verify">Enter 2FA token</label>
<input type="text" id="tfa-init-verify" maxlength="7" name="tfaresponse" placeholder="012345" autocomplete="off" required />
<input type="text" id="tfa-init-verify" maxlength="7" name="tfaresponse" placeholder="012345" autocomplete="one-time-code" required inputmode="numeric" />

<div style="padding-top: 1em;">
<a class="button negative" href="/control/2fa/status">Cancel</a>
Expand Down
2 changes: 1 addition & 1 deletion weasyl/templates/control/2fa/init_verify.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ <h3>Your recovery codes are:</h3>
</p>

<label for="tfa-init-verify">Enter 2FA token</label>
<input type="text" id="tfa-init-verify" maxlength="7" name="tfaresponse" placeholder="012345" autocomplete="off" required /><br />
<input type="text" id="tfa-init-verify" maxlength="7" name="tfaresponse" placeholder="012345" autocomplete="one-time-code" required inputmode="numeric" /><br />
<label><input class="checkbox" type="checkbox" name="verify" required /> I have printed or saved the above recovery codes and want to enable 2FA.</label>

<div style="padding-top: 1em;">
Expand Down
2 changes: 1 addition & 1 deletion weasyl/templates/etc/forgotpassword.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<form class="form skinny clear" name="forgotpassword" action="/forgotpassword" method="post">
<label for="fp-email">Email Address</label>
<input type="email" class="input" id="fp-email" name="email" required maxlength="254" />
<input type="email" class="input" id="fp-email" name="email" required maxlength="254" autocomplete="email" />

$:{COMPILE("common/turnstile.html")(action="password-reset")}

Expand Down
4 changes: 2 additions & 2 deletions weasyl/templates/etc/login_box.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ <h3>Sign In</h3>

<form class="form" name="signin" action="/signin" method="post">
<label for="login-user">Username</label>
<input type="text" id="login-user" class="input" name="username" placeholder="Username"$:{" autofocus" if login_page else ""} />
<input type="text" id="login-user" class="input" name="username" placeholder="Username"$:{" autofocus" if login_page else ""} autocomplete="username" required />

<label for="login-pass">Password</label>
<input type="password" id="login-pass" class="input" name="password" placeholder="Password" />
<input type="password" id="login-pass" class="input" name="password" placeholder="Password" autocomplete="current-password" required />

<label id="login-sfw" class="input-checkbox">
<input type="checkbox" name="sfwmode" value="sfw" /> Sign in using SFW mode
Expand Down
2 changes: 1 addition & 1 deletion weasyl/templates/etc/resetpassword.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<p>Resetting password for user <strong><a href="/~${LOGIN(reset_target.username)}">${reset_target.username}</a></strong>.</p>

<label for="password">New Password</label>
<input type="password" class="input" id="password" name="password" minlength="10" maxlength="72" required />
<input type="password" class="input" id="password" name="password" minlength="10" maxlength="72" required autocomplete="new-password" />
<p class="color-lighter" style="padding-top: 0.5em;"><i>Passwords must be a minimum of 10 characters.</i></p>

<div id="password-strength" class="password-strength password-strength-empty" data-password-input="password" data-personal-data="${reset_target.username};${reset_target.email}"></div>
Expand Down
2 changes: 1 addition & 1 deletion weasyl/templates/etc/signin_2fa_auth.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ <h3>Two-Factor Authentication</h3>
code. You may re-enable 2FA immediately afterwards, if you desire.
</p>
<label for="tfa-response">Time-based Token or Recovery Code</label>
<input type="text" id="tfa-response" maxlength="24" class="input" name="tfaresponse" placeholder="012345" autofocus="autofocus" autocomplete="off" required />
<input type="text" id="tfa-response" maxlength="24" class="input" name="tfaresponse" placeholder="012345" autofocus="autofocus" autocomplete="one-time-code" required />

<div style="padding-top: 1em;">
<button class="button positive">Sign In</button>
Expand Down
Loading