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

feature: add autocomplete attribute to inputs #55

Merged
merged 1 commit into from
Apr 9, 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: 2 additions & 0 deletions assets/cla/consent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,6 @@
email: oss-cla@oettig.de
- name: Phil Porada
email: philporada@gmail.com
- name: Simon Ledoux
email: simon@simon511000.fr

2 changes: 1 addition & 1 deletion assets/portal/templates/basic/login.template
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<label for="username" class="block text-center pb-2 text-lg font-sans font-medium text-primary-700">Please provide username or email address</label>
<div class="app-inp-box">
<div class="app-inp-prf-img"><i class="las la-user"></i></div>
<input class="app-inp-txt" id="username" name="username" type="text" autocorrect="off" autocapitalize="off" spellcheck="false" autofocus required />
<input class="app-inp-txt" id="username" name="username" type="text" autocorrect="off" autocapitalize="off" autocomplete="username" spellcheck="false" autofocus required />
</div>
</div>

Expand Down
6 changes: 3 additions & 3 deletions assets/portal/templates/basic/register.template
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
class="app-gen-inp-txt validate"
pattern="{{ .Data.password_validate_pattern }}"
title="{{ .Data.password_validate_title }}"
autocorrect="off" autocapitalize="off" autocomplete="current-password" spellcheck="false"
autocorrect="off" autocapitalize="off" autocomplete="new-password" spellcheck="false"
required
/>
</div>
Expand All @@ -99,7 +99,7 @@
<div class="mt-1">
<input type="text" name="first_name" id="first_name"
class="app-gen-inp-txt"
autocorrect="off" autocapitalize="off" autocomplete="off" spellcheck="false"
autocorrect="off" autocapitalize="off" autocomplete="given-name" spellcheck="false"
/>
</div>
</div>
Expand All @@ -108,7 +108,7 @@
<div class="mt-1">
<input type="text" name="last_name" id="last_name"
class="app-gen-inp-txt"
autocorrect="off" autocapitalize="off" autocomplete="off" spellcheck="false"
autocorrect="off" autocapitalize="off" autocomplete="family-name" spellcheck="false"
/>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions assets/portal/templates/basic/sandbox.template
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
</svg>
</div>
<input id="secret" name="secret" type="password" class="app-inp-txt"
autocorrect="off" autocapitalize="off" spellcheck="false" autofocus required />
autocorrect="off" autocapitalize="off" autocomplete="current-password" spellcheck="false" autofocus required />
</div>
</div>

Expand Down Expand Up @@ -142,7 +142,7 @@
<div class="app-inp-box">
<input id="email" name="email" type="text"
class="app-inp-txt"
autocorrect="off" autocapitalize="off" spellcheck="false" autocomplete="off"
autocorrect="off" autocapitalize="off" autocomplete="email" spellcheck="false" autocomplete="off"
required />
</div>
</div>
Expand Down
12 changes: 6 additions & 6 deletions pkg/authn/ui/pages.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ var PageTemplates = map[string]string{
<label for="username" class="block text-center pb-2 text-lg font-sans font-medium text-primary-700">Please provide username or email address</label>
<div class="app-inp-box">
<div class="app-inp-prf-img"><i class="las la-user"></i></div>
<input class="app-inp-txt" id="username" name="username" type="text" autocorrect="off" autocapitalize="off" spellcheck="false" autofocus required />
<input class="app-inp-txt" id="username" name="username" type="text" autocorrect="off" autocapitalize="off" autocomplete="username" spellcheck="false" autofocus required />
</div>
</div>

Expand Down Expand Up @@ -391,7 +391,7 @@ var PageTemplates = map[string]string{
class="app-gen-inp-txt validate"
pattern="{{ .Data.password_validate_pattern }}"
title="{{ .Data.password_validate_title }}"
autocorrect="off" autocapitalize="off" autocomplete="current-password" spellcheck="false"
autocorrect="off" autocapitalize="off" autocomplete="new-password" spellcheck="false"
required
/>
</div>
Expand All @@ -411,7 +411,7 @@ var PageTemplates = map[string]string{
<div class="mt-1">
<input type="text" name="first_name" id="first_name"
class="app-gen-inp-txt"
autocorrect="off" autocapitalize="off" autocomplete="off" spellcheck="false"
autocorrect="off" autocapitalize="off" autocomplete="given-name" spellcheck="false"
/>
</div>
</div>
Expand All @@ -420,7 +420,7 @@ var PageTemplates = map[string]string{
<div class="mt-1">
<input type="text" name="last_name" id="last_name"
class="app-gen-inp-txt"
autocorrect="off" autocapitalize="off" autocomplete="off" spellcheck="false"
autocorrect="off" autocapitalize="off" autocomplete="family-name" spellcheck="false"
/>
</div>
</div>
Expand Down Expand Up @@ -1620,7 +1620,7 @@ function u2f_token_authenticate(formID, btnID) {
</svg>
</div>
<input id="secret" name="secret" type="password" class="app-inp-txt"
autocorrect="off" autocapitalize="off" spellcheck="false" autofocus required />
autocorrect="off" autocapitalize="off" autocomplete="current-password" spellcheck="false" autofocus required />
</div>
</div>

Expand Down Expand Up @@ -1679,7 +1679,7 @@ function u2f_token_authenticate(formID, btnID) {
<div class="app-inp-box">
<input id="email" name="email" type="text"
class="app-inp-txt"
autocorrect="off" autocapitalize="off" spellcheck="false" autocomplete="off"
autocorrect="off" autocapitalize="off" autocomplete="email" spellcheck="false" autocomplete="off"
required />
</div>
</div>
Expand Down
Loading