Browse Source

CLDC-4177: Adds SAB form for the primary buyer.

CLDC-4177-bulk-upload-changes-wip
Katherine Langford 1 week ago
parent
commit
aa41e1ae22
  1. 22
      app/models/form/sales/pages/sex_registered_at_birth1.rb
  2. 2
      app/models/form/sales/questions/sex_registered_at_birth1.rb
  3. 1
      app/models/form/sales/subsections/household_characteristics.rb
  4. 7
      config/locales/forms/2026/sales/household_characteristics.en.yml

22
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

2
app/models/form/sales/questions/sex_registered_at_birth1.rb

@ -1,6 +1,6 @@
# frozen_string_literal: true # frozen_string_literal: true
class Form::Sales::Questions::SexRegisteredAtBirth1 < Form::Question class Form::Sales::Questions::SexRegisteredAtBirth1 < ::Form::Question
def initialize(id, hsh, page) def initialize(id, hsh, page)
super super
@id = "sexRAB1" @id = "sexRAB1"

1
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::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_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::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::GenderIdentity1.new(nil, nil, self),
Form::Sales::Pages::Buyer1EthnicGroup.new(nil, nil, self), Form::Sales::Pages::Buyer1EthnicGroup.new(nil, nil, self),
Form::Sales::Pages::Buyer1EthnicBackgroundBlack.new(nil, nil, self), Form::Sales::Pages::Buyer1EthnicBackgroundBlack.new(nil, nil, self),

7
config/locales/forms/2026/sales/household_characteristics.en.yml

@ -16,6 +16,13 @@ en:
hint_text: "" hint_text: ""
question_text: "Age" 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: sex1:
page_header: "" page_header: ""
check_answer_label: "Buyer 1’s gender identity" check_answer_label: "Buyer 1’s gender identity"

Loading…
Cancel
Save