From 48a956c0581fa8a8a7d003619a121089588acc2f Mon Sep 17 00:00:00 2001 From: Manny Dinssa <44172848+Dinssa@users.noreply.github.com> Date: Tue, 11 Mar 2025 08:21:44 +0000 Subject: [PATCH] Calculate legend size of date question --- app/views/form/_date_question.html.erb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/form/_date_question.html.erb b/app/views/form/_date_question.html.erb index 55193b01a..a1df5f4d5 100644 --- a/app/views/form/_date_question.html.erb +++ b/app/views/form/_date_question.html.erb @@ -1,9 +1,10 @@ <%= render partial: "form/guidance/#{question.top_guidance_partial}" if question.top_guidance? %> +<% legend = legend(question, page_header, conditional) %> <%= render partial: "components/date_picker", locals: { resource: @log, question_id: question.id, - legend: { text: legend(question, page_header, conditional)[:text], size: "l", caption: caption(caption_text, page_header, conditional) }, + legend: { text: legend[:text], size: legend[:size], caption: caption(caption_text, page_header, conditional) }, resource_type: @log.log_type, hint: (question.hint_text.blank? ? "" : (question.hint_text.html_safe + "

".html_safe)) + "For example, #{date_mid_collection_year_formatted(@log.startdate).tr(' ', '/')}", f:,