def update
model = @consent_form
model.wizard_step = current_step
assign_attributes_for_current_step(model)
if current_step == :parent
if @consent_form.parental_responsibility == "no"
redirect_to cannot_consent_responsibility_parent_interface_consent_form_path(
@consent_form
) and return
end
if skip_to_confirm? && @consent_form.parent_phone_changed? &&
@consent_form.parent_phone.present?
jump_to("contact-method", skip_to_confirm: true)
end
elsif is_reason_for_refusal_step?
@consent_form.reset_follow_up_requested
elsif is_injection_alternative_step?
@consent_form.update_injection_alternative
@consent_form.seed_health_questions
elsif is_without_gelatine_step?
@consent_form.update_without_gelatine
@consent_form.seed_health_questions
elsif is_response_step?
@consent_form.update_programme_responses
@consent_form.seed_health_questions
elsif ethnicity_flow_complete?
handle_ethnicity_completion!(model)
return
end
reload_steps
skip_to_confirm_or_next_health_question
render_wizard model, context:
end