metadata_presenter 3.2.8 → 3.2.10

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: bb0298644a64cd87fe6c38320eb06fcce64dd97d1aef0dcbc06e2291ae64e457
4
- data.tar.gz: fd05bcde38b198eae0e15343c271b77ca1b74263268b93f11b9881374d79d9f7
3
+ metadata.gz: 81a35dc58abc591f0cedb227a3e20f75931601caee2aac4c1a4ce11712b915d6
4
+ data.tar.gz: fd98093f0104eff5ad0e5f825a0a10f36cc5e1fdc00a4b894c8caebbb6feb7bc
5
5
  SHA512:
6
- metadata.gz: 5f11c6bf6741b26917455dc9785776f2cfc5207930bcb753ee5b91091cee3b914f3af3b0657f040829b03900f3d30fa88bf811e91786efe5014957e0dbc3c37a
7
- data.tar.gz: b40d93cb694978748d908d60322e30b6234a915a75bc08ece86d593628a068f4f36bf643ede5dba85818e62c0a33838aaac9837c12f07ffc03c23c106389f5a2
6
+ metadata.gz: decab91ce86b76b49479cb9c7a3886658e828a1ae2130c34396a93996e895aa26de3955986661f20f8c49d2b562e0dc5d25a9a527c956aab8c1415e24eb80d6e
7
+ data.tar.gz: ab347bae508e604a82d3fb09907eaaefdeba07f2019c4cd84bd53cb5cac70162a2b4bc414664ffd60cbfae0d2b114907f8bc0326c82f7b674db5e95cf1b71d61
data/README.md CHANGED
@@ -104,7 +104,7 @@ If it does not exist, we use the current method of parameterizing the `service_n
104
104
 
105
105
  `confirmation_email` method provides the confirmation email in the Runner or Editor app. For the Runner app confirmation email is being stored in the user data. In the Editor, confirmation email is only stored in session and called during preview.
106
106
 
107
- `is_confirmation_email_question?` method checks whether the page shown is a component used for confirmation email in the Runner or Editor app. For the Editor app confirmation email the component ID will be found in `ServiceConfiguration` table, while from the Runner the component ID is stored in the `ENV['CONFIRMATION_EMAIL_COMPONENT_ID']` variable.
107
+ `is_confirmation_email_question?(component_id)` method checks whether the question shown has the same component_id used for confirmation email in the Runner or Editor app. For the Editor app the component ID used for confirmation email will be found in `ServiceConfiguration` table, while from the Runner it is stored in the `ENV['CONFIRMATION_EMAIL_COMPONENT_ID']` variable.
108
108
  ## Generate documentation
109
109
 
110
110
  Run `rake doc` and open the doc/index.html
@@ -36,6 +36,12 @@ module MetadataPresenter
36
36
  MetadataPresenter::DefaultMetadata[type.to_s]&.[]('heading')
37
37
  end
38
38
 
39
+ def timeout_fallback(time)
40
+ time.strftime('%l:%M %p')
41
+ rescue NoMethodError
42
+ time
43
+ end
44
+
39
45
  def multiupload_files_remaining
40
46
  component = page_multiupload_component
41
47
  answers = @user_data.keys.include?(component.id) ? @user_data.find(component.id).first : []
@@ -10,7 +10,7 @@
10
10
  autocomplete: "email"
11
11
  %>
12
12
 
13
- <% if is_confirmation_email_question? %>
13
+ <% if is_confirmation_email_question?(component._id) %>
14
14
  <div class ="govuk-warning-text">
15
15
  <span class="govuk-warning-text__icon" aria-hidden="true">!</span>
16
16
  <strong class="govuk-warning-text__text">
@@ -2,7 +2,7 @@
2
2
  <span class="govuk-warning-text__icon" aria-hidden="true">!</span>
3
3
  <strong class="govuk-warning-text__text">
4
4
  <span class="govuk-warning-text__assistive">Warning</span>
5
- <%= t('presenter.session_timeout_warning.timer_fallback') %> <%= session_expiry_time&.strftime('%l:%M %p') %>.
5
+ <%= t('presenter.session_timeout_warning.timer_fallback') %> <%= timeout_fallback(session_expiry_time) %>.
6
6
  <%= t('presenter.session_timeout_warning.timer_extra') %>
7
7
  </strong>
8
8
  </div>
@@ -1,3 +1,3 @@
1
1
  module MetadataPresenter
2
- VERSION = '3.2.8'.freeze
2
+ VERSION = '3.2.10'.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.2.8
4
+ version: 3.2.10
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-08-18 00:00:00.000000000 Z
11
+ date: 2023-08-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: govuk_design_system_formbuilder