Commit 3c2eccfe authored by Simonas's avatar Simonas

release 1.9.0

parent 13466be3
......@@ -66,14 +66,6 @@ if ( ! defined( 'WPINC' ) ) die;
<form name="form-recommend" action="<?php echo esc_url( admin_url('admin-post.php') ); ?>" method="post" enctype="multipart/form-data" class="c-form c-form--recommend">
<div id="action" class="c-form--action"></div>
<?php if (isset($_SESSION['recommend--s']) && $_SESSION['recommend--s'] == 1): ?>
<div class="c-form--success c-form--success-recommend">
<?php _e('Thank You for your recommendation!', 'biuro-contacts'); ?>
<br>
<?php _e('Your recommendation was send successfully, we will contact Your friend', 'biuro-contacts'); ?>
</div>
<?php endif; ?>
<div class="c-form--cols">
<div class="c-form--col c-form--col--about">
......@@ -84,7 +76,7 @@ if ( ! defined( 'WPINC' ) ) die;
<div class="c-form--row">
<label class="c-form--label" for="form-name"><?php _e('Your Name, surname', 'biuro-contacts'); ?></label>
<div class="c-form--input-wrap <?php if ($nameStatus) { echo "c-form--input-wrap--$nameStatus"; } ?>">
<input type="text" class="c-form--input" id="form-name" name="name" value="<?php echo $nameValue; ?>" <?php if ($nameStatus == 'error' || !$nameValue): ?> autofocus="autofocus" <?php endif; ?>>
<input type="text" class="c-form--input" id="form-name" name="name" value="<?php echo $nameValue; ?>" <?php if ($nameStatus == 'error'): ?> autofocus="autofocus" <?php endif; ?>>
</div>
<?php if ($nameMessage): ?>
<div class="c-form--validation-fixed c-form--validation-<?php echo $nameStatus; ?>">
......@@ -150,7 +142,7 @@ if ( ! defined( 'WPINC' ) ) die;
<div class="c-form--row">
<label class="c-form--label" for="recommend-form-name"><?php _e('Friend Name, surname', 'biuro-contacts'); ?></label>
<div class="c-form--input-wrap <?php if ($recommendNameStatus) { echo "c-form--input-wrap--$recommendNameStatus"; } ?>">
<input type="text" class="c-form--input" id="recommend-form-name" name="recommend_name" value="<?php echo $recommendNameValue; ?>" <?php if ($recommendNameStatus == 'error' || !$recommendNameValue): ?> autofocus="autofocus" <?php endif; ?>>
<input type="text" class="c-form--input" id="recommend-form-name" name="recommend_name" value="<?php echo $recommendNameValue; ?>" <?php if ($recommendNameStatus == 'error'): ?> autofocus="autofocus" <?php endif; ?>>
</div>
<?php if ($recommendNameMessage): ?>
<div class="c-form--validation-fixed c-form--validation-<?php echo $recommendNameStatus; ?>">
......@@ -264,109 +256,25 @@ function execCaptcha () {
</form>
<?php if($_SESSION['recommend--s'] == 1) {
?>
<script>
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({ event: 'b2c_form_submit_success_validated', label: 'Recommend page' });
</script>
<?php
unset($_SESSION['recommend--s']);
}?>
<?php /*
<?php if (isset($_SESSION['employers--s']) && $_SESSION['employers--s'] == 1) : ?>
<div class="c-form--success">
<?php _e('Thank You for contacting!', 'biuro-contacts'); ?>
<br>
<?php _e('You request was send successfully, we will contact You.', 'biuro-contacts'); ?>
</div>
<?php endif; ?>
<?php
if ( isset($_SESSION['employers--captcha-status']) && $_SESSION['employers--captcha-status'] == 'error' ):
?>
<div class="c-form--validation-fixed c-form--validation-error">
<?php _e('Sorry, something went wrong. Please try again', 'biuro-contacts'); ?>
</div>
<?php
unset($_SESSION['employers--captcha-status']);
endif;
?>
<?php
if ( !$_SESSION['employers--step'] ):
include_once('biuro-contacts-public--employers--step-1.php');
else:
include_once('biuro-contacts-public--employers--step-2.php');
endif;
?>
<input type="hidden" name="action" value="employers_post">
<?php wp_nonce_field('employers_post_nonce'); ?>
<input type="hidden" id="g-recaptcha-response" name="captcha">
<script src="https://www.google.com/recaptcha/api.js?onload=onloadCaptcha&render=6Lc76qoUAAAAALk0aYR500zOZVG1BicNl3GTb-Hu" async defer></script>
<script>
function onloadCaptcha () {
window.grecaptcha.ready(function () {
execCaptcha();
setInterval(execCaptcha, 90000);
});
}
function execCaptcha () {
var no = Math.floor(Math.random() * 999999) + 100000;
window.grecaptcha.execute('6Lc76qoUAAAAALk0aYR500zOZVG1BicNl3GTb-Hu', { action: 'employers/' + no }).then(function (token) {
if (document.getElementById('g-recaptcha-response')) {
document.getElementById('g-recaptcha-response').value = token;
}
});
}
</script>
</form>
<?php if($_SESSION['employers--s'] == 1) {
?>
<script>
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({ event: 'b2b_form_submit_success_validated' });
</script>
<?php
unset($_SESSION['employers--s']);
}?>
<?php if($_SESSION['employers--s'] == 2) {
?>
<?php if (isset($_SESSION['recommend--s']) && $_SESSION['recommend--s'] == 1): ?>
<div class="c-modal">
<div class="c-modal--inner">
<svg width="67px" height="67px">
<use xlink:href="#ico--success"></use>
</svg>
<p><?php _e('Thank You! The information has been successfully supplemented.', 'biuro-contacts'); ?></p>
<p><?php _e('Thank You for your recommendation!', 'biuro-contacts'); ?></p>
<p><?php _e('Your recommendation was send successfully, we will contact Your friend', 'biuro-contacts'); ?></p>
<p><button class="js-modal--close o-btn c-btn--main"><?php _e('OK', 'biuro-contacts'); ?></button></p>
</div>
</div>
<script>
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({ event: 'b2b_form_update_success_validated' });
window.dataLayer.push({ event: 'b2c_form_submit_success_validated', label: 'Recommend page' });
</script>
<?php
unset($_SESSION['employers--s']);
}?>
unset($_SESSION['recommend--s']);
endif;
?>
*/ ?>
......@@ -56,11 +56,11 @@
}
}
.c-form--success-recommend { margin: 0 -15px;
/*.c-form--success-recommend { margin: 0 -15px;
@media (--min--medium) {
margin: 0 -33px;
}
}
}*/
.c-form--headline { text-transform: uppercase; margin-bottom: 20px; font-weight: 500; font-size: 18px;
@media (--min--medium) {
......
......@@ -57,7 +57,7 @@
max-width: 500px; font-size: 32px; line-height: 56px; padding: 0 20px;
}
span {
display: inline-block; background: blue; font-weight: bold; padding: 3px 10px 1px; border-radius: 6px;
display: inline-block; background: #004ed4; font-weight: bold; padding: 3px 10px 1px; border-radius: 6px;
}
}
}
......
......@@ -22,11 +22,7 @@
flex: 1 1 40%; max-width: 500px; line-height: 29px;
}
img { max-width: 100%; height: auto; }
span { overflow: hidden; line-height: 24px;
/* @media (--min--medium) {
line-height: 28px;
}*/
}
span { display: block; line-height: 22px; overflow: hidden; }
}
/*.c-recommend-friend--img { margin-top: 40px; }*/
......
......@@ -96,7 +96,7 @@
elseif (get_page_template_slug() == 'page-recommend-friend.php'):
?>
<div class="c-footer-action">
<a href="#action" class="o-btn c-btn--main c-btn--footer"><?php _e('Recommend', 'biuro'); ?></a>
<a id="submit-recommend" href="#action" class="o-btn c-btn--main c-btn--footer"><?php _e('Recommend', 'biuro'); ?></a>
</div>
<?php
else:
......@@ -154,7 +154,7 @@
<?php
endif;
?>
<script src="/wp-content/themes/biuro/js/main-22d1e1ff.min.js" async></script>
<script src="/wp-content/themes/biuro/js/main-2471b05e.min.js" async></script>
<?php
// global $time_start;
......
......@@ -31,7 +31,7 @@
<link rel="preload" as="font" type="font/woff2" href="/wp-content/themes/biuro/fonts/roboto-v19-cyrillic_latin_cyrillic-ext_latin-ext-500.woff2" crossorigin="anonymous" >
<link rel="preload" as="font" type="font/woff2" href="/wp-content/themes/biuro/fonts/roboto-v19-cyrillic_latin_cyrillic-ext_latin-ext-regular.woff2" crossorigin="anonymous" >
<style><?php include 'css/core-c92308d5ef.min.css'; ?></style>
<style><?php include 'css/core-367835942f.min.css'; ?></style>
<link rel="preload" as="font" type="font/woff2" href="/wp-content/themes/biuro/fonts/roboto-v19-cyrillic_latin_cyrillic-ext_latin-ext-300.woff2" crossorigin="anonymous" >
<link rel="preload" as="font" type="font/woff2" href="/wp-content/themes/biuro/fonts/roboto-v19-cyrillic_latin_cyrillic-ext_latin-ext-700.woff2" crossorigin="anonymous" >
......
......@@ -31,7 +31,7 @@
<link rel="preload" as="font" type="font/woff2" href="/wp-content/themes/biuro/fonts/roboto-v19-cyrillic_latin_cyrillic-ext_latin-ext-500.woff2" crossorigin="anonymous" >
<link rel="preload" as="font" type="font/woff2" href="/wp-content/themes/biuro/fonts/roboto-v19-cyrillic_latin_cyrillic-ext_latin-ext-regular.woff2" crossorigin="anonymous" >
<style><?php include 'css/core-c92308d5ef.min.css'; ?></style>
<style><?php include 'css/core-367835942f.min.css'; ?></style>
<link rel="preload" as="font" type="font/woff2" href="/wp-content/themes/biuro/fonts/roboto-v19-cyrillic_latin_cyrillic-ext_latin-ext-300.woff2" crossorigin="anonymous" >
<link rel="preload" as="font" type="font/woff2" href="/wp-content/themes/biuro/fonts/roboto-v19-cyrillic_latin_cyrillic-ext_latin-ext-700.woff2" crossorigin="anonymous" >
......
......@@ -714,6 +714,22 @@ document.querySelectorAll('[name="form-position"], [name="form-employees"], [nam
form.addEventListener('submit', () => { submitContactsFrom(form); });
});
if (document.querySelector('#submit-recommend')) {
document.querySelector('#submit-recommend').addEventListener('click', (e) => {
e.preventDefault();
const button = document.querySelector('[name="form-recommend"] [type="submit"]');
if (!button) {
return;
}
e.currentTarget.classList.add('c-btn--disabled');
button.click();
});
}
const collapseContent = (n) => {
const h = n.scrollHeight;
const t = n.style.transition;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment