metadata_presenter 2.17.28 → 2.17.29

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: 9c7a515533afa7cb555ef8b2456b6023e61eba63e7caa68b26f3e66b9a714dc9
4
- data.tar.gz: 47a5ce82180f3cb6fdc5d12c857e14b818ce21c9e4a13e5e264153b2ddc07a4d
3
+ metadata.gz: 77ccaea3cedf89668f1fb427fee07d2be1a4c865dfa997df53dbbe73285e917f
4
+ data.tar.gz: b9e5ce83746a143020817e714bcade17ec8633a8cf640798f4226d25a47236b6
5
5
  SHA512:
6
- metadata.gz: 6553f67becb02a29e169c40e8ee0540c7ed3e3e8864f810098bcc9fb7edee0087b1afce8feb486af395c9c0b9071f387b4589eada99af44bba3e33cb362c3df6
7
- data.tar.gz: ad7eb71be34c175cf7439af079f559546c14f5238067076a75f996d3fc7fd0fa0523c36b678391914961abc31c58d5c109f6ca449aab9202431599249b104bfd
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
@@ -48,5 +48,9 @@
48
48
  classes: nil,
49
49
  input_components: @page.supported_input_components,
50
50
  content_components: @page.supported_content_components
51
- } %>
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 %>
52
56
  </div>
@@ -22,6 +22,7 @@ en:
22
22
  confirmation:
23
23
  reference_number: 'Your reference number is:'
24
24
  payment_enabled: You still need to pay
25
+ continue_to_pay_button: Continue to pay
25
26
  footer:
26
27
  cookies:
27
28
  heading: "Cookies"
@@ -1,3 +1,3 @@
1
1
  module MetadataPresenter
2
- VERSION = '2.17.28'.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.28
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-14 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