add copy URL button
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
<button type="button" class="btn btn-success mb-3" data-behavior="clipboard" href="<%= polymorphic_url [:new, @account, @project, @contract_template, @release, :amendment] %>">
|
||||||
|
<i class="fa fa-clipboard"></i>
|
||||||
|
<%= t '.copy_url' %>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
|
||||||
<div class="card shadow-sm">
|
<div class="card shadow-sm">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<%= errors_summary_for @release %>
|
<%= errors_summary_for @release %>
|
||||||
|
|||||||
@@ -1037,6 +1037,7 @@ en:
|
|||||||
new:
|
new:
|
||||||
amendment:
|
amendment:
|
||||||
heading: Amendment
|
heading: Amendment
|
||||||
|
copy_url: Copy sign amendment URL
|
||||||
signature:
|
signature:
|
||||||
heading: Signature
|
heading: Signature
|
||||||
appearance_releases:
|
appearance_releases:
|
||||||
|
|||||||
@@ -397,6 +397,7 @@ es:
|
|||||||
new:
|
new:
|
||||||
amendment:
|
amendment:
|
||||||
heading: Amendment
|
heading: Amendment
|
||||||
|
copy_url: Copy sign amendment URL (ES)
|
||||||
signature:
|
signature:
|
||||||
heading: Signature (ES)
|
heading: Signature (ES)
|
||||||
appearance_releases:
|
appearance_releases:
|
||||||
|
|||||||
@@ -110,6 +110,15 @@ feature "User managing location releases" do
|
|||||||
expect(page).not_to have_content signed_successfully_message
|
expect(page).not_to have_content signed_successfully_message
|
||||||
expect(page).to have_content already_signed_message
|
expect(page).to have_content already_signed_message
|
||||||
end
|
end
|
||||||
|
|
||||||
|
scenario "amendment signing form has copy URL button" do
|
||||||
|
contract_template = create(:location_release_contract_template, :with_amendment_clause, project: project)
|
||||||
|
release = create(:location_release, contract_template: contract_template, project: project)
|
||||||
|
|
||||||
|
visit new_account_project_contract_template_location_release_amendment_path(project.account, project, contract_template, release)
|
||||||
|
|
||||||
|
expect(page).to have_content copy_url_button
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
context "when signed in" do
|
context "when signed in" do
|
||||||
@@ -281,6 +290,15 @@ feature "User managing location releases" do
|
|||||||
expect(page).to have_css('i.fa.fa-square-o', count: 1)
|
expect(page).to have_css('i.fa.fa-square-o', count: 1)
|
||||||
expect(page).to have_css('i.fa.fa-check-square-o', count: 1)
|
expect(page).to have_css('i.fa.fa-check-square-o', count: 1)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
scenario "amendment signing form has copy URL button when user is signed in", js: true do
|
||||||
|
contract_template = create(:location_release_contract_template, :with_amendment_clause, project: project)
|
||||||
|
release = create(:location_release, contract_template: contract_template, project: project)
|
||||||
|
|
||||||
|
visit new_account_project_contract_template_location_release_amendment_path(project.account, project, contract_template, release)
|
||||||
|
|
||||||
|
expect(page).to have_content copy_url_button
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
scenario "viewing the contract PDF" do
|
scenario "viewing the contract PDF" do
|
||||||
@@ -664,4 +682,8 @@ feature "User managing location releases" do
|
|||||||
def sign_amendment_link
|
def sign_amendment_link
|
||||||
t 'location_releases.location_release.actions.sign_amendment'
|
t 'location_releases.location_release.actions.sign_amendment'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def copy_url_button
|
||||||
|
t 'public.amendments.new.copy_url'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user