From 82f6dab314f114f7736dddde03550df4779b7c4f Mon Sep 17 00:00:00 2001 From: baarkerlounger Date: Fri, 24 Sep 2021 12:38:44 +0100 Subject: [PATCH] Add date template --- README.md | 2 +- app/views/form/_date_question.html.erb | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 app/views/form/_date_question.html.erb diff --git a/README.md b/README.md index f126606b4..d8562ceb8 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ The JSON should follow the structure: snake case question name string: { header: string, hint_text: string, - type: [text / numeric / radio / select ], + type: [text / numeric / radio / select / date ], min: integer, (numeric only), max: integer, (numeric only), step: integer (numeric only), diff --git a/app/views/form/_date_question.html.erb b/app/views/form/_date_question.html.erb new file mode 100644 index 000000000..245565eca --- /dev/null +++ b/app/views/form/_date_question.html.erb @@ -0,0 +1,7 @@ +<%= f.govuk_date_field question_key, + hint: { text: question["hint_text"] }, + legend: { text: question["header"], size: "l"}, + width: 20 +%> +<%= f.hidden_field :previous_page, value: page_key %> +<%= f.hidden_field :case_log_id, value: case_log_id %>