Commit f545043d authored by Simon's avatar Simon

Merge branch 'contacts-form' into dev

parents 40dd394e 674d0848
...@@ -34,9 +34,9 @@ const bundler = webpack(config); ...@@ -34,9 +34,9 @@ const bundler = webpack(config);
export function server () { export function server () {
bs.init({ bs.init({
logPrefix: 'Biuro', logPrefix: 'Biuro',
socket: { // socket: {
domain: 'dev.biuro.lt:2000' // domain: 'dev.biuro.lt:2000'
}, // },
proxy: { proxy: {
target: conf.proxy, target: conf.proxy,
ws: false ws: false
...@@ -46,7 +46,7 @@ export function server () { ...@@ -46,7 +46,7 @@ export function server () {
cert: conf.certs.cert cert: conf.certs.cert
}, },
files: [ files: [
// `wp-content/themes/${conf.name}/**/*.php`, `wp-content/**/*.php`,
`wp-content/themes/${conf.name}/css/main.min.css` `wp-content/themes/${conf.name}/css/main.min.css`
], ],
ghostMode: false, ghostMode: false,
...@@ -75,5 +75,5 @@ export function server () { ...@@ -75,5 +75,5 @@ export function server () {
gulp.watch([`wp-content/themes/${conf.name}/css/core.min.css`], { delay: 0 }, gulp.series(reload)); gulp.watch([`wp-content/themes/${conf.name}/css/core.min.css`], { delay: 0 }, gulp.series(reload));
gulp.watch([`wp-content/themes/${conf.name}/**/*.php`], { delay: 0 }, gulp.series(reload)); // gulp.watch([`wp-content/**/*.php`], { delay: 0 }, gulp.series(reload));
} }
...@@ -23,18 +23,25 @@ if ( ! defined( 'WPINC' ) ) die; ...@@ -23,18 +23,25 @@ if ( ! defined( 'WPINC' ) ) die;
<form id="form" name="form-employees" action="<?php echo esc_url( admin_url('admin-post.php') ); ?>" method="post" enctype="multipart/form-data" class="c-form c-form--employees"> <form id="form" name="form-employees" action="<?php echo esc_url( admin_url('admin-post.php') ); ?>" method="post" enctype="multipart/form-data" class="c-form c-form--employees">
<div id="action" class="c-form--action"></div> <div id="action" class="c-form--action"></div>
<?php <?php if (isset($_SESSION['employees--s']) && $_SESSION['employees--s'] == 1) : ?>
if ( isset($_SESSION['employees--captcha-status']) && $_SESSION['employees--captcha-status'] == 'error' ): <div class="c-form--success">
?> <?php _e('Thank You, we have successfully received data about you.', 'biuro-contacts'); ?>
<div class="c-form--validation-static c-form--validation-error"> <br>
<?php _e('Sorry, something went wrong. Please try again', 'biuro-contacts'); ?> <?php _e('You can add information about yourself by adding a city, message or CV', 'biuro-contacts'); ?>
</div> </div>
<?php endif; ?>
<?php <?php
if ( isset($_SESSION['employees--captcha-status']) && $_SESSION['employees--captcha-status'] == 'error' ):
?>
<div class="c-form--validation-static c-form--validation-error">
<?php _e('Sorry, something went wrong. Please try again', 'biuro-contacts'); ?>
</div>
unset($_SESSION['employees--captcha-status']); <?php
endif; unset($_SESSION['employees--captcha-status']);
?> endif;
?>
<?php <?php
...@@ -70,6 +77,7 @@ function execCaptcha () { ...@@ -70,6 +77,7 @@ function execCaptcha () {
<?php if(isset($_SESSION['employees--s']) && $_SESSION['employees--s'] == 1) { <?php if(isset($_SESSION['employees--s']) && $_SESSION['employees--s'] == 1) {
?> ?>
<?php /*
<div class="c-modal"> <div class="c-modal">
<div class="c-modal--inner"> <div class="c-modal--inner">
<svg width="67px" height="67px"> <svg width="67px" height="67px">
...@@ -80,6 +88,8 @@ function execCaptcha () { ...@@ -80,6 +88,8 @@ function execCaptcha () {
<p><button class="js-modal--close o-btn c-btn--main"><?php _e('OK', 'biuro-contacts'); ?></button></p> <p><button class="js-modal--close o-btn c-btn--main"><?php _e('OK', 'biuro-contacts'); ?></button></p>
</div> </div>
</div> </div>
*/ ?>
<script> <script>
window.dataLayer = window.dataLayer || []; window.dataLayer = window.dataLayer || [];
</script> </script>
...@@ -87,19 +97,19 @@ window.dataLayer = window.dataLayer || []; ...@@ -87,19 +97,19 @@ window.dataLayer = window.dataLayer || [];
if (isset($attr['page']) && $attr['page'] == 'landing-1'): if (isset($attr['page']) && $attr['page'] == 'landing-1'):
?> ?>
<script> <script>
window.dataLayer.push({ 'event': 'b2c_form_submit_success_validated', 'label': 'Landing page 1' }); window.dataLayer.push({ event: 'b2c_form_submit_success_validated', label: 'Landing page 1' });
</script> </script>
<?php <?php
elseif (isset($attr['page']) && $attr['page'] == 'landing-2'): elseif (isset($attr['page']) && $attr['page'] == 'landing-2'):
?> ?>
<script> <script>
window.dataLayer.push({ 'event': 'b2c_form_submit_success_validated', 'label': 'Landing page 2' }); window.dataLayer.push({ event: 'b2c_form_submit_success_validated', label: 'Landing page 2' });
</script> </script>
<?php <?php
else: else:
?> ?>
<script> <script>
window.dataLayer.push({ 'event': 'b2c_form_submit_success_validated', 'label': 'Contact page' }); window.dataLayer.push({ event: 'b2c_form_submit_success_validated', label: 'Contact page' });
</script> </script>
<?php <?php
endif; endif;
...@@ -129,19 +139,19 @@ window.dataLayer = window.dataLayer || []; ...@@ -129,19 +139,19 @@ window.dataLayer = window.dataLayer || [];
if (isset($attr['page']) && $attr['page'] == 'landing-1'): if (isset($attr['page']) && $attr['page'] == 'landing-1'):
?> ?>
<script> <script>
window.dataLayer.push({ 'event': 'b2c_form_update_success_validated', 'label': 'Landing page 1' }); window.dataLayer.push({ event: 'b2c_form_update_success_validated', label: 'Landing page 1' });
</script> </script>
<?php <?php
elseif (isset($attr['page']) && $attr['page'] == 'landing-2'): elseif (isset($attr['page']) && $attr['page'] == 'landing-2'):
?> ?>
<script> <script>
window.dataLayer.push({ 'event': 'b2c_form_update_success_validated', 'label': 'Landing page 2' }); window.dataLayer.push({ event: 'b2c_form_update_success_validated', label: 'Landing page 2' });
</script> </script>
<?php <?php
else: else:
?> ?>
<script> <script>
window.dataLayer.push({ 'event': 'b2c_form_update_success_validated', 'label': 'Contact page' }); window.dataLayer.push({ event: 'b2c_form_update_success_validated', label: 'Contact page' });
</script> </script>
<?php <?php
endif; endif;
......
...@@ -23,19 +23,26 @@ if ( ! defined( 'WPINC' ) ) die; ...@@ -23,19 +23,26 @@ if ( ! defined( 'WPINC' ) ) die;
<form name="form-employers" action="<?php echo esc_url( admin_url('admin-post.php') ); ?>" method="post" enctype="multipart/form-data" class="c-form c-form--employers"> <form name="form-employers" action="<?php echo esc_url( admin_url('admin-post.php') ); ?>" method="post" enctype="multipart/form-data" class="c-form c-form--employers">
<div id="action" class="c-form--action"></div> <div id="action" class="c-form--action"></div>
<?php <?php if (isset($_SESSION['employers--s']) && $_SESSION['employers--s'] == 1) : ?>
if ( isset($_SESSION['employers--captcha-status']) && $_SESSION['employers--captcha-status'] == 'error' ): <div class="c-form--success">
?> <?php _e('Thank You for contacting!', 'biuro-contacts'); ?>
<div class="c-form--validation-static c-form--validation-error"> <br>
<?php _e('Sorry, something went wrong. Please try again', 'biuro-contacts'); ?> <?php _e('You request was send successfully, we will contact You.', 'biuro-contacts'); ?>
</div> </div>
<?php endif; ?>
<?php <?php
if ( isset($_SESSION['employers--captcha-status']) && $_SESSION['employers--captcha-status'] == 'error' ):
?>
<div class="c-form--validation-static c-form--validation-error">
<?php _e('Sorry, something went wrong. Please try again', 'biuro-contacts'); ?>
</div>
unset($_SESSION['employers--captcha-status']); <?php
endif; unset($_SESSION['employers--captcha-status']);
?> endif;
<?php ?>
<?php
if ( !$_SESSION['employers--step'] ): if ( !$_SESSION['employers--step'] ):
include_once('biuro-contacts-public--employers--step-1.php'); include_once('biuro-contacts-public--employers--step-1.php');
...@@ -69,6 +76,9 @@ function execCaptcha () { ...@@ -69,6 +76,9 @@ function execCaptcha () {
<?php if($_SESSION['employers--s'] == 1) { <?php if($_SESSION['employers--s'] == 1) {
?> ?>
<?php
/*
<div class="c-modal"> <div class="c-modal">
<div class="c-modal--inner"> <div class="c-modal--inner">
<svg width="67px" height="67px"> <svg width="67px" height="67px">
...@@ -80,9 +90,12 @@ function execCaptcha () { ...@@ -80,9 +90,12 @@ function execCaptcha () {
</div> </div>
</div> </div>
*/
?>
<script> <script>
window.dataLayer = window.dataLayer || []; window.dataLayer = window.dataLayer || [];
window.dataLayer.push({ 'event': 'b2b_form_submit_success_validated' }); window.dataLayer.push({ event: 'b2b_form_submit_success_validated' });
</script> </script>
<?php <?php
unset($_SESSION['employers--s']); unset($_SESSION['employers--s']);
...@@ -103,7 +116,7 @@ unset($_SESSION['employers--s']); ...@@ -103,7 +116,7 @@ unset($_SESSION['employers--s']);
<script> <script>
window.dataLayer = window.dataLayer || []; window.dataLayer = window.dataLayer || [];
window.dataLayer.push({ 'event': 'b2b_form_update_success_validated' }); window.dataLayer.push({ event: 'b2b_form_update_success_validated' });
</script> </script>
<?php <?php
......
...@@ -19,12 +19,18 @@ ...@@ -19,12 +19,18 @@
} }
} }
.c-form--position { padding: 28px 20px 20px;border-radius: 3px; background-color: #ffffff; .c-form--position { padding: 28px 20px 20px; border-radius: 3px; background-color: #ffffff;
@media (--min--medium) { @media (--min--medium) {
margin: -40px -15px 0; box-shadow: 0 1px 31px -23px #6A7481; margin: -40px -15px 0; box-shadow: 0 1px 31px -23px #6A7481;
} }
} }
.c-form--success { margin: -28px -20px 20px; padding: 28px 20px 20px; border-radius: 3px 3px 0 0; text-align: center; color: #27b199; font-style: 18px; line-height: 25px; background: #e5fdf9; font-weight: 500;
@media (--min--medium) {
margin: -38px -35px 20px; padding: 28px 35px 20px;
}
}
.c-form--row { position: relative; margin-bottom: 20px; } .c-form--row { position: relative; margin-bottom: 20px; }
.c-form--row-sticky { .c-form--row-sticky {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
/******/ /******/
/******/ var hotApplyOnUpdate = true; /******/ var hotApplyOnUpdate = true;
/******/ // eslint-disable-next-line no-unused-vars /******/ // eslint-disable-next-line no-unused-vars
/******/ var hotCurrentHash = "0bbb4e1cd69f1d91c4f1"; /******/ var hotCurrentHash = "d96ae202b0659d07c501";
/******/ var hotRequestTimeout = 10000; /******/ var hotRequestTimeout = 10000;
/******/ var hotCurrentModuleData = {}; /******/ var hotCurrentModuleData = {};
/******/ var hotCurrentChildModule; /******/ var hotCurrentChildModule;
......
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