Commit ec5dd620 authored by Simonas's avatar Simonas

Contact forms init & top menu fix

parent 3a185a06
...@@ -103,10 +103,9 @@ Restart docker (sometimes PC restart may be required) ...@@ -103,10 +103,9 @@ Restart docker (sometimes PC restart may be required)
- docker load --input ourdemo.tar - docker load --input ourdemo.tar
- docker build -t biuro/web:0.0.1 . - docker build -t biuro/web:0.0.2 .
- docker login --username=biuro --password=9Ndtjd2vKsLvGuFOeFq1KdJs - docker login --username=biuro --password=9Ndtjd2vKsLvGuFOeFq1KdJs
- docker push biuro/web:0.0.1 - docker push biuro/web:0.0.2
- docker pull biuro/web:0.0.0
- sudo chown -R www-data:www-data wordpress/wp-content/plugins - sudo chown -R www-data:www-data wordpress/wp-content/plugins
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -8,24 +8,24 @@ ...@@ -8,24 +8,24 @@
}, },
"author": "Simon", "author": "Simon",
"devDependencies": { "devDependencies": {
"@babel/core": "^7.2.2", "@babel/core": "^7.3.4",
"@babel/plugin-syntax-dynamic-import": "^7.0.0", "@babel/plugin-syntax-dynamic-import": "^7.0.0",
"@babel/plugin-transform-runtime": "^7.1.0", "@babel/plugin-transform-runtime": "^7.3.4",
"@babel/preset-env": "^7.1.6", "@babel/preset-env": "^7.3.4",
"@babel/preset-react": "^7.0.0", "@babel/preset-react": "^7.0.0",
"@babel/register": "^7.0.0", "@babel/register": "^7.0.0",
"@babel/runtime": "^7.1.2", "@babel/runtime": "^7.3.4",
"autoprefixer": "^9.4.3", "autoprefixer": "^9.4.10",
"babel-loader": "^8.0.4", "babel-loader": "^8.0.5",
"browser-sync": "^2.24.6", "browser-sync": "^2.24.6",
"connect-modrewrite": "^0.10.2", "connect-modrewrite": "^0.10.2",
"css-mqpacker": "^7.0.0", "css-mqpacker": "^7.0.0",
"cssnano": "^4.1.7", "cssnano": "^4.1.10",
"del": "^3.0.0", "del": "^3.0.0",
"eslint-config-standard": "^12.0.0", "eslint-config-standard": "^12.0.0",
"eslint-config-standard-preact": "^1.1.6", "eslint-config-standard-preact": "^1.1.6",
"eslint-plugin-import": "^2.14.0", "eslint-plugin-import": "^2.16.0",
"eslint-plugin-node": "^8.0.0", "eslint-plugin-node": "^8.0.1",
"eslint-plugin-promise": "^4.0.1", "eslint-plugin-promise": "^4.0.1",
"eslint-plugin-standard": "^4.0.0", "eslint-plugin-standard": "^4.0.0",
"glob": "^7.1.3", "glob": "^7.1.3",
...@@ -38,28 +38,28 @@ ...@@ -38,28 +38,28 @@
"gulp-rename": "^1.4.0", "gulp-rename": "^1.4.0",
"gulp-replace": "^1.0.0", "gulp-replace": "^1.0.0",
"gulp-rev": "^9.0.0", "gulp-rev": "^9.0.0",
"gulp-sourcemaps": "^2.6.4", "gulp-sourcemaps": "^2.6.5",
"http2": "^3.3.7", "http2": "^3.3.7",
"postcss": "^7.0.7", "postcss": "^7.0.14",
"postcss-browser-reporter": "^0.5.0", "postcss-browser-reporter": "^0.5.0",
"postcss-critical-split": "^2.5.1", "postcss-critical-split": "^2.5.1",
"postcss-custom-media": "^7.0.7", "postcss-custom-media": "^7.0.7",
"postcss-extend": "^1.0.5", "postcss-extend": "^1.0.5",
"postcss-import": "^12.0.1", "postcss-import": "^12.0.1",
"postcss-nested": "^4.1.1", "postcss-nested": "^4.1.2",
"postcss-preset-env": "^6.5.0", "postcss-preset-env": "^6.6.0",
"postcss-reporter": "^6.0.0", "postcss-reporter": "^6.0.1",
"precss": "^4.0.0", "precss": "^4.0.0",
"stylelint": "^9.8.0", "stylelint": "^9.10.1",
"stylelint-config-standard": "^18.2.0", "stylelint-config-standard": "^18.2.0",
"webpack": "^4.25.1", "webpack": "^4.29.6",
"webpack-bundle-analyzer": "^3.0.3", "webpack-bundle-analyzer": "^3.1.0",
"webpack-dev-middleware": "^3.1.3", "webpack-dev-middleware": "^3.6.1",
"webpack-hot-middleware": "^2.22.3", "webpack-hot-middleware": "^2.22.3",
"write-file-webpack-plugin": "^4.3.2" "write-file-webpack-plugin": "^4.3.2"
}, },
"dependencies": { "dependencies": {
"npm": "^6.4.1", "npm": "^6.9.0",
"preact": "^8.3.1", "preact": "^8.3.1",
"preact-async-route": "^2.2.1", "preact-async-route": "^2.2.1",
"preact-router": "^2.6.1" "preact-router": "^2.6.1"
......
...@@ -35,37 +35,39 @@ export function server () { ...@@ -35,37 +35,39 @@ export function server () {
bs.init({ bs.init({
logPrefix: 'Biuro', logPrefix: 'Biuro',
socket: { socket: {
domain: 'https://dev.biuro.lt:2000' // domain: 'localhost:443'
// port: 443 domain: 'https://10.0.75.1:3000/'
// // port: 2000
}, },
proxy: conf.proxy,
// proxy: { // proxy: {
// target: conf.proxy // target: 'https://dev.biuro.lt'
// // proxyRes: [ // ws: false
// // function (proxyRes, req, res) {
// // // console.log(proxyRes.headers);
// // console.log(req);
// // }
// // ],
// // ws: true
// }, // },
proxy: {
target: 'https://dev.biuro.lt/',
proxyRes: [
function (proxyRes, req, res) {
// console.log(proxyRes.headers);
console.log(req);
}
],
ws: true
},
// httpModule: http2, // httpModule: http2,
https: { https: {
key: conf.certs.key, key: conf.certs.key,
cert: conf.certs.cert cert: conf.certs.cert
}, },
files: [ // files: [
`wp-content/themes/${conf.name}/**/*.php`, // `wp-content/themes/${conf.name}/**/*.php`,
`wp-content/themes/${conf.name}/css/main.min.css` // `wp-content/themes/${conf.name}/css/main.min.css`
],
open: false,
port: 2000,
server: false,
// serveStatic: [
// `wp-content/themes/${conf.name}/css/`,
// `wp-content/themes/${conf.name}/js/`
// ], // ],
ghostMode: false,
open: false,
// port: 2000,
// server: false,
ui: false, ui: false,
// notify: false,
middleware: [ middleware: [
webpackDevMiddleware(bundler, { /* options */ }), webpackDevMiddleware(bundler, { /* options */ }),
webpackHotMiddleware(bundler) webpackHotMiddleware(bundler)
......
...@@ -24,6 +24,15 @@ let config = { ...@@ -24,6 +24,15 @@ let config = {
] ]
}, },
// devServer: {
// // contentBase: path.join(__dirname, 'dist'),
// // compress: true,
// allowedHosts: [
// 'dev.biuro.lt'
// ],
// // port: 3000
// },
mode: conf.env, mode: conf.env,
module: { module: {
......
...@@ -73,7 +73,7 @@ class Biuro_Contacts_Public { ...@@ -73,7 +73,7 @@ class Biuro_Contacts_Public {
* class. * class.
*/ */
wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/biuro-contacts-public.css', array(), $this->version, 'all' ); // wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/biuro-contacts-public.css', array(), $this->version, 'all' );
} }
...@@ -96,7 +96,7 @@ class Biuro_Contacts_Public { ...@@ -96,7 +96,7 @@ class Biuro_Contacts_Public {
* class. * class.
*/ */
wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/biuro-contacts-public.js', array( 'jquery' ), $this->version, false ); // wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/biuro-contacts-public.js', array( 'jquery' ), $this->version, false );
} }
...@@ -106,15 +106,17 @@ class Biuro_Contacts_Public { ...@@ -106,15 +106,17 @@ class Biuro_Contacts_Public {
* *
* @param array $attr The attributes from the shortcode * @param array $attr The attributes from the shortcode
* *
* @uses get_option
* @uses get_layout
*
* @return mixed $output Output of the buffer * @return mixed $output Output of the buffer
*/ */
public function employees_form( $attr = array() ) { public function employees_form( $attr = array() ) {
$response = false;
ob_start(); ob_start();
if ( isset( $_POST['action-submit'] ) ) :
$response = true;
endif;
include 'partials/biuro-contacts-public--employees.php'; include 'partials/biuro-contacts-public--employees.php';
$output = ob_get_contents(); $output = ob_get_contents();
...@@ -129,15 +131,17 @@ class Biuro_Contacts_Public { ...@@ -129,15 +131,17 @@ class Biuro_Contacts_Public {
* *
* @param array $attr The attributes from the shortcode * @param array $attr The attributes from the shortcode
* *
* @uses get_option
* @uses get_layout
*
* @return mixed $output Output of the buffer * @return mixed $output Output of the buffer
*/ */
public function employers_form( $attr = array() ) { public function employers_form( $attr = array() ) {
$response = false;
ob_start(); ob_start();
if ( isset( $_POST['action-submit'] ) ) :
$response = true;
endif;
include 'partials/biuro-contacts-public--employers.php'; include 'partials/biuro-contacts-public--employers.php';
$output = ob_get_contents(); $output = ob_get_contents();
...@@ -152,15 +156,17 @@ class Biuro_Contacts_Public { ...@@ -152,15 +156,17 @@ class Biuro_Contacts_Public {
* *
* @param array $attr The attributes from the shortcode * @param array $attr The attributes from the shortcode
* *
* @uses get_option
* @uses get_layout
*
* @return mixed $output Output of the buffer * @return mixed $output Output of the buffer
*/ */
public function position_form( $attr = array() ) { public function position_form( $attr = array() ) {
$response = false;
ob_start(); ob_start();
if ( isset( $_POST['action-submit'] ) ) :
$response = true;
endif;
include 'partials/biuro-contacts-public--position.php'; include 'partials/biuro-contacts-public--position.php';
$output = ob_get_contents(); $output = ob_get_contents();
......
...@@ -13,23 +13,22 @@ ...@@ -13,23 +13,22 @@
*/ */
?> ?>
<form id="ContactFormEmployee_ContactFormEmployee" action="/job-seekers/ask/ContactFormEmployee" method="post" enctype="multipart/form-data" class="contact-form"> <form id="ContactFormEmployee_ContactFormEmployee" action="<?php echo $_SERVER["REQUEST_URI"]; ?>" method="post" enctype="multipart/form-data" class="contact-form">
<p id="ContactFormEmployee_ContactFormEmployee_error" class="message " style="display: none"></p>
<!-- Error pranesimus gauname: "E-mail (mandatory field):" is required. -->
<ul class="form"> <ul class="form">
<li> <li>
<label for="ContactFormEmployee_ContactFormEmployee_Name">Name (mandatory field):</label> <label for="ContactFormEmployee_ContactFormEmployee_Name">Name (mandatory field):</label>
<input type="text" class="text holder-required error" id="ContactFormEmployee_ContactFormEmployee_Name" name="Name" value=""> <input type="text" class="text holder-required <?php if ($response) { echo 'error'; } ?>" id="ContactFormEmployee_ContactFormEmployee_Name" name="Name" value="">
<?php if ($response) : ?>
<div id="errorname" class="errormessage">"Name (mandatory field):" is required.</div> <div id="errorname" class="errormessage">"Name (mandatory field):" is required.</div>
<?php endif; ?>
</li> </li>
<li> <li>
<label for="ContactFormEmployee_ContactFormEmployee_Email">E-mail (mandatory field):</label> <label for="ContactFormEmployee_ContactFormEmployee_Email">E-mail (mandatory field):</label>
<input type="text" class="text holder-required error" id="ContactFormEmployee_ContactFormEmployee_Email" name="Email" value=""> <input type="text" class="text holder-required <?php if ($response) { echo 'error'; } ?>" id="ContactFormEmployee_ContactFormEmployee_Email" name="Email" value="">
<?php if ($response) : ?>
<div id="erroremail" class="errormessage">"E-mail (mandatory field):" is required.</div> <div id="erroremail" class="errormessage">"E-mail (mandatory field):" is required.</div>
<?php endif; ?>
</li> </li>
<li> <li>
<label for="ContactFormEmployee_ContactFormEmployee_Phone">Telephone number:</label> <label for="ContactFormEmployee_ContactFormEmployee_Phone">Telephone number:</label>
...@@ -41,29 +40,20 @@ ...@@ -41,29 +40,20 @@
</li> </li>
<li> <li>
<label for="ContactFormEmployee_ContactFormEmployee_Comments">Your question (mandatory field):</label> <label for="ContactFormEmployee_ContactFormEmployee_Comments">Your question (mandatory field):</label>
<textarea id="ContactFormEmployee_ContactFormEmployee_Comments" name="Comments" rows="5" cols="20"></textarea> <textarea id="ContactFormEmployee_ContactFormEmployee_Comments" class="holder-required <?php if ($response) { echo 'error'; } ?>" name="Comments" rows="5" cols="20"></textarea>
<div id="errorcomments" class="errormessage"></div> <?php if ($response) : ?>
<div id="errorcomments" class="errormessage">"Your question (mandatory field):" is required.</div>
<?php endif; ?>
</li> </li>
<li> <li>
<label for="ContactFormEmployee_ContactFormEmployee_Cvfield">Curriculum vitae:</label> <label for="ContactFormEmployee_ContactFormEmployee_Cvfield">Curriculum vitae:</label>
<input type="file" name="Cvfield" id="ContactFormEmployee_ContactFormEmployee_Cvfield"><input type="hidden" name="MAX_FILE_SIZE" value=""> <input type="file" name="Cvfield" id="ContactFormEmployee_ContactFormEmployee_Cvfield"><input type="hidden" name="MAX_FILE_SIZE" value="">
<div id="errorcv" class="errormessage"></div>
</li>
<li>
<label for="ContactFormEmployee_ContactFormEmployee_SecurityCode">Security code (mandatory field):</label>
<input type="text" class="text holder-required error" id="ContactFormEmployee_ContactFormEmployee_SecurityCode" name="SecurityCode" value="">
<div id="security-code"><img src="captcha.php"></div>
<div id="errorsecuritycode" class="errormessage">"Security code (mandatory field):" is required.</div>
</li> </li>
<li class="last"> <li class="last">
<input class="action " id="ContactFormEmployee_ContactFormEmployee_action_SendContactForm" type="submit" name="action_SendContactForm" value="Send" title="Send" onclick="ga('send', 'event', 'ContactFormEmployee', 'Button', 'SendContactFormEmployee');"> <input class="action " id="ContactFormEmployee_ContactFormEmployee_action_SendContactForm" type="submit" name="action-submit" value="Send" title="Send" onclick="ga('send', 'event', 'ContactFormEmployee', 'Button', 'SendContactFormEmployee');">
<!--<span id="errorbox" class="txt">Error. Some fields are missed.</span>-->
</li> </li>
</ul> </ul>
<input class="hidden" type="hidden" id="ContactFormEmployee_ContactFormEmployee_SecurityID" name="SecurityID" value="ab28c8d16d8b9ac684baaab91098ddcda50e0ad0">
</form> </form>
...@@ -13,28 +13,32 @@ ...@@ -13,28 +13,32 @@
*/ */
?> ?>
<form id="ContactForm_ContactForm" action="/employers/query-form/ContactForm" method="post" enctype="application/x-www-form-urlencoded" class="contact-form"> <form id="ContactForm_ContactForm" action="<?php echo $_SERVER["REQUEST_URI"]; ?>" method="post" enctype="application/x-www-form-urlencoded" class="contact-form">
<p id="ContactForm_ContactForm_error" class="message " style="display: none"></p> <p id="ContactForm_ContactForm_error" class="message " style="display: none"></p>
<!-- Error pranesimus gauname: "E-mail (mandatory field):" is required. -->
<ul class="form"> <ul class="form">
<li> <li>
<label for="ContactForm_ContactForm_Company">Company (mandatory field):</label> <label for="ContactForm_ContactForm_Company">Company (mandatory field):</label>
<input type="text" class="text holder-required error" id="ContactForm_ContactForm_Company" name="Company" value=""> <input type="text" class="text holder-required <?php if ($response) { echo 'error'; } ?>" id="ContactForm_ContactForm_Company" name="Company" value="">
<?php if ($response) : ?>
<div id="errorcompany" class="errormessage">"Company (mandatory field):" is required.</div> <div id="errorcompany" class="errormessage">"Company (mandatory field):" is required.</div>
<?php endif; ?>
</li> </li>
<li> <li>
<label for="ContactForm_ContactForm_Name">Name (mandatory field):</label> <label for="ContactForm_ContactForm_Name">Name (mandatory field):</label>
<input type="text" class="text holder-required error" id="ContactForm_ContactForm_Name" name="Name" value=""> <input type="text" class="text holder-required <?php if ($response) { echo 'error'; } ?>" id="ContactForm_ContactForm_Name" name="Name" value="">
<?php if ($response) : ?>
<div id="errorname" class="errormessage">"Name (mandatory field):" is required.</div> <div id="errorname" class="errormessage">"Name (mandatory field):" is required.</div>
<?php endif; ?>
</li> </li>
<li> <li>
<label for="ContactForm_ContactForm_Email">E-mail (mandatory field):</label> <label for="ContactForm_ContactForm_Email">E-mail (mandatory field):</label>
<input type="text" class="text holder-required error" id="ContactForm_ContactForm_Email" name="Email" value=""> <input type="text" class="text holder-required <?php if ($response) { echo 'error'; } ?>" id="ContactForm_ContactForm_Email" name="Email" value="">
<?php if ($response) : ?>
<div id="erroremail" class="errormessage">"E-mail (mandatory field):" is required.</div> <div id="erroremail" class="errormessage">"E-mail (mandatory field):" is required.</div>
<?php endif; ?>
</li> </li>
<li> <li>
<label for="ContactForm_ContactForm_Phone">Telephone number:</label> <label for="ContactForm_ContactForm_Phone">Telephone number:</label>
...@@ -42,24 +46,15 @@ ...@@ -42,24 +46,15 @@
</li> </li>
<li> <li>
<label for="ContactForm_ContactForm_Comments">Your question (mandatory field):</label> <label for="ContactForm_ContactForm_Comments">Your question (mandatory field):</label>
<textarea id="ContactForm_ContactForm_Comments" class="holder-required error" name="Comments" rows="5" cols="20"></textarea> <textarea id="ContactForm_ContactForm_Comments" class="holder-required <?php if ($response) { echo 'error'; } ?>" name="Comments" rows="5" cols="20"></textarea>
<?php if ($response) : ?>
<div id="errorcomments" class="errormessage">"Your question (mandatory field):" is required.</div> <div id="errorcomments" class="errormessage">"Your question (mandatory field):" is required.</div>
<?php endif; ?>
</li> </li>
<li>
<label for="ContactForm_ContactForm_SecurityCode">Security code (mandatory field):</label>
<input type="text" class="text holder-required error" id="ContactForm_ContactForm_SecurityCode" name="SecurityCode" value="">
<div id="security-code"><img src="captcha.php"></div>
<div id="errorsecuritycode" class="errormessage">"Security code (mandatory field):" is required.</div>
</li>
<li class="last"> <li class="last">
<input class="action " id="ContactForm_ContactForm_action_SendContactForm" type="submit" name="action_SendContactForm" value="Send" title="Send" onclick="ga('send', 'event', 'ContactForm', 'Button', 'SendContactForm');"> <input class="action " id="ContactForm_ContactForm_action_SendContactForm" type="submit" name="action-submit" value="Send" title="Send" onclick="ga('send', 'event', 'ContactForm', 'Button', 'SendContactForm');">
<!--<span id="errorbox" class="txt">Error. Some fields are missed.</span>-->
</li> </li>
</ul> </ul>
<input class="hidden" type="hidden" id="ContactForm_ContactForm_SecurityID" name="SecurityID" value="ab28c8d16d8b9ac684baaab91098ddcda50e0ad0">
</form> </form>
...@@ -13,17 +13,21 @@ ...@@ -13,17 +13,21 @@
*/ */
?> ?>
<form id="CVForm_CVForm" action="/job-offers/CVForm" method="post" enctype="multipart/form-data" class="cv-form"> <form id="CVForm_CVForm" action="<?php echo $_SERVER["REQUEST_URI"]; ?>" method="post" enctype="multipart/form-data" class="contact-form">
<ul class="form"> <ul class="form">
<li> <li>
<label for="CVForm_CVForm_Name">Name, Surname (mandatory field):</label> <label for="CVForm_CVForm_Name">Name, Surname (mandatory field):</label>
<input type="text" class="text holder-required error" id="CVForm_CVForm_Name" name="Name" value=""> <input type="text" class="text holder-required <?php if ($response) { echo 'error'; } ?>" id="CVForm_CVForm_Name" name="Name" value="">
<div id="errorname" class="errormessage">"Name, Surname (mandatory field):" is required.</div> <?php if ($response) : ?>
<div id="errorname" class="errormessage">"Name, Surname (mandatory field):" is required.</div>
<?php endif; ?>
</li> </li>
<li> <li>
<label for="CVForm_CVForm_Email">E-mail (mandatory field): </label> <label for="CVForm_CVForm_Email">E-mail (mandatory field): </label>
<input type="text" class="text holder-required error" id="CVForm_CVForm_Email" name="Email" value=""> <input type="text" class="text holder-required <?php if ($response) { echo 'error'; } ?>" id="CVForm_CVForm_Email" name="Email" value="">
<?php if ($response) : ?>
<div id="erroremail" class="errormessage">"E-mail (mandatory field): " is required.</div> <div id="erroremail" class="errormessage">"E-mail (mandatory field): " is required.</div>
<?php endif; ?>
</li> </li>
<li> <li>
<label for="CVForm_CVForm_Phone">Telephone number:</label> <label for="CVForm_CVForm_Phone">Telephone number:</label>
...@@ -32,27 +36,15 @@ ...@@ -32,27 +36,15 @@
<li> <li>
<label for="CVForm_CVForm_Cvfield">Curriculum vitae:</label> <label for="CVForm_CVForm_Cvfield">Curriculum vitae:</label>
<input type="file" name="Cvfield" id="CVForm_CVForm_Cvfield"><input type="hidden" name="MAX_FILE_SIZE" value=""> <input type="file" name="Cvfield" id="CVForm_CVForm_Cvfield"><input type="hidden" name="MAX_FILE_SIZE" value="">
<div id="errorcv" class="errormessage"></div>
</li> </li>
<li> <li>
<label for="CVForm_CVForm_Additional">Other:</label> <label for="CVForm_CVForm_Additional">Other:</label>
<textarea id="CVForm_CVForm_Additional" name="Additional" rows="5" cols="20"></textarea> <textarea id="CVForm_CVForm_Additional" name="Additional" rows="5" cols="20"></textarea>
</li> </li>
<li>
<label for="CVForm_CVForm_SecurityCode">Security code (mandatory field):</label>
<input type="text" class="text holder-required" id="CVForm_CVForm_SecurityCode" name="SecurityCode" value="" style="border: 1px solid rgb(187, 37, 67);">
<div id="security-code"><img src="captcha.php"></div>
<div id="errorsecuritycode" class="errormessage">"Security code (mandatory field):" is required.</div>
</li>
<li class="last"> <li class="last">
<input class="action " id="CVForm_CVForm_action_SendCVForm" type="submit" name="action_SendCVForm" value="Send" title="Send" onclick="ga('send', 'event', 'CVForm', 'Button', 'SendCVForm');"> <input class="action " id="CVForm_CVForm_action_SendCVForm" type="submit" name="action-submit" value="Send" title="Send" onclick="ga('send', 'event', 'CVForm', 'Button', 'SendCVForm');">
<!--<span id="errorbox" class="txt" style="display: none;">Error. You did not fill out the required fields. <br />If you are sending your CV, available formats: .doc, .docx, .pdf, .rtf, .jpg, .png ir .gif.</span>-->
</li> </li>
</ul> </ul>
<input class="hidden" type="hidden" id="CVForm_CVForm_offerid" name="offerid" value="14675"> <input class="hidden" type="hidden" id="CVForm_CVForm_offerid" name="offerid" value="14675">
<input class="hidden" type="hidden" id="CVForm_CVForm_SecurityID" name="SecurityID" value="ab28c8d16d8b9ac684baaab91098ddcda50e0ad0">
</form> </form>
...@@ -35,8 +35,8 @@ qa-: Signify that a QA or Test Engineering team is running an automated UI test ...@@ -35,8 +35,8 @@ qa-: Signify that a QA or Test Engineering team is running an automated UI test
@import '10-trumps/__utils.css'; @import '10-trumps/__utils.css';
/* critical:start */ /* critical:start */
/** { border: 1px solid #000; }*/
/* critical:end */ /* critical:end */
/** { border: 1px solid #000; }*/
.tmp-contacts { .tmp-contacts {
img { display: none; } img { display: none; }
......
...@@ -100,6 +100,30 @@ ...@@ -100,6 +100,30 @@
endif; endif;
?> ?>
<script src="/wp-content/themes/biuro/js/main-2a9639b0.min.js" async></script> <script>
document.querySelectorAll('.js-job-action').forEach(function (node) {
node.addEventListener('click', function (e) {
e.preventDefault();
var target = e.currentTarget;
document.querySelectorAll('#action--form, #action--share').forEach(function (section) {
section.style.display = 'none';
});
document.querySelector('#' + target.dataset.id).style.display = 'block';
var input = document.querySelector('#' + target.dataset.id + ' input:first-of-type');
if (input) {
input.focus();
}
target.blur();
});
});
</script>
<script src="/wp-content/themes/biuro/js/main-a9a206ea.min.js" async></script>
</body> </body>
</html> </html>
...@@ -34,14 +34,15 @@ get_header(); ?> ...@@ -34,14 +34,15 @@ get_header(); ?>
endwhile; endwhile;
?> ?>
<div style="display: flex; flex-wrap: wrap;">
<?php <?php
while ( $related->fetch() ) : while ( $related->fetch() ) :
echo $related->display( 'content' ); echo '<div style="flex: 1 1 45%">' . $related->display( 'content' ) . '</div>';
endwhile; endwhile;
?> ?>
</div>
<? <?
$divisions = pods( 'division', array( $divisions = pods( 'division', array(
'limit' => -1 'limit' => -1
) ); ) );
...@@ -109,6 +110,12 @@ get_header(); ?> ...@@ -109,6 +110,12 @@ get_header(); ?>
?> ?>
</ul> </ul>
<div id="js-divisions-map" data-lang="<?php echo pll_current_language(); ?>" class="" style="border: 1px solid #666; min-height: 450px;"></div> <div id="js-divisions-map" data-lang="<?php echo pll_current_language(); ?>" class="" style="border: 1px solid #666; min-height: 450px;"></div>
<?php
echo do_shortcode('[biuro-contacts--employees lang="' . pll_current_language() . '"]');
?>
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBQjPQnLGLeICbpTTu8kLjVRrLUYYCTS2M" async defer></script> <script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBQjPQnLGLeICbpTTu8kLjVRrLUYYCTS2M" async defer></script>
<?php <?php
endif; endif;
......
...@@ -45,9 +45,19 @@ get_header(); ...@@ -45,9 +45,19 @@ get_header();
</p> </p>
<br> <br>
<div id="action--form" style="border: 1px solid grey; margin-bottom: 20px; display: none;">
<?php
echo do_shortcode('[biuro-contacts--position id="' . get_the_id() . '" lang="' . pll_current_language() . '"]');
?>
</div>
<div id="action--share" style="border: 1px solid grey; margin-bottom: 20px; display: none;">
<h1>Dalintis</h1>
</div>
<div class="c-fixed-footer" style="overflow: hidden; margin-bottom: 2rem;"> <div class="c-fixed-footer" style="overflow: hidden; margin-bottom: 2rem;">
<button style="float: left; text-align: center; color: #fff; background: #006957; padding: 10px; width: 48%; border: 0; border-radius: 3px; cursor: pointer; ">Kandidatuoti</button> <button style="float: left; text-align: center; color: #fff; background: #006957; padding: 10px; width: 48%; border: 0; border-radius: 3px; cursor: pointer; " class="js-job-action" data-id="action--form">Kandidatuoti</button>
<button style="float: right; text-align: center; color: #000; background: #ccc; padding: 10px; width: 48%; border: 0; border-radius: 3px; cursor: pointer;">Dalintis</button> <button style="float: right; text-align: center; color: #000; background: #ccc; padding: 10px; width: 48%; border: 0; border-radius: 3px; cursor: pointer;" class="js-job-action" data-id="action--share">Dalintis</button>
</div> </div>
<?php get_footer(); <?php get_footer();
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<!-- <h3>Job: <?php echo $jobID; ?></h3> --> <!-- <h3>Job: <?php echo $jobID; ?></h3> -->
<div> <div>
<button style="display: block; text-align: center; color: #fff; background: #006957; padding: 10px; width: 100%; border: 0; border-radius: 3px; cursor: pointer;">Kandidatuoti</button> <button style="display: block; text-align: center; color: #fff; background: #006957; padding: 10px; width: 100%; border: 0; border-radius: 3px; cursor: pointer;" class="js-job-action" data-id="action--form">Kandidatuoti</button>
</div> </div>
<div class="tmp-contacts"> <div class="tmp-contacts">
......
...@@ -10,6 +10,13 @@ ...@@ -10,6 +10,13 @@
$no = 0; $no = 0;
$main = ''; $main = '';
function isSubActive($childID, $ID) {
if ($childID == $ID) {
return true;
}
return ( get_post_meta( $childID, 'divisions-page', true )&& pods( 'division' )->find( array( 'limit' => 1, 'where'=>"page-id.ID = " . $ID ) )->total() ) ? true : false;
}
foreach( $menu_items as $menu_item ) { foreach( $menu_items as $menu_item ) {
if ($menu_item->menu_item_parent == 0) { if ($menu_item->menu_item_parent == 0) {
...@@ -30,7 +37,6 @@ ...@@ -30,7 +37,6 @@
$main .= '<ul class="o-nav c-nav--main">'; $main .= '<ul class="o-nav c-nav--main">';
foreach($items as $item) { foreach($items as $item) {
$children = array_key_exists('children', $item); $children = array_key_exists('children', $item);
// $url = ($children && $item['no'] != 1) ? $item['children'][0]->url : $item['props']->url;
$url = ($children) ? $item['children'][0]->url : $item['props']->url; $url = ($children) ? $item['children'][0]->url : $item['props']->url;
$sectionCSS = ($section == get_post_meta( $item['props']->object_id, 'section', true )) ? 'is-nav--main-item-active' : ''; $sectionCSS = ($section == get_post_meta( $item['props']->object_id, 'section', true )) ? 'is-nav--main-item-active' : '';
...@@ -43,7 +49,9 @@ ...@@ -43,7 +49,9 @@
$main .= '<ul class="o-nav c-nav--sub">'; $main .= '<ul class="o-nav c-nav--sub">';
foreach($item['children'] as $child) : foreach($item['children'] as $child) :
$classCSS = ($child->object_id == $ID) ? 'is-nav--sub-anchor-active' : '';
// $classCSS = ($child->object_id == $ID ) ? 'is-nav--sub-anchor-active' : '';
$classCSS = isSubActive($child->object_id, $ID ) ? 'is-nav--sub-anchor-active' : '';
$main .= '<li class="c-nav--sub-item"><a href="' . $child->url . '" title="' . get_the_title($child->object_id) . '" class="c-nav--sub-anchor ' . $classCSS .'">' . $child->title . '</a></li>'; $main .= '<li class="c-nav--sub-item"><a href="' . $child->url . '" title="' . get_the_title($child->object_id) . '" class="c-nav--sub-anchor ' . $classCSS .'">' . $child->title . '</a></li>';
endforeach; endforeach;
......
...@@ -40,12 +40,13 @@ wp plugin update --all ...@@ -40,12 +40,13 @@ wp plugin update --all
# Activate plugin. # Activate plugin.
wp plugin activate akismet --network wp plugin activate akismet --network
wp plugin activate biuro-contacts --network
wp plugin activate cookies-warning --network wp plugin activate cookies-warning --network
wp plugin activate data-controller --network wp plugin activate data-controller --network
# wp plugin activate jobs-importer # wp plugin activate jobs-importer
# WP themes # WP themes
wp theme update --all; wp theme update --all
wp theme activate biuro wp theme activate biuro
# Update translations # Update translations
......
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