diff --git a/app/views/public/medical_releases/new.html.erb b/app/views/public/medical_releases/new.html.erb
index dd58cc3..2c031bc 100644
--- a/app/views/public/medical_releases/new.html.erb
+++ b/app/views/public/medical_releases/new.html.erb
@@ -145,7 +145,7 @@
<% end %>
<%= card_field_set_tag t(".signature.heading") do %>
- <%= render "shared/signature_fields", form: form %>
+ <%= render "shared/signature_fields", form: form, signature_legal_text: @contract_template.signature_legal_text %>
<% end %>
diff --git a/app/views/public/misc_releases/new.html.erb b/app/views/public/misc_releases/new.html.erb
index a2e8c50..ebde755 100644
--- a/app/views/public/misc_releases/new.html.erb
+++ b/app/views/public/misc_releases/new.html.erb
@@ -97,7 +97,7 @@
<% end %>
<%= card_field_set_tag t(".signature.heading") do %>
- <%= render "shared/signature_fields", form: form %>
+ <%= render "shared/signature_fields", form: form, signature_legal_text: @contract_template.signature_legal_text %>
<% end %>
diff --git a/app/views/public/talent_releases/new.html.erb b/app/views/public/talent_releases/new.html.erb
index 6af7df2..e3ba06a 100644
--- a/app/views/public/talent_releases/new.html.erb
+++ b/app/views/public/talent_releases/new.html.erb
@@ -131,7 +131,7 @@
<% end %>
<%= card_field_set_tag t(".signature.heading") do %>
- <%= render "shared/signature_fields", form: form %>
+ <%= render "shared/signature_fields", form: form, signature_legal_text: @contract_template.signature_legal_text %>
<% end %>
diff --git a/app/views/shared/_signature_fields.html.erb b/app/views/shared/_signature_fields.html.erb
index 620274a..eb1fc6e 100644
--- a/app/views/shared/_signature_fields.html.erb
+++ b/app/views/shared/_signature_fields.html.erb
@@ -12,4 +12,8 @@
<%= fa_icon "refresh" %> <%= t "shared.clear" %>
<% end %>
+
+<% if local_assigns[:signature_legal_text] && signature_legal_text.present? %>
+
<%= signature_legal_text %>
+<% end %>
\ No newline at end of file
diff --git a/app/views/task_requests/create.html.erb b/app/views/task_requests/create.html.erb
index 3504502..43d1380 100644
--- a/app/views/task_requests/create.html.erb
+++ b/app/views/task_requests/create.html.erb
@@ -13,3 +13,4 @@
<% end %>
<% end %>
<%= t '.success_message' %>
+<%= link_to fa_icon("check", text: "Done"), [@project, :task_requests], class: "btn btn-primary" %>
diff --git a/app/views/videos/splash.html.erb b/app/views/videos/splash.html.erb
index c7954da..0b082bb 100644
--- a/app/views/videos/splash.html.erb
+++ b/app/views/videos/splash.html.erb
@@ -6,7 +6,7 @@
<%= link_to t(".actions.book_demo"), 'https://meetings.hubspot.com/bray2', class: "btn btn-primary border align-self-center h-50 ml-auto mr-2 pb-2", target: '_blank' %>
<% if policy(Video).new? %>
- <%= link_to t(".actions.upload_video"), [:new, @project, :video], class: "btn btn-success border align-self-center h-50 pb-2" %>
+ <%= link_to t(".actions.upload_video"), [:landing, @project, :videos], class: "btn btn-success border align-self-center h-50 pb-2" %>
<% end %>
@@ -18,7 +18,7 @@
diff --git a/config/locales/en.yml b/config/locales/en.yml
index ef8b351..d09ddeb 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -364,6 +364,7 @@ en:
contract_template:
fee: Leave at $0.00 for no-fee
guardian_clause: Leave blank if not required for this contract
+ signature_legal_text: Leave blank if not required for this contract
task_request:
time_allowed: Minimum of 2 hours, no partial hours allowed
video:
diff --git a/config/locales/es.yml b/config/locales/es.yml
index 636e5f2..439e747 100644
--- a/config/locales/es.yml
+++ b/config/locales/es.yml
@@ -160,6 +160,7 @@ es:
contract_template:
fee: Leave at $0.00 for no-fee (ES)
guardian_clause: Leave blank if not required for this contract (ES)
+ signature_legal_text: Leave blank if not required for this contract (ES)
label:
appearance_release:
guardian_2_address_city: Guardian 2 city (ES)
diff --git a/spec/features/user_creates_task_request_spec.rb b/spec/features/user_creates_task_request_spec.rb
index 2ecb847..8640137 100644
--- a/spec/features/user_creates_task_request_spec.rb
+++ b/spec/features/user_creates_task_request_spec.rb
@@ -21,6 +21,7 @@ RSpec.feature 'User creates task request', type: :feature do
click_on 'Create Task request'
expect(page).to have_content task_created_message
+ expect(page).to have_link("Done")
end
scenario 'user can view task request details' do
@@ -89,4 +90,4 @@ RSpec.feature 'User creates task request', type: :feature do
def task_created_message
t 'task_requests.create.success_message'
end
-end
\ No newline at end of file
+end
diff --git a/spec/features/user_manages_contract_templates_spec.rb b/spec/features/user_manages_contract_templates_spec.rb
index cdba2eb..c37b3e9 100644
--- a/spec/features/user_manages_contract_templates_spec.rb
+++ b/spec/features/user_manages_contract_templates_spec.rb
@@ -35,6 +35,24 @@ RSpec.feature 'User manages contract templates', type: :feature do
expect(page).to have_content(create_contract_template_success_message)
end
+ scenario 'creating new release template, all release types accept signature legal text' do
+ all_release_types = ['Acquired Media', 'Appearance', 'Location', 'Material', 'Medical', 'Misc', 'Talent']
+
+ all_release_types.each do |release_type|
+ visit new_project_contract_template_path(project)
+
+ dropdown_selection = "#{release_type} Release"
+ select dropdown_selection, from: 'Release type'
+
+ fill_in 'Name', with: "My #{release_type} template"
+ fill_in_trix signature_legal_text_field, with: 'LL'
+
+ expect do
+ click_on 'Create Release Template'
+ end.to change(ContractTemplate, :count).by(1)
+ end
+ end
+
scenario 'medical release template has a guardian clause field' do
visit new_project_contract_template_path(project)
@@ -222,7 +240,7 @@ RSpec.feature 'User manages contract templates', type: :feature do
click_on 'Manage'
accept_alert do
- click_on 'Archive'
+ click_on 'Delete'
end
expect(page).to have_content('The release template has been archived')
@@ -273,7 +291,7 @@ RSpec.feature 'User manages contract templates', type: :feature do
visit project_contract_templates_path(project)
click_on 'Manage'
- expect(page).to have_content('Archive')
+ expect(page).to have_content('Delete')
end
it 'does not show create release button on splash page' do
@@ -310,6 +328,10 @@ RSpec.feature 'User manages contract templates', type: :feature do
'contract_template_guardian_clause_trix_input_contract_template'
end
+ def signature_legal_text_field
+ 'contract_template_signature_legal_text'
+ end
+
def create_contract_template_success_message
'The release template has been created'
end
@@ -329,4 +351,8 @@ RSpec.feature 'User manages contract templates', type: :feature do
def create_release_template
t 'contract_templates.splash.actions.create_template'
end
+
+ def signature_legal_text_trix_field
+ 'Signature legal text'
+ end
end
diff --git a/spec/features/user_managing_acquired_media_releases_spec.rb b/spec/features/user_managing_acquired_media_releases_spec.rb
index 267b955..48368d2 100644
--- a/spec/features/user_managing_acquired_media_releases_spec.rb
+++ b/spec/features/user_managing_acquired_media_releases_spec.rb
@@ -41,6 +41,13 @@ feature "User managing acquired_media releases" do
expect(AcquiredMediaRelease.last.categories).to include("Still Photograph")
expect(page).to have_content("Your release was successfully submitted. Thank you.")
end
+
+ scenario "creating a release, if contract template contains signature legal language, it is shown" do
+ contract_template = create(:contract_template, project: project, signature_legal_text: dummy_signature_legal_text)
+ visit new_account_project_contract_template_acquired_media_release_path(project.account, project, contract_template)
+
+ expect(page).to have_content dummy_signature_legal_text
+ end
end
context "when signed in" do
@@ -357,4 +364,8 @@ feature "User managing acquired_media releases" do
def destroy_release_alert
t "acquired_media_releases.destroy.alert"
end
+
+ def dummy_signature_legal_text
+ 'Some signature legal language'
+ end
end
diff --git a/spec/features/user_managing_appearance_releases_spec.rb b/spec/features/user_managing_appearance_releases_spec.rb
index 986d427..60d739b 100644
--- a/spec/features/user_managing_appearance_releases_spec.rb
+++ b/spec/features/user_managing_appearance_releases_spec.rb
@@ -137,6 +137,13 @@ feature 'User managing appearance releases' do
expect(page).to have_content(successful_submission_message)
expect(AppearanceRelease.last.guardian_2_first_name).to eq 'Second'
end
+
+ scenario "creating a release, if contract template contains signature legal language, it is shown" do
+ contract_template = create(:contract_template, project: project, signature_legal_text: dummy_signature_legal_text)
+ visit new_account_project_contract_template_appearance_release_path(project.account, project, contract_template)
+
+ expect(page).to have_content dummy_signature_legal_text
+ end
end
context 'when signed in' do
@@ -706,4 +713,8 @@ feature 'User managing appearance releases' do
def guardian_2_photo_heading
t 'appearance_releases.form.photos.guardian_2_photo.heading'
end
+
+ def dummy_signature_legal_text
+ 'Some signature legal language'
+ end
end
diff --git a/spec/features/user_managing_location_releases_spec.rb b/spec/features/user_managing_location_releases_spec.rb
index d10bb8e..7efd0eb 100644
--- a/spec/features/user_managing_location_releases_spec.rb
+++ b/spec/features/user_managing_location_releases_spec.rb
@@ -71,6 +71,13 @@ feature "User managing location releases" do
expect(page).to have_content("Your release was successfully submitted. Thank you.")
expect(LocationRelease.last.photos.attached?).to eq true
end
+
+ scenario "creating a release, if contract template contains signature legal language, it is shown" do
+ contract_template = create(:contract_template, project: project, signature_legal_text: dummy_signature_legal_text)
+ visit new_account_project_contract_template_location_release_path(project.account, project, contract_template)
+
+ expect(page).to have_content dummy_signature_legal_text
+ end
end
context "when signed in" do
@@ -375,4 +382,8 @@ feature "User managing location releases" do
select "Other", from: "Restriction"
fill_in "Describe other restrictions", with: "Test"
end
+
+ def dummy_signature_legal_text
+ 'Some signature legal language'
+ end
end
diff --git a/spec/features/user_managing_material_releases_spec.rb b/spec/features/user_managing_material_releases_spec.rb
index 1f966b2..b2854ad 100644
--- a/spec/features/user_managing_material_releases_spec.rb
+++ b/spec/features/user_managing_material_releases_spec.rb
@@ -84,6 +84,13 @@ feature "User managing material releases" do
click_button submit_release_button
expect(page).to have_content success_submit_message
end
+
+ scenario "creating a release, if contract template contains signature legal language, it is shown" do
+ contract_template = create(:contract_template, project: project, signature_legal_text: dummy_signature_legal_text)
+ visit new_account_project_contract_template_material_release_path(project.account, project, contract_template)
+
+ expect(page).to have_content dummy_signature_legal_text
+ end
end
context "when signed in" do
@@ -382,4 +389,8 @@ feature "User managing material releases" do
click_button submit_release_button
expect(page).not_to have_content success_submit_message
end
+
+ def dummy_signature_legal_text
+ 'Some signature legal language'
+ end
end
diff --git a/spec/features/user_managing_medical_releases_spec.rb b/spec/features/user_managing_medical_releases_spec.rb
index c65286e..ad395f1 100644
--- a/spec/features/user_managing_medical_releases_spec.rb
+++ b/spec/features/user_managing_medical_releases_spec.rb
@@ -168,6 +168,13 @@ feature "User managing medical releases" do
expect(page).to have_content(successful_submission_message)
end
+
+ scenario "creating a release, if contract template contains signature legal language, it is shown" do
+ contract_template = create(:contract_template, project: project, signature_legal_text: dummy_signature_legal_text)
+ visit new_account_project_contract_template_medical_release_path(project.account, project, contract_template)
+
+ expect(page).to have_content dummy_signature_legal_text
+ end
end
context "when signed in as account manager" do
@@ -447,4 +454,8 @@ feature "User managing medical releases" do
def answer_field_for_question(number)
"medical_release[question_#{number}_answer]"
end
+
+ def dummy_signature_legal_text
+ 'Some signature legal language'
+ end
end
diff --git a/spec/features/user_managing_misc_releases_spec.rb b/spec/features/user_managing_misc_releases_spec.rb
index 2b13e05..42d47d0 100644
--- a/spec/features/user_managing_misc_releases_spec.rb
+++ b/spec/features/user_managing_misc_releases_spec.rb
@@ -48,6 +48,13 @@ feature "User managing misc releases" do
expect(field).to be_visible
end
end
+
+ scenario "creating a release, if contract template contains signature legal language, it is shown" do
+ contract_template = create(:contract_template, project: project, signature_legal_text: dummy_signature_legal_text)
+ visit new_account_project_contract_template_misc_release_path(project.account, project, contract_template)
+
+ expect(page).to have_content dummy_signature_legal_text
+ end
end
context "when signed in as account manager" do
@@ -199,4 +206,8 @@ feature "User managing misc releases" do
def person_is_minor_checkbox
'misc_release_minor'
end
+
+ def dummy_signature_legal_text
+ 'Some signature legal language'
+ end
end
diff --git a/spec/features/user_managing_talent_releases_spec.rb b/spec/features/user_managing_talent_releases_spec.rb
index df56bb6..f1943c7 100644
--- a/spec/features/user_managing_talent_releases_spec.rb
+++ b/spec/features/user_managing_talent_releases_spec.rb
@@ -126,6 +126,13 @@ feature "User managing talent releases" do
expect(TalentRelease.last.guardian_2_photo.attached?).to eq true
expect(TalentRelease.last.guardian_2_name).to eq "Second Guardian"
end
+
+ scenario "creating a release, if contract template contains signature legal language, it is shown" do
+ contract_template = create(:contract_template, project: project, signature_legal_text: dummy_signature_legal_text)
+ visit new_account_project_contract_template_talent_release_path(project.account, project, contract_template)
+
+ expect(page).to have_content dummy_signature_legal_text
+ end
end
context "when signed in" do
@@ -555,4 +562,8 @@ feature "User managing talent releases" do
fill_in guardian_address_state_field, with: "NY"
fill_in guardian_address_zip_field, with: '1000'
end
+
+ def dummy_signature_legal_text
+ 'Some signature legal language'
+ end
end