metadata_presenter 0.16.1 → 0.16.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5a8b044a284008931b778a50a1940563f749100928b63e7bd524fee9d084f636
4
- data.tar.gz: 59c2ce2dd991b6626a5e31064e6e0e7467987ce0eb378de628a98e08d33f44ba
3
+ metadata.gz: '09f9fc6e7ed4404617573ba3531101418a53dc43b731dbbd92faeeb95325db28'
4
+ data.tar.gz: ecf8c3777cebe819ce26bc3bd7ba69dce8b8de1bb5ae450658355935a2e69d9a
5
5
  SHA512:
6
- metadata.gz: d3b9083adba3e4c7a4c5391c89cb3da1b7f77cbfb08f308a1a2ec902072c02f22e07e53f6f4fbf3f3c3cf2d2afce5911230ba010c05454126706c5ed0797545a
7
- data.tar.gz: c54ca229a2a4af58d4a7fc07f6943cef91bfe327912e35afcbd79e4dbde04d0efd70f0abfd61da8261c1343a5fc9e7c1ab5fc427abd8d0fa0aff240139042ebb
6
+ metadata.gz: 2bf80b5fb3e1d6f0eaed3baa06626d72ebdd4f8e379e332ede82578140b580b7901cd961a0544e63726ed1c9a6d9aaa52af26f4829730fc23e9df6c78c2a950e
7
+ data.tar.gz: f815e89fcf290f637a7ee38da32a0957bb097f7fe25ffd83612152f8dd70fd3aed8d8d9a00eb18b444399b9f3fe01f60a0295547dc50fd2cc9b4d1a7075b1783
@@ -2,10 +2,8 @@ module MetadataPresenter
2
2
  module ApplicationHelper
3
3
  def main_title(component:, tag: :h1, classes: 'govuk-heading-xl')
4
4
  if component.legend.present?
5
- content_tag(:legend, class: 'govuk-fieldset__legend govuk-fieldset__legend--l') do
6
- content_tag(tag, class: classes) do
7
- component.legend
8
- end
5
+ content_tag(:h1, class: 'govuk-heading-xl') do
6
+ component.legend
9
7
  end
10
8
  else
11
9
  content_tag(tag, class: classes) do
@@ -1,8 +1,6 @@
1
- <div class="fb-editable" data-fb-content-type="<%= component._type %>" data-fb-content-id="<%= component_id %>" data-fb-content-data="<%= component.to_json %>">
2
- <%=
3
- f.govuk_text_field component.id.to_sym,
4
- label: { text: input_title },
5
- hint: { text: component.hint },
6
- name: "answers[#{component.name}]"
7
- %>
8
- </div>
1
+ <%=
2
+ f.govuk_text_field component.id.to_sym,
3
+ label: { text: input_title },
4
+ hint: { text: component.hint },
5
+ name: "answers[#{component.name}]"
6
+ %>
@@ -1,12 +1,10 @@
1
- <div class="fb-editable" data-fb-content-type="<%= component._type %>" data-fb-content-id="<%= component_id %>" data-fb-content-data="<%= component.to_json %>">
2
- <%=
3
- f.govuk_text_area component.id.to_sym,
4
- label: { text: input_title },
5
- hint: { text: component.hint },
6
- name: "answers[#{component.name}]",
7
- max_chars: component.maxchars,
8
- max_words: component.maxwords,
9
- threshold: component.threshold,
10
- rows: component.rows
11
- %>
12
- </div>
1
+ <%=
2
+ f.govuk_text_area component.id.to_sym,
3
+ label: { text: input_title },
4
+ hint: { text: component.hint },
5
+ name: "answers[#{component.name}]",
6
+ max_chars: component.maxchars,
7
+ max_words: component.maxwords,
8
+ threshold: component.threshold,
9
+ rows: component.rows
10
+ %>
@@ -3,13 +3,18 @@
3
3
  <div class="govuk-grid-column-two-thirds">
4
4
  <%= form_for @page_answers, as: :answers, url: @page.url, method: :post do |f| %>
5
5
  <%= f.govuk_error_summary %>
6
+
6
7
  <% @page.components.each_with_index do |component, index| %>
7
- <%= render partial: component, locals: {
8
- component: component,
9
- component_id: "page[components[#{index}]]",
10
- f: f,
11
- input_title: main_title(component: component) }
12
- %>
8
+ <div class="fb-editable"
9
+ data-fb-content-type="<%= component._type %>"
10
+ data-fb-content-id="<%= "page[components[#{index}]]" %>"
11
+ data-fb-content-data="<%= component.to_json %>">
12
+ <%= render partial: component, locals: {
13
+ component: component,
14
+ f: f,
15
+ input_title: main_title(component: component) }
16
+ %>
17
+ </div>
13
18
  <% end %>
14
19
 
15
20
  <%= f.govuk_submit(disabled: editable?) %>
@@ -1,3 +1,3 @@
1
1
  module MetadataPresenter
2
- VERSION = '0.16.1'
2
+ VERSION = '0.16.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metadata_presenter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.1
4
+ version: 0.16.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - MoJ Online
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-09 00:00:00.000000000 Z
11
+ date: 2021-03-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails