File: //var/www/quadcode-jobs/storage/framework/views/9a0d71e0b02fe21d4b784f5a9d3cc501a5607c0f.php
<?php $__env->startSection('head'); ?>
<script>
function recaptchaCallback() {
const reCaptchaOptions = {sitekey: '<?php echo e(env('RECAPTCHA_SITE_KEY')); ?>'};
if ($('#dataRequestFormCaptcha').length) {
window.dataRequestFormCaptcha = grecaptcha.render('dataRequestFormCaptcha', reCaptchaOptions);
}
if ($('#dataDeleteFormCaptcha').length) {
window.dataDeleteFormCaptcha = grecaptcha.render('dataDeleteFormCaptcha', reCaptchaOptions);
}
}
</script>
<script src="https://www.google.com/recaptcha/api.js?onload=recaptchaCallback&render=explicit&hl=en" async defer></script>
<?php $__env->stopSection(); ?>
<section class="data">
<h1 class="data__title">Data request</h1>
<p class="data__desc">In order to download your personal data, please specify the email that you disclosed to us when you applied for a vacancy, and we will provide you with a copy of your personal data currently stored in our systems in machine-readable format.</p>
<div class="data__col">
<form id="dataRequestForm" class="data__form" method="post" action="<?php echo e(route('data.request')); ?>">
<?php echo csrf_field(); ?>
<div class="data__form-content">
<div class="data__fields">
<div class="data__form-error"></div>
<input class="data__input" id="email" name="email" autocomplete="off" placeholder="Enter Email">
</div>
<div class="data__control">
<button class="data__button custom-button">Request data</button>
<div id="dataRequestFormCaptcha"></div>
</div>
</div>
<div class="data__success js-success-message">
Processing of your request may take up to 30 business days. If you no longer have access to the email address disclosed during the application process, please contact us at: <a href="mailto:dpo@quadcode.com" style="color: #25a6d2;">dpo@quadcode.com</a>
</div>
</form>
</div>
<h1 class="data__title">Delete data</h1>
<p class="data__desc">Deletion of your personal data is permanent. In order to DELETE your personal data currently stored in our system, you can do so by specifying the email that you indicated when applying for a vacancy. You will receive an email with further information on the matter and a confirmation link to your request. By proceeding and clicking the link in the email, your personal data will be permanently deleted from our system.</p>
<div class="data__col">
<form id="dataDeleteForm" class="data__form" method="post" action="<?php echo e(route('data.delete.request')); ?>">
<?php echo csrf_field(); ?>
<div class="data__form-content">
<div class="data__fields">
<div class="data__form-error"></div>
<input class="data__input" id="email" name="email" autocomplete="off" placeholder="Enter Email">
</div>
<div class="data__control">
<button class="data__button custom-button">Delete data</button>
<div id="dataDeleteFormCaptcha"></div>
</div>
</div>
<div class="data__success js-success-message">
Processing of your request may take up to 30 business days. If you no longer have access to the email address disclosed during the application process, please contact us at: <a href="mailto:dpo@quadcode.com" style="color: #25a6d2;">dpo@quadcode.com</a>
</div>
</form>
</div>
</section>
<script>
function request(formId) {
const $form = $('#' + formId);
const $formContent = $('.data__form-content', $form);
const $success = $('.data__success', $form);
const $error = $('.data__form-error', $form);
const $input = $('.data__input', $form);
const $button = $('.data__button', $form);
const data = new FormData($form[0]);
const fieldValue = $input.val();
const emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;
if (fieldValue.match(emailReg) && fieldValue !== '') {
$error.html('').hide();
$input.css('border', 'none');
} else {
$error.html('Invalid email address!').show();
$input.css('border', '#e62334 solid 1px');
return;
}
let captcha;
if ('dataRequestForm' === formId) {
captcha = grecaptcha.getResponse(window.dataRequestFormCaptcha);
} else {
captcha = grecaptcha.getResponse(window.dataDeleteFormCaptcha);
}
if (!captcha.length) {
$error.html('You didn\'t pass the "I\'m not a robot" test').show();
$input.css('border', '#e62334 solid 1px');
return;
}
$.ajax({
url: $form.attr('action'),
method: 'POST',
data: data,
dataType: 'json',
processData: false,
contentType: false,
cache: false,
beforeSend: function () {
$error.html('').hide();
$button.attr('disabled', true).addClass('disable');
},
success: function (res) {
if (res.success) {
$formContent.hide();
$success.show();
if (res.msg.length) {
$('.js-success-message', $form).prepend(res.msg + '<br/><br/>');
}
}
},
error: function (res) {
if (res.status === 422) {
const data = res.responseJSON.errors;
for (let i in data) {
$error.html(data[i][0]);
}
$input.css('border', '#e62334 solid 1px');
$error.show();
grecaptcha.reset();
$('.g-recaptcha').fadeIn();
}
},
complete: function () {
$button.attr('disabled', false).removeClass('disable');
}
});
}
$(function () {
$(document).on('submit', '#dataRequestForm, #dataDeleteForm', function (event) {
event.preventDefault();
request($(this).attr('id'));
});
});
</script>
<?php /**PATH /var/www/quadcode-jobs/resources/views/site/partials/data.blade.php ENDPATH**/ ?>