From aa41e1ae22f1d7a48d709191baf65d64b4985fc6 Mon Sep 17 00:00:00 2001 From: Katherine Langford Date: Wed, 14 Jan 2026 10:24:09 +0000 Subject: [PATCH] CLDC-4177: Adds SAB form for the primary buyer. --- .../sales/pages/sex_registered_at_birth1.rb | 22 +++++++++++++++++++ .../questions/sex_registered_at_birth1.rb | 2 +- .../subsections/household_characteristics.rb | 1 + .../sales/household_characteristics.en.yml | 7 ++++++ 4 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 app/models/form/sales/pages/sex_registered_at_birth1.rb diff --git a/app/models/form/sales/pages/sex_registered_at_birth1.rb b/app/models/form/sales/pages/sex_registered_at_birth1.rb new file mode 100644 index 000000000..0990f3932 --- /dev/null +++ b/app/models/form/sales/pages/sex_registered_at_birth1.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true + +class Form::Sales::Pages::SexRegisteredAtBirth1 < ::Form::Page + def initialize(id, hsh, subsection) + super + @id = "buyer_1_sex_registered_at_birth" + @depends_on = [ + { + "buyer_has_seen_privacy_notice?" => true, + }, + { + "buyer_not_interviewed?" => true, + }, + ] + end + + def questions + @questions ||= [ + Form::Sales::Questions::SexRegisteredAtBirth1.new(nil, nil, self), + ] + end +end diff --git a/app/models/form/sales/questions/sex_registered_at_birth1.rb b/app/models/form/sales/questions/sex_registered_at_birth1.rb index fb00fa65e..633a9dc13 100644 --- a/app/models/form/sales/questions/sex_registered_at_birth1.rb +++ b/app/models/form/sales/questions/sex_registered_at_birth1.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -class Form::Sales::Questions::SexRegisteredAtBirth1 < Form::Question +class Form::Sales::Questions::SexRegisteredAtBirth1 < ::Form::Question def initialize(id, hsh, page) super @id = "sexRAB1" diff --git a/app/models/form/sales/subsections/household_characteristics.rb b/app/models/form/sales/subsections/household_characteristics.rb index a1f21ae8e..b18f7919f 100644 --- a/app/models/form/sales/subsections/household_characteristics.rb +++ b/app/models/form/sales/subsections/household_characteristics.rb @@ -24,6 +24,7 @@ class Form::Sales::Subsections::HouseholdCharacteristics < ::Form::Subsection (Form::Sales::Pages::NotRetiredValueCheck.new("age_1_not_retired_value_check", nil, self, person_index: 1) if form.start_year_2024_or_later?), Form::Sales::Pages::OldPersonsSharedOwnershipValueCheck.new("age_1_old_persons_shared_ownership_joint_purchase_value_check", nil, self, joint_purchase: true), Form::Sales::Pages::OldPersonsSharedOwnershipValueCheck.new("age_1_old_persons_shared_ownership_value_check", nil, self, joint_purchase: false), + Form::Sales::Pages::SexRegisteredAtBirth1.new(nil, nil, self), Form::Sales::Pages::GenderIdentity1.new(nil, nil, self), Form::Sales::Pages::Buyer1EthnicGroup.new(nil, nil, self), Form::Sales::Pages::Buyer1EthnicBackgroundBlack.new(nil, nil, self), diff --git a/config/locales/forms/2026/sales/household_characteristics.en.yml b/config/locales/forms/2026/sales/household_characteristics.en.yml index 1254ecf6a..36354eb3e 100644 --- a/config/locales/forms/2026/sales/household_characteristics.en.yml +++ b/config/locales/forms/2026/sales/household_characteristics.en.yml @@ -16,6 +16,13 @@ en: hint_text: "" question_text: "Age" + sexRAB1: + page_header: "" + check_answer_label: "Buyer 1’s sex registered at birth" + check_answer_prompt: "" + hint_text: "This is your sex that was registered at birth. The next question will ask about your gender identity." + question_text: "What is your sex?" + sex1: page_header: "" check_answer_label: "Buyer 1’s gender identity"