diff --git a/README.md b/README.md index 4fea5097e..f75b018c9 100644 --- a/README.md +++ b/README.md @@ -107,6 +107,7 @@ The JSON should follow the structure: "sections": { "[snake_case_section_name_string]": { "label": String, + "description": String, "subsections": { "[snake_case_subsection_name_string]": { "label": String, diff --git a/app/models/form/section.rb b/app/models/form/section.rb index 477fc9f18..b99325f90 100644 --- a/app/models/form/section.rb +++ b/app/models/form/section.rb @@ -1,9 +1,10 @@ class Form::Section - attr_accessor :id, :label, :subsections, :form + attr_accessor :id, :label, :description, :subsections, :form def initialize(id, hsh, form) @id = id @label = hsh["label"] + @description = hsh["description"] @form = form @subsections = hsh["subsections"].map { |s_id, s| Form::Subsection.new(s_id, s, self) } end diff --git a/app/views/case_logs/_tasklist.html.erb b/app/views/case_logs/_tasklist.html.erb index 85a8d6349..8d20a0cee 100644 --- a/app/views/case_logs/_tasklist.html.erb +++ b/app/views/case_logs/_tasklist.html.erb @@ -6,6 +6,9 @@ <%= section.label %> + <% if section.description %> +

<%= section.description.html_safe %>

+ <% end %>