1
0
Fork 0

Make the form GDPR ready (#329)

<!--
  Thanks for submitting a pull request!
  Please provide enough information so that others can review your pull request.
-->

**Make the docsearch form GDPR compliant**

Needed to be 100% GDPR compliant. 

**Result**
Check the code
This commit is contained in:
Lucas Bonomi 2018-05-23 17:33:51 +02:00 committed by GitHub
parent 065514eb67
commit 05dc793690
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 3 deletions

View file

@ -44,6 +44,7 @@ window.addEventListener('load', function() {
var $email = $(this).find('input[name="email"]');
var $url = $(this).find('input[name="url"]');
var $owner = $(this).find('input[name="owner"]');
var $marketingOptin = $(this).find('input[name="marketing_optin"]');
var error = false;
$(this).find('.has-errors').removeClass('has-errors');
if (!$email.val()) {
@ -74,7 +75,9 @@ window.addEventListener('load', function() {
'https://go.pardot.com/l/139121/2016-08-05/ldp67?email=' +
encodeURIComponent($email.val()) +
'&website=' +
encodeURIComponent($url.val())
encodeURIComponent($url.val()) +
'&marketing_optin=' +
encodeURIComponent($gdprEmail.val())
);
$('.join-form-fill').hide();

View file

@ -24,7 +24,7 @@ layout: default
#section_why.page-section.pos-rel
.spacer40
.m800.m-l-r-auto.pos-rel.z-10
.m800.m-l-r-auto.pos-rel.z-5
%h2.page-section-title.upper-case.text-demi Why DocSearch?
.spacer32
%p.color-east-bay.text-regular We're kind of scratching our own itch here. As developers, we spend a lot of time reading documentation, and it isnt always easy to find the information we need.

View file

@ -20,7 +20,16 @@
%label
%input{type: 'checkbox', name: 'owner'}
%span I'm the <u>owner</u> of that website
.spacer32
.row
.form-group.pos-rel.p-small
%div
%input.fill-titan.pos-rel.p-r-small#marketing_optin{name: "marketing_optin", type: "checkbox", value: 'true'}
%label.text-sm{for: "accept_email", style: "display:inline;margin-left: 8px;letter-spacing: unset;font-weight: 500;text-transform: initial"} Yes, I'd like to receive more information on Algolia products, events and promotions via email
%div
%p
Refer to
%a{href: "https://www.algolia.com/policies/terms", class:"clickable"} Algolia's Privacy Policy
for more information on how we use and protect your data
.text-center
%button.btn.btn-static-primary.w100p{type: 'submit'}
Join the program