Skip to content

Commit

Permalink
Add visa question to primary/spouse life situations screens
Browse files Browse the repository at this point in the history
  • Loading branch information
spompea-cfa committed Dec 19, 2024
1 parent 86fc854 commit 4c2700e
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/forms/life_situations_form.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
class LifeSituationsForm < QuestionsForm
set_attributes_for :intake, :was_full_time_student, :primary_us_citizen, :had_disability, :was_blind
set_attributes_for :intake, :was_full_time_student, :primary_us_citizen, :primary_visa, :had_disability, :was_blind
set_attributes_for :confirmation, :no_life_situations_apply
validates :no_life_situations_apply, at_least_one_or_none_of_the_above_selected: true

Expand Down
2 changes: 1 addition & 1 deletion app/forms/spouse_life_situations_form.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
class SpouseLifeSituationsForm < QuestionsForm
set_attributes_for :intake, :spouse_was_full_time_student, :spouse_us_citizen, :spouse_had_disability, :spouse_was_blind
set_attributes_for :intake, :spouse_was_full_time_student, :spouse_us_citizen, :spouse_visa, :spouse_had_disability, :spouse_was_blind
set_attributes_for :confirmation, :no_life_situations_apply
validates :no_life_situations_apply, at_least_one_or_none_of_the_above_selected: true
def at_least_one_selected
Expand Down
1 change: 1 addition & 0 deletions app/views/questions/life_situations/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<%= f.cfa_checkbox(:was_blind, t('views.questions.life_situations.options.was_blind'), options: { checked_value: "yes", unchecked_value: "no" }) %>
<%= f.cfa_checkbox(:was_full_time_student, t('views.questions.life_situations.options.was_full_time_student'), options: { checked_value: "yes", unchecked_value: "no" }) %>
<%= f.cfa_checkbox(:primary_us_citizen, t('views.questions.life_situations.options.was_citizen'), options: { checked_value: "yes", unchecked_value: "no" }) %>
<%= f.cfa_checkbox(:primary_visa, t('views.questions.life_situations.options.was_on_visa'), options: { checked_value: "yes", unchecked_value: "no" }) %>
<%= f.cfa_checkbox(:no_life_situations_apply, t("general.none_of_the_above"), options: { id: "none__checkbox", checked_value: "yes", unchecked_value: "no" }) %>
</div>

Expand Down
1 change: 1 addition & 0 deletions app/views/questions/spouse_life_situations/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<%= f.cfa_checkbox(:spouse_was_blind, t('views.questions.spouse_life_situations.options.was_blind'), options: { checked_value: "yes", unchecked_value: "no" }) %>
<%= f.cfa_checkbox(:spouse_was_full_time_student, t('views.questions.spouse_life_situations.options.was_full_time_student'), options: { checked_value: "yes", unchecked_value: "no" }) %>
<%= f.cfa_checkbox(:spouse_us_citizen, t('views.questions.spouse_life_situations.options.was_citizen'), options: { checked_value: "yes", unchecked_value: "no" }) %>
<%= f.cfa_checkbox(:spouse_visa, t('views.questions.spouse_life_situations.options.was_on_visa'), options: { checked_value: "yes", unchecked_value: "no" }) %>
<%= f.cfa_checkbox(:no_life_situations_apply, t("general.none_of_the_above"), options: { id: "none__checkbox", checked_value: "yes", unchecked_value: "no" }) %>
</div>

Expand Down
2 changes: 2 additions & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5969,6 +5969,7 @@ en:
was_blind: I was legally blind
was_citizen: I was a US citizen
was_full_time_student: I was a full-time student in a college or a trade school
was_on_visa: I was in the US on a visa
title: Select any situations that were true for you in %{year}
lived_with_spouse:
title: Did you live with your spouse during any part of the last six months of %{year}?
Expand Down Expand Up @@ -6127,6 +6128,7 @@ en:
was_blind: They were legally blind
was_citizen: They were a US citizen
was_full_time_student: They were a full-time student in a college or a trade school
was_on_visa: They were in the US on a visa
title: Select any situations that were true for your spouse in %{year}
ssn_itin:
title: Please provide your taxpayer identification information.
Expand Down
4 changes: 3 additions & 1 deletion config/locales/es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5984,8 +5984,9 @@ es:
options:
had_disability: Yo tenía una discapacidad permanente
was_blind: Yo estaba legalmente ciego
was_citizen: Era ciudadano estadounidense
was_citizen: Yo era ciudadano estadounidense
was_full_time_student: Yo era un estudiante a tiempo completo en una universidad o una escuela de oficios
was_on_visa: Yo estaba en los Estados Unidos con visado
title: Seleccione las situaciones que fueron verdaderas para usted en el %{year}
lived_with_spouse:
title: "¿Vivió con su cónyuge durante alguna parte de los últimos seis meses de %{year}?"
Expand Down Expand Up @@ -6159,6 +6160,7 @@ es:
was_blind: Mi cónyuge era legalmente ciego
was_citizen: Eran ciudadanos estadounidenses
was_full_time_student: Mi cónyuge era un estudiante a tiempo completo en una universidad o una escuela de oficios
was_on_visa: Mi cónyuge estaba en los Estados Unidos con visado
title: Seleccione cualquier situación que haya sido cierta para su cónyuge en %{year}
ssn_itin:
title: Favor de proporcionar su información de identificación del contribuyente, "taxpayer identification information" en inglés.
Expand Down
4 changes: 4 additions & 0 deletions spec/forms/life_situations_form_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
had_disability: "no",
was_blind: "no",
primary_us_citizen: "no",
primary_visa: "no",
was_full_time_student: "no",
no_life_situations_apply: "yes"
}
Expand All @@ -18,6 +19,7 @@
had_disability: "yes",
was_blind: "yes",
primary_us_citizen: "yes",
primary_visa: "yes",
was_full_time_student: "yes",
no_life_situations_apply: "no",
}
Expand All @@ -31,6 +33,7 @@

expect(intake.had_disability).to eq "no"
expect(intake.primary_us_citizen).to eq "no"
expect(intake.primary_visa).to eq "no"
expect(intake.was_blind).to eq "no"
expect(intake.was_full_time_student).to eq "no"
end
Expand All @@ -42,6 +45,7 @@

expect(intake.had_disability).to eq "yes"
expect(intake.primary_us_citizen).to eq "yes"
expect(intake.primary_visa).to eq "yes"
expect(intake.was_blind).to eq "yes"
expect(intake.was_full_time_student).to eq "yes"
end
Expand Down
4 changes: 4 additions & 0 deletions spec/forms/spouse_life_situations_form_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
spouse_had_disability: "no",
spouse_was_blind: "no",
spouse_us_citizen: "no",
spouse_visa: "no",
spouse_was_full_time_student: "no",
no_life_situations_apply: "yes",
}
Expand All @@ -18,6 +19,7 @@
spouse_had_disability: "yes",
spouse_was_blind: "yes",
spouse_us_citizen: "yes",
spouse_visa: "yes",
spouse_was_full_time_student: "yes",
no_life_situations_apply: "no",
}
Expand All @@ -31,6 +33,7 @@

expect(intake.spouse_had_disability).to eq "no"
expect(intake.spouse_us_citizen).to eq "no"
expect(intake.spouse_visa).to eq "no"
expect(intake.spouse_was_blind).to eq "no"
expect(intake.spouse_was_full_time_student).to eq "no"
end
Expand All @@ -42,6 +45,7 @@

expect(intake.spouse_had_disability).to eq "yes"
expect(intake.spouse_us_citizen).to eq "yes"
expect(intake.spouse_visa).to eq "yes"
expect(intake.spouse_was_blind).to eq "yes"
expect(intake.spouse_was_full_time_student).to eq "yes"
end
Expand Down

0 comments on commit 4c2700e

Please sign in to comment.