metadata_presenter 3.3.32 → 3.3.33

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: 23806a614439f28197e18973dbfb03d8b6ca9d253b1f4ce91c5147d5414d6be8
4
- data.tar.gz: f85e4aaeffa331703b57051e5e5ffa499286ddfcfa3a261a050ae769a6449121
3
+ metadata.gz: 21f00e0571713d8b74a2883bb464ad8c342502cc6708808a5dfaaea78a9b534c
4
+ data.tar.gz: 5ee73d1243561920fcef19397169ac1225972d2380ee165cb1df557a3afbb53e
5
5
  SHA512:
6
- metadata.gz: 5c05dff8124669e8534f8d0931d8c8a8bf3d2f34bc8518c31768051a7b9c2f24e665015faf37f6de81785600578fe31500dfc805b4949515cc66dbdcf3b27c8c
7
- data.tar.gz: 586ffbb28a70ee0157432317aa73076068766b01566656952fb0437bc2e5e5d0f1fcd56cb32ab2301f59f4bd0ef2760e85d88926e8018d62d337f8b1b9d8780a
6
+ metadata.gz: da292175228fb81f4936fcb2ad4fde0336d5e7b2713960a5ff011fc35b44c5a224eacb7537270befc59bc815e68a07851891e31dae03ea50d7fa6c4afc1f987a
7
+ data.tar.gz: 93ad61db2246bae318c363337337885a7783d14118a6c14c6e096a046d0ce78cefc611e9c71d0ac9536fe79559227f0395456db1b7178e890e98f5204a644873
@@ -4,7 +4,9 @@
4
4
  type="content"
5
5
  default-content="<%= default_text('body') %>"
6
6
  content="<%= page_body_content %>"
7
- data-fb-content-id="<%= "page[body]" %>">
7
+ data-fb-content-id="<%= "page[body]" %>"
8
+ data-editor-label-key="aria.optional_content_label"
9
+ data-editor-description-key="aria.optional_content_description">
8
10
  <div class="html">
9
11
  <%= to_html(page_body_content) %>
10
12
  </div>
@@ -31,9 +31,9 @@
31
31
  'aria-disabled': editable?,
32
32
  label: -> do %>
33
33
  <% if answered?(component.id) && @page_answers.send(component.id)[component.id].compact.count.positive? && !editable? %>
34
- <h3 class="govuk-heading-s govuk-!-margin-top-8"><%= t('presenter.questions.multiupload.add_another') %></h3>
34
+ <h2 class="govuk-heading-s govuk-!-margin-top-8"><%= t('presenter.questions.multiupload.add_another') %></h2>
35
35
  <% else %>
36
- <h3 class="govuk-visually-hidden"><%= t('presenter.questions.multiupload.add_another') %></h3>
36
+ <h2 class="govuk-visually-hidden"><%= t('presenter.questions.multiupload.add_another') %></h2>
37
37
  <% end %>
38
38
  <% end %>
39
39
  </div>
@@ -65,10 +65,12 @@
65
65
  </dl>
66
66
 
67
67
  <% if @page.send_heading.present? %>
68
- <h2 class="fb-send-heading fb-editable govuk-heading-m"
68
+ <h2>
69
+ <span class="fb-send-heading fb-editable govuk-heading-m"
69
70
  data-fb-content-type="element"
70
71
  data-fb-content-id="page[send_heading]">
71
- <%= @page.send_heading %>
72
+ <%= @page.send_heading %>
73
+ </span>
72
74
  </h2>
73
75
  <% end %>
74
76
 
@@ -102,9 +104,10 @@
102
104
  <%end%>
103
105
  <br><br>
104
106
  <div class="govuk-button-group">
105
- <button <%= 'disabled' if editable? %> data-prevent-double-click="true" class="fb-block fb-block-actions govuk-button" data-module="govuk-button" data-block-id="actions" data-block-type="actions">
106
- <%= t('presenter.actions.submit') -%></button>
107
- <% if save_and_return_enabled? %>
107
+ <button <%= 'aria-disabled=true' if editable? %> data-prevent-double-click="true" class="fb-block fb-block-actions govuk-button" data-module="govuk-button" data-block-id="actions" data-block-type="actions">
108
+ <%= t('presenter.actions.submit') -%>
109
+ </button>
110
+ <% if save_and_return_enabled? %>
108
111
  <% if editor_preview? || editable? %>
109
112
  <%= button_to t('presenter.save_and_return.actions.save'), '/', params: { page_slug:request.env['PATH_INFO'] }, method: :post, class: "govuk-button govuk-button--secondary", name: 'save_for_later_check_answers', disabled: true %>
110
113
  <% else %>
@@ -34,9 +34,7 @@
34
34
  data-fb-content-id="page[lede]"
35
35
  data-fb-content-type="element"
36
36
  data-fb-default-text="<%= default_text('lede') %>">
37
- <div class="html">
38
37
  <%= @page.lede %>
39
- </div>
40
38
  </div>
41
39
  <%- end %>
42
40
  </div>
@@ -38,7 +38,7 @@
38
38
  } %>
39
39
 
40
40
  <div class="govuk-button-group">
41
- <%= f.govuk_submit(t('presenter.actions.continue'), disabled: editable?) %>
41
+ <%= f.govuk_submit(t('presenter.actions.continue'), 'aria-disabled': editable?) %>
42
42
  <% if save_and_return_enabled? %>
43
43
  <% if editor_preview? || editable? %>
44
44
  <%= button_to t('presenter.save_and_return.actions.save'), '/', params: { page_slug:request.env['PATH_INFO'] }, method: :post, class: "govuk-button govuk-button--secondary", name: 'save_for_later', disabled: true %>
@@ -29,11 +29,12 @@
29
29
  <% end %>
30
30
  <%# ORIGINAL TEMPLATE: Uses content from form metadata %>
31
31
  <% if @page.heading %>
32
- <h1 class="fb-editable govuk-heading-xl"
32
+ <h1> <span class="fb-editable govuk-heading-xl"
33
33
  data-fb-content-id="page[heading]"
34
34
  data-fb-content-type="element"
35
35
  data-fb-default-value="<%= t("presenter.footer.#{@page.id.gsub('page.','')}.heading") %>">
36
36
  <%= @page.heading %>
37
+ </span>
37
38
  </h1>
38
39
  <% end %>
39
40
  <%= render 'metadata_presenter/attribute/body' %>
@@ -7,7 +7,7 @@
7
7
 
8
8
  <%= form_tag(root_path, method: :post, authenticity_token: false) do %>
9
9
  <%= hidden_field_tag :authenticity_token, form_authenticity_token -%>
10
- <button <%= 'disabled' if editable? %> class='govuk-button govuk-button--start govuk-!-margin-top-2'>
10
+ <button <%= 'aria-disabled=true' if editable? %> class='govuk-button govuk-button--start govuk-!-margin-top-2'>
11
11
  <%= t('presenter.actions.start') -%>
12
12
  <svg class="govuk-button__start-icon" xmlns="http://www.w3.org/2000/svg" width="17.5" height="19" viewBox="0 0 33 40" aria-hidden="true" focusable="false">
13
13
  <path fill="currentColor" d="M0 0h13l20 20-20 20H0l20-20z" />
@@ -1,8 +1,8 @@
1
1
  {
2
- "_id": "page.start",
3
- "_type": "page.start",
4
- "heading": "Service name goes here",
5
- "body": "Use this service to apply for a service or contact us about a case.\r\n\r\n## Before you start\r\nYou will need:\r\n\r\n* your 8-digit reference number\r\n* a copy of your photo ID\r\n* something else\r\n\r\nThis form will take around 5 minutes to complete. We will reply within 10 working days.",
6
- "before_you_start": "## Other ways to get in touch\r\nYou can also apply or contact us about your case by:\r\n\r\n* telephone: 01234 567889\r\n* email: <example.service@justice.gov.uk>\r\n\r\nThis form is also [available in Welsh (Cymraeg)](https://example-service.form.service.justice.gov.uk/).",
7
- "url": "/"
2
+ "_id": "page.start",
3
+ "_type": "page.start",
4
+ "heading": "Service name goes here",
5
+ "body": "Use this service to apply for a service or contact us about a case.\r\n\r\n## Before you start\r\nYou will need:\r\n\r\n* your 8-digit reference number\r\n* a copy of your photo ID\r\n* something else\r\n\r\nThis form will take around 5 minutes to complete. We will reply within 10 working days.",
6
+ "before_you_start": "## Other ways to get in touch\r\nYou can also apply or contact us about your case by:\r\n\r\n* telephone: 01234 567889\r\n* email: <example.service@justice.gov.uk>\r\n\r\nThis form is also [available in Welsh (Cymraeg)](https://example-service.form.service.justice.gov.uk/).",
7
+ "url": "/"
8
8
  }
@@ -1,3 +1,3 @@
1
1
  module MetadataPresenter
2
- VERSION = '3.3.32'.freeze
2
+ VERSION = '3.3.33'.freeze
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: 3.3.32
4
+ version: 3.3.33
5
5
  platform: ruby
6
6
  authors:
7
7
  - MoJ Forms
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-04-15 00:00:00.000000000 Z
11
+ date: 2024-04-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: govuk_design_system_formbuilder