Skip to content
Merged
22 changes: 19 additions & 3 deletions openlibrary/plugins/upstream/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,15 @@ def find_ia_account(email=None):


Login = Form(
Textbox('username', description=_('Username'), klass='required'),
Password('password', description=_('Password'), klass='required'),
Textbox(
'username', description=_('Username'), klass='required', autocomplete="username"
Comment thread
Sadashii marked this conversation as resolved.
Outdated
),
Password(
'password',
description=_('Password'),
klass='required',
autocomplete="current-password",
),
Hidden('redirect'),
Hidden('action'),
)
Expand Down Expand Up @@ -90,6 +97,7 @@ class RegisterForm(Form):
email_not_disposable,
email_domain_not_blocked,
],
autocomplete="email",
),
Textbox(
'username',
Expand All @@ -101,6 +109,7 @@ class RegisterForm(Form):
pattern=vlogin.rexp.pattern,
title=vlogin.msg,
required="true",
autocomplete="username",
),
Password(
'password',
Expand All @@ -110,6 +119,7 @@ class RegisterForm(Form):
minlength="3",
maxlength="20",
required="true",
autocomplete="new-password",
),
)

Expand Down Expand Up @@ -150,9 +160,15 @@ def verify_password(password):
'email',
description=_("Your email address"),
validators=[vemail, email_already_used],
autocomplete="email",
)
Comment thread
Sadashii marked this conversation as resolved.
)

ResetPassword = Form(
Password('password', description=_("Choose a password"), validators=[vpass])
Password(
'password',
description=_("Choose a password"),
validators=[vpass],
autocomplete="new-password",
)
)
4 changes: 2 additions & 2 deletions openlibrary/templates/account/email/forgot-ia.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ <h2>$_('Forgot Your Internet Archive Email?')</h2>
<div>
<label>$_('Open Library Email')</label>
</div>
<input type="text" name="email"/>
<input type="text" name="email" autocomplete="email"/>
Comment thread
Sadashii marked this conversation as resolved.
Outdated
Comment thread
Sadashii marked this conversation as resolved.
Outdated
</div>
<div class="form-row">
<div>
<label>$_('Password')</label>
</div>
<input type="password" name="password"/>
<input type="password" name="password" autocomplete="current-password"/>
Comment thread
Sadashii marked this conversation as resolved.
Outdated
</div>
<div>
<input type="submit" value="$_('Retrieve Archive.org Email')"/>
Expand Down
2 changes: 1 addition & 1 deletion openlibrary/templates/account/verify/failed.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ <h1>$_("Oops!")</h1>
<input type="hidden" name="action" value="resent_verification_link"/>

<div class="input">
<input type="text" name="email" id="email" value="$email" placeholder="$_('Enter your email address here')"/>
<input type="text" name="email" id="email" value="$email" autocomplete="email" placeholder="$_('Enter your email address here')"/>
Comment thread
Sadashii marked this conversation as resolved.
Outdated
</div>
$if email:
<div class="invalid clearfix" htmlfor="email">$_("No user registered with this email address.")</div>
Expand Down
4 changes: 2 additions & 2 deletions openlibrary/templates/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ <h1 class="ol-signup-hero__title">$_("Log In")</h1>
</div>

<div class="input">
<input type="email" id="username" name="username" value="$(form.username.value or query_param('username'))" placeholder="$_('Email')" autocapitalize="off" autocorrect="off" required />
<input type="email" id="username" name="username" autocomplete="username" value="$(form.username.value or query_param('username'))" placeholder="$_('Email')" autocapitalize="off" autocorrect="off" required />
Comment thread
Sadashii marked this conversation as resolved.
Outdated
</div>
</div>

Expand All @@ -62,7 +62,7 @@ <h1 class="ol-signup-hero__title">$_("Log In")</h1>
<a class="ol-signup-form__note" href="https://archive.org/forgot-password">$_("Forgot your Password?")</a>
</div>
<div class="input">
<input type="password" placeholder="$_('Password')" id="password" name="password" value="$form.password.value" required />
<input type="password" autocomplete="current-password" placeholder="$_('Password')" id="password" name="password" value="$form.password.value" required />
<a href="javascript:;" class="password-visibility-toggle ol-signup-form__icon-wrap">
<img src="/static/images/icons/icon_eye-closed.svg" title="$_('Toggle Password Visibility')" alt="$_('Toggle Password Visibility')"/>
</a>
Expand Down
Loading