Skip to content

Commit

Permalink
Merge pull request #3417 from DFE-Digital/ey-consent-form
Browse files Browse the repository at this point in the history
[CAPT-2010] EY consent form
  • Loading branch information
asmega authored Nov 21, 2024
2 parents a0a42d8 + d5043a2 commit ba733e0
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 9 deletions.
Binary file not shown.
11 changes: 10 additions & 1 deletion app/assets/stylesheets/components/document.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
margin-bottom: 30px;
}

.document-icon {
.document .document-icon {
display: block;
width: auto;
max-width: 99px;
Expand All @@ -17,3 +17,12 @@
fill: #b1b4b6;
stroke: #b1b4b6;
}

.document .title {
margin-bottom: 15px;
}

.document .metadata {
@extend .govuk-body;
color: #505a5f;
}
18 changes: 16 additions & 2 deletions app/views/early_years_payment/provider/start/landing_page.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<h3 class="govuk-heading-m">Information from your employee</h3>

<p class="govuk-body">
You should make sure you’ve collected written consent from your employee before you give us their information. You can use our <%= govuk_link_to("consent form", "#") %> to do this.
You should make sure you’ve collected written consent from your employee before you give us their information. You can use our <%= govuk_link_to("consent form", asset_path("ey-provider-practitioner-consent-form.pdf"), new_tab: true) %> to do this.
</p>

<p class="govuk-body">
Expand All @@ -52,7 +52,21 @@

<h4 class="govuk-heading-s">Documents</h4>

<%= render partial: "shared/document", locals: { title_text: "Privacy notice", title_url: "https://www.gov.uk/government/publications/privacy-information-education-providers-workforce-including-teachers/5a254207-a566-44f7-ac77-6ba59fd26e04" } %>
<%= render partial: "shared/document",
locals: {
type: :generic,
title_text: "Privacy notice",
title_url: "https://www.gov.uk/government/publications/privacy-information-education-providers-workforce-including-teachers/5a254207-a566-44f7-ac77-6ba59fd26e04",
metadata: nil
} %>

<%= render partial: "shared/document",
locals: {
type: :pdf,
title_text: "Consent form",
title_url: asset_path("ey-provider-practitioner-consent-form.pdf"),
metadata: "PDF, 63 KB, 1 page"
} %>

<h3 class="govuk-heading-m">Information from your organisation</h3>

Expand Down
14 changes: 10 additions & 4 deletions app/views/shared/_document.html.erb
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
<div class="document">
<div>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 99 140" width="99" height="140" class="document-icon" aria-hidden="true">
<path d="M12 12h75v27H12zM12 59h9v9h-9zM12 77h9v9h-9zM12 95h9v9h-9zM12 113h9v9h-9zM30 59h57v9H30zM30 77h39v9H30zM30 95h57v9H30zM30 113h48v9H30z" stroke-width="0"></path>
</svg>
<%= govuk_link_to title_url, new_tab: "" do %>
<%= render partial: "shared/#{type}_document_icon" %>
<% end %>
</div>

<div>
<%= govuk_link_to title_text, title_url, new_tab: "" %>
<div class="title">
<%= govuk_link_to title_text, title_url, new_tab: "" %>
</div>

<div class="metadata">
<%= metadata %>
</div>
</div>
</div>
3 changes: 3 additions & 0 deletions app/views/shared/_generic_document_icon.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 99 140" width="99" height="140" class="document-icon" aria-hidden="true">
<path d="M12 12h75v27H12zM12 59h9v9h-9zM12 77h9v9h-9zM12 95h9v9h-9zM12 113h9v9h-9zM30 59h57v9H30zM30 77h39v9H30zM30 95h57v9H30zM30 113h48v9H30z" stroke-width="0"></path>
</svg>
3 changes: 3 additions & 0 deletions app/views/shared/_pdf_document_icon.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<svg class="document-icon" version="1.1" viewBox="0 0 99 140">
<path d="M12,59h9v9h-9v-9ZM30,77v9h39v-9H30ZM30,104h57v-9H30v9ZM30,122h48v-9H30v9ZM12,86h9v-9h-9v9ZM12,122h9v-9h-9v9ZM12,104h9v-9h-9v9ZM30,68h57v-9H30v9ZM35.2,21c-.3-.2-.6-.4-1-.5s-.8-.2-1.3-.2h-2.6v5.5h2.6c.5,0,1,0,1.3-.2s.7-.3,1-.5c.3-.2.5-.5.7-.8s.2-.7.2-1.1h0c0-.5,0-.9-.2-1.2-.2-.3-.4-.6-.7-.8h0ZM52.4,21.9c-.4-.5-1-.9-1.6-1.1-.7-.3-1.5-.4-2.4-.4h-2.7v11.5h2.7c.9,0,1.7-.1,2.4-.4s1.2-.7,1.6-1.1c.4-.5.7-1.1.9-1.7.2-.7.3-1.4.3-2.1v-.7c0-.8,0-1.5-.3-2.1-.2-.6-.5-1.2-.9-1.7h0ZM87,12v27H12V12h75ZM39.8,23c0-.9-.1-1.6-.4-2.4-.3-.7-.7-1.4-1.2-1.9-.5-.5-1.2-1-1.9-1.2-.8-.3-1.6-.5-2.5-.5h-7.2v17.9h3.6v-6h3.2c.9,0,1.8-.1,2.6-.5.8-.3,1.4-.7,2-1.2.5-.5,1-1.2,1.3-1.9.3-.7.5-1.5.5-2.4h0ZM57.4,26c0-1.3-.2-2.6-.5-3.7s-.9-2-1.6-2.8c-.7-.8-1.6-1.4-2.7-1.8-1.1-.4-2.3-.6-3.8-.6h-6.6v17.9h6.6c1.5,0,2.7-.2,3.8-.6,1.1-.4,2-1,2.7-1.8.7-.8,1.3-1.7,1.6-2.8.4-1.1.5-2.3.5-3.7h0ZM72.4,17.1h-12.1v17.9h3.6v-7.5h7.8v-3.3h-7.8v-3.8h8.4s0-3.3,0-3.3Z"></path>
</svg>
10 changes: 8 additions & 2 deletions config/initializers/assets.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Rails.application.config.assets.version = "1.0"

# Add additional assets to the asset load path.
# Rails.application.config.assets.paths << Emoji.images_path
Rails.application.config.assets.paths << Rails.root.join("app", "assets", "pdfs")

# Because these paths are searched in order, we want the assets to come first
# Add the GOVUK Frontend images path
Expand All @@ -20,7 +20,13 @@
# application.js, application.css, and all non-JS/CSS in the app/assets
# folder are already added.
# Rails.application.config.assets.precompile += %w( admin.js admin.css )
Rails.application.config.assets.precompile += %w[js_check.js google_analytics.js google_analytics/analytics.js accessible-autocomplete/src/autocomplete.css]
Rails.application.config.assets.precompile += %w[
js_check.js
google_analytics.js
google_analytics/analytics.js
accessible-autocomplete/src/autocomplete.css
ey-provider-practitioner-consent-form.pdf
]

# Add GOVUK assets by name, these are assets not loaded via sass
Rails.application.config.assets.precompile += [
Expand Down

0 comments on commit ba733e0

Please sign in to comment.