metadata_presenter 3.0.9 → 3.0.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4707a8149a16ec6f2af41240c4a7936d08ac6f25a49cbff290ec747c1a46ac92
4
- data.tar.gz: e37067b5f6aa11f626f0c0582a1d85be0157e91186494f0dc4ca175f8761d94a
3
+ metadata.gz: 389729e912cd5277a660000405109428be2ea63c713d9449304dda697bcf98ee
4
+ data.tar.gz: 7814a9d64da8ce3aa2f51b83c84c2e4f4a600bc2e54e52b8ca8f1f6dfa6df252
5
5
  SHA512:
6
- metadata.gz: 5d76603a7b91992dc3f0ea705b01bfbcab88f71845c5e6ad523655fa1d45199ac79a7ab666bbf024d471d13da16ea34fe8779b8e8a7de2e6fef3f8c3b0d089b2
7
- data.tar.gz: 4156bb315d1331305d46a8397b3456dda4e21004c590e121f0b4c3c17ca7659f7d6c73d7a5f503e90e6a6aa0aeaa3f9f5cb1fba4355af60c6c7c07688a8169cc
6
+ metadata.gz: 7e72e24402858714993ab7cc42dacc9eff8dea05fdc7e259cdd625392bf937bf4268b805f32a1cf75fb01421aa2d47aeca6e220df284c0be6dfcac8fe28237a7
7
+ data.tar.gz: 6dd35b50080703c7336e6a3f803ceb09b1d2d4735e0cada633b8c07aab71d5b37c6ed01edfac8ed07dc63c3ed3d8ed663c3a8db77c4bd81adb2a6fa86bef9b53
@@ -24,7 +24,7 @@
24
24
  </head>
25
25
 
26
26
  <body class="govuk-template__body">
27
- <script>
27
+ <script nonce=<%= request.content_security_policy_nonce %>>
28
28
  document.body.className = ((document.body.className) ? document.body.className + ' js-enabled' : 'js-enabled');
29
29
  </script>
30
30
 
@@ -1,7 +1,7 @@
1
1
  <!-- Form Owner Google Analytics 4 -->
2
2
  <% if Rails.application.config.respond_to?(:global_ga4) %>
3
3
  <%# Global Google Analytics (GA4) should be included before this point so we only need a config setting %>
4
- <script>
4
+ <script nonce=<%= request.content_security_policy_nonce %>>
5
5
  gtag('config', '<%= measurement_id %>');
6
6
  </script>
7
7
  <% end %>
@@ -1,6 +1,6 @@
1
1
  <!-- Global MoJ Forms site tag (gtag.js) - Google Analytics 4 -->
2
2
  <script async src="https://www.googletagmanager.com/gtag/js?id=#{global_measurement_id}"></script>
3
- <script>
3
+ <script nonce=<%= request.content_security_policy_nonce %>>
4
4
  var manual_global_analytics_properties = {
5
5
  <%= yield :manual_global_analytics_properties %>
6
6
  }
@@ -1,5 +1,5 @@
1
1
  <!-- Google Tag Manager for Form Owner -->
2
- <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
2
+ <script nonce=<%= request.content_security_policy_nonce %>>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
3
3
  new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
4
4
  j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
5
5
  'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
@@ -1,5 +1,5 @@
1
1
  <!-- Google Universal Analytics for Form Owner -->
2
- <script>
2
+ <script nonce=<%= request.content_security_policy_nonce %>>
3
3
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
4
4
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
5
5
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
@@ -3,7 +3,11 @@
3
3
  <div class="govuk-grid-column-two-thirds">
4
4
 
5
5
  <% if @page.id == 'page.cookies' %>
6
-
6
+ <% if editable? %>
7
+ <%= govuk_notification_banner(title_text: t('notification_banners.important')) do |nb|
8
+ nb.with_heading(text: t('notification_banners.cookies.heading'))
9
+ end %>
10
+ <% end %>
7
11
  <%# TEMPORARY WORKAROUND: Centralise Cookie page content %>
8
12
  <h1 class="govuk-heading-xl">
9
13
  <%= t('presenter.footer.cookies.heading') %>
@@ -14,13 +18,21 @@
14
18
  </div>
15
19
 
16
20
  <% else %>
17
-
21
+ <% if editable? %>
22
+ <%= govuk_notification_banner(title_text: t('notification_banners.important')) do |nb|
23
+ nb.with_heading(
24
+ text: t("notification_banners.#{@page.id.gsub('page.','')}.heading"),
25
+ link_text: t("notification_banners.#{@page.id.gsub('page.','')}.link_text"),
26
+ link_href: t("notification_banners.#{@page.id.gsub('page.','')}.link_href")
27
+ )
28
+ end %>
29
+ <% end %>
18
30
  <%# ORIGINAL TEMPLATE: Uses content from form metadata %>
19
31
  <% if @page.heading %>
20
32
  <h1 class="fb-editable govuk-heading-xl"
21
33
  data-fb-content-id="page[heading]"
22
34
  data-fb-content-type="element"
23
- data-fb-default-value="<%= t("presenter.footer.#{@page.id.gsub!('page.','')}.heading") %>">
35
+ data-fb-default-value="<%= t("presenter.footer.#{@page.id.gsub('page.','')}.heading") %>">
24
36
  <%= @page.heading %>
25
37
  </h1>
26
38
  <% end %>
@@ -1,3 +1,3 @@
1
1
  module MetadataPresenter
2
- VERSION = '3.0.9'.freeze
2
+ VERSION = '3.0.11'.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.0.9
4
+ version: 3.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - MoJ Forms
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-29 00:00:00.000000000 Z
11
+ date: 2023-07-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: govuk_design_system_formbuilder