Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <head>
- <meta charset="utf-8">
- <title>In-store Raffle</title>
- <meta name="viewport" content="width=device-width,initial-scale=1">
- <style>
- @font-face {
- font-family: Helvetica-local;
- src: url(https://jdsports-client-resources.s3.amazonaws.com/third-party/fonts/Helvetica.ttf) format('truetype');
- font-weight: 600;
- }
- body {
- background-color: #D3D3D3;
- margin: 0;
- font-family: Helvetica;
- font-weight: 600;
- }
- .compDisabled {
- height: 100%;
- width: 100%;
- position: fixed;
- background-color: rgba(255, 255, 255, 0.9);
- display: flex;
- flex-direction: column;
- justify-content: center;
- }
- .compDisabled span {
- text-align: center;
- font-size: 40px;
- font-weight: bold;
- padding: 0 36px;
- }
- .compWrapper img {
- display: block;
- max-width: 100%;
- margin: 0 auto;
- }
- #compForm {
- padding: 20px;
- }
- #compForm input[type=text],
- #compForm input[type=email],
- #compForm input[type=tel],
- #compForm input[type=button],
- #compForm select {
- width: 100%;
- height: 43px;
- box-sizing: border-box;
- padding: 7px 3%;
- margin-bottom: 5px;
- font-weight: bold;
- font-size: 14px;
- -webkit-appearance: none !important;
- -webkit-border-radius: 0 !important;
- border-radius: 0 !important;
- background: rgba(255, 255, 255, 0.6);
- border: 0;
- }
- #compForm select {
- cursor: pointer;
- }
- .termsBox1 {
- margin-top: 20px;
- margin-bottom: 20px;
- }
- #compForm input#submit {
- border: 0;
- cursor: pointer;
- background-color: #000;
- width: 60%;
- text-align: center;
- color: #fff;
- font-size: 14px;
- margin: 0 auto;
- display: block;
- margin-top: 30px;
- margin-bottom: 20px;
- }
- .compWrapper .formError {
- display: none;
- color: red;
- font-family: arial;
- }
- .termsText {
- font-size: 14px;
- }
- #sending {
- text-align: center;
- font-weight: bold;
- font-size: 24px;
- }
- #other {
- display: none;
- }
- ::-webkit-input-placeholder {
- color: #000;
- }
- :-moz-placeholder {
- /* Firefox 18- */
- color: #000;
- }
- ::-moz-placeholder {
- /* Firefox 19+ */
- color: #000;
- }
- :-ms-input-placeholder {
- color: #000;
- }
- </style>
- </head>
- <body>
- <div class="compWrapper">
- <!--<div class="compDisabled">
- <span>Next round - Starts @ 10am</span>
- </div> -->
- <img class="headerImg"
- src="https://i8.amplience.net/i/jpl/su19-sacai-assets-blazer-blue-1x1-2-71e4f77344d11d50bd6ef3955955db6b">
- <form id="compForm">
- <div class="compInfo">
- <p>Entrez vos coordonnées ci-dessous pour avoir la chance d'acheter la paire de <span class="product-name">Nike x Sacai Blazer </span>
- en magasin</p>
- </div>
- <input required="" type="text" name="fullName" id="fullName" class="js-required"
- placeholder="Prénom & Nom de famille:">
- <input required="" type="email" name="email" id="email" class="js-required" placeholder="E-Mail:">
- <input required="" type="text" name="phoneNumber" id="phoneNumber" class="js-required" placeholder="Téléphone:">
- <input required="" type="text" name="cityOfRes" id="cityOfRes" class="js-required"
- placeholder="Ville de résidence:">
- <input required="" type="text" name="countryOfRes" id="countryOfRes" class="js-required"
- placeholder="Pays de résidence:">
- <select form="compForm" name="shoetype" id="shoetype" class="js-required">
- <option value="" disabled="" selected="">Couleurs Disponibles:</option>
- <option value="BLUE">BLUE</option>
- <option value="YELLOW" id="option1">YELLOW</option>
- </select>
- <select form="compForm" name="shoeSize" id="shoeSize" class="js-required">
- <option value="" disabled="" selected="">Taille (EU):</option>
- <option value="36.5">36.5</option>
- <option value="37">37</option>
- <option value="37.5">37.5</option>
- <option value="38">38</option>
- <option value="38.5">38.5</option>
- <option value="39">39</option>
- <option value="39.5">39.5</option>
- <option value="40">40</option>
- <option value="40.5">40.5</option>
- <option value="41">41</option>
- <option value="42">42</option>
- <option value="42.5">42.5</option>
- <option value="43">43</option>
- <option value="43.5">43.5</option>
- <option value="44">44</option>
- <option value="44.5">44.5</option>
- <option value="45">45</option>
- <option value="45.5">45.5</option>
- <option value="46">46</option>
- <option value="47">47</option>
- <option value="47.5">47.5</option>
- </select>
- <input type="text" name="other" id="other">
- <div class="termsBox1">
- <input type="checkbox" name="termsAgreed" id="termsAgreed">
- <label for="termsAgreed" class="termsText">
- Je confirme que je participe pour la possibilité d’acheter UNE PAIRE de <span class="product-name">Nike x Sacai Blazer </span>
- pour la taille choisie, dans la boutique Footpatrol Paris. Je comprends que cette raffle est une
- participation par personne seulement, et que les participations multiples seront annulées. En cas de
- succès, vous acceptez de recevoir une communication marketing de notre part vous informant de votre gain
- et confirmez que vous acceptez nos termes et conditions associés (Section 13, <a
- href="https://www.footpatrol.fr/customer-service/terms/">https://www.footpatrol.fr/customer-service/terms/</a>)
- </label>
- </div>
- <p>Veuillez cocher si vous consentez à recevoir les messages marketing Footpatrol. Nous attirons également votre
- attention sur notre politique de confidentialité et les termes et conditions associés (<a
- href="https://www.footpatrol.fr/customer-service/terms/">https://www.footpatrol.fr/customer-service/terms/</a>).
- </p>
- <div class="termsBox2">
- <input type="checkbox" name="emailpermit" id="emailpermit">
- <label for="emailpermit" class="termsText">
- Email
- </label>
- </div>
- <div class="termsBox2">
- <input type="checkbox" name="sms_optout" id="sms_optout">
- <label for="sms_optout" class="termsText">
- SMS
- </label>
- </div>
- <p>En cochant cette case, vous confirmez que vous avez 18 ans ou plus</p>
- <div class="termsBox2">
- <input type="checkbox" name="agepermit" id="agepermit">
- <label for="agepermit" class="termsText">
- Confirmez
- </label>
- <input type="button" name="submit" id="submit" value="ENTER NOW">
- <p class="formError">* Veuillez remplir tous les champs</p>
- <div id="sending"></div>
- </div>
- </form>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
- <script
- src="https://cdnjs.cloudflare.com/ajax/libs/jQuery.serializeObject/2.0.3/jquery.serializeObject.min.js"></script>
- <script>
- var queryParams = function () {
- var params = window.location.search.split('?');
- return {
- tag: params[1].split('=')[1],
- shortTag: params[2].split('=')[1],
- productName: params[3].split('=').pop().split('-'),
- imgURL: params[4].split('=')[1]
- }
- };
- $(document).ready(function () {
- if (queryParams().imgURL) {
- $('.headerImg').attr('src', queryParams().imgURL);
- }
- var productNameStr = "";
- for (i = 0; i < queryParams().productName.length; i++) {
- productNameStr = productNameStr + queryParams().productName[i] + " ";
- }
- $('.product-name').text(productNameStr);
- $("#compForm input[type=button]").on('click', function (e) {
- var isFormValid = true;
- $("input.js-required").each(function () {
- if ($.trim($(this).val()).length == 0) {
- isFormValid = false;
- }
- });
- $("select.js-required").each(function () {
- if ($.trim($(this).val()).length == 0) {
- isFormValid = false;
- }
- });
- $("input[name=termsAgreed]").each(function () {
- if (!$(this).is(':checked')) {
- isFormValid = false;
- }
- });
- if (!isFormValid) {
- $(".formError").show();
- event.preventDefault();
- }
- if (isFormValid == true) {
- sendData();
- }
- return isFormValid;
- });
- });
- function sendData() {
- var name = $('input[name="fullName"]').val();
- var tel = $('input[name="phoneNumber"]').val();
- var email = $('input[name="email"]').val();
- var shoesize = $('select[name="shoeSize"]').val();
- var shoeType = $('select[name="shoetype"]').val();
- var countryOfRes = $('input[name="countryOfRes"]').val();
- var cityOfRes = $('input[name="cityOfRes"]').val();
- var emailpermit = $('input[name="emailpermit"]').val();
- var agePermit = $('input[name="agepermit"]').val();
- if (agePermit == 'on') {
- agePermit = 'Y';
- } else {
- agePermit = 'N';
- }
- if (emailpermit == "on") {
- emailpermit = "1";
- } else {
- emailpermit = "0";
- }
- var sms_optout = $('input[name="sms_optout"]').val();
- if (sms_optout == "on") {
- sms_optout = "0";
- } else {
- sms_optout = "1";
- }
- var tag = queryParams().tag;
- var shortTag = '&' + queryParams().shortTag;
- var posturl = 'https://redeye.footpatrol.com/cgi-bin/rr/blank.gif?nourl=' + tag + '&firstName=' + name + '&email=' + email + '&telephone=' + tel + shortTag + '_shoetype=' + shoeType + shortTag + '_shoesize=' + shoesize + shortTag + '_cityofres=' + cityOfRes + '&yzemail=' + tag + shortTag + '_countryofres=' + countryOfRes + '&emailpermit=' + emailpermit + '&agepermit=' + agePermit + '&sms_optout=' + sms_optout + '&site=FP¤cy=GBP';
- console.log(posturl);
- //var img = '<img src="' + posturl + '">';
- //$('body').append(img);
- //$('input[type="button"]').val('Inscription prise en compte');
- //$('input[type="button"]').attr('disabled', '');
- };
- // Strip Numbers
- $(document).on('change', 'input[name="phoneNumber"]', function () {
- var tel = $('input[name="phoneNumber"]');
- if (tel.val().match(/\b[^\d\W]+\b/g)) {
- var street = tel.val().replace(/\b[^\d\W]+\b/g, '');
- $(tel).val(street);
- }
- });
- </script>
- </div>
- </body>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement