From 8410eaee0791106dbb7e2d931c593a2815b26bd1 Mon Sep 17 00:00:00 2001 From: Bilal Date: Wed, 29 Jul 2020 19:48:06 +0200 Subject: [PATCH] add contract preview to the amendment signing form --- app/views/public/amendments/new.html.erb | 4 ++-- config/locales/en.yml | 3 +-- config/locales/es.yml | 3 +-- spec/features/user_managing_location_releases_spec.rb | 9 ++++----- 4 files changed, 8 insertions(+), 11 deletions(-) diff --git a/app/views/public/amendments/new.html.erb b/app/views/public/amendments/new.html.erb index 76420ed..195aa81 100644 --- a/app/views/public/amendments/new.html.erb +++ b/app/views/public/amendments/new.html.erb @@ -8,8 +8,8 @@
<%= errors_summary_for @release %> <%= bootstrap_form_with model: @release, method: :post, url: public_send("account_project_contract_template_#{@contract_template.release_type}_release_amendments_path"), local: true do |form| %> - <%= card_field_set_tag t(".body_clause.heading") do %> -

<%= @contract_template.body %>

+ <%= card_field_set_tag t('.signed_contract_preview') do %> + " width="80%" height="1200" /> <% end %> <%= card_field_set_tag t(".amendment.heading") do %> diff --git a/config/locales/en.yml b/config/locales/en.yml index 0b8ff80..e82ce66 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1138,8 +1138,7 @@ en: copy_url: Copy sign amendment URL signature: heading: Signature - body_clause: - heading: Legal + signed_contract_preview: Signed Contract Preview appearance_releases: create: notice: Your release has been signed. Thank you! diff --git a/config/locales/es.yml b/config/locales/es.yml index 8597839..b87f3aa 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -504,8 +504,7 @@ es: copy_url: Copy sign amendment URL (ES) signature: heading: Signature (ES) - body_clause: - heading: Legal (ES) + signed_contract_preview: Signed Contract Preview (ES) appearance_releases: create: notice: La autorización está firmada. ¡Gracias! diff --git a/spec/features/user_managing_location_releases_spec.rb b/spec/features/user_managing_location_releases_spec.rb index 6ff5e50..5882e85 100644 --- a/spec/features/user_managing_location_releases_spec.rb +++ b/spec/features/user_managing_location_releases_spec.rb @@ -251,10 +251,9 @@ feature "User managing location releases" do new_window = window_opened_by { click_link sign_amendment_link } within_window new_window do expect(page).to have_content amendments_heading - expect(page).to have_content body_clause_heading + expect(page).to have_content signed_contract_preview.upcase - expect(page).to have_content contract_template.body.to_plain_text - expect(page).to have_content contract_template.amendment_clause.to_plain_text + expect(page).to have_selector 'embed' fill_in amendment_signer_name_field, with: 'Big Signer' draw_signature file_fixture("signature.png"), amendment_signature_field @@ -694,8 +693,8 @@ feature "User managing location releases" do t 'public.amendments.new.amendment.heading' end - def body_clause_heading - t 'public.amendments.new.body_clause.heading' + def signed_contract_preview + t 'public.amendments.new.signed_contract_preview' end def amendment_signer_name_field