Skip to content
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
6 changes: 0 additions & 6 deletions app/helpers/form_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,4 @@ def us_states_territories
['Wyoming', 'WY'],
]
end

private

def validated_form_for(record, options = {}, &block)
simple_form_for(record, options, &block)
end
end
2 changes: 1 addition & 1 deletion app/views/devise/passwords/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<p><%= t('instructions.password.password_key') %></p>

<%= validated_form_for(
<%= simple_form_for(
@reset_password_form,
url: user_password_path,
html: { autocomplete: 'off',
Expand Down
2 changes: 1 addition & 1 deletion app/views/devise/passwords/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<%= t('instructions.password.forgot') %>
</p>

<%= validated_form_for(
<%= simple_form_for(
@password_reset_email_form,
url: user_password_path,
html: { autocomplete: 'off', method: :post },
Expand Down
2 changes: 1 addition & 1 deletion app/views/devise/sessions/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<% end %>
<%= render 'shared/sp_alert' %>

<%= validated_form_for(
<%= simple_form_for(
resource,
as: resource_name,
url: session_path(resource_name),
Expand Down
2 changes: 1 addition & 1 deletion app/views/event_disavowal/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<%= render PageHeadingComponent.new.with_content(t('headings.passwords.change')) %>

<%= validated_form_for(
<%= simple_form_for(
@password_reset_from_disavowal_form,
url: events_disavowal_url,
html: { autocomplete: 'off',
Expand Down
6 changes: 3 additions & 3 deletions app/views/forgot_password/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
<hr class="margin-y-4 border-width-05 border-info">
</div>

<%= validated_form_for @password_reset_email_form,
html: { autocomplete: 'off', method: :post, class: 'margin-bottom-2' },
url: user_password_path do |f| %>
<%= simple_form_for @password_reset_email_form,
html: { autocomplete: 'off', method: :post, class: 'margin-bottom-2' },
url: user_password_path do |f| %>

<%= f.input :email, as: :hidden %>
<%= f.input :resend, as: :hidden %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/idv/doc_auth/send_link.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<p class="margin-y-4"><strong><%= t('doc_auth.info.camera_required') %></strong></p>

<p><%= t('doc_auth.instructions.send_sms') %></p>
<%= validated_form_for(
<%= simple_form_for(
:doc_auth,
url: url_for,
method: 'PUT',
Expand Down
4 changes: 2 additions & 2 deletions app/views/idv/doc_auth/upload.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
<% end %>
</h2>
<%= t('doc_auth.info.upload_from_phone') %>
<%= validated_form_for(
<%= simple_form_for(
:doc_auth,
url: url_for(type: :mobile),
method: 'PUT',
Expand All @@ -61,7 +61,7 @@

<div id="upload-comp-liveness-off" class="<%= 'display-none' if liveness_checking_enabled? %>">
<%= t('doc_auth.info.upload_from_computer') %>&nbsp;
<%= validated_form_for(
<%= simple_form_for(
:doc_auth,
url: url_for(type: :desktop),
method: 'PUT',
Expand Down
8 changes: 4 additions & 4 deletions app/views/idv/doc_auth/welcome.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
<% end %>
<% end %>

<%= validated_form_for :doc_auth,
url: url_for,
method: 'put',
html: { autocomplete: 'off', class: 'margin-y-5 js-consent-continue-form' } do |f| %>
<%= simple_form_for :doc_auth,
url: url_for,
method: 'put',
html: { autocomplete: 'off', class: 'margin-y-5 js-consent-continue-form' } do |f| %>
<%= f.submit t('doc_auth.buttons.continue') %>
<% end %>

Expand Down
8 changes: 4 additions & 4 deletions app/views/idv/in_person/state_id.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
<%= t('in_person_proofing.body.state_id.info_html') %>
</p>

<%= validated_form_for :doc_auth,
url: url_for,
method: 'put',
html: { autocomplete: 'off', class: 'margin-y-5' } do |f| %>
<%= simple_form_for :doc_auth,
url: url_for,
method: 'put',
html: { autocomplete: 'off', class: 'margin-y-5' } do |f| %>

<div class="margin-bottom-4">
<%= render ValidatedFieldComponent.new(
Expand Down
2 changes: 1 addition & 1 deletion app/views/idv/phone/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<%= t('idv.messages.phone.final_note_html') %>
</p>

<%= validated_form_for(
<%= simple_form_for(
@idv_form,
url: idv_phone_path,
data: {
Expand Down
2 changes: 1 addition & 1 deletion app/views/idv/shared/_document_capture.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
idv_in_person_url: Idv::InPersonConfig.enabled_for_issuer?(decorated_session.sp_issuer) ? idv_in_person_url : nil,
security_and_privacy_how_it_works_url: MarketingSite.security_and_privacy_how_it_works_url,
} %>
<%= validated_form_for(
<%= simple_form_for(
:doc_auth,
url: url_for,
method: 'PUT',
Expand Down
2 changes: 1 addition & 1 deletion app/views/mfa_confirmation/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
t('help_text.change_factor', factor: user_session[:factor_to_change]) %>
</p>

<%= validated_form_for(
<%= simple_form_for(
current_user,
url: reauthn_user_password_path,
html: { autocomplete: 'off', method: 'post', class: 'margin-top-6' },
Expand Down
2 changes: 1 addition & 1 deletion app/views/password_capture/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<%= render PageHeadingComponent.new.with_content(password_header) %>

<%= validated_form_for(
<%= simple_form_for(
current_user,
as: :user,
url: capture_password_url,
Expand Down
2 changes: 1 addition & 1 deletion app/views/shared/_email_languages.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<%#
locals:
* f: from validated_form_for
* f: from simple_form_for
* selection: the current language selection
* hint: optional hint override
%>
Expand Down
2 changes: 1 addition & 1 deletion app/views/sign_up/completions/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<% end %>
<% end %>
<p>
<%= validated_form_for(:idv_form, url: sign_up_completed_path) do |f| %>
<%= simple_form_for(:idv_form, url: sign_up_completed_path) do |f| %>
<%= f.submit t('sign_up.agree_and_continue') %>
<% end %>
</p>
2 changes: 1 addition & 1 deletion app/views/sign_up/email_resend/new.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<% title t('titles.confirmations.new') %>

<%= render PageHeadingComponent.new.with_content(t('headings.confirmations.new')) %>
<%= validated_form_for(
<%= simple_form_for(
@resend_email_confirmation_form,
url: sign_up_register_path,
html: { autocomplete: 'off', method: :post },
Expand Down
6 changes: 3 additions & 3 deletions app/views/sign_up/emails/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
<hr class="margin-y-4 border-width-05 border-info">
</div>

<%= validated_form_for @resend_email_confirmation_form,
html: { class: 'margin-bottom-2' },
url: sign_up_register_path do |f| %>
<%= simple_form_for @resend_email_confirmation_form,
html: { class: 'margin-bottom-2' },
url: sign_up_register_path do |f| %>
<%= f.input :email, as: :hidden %>
<%= f.input :resend, as: :hidden %>
<%= f.input :request_id, as: :hidden %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/sign_up/passwords/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<p class="margin-top-2 margin-bottom-0" id="password-description">
<%= t('instructions.password.info.lead', min_length: Devise.password_length.first) %>
</p>
<%= validated_form_for(
<%= simple_form_for(
@password_form,
url: sign_up_create_password_path,
method: :post,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<%= t('two_factor_authentication.backup_code_prompt') %>
</p>

<%= validated_form_for(
<%= simple_form_for(
@backup_code_form,
url: login_two_factor_backup_code_path,
html: { autocomplete: 'off', method: :post },
Expand Down
2 changes: 1 addition & 1 deletion app/views/two_factor_authentication/options/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<%= @presenter.info %>
</p>

<%= validated_form_for(
<%= simple_form_for(
@two_factor_options_form,
html: { autocomplete: 'off' },
method: :post,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<%= t('two_factor_authentication.personal_key_prompt') %>
</p>

<%= validated_form_for(
<%= simple_form_for(
@personal_key_form, url: login_two_factor_personal_key_path,
html: { autocomplete: 'off', method: :post }
) do |f| %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/users/edit_phone/edit.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<% title t('titles.edit_info.phone') %>
<%= render PageHeadingComponent.new.with_content(t('headings.edit_info.phone')) %>

<%= validated_form_for(
<%= simple_form_for(
@edit_phone_form,
html: { autocomplete: 'off', method: :put },
url: manage_phone_path(id: @phone_configuration.id),
Expand Down
2 changes: 1 addition & 1 deletion app/views/users/email_language/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
) %>
</p>

<%= validated_form_for(current_user, url: account_email_language_path, method: 'PATCH') do |f| %>
<%= simple_form_for(current_user, url: account_email_language_path, method: 'PATCH') do |f| %>
<%= render partial: 'shared/email_languages',
locals: { f: f, hint: false, selection: current_user.email_language } %>
<%= f.submit t('forms.buttons.submit.default'), class: 'grid-col-8 tablet:grid-col-6' %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/users/emails/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<%= render PageHeadingComponent.new.with_content(t('headings.add_email')) %>

<div class="margin-bottom-6">
<%= validated_form_for(
<%= simple_form_for(
@add_user_email_form,
html: { autocomplete: 'off' },
url: add_email_path,
Expand Down
8 changes: 4 additions & 4 deletions app/views/users/mfa_selection/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

<p class="maxw-mobile-lg margin-bottom-0"><%= @presenter.intro %></p>

<%= validated_form_for @two_factor_options_form,
html: { autocomplete: 'off' },
method: :patch,
url: second_mfa_setup_path do |f| %>
<%= simple_form_for @two_factor_options_form,
html: { autocomplete: 'off' },
method: :patch,
url: second_mfa_setup_path do |f| %>
<div class="margin-bottom-4">
<fieldset class="margin-0 padding-0 border-0">
<legend class="margin-bottom-2 usa-sr-only"><%= @presenter.intro %></legend>
Expand Down
2 changes: 1 addition & 1 deletion app/views/users/passwords/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<%= t('instructions.password.info.lead', min_length: Devise.password_length.first) %>
</p>

<%= validated_form_for(
<%= simple_form_for(
@update_user_password_form, url: manage_password_path,
html: { autocomplete: 'off', method: :patch }
) do |f| %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/users/phone_setup/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<% end %>
</p>

<%= validated_form_for(
<%= simple_form_for(
@new_phone_form,
html: { autocomplete: 'off', method: :patch },
data: { international_phone_form: true },
Expand Down
2 changes: 1 addition & 1 deletion app/views/users/phones/add.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<% end %>
</p>

<%= validated_form_for(
<%= simple_form_for(
@new_phone_form,
html: { autocomplete: 'off', method: :post },
data: { international_phone_form: true },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@

<p class="maxw-mobile-lg margin-bottom-0"><%= @presenter.intro %></p>

<%= validated_form_for @two_factor_options_form,
html: { autocomplete: 'off' },
method: :patch,
url: authentication_methods_setup_path do |f| %>
<%= simple_form_for @two_factor_options_form,
html: { autocomplete: 'off' },
method: :patch,
url: authentication_methods_setup_path do |f| %>
<div class="margin-bottom-4">
<fieldset class="margin-0 padding-0 border-0">
<legend class="margin-bottom-2 usa-sr-only"><%= @presenter.intro %></legend>
Expand Down
2 changes: 1 addition & 1 deletion app/views/users/verify_password/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<%= t('idv.messages.sessions.review_message', app_name: APP_NAME) %>
</p>

<%= validated_form_for(
<%= simple_form_for(
current_user, url: update_verify_password_path,
html: { autocomplete: 'off', method: :put }
) do |f| %>
Expand Down