12
12
< div class ="question-with-follow-up__question ">
13
13
< div class ="white-group ">
14
14
<% if current_intake . filing_status_mfj? %>
15
+ <% are_filers_under_65 = !( current_intake . primary_senior? && current_intake . spouse_senior? ) %>
16
+ <% primary_data_followup = are_filers_under_65 ? "#primary-disability-proof" : nil %>
17
+ <% spouse_data_followup = are_filers_under_65 ? "#spouse-disability-proof" : nil %>
18
+ <% both_data_followup = are_filers_under_65 ? "#both-disability-proof" : nil %>
19
+
15
20
<%= f . cfa_radio_set ( :mfj_disability , collection : [
16
- { value : "me " , label : t ( ".yes_me" ) , input_html : { "data-follow-up" : "#disability-proof" } } ,
17
- { value : "spouse" , label : t ( ".yes_spouse" ) , input_html : { "data-follow-up" : "#disability-proof" } } ,
18
- { value : "both" , label : t ( ".yes_both" ) , input_html : { "data-follow-up" : "#disability-proof" } } ,
21
+ { value : "primary " , label : t ( ".yes_me" ) , input_html : { "data-follow-up" : primary_data_followup } } ,
22
+ { value : "spouse" , label : t ( ".yes_spouse" ) , input_html : { "data-follow-up" : spouse_data_followup } } ,
23
+ { value : "both" , label : t ( ".yes_both" ) , input_html : { "data-follow-up" : both_data_followup } } ,
19
24
{ value : "none" , label : t ( ".no_neither" ) }
20
25
] ) %>
21
26
<% else %>
27
+ <% primary_data_followup = !current_intake . primary_senior? ? "#primary-disability-proof" : nil %>
22
28
<%= f . cfa_radio_set ( :primary_disabled , collection : [
23
- { value : "yes" , label : t ( "general.affirmative" ) , input_html : { "data-follow-up" : "#disability-proof" } } ,
29
+ { value : "yes" , label : t ( "general.affirmative" ) , input_html : { "data-follow-up" : primary_data_followup } } ,
24
30
{ value : "no" , label : t ( "general.negative" ) }
25
31
] , legend_class : "sr-only" ) %>
26
32
<% end %>
27
33
</ div >
28
34
</ div >
29
35
30
- < div class ="question-with-follow-up__follow-up " id ="disability-proof ">
36
+ < div class ="question-with-follow-up__follow-up " id ="primary-disability-proof ">
37
+ < div class ="white-group ">
38
+ <%= f . cfa_radio_set ( :primary_proof_of_disability_submitted , label_text : t ( ".primary_proof_question_html" ) , collection : [
39
+ { value : "yes" , label : t ( "general.affirmative" ) } ,
40
+ { value : "no" , label : t ( "general.negative" ) } ,
41
+ ] ) %>
42
+ </ div >
43
+ </ div >
44
+
45
+ < div class ="question-with-follow-up__follow-up " id ="spouse-disability-proof ">
46
+ < div class ="white-group ">
47
+ <%= f . cfa_radio_set ( :spouse_proof_of_disability_submitted , label_text : t ( ".spouse_proof_question_html" ) , collection : [
48
+ { value : "yes" , label : t ( "general.affirmative" ) } ,
49
+ { value : "no" , label : t ( "general.negative" ) } ,
50
+ ] ) %>
51
+ </ div >
52
+ </ div >
53
+
54
+ < div class ="question-with-follow-up__follow-up " id ="both-disability-proof ">
31
55
< div class ="white-group ">
32
- <%= f . cfa_radio_set ( :proof_of_disability_submitted , label_text : t ( ".proof_question" ) , collection : [
56
+ <%= f . cfa_radio_set ( :primary_proof_of_disability_submitted , label_text : t ( ".primary_proof_question_html" ) , collection : [
57
+ { value : "yes" , label : t ( "general.affirmative" ) } ,
58
+ { value : "no" , label : t ( "general.negative" ) } ,
59
+ ] ) %>
60
+ </ div >
61
+
62
+ < div class ="white-group ">
63
+ <%= f . cfa_radio_set ( :spouse_proof_of_disability_submitted , label_text : t ( ".spouse_proof_question_html" ) , collection : [
33
64
{ value : "yes" , label : t ( "general.affirmative" ) } ,
34
65
{ value : "no" , label : t ( "general.negative" ) } ,
35
66
] ) %>
49
80
<% end %>
50
81
<%= f . continue %>
51
82
<% end %>
52
- <% end %>
83
+ <% end %>
0 commit comments