diff --git a/app/models/form/lettings/questions/lead_tenant_sex_registered_at_birth.rb b/app/models/form/lettings/questions/lead_tenant_sex_registered_at_birth.rb index 33713e41e..7f07519d2 100644 --- a/app/models/form/lettings/questions/lead_tenant_sex_registered_at_birth.rb +++ b/app/models/form/lettings/questions/lead_tenant_sex_registered_at_birth.rb @@ -5,12 +5,6 @@ class Form::Lettings::Questions::LeadTenantSexRegisteredAtBirth < ::Form::Questi @type = "radio" @check_answers_card_number = 1 @answer_options = ANSWER_OPTIONS - @inferred_check_answers_value = [{ - "condition" => { - @id => "R", - }, - "value" => "Prefers not to say", - }] @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] end @@ -22,4 +16,12 @@ class Form::Lettings::Questions::LeadTenantSexRegisteredAtBirth < ::Form::Questi }.freeze QUESTION_NUMBER_FROM_YEAR = { 2026 => 31 }.freeze + + def label_from_value(value, _log = nil, _user = nil) + return unless value + + return "Prefers not to say" if value == "R" + + super + end end diff --git a/app/models/form/lettings/questions/person_sex_registered_at_birth.rb b/app/models/form/lettings/questions/person_sex_registered_at_birth.rb index 3ea89ab26..e5c54058f 100644 --- a/app/models/form/lettings/questions/person_sex_registered_at_birth.rb +++ b/app/models/form/lettings/questions/person_sex_registered_at_birth.rb @@ -6,12 +6,6 @@ class Form::Lettings::Questions::PersonSexRegisteredAtBirth < ::Form::Question @answer_options = ANSWER_OPTIONS @person_index = person_index @question_number = question_number - @inferred_check_answers_value = [{ - "condition" => { - id => "R", - }, - "value" => "Prefers not to say", - }] end ANSWER_OPTIONS = { @@ -26,4 +20,12 @@ class Form::Lettings::Questions::PersonSexRegisteredAtBirth < ::Form::Question base_question_number + (5 * @person_index) end + + def label_from_value(value, _log = nil, _user = nil) + return unless value + + return "Prefers not to say" if value == "R" + + super + end end