From e8cd7061a34f631478210381763dd8040d710904 Mon Sep 17 00:00:00 2001 From: Theodor Vararu Date: Fri, 27 Sep 2024 18:30:51 +0300 Subject: [PATCH] Maintain user's choice of school in consent form When we switched away from `options_for_select` in order to use data-hint, we forgot to maintain this functionality. --- app/views/parent_interface/consent_forms/edit/school.html.erb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/views/parent_interface/consent_forms/edit/school.html.erb b/app/views/parent_interface/consent_forms/edit/school.html.erb index 03417a9cc..7ee7c0a8b 100644 --- a/app/views/parent_interface/consent_forms/edit/school.html.erb +++ b/app/views/parent_interface/consent_forms/edit/school.html.erb @@ -23,6 +23,7 @@ <% @consent_form.eligible_schools.each do |school| %> <%= tag.option(school.name, value: school.id, + selected: school.id == @consent_form.location_id, data: { hint: school.address_parts.join(", ") }) %> <% end %> <% end %>