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 govuk_password_field helper #93

Closed

Conversation

jsugarman
Copy link
Collaborator

What

add a govuk_password_helper to the form builder

Why

For me this makes sense to have alongside the govuk_email_field
when you are implementing, for example, authentication - for consistency
if nothing else.

# example for typical `devise` sign in page
= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f|
  = f.govuk_error_summary
  = f.govuk_email_field(:email, label: { text: 'Email' }, autofocus: true, autocomplete: 'email')
  = f.govuk_password_field(:password, label: { text: 'Password' }, autocomplete: 'current-password')

Copy link
Member

@peteryates peteryates left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great Joel, thank you for the contribution - extra kudos for going the extra mile and updating the guide.

My only tiny nit pick is that you've not configured your name (via git config user.name) so the commits default to your github handle. I fixed that but it might be worth setting up (the command takes a --global flag if you want to do it for all projects)

@peteryates
Copy link
Member

Manually merged in d8a7071

@peteryates peteryates closed this Jan 15, 2020
@jsugarman
Copy link
Collaborator Author

Brill, and thanks for the hint @peteryates . will look into. Have not done much git config TBH

@jsugarman jsugarman deleted the add-govuk_password_field-helper branch January 15, 2020 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants