Compare commits

..

2 Commits

Author SHA1 Message Date
Bilal
a4af845217 fix specs 2020-08-03 18:47:40 +02:00
Bilal
50c5d678c5 change copy 2020-08-03 18:36:28 +02:00
4 changed files with 12 additions and 21 deletions

View File

@@ -8,10 +8,6 @@
<div class="card-body"> <div class="card-body">
<%= errors_summary_for @release %> <%= 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| %> <%= 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('.signed_contract_preview') do %>
<embed class="embeded-contract-preview" type="application/pdf" src="<%= url_for([@release, :contracts, format: "pdf"]) %>" width="80%" height="1200" />
<% end %>
<%= card_field_set_tag t(".amendment.heading") do %> <%= card_field_set_tag t(".amendment.heading") do %>
<p><%= @contract_template.amendment_clause %></p> <p><%= @contract_template.amendment_clause %></p>
<% end %> <% end %>

View File

@@ -511,6 +511,8 @@ en:
person_last_name: Last name person_last_name: Last name
person_name: Name person_name: Name
person_phone: Phone number person_phone: Phone number
contract_template:
amendment_clause: Additional Contract Clause
location_release: location_release:
address_city: City address_city: City
address_country: Country address_country: Country
@@ -842,7 +844,7 @@ en:
empty: Location Releases will appear here empty: Location Releases will appear here
table_headers: table_headers:
address: Address address: Address
amendment_signed: Amendment amendment_signed: Additional Clause
approved: Approved approved: Approved
name: Location Name name: Location Name
notes: Notes notes: Notes
@@ -852,7 +854,7 @@ en:
actions: actions:
manage: Manage manage: Manage
review: Review review: Review
sign_amendment: Sign Amendment sign_amendment: Sign Additional Clause
messages: messages:
amendment_not_signed_tooltip: Amendment not yet signed amendment_not_signed_tooltip: Amendment not yet signed
amendment_signed_tooltip: Amendment Signed amendment_signed_tooltip: Amendment Signed
@@ -1134,11 +1136,10 @@ en:
amendment_signed_message: Release amendment signed successfully! Thank you amendment_signed_message: Release amendment signed successfully! Thank you
new: new:
amendment: amendment:
heading: Amendment heading: Additional Clause
copy_url: Copy sign amendment URL copy_url: Copy sign amendment URL
signature: signature:
heading: Signature heading: Signature
signed_contract_preview: Signed Contract Preview
appearance_releases: appearance_releases:
create: create:
notice: Your release has been signed. Thank you! notice: Your release has been signed. Thank you!

View File

@@ -285,6 +285,8 @@ es:
person_email: Dirección de correo electrónico person_email: Dirección de correo electrónico
person_name: Nómbre person_name: Nómbre
person_phone: Número de teléfono person_phone: Número de teléfono
contract_template:
amendment_clause: Additional Contract Clause (ES)
material_release: material_release:
guardian_2_address_city: Guardian 2 city (ES) guardian_2_address_city: Guardian 2 city (ES)
guardian_2_address_country: Guardian 2 country (ES) guardian_2_address_country: Guardian 2 country (ES)
@@ -408,13 +410,13 @@ es:
index: index:
table_headers: table_headers:
address: Address (ES) address: Address (ES)
amendment_signed: Amendment (ES) amendment_signed: Additional Clause (ES)
notes: Notes (ES) notes: Notes (ES)
signed_at: Date Signed (ES) signed_at: Date Signed (ES)
tags: Tags (ES) tags: Tags (ES)
location_release: location_release:
actions: actions:
sign_amendment: Sign Amendment (ES) sign_amendment: Sign Additional Clause (ES)
messages: messages:
amendment_not_signed_tooltip: Amendment not yet signed (ES) amendment_not_signed_tooltip: Amendment not yet signed (ES)
amendment_signed_tooltip: Amendment Signed (ES) amendment_signed_tooltip: Amendment Signed (ES)
@@ -500,11 +502,10 @@ es:
amendment_signed_message: Release amendment signed successfully! Thank you (ES) amendment_signed_message: Release amendment signed successfully! Thank you (ES)
new: new:
amendment: amendment:
heading: Amendment heading: Additional Clause (ES)
copy_url: Copy sign amendment URL (ES) copy_url: Copy sign amendment URL (ES)
signature: signature:
heading: Signature (ES) heading: Signature (ES)
signed_contract_preview: Signed Contract Preview (ES)
appearance_releases: appearance_releases:
create: create:
notice: La autorización está firmada. ¡Gracias! notice: La autorización está firmada. ¡Gracias!

View File

@@ -87,7 +87,7 @@ feature "User managing location releases" do
visit new_account_project_contract_template_location_release_amendment_path(project.account, project, contract_template, release) visit new_account_project_contract_template_location_release_amendment_path(project.account, project, contract_template, release)
expect(page).to have_content amendments_heading expect(page).to have_content amendments_heading.upcase
fill_in amendment_signer_name_field, with: 'Big Signer' fill_in amendment_signer_name_field, with: 'Big Signer'
draw_signature file_fixture("signature.png"), amendment_signature_field draw_signature file_fixture("signature.png"), amendment_signature_field
@@ -250,10 +250,7 @@ feature "User managing location releases" do
new_window = window_opened_by { click_link sign_amendment_link } new_window = window_opened_by { click_link sign_amendment_link }
within_window new_window do within_window new_window do
expect(page).to have_content amendments_heading expect(page).to have_content amendments_heading.upcase
expect(page).to have_content signed_contract_preview.upcase
expect(page).to have_selector 'embed'
fill_in amendment_signer_name_field, with: 'Big Signer' fill_in amendment_signer_name_field, with: 'Big Signer'
draw_signature file_fixture("signature.png"), amendment_signature_field draw_signature file_fixture("signature.png"), amendment_signature_field
@@ -693,10 +690,6 @@ feature "User managing location releases" do
t 'public.amendments.new.amendment.heading' t 'public.amendments.new.amendment.heading'
end end
def signed_contract_preview
t 'public.amendments.new.signed_contract_preview'
end
def amendment_signer_name_field def amendment_signer_name_field
'location_release[amendment_signer_name]' 'location_release[amendment_signer_name]'
end end