Skip to content

Commit

Permalink
feature: add autocomplete attribute to inputs (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
simon511000 committed Apr 9, 2024
1 parent 969130c commit 8f2ec94
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 12 deletions.
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

0 comments on commit 8f2ec94

Please sign in to comment.