Skip to content

Commit

Permalink
Add HTML5 autocomplet attributes to some form inputs. Closes sahat#899
Browse files Browse the repository at this point in the history
- fields usually used by users have autocomplete added (defaults to on)
- the fields like entering new password and re-entering password to
  verify its correctness have the autocomplete set to off

Thanks!
  • Loading branch information
peterblazejewicz committed Aug 22, 2018
1 parent 623c2a6 commit bcdccab
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion views/account/forgot.pug
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ block content
.form-group.row
label.col-md-3.col-form-label.font-weight-bold.text-right(for='email') Email
.col-md-7
input.form-control(type='email', name='email', id='email', placeholder='Email', autofocus, required)
input.form-control(type='email', name='email', id='email', placeholder='Email', autofocus, autocomplete, required)
.form-group.offset-sm-3.col-md-7.pl-2
button.btn.btn-primary(type='submit')
i.fas.fa-key.fa-sm
Expand Down
2 changes: 1 addition & 1 deletion views/account/login.pug
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ block content
.form-group.row
label.col-md-3.col-form-label.font-weight-bold.text-right(for='password') Password
.col-md-7
input.form-control(type='password', name='password', id='password', placeholder='Password', required)
input.form-control(type='password', name='password', id='password', placeholder='Password', autocomplete, required)
.form-group
.offset-sm-3.col-md-7.pl-2
button.col-md-3.btn.btn-primary(type='submit')
Expand Down
12 changes: 6 additions & 6 deletions views/account/profile.pug
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ block content
.form-group.row
label.col-md-3.col-form-label.font-weight-bold.text-right(for='email') Email
.col-md-7
input.form-control(type='email', name='email', id='email', value=user.email)
input.form-control(type='email', name='email', id='email', value=user.email, autocomplete)
.form-group.row
label.col-md-3.col-form-label.font-weight-bold.text-right(for='name') Name
.col-md-7
input.form-control(type='text', name='name', id='name', value=user.profile.name)
input.form-control(type='text', name='name', id='name', value=user.profile.name, autocomplete)
.form-group.row
label.col-md-3.col-form-label.font-weight-bold.text-right Gender
.col-sm-6
Expand All @@ -29,11 +29,11 @@ block content
.form-group.row
label.col-md-3.col-form-label.font-weight-bold.text-right(for='location') Location
.col-md-7
input.form-control(type='text', name='location', id='location', value=user.profile.location)
input.form-control(type='text', name='location', id='location', value=user.profile.location, autocomplete)
.form-group.row
label.col-md-3.col-form-label.font-weight-bold.text-right(for='website') Website
.col-md-7
input.form-control(type='text', name='website', id='website', value=user.profile.website)
input.form-control(type='text', name='website', id='website', value=user.profile.website, autocomplete)
.form-group.row
label.col-md-3.col-form-label.font-weight-bold.text-right Gravatar
.col-sm-4
Expand All @@ -52,11 +52,11 @@ block content
.form-group.row
label.col-md-3.col-form-label.font-weight-bold.text-right(for='password') New Password
.col-md-7
input.form-control(type='password', name='password', id='password')
input.form-control(type='password', name='password', id='password', autocomplete="off")
.form-group.row
label.col-md-3.col-form-label.font-weight-bold.text-right(for='confirmPassword') Confirm Password
.col-md-7
input.form-control(type='password', name='confirmPassword', id='confirmPassword')
input.form-control(type='password', name='confirmPassword', id='confirmPassword', autocomplete="off")
.form-group
.offset-sm-3.col-md-7.pl-2
button.btn.btn-primary(type='submit')
Expand Down
4 changes: 2 additions & 2 deletions views/account/reset.pug
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ block content
.form-group.row
label.col-md-3.col-form-label.font-weight-bold.text-right(for='password') New Password
.col-md-7
input.form-control(type='password', name='password', id='password', placeholder='New password', autofocus, required)
input.form-control(type='password', name='password', id='password', placeholder='New password', autofocus, autocomplete, required)
.form-group.row
label.col-md-3.col-form-label.font-weight-bold.text-right(for='confirm') Confirm Password
.col-md-7
input.form-control(type='password', name='confirm', id='confirm', placeholder='Confirm password', required)
input.form-control(type='password', name='confirm', id='confirm', placeholder='Confirm password', autocomplete, required)
.form-group.offset-sm-3.col-md-7.pl-2
button.btn.btn-primary.btn-reset(type='submit')
i.far.fa-keyboard.fa-sm
Expand Down
6 changes: 3 additions & 3 deletions views/account/signup.pug
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ block content
.form-group.row
label.col-md-3.col-form-label.font-weight-bold.text-right(for='email') Email
.col-md-7
input.form-control(type='email', name='email', id='email', placeholder='Email', autofocus, required)
input.form-control(type='email', name='email', id='email', placeholder='Email', autofocus, autocomplete, required)
.form-group.row
label.col-md-3.col-form-label.font-weight-bold.text-right(for='password') Password
.col-md-7
input.form-control(type='password', name='password', id='password', placeholder='Password', required)
input.form-control(type='password', name='password', id='password', placeholder='Password', autocomplete, required)
.form-group.row
label.col-md-3.col-form-label.font-weight-bold.text-right(for='confirmPassword') Confirm Password
.col-md-7
input.form-control(type='password', name='confirmPassword', id='confirmPassword', placeholder='Confirm Password', required)
input.form-control(type='password', name='confirmPassword', id='confirmPassword', placeholder='Confirm Password', autocomplete, required)
.form-group.offset-sm-3.col-md-7.pl-2
button.btn.btn-success(type='submit')
i.fas.fa-user-plus.fa-sm
Expand Down
4 changes: 2 additions & 2 deletions views/contact.pug
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ block content
.form-group.row
label(class='col-md-2 col-form-label font-weight-bold', for='name') Name
.col-md-8
input.form-control(type='text', name='name', id='name', autofocus=true)
input.form-control(type='text', name='name', id='name', autocomplete, autofocus=true)
.form-group.row
label(class='col-md-2 col-form-label font-weight-bold', for='email') Email
.col-md-8
input.form-control(type='text', name='email', id='email')
input.form-control(type='text', name='email', id='email', autocomplete)
.form-group.row
label(class='col-md-2 col-form-label font-weight-bold', for='message') Please describe the issue or your suggestion
.col-md-8
Expand Down

0 comments on commit bcdccab

Please sign in to comment.