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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Apply autocomplete attribute consistently to all forms #10604
Conversation
changelog: Bug Fixes, Forms, Disable autocomplete consistently for all forms
@@ -11,7 +11,6 @@ | |||
<%= simple_form_for( | |||
@password_reset_email_form, | |||
url: user_password_path, | |||
html: { autocomplete: 'off', method: :post }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
method: :post
is default, so removed it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
method: :post
is default, so removed it.
I don't think it's actually so straight-forward, there may be cases where we want explicit method: :post
. Unclear which of these are candidates. Could be safer to back out the changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added them back in 7dead6b for simple_form_for
where the record is a persisted model (e.g. current_user
).
See: #10604 (comment) Co-Authored-By: Zach Margolis <zachmargolis@users.noreply.github.com>
馃洜 Summary of changes
Monkey-patches SimpleForm to apply the
autocomplete="off"
attribute automatically for all forms.Why?
Audit:
I reviewed every
simple_form_for
as part of this work. Aside from those modified in the included changes, the views below includedsimple_form_for
without an explicitautocomplete
, along with a rationale for why it should be opted in to automaticautocomplete
with these changes:馃摐 Testing Plan
Verify no regressions in form autocompletion.