Compare commits
1 Commits
add-me-sui
...
remove-bla
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
013ad843ed |
Binary file not shown.
|
Before Width: | Height: | Size: 26 KiB |
@@ -1,30 +1,4 @@
|
|||||||
// Do not allow file attachments in rich text content
|
// Do not allow file attachments in rich text content
|
||||||
addEventListener("trix-file-accept", function(event) {
|
addEventListener("trix-file-accept", function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
});
|
})
|
||||||
|
|
||||||
Trix.config.textAttributes.underline = {
|
|
||||||
style: { "textDecoration": "underline" },
|
|
||||||
inheritable: true,
|
|
||||||
parser: function (element) {
|
|
||||||
var style = window.getComputedStyle(element);
|
|
||||||
return style.textDecoration === "underline";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
document.addEventListener('trix-initialize', function (e) {
|
|
||||||
const trix = e.target;
|
|
||||||
const toolBar = trix.toolbarElement;
|
|
||||||
|
|
||||||
// // Creation of the button
|
|
||||||
const button = document.createElement("button");
|
|
||||||
button.setAttribute("type", "button");
|
|
||||||
button.setAttribute("class", "trix-button trix-button--icon trix-button--icon-underline");
|
|
||||||
button.setAttribute("data-trix-attribute", "underline");
|
|
||||||
button.setAttribute("title", "underline");
|
|
||||||
button.setAttribute("tabindex", "-1");
|
|
||||||
button.innerText = "U";
|
|
||||||
|
|
||||||
// Attachment of the button to the toolBar
|
|
||||||
toolBar.querySelector('.trix-button-group--text-tools').appendChild(button);
|
|
||||||
});
|
|
||||||
|
|||||||
@@ -461,10 +461,3 @@ a[data-behavior=seekable-timecode] {
|
|||||||
border-color: transparent;
|
border-color: transparent;
|
||||||
border-bottom: 3px solid #ff0000;
|
border-bottom: 3px solid #ff0000;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Trix underline style
|
|
||||||
trix-toolbar {
|
|
||||||
.trix-button--icon-underline::before {
|
|
||||||
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M0 0h24v24H0z' fill='none'/%3E%3Cpath d='M12 17c3.31 0 6-2.69 6-6V3h-2.5v8c0 1.93-1.57 3.5-3.5 3.5S8.5 12.93 8.5 11V3H6v8c0 3.31 2.69 6 6 6zm-7 2v2h14v-2H5z'/%3E%3C/svg%3E");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -48,10 +48,6 @@ u {
|
|||||||
margin-right: -30px;
|
margin-right: -30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.embed-person-photo {
|
|
||||||
text-align: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
.do-not-copy-warning {
|
.do-not-copy-warning {
|
||||||
padding-right: 15px;
|
padding-right: 15px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ class ContractsController < ApplicationController
|
|||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.pdf { send_contract_pdf }
|
format.pdf { send_contract_pdf }
|
||||||
|
|
||||||
if Rails.env.development? || Rails.env.test?
|
if Rails.env.development?
|
||||||
format.html { render_sample_html }
|
format.html { render_sample_html }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<%= form.email_field :email, class: "form-group" %>
|
<%= form.email_field :email, class: "form-group" %>
|
||||||
<%= form.password_field :password %>
|
<%= form.password_field :password %>
|
||||||
<%= form.text_field :account_name, label: 'Account Name' %>
|
<%= form.text_field :account_name, label: 'Account Name' %>
|
||||||
<%= form.select :interested_product_name, options_for_select(["I'm interested in all products", "ME Suite PRO", "DirectME", "ReleaseME", "CastME", "EditME", "DeliverME", "ExpenseME"]), { label: "What product are you most interested in?" }, { class: "form-control custom-select" } %>
|
<%= form.select :interested_product_name, options_for_select(["I'm interested in all products", "DirectME", "ReleaseME", "CastME", "EditME", "DeliverME", "ExpenseME"]), { label: "What product are you most interested in?" }, { class: "form-control custom-select" } %>
|
||||||
<div class="pt-3">
|
<div class="pt-3">
|
||||||
<%= form.submit "Start Free Trial", class: "btn btn-block btn-danger font-weight-bold" %>
|
<%= form.submit "Start Free Trial", class: "btn btn-block btn-danger font-weight-bold" %>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -4,9 +4,6 @@
|
|||||||
<h3>Welcome To <%= suite_wordmark("d-inline-block") %></h3>
|
<h3>Welcome To <%= suite_wordmark("d-inline-block") %></h3>
|
||||||
<div class="mt-4">
|
<div class="mt-4">
|
||||||
<p>Sign up for a <strong>14 Day Free Trial</strong> which includes full access to the following products. No credit card required!</p>
|
<p>Sign up for a <strong>14 Day Free Trial</strong> which includes full access to the following products. No credit card required!</p>
|
||||||
<div class="d-flex justify-content-between pb-2">
|
|
||||||
<div><%= image_tag "ME_PRO_black.png", width: "96.66%" %></div>
|
|
||||||
</div>
|
|
||||||
<div class="d-flex justify-content-between pb-2">
|
<div class="d-flex justify-content-between pb-2">
|
||||||
<div><%= image_tag "logo_directme.png", width: "90%" %></div>
|
<div><%= image_tag "logo_directme.png", width: "90%" %></div>
|
||||||
<div><%= image_tag "logo_releaseme.png", width: "90%" %></div>
|
<div><%= image_tag "logo_releaseme.png", width: "90%" %></div>
|
||||||
|
|||||||
@@ -4,29 +4,17 @@
|
|||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<% if preview %>
|
||||||
<div class="page">
|
<h1>PREVIEW ONLY</h1>
|
||||||
<% if preview %>
|
<% end %>
|
||||||
<h1>PREVIEW ONLY</h1>
|
<% if contract_template.body.present? %>
|
||||||
<% end %>
|
<%= contract_template.body %>
|
||||||
|
<br/>
|
||||||
<% if releasable.model_name == "AppearanceRelease" && releasable.person_photo.attached? %>
|
<% end %>
|
||||||
<div class="embed-person-photo">
|
<% if releasable.minor? && contract_template.guardian_clause.present? %>
|
||||||
<%= image_tag releasable.photos.first.variant(auto_orient: true, resize: "200x200"), id: "top-person-photo" %>
|
<p class="text-left"><strong>Guardian Clause</strong></p>
|
||||||
</div>
|
<%= contract_template.guardian_clause %>
|
||||||
<hr>
|
<% end %>
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<% if contract_template.body.present? %>
|
|
||||||
<%= contract_template.body %>
|
|
||||||
<br/>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<% if releasable.minor? && contract_template.guardian_clause.present? %>
|
|
||||||
<p class="text-left"><strong>Guardian Clause</strong></p>
|
|
||||||
<%= contract_template.guardian_clause %>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<% if contract_template.present? && contract_template.has_questionnaire? %>
|
<% if contract_template.present? && contract_template.has_questionnaire? %>
|
||||||
<div class="page">
|
<div class="page">
|
||||||
|
|||||||
@@ -1,13 +1,6 @@
|
|||||||
require "rails_helper"
|
require "rails_helper"
|
||||||
|
|
||||||
feature "Guest account sign up" do
|
feature "Guest account sign up" do
|
||||||
scenario "guest can select ME Suite PRO in 'interested in' dropdown" do
|
|
||||||
visit new_account_path
|
|
||||||
|
|
||||||
expect(page).to have_selector("img[src*='ME_PRO_black']")
|
|
||||||
select "ME Suite PRO", from: interested_in_product_dropdown
|
|
||||||
end
|
|
||||||
|
|
||||||
scenario "creates a new account and signs in successfully" do
|
scenario "creates a new account and signs in successfully" do
|
||||||
visit new_account_path
|
visit new_account_path
|
||||||
|
|
||||||
@@ -45,10 +38,4 @@ feature "Guest account sign up" do
|
|||||||
|
|
||||||
expect(page).to have_content "Sign Up"
|
expect(page).to have_content "Sign Up"
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
|
||||||
|
|
||||||
def interested_in_product_dropdown
|
|
||||||
"user[interested_product_name]"
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -386,13 +386,6 @@ RSpec.feature 'User manages contract templates', type: :feature do
|
|||||||
expect(ct.signature_legal_text.id).not_to eq ContractTemplate.last.signature_legal_text.id
|
expect(ct.signature_legal_text.id).not_to eq ContractTemplate.last.signature_legal_text.id
|
||||||
end
|
end
|
||||||
|
|
||||||
scenario 'trix editor has underline button', js: true do
|
|
||||||
visit new_project_contract_template_path(project)
|
|
||||||
|
|
||||||
select 'Appearance Release', from: 'Release type'
|
|
||||||
expect(page).to have_selector("button[data-trix-attribute='underline']")
|
|
||||||
end
|
|
||||||
|
|
||||||
context 'When the user is associate' do
|
context 'When the user is associate' do
|
||||||
let(:current_user) { create(:user, :associate) }
|
let(:current_user) { create(:user, :associate) }
|
||||||
|
|
||||||
|
|||||||
@@ -675,15 +675,6 @@ feature 'User managing appearance releases' do
|
|||||||
expect(pdf_body).to have_content appearance_release.exhibit_b_answer
|
expect(pdf_body).to have_content appearance_release.exhibit_b_answer
|
||||||
end
|
end
|
||||||
|
|
||||||
scenario "viewing the contract PDF - it shows person photo on first page if person photo is attached" do
|
|
||||||
appearance_release = create(:appearance_release_with_contract_template, :native, :minor_with_guardian_photo, project: project)
|
|
||||||
|
|
||||||
visit view_release_pdf_html_preview_link_for(appearance_release)
|
|
||||||
|
|
||||||
person_photo_url = url_for(appearance_release.person_photo.variant(auto_orient: true, resize: "200x200")).to_s
|
|
||||||
expect(page).to have_selector("#top-person-photo[src^='#{person_photo_url}']")
|
|
||||||
end
|
|
||||||
|
|
||||||
scenario 'deleting a release', js: true do
|
scenario 'deleting a release', js: true do
|
||||||
appearance_release = create(:appearance_release, project: project)
|
appearance_release = create(:appearance_release, project: project)
|
||||||
|
|
||||||
@@ -1020,10 +1011,6 @@ feature 'User managing appearance releases' do
|
|||||||
['Download', href: appearance_release_contracts_path(appearance_release, format: 'pdf')]
|
['Download', href: appearance_release_contracts_path(appearance_release, format: 'pdf')]
|
||||||
end
|
end
|
||||||
|
|
||||||
def view_release_pdf_html_preview_link_for(appearance_release)
|
|
||||||
appearance_release_contracts_path(appearance_release)
|
|
||||||
end
|
|
||||||
|
|
||||||
def successful_submission_message
|
def successful_submission_message
|
||||||
'Your release was successfully submitted. Thank you.'
|
'Your release was successfully submitted. Thank you.'
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user