Commit a39601e3 authored by Simonas's avatar Simonas

Merge branch 'release-0.0.25'

parents 07802f5f 20003eb4
...@@ -40,7 +40,7 @@ if ( ! defined( 'WPINC' ) ) die; ...@@ -40,7 +40,7 @@ if ( ! defined( 'WPINC' ) ) die;
<div class="c-form--row"> <div class="c-form--row">
<label class="c-form--label" for="form-name"><?php _e('Name, surname', 'biuro-contacts'); ?></label> <label class="c-form--label" for="form-name"><?php _e('Name, surname', 'biuro-contacts'); ?></label>
<div class="c-form--input-wrap <?php if ($nameStatus) { echo "c-form--input-wrap--$nameStatus"; } ?>"> <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' || $phoneStatus != 'error' && $agreeStatus == 'error' || isset($_GET['focus']) ): ?> autofocus="autofocus" <?php endif; ?>> <input type="text" class="c-form--input" id="form-name" name="name" value="<?php echo $nameValue; ?>" <?php if ($nameStatus == 'error' || isset($_GET['focus']) && $nameStatus != 'error' && $phoneStatus != 'error' && $agreeStatus != 'error' ): ?> autofocus="autofocus" <?php endif; ?>>
</div> </div>
<?php if ($nameMessage): ?> <?php if ($nameMessage): ?>
<div class="c-form--validation c-form--validation-<?php echo $nameStatus; ?>"> <div class="c-form--validation c-form--validation-<?php echo $nameStatus; ?>">
...@@ -81,7 +81,7 @@ if ( ! defined( 'WPINC' ) ) die; ...@@ -81,7 +81,7 @@ if ( ! defined( 'WPINC' ) ) die;
<div class="c-form--row"> <div class="c-form--row">
<div class="c-form--checkbox-wrap"> <div class="c-form--checkbox-wrap">
<input id="form-agree" type="checkbox" class="c-form--checkbox <?php if ($agreeStatus) { echo "c-form--checkbox--$agreeStatus"; } ?>" name="agree" value="1" <?php if ($agreeValue): ?> checked="checked"<?php endif; ?>> <input id="form-agree" type="checkbox" class="c-form--checkbox <?php if ($agreeStatus) { echo "c-form--checkbox--$agreeStatus"; } ?>" name="agree" value="1" <?php if ($agreeValue): ?> checked="checked"<?php endif; ?> <?php if ($nameStatus != 'error' && $phoneStatus != 'error' && $agreeStatus == 'error'): ?> autofocus="autofocus" <?php endif; ?> >
<label class="c-form--label-checkbox" for="form-agree"><?php _e('I agree, that my personal data will be used for offering me a job. For more detailed information view our <a href="https://biuro.eu/privacy-en.html" target="_blank" rel="noopener">Personal Data Protection Policy.</a>', 'biuro-contacts'); ?></label> <label class="c-form--label-checkbox" for="form-agree"><?php _e('I agree, that my personal data will be used for offering me a job. For more detailed information view our <a href="https://biuro.eu/privacy-en.html" target="_blank" rel="noopener">Personal Data Protection Policy.</a>', 'biuro-contacts'); ?></label>
</div> </div>
<?php if ($agreeMessage): ?> <?php if ($agreeMessage): ?>
......
...@@ -40,7 +40,7 @@ if ( ! defined( 'WPINC' ) ) die; ...@@ -40,7 +40,7 @@ if ( ! defined( 'WPINC' ) ) die;
<div class="c-form--row"> <div class="c-form--row">
<label class="c-form--label" for="form-name"><?php _e('Name, surname', 'biuro-contacts'); ?></label> <label class="c-form--label" for="form-name"><?php _e('Name, surname', 'biuro-contacts'); ?></label>
<div class="c-form--input-wrap <?php if ($nameStatus) { echo "c-form--input-wrap--$nameStatus"; } ?>"> <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' || $phoneStatus != 'error' && $agreeStatus == 'error' || isset($_GET['focus']) ): ?> autofocus="autofocus" <?php endif; ?>> <input type="text" class="c-form--input" id="form-name" name="name" value="<?php echo $nameValue; ?>" <?php if ($nameStatus == 'error' || isset($_GET['focus']) && $nameStatus != 'error' && $phoneStatus != 'error' && $agreeStatus != 'error' ): ?> autofocus="autofocus" <?php endif; ?>>
</div> </div>
<?php if ($nameMessage): ?> <?php if ($nameMessage): ?>
<div class="c-form--validation c-form--validation-<?php echo $nameStatus; ?>"> <div class="c-form--validation c-form--validation-<?php echo $nameStatus; ?>">
...@@ -81,7 +81,7 @@ if ( ! defined( 'WPINC' ) ) die; ...@@ -81,7 +81,7 @@ if ( ! defined( 'WPINC' ) ) die;
<div class="c-form--row"> <div class="c-form--row">
<div class="c-form--checkbox-wrap"> <div class="c-form--checkbox-wrap">
<input id="form-agree" type="checkbox" class="c-form--checkbox <?php if ($agreeStatus) { echo "c-form--checkbox--$agreeStatus"; } ?>" name="agree" value="1" <?php if ($agreeValue): ?> checked="checked"<?php endif; ?>> <input id="form-agree" type="checkbox" class="c-form--checkbox <?php if ($agreeStatus) { echo "c-form--checkbox--$agreeStatus"; } ?>" name="agree" value="1" <?php if ($agreeValue): ?> checked="checked"<?php endif; ?> <?php if ($nameStatus != 'error' && $phoneStatus != 'error' && $agreeStatus == 'error'): ?> autofocus="autofocus" <?php endif; ?> >
<label class="c-form--label-checkbox" for="form-agree"><?php _e('I agree, that my personal data will be used for communicating during the pre-contractual relationship. For more detailed information view our <a href="https://biuro.eu/privacy-en.html" target="_blank" rel="noopener">Personal Data Protection Policy.</a>', 'biuro-contacts'); ?></label> <label class="c-form--label-checkbox" for="form-agree"><?php _e('I agree, that my personal data will be used for communicating during the pre-contractual relationship. For more detailed information view our <a href="https://biuro.eu/privacy-en.html" target="_blank" rel="noopener">Personal Data Protection Policy.</a>', 'biuro-contacts'); ?></label>
</div> </div>
<?php if ($agreeMessage): ?> <?php if ($agreeMessage): ?>
......
...@@ -22,7 +22,7 @@ if ( ! defined( 'WPINC' ) ) die; ...@@ -22,7 +22,7 @@ if ( ! defined( 'WPINC' ) ) die;
<div class="c-form--row"> <div class="c-form--row">
<label class="c-form--label" for="form-company"><?php _e('Company', 'biuro-contacts'); ?></label> <label class="c-form--label" for="form-company"><?php _e('Company', 'biuro-contacts'); ?></label>
<div class="c-form--input-wrap"> <div class="c-form--input-wrap">
<input type="text" class="c-form--input" id="form-company" name="company" value=""> <input type="text" class="c-form--input" id="form-company" name="company" value="" autofocus="autofocus">
</div> </div>
</div><!-- .c-form--row --> </div><!-- .c-form--row -->
......
...@@ -117,7 +117,7 @@ if ( ! defined( 'WPINC' ) ) die; ...@@ -117,7 +117,7 @@ if ( ! defined( 'WPINC' ) ) die;
<div class="c-form--row"> <div class="c-form--row">
<div class="c-form--checkbox-wrap"> <div class="c-form--checkbox-wrap">
<input id="form-agree" type="checkbox" class="c-form--checkbox <?php if ($agreeStatus) { echo "c-form--checkbox--$agreeStatus"; } ?>" name="agree" value="1" <?php if ($agreeValue): ?> checked="checked"<?php endif; ?>> <input id="form-agree" type="checkbox" class="c-form--checkbox <?php if ($agreeStatus) { echo "c-form--checkbox--$agreeStatus"; } ?>" name="agree" value="1" <?php if ($agreeValue): ?> checked="checked"<?php endif; ?> <?php if ($nameStatus != 'error' && $phoneStatus != 'error' && $agreeStatus == 'error'): ?> autofocus="autofocus" <?php endif; ?> >
<label class="c-form--label-checkbox" for="form-agree"><?php _e('I agree, that my personal data will be used for offering me a job. For more detailed information view our <a href="https://biuro.eu/privacy-en.html" target="_blank" rel="noopener">Personal Data Protection Policy.</a>', 'biuro-contacts'); ?></label> <label class="c-form--label-checkbox" for="form-agree"><?php _e('I agree, that my personal data will be used for offering me a job. For more detailed information view our <a href="https://biuro.eu/privacy-en.html" target="_blank" rel="noopener">Personal Data Protection Policy.</a>', 'biuro-contacts'); ?></label>
</div> </div>
<?php if ($agreeMessage): ?> <?php if ($agreeMessage): ?>
......
...@@ -50,8 +50,8 @@ ...@@ -50,8 +50,8 @@
.c-form--submit-wrap { padding: 10px 0; } .c-form--submit-wrap { padding: 10px 0; }
.c-form--checkbox-wrap { display: flex; } .c-form--checkbox-wrap { display: flex; position: relative; }
.c-form--checkbox { position: absolute; top: 0; left: -9999px; visibility: hidden; .c-form--checkbox { position: absolute; top: 0; left: 0; visibility: hidden;
&:checked { &:checked {
+ label { + label {
&:before { border-color: #d4d4d4; } &:before { border-color: #d4d4d4; }
......
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
'//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); '//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-THF42F');</script> })(window,document,'script','dataLayer','GTM-THF42F');</script>
<script src="/wp-content/themes/biuro/js/main-eabfed8e.min.js" async></script> <script src="/wp-content/themes/biuro/js/main-26e99805.min.js" async></script>
<?php wp_footer(); ?> <?php wp_footer(); ?>
</body> </body>
</html> </html>
...@@ -558,3 +558,9 @@ function biuro_theme_setup(){ ...@@ -558,3 +558,9 @@ function biuro_theme_setup(){
load_theme_textdomain( 'biuro', get_template_directory() . '/languages' ); load_theme_textdomain( 'biuro', get_template_directory() . '/languages' );
} }
add_action( 'after_setup_theme', 'biuro_theme_setup' ); add_action( 'after_setup_theme', 'biuro_theme_setup' );
// remove
function wpseo_canonical_exclude( $canonical ) {
return false;
}
add_filter( 'wpseo_canonical', 'wpseo_canonical_exclude' );
...@@ -32,7 +32,7 @@ define('cityID', $cityID); ...@@ -32,7 +32,7 @@ define('cityID', $cityID);
?> ?>
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700" rel="stylesheet">
<style><?php include 'css/core-d26cdaf59b.min.css'; ?></style> <style><?php include 'css/core-3c61bf687c.min.css'; ?></style>
<link rel="preload" href="/wp-content/themes/biuro/css/main-d091026dbb.min.css" as="style" onload="this.rel='stylesheet'"> <link rel="preload" href="/wp-content/themes/biuro/css/main-d091026dbb.min.css" as="style" onload="this.rel='stylesheet'">
......
...@@ -383,9 +383,17 @@ if (document.querySelector('.js-modal--close')) { ...@@ -383,9 +383,17 @@ if (document.querySelector('.js-modal--close')) {
modal.remove(); modal.remove();
} }
if (document.querySelector('[autofocus]')) { const node = document.querySelector('.c-form [autofocus]');
document.querySelector('[autofocus]').focus();
if (!node) {
return;
} }
const offset = node.getBoundingClientRect();
setTimeout(() => {
window.scrollTo(0, offset.top - 170);
}, 25);
}); });
} }
...@@ -425,3 +433,17 @@ if (document.querySelector('.js-copy-to-clipboard')) { ...@@ -425,3 +433,17 @@ if (document.querySelector('.js-copy-to-clipboard')) {
}); });
} }
(global => {
const node = document.querySelector('.c-form [autofocus]');
if (!node) {
return;
}
const offset = node.getBoundingClientRect();
setTimeout(() => {
window.scrollTo(0, offset.top - 170);
}, 25);
})(window);
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