metadata_presenter 3.4.24 → 3.4.27

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: 7d0b4d65bc5bf83fb33ecad68441a085d53826129580a4f1ef063233c0956517
4
- data.tar.gz: b04b0a08e6f81e67fa232b149ea958f80928415f40dc5977638a8ebc3069b5dc
3
+ metadata.gz: 90f44c80139e58eb40589f918ce07be33462b017c76612eb89f115b2adfa60be
4
+ data.tar.gz: ffc7d6295e7127199e981f9d827222894231ed711920dac57c67a5efac81a931
5
5
  SHA512:
6
- metadata.gz: dfa55f8125a5a61379639fb15282970dda6c23bad1f84499f55bf67d7757928982e186f35c35621b7b7558d9a138c0895f5887d331f646e3c725d490d64aed2e
7
- data.tar.gz: 8a83c6f4dc92fb2d25cf0fa83ca447dcf93c11195db2774baf79d2b02847107ca8ea3a9e486343fa0d7ee76579f374ac9999204197df2edef158e70bce6b917e
6
+ metadata.gz: 33cc2e4b276c3f49bbaaf6c72c417088eaceac09c18d1f74ee58016501087dd2fb64c03bdfa1074fd69a50fc2ee8997a627d15bdbd23008799c4851a9763b9d3
7
+ data.tar.gz: ee18d6080dc2ac7146f31b7c7ded3a6195ad4a048972c24f584e8607cb5afbe7d17e885406c9134409ea2c81e04b6708053ba07bfdff698b9240a2daed36c90c
@@ -212,6 +212,12 @@ module MetadataPresenter
212
212
  URI(request.original_url).path.split('/').include?('preview')
213
213
  end
214
214
 
215
+ def set_caching_header
216
+ response.headers['Cache-Control'] = 'no-store, no-cache, must-revalidate'
217
+ response.headers['Pragma'] = 'no-cache'
218
+ response.headers['Expires'] = '0'
219
+ end
220
+
215
221
  def single_page_preview?
216
222
  return false if in_runner?
217
223
  return true if request.referrer.blank?
@@ -64,13 +64,5 @@ module MetadataPresenter
64
64
  end
65
65
  end
66
66
  helper_method :form_page_title
67
-
68
- private
69
-
70
- def set_caching_header
71
- response.headers['Cache-Control'] = 'no-store, no-cache, must-revalidate'
72
- response.headers['Pragma'] = 'no-cache'
73
- response.headers['Expires'] = '0'
74
- end
75
67
  end
76
68
  end
@@ -1,7 +1,7 @@
1
1
  module MetadataPresenter
2
2
  class SaveAndReturnController < EngineController
3
3
  include Concerns::SaveAndReturn
4
-
4
+ before_action :set_caching_header
5
5
  helper_method :secret_questions, :confirmed_email
6
6
 
7
7
  def show
@@ -63,7 +63,6 @@ module MetadataPresenter
63
63
 
64
64
  payload = response.body.merge(email: @email_confirmation.email_confirmation).deep_symbolize_keys
65
65
  create_save_and_return_submission(payload)
66
-
67
66
  redirect_to '/save/progress_saved'
68
67
  else
69
68
  render :email_confirmation, status: :unprocessable_entity
@@ -8,10 +8,12 @@
8
8
 
9
9
  <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
10
10
  <meta name="robots" content="noindex">
11
- <link rel="icon" sizes="48x48" href="<%= asset_pack_url('static/favicon.ico') %>" type="image/x-icon">
12
- <link rel="icon" sizes="any" href="<%= asset_pack_url('static/favicon.svg') %>" type="image/svg+xml">
13
- <link rel="mask-icon" href="<%= asset_pack_url('static/govuk-icon-mask.svg') %>" color="#1d70b8">
14
- <link rel="apple-touch-icon" href="<%= asset_pack_url('static/govuk-icon-180.png') %>">
11
+ <link rel="shortcut icon" sizes="16x16 32x32 48x48" href="<%= asset_pack_url('static/favicon.ico') %>" type="image/x-icon" />
12
+ <link rel="mask-icon" href="<%= asset_pack_url('static/govuk-mask-icon.svg') %>" color="blue">
13
+ <link rel="apple-touch-icon" sizes="180x180" href="<%= asset_pack_url('static/govuk-apple-touch-icon-180x180.png') %>">
14
+ <link rel="apple-touch-icon" sizes="167x167" href="<%= asset_pack_url('static/govuk-apple-touch-icon-167x167.png') %>">
15
+ <link rel="apple-touch-icon" sizes="152x152" href="<%= asset_pack_url('static/govuk-apple-touch-icon-152x152.png') %>">
16
+ <link rel="apple-touch-icon" href="<%= asset_pack_url('static/govuk-apple-touch-icon.png') %>">
15
17
 
16
18
  <%= javascript_pack_tag 'runner_application', 'govuk', defer: true %>
17
19
  <%= stylesheet_pack_tag 'govuk', 'runner_application', media: 'all' %>
@@ -23,7 +25,7 @@
23
25
 
24
26
  <body class="govuk-template__body">
25
27
  <script nonce=<%= request.content_security_policy_nonce %>>
26
- document.body.className += ' js-enabled' + ('noModule' in HTMLScriptElement.prototype ? ' govuk-frontend-supported' : '');
28
+ document.body.className = ((document.body.className) ? document.body.className + ' js-enabled' : 'js-enabled');
27
29
  </script>
28
30
 
29
31
 
@@ -13,7 +13,7 @@
13
13
  </span>
14
14
  </div>
15
15
  <div class="govuk-footer__meta-item">
16
- <a class="govuk-footer__link govuk-footer__copyright-logo"
16
+ <a class="govuk-footer__link fb-govuk-footer__copyright-logo"
17
17
  href="https://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/uk-government-licensing-framework/crown-copyright/">
18
18
  <%= t('presenter.meta.copyright') %>
19
19
  </a>
@@ -5,46 +5,31 @@
5
5
  <header class="govuk-header" role="banner" data-module="govuk-header">
6
6
  <div class="govuk-header__container govuk-width-container">
7
7
  <div class="govuk-header__logo">
8
- <a href="<%= t('presenter.header.govuk_url') %>" class="govuk-header__homepage-link">
9
- <svg
10
- focusable="false"
11
- role="img"
12
- xmlns="http://www.w3.org/2000/svg"
13
- viewBox="0 0 324 60"
14
- height="30"
15
- width="162"
16
- fill="currentColor"
17
- class="govuk-header__logotype"
18
- aria-label="GOV.UK"
19
- >
20
- <title>GOV.UK</title>
21
- <g>
22
- <circle cx="20" cy="17.6" r="3.7"></circle>
23
- <circle cx="10.2" cy="23.5" r="3.7"></circle>
24
- <circle cx="3.7" cy="33.2" r="3.7"></circle>
25
- <circle cx="31.7" cy="30.6" r="3.7"></circle>
26
- <circle cx="43.3" cy="17.6" r="3.7"></circle>
27
- <circle cx="53.2" cy="23.5" r="3.7"></circle>
28
- <circle cx="59.7" cy="33.2" r="3.7"></circle>
29
- <circle cx="31.7" cy="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2.3-4.1-6.1-4.1-6.1h10.6,0Z"></path>
31
- </g>
32
- <circle class="govuk-logo-dot" cx="227" cy="36" r="7.3"></circle>
33
- <path d="M93.94 41.25c.4 1.81 1.2 3.21 2.21 4.62 1 1.4 2.21 2.41 3.61 3.21s3.21 1.2 5.22 1.2 3.61-.4 4.82-1c1.4-.6 2.41-1.4 3.21-2.41.8-1 1.4-2.01 1.61-3.01s.4-2.01.4-3.01v.14h-10.86v-7.02h20.07v24.08h-8.03v-5.56c-.6.8-1.38 1.61-2.19 2.41-.8.8-1.81 1.2-2.81 1.81-1 .4-2.21.8-3.41 1.2s-2.41.4-3.81.4a18.56 18.56 0 0 1-14.65-6.63c-1.6-2.01-3.01-4.41-3.81-7.02s-1.4-5.62-1.4-8.83.4-6.02 1.4-8.83a20.45 20.45 0 0 1 19.46-13.65c3.21 0 4.01.2 5.82.8 1.81.4 3.61 1.2 5.02 2.01 1.61.8 2.81 2.01 4.01 3.21s2.21 2.61 2.81 4.21l-7.63 4.41c-.4-1-1-1.81-1.61-2.61-.6-.8-1.4-1.4-2.21-2.01-.8-.6-1.81-1-2.81-1.4-1-.4-2.21-.4-3.61-.4-2.01 0-3.81.4-5.22 1.2-1.4.8-2.61 1.81-3.61 3.21s-1.61 2.81-2.21 4.62c-.4 1.81-.6 3.71-.6 5.42s.8 5.22.8 5.22Zm57.8-27.9c3.21 0 6.22.6 8.63 1.81 2.41 1.2 4.82 2.81 6.62 4.82S170.2 24.39 171 27s1.4 5.62 1.4 8.83-.4 6.02-1.4 8.83-2.41 5.02-4.01 7.02-4.01 3.61-6.62 4.82-5.42 1.81-8.63 1.81-6.22-.6-8.63-1.81-4.82-2.81-6.42-4.82-3.21-4.41-4.01-7.02-1.4-5.62-1.4-8.83.4-6.02 1.4-8.83 2.41-5.02 4.01-7.02 4.01-3.61 6.42-4.82 5.42-1.81 8.63-1.81Zm0 36.73c1.81 0 3.61-.4 5.02-1s2.61-1.81 3.61-3.01 1.81-2.81 2.21-4.41c.4-1.81.8-3.61.8-5.62 0-2.21-.2-4.21-.8-6.02s-1.2-3.21-2.21-4.62c-1-1.2-2.21-2.21-3.61-3.01s-3.21-1-5.02-1-3.61.4-5.02 1c-1.4.8-2.61 1.81-3.61 3.01s-1.81 2.81-2.21 4.62c-.4 1.81-.8 3.61-.8 5.62 0 2.41.2 4.21.8 6.02.4 1.81 1.2 3.21 2.21 4.41s2.21 2.21 3.61 3.01c1.4.8 3.21 1 5.02 1Zm36.32 7.96-12.24-44.15h9.83l8.43 32.77h.4l8.23-32.77h9.83L200.3 58.04h-12.24Zm74.14-7.96c2.18 0 3.51-.6 3.51-.6 1.2-.6 2.01-1 2.81-1.81s1.4-1.81 1.81-2.81a13 13 0 0 0 .8-4.01V13.9h8.63v28.15c0 2.41-.4 4.62-1.4 6.62-.8 2.01-2.21 3.61-3.61 5.02s-3.41 2.41-5.62 3.21-4.62 1.2-7.02 1.2-5.02-.4-7.02-1.2c-2.21-.8-4.01-1.81-5.62-3.21s-2.81-3.01-3.61-5.02-1.4-4.21-1.4-6.62V13.9h8.63v26.95c0 1.61.2 3.01.8 4.01.4 1.2 1.2 2.21 2.01 2.81.8.8 1.81 1.4 2.81 1.81 0 0 1.34.6 3.51.6Zm34.22-36.18v18.92l15.65-18.92h10.82l-15.03 17.32 16.03 26.83h-10.21l-11.44-20.21-5.62 6.22v13.99h-8.83V13.9"></path>
34
- </svg>
8
+ <a href="<%= t('presenter.header.govuk_url') %>" class="govuk-header__link govuk-header__link--homepage">
9
+ <span class="govuk-header__logotype">
10
+ <svg
11
+ aria-hidden="true"
12
+ focusable="false"
13
+ class="govuk-header__logotype-crown"
14
+ xmlns="http://www.w3.org/2000/svg"
15
+ viewBox="0 0 32 30"
16
+ height="30"
17
+ width="32"
18
+ >
19
+ <path
20
+ fill="currentColor" fill-rule="evenodd"
21
+ d="M22.6 10.4c-1 .4-2-.1-2.4-1-.4-.9.1-2 1-2.4.9-.4 2 .1 2.4 1s-.1 2-1 2.4m-5.9 6.7c-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-1.1 0-2.1-.2-3.2-1.4l.4 4.3c1-1.4 2.2-2 2.9-1.9-.1 1.5-.2 3.4-2.9 3.6-1.9.2-3.4-.8-3.5-1.9-.2-1.3 1-2.2 1.9-.8.7-2.3-1.2-3-2.5-1.6.9-2.2.9-3.9-1.2-5.5-1.5 2-1.3 3.7.6 5.6-1.2-.7-3.1 0-2 2.3.6-1.4 1.8-1.1 2.1.1.2.9-.3 1.9-1.5 2.1-.9.2-2.4-.5-3.5-3 .6 0 1.2.3 2 .9l-1.2-4c-.3 1.1-.7 1.9-1.1 2.3-.3-.8-.2-1.4 0-2.7l-2.9.9C1.3 23 2.6 25.5 3.7 30c3.7-.5 7.9-.8 12.3-.8"></path>
22
+ </svg>
23
+ <span class="govuk-header__logotype-text">
24
+ GOV.UK
25
+ </span>
26
+ </span>
35
27
  </a>
36
28
  </div>
29
+ <% if service.service_name.present? %>
30
+ <div class="govuk-header__content">
31
+ <%= link_to service.service_name, start_page_url, class: %w[govuk-header__link govuk-header__service-name] %>
32
+ </div>
33
+ <% end %>
37
34
  </div>
38
35
  </header>
39
-
40
- <% if service.service_name.present? %>
41
- <section aria-label="<%= t('presenter.header.service_information', default: 'Service information') %>" class="govuk-service-navigation" data-module="govuk-service-navigation">
42
- <div class="govuk-width-container">
43
- <div class="govuk-service-navigation__container">
44
- <span class="govuk-service-navigation__service-name">
45
- <%= link_to service.service_name, start_page_url, class: 'govuk-service-navigation__link' %>
46
- </span>
47
- </div>
48
- </div>
49
- </section>
50
- <% end %>
@@ -2,7 +2,7 @@
2
2
  <div class="govuk-grid-row">
3
3
  <div class="govuk-grid-column-two-thirds">
4
4
  <%= link_to t('presenter.back'), :back, class: "govuk-back-link" %>
5
- <%= form_for @email_confirmation do |f| %>
5
+ <%= form_for @email_confirmation, html: {autocomplete: "off"} do |f| %>
6
6
  <%= f.govuk_error_summary(t('presenter.errors.summary_heading')) %>
7
7
  <div class="govuk-form-group">
8
8
  <%=
@@ -1,7 +1,7 @@
1
1
  <div class="fb-main-grid-wrapper">
2
2
  <div class="govuk-grid-row">
3
3
  <div class="govuk-grid-column-two-thirds">
4
- <%= form_for @saved_form do |f| %>
4
+ <%= form_for @saved_form, html: {autocomplete: "off"} do |f| %>
5
5
  <%= f.govuk_error_summary(t('presenter.errors.summary_heading')) %>
6
6
 
7
7
  <h1 id="page-heading" class="govuk-heading-xl"><%= t('presenter.save_and_return.show.heading') %></h1>
@@ -1,3 +1,3 @@
1
1
  module MetadataPresenter
2
- VERSION = '3.4.24'.freeze
2
+ VERSION = '3.4.27'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metadata_presenter
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.4.24
4
+ version: 3.4.27
5
5
  platform: ruby
6
6
  authors:
7
7
  - MoJ Forms