|
|
|
@ -69,11 +69,12 @@ class Form::Question |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
def update_answer_link_name(case_log) |
|
|
|
def update_answer_link_name(case_log) |
|
|
|
if type == "checkbox" |
|
|
|
link_type = if type == "checkbox" |
|
|
|
answer_options.keys.any? { |key| case_log[key] == "Yes" } ? "Change<span class=\"govuk-visually-hidden\"> #{check_answer_label.to_s.downcase}</span>".html_safe : "Answer<span class=\"govuk-visually-hidden\"> #{check_answer_label.to_s.downcase}</span>".html_safe |
|
|
|
answer_options.keys.any? { |key| case_log[key] == "Yes" } ? "Change" : "Answer" |
|
|
|
else |
|
|
|
else |
|
|
|
case_log[id].blank? ? "Answer<span class=\"govuk-visually-hidden\"> #{check_answer_label.to_s.downcase}</span>".html_safe : "Change<span class=\"govuk-visually-hidden\"> #{check_answer_label.to_s.downcase}</span>".html_safe |
|
|
|
case_log[id].blank? ? "Answer" : "Change" |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
"#{link_type}<span class=\"govuk-visually-hidden\"> #{check_answer_label.to_s.downcase}</span>".html_safe |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
def completed?(case_log) |
|
|
|
def completed?(case_log) |
|
|
|
|