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
14 changes: 0 additions & 14 deletions app/javascript/app/form-validation.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,6 @@ document.addEventListener('DOMContentLoaded', () => {
},
false,
);
const elements = form.querySelectorAll('input');
if (elements.length !== 0) {
[].forEach.call(elements, function (input) {
input.addEventListener('input', function () {
if (buttons.length !== 0 && input.checkValidity()) {
[].forEach.call(buttons, function (button) {
if (button.disabled && !button.classList.contains('no-auto-enable')) {
button.disabled = false;
}
});
}
});
});
}

const inputs = form.querySelectorAll('.field');

Expand Down
2 changes: 1 addition & 1 deletion app/views/idv/doc_auth/overview.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
<%= link_to(t('recover.instructions.learn_more'), 'https://login.gov/policy/', target: '_blank') %>
</div>
</label>
<%= f.button :submit, t('recover.buttons.continue'), class: 'btn btn-primary btn-wide sm-col-6 col-6 no-auto-enable' %>
<%= f.button :submit, t('recover.buttons.continue'), class: 'btn btn-primary btn-wide sm-col-6 col-6' %>
<% end %>

<br/>
Expand Down
2 changes: 1 addition & 1 deletion app/views/idv/doc_auth/welcome.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
<%= link_to(t('doc_auth.instructions.learn_more'), 'https://login.gov/policy/', target: '_blank') %>
</div>
</label>
<%= f.button :submit, t('doc_auth.buttons.continue'), class: 'btn btn-primary btn-wide sm-col-6 col-6 no-auto-enable' %>
<%= f.button :submit, t('doc_auth.buttons.continue'), class: 'btn btn-primary btn-wide sm-col-6 col-6' %>
<% end %>

<br/>
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
Expand Up @@ -15,7 +15,7 @@
<%= render 'delivery_preference_selection' %>
<%= render 'make_default_number' %>

<%= f.button :submit, t('forms.buttons.submit.confirm_change'), class: 'no-auto-enable btn-wide' %>
<%= f.button :submit, t('forms.buttons.submit.confirm_change'), class: 'btn-wide' %>
<% end %>

<%= render 'remove_phone' %>
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 @@ -29,7 +29,7 @@
<%= render 'users/shared/otp_make_default_number',
form_obj: @new_phone_form%>
<% end %>
<%= f.button :submit, t('forms.buttons.send_security_code'), class: 'no-auto-enable btn-wide' %>
<%= f.button :submit, t('forms.buttons.send_security_code'), class: 'btn-wide' %>
<% end %>


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 @@ -23,7 +23,7 @@
<%= render 'users/shared/otp_make_default_number',
form_obj: @new_phone_form %>
<% end %>
<%= f.button :submit, t('forms.buttons.continue'), class: 'no-auto-enable btn-wide' %>
<%= f.button :submit, t('forms.buttons.continue'), class: 'btn-wide' %>
<% end %>

<%= render 'shared/cancel', link: account_path %>
Expand Down
5 changes: 0 additions & 5 deletions spec/views/phone_setup/index.html.slim_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,4 @@
href: two_factor_options_path,
)
end

it 'it has auto enable off for the submit button' do
expect(rendered).
to have_xpath('//input[@type="submit" and contains(@class, "no-auto-enable")]')
end
end