Commit c6e4fdd5 authored by Simonas's avatar Simonas

Merge branch 'contact-form' into dev

parents 77e1b17f 6547bc10
......@@ -64,6 +64,11 @@ ERROR: for mysql Cannot start service mysql: error while creating mount source
### Solution
Restart docker (sometimes PC restart may be required)
### Error
Can't share C drive
### Solution
- https://tomssl.com/2018/01/11/sharing-your-c-drive-with-docker-for-windows-when-using-azure-active-directory-azuread-aad/
## Other (Commands)
- docker-compose up -d
......@@ -103,7 +108,7 @@ Restart docker (sometimes PC restart may be required)
- docker load --input ourdemo.tar
- docker build -t biuro/web:0.0.7 .
- docker build -t biuro/web:0.0.8 .
- docker login --username=biuro --password=9Ndtjd2vKsLvGuFOeFq1KdJs
- sudo docker login --username=biuro --password=9Ndtjd2vKsLvGuFOeFq1KdJs
- docker push biuro/web:0.0.7
......@@ -112,10 +117,11 @@ Restart docker (sometimes PC restart may be required)
### DB preview
- `docker exec -it dev-biuro-nginx sh`
- `docker exec -it dev-biuro-wordpress bash`
- `docker exec -it dev-biuro-mysql bash`
- `mysql -uroot -pIiIjnsLi2wR9i1kWVbVpUAzP --default-character-set=utf8`
- `use wordpress;`
- `mysql -uroot -p'q@z!z29AO5rpzMjsDhjnFKyF' --default-character-set=utf8`
- `use dev_biuro;`
- `show tables;`
- `use information_schema;`
......
......@@ -26,6 +26,7 @@ services:
- "front"
- "back"
volumes:
- ./nginx/.htpasswd:/etc/nginx/.htpasswd
- ./nginx/php.ini:/usr/local/etc/php/conf.d/php.ini
- ./wp-content/plugins/biuro-contacts:/var/www/html/wp-content/plugins/biuro-contacts
......@@ -75,6 +76,7 @@ services:
- '80:80'
- '443:443'
volumes:
- ./nginx/.htpasswd:/etc/nginx/.htpasswd
- ./nginx/conf.d:/etc/nginx/conf.d
- ./nginx/h5bp:/etc/nginx/h5bp
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
......@@ -136,8 +138,39 @@ services:
- ./wordpress:/var/www/html
- './wp-init.sh:/usr/local/bin/wp-init.sh'
command:
- wp-init.sh
# command:
# - wp-init.sh
command: >
/bin/sh -c '
sleep 45;
echo "WP CLI init";
wp core update --force;
wp core update-db --network;
wp option update permalink_structure "/%postname%/" --skip-themes --skip-plugins;
wp option update timezone_string "Manual Offsets/UTC+2";
wp option update date_format "Y-m-d";
wp option update time_format "H:i";
wp plugin install permalink-manager --force --activate-network;
wp plugin install pods --activate-network;
wp plugin install polylang --activate-network;
wp plugin install wordpress-seo --activate-network;
wp plugin update --all;
wp plugin activate akismet --network;
wp plugin activate biuro-contacts --network;
wp plugin activate biuro-feedbacks --network;
wp plugin activate biuro-html --network;
wp plugin activate biuro-sections --network;
wp plugin activate biuro-services --network;
wp plugin activate biuro-values --network;
wp plugin activate cookies-warning --network;
wp plugin activate data-controller --network;
wp theme update --all;
wp theme activate biuro;
wp language core update;
wp language theme update --all;
wp language plugin update --all;
echo "WP CLI done. Ready to use.";
'
networks:
front:
......
biuro_wp_api:$apr1$vvI07kKw$MysnayQWamZReKludVojG.
......@@ -15,6 +15,15 @@ index index.php;
location / {
try_files $uri $uri/ /index.php?$args;
# auth_basic "Restricted Content";
# auth_basic_user_file /etc/nginx/.htpasswd;
}
location /wp-json/api/v1/contacts {
try_files $uri $uri/ /index.php?$args;
auth_basic "Basic auth";
auth_basic_user_file /etc/nginx/.htpasswd;
# auth_basic_user_file /var/www/html/.htpasswd;
}
location ~ \.php$ {
......
......@@ -100,4 +100,77 @@ class Biuro_Contacts_Admin {
}
// date DEFAULT '0000-00-00 00:00:00',
// name tinytext,
// surname tinytext,
// email varchar(128) DEFAULT '',
// phone varchar(128) DEFAULT '',
// city varchar(255) DEFAULT '',
// comment longtext DEFAULT '',
// cv text DEFAULT '',
public function get_rows_from_db_as_associative_array() {
global $wpdb;
$sql = "SELECT * FROM `" . $wpdb->prefix . "biuro_employees` ORDER BY id DESC";
return $wpdb->get_results( $sql, ARRAY_A );
}
public function insert_row_to_db() {
global $wpdb;
$table = $wpdb->prefix . 'biuro_employees';
$data = array(
'db_field_tinytext' => 'SOME TEXT',
'db_field_datetime' => date( 'Y-m-d H:i:s' ),
'db_field_varchar' => 'SOME OTHER TEXT',
'db_field_mediumint' => 123,
'db_field_text' => 'LONGER TEXT',
);
$format = array( '%s','%s', '%s', '%d', '%s' );
$wpdb->insert( $table, $data, $format );
return $wpdb->insert_id;
}
public function update_row_in_db() {
global $wpdb;
$table = $wpdb->prefix . 'biuro_employees';
$data = array(
'db_field_tinytext' => 'SOME TEXT',
'db_field_datetime' => date( 'Y-m-d H:i:s' ),
'db_field_varchar' => 'SOME OTHER TEXT',
'db_field_mediumint' => 123,
'db_field_text' => 'LONGER TEXT',
);
$format = array( '%s','%s', '%s', '%d', '%s' );
$where = array(
'ID' => 1
);
$where_format = array(
'%d'
);
return $wpdb->insert( $table, $data, $where, $format, $where_format );
}
public function delete_row_from_db() {
global $wpdb;
$table = $wpdb->prefix . 'biuro_employees';
$where = array(
'ID' => 1
);
$where_format = array(
'%d'
);
return $wpdb->delete( $table, $where, $where_format );
}
public function use_prepare_db_query() {
global $wpdb;
$sql = "UPDATE $wpdb->posts SET post_parent = %d WHERE ID = %d AND post_status = %s";
return $wpdb->query( $wpdb->prepare( $sql, 7, 15, 'static' ) );
}
}
......@@ -30,7 +30,56 @@ class Biuro_Contacts_Activator {
* @since 1.0.0
*/
public static function activate() {
global $wpdb;
if ( is_multisite() ) {
// Get all blogs in the network and activate plugin on each one
$blog_ids = $wpdb->get_col( "SELECT blog_id FROM $wpdb->blogs" );
foreach ( $blog_ids as $blog_id ) {
switch_to_blog( $blog_id );
self::create_db_employees();
restore_current_blog();
}
} else {
// create_table();
self::create_db_employees();
}
}
public static function create_db_employees() {
global $wpdb;
$table_name = $wpdb->prefix . "biuro_employees";
$plugin_name_db_version = get_option( 'biuro-contacts_db_version', '1.0' );
if( $wpdb->get_var( "show tables like '{$table_name}'" ) != $table_name ||
version_compare( $version, '1.0' ) < 0 ) {
$charset_collate = $wpdb->get_charset_collate();
$sql[] = "CREATE TABLE " . $table_name . " (
id mediumint(9) NOT NULL AUTO_INCREMENT,
created datetime DEFAULT '0000-00-00 00:00:00',
name tinytext,
surname tinytext,
email varchar(128) DEFAULT '',
phone varchar(128) DEFAULT '',
city varchar(255) DEFAULT '',
comment longtext DEFAULT '',
cv text DEFAULT '',
PRIMARY KEY (id)
) $charset_collate;";
require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
/**
* It seems IF NOT EXISTS isn't needed if you're using dbDelta - if the table already exists it'll
* compare the schema and update it instead of overwriting the whole table.
*
* @link https://code.tutsplus.com/tutorials/custom-database-tables-maintaining-the-database--wp-28455
*/
dbDelta( $sql );
add_option( 'biuro-contacts_db_version', $plugin_name_db_version );
}
}
}
......@@ -41,6 +41,15 @@ class Biuro_Contacts_Loader {
*/
protected $filters;
/**
* The array of shortcodes registered with WordPress.
*
* @since 1.0.0
* @access protected
* @var array $shortcodes The shortcodes registered with WordPress to fire when the plugin loads.
*/
protected $shortcodes;
/**
* Initialize the collections used to maintain the actions and filters.
*
......@@ -50,6 +59,7 @@ class Biuro_Contacts_Loader {
$this->actions = array();
$this->filters = array();
$this->shortcodes = array();
}
......@@ -81,6 +91,18 @@ class Biuro_Contacts_Loader {
$this->filters = $this->add( $this->filters, $hook, $component, $callback, $priority, $accepted_args );
}
/**
* Add a new shortcode to the collection to be registered with WordPress
*
* @since 1.0.0
* @param string $tag The name of the new shortcode.
* @param object $component A reference to the instance of the object on which the shortcode is defined.
* @param string $callback The name of the function that defines the shortcode.
*/
public function add_shortcode( $tag, $component, $callback, $priority = 10, $accepted_args = 2 ) {
$this->shortcodes = $this->add( $this->shortcodes, $tag, $component, $callback, $priority, $accepted_args );
}
/**
* A utility function that is used to register the actions and hooks into a single
* collection.
......@@ -124,6 +146,9 @@ class Biuro_Contacts_Loader {
add_action( $hook['hook'], array( $hook['component'], $hook['callback'] ), $hook['priority'], $hook['accepted_args'] );
}
foreach ( $this->shortcodes as $hook ) {
add_shortcode( $hook['hook'], array( $hook['component'], $hook['callback'] ), $hook['priority'], $hook['accepted_args'] );
}
}
}
......@@ -156,7 +156,6 @@ class Biuro_Contacts {
$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' );
$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' );
}
/**
......@@ -173,12 +172,30 @@ class Biuro_Contacts {
$this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_styles' );
$this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_scripts' );
$this->loader->add_action( 'init', $plugin_public, 'register_shortcodes' );
$this->loader->add_action('admin_post_nopriv_employees_quick', $plugin_public, 'employeesQuickSubmit');
$this->loader->add_action('admin_post_employees_quick', $plugin_public, 'employeesQuickSubmit');
$this->loader->add_action('admin_post_nopriv_employers_quick', $plugin_public, 'employersQuickSubmit');
$this->loader->add_action('admin_post_employers_quick', $plugin_public, 'employersQuickSubmit');
$this->loader->add_action('admin_post_employees_quick_post', $plugin_public, 'employees_quick_post');
$this->loader->add_action('admin_post_nopriv_employees_quick_post', $plugin_public, 'employees_quick_post');
$this->loader->add_action('admin_post_employers_quick_post', $plugin_public, 'employers_quick_post');
$this->loader->add_action('admin_post_nopriv_employers_quick_post', $plugin_public, 'employers_quick_post');
// $this->loader->add_action( 'init', $plugin_public, 'register_shortcodes' );
/**
* Register shortcode via loader
*
* Use: [short-code-name args]
*
* @link https://github.com/DevinVinson/WordPress-Plugin-Boilerplate/issues/262
*/
$this->loader->add_shortcode( "biuro-contacts--employees-quick", $plugin_public, "employees_quick_form", $priority = 10, $accepted_args = 2 );
$this->loader->add_shortcode( "biuro-contacts--employers-quick", $plugin_public, "employers_quick_form", $priority = 10, $accepted_args = 2 );
// add_shortcode( 'biuro-contacts--employees-quick', array( $this, 'employees_quick_form' ) );
// add_shortcode( 'biuro-contacts--employers-quick', array( $this, 'employers_quick_form' ) );
// add_shortcode( 'biuro-contacts--employees', array( $this, 'employees_form' ) );
// add_shortcode( 'biuro-contacts--employers', array( $this, 'employers_form' ) );
// add_shortcode( 'biuro-contacts--position', array( $this, 'position_form' ) );
}
/**
......
......@@ -40,6 +40,10 @@ class Biuro_Contacts_Public {
*/
private $version;
const fields = [
'employees-quick' => ['name', 'phone', 'email', 'agree', 'city', 'comment', 'cv']
];
/**
* Initialize the class and set its properties.
*
......@@ -108,7 +112,7 @@ class Biuro_Contacts_Public {
*
* @return mixed $output Output of the buffer
*/
public function employees_form( $attr = array() ) {
public function employees_form( $atts ) {
$response = false;
ob_start();
......@@ -117,7 +121,7 @@ class Biuro_Contacts_Public {
$response = true;
endif;
include 'partials/biuro-contacts-public--employees.php';
include_once('partials/biuro-contacts-public--employees.php');
$output = ob_get_contents();
......@@ -133,7 +137,16 @@ class Biuro_Contacts_Public {
*
* @return mixed $output Output of the buffer
*/
public function employees_quick_form( $attr = array() ) {
public function employers_quick_form( $attr = array() ) {
// $args = shortcode_atts(
// array(
// 'arg1' => 'arg1',
// 'arg2' => 'arg2',
// ),
// $atts
// );
$response = false;
ob_start();
......@@ -142,7 +155,7 @@ class Biuro_Contacts_Public {
$response = true;
endif;
include 'partials/biuro-contacts-public--employees-quick.php';
include_once('partials/biuro-contacts-public--employers-quick.php');
$output = ob_get_contents();
......@@ -151,40 +164,40 @@ class Biuro_Contacts_Public {
return $output;
} // employees_form()
/**
* Processes shortcode biuro-contacts--employees
* Processes shortcode biuro-contacts--employers
*
* @param array $attr The attributes from the shortcode
*
* @return mixed $output Output of the buffer
*/
public function employers_quick_form( $attr = array() ) {
public function employers_form( $attr = array() ) {
$response = false;
ob_start();
if ( isset( $_POST['submit'] ) ) :
if ( isset( $_POST['action-submit'] ) ) :
$response = true;
endif;
include 'partials/biuro-contacts-public--employers-quick.php';
include_once('partials/biuro-contacts-public--employers.php');
$output = ob_get_contents();
ob_end_clean();
return $output;
} // employees_form()
} // employers_form()
/**
* Processes shortcode biuro-contacts--employers
* Processes shortcode biuro-contacts--position
*
* @param array $attr The attributes from the shortcode
*
* @return mixed $output Output of the buffer
*/
public function employers_form( $attr = array() ) {
public function position_form( $attr = array() ) {
$response = false;
ob_start();
......@@ -193,56 +206,255 @@ class Biuro_Contacts_Public {
$response = true;
endif;
include 'partials/biuro-contacts-public--employers.php';
include_once('partials/biuro-contacts-public--position.php');
$output = ob_get_contents();
ob_end_clean();
return $output;
} // employers_form()
} // position_form()
/**
* Processes shortcode biuro-contacts--position
* May override the default upload path.
* /wp-content/uploads/{folder}/
*
* @param array $dir
* @return array
*/
function change_upload_dir( $dir ) {
return array(
'path' => $dir['basedir'] . '/{folder}',
'url' => $dir['baseurl'] . '/{folder}',
'subdir' => '/{folder}',
) + $dir;
}
public static function delete_transients( $str ) {
foreach (static::fields[$str] as $key) {
delete_transient($str . '--' . $key . '-value');
delete_transient($str . '--' . $key . '-status');
delete_transient($str . '--' . $key . '-message');
}
}
public static function validate( $str, $key, $value, $post ) {
$success = ['status' => 'success', 'message' => ''];
$required = ['status' => 'error', 'message' => 'This field is required'];
if ($str == 'employees-quick'):
switch($key) {
case 'name':
if (!$value):
return $required;
endif;
$arr = explode(' ', $value);
if (count($arr) < 2):
return [
'status' => 'warning',
'message' => 'Name and surname are required'
];
else:
return $success;
endif;
case 'phone':
if (!$value && !is_email($post['email'])):
return [
'status' => 'error',
'message' => 'Phone or email field is required'
];
endif;
if (!$value):
return [
'status' => '',
'message' => ''
];
endif;
return $success;
case 'email':
if (!$post['phone'] && !$value):
return [
'status' => 'error',
'message' => 'Email or phone field is required'
];
endif;
if (!$post['phone'] && !is_email($value)):
return [
'status' => 'warning',
'message' => 'Email format is incorrect'
];
else:
if (!$value):
return [
'status' => '',
'message' => ''
];
endif;
return $success;
endif;
case 'agree':
if ($value != 1):
return [
'status' => 'error',
'message' => 'You have to agree with conditions'
];
endif;
return $success;
}
endif;
return ;
}
public static function getValue( $key, $value ) {
switch($key) {
case 'name':
case 'phone':
case 'agree':
case 'city':
return sanitize_text_field($value);
case 'email':
return sanitize_email($value);
case 'comment':
return sanitize_textarea_field($value);
case 'cv':
return sanitize_file_name($value);
}
return '';
}
public static function set_transients( $str, $post ) {
// set_transient( 'employees-quick--name-value', $_POST['name'] );
// set_transient( 'employees-quick--name-status', 'success' );
// set_transient( 'employees-quick--name-message', '' );
// set_transient( 'employees-quick--phone-value', $_POST['phone'] );
// set_transient( 'employees-quick--phone-status', 'error' );
// set_transient( 'employees-quick--phone-message', 'Phone or email field is required' );
// set_transient( 'employees-quick--email-value', $_POST['email'] );
// set_transient( 'employees-quick--email-status', 'error' );
// set_transient( 'employees-quick--email-message', 'Email or phone field is required' );
// set_transient( 'employees-quick--agree-value', $_POST['agree'] );
// set_transient( 'employees-quick--agree-status', 'error' );
// set_transient( 'employees-quick--agree-message', 'You have to agree with conditions' );
// set_transient( 'employees-quick--city-value', $_POST['city'] );
// set_transient( 'employees-quick--city-status', 'warning' );
// set_transient( 'employees-quick--city-message', 'You have to agree with conditions' );
// set_transient( 'employees-quick--comment-value', $_POST['comment'] );
// set_transient( 'employees-quick--comment-status', 'warning' );
// set_transient( 'employees-quick--comment-message', 'You have to agree with conditions' );
// set_transient( 'employees-quick--cv-value', $_POST['cv'] );
// set_transient( 'employees-quick--cv-status', 'warning' );
// set_transient( 'employees-quick--cv-message', 'You have to agree with conditions' );
foreach (static::fields[$str] as $key) {
$value = static::getValue($key, $post[$key]);
$validation = static::validate($str, $key, $value, $post);
set_transient($str . '--' . $key . '-value', $value);
set_transient($str . '--' . $key . '-status', $validation['status']);
set_transient($str . '--' . $key . '-message', $validation['message']);
}
}
/**
* Processes shortcode biuro-contacts--employees
*
* @param array $attr The attributes from the shortcode
*
* @return mixed $output Output of the buffer
*/
public function position_form( $attr = array() ) {
$response = false;
public function employees_quick_form( $attr = array() ) {
ob_start();
if ( isset( $_POST['action-submit'] ) ) :
$response = true;
endif;
include 'partials/biuro-contacts-public--position.php';
include_once('partials/biuro-contacts-public--employees-quick.php');
$output = ob_get_contents();
ob_end_clean();
static::delete_transients('employees-quick');
return $output;
} // position_form()
} // employees_form()
public function employees_quick_post() {
$nonce = $_POST['_wpnonce'];
$referer = $_POST['_wp_http_referer'];
public function employersQuickSubmit() {
debug($_POST); //$_POST variables should be accessible now
if ( !isset( $nonce ) || !wp_verify_nonce($nonce, 'employees_quick_post_nonce' ) ) {
// Nonce not match
// Diplay some error
wp_redirect( $referer );
exit;
}
//Optional: Now you can redirect the user to your confirmation page using wp_redirect()
// ob_start();
// wp_redirect($_POST['_wp_http_referer']);
// set_transient( 'employees-quick--status', '' );
// set_transient( 'employees-quick--message', '' );
static::set_transients('employees-quick', $_POST);
wp_redirect( $referer );
exit;
// /*
// * May prehandle file upload
// */
// // Set an array containing a list of acceptable formats
// // $allowed_file_types = array('image/jpg','image/jpeg','image/gif','image/png');
// // $allowed_file_types = array('doc','docx','pdf', 'rtf', 'jpg', 'jpeg', 'gif', 'png');
// // $allowed_file_types = array('doc','docx','pdf');
// $allowed_file_types = array('application/pdf', 'application/msword', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document');
// // Check file types
// foreach( $_FILES as $file ) {
// // Get the type of the uploaded file. This is returned as "type/extension"
// $arr_file_type = wp_check_filetype( basename( $file['name'] ) );
// $uploaded_file_type = $arr_file_type['type'];
// if( ! in_array( $uploaded_file_type, $allowed_file_types ) ) {
// // Diplay some error
// wp_redirect( $referer );
// exit;
// }
// }
// // delog($nonce, 'nonce');
// // Optional: Now you can redirect the user to your confirmation page using wp_redirect()
// // ob_start();
// wp_redirect( $referer );
// exit;
// wp_redirect(admin_url('admin.php?page=' . $_POST['_wp_http_referer']));
// die();
//apparently when finished, die(); is required.
}
public function employeesQuickSubmit() {
public function employers_quick_post() {
debug($_POST); //$_POST variables should be accessible now
//Optional: Now you can redirect the user to your confirmation page using wp_redirect()
......@@ -254,23 +466,4 @@ class Biuro_Contacts_Public {
// die();
//apparently when finished, die(); is required.
}
/**
* Registers all shortcodes at once
*
* @return [type] [description]
*/
public function register_shortcodes() {
add_shortcode( 'biuro-contacts--employees-quick', array( $this, 'employees_quick_form' ) );
add_shortcode( 'biuro-contacts--employers-quick', array( $this, 'employers_quick_form' ) );
add_shortcode( 'biuro-contacts--employees', array( $this, 'employees_form' ) );
add_shortcode( 'biuro-contacts--employers', array( $this, 'employers_form' ) );
add_shortcode( 'biuro-contacts--position', array( $this, 'position_form' ) );
} // register_shortcodes()
}
......@@ -11,42 +11,64 @@
* @package Biuro_Contacts
* @subpackage Biuro_Contacts/public/partials
*/
/**
* @link https://codex.wordpress.org/Creating_Options_Pages
* @link https://www.smashingmagazine.com/2016/04/three-approaches-to-adding-configurable-fields-to-your-plugin/
*/
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) die;
?>
<form action="<?php echo esc_url( admin_url('admin-post.php') ); ?>" method="post" enctype="multipart/form-data" class="c-form">
<?php
$nameValue = get_transient( 'employees-quick--name-value' );
$nameStatus = get_transient( 'employees-quick--name-status' );
$nameMessage = get_transient( 'employees-quick--name-message' );
?>
<div class="c-form--row">
<label class="c-form--label" for="form-name">Name, Surname*</label>
<div class="c-form--input-wrap">
<input type="text" class="c-form--input <?php if ($response) { echo 'c-form--input--error'; } ?>" id="form-name" name="name" value="">
<input type="text" class="c-form--input <?php if ($nameStatus) { echo "c-form--input--$nameStatus"; } ?>" id="form-name" name="name" value="<?php echo $nameValue; ?>">
</div>
<?php if ($response): ?>
<div class="c-form--validation-error">
Name and Surname is required
<?php if ($nameMessage): ?>
<div class="c-form--validation-<?php echo $nameStatus; ?>">
<?php echo $nameMessage; ?>
</div>
<?php endif; ?>
</div><!-- .c-form--row -->
<?php
$phoneValue = get_transient( 'employees-quick--phone-value' );
$phoneStatus = get_transient( 'employees-quick--phone-status' );
$phoneMessage = get_transient( 'employees-quick--phone-message' );
?>
<div class="c-form--row">
<label class="c-form--label" for="form-phone">Phone no.*</label>
<div class="c-form--input-wrap">
<input type="tel" class="c-form--input <?php if ($response) { echo 'c-form--input--error'; } ?>" id="form-phone" name="phone" value="">
<input type="tel" class="c-form--input <?php if ($phoneStatus) { echo "c-form--input--$phoneStatus"; } ?>" id="form-phone" name="phone" value="<?php echo $phoneValue; ?>">
</div>
<?php if ($response): ?>
<div class="c-form--validation-error">
Phone number is required
<?php if ($phoneMessage): ?>
<div class="c-form--validation-<?php echo $phoneStatus; ?>">
<?php echo $phoneMessage; ?>
</div>
<?php endif; ?>
</div><!-- .c-form--row -->
<?php
$emailValue = get_transient( 'employees-quick--email-value' );
$emailStatus = get_transient( 'employees-quick--email-status' );
$emailMessage = get_transient( 'employees-quick--email-message' );
?>
<div class="c-form--row">
<label class="c-form--label" for="form-email">Email address*</label>
<div class="c-form--input-wrap">
<input type="email" class="c-form--input <?php if ($response) { echo 'c-form--input--error'; } ?>" id="form-email" name="email" value="">
<input type="email" class="c-form--input <?php if ($emailStatus) { echo "c-form--input--$emailStatus"; } ?>" id="form-email" name="email" value="<?php echo $emailValue; ?>">
</div>
<?php if ($response): ?>
<div class="c-form--validation-error">
Email address is required
<?php if ($emailMessage): ?>
<div class="c-form--validation-<?php echo $emailStatus; ?>">
<?php echo $emailMessage; ?>
</div>
<?php endif; ?>
</div><!-- .c-form--row -->
......@@ -57,18 +79,24 @@
</div>
</div><!-- .c-form--row -->
<?php
$agreeValue = get_transient( 'employees-quick--agree-value' );
$agreeStatus = get_transient( 'employees-quick--agree-status' );
$agreeMessage = get_transient( 'employees-quick--agree-message' );
?>
<div class="c-form--row">
<div class="c-form--checkbox-wrap">
<input id="form-agree" type="checkbox" class="c-form--checkbox <?php if ($response) { echo 'c-form--checkbox--error'; } ?>" name="agree" value="1">
<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; ?>>
<label class="c-form--label-checkbox" for="form-agree">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Rem possimus, delectus unde enim dolores doloribus, recusandae a veritatis ducimus repudiandae iste eos voluptatum architecto mollitia?</label>
</div>
<?php if ($response): ?>
<div class="c-form--validation-error">
You have to agree with conditions
<?php if ($agreeMessage): ?>
<div class="c-form--validation-<?php echo $agreeStatus; ?>">
<?php echo $agreeMessage; ?>
</div>
<?php endif; ?>
</div><!-- .c-form--row -->
<input type="hidden" name="action" value="employees_quick">
<?php wp_nonce_field('employees_quick_nonce', 'employees_quick_nonce'); ?>
<input type="hidden" name="action" value="employees_quick_post">
<?php wp_nonce_field('employees_quick_post_nonce'); ?>
</form>
......@@ -11,6 +11,15 @@
* @package Biuro_Contacts
* @subpackage Biuro_Contacts/public/partials
*/
/**
* @link https://codex.wordpress.org/Creating_Options_Pages
* @link https://www.smashingmagazine.com/2016/04/three-approaches-to-adding-configurable-fields-to-your-plugin/
*/
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) die;
// Generate a custom nonce value.
$_nonce = wp_create_nonce( 'my_post_form_nonce' );
?>
<form id="ContactFormEmployee_ContactFormEmployee" action="<?php echo $_SERVER["REQUEST_URI"]; ?>" method="post" enctype="multipart/form-data" class="contact-form">
......
......@@ -11,6 +11,15 @@
* @package Biuro_Contacts
* @subpackage Biuro_Contacts/public/partials
*/
/**
* @link https://codex.wordpress.org/Creating_Options_Pages
* @link https://www.smashingmagazine.com/2016/04/three-approaches-to-adding-configurable-fields-to-your-plugin/
*/
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) die;
// Generate a custom nonce value.
$_nonce = wp_create_nonce( 'my_post_form_nonce' );
?>
<form action="<?php echo esc_url( admin_url('admin-post.php') ); ?>" method="post" enctype="multipart/form-data" class="c-form">
......
......@@ -11,6 +11,15 @@
* @package Biuro_Contacts
* @subpackage Biuro_Contacts/public/partials
*/
/**
* @link https://codex.wordpress.org/Creating_Options_Pages
* @link https://www.smashingmagazine.com/2016/04/three-approaches-to-adding-configurable-fields-to-your-plugin/
*/
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) die;
// Generate a custom nonce value.
$_nonce = wp_create_nonce( 'my_post_form_nonce' );
?>
<form id="ContactForm_ContactForm" action="<?php echo $_SERVER["REQUEST_URI"]; ?>" method="post" enctype="application/x-www-form-urlencoded" class="contact-form">
......
......@@ -11,6 +11,15 @@
* @package Biuro_Contacts
* @subpackage Biuro_Contacts/public/partials
*/
/**
* @link https://codex.wordpress.org/Creating_Options_Pages
* @link https://www.smashingmagazine.com/2016/04/three-approaches-to-adding-configurable-fields-to-your-plugin/
*/
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) die;
// Generate a custom nonce value.
$_nonce = wp_create_nonce( 'my_post_form_nonce' );
?>
<form id="CVForm_CVForm" action="<?php echo $_SERVER["REQUEST_URI"]; ?>" method="post" enctype="multipart/form-data" class="contact-form">
......
......@@ -5,5 +5,9 @@
/* critical:end */
.c-form--input--error { border: 1px solid #f90000; }
.c-form--input--success { border: 1px solid green; }
.c-form--input--warning { border: 1px solid orange; }
.c-form--validation-error { color: #f90000; margin-bottom: 10px;}
.c-form--validation-success { color: green; margin-bottom: 10px;}
.c-form--validation-warning { color: orange; margin-bottom: 10px;}
@font-face{font-family:PT Sans Narrow;src:url(../fonts/pt_sans_narrow.woff2) format("woff2"),url(../fonts/pt_sans_narrow.woff) format("woff");font-weight:400;font-style:normal;font-display:swap}@font-face{font-family:PT Sans Narrow;src:url(../fonts/pt_sans_narrow_bold.woff2) format("woff2"),url(../fonts/pt_sans_narrow_bold.woff) format("woff");font-weight:600;font-style:normal;font-display:swap}@font-face{font-family:Bebas Neue;src:url(../fonts/bebas-neue.woff2) format("woff2"),url(../fonts/bebas-neue.woff) format("woff");font-weight:400;font-style:normal;font-display:swap}
/*! normalize.css v8.0.0 | MIT License | github.com/necolas/normalize.css */hr{-webkit-box-sizing:content-box;box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{-webkit-box-sizing:border-box;box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}[hidden],template{display:none}a:hover{text-decoration:none}figure{margin:0}img{max-width:100%}p{margin:0 0 1.6rem}b,strong{font-weight:600;font-weight:var(--typo--weight-bold)}table{border-collapse:collapse;border-spacing:0}.l-footer--inner{display:-webkit-box;display:-ms-flexbox;display:flex;padding-top:15px;-ms-flex-wrap:wrap;flex-wrap:wrap}.l-footer--section{-webkit-box-flex:1;-ms-flex:1 0 15%;flex:1 0 15%}.l-footer--section h4{margin:0;padding:0}.l-footer{padding-bottom:100px;-webkit-box-shadow:0 -1px 1px 0 rgba(0,0,0,.45);box-shadow:0 -1px 1px 0 rgba(0,0,0,.45)}.awesomplete [hidden]{display:none}.awesomplete .visually-hidden{position:absolute;clip:rect(0,0,0,0)}.awesomplete{display:inline-block;position:relative}.awesomplete>input{display:block}.awesomplete>ul{position:absolute;left:0;z-index:1;min-width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;list-style:none;padding:0;margin:0;background:#fff}.awesomplete>ul:empty{display:none}.c-breadcrumbs{padding-top:1em}.c-cookies-warning{position:fixed;left:0;right:0;bottom:0;padding:15px 20px;background:#f6f6f6;overflow:hidden;z-index:100}.c-cookies-warning .bu-action{margin-top:10px}.c-cookies-warning .bu-action--alt{float:right}.c-copy{padding-top:.75em;text-align:center}.c-divisions--list{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-bottom:16px}.c-divisions--list-item{margin-right:10px;padding:0 12px;font-weight:400;font-weight:var(--typo--weight-regular);line-height:1.5;cursor:pointer}.is-divisions--list-item-active{background:#ccc;font-weight:600;font-weight:var(--typo--weight-bold)}.c-form--input--error{border:1px solid #f90000}.c-form--input--success{border:1px solid green}.c-form--input--warning{border:1px solid orange}.c-form--validation-error{color:#f90000;margin-bottom:10px}.c-form--validation-success{color:green;margin-bottom:10px}.c-form--validation-warning{color:orange;margin-bottom:10px}#custom .biuro-title{margin:0 0 20px;padding:10px;font-size:calc(1.125rem + .8929vw - 2.85728px);border:2px solid #006957;border:2px solid var(--color--green);border-radius:12px}#custom .biuro-title h1{margin:0;padding:0;line-height:1.2;color:#006957;color:var(--color--green);font-weight:600;font-weight:var(--typo--weight-bold);overflow:hidden;text-align:center;text-transform:uppercase}.c-jobs-list tr:nth-child(2n){background:#f8f8f8}.c-jobs-list td,.c-jobs-list th{vertical-align:top}.c-jobs-list a{display:block}.c-jobs-list--head{font-weight:700;text-align:left}.c-jobs-list--col-valid{display:none}.pods-pagination-paginate{display:block;padding-bottom:1em}.page-numbers{margin:0 1px;padding:1px}.page-numbers.current{font-weight:600;font-weight:var(--typo--weight-bold)}.c-logo{text-decoration:none}.c-nav--main-item{position:relative;margin-right:10px;border:1px solid grey;padding:5px}.c-nav--main-anchor{display:block;padding:0 .25em;text-transform:uppercase}.c-nav--sub{position:absolute;top:100%;left:-1px;padding:0 1em 0 6px;border:1px solid grey;overflow:hidden;background:#fff}.c-nav--sub-item{background:#fff;padding:.5em .5em .5em 0}.c-nav--sub-anchor{padding:.25em;white-space:nowrap}.c-nav--item{margin:10px}.c-nav--link{line-height:40px;font-size:24px;text-decoration:none}.c-nav--link:hover{text-decoration:underline}.c-nav--lang{display:-webkit-box;display:-ms-flexbox;display:flex}.c-nav--lang li{padding:0 5px}.is-nav--main-item-active{position:relative;border-bottom-color:red}.is-nav--main-item-active:before{content:"";position:absolute;height:1px;width:100%;bottom:-1px;left:0;background:#fff;z-index:10}.is-nav--main-item-active .c-nav--sub{display:-webkit-box;display:-ms-flexbox;display:flex}.is-nav--main-anchor-active{text-decoration:none}.is-nav--sub-anchor-active{text-decoration:none;font-weight:600}.bu-action{height:28px;cursor:pointer;border:1px solid #e1e1e1;padding:0 15px;margin:0;display:inline-block}.bu-action--main{color:#fff;background:#006957}.c-nav-footer a:hover{border-color:#ababab}.c-nav-footer .act,.c-nav-footer .act:hover{border-color:#4b4d4f}#content a:hover{text-decoration:underline}#content h1{padding:0 0 10px;font-size:22px;font-weight:400}#content h2{padding:0 0 13px;font-size:19px;font-weight:700}#content h2 small{display:block;font-size:16px}#content h3{padding:0 0 10px;font-size:17px;font-weight:700}#content .info_box,#content .info_box p{font-size:16px;line-height:1.2;text-transform:uppercase}#content .t-reason{padding:0;border:0}#content .t-reason td{display:block;vertical-align:top}#content .t-reason .t-reason-col-2 h2{padding:25px 0 13px}#content .t-reason h2{text-align:center}#content .t-reason ul{padding:0}#content .t-membership{width:100%;border:0;text-align:left}#content .t-membership td{text-align:justify;vertical-align:middle}#content .t-membership .t-membership-row-4 td{border-bottom:none}#content .t-contacts-box{max-width:650px}#content .t-contacts{width:100%}#content .t-contacts td{vertical-align:top}#content .t-contacts p{text-align:left}#content .info_box{position:relative;margin:0 0 20px;color:#fff}#content .info_box.tyle_1{background-position:0 0}#content .info_box.tyle_1 .bottom{background-position:-250px 100%}#content .info_box.tyle_2{background-position:-500px 0}#content .info_box.tyle_2 .bottom{background-position:-750px 100%}#content .info_box.tyle_3{background-position:-1000px 0}#content .info_box.tyle_3 .bottom{background-position:-1250px 100%}#content .info_box.tyle_4{background-position:-1500px 0}#content .info_box.tyle_4 .bottom{background-position:-1750px 100%}#content .info_box.tyle_5{background-position:-2000px 0}#content .info_box.tyle_5 .bottom{background-position:-2250px 100%}#content .info_box .bottom{width:219px;height:22px;position:absolute;left:0;bottom:-22px}#content .info_box p{padding:0}#content .search_box{background:#f8f8f8;padding:10px}#content .search_box select{width:130px;background:#f7f7f7;border:1px solid #e1e1e1;padding:6px}#content .search_box li{padding:0;display:block;background:0 0;overflow:hidden}#content .search_box li label{display:block;font-weight:700}#content .search_box li .input{width:78%;color:#4b4d4f;border:0;padding:8px;background:0 0}#content .search_box li select{color:#4b4d4f;background:#f5f5f5;margin:0 20px 10px 0}#content .search_box li select+.filter-button{clear:left;margin-left:100px}#content .search_box li .submit{float:right;width:39px;height:39px;cursor:pointer;background:url(../_img/search_box_icon.gif) 50% 50% no-repeat;border:0;vertical-align:middle}#content .search_box li a.url{float:right;margin-top:7px;padding:4px 18px 4px 0;font-weight:700}#content .search_box li a.url.open{background:url(../_img/search_box_url_icon.gif) right 12px no-repeat}#content .search_box li a.url.close{background:url(../_img/search_box_url_icon.gif) right -13px no-repeat}#content .search_box li #search-input-block{border:1px solid #dfe1e4;background:#fff;overflow:hidden}#content .search_box li.filter-additional{padding-top:10px}#content .search_box li.filter-additional label{float:left;width:95px;padding:6px 5px 0 0}#content .search_box li.filter-additional select{float:left}#content .search_box li.filter-additional+.filter-additional{padding-top:0}#content .search_box li #period,#content .search_box li #type{margin-right:0}#content .search_box .filter-button{float:left;color:#4b4d4f;background:#f5f5f5;margin:0 22px 0 0;border:1px solid #e1e1e1;padding:7px;cursor:pointer;text-decoration:none}#content .search_box .filter-button:hover{background:#eee}#content p{text-align:justify}#content a{text-decoration:none}#content .img_left{margin:0 20px 15px 0;float:left}#content a.home_url,.c-home-url{width:254px;color:#4b4d4f;font-size:21px;margin:15px auto;display:block;text-align:center;line-height:1.2}#content a.home_url{text-decoration:none;padding:280px 0 0}#content a.home_url_1{background:url(../_img/workis_l.png) no-repeat;background-size:contain}#content a.home_url_2{background:url(../_img/img_2.jpg) no-repeat}#content a:hover.home_url{text-decoration:underline}.c-home-url{text-decoration:none}.c-home-url:hover{text-decoration:underline}.c-home-pic{display:block;border-radius:50%;margin-bottom:20px;overflow:hidden}#content .contact-form .form li textarea,.cv-form .form li textarea{overflow-y:auto;resize:none}.c-home-pic img{display:block}#content .news_list{padding:0 0 15px;display:block}#content .news_list li{border-top:1px solid #dfe1e4;padding:15px 0 0;display:block}#content .news_list li a.more{font-weight:700;text-decoration:underline}#content .news_list li:first-child{border-top:0;padding:0}#content .staff{margin:0 0 15px -33px;display:block}#content .staff li{width:216px;margin:0 0 10px 33px;float:left}#content .staff li.sep{width:100%}#content .staff li .foto{margin:0 0 10px;display:block}#content .staff li p{padding:0 5px 15px}#content .form{width:318px;padding:0 0 15px;display:inline-block}#content .form li{padding:0 0 28px;display:block;background:0 0}#content .form li.bottom{padding:0 0 10px;margin:-10px 0 0}#content .form li label{padding:0 0 6px;display:block}#content .form li input.text,#content .form li select,#content .form li textarea{background:#f7f7f7;border:1px solid #e1e1e1;padding:6px}#content .form li input.text,#content .form li textarea{width:318px}#content .form li select{width:164px}#content .form li textarea{height:114px;overflow:auto}#content .form li .errormessage{color:#bb2543;padding:6px 0 0;display:block}#content .form li .txt{color:#bb2543;display:inline-block}#content .form li .action{height:28px;color:#fff;cursor:pointer;background:#006957;border:1px solid #e1e1e1;padding:0 20px;margin:0 10px 0 0;display:inline-block}#content .form li .action:hover{background:#008d75}#content .form li .Actions{display:inline-block}#content .country_tabs{width:100%;padding:0 0 15px;float:left}#content .country_tabs li{padding:0 10px 0 0;float:left}#content .country_tabs li a{color:#4b4d4f;text-decoration:none;float:left}#content .country_tabs li a.act{font-weight:700;background:#ebebeb;padding:0 10px}#content .country_tabs li a:hover{text-decoration:underline}#content .pages{text-align:center;padding:0 0 15px;display:block}#content .pages a{margin:0 3px}#content .pages a.prev{font-weight:700;float:left}#content .pages a.next{font-weight:700;float:right}#content .pages a.act{font-weight:700}#banners{width:976px;padding:20px 0;float:left}#banners li{margin:0 0 0 40px;float:left}#banners li:first-child{margin:0}.fl{float:left!important}.fr{float:right!important}.clear{height:0;clear:both;display:block}.input,input.text,select,textarea{box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}button::-moz-focus-inner,input[type=button]::-moz-focus-inner,input[type=reset]::-moz-focus-inner,input[type=submit]::-moz-focus-inner{border:0;padding:0}.map_page{width:540px;text-align:center;margin:20px auto}.map_page .logo{margin:0 0 30px;display:block}.map_page p{padding:0 0 15px;display:block}.map_page a.map_url{width:168px;position:relative;display:inline-block}.map_page a.map_url.es{height:89px;background:url(../_img/map_url.jpg) no-repeat;margin:0 0 -20px}.map_page a:hover.map_url.es{background:url(../_img/map_url.jpg) -200px 0 no-repeat;z-index:1}.map_page a.map_url.lv{height:100px;background:url(../_img/map_url.jpg) 0 -69px no-repeat;margin:0 0 -30px}.map_page a:hover.map_url.lv{background:url(../_img/map_url.jpg) -400px -69px no-repeat;z-index:1}.map_page a.map_url.lt{height:109px;background:url(../_img/map_url.jpg) 0 -139px no-repeat}.map_page a:hover.map_url.lt{background:url(../_img/map_url.jpg) -600px -139px no-repeat;z-index:1}.hide{display:none!important}#content ul:not([class]) a{text-decoration:underline}#content img.left{margin:15px 20px 15px 0;float:left}#content img.ico{position:relative;top:7px}#map_canvas{width:100%;height:450px}#content .contact-form .form li input[type=text].error,#content .contact-form .form li textarea.error{border:1px solid #bb2543}.job-cont{padding:0 0 15px;display:block}.cont-content{display:block;padding:0 0 10px}.cv-form .form li.bottom{padding:0 0 10px;margin:-10px 0 0}.cv-form .form li label{padding:0 0 6px;display:block}.cv-form .form li input.text,.cv-form .form li textarea{background:#f7f7f7;border:1px solid #e1e1e1;padding:6px;width:318px}.cv-form .form li textarea{height:114px}#custom,#custom .biuro-header,#custom .biuro-ti,#custom .biuro-ti-text,.about-biuro{overflow:hidden}.cv-form .form li input[type=file]{background:#f7f7f7;border:1px solid #e1e1e1;padding:0 6px;width:304px;height:30px}.cv-form .form li .errormessage{color:#bb2543;padding:6px 0 0}.cv-form .form li input[type=file].error,.cv-form .form li input[type=text].error{border:1px solid #bb2543}.cv-form .form li .txt{color:#bb2543;display:inline-block}.cv-form .form li .action{height:28px;color:#fff;cursor:pointer;background:#006957;border:1px solid #e1e1e1;padding:0 20px;margin:0 10px 0 0;display:inline-block}.cv-form .form li .action:hover{background:#008d75}.cv-form .form li .Actions{display:inline-block}#cv-success,#cv-success p{color:#393}#content ul:not([class]){padding:0 0 15px;display:block}#content ul.table li,#content ul:not([class]) li{position:relative;padding:0 0 5px 25px;display:block}#content ul.table li:before,#content ul:not([class]) li:before{content:"";position:absolute;top:9px;left:1px;width:4px;height:4px;border-radius:50%;background:#4b4d4f}#content ul:not([class]) a:hover{text-decoration:none}#content ol{padding:0 0 15px 20px;text-align:justify}#content ol>li{padding:0 0 5px;text-align:justify}#content .cform .form li select{width:318px}#content #filter-empty-results{padding-top:15px}#content a.home_url,#content h1{text-transform:uppercase}.hidden-coords{display:none}.banner{width:180px;height:160px;float:left;position:relative;left:-15px;margin-right:50px;margin-bottom:20px}.banner a,.banner a img{border:0}.icon:before{content:"";position:relative;top:9px;display:inline-block;width:30px;height:26px;margin:0 8px 0 0;background:url(../_img/icons.png) 50px 50px no-repeat;border-radius:3px}#content .icon-blue-dark{color:#253466;font-weight:700}.icon-blue-dark:before{border:1px solid #253466}.icon-blue-dark:hover:before{background-color:#253466}#content .icon-blue-light{color:#156292;font-weight:700}.icon-blue-light:before{border:1px solid #156292}.icon-blue-light:hover:before{background-color:#156292}#content .icon-red{color:#bb2543;font-weight:700}.icon-red:before{border:1px solid #bb2543}.icon-red:hover:before{background-color:#bb2543}#content .icon-brown{color:#b76630;font-weight:700}.icon-brown:before{border:1px solid #b76630}.icon-brown:hover:before{background-color:#b76630}#content .icon-purple{color:#6b1c3a;font-weight:700}.icon-purple:before{border:1px solid #6b1c3a}.icon-purple:hover:before{background-color:#6b1c3a}#content .icon-green{color:#006957;font-weight:700}.icon-green:before{border:1px solid #006957}.icon-green:hover:before{background-color:#006957}.icon-blue-dark.icon-facebook:before{background-position:-2px -45px}.icon-blue-dark.icon-linkedin:before{background-position:-40px -45px}.icon-blue-dark.icon-phone:before{background-position:-80px -45px}.icon-blue-dark.icon-note:before{background-position:-121px -45px}.icon-blue-light.icon-facebook:before{background-position:-2px -87px}.icon-blue-light.icon-linkedin:before{background-position:-40px -87px}.icon-blue-light.icon-phone:before{background-position:-80px -87px}.icon-blue-light.icon-note:before{background-position:-121px -87px}.icon-red.icon-facebook:before{background-position:-2px -131px}.icon-red.icon-linkedin:before{background-position:-40px -131px}.icon-red.icon-phone:before{background-position:-80px -131px}.icon-red.icon-note:before{background-position:-121px -131px}.icon-brown.icon-facebook:before{background-position:-2px -176px}.icon-brown.icon-linkedin:before{background-position:-40px -176px}.icon-brown.icon-phone:before{background-position:-80px -176px}.icon-brown.icon-note:before{background-position:-121px -176px}.icon-purple.icon-facebook:before{background-position:-2px -218px}.icon-purple.icon-linkedin:before{background-position:-40px -218px}.icon-purple.icon-phone:before{background-position:-80px -218px}.icon-purple.icon-note:before{background-position:-121px -218px}.icon-green.icon-facebook:before{background-position:-2px -258px}.icon-green.icon-linkedin:before{background-position:-40px -258px}.icon-green.icon-phone:before{background-position:-80px -258px}.icon-green.icon-note:before{background-position:-121px -258px}.icon-facebook:hover:before{background-position:-2px -7px}.icon-linkedin:hover:before{background-position:-40px -7px}.icon-phone:hover:before{background-position:-80px -7px}.icon-note:hover:before{background-position:-121px -7px}.about-biuro{margin:0 auto}.about-biuro-img{position:relative;float:left;width:100%;height:214px;background-repeat:no-repeat}.about-biuro-img:before{position:absolute;top:0;left:50%;width:178px;height:214px;margin:0 0 0 -89px}.about-biuro-img-1:before{background-position:0 0}.about-biuro-img-2:before{background-position:-178px 0}.about-biuro-img-3:before{background-position:-356px 0}.about-biuro-img-4:before{background-position:-534px 0}.about-biuro-lt .about-biuro-img:before{background-image:url(../_img/lt-apie-idarbinimo-agentura.jpg)}.about-biuro-lv .about-biuro-img:before{background-image:url(../_img/lv-apie-idarbinimo-agentura.jpg)}.about-biuro-ee .about-biuro-img:before{background-image:url(../_img/ee-apie-idarbinimo-agentura.jpg)}.about-biuro-en .about-biuro-img:before{background-image:url(../_img/en-apie-idarbinimo-agentura.jpg)}.about-biuro-ru .about-biuro-img:before{background-image:url(../_img/ru-apie-idarbinimo-agentura.jpg)}.job-add h3{float:left;clear:both;font-weight:700;padding:0 6px 15px 0}.job-add span{display:block;float:left;padding:0 0 15px}#custom .biuro-header p{color:#006957;font-weight:700}#custom .biuro-header .logo{float:none;width:133px;margin:0 auto 20px}#custom .biuro-ti-img{display:none}#custom .biuro-ti-text h3{color:#006957;padding:0}#custom .biuro-ti-text li{position:relative;padding:0 0 0 15px;background:none}#custom .biuro-ti-text li:before{content:"";position:absolute;top:7px;left:2px;width:6px;height:6px;border-radius:50%;background:#006957}.u-align--center{text-align:center}.tmp-contacts img{display:none}.tmp-contacts ul{padding-left:5px}.c-logos{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.c-logos div{-webkit-box-flex:0;-ms-flex:0 0 21%;flex:0 0 21%;border:1px solid grey;padding:1em;margin-bottom:1em;text-align:center}.biuro-ti-img{display:none}.c-biuro-feedbacks{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.c-biuro-feedbacks--item{-webkit-box-flex:1;-ms-flex:1 0 40%;flex:1 0 40%;margin:5px;border:1px solid #888}.c-biuro-sections{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.c-biuro-sections--item{-webkit-box-flex:1;-ms-flex:1 0 20%;flex:1 0 20%;margin:5px;border:1px solid #888;text-align:center}.c-biuro-services{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.c-biuro-services--item{-webkit-box-flex:1;-ms-flex:1 0 30%;flex:1 0 30%;margin:5px;border:1px solid #888}.c-biuro-values{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.c-biuro-values--item{-webkit-box-flex:1;-ms-flex:1 0 40%;flex:1 0 40%;margin:5px;border:1px solid #888}@media (min-width:80em){[href^=tel]{pointer-events:none;text-decoration:none;color:inherit}}@media (max-width:47.999em){.l-footer--section{-webkit-box-flex:1;-ms-flex:1 0 35%;flex:1 0 35%;margin-bottom:20px}.c-jobs-list--head{display:none}.c-jobs-list--col-city{text-align:right}.c-fixed-footer{position:fixed;left:0;bottom:0;width:100%;background:hsla(0,0%,100%,.85);padding:20px 20px 0;-webkit-box-shadow:0 -1px 1px 0 rgba(0,0,0,.45);box-shadow:0 -1px 1px 0 rgba(0,0,0,.45)}}@media (min-width:48em){#custom .biuro-title{border-width:3px;margin:0 0 30px;padding:20px;font-size:22px}.c-jobs-list--col-city,.c-jobs-list--col-valid,.c-jobs-list--head:nth-child(n+2){border-left:1px solid #dfe1e4}.c-jobs-list--col-valid{display:table-cell}}@media (max-width:29.999em){.c-jobs-list--col{float:left;width:calc(100% - 20px)}.c-jobs-list--col-city{padding-bottom:10px;text-align:left}}@media (min-width:30em){.c-jobs-list--col{max-width:260px}}@media (max-width:600px){.bu-action{height:44px}}@media (min-width:360px){#content .search_box li .input{width:83%}}@media (min-width:480px){#content img.starjobs-img{float:left;width:100px;margin:15px 20px 15px 0}#content .t-contacts td.t-contacts-col-1{width:43%}#content .t-contacts td.t-contacts-col-2,#content .t-contacts td.t-contacts-col-3{width:50%}#content .info_box{float:right;margin:47px 0 20px 20px}#content .search_box li .input{width:88%}.about-biuro-img{width:50%}#custom .biuro-header .logo{float:left;margin:0 20px 20px 0}#custom .biuro-ti-img{display:block;float:left;width:70px}#custom .biuro-job-contacts{margin:0 0 0 70px}}@media (min-width:600px){#content .search_box li label{float:left;padding:9px 10px 0 0}#content .search_box li #search-input-block{margin:0 0 0 100px}}@media (min-width:768px){#content h1{text-align:justify}#content img.starjobs-img{width:200px}#content .t-membership td{border-bottom:1px solid #dfdfdf;padding-bottom:10px}#content .t-membership .t-membership-col-1{width:150px;padding-right:20px}#content .t-contacts td.t-contacts-col-1{width:34%}#content .t-contacts td.t-contacts-col-2,#content .t-contacts td.t-contacts-col-3{width:33%}#content .info_box.tyle_1,#content .info_box.tyle_1 .bottom,#content .info_box.tyle_2,#content .info_box.tyle_2 .bottom,#content .info_box.tyle_3,#content .info_box.tyle_3 .bottom,#content .info_box.tyle_4,#content .info_box.tyle_4 .bottom,#content .info_box.tyle_5,#content .info_box.tyle_5 .bottom{background-image:url(../_img/info_box_bg.png);background-repeat:no-repeat}#custom .biuro-header .logo{margin:0 20px 24px 0}}@media (min-width:980px){#content h2,#content h3,#content ul:not([class]){text-align:justify}#content h1{padding:0 0 15px;font-size:24px}#content .t-reason td{display:table-cell;width:50%}#content .t-reason .t-reason-col-1{padding-right:20px;border-right:1px solid #dfdfdf}#content .t-reason .t-reason-col-2{padding-left:20px}#content .t-reason .t-reason-col-2 h2{padding:12px 0 25px}#content .t-membership td{padding-bottom:0}#content .t-membership .t-membership-col-1{width:250px;padding-right:0}#content .info_box,#content .info_box p{font-size:18px}#content .search_box li select{margin:0 33px 10px 0}#content .search_box li a.url{margin-top:-36px}#content .search_box li #search-input-block{margin:0 200px 0 100px}#content a.home_url,.c-home-url{display:inline-block;font-weight:400;margin:15px 50px;font-size:24px}#content ul:not([class]) li{padding:0 0 5px 45px}#content ul:not([class]) li:before{left:21px}.about-biuro-img{width:25%}}@media only screen and (min-width:1281px){[href^=tel]{pointer-events:none;text-decoration:none;color:inherit}}@media (max-width:767px){#content h1 .icon{display:block;margin-top:10px}#content .t-membership tr{display:block}#content .t-membership td{display:block;float:left;width:100%}#content .t-membership .t-membership-col-2{border-bottom:1px solid #dfdfdf;padding:0 0 20px}#content .t-contacts td{float:left;width:50%}.hidden-max-small{display:none!important}}@media (max-width:599px){#content .search_box li select+label{clear:left}}@media (max-width:479px){#content .t-contacts td{width:100%}.hidden-max-x-small{display:none!important}#custom .biuro-job-valid-till{display:block}}
\ No newline at end of file
@font-face{font-family:PT Sans Narrow;src:url(../fonts/pt_sans_narrow.woff2) format("woff2"),url(../fonts/pt_sans_narrow.woff) format("woff");font-weight:400;font-style:normal;font-display:swap}@font-face{font-family:PT Sans Narrow;src:url(../fonts/pt_sans_narrow_bold.woff2) format("woff2"),url(../fonts/pt_sans_narrow_bold.woff) format("woff");font-weight:600;font-style:normal;font-display:swap}@font-face{font-family:Bebas Neue;src:url(../fonts/bebas-neue.woff2) format("woff2"),url(../fonts/bebas-neue.woff) format("woff");font-weight:400;font-style:normal;font-display:swap}
/*! normalize.css v8.0.0 | MIT License | github.com/necolas/normalize.css */hr{-webkit-box-sizing:content-box;box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{-webkit-box-sizing:border-box;box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}[hidden],template{display:none}a:hover{text-decoration:none}figure{margin:0}img{max-width:100%}p{margin:0 0 1.6rem}b,strong{font-weight:600;font-weight:var(--typo--weight-bold)}table{border-collapse:collapse;border-spacing:0}.l-footer--inner{display:-webkit-box;display:-ms-flexbox;display:flex;padding-top:15px;-ms-flex-wrap:wrap;flex-wrap:wrap}.l-footer--section{-webkit-box-flex:1;-ms-flex:1 0 15%;flex:1 0 15%}.l-footer--section h4{margin:0;padding:0}.l-footer{padding-bottom:100px;-webkit-box-shadow:0 -1px 1px 0 rgba(0,0,0,.45);box-shadow:0 -1px 1px 0 rgba(0,0,0,.45)}.awesomplete [hidden]{display:none}.awesomplete .visually-hidden{position:absolute;clip:rect(0,0,0,0)}.awesomplete{display:inline-block;position:relative}.awesomplete>input{display:block}.awesomplete>ul{position:absolute;left:0;z-index:1;min-width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;list-style:none;padding:0;margin:0;background:#fff}.awesomplete>ul:empty{display:none}.c-breadcrumbs{padding-top:1em}.c-cookies-warning{position:fixed;left:0;right:0;bottom:0;padding:15px 20px;background:#f6f6f6;overflow:hidden;z-index:100}.c-cookies-warning .bu-action{margin-top:10px}.c-cookies-warning .bu-action--alt{float:right}.c-copy{padding-top:.75em;text-align:center}.c-divisions--list{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-bottom:16px}.c-divisions--list-item{margin-right:10px;padding:0 12px;font-weight:400;font-weight:var(--typo--weight-regular);line-height:1.5;cursor:pointer}.is-divisions--list-item-active{background:#ccc;font-weight:600;font-weight:var(--typo--weight-bold)}.c-form--input--error{border:1px solid #f90000}.c-form--validation-error{color:#f90000;margin-bottom:10px}#custom .biuro-title{margin:0 0 20px;padding:10px;font-size:calc(1.125rem + .8929vw - 2.85728px);border:2px solid #006957;border:2px solid var(--color--green);border-radius:12px}#custom .biuro-title h1{margin:0;padding:0;line-height:1.2;color:#006957;color:var(--color--green);font-weight:600;font-weight:var(--typo--weight-bold);overflow:hidden;text-align:center;text-transform:uppercase}.c-jobs-list tr:nth-child(2n){background:#f8f8f8}.c-jobs-list td,.c-jobs-list th{vertical-align:top}.c-jobs-list a{display:block}.c-jobs-list--head{font-weight:700;text-align:left}.c-jobs-list--col-valid{display:none}.pods-pagination-paginate{display:block;padding-bottom:1em}.page-numbers{margin:0 1px;padding:1px}.page-numbers.current{font-weight:600;font-weight:var(--typo--weight-bold)}.c-logo{text-decoration:none}.c-nav--main-item{position:relative;margin-right:10px;border:1px solid grey;padding:5px}.c-nav--main-anchor{display:block;padding:0 .25em;text-transform:uppercase}.c-nav--sub{position:absolute;top:100%;left:-1px;padding:0 1em 0 6px;border:1px solid grey;overflow:hidden;background:#fff}.c-nav--sub-item{background:#fff;padding:.5em .5em .5em 0}.c-nav--sub-anchor{padding:.25em;white-space:nowrap}.c-nav--item{margin:10px}.c-nav--link{line-height:40px;font-size:24px;text-decoration:none}.c-nav--link:hover{text-decoration:underline}.c-nav--lang{display:-webkit-box;display:-ms-flexbox;display:flex}.c-nav--lang li{padding:0 5px}.is-nav--main-item-active{position:relative;border-bottom-color:red}.is-nav--main-item-active:before{content:"";position:absolute;height:1px;width:100%;bottom:-1px;left:0;background:#fff;z-index:10}.is-nav--main-item-active .c-nav--sub{display:-webkit-box;display:-ms-flexbox;display:flex}.is-nav--main-anchor-active{text-decoration:none}.is-nav--sub-anchor-active{text-decoration:none;font-weight:600}.bu-action{height:28px;cursor:pointer;border:1px solid #e1e1e1;padding:0 15px;margin:0;display:inline-block}.bu-action--main{color:#fff;background:#006957}.c-nav-footer a:hover{border-color:#ababab}.c-nav-footer .act,.c-nav-footer .act:hover{border-color:#4b4d4f}#content a:hover{text-decoration:underline}#content h1{padding:0 0 10px;font-size:22px;font-weight:400}#content h2{padding:0 0 13px;font-size:19px;font-weight:700}#content h2 small{display:block;font-size:16px}#content h3{padding:0 0 10px;font-size:17px;font-weight:700}#content .info_box,#content .info_box p{font-size:16px;line-height:1.2;text-transform:uppercase}#content .t-reason{padding:0;border:0}#content .t-reason td{display:block;vertical-align:top}#content .t-reason .t-reason-col-2 h2{padding:25px 0 13px}#content .t-reason h2{text-align:center}#content .t-reason ul{padding:0}#content .t-membership{width:100%;border:0;text-align:left}#content .t-membership td{text-align:justify;vertical-align:middle}#content .t-membership .t-membership-row-4 td{border-bottom:none}#content .t-contacts-box{max-width:650px}#content .t-contacts{width:100%}#content .t-contacts td{vertical-align:top}#content .t-contacts p{text-align:left}#content .info_box{position:relative;margin:0 0 20px;color:#fff}#content .info_box.tyle_1{background-position:0 0}#content .info_box.tyle_1 .bottom{background-position:-250px 100%}#content .info_box.tyle_2{background-position:-500px 0}#content .info_box.tyle_2 .bottom{background-position:-750px 100%}#content .info_box.tyle_3{background-position:-1000px 0}#content .info_box.tyle_3 .bottom{background-position:-1250px 100%}#content .info_box.tyle_4{background-position:-1500px 0}#content .info_box.tyle_4 .bottom{background-position:-1750px 100%}#content .info_box.tyle_5{background-position:-2000px 0}#content .info_box.tyle_5 .bottom{background-position:-2250px 100%}#content .info_box .bottom{width:219px;height:22px;position:absolute;left:0;bottom:-22px}#content .info_box p{padding:0}#content .search_box{background:#f8f8f8;padding:10px}#content .search_box select{width:130px;background:#f7f7f7;border:1px solid #e1e1e1;padding:6px}#content .search_box li{padding:0;display:block;background:0 0;overflow:hidden}#content .search_box li label{display:block;font-weight:700}#content .search_box li .input{width:78%;color:#4b4d4f;border:0;padding:8px;background:0 0}#content .search_box li select{color:#4b4d4f;background:#f5f5f5;margin:0 20px 10px 0}#content .search_box li select+.filter-button{clear:left;margin-left:100px}#content .search_box li .submit{float:right;width:39px;height:39px;cursor:pointer;background:url(../_img/search_box_icon.gif) 50% 50% no-repeat;border:0;vertical-align:middle}#content .search_box li a.url{float:right;margin-top:7px;padding:4px 18px 4px 0;font-weight:700}#content .search_box li a.url.open{background:url(../_img/search_box_url_icon.gif) right 12px no-repeat}#content .search_box li a.url.close{background:url(../_img/search_box_url_icon.gif) right -13px no-repeat}#content .search_box li #search-input-block{border:1px solid #dfe1e4;background:#fff;overflow:hidden}#content .search_box li.filter-additional{padding-top:10px}#content .search_box li.filter-additional label{float:left;width:95px;padding:6px 5px 0 0}#content .search_box li.filter-additional select{float:left}#content .search_box li.filter-additional+.filter-additional{padding-top:0}#content .search_box li #period,#content .search_box li #type{margin-right:0}#content .search_box .filter-button{float:left;color:#4b4d4f;background:#f5f5f5;margin:0 22px 0 0;border:1px solid #e1e1e1;padding:7px;cursor:pointer;text-decoration:none}#content .search_box .filter-button:hover{background:#eee}#content p{text-align:justify}#content a{text-decoration:none}#content .img_left{margin:0 20px 15px 0;float:left}#content a.home_url,.c-home-url{width:254px;color:#4b4d4f;font-size:21px;margin:15px auto;display:block;text-align:center;line-height:1.2}#content a.home_url{text-decoration:none;padding:280px 0 0}#content a.home_url_1{background:url(../_img/workis_l.png) no-repeat;background-size:contain}#content a.home_url_2{background:url(../_img/img_2.jpg) no-repeat}#content a:hover.home_url{text-decoration:underline}.c-home-url{text-decoration:none}.c-home-url:hover{text-decoration:underline}.c-home-pic{display:block;border-radius:50%;margin-bottom:20px;overflow:hidden}#content .contact-form .form li textarea,.cv-form .form li textarea{overflow-y:auto;resize:none}.c-home-pic img{display:block}#content .news_list{padding:0 0 15px;display:block}#content .news_list li{border-top:1px solid #dfe1e4;padding:15px 0 0;display:block}#content .news_list li a.more{font-weight:700;text-decoration:underline}#content .news_list li:first-child{border-top:0;padding:0}#content .staff{margin:0 0 15px -33px;display:block}#content .staff li{width:216px;margin:0 0 10px 33px;float:left}#content .staff li.sep{width:100%}#content .staff li .foto{margin:0 0 10px;display:block}#content .staff li p{padding:0 5px 15px}#content .form{width:318px;padding:0 0 15px;display:inline-block}#content .form li{padding:0 0 28px;display:block;background:0 0}#content .form li.bottom{padding:0 0 10px;margin:-10px 0 0}#content .form li label{padding:0 0 6px;display:block}#content .form li input.text,#content .form li select,#content .form li textarea{background:#f7f7f7;border:1px solid #e1e1e1;padding:6px}#content .form li input.text,#content .form li textarea{width:318px}#content .form li select{width:164px}#content .form li textarea{height:114px;overflow:auto}#content .form li .errormessage{color:#bb2543;padding:6px 0 0;display:block}#content .form li .txt{color:#bb2543;display:inline-block}#content .form li .action{height:28px;color:#fff;cursor:pointer;background:#006957;border:1px solid #e1e1e1;padding:0 20px;margin:0 10px 0 0;display:inline-block}#content .form li .action:hover{background:#008d75}#content .form li .Actions{display:inline-block}#content .country_tabs{width:100%;padding:0 0 15px;float:left}#content .country_tabs li{padding:0 10px 0 0;float:left}#content .country_tabs li a{color:#4b4d4f;text-decoration:none;float:left}#content .country_tabs li a.act{font-weight:700;background:#ebebeb;padding:0 10px}#content .country_tabs li a:hover{text-decoration:underline}#content .pages{text-align:center;padding:0 0 15px;display:block}#content .pages a{margin:0 3px}#content .pages a.prev{font-weight:700;float:left}#content .pages a.next{font-weight:700;float:right}#content .pages a.act{font-weight:700}#banners{width:976px;padding:20px 0;float:left}#banners li{margin:0 0 0 40px;float:left}#banners li:first-child{margin:0}.fl{float:left!important}.fr{float:right!important}.clear{height:0;clear:both;display:block}.input,input.text,select,textarea{box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}button::-moz-focus-inner,input[type=button]::-moz-focus-inner,input[type=reset]::-moz-focus-inner,input[type=submit]::-moz-focus-inner{border:0;padding:0}.map_page{width:540px;text-align:center;margin:20px auto}.map_page .logo{margin:0 0 30px;display:block}.map_page p{padding:0 0 15px;display:block}.map_page a.map_url{width:168px;position:relative;display:inline-block}.map_page a.map_url.es{height:89px;background:url(../_img/map_url.jpg) no-repeat;margin:0 0 -20px}.map_page a:hover.map_url.es{background:url(../_img/map_url.jpg) -200px 0 no-repeat;z-index:1}.map_page a.map_url.lv{height:100px;background:url(../_img/map_url.jpg) 0 -69px no-repeat;margin:0 0 -30px}.map_page a:hover.map_url.lv{background:url(../_img/map_url.jpg) -400px -69px no-repeat;z-index:1}.map_page a.map_url.lt{height:109px;background:url(../_img/map_url.jpg) 0 -139px no-repeat}.map_page a:hover.map_url.lt{background:url(../_img/map_url.jpg) -600px -139px no-repeat;z-index:1}.hide{display:none!important}#content ul:not([class]) a{text-decoration:underline}#content img.left{margin:15px 20px 15px 0;float:left}#content img.ico{position:relative;top:7px}#map_canvas{width:100%;height:450px}#content .contact-form .form li input[type=text].error,#content .contact-form .form li textarea.error{border:1px solid #bb2543}.job-cont{padding:0 0 15px;display:block}.cont-content{display:block;padding:0 0 10px}.cv-form .form li.bottom{padding:0 0 10px;margin:-10px 0 0}.cv-form .form li label{padding:0 0 6px;display:block}.cv-form .form li input.text,.cv-form .form li textarea{background:#f7f7f7;border:1px solid #e1e1e1;padding:6px;width:318px}.cv-form .form li textarea{height:114px}#custom,#custom .biuro-header,#custom .biuro-ti,#custom .biuro-ti-text,.about-biuro{overflow:hidden}.cv-form .form li input[type=file]{background:#f7f7f7;border:1px solid #e1e1e1;padding:0 6px;width:304px;height:30px}.cv-form .form li .errormessage{color:#bb2543;padding:6px 0 0}.cv-form .form li input[type=file].error,.cv-form .form li input[type=text].error{border:1px solid #bb2543}.cv-form .form li .txt{color:#bb2543;display:inline-block}.cv-form .form li .action{height:28px;color:#fff;cursor:pointer;background:#006957;border:1px solid #e1e1e1;padding:0 20px;margin:0 10px 0 0;display:inline-block}.cv-form .form li .action:hover{background:#008d75}.cv-form .form li .Actions{display:inline-block}#cv-success,#cv-success p{color:#393}#content ul:not([class]){padding:0 0 15px;display:block}#content ul.table li,#content ul:not([class]) li{position:relative;padding:0 0 5px 25px;display:block}#content ul.table li:before,#content ul:not([class]) li:before{content:"";position:absolute;top:9px;left:1px;width:4px;height:4px;border-radius:50%;background:#4b4d4f}#content ul:not([class]) a:hover{text-decoration:none}#content ol{padding:0 0 15px 20px;text-align:justify}#content ol>li{padding:0 0 5px;text-align:justify}#content .cform .form li select{width:318px}#content #filter-empty-results{padding-top:15px}#content a.home_url,#content h1{text-transform:uppercase}.hidden-coords{display:none}.banner{width:180px;height:160px;float:left;position:relative;left:-15px;margin-right:50px;margin-bottom:20px}.banner a,.banner a img{border:0}.icon:before{content:"";position:relative;top:9px;display:inline-block;width:30px;height:26px;margin:0 8px 0 0;background:url(../_img/icons.png) 50px 50px no-repeat;border-radius:3px}#content .icon-blue-dark{color:#253466;font-weight:700}.icon-blue-dark:before{border:1px solid #253466}.icon-blue-dark:hover:before{background-color:#253466}#content .icon-blue-light{color:#156292;font-weight:700}.icon-blue-light:before{border:1px solid #156292}.icon-blue-light:hover:before{background-color:#156292}#content .icon-red{color:#bb2543;font-weight:700}.icon-red:before{border:1px solid #bb2543}.icon-red:hover:before{background-color:#bb2543}#content .icon-brown{color:#b76630;font-weight:700}.icon-brown:before{border:1px solid #b76630}.icon-brown:hover:before{background-color:#b76630}#content .icon-purple{color:#6b1c3a;font-weight:700}.icon-purple:before{border:1px solid #6b1c3a}.icon-purple:hover:before{background-color:#6b1c3a}#content .icon-green{color:#006957;font-weight:700}.icon-green:before{border:1px solid #006957}.icon-green:hover:before{background-color:#006957}.icon-blue-dark.icon-facebook:before{background-position:-2px -45px}.icon-blue-dark.icon-linkedin:before{background-position:-40px -45px}.icon-blue-dark.icon-phone:before{background-position:-80px -45px}.icon-blue-dark.icon-note:before{background-position:-121px -45px}.icon-blue-light.icon-facebook:before{background-position:-2px -87px}.icon-blue-light.icon-linkedin:before{background-position:-40px -87px}.icon-blue-light.icon-phone:before{background-position:-80px -87px}.icon-blue-light.icon-note:before{background-position:-121px -87px}.icon-red.icon-facebook:before{background-position:-2px -131px}.icon-red.icon-linkedin:before{background-position:-40px -131px}.icon-red.icon-phone:before{background-position:-80px -131px}.icon-red.icon-note:before{background-position:-121px -131px}.icon-brown.icon-facebook:before{background-position:-2px -176px}.icon-brown.icon-linkedin:before{background-position:-40px -176px}.icon-brown.icon-phone:before{background-position:-80px -176px}.icon-brown.icon-note:before{background-position:-121px -176px}.icon-purple.icon-facebook:before{background-position:-2px -218px}.icon-purple.icon-linkedin:before{background-position:-40px -218px}.icon-purple.icon-phone:before{background-position:-80px -218px}.icon-purple.icon-note:before{background-position:-121px -218px}.icon-green.icon-facebook:before{background-position:-2px -258px}.icon-green.icon-linkedin:before{background-position:-40px -258px}.icon-green.icon-phone:before{background-position:-80px -258px}.icon-green.icon-note:before{background-position:-121px -258px}.icon-facebook:hover:before{background-position:-2px -7px}.icon-linkedin:hover:before{background-position:-40px -7px}.icon-phone:hover:before{background-position:-80px -7px}.icon-note:hover:before{background-position:-121px -7px}.about-biuro{margin:0 auto}.about-biuro-img{position:relative;float:left;width:100%;height:214px;background-repeat:no-repeat}.about-biuro-img:before{position:absolute;top:0;left:50%;width:178px;height:214px;margin:0 0 0 -89px}.about-biuro-img-1:before{background-position:0 0}.about-biuro-img-2:before{background-position:-178px 0}.about-biuro-img-3:before{background-position:-356px 0}.about-biuro-img-4:before{background-position:-534px 0}.about-biuro-lt .about-biuro-img:before{background-image:url(../_img/lt-apie-idarbinimo-agentura.jpg)}.about-biuro-lv .about-biuro-img:before{background-image:url(../_img/lv-apie-idarbinimo-agentura.jpg)}.about-biuro-ee .about-biuro-img:before{background-image:url(../_img/ee-apie-idarbinimo-agentura.jpg)}.about-biuro-en .about-biuro-img:before{background-image:url(../_img/en-apie-idarbinimo-agentura.jpg)}.about-biuro-ru .about-biuro-img:before{background-image:url(../_img/ru-apie-idarbinimo-agentura.jpg)}.job-add h3{float:left;clear:both;font-weight:700;padding:0 6px 15px 0}.job-add span{display:block;float:left;padding:0 0 15px}#custom .biuro-header p{color:#006957;font-weight:700}#custom .biuro-header .logo{float:none;width:133px;margin:0 auto 20px}#custom .biuro-ti-img{display:none}#custom .biuro-ti-text h3{color:#006957;padding:0}#custom .biuro-ti-text li{position:relative;padding:0 0 0 15px;background:none}#custom .biuro-ti-text li:before{content:"";position:absolute;top:7px;left:2px;width:6px;height:6px;border-radius:50%;background:#006957}.u-align--center{text-align:center}.tmp-contacts img{display:none}.tmp-contacts ul{padding-left:5px}.c-logos{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.c-logos div{-webkit-box-flex:0;-ms-flex:0 0 21%;flex:0 0 21%;border:1px solid grey;padding:1em;margin-bottom:1em;text-align:center}.biuro-ti-img{display:none}.c-biuro-feedbacks{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.c-biuro-feedbacks--item{-webkit-box-flex:1;-ms-flex:1 0 40%;flex:1 0 40%;margin:5px;border:1px solid #888}.c-biuro-sections{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.c-biuro-sections--item{-webkit-box-flex:1;-ms-flex:1 0 20%;flex:1 0 20%;margin:5px;border:1px solid #888;text-align:center}.c-biuro-services{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.c-biuro-services--item{-webkit-box-flex:1;-ms-flex:1 0 30%;flex:1 0 30%;margin:5px;border:1px solid #888}.c-biuro-values{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.c-biuro-values--item{-webkit-box-flex:1;-ms-flex:1 0 40%;flex:1 0 40%;margin:5px;border:1px solid #888}@media (min-width:80em){[href^=tel]{pointer-events:none;text-decoration:none;color:inherit}}@media (max-width:47.999em){.l-footer--section{-webkit-box-flex:1;-ms-flex:1 0 35%;flex:1 0 35%;margin-bottom:20px}.c-jobs-list--head{display:none}.c-jobs-list--col-city{text-align:right}.c-fixed-footer{position:fixed;left:0;bottom:0;width:100%;background:hsla(0,0%,100%,.85);padding:20px 20px 0;-webkit-box-shadow:0 -1px 1px 0 rgba(0,0,0,.45);box-shadow:0 -1px 1px 0 rgba(0,0,0,.45)}}@media (min-width:48em){#custom .biuro-title{border-width:3px;margin:0 0 30px;padding:20px;font-size:22px}.c-jobs-list--col-city,.c-jobs-list--col-valid,.c-jobs-list--head:nth-child(n+2){border-left:1px solid #dfe1e4}.c-jobs-list--col-valid{display:table-cell}}@media (max-width:29.999em){.c-jobs-list--col{float:left;width:calc(100% - 20px)}.c-jobs-list--col-city{padding-bottom:10px;text-align:left}}@media (min-width:30em){.c-jobs-list--col{max-width:260px}}@media (max-width:600px){.bu-action{height:44px}}@media (min-width:360px){#content .search_box li .input{width:83%}}@media (min-width:480px){#content img.starjobs-img{float:left;width:100px;margin:15px 20px 15px 0}#content .t-contacts td.t-contacts-col-1{width:43%}#content .t-contacts td.t-contacts-col-2,#content .t-contacts td.t-contacts-col-3{width:50%}#content .info_box{float:right;margin:47px 0 20px 20px}#content .search_box li .input{width:88%}.about-biuro-img{width:50%}#custom .biuro-header .logo{float:left;margin:0 20px 20px 0}#custom .biuro-ti-img{display:block;float:left;width:70px}#custom .biuro-job-contacts{margin:0 0 0 70px}}@media (min-width:600px){#content .search_box li label{float:left;padding:9px 10px 0 0}#content .search_box li #search-input-block{margin:0 0 0 100px}}@media (min-width:768px){#content h1{text-align:justify}#content img.starjobs-img{width:200px}#content .t-membership td{border-bottom:1px solid #dfdfdf;padding-bottom:10px}#content .t-membership .t-membership-col-1{width:150px;padding-right:20px}#content .t-contacts td.t-contacts-col-1{width:34%}#content .t-contacts td.t-contacts-col-2,#content .t-contacts td.t-contacts-col-3{width:33%}#content .info_box.tyle_1,#content .info_box.tyle_1 .bottom,#content .info_box.tyle_2,#content .info_box.tyle_2 .bottom,#content .info_box.tyle_3,#content .info_box.tyle_3 .bottom,#content .info_box.tyle_4,#content .info_box.tyle_4 .bottom,#content .info_box.tyle_5,#content .info_box.tyle_5 .bottom{background-image:url(../_img/info_box_bg.png);background-repeat:no-repeat}#custom .biuro-header .logo{margin:0 20px 24px 0}}@media (min-width:980px){#content h2,#content h3,#content ul:not([class]){text-align:justify}#content h1{padding:0 0 15px;font-size:24px}#content .t-reason td{display:table-cell;width:50%}#content .t-reason .t-reason-col-1{padding-right:20px;border-right:1px solid #dfdfdf}#content .t-reason .t-reason-col-2{padding-left:20px}#content .t-reason .t-reason-col-2 h2{padding:12px 0 25px}#content .t-membership td{padding-bottom:0}#content .t-membership .t-membership-col-1{width:250px;padding-right:0}#content .info_box,#content .info_box p{font-size:18px}#content .search_box li select{margin:0 33px 10px 0}#content .search_box li a.url{margin-top:-36px}#content .search_box li #search-input-block{margin:0 200px 0 100px}#content a.home_url,.c-home-url{display:inline-block;font-weight:400;margin:15px 50px;font-size:24px}#content ul:not([class]) li{padding:0 0 5px 45px}#content ul:not([class]) li:before{left:21px}.about-biuro-img{width:25%}}@media only screen and (min-width:1281px){[href^=tel]{pointer-events:none;text-decoration:none;color:inherit}}@media (max-width:767px){#content h1 .icon{display:block;margin-top:10px}#content .t-membership tr{display:block}#content .t-membership td{display:block;float:left;width:100%}#content .t-membership .t-membership-col-2{border-bottom:1px solid #dfdfdf;padding:0 0 20px}#content .t-contacts td{float:left;width:50%}.hidden-max-small{display:none!important}}@media (max-width:599px){#content .search_box li select+label{clear:left}}@media (max-width:479px){#content .t-contacts td{width:100%}.hidden-max-x-small{display:none!important}#custom .biuro-job-valid-till{display:block}}
\ No newline at end of file
......@@ -123,7 +123,7 @@ document.querySelectorAll('.js-job-action').forEach(function (node) {
});
</script>
<script src="/wp-content/themes/biuro/js/main-a9a206ea.min.js" async></script>
<script src="/wp-content/themes/biuro/js/main-19c9eea4.min.js" async></script>
<?php wp_footer(); ?>
</body>
</html>
......@@ -10,7 +10,6 @@ function delog($str, $label = 'Label') {
echo '<h1 style="white-space: nowrap;">' . $label . ': ' . $str . '</h1>';
}
function cc_mime_types($mimes) {
$mimes['svg'] = 'image/svg+xml';
return $mimes;
......@@ -412,6 +411,48 @@ add_action('init', 'df_disable_comments_admin_bar');
// require_once 'includes/disable_discussion';
function getContacts ( $request ) {
$res = array();
array_push($res, array(
'id' => 1,
'date' => '2019-03-15 19:05:44',
'name' => 'Vardenis',
'surname' => 'Pavardenis',
'phone' => '+37060000000',
'email' => 'email@example.com',
'city' => '',
'comment' => '',
'cv' => ''
) );
array_push($res, array(
'id' => 2,
'date' => '2019-04-01 08:08:17',
'name' => 'Jonas',
'surname' => 'Jonaitis Kazlauskaitis',
'phone' => '',
'email' => 'jonas@example.com',
'city' => 'Vilnius',
'comment' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Est ducimus iusto modi a, iure. Provident.',
'cv' => '/path/to/000000000000000.pdf'
) );
array_push($res, array(
'id' => 3,
'date' => '2019-04-10 07:43:02',
'name' => 'Eglė',
'surname' => 'Pavardenytė',
'phone' => '',
'email' => 'egle@example.com',
'city' => 'Kaunas',
'comment' => '',
'cv' => ''
) );
return new WP_REST_Response( $res, 200 );
}
function getDivisions ( $request ) {
$res = array();
$params = $request->get_params();
......@@ -454,7 +495,7 @@ function getDivisions ( $request ) {
add_action( 'rest_api_init', function () {
register_rest_route( 'biuro-api/v1', '/divisions', array(
register_rest_route( 'api/v1', '/divisions', array(
'methods' => WP_REST_Server::READABLE,
'callback' => 'getDivisions',
'args' => array(
......@@ -466,4 +507,9 @@ add_action( 'rest_api_init', function () {
)
));
register_rest_route( 'api/v1', '/contacts', array(
'methods' => WP_REST_Server::READABLE,
'callback' => 'getContacts'
));
});
......@@ -33,14 +33,14 @@ define('cityID', $cityID);
<style><?php include 'css/core-a25434ed1d.min.css'; ?></style>
<link rel="preload" href="/wp-content/themes/biuro/css/main-e48562fc43.min.css" as="style" onload="this.rel='stylesheet'">
<link rel="preload" href="/wp-content/themes/biuro/css/main-4233b63eb8.min.css" as="style" onload="this.rel='stylesheet'">
<link rel="preload" href="/wp-content/themes/biuro/fonts/pt_sans_narrow.woff2" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="/wp-content/themes/biuro/fonts/pt_sans_narrow_bold.woff2" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="/wp-content/themes/biuro/fonts/bebas-neue.woff2" as="font" type="font/woff2" crossorigin>
<noscript>
<link rel="stylesheet" href="/wp-content/themes/biuro/css/main-e48562fc43.min.css">
<link rel="stylesheet" href="/wp-content/themes/biuro/css/main-4233b63eb8.min.css">
</noscript>
<?php wp_head(); ?>
......
!function(t){var e={};function n(i){if(e[i])return e[i].exports;var s=e[i]={i:i,l:!1,exports:{}};return t[i].call(s.exports,s,s.exports,n),s.l=!0,s.exports}n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)n.d(i,s,function(e){return t[e]}.bind(null,s));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/",n(n.s=1)}([function(t,e,n){"use strict";(function(t){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}e.a=function(){var e=function t(e,n){var i=this;t.count=(t.count||0)+1,this.count=t.count,this.isOpened=!1,this.input=o(e),this.input.setAttribute("autocomplete","off"),this.input.setAttribute("aria-expanded","false"),this.input.setAttribute("aria-owns","awesomplete_list_"+this.count),this.input.setAttribute("role","combobox"),this.options=n=n||{},function(t,e,n){for(var i in e){var s=e[i],o=t.input.getAttribute("data-"+i.toLowerCase());"number"==typeof s?t[i]=parseInt(o):!1===s?t[i]=null!==o:s instanceof Function?t[i]=null:t[i]=o,t[i]||0===t[i]||(t[i]=i in n?n[i]:s)}}(this,{minChars:2,maxItems:10,autoFirst:!1,data:t.DATA,filter:t.FILTER_CONTAINS,sort:!1!==n.sort&&t.SORT_BYLENGTH,container:t.CONTAINER,item:t.ITEM,replace:t.REPLACE,tabSelect:!1},n),this.index=-1,this.container=this.container(e),this.ul=o.create("ul",{hidden:"hidden",role:"listbox",id:"awesomplete_list_"+this.count,inside:this.container}),this.status=o.create("span",{className:"visually-hidden",role:"status","aria-live":"assertive","aria-atomic":!0,inside:this.container,textContent:0!=this.minChars?"Type "+this.minChars+" or more characters for results.":"Begin typing for results."}),this._events={input:{input:this.evaluate.bind(this),blur:this.close.bind(this,{reason:"blur"}),keydown:function(t){var e=t.keyCode;i.opened&&(13===e&&i.selected?(t.preventDefault(),i.select()):9===e&&i.selected&&i.tabSelect?i.select():27===e?i.close({reason:"esc"}):38!==e&&40!==e||(t.preventDefault(),i[38===e?"previous":"next"]()))}},form:{submit:this.close.bind(this,{reason:"submit"})},ul:{mousedown:function(t){t.preventDefault()},click:function(t){var e=t.target;if(e!==this){for(;e&&!/li/i.test(e.nodeName);)e=e.parentNode;e&&0===t.button&&(t.preventDefault(),i.select(e,t.target))}}}},o.bind(this.input,this._events.input),o.bind(this.input.form,this._events.form),o.bind(this.ul,this._events.ul),this.input.hasAttribute("list")?(this.list="#"+this.input.getAttribute("list"),this.input.removeAttribute("list")):this.list=this.input.getAttribute("data-list")||n.list||[],t.all.push(this)};function i(t){var e=Array.isArray(t)?{label:t[0],value:t[1]}:"object"===n(t)&&"label"in t&&"value"in t?t:{label:t,value:t};this.label=e.label||e.value,this.value=e.value}e.prototype={set list(t){if(Array.isArray(t))this._list=t;else if("string"==typeof t&&t.indexOf(",")>-1)this._list=t.split(/\s*,\s*/);else if((t=o(t))&&t.children){var e=[];s.apply(t.children).forEach(function(t){if(!t.disabled){var n=t.textContent.trim(),i=t.value||n,s=t.label||n;""!==i&&e.push({label:s,value:i})}}),this._list=e}document.activeElement===this.input&&this.evaluate()},get selected(){return this.index>-1},get opened(){return this.isOpened},close:function(t){this.opened&&(this.input.setAttribute("aria-expanded","false"),this.ul.setAttribute("hidden",""),this.isOpened=!1,this.index=-1,this.status.setAttribute("hidden",""),o.fire(this.input,"awesomplete-close",t||{}))},open:function(){this.input.setAttribute("aria-expanded","true"),this.ul.removeAttribute("hidden"),this.isOpened=!0,this.status.removeAttribute("hidden"),this.autoFirst&&-1===this.index&&this.goto(0),o.fire(this.input,"awesomplete-open")},destroy:function(){if(o.unbind(this.input,this._events.input),o.unbind(this.input.form,this._events.form),!this.options.container){var t=this.container.parentNode;t.insertBefore(this.input,this.container),t.removeChild(this.container)}this.input.removeAttribute("autocomplete"),this.input.removeAttribute("aria-autocomplete");var n=e.all.indexOf(this);-1!==n&&e.all.splice(n,1)},next:function(){var t=this.ul.children.length;this.goto(this.index<t-1?this.index+1:t?0:-1)},previous:function(){var t=this.ul.children.length,e=this.index-1;this.goto(this.selected&&-1!==e?e:t-1)},goto:function(t){var e=this.ul.children;this.selected&&e[this.index].setAttribute("aria-selected","false"),this.index=t,t>-1&&e.length>0&&(e[t].setAttribute("aria-selected","true"),this.status.textContent=e[t].textContent+", list item "+(t+1)+" of "+e.length,this.input.setAttribute("aria-activedescendant",this.ul.id+"_item_"+this.index),this.ul.scrollTop=e[t].offsetTop-this.ul.clientHeight+e[t].clientHeight,o.fire(this.input,"awesomplete-highlight",{text:this.suggestions[this.index]}))},select:function(t,e){if(t?this.index=o.siblingIndex(t):t=this.ul.children[this.index],t){var n=this.suggestions[this.index];o.fire(this.input,"awesomplete-select",{text:n,origin:e||t})&&(this.replace(n),this.close({reason:"select"}),o.fire(this.input,"awesomplete-selectcomplete",{text:n}))}},evaluate:function(){var t=this,e=this.input.value;e.length>=this.minChars&&this._list&&this._list.length>0?(this.index=-1,this.ul.innerHTML="",this.suggestions=this._list.map(function(n){return new i(t.data(n,e))}).filter(function(n){return t.filter(n,e)}),!1!==this.sort&&(this.suggestions=this.suggestions.sort(this.sort)),this.suggestions=this.suggestions.slice(0,this.maxItems),this.suggestions.forEach(function(n,i){t.ul.appendChild(t.item(n,e,i))}),0===this.ul.children.length?(this.status.textContent="No results found",this.close({reason:"nomatches"})):(this.open(),this.status.textContent=this.ul.children.length+" results found")):(this.close({reason:"nomatches"}),this.status.textContent="No results found")}},e.all=[],e.FILTER_CONTAINS=function(t,e){return RegExp(o.regExpEscape(e.trim()),"i").test(t)},e.FILTER_STARTSWITH=function(t,e){return RegExp("^"+o.regExpEscape(e.trim()),"i").test(t)},e.SORT_BYLENGTH=function(t,e){return t.length!==e.length?t.length-e.length:t<e?-1:1},e.CONTAINER=function(t){return o.create("div",{className:"awesomplete",around:t})},e.ITEM=function(t,e,n){var i=""===e.trim()?t:t.replace(RegExp(o.regExpEscape(e.trim()),"gi"),"<mark>$&</mark>");return o.create("li",{innerHTML:i,role:"option","aria-selected":"false",id:"awesomplete_list_"+this.count+"_item_"+n})},e.REPLACE=function(t){this.input.value=t.value},e.DATA=function(t){return t},Object.defineProperty(i.prototype=Object.create(String.prototype),"length",{get:function(){return this.label.length}}),i.prototype.toString=i.prototype.valueOf=function(){return""+this.label};var s=Array.prototype.slice;function o(t,e){return"string"==typeof t?(e||document).querySelector(t):t||null}function r(t,e){return s.call((e||document).querySelectorAll(t))}function u(){r("input.awesomplete").forEach(function(t){new e(t)})}return o.create=function(t,e){var n=document.createElement(t);for(var i in e){var s=e[i];if("inside"===i)o(s).appendChild(n);else if("around"===i){var r=o(s);r.parentNode.insertBefore(n,r),n.appendChild(r),null!=r.getAttribute("autofocus")&&r.focus()}else i in n?n[i]=s:n.setAttribute(i,s)}return n},o.bind=function(t,e){if(t)for(var n in e){var i=e[n];n.split(/\s+/).forEach(function(e){t.addEventListener(e,i)})}},o.unbind=function(t,e){if(t)for(var n in e){var i=e[n];n.split(/\s+/).forEach(function(e){t.removeEventListener(e,i)})}},o.fire=function(t,e,n){var i=document.createEvent("HTMLEvents");for(var s in i.initEvent(e,!0,!0),n)i[s]=n[s];return t.dispatchEvent(i)},o.regExpEscape=function(t){return t.replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&")},o.siblingIndex=function(t){for(var e=0;t=t.previousElementSibling;e++);return e},"undefined"!=typeof self&&(self.Awesomplete=e),"undefined"!=typeof Document&&("loading"!==document.readyState?u():document.addEventListener("DOMContentLoaded",u)),e.$=o,e.$$=r,"object"===n(t)&&t.exports&&(t.exports=e),e}()}).call(this,n(3)(t))},function(t,e,n){t.exports=n(2)},function(t,e,n){"use strict";n.r(e);var i,s=n(0);!function(t){var e=document.getElementById("cookie-warning"),n=document.getElementById("cookie-agree"),i=document.getElementById("cookie-close"),s=!!o()&&localStorage.getItem("biuro-agree");function o(){try{return localStorage.setItem("a","a"),localStorage.removeItem("a"),!0}catch(t){return!1}}e&&n&&i&&!s&&(e.style.display="block",n.addEventListener("click",function(){o()&&localStorage.setItem("biuro-agree","true"),e.style.display="none"}),i.addEventListener("click",function(){e.style.display="none"}))}(window),window,(i=document.getElementById("js-divisions-map"))&&fetch("/wp-json/biuro-api/v1/divisions?lang="+i.dataset.lang).then(function(t){return t.json()}).then(function(t){!function t(e,n){if(window.google){var i=new window.google.maps.Map(e,{mapTypeId:window.google.maps.MapTypeId.ROADMAP});window.google.maps.event.addListenerOnce(i,"bounds_changed",function(){this.getZoom()>15&&this.setZoom(14)});var s=[],o=document.querySelector(".js-active-region"),r=o&&o.dataset.id?o.dataset.id:"";n[r]?s=n[r]:Object.keys(n).forEach(function(t){var e=n[t];"city"===t.substr(0,4)&&(s=s.concat(e))}),function(t,e){for(var n,i=new window.google.maps.LatLngBounds,s=0;s<e.length;s++){var o=e[s],r=new window.google.maps.LatLng(o.lat,o.lng),u=new window.google.maps.Marker({position:r,map:t,icon:"/wp-content/themes/biuro/i/maps/pin.png",title:o.title});i.extend(r),u.content=o.content,window.google.maps.event.addListener(u,"click",function(){n&&n.close(),(n=new window.google.maps.InfoWindow({content:this.content})).open(t,this)})}t.fitBounds(i)}(i,s.filter(function(t){return t.lat&&t.lng}))}else setTimeout(function(){t(e,n)},250)}(i,t)});var o=document.getElementById("search"),r=document.getElementById("search-city"),u=document.getElementById("search-query"),a=new s.a(r,{minChars:0,sort:!1});r.addEventListener("focus",function(){a.evaluate()});var l=new s.a(u,{minChars:0,sort:!1});u.addEventListener("focus",function(){l.evaluate()}),o&&o.addEventListener("submit",function(t){r.value||u.value||(r.focus(),t.preventDefault())},!1)},function(t,e){t.exports=function(t){if(!t.webpackPolyfill){var e=Object.create(t);e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),Object.defineProperty(e,"exports",{enumerable:!0}),e.webpackPolyfill=1}return e}}]);
\ No newline at end of file
!function(t){var e={};function n(i){if(e[i])return e[i].exports;var s=e[i]={i:i,l:!1,exports:{}};return t[i].call(s.exports,s,s.exports,n),s.l=!0,s.exports}n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)n.d(i,s,function(e){return t[e]}.bind(null,s));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/",n(n.s=1)}([function(t,e,n){"use strict";(function(t){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}e.a=function(){var e=function t(e,n){var i=this;t.count=(t.count||0)+1,this.count=t.count,this.isOpened=!1,this.input=o(e),this.input.setAttribute("autocomplete","off"),this.input.setAttribute("aria-expanded","false"),this.input.setAttribute("aria-owns","awesomplete_list_"+this.count),this.input.setAttribute("role","combobox"),this.options=n=n||{},function(t,e,n){for(var i in e){var s=e[i],o=t.input.getAttribute("data-"+i.toLowerCase());"number"==typeof s?t[i]=parseInt(o):!1===s?t[i]=null!==o:s instanceof Function?t[i]=null:t[i]=o,t[i]||0===t[i]||(t[i]=i in n?n[i]:s)}}(this,{minChars:2,maxItems:10,autoFirst:!1,data:t.DATA,filter:t.FILTER_CONTAINS,sort:!1!==n.sort&&t.SORT_BYLENGTH,container:t.CONTAINER,item:t.ITEM,replace:t.REPLACE,tabSelect:!1},n),this.index=-1,this.container=this.container(e),this.ul=o.create("ul",{hidden:"hidden",role:"listbox",id:"awesomplete_list_"+this.count,inside:this.container}),this.status=o.create("span",{className:"visually-hidden",role:"status","aria-live":"assertive","aria-atomic":!0,inside:this.container,textContent:0!=this.minChars?"Type "+this.minChars+" or more characters for results.":"Begin typing for results."}),this._events={input:{input:this.evaluate.bind(this),blur:this.close.bind(this,{reason:"blur"}),keydown:function(t){var e=t.keyCode;i.opened&&(13===e&&i.selected?(t.preventDefault(),i.select()):9===e&&i.selected&&i.tabSelect?i.select():27===e?i.close({reason:"esc"}):38!==e&&40!==e||(t.preventDefault(),i[38===e?"previous":"next"]()))}},form:{submit:this.close.bind(this,{reason:"submit"})},ul:{mousedown:function(t){t.preventDefault()},click:function(t){var e=t.target;if(e!==this){for(;e&&!/li/i.test(e.nodeName);)e=e.parentNode;e&&0===t.button&&(t.preventDefault(),i.select(e,t.target))}}}},o.bind(this.input,this._events.input),o.bind(this.input.form,this._events.form),o.bind(this.ul,this._events.ul),this.input.hasAttribute("list")?(this.list="#"+this.input.getAttribute("list"),this.input.removeAttribute("list")):this.list=this.input.getAttribute("data-list")||n.list||[],t.all.push(this)};function i(t){var e=Array.isArray(t)?{label:t[0],value:t[1]}:"object"===n(t)&&"label"in t&&"value"in t?t:{label:t,value:t};this.label=e.label||e.value,this.value=e.value}e.prototype={set list(t){if(Array.isArray(t))this._list=t;else if("string"==typeof t&&t.indexOf(",")>-1)this._list=t.split(/\s*,\s*/);else if((t=o(t))&&t.children){var e=[];s.apply(t.children).forEach(function(t){if(!t.disabled){var n=t.textContent.trim(),i=t.value||n,s=t.label||n;""!==i&&e.push({label:s,value:i})}}),this._list=e}document.activeElement===this.input&&this.evaluate()},get selected(){return this.index>-1},get opened(){return this.isOpened},close:function(t){this.opened&&(this.input.setAttribute("aria-expanded","false"),this.ul.setAttribute("hidden",""),this.isOpened=!1,this.index=-1,this.status.setAttribute("hidden",""),o.fire(this.input,"awesomplete-close",t||{}))},open:function(){this.input.setAttribute("aria-expanded","true"),this.ul.removeAttribute("hidden"),this.isOpened=!0,this.status.removeAttribute("hidden"),this.autoFirst&&-1===this.index&&this.goto(0),o.fire(this.input,"awesomplete-open")},destroy:function(){if(o.unbind(this.input,this._events.input),o.unbind(this.input.form,this._events.form),!this.options.container){var t=this.container.parentNode;t.insertBefore(this.input,this.container),t.removeChild(this.container)}this.input.removeAttribute("autocomplete"),this.input.removeAttribute("aria-autocomplete");var n=e.all.indexOf(this);-1!==n&&e.all.splice(n,1)},next:function(){var t=this.ul.children.length;this.goto(this.index<t-1?this.index+1:t?0:-1)},previous:function(){var t=this.ul.children.length,e=this.index-1;this.goto(this.selected&&-1!==e?e:t-1)},goto:function(t){var e=this.ul.children;this.selected&&e[this.index].setAttribute("aria-selected","false"),this.index=t,t>-1&&e.length>0&&(e[t].setAttribute("aria-selected","true"),this.status.textContent=e[t].textContent+", list item "+(t+1)+" of "+e.length,this.input.setAttribute("aria-activedescendant",this.ul.id+"_item_"+this.index),this.ul.scrollTop=e[t].offsetTop-this.ul.clientHeight+e[t].clientHeight,o.fire(this.input,"awesomplete-highlight",{text:this.suggestions[this.index]}))},select:function(t,e){if(t?this.index=o.siblingIndex(t):t=this.ul.children[this.index],t){var n=this.suggestions[this.index];o.fire(this.input,"awesomplete-select",{text:n,origin:e||t})&&(this.replace(n),this.close({reason:"select"}),o.fire(this.input,"awesomplete-selectcomplete",{text:n}))}},evaluate:function(){var t=this,e=this.input.value;e.length>=this.minChars&&this._list&&this._list.length>0?(this.index=-1,this.ul.innerHTML="",this.suggestions=this._list.map(function(n){return new i(t.data(n,e))}).filter(function(n){return t.filter(n,e)}),!1!==this.sort&&(this.suggestions=this.suggestions.sort(this.sort)),this.suggestions=this.suggestions.slice(0,this.maxItems),this.suggestions.forEach(function(n,i){t.ul.appendChild(t.item(n,e,i))}),0===this.ul.children.length?(this.status.textContent="No results found",this.close({reason:"nomatches"})):(this.open(),this.status.textContent=this.ul.children.length+" results found")):(this.close({reason:"nomatches"}),this.status.textContent="No results found")}},e.all=[],e.FILTER_CONTAINS=function(t,e){return RegExp(o.regExpEscape(e.trim()),"i").test(t)},e.FILTER_STARTSWITH=function(t,e){return RegExp("^"+o.regExpEscape(e.trim()),"i").test(t)},e.SORT_BYLENGTH=function(t,e){return t.length!==e.length?t.length-e.length:t<e?-1:1},e.CONTAINER=function(t){return o.create("div",{className:"awesomplete",around:t})},e.ITEM=function(t,e,n){var i=""===e.trim()?t:t.replace(RegExp(o.regExpEscape(e.trim()),"gi"),"<mark>$&</mark>");return o.create("li",{innerHTML:i,role:"option","aria-selected":"false",id:"awesomplete_list_"+this.count+"_item_"+n})},e.REPLACE=function(t){this.input.value=t.value},e.DATA=function(t){return t},Object.defineProperty(i.prototype=Object.create(String.prototype),"length",{get:function(){return this.label.length}}),i.prototype.toString=i.prototype.valueOf=function(){return""+this.label};var s=Array.prototype.slice;function o(t,e){return"string"==typeof t?(e||document).querySelector(t):t||null}function r(t,e){return s.call((e||document).querySelectorAll(t))}function u(){r("input.awesomplete").forEach(function(t){new e(t)})}return o.create=function(t,e){var n=document.createElement(t);for(var i in e){var s=e[i];if("inside"===i)o(s).appendChild(n);else if("around"===i){var r=o(s);r.parentNode.insertBefore(n,r),n.appendChild(r),null!=r.getAttribute("autofocus")&&r.focus()}else i in n?n[i]=s:n.setAttribute(i,s)}return n},o.bind=function(t,e){if(t)for(var n in e){var i=e[n];n.split(/\s+/).forEach(function(e){t.addEventListener(e,i)})}},o.unbind=function(t,e){if(t)for(var n in e){var i=e[n];n.split(/\s+/).forEach(function(e){t.removeEventListener(e,i)})}},o.fire=function(t,e,n){var i=document.createEvent("HTMLEvents");for(var s in i.initEvent(e,!0,!0),n)i[s]=n[s];return t.dispatchEvent(i)},o.regExpEscape=function(t){return t.replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&")},o.siblingIndex=function(t){for(var e=0;t=t.previousElementSibling;e++);return e},"undefined"!=typeof self&&(self.Awesomplete=e),"undefined"!=typeof Document&&("loading"!==document.readyState?u():document.addEventListener("DOMContentLoaded",u)),e.$=o,e.$$=r,"object"===n(t)&&t.exports&&(t.exports=e),e}()}).call(this,n(3)(t))},function(t,e,n){t.exports=n(2)},function(t,e,n){"use strict";n.r(e);var i,s=n(0);!function(t){var e=document.getElementById("cookie-warning"),n=document.getElementById("cookie-agree"),i=document.getElementById("cookie-close"),s=!!o()&&localStorage.getItem("biuro-agree");function o(){try{return localStorage.setItem("a","a"),localStorage.removeItem("a"),!0}catch(t){return!1}}e&&n&&i&&!s&&(e.style.display="block",n.addEventListener("click",function(){o()&&localStorage.setItem("biuro-agree","true"),e.style.display="none"}),i.addEventListener("click",function(){e.style.display="none"}))}(window),window,(i=document.getElementById("js-divisions-map"))&&fetch("/wp-json/api/v1/divisions?lang="+i.dataset.lang).then(function(t){return t.json()}).then(function(t){!function t(e,n){if(window.google){var i=new window.google.maps.Map(e,{mapTypeId:window.google.maps.MapTypeId.ROADMAP});window.google.maps.event.addListenerOnce(i,"bounds_changed",function(){this.getZoom()>15&&this.setZoom(14)});var s=[],o=document.querySelector(".js-active-region"),r=o&&o.dataset.id?o.dataset.id:"";n[r]?s=n[r]:Object.keys(n).forEach(function(t){var e=n[t];"city"===t.substr(0,4)&&(s=s.concat(e))}),function(t,e){for(var n,i=new window.google.maps.LatLngBounds,s=0;s<e.length;s++){var o=e[s],r=new window.google.maps.LatLng(o.lat,o.lng),u=new window.google.maps.Marker({position:r,map:t,icon:"/wp-content/themes/biuro/i/maps/pin.png",title:o.title});i.extend(r),u.content=o.content,window.google.maps.event.addListener(u,"click",function(){n&&n.close(),(n=new window.google.maps.InfoWindow({content:this.content})).open(t,this)})}t.fitBounds(i)}(i,s.filter(function(t){return t.lat&&t.lng}))}else setTimeout(function(){t(e,n)},250)}(i,t)});var o=document.getElementById("search"),r=document.getElementById("search-city"),u=document.getElementById("search-query"),a=new s.a(r,{minChars:0,sort:!1});r.addEventListener("focus",function(){a.evaluate()});var l=new s.a(u,{minChars:0,sort:!1});u.addEventListener("focus",function(){l.evaluate()}),o&&o.addEventListener("submit",function(t){r.value||u.value||(r.focus(),t.preventDefault())},!1)},function(t,e){t.exports=function(t){if(!t.webpackPolyfill){var e=Object.create(t);e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),Object.defineProperty(e,"exports",{enumerable:!0}),e.webpackPolyfill=1}return e}}]);
\ No newline at end of file
......@@ -46,7 +46,7 @@ if (module.hot) {
return;
}
fetch('/wp-json/biuro-api/v1/divisions?lang=' + node.dataset.lang)
fetch('/wp-json/api/v1/divisions?lang=' + node.dataset.lang)
.then((t) => t.json())
.then((data) => {
initDivisionsMap(node, data);
......
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