metadata_presenter 2.17.27 → 2.17.29

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: 57d6854f72bdb0559d68a27d46710dd9bc6f2070d5c17365c8bfd0ce579f43f6
4
- data.tar.gz: 287d5136f15a044e8586f0e26530db13216035c34831cbc14f5b13e286f149ae
3
+ metadata.gz: 77ccaea3cedf89668f1fb427fee07d2be1a4c865dfa997df53dbbe73285e917f
4
+ data.tar.gz: b9e5ce83746a143020817e714bcade17ec8633a8cf640798f4226d25a47236b6
5
5
  SHA512:
6
- metadata.gz: 167e5c9e82dafe383e5afe6507d1e04186abc2692a13e26f6de4c31c71014854a6a45d1caeed9a1409498134b64c398b7618031feb8de26938fc1f52812f0dd9
7
- data.tar.gz: cfe40f1ae6a7bb65f7ebb4d2b9d8918ca5d02a482c682ff84b754cffee05d9915121f7d2fceda6b19664063f2842f3b7f31e6d4ea6afcd479f1c1b686458358c
6
+ metadata.gz: 73a51171adb6ff7829c41335cbc070f4253c9e6e070264cc41dcf8605ae2f2a9e64cd75d56fb6921eabf1bc7e81c1933a5f026905cb45c40df40e4e5201c6ae5
7
+ data.tar.gz: 2d893a11e82a87662cb72fe3af3e5328fc9b96a23a8cca39c596394928348d6cccaa05bccebbfc96390f9871e860a04ed6ea599eb28d5a1fd087e86d231a470a
data/README.md CHANGED
@@ -52,6 +52,8 @@ that you need to write the following methods in your controller:
52
52
  5. assign_autocomplete_items
53
53
  6. reference_number_enabled?
54
54
  7. show_reference_number
55
+ 8. payment_link_enabled?
56
+ 9. payment_link_url
55
57
 
56
58
  The user answers can be accessed via `params[:answers]`.
57
59
 
@@ -89,6 +91,10 @@ The `autocomplete_items` takes the components on a page and retrieves any items
89
91
 
90
92
  `show_reference_number` method will present the placeholder reference number if viewing in the Editor/Preview or will present a generated reference number if in the Runner.
91
93
 
94
+ `payment_link_enabled?` method checks whether payment link is enabled in the Runner or Editor app. For the Runner app payment link is enabled when the `ENV['PAYMENT_LINK']` variable is present. In the Editor, payment link enabled is checked by checking the `ServiceConfiguration` table.
95
+
96
+ `payment_link_url` method will present the payment link url. For the Runner this is the value of the `ENV['PAYMENT_LINK']` variable. In the Editor the value comes from the `ServiceConfiguration` table.
97
+
92
98
  ## Generate documentation
93
99
 
94
100
  Run `rake doc` and open the doc/index.html
@@ -1,10 +1,18 @@
1
1
  <% content_for :manual_global_analytics_properties do %>'page_title': 'Confirmation page'<% end %>
2
2
  <div class="fb-main-grid-wrapper" data-fb-pagetype="<%= @page.type %>">
3
+ <% if payment_link_enabled? %>
4
+ <div class="govuk-panel govuk-panel--confirmation-payment govuk-grid-column-two-thirds">
5
+ <% else %>
3
6
  <div class="govuk-panel govuk-panel--confirmation govuk-grid-column-two-thirds">
7
+ <% end %>
4
8
  <h1 class="fb-editable govuk-panel__title"
5
9
  data-fb-content-type="element"
6
10
  data-fb-content-id="page[heading]">
7
- <%= @page.heading %>
11
+ <% if payment_link_enabled? %>
12
+ <p><%= I18n.t('presenter.confirmation.payment_enabled') %></p>
13
+ <% else %>
14
+ <%= @page.heading %>
15
+ <% end %>
8
16
  </h1>
9
17
 
10
18
  <div class="govuk-panel__body">
@@ -40,5 +48,9 @@
40
48
  classes: nil,
41
49
  input_components: @page.supported_input_components,
42
50
  content_components: @page.supported_content_components
43
- } %>
51
+ } %>
52
+
53
+ <% if payment_link_enabled? %>
54
+ <a href="<%= payment_link_url %>" class="govuk-button" data-module="govuk-button" data-component="pay-button"><%= t('presenter.confirmation.continue_to_pay_button') %></a>
55
+ <% end %>
44
56
  </div>
@@ -21,6 +21,8 @@ en:
21
21
  maintenance_page_content: "If you were in the middle of completing the form, your data has not been saved.\r\n\r\nThe form will be available again from 9am on Monday 19 November 2018.\r\n\r\n\r\n\r\n### Other ways to apply\r\n\r\nContact us if your application is urgent \r\n\r\nEmail: \r\nTelephone: \r\nMonday to Friday, 9am to 5pm \r\n[Find out about call charges](https://www.gov.uk/call-charges)"
22
22
  confirmation:
23
23
  reference_number: 'Your reference number is:'
24
+ payment_enabled: You still need to pay
25
+ continue_to_pay_button: Continue to pay
24
26
  footer:
25
27
  cookies:
26
28
  heading: "Cookies"
@@ -1,3 +1,3 @@
1
1
  module MetadataPresenter
2
- VERSION = '2.17.27'.freeze
2
+ VERSION = '2.17.29'.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: 2.17.27
4
+ version: 2.17.29
5
5
  platform: ruby
6
6
  authors:
7
7
  - MoJ Forms
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-12-06 00:00:00.000000000 Z
11
+ date: 2022-12-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: govuk_design_system_formbuilder