diff --git a/Gemfile b/Gemfile index 911a870912d..e8c19b918b9 100644 --- a/Gemfile +++ b/Gemfile @@ -125,7 +125,7 @@ group :test do gem 'rails-controller-testing', '>= 1.0.4' gem 'rspec-retry' gem 'shoulda-matchers', '~> 4.0', require: false - gem 'webdrivers', '~> 4.0' + gem 'webdrivers', '~> 5.2.0' gem 'webmock' gem 'zonebie' end diff --git a/Gemfile.lock b/Gemfile.lock index 1ea60c8462b..489960208c7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -692,10 +692,10 @@ GEM openssl (~> 2.2) safety_net_attestation (~> 0.4.0) tpm-key_attestation (~> 0.10.0) - webdrivers (4.7.0) + webdrivers (5.2.0) nokogiri (~> 1.6) rubyzip (>= 1.3.0) - selenium-webdriver (> 3.141, < 5.0) + selenium-webdriver (~> 4.0) webmock (3.14.0) addressable (>= 2.8.0) crack (>= 0.3.2) @@ -830,7 +830,7 @@ DEPENDENCIES valid_email (>= 0.1.3) view_component (~> 2.51.0) webauthn (~> 2.1) - webdrivers (~> 4.0) + webdrivers (~> 5.2.0) webmock xmldsig (~> 0.6) xmlenc (~> 0.7, >= 0.7.1) diff --git a/app/assets/stylesheets/components/_troubleshooting-options.scss b/app/assets/stylesheets/components/_troubleshooting-options.scss index bca9f50329a..b6eaca8b84c 100644 --- a/app/assets/stylesheets/components/_troubleshooting-options.scss +++ b/app/assets/stylesheets/components/_troubleshooting-options.scss @@ -5,7 +5,7 @@ margin-bottom: 0; } - &::before { + &.troubleshooting-options--divider::before { @include u-margin-bottom(4); background-color: color('secondary'); content: ''; @@ -13,10 +13,6 @@ height: 4px; width: 5rem; } - - & + &::before { - content: none; - } } .troubleshooting-options__heading { diff --git a/app/controllers/account_reset/pending_controller.rb b/app/controllers/account_reset/pending_controller.rb index 76d1c856900..77ca7da3f05 100644 --- a/app/controllers/account_reset/pending_controller.rb +++ b/app/controllers/account_reset/pending_controller.rb @@ -14,9 +14,7 @@ def confirm; end def cancel analytics.pending_account_reset_cancelled - irs_attempts_api_tracker.account_reset_cancel_request( - success: true, - ) + irs_attempts_api_tracker.account_reset_cancel_request AccountReset::CancelRequestForUser.new(current_user).call end diff --git a/app/controllers/idv/gpo_controller.rb b/app/controllers/idv/gpo_controller.rb index 9349eae4872..3bd309ce65b 100644 --- a/app/controllers/idv/gpo_controller.rb +++ b/app/controllers/idv/gpo_controller.rb @@ -47,7 +47,7 @@ def step_indicator_current_step def update_tracking analytics.idv_gpo_address_letter_requested(resend: resend_requested?) - irs_attempts_api_tracker.idv_gpo_letter_requested(success: true, resend: resend_requested?) + irs_attempts_api_tracker.idv_gpo_letter_requested(resend: resend_requested?) create_user_event(:gpo_mail_sent, current_user) ProofingComponent.create_or_find_by(user: current_user).update(address_check: 'gpo_letter') diff --git a/app/controllers/idv/personal_key_controller.rb b/app/controllers/idv/personal_key_controller.rb index 5e2ca39ee67..c0da6b28a8b 100644 --- a/app/controllers/idv/personal_key_controller.rb +++ b/app/controllers/idv/personal_key_controller.rb @@ -65,7 +65,7 @@ def personal_key def generate_personal_key cacher = Pii::Cacher.new(current_user, user_session) - irs_attempts_api_tracker.idv_personal_key_generated(success: true) + irs_attempts_api_tracker.idv_personal_key_generated idv_session.profile.encrypt_recovery_pii(cacher.fetch) end diff --git a/app/controllers/sign_up/email_confirmations_controller.rb b/app/controllers/sign_up/email_confirmations_controller.rb index 86a31240db4..21e66b4399e 100644 --- a/app/controllers/sign_up/email_confirmations_controller.rb +++ b/app/controllers/sign_up/email_confirmations_controller.rb @@ -22,7 +22,6 @@ def clear_setup_piv_cac_from_sign_in def process_successful_confirmation process_valid_confirmation_token request_id = params.fetch(:_request_id, '') - Funnel::Registration::ConfirmEmail.call(@user.id) redirect_to sign_up_enter_password_url( request_id: request_id, confirmation_token: @confirmation_token, ) diff --git a/app/controllers/sign_up/passwords_controller.rb b/app/controllers/sign_up/passwords_controller.rb index a5c73987b96..a2ee1b15e65 100644 --- a/app/controllers/sign_up/passwords_controller.rb +++ b/app/controllers/sign_up/passwords_controller.rb @@ -56,7 +56,6 @@ def process_successful_password_creation ).call @user.email_addresses.take.update(confirmed_at: now) - Funnel::Registration::AddPassword.call(@user.id) sign_in_and_redirect_user end diff --git a/app/forms/edit_phone_form.rb b/app/forms/edit_phone_form.rb index f014de1462e..4e3b615fdd4 100644 --- a/app/forms/edit_phone_form.rb +++ b/app/forms/edit_phone_form.rb @@ -33,6 +33,10 @@ def default_phone_configuration? phone_configuration == user.default_phone_configuration end + def one_phone_configured? + user.phone_configurations.count == 1 + end + private attr_writer :delivery_preference, :make_default_number diff --git a/app/forms/register_user_email_form.rb b/app/forms/register_user_email_form.rb index 9c6eafc259d..a375438425c 100644 --- a/app/forms/register_user_email_form.rb +++ b/app/forms/register_user_email_form.rb @@ -95,7 +95,6 @@ def process_successful_submission(request_id, instructions) self.success = true user.accepted_terms_at = Time.zone.now user.save! - Funnel::Registration::Create.call(user.id) SendSignUpEmailConfirmation.new(user).call( request_id: email_request_id(request_id), instructions: instructions, diff --git a/app/javascript/packages/components/troubleshooting-options.spec.tsx b/app/javascript/packages/components/troubleshooting-options.spec.tsx index 59f2c95132b..491e1e982e1 100644 --- a/app/javascript/packages/components/troubleshooting-options.spec.tsx +++ b/app/javascript/packages/components/troubleshooting-options.spec.tsx @@ -81,4 +81,24 @@ describe('TroubleshootingOptions', () => { const tag = getByText('components.troubleshooting_options.new_feature'); expect(tag.classList.contains('text-uppercase')).to.eq(true); }); + + it('renders with expected classes', () => { + const { container } = render(); + + const element = container.firstElementChild!; + + expect(element.classList.contains('troubleshooting-options')).to.be.true(); + expect(element.classList.contains('troubleshooting-options--divider')).to.be.true(); + }); + + context('with divider disabled', () => { + it('renders with expected classes', () => { + const { container } = render(); + + const element = container.firstElementChild!; + + expect(element.classList.contains('troubleshooting-options')).to.be.true(); + expect(element.classList.contains('troubleshooting-options--divider')).to.be.false(); + }); + }); }); diff --git a/app/javascript/packages/components/troubleshooting-options.tsx b/app/javascript/packages/components/troubleshooting-options.tsx index fab09c66ff0..8f5ed3bd90b 100644 --- a/app/javascript/packages/components/troubleshooting-options.tsx +++ b/app/javascript/packages/components/troubleshooting-options.tsx @@ -19,6 +19,8 @@ interface TroubleshootingOptionsProps { options: TroubleshootingOption[]; isNewFeatures?: boolean; + + divider?: boolean; } function TroubleshootingOptions({ @@ -26,6 +28,7 @@ function TroubleshootingOptions({ heading, options, isNewFeatures, + divider = true, }: TroubleshootingOptionsProps) { const { t } = useI18n(); @@ -33,10 +36,13 @@ function TroubleshootingOptions({ return null; } + const classes = ['troubleshooting-options', divider && 'troubleshooting-options--divider'] + .filter(Boolean) + .join(' '); const HeadingTag = headingTag; return ( -
+
{isNewFeatures && ( {t('components.troubleshooting_options.new_feature')} diff --git a/app/javascript/packages/document-capture/components/document-capture-troubleshooting-options.tsx b/app/javascript/packages/document-capture/components/document-capture-troubleshooting-options.tsx index fd287e8f018..f20577f8689 100644 --- a/app/javascript/packages/document-capture/components/document-capture-troubleshooting-options.tsx +++ b/app/javascript/packages/document-capture/components/document-capture-troubleshooting-options.tsx @@ -85,6 +85,7 @@ function DocumentCaptureTroubleshootingOptions({ heading={formatHTML(t('idv.troubleshooting.headings.are_you_near'), { wbr: 'wbr', })} + divider={false} options={[ { url: '#location', diff --git a/app/jobs/reports/deleted_user_accounts_report.rb b/app/jobs/reports/deleted_user_accounts_report.rb index ca82eac7776..53b8fc391df 100644 --- a/app/jobs/reports/deleted_user_accounts_report.rb +++ b/app/jobs/reports/deleted_user_accounts_report.rb @@ -20,7 +20,7 @@ def perform(_date) issuers = report_hash['issuers'] report = deleted_user_accounts_data_for_issuers(issuers) emails.each do |email| - UserMailer.deleted_user_accounts_report( + ReportMailer.deleted_user_accounts_report( email: email, name: name, issuers: issuers, diff --git a/app/jobs/reports/query_helpers.rb b/app/jobs/reports/query_helpers.rb index 89964cad7fe..54d76f05dad 100644 --- a/app/jobs/reports/query_helpers.rb +++ b/app/jobs/reports/query_helpers.rb @@ -7,20 +7,5 @@ def quote(value) ActiveRecord::Base.connection.quote(value) end end - - # Wrapper around PG::Result#stream_each, runs a query and yields each row to the block - # as it is returned from the DB - # @param [String] SQL query - # @yieldparam [Hash] row - def stream_query(query) - ActiveRecord::Base.logger.debug(query) # using send_query skips ActiveRecord logging - connection = ActiveRecord::Base.connection.raw_connection - connection.send_query(query) - connection.set_single_row_mode - connection.get_result.stream_each do |row| - yield row - end - connection.get_result - end end end diff --git a/app/mailers/report_mailer.rb b/app/mailers/report_mailer.rb new file mode 100644 index 00000000000..b6a42e29364 --- /dev/null +++ b/app/mailers/report_mailer.rb @@ -0,0 +1,17 @@ +class ReportMailer < ActionMailer::Base + include Mailable + + before_action :attach_images + + def sps_over_quota_limit(email) + mail(to: email, subject: t('report_mailer.sps_over_quota_limit.subject')) + end + + def deleted_user_accounts_report(email:, name:, issuers:, data:) + @name = name + @issuers = issuers + @data = data + attachments['deleted_user_accounts.csv'] = data + mail(to: email, subject: t('report_mailer.deleted_accounts_report.subject')) + end +end diff --git a/app/mailers/user_mailer.rb b/app/mailers/user_mailer.rb index 09ba0c4a311..4d533bfb4cc 100644 --- a/app/mailers/user_mailer.rb +++ b/app/mailers/user_mailer.rb @@ -197,18 +197,6 @@ def add_email_associated_with_another_account(email) mail(to: email, subject: t('mailer.email_reuse_notice.subject')) end - def sps_over_quota_limit(email) - mail(to: email, subject: t('user_mailer.sps_over_quota_limit.subject')) - end - - def deleted_user_accounts_report(email:, name:, issuers:, data:) - @name = name - @issuers = issuers - @data = data - attachments['deleted_user_accounts.csv'] = data - mail(to: email, subject: t('user_mailer.deleted_accounts_report.subject')) - end - def account_verified(user, email_address, date_time:, sp_name:, disavowal_token:) return unless email_should_receive_nonessential_notifications?(email_address.email) diff --git a/app/services/db/monthly_sp_auth_count/total_monthly_auth_counts_within_iaa_window.rb b/app/services/db/monthly_sp_auth_count/total_monthly_auth_counts_within_iaa_window.rb index 1efccde96f3..bd844c31efb 100644 --- a/app/services/db/monthly_sp_auth_count/total_monthly_auth_counts_within_iaa_window.rb +++ b/app/services/db/monthly_sp_auth_count/total_monthly_auth_counts_within_iaa_window.rb @@ -33,14 +33,19 @@ def call(issuer:, iaa:, iaa_start_date:, iaa_end_date:) with_retries( max_tries: 3, - rescue: [PG::TRSerializationFailure, PG::UnableToSend], + rescue: [ + ActiveRecord::SerializationFailure, + PG::ConnectionBad, + PG::TRSerializationFailure, + PG::UnableToSend, + ], handler: proc do ial_to_year_month_to_users = temp_copy ActiveRecord::Base.connection.reconnect! end, ) do Reports::BaseReport.transaction_with_timeout do - stream_query(query) do |row| + ActiveRecord::Base.connection.execute(query).each do |row| user_id = row['user_id'] year_month = row['year_month'] auth_count = row['auth_count'] @@ -116,10 +121,6 @@ def build_queries(issuer:, months:) SQL end end - - def default_call - yield - end end end end diff --git a/app/services/db/monthly_sp_auth_count/unique_monthly_auth_counts_by_iaa.rb b/app/services/db/monthly_sp_auth_count/unique_monthly_auth_counts_by_iaa.rb index a8748d0a167..6a752f6fdf4 100644 --- a/app/services/db/monthly_sp_auth_count/unique_monthly_auth_counts_by_iaa.rb +++ b/app/services/db/monthly_sp_auth_count/unique_monthly_auth_counts_by_iaa.rb @@ -29,14 +29,19 @@ def call(key:, issuers:, start_date:, end_date:) with_retries( max_tries: 3, - rescue: [PG::TRSerializationFailure, PG::UnableToSend], + rescue: [ + ActiveRecord::SerializationFailure, + PG::ConnectionBad, + PG::TRSerializationFailure, + PG::UnableToSend, + ], handler: proc do ial_to_year_month_to_users = temp_copy ActiveRecord::Base.connection.reconnect! end, ) do Reports::BaseReport.transaction_with_timeout do - stream_query(query) do |row| + ActiveRecord::Base.connection.execute(query).each do |row| user_id = row['user_id'] year_month = row['year_month'] auth_count = row['auth_count'] diff --git a/app/services/db/service_provider_quota_limit/notify_if_any_sp_over_quota_limit.rb b/app/services/db/service_provider_quota_limit/notify_if_any_sp_over_quota_limit.rb index b192a53b099..04f836ac0f5 100644 --- a/app/services/db/service_provider_quota_limit/notify_if_any_sp_over_quota_limit.rb +++ b/app/services/db/service_provider_quota_limit/notify_if_any_sp_over_quota_limit.rb @@ -5,7 +5,7 @@ def self.call return unless Db::ServiceProviderQuotaLimit::AnySpOverQuotaLimit.call email_list = IdentityConfig.store.sps_over_quota_limit_notify_email_list email_list.each do |email| - UserMailer.sps_over_quota_limit(email).deliver_now_or_later + ReportMailer.sps_over_quota_limit(email).deliver_now_or_later end end end diff --git a/app/services/funnel/registration/add_mfa.rb b/app/services/funnel/registration/add_mfa.rb index 8246c52e636..8be49424caf 100644 --- a/app/services/funnel/registration/add_mfa.rb +++ b/app/services/funnel/registration/add_mfa.rb @@ -3,23 +3,11 @@ module Registration class AddMfa def self.call(user_id, mfa_method, analytics) now = Time.zone.now - funnel = RegistrationLog.find_by(user_id: user_id) - return if funnel.blank? || funnel.second_mfa.present? + funnel = RegistrationLog.where(user_id: user_id).first_or_create(submitted_at: now) + return if funnel.registered_at.present? - if funnel.first_mfa.present? - params = { - second_mfa: mfa_method, - } - else - params = { - first_mfa: mfa_method, - first_mfa_at: now, - registered_at: now, - } - analytics.user_registration_user_fully_registered(mfa_method: mfa_method) - end - - funnel.update!(params) + analytics.user_registration_user_fully_registered(mfa_method: mfa_method) + funnel.update!(registered_at: now) end end end diff --git a/app/services/funnel/registration/add_password.rb b/app/services/funnel/registration/add_password.rb deleted file mode 100644 index d136df17ee3..00000000000 --- a/app/services/funnel/registration/add_password.rb +++ /dev/null @@ -1,11 +0,0 @@ -module Funnel - module Registration - class AddPassword - # rubocop:disable Rails/SkipsModelValidations - def self.call(user_id) - RegistrationLog.where(user_id: user_id).update_all(password_at: Time.zone.now) - end - # rubocop:enable Rails/SkipsModelValidations - end - end -end diff --git a/app/services/funnel/registration/confirm_email.rb b/app/services/funnel/registration/confirm_email.rb deleted file mode 100644 index d287fd284a6..00000000000 --- a/app/services/funnel/registration/confirm_email.rb +++ /dev/null @@ -1,11 +0,0 @@ -module Funnel - module Registration - class ConfirmEmail - # rubocop:disable Rails/SkipsModelValidations - def self.call(user_id) - RegistrationLog.where(user_id: user_id).update_all(confirmed_at: Time.zone.now) - end - # rubocop:enable Rails/SkipsModelValidations - end - end -end diff --git a/app/services/funnel/registration/create.rb b/app/services/funnel/registration/create.rb deleted file mode 100644 index 6ae8ba3dca3..00000000000 --- a/app/services/funnel/registration/create.rb +++ /dev/null @@ -1,11 +0,0 @@ -module Funnel - module Registration - class Create - def self.call(user_id) - user = User.find(user_id) - return unless user - RegistrationLog.create(user_id: user_id, submitted_at: user.created_at) - end - end - end -end diff --git a/app/services/funnel/registration/range_submitted_count.rb b/app/services/funnel/registration/range_submitted_count.rb deleted file mode 100644 index acdbef32ca8..00000000000 --- a/app/services/funnel/registration/range_submitted_count.rb +++ /dev/null @@ -1,9 +0,0 @@ -module Funnel - module Registration - class RangeSubmittedCount - def self.call(start, finish) - RegistrationLog.where('? < submitted_at AND submitted_at < ?', start, finish).count - end - end - end -end diff --git a/app/services/funnel/registration/total_submitted_count.rb b/app/services/funnel/registration/total_submitted_count.rb deleted file mode 100644 index dff10d6df5e..00000000000 --- a/app/services/funnel/registration/total_submitted_count.rb +++ /dev/null @@ -1,9 +0,0 @@ -module Funnel - module Registration - class TotalSubmittedCount - def self.call - RegistrationLog.count - end - end - end -end diff --git a/app/services/idv/steps/in_person/ssn_step.rb b/app/services/idv/steps/in_person/ssn_step.rb index 6d2eb2238a9..cb2f3491032 100644 --- a/app/services/idv/steps/in_person/ssn_step.rb +++ b/app/services/idv/steps/in_person/ssn_step.rb @@ -10,7 +10,6 @@ def call flow_session[:pii_from_user][:ssn] = ssn @flow.irs_attempts_api_tracker.idv_ssn_submitted( - success: true, ssn: ssn, ) diff --git a/app/services/idv/steps/ssn_step.rb b/app/services/idv/steps/ssn_step.rb index a96927adb17..454bdd075ef 100644 --- a/app/services/idv/steps/ssn_step.rb +++ b/app/services/idv/steps/ssn_step.rb @@ -11,7 +11,6 @@ def call flow_session[:pii_from_doc][:ssn] = ssn @flow.irs_attempts_api_tracker.idv_ssn_submitted( - success: true, ssn: ssn, ) diff --git a/app/services/irs_attempts_api/tracker_events.rb b/app/services/irs_attempts_api/tracker_events.rb index d6dc43c5833..891994bb98f 100644 --- a/app/services/irs_attempts_api/tracker_events.rb +++ b/app/services/irs_attempts_api/tracker_events.rb @@ -14,12 +14,10 @@ def account_reset_account_deleted(success:, failure_reason: nil) ) end - # @param [Boolean] success True if account reset request is cancelled # A user cancels the request to delete their account before 24 hour period - def account_reset_cancel_request(success:) + def account_reset_cancel_request track_event( :account_reset_cancel_request, - success: success, ) end @@ -53,12 +51,10 @@ def forgot_password_email_rate_limited(email:) # Tracks when the user has requested a forgot password email # @param [String] email The submitted email address - # @param [Boolean] success True if the forgot password email was sent - def forgot_password_email_sent(email:, success:) + def forgot_password_email_sent(email:) track_event( :forgot_password_email_sent, email: email, - success: success, ) end @@ -126,13 +122,11 @@ def idv_document_upload_submitted( ) end - # @param [Boolean] success # @param [String] resend # The Address validation letter has been requested by user - def idv_gpo_letter_requested(success:, resend:) + def idv_gpo_letter_requested(resend:) track_event( :idv_gpo_letter_requested, - success: success, resend: resend, ) end @@ -164,12 +158,10 @@ def idv_password_entered(success:) ) end - # @param [Boolean] success # Personal Key got generated for user - def idv_personal_key_generated(success:) + def idv_personal_key_generated track_event( :idv_personal_key_generated, - success: success, ) end @@ -272,13 +264,11 @@ def idv_reproof ) end - # @param [Boolean] success # @param [String] ssn # User entered in SSN number during Identity verification - def idv_ssn_submitted(success:, ssn:) + def idv_ssn_submitted(ssn:) track_event( :idv_ssn_submitted, - success: success, ssn: ssn, ) end diff --git a/app/services/request_password_reset.rb b/app/services/request_password_reset.rb index d7de35d0fa4..b97790da680 100644 --- a/app/services/request_password_reset.rb +++ b/app/services/request_password_reset.rb @@ -31,7 +31,7 @@ def send_reset_password_instructions event = PushNotification::RecoveryActivatedEvent.new(user: user) PushNotification::HttpPush.deliver(event) - irs_attempts_api_tracker.forgot_password_email_sent(email: email, success: true) + irs_attempts_api_tracker.forgot_password_email_sent(email: email) end end diff --git a/app/views/accounts/_phone.html.erb b/app/views/accounts/_phone.html.erb index 2536b162cc7..a9eaf9bb540 100644 --- a/app/views/accounts/_phone.html.erb +++ b/app/views/accounts/_phone.html.erb @@ -10,7 +10,7 @@
<%= PhoneFormatter.format(phone_configuration.phone) %> - <% if current_user.default_phone_configuration == phone_configuration %> + <% if current_user.default_phone_configuration == phone_configuration && MfaContext.new(current_user).phone_configurations.count > 1 %> (<%= I18n.t('account.index.default') %>) <% end %>
diff --git a/app/views/report_mailer/deleted_user_accounts_report.html.erb b/app/views/report_mailer/deleted_user_accounts_report.html.erb new file mode 100644 index 00000000000..d42d276ab12 --- /dev/null +++ b/app/views/report_mailer/deleted_user_accounts_report.html.erb @@ -0,0 +1,2 @@ +<%= t('report_mailer.deleted_accounts_report.name') %>: <%= @name %>
+<%= t('report_mailer.deleted_accounts_report.issuers') %>: <%= @issuers.join(',') %>
diff --git a/app/views/user_mailer/sps_over_quota_limit.html.erb b/app/views/report_mailer/sps_over_quota_limit.html.erb similarity index 100% rename from app/views/user_mailer/sps_over_quota_limit.html.erb rename to app/views/report_mailer/sps_over_quota_limit.html.erb diff --git a/app/views/user_mailer/deleted_user_accounts_report.html.erb b/app/views/user_mailer/deleted_user_accounts_report.html.erb deleted file mode 100644 index 26567104a37..00000000000 --- a/app/views/user_mailer/deleted_user_accounts_report.html.erb +++ /dev/null @@ -1,2 +0,0 @@ -<%= t('user_mailer.deleted_accounts_report.name') %>: <%= @name %>
-<%= t('user_mailer.deleted_accounts_report.issuers') %>: <%= @issuers.join(',') %>
diff --git a/app/views/users/edit_phone/_make_default_number.html.erb b/app/views/users/edit_phone/_make_default_number.html.erb index 0b68b2faf71..1f553071e31 100644 --- a/app/views/users/edit_phone/_make_default_number.html.erb +++ b/app/views/users/edit_phone/_make_default_number.html.erb @@ -1,16 +1,25 @@
- <%= t('two_factor_authentication.otp_make_default_number.title') %> + <% if @edit_phone_form.one_phone_configured? %> + <%= t('two_factor_authentication.otp_make_default_number.one_number_title') %> + <% else %> + <%= t('two_factor_authentication.otp_make_default_number.title') %> + <% end %> -

- <%= t('two_factor_authentication.otp_make_default_number.instruction') %> +

+ <% if @edit_phone_form.one_phone_configured? %> + <%= t('two_factor_authentication.otp_make_default_number.one_number_instruction') %> + <% else %> + <%= t('two_factor_authentication.otp_make_default_number.instruction') %> + <% end %>

<%= check_box_tag( 'edit_phone_form[make_default_number]', :otp_make_default_number, @edit_phone_form.default_phone_configuration?, class: 'usa-checkbox__input usa-checkbox__input--bordered', + disabled: @edit_phone_form.one_phone_configured?, ) %>