Commit 2e7c6bfb authored by Simon's avatar Simon

release 1.5.2

parent edbe6965
...@@ -20,9 +20,9 @@ ...@@ -20,9 +20,9 @@
## Production ## Production
- build CSS & JS assets - `C:\web\dev.biuro\ npm run build` - build CSS & JS assets - `C:\web\dev.biuro\ npm run build`
- build new image `docker build -t biuro/web:1.5.1 .` (update version number) - build new image `docker build -t biuro/web:1.5.2 .` (update version number)
- login to biuro docker account `docker login --username=biuro --password=9Ndtjd2vKsLvGuFOeFq1KdJs` - login to biuro docker account `docker login --username=biuro --password=9Ndtjd2vKsLvGuFOeFq1KdJs`
- push image to docker repository - `docker push biuro/web:1.5.1` - push image to docker repository - `docker push biuro/web:1.5.2`
## Production ## Production
- update biuro/web image version in .env file (staging or www) - update biuro/web image version in .env file (staging or www)
......
{ {
"name": "biuro", "name": "biuro",
"version": "1.5.1", "version": "1.5.2",
"description": "Biuro WP theme", "description": "Biuro WP theme",
"scripts": { "scripts": {
"dev": "gulp --require @babel/register --gulpfile tasks", "dev": "gulp --require @babel/register --gulpfile tasks",
......
...@@ -48,17 +48,22 @@ if ( ! defined( 'WPINC' ) ) die; ...@@ -48,17 +48,22 @@ if ( ! defined( 'WPINC' ) ) die;
<?php wp_nonce_field('employees_post_nonce'); ?> <?php wp_nonce_field('employees_post_nonce'); ?>
<input type="hidden" id="g-recaptcha-response" name="captcha"> <input type="hidden" id="g-recaptcha-response" name="captcha">
<script src="https://www.google.com/recaptcha/api.js?onload=onloadRecaptcha&render=6Lc76qoUAAAAALk0aYR500zOZVG1BicNl3GTb-Hu" async defer></script> <script src="https://www.google.com/recaptcha/api.js?onload=onloadCaptcha&render=6Lc76qoUAAAAALk0aYR500zOZVG1BicNl3GTb-Hu" async defer></script>
<script> <script>
var onloadRecaptcha = function () { function onloadCaptcha () {
window.grecaptcha.ready(function () { window.grecaptcha.ready(function () {
window.grecaptcha.execute('6Lc76qoUAAAAALk0aYR500zOZVG1BicNl3GTb-Hu', { action: 'employees' }).then(function (token) { execCaptcha();
if (document.getElementById('g-recaptcha-response')) { setInterval(execCaptcha, 90000);
document.getElementById('g-recaptcha-response').value = token;
}
});
}); });
}; }
function execCaptcha () {
var no = Math.floor(Math.random() * 999999) + 100000;
window.grecaptcha.execute('6Lc76qoUAAAAALk0aYR500zOZVG1BicNl3GTb-Hu', { action: 'employees/' + no }).then(function (token) {
if (document.getElementById('g-recaptcha-response')) {
document.getElementById('g-recaptcha-response').value = token;
}
});
}
</script> </script>
</form> </form>
......
...@@ -47,17 +47,22 @@ if ( ! defined( 'WPINC' ) ) die; ...@@ -47,17 +47,22 @@ if ( ! defined( 'WPINC' ) ) die;
<?php wp_nonce_field('employers_post_nonce'); ?> <?php wp_nonce_field('employers_post_nonce'); ?>
<input type="hidden" id="g-recaptcha-response" name="captcha"> <input type="hidden" id="g-recaptcha-response" name="captcha">
<script src="https://www.google.com/recaptcha/api.js?onload=onloadRecaptcha&render=6Lc76qoUAAAAALk0aYR500zOZVG1BicNl3GTb-Hu" async defer></script> <script src="https://www.google.com/recaptcha/api.js?onload=onloadCaptcha&render=6Lc76qoUAAAAALk0aYR500zOZVG1BicNl3GTb-Hu" async defer></script>
<script> <script>
var onloadRecaptcha = function () { function onloadCaptcha () {
window.grecaptcha.ready(function () { window.grecaptcha.ready(function () {
window.grecaptcha.execute('6Lc76qoUAAAAALk0aYR500zOZVG1BicNl3GTb-Hu', { action: 'employers' }).then(function (token) { execCaptcha();
if (document.getElementById('g-recaptcha-response')) { setInterval(execCaptcha, 90000);
document.getElementById('g-recaptcha-response').value = token;
}
});
}); });
}; }
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> </script>
</form> </form>
......
...@@ -53,13 +53,18 @@ if ( ! defined( 'WPINC' ) ) die; ...@@ -53,13 +53,18 @@ if ( ! defined( 'WPINC' ) ) die;
<input type="hidden" id="g-recaptcha-response" name="captcha"> <input type="hidden" id="g-recaptcha-response" name="captcha">
<script src="https://www.google.com/recaptcha/api.js?render=6Lc76qoUAAAAALk0aYR500zOZVG1BicNl3GTb-Hu"></script> <script src="https://www.google.com/recaptcha/api.js?render=6Lc76qoUAAAAALk0aYR500zOZVG1BicNl3GTb-Hu"></script>
<script> <script>
window.grecaptcha.ready(function () { function execCaptcha () {
window.grecaptcha.execute('6Lc76qoUAAAAALk0aYR500zOZVG1BicNl3GTb-Hu', { action: 'position/<?php echo $job_id; ?>' }).then(function (token) { var no = Math.floor(Math.random() * 999999) + 100000;
window.grecaptcha.execute('6Lc76qoUAAAAALk0aYR500zOZVG1BicNl3GTb-Hu', { action: 'position/<?php echo $job_id; ?>/' + no }).then(function (token) {
if (document.getElementById('g-recaptcha-response')) { if (document.getElementById('g-recaptcha-response')) {
document.getElementById('g-recaptcha-response').value = token; document.getElementById('g-recaptcha-response').value = token;
} }
}); });
}
window.grecaptcha.ready(function () {
execCaptcha();
}); });
setInterval(execCaptcha, 90000);
</script> </script>
<?php <?php
endif; endif;
......
...@@ -12,6 +12,10 @@ ...@@ -12,6 +12,10 @@
&:hover { background: var(--color--green-darker); } &:hover { background: var(--color--green-darker); }
} }
.c-btn--disabled { background: #868f98; outline: none; pointer-events: none; user-select: none;
&:hover { background: #868f98; cursor: not-allowed; }
}
.c-btn--vdb { color: #fff; background: #ff7046; .c-btn--vdb { color: #fff; background: #ff7046;
&:hover { background: #ff501d } &:hover { background: #ff501d }
} }
......
This diff is collapsed.
This diff is collapsed.
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
<?php <?php
endif; endif;
?> ?>
<script src="/wp-content/themes/biuro/js/main-ce5a40c4.min.js" async></script> <script src="/wp-content/themes/biuro/js/main-ae0b33f0.min.js" async></script>
<?php <?php
// global $time_start; // global $time_start;
......
...@@ -31,7 +31,7 @@ ...@@ -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-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" > <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-5d2eb7bd1b.min.css'; ?></style> <style><?php include 'css/core-d05ad11b51.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-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" > <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 @@ ...@@ -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-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" > <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-5d2eb7bd1b.min.css'; ?></style> <style><?php include 'css/core-d05ad11b51.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-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" > <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" >
......
...@@ -149,6 +149,25 @@ if (window.NodeList && !NodeList.prototype.forEach) { ...@@ -149,6 +149,25 @@ if (window.NodeList && !NodeList.prototype.forEach) {
NodeList.prototype.forEach = Array.prototype.forEach; NodeList.prototype.forEach = Array.prototype.forEach;
} }
(function (arr) {
arr.forEach(function (item) {
if (item.hasOwnProperty('remove')) {
return;
}
Object.defineProperty(item, 'remove', {
configurable: true,
enumerable: true,
writable: true,
value: function remove () {
if (this.parentNode === null) {
return;
}
this.parentNode.removeChild(this);
}
});
});
})([Element.prototype, CharacterData.prototype, DocumentType.prototype]);
(global => { (global => {
const container = document.getElementById('cookie-warning'); const container = document.getElementById('cookie-warning');
const btnAgree = document.getElementById('cookie-agree'); const btnAgree = document.getElementById('cookie-agree');
...@@ -556,3 +575,13 @@ if (document.querySelector('.js-copy-to-clipboard')) { ...@@ -556,3 +575,13 @@ if (document.querySelector('.js-copy-to-clipboard')) {
// if (document.querySelectorAll('.c-feedbacks--inner').length) { // if (document.querySelectorAll('.c-feedbacks--inner').length) {
// feedbacks(); // feedbacks();
// } // }
const submitContactsFrom = (form) => {
if (form.querySelector('[type="submit"]')) {
form.querySelector('[type="submit"]').classList.add('c-btn--disabled');
}
};
document.querySelectorAll('[name="form-position"], [name="form-employees"], [name="form-employers"]').forEach((form) => {
form.addEventListener('submit', () => { submitContactsFrom(form); });
});
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