Version Description
- "On Sale Price" option added to Pricing Table element
- Testimonial avatar display issue fixed
- Advanced Tabs improved with custom icon option
- Contact Form 7 updated
- Ninja updated
- Gravity updated
- Caldera updated
- Post Grid load more button position fixed
- Filterable Gallery improved with less script dependency
- Few minor bugfix and improvements
Download this release
Release Info
| Developer | re_enter_rupok |
| Plugin | |
| Version | 2.7.1 |
| Comparing to | |
| See all releases | |
Code changes from version 2.7.0 to 2.7.1
- admin/assets/css/admin.css +6 -0
- admin/settings.php +8 -5
- assets/css/essential-addons-elementor.css +242 -46
- assets/js/eael-scripts.js +57 -0
- assets/js/load-more.js +7 -5
- elements/advance-tabs/advance-tabs.php +54 -12
- elements/caldera-forms/caldera-forms.php +1291 -446
- elements/contact-form-7/contact-form-7.php +1303 -425
- elements/filterable-gallery/filterable-gallery.php +8 -46
- elements/gravity-form/gravity-form.php +1549 -496
- elements/ninja-form/ninja-form.php +1366 -498
- elements/pricing-table/pricing-table.php +119 -21
- elements/tooltip/tooltip.php +4 -4
- essential_adons_elementor.php +56 -43
- includes/queries.php +70 -22
- readme.txt +16 -3
admin/assets/css/admin.css
CHANGED
|
@@ -401,6 +401,9 @@ textarea.eael-form-control {
|
|
| 401 |
padding: 1em;
|
| 402 |
box-shadow: 0 1px 4px rgba(0,0,0,0.1);
|
| 403 |
}
|
|
|
|
|
|
|
|
|
|
| 404 |
.eael-admin-block-header {
|
| 405 |
max-height: 4em;
|
| 406 |
overflow: hidden;
|
|
@@ -443,6 +446,9 @@ textarea.eael-form-control {
|
|
| 443 |
}
|
| 444 |
.eael-preview-img {
|
| 445 |
width: 100%;
|
|
|
|
|
|
|
|
|
|
| 446 |
}
|
| 447 |
|
| 448 |
.eael-admin-sidebar {
|
| 401 |
padding: 1em;
|
| 402 |
box-shadow: 0 1px 4px rgba(0,0,0,0.1);
|
| 403 |
}
|
| 404 |
+
.eael-admin-block-wrapper .eael-admin-block.eael-admin-block-banner {
|
| 405 |
+
padding: 8px;
|
| 406 |
+
}
|
| 407 |
.eael-admin-block-header {
|
| 408 |
max-height: 4em;
|
| 409 |
overflow: hidden;
|
| 446 |
}
|
| 447 |
.eael-preview-img {
|
| 448 |
width: 100%;
|
| 449 |
+
height: 100%;
|
| 450 |
+
vertical-align: middle;
|
| 451 |
+
object-fit: cover;
|
| 452 |
}
|
| 453 |
|
| 454 |
.eael-admin-sidebar {
|
admin/settings.php
CHANGED
|
@@ -14,7 +14,7 @@ class Eael_Admin_Settings {
|
|
| 14 |
* @var array
|
| 15 |
* @since 2.3.0
|
| 16 |
*/
|
| 17 |
-
public $eael_default_keys = [ 'contact-form-7', 'count-down', 'creative-btn', 'fancy-text', 'img-comparison', 'instagram-gallery', 'interactive-promo', 'lightbox', 'post-block', 'post-grid', 'post-timeline', 'product-grid', 'team-members', 'testimonial-slider', 'testimonials', 'testimonials', 'weforms', 'static-product', 'call-to-action', 'flip-box', 'info-box', 'dual-header', 'price-table', 'flip-carousel', 'interactive-cards', 'ninja-form', 'gravity-form', 'caldera-form', 'wisdom_registered_setting', 'twitter-feed', 'facebook-feed', 'twitter-feed-carousel', 'facebook-feed-carousel', 'data-table', 'filter-gallery', 'dynamic-filter-gallery', '
|
| 18 |
|
| 19 |
/**
|
| 20 |
* Will Contain All Components Default Values
|
|
@@ -135,10 +135,13 @@ class Eael_Admin_Settings {
|
|
| 135 |
<div id="general" class="eael-settings-tab active">
|
| 136 |
<div class="row eael-admin-general-wrapper">
|
| 137 |
<div class="eael-admin-general-inner">
|
| 138 |
-
<div class="eael-admin-block-large">
|
| 139 |
-
<img class="eael-preview-img" src="<?php echo plugins_url( '/', __FILE__ ).'assets/images/eael-featured.png'; ?>">
|
| 140 |
-
</div><!--preview image end-->
|
| 141 |
<div class="eael-admin-block-wrapper">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 142 |
<div class="eael-admin-block eael-admin-block-docs">
|
| 143 |
<header class="eael-admin-block-header">
|
| 144 |
<div class="eael-admin-block-header-icon">
|
|
@@ -183,7 +186,7 @@ class Eael_Admin_Settings {
|
|
| 183 |
<h4 class="eael-admin-title">Show your Love</h4>
|
| 184 |
</header>
|
| 185 |
<div class="eael-admin-block-content">
|
| 186 |
-
<p>We love to have you in Essential Addons family. We are making it more awesome everyday. Take your 2 minutes to review the
|
| 187 |
|
| 188 |
<a href="https://wpdeveloper.net/review-essential-addons-elementor" class="review-flexia button button-primary" target="_blank">Leave a Review</a>
|
| 189 |
</div>
|
| 14 |
* @var array
|
| 15 |
* @since 2.3.0
|
| 16 |
*/
|
| 17 |
+
public $eael_default_keys = [ 'contact-form-7', 'count-down', 'creative-btn', 'fancy-text', 'img-comparison', 'instagram-gallery', 'interactive-promo', 'lightbox', 'post-block', 'post-grid', 'post-timeline', 'product-grid', 'team-members', 'testimonial-slider', 'testimonials', 'testimonials', 'weforms', 'static-product', 'call-to-action', 'flip-box', 'info-box', 'dual-header', 'price-table', 'flip-carousel', 'interactive-cards', 'ninja-form', 'gravity-form', 'caldera-form', 'wisdom_registered_setting', 'twitter-feed', 'facebook-feed', 'twitter-feed-carousel', 'facebook-feed-carousel', 'data-table', 'filter-gallery', 'dynamic-filter-gallery', 'image-accordion', 'content-ticker', 'tooltip', 'adv-accordion', 'adv-tabs' ];
|
| 18 |
|
| 19 |
/**
|
| 20 |
* Will Contain All Components Default Values
|
| 135 |
<div id="general" class="eael-settings-tab active">
|
| 136 |
<div class="row eael-admin-general-wrapper">
|
| 137 |
<div class="eael-admin-general-inner">
|
|
|
|
|
|
|
|
|
|
| 138 |
<div class="eael-admin-block-wrapper">
|
| 139 |
+
|
| 140 |
+
<div class="eael-admin-block eael-admin-block-banner">
|
| 141 |
+
<a href="https://essential-addons.com/elementor/" target="_blank">
|
| 142 |
+
<img class="eael-preview-img" src="<?php echo plugins_url( '/', __FILE__ ).'assets/images/eael-featured.png'; ?>">
|
| 143 |
+
</a>
|
| 144 |
+
</div><!--preview image end-->
|
| 145 |
<div class="eael-admin-block eael-admin-block-docs">
|
| 146 |
<header class="eael-admin-block-header">
|
| 147 |
<div class="eael-admin-block-header-icon">
|
| 186 |
<h4 class="eael-admin-title">Show your Love</h4>
|
| 187 |
</header>
|
| 188 |
<div class="eael-admin-block-content">
|
| 189 |
+
<p>We love to have you in Essential Addons family. We are making it more awesome everyday. Take your 2 minutes to review the plugin and spread the love to encourage us to keep it going.</p>
|
| 190 |
|
| 191 |
<a href="https://wpdeveloper.net/review-essential-addons-elementor" class="review-flexia button button-primary" target="_blank">Leave a Review</a>
|
| 192 |
</div>
|
assets/css/essential-addons-elementor.css
CHANGED
|
@@ -1338,57 +1338,150 @@ body:not(.x-ethos):not(.x-integrity):not(.x-renew):not(.x-icon) .eael-product-ca
|
|
| 1338 |
.eael-product-carousel.eael-product-overlay .woocommerce li.product:hover .star-rating-container {
|
| 1339 |
opacity: 1;
|
| 1340 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1341 |
/* Contact Form 7 Styles */
|
| 1342 |
|
| 1343 |
-
.eael-contact-form-
|
| 1344 |
-
|
| 1345 |
-
|
| 1346 |
-
|
|
|
|
| 1347 |
}
|
| 1348 |
-
|
| 1349 |
-
.eael-contact-form-
|
| 1350 |
-
|
| 1351 |
-
|
| 1352 |
-
display: block;
|
| 1353 |
-
float: none;
|
| 1354 |
}
|
| 1355 |
-
|
| 1356 |
-
.eael-contact-form-
|
| 1357 |
-
|
| 1358 |
-
|
| 1359 |
}
|
| 1360 |
-
|
| 1361 |
-
.eael-contact-form-
|
| 1362 |
-
|
| 1363 |
-
|
| 1364 |
}
|
| 1365 |
-
|
| 1366 |
-
.eael-contact-form-
|
| 1367 |
-
|
| 1368 |
-
|
| 1369 |
-
|
| 1370 |
-
.eael-contact-form-container input[type="date"],
|
| 1371 |
-
.eael-contact-form-container input[type="month"],
|
| 1372 |
-
.eael-contact-form-container input[type="time"],
|
| 1373 |
-
.eael-contact-form-container input[type="week"],
|
| 1374 |
-
.eael-contact-form-container input[type="number"],
|
| 1375 |
-
.eael-contact-form-container input[type="email"],
|
| 1376 |
-
.eael-contact-form-container input[type="url"],
|
| 1377 |
-
.eael-contact-form-container input[type="search"],
|
| 1378 |
-
.eael-contact-form-container input[type="tel"],
|
| 1379 |
-
.eael-contact-form-container input[type="color"],
|
| 1380 |
-
.eael-contact-form-container .uneditable-input {
|
| 1381 |
-
-webkit-transition: border linear 0.2s, box-shadow linear 0.2s;
|
| 1382 |
-
transition: border linear 0.2s, box-shadow linear 0.2s;
|
| 1383 |
-
}
|
| 1384 |
-
.eael-contact-form-container .wpcf7-form::before,
|
| 1385 |
-
.eael-contact-form-container .wpcf7-form::after {
|
| 1386 |
-
content: " ";
|
| 1387 |
-
clear: both;
|
| 1388 |
-
display: table;
|
| 1389 |
}
|
| 1390 |
-
|
| 1391 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1392 |
}
|
| 1393 |
/* weForm Styles */
|
| 1394 |
|
|
@@ -1449,6 +1542,77 @@ body:not(.x-ethos):not(.x-integrity):not(.x-renew):not(.x-icon) .eael-product-ca
|
|
| 1449 |
.eael-ninja-container ul.wpuf-form li .wpuf-fields input[type="text"], .eael-ninja-container .nf-field .nf-field-element input[type="password"], .eael-ninja-container ul.wpuf-form li .wpuf-fields input[type="email"], .eael-ninja-container .nf-field .nf-field-element input[type="url"], .eael-ninja-container ul.wpuf-form li .wpuf-fields input[type="number"], .eael-ninja-container .nf-field .nf-field-element textarea {
|
| 1450 |
max-width: 100%;
|
| 1451 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1452 |
|
| 1453 |
/* Post Grid Style */
|
| 1454 |
|
|
@@ -2898,7 +3062,6 @@ h2.eael-elements-flip-box-heading {
|
|
| 2898 |
margin: 0px;
|
| 2899 |
}
|
| 2900 |
|
| 2901 |
-
|
| 2902 |
/**
|
| 2903 |
* Caldera Contact Form Styler
|
| 2904 |
*/
|
|
@@ -2915,6 +3078,38 @@ h2.eael-elements-flip-box-heading {
|
|
| 2915 |
text-align: center;
|
| 2916 |
}
|
| 2917 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2918 |
/**
|
| 2919 |
* Social Feeds
|
| 2920 |
*/
|
|
@@ -4276,7 +4471,8 @@ img.mfp-img {
|
|
| 4276 |
flex-flow: column wrap;
|
| 4277 |
}
|
| 4278 |
.eael-advance-tabs.eael-tabs-vertical .eael-tabs-nav > ul > li {
|
| 4279 |
-
|
|
|
|
| 4280 |
}
|
| 4281 |
|
| 4282 |
.eael-advance-tabs.eael-tabs-vertical .eael-tabs-nav > ul li::after {
|
| 1338 |
.eael-product-carousel.eael-product-overlay .woocommerce li.product:hover .star-rating-container {
|
| 1339 |
opacity: 1;
|
| 1340 |
}
|
| 1341 |
+
|
| 1342 |
+
* Contact forms common */
|
| 1343 |
+
|
| 1344 |
+
.eael-contact-form input[type=text],
|
| 1345 |
+
.eael-contact-form input[type=email],
|
| 1346 |
+
.eael-contact-form input[type=url],
|
| 1347 |
+
.eael-contact-form input[type=tel],
|
| 1348 |
+
.eael-contact-form input[type=date],
|
| 1349 |
+
.eael-contact-form input[type=number],
|
| 1350 |
+
.eael-contact-form textarea {
|
| 1351 |
+
background: #fff;
|
| 1352 |
+
box-shadow: none;
|
| 1353 |
+
-webkit-box-shadow: none;
|
| 1354 |
+
float: none;
|
| 1355 |
+
height: auto;
|
| 1356 |
+
margin: 0;
|
| 1357 |
+
outline: 0;
|
| 1358 |
+
width: auto;
|
| 1359 |
+
}
|
| 1360 |
+
.eael-contact-form input[type=submit] {
|
| 1361 |
+
border: 0;
|
| 1362 |
+
float: none;
|
| 1363 |
+
height: auto;
|
| 1364 |
+
margin: 0;
|
| 1365 |
+
padding: 10px 20px;
|
| 1366 |
+
width: auto;
|
| 1367 |
+
-webkit-transition: all 0.25s linear 0s;
|
| 1368 |
+
transition: all 0.25s linear 0s;
|
| 1369 |
+
}
|
| 1370 |
+
.eael-contact-form.placeholder-hide input::-webkit-input-placeholder,
|
| 1371 |
+
.eael-contact-form.placeholder-hide textarea::-webkit-input-placeholder {
|
| 1372 |
+
opacity: 0;
|
| 1373 |
+
visibility: hidden;
|
| 1374 |
+
}
|
| 1375 |
+
.eael-contact-form.placeholder-hide input::-moz-placeholder,
|
| 1376 |
+
.eael-contact-form.placeholder-hide textarea::-moz-placeholder {
|
| 1377 |
+
opacity: 0;
|
| 1378 |
+
visibility: hidden;
|
| 1379 |
+
}
|
| 1380 |
+
.eael-contact-form.placeholder-hide input:-ms-input-placeholder,
|
| 1381 |
+
.eael-contact-form.placeholder-hide textarea:-ms-input-placeholder {
|
| 1382 |
+
opacity: 0;
|
| 1383 |
+
visibility: hidden;
|
| 1384 |
+
}
|
| 1385 |
+
.eael-contact-form.placeholder-hide input:-moz-placeholder,
|
| 1386 |
+
.eael-contact-form.placeholder-hide textarea:-moz-placeholder {
|
| 1387 |
+
opacity: 0;
|
| 1388 |
+
visibility: hidden;
|
| 1389 |
+
}
|
| 1390 |
+
|
| 1391 |
+
.eael-custom-radio-checkbox input[type=checkbox],
|
| 1392 |
+
.eael-custom-radio-checkbox input[type=radio] {
|
| 1393 |
+
-webkit-appearance: none;
|
| 1394 |
+
-moz-appearance: none;
|
| 1395 |
+
border-style: solid;
|
| 1396 |
+
border-width: 0;
|
| 1397 |
+
outline: none;
|
| 1398 |
+
min-width: 1px;
|
| 1399 |
+
width: 15px;
|
| 1400 |
+
height: 15px;
|
| 1401 |
+
background: #ddd;
|
| 1402 |
+
padding: 3px;
|
| 1403 |
+
}
|
| 1404 |
+
.eael-custom-radio-checkbox input[type=checkbox]:before,
|
| 1405 |
+
.eael-custom-radio-checkbox input[type=radio]:before {
|
| 1406 |
+
content: "";
|
| 1407 |
+
width: 100%;
|
| 1408 |
+
height: 100%;
|
| 1409 |
+
padding: 0;
|
| 1410 |
+
margin: 0;
|
| 1411 |
+
display: block;
|
| 1412 |
+
}
|
| 1413 |
+
.eael-custom-radio-checkbox input[type=checkbox]:checked:before,
|
| 1414 |
+
.eael-custom-radio-checkbox input[type=radio]:checked:before {
|
| 1415 |
+
background: #999;
|
| 1416 |
+
-webkit-transition: all 0.25s linear 0s;
|
| 1417 |
+
transition: all 0.25s linear 0s;
|
| 1418 |
+
}
|
| 1419 |
+
.eael-custom-radio-checkbox input[type=radio] {
|
| 1420 |
+
border-radius: 50%;
|
| 1421 |
+
}
|
| 1422 |
+
.eael-custom-radio-checkbox input[type=radio]:before {
|
| 1423 |
+
border-radius: 50%;
|
| 1424 |
+
}
|
| 1425 |
+
|
| 1426 |
/* Contact Form 7 Styles */
|
| 1427 |
|
| 1428 |
+
.eael-contact-form.eael-contact-form-align-center, .eael-contact-form-7.eael-contact-form-btn-align-center input.wpcf7-submit {
|
| 1429 |
+
margin-left: auto !important;
|
| 1430 |
+
margin-right: auto !important;
|
| 1431 |
+
display: block;
|
| 1432 |
+
float: none;
|
| 1433 |
}
|
| 1434 |
+
|
| 1435 |
+
.eael-contact-form.eael-contact-form-align-left, .eael-contact-form-7.eael-contact-form-btn-align-left input.wpcf7-submit {
|
| 1436 |
+
float: left;
|
| 1437 |
+
width: auto;
|
|
|
|
|
|
|
| 1438 |
}
|
| 1439 |
+
|
| 1440 |
+
.eael-contact-form.eael-contact-form-align-right, .eael-contact-form-7.eael-contact-form-btn-align-right input.wpcf7-submit {
|
| 1441 |
+
float: right;
|
| 1442 |
+
width: auto;
|
| 1443 |
}
|
| 1444 |
+
|
| 1445 |
+
.eael-contact-form-7 textarea, .eael-contact-form-7 input[type="text"], .eael-contact-form-7 input[type="password"], .eael-contact-form-7 input[type="datetime"], .eael-contact-form-7 input[type="datetime-local"], .eael-contact-form-7 input[type="date"], .eael-contact-form-7 input[type="month"], .eael-contact-form-7 input[type="time"], .eael-contact-form-7 input[type="week"], .eael-contact-form-7 input[type="number"], .eael-contact-form-7 input[type="email"], .eael-contact-form-7 input[type="url"], .eael-contact-form-7 input[type="search"], .eael-contact-form-7 input[type="tel"], .eael-contact-form-7 input[type="color"], .eael-contact-form-7 .uneditable-input {
|
| 1446 |
+
-webkit-transition: border linear 0.2s,box-shadow linear 0.2s;
|
| 1447 |
+
transition: border linear 0.2s,box-shadow linear 0.2s;
|
| 1448 |
}
|
| 1449 |
+
|
| 1450 |
+
.eael-contact-form-7 .wpcf7-form::before, .eael-contact-form-7 .wpcf7-form::after {
|
| 1451 |
+
content: " ";
|
| 1452 |
+
clear: both;
|
| 1453 |
+
display: table;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1454 |
}
|
| 1455 |
+
|
| 1456 |
+
.eael-contact-form-7 .wpcf7-form:after {
|
| 1457 |
+
clear: both;
|
| 1458 |
+
content: "";
|
| 1459 |
+
font-size: 0;
|
| 1460 |
+
height: 0;
|
| 1461 |
+
display: block;
|
| 1462 |
+
visibility: hidden;
|
| 1463 |
+
}
|
| 1464 |
+
.eael-contact-form-7 .wpcf7-form label,
|
| 1465 |
+
.eael-contact-form-7 .wpcf7-form .wpcf7-form-control-wrap {
|
| 1466 |
+
display: block;
|
| 1467 |
+
}
|
| 1468 |
+
.eael-contact-form-7 .wpcf7-form p {
|
| 1469 |
+
margin-bottom: 0;
|
| 1470 |
+
}
|
| 1471 |
+
.eael-contact-form-7.labels-hide .wpcf7-form label {
|
| 1472 |
+
display: none;
|
| 1473 |
+
}
|
| 1474 |
+
|
| 1475 |
+
.eael-contact-form-7-title {
|
| 1476 |
+
margin-bottom: 10px;
|
| 1477 |
+
}
|
| 1478 |
+
|
| 1479 |
+
.eael-contact-form-7-description {
|
| 1480 |
+
margin-bottom: 20px;
|
| 1481 |
+
}
|
| 1482 |
+
|
| 1483 |
+
.eael-contact-form-7-button-full-width .wpcf7-form-control.wpcf7-submit {
|
| 1484 |
+
width: 100%;
|
| 1485 |
}
|
| 1486 |
/* weForm Styles */
|
| 1487 |
|
| 1542 |
.eael-ninja-container ul.wpuf-form li .wpuf-fields input[type="text"], .eael-ninja-container .nf-field .nf-field-element input[type="password"], .eael-ninja-container ul.wpuf-form li .wpuf-fields input[type="email"], .eael-ninja-container .nf-field .nf-field-element input[type="url"], .eael-ninja-container ul.wpuf-form li .wpuf-fields input[type="number"], .eael-ninja-container .nf-field .nf-field-element textarea {
|
| 1543 |
max-width: 100%;
|
| 1544 |
}
|
| 1545 |
+
.eael-ninja-form .nf-form-title {
|
| 1546 |
+
display: none;
|
| 1547 |
+
}
|
| 1548 |
+
.eael-ninja-form-title-yes .nf-form-title {
|
| 1549 |
+
display: block;
|
| 1550 |
+
}
|
| 1551 |
+
.eael-ninja-form .title-description-hide .nf-form-title {
|
| 1552 |
+
display: none;
|
| 1553 |
+
}
|
| 1554 |
+
.eael-ninja-form.title-description-hide .nf-form-title {
|
| 1555 |
+
display: none;
|
| 1556 |
+
}
|
| 1557 |
+
.eael-ninja-form .nf-field-label {
|
| 1558 |
+
display: none;
|
| 1559 |
+
}
|
| 1560 |
+
.eael-ninja-form-labels-yes .nf-field-label {
|
| 1561 |
+
display: block;
|
| 1562 |
+
}
|
| 1563 |
+
.eael-ninja-form .submit-container input[type=button] {
|
| 1564 |
+
border: 0;
|
| 1565 |
+
border-radius: 0;
|
| 1566 |
+
}
|
| 1567 |
+
|
| 1568 |
+
.eael-ninja-form-button-full-width .submit-container input[type=button] {
|
| 1569 |
+
width: 100%;
|
| 1570 |
+
}
|
| 1571 |
+
|
| 1572 |
+
/**
|
| 1573 |
+
* Gravity Form
|
| 1574 |
+
*/
|
| 1575 |
+
.eael-gravity-form-align-default,
|
| 1576 |
+
.eael-gravity-form-align-left,
|
| 1577 |
+
.eael-gravity-form-btn-align-left {
|
| 1578 |
+
text-align: left;
|
| 1579 |
+
}
|
| 1580 |
+
.eael-gravity-form-align-right,
|
| 1581 |
+
.eael-gravity-form-btn-align-right {
|
| 1582 |
+
text-align: right;
|
| 1583 |
+
}
|
| 1584 |
+
.eael-gravity-form-align-center,
|
| 1585 |
+
.eael-gravity-form-btn-align-center {
|
| 1586 |
+
text-align: center;
|
| 1587 |
+
}
|
| 1588 |
+
|
| 1589 |
+
.eael-gravity-form .gform_wrapper .gform_footer {
|
| 1590 |
+
margin: 0;
|
| 1591 |
+
padding: 0;
|
| 1592 |
+
}
|
| 1593 |
+
.gform_wrapper form li, .gform_wrapper li {
|
| 1594 |
+
list-style: none;
|
| 1595 |
+
}
|
| 1596 |
+
.eael-gravity-form .gform_wrapper ul.gform_fields li.gfield {
|
| 1597 |
+
padding: 0;
|
| 1598 |
+
}
|
| 1599 |
+
.eael-gravity-form .gform_wrapper textarea {
|
| 1600 |
+
padding: 0;
|
| 1601 |
+
}
|
| 1602 |
+
.eael-gravity-form .gform_wrapper .gform_footer input.button, .eael-gravity-form .gform_wrapper .gform_footer input[type=submit], .eael-gravity-form .gform_wrapper .gform_page_footer input.button, .eael-gravity-form .gform_wrapper .gform_page_footer input[type=submit] {
|
| 1603 |
+
margin: 0;
|
| 1604 |
+
}
|
| 1605 |
+
.eael-gravity-form.title-description-hide .gform_heading {
|
| 1606 |
+
display: none;
|
| 1607 |
+
}
|
| 1608 |
+
.eael-gravity-form.labels-hide .gform_wrapper .top_label .gfield_label,
|
| 1609 |
+
.eael-gravity-form.labels-hide .gform_wrapper .field_sublabel_below .ginput_complex.ginput_container label {
|
| 1610 |
+
display: none;
|
| 1611 |
+
}
|
| 1612 |
+
|
| 1613 |
+
.eael-gravity-form-button-full-width .gform_wrapper .gform_footer input[type="submit"] {
|
| 1614 |
+
width: 100%;
|
| 1615 |
+
}
|
| 1616 |
|
| 1617 |
/* Post Grid Style */
|
| 1618 |
|
| 3062 |
margin: 0px;
|
| 3063 |
}
|
| 3064 |
|
|
|
|
| 3065 |
/**
|
| 3066 |
* Caldera Contact Form Styler
|
| 3067 |
*/
|
| 3078 |
text-align: center;
|
| 3079 |
}
|
| 3080 |
|
| 3081 |
+
.eael-caldera-form .control-label {
|
| 3082 |
+
display: none;
|
| 3083 |
+
}
|
| 3084 |
+
.eael-caldera-form-labels-yes .control-label {
|
| 3085 |
+
display: block;
|
| 3086 |
+
}
|
| 3087 |
+
.eael-caldera-form-button-center .form-group input[type=button],
|
| 3088 |
+
.eael-caldera-form-button-center .form-group input[type=submit] {
|
| 3089 |
+
display: block;
|
| 3090 |
+
margin: 0 auto;
|
| 3091 |
+
}
|
| 3092 |
+
.eael-caldera-form-button-right .form-group input[type=button],
|
| 3093 |
+
.eael-caldera-form-button-right .form-group input[type=submit] {
|
| 3094 |
+
float: right;
|
| 3095 |
+
}
|
| 3096 |
+
.eael-caldera-form .intl-tel-input {
|
| 3097 |
+
display: inherit;
|
| 3098 |
+
}
|
| 3099 |
+
|
| 3100 |
+
.eael-custom-radio-checkbox .caldera-grid input[type=checkbox],
|
| 3101 |
+
.eael-custom-radio-checkbox .caldera-grid input[type=radio] {
|
| 3102 |
+
border-style: solid;
|
| 3103 |
+
border-width: 0;
|
| 3104 |
+
padding: 3px;
|
| 3105 |
+
-webkit-appearance: none;
|
| 3106 |
+
}
|
| 3107 |
+
|
| 3108 |
+
.eael-caldera-form-button-full-width .form-group input[type=submit],
|
| 3109 |
+
.eael-caldera-form-button-full-width .form-group input[type=button] {
|
| 3110 |
+
width: 100%;
|
| 3111 |
+
}
|
| 3112 |
+
|
| 3113 |
/**
|
| 3114 |
* Social Feeds
|
| 3115 |
*/
|
| 4471 |
flex-flow: column wrap;
|
| 4472 |
}
|
| 4473 |
.eael-advance-tabs.eael-tabs-vertical .eael-tabs-nav > ul > li {
|
| 4474 |
+
width: 100%;
|
| 4475 |
+
justify-content: start;
|
| 4476 |
}
|
| 4477 |
|
| 4478 |
.eael-advance-tabs.eael-tabs-vertical .eael-tabs-nav > ul li::after {
|
assets/js/eael-scripts.js
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
(function ($) {
|
| 2 |
+
"use strict";
|
| 3 |
+
|
| 4 |
+
var FilterGallery = function( $scope, $ ) {
|
| 5 |
+
var filtergallery_elem = $scope.find('.eael-filter-gallery-wrapper').eq(0);
|
| 6 |
+
|
| 7 |
+
$(filtergallery_elem).each(function() {
|
| 8 |
+
var gridStyle = $(this).data('grid-style'),
|
| 9 |
+
ref = $(this).find('.item').data('ref'),
|
| 10 |
+
duration = $(this).data('duration'),
|
| 11 |
+
effects = $(this).data('effects'),
|
| 12 |
+
popup = $(this).data('popup'),
|
| 13 |
+
galleryEnabled = $(this).data('gallery-enabled');
|
| 14 |
+
var mixer = mixitup( $(this), {
|
| 15 |
+
controls: {
|
| 16 |
+
scope: 'local'
|
| 17 |
+
},
|
| 18 |
+
selectors: {
|
| 19 |
+
target: '[data-ref~="'+ref+'"]'
|
| 20 |
+
},
|
| 21 |
+
animation: {
|
| 22 |
+
enable: true,
|
| 23 |
+
duration: ''+duration+'',
|
| 24 |
+
effects: ''+effects+'',
|
| 25 |
+
easing: 'cubic-bezier(0.245, 0.045, 0.955, 1)',
|
| 26 |
+
}
|
| 27 |
+
} );
|
| 28 |
+
|
| 29 |
+
// Set Background Image
|
| 30 |
+
if( gridStyle == 'eael-hoverer' || gridStyle == 'eael-tiles' ) {
|
| 31 |
+
var postColumn = $(this).find( '.eael-filter-gallery-container .item' );
|
| 32 |
+
postColumn.each( function() {
|
| 33 |
+
let dataBg = $(this).attr( 'data-item-bg' );
|
| 34 |
+
$(this).css( 'background-image', 'url( '+ dataBg +' )' );
|
| 35 |
+
} );
|
| 36 |
+
}
|
| 37 |
+
// Magnific Popup
|
| 38 |
+
if( true == popup ) {
|
| 39 |
+
$(this).find('.eael-magnific-link').magnificPopup({
|
| 40 |
+
type: 'image',
|
| 41 |
+
gallery:{
|
| 42 |
+
enabled: galleryEnabled
|
| 43 |
+
},
|
| 44 |
+
callbacks: {
|
| 45 |
+
close: function() {
|
| 46 |
+
$( '#elementor-lightbox' ).hide();
|
| 47 |
+
}
|
| 48 |
+
}
|
| 49 |
+
});
|
| 50 |
+
}
|
| 51 |
+
});
|
| 52 |
+
}
|
| 53 |
+
|
| 54 |
+
$(window).on('elementor/frontend/init', function () {
|
| 55 |
+
elementorFrontend.hooks.addAction('frontend/element_ready/eael-filterable-gallery.default', FilterGallery);
|
| 56 |
+
});
|
| 57 |
+
}(jQuery));
|
assets/js/load-more.js
CHANGED
|
@@ -47,11 +47,13 @@
|
|
| 47 |
createPostHtml( res );
|
| 48 |
if( optionsValue.postStyle === 'grid' ) {
|
| 49 |
$( '.eael-post-grid' ).masonry( 'destroy' );
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
|
|
|
|
|
|
| 55 |
}
|
| 56 |
optionsValue.loadMoreBtn.removeClass( 'button--loading' );
|
| 57 |
optionsValue.loadMoreBtn.find( 'span' ).html( settingsValue.btnText );
|
| 47 |
createPostHtml( res );
|
| 48 |
if( optionsValue.postStyle === 'grid' ) {
|
| 49 |
$( '.eael-post-grid' ).masonry( 'destroy' );
|
| 50 |
+
setTimeout(function() {
|
| 51 |
+
$('.eael-post-grid').masonry({
|
| 52 |
+
itemSelector: '.eael-grid-post',
|
| 53 |
+
percentPosition: true,
|
| 54 |
+
columnWidth: '.eael-post-grid-column'
|
| 55 |
+
});
|
| 56 |
+
}, 100);
|
| 57 |
}
|
| 58 |
optionsValue.loadMoreBtn.removeClass( 'button--loading' );
|
| 59 |
optionsValue.loadMoreBtn.find( 'span' ).html( settingsValue.btnText );
|
elements/advance-tabs/advance-tabs.php
CHANGED
|
@@ -77,7 +77,7 @@ class Widget_Eael_Adv_Tabs extends Widget_Base {
|
|
| 77 |
$this->start_controls_section(
|
| 78 |
'eael_section_adv_tabs_content_settings',
|
| 79 |
[
|
| 80 |
-
'label' => esc_html__( 'Content
|
| 81 |
]
|
| 82 |
);
|
| 83 |
$this->add_control(
|
|
@@ -98,11 +98,46 @@ class Widget_Eael_Adv_Tabs extends Widget_Base {
|
|
| 98 |
'default' => 'inactive',
|
| 99 |
'return_value' => 'active-default',
|
| 100 |
],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 101 |
[
|
| 102 |
'name' => 'eael_adv_tabs_tab_title_icon',
|
| 103 |
'label' => esc_html__( 'Icon', 'essential-addons-elementor' ),
|
| 104 |
'type' => Controls_Manager::ICON,
|
| 105 |
-
'default' => 'fa fa-home',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 106 |
],
|
| 107 |
[
|
| 108 |
'name' => 'eael_adv_tabs_tab_title',
|
|
@@ -178,7 +213,7 @@ class Widget_Eael_Adv_Tabs extends Widget_Base {
|
|
| 178 |
$this->start_controls_section(
|
| 179 |
'eael_section_adv_tabs_style_settings',
|
| 180 |
[
|
| 181 |
-
'label' => esc_html__( 'General
|
| 182 |
'tab' => Controls_Manager::TAB_STYLE,
|
| 183 |
]
|
| 184 |
);
|
|
@@ -239,7 +274,7 @@ class Widget_Eael_Adv_Tabs extends Widget_Base {
|
|
| 239 |
$this->start_controls_section(
|
| 240 |
'eael_section_adv_tabs_tab_style_settings',
|
| 241 |
[
|
| 242 |
-
'label' => esc_html__( 'Tab Title
|
| 243 |
'tab' => Controls_Manager::TAB_STYLE,
|
| 244 |
]
|
| 245 |
);
|
|
@@ -289,12 +324,13 @@ class Widget_Eael_Adv_Tabs extends Widget_Base {
|
|
| 289 |
'range' => [
|
| 290 |
'px' => [
|
| 291 |
'min' => 0,
|
| 292 |
-
'max' =>
|
| 293 |
'step' => 1,
|
| 294 |
]
|
| 295 |
],
|
| 296 |
'selectors' => [
|
| 297 |
-
'{{WRAPPER}} .eael-advance-tabs .eael-tabs-nav > ul li
|
|
|
|
| 298 |
]
|
| 299 |
]
|
| 300 |
);
|
|
@@ -316,8 +352,8 @@ class Widget_Eael_Adv_Tabs extends Widget_Base {
|
|
| 316 |
]
|
| 317 |
],
|
| 318 |
'selectors' => [
|
| 319 |
-
'{{WRAPPER}} .eael-tab-inline-icon li .
|
| 320 |
-
'{{WRAPPER}} .eael-tab-top-icon li .
|
| 321 |
]
|
| 322 |
]
|
| 323 |
);
|
|
@@ -376,7 +412,7 @@ class Widget_Eael_Adv_Tabs extends Widget_Base {
|
|
| 376 |
'type' => Controls_Manager::COLOR,
|
| 377 |
'default' => '#333',
|
| 378 |
'selectors' => [
|
| 379 |
-
'{{WRAPPER}} .eael-advance-tabs .eael-tabs-nav > ul li
|
| 380 |
],
|
| 381 |
'condition' => [
|
| 382 |
'eael_adv_tabs_icon_show' => 'yes'
|
|
@@ -534,7 +570,7 @@ class Widget_Eael_Adv_Tabs extends Widget_Base {
|
|
| 534 |
$this->start_controls_section(
|
| 535 |
'eael_section_adv_tabs_tab_content_style_settings',
|
| 536 |
[
|
| 537 |
-
'label' => esc_html__( 'Content
|
| 538 |
'tab' => Controls_Manager::TAB_STYLE,
|
| 539 |
]
|
| 540 |
);
|
|
@@ -615,7 +651,7 @@ class Widget_Eael_Adv_Tabs extends Widget_Base {
|
|
| 615 |
$this->start_controls_section(
|
| 616 |
'eael_section_adv_tabs_tab_caret_style_settings',
|
| 617 |
[
|
| 618 |
-
'label' => esc_html__( 'Caret
|
| 619 |
'tab' => Controls_Manager::TAB_STYLE,
|
| 620 |
]
|
| 621 |
);
|
|
@@ -679,7 +715,13 @@ class Widget_Eael_Adv_Tabs extends Widget_Base {
|
|
| 679 |
<div class="eael-tabs-nav">
|
| 680 |
<ul class="<?php echo esc_attr( $settings['eael_adv_tab_icon_position'] ); ?>">
|
| 681 |
<?php foreach( $settings['eael_adv_tabs_tab'] as $tab ) : ?>
|
| 682 |
-
<li class="<?php echo esc_attr( $tab['eael_adv_tabs_tab_show_as_default'] ); ?>"><?php if( $settings['eael_adv_tabs_icon_show'] === 'yes' ) :
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 683 |
<?php endforeach; ?>
|
| 684 |
</ul>
|
| 685 |
</div>
|
| 77 |
$this->start_controls_section(
|
| 78 |
'eael_section_adv_tabs_content_settings',
|
| 79 |
[
|
| 80 |
+
'label' => esc_html__( 'Content', 'essential-addons-elementor' )
|
| 81 |
]
|
| 82 |
);
|
| 83 |
$this->add_control(
|
| 98 |
'default' => 'inactive',
|
| 99 |
'return_value' => 'active-default',
|
| 100 |
],
|
| 101 |
+
[
|
| 102 |
+
'name' => 'eael_adv_tabs_icon_type',
|
| 103 |
+
'label' => esc_html__( 'Icon Type', 'essential-addons-elementor' ),
|
| 104 |
+
'type' => Controls_Manager::CHOOSE,
|
| 105 |
+
'label_block' => false,
|
| 106 |
+
'options' => [
|
| 107 |
+
'none' => [
|
| 108 |
+
'title' => esc_html__( 'None', 'essential-addons-elementor' ),
|
| 109 |
+
'icon' => 'fa fa-ban',
|
| 110 |
+
],
|
| 111 |
+
'icon' => [
|
| 112 |
+
'title' => esc_html__( 'Icon', 'essential-addons-elementor' ),
|
| 113 |
+
'icon' => 'fa fa-gear',
|
| 114 |
+
],
|
| 115 |
+
'image' => [
|
| 116 |
+
'title' => esc_html__( 'Image', 'essential-addons-elementor' ),
|
| 117 |
+
'icon' => 'fa fa-picture-o',
|
| 118 |
+
],
|
| 119 |
+
],
|
| 120 |
+
'default' => 'icon',
|
| 121 |
+
],
|
| 122 |
[
|
| 123 |
'name' => 'eael_adv_tabs_tab_title_icon',
|
| 124 |
'label' => esc_html__( 'Icon', 'essential-addons-elementor' ),
|
| 125 |
'type' => Controls_Manager::ICON,
|
| 126 |
+
'default' => 'fa fa-home',
|
| 127 |
+
'condition' => [
|
| 128 |
+
'eael_adv_tabs_icon_type' => 'icon'
|
| 129 |
+
]
|
| 130 |
+
],
|
| 131 |
+
[
|
| 132 |
+
'name' => 'eael_adv_tabs_tab_title_image',
|
| 133 |
+
'label' => esc_html__( 'Image', 'essential-addons-elementor' ),
|
| 134 |
+
'type' => Controls_Manager::MEDIA,
|
| 135 |
+
'default' => [
|
| 136 |
+
'url' => Utils::get_placeholder_image_src(),
|
| 137 |
+
],
|
| 138 |
+
'condition' => [
|
| 139 |
+
'eael_adv_tabs_icon_type' => 'image'
|
| 140 |
+
]
|
| 141 |
],
|
| 142 |
[
|
| 143 |
'name' => 'eael_adv_tabs_tab_title',
|
| 213 |
$this->start_controls_section(
|
| 214 |
'eael_section_adv_tabs_style_settings',
|
| 215 |
[
|
| 216 |
+
'label' => esc_html__( 'General', 'essential-addons-elementor' ),
|
| 217 |
'tab' => Controls_Manager::TAB_STYLE,
|
| 218 |
]
|
| 219 |
);
|
| 274 |
$this->start_controls_section(
|
| 275 |
'eael_section_adv_tabs_tab_style_settings',
|
| 276 |
[
|
| 277 |
+
'label' => esc_html__( 'Tab Title', 'essential-addons-elementor' ),
|
| 278 |
'tab' => Controls_Manager::TAB_STYLE,
|
| 279 |
]
|
| 280 |
);
|
| 324 |
'range' => [
|
| 325 |
'px' => [
|
| 326 |
'min' => 0,
|
| 327 |
+
'max' => 200,
|
| 328 |
'step' => 1,
|
| 329 |
]
|
| 330 |
],
|
| 331 |
'selectors' => [
|
| 332 |
+
'{{WRAPPER}} .eael-advance-tabs .eael-tabs-nav > ul li i' => 'font-size: {{SIZE}}{{UNIT}};',
|
| 333 |
+
'{{WRAPPER}} .eael-advance-tabs .eael-tabs-nav > ul li img' => 'width: {{SIZE}}{{UNIT}};',
|
| 334 |
]
|
| 335 |
]
|
| 336 |
);
|
| 352 |
]
|
| 353 |
],
|
| 354 |
'selectors' => [
|
| 355 |
+
'{{WRAPPER}} .eael-tab-inline-icon li i, {{WRAPPER}} .eael-tab-inline-icon li img' => 'margin-right: {{SIZE}}{{UNIT}};',
|
| 356 |
+
'{{WRAPPER}} .eael-tab-top-icon li i, {{WRAPPER}} .eael-tab-top-icon li img' => 'margin-bottom: {{SIZE}}{{UNIT}};',
|
| 357 |
]
|
| 358 |
]
|
| 359 |
);
|
| 412 |
'type' => Controls_Manager::COLOR,
|
| 413 |
'default' => '#333',
|
| 414 |
'selectors' => [
|
| 415 |
+
'{{WRAPPER}} .eael-advance-tabs .eael-tabs-nav > ul li i' => 'color: {{VALUE}};',
|
| 416 |
],
|
| 417 |
'condition' => [
|
| 418 |
'eael_adv_tabs_icon_show' => 'yes'
|
| 570 |
$this->start_controls_section(
|
| 571 |
'eael_section_adv_tabs_tab_content_style_settings',
|
| 572 |
[
|
| 573 |
+
'label' => esc_html__( 'Content', 'essential-addons-elementor' ),
|
| 574 |
'tab' => Controls_Manager::TAB_STYLE,
|
| 575 |
]
|
| 576 |
);
|
| 651 |
$this->start_controls_section(
|
| 652 |
'eael_section_adv_tabs_tab_caret_style_settings',
|
| 653 |
[
|
| 654 |
+
'label' => esc_html__( 'Caret', 'essential-addons-elementor' ),
|
| 655 |
'tab' => Controls_Manager::TAB_STYLE,
|
| 656 |
]
|
| 657 |
);
|
| 715 |
<div class="eael-tabs-nav">
|
| 716 |
<ul class="<?php echo esc_attr( $settings['eael_adv_tab_icon_position'] ); ?>">
|
| 717 |
<?php foreach( $settings['eael_adv_tabs_tab'] as $tab ) : ?>
|
| 718 |
+
<li class="<?php echo esc_attr( $tab['eael_adv_tabs_tab_show_as_default'] ); ?>"><?php if( $settings['eael_adv_tabs_icon_show'] === 'yes' ) :
|
| 719 |
+
if( $tab['eael_adv_tabs_icon_type'] === 'icon' ) : ?>
|
| 720 |
+
<i class="<?php echo esc_attr( $tab['eael_adv_tabs_tab_title_icon'] ); ?>"></i>
|
| 721 |
+
<?php elseif( $tab['eael_adv_tabs_icon_type'] === 'image' ) : ?>
|
| 722 |
+
<img src="<?php echo esc_attr( $tab['eael_adv_tabs_tab_title_image']['url'] ); ?>">
|
| 723 |
+
<?php endif; ?>
|
| 724 |
+
<?php endif; ?> <span class="eael-tab-title"><?php echo $tab['eael_adv_tabs_tab_title']; ?></span></li>
|
| 725 |
<?php endforeach; ?>
|
| 726 |
</ul>
|
| 727 |
</div>
|
elements/caldera-forms/caldera-forms.php
CHANGED
|
@@ -1,74 +1,348 @@
|
|
| 1 |
<?php
|
| 2 |
namespace Elementor;
|
| 3 |
|
| 4 |
-
if ( ! defined( 'ABSPATH' ) ) exit; //
|
| 5 |
-
|
| 6 |
|
| 7 |
class Widget_Eael_Caldera_Form extends Widget_Base {
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
$this->add_control(
|
| 38 |
-
'
|
| 39 |
[
|
| 40 |
-
'label'
|
| 41 |
-
'
|
| 42 |
-
'
|
| 43 |
-
'options'
|
|
|
|
| 44 |
]
|
| 45 |
);
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 53 |
[
|
| 54 |
-
'label'
|
| 55 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 56 |
]
|
| 57 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
|
| 59 |
$this->add_control(
|
| 60 |
-
'
|
| 61 |
[
|
| 62 |
'label' => esc_html__( 'Form Background Color', 'essential-addons-elementor' ),
|
| 63 |
'type' => Controls_Manager::COLOR,
|
| 64 |
'selectors' => [
|
| 65 |
-
'{{WRAPPER}} .eael-
|
| 66 |
],
|
| 67 |
]
|
| 68 |
);
|
| 69 |
-
|
| 70 |
$this->add_responsive_control(
|
| 71 |
-
'
|
| 72 |
[
|
| 73 |
'label' => esc_html__( 'Form Alignment', 'essential-addons-elementor' ),
|
| 74 |
'type' => Controls_Manager::CHOOSE,
|
|
@@ -80,24 +354,23 @@ class Widget_Eael_Caldera_Form extends Widget_Base {
|
|
| 80 |
],
|
| 81 |
'left' => [
|
| 82 |
'title' => esc_html__( 'Left', 'essential-addons-elementor' ),
|
| 83 |
-
'icon' => '
|
| 84 |
],
|
| 85 |
'center' => [
|
| 86 |
'title' => esc_html__( 'Center', 'essential-addons-elementor' ),
|
| 87 |
-
'icon' => '
|
| 88 |
],
|
| 89 |
'right' => [
|
| 90 |
'title' => esc_html__( 'Right', 'essential-addons-elementor' ),
|
| 91 |
-
'icon' => '
|
| 92 |
],
|
| 93 |
],
|
| 94 |
'default' => 'default',
|
| 95 |
-
'prefix_class' => 'eael-caldera-form-align-',
|
| 96 |
]
|
| 97 |
);
|
| 98 |
|
| 99 |
$this->add_responsive_control(
|
| 100 |
-
'
|
| 101 |
[
|
| 102 |
'label' => esc_html__( 'Form Width', 'essential-addons-elementor' ),
|
| 103 |
'type' => Controls_Manager::SLIDER,
|
|
@@ -113,13 +386,13 @@ class Widget_Eael_Caldera_Form extends Widget_Base {
|
|
| 113 |
],
|
| 114 |
],
|
| 115 |
'selectors' => [
|
| 116 |
-
'{{WRAPPER}} .eael-
|
| 117 |
],
|
| 118 |
]
|
| 119 |
);
|
| 120 |
|
| 121 |
$this->add_responsive_control(
|
| 122 |
-
'
|
| 123 |
[
|
| 124 |
'label' => esc_html__( 'Form Max Width', 'essential-addons-elementor' ),
|
| 125 |
'type' => Controls_Manager::SLIDER,
|
|
@@ -135,531 +408,1103 @@ class Widget_Eael_Caldera_Form extends Widget_Base {
|
|
| 135 |
],
|
| 136 |
],
|
| 137 |
'selectors' => [
|
| 138 |
-
'{{WRAPPER}} .eael-
|
| 139 |
],
|
| 140 |
]
|
| 141 |
);
|
| 142 |
-
|
| 143 |
-
|
| 144 |
$this->add_responsive_control(
|
| 145 |
-
'
|
| 146 |
[
|
| 147 |
'label' => esc_html__( 'Form Margin', 'essential-addons-elementor' ),
|
| 148 |
'type' => Controls_Manager::DIMENSIONS,
|
| 149 |
'size_units' => [ 'px', 'em', '%' ],
|
| 150 |
'selectors' => [
|
| 151 |
-
'{{WRAPPER}} .eael-
|
| 152 |
],
|
| 153 |
]
|
| 154 |
-
);
|
| 155 |
-
|
| 156 |
$this->add_responsive_control(
|
| 157 |
-
'
|
| 158 |
[
|
| 159 |
'label' => esc_html__( 'Form Padding', 'essential-addons-elementor' ),
|
| 160 |
'type' => Controls_Manager::DIMENSIONS,
|
| 161 |
'size_units' => [ 'px', 'em', '%' ],
|
| 162 |
'selectors' => [
|
| 163 |
-
'{{WRAPPER}} .eael-
|
| 164 |
],
|
| 165 |
]
|
| 166 |
);
|
| 167 |
-
|
| 168 |
-
|
| 169 |
$this->add_control(
|
| 170 |
-
'
|
| 171 |
[
|
| 172 |
'label' => esc_html__( 'Border Radius', 'essential-addons-elementor' ),
|
| 173 |
'type' => Controls_Manager::DIMENSIONS,
|
| 174 |
'separator' => 'before',
|
| 175 |
'size_units' => [ 'px' ],
|
| 176 |
'selectors' => [
|
| 177 |
-
'{{WRAPPER}} .eael-
|
| 178 |
],
|
| 179 |
]
|
| 180 |
);
|
| 181 |
-
|
| 182 |
-
|
| 183 |
$this->add_group_control(
|
| 184 |
Group_Control_Border::get_type(),
|
| 185 |
[
|
| 186 |
-
'name' => '
|
| 187 |
-
'selector' => '{{WRAPPER}} .eael-
|
| 188 |
]
|
| 189 |
);
|
| 190 |
-
|
| 191 |
-
|
| 192 |
$this->add_group_control(
|
| 193 |
Group_Control_Box_Shadow::get_type(),
|
| 194 |
[
|
| 195 |
-
'name' => '
|
| 196 |
-
'selector' => '{{WRAPPER}} .eael-
|
| 197 |
-
]
|
| 198 |
-
);
|
| 199 |
-
|
| 200 |
-
$this->end_controls_section();
|
| 201 |
-
|
| 202 |
-
|
| 203 |
-
|
| 204 |
-
$this->start_controls_section(
|
| 205 |
-
'eael_section_caldera_form_field_styles',
|
| 206 |
-
[
|
| 207 |
-
'label' => esc_html__( 'Form Fields Styles', 'essential-addons-elementor' ),
|
| 208 |
-
'tab' => Controls_Manager::TAB_STYLE
|
| 209 |
-
]
|
| 210 |
-
);
|
| 211 |
-
|
| 212 |
-
$this->add_control(
|
| 213 |
-
'eael_caldera_form_input_background',
|
| 214 |
-
[
|
| 215 |
-
'label' => esc_html__( 'Input Field Background', 'essential-addons-elementor' ),
|
| 216 |
-
'type' => Controls_Manager::COLOR,
|
| 217 |
-
'default' => '#f2f2f2',
|
| 218 |
-
'selectors' => [
|
| 219 |
-
'{{WRAPPER}} .eael-caldera-form-container input.form-control, {{WRAPPER}} .eael-caldera-form-container form input[type="text"], {{WRAPPER}} .eael-caldera-form-container form input[type="password"], {{WRAPPER}} .eael-caldera-form-container form input[type="email"], {{WRAPPER}} .eael-caldera-form-container form input[type="url"], {{WRAPPER}} .eael-caldera-form-container form input[type="date"], {{WRAPPER}} .eael-caldera-form-container form input[type="month"], {{WRAPPER}} .eael-caldera-form-container form input[type="time"], {{WRAPPER}} .eael-caldera-form-container form input[type="datetime"], {{WRAPPER}} .eael-caldera-form-container form input[type="datetime-local"], {{WRAPPER}} .eael-caldera-form-container form input[type="week"], {{WRAPPER}} .eael-caldera-form-container form input[type="number"], {{WRAPPER}} .eael-caldera-form-container form input[type="search"], {{WRAPPER}} .eael-caldera-form-container form input[type="tel"], {{WRAPPER}} .eael-caldera-form-container form input[type="color"], {{WRAPPER}} .eael-caldera-form-container form select, {{WRAPPER}} .eael-caldera-form-container form textarea' => 'background: {{VALUE}};',
|
| 220 |
-
],
|
| 221 |
]
|
| 222 |
);
|
| 223 |
|
| 224 |
-
|
| 225 |
-
|
| 226 |
-
|
| 227 |
-
|
| 228 |
-
|
| 229 |
-
|
| 230 |
-
|
| 231 |
-
|
| 232 |
-
|
| 233 |
-
|
| 234 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 235 |
],
|
| 236 |
-
'
|
| 237 |
-
'
|
| 238 |
-
'
|
| 239 |
],
|
| 240 |
-
|
| 241 |
-
|
| 242 |
-
|
| 243 |
-
],
|
| 244 |
-
]
|
| 245 |
-
);
|
| 246 |
-
|
| 247 |
-
$this->add_responsive_control(
|
| 248 |
-
'eael_caldera_form_textarea_width',
|
| 249 |
-
[
|
| 250 |
-
'label' => esc_html__( 'Textarea Width', 'essential-addons-elementor' ),
|
| 251 |
-
'type' => Controls_Manager::SLIDER,
|
| 252 |
-
'size_units' => [ 'px', 'em', '%' ],
|
| 253 |
-
'range' => [
|
| 254 |
-
'px' => [
|
| 255 |
-
'min' => 10,
|
| 256 |
-
'max' => 1500,
|
| 257 |
-
],
|
| 258 |
-
'em' => [
|
| 259 |
-
'min' => 1,
|
| 260 |
-
'max' => 80,
|
| 261 |
],
|
| 262 |
],
|
| 263 |
-
'
|
| 264 |
-
|
| 265 |
-
|
| 266 |
-
]
|
| 267 |
-
);
|
| 268 |
-
|
| 269 |
-
$this->add_responsive_control(
|
| 270 |
-
'eael_caldera_form_input_padding',
|
| 271 |
-
[
|
| 272 |
-
'label' => esc_html__( 'Fields Padding', 'essential-addons-elementor' ),
|
| 273 |
-
'type' => Controls_Manager::DIMENSIONS,
|
| 274 |
-
'size_units' => [ 'px', 'em', '%' ],
|
| 275 |
-
'selectors' => [
|
| 276 |
-
'{{WRAPPER}} .eael-caldera-form-container input.form-control, {{WRAPPER}} .eael-caldera-form-container form input[type="text"], {{WRAPPER}} .eael-caldera-form-container form input[type="password"], {{WRAPPER}} .eael-caldera-form-container form input[type="email"], {{WRAPPER}} .eael-caldera-form-container form input[type="url"], {{WRAPPER}} .eael-caldera-form-container form input[type="date"], {{WRAPPER}} .eael-caldera-form-container form input[type="month"], {{WRAPPER}} .eael-caldera-form-container form input[type="time"], {{WRAPPER}} .eael-caldera-form-container form input[type="datetime"], {{WRAPPER}} .eael-caldera-form-container form input[type="datetime-local"], {{WRAPPER}} .eael-caldera-form-container form input[type="week"], {{WRAPPER}} .eael-caldera-form-container form input[type="number"], {{WRAPPER}} .eael-caldera-form-container form input[type="search"], {{WRAPPER}} .eael-caldera-form-container form input[type="tel"], {{WRAPPER}} .eael-caldera-form-container form input[type="color"], {{WRAPPER}} .eael-caldera-form-container form select, {{WRAPPER}} .eael-caldera-form-container form textarea' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
| 277 |
-
],
|
| 278 |
-
]
|
| 279 |
-
);
|
| 280 |
-
|
| 281 |
-
|
| 282 |
-
|
| 283 |
-
$this->add_control(
|
| 284 |
-
'eael_caldera_form_input_border_radius',
|
| 285 |
-
[
|
| 286 |
-
'label' => esc_html__( 'Border Radius', 'essential-addons-elementor' ),
|
| 287 |
-
'type' => Controls_Manager::DIMENSIONS,
|
| 288 |
-
'separator' => 'before',
|
| 289 |
-
'size_units' => [ 'px' ],
|
| 290 |
-
'selectors' => [
|
| 291 |
-
'{{WRAPPER}} .eael-caldera-form-container input.form-control, {{WRAPPER}} .eael-caldera-form-container form input[type="text"], {{WRAPPER}} .eael-caldera-form-container form input[type="password"], {{WRAPPER}} .eael-caldera-form-container form input[type="email"], {{WRAPPER}} .eael-caldera-form-container form input[type="url"], {{WRAPPER}} .eael-caldera-form-container form input[type="date"], {{WRAPPER}} .eael-caldera-form-container form input[type="month"], {{WRAPPER}} .eael-caldera-form-container form input[type="time"], {{WRAPPER}} .eael-caldera-form-container form input[type="datetime"], {{WRAPPER}} .eael-caldera-form-container form input[type="datetime-local"], {{WRAPPER}} .eael-caldera-form-container form input[type="week"], {{WRAPPER}} .eael-caldera-form-container form input[type="number"], {{WRAPPER}} .eael-caldera-form-container form input[type="search"], {{WRAPPER}} .eael-caldera-form-container form input[type="tel"], {{WRAPPER}} .eael-caldera-form-container form input[type="color"], {{WRAPPER}} .eael-caldera-form-container form select, {{WRAPPER}} .eael-caldera-form-container form textarea' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
| 292 |
],
|
| 293 |
]
|
| 294 |
);
|
| 295 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 296 |
|
| 297 |
$this->add_group_control(
|
| 298 |
Group_Control_Border::get_type(),
|
| 299 |
[
|
| 300 |
-
'name'
|
| 301 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
| 302 |
]
|
| 303 |
);
|
| 304 |
|
| 305 |
-
|
| 306 |
-
|
| 307 |
-
Group_Control_Box_Shadow::get_type(),
|
| 308 |
[
|
| 309 |
-
'
|
| 310 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
| 311 |
]
|
| 312 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 313 |
|
| 314 |
-
$this->
|
| 315 |
-
'
|
| 316 |
[
|
| 317 |
-
'
|
| 318 |
-
'
|
| 319 |
-
'
|
|
|
|
|
|
|
|
|
|
| 320 |
]
|
| 321 |
);
|
| 322 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 323 |
|
| 324 |
$this->add_group_control(
|
| 325 |
Group_Control_Box_Shadow::get_type(),
|
| 326 |
[
|
| 327 |
-
'name'
|
| 328 |
-
'selector'
|
| 329 |
-
|
| 330 |
-
);
|
| 331 |
-
|
| 332 |
-
$this->add_control(
|
| 333 |
-
'eael_caldera_form_input_focus_border',
|
| 334 |
-
[
|
| 335 |
-
'label' => esc_html__( 'Border Color', 'essential-addons-elementor' ),
|
| 336 |
-
'type' => Controls_Manager::COLOR,
|
| 337 |
-
'selectors' => [
|
| 338 |
-
'body {{WRAPPER}} .eael-caldera-form-container input.form-control, {{WRAPPER}} .eael-caldera-form-container form input[type="text"]:focus, {{WRAPPER}} .eael-caldera-form-container form input[type="password"]:focus, {{WRAPPER}} .eael-caldera-form-container form input[type="email"]:focus, {{WRAPPER}} .eael-caldera-form-container form input[type="url"]:focus, {{WRAPPER}} .eael-caldera-form-container form input[type="date"]:focus, {{WRAPPER}} .eael-caldera-form-container form input[type="month"]:focus, {{WRAPPER}} .eael-caldera-form-container form input[type="time"]:focus, {{WRAPPER}} .eael-caldera-form-container form input[type="datetime"]:focus, {{WRAPPER}} .eael-caldera-form-container form input[type="datetime-local"]:focus, {{WRAPPER}} .eael-caldera-form-container form input[type="week"]:focus, {{WRAPPER}} .eael-caldera-form-container form input[type="number"]:focus, {{WRAPPER}} .eael-caldera-form-container form input[type="search"]:focus, {{WRAPPER}} .eael-caldera-form-container form input[type="tel"]:focus, {{WRAPPER}} .eael-caldera-form-container form input[type="color"]:focus, {{WRAPPER}} .eael-caldera-form-container form select:focus, {{WRAPPER}} .eael-caldera-form-container form textarea:focus' => 'border-color: {{VALUE}};',
|
| 339 |
-
],
|
| 340 |
]
|
| 341 |
);
|
| 342 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 343 |
|
| 344 |
-
|
| 345 |
-
|
| 346 |
-
|
| 347 |
-
|
| 348 |
-
$this->start_controls_section(
|
| 349 |
-
'eael_section_caldera_form_typography',
|
| 350 |
[
|
| 351 |
-
'
|
| 352 |
-
'
|
|
|
|
|
|
|
|
|
|
| 353 |
]
|
| 354 |
);
|
| 355 |
|
| 356 |
-
|
| 357 |
-
|
| 358 |
-
'eael_caldera_form_label_color',
|
| 359 |
[
|
| 360 |
-
'
|
| 361 |
-
'
|
| 362 |
-
'
|
| 363 |
-
'{{WRAPPER}} .eael-caldera-form-container, {{WRAPPER}} .eael-caldera-form-container .caldera-form label' => 'color: {{VALUE}};',
|
| 364 |
-
],
|
| 365 |
]
|
| 366 |
);
|
| 367 |
|
| 368 |
-
|
| 369 |
-
|
| 370 |
-
|
| 371 |
-
|
| 372 |
-
|
| 373 |
-
|
| 374 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 375 |
],
|
| 376 |
-
|
| 377 |
-
|
| 378 |
|
| 379 |
$this->add_control(
|
| 380 |
-
'
|
| 381 |
[
|
| 382 |
-
'label'
|
| 383 |
-
'type'
|
| 384 |
-
'
|
| 385 |
-
|
| 386 |
-
'{{WRAPPER}} .eael-
|
| 387 |
-
'{{WRAPPER}} .eael-caldera-form-container ::-ms-input-placeholder' => 'color: {{VALUE}};',
|
| 388 |
],
|
|
|
|
|
|
|
|
|
|
| 389 |
]
|
| 390 |
);
|
| 391 |
-
|
| 392 |
-
|
| 393 |
-
|
| 394 |
-
|
| 395 |
-
|
| 396 |
-
|
| 397 |
-
'
|
| 398 |
-
|
| 399 |
-
|
| 400 |
-
|
| 401 |
-
|
| 402 |
-
$this->add_group_control(
|
| 403 |
-
Group_Control_Typography::get_type(),
|
| 404 |
-
[
|
| 405 |
-
'name' => 'eael_caldera_form_label_typography',
|
| 406 |
-
'selector' => '{{WRAPPER}} .eael-caldera-form-container, {{WRAPPER}} .eael-caldera-form-container .caldera-form label',
|
| 407 |
-
]
|
| 408 |
-
);
|
| 409 |
-
|
| 410 |
|
| 411 |
$this->add_control(
|
| 412 |
-
'
|
| 413 |
[
|
| 414 |
-
'
|
| 415 |
-
'
|
| 416 |
-
'
|
| 417 |
-
|
| 418 |
-
|
| 419 |
-
|
| 420 |
-
|
| 421 |
-
|
| 422 |
-
|
| 423 |
-
'name' => 'eael_caldera_form_input_field_typography',
|
| 424 |
-
'selector' => '{{WRAPPER}} .eael-caldera-form-container input.form-control, {{WRAPPER}} .eael-caldera-form-container textarea.form-control',
|
| 425 |
]
|
| 426 |
);
|
| 427 |
|
| 428 |
-
|
| 429 |
-
|
| 430 |
-
|
| 431 |
-
|
| 432 |
-
|
| 433 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 434 |
[
|
| 435 |
-
'label'
|
| 436 |
-
'
|
| 437 |
-
|
| 438 |
-
|
| 439 |
-
|
| 440 |
-
|
| 441 |
-
'eael_caldera_form_submit_btn_width',
|
| 442 |
-
[
|
| 443 |
-
'label' => esc_html__( 'Button Width', 'essential-addons-elementor' ),
|
| 444 |
-
'type' => Controls_Manager::SLIDER,
|
| 445 |
-
'size_units' => [ 'px', 'em', '%' ],
|
| 446 |
-
'range' => [
|
| 447 |
-
'px' => [
|
| 448 |
-
'min' => 10,
|
| 449 |
-
'max' => 1500,
|
| 450 |
-
],
|
| 451 |
-
'em' => [
|
| 452 |
-
'min' => 1,
|
| 453 |
-
'max' => 80,
|
| 454 |
-
],
|
| 455 |
-
],
|
| 456 |
-
'selectors' => [
|
| 457 |
-
'{{WRAPPER}} .eael-caldera-form-container input[type="submit"]' => 'width: {{SIZE}}{{UNIT}};',
|
| 458 |
-
],
|
| 459 |
-
]
|
| 460 |
-
);
|
| 461 |
-
|
| 462 |
-
$this->add_responsive_control(
|
| 463 |
-
'eael_caldera_form_submit_btn_alignment',
|
| 464 |
-
[
|
| 465 |
-
'label' => esc_html__( 'Button Alignment', 'essential-addons-elementor' ),
|
| 466 |
-
'type' => Controls_Manager::CHOOSE,
|
| 467 |
-
'label_block' => true,
|
| 468 |
-
'options' => [
|
| 469 |
-
'default' => [
|
| 470 |
-
'title' => __( 'Default', 'essential-addons-elementor' ),
|
| 471 |
-
'icon' => 'fa fa-ban',
|
| 472 |
-
],
|
| 473 |
-
'left' => [
|
| 474 |
-
'title' => esc_html__( 'Left', 'essential-addons-elementor' ),
|
| 475 |
-
'icon' => 'fa fa-align-left',
|
| 476 |
],
|
| 477 |
-
'center'
|
| 478 |
-
'title'
|
| 479 |
-
'icon'
|
| 480 |
],
|
| 481 |
-
'right'
|
| 482 |
-
'title'
|
| 483 |
-
'icon'
|
| 484 |
],
|
| 485 |
],
|
| 486 |
-
'default'
|
| 487 |
-
'prefix_class'
|
|
|
|
|
|
|
|
|
|
| 488 |
]
|
| 489 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 490 |
|
| 491 |
$this->add_group_control(
|
| 492 |
-
|
| 493 |
[
|
| 494 |
-
|
| 495 |
-
'
|
| 496 |
-
'
|
|
|
|
|
|
|
| 497 |
]
|
| 498 |
);
|
| 499 |
|
| 500 |
-
$this->
|
| 501 |
-
'
|
| 502 |
[
|
| 503 |
-
'label'
|
| 504 |
-
'type'
|
| 505 |
-
'size_units'
|
| 506 |
-
'selectors'
|
| 507 |
-
'{{WRAPPER}} .eael-caldera-form-
|
| 508 |
],
|
| 509 |
]
|
| 510 |
);
|
| 511 |
|
| 512 |
-
|
| 513 |
$this->add_responsive_control(
|
| 514 |
-
'
|
| 515 |
[
|
| 516 |
-
'label'
|
| 517 |
-
'type'
|
| 518 |
-
'size_units'
|
| 519 |
-
'selectors'
|
| 520 |
-
'{{WRAPPER}} .eael-caldera-form-
|
| 521 |
],
|
| 522 |
]
|
| 523 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 524 |
|
| 525 |
-
|
| 526 |
-
|
| 527 |
-
$this->start_controls_tabs( 'eael_caldera_form_submit_button_tabs' );
|
| 528 |
-
|
| 529 |
-
$this->start_controls_tab( 'normal', [ 'label' => esc_html__( 'Normal', 'essential-addons-elementor' ) ] );
|
| 530 |
-
|
| 531 |
-
$this->add_control(
|
| 532 |
-
'eael_caldera_form_submit_btn_text_color',
|
| 533 |
-
[
|
| 534 |
-
'label' => esc_html__( 'Text Color', 'essential-addons-elementor' ),
|
| 535 |
-
'type' => Controls_Manager::COLOR,
|
| 536 |
-
'default' => '#fff',
|
| 537 |
-
'selectors' => [
|
| 538 |
-
'{{WRAPPER}} .eael-caldera-form-container input[type="submit"]' => 'color: {{VALUE}};',
|
| 539 |
-
],
|
| 540 |
-
]
|
| 541 |
-
);
|
| 542 |
-
|
| 543 |
-
|
| 544 |
-
|
| 545 |
-
$this->add_control(
|
| 546 |
-
'eael_caldera_form_submit_btn_background_color',
|
| 547 |
[
|
| 548 |
-
'
|
| 549 |
-
'
|
| 550 |
-
'
|
| 551 |
-
'selectors' => [
|
| 552 |
-
'{{WRAPPER}} .eael-caldera-form-container input[type="submit"]' => 'background-color: {{VALUE}};',
|
| 553 |
-
],
|
| 554 |
]
|
| 555 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 556 |
|
| 557 |
$this->add_group_control(
|
| 558 |
Group_Control_Border::get_type(),
|
| 559 |
[
|
| 560 |
-
'name'
|
| 561 |
-
'
|
|
|
|
|
|
|
|
|
|
| 562 |
]
|
| 563 |
);
|
| 564 |
-
|
| 565 |
-
|
| 566 |
-
|
| 567 |
-
|
| 568 |
-
|
| 569 |
-
|
| 570 |
-
|
| 571 |
-
|
| 572 |
-
|
| 573 |
-
|
| 574 |
-
|
| 575 |
-
|
| 576 |
-
|
| 577 |
-
|
| 578 |
-
|
| 579 |
-
|
| 580 |
-
|
| 581 |
-
|
| 582 |
-
|
| 583 |
-
|
| 584 |
-
|
| 585 |
-
|
| 586 |
-
|
| 587 |
-
|
| 588 |
-
|
| 589 |
-
|
| 590 |
-
|
| 591 |
-
|
| 592 |
-
|
| 593 |
-
|
|
|
|
| 594 |
],
|
| 595 |
-
|
| 596 |
-
|
| 597 |
-
|
| 598 |
-
|
| 599 |
-
|
| 600 |
-
|
| 601 |
-
|
| 602 |
-
|
| 603 |
-
|
| 604 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 605 |
],
|
| 606 |
-
|
| 607 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 608 |
|
| 609 |
-
$this->
|
| 610 |
-
|
| 611 |
[
|
| 612 |
-
'
|
| 613 |
-
'
|
| 614 |
-
'
|
| 615 |
-
|
| 616 |
-
],
|
| 617 |
]
|
| 618 |
);
|
|
|
|
|
|
|
| 619 |
|
| 620 |
-
|
| 621 |
|
| 622 |
-
|
| 623 |
-
|
| 624 |
-
|
| 625 |
-
|
| 626 |
-
|
| 627 |
-
|
| 628 |
-
'name' => 'eael_caldera_form_submit_btn_box_shadow',
|
| 629 |
-
'selector' => '{{WRAPPER}} .eael-caldera-form-container input[type="submit"]',
|
| 630 |
]
|
| 631 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 632 |
|
| 633 |
-
|
| 634 |
-
$this->end_controls_section();
|
| 635 |
-
|
| 636 |
-
|
| 637 |
-
}
|
| 638 |
-
|
| 639 |
-
|
| 640 |
-
protected function render( ) {
|
| 641 |
-
|
| 642 |
-
$settings = $this->get_settings();
|
| 643 |
-
|
| 644 |
-
?>
|
| 645 |
-
<?php if ( ! empty( $settings['eael_caldera_form'] ) ) : ?>
|
| 646 |
-
<div class="eael-caldera-form-container">
|
| 647 |
-
<?php echo do_shortcode( '[caldera_form id="' . $settings['eael_caldera_form'] . '" ]' ); ?>
|
| 648 |
-
</div>
|
| 649 |
-
<?php endif; ?>
|
| 650 |
-
|
| 651 |
-
<?php
|
| 652 |
-
|
| 653 |
-
}
|
| 654 |
-
|
| 655 |
-
protected function content_template() {''
|
| 656 |
-
|
| 657 |
-
?>
|
| 658 |
-
|
| 659 |
-
|
| 660 |
-
<?php
|
| 661 |
-
}
|
| 662 |
}
|
| 663 |
|
| 664 |
-
|
| 665 |
-
Plugin::instance()->widgets_manager->register_widget_type( new Widget_Eael_Caldera_Form() );
|
| 1 |
<?php
|
| 2 |
namespace Elementor;
|
| 3 |
|
| 4 |
+
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
|
|
|
| 5 |
|
| 6 |
class Widget_Eael_Caldera_Form extends Widget_Base {
|
| 7 |
+
|
| 8 |
+
public function get_name() {
|
| 9 |
+
return 'eael-caldera-form';
|
| 10 |
+
}
|
| 11 |
+
|
| 12 |
+
public function get_title() {
|
| 13 |
+
return __( 'EA Caldera Forms', 'essential-addons-elementor' );
|
| 14 |
+
}
|
| 15 |
+
|
| 16 |
+
public function get_categories() {
|
| 17 |
+
return [ 'essential-addons-elementor' ];
|
| 18 |
+
}
|
| 19 |
+
|
| 20 |
+
public function get_icon() {
|
| 21 |
+
return 'fa fa-envelope-o';
|
| 22 |
+
}
|
| 23 |
+
|
| 24 |
+
protected function _register_controls() {
|
| 25 |
+
|
| 26 |
+
/*-----------------------------------------------------------------------------------*/
|
| 27 |
+
/* Content Tab
|
| 28 |
+
/*-----------------------------------------------------------------------------------*/
|
| 29 |
+
|
| 30 |
+
/**
|
| 31 |
+
* Content Tab: Caldera Forms
|
| 32 |
+
* -------------------------------------------------
|
| 33 |
+
*/
|
| 34 |
+
$this->start_controls_section(
|
| 35 |
+
'section_info_box',
|
| 36 |
+
[
|
| 37 |
+
'label' => __( 'Caldera Forms', 'essential-addons-elementor' ),
|
| 38 |
+
]
|
| 39 |
+
);
|
| 40 |
+
|
| 41 |
$this->add_control(
|
| 42 |
+
'contact_form_list',
|
| 43 |
[
|
| 44 |
+
'label' => esc_html__( 'Caldera Form', 'essential-addons-elementor' ),
|
| 45 |
+
'type' => Controls_Manager::SELECT,
|
| 46 |
+
'label_block' => true,
|
| 47 |
+
'options' => eael_select_caldera_form(),
|
| 48 |
+
'default' => '0',
|
| 49 |
]
|
| 50 |
);
|
| 51 |
+
|
| 52 |
+
$this->add_control(
|
| 53 |
+
'custom_title_description',
|
| 54 |
+
[
|
| 55 |
+
'label' => __( 'Custom Title & Description', 'essential-addons-elementor' ),
|
| 56 |
+
'type' => Controls_Manager::SWITCHER,
|
| 57 |
+
'label_on' => __( 'Yes', 'essential-addons-elementor' ),
|
| 58 |
+
'label_off' => __( 'No', 'essential-addons-elementor' ),
|
| 59 |
+
'return_value' => 'yes',
|
| 60 |
+
]
|
| 61 |
+
);
|
| 62 |
+
|
| 63 |
+
$this->add_control(
|
| 64 |
+
'form_title_custom',
|
| 65 |
[
|
| 66 |
+
'label' => esc_html__( 'Title', 'essential-addons-elementor' ),
|
| 67 |
+
'type' => Controls_Manager::TEXT,
|
| 68 |
+
'label_block' => true,
|
| 69 |
+
'default' => '',
|
| 70 |
+
'condition' => [
|
| 71 |
+
'custom_title_description' => 'yes',
|
| 72 |
+
],
|
| 73 |
]
|
| 74 |
);
|
| 75 |
+
|
| 76 |
+
$this->add_control(
|
| 77 |
+
'form_description_custom',
|
| 78 |
+
[
|
| 79 |
+
'label' => esc_html__( 'Description', 'essential-addons-elementor' ),
|
| 80 |
+
'type' => Controls_Manager::TEXTAREA,
|
| 81 |
+
'default' => '',
|
| 82 |
+
'condition' => [
|
| 83 |
+
'custom_title_description' => 'yes',
|
| 84 |
+
],
|
| 85 |
+
]
|
| 86 |
+
);
|
| 87 |
+
|
| 88 |
+
$this->add_control(
|
| 89 |
+
'labels_switch',
|
| 90 |
+
[
|
| 91 |
+
'label' => __( 'Labels', 'essential-addons-elementor' ),
|
| 92 |
+
'type' => Controls_Manager::SWITCHER,
|
| 93 |
+
'default' => 'yes',
|
| 94 |
+
'label_on' => __( 'Show', 'essential-addons-elementor' ),
|
| 95 |
+
'label_off' => __( 'Hide', 'essential-addons-elementor' ),
|
| 96 |
+
'return_value' => 'yes',
|
| 97 |
+
'prefix_class' => 'eael-caldera-form-labels-',
|
| 98 |
+
]
|
| 99 |
+
);
|
| 100 |
+
|
| 101 |
+
$this->add_control(
|
| 102 |
+
'placeholder_switch',
|
| 103 |
+
[
|
| 104 |
+
'label' => __( 'Placeholder', 'essential-addons-elementor' ),
|
| 105 |
+
'type' => Controls_Manager::SWITCHER,
|
| 106 |
+
'default' => 'yes',
|
| 107 |
+
'label_on' => __( 'Show', 'essential-addons-elementor' ),
|
| 108 |
+
'label_off' => __( 'Hide', 'essential-addons-elementor' ),
|
| 109 |
+
'return_value' => 'yes',
|
| 110 |
+
]
|
| 111 |
+
);
|
| 112 |
+
|
| 113 |
+
$this->end_controls_section();
|
| 114 |
+
|
| 115 |
+
/**
|
| 116 |
+
* Content Tab: Errors
|
| 117 |
+
* -------------------------------------------------
|
| 118 |
+
*/
|
| 119 |
+
$this->start_controls_section(
|
| 120 |
+
'section_errors',
|
| 121 |
+
[
|
| 122 |
+
'label' => __( 'Errors', 'essential-addons-elementor' ),
|
| 123 |
+
]
|
| 124 |
+
);
|
| 125 |
+
|
| 126 |
+
$this->add_control(
|
| 127 |
+
'error_messages',
|
| 128 |
+
[
|
| 129 |
+
'label' => __( 'Error Messages', 'essential-addons-elementor' ),
|
| 130 |
+
'type' => Controls_Manager::SELECT,
|
| 131 |
+
'default' => 'show',
|
| 132 |
+
'options' => [
|
| 133 |
+
'show' => __( 'Show', 'essential-addons-elementor' ),
|
| 134 |
+
'hide' => __( 'Hide', 'essential-addons-elementor' ),
|
| 135 |
+
],
|
| 136 |
+
'selectors_dictionary' => [
|
| 137 |
+
'show' => 'block',
|
| 138 |
+
'hide' => 'none',
|
| 139 |
+
],
|
| 140 |
+
'selectors' => [
|
| 141 |
+
'{{WRAPPER}} .eael-caldera-form .has-error .parsley-required' => 'display: {{VALUE}} !important;',
|
| 142 |
+
],
|
| 143 |
+
]
|
| 144 |
+
);
|
| 145 |
+
|
| 146 |
+
$this->end_controls_section();
|
| 147 |
+
|
| 148 |
+
/*-----------------------------------------------------------------------------------*/
|
| 149 |
+
/* Style Tab
|
| 150 |
+
/*-----------------------------------------------------------------------------------*/
|
| 151 |
+
|
| 152 |
+
/**
|
| 153 |
+
* Style Tab: Form Title & Description
|
| 154 |
+
* -------------------------------------------------
|
| 155 |
+
*/
|
| 156 |
+
$this->start_controls_section(
|
| 157 |
+
'section_form_title_style',
|
| 158 |
+
[
|
| 159 |
+
'label' => __( 'Title & Description', 'essential-addons-elementor' ),
|
| 160 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
| 161 |
+
'condition' => [
|
| 162 |
+
'custom_title_description' => 'yes',
|
| 163 |
+
],
|
| 164 |
+
]
|
| 165 |
+
);
|
| 166 |
+
|
| 167 |
+
$this->add_responsive_control(
|
| 168 |
+
'heading_alignment',
|
| 169 |
+
[
|
| 170 |
+
'label' => __( 'Alignment', 'essential-addons-elementor' ),
|
| 171 |
+
'type' => Controls_Manager::CHOOSE,
|
| 172 |
+
'options' => [
|
| 173 |
+
'left' => [
|
| 174 |
+
'title' => __( 'Left', 'essential-addons-elementor' ),
|
| 175 |
+
'icon' => 'fa fa-align-left',
|
| 176 |
+
],
|
| 177 |
+
'center' => [
|
| 178 |
+
'title' => __( 'Center', 'essential-addons-elementor' ),
|
| 179 |
+
'icon' => 'fa fa-align-center',
|
| 180 |
+
],
|
| 181 |
+
'right' => [
|
| 182 |
+
'title' => __( 'Right', 'essential-addons-elementor' ),
|
| 183 |
+
'icon' => 'fa fa-align-right',
|
| 184 |
+
],
|
| 185 |
+
],
|
| 186 |
+
'default' => '',
|
| 187 |
+
'selectors' => [
|
| 188 |
+
'{{WRAPPER}} .eael-caldera-form-heading' => 'text-align: {{VALUE}};',
|
| 189 |
+
],
|
| 190 |
+
'condition' => [
|
| 191 |
+
'custom_title_description' => 'yes',
|
| 192 |
+
],
|
| 193 |
+
]
|
| 194 |
+
);
|
| 195 |
+
|
| 196 |
+
$this->add_control(
|
| 197 |
+
'title_heading',
|
| 198 |
+
[
|
| 199 |
+
'label' => __( 'Title', 'essential-addons-elementor' ),
|
| 200 |
+
'type' => Controls_Manager::HEADING,
|
| 201 |
+
'separator' => 'before',
|
| 202 |
+
'condition' => [
|
| 203 |
+
'custom_title_description' => 'yes',
|
| 204 |
+
],
|
| 205 |
+
]
|
| 206 |
+
);
|
| 207 |
+
|
| 208 |
+
$this->add_control(
|
| 209 |
+
'form_title_text_color',
|
| 210 |
+
[
|
| 211 |
+
'label' => __( 'Text Color', 'essential-addons-elementor' ),
|
| 212 |
+
'type' => Controls_Manager::COLOR,
|
| 213 |
+
'default' => '',
|
| 214 |
+
'selectors' => [
|
| 215 |
+
'{{WRAPPER}} .eael-contact-form-title' => 'color: {{VALUE}}',
|
| 216 |
+
],
|
| 217 |
+
'condition' => [
|
| 218 |
+
'custom_title_description' => 'yes',
|
| 219 |
+
],
|
| 220 |
+
]
|
| 221 |
+
);
|
| 222 |
+
|
| 223 |
+
$this->add_group_control(
|
| 224 |
+
Group_Control_Typography::get_type(),
|
| 225 |
+
[
|
| 226 |
+
'name' => 'form_title_typography',
|
| 227 |
+
'label' => __( 'Typography', 'essential-addons-elementor' ),
|
| 228 |
+
'selector' => '{{WRAPPER}} .eael-contact-form-title',
|
| 229 |
+
'condition' => [
|
| 230 |
+
'custom_title_description' => 'yes',
|
| 231 |
+
],
|
| 232 |
+
]
|
| 233 |
+
);
|
| 234 |
+
|
| 235 |
+
$this->add_responsive_control(
|
| 236 |
+
'form_title_margin',
|
| 237 |
+
[
|
| 238 |
+
'label' => __( 'Margin', 'essential-addons-elementor' ),
|
| 239 |
+
'type' => Controls_Manager::DIMENSIONS,
|
| 240 |
+
'size_units' => [ 'px', 'em', '%' ],
|
| 241 |
+
'allowed_dimensions' => 'vertical',
|
| 242 |
+
'placeholder' => [
|
| 243 |
+
'top' => '',
|
| 244 |
+
'right' => 'auto',
|
| 245 |
+
'bottom' => '',
|
| 246 |
+
'left' => 'auto',
|
| 247 |
+
],
|
| 248 |
+
'selectors' => [
|
| 249 |
+
'{{WRAPPER}} .eael-contact-form-title' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
| 250 |
+
],
|
| 251 |
+
'condition' => [
|
| 252 |
+
'custom_title_description' => 'yes',
|
| 253 |
+
],
|
| 254 |
+
]
|
| 255 |
+
);
|
| 256 |
+
|
| 257 |
+
$this->add_control(
|
| 258 |
+
'description_heading',
|
| 259 |
+
[
|
| 260 |
+
'label' => __( 'Description', 'essential-addons-elementor' ),
|
| 261 |
+
'type' => Controls_Manager::HEADING,
|
| 262 |
+
'separator' => 'before',
|
| 263 |
+
'condition' => [
|
| 264 |
+
'custom_title_description' => 'yes',
|
| 265 |
+
],
|
| 266 |
+
]
|
| 267 |
+
);
|
| 268 |
+
|
| 269 |
+
$this->add_control(
|
| 270 |
+
'form_description_text_color',
|
| 271 |
+
[
|
| 272 |
+
'label' => __( 'Text Color', 'essential-addons-elementor' ),
|
| 273 |
+
'type' => Controls_Manager::COLOR,
|
| 274 |
+
'default' => '',
|
| 275 |
+
'selectors' => [
|
| 276 |
+
'{{WRAPPER}} .eael-contact-form-description' => 'color: {{VALUE}}',
|
| 277 |
+
],
|
| 278 |
+
'condition' => [
|
| 279 |
+
'custom_title_description' => 'yes',
|
| 280 |
+
],
|
| 281 |
+
]
|
| 282 |
+
);
|
| 283 |
+
|
| 284 |
+
$this->add_group_control(
|
| 285 |
+
Group_Control_Typography::get_type(),
|
| 286 |
+
[
|
| 287 |
+
'name' => 'form_description_typography',
|
| 288 |
+
'label' => __( 'Typography', 'essential-addons-elementor' ),
|
| 289 |
+
'scheme' => Scheme_Typography::TYPOGRAPHY_4,
|
| 290 |
+
'selector' => '{{WRAPPER}} .eael-contact-form-description',
|
| 291 |
+
'condition' => [
|
| 292 |
+
'custom_title_description' => 'yes',
|
| 293 |
+
],
|
| 294 |
+
]
|
| 295 |
+
);
|
| 296 |
+
|
| 297 |
+
$this->add_responsive_control(
|
| 298 |
+
'form_description_margin',
|
| 299 |
+
[
|
| 300 |
+
'label' => __( 'Margin', 'essential-addons-elementor' ),
|
| 301 |
+
'type' => Controls_Manager::DIMENSIONS,
|
| 302 |
+
'size_units' => [ 'px', 'em', '%' ],
|
| 303 |
+
'allowed_dimensions' => 'vertical',
|
| 304 |
+
'placeholder' => [
|
| 305 |
+
'top' => '',
|
| 306 |
+
'right' => 'auto',
|
| 307 |
+
'bottom' => '',
|
| 308 |
+
'left' => 'auto',
|
| 309 |
+
],
|
| 310 |
+
'selectors' => [
|
| 311 |
+
'{{WRAPPER}} .eael-contact-form-description' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
| 312 |
+
],
|
| 313 |
+
'condition' => [
|
| 314 |
+
'custom_title_description' => 'yes',
|
| 315 |
+
],
|
| 316 |
+
]
|
| 317 |
+
);
|
| 318 |
+
|
| 319 |
+
$this->end_controls_section();
|
| 320 |
+
|
| 321 |
+
/**
|
| 322 |
+
* Style Tab: Form Container
|
| 323 |
+
* -------------------------------------------------
|
| 324 |
+
*/
|
| 325 |
+
$this->start_controls_section(
|
| 326 |
+
'section_container_style',
|
| 327 |
+
[
|
| 328 |
+
'label' => __( 'Form Container', 'essential-addons-elementor' ),
|
| 329 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
| 330 |
+
]
|
| 331 |
+
);
|
| 332 |
|
| 333 |
$this->add_control(
|
| 334 |
+
'eael_contact_form_background',
|
| 335 |
[
|
| 336 |
'label' => esc_html__( 'Form Background Color', 'essential-addons-elementor' ),
|
| 337 |
'type' => Controls_Manager::COLOR,
|
| 338 |
'selectors' => [
|
| 339 |
+
'{{WRAPPER}} .eael-contact-form' => 'background: {{VALUE}};',
|
| 340 |
],
|
| 341 |
]
|
| 342 |
);
|
| 343 |
+
|
| 344 |
$this->add_responsive_control(
|
| 345 |
+
'eael_contact_form_alignment',
|
| 346 |
[
|
| 347 |
'label' => esc_html__( 'Form Alignment', 'essential-addons-elementor' ),
|
| 348 |
'type' => Controls_Manager::CHOOSE,
|
| 354 |
],
|
| 355 |
'left' => [
|
| 356 |
'title' => esc_html__( 'Left', 'essential-addons-elementor' ),
|
| 357 |
+
'icon' => 'eicon-h-align-left',
|
| 358 |
],
|
| 359 |
'center' => [
|
| 360 |
'title' => esc_html__( 'Center', 'essential-addons-elementor' ),
|
| 361 |
+
'icon' => 'eicon-h-align-center',
|
| 362 |
],
|
| 363 |
'right' => [
|
| 364 |
'title' => esc_html__( 'Right', 'essential-addons-elementor' ),
|
| 365 |
+
'icon' => 'eicon-h-align-right',
|
| 366 |
],
|
| 367 |
],
|
| 368 |
'default' => 'default',
|
|
|
|
| 369 |
]
|
| 370 |
);
|
| 371 |
|
| 372 |
$this->add_responsive_control(
|
| 373 |
+
'eael_contact_form_width',
|
| 374 |
[
|
| 375 |
'label' => esc_html__( 'Form Width', 'essential-addons-elementor' ),
|
| 376 |
'type' => Controls_Manager::SLIDER,
|
| 386 |
],
|
| 387 |
],
|
| 388 |
'selectors' => [
|
| 389 |
+
'{{WRAPPER}} .eael-contact-form' => 'width: {{SIZE}}{{UNIT}};',
|
| 390 |
],
|
| 391 |
]
|
| 392 |
);
|
| 393 |
|
| 394 |
$this->add_responsive_control(
|
| 395 |
+
'eael_contact_form_max_width',
|
| 396 |
[
|
| 397 |
'label' => esc_html__( 'Form Max Width', 'essential-addons-elementor' ),
|
| 398 |
'type' => Controls_Manager::SLIDER,
|
| 408 |
],
|
| 409 |
],
|
| 410 |
'selectors' => [
|
| 411 |
+
'{{WRAPPER}} .eael-contact-form' => 'max-width: {{SIZE}}{{UNIT}};',
|
| 412 |
],
|
| 413 |
]
|
| 414 |
);
|
| 415 |
+
|
| 416 |
+
|
| 417 |
$this->add_responsive_control(
|
| 418 |
+
'eael_contact_form_margin',
|
| 419 |
[
|
| 420 |
'label' => esc_html__( 'Form Margin', 'essential-addons-elementor' ),
|
| 421 |
'type' => Controls_Manager::DIMENSIONS,
|
| 422 |
'size_units' => [ 'px', 'em', '%' ],
|
| 423 |
'selectors' => [
|
| 424 |
+
'{{WRAPPER}} .eael-contact-form' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
| 425 |
],
|
| 426 |
]
|
| 427 |
+
);
|
| 428 |
+
|
| 429 |
$this->add_responsive_control(
|
| 430 |
+
'eael_contact_form_padding',
|
| 431 |
[
|
| 432 |
'label' => esc_html__( 'Form Padding', 'essential-addons-elementor' ),
|
| 433 |
'type' => Controls_Manager::DIMENSIONS,
|
| 434 |
'size_units' => [ 'px', 'em', '%' ],
|
| 435 |
'selectors' => [
|
| 436 |
+
'{{WRAPPER}} .eael-contact-form' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
| 437 |
],
|
| 438 |
]
|
| 439 |
);
|
| 440 |
+
|
| 441 |
+
|
| 442 |
$this->add_control(
|
| 443 |
+
'eael_contact_form_border_radius',
|
| 444 |
[
|
| 445 |
'label' => esc_html__( 'Border Radius', 'essential-addons-elementor' ),
|
| 446 |
'type' => Controls_Manager::DIMENSIONS,
|
| 447 |
'separator' => 'before',
|
| 448 |
'size_units' => [ 'px' ],
|
| 449 |
'selectors' => [
|
| 450 |
+
'{{WRAPPER}} .eael-contact-form' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
| 451 |
],
|
| 452 |
]
|
| 453 |
);
|
| 454 |
+
|
| 455 |
+
|
| 456 |
$this->add_group_control(
|
| 457 |
Group_Control_Border::get_type(),
|
| 458 |
[
|
| 459 |
+
'name' => 'eael_contact_form_border',
|
| 460 |
+
'selector' => '{{WRAPPER}} .eael-contact-form',
|
| 461 |
]
|
| 462 |
);
|
| 463 |
+
|
| 464 |
+
|
| 465 |
$this->add_group_control(
|
| 466 |
Group_Control_Box_Shadow::get_type(),
|
| 467 |
[
|
| 468 |
+
'name' => 'eael_contact_form_box_shadow',
|
| 469 |
+
'selector' => '{{WRAPPER}} .eael-contact-form',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 470 |
]
|
| 471 |
);
|
| 472 |
|
| 473 |
+
$this->end_controls_section();
|
| 474 |
+
|
| 475 |
+
/**
|
| 476 |
+
* Style Tab: Labels
|
| 477 |
+
* -------------------------------------------------
|
| 478 |
+
*/
|
| 479 |
+
$this->start_controls_section(
|
| 480 |
+
'section_label_style',
|
| 481 |
+
[
|
| 482 |
+
'label' => __( 'Labels', 'essential-addons-elementor' ),
|
| 483 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
| 484 |
+
]
|
| 485 |
+
);
|
| 486 |
+
|
| 487 |
+
$this->add_control(
|
| 488 |
+
'text_color_label',
|
| 489 |
+
[
|
| 490 |
+
'label' => __( 'Text Color', 'essential-addons-elementor' ),
|
| 491 |
+
'type' => Controls_Manager::COLOR,
|
| 492 |
+
'selectors' => [
|
| 493 |
+
'{{WRAPPER}} .eael-caldera-form .form-group label' => 'color: {{VALUE}}',
|
| 494 |
+
],
|
| 495 |
+
]
|
| 496 |
+
);
|
| 497 |
+
|
| 498 |
+
$this->add_group_control(
|
| 499 |
+
Group_Control_Typography::get_type(),
|
| 500 |
+
[
|
| 501 |
+
'name' => 'typography_label',
|
| 502 |
+
'label' => __( 'Typography', 'essential-addons-elementor' ),
|
| 503 |
+
'selector' => '{{WRAPPER}} .eael-caldera-form .form-group label',
|
| 504 |
+
]
|
| 505 |
+
);
|
| 506 |
+
|
| 507 |
+
$this->end_controls_section();
|
| 508 |
+
|
| 509 |
+
/**
|
| 510 |
+
* Style Tab: Input & Textarea
|
| 511 |
+
* -------------------------------------------------
|
| 512 |
+
*/
|
| 513 |
+
$this->start_controls_section(
|
| 514 |
+
'section_fields_style',
|
| 515 |
+
[
|
| 516 |
+
'label' => __( 'Input & Textarea', 'essential-addons-elementor' ),
|
| 517 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
| 518 |
+
]
|
| 519 |
+
);
|
| 520 |
+
|
| 521 |
+
$this->add_responsive_control(
|
| 522 |
+
'input_alignment',
|
| 523 |
+
[
|
| 524 |
+
'label' => __( 'Alignment', 'essential-addons-elementor' ),
|
| 525 |
+
'type' => Controls_Manager::CHOOSE,
|
| 526 |
+
'options' => [
|
| 527 |
+
'left' => [
|
| 528 |
+
'title' => __( 'Left', 'essential-addons-elementor' ),
|
| 529 |
+
'icon' => 'fa fa-align-left',
|
| 530 |
],
|
| 531 |
+
'center' => [
|
| 532 |
+
'title' => __( 'Center', 'essential-addons-elementor' ),
|
| 533 |
+
'icon' => 'fa fa-align-center',
|
| 534 |
],
|
| 535 |
+
'right' => [
|
| 536 |
+
'title' => __( 'Right', 'essential-addons-elementor' ),
|
| 537 |
+
'icon' => 'fa fa-align-right',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 538 |
],
|
| 539 |
],
|
| 540 |
+
'default' => '',
|
| 541 |
+
'selectors' => [
|
| 542 |
+
'{{WRAPPER}} .eael-caldera-form input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]), {{WRAPPER}} .eael-caldera-form .form-group textarea, {{WRAPPER}} .eael-caldera-form .form-group select' => 'text-align: {{VALUE}};',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 543 |
],
|
| 544 |
]
|
| 545 |
);
|
| 546 |
|
| 547 |
+
$this->start_controls_tabs( 'tabs_fields_style' );
|
| 548 |
+
|
| 549 |
+
$this->start_controls_tab(
|
| 550 |
+
'tab_fields_normal',
|
| 551 |
+
[
|
| 552 |
+
'label' => __( 'Normal', 'essential-addons-elementor' ),
|
| 553 |
+
]
|
| 554 |
+
);
|
| 555 |
+
|
| 556 |
+
$this->add_control(
|
| 557 |
+
'field_bg_color',
|
| 558 |
+
[
|
| 559 |
+
'label' => __( 'Background Color', 'essential-addons-elementor' ),
|
| 560 |
+
'type' => Controls_Manager::COLOR,
|
| 561 |
+
'default' => '',
|
| 562 |
+
'selectors' => [
|
| 563 |
+
'{{WRAPPER}} .eael-caldera-form input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]), {{WRAPPER}} .eael-caldera-form .form-group textarea, {{WRAPPER}} .eael-caldera-form .form-group select' => 'background-color: {{VALUE}}',
|
| 564 |
+
],
|
| 565 |
+
]
|
| 566 |
+
);
|
| 567 |
+
|
| 568 |
+
$this->add_control(
|
| 569 |
+
'field_text_color',
|
| 570 |
+
[
|
| 571 |
+
'label' => __( 'Text Color', 'essential-addons-elementor' ),
|
| 572 |
+
'type' => Controls_Manager::COLOR,
|
| 573 |
+
'default' => '',
|
| 574 |
+
'selectors' => [
|
| 575 |
+
'{{WRAPPER}} .eael-caldera-form input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]), {{WRAPPER}} .eael-caldera-form .form-group textarea, {{WRAPPER}} .eael-caldera-form .form-group select' => 'color: {{VALUE}}',
|
| 576 |
+
],
|
| 577 |
+
]
|
| 578 |
+
);
|
| 579 |
|
| 580 |
$this->add_group_control(
|
| 581 |
Group_Control_Border::get_type(),
|
| 582 |
[
|
| 583 |
+
'name' => 'field_border',
|
| 584 |
+
'label' => __( 'Border', 'essential-addons-elementor' ),
|
| 585 |
+
'placeholder' => '1px',
|
| 586 |
+
'default' => '1px',
|
| 587 |
+
'selector' => '{{WRAPPER}} .eael-caldera-form input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]), {{WRAPPER}} .eael-caldera-form .form-group textarea, {{WRAPPER}} .eael-caldera-form .form-group select',
|
| 588 |
+
'separator' => 'before',
|
| 589 |
]
|
| 590 |
);
|
| 591 |
|
| 592 |
+
$this->add_control(
|
| 593 |
+
'field_radius',
|
|
|
|
| 594 |
[
|
| 595 |
+
'label' => __( 'Border Radius', 'essential-addons-elementor' ),
|
| 596 |
+
'type' => Controls_Manager::DIMENSIONS,
|
| 597 |
+
'size_units' => [ 'px', 'em', '%' ],
|
| 598 |
+
'selectors' => [
|
| 599 |
+
'{{WRAPPER}} .eael-caldera-form input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]), {{WRAPPER}} .eael-caldera-form .form-group textarea, {{WRAPPER}} .eael-caldera-form .form-group select' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
| 600 |
+
],
|
| 601 |
]
|
| 602 |
);
|
| 603 |
+
|
| 604 |
+
$this->add_responsive_control(
|
| 605 |
+
'field_text_indent',
|
| 606 |
+
[
|
| 607 |
+
'label' => __( 'Text Indent', 'essential-addons-elementor' ),
|
| 608 |
+
'type' => Controls_Manager::SLIDER,
|
| 609 |
+
'range' => [
|
| 610 |
+
'px' => [
|
| 611 |
+
'min' => 0,
|
| 612 |
+
'max' => 60,
|
| 613 |
+
'step' => 1,
|
| 614 |
+
],
|
| 615 |
+
'%' => [
|
| 616 |
+
'min' => 0,
|
| 617 |
+
'max' => 30,
|
| 618 |
+
'step' => 1,
|
| 619 |
+
],
|
| 620 |
+
],
|
| 621 |
+
'size_units' => [ 'px', 'em', '%' ],
|
| 622 |
+
'selectors' => [
|
| 623 |
+
'{{WRAPPER}} .eael-caldera-form input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]), {{WRAPPER}} .eael-caldera-form .form-group textarea, {{WRAPPER}} .eael-caldera-form .form-group select' => 'text-indent: {{SIZE}}{{UNIT}}',
|
| 624 |
+
],
|
| 625 |
+
'separator' => 'before'
|
| 626 |
+
]
|
| 627 |
+
);
|
| 628 |
+
|
| 629 |
+
$this->add_responsive_control(
|
| 630 |
+
'input_width',
|
| 631 |
+
[
|
| 632 |
+
'label' => __( 'Input Width', 'essential-addons-elementor' ),
|
| 633 |
+
'type' => Controls_Manager::SLIDER,
|
| 634 |
+
'range' => [
|
| 635 |
+
'px' => [
|
| 636 |
+
'min' => 0,
|
| 637 |
+
'max' => 1200,
|
| 638 |
+
'step' => 1,
|
| 639 |
+
],
|
| 640 |
+
],
|
| 641 |
+
'size_units' => [ 'px', 'em', '%' ],
|
| 642 |
+
'selectors' => [
|
| 643 |
+
'{{WRAPPER}} .eael-caldera-form input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]), {{WRAPPER}} .eael-caldera-form .form-group select' => 'width: {{SIZE}}{{UNIT}}',
|
| 644 |
+
],
|
| 645 |
+
]
|
| 646 |
+
);
|
| 647 |
+
|
| 648 |
+
$this->add_responsive_control(
|
| 649 |
+
'input_height',
|
| 650 |
+
[
|
| 651 |
+
'label' => __( 'Input Height', 'essential-addons-elementor' ),
|
| 652 |
+
'type' => Controls_Manager::SLIDER,
|
| 653 |
+
'range' => [
|
| 654 |
+
'px' => [
|
| 655 |
+
'min' => 0,
|
| 656 |
+
'max' => 80,
|
| 657 |
+
'step' => 1,
|
| 658 |
+
],
|
| 659 |
+
],
|
| 660 |
+
'size_units' => [ 'px', 'em', '%' ],
|
| 661 |
+
'selectors' => [
|
| 662 |
+
'{{WRAPPER}} .eael-caldera-form input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]), {{WRAPPER}} .eael-caldera-form .form-group select' => 'height: {{SIZE}}{{UNIT}}',
|
| 663 |
+
],
|
| 664 |
+
]
|
| 665 |
+
);
|
| 666 |
+
|
| 667 |
+
$this->add_responsive_control(
|
| 668 |
+
'textarea_width',
|
| 669 |
+
[
|
| 670 |
+
'label' => __( 'Textarea Width', 'essential-addons-elementor' ),
|
| 671 |
+
'type' => Controls_Manager::SLIDER,
|
| 672 |
+
'range' => [
|
| 673 |
+
'px' => [
|
| 674 |
+
'min' => 0,
|
| 675 |
+
'max' => 1200,
|
| 676 |
+
'step' => 1,
|
| 677 |
+
],
|
| 678 |
+
],
|
| 679 |
+
'size_units' => [ 'px', 'em', '%' ],
|
| 680 |
+
'selectors' => [
|
| 681 |
+
'{{WRAPPER}} .eael-caldera-form .form-group textarea' => 'width: {{SIZE}}{{UNIT}}',
|
| 682 |
+
],
|
| 683 |
+
]
|
| 684 |
+
);
|
| 685 |
+
|
| 686 |
+
$this->add_responsive_control(
|
| 687 |
+
'textarea_height',
|
| 688 |
+
[
|
| 689 |
+
'label' => __( 'Textarea Height', 'essential-addons-elementor' ),
|
| 690 |
+
'type' => Controls_Manager::SLIDER,
|
| 691 |
+
'range' => [
|
| 692 |
+
'px' => [
|
| 693 |
+
'min' => 0,
|
| 694 |
+
'max' => 400,
|
| 695 |
+
'step' => 1,
|
| 696 |
+
],
|
| 697 |
+
],
|
| 698 |
+
'size_units' => [ 'px', 'em', '%' ],
|
| 699 |
+
'selectors' => [
|
| 700 |
+
'{{WRAPPER}} .eael-caldera-form .form-group textarea' => 'height: {{SIZE}}{{UNIT}}',
|
| 701 |
+
],
|
| 702 |
+
]
|
| 703 |
+
);
|
| 704 |
|
| 705 |
+
$this->add_responsive_control(
|
| 706 |
+
'field_padding',
|
| 707 |
[
|
| 708 |
+
'label' => __( 'Padding', 'essential-addons-elementor' ),
|
| 709 |
+
'type' => Controls_Manager::DIMENSIONS,
|
| 710 |
+
'size_units' => [ 'px', 'em', '%' ],
|
| 711 |
+
'selectors' => [
|
| 712 |
+
'{{WRAPPER}} .eael-caldera-form input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]), {{WRAPPER}} .eael-caldera-form .form-group textarea, {{WRAPPER}} .eael-caldera-form .form-group select' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
| 713 |
+
],
|
| 714 |
]
|
| 715 |
);
|
| 716 |
+
|
| 717 |
+
$this->add_responsive_control(
|
| 718 |
+
'field_spacing',
|
| 719 |
+
[
|
| 720 |
+
'label' => __( 'Spacing', 'essential-addons-elementor' ),
|
| 721 |
+
'type' => Controls_Manager::SLIDER,
|
| 722 |
+
'range' => [
|
| 723 |
+
'px' => [
|
| 724 |
+
'min' => 0,
|
| 725 |
+
'max' => 100,
|
| 726 |
+
'step' => 1,
|
| 727 |
+
],
|
| 728 |
+
],
|
| 729 |
+
'size_units' => [ 'px', 'em', '%' ],
|
| 730 |
+
'selectors' => [
|
| 731 |
+
'{{WRAPPER}} .eael-caldera-form .form-group' => 'margin-bottom: {{SIZE}}{{UNIT}}',
|
| 732 |
+
],
|
| 733 |
+
]
|
| 734 |
+
);
|
| 735 |
+
|
| 736 |
+
$this->add_group_control(
|
| 737 |
+
Group_Control_Typography::get_type(),
|
| 738 |
+
[
|
| 739 |
+
'name' => 'field_typography',
|
| 740 |
+
'label' => __( 'Typography', 'essential-addons-elementor' ),
|
| 741 |
+
'selector' => '{{WRAPPER}} .eael-caldera-form input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]), {{WRAPPER}} .eael-caldera-form .form-group textarea, {{WRAPPER}} .eael-caldera-form .form-group select',
|
| 742 |
+
'separator' => 'before',
|
| 743 |
+
]
|
| 744 |
+
);
|
| 745 |
|
| 746 |
$this->add_group_control(
|
| 747 |
Group_Control_Box_Shadow::get_type(),
|
| 748 |
[
|
| 749 |
+
'name' => 'field_box_shadow',
|
| 750 |
+
'selector' => '{{WRAPPER}} .eael-caldera-form input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]), {{WRAPPER}} .eael-caldera-form .form-group textarea, {{WRAPPER}} .eael-caldera-form .form-group select',
|
| 751 |
+
'separator' => 'before',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 752 |
]
|
| 753 |
);
|
| 754 |
|
| 755 |
+
$this->end_controls_tab();
|
| 756 |
+
|
| 757 |
+
$this->start_controls_tab(
|
| 758 |
+
'tab_fields_focus',
|
| 759 |
+
[
|
| 760 |
+
'label' => __( 'Focus', 'essential-addons-elementor' ),
|
| 761 |
+
]
|
| 762 |
+
);
|
| 763 |
+
|
| 764 |
+
$this->add_control(
|
| 765 |
+
'field_bg_color_focus',
|
| 766 |
+
[
|
| 767 |
+
'label' => __( 'Background Color', 'essential-addons-elementor' ),
|
| 768 |
+
'type' => Controls_Manager::COLOR,
|
| 769 |
+
'default' => '',
|
| 770 |
+
'selectors' => [
|
| 771 |
+
'{{WRAPPER}} .eael-caldera-form input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]):focus, {{WRAPPER}} .eael-caldera-form .form-group textarea:focus' => 'background-color: {{VALUE}}',
|
| 772 |
+
],
|
| 773 |
+
]
|
| 774 |
+
);
|
| 775 |
|
| 776 |
+
$this->add_group_control(
|
| 777 |
+
Group_Control_Border::get_type(),
|
|
|
|
|
|
|
|
|
|
|
|
|
| 778 |
[
|
| 779 |
+
'name' => 'focus_input_border',
|
| 780 |
+
'label' => __( 'Border', 'essential-addons-elementor' ),
|
| 781 |
+
'placeholder' => '1px',
|
| 782 |
+
'default' => '1px',
|
| 783 |
+
'selector' => '{{WRAPPER}} .eael-caldera-form input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]):focus, {{WRAPPER}} .eael-caldera-form .form-group textarea:focus',
|
| 784 |
]
|
| 785 |
);
|
| 786 |
|
| 787 |
+
$this->add_group_control(
|
| 788 |
+
Group_Control_Box_Shadow::get_type(),
|
|
|
|
| 789 |
[
|
| 790 |
+
'name' => 'focus_box_shadow',
|
| 791 |
+
'selector' => '{{WRAPPER}} .eael-caldera-form input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]):focus, {{WRAPPER}} .eael-caldera-form .form-group textarea:focus',
|
| 792 |
+
'separator' => 'before',
|
|
|
|
|
|
|
| 793 |
]
|
| 794 |
);
|
| 795 |
|
| 796 |
+
$this->end_controls_tab();
|
| 797 |
+
|
| 798 |
+
$this->end_controls_tabs();
|
| 799 |
+
|
| 800 |
+
$this->end_controls_section();
|
| 801 |
+
|
| 802 |
+
/**
|
| 803 |
+
* Style Tab: Field Description
|
| 804 |
+
* -------------------------------------------------
|
| 805 |
+
*/
|
| 806 |
+
$this->start_controls_section(
|
| 807 |
+
'section_field_description_style',
|
| 808 |
+
[
|
| 809 |
+
'label' => __( 'Field Description', 'essential-addons-elementor' ),
|
| 810 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
| 811 |
+
]
|
| 812 |
+
);
|
| 813 |
+
|
| 814 |
+
$this->add_control(
|
| 815 |
+
'field_description_text_color',
|
| 816 |
+
[
|
| 817 |
+
'label' => __( 'Text Color', 'essential-addons-elementor' ),
|
| 818 |
+
'type' => Controls_Manager::COLOR,
|
| 819 |
+
'selectors' => [
|
| 820 |
+
'{{WRAPPER}} .eael-caldera-form .help-block' => 'color: {{VALUE}}',
|
| 821 |
+
],
|
| 822 |
+
]
|
| 823 |
+
);
|
| 824 |
+
|
| 825 |
+
$this->add_group_control(
|
| 826 |
+
Group_Control_Typography::get_type(),
|
| 827 |
+
[
|
| 828 |
+
'name' => 'field_description_typography',
|
| 829 |
+
'label' => __( 'Typography', 'essential-addons-elementor' ),
|
| 830 |
+
'selector' => '{{WRAPPER}} .eael-caldera-form .help-block',
|
| 831 |
+
]
|
| 832 |
+
);
|
| 833 |
+
|
| 834 |
+
$this->add_responsive_control(
|
| 835 |
+
'field_description_spacing',
|
| 836 |
+
[
|
| 837 |
+
'label' => __( 'Spacing', 'essential-addons-elementor' ),
|
| 838 |
+
'type' => Controls_Manager::SLIDER,
|
| 839 |
+
'range' => [
|
| 840 |
+
'px' => [
|
| 841 |
+
'min' => 0,
|
| 842 |
+
'max' => 100,
|
| 843 |
+
'step' => 1,
|
| 844 |
+
],
|
| 845 |
+
],
|
| 846 |
+
'size_units' => [ 'px', 'em', '%' ],
|
| 847 |
+
'selectors' => [
|
| 848 |
+
'{{WRAPPER}} .eael-caldera-form .help-block' => 'padding-top: {{SIZE}}{{UNIT}}',
|
| 849 |
+
],
|
| 850 |
+
]
|
| 851 |
+
);
|
| 852 |
+
|
| 853 |
+
$this->end_controls_section();
|
| 854 |
+
|
| 855 |
+
/**
|
| 856 |
+
* Style Tab: Placeholder
|
| 857 |
+
* -------------------------------------------------
|
| 858 |
+
*/
|
| 859 |
+
$this->start_controls_section(
|
| 860 |
+
'section_placeholder_style',
|
| 861 |
+
[
|
| 862 |
+
'label' => __( 'Placeholder', 'essential-addons-elementor' ),
|
| 863 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
| 864 |
+
'condition' => [
|
| 865 |
+
'placeholder_switch' => 'yes',
|
| 866 |
+
],
|
| 867 |
+
]
|
| 868 |
+
);
|
| 869 |
+
|
| 870 |
+
$this->add_control(
|
| 871 |
+
'text_color_placeholder',
|
| 872 |
+
[
|
| 873 |
+
'label' => __( 'Text Color', 'essential-addons-elementor' ),
|
| 874 |
+
'type' => Controls_Manager::COLOR,
|
| 875 |
+
'selectors' => [
|
| 876 |
+
'{{WRAPPER}} .eael-caldera-form .form-group input::-webkit-input-placeholder, {{WRAPPER}} .eael-caldera-form .form-group textarea::-webkit-input-placeholder' => 'color: {{VALUE}}',
|
| 877 |
+
],
|
| 878 |
+
'condition' => [
|
| 879 |
+
'placeholder_switch' => 'yes',
|
| 880 |
+
],
|
| 881 |
+
]
|
| 882 |
+
);
|
| 883 |
+
|
| 884 |
+
$this->end_controls_section();
|
| 885 |
+
|
| 886 |
+
/**
|
| 887 |
+
* Style Tab: Radio & Checkbox
|
| 888 |
+
* -------------------------------------------------
|
| 889 |
+
*/
|
| 890 |
+
$this->start_controls_section(
|
| 891 |
+
'section_radio_checkbox_style',
|
| 892 |
+
[
|
| 893 |
+
'label' => __( 'Radio & Checkbox', 'essential-addons-elementor' ),
|
| 894 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
| 895 |
+
]
|
| 896 |
+
);
|
| 897 |
+
|
| 898 |
+
$this->add_control(
|
| 899 |
+
'custom_radio_checkbox',
|
| 900 |
+
[
|
| 901 |
+
'label' => __( 'Custom Styles', 'essential-addons-elementor' ),
|
| 902 |
+
'type' => Controls_Manager::SWITCHER,
|
| 903 |
+
'label_on' => __( 'Yes', 'essential-addons-elementor' ),
|
| 904 |
+
'label_off' => __( 'No', 'essential-addons-elementor' ),
|
| 905 |
+
'return_value' => 'yes',
|
| 906 |
+
]
|
| 907 |
+
);
|
| 908 |
+
|
| 909 |
+
$this->add_responsive_control(
|
| 910 |
+
'radio_checkbox_size',
|
| 911 |
+
[
|
| 912 |
+
'label' => __( 'Size', 'essential-addons-elementor' ),
|
| 913 |
+
'type' => Controls_Manager::SLIDER,
|
| 914 |
+
'default' => [
|
| 915 |
+
'size' => '15',
|
| 916 |
+
'unit' => 'px'
|
| 917 |
+
],
|
| 918 |
+
'range' => [
|
| 919 |
+
'px' => [
|
| 920 |
+
'min' => 0,
|
| 921 |
+
'max' => 80,
|
| 922 |
+
'step' => 1,
|
| 923 |
+
],
|
| 924 |
+
],
|
| 925 |
+
'size_units' => [ 'px', 'em', '%' ],
|
| 926 |
+
'selectors' => [
|
| 927 |
+
'{{WRAPPER}} .eael-custom-radio-checkbox input[type="checkbox"], {{WRAPPER}} .eael-custom-radio-checkbox input[type="radio"]' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}}',
|
| 928 |
+
],
|
| 929 |
+
'condition' => [
|
| 930 |
+
'custom_radio_checkbox' => 'yes',
|
| 931 |
+
],
|
| 932 |
+
]
|
| 933 |
+
);
|
| 934 |
+
|
| 935 |
+
$this->start_controls_tabs( 'tabs_radio_checkbox_style' );
|
| 936 |
+
|
| 937 |
+
$this->start_controls_tab(
|
| 938 |
+
'radio_checkbox_normal',
|
| 939 |
+
[
|
| 940 |
+
'label' => __( 'Normal', 'essential-addons-elementor' ),
|
| 941 |
+
'condition' => [
|
| 942 |
+
'custom_radio_checkbox' => 'yes',
|
| 943 |
+
],
|
| 944 |
+
]
|
| 945 |
+
);
|
| 946 |
+
|
| 947 |
+
$this->add_control(
|
| 948 |
+
'radio_checkbox_color',
|
| 949 |
+
[
|
| 950 |
+
'label' => __( 'Color', 'essential-addons-elementor' ),
|
| 951 |
+
'type' => Controls_Manager::COLOR,
|
| 952 |
+
'default' => '',
|
| 953 |
+
'selectors' => [
|
| 954 |
+
'{{WRAPPER}} .eael-custom-radio-checkbox input[type="checkbox"], {{WRAPPER}} .eael-custom-radio-checkbox input[type="radio"]' => 'background: {{VALUE}}',
|
| 955 |
+
],
|
| 956 |
+
'condition' => [
|
| 957 |
+
'custom_radio_checkbox' => 'yes',
|
| 958 |
+
],
|
| 959 |
+
]
|
| 960 |
+
);
|
| 961 |
+
|
| 962 |
+
$this->add_responsive_control(
|
| 963 |
+
'checkbox_border_width',
|
| 964 |
+
[
|
| 965 |
+
'label' => __( 'Border Width', 'essential-addons-elementor' ),
|
| 966 |
+
'type' => Controls_Manager::SLIDER,
|
| 967 |
+
'range' => [
|
| 968 |
+
'px' => [
|
| 969 |
+
'min' => 0,
|
| 970 |
+
'max' => 15,
|
| 971 |
+
'step' => 1,
|
| 972 |
+
],
|
| 973 |
+
],
|
| 974 |
+
'size_units' => [ 'px' ],
|
| 975 |
+
'selectors' => [
|
| 976 |
+
'{{WRAPPER}} .eael-custom-radio-checkbox input[type="checkbox"], {{WRAPPER}} .eael-custom-radio-checkbox input[type="radio"]' => 'border-width: {{SIZE}}{{UNIT}}',
|
| 977 |
+
],
|
| 978 |
+
'condition' => [
|
| 979 |
+
'custom_radio_checkbox' => 'yes',
|
| 980 |
+
],
|
| 981 |
+
]
|
| 982 |
+
);
|
| 983 |
+
|
| 984 |
+
$this->add_control(
|
| 985 |
+
'checkbox_border_color',
|
| 986 |
+
[
|
| 987 |
+
'label' => __( 'Border Color', 'essential-addons-elementor' ),
|
| 988 |
+
'type' => Controls_Manager::COLOR,
|
| 989 |
+
'default' => '',
|
| 990 |
+
'selectors' => [
|
| 991 |
+
'{{WRAPPER}} .eael-custom-radio-checkbox input[type="checkbox"], {{WRAPPER}} .eael-custom-radio-checkbox input[type="radio"]' => 'border-color: {{VALUE}}',
|
| 992 |
+
],
|
| 993 |
+
'condition' => [
|
| 994 |
+
'custom_radio_checkbox' => 'yes',
|
| 995 |
+
],
|
| 996 |
+
]
|
| 997 |
+
);
|
| 998 |
+
|
| 999 |
+
$this->add_control(
|
| 1000 |
+
'checkbox_heading',
|
| 1001 |
+
[
|
| 1002 |
+
'label' => __( 'Checkbox', 'essential-addons-elementor' ),
|
| 1003 |
+
'type' => Controls_Manager::HEADING,
|
| 1004 |
+
'condition' => [
|
| 1005 |
+
'custom_radio_checkbox' => 'yes',
|
| 1006 |
],
|
| 1007 |
+
]
|
| 1008 |
+
);
|
| 1009 |
|
| 1010 |
$this->add_control(
|
| 1011 |
+
'checkbox_border_radius',
|
| 1012 |
[
|
| 1013 |
+
'label' => __( 'Border Radius', 'essential-addons-elementor' ),
|
| 1014 |
+
'type' => Controls_Manager::DIMENSIONS,
|
| 1015 |
+
'size_units' => [ 'px', 'em', '%' ],
|
| 1016 |
+
'selectors' => [
|
| 1017 |
+
'{{WRAPPER}} .eael-custom-radio-checkbox input[type="checkbox"], {{WRAPPER}} .eael-custom-radio-checkbox input[type="checkbox"]:before' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
|
|
|
| 1018 |
],
|
| 1019 |
+
'condition' => [
|
| 1020 |
+
'custom_radio_checkbox' => 'yes',
|
| 1021 |
+
],
|
| 1022 |
]
|
| 1023 |
);
|
| 1024 |
+
|
| 1025 |
+
$this->add_control(
|
| 1026 |
+
'radio_heading',
|
| 1027 |
+
[
|
| 1028 |
+
'label' => __( 'Radio Buttons', 'essential-addons-elementor' ),
|
| 1029 |
+
'type' => Controls_Manager::HEADING,
|
| 1030 |
+
'condition' => [
|
| 1031 |
+
'custom_radio_checkbox' => 'yes',
|
| 1032 |
+
],
|
| 1033 |
+
]
|
| 1034 |
+
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1035 |
|
| 1036 |
$this->add_control(
|
| 1037 |
+
'radio_border_radius',
|
| 1038 |
[
|
| 1039 |
+
'label' => __( 'Border Radius', 'essential-addons-elementor' ),
|
| 1040 |
+
'type' => Controls_Manager::DIMENSIONS,
|
| 1041 |
+
'size_units' => [ 'px', 'em', '%' ],
|
| 1042 |
+
'selectors' => [
|
| 1043 |
+
'{{WRAPPER}} .eael-custom-radio-checkbox input[type="radio"], {{WRAPPER}} .eael-custom-radio-checkbox input[type="radio"]:before' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
| 1044 |
+
],
|
| 1045 |
+
'condition' => [
|
| 1046 |
+
'custom_radio_checkbox' => 'yes',
|
| 1047 |
+
],
|
|
|
|
|
|
|
| 1048 |
]
|
| 1049 |
);
|
| 1050 |
|
| 1051 |
+
$this->end_controls_tab();
|
| 1052 |
+
|
| 1053 |
+
$this->start_controls_tab(
|
| 1054 |
+
'radio_checkbox_checked',
|
| 1055 |
+
[
|
| 1056 |
+
'label' => __( 'Checked', 'essential-addons-elementor' ),
|
| 1057 |
+
'condition' => [
|
| 1058 |
+
'custom_radio_checkbox' => 'yes',
|
| 1059 |
+
],
|
| 1060 |
+
]
|
| 1061 |
+
);
|
| 1062 |
+
|
| 1063 |
+
$this->add_control(
|
| 1064 |
+
'radio_checkbox_color_checked',
|
| 1065 |
+
[
|
| 1066 |
+
'label' => __( 'Color', 'essential-addons-elementor' ),
|
| 1067 |
+
'type' => Controls_Manager::COLOR,
|
| 1068 |
+
'default' => '',
|
| 1069 |
+
'selectors' => [
|
| 1070 |
+
'{{WRAPPER}} .eael-custom-radio-checkbox input[type="checkbox"]:checked:before, {{WRAPPER}} .eael-custom-radio-checkbox input[type="radio"]:checked:before' => 'background: {{VALUE}}',
|
| 1071 |
+
],
|
| 1072 |
+
'condition' => [
|
| 1073 |
+
'custom_radio_checkbox' => 'yes',
|
| 1074 |
+
],
|
| 1075 |
+
]
|
| 1076 |
+
);
|
| 1077 |
+
|
| 1078 |
+
$this->end_controls_tab();
|
| 1079 |
+
|
| 1080 |
+
$this->end_controls_tabs();
|
| 1081 |
+
|
| 1082 |
+
$this->end_controls_section();
|
| 1083 |
+
|
| 1084 |
+
/**
|
| 1085 |
+
* Style Tab: Submit Button
|
| 1086 |
+
* -------------------------------------------------
|
| 1087 |
+
*/
|
| 1088 |
+
$this->start_controls_section(
|
| 1089 |
+
'section_submit_button_style',
|
| 1090 |
+
[
|
| 1091 |
+
'label' => __( 'Submit Button', 'essential-addons-elementor' ),
|
| 1092 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
| 1093 |
+
]
|
| 1094 |
+
);
|
| 1095 |
+
|
| 1096 |
+
$this->add_responsive_control(
|
| 1097 |
+
'button_align',
|
| 1098 |
[
|
| 1099 |
+
'label' => __( 'Alignment', 'essential-addons-elementor' ),
|
| 1100 |
+
'type' => Controls_Manager::CHOOSE,
|
| 1101 |
+
'options' => [
|
| 1102 |
+
'left' => [
|
| 1103 |
+
'title' => __( 'Left', 'essential-addons-elementor' ),
|
| 1104 |
+
'icon' => 'eicon-h-align-left',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1105 |
],
|
| 1106 |
+
'center' => [
|
| 1107 |
+
'title' => __( 'Center', 'essential-addons-elementor' ),
|
| 1108 |
+
'icon' => 'eicon-h-align-center',
|
| 1109 |
],
|
| 1110 |
+
'right' => [
|
| 1111 |
+
'title' => __( 'Right', 'essential-addons-elementor' ),
|
| 1112 |
+
'icon' => 'eicon-h-align-right',
|
| 1113 |
],
|
| 1114 |
],
|
| 1115 |
+
'default' => '',
|
| 1116 |
+
'prefix_class' => 'eael-caldera-form-button-',
|
| 1117 |
+
'condition' => [
|
| 1118 |
+
'button_width_type' => 'custom',
|
| 1119 |
+
],
|
| 1120 |
]
|
| 1121 |
);
|
| 1122 |
+
|
| 1123 |
+
$this->add_control(
|
| 1124 |
+
'button_width_type',
|
| 1125 |
+
[
|
| 1126 |
+
'label' => __( 'Width', 'essential-addons-elementor' ),
|
| 1127 |
+
'type' => Controls_Manager::SELECT,
|
| 1128 |
+
'default' => 'custom',
|
| 1129 |
+
'options' => [
|
| 1130 |
+
'full-width' => __( 'Full Width', 'essential-addons-elementor' ),
|
| 1131 |
+
'custom' => __( 'Custom', 'essential-addons-elementor' ),
|
| 1132 |
+
],
|
| 1133 |
+
'prefix_class' => 'eael-caldera-form-button-',
|
| 1134 |
+
]
|
| 1135 |
+
);
|
| 1136 |
+
|
| 1137 |
+
$this->add_responsive_control(
|
| 1138 |
+
'button_width',
|
| 1139 |
+
[
|
| 1140 |
+
'label' => __( 'Width', 'essential-addons-elementor' ),
|
| 1141 |
+
'type' => Controls_Manager::SLIDER,
|
| 1142 |
+
'range' => [
|
| 1143 |
+
'px' => [
|
| 1144 |
+
'min' => 0,
|
| 1145 |
+
'max' => 1200,
|
| 1146 |
+
'step' => 1,
|
| 1147 |
+
],
|
| 1148 |
+
],
|
| 1149 |
+
'size_units' => [ 'px', '%' ],
|
| 1150 |
+
'selectors' => [
|
| 1151 |
+
'{{WRAPPER}} .eael-caldera-form .form-group input[type="submit"], {{WRAPPER}} .eael-caldera-form .form-group input[type="button"]' => 'width: {{SIZE}}{{UNIT}}',
|
| 1152 |
+
],
|
| 1153 |
+
'condition' => [
|
| 1154 |
+
'button_width_type' => 'custom',
|
| 1155 |
+
],
|
| 1156 |
+
]
|
| 1157 |
+
);
|
| 1158 |
+
|
| 1159 |
+
$this->start_controls_tabs( 'tabs_button_style' );
|
| 1160 |
+
|
| 1161 |
+
$this->start_controls_tab(
|
| 1162 |
+
'tab_button_normal',
|
| 1163 |
+
[
|
| 1164 |
+
'label' => __( 'Normal', 'essential-addons-elementor' ),
|
| 1165 |
+
]
|
| 1166 |
+
);
|
| 1167 |
+
|
| 1168 |
+
$this->add_control(
|
| 1169 |
+
'button_bg_color_normal',
|
| 1170 |
+
[
|
| 1171 |
+
'label' => __( 'Background Color', 'essential-addons-elementor' ),
|
| 1172 |
+
'type' => Controls_Manager::COLOR,
|
| 1173 |
+
'default' => '',
|
| 1174 |
+
'selectors' => [
|
| 1175 |
+
'{{WRAPPER}} .eael-caldera-form .form-group input[type="submit"], {{WRAPPER}} .eael-caldera-form .form-group input[type="button"]' => 'background-color: {{VALUE}}',
|
| 1176 |
+
],
|
| 1177 |
+
]
|
| 1178 |
+
);
|
| 1179 |
+
|
| 1180 |
+
$this->add_control(
|
| 1181 |
+
'button_text_color_normal',
|
| 1182 |
+
[
|
| 1183 |
+
'label' => __( 'Text Color', 'essential-addons-elementor' ),
|
| 1184 |
+
'type' => Controls_Manager::COLOR,
|
| 1185 |
+
'default' => '',
|
| 1186 |
+
'selectors' => [
|
| 1187 |
+
'{{WRAPPER}} .eael-caldera-form .form-group input[type="submit"], {{WRAPPER}} .eael-caldera-form .form-group input[type="button"]' => 'color: {{VALUE}}',
|
| 1188 |
+
],
|
| 1189 |
+
]
|
| 1190 |
+
);
|
| 1191 |
|
| 1192 |
$this->add_group_control(
|
| 1193 |
+
Group_Control_Border::get_type(),
|
| 1194 |
[
|
| 1195 |
+
'name' => 'button_border_normal',
|
| 1196 |
+
'label' => __( 'Border', 'essential-addons-elementor' ),
|
| 1197 |
+
'placeholder' => '1px',
|
| 1198 |
+
'default' => '1px',
|
| 1199 |
+
'selector' => '{{WRAPPER}} .eael-caldera-form .form-group input[type="submit"], {{WRAPPER}} .eael-caldera-form .form-group input[type="button"]',
|
| 1200 |
]
|
| 1201 |
);
|
| 1202 |
|
| 1203 |
+
$this->add_control(
|
| 1204 |
+
'button_border_radius',
|
| 1205 |
[
|
| 1206 |
+
'label' => __( 'Border Radius', 'essential-addons-elementor' ),
|
| 1207 |
+
'type' => Controls_Manager::DIMENSIONS,
|
| 1208 |
+
'size_units' => [ 'px', 'em', '%' ],
|
| 1209 |
+
'selectors' => [
|
| 1210 |
+
'{{WRAPPER}} .eael-caldera-form .form-group input[type="submit"], {{WRAPPER}} .eael-caldera-form .form-group input[type="button"]' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
| 1211 |
],
|
| 1212 |
]
|
| 1213 |
);
|
| 1214 |
|
|
|
|
| 1215 |
$this->add_responsive_control(
|
| 1216 |
+
'button_padding',
|
| 1217 |
[
|
| 1218 |
+
'label' => __( 'Padding', 'essential-addons-elementor' ),
|
| 1219 |
+
'type' => Controls_Manager::DIMENSIONS,
|
| 1220 |
+
'size_units' => [ 'px', 'em', '%' ],
|
| 1221 |
+
'selectors' => [
|
| 1222 |
+
'{{WRAPPER}} .eael-caldera-form .form-group input[type="submit"], {{WRAPPER}} .eael-caldera-form .form-group input[type="button"]' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
| 1223 |
],
|
| 1224 |
]
|
| 1225 |
);
|
| 1226 |
+
|
| 1227 |
+
$this->add_responsive_control(
|
| 1228 |
+
'button_margin',
|
| 1229 |
+
[
|
| 1230 |
+
'label' => __( 'Margin Top', 'essential-addons-elementor' ),
|
| 1231 |
+
'type' => Controls_Manager::SLIDER,
|
| 1232 |
+
'range' => [
|
| 1233 |
+
'px' => [
|
| 1234 |
+
'min' => 0,
|
| 1235 |
+
'max' => 100,
|
| 1236 |
+
'step' => 1,
|
| 1237 |
+
],
|
| 1238 |
+
],
|
| 1239 |
+
'size_units' => [ 'px', 'em', '%' ],
|
| 1240 |
+
'selectors' => [
|
| 1241 |
+
'{{WRAPPER}} .eael-caldera-form .form-group input[type="submit"], {{WRAPPER}} .eael-caldera-form .form-group input[type="button"]' => 'margin-top: {{SIZE}}{{UNIT}}',
|
| 1242 |
+
],
|
| 1243 |
+
]
|
| 1244 |
+
);
|
| 1245 |
+
|
| 1246 |
+
$this->add_group_control(
|
| 1247 |
+
Group_Control_Typography::get_type(),
|
| 1248 |
+
[
|
| 1249 |
+
'name' => 'button_typography',
|
| 1250 |
+
'label' => __( 'Typography', 'essential-addons-elementor' ),
|
| 1251 |
+
'selector' => '{{WRAPPER}} .eael-caldera-form .form-group input[type="submit"], {{WRAPPER}} .eael-caldera-form .form-group input[type="button"]',
|
| 1252 |
+
'separator' => 'before',
|
| 1253 |
+
]
|
| 1254 |
+
);
|
| 1255 |
|
| 1256 |
+
$this->add_group_control(
|
| 1257 |
+
Group_Control_Box_Shadow::get_type(),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1258 |
[
|
| 1259 |
+
'name' => 'button_box_shadow',
|
| 1260 |
+
'selector' => '{{WRAPPER}} .eael-caldera-form .form-group input[type="submit"], {{WRAPPER}} .eael-caldera-form .form-group input[type="button"]',
|
| 1261 |
+
'separator' => 'before',
|
|
|
|
|
|
|
|
|
|
| 1262 |
]
|
| 1263 |
);
|
| 1264 |
+
|
| 1265 |
+
$this->end_controls_tab();
|
| 1266 |
+
|
| 1267 |
+
$this->start_controls_tab(
|
| 1268 |
+
'tab_button_hover',
|
| 1269 |
+
[
|
| 1270 |
+
'label' => __( 'Hover', 'essential-addons-elementor' ),
|
| 1271 |
+
]
|
| 1272 |
+
);
|
| 1273 |
+
|
| 1274 |
+
$this->add_control(
|
| 1275 |
+
'button_bg_color_hover',
|
| 1276 |
+
[
|
| 1277 |
+
'label' => __( 'Background Color', 'essential-addons-elementor' ),
|
| 1278 |
+
'type' => Controls_Manager::COLOR,
|
| 1279 |
+
'default' => '',
|
| 1280 |
+
'selectors' => [
|
| 1281 |
+
'{{WRAPPER}} .eael-caldera-form .form-group input[type="submit"]:hover, {{WRAPPER}} .eael-caldera-form .form-group input[type="button"]:hover' => 'background-color: {{VALUE}}',
|
| 1282 |
+
],
|
| 1283 |
+
]
|
| 1284 |
+
);
|
| 1285 |
+
|
| 1286 |
+
$this->add_control(
|
| 1287 |
+
'button_text_color_hover',
|
| 1288 |
+
[
|
| 1289 |
+
'label' => __( 'Text Color', 'essential-addons-elementor' ),
|
| 1290 |
+
'type' => Controls_Manager::COLOR,
|
| 1291 |
+
'default' => '',
|
| 1292 |
+
'selectors' => [
|
| 1293 |
+
'{{WRAPPER}} .eael-caldera-form .form-group input[type="submit"]:hover, {{WRAPPER}} .eael-caldera-form .form-group input[type="button"]:hover' => 'color: {{VALUE}}',
|
| 1294 |
+
],
|
| 1295 |
+
]
|
| 1296 |
+
);
|
| 1297 |
+
|
| 1298 |
+
$this->add_control(
|
| 1299 |
+
'button_border_color_hover',
|
| 1300 |
+
[
|
| 1301 |
+
'label' => __( 'Border Color', 'essential-addons-elementor' ),
|
| 1302 |
+
'type' => Controls_Manager::COLOR,
|
| 1303 |
+
'default' => '',
|
| 1304 |
+
'selectors' => [
|
| 1305 |
+
'{{WRAPPER}} .eael-caldera-form .form-group input[type="submit"]:hover, {{WRAPPER}} .eael-caldera-form .form-group input[type="button"]:hover' => 'border-color: {{VALUE}}',
|
| 1306 |
+
],
|
| 1307 |
+
]
|
| 1308 |
+
);
|
| 1309 |
+
|
| 1310 |
+
$this->end_controls_tab();
|
| 1311 |
+
|
| 1312 |
+
$this->end_controls_tabs();
|
| 1313 |
+
|
| 1314 |
+
$this->end_controls_section();
|
| 1315 |
+
|
| 1316 |
+
/**
|
| 1317 |
+
* Style Tab: Success Message
|
| 1318 |
+
* -------------------------------------------------
|
| 1319 |
+
*/
|
| 1320 |
+
$this->start_controls_section(
|
| 1321 |
+
'section_success_message_style',
|
| 1322 |
+
[
|
| 1323 |
+
'label' => __( 'Success Message', 'essential-addons-elementor' ),
|
| 1324 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
| 1325 |
+
]
|
| 1326 |
+
);
|
| 1327 |
+
|
| 1328 |
+
$this->add_control(
|
| 1329 |
+
'success_message_bg_color',
|
| 1330 |
+
[
|
| 1331 |
+
'label' => __( 'Background Color', 'essential-addons-elementor' ),
|
| 1332 |
+
'type' => Controls_Manager::COLOR,
|
| 1333 |
+
'selectors' => [
|
| 1334 |
+
'{{WRAPPER}} .eael-caldera-form .caldera-grid .alert-success' => 'background-color: {{VALUE}}',
|
| 1335 |
+
],
|
| 1336 |
+
]
|
| 1337 |
+
);
|
| 1338 |
+
|
| 1339 |
+
$this->add_control(
|
| 1340 |
+
'success_message_text_color',
|
| 1341 |
+
[
|
| 1342 |
+
'label' => __( 'Text Color', 'essential-addons-elementor' ),
|
| 1343 |
+
'type' => Controls_Manager::COLOR,
|
| 1344 |
+
'selectors' => [
|
| 1345 |
+
'{{WRAPPER}} .eael-caldera-form .caldera-grid .alert-success' => 'color: {{VALUE}}',
|
| 1346 |
+
],
|
| 1347 |
+
]
|
| 1348 |
+
);
|
| 1349 |
|
| 1350 |
$this->add_group_control(
|
| 1351 |
Group_Control_Border::get_type(),
|
| 1352 |
[
|
| 1353 |
+
'name' => 'success_message_border',
|
| 1354 |
+
'label' => __( 'Border', 'essential-addons-elementor' ),
|
| 1355 |
+
'placeholder' => '1px',
|
| 1356 |
+
'default' => '1px',
|
| 1357 |
+
'selector' => '{{WRAPPER}} .eael-caldera-form .caldera-grid .alert-success',
|
| 1358 |
]
|
| 1359 |
);
|
| 1360 |
+
|
| 1361 |
+
$this->add_group_control(
|
| 1362 |
+
Group_Control_Typography::get_type(),
|
| 1363 |
+
[
|
| 1364 |
+
'name' => 'success_message_typography',
|
| 1365 |
+
'label' => __( 'Typography', 'essential-addons-elementor' ),
|
| 1366 |
+
'selector' => '{{WRAPPER}} .eael-caldera-form .caldera-grid .alert-success',
|
| 1367 |
+
]
|
| 1368 |
+
);
|
| 1369 |
+
|
| 1370 |
+
$this->end_controls_section();
|
| 1371 |
+
|
| 1372 |
+
/**
|
| 1373 |
+
* Style Tab: Errors
|
| 1374 |
+
* -------------------------------------------------
|
| 1375 |
+
*/
|
| 1376 |
+
$this->start_controls_section(
|
| 1377 |
+
'section_error_style',
|
| 1378 |
+
[
|
| 1379 |
+
'label' => __( 'Errors', 'essential-addons-elementor' ),
|
| 1380 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
| 1381 |
+
]
|
| 1382 |
+
);
|
| 1383 |
+
|
| 1384 |
+
$this->add_control(
|
| 1385 |
+
'error_messages_heading',
|
| 1386 |
+
[
|
| 1387 |
+
'label' => __( 'Error Messages', 'essential-addons-elementor' ),
|
| 1388 |
+
'type' => Controls_Manager::HEADING,
|
| 1389 |
+
'condition' => [
|
| 1390 |
+
'error_messages' => 'show',
|
| 1391 |
],
|
| 1392 |
+
]
|
| 1393 |
+
);
|
| 1394 |
+
|
| 1395 |
+
$this->add_control(
|
| 1396 |
+
'error_message_text_color',
|
| 1397 |
+
[
|
| 1398 |
+
'label' => __( 'Color', 'essential-addons-elementor' ),
|
| 1399 |
+
'type' => Controls_Manager::COLOR,
|
| 1400 |
+
'default' => '',
|
| 1401 |
+
'selectors' => [
|
| 1402 |
+
'{{WRAPPER}} .eael-caldera-form .has-error .help-block' => 'color: {{VALUE}}',
|
| 1403 |
+
],
|
| 1404 |
+
'condition' => [
|
| 1405 |
+
'error_messages' => 'show',
|
| 1406 |
],
|
| 1407 |
+
]
|
| 1408 |
+
);
|
| 1409 |
+
|
| 1410 |
+
$this->add_control(
|
| 1411 |
+
'error_fields_heading',
|
| 1412 |
+
[
|
| 1413 |
+
'label' => __( 'Error Fields', 'essential-addons-elementor' ),
|
| 1414 |
+
'type' => Controls_Manager::HEADING,
|
| 1415 |
+
'separator' => 'before',
|
| 1416 |
+
]
|
| 1417 |
+
);
|
| 1418 |
+
|
| 1419 |
+
$this->add_control(
|
| 1420 |
+
'error_fields_label_color',
|
| 1421 |
+
[
|
| 1422 |
+
'label' => __( 'Label Color', 'essential-addons-elementor' ),
|
| 1423 |
+
'type' => Controls_Manager::COLOR,
|
| 1424 |
+
'default' => '',
|
| 1425 |
+
'selectors' => [
|
| 1426 |
+
'{{WRAPPER}} .eael-caldera-form .has-error .control-label' => 'color: {{VALUE}}',
|
| 1427 |
+
],
|
| 1428 |
+
]
|
| 1429 |
+
);
|
| 1430 |
|
| 1431 |
+
$this->add_group_control(
|
| 1432 |
+
Group_Control_Border::get_type(),
|
| 1433 |
[
|
| 1434 |
+
'name' => 'error_field_border',
|
| 1435 |
+
'label' => __( 'Input Border', 'essential-addons-elementor' ),
|
| 1436 |
+
'placeholder' => '1px',
|
| 1437 |
+
'default' => '1px',
|
| 1438 |
+
'selector' => '{{WRAPPER}} .eael-caldera-form .has-error input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]), {{WRAPPER}} .eael-caldera-form .has-error textarea',
|
| 1439 |
]
|
| 1440 |
);
|
| 1441 |
+
|
| 1442 |
+
$this->end_controls_section();
|
| 1443 |
|
| 1444 |
+
}
|
| 1445 |
|
| 1446 |
+
protected function render() {
|
| 1447 |
+
$settings = $this->get_settings();
|
| 1448 |
+
|
| 1449 |
+
$this->add_render_attribute( 'contact-form', 'class', [
|
| 1450 |
+
'eael-contact-form',
|
| 1451 |
+
'eael-caldera-form',
|
|
|
|
|
|
|
| 1452 |
]
|
| 1453 |
);
|
| 1454 |
+
|
| 1455 |
+
if ( $settings['placeholder_switch'] != 'yes' ) {
|
| 1456 |
+
$this->add_render_attribute( 'contact-form', 'class', 'placeholder-hide' );
|
| 1457 |
+
}
|
| 1458 |
+
|
| 1459 |
+
if ( $settings['custom_title_description'] == 'yes' ) {
|
| 1460 |
+
$this->add_render_attribute( 'contact-form', 'class', 'title-description-hide' );
|
| 1461 |
+
}
|
| 1462 |
+
|
| 1463 |
+
if ( $settings['custom_radio_checkbox'] == 'yes' ) {
|
| 1464 |
+
$this->add_render_attribute( 'contact-form', 'class', 'eael-custom-radio-checkbox' );
|
| 1465 |
+
}
|
| 1466 |
+
if ( $settings['eael_contact_form_alignment'] == 'left' ) {
|
| 1467 |
+
$this->add_render_attribute( 'contact-form', 'class', 'eael-contact-form-align-left' );
|
| 1468 |
+
}
|
| 1469 |
+
elseif ( $settings['eael_contact_form_alignment'] == 'center' ) {
|
| 1470 |
+
$this->add_render_attribute( 'contact-form', 'class', 'eael-contact-form-align-center' );
|
| 1471 |
+
}
|
| 1472 |
+
elseif ( $settings['eael_contact_form_alignment'] == 'right' ) {
|
| 1473 |
+
$this->add_render_attribute( 'contact-form', 'class', 'eael-contact-form-align-right' );
|
| 1474 |
+
}
|
| 1475 |
+
else {
|
| 1476 |
+
$this->add_render_attribute( 'contact-form', 'class', 'eael-contact-form-align-default' );
|
| 1477 |
+
}
|
| 1478 |
+
if ( class_exists( 'Caldera_Forms' ) ) {
|
| 1479 |
+
if ( ! empty( $settings['contact_form_list'] ) ) { ?>
|
| 1480 |
+
<div <?php echo $this->get_render_attribute_string( 'contact-form' ); ?>>
|
| 1481 |
+
<?php if ( $settings['custom_title_description'] == 'yes' ) { ?>
|
| 1482 |
+
<div class="eael-caldera-form-heading">
|
| 1483 |
+
<?php if ( $settings['form_title_custom'] != '' ) { ?>
|
| 1484 |
+
<h3 class="eael-contact-form-title eael-caldera-form-title">
|
| 1485 |
+
<?php echo esc_attr( $settings['form_title_custom'] ); ?>
|
| 1486 |
+
</h3>
|
| 1487 |
+
<?php } ?>
|
| 1488 |
+
<?php if ( $settings['form_description_custom'] != '' ) { ?>
|
| 1489 |
+
<div class="eael-contact-form-description eael-caldera-form-description">
|
| 1490 |
+
<?php echo $this->parse_text_editor( $settings['form_description_custom'] ); ?>
|
| 1491 |
+
</div>
|
| 1492 |
+
<?php } ?>
|
| 1493 |
+
</div>
|
| 1494 |
+
<?php } ?>
|
| 1495 |
+
<?php
|
| 1496 |
+
$eael_form_id = $settings['contact_form_list'];
|
| 1497 |
+
|
| 1498 |
+
echo do_shortcode( '[caldera_form id="' . $eael_form_id . '" ]' );
|
| 1499 |
+
?>
|
| 1500 |
+
</div>
|
| 1501 |
+
<?php
|
| 1502 |
+
}
|
| 1503 |
+
}
|
| 1504 |
+
}
|
| 1505 |
+
|
| 1506 |
+
protected function _content_template() {}
|
| 1507 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1508 |
}
|
| 1509 |
|
| 1510 |
+
Plugin::instance()->widgets_manager->register_widget_type( new Widget_Eael_Caldera_Form() );
|
|
|
elements/contact-form-7/contact-form-7.php
CHANGED
|
@@ -1,52 +1,209 @@
|
|
| 1 |
<?php
|
| 2 |
namespace Elementor;
|
| 3 |
|
| 4 |
-
if ( ! defined( 'ABSPATH' ) )
|
| 5 |
-
|
|
|
|
| 6 |
|
|
|
|
|
|
|
|
|
|
| 7 |
class Widget_Eael_Contact_Form extends Widget_Base {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
|
|
|
|
|
|
|
|
|
| 26 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
|
| 35 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
|
| 37 |
$this->add_control(
|
| 38 |
-
'
|
| 39 |
[
|
| 40 |
-
'label'
|
| 41 |
-
'
|
| 42 |
-
|
| 43 |
-
|
|
|
|
|
|
|
| 44 |
]
|
| 45 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
|
| 51 |
$this->start_controls_section(
|
| 52 |
'eael_section_pro',
|
|
@@ -73,22 +230,25 @@ class Widget_Eael_Contact_Form extends Widget_Base {
|
|
| 73 |
|
| 74 |
$this->end_controls_section();
|
| 75 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 76 |
|
| 77 |
-
$this->start_controls_section(
|
| 78 |
-
'eael_section_contact_form_styles',
|
| 79 |
-
[
|
| 80 |
-
'label' => esc_html__( 'Form Container Styles', 'essential-addons-elementor' ),
|
| 81 |
-
'tab' => Controls_Manager::TAB_STYLE
|
| 82 |
-
]
|
| 83 |
-
);
|
| 84 |
-
|
| 85 |
$this->add_control(
|
| 86 |
'eael_contact_form_background',
|
| 87 |
[
|
| 88 |
'label' => esc_html__( 'Form Background Color', 'essential-addons-elementor' ),
|
| 89 |
'type' => Controls_Manager::COLOR,
|
| 90 |
'selectors' => [
|
| 91 |
-
'{{WRAPPER}} .eael-contact-form
|
| 92 |
],
|
| 93 |
]
|
| 94 |
);
|
|
@@ -106,19 +266,18 @@ class Widget_Eael_Contact_Form extends Widget_Base {
|
|
| 106 |
],
|
| 107 |
'left' => [
|
| 108 |
'title' => esc_html__( 'Left', 'essential-addons-elementor' ),
|
| 109 |
-
'icon' => '
|
| 110 |
],
|
| 111 |
'center' => [
|
| 112 |
'title' => esc_html__( 'Center', 'essential-addons-elementor' ),
|
| 113 |
-
'icon' => '
|
| 114 |
],
|
| 115 |
'right' => [
|
| 116 |
'title' => esc_html__( 'Right', 'essential-addons-elementor' ),
|
| 117 |
-
'icon' => '
|
| 118 |
],
|
| 119 |
],
|
| 120 |
'default' => 'default',
|
| 121 |
-
'prefix_class' => 'eael-contact-form-align-',
|
| 122 |
]
|
| 123 |
);
|
| 124 |
|
|
@@ -139,7 +298,7 @@ class Widget_Eael_Contact_Form extends Widget_Base {
|
|
| 139 |
],
|
| 140 |
],
|
| 141 |
'selectors' => [
|
| 142 |
-
'{{WRAPPER}} .eael-contact-form
|
| 143 |
],
|
| 144 |
]
|
| 145 |
);
|
|
@@ -161,7 +320,7 @@ class Widget_Eael_Contact_Form extends Widget_Base {
|
|
| 161 |
],
|
| 162 |
],
|
| 163 |
'selectors' => [
|
| 164 |
-
'{{WRAPPER}} .eael-contact-form
|
| 165 |
],
|
| 166 |
]
|
| 167 |
);
|
|
@@ -174,7 +333,7 @@ class Widget_Eael_Contact_Form extends Widget_Base {
|
|
| 174 |
'type' => Controls_Manager::DIMENSIONS,
|
| 175 |
'size_units' => [ 'px', 'em', '%' ],
|
| 176 |
'selectors' => [
|
| 177 |
-
'{{WRAPPER}} .eael-contact-form
|
| 178 |
],
|
| 179 |
]
|
| 180 |
);
|
|
@@ -186,7 +345,7 @@ class Widget_Eael_Contact_Form extends Widget_Base {
|
|
| 186 |
'type' => Controls_Manager::DIMENSIONS,
|
| 187 |
'size_units' => [ 'px', 'em', '%' ],
|
| 188 |
'selectors' => [
|
| 189 |
-
'{{WRAPPER}} .eael-contact-form
|
| 190 |
],
|
| 191 |
]
|
| 192 |
);
|
|
@@ -200,7 +359,7 @@ class Widget_Eael_Contact_Form extends Widget_Base {
|
|
| 200 |
'separator' => 'before',
|
| 201 |
'size_units' => [ 'px' ],
|
| 202 |
'selectors' => [
|
| 203 |
-
'{{WRAPPER}} .eael-contact-form
|
| 204 |
],
|
| 205 |
]
|
| 206 |
);
|
|
@@ -210,7 +369,7 @@ class Widget_Eael_Contact_Form extends Widget_Base {
|
|
| 210 |
Group_Control_Border::get_type(),
|
| 211 |
[
|
| 212 |
'name' => 'eael_contact_form_border',
|
| 213 |
-
'selector' => '{{WRAPPER}} .eael-contact-form
|
| 214 |
]
|
| 215 |
);
|
| 216 |
|
|
@@ -219,473 +378,1192 @@ class Widget_Eael_Contact_Form extends Widget_Base {
|
|
| 219 |
Group_Control_Box_Shadow::get_type(),
|
| 220 |
[
|
| 221 |
'name' => 'eael_contact_form_box_shadow',
|
| 222 |
-
'selector' => '{{WRAPPER}} .eael-contact-form
|
| 223 |
]
|
| 224 |
);
|
| 225 |
-
|
| 226 |
-
$this->end_controls_section();
|
| 227 |
-
|
| 228 |
-
|
| 229 |
|
| 230 |
-
|
| 231 |
-
|
| 232 |
-
|
| 233 |
-
|
| 234 |
-
|
| 235 |
-
|
| 236 |
-
|
| 237 |
-
|
| 238 |
-
|
| 239 |
-
|
| 240 |
-
|
| 241 |
-
|
| 242 |
-
|
| 243 |
-
|
| 244 |
-
|
| 245 |
-
|
| 246 |
-
|
| 247 |
-
|
| 248 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 249 |
|
| 250 |
-
$this->add_responsive_control(
|
| 251 |
-
'eael_contact_form_input_width',
|
| 252 |
-
[
|
| 253 |
-
'label' => esc_html__( 'Input Width', 'essential-addons-elementor' ),
|
| 254 |
-
'type' => Controls_Manager::SLIDER,
|
| 255 |
-
'size_units' => [ 'px', 'em', '%' ],
|
| 256 |
-
'range' => [
|
| 257 |
-
'px' => [
|
| 258 |
-
'min' => 10,
|
| 259 |
-
'max' => 1500,
|
| 260 |
-
],
|
| 261 |
-
'em' => [
|
| 262 |
-
'min' => 1,
|
| 263 |
-
'max' => 80,
|
| 264 |
-
],
|
| 265 |
-
],
|
| 266 |
-
'selectors' => [
|
| 267 |
-
'{{WRAPPER}} .eael-contact-form-container input.wpcf7-text' => 'width: {{SIZE}}{{UNIT}};',
|
| 268 |
-
],
|
| 269 |
-
]
|
| 270 |
-
);
|
| 271 |
-
|
| 272 |
-
$this->add_responsive_control(
|
| 273 |
-
'eael_contact_form_textarea_width',
|
| 274 |
-
[
|
| 275 |
-
'label' => esc_html__( 'Textarea Width', 'essential-addons-elementor' ),
|
| 276 |
-
'type' => Controls_Manager::SLIDER,
|
| 277 |
-
'size_units' => [ 'px', 'em', '%' ],
|
| 278 |
-
'range' => [
|
| 279 |
-
'px' => [
|
| 280 |
-
'min' => 10,
|
| 281 |
-
'max' => 1500,
|
| 282 |
-
],
|
| 283 |
-
'em' => [
|
| 284 |
-
'min' => 1,
|
| 285 |
-
'max' => 80,
|
| 286 |
-
],
|
| 287 |
-
],
|
| 288 |
-
'selectors' => [
|
| 289 |
-
'{{WRAPPER}} .eael-contact-form-container textarea.wpcf7-textarea' => 'width: {{SIZE}}{{UNIT}};',
|
| 290 |
-
],
|
| 291 |
-
]
|
| 292 |
-
);
|
| 293 |
-
|
| 294 |
$this->add_responsive_control(
|
| 295 |
-
'
|
| 296 |
-
[
|
| 297 |
-
'label' => esc_html__( 'Fields Padding', 'essential-addons-elementor' ),
|
| 298 |
-
'type' => Controls_Manager::DIMENSIONS,
|
| 299 |
-
'size_units' => [ 'px', 'em', '%' ],
|
| 300 |
-
'selectors' => [
|
| 301 |
-
'{{WRAPPER}} .eael-contact-form-container input.wpcf7-text, {{WRAPPER}} .eael-contact-form-container textarea.wpcf7-textarea' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
| 302 |
-
],
|
| 303 |
-
]
|
| 304 |
-
);
|
| 305 |
-
|
| 306 |
-
|
| 307 |
-
|
| 308 |
-
$this->add_control(
|
| 309 |
-
'eael_contact_form_input_border_radius',
|
| 310 |
[
|
| 311 |
-
'label'
|
| 312 |
-
'type'
|
| 313 |
-
'
|
| 314 |
-
'
|
| 315 |
-
|
| 316 |
-
'{{WRAPPER}} .eael-contact-form-container input.wpcf7-text, {{WRAPPER}} .eael-contact-form-container textarea.wpcf7-textarea' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
| 317 |
],
|
| 318 |
]
|
| 319 |
);
|
| 320 |
-
|
| 321 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 322 |
$this->add_group_control(
|
| 323 |
Group_Control_Border::get_type(),
|
| 324 |
[
|
| 325 |
-
'name'
|
| 326 |
-
'
|
| 327 |
-
|
| 328 |
-
|
| 329 |
-
|
| 330 |
-
|
| 331 |
-
$this->add_group_control(
|
| 332 |
-
Group_Control_Box_Shadow::get_type(),
|
| 333 |
-
[
|
| 334 |
-
'name' => 'eael_contact_form_input_box_shadow',
|
| 335 |
-
'selector' => '{{WRAPPER}} .eael-contact-form-container input.wpcf7-text, {{WRAPPER}} .eael-contact-form-container textarea.wpcf7-textarea',
|
| 336 |
]
|
| 337 |
);
|
| 338 |
|
| 339 |
$this->add_control(
|
| 340 |
-
'
|
| 341 |
[
|
| 342 |
-
'
|
| 343 |
-
'
|
| 344 |
-
'
|
|
|
|
|
|
|
|
|
|
| 345 |
]
|
| 346 |
);
|
| 347 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 348 |
|
| 349 |
$this->add_group_control(
|
| 350 |
Group_Control_Box_Shadow::get_type(),
|
| 351 |
[
|
| 352 |
-
'name'
|
| 353 |
-
'selector'
|
|
|
|
| 354 |
]
|
| 355 |
);
|
| 356 |
|
| 357 |
-
|
| 358 |
-
'eael_contact_form_input_focus_border',
|
| 359 |
-
[
|
| 360 |
-
'label' => esc_html__( 'Border Color', 'essential-addons-elementor' ),
|
| 361 |
-
'type' => Controls_Manager::COLOR,
|
| 362 |
-
'selectors' => [
|
| 363 |
-
'body {{WRAPPER}} .eael-contact-form-container input.wpcf7-text:focus, body {{WRAPPER}} .eael-contact-form-container textarea.wpcf7-textarea:focus' => 'border-color: {{VALUE}};',
|
| 364 |
-
],
|
| 365 |
-
]
|
| 366 |
-
);
|
| 367 |
-
|
| 368 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 369 |
|
| 370 |
-
$this->
|
| 371 |
-
|
| 372 |
-
|
| 373 |
-
$this->start_controls_section(
|
| 374 |
-
'eael_section_contact_form_typography',
|
| 375 |
-
[
|
| 376 |
-
'label' => esc_html__( 'Color & Typography', 'essential-addons-elementor' ),
|
| 377 |
-
'tab' => Controls_Manager::TAB_STYLE
|
| 378 |
-
]
|
| 379 |
-
);
|
| 380 |
-
|
| 381 |
-
|
| 382 |
-
$this->add_control(
|
| 383 |
-
'eael_contact_form_label_color',
|
| 384 |
-
[
|
| 385 |
-
'label' => esc_html__( 'Label Color', 'essential-addons-elementor' ),
|
| 386 |
-
'type' => Controls_Manager::COLOR,
|
| 387 |
-
'selectors' => [
|
| 388 |
-
'{{WRAPPER}} .eael-contact-form-container, {{WRAPPER}} .eael-contact-form-container .wpcf7-form label' => 'color: {{VALUE}};',
|
| 389 |
-
],
|
| 390 |
-
]
|
| 391 |
-
);
|
| 392 |
-
|
| 393 |
-
$this->add_control(
|
| 394 |
-
'eael_contact_form_field_color',
|
| 395 |
[
|
| 396 |
-
'
|
| 397 |
-
'
|
| 398 |
-
'
|
| 399 |
-
|
| 400 |
-
|
|
|
|
| 401 |
]
|
| 402 |
);
|
| 403 |
-
|
| 404 |
-
$this->
|
| 405 |
-
|
| 406 |
[
|
| 407 |
-
'
|
| 408 |
-
'
|
| 409 |
-
'
|
| 410 |
-
'{{WRAPPER}} .eael-contact-form-container ::-webkit-input-placeholder' => 'color: {{VALUE}};',
|
| 411 |
-
'{{WRAPPER}} .eael-contact-form-container ::-moz-placeholder' => 'color: {{VALUE}};',
|
| 412 |
-
'{{WRAPPER}} .eael-contact-form-container ::-ms-input-placeholder' => 'color: {{VALUE}};',
|
| 413 |
-
],
|
| 414 |
]
|
| 415 |
);
|
| 416 |
-
|
| 417 |
-
|
| 418 |
-
|
| 419 |
-
|
| 420 |
-
|
| 421 |
-
|
| 422 |
-
|
| 423 |
-
|
| 424 |
-
|
| 425 |
-
|
| 426 |
-
|
| 427 |
-
|
| 428 |
-
|
| 429 |
-
|
| 430 |
-
|
| 431 |
-
|
| 432 |
-
|
| 433 |
-
|
| 434 |
-
|
| 435 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 436 |
$this->add_control(
|
| 437 |
-
'
|
| 438 |
-
[
|
| 439 |
-
'type' => Controls_Manager::HEADING,
|
| 440 |
-
'label' => esc_html__( 'Input Fields Typography', 'essential-addons-elementor' ),
|
| 441 |
-
'separator' => 'before',
|
| 442 |
-
]
|
| 443 |
-
);
|
| 444 |
-
|
| 445 |
-
$this->add_group_control(
|
| 446 |
-
Group_Control_Typography::get_type(),
|
| 447 |
[
|
| 448 |
-
'
|
| 449 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 450 |
]
|
| 451 |
);
|
| 452 |
-
|
| 453 |
-
|
| 454 |
-
|
| 455 |
-
|
| 456 |
-
|
| 457 |
-
|
| 458 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 459 |
[
|
| 460 |
-
'label'
|
| 461 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 462 |
]
|
| 463 |
);
|
| 464 |
|
| 465 |
-
|
| 466 |
-
|
| 467 |
-
|
| 468 |
-
|
| 469 |
-
|
| 470 |
-
|
| 471 |
-
|
| 472 |
-
|
| 473 |
-
|
| 474 |
-
|
| 475 |
-
|
| 476 |
-
|
| 477 |
-
|
| 478 |
-
|
| 479 |
-
|
| 480 |
-
|
| 481 |
-
|
| 482 |
-
|
| 483 |
-
|
| 484 |
-
|
| 485 |
-
|
| 486 |
-
|
| 487 |
-
|
| 488 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 489 |
[
|
| 490 |
-
'label'
|
| 491 |
-
'type'
|
| 492 |
-
'
|
| 493 |
-
'options'
|
| 494 |
-
'
|
| 495 |
-
'title'
|
| 496 |
-
'icon'
|
| 497 |
],
|
| 498 |
-
'
|
| 499 |
-
'title'
|
| 500 |
-
'icon'
|
| 501 |
-
],
|
| 502 |
-
'center' => [
|
| 503 |
-
'title' => esc_html__( 'Center', 'essential-addons-elementor' ),
|
| 504 |
-
'icon' => 'fa fa-align-center',
|
| 505 |
],
|
| 506 |
-
'right'
|
| 507 |
-
'title'
|
| 508 |
-
'icon'
|
| 509 |
],
|
| 510 |
],
|
| 511 |
-
'
|
| 512 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 513 |
]
|
| 514 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 515 |
|
| 516 |
$this->add_group_control(
|
| 517 |
-
|
| 518 |
[
|
| 519 |
-
|
| 520 |
-
'
|
| 521 |
-
'
|
|
|
|
| 522 |
]
|
| 523 |
);
|
| 524 |
-
|
| 525 |
-
$this->
|
| 526 |
-
'
|
| 527 |
[
|
| 528 |
-
'label'
|
| 529 |
-
'type'
|
| 530 |
-
'size_units'
|
| 531 |
-
'selectors'
|
| 532 |
-
'{{WRAPPER}} .eael-contact-form-
|
| 533 |
],
|
| 534 |
]
|
| 535 |
);
|
| 536 |
-
|
| 537 |
-
|
| 538 |
$this->add_responsive_control(
|
| 539 |
-
'
|
| 540 |
[
|
| 541 |
-
'label'
|
| 542 |
-
'type'
|
| 543 |
-
'size_units'
|
| 544 |
-
'selectors'
|
| 545 |
-
'{{WRAPPER}} .eael-contact-form-
|
| 546 |
],
|
| 547 |
]
|
| 548 |
);
|
| 549 |
-
|
| 550 |
-
|
| 551 |
-
|
| 552 |
-
|
| 553 |
-
|
| 554 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 555 |
|
| 556 |
-
$this->
|
| 557 |
-
|
| 558 |
[
|
| 559 |
-
'
|
| 560 |
-
'
|
| 561 |
-
'
|
| 562 |
-
'{{WRAPPER}} .eael-contact-form-container input.wpcf7-submit' => 'color: {{VALUE}};',
|
| 563 |
-
],
|
| 564 |
]
|
| 565 |
);
|
| 566 |
-
|
|
|
|
| 567 |
|
| 568 |
-
|
| 569 |
-
|
| 570 |
-
|
| 571 |
-
|
| 572 |
-
|
| 573 |
-
|
| 574 |
-
|
| 575 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 576 |
],
|
| 577 |
-
|
| 578 |
-
|
| 579 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 580 |
$this->add_group_control(
|
| 581 |
Group_Control_Border::get_type(),
|
| 582 |
[
|
| 583 |
-
'name'
|
| 584 |
-
'
|
| 585 |
-
|
| 586 |
-
|
| 587 |
-
|
| 588 |
-
|
| 589 |
-
|
| 590 |
-
|
| 591 |
-
'label' => esc_html__( 'Border Radius', 'essential-addons-elementor' ),
|
| 592 |
-
'type' => Controls_Manager::SLIDER,
|
| 593 |
-
'range' => [
|
| 594 |
-
'px' => [
|
| 595 |
-
'max' => 100,
|
| 596 |
-
],
|
| 597 |
-
],
|
| 598 |
-
'selectors' => [
|
| 599 |
-
'{{WRAPPER}} .eael-contact-form-container input.wpcf7-submit' => 'border-radius: {{SIZE}}px;',
|
| 600 |
],
|
| 601 |
]
|
| 602 |
);
|
| 603 |
-
|
| 604 |
|
| 605 |
-
|
| 606 |
-
$this->end_controls_tab();
|
| 607 |
|
| 608 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 609 |
|
| 610 |
-
|
| 611 |
-
|
| 612 |
-
|
| 613 |
-
|
| 614 |
-
|
| 615 |
-
|
| 616 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 617 |
],
|
| 618 |
-
|
| 619 |
-
|
| 620 |
|
| 621 |
-
|
| 622 |
-
|
| 623 |
-
|
| 624 |
-
|
| 625 |
-
|
| 626 |
-
|
| 627 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 628 |
],
|
| 629 |
-
|
| 630 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 631 |
|
| 632 |
-
$this->
|
| 633 |
-
|
| 634 |
[
|
| 635 |
-
'
|
| 636 |
-
'
|
| 637 |
-
'
|
| 638 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 639 |
],
|
| 640 |
]
|
| 641 |
);
|
| 642 |
-
|
| 643 |
-
$this->
|
| 644 |
-
|
| 645 |
-
$this->end_controls_tabs();
|
| 646 |
-
|
| 647 |
-
|
| 648 |
-
$this->add_group_control(
|
| 649 |
-
Group_Control_Box_Shadow::get_type(),
|
| 650 |
[
|
| 651 |
-
'
|
| 652 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 653 |
]
|
| 654 |
);
|
| 655 |
-
|
| 656 |
-
|
| 657 |
-
$this->end_controls_section();
|
| 658 |
-
|
| 659 |
-
|
| 660 |
-
}
|
| 661 |
|
|
|
|
| 662 |
|
| 663 |
-
|
| 664 |
-
|
| 665 |
-
|
| 666 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 667 |
|
| 668 |
-
|
| 669 |
-
|
| 670 |
-
|
| 671 |
-
|
| 672 |
-
<div class="eael-contact-form-container">
|
| 673 |
-
<?php echo do_shortcode( '[contact-form-7 id="' . $settings['eael_wpcf7_form'] . '" ]' ); ?>
|
| 674 |
-
</div>
|
| 675 |
-
<?php endif; ?>
|
| 676 |
-
|
| 677 |
-
<?php
|
| 678 |
-
|
| 679 |
-
}
|
| 680 |
-
|
| 681 |
-
protected function content_template() {''
|
| 682 |
-
|
| 683 |
-
?>
|
| 684 |
-
|
| 685 |
-
|
| 686 |
-
<?php
|
| 687 |
-
}
|
| 688 |
}
|
| 689 |
|
| 690 |
-
|
| 691 |
Plugin::instance()->widgets_manager->register_widget_type( new Widget_Eael_Contact_Form() );
|
| 1 |
<?php
|
| 2 |
namespace Elementor;
|
| 3 |
|
| 4 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
| 5 |
+
exit; // Exit if accessed directly.
|
| 6 |
+
}
|
| 7 |
|
| 8 |
+
/**
|
| 9 |
+
* Contact Form 7 Element
|
| 10 |
+
*/
|
| 11 |
class Widget_Eael_Contact_Form extends Widget_Base {
|
| 12 |
+
|
| 13 |
+
/**
|
| 14 |
+
* Retrieve contact form 7 widget name.
|
| 15 |
+
*
|
| 16 |
+
* @access public
|
| 17 |
+
*
|
| 18 |
+
* @return string Widget name.
|
| 19 |
+
*/
|
| 20 |
+
public function get_name() {
|
| 21 |
+
return 'eael-contact-form-7';
|
| 22 |
+
}
|
| 23 |
|
| 24 |
+
/**
|
| 25 |
+
* Retrieve contact form 7 widget title.
|
| 26 |
+
*
|
| 27 |
+
* @access public
|
| 28 |
+
*
|
| 29 |
+
* @return string Widget title.
|
| 30 |
+
*/
|
| 31 |
+
public function get_title() {
|
| 32 |
+
return __( 'EA Contact Form 7', 'essential-addons-elementor' );
|
| 33 |
+
}
|
| 34 |
|
| 35 |
+
/**
|
| 36 |
+
* Retrieve the list of categories the contact form 7 widget belongs to.
|
| 37 |
+
*
|
| 38 |
+
* Used to determine where to display the widget in the editor.
|
| 39 |
+
*
|
| 40 |
+
* @access public
|
| 41 |
+
*
|
| 42 |
+
* @return array Widget categories.
|
| 43 |
+
*/
|
| 44 |
+
public function get_categories() {
|
| 45 |
+
return [ 'essential-addons-elementor' ];
|
| 46 |
+
}
|
| 47 |
|
| 48 |
+
/**
|
| 49 |
+
* Retrieve contact form 7 widget icon.
|
| 50 |
+
*
|
| 51 |
+
* @access public
|
| 52 |
+
*
|
| 53 |
+
* @return string Widget icon.
|
| 54 |
+
*/
|
| 55 |
+
public function get_icon() {
|
| 56 |
+
return 'fa fa-envelope-o';
|
| 57 |
+
}
|
| 58 |
|
| 59 |
+
/**
|
| 60 |
+
* Register contact form 7 widget controls.
|
| 61 |
+
*
|
| 62 |
+
* Adds different input fields to allow the user to change and customize the widget settings.
|
| 63 |
+
*
|
| 64 |
+
* @access protected
|
| 65 |
+
*/
|
| 66 |
+
protected function _register_controls() {
|
| 67 |
|
| 68 |
+
/*-----------------------------------------------------------------------------------*/
|
| 69 |
+
/* CONTENT TAB
|
| 70 |
+
/*-----------------------------------------------------------------------------------*/
|
| 71 |
+
|
| 72 |
+
/**
|
| 73 |
+
* Content Tab: Contact Form
|
| 74 |
+
* -------------------------------------------------
|
| 75 |
+
*/
|
| 76 |
+
$this->start_controls_section(
|
| 77 |
+
'section_info_box',
|
| 78 |
+
[
|
| 79 |
+
'label' => __( 'Contact Form', 'essential-addons-elementor' ),
|
| 80 |
+
]
|
| 81 |
+
);
|
| 82 |
|
| 83 |
+
$this->add_control(
|
| 84 |
+
'contact_form_list',
|
| 85 |
+
[
|
| 86 |
+
'label' => esc_html__( 'Select Form', 'essential-addons-elementor' ),
|
| 87 |
+
'type' => Controls_Manager::SELECT,
|
| 88 |
+
'label_block' => true,
|
| 89 |
+
'options' => eael_select_contact_form(),
|
| 90 |
+
'default' => '0',
|
| 91 |
+
]
|
| 92 |
+
);
|
| 93 |
+
|
| 94 |
+
$this->add_control(
|
| 95 |
+
'form_title',
|
| 96 |
+
[
|
| 97 |
+
'label' => __( 'Form Title', 'essential-addons-elementor' ),
|
| 98 |
+
'type' => Controls_Manager::SWITCHER,
|
| 99 |
+
'label_on' => __( 'On', 'essential-addons-elementor' ),
|
| 100 |
+
'label_off' => __( 'Off', 'essential-addons-elementor' ),
|
| 101 |
+
'return_value' => 'yes',
|
| 102 |
+
]
|
| 103 |
+
);
|
| 104 |
|
| 105 |
+
$this->add_control(
|
| 106 |
+
'form_title_text',
|
| 107 |
+
[
|
| 108 |
+
'label' => esc_html__( 'Title', 'essential-addons-elementor' ),
|
| 109 |
+
'type' => Controls_Manager::TEXT,
|
| 110 |
+
'label_block' => true,
|
| 111 |
+
'default' => '',
|
| 112 |
+
'condition' => [
|
| 113 |
+
'form_title' => 'yes',
|
| 114 |
+
],
|
| 115 |
+
]
|
| 116 |
+
);
|
| 117 |
+
|
| 118 |
+
$this->add_control(
|
| 119 |
+
'form_description',
|
| 120 |
+
[
|
| 121 |
+
'label' => __( 'Form Description', 'essential-addons-elementor' ),
|
| 122 |
+
'type' => Controls_Manager::SWITCHER,
|
| 123 |
+
'label_on' => __( 'On', 'essential-addons-elementor' ),
|
| 124 |
+
'label_off' => __( 'Off', 'essential-addons-elementor' ),
|
| 125 |
+
'return_value' => 'yes',
|
| 126 |
+
]
|
| 127 |
+
);
|
| 128 |
|
| 129 |
$this->add_control(
|
| 130 |
+
'form_description_text',
|
| 131 |
[
|
| 132 |
+
'label' => esc_html__( 'Description', 'essential-addons-elementor' ),
|
| 133 |
+
'type' => Controls_Manager::TEXTAREA,
|
| 134 |
+
'default' => '',
|
| 135 |
+
'condition' => [
|
| 136 |
+
'form_description' => 'yes',
|
| 137 |
+
],
|
| 138 |
]
|
| 139 |
);
|
| 140 |
+
|
| 141 |
+
$this->add_control(
|
| 142 |
+
'labels_switch',
|
| 143 |
+
[
|
| 144 |
+
'label' => __( 'Labels', 'essential-addons-elementor' ),
|
| 145 |
+
'type' => Controls_Manager::SWITCHER,
|
| 146 |
+
'default' => 'yes',
|
| 147 |
+
'label_on' => __( 'Show', 'essential-addons-elementor' ),
|
| 148 |
+
'label_off' => __( 'Hide', 'essential-addons-elementor' ),
|
| 149 |
+
'return_value' => 'yes',
|
| 150 |
+
]
|
| 151 |
+
);
|
| 152 |
+
|
| 153 |
+
$this->end_controls_section();
|
| 154 |
|
| 155 |
+
/**
|
| 156 |
+
* Content Tab: Errors
|
| 157 |
+
* -------------------------------------------------
|
| 158 |
+
*/
|
| 159 |
+
$this->start_controls_section(
|
| 160 |
+
'section_errors',
|
| 161 |
+
[
|
| 162 |
+
'label' => __( 'Errors', 'essential-addons-elementor' ),
|
| 163 |
+
]
|
| 164 |
+
);
|
| 165 |
+
|
| 166 |
+
$this->add_control(
|
| 167 |
+
'error_messages',
|
| 168 |
+
[
|
| 169 |
+
'label' => __( 'Error Messages', 'essential-addons-elementor' ),
|
| 170 |
+
'type' => Controls_Manager::SELECT,
|
| 171 |
+
'default' => 'show',
|
| 172 |
+
'options' => [
|
| 173 |
+
'show' => __( 'Show', 'essential-addons-elementor' ),
|
| 174 |
+
'hide' => __( 'Hide', 'essential-addons-elementor' ),
|
| 175 |
+
],
|
| 176 |
+
'selectors_dictionary' => [
|
| 177 |
+
'show' => 'block',
|
| 178 |
+
'hide' => 'none',
|
| 179 |
+
],
|
| 180 |
+
'selectors' => [
|
| 181 |
+
'{{WRAPPER}} .eael-contact-form-7 .wpcf7-not-valid-tip' => 'display: {{VALUE}} !important;',
|
| 182 |
+
],
|
| 183 |
+
]
|
| 184 |
+
);
|
| 185 |
+
|
| 186 |
+
$this->add_control(
|
| 187 |
+
'validation_errors',
|
| 188 |
+
[
|
| 189 |
+
'label' => __( 'Validation Errors', 'essential-addons-elementor' ),
|
| 190 |
+
'type' => Controls_Manager::SELECT,
|
| 191 |
+
'default' => 'show',
|
| 192 |
+
'options' => [
|
| 193 |
+
'show' => __( 'Show', 'essential-addons-elementor' ),
|
| 194 |
+
'hide' => __( 'Hide', 'essential-addons-elementor' ),
|
| 195 |
+
],
|
| 196 |
+
'selectors_dictionary' => [
|
| 197 |
+
'show' => 'block',
|
| 198 |
+
'hide' => 'none',
|
| 199 |
+
],
|
| 200 |
+
'selectors' => [
|
| 201 |
+
'{{WRAPPER}} .eael-contact-form-7 .wpcf7-validation-errors' => 'display: {{VALUE}} !important;',
|
| 202 |
+
],
|
| 203 |
+
]
|
| 204 |
+
);
|
| 205 |
+
|
| 206 |
+
$this->end_controls_section();
|
| 207 |
|
| 208 |
$this->start_controls_section(
|
| 209 |
'eael_section_pro',
|
| 230 |
|
| 231 |
$this->end_controls_section();
|
| 232 |
|
| 233 |
+
/**
|
| 234 |
+
* Style Tab: Form Container
|
| 235 |
+
* -------------------------------------------------
|
| 236 |
+
*/
|
| 237 |
+
$this->start_controls_section(
|
| 238 |
+
'section_container_style',
|
| 239 |
+
[
|
| 240 |
+
'label' => __( 'Form Container', 'essential-addons-elementor' ),
|
| 241 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
| 242 |
+
]
|
| 243 |
+
);
|
| 244 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 245 |
$this->add_control(
|
| 246 |
'eael_contact_form_background',
|
| 247 |
[
|
| 248 |
'label' => esc_html__( 'Form Background Color', 'essential-addons-elementor' ),
|
| 249 |
'type' => Controls_Manager::COLOR,
|
| 250 |
'selectors' => [
|
| 251 |
+
'{{WRAPPER}} .eael-contact-form' => 'background: {{VALUE}};',
|
| 252 |
],
|
| 253 |
]
|
| 254 |
);
|
| 266 |
],
|
| 267 |
'left' => [
|
| 268 |
'title' => esc_html__( 'Left', 'essential-addons-elementor' ),
|
| 269 |
+
'icon' => 'eicon-h-align-left',
|
| 270 |
],
|
| 271 |
'center' => [
|
| 272 |
'title' => esc_html__( 'Center', 'essential-addons-elementor' ),
|
| 273 |
+
'icon' => 'eicon-h-align-center',
|
| 274 |
],
|
| 275 |
'right' => [
|
| 276 |
'title' => esc_html__( 'Right', 'essential-addons-elementor' ),
|
| 277 |
+
'icon' => 'eicon-h-align-right',
|
| 278 |
],
|
| 279 |
],
|
| 280 |
'default' => 'default',
|
|
|
|
| 281 |
]
|
| 282 |
);
|
| 283 |
|
| 298 |
],
|
| 299 |
],
|
| 300 |
'selectors' => [
|
| 301 |
+
'{{WRAPPER}} .eael-contact-form' => 'width: {{SIZE}}{{UNIT}};',
|
| 302 |
],
|
| 303 |
]
|
| 304 |
);
|
| 320 |
],
|
| 321 |
],
|
| 322 |
'selectors' => [
|
| 323 |
+
'{{WRAPPER}} .eael-contact-form' => 'max-width: {{SIZE}}{{UNIT}};',
|
| 324 |
],
|
| 325 |
]
|
| 326 |
);
|
| 333 |
'type' => Controls_Manager::DIMENSIONS,
|
| 334 |
'size_units' => [ 'px', 'em', '%' ],
|
| 335 |
'selectors' => [
|
| 336 |
+
'{{WRAPPER}} .eael-contact-form' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
| 337 |
],
|
| 338 |
]
|
| 339 |
);
|
| 345 |
'type' => Controls_Manager::DIMENSIONS,
|
| 346 |
'size_units' => [ 'px', 'em', '%' ],
|
| 347 |
'selectors' => [
|
| 348 |
+
'{{WRAPPER}} .eael-contact-form' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
| 349 |
],
|
| 350 |
]
|
| 351 |
);
|
| 359 |
'separator' => 'before',
|
| 360 |
'size_units' => [ 'px' ],
|
| 361 |
'selectors' => [
|
| 362 |
+
'{{WRAPPER}} .eael-contact-form' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
| 363 |
],
|
| 364 |
]
|
| 365 |
);
|
| 369 |
Group_Control_Border::get_type(),
|
| 370 |
[
|
| 371 |
'name' => 'eael_contact_form_border',
|
| 372 |
+
'selector' => '{{WRAPPER}} .eael-contact-form',
|
| 373 |
]
|
| 374 |
);
|
| 375 |
|
| 378 |
Group_Control_Box_Shadow::get_type(),
|
| 379 |
[
|
| 380 |
'name' => 'eael_contact_form_box_shadow',
|
| 381 |
+
'selector' => '{{WRAPPER}} .eael-contact-form',
|
| 382 |
]
|
| 383 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
| 384 |
|
| 385 |
+
$this->end_controls_section();
|
| 386 |
+
|
| 387 |
+
/*-----------------------------------------------------------------------------------*/
|
| 388 |
+
/* STYLE TAB
|
| 389 |
+
/*-----------------------------------------------------------------------------------*/
|
| 390 |
+
|
| 391 |
+
/**
|
| 392 |
+
* Style Tab: Title & Description
|
| 393 |
+
* -------------------------------------------------
|
| 394 |
+
*/
|
| 395 |
+
$this->start_controls_section(
|
| 396 |
+
'section_fields_title_description',
|
| 397 |
+
[
|
| 398 |
+
'label' => __( 'Title & Description', 'essential-addons-elementor' ),
|
| 399 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
| 400 |
+
]
|
| 401 |
+
);
|
| 402 |
+
|
| 403 |
+
$this->add_responsive_control(
|
| 404 |
+
'heading_alignment',
|
| 405 |
+
[
|
| 406 |
+
'label' => __( 'Alignment', 'essential-addons-elementor' ),
|
| 407 |
+
'type' => Controls_Manager::CHOOSE,
|
| 408 |
+
'options' => [
|
| 409 |
+
'left' => [
|
| 410 |
+
'title' => __( 'Left', 'essential-addons-elementor' ),
|
| 411 |
+
'icon' => 'fa fa-align-left',
|
| 412 |
+
],
|
| 413 |
+
'center' => [
|
| 414 |
+
'title' => __( 'Center', 'essential-addons-elementor' ),
|
| 415 |
+
'icon' => 'fa fa-align-center',
|
| 416 |
+
],
|
| 417 |
+
'right' => [
|
| 418 |
+
'title' => __( 'Right', 'essential-addons-elementor' ),
|
| 419 |
+
'icon' => 'fa fa-align-right',
|
| 420 |
+
],
|
| 421 |
+
],
|
| 422 |
+
'default' => '',
|
| 423 |
+
'selectors' => [
|
| 424 |
+
'{{WRAPPER}} .eael-contact-form-7 .eael-contact-form-7-heading' => 'text-align: {{VALUE}};',
|
| 425 |
+
],
|
| 426 |
+
]
|
| 427 |
+
);
|
| 428 |
+
|
| 429 |
+
$this->add_control(
|
| 430 |
+
'title_heading',
|
| 431 |
+
[
|
| 432 |
+
'label' => __( 'Title', 'essential-addons-elementor' ),
|
| 433 |
+
'type' => Controls_Manager::HEADING,
|
| 434 |
+
'separator' => 'before',
|
| 435 |
+
]
|
| 436 |
+
);
|
| 437 |
+
|
| 438 |
+
$this->add_control(
|
| 439 |
+
'title_text_color',
|
| 440 |
+
[
|
| 441 |
+
'label' => __( 'Text Color', 'essential-addons-elementor' ),
|
| 442 |
+
'type' => Controls_Manager::COLOR,
|
| 443 |
+
'default' => '',
|
| 444 |
+
'selectors' => [
|
| 445 |
+
'{{WRAPPER}} .eael-contact-form-7 .eael-contact-form-7-title' => 'color: {{VALUE}}',
|
| 446 |
+
],
|
| 447 |
+
]
|
| 448 |
+
);
|
| 449 |
+
|
| 450 |
+
$this->add_group_control(
|
| 451 |
+
Group_Control_Typography::get_type(),
|
| 452 |
+
[
|
| 453 |
+
'name' => 'title_typography',
|
| 454 |
+
'label' => __( 'Typography', 'essential-addons-elementor' ),
|
| 455 |
+
'scheme' => Scheme_Typography::TYPOGRAPHY_4,
|
| 456 |
+
'selector' => '{{WRAPPER}} .eael-contact-form-7 .eael-contact-form-7-title',
|
| 457 |
+
]
|
| 458 |
+
);
|
| 459 |
+
|
| 460 |
+
$this->add_control(
|
| 461 |
+
'description_heading',
|
| 462 |
+
[
|
| 463 |
+
'label' => __( 'Description', 'essential-addons-elementor' ),
|
| 464 |
+
'type' => Controls_Manager::HEADING,
|
| 465 |
+
'separator' => 'before',
|
| 466 |
+
]
|
| 467 |
+
);
|
| 468 |
+
|
| 469 |
+
$this->add_control(
|
| 470 |
+
'description_text_color',
|
| 471 |
+
[
|
| 472 |
+
'label' => __( 'Text Color', 'essential-addons-elementor' ),
|
| 473 |
+
'type' => Controls_Manager::COLOR,
|
| 474 |
+
'default' => '',
|
| 475 |
+
'selectors' => [
|
| 476 |
+
'{{WRAPPER}} .eael-contact-form-7 .eael-contact-form-7-description' => 'color: {{VALUE}}',
|
| 477 |
+
],
|
| 478 |
+
]
|
| 479 |
+
);
|
| 480 |
+
|
| 481 |
+
$this->add_group_control(
|
| 482 |
+
Group_Control_Typography::get_type(),
|
| 483 |
+
[
|
| 484 |
+
'name' => 'description_typography',
|
| 485 |
+
'label' => __( 'Typography', 'essential-addons-elementor' ),
|
| 486 |
+
'scheme' => Scheme_Typography::TYPOGRAPHY_4,
|
| 487 |
+
'selector' => '{{WRAPPER}} .eael-contact-form-7 .eael-contact-form-7-description',
|
| 488 |
+
]
|
| 489 |
+
);
|
| 490 |
+
|
| 491 |
+
$this->end_controls_section();
|
| 492 |
+
|
| 493 |
+
/**
|
| 494 |
+
* Style Tab: Input & Textarea
|
| 495 |
+
* -------------------------------------------------
|
| 496 |
+
*/
|
| 497 |
+
$this->start_controls_section(
|
| 498 |
+
'section_fields_style',
|
| 499 |
+
[
|
| 500 |
+
'label' => __( 'Input & Textarea', 'essential-addons-elementor' ),
|
| 501 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
| 502 |
+
]
|
| 503 |
+
);
|
| 504 |
+
|
| 505 |
+
$this->start_controls_tabs( 'tabs_fields_style' );
|
| 506 |
+
|
| 507 |
+
$this->start_controls_tab(
|
| 508 |
+
'tab_fields_normal',
|
| 509 |
+
[
|
| 510 |
+
'label' => __( 'Normal', 'essential-addons-elementor' ),
|
| 511 |
+
]
|
| 512 |
+
);
|
| 513 |
+
|
| 514 |
+
$this->add_control(
|
| 515 |
+
'field_bg',
|
| 516 |
+
[
|
| 517 |
+
'label' => __( 'Background Color', 'essential-addons-elementor' ),
|
| 518 |
+
'type' => Controls_Manager::COLOR,
|
| 519 |
+
'default' => '',
|
| 520 |
+
'selectors' => [
|
| 521 |
+
'{{WRAPPER}} .eael-contact-form-7 .wpcf7-form-control.wpcf7-text, {{WRAPPER}} .eael-contact-form-7 .wpcf7-form-control.wpcf7-textarea, {{WRAPPER}} .eael-contact-form-7 .wpcf7-form-control.wpcf7-select' => 'background-color: {{VALUE}}',
|
| 522 |
+
],
|
| 523 |
+
]
|
| 524 |
+
);
|
| 525 |
+
|
| 526 |
+
$this->add_control(
|
| 527 |
+
'field_text_color',
|
| 528 |
+
[
|
| 529 |
+
'label' => __( 'Text Color', 'essential-addons-elementor' ),
|
| 530 |
+
'type' => Controls_Manager::COLOR,
|
| 531 |
+
'default' => '',
|
| 532 |
+
'selectors' => [
|
| 533 |
+
'{{WRAPPER}} .eael-contact-form-7 .wpcf7-form-control.wpcf7-text, {{WRAPPER}} .eael-contact-form-7 .wpcf7-form-control.wpcf7-textarea, {{WRAPPER}} .eael-contact-form-7 .wpcf7-form-control.wpcf7-select' => 'color: {{VALUE}}',
|
| 534 |
+
],
|
| 535 |
+
'separator' => 'before',
|
| 536 |
+
]
|
| 537 |
+
);
|
| 538 |
+
|
| 539 |
+
$this->add_responsive_control(
|
| 540 |
+
'input_spacing',
|
| 541 |
+
[
|
| 542 |
+
'label' => __( 'Spacing', 'essential-addons-elementor' ),
|
| 543 |
+
'type' => Controls_Manager::SLIDER,
|
| 544 |
+
'default' => [
|
| 545 |
+
'size' => '20',
|
| 546 |
+
'unit' => 'px'
|
| 547 |
+
],
|
| 548 |
+
'range' => [
|
| 549 |
+
'px' => [
|
| 550 |
+
'min' => 0,
|
| 551 |
+
'max' => 100,
|
| 552 |
+
'step' => 1,
|
| 553 |
+
],
|
| 554 |
+
],
|
| 555 |
+
'size_units' => [ 'px', 'em', '%' ],
|
| 556 |
+
'selectors' => [
|
| 557 |
+
'{{WRAPPER}} .eael-contact-form-7 .wpcf7-form p:not(:last-of-type) .wpcf7-form-control-wrap' => 'margin-bottom: {{SIZE}}{{UNIT}}',
|
| 558 |
+
],
|
| 559 |
+
]
|
| 560 |
+
);
|
| 561 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 562 |
$this->add_responsive_control(
|
| 563 |
+
'field_padding',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 564 |
[
|
| 565 |
+
'label' => __( 'Padding', 'essential-addons-elementor' ),
|
| 566 |
+
'type' => Controls_Manager::DIMENSIONS,
|
| 567 |
+
'size_units' => [ 'px', 'em', '%' ],
|
| 568 |
+
'selectors' => [
|
| 569 |
+
'{{WRAPPER}} .eael-contact-form-7 .wpcf7-form-control.wpcf7-text, {{WRAPPER}} .eael-contact-form-7 .wpcf7-form-control.wpcf7-textarea' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
|
|
|
| 570 |
],
|
| 571 |
]
|
| 572 |
);
|
| 573 |
+
|
| 574 |
+
$this->add_responsive_control(
|
| 575 |
+
'text_indent',
|
| 576 |
+
[
|
| 577 |
+
'label' => __( 'Text Indent', 'essential-addons-elementor' ),
|
| 578 |
+
'type' => Controls_Manager::SLIDER,
|
| 579 |
+
'range' => [
|
| 580 |
+
'px' => [
|
| 581 |
+
'min' => 0,
|
| 582 |
+
'max' => 60,
|
| 583 |
+
'step' => 1,
|
| 584 |
+
],
|
| 585 |
+
'%' => [
|
| 586 |
+
'min' => 0,
|
| 587 |
+
'max' => 30,
|
| 588 |
+
'step' => 1,
|
| 589 |
+
],
|
| 590 |
+
],
|
| 591 |
+
'size_units' => [ 'px', 'em', '%' ],
|
| 592 |
+
'selectors' => [
|
| 593 |
+
'{{WRAPPER}} .eael-contact-form-7 .wpcf7-form-control.wpcf7-text, {{WRAPPER}} .eael-contact-form-7 .wpcf7-form-control.wpcf7-textarea, {{WRAPPER}} .eael-contact-form-7 .wpcf7-form-control.wpcf7-select' => 'text-indent: {{SIZE}}{{UNIT}}',
|
| 594 |
+
],
|
| 595 |
+
]
|
| 596 |
+
);
|
| 597 |
+
|
| 598 |
+
$this->add_responsive_control(
|
| 599 |
+
'input_width',
|
| 600 |
+
[
|
| 601 |
+
'label' => __( 'Input Width', 'essential-addons-elementor' ),
|
| 602 |
+
'type' => Controls_Manager::SLIDER,
|
| 603 |
+
'range' => [
|
| 604 |
+
'px' => [
|
| 605 |
+
'min' => 0,
|
| 606 |
+
'max' => 1200,
|
| 607 |
+
'step' => 1,
|
| 608 |
+
],
|
| 609 |
+
],
|
| 610 |
+
'size_units' => [ 'px', 'em', '%' ],
|
| 611 |
+
'selectors' => [
|
| 612 |
+
'{{WRAPPER}} .eael-contact-form-7 .wpcf7-form-control.wpcf7-text, {{WRAPPER}} .eael-contact-form-7 .wpcf7-form-control.wpcf7-select' => 'width: {{SIZE}}{{UNIT}}',
|
| 613 |
+
],
|
| 614 |
+
]
|
| 615 |
+
);
|
| 616 |
+
|
| 617 |
+
$this->add_responsive_control(
|
| 618 |
+
'textarea_width',
|
| 619 |
+
[
|
| 620 |
+
'label' => __( 'Textarea Width', 'essential-addons-elementor' ),
|
| 621 |
+
'type' => Controls_Manager::SLIDER,
|
| 622 |
+
'range' => [
|
| 623 |
+
'px' => [
|
| 624 |
+
'min' => 0,
|
| 625 |
+
'max' => 1200,
|
| 626 |
+
'step' => 1,
|
| 627 |
+
],
|
| 628 |
+
],
|
| 629 |
+
'size_units' => [ 'px', 'em', '%' ],
|
| 630 |
+
'selectors' => [
|
| 631 |
+
'{{WRAPPER}} .eael-contact-form-7 .wpcf7-form-control.wpcf7-textarea' => 'width: {{SIZE}}{{UNIT}}',
|
| 632 |
+
],
|
| 633 |
+
]
|
| 634 |
+
);
|
| 635 |
+
|
| 636 |
$this->add_group_control(
|
| 637 |
Group_Control_Border::get_type(),
|
| 638 |
[
|
| 639 |
+
'name' => 'field_border',
|
| 640 |
+
'label' => __( 'Border', 'essential-addons-elementor' ),
|
| 641 |
+
'placeholder' => '1px',
|
| 642 |
+
'default' => '1px',
|
| 643 |
+
'selector' => '{{WRAPPER}} .eael-contact-form-7 .wpcf7-form-control.wpcf7-text, {{WRAPPER}} .eael-contact-form-7 .wpcf7-form-control.wpcf7-textarea, {{WRAPPER}} .eael-contact-form-7 .wpcf7-form-control.wpcf7-select',
|
| 644 |
+
'separator' => 'before',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 645 |
]
|
| 646 |
);
|
| 647 |
|
| 648 |
$this->add_control(
|
| 649 |
+
'field_radius',
|
| 650 |
[
|
| 651 |
+
'label' => __( 'Border Radius', 'essential-addons-elementor' ),
|
| 652 |
+
'type' => Controls_Manager::DIMENSIONS,
|
| 653 |
+
'size_units' => [ 'px', 'em', '%' ],
|
| 654 |
+
'selectors' => [
|
| 655 |
+
'{{WRAPPER}} .eael-contact-form-7 .wpcf7-form-control.wpcf7-text, {{WRAPPER}} .eael-contact-form-7 .wpcf7-form-control.wpcf7-textarea' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
| 656 |
+
],
|
| 657 |
]
|
| 658 |
);
|
| 659 |
+
|
| 660 |
+
$this->add_group_control(
|
| 661 |
+
Group_Control_Typography::get_type(),
|
| 662 |
+
[
|
| 663 |
+
'name' => 'field_typography',
|
| 664 |
+
'label' => __( 'Typography', 'essential-addons-elementor' ),
|
| 665 |
+
'scheme' => Scheme_Typography::TYPOGRAPHY_4,
|
| 666 |
+
'selector' => '{{WRAPPER}} .eael-contact-form-7 .wpcf7-form-control.wpcf7-text, {{WRAPPER}} .eael-contact-form-7 .wpcf7-form-control.wpcf7-textarea, {{WRAPPER}} .eael-contact-form-7 .wpcf7-form-control.wpcf7-select',
|
| 667 |
+
'separator' => 'before',
|
| 668 |
+
]
|
| 669 |
+
);
|
| 670 |
|
| 671 |
$this->add_group_control(
|
| 672 |
Group_Control_Box_Shadow::get_type(),
|
| 673 |
[
|
| 674 |
+
'name' => 'field_box_shadow',
|
| 675 |
+
'selector' => '{{WRAPPER}} .eael-contact-form-7 .wpcf7-form-control.wpcf7-text, {{WRAPPER}} .eael-contact-form-7 .wpcf7-form-control.wpcf7-textarea, {{WRAPPER}} .eael-contact-form-7 .wpcf7-form-control.wpcf7-select',
|
| 676 |
+
'separator' => 'before',
|
| 677 |
]
|
| 678 |
);
|
| 679 |
|
| 680 |
+
$this->end_controls_tab();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 681 |
|
| 682 |
+
$this->start_controls_tab(
|
| 683 |
+
'tab_fields_focus',
|
| 684 |
+
[
|
| 685 |
+
'label' => __( 'Focus', 'essential-addons-elementor' ),
|
| 686 |
+
]
|
| 687 |
+
);
|
| 688 |
+
|
| 689 |
+
$this->add_control(
|
| 690 |
+
'field_bg_focus',
|
| 691 |
+
[
|
| 692 |
+
'label' => __( 'Background Color', 'essential-addons-elementor' ),
|
| 693 |
+
'type' => Controls_Manager::COLOR,
|
| 694 |
+
'default' => '',
|
| 695 |
+
'selectors' => [
|
| 696 |
+
'{{WRAPPER}} .eael-contact-form-7 .wpcf7-form input:focus, {{WRAPPER}} .eael-contact-form-7 .wpcf7-form textarea:focus' => 'background-color: {{VALUE}}',
|
| 697 |
+
],
|
| 698 |
+
]
|
| 699 |
+
);
|
| 700 |
|
| 701 |
+
$this->add_group_control(
|
| 702 |
+
Group_Control_Border::get_type(),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 703 |
[
|
| 704 |
+
'name' => 'input_border_focus',
|
| 705 |
+
'label' => __( 'Border', 'essential-addons-elementor' ),
|
| 706 |
+
'placeholder' => '1px',
|
| 707 |
+
'default' => '1px',
|
| 708 |
+
'selector' => '{{WRAPPER}} .eael-contact-form-7 .wpcf7-form input:focus, {{WRAPPER}} .eael-contact-form-7 .wpcf7-form textarea:focus',
|
| 709 |
+
'separator' => 'before',
|
| 710 |
]
|
| 711 |
);
|
| 712 |
+
|
| 713 |
+
$this->add_group_control(
|
| 714 |
+
Group_Control_Box_Shadow::get_type(),
|
| 715 |
[
|
| 716 |
+
'name' => 'focus_box_shadow',
|
| 717 |
+
'selector' => '{{WRAPPER}} .eael-contact-form-7 .wpcf7-form input:focus, {{WRAPPER}} .eael-contact-form-7 .wpcf7-form textarea:focus',
|
| 718 |
+
'separator' => 'before',
|
|
|
|
|
|
|
|
|
|
|
|
|
| 719 |
]
|
| 720 |
);
|
| 721 |
+
|
| 722 |
+
$this->end_controls_tab();
|
| 723 |
+
|
| 724 |
+
$this->end_controls_tabs();
|
| 725 |
+
|
| 726 |
+
$this->end_controls_section();
|
| 727 |
+
|
| 728 |
+
/**
|
| 729 |
+
* Style Tab: Label Section
|
| 730 |
+
*/
|
| 731 |
+
$this->start_controls_section(
|
| 732 |
+
'section_label_style',
|
| 733 |
+
[
|
| 734 |
+
'label' => __( 'Labels', 'essential-addons-elementor' ),
|
| 735 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
| 736 |
+
'condition' => [
|
| 737 |
+
'labels_switch' => 'yes',
|
| 738 |
+
],
|
| 739 |
+
]
|
| 740 |
+
);
|
| 741 |
+
|
| 742 |
+
$this->add_control(
|
| 743 |
+
'text_color_label',
|
| 744 |
+
[
|
| 745 |
+
'label' => __( 'Text Color', 'essential-addons-elementor' ),
|
| 746 |
+
'type' => Controls_Manager::COLOR,
|
| 747 |
+
'selectors' => [
|
| 748 |
+
'{{WRAPPER}} .eael-contact-form-7 .wpcf7-form label' => 'color: {{VALUE}}',
|
| 749 |
+
],
|
| 750 |
+
'condition' => [
|
| 751 |
+
'labels_switch' => 'yes',
|
| 752 |
+
],
|
| 753 |
+
]
|
| 754 |
+
);
|
| 755 |
+
|
| 756 |
+
$this->add_responsive_control(
|
| 757 |
+
'label_spacing',
|
| 758 |
+
[
|
| 759 |
+
'label' => __( 'Spacing', 'essential-addons-elementor' ),
|
| 760 |
+
'type' => Controls_Manager::SLIDER,
|
| 761 |
+
'range' => [
|
| 762 |
+
'px' => [
|
| 763 |
+
'min' => 0,
|
| 764 |
+
'max' => 100,
|
| 765 |
+
'step' => 1,
|
| 766 |
+
],
|
| 767 |
+
],
|
| 768 |
+
'size_units' => [ 'px', 'em', '%' ],
|
| 769 |
+
'selectors' => [
|
| 770 |
+
'{{WRAPPER}} .eael-contact-form-7 .wpcf7-form label' => 'margin-bottom: {{SIZE}}{{UNIT}}',
|
| 771 |
+
],
|
| 772 |
+
'condition' => [
|
| 773 |
+
'labels_switch' => 'yes',
|
| 774 |
+
],
|
| 775 |
+
]
|
| 776 |
+
);
|
| 777 |
+
|
| 778 |
+
$this->add_group_control(
|
| 779 |
+
Group_Control_Typography::get_type(),
|
| 780 |
+
[
|
| 781 |
+
'name' => 'typography_label',
|
| 782 |
+
'label' => __( 'Typography', 'essential-addons-elementor' ),
|
| 783 |
+
'scheme' => Scheme_Typography::TYPOGRAPHY_4,
|
| 784 |
+
'selector' => '{{WRAPPER}} .eael-contact-form-7 .wpcf7-form label',
|
| 785 |
+
'condition' => [
|
| 786 |
+
'labels_switch' => 'yes',
|
| 787 |
+
],
|
| 788 |
+
]
|
| 789 |
+
);
|
| 790 |
+
|
| 791 |
+
$this->end_controls_section();
|
| 792 |
+
|
| 793 |
+
/**
|
| 794 |
+
* Style Tab: Placeholder Section
|
| 795 |
+
*/
|
| 796 |
+
$this->start_controls_section(
|
| 797 |
+
'section_placeholder_style',
|
| 798 |
+
[
|
| 799 |
+
'label' => __( 'Placeholder', 'essential-addons-elementor' ),
|
| 800 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
| 801 |
+
]
|
| 802 |
+
);
|
| 803 |
+
|
| 804 |
+
$this->add_control(
|
| 805 |
+
'placeholder_switch',
|
| 806 |
+
[
|
| 807 |
+
'label' => __( 'Show Placeholder', 'essential-addons-elementor' ),
|
| 808 |
+
'type' => Controls_Manager::SWITCHER,
|
| 809 |
+
'default' => 'yes',
|
| 810 |
+
'label_on' => __( 'Yes', 'essential-addons-elementor' ),
|
| 811 |
+
'label_off' => __( 'No', 'essential-addons-elementor' ),
|
| 812 |
+
'return_value' => 'yes',
|
| 813 |
+
]
|
| 814 |
+
);
|
| 815 |
+
|
| 816 |
+
$this->add_control(
|
| 817 |
+
'text_color_placeholder',
|
| 818 |
+
[
|
| 819 |
+
'label' => __( 'Text Color', 'essential-addons-elementor' ),
|
| 820 |
+
'type' => Controls_Manager::COLOR,
|
| 821 |
+
'selectors' => [
|
| 822 |
+
'{{WRAPPER}} .eael-contact-form-7 .wpcf7-form-control::-webkit-input-placeholder' => 'color: {{VALUE}}',
|
| 823 |
+
],
|
| 824 |
+
'condition' => [
|
| 825 |
+
'placeholder_switch' => 'yes',
|
| 826 |
+
],
|
| 827 |
+
]
|
| 828 |
+
);
|
| 829 |
+
|
| 830 |
+
$this->add_group_control(
|
| 831 |
+
Group_Control_Typography::get_type(),
|
| 832 |
+
[
|
| 833 |
+
'name' => 'typography_placeholder',
|
| 834 |
+
'label' => __( 'Typography', 'essential-addons-elementor' ),
|
| 835 |
+
'scheme' => Scheme_Typography::TYPOGRAPHY_4,
|
| 836 |
+
'selector' => '{{WRAPPER}} .eael-contact-form-7 .wpcf7-form-control::-webkit-input-placeholder',
|
| 837 |
+
'condition' => [
|
| 838 |
+
'placeholder_switch' => 'yes',
|
| 839 |
+
],
|
| 840 |
+
]
|
| 841 |
+
);
|
| 842 |
+
|
| 843 |
+
$this->end_controls_section();
|
| 844 |
+
|
| 845 |
+
/**
|
| 846 |
+
* Style Tab: Radio & Checkbox
|
| 847 |
+
* -------------------------------------------------
|
| 848 |
+
*/
|
| 849 |
+
$this->start_controls_section(
|
| 850 |
+
'section_radio_checkbox_style',
|
| 851 |
+
[
|
| 852 |
+
'label' => __( 'Radio & Checkbox', 'essential-addons-elementor' ),
|
| 853 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
| 854 |
+
]
|
| 855 |
+
);
|
| 856 |
+
|
| 857 |
+
$this->add_control(
|
| 858 |
+
'custom_radio_checkbox',
|
| 859 |
+
[
|
| 860 |
+
'label' => __( 'Custom Styles', 'essential-addons-elementor' ),
|
| 861 |
+
'type' => Controls_Manager::SWITCHER,
|
| 862 |
+
'label_on' => __( 'Yes', 'essential-addons-elementor' ),
|
| 863 |
+
'label_off' => __( 'No', 'essential-addons-elementor' ),
|
| 864 |
+
'return_value' => 'yes',
|
| 865 |
+
]
|
| 866 |
+
);
|
| 867 |
+
|
| 868 |
+
$this->add_responsive_control(
|
| 869 |
+
'radio_checkbox_size',
|
| 870 |
+
[
|
| 871 |
+
'label' => __( 'Size', 'essential-addons-elementor' ),
|
| 872 |
+
'type' => Controls_Manager::SLIDER,
|
| 873 |
+
'default' => [
|
| 874 |
+
'size' => '15',
|
| 875 |
+
'unit' => 'px'
|
| 876 |
+
],
|
| 877 |
+
'range' => [
|
| 878 |
+
'px' => [
|
| 879 |
+
'min' => 0,
|
| 880 |
+
'max' => 80,
|
| 881 |
+
'step' => 1,
|
| 882 |
+
],
|
| 883 |
+
],
|
| 884 |
+
'size_units' => [ 'px', 'em', '%' ],
|
| 885 |
+
'selectors' => [
|
| 886 |
+
'{{WRAPPER}} .eael-custom-radio-checkbox input[type="checkbox"], {{WRAPPER}} .eael-custom-radio-checkbox input[type="radio"]' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}}',
|
| 887 |
+
],
|
| 888 |
+
'condition' => [
|
| 889 |
+
'custom_radio_checkbox' => 'yes',
|
| 890 |
+
],
|
| 891 |
+
]
|
| 892 |
+
);
|
| 893 |
+
|
| 894 |
+
$this->start_controls_tabs( 'tabs_radio_checkbox_style' );
|
| 895 |
+
|
| 896 |
+
$this->start_controls_tab(
|
| 897 |
+
'radio_checkbox_normal',
|
| 898 |
+
[
|
| 899 |
+
'label' => __( 'Normal', 'essential-addons-elementor' ),
|
| 900 |
+
'condition' => [
|
| 901 |
+
'custom_radio_checkbox' => 'yes',
|
| 902 |
+
],
|
| 903 |
+
]
|
| 904 |
+
);
|
| 905 |
+
|
| 906 |
+
$this->add_control(
|
| 907 |
+
'radio_checkbox_color',
|
| 908 |
+
[
|
| 909 |
+
'label' => __( 'Color', 'essential-addons-elementor' ),
|
| 910 |
+
'type' => Controls_Manager::COLOR,
|
| 911 |
+
'default' => '',
|
| 912 |
+
'selectors' => [
|
| 913 |
+
'{{WRAPPER}} .eael-custom-radio-checkbox input[type="checkbox"], {{WRAPPER}} .eael-custom-radio-checkbox input[type="radio"]' => 'background: {{VALUE}}',
|
| 914 |
+
],
|
| 915 |
+
'condition' => [
|
| 916 |
+
'custom_radio_checkbox' => 'yes',
|
| 917 |
+
],
|
| 918 |
+
]
|
| 919 |
+
);
|
| 920 |
+
|
| 921 |
+
$this->add_responsive_control(
|
| 922 |
+
'radio_checkbox_border_width',
|
| 923 |
+
[
|
| 924 |
+
'label' => __( 'Border Width', 'essential-addons-elementor' ),
|
| 925 |
+
'type' => Controls_Manager::SLIDER,
|
| 926 |
+
'range' => [
|
| 927 |
+
'px' => [
|
| 928 |
+
'min' => 0,
|
| 929 |
+
'max' => 15,
|
| 930 |
+
'step' => 1,
|
| 931 |
+
],
|
| 932 |
+
],
|
| 933 |
+
'size_units' => [ 'px' ],
|
| 934 |
+
'selectors' => [
|
| 935 |
+
'{{WRAPPER}} .eael-custom-radio-checkbox input[type="checkbox"], {{WRAPPER}} .eael-custom-radio-checkbox input[type="radio"]' => 'border-width: {{SIZE}}{{UNIT}}',
|
| 936 |
+
],
|
| 937 |
+
'condition' => [
|
| 938 |
+
'custom_radio_checkbox' => 'yes',
|
| 939 |
+
],
|
| 940 |
+
]
|
| 941 |
+
);
|
| 942 |
+
|
| 943 |
+
$this->add_control(
|
| 944 |
+
'radio_checkbox_border_color',
|
| 945 |
+
[
|
| 946 |
+
'label' => __( 'Border Color', 'essential-addons-elementor' ),
|
| 947 |
+
'type' => Controls_Manager::COLOR,
|
| 948 |
+
'default' => '',
|
| 949 |
+
'selectors' => [
|
| 950 |
+
'{{WRAPPER}} .eael-custom-radio-checkbox input[type="checkbox"], {{WRAPPER}} .eael-custom-radio-checkbox input[type="radio"]' => 'border-color: {{VALUE}}',
|
| 951 |
+
],
|
| 952 |
+
'condition' => [
|
| 953 |
+
'custom_radio_checkbox' => 'yes',
|
| 954 |
+
],
|
| 955 |
+
]
|
| 956 |
+
);
|
| 957 |
+
|
| 958 |
+
$this->add_control(
|
| 959 |
+
'checkbox_heading',
|
| 960 |
+
[
|
| 961 |
+
'label' => __( 'Checkbox', 'essential-addons-elementor' ),
|
| 962 |
+
'type' => Controls_Manager::HEADING,
|
| 963 |
+
'condition' => [
|
| 964 |
+
'custom_radio_checkbox' => 'yes',
|
| 965 |
+
],
|
| 966 |
+
]
|
| 967 |
+
);
|
| 968 |
+
|
| 969 |
$this->add_control(
|
| 970 |
+
'checkbox_border_radius',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 971 |
[
|
| 972 |
+
'label' => __( 'Border Radius', 'essential-addons-elementor' ),
|
| 973 |
+
'type' => Controls_Manager::DIMENSIONS,
|
| 974 |
+
'size_units' => [ 'px', 'em', '%' ],
|
| 975 |
+
'selectors' => [
|
| 976 |
+
'{{WRAPPER}} .eael-custom-radio-checkbox input[type="checkbox"], {{WRAPPER}} .eael-custom-radio-checkbox input[type="checkbox"]:before' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
| 977 |
+
],
|
| 978 |
+
'condition' => [
|
| 979 |
+
'custom_radio_checkbox' => 'yes',
|
| 980 |
+
],
|
| 981 |
]
|
| 982 |
);
|
| 983 |
+
|
| 984 |
+
$this->add_control(
|
| 985 |
+
'radio_heading',
|
| 986 |
+
[
|
| 987 |
+
'label' => __( 'Radio Buttons', 'essential-addons-elementor' ),
|
| 988 |
+
'type' => Controls_Manager::HEADING,
|
| 989 |
+
'condition' => [
|
| 990 |
+
'custom_radio_checkbox' => 'yes',
|
| 991 |
+
],
|
| 992 |
+
]
|
| 993 |
+
);
|
| 994 |
+
|
| 995 |
+
$this->add_control(
|
| 996 |
+
'radio_border_radius',
|
| 997 |
[
|
| 998 |
+
'label' => __( 'Border Radius', 'essential-addons-elementor' ),
|
| 999 |
+
'type' => Controls_Manager::DIMENSIONS,
|
| 1000 |
+
'size_units' => [ 'px', 'em', '%' ],
|
| 1001 |
+
'selectors' => [
|
| 1002 |
+
'{{WRAPPER}} .eael-custom-radio-checkbox input[type="radio"], {{WRAPPER}} .eael-custom-radio-checkbox input[type="radio"]:before' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
| 1003 |
+
],
|
| 1004 |
+
'condition' => [
|
| 1005 |
+
'custom_radio_checkbox' => 'yes',
|
| 1006 |
+
],
|
| 1007 |
]
|
| 1008 |
);
|
| 1009 |
|
| 1010 |
+
$this->end_controls_tab();
|
| 1011 |
+
|
| 1012 |
+
$this->start_controls_tab(
|
| 1013 |
+
'radio_checkbox_checked',
|
| 1014 |
+
[
|
| 1015 |
+
'label' => __( 'Checked', 'essential-addons-elementor' ),
|
| 1016 |
+
'condition' => [
|
| 1017 |
+
'custom_radio_checkbox' => 'yes',
|
| 1018 |
+
],
|
| 1019 |
+
]
|
| 1020 |
+
);
|
| 1021 |
+
|
| 1022 |
+
$this->add_control(
|
| 1023 |
+
'radio_checkbox_color_checked',
|
| 1024 |
+
[
|
| 1025 |
+
'label' => __( 'Color', 'essential-addons-elementor' ),
|
| 1026 |
+
'type' => Controls_Manager::COLOR,
|
| 1027 |
+
'default' => '',
|
| 1028 |
+
'selectors' => [
|
| 1029 |
+
'{{WRAPPER}} .eael-custom-radio-checkbox input[type="checkbox"]:checked:before, {{WRAPPER}} .eael-custom-radio-checkbox input[type="radio"]:checked:before' => 'background: {{VALUE}}',
|
| 1030 |
+
],
|
| 1031 |
+
'condition' => [
|
| 1032 |
+
'custom_radio_checkbox' => 'yes',
|
| 1033 |
+
],
|
| 1034 |
+
]
|
| 1035 |
+
);
|
| 1036 |
+
|
| 1037 |
+
$this->end_controls_tab();
|
| 1038 |
+
|
| 1039 |
+
$this->end_controls_tabs();
|
| 1040 |
+
|
| 1041 |
+
$this->end_controls_section();
|
| 1042 |
+
|
| 1043 |
+
/**
|
| 1044 |
+
* Style Tab: Submit Button
|
| 1045 |
+
*/
|
| 1046 |
+
$this->start_controls_section(
|
| 1047 |
+
'section_submit_button_style',
|
| 1048 |
+
[
|
| 1049 |
+
'label' => __( 'Submit Button', 'essential-addons-elementor' ),
|
| 1050 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
| 1051 |
+
]
|
| 1052 |
+
);
|
| 1053 |
+
|
| 1054 |
+
$this->add_responsive_control(
|
| 1055 |
+
'button_align',
|
| 1056 |
[
|
| 1057 |
+
'label' => __( 'Alignment', 'essential-addons-elementor' ),
|
| 1058 |
+
'type' => Controls_Manager::CHOOSE,
|
| 1059 |
+
'default' => 'left',
|
| 1060 |
+
'options' => [
|
| 1061 |
+
'left' => [
|
| 1062 |
+
'title' => __( 'Left', 'essential-addons-elementor' ),
|
| 1063 |
+
'icon' => 'eicon-h-align-left',
|
| 1064 |
],
|
| 1065 |
+
'center' => [
|
| 1066 |
+
'title' => __( 'Center', 'essential-addons-elementor' ),
|
| 1067 |
+
'icon' => 'eicon-h-align-center',
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1068 |
],
|
| 1069 |
+
'right' => [
|
| 1070 |
+
'title' => __( 'Right', 'essential-addons-elementor' ),
|
| 1071 |
+
'icon' => 'eicon-h-align-right',
|
| 1072 |
],
|
| 1073 |
],
|
| 1074 |
+
'selectors' => [
|
| 1075 |
+
'{{WRAPPER}} .eael-contact-form-7 .wpcf7-form p:nth-last-of-type(1)' => 'text-align: {{VALUE}};',
|
| 1076 |
+
'{{WRAPPER}} .eael-contact-form-7 .wpcf7-form input[type="submit"]' => 'display:inline-block;'
|
| 1077 |
+
],
|
| 1078 |
+
'condition' => [
|
| 1079 |
+
'button_width_type' => 'custom',
|
| 1080 |
+
],
|
| 1081 |
]
|
| 1082 |
);
|
| 1083 |
+
|
| 1084 |
+
$this->add_control(
|
| 1085 |
+
'button_width_type',
|
| 1086 |
+
[
|
| 1087 |
+
'label' => __( 'Width', 'essential-addons-elementor' ),
|
| 1088 |
+
'type' => Controls_Manager::SELECT,
|
| 1089 |
+
'default' => 'custom',
|
| 1090 |
+
'options' => [
|
| 1091 |
+
'full-width' => __( 'Full Width', 'essential-addons-elementor' ),
|
| 1092 |
+
'custom' => __( 'Custom', 'essential-addons-elementor' ),
|
| 1093 |
+
],
|
| 1094 |
+
'prefix_class' => 'eael-contact-form-7-button-',
|
| 1095 |
+
]
|
| 1096 |
+
);
|
| 1097 |
+
|
| 1098 |
+
$this->add_responsive_control(
|
| 1099 |
+
'button_width',
|
| 1100 |
+
[
|
| 1101 |
+
'label' => __( 'Width', 'essential-addons-elementor' ),
|
| 1102 |
+
'type' => Controls_Manager::SLIDER,
|
| 1103 |
+
'default' => [
|
| 1104 |
+
'size' => '100',
|
| 1105 |
+
'unit' => 'px'
|
| 1106 |
+
],
|
| 1107 |
+
'range' => [
|
| 1108 |
+
'px' => [
|
| 1109 |
+
'min' => 0,
|
| 1110 |
+
'max' => 1200,
|
| 1111 |
+
'step' => 1,
|
| 1112 |
+
],
|
| 1113 |
+
],
|
| 1114 |
+
'size_units' => [ 'px', 'em', '%' ],
|
| 1115 |
+
'selectors' => [
|
| 1116 |
+
'{{WRAPPER}} .eael-contact-form-7 .wpcf7-form input[type="submit"]' => 'width: {{SIZE}}{{UNIT}}',
|
| 1117 |
+
],
|
| 1118 |
+
'condition' => [
|
| 1119 |
+
'button_width_type' => 'custom',
|
| 1120 |
+
],
|
| 1121 |
+
]
|
| 1122 |
+
);
|
| 1123 |
+
|
| 1124 |
+
$this->start_controls_tabs( 'tabs_button_style' );
|
| 1125 |
+
|
| 1126 |
+
$this->start_controls_tab(
|
| 1127 |
+
'tab_button_normal',
|
| 1128 |
+
[
|
| 1129 |
+
'label' => __( 'Normal', 'essential-addons-elementor' ),
|
| 1130 |
+
]
|
| 1131 |
+
);
|
| 1132 |
+
|
| 1133 |
+
$this->add_control(
|
| 1134 |
+
'button_bg_color_normal',
|
| 1135 |
+
[
|
| 1136 |
+
'label' => __( 'Background Color', 'essential-addons-elementor' ),
|
| 1137 |
+
'type' => Controls_Manager::COLOR,
|
| 1138 |
+
'default' => '',
|
| 1139 |
+
'selectors' => [
|
| 1140 |
+
'{{WRAPPER}} .eael-contact-form-7 .wpcf7-form input[type="submit"]' => 'background-color: {{VALUE}}',
|
| 1141 |
+
],
|
| 1142 |
+
]
|
| 1143 |
+
);
|
| 1144 |
+
|
| 1145 |
+
$this->add_control(
|
| 1146 |
+
'button_text_color_normal',
|
| 1147 |
+
[
|
| 1148 |
+
'label' => __( 'Text Color', 'essential-addons-elementor' ),
|
| 1149 |
+
'type' => Controls_Manager::COLOR,
|
| 1150 |
+
'default' => '',
|
| 1151 |
+
'selectors' => [
|
| 1152 |
+
'{{WRAPPER}} .eael-contact-form-7 .wpcf7-form input[type="submit"]' => 'color: {{VALUE}}',
|
| 1153 |
+
],
|
| 1154 |
+
]
|
| 1155 |
+
);
|
| 1156 |
|
| 1157 |
$this->add_group_control(
|
| 1158 |
+
Group_Control_Border::get_type(),
|
| 1159 |
[
|
| 1160 |
+
'name' => 'button_border_normal',
|
| 1161 |
+
'label' => __( 'Border', 'essential-addons-elementor' ),
|
| 1162 |
+
'default' => '1px',
|
| 1163 |
+
'selector' => '{{WRAPPER}} .eael-contact-form-7 .wpcf7-form input[type="submit"]',
|
| 1164 |
]
|
| 1165 |
);
|
| 1166 |
+
|
| 1167 |
+
$this->add_control(
|
| 1168 |
+
'button_border_radius',
|
| 1169 |
[
|
| 1170 |
+
'label' => __( 'Border Radius', 'essential-addons-elementor' ),
|
| 1171 |
+
'type' => Controls_Manager::DIMENSIONS,
|
| 1172 |
+
'size_units' => [ 'px', 'em', '%' ],
|
| 1173 |
+
'selectors' => [
|
| 1174 |
+
'{{WRAPPER}} .eael-contact-form-7 .wpcf7-form input[type="submit"]' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
| 1175 |
],
|
| 1176 |
]
|
| 1177 |
);
|
| 1178 |
+
|
|
|
|
| 1179 |
$this->add_responsive_control(
|
| 1180 |
+
'button_padding',
|
| 1181 |
[
|
| 1182 |
+
'label' => __( 'Padding', 'essential-addons-elementor' ),
|
| 1183 |
+
'type' => Controls_Manager::DIMENSIONS,
|
| 1184 |
+
'size_units' => [ 'px', 'em', '%' ],
|
| 1185 |
+
'selectors' => [
|
| 1186 |
+
'{{WRAPPER}} .eael-contact-form-7 .wpcf7-form input[type="submit"]' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
| 1187 |
],
|
| 1188 |
]
|
| 1189 |
);
|
| 1190 |
+
|
| 1191 |
+
$this->add_responsive_control(
|
| 1192 |
+
'button_margin',
|
| 1193 |
+
[
|
| 1194 |
+
'label' => __( 'Margin Top', 'essential-addons-elementor' ),
|
| 1195 |
+
'type' => Controls_Manager::SLIDER,
|
| 1196 |
+
'range' => [
|
| 1197 |
+
'px' => [
|
| 1198 |
+
'min' => 0,
|
| 1199 |
+
'max' => 100,
|
| 1200 |
+
'step' => 1,
|
| 1201 |
+
],
|
| 1202 |
+
],
|
| 1203 |
+
'size_units' => [ 'px', 'em', '%' ],
|
| 1204 |
+
'selectors' => [
|
| 1205 |
+
'{{WRAPPER}} .eael-contact-form-7 .wpcf7-form input[type="submit"]' => 'margin-top: {{SIZE}}{{UNIT}}',
|
| 1206 |
+
],
|
| 1207 |
+
]
|
| 1208 |
+
);
|
| 1209 |
+
|
| 1210 |
+
$this->add_group_control(
|
| 1211 |
+
Group_Control_Typography::get_type(),
|
| 1212 |
+
[
|
| 1213 |
+
'name' => 'button_typography',
|
| 1214 |
+
'label' => __( 'Typography', 'essential-addons-elementor' ),
|
| 1215 |
+
'scheme' => Scheme_Typography::TYPOGRAPHY_4,
|
| 1216 |
+
'selector' => '{{WRAPPER}} .eael-contact-form-7 .wpcf7-form input[type="submit"]',
|
| 1217 |
+
'separator' => 'before',
|
| 1218 |
+
]
|
| 1219 |
+
);
|
| 1220 |
|
| 1221 |
+
$this->add_group_control(
|
| 1222 |
+
Group_Control_Box_Shadow::get_type(),
|
| 1223 |
[
|
| 1224 |
+
'name' => 'button_box_shadow',
|
| 1225 |
+
'selector' => '{{WRAPPER}} .eael-contact-form-7 .wpcf7-form input[type="submit"]',
|
| 1226 |
+
'separator' => 'before',
|
|
|
|
|
|
|
| 1227 |
]
|
| 1228 |
);
|
| 1229 |
+
|
| 1230 |
+
$this->end_controls_tab();
|
| 1231 |
|
| 1232 |
+
$this->start_controls_tab(
|
| 1233 |
+
'tab_button_hover',
|
| 1234 |
+
[
|
| 1235 |
+
'label' => __( 'Hover', 'essential-addons-elementor' ),
|
| 1236 |
+
]
|
| 1237 |
+
);
|
| 1238 |
+
|
| 1239 |
+
$this->add_control(
|
| 1240 |
+
'button_bg_color_hover',
|
| 1241 |
+
[
|
| 1242 |
+
'label' => __( 'Background Color', 'essential-addons-elementor' ),
|
| 1243 |
+
'type' => Controls_Manager::COLOR,
|
| 1244 |
+
'default' => '',
|
| 1245 |
+
'selectors' => [
|
| 1246 |
+
'{{WRAPPER}} .eael-contact-form-7 .wpcf7-form input[type="submit"]:hover' => 'background-color: {{VALUE}}',
|
| 1247 |
+
],
|
| 1248 |
+
]
|
| 1249 |
+
);
|
| 1250 |
+
|
| 1251 |
+
$this->add_control(
|
| 1252 |
+
'button_text_color_hover',
|
| 1253 |
+
[
|
| 1254 |
+
'label' => __( 'Text Color', 'essential-addons-elementor' ),
|
| 1255 |
+
'type' => Controls_Manager::COLOR,
|
| 1256 |
+
'default' => '',
|
| 1257 |
+
'selectors' => [
|
| 1258 |
+
'{{WRAPPER}} .eael-contact-form-7 .wpcf7-form input[type="submit"]:hover' => 'color: {{VALUE}}',
|
| 1259 |
+
],
|
| 1260 |
+
]
|
| 1261 |
+
);
|
| 1262 |
+
|
| 1263 |
+
$this->add_control(
|
| 1264 |
+
'button_border_color_hover',
|
| 1265 |
+
[
|
| 1266 |
+
'label' => __( 'Border Color', 'essential-addons-elementor' ),
|
| 1267 |
+
'type' => Controls_Manager::COLOR,
|
| 1268 |
+
'default' => '',
|
| 1269 |
+
'selectors' => [
|
| 1270 |
+
'{{WRAPPER}} .eael-contact-form-7 .wpcf7-form input[type="submit"]:hover' => 'border-color: {{VALUE}}',
|
| 1271 |
+
],
|
| 1272 |
+
]
|
| 1273 |
+
);
|
| 1274 |
+
|
| 1275 |
+
$this->end_controls_tab();
|
| 1276 |
+
|
| 1277 |
+
$this->end_controls_tabs();
|
| 1278 |
+
|
| 1279 |
+
$this->end_controls_section();
|
| 1280 |
+
|
| 1281 |
+
/**
|
| 1282 |
+
* Style Tab: Errors
|
| 1283 |
+
*/
|
| 1284 |
+
$this->start_controls_section(
|
| 1285 |
+
'section_error_style',
|
| 1286 |
+
[
|
| 1287 |
+
'label' => __( 'Errors', 'essential-addons-elementor' ),
|
| 1288 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
| 1289 |
+
]
|
| 1290 |
+
);
|
| 1291 |
+
|
| 1292 |
+
$this->add_control(
|
| 1293 |
+
'error_messages_heading',
|
| 1294 |
+
[
|
| 1295 |
+
'label' => __( 'Error Messages', 'essential-addons-elementor' ),
|
| 1296 |
+
'type' => Controls_Manager::HEADING,
|
| 1297 |
+
'condition' => [
|
| 1298 |
+
'error_messages' => 'show',
|
| 1299 |
],
|
| 1300 |
+
]
|
| 1301 |
+
);
|
| 1302 |
+
|
| 1303 |
+
$this->start_controls_tabs( 'tabs_error_messages_style' );
|
| 1304 |
+
|
| 1305 |
+
$this->start_controls_tab(
|
| 1306 |
+
'tab_error_messages_alert',
|
| 1307 |
+
[
|
| 1308 |
+
'label' => __( 'Alert', 'essential-addons-elementor' ),
|
| 1309 |
+
'condition' => [
|
| 1310 |
+
'error_messages' => 'show',
|
| 1311 |
+
],
|
| 1312 |
+
]
|
| 1313 |
+
);
|
| 1314 |
+
|
| 1315 |
+
$this->add_control(
|
| 1316 |
+
'error_alert_text_color',
|
| 1317 |
+
[
|
| 1318 |
+
'label' => __( 'Text Color', 'essential-addons-elementor' ),
|
| 1319 |
+
'type' => Controls_Manager::COLOR,
|
| 1320 |
+
'default' => '',
|
| 1321 |
+
'selectors' => [
|
| 1322 |
+
'{{WRAPPER}} .eael-contact-form-7 .wpcf7-not-valid-tip' => 'color: {{VALUE}}',
|
| 1323 |
+
],
|
| 1324 |
+
'condition' => [
|
| 1325 |
+
'error_messages' => 'show',
|
| 1326 |
+
],
|
| 1327 |
+
]
|
| 1328 |
+
);
|
| 1329 |
+
|
| 1330 |
+
$this->add_responsive_control(
|
| 1331 |
+
'error_alert_spacing',
|
| 1332 |
+
[
|
| 1333 |
+
'label' => __( 'Spacing', 'essential-addons-elementor' ),
|
| 1334 |
+
'type' => Controls_Manager::SLIDER,
|
| 1335 |
+
'range' => [
|
| 1336 |
+
'px' => [
|
| 1337 |
+
'min' => 0,
|
| 1338 |
+
'max' => 100,
|
| 1339 |
+
'step' => 1,
|
| 1340 |
+
],
|
| 1341 |
+
],
|
| 1342 |
+
'size_units' => [ 'px', 'em', '%' ],
|
| 1343 |
+
'selectors' => [
|
| 1344 |
+
'{{WRAPPER}} .eael-contact-form-7 .wpcf7-not-valid-tip' => 'margin-top: {{SIZE}}{{UNIT}}',
|
| 1345 |
+
],
|
| 1346 |
+
'condition' => [
|
| 1347 |
+
'error_messages' => 'show',
|
| 1348 |
+
],
|
| 1349 |
+
]
|
| 1350 |
+
);
|
| 1351 |
+
|
| 1352 |
+
$this->end_controls_tab();
|
| 1353 |
+
|
| 1354 |
+
$this->start_controls_tab(
|
| 1355 |
+
'tab_error_messages_fields',
|
| 1356 |
+
[
|
| 1357 |
+
'label' => __( 'Fields', 'essential-addons-elementor' ),
|
| 1358 |
+
'condition' => [
|
| 1359 |
+
'error_messages' => 'show',
|
| 1360 |
+
],
|
| 1361 |
+
]
|
| 1362 |
+
);
|
| 1363 |
+
|
| 1364 |
+
$this->add_control(
|
| 1365 |
+
'error_field_bg_color',
|
| 1366 |
+
[
|
| 1367 |
+
'label' => __( 'Background Color', 'essential-addons-elementor' ),
|
| 1368 |
+
'type' => Controls_Manager::COLOR,
|
| 1369 |
+
'default' => '',
|
| 1370 |
+
'selectors' => [
|
| 1371 |
+
'{{WRAPPER}} .eael-contact-form-7 .wpcf7-not-valid' => 'background: {{VALUE}}',
|
| 1372 |
+
],
|
| 1373 |
+
'condition' => [
|
| 1374 |
+
'error_messages' => 'show',
|
| 1375 |
+
],
|
| 1376 |
+
]
|
| 1377 |
+
);
|
| 1378 |
+
|
| 1379 |
+
$this->add_control(
|
| 1380 |
+
'error_field_color',
|
| 1381 |
+
[
|
| 1382 |
+
'label' => __( 'Text Color', 'essential-addons-elementor' ),
|
| 1383 |
+
'type' => Controls_Manager::COLOR,
|
| 1384 |
+
'default' => '',
|
| 1385 |
+
'selectors' => [
|
| 1386 |
+
'{{WRAPPER}} .eael-contact-form-7 .wpcf7-not-valid' => 'color: {{VALUE}}',
|
| 1387 |
+
],
|
| 1388 |
+
'condition' => [
|
| 1389 |
+
'error_messages' => 'show',
|
| 1390 |
+
],
|
| 1391 |
+
]
|
| 1392 |
+
);
|
| 1393 |
+
|
| 1394 |
$this->add_group_control(
|
| 1395 |
Group_Control_Border::get_type(),
|
| 1396 |
[
|
| 1397 |
+
'name' => 'error_field_border',
|
| 1398 |
+
'label' => __( 'Border', 'essential-addons-elementor' ),
|
| 1399 |
+
'placeholder' => '1px',
|
| 1400 |
+
'default' => '1px',
|
| 1401 |
+
'selector' => '{{WRAPPER}} .eael-contact-form-7 .wpcf7-not-valid',
|
| 1402 |
+
'separator' => 'before',
|
| 1403 |
+
'condition' => [
|
| 1404 |
+
'error_messages' => 'show',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1405 |
],
|
| 1406 |
]
|
| 1407 |
);
|
|
|
|
| 1408 |
|
| 1409 |
+
$this->end_controls_tab();
|
|
|
|
| 1410 |
|
| 1411 |
+
$this->end_controls_tabs();
|
| 1412 |
+
|
| 1413 |
+
$this->add_control(
|
| 1414 |
+
'validation_errors_heading',
|
| 1415 |
+
[
|
| 1416 |
+
'label' => __( 'Validation Errors', 'essential-addons-elementor' ),
|
| 1417 |
+
'type' => Controls_Manager::HEADING,
|
| 1418 |
+
'separator' => 'before',
|
| 1419 |
+
'condition' => [
|
| 1420 |
+
'validation_errors' => 'show',
|
| 1421 |
+
],
|
| 1422 |
+
]
|
| 1423 |
+
);
|
| 1424 |
|
| 1425 |
+
$this->add_control(
|
| 1426 |
+
'validation_errors_bg_color',
|
| 1427 |
+
[
|
| 1428 |
+
'label' => __( 'Background Color', 'essential-addons-elementor' ),
|
| 1429 |
+
'type' => Controls_Manager::COLOR,
|
| 1430 |
+
'default' => '',
|
| 1431 |
+
'selectors' => [
|
| 1432 |
+
'{{WRAPPER}} .eael-contact-form-7 .wpcf7-validation-errors' => 'background: {{VALUE}}',
|
| 1433 |
+
],
|
| 1434 |
+
'condition' => [
|
| 1435 |
+
'validation_errors' => 'show',
|
| 1436 |
],
|
| 1437 |
+
]
|
| 1438 |
+
);
|
| 1439 |
|
| 1440 |
+
$this->add_control(
|
| 1441 |
+
'validation_errors_color',
|
| 1442 |
+
[
|
| 1443 |
+
'label' => __( 'Text Color', 'essential-addons-elementor' ),
|
| 1444 |
+
'type' => Controls_Manager::COLOR,
|
| 1445 |
+
'default' => '',
|
| 1446 |
+
'selectors' => [
|
| 1447 |
+
'{{WRAPPER}} .eael-contact-form-7 .wpcf7-validation-errors' => 'color: {{VALUE}}',
|
| 1448 |
+
],
|
| 1449 |
+
'condition' => [
|
| 1450 |
+
'validation_errors' => 'show',
|
| 1451 |
],
|
| 1452 |
+
]
|
| 1453 |
+
);
|
| 1454 |
+
|
| 1455 |
+
$this->add_group_control(
|
| 1456 |
+
Group_Control_Typography::get_type(),
|
| 1457 |
+
[
|
| 1458 |
+
'name' => 'validation_errors_typography',
|
| 1459 |
+
'label' => __( 'Typography', 'essential-addons-elementor' ),
|
| 1460 |
+
'scheme' => Scheme_Typography::TYPOGRAPHY_4,
|
| 1461 |
+
'selector' => '{{WRAPPER}} .eael-contact-form-7 .wpcf7-validation-errors',
|
| 1462 |
+
'separator' => 'before',
|
| 1463 |
+
'condition' => [
|
| 1464 |
+
'validation_errors' => 'show',
|
| 1465 |
+
],
|
| 1466 |
+
]
|
| 1467 |
+
);
|
| 1468 |
|
| 1469 |
+
$this->add_group_control(
|
| 1470 |
+
Group_Control_Border::get_type(),
|
| 1471 |
[
|
| 1472 |
+
'name' => 'validation_errors_border',
|
| 1473 |
+
'label' => __( 'Border', 'essential-addons-elementor' ),
|
| 1474 |
+
'placeholder' => '1px',
|
| 1475 |
+
'default' => '1px',
|
| 1476 |
+
'selector' => '{{WRAPPER}} .eael-contact-form-7 .wpcf7-validation-errors',
|
| 1477 |
+
'separator' => 'before',
|
| 1478 |
+
'condition' => [
|
| 1479 |
+
'validation_errors' => 'show',
|
| 1480 |
],
|
| 1481 |
]
|
| 1482 |
);
|
| 1483 |
+
|
| 1484 |
+
$this->add_responsive_control(
|
| 1485 |
+
'validation_errors_margin',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1486 |
[
|
| 1487 |
+
'label' => __( 'Margin', 'essential-addons-elementor' ),
|
| 1488 |
+
'type' => Controls_Manager::DIMENSIONS,
|
| 1489 |
+
'size_units' => [ 'px', 'em', '%' ],
|
| 1490 |
+
'selectors' => [
|
| 1491 |
+
'{{WRAPPER}} .eael-contact-form-7 .wpcf7-validation-errors' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
| 1492 |
+
],
|
| 1493 |
+
'condition' => [
|
| 1494 |
+
'validation_errors' => 'show',
|
| 1495 |
+
],
|
| 1496 |
]
|
| 1497 |
);
|
| 1498 |
+
|
| 1499 |
+
$this->end_controls_section();
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1500 |
|
| 1501 |
+
}
|
| 1502 |
|
| 1503 |
+
/**
|
| 1504 |
+
* @access protected
|
| 1505 |
+
*/
|
| 1506 |
+
protected function render() {
|
| 1507 |
+
$settings = $this->get_settings();
|
| 1508 |
+
|
| 1509 |
+
$this->add_render_attribute( 'contact-form', 'class', [
|
| 1510 |
+
'eael-contact-form',
|
| 1511 |
+
'eael-contact-form-7',
|
| 1512 |
+
]
|
| 1513 |
+
);
|
| 1514 |
+
|
| 1515 |
+
if ( $settings['labels_switch'] != 'yes' ) {
|
| 1516 |
+
$this->add_render_attribute( 'contact-form', 'class', 'labels-hide' );
|
| 1517 |
+
}
|
| 1518 |
+
|
| 1519 |
+
if ( $settings['placeholder_switch'] == 'yes' ) {
|
| 1520 |
+
$this->add_render_attribute( 'contact-form', 'class', 'placeholder-show' );
|
| 1521 |
+
}
|
| 1522 |
+
|
| 1523 |
+
if ( $settings['custom_radio_checkbox'] == 'yes' ) {
|
| 1524 |
+
$this->add_render_attribute( 'contact-form', 'class', 'eael-custom-radio-checkbox' );
|
| 1525 |
+
}
|
| 1526 |
+
if ( $settings['eael_contact_form_alignment'] == 'left' ) {
|
| 1527 |
+
$this->add_render_attribute( 'contact-form', 'class', 'eael-contact-form-align-left' );
|
| 1528 |
+
}
|
| 1529 |
+
elseif ( $settings['eael_contact_form_alignment'] == 'center' ) {
|
| 1530 |
+
$this->add_render_attribute( 'contact-form', 'class', 'eael-contact-form-align-center' );
|
| 1531 |
+
}
|
| 1532 |
+
elseif ( $settings['eael_contact_form_alignment'] == 'right' ) {
|
| 1533 |
+
$this->add_render_attribute( 'contact-form', 'class', 'eael-contact-form-align-right' );
|
| 1534 |
+
}
|
| 1535 |
+
else {
|
| 1536 |
+
$this->add_render_attribute( 'contact-form', 'class', 'eael-contact-form-align-default' );
|
| 1537 |
+
}
|
| 1538 |
+
|
| 1539 |
+
if ( function_exists( 'wpcf7' ) ) {
|
| 1540 |
+
if ( ! empty( $settings['contact_form_list'] ) ) { ?>
|
| 1541 |
+
<div <?php echo $this->get_render_attribute_string( 'contact-form' ); ?>>
|
| 1542 |
+
<?php if ( $settings['form_title'] == 'yes' || $settings['form_description'] == 'yes' ) { ?>
|
| 1543 |
+
<div class="eael-contact-form-7-heading">
|
| 1544 |
+
<?php if ( $settings['form_title'] == 'yes' && $settings['form_title_text'] != '' ) { ?>
|
| 1545 |
+
<h3 class="eael-contact-form-title eael-contact-form-7-title">
|
| 1546 |
+
<?php echo esc_attr( $settings['form_title_text'] ); ?>
|
| 1547 |
+
</h3>
|
| 1548 |
+
<?php } ?>
|
| 1549 |
+
<?php if ( $settings['form_description'] == 'yes' && $settings['form_description_text'] != '' ) { ?>
|
| 1550 |
+
<div class="eael-contact-form-description eael-contact-form-7-description">
|
| 1551 |
+
<?php echo $this->parse_text_editor( $settings['form_description_text'] ); ?>
|
| 1552 |
+
</div>
|
| 1553 |
+
<?php } ?>
|
| 1554 |
+
</div>
|
| 1555 |
+
<?php } ?>
|
| 1556 |
+
<?php echo do_shortcode( '[contact-form-7 id="' . $settings['contact_form_list'] . '" ]' ); ?>
|
| 1557 |
+
</div>
|
| 1558 |
+
<?php
|
| 1559 |
+
}
|
| 1560 |
+
}
|
| 1561 |
+
}
|
| 1562 |
|
| 1563 |
+
/**
|
| 1564 |
+
* @access protected
|
| 1565 |
+
*/
|
| 1566 |
+
protected function _content_template() {}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1567 |
}
|
| 1568 |
|
|
|
|
| 1569 |
Plugin::instance()->widgets_manager->register_widget_type( new Widget_Eael_Contact_Form() );
|
elements/filterable-gallery/filterable-gallery.php
CHANGED
|
@@ -17,10 +17,16 @@ class Widget_Eael_Filterable_Gallery extends Widget_Base {
|
|
| 17 |
return 'eicon-gallery-grid';
|
| 18 |
}
|
| 19 |
|
| 20 |
-
|
| 21 |
return [ 'essential-addons-elementor' ];
|
| 22 |
}
|
| 23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
protected function _register_controls() {
|
| 25 |
/**
|
| 26 |
* Filter Gallery Settings
|
|
@@ -916,7 +922,7 @@ class Widget_Eael_Filterable_Gallery extends Widget_Base {
|
|
| 916 |
}
|
| 917 |
|
| 918 |
?>
|
| 919 |
-
<div id="eael-filter-gallery-wrapper-<?php echo esc_attr( $this->get_id() ); ?>" class="eael-filter-gallery-wrapper">
|
| 920 |
<div class="eael-filter-gallery-control">
|
| 921 |
<ul>
|
| 922 |
<li><a href="javascript:;" class="control" data-filter="all">All</a></li>
|
|
@@ -974,50 +980,6 @@ class Widget_Eael_Filterable_Gallery extends Widget_Base {
|
|
| 974 |
</div>
|
| 975 |
<?php endif; ?>
|
| 976 |
</div>
|
| 977 |
-
<script>
|
| 978 |
-
jQuery(document).ready( function($) {
|
| 979 |
-
|
| 980 |
-
var containerEl = document.querySelector('#eael-filter-gallery-wrapper-<?php echo esc_attr( $this->get_id() ); ?>');
|
| 981 |
-
var mixer = mixitup(containerEl, {
|
| 982 |
-
controls: {
|
| 983 |
-
scope: 'local'
|
| 984 |
-
},
|
| 985 |
-
selectors: {
|
| 986 |
-
target: '[data-ref~="mixitup-target-<?php echo esc_attr( $this->get_id() ); ?>"]'
|
| 987 |
-
},
|
| 988 |
-
animation: {
|
| 989 |
-
enable: true,
|
| 990 |
-
duration: '<?php if( !empty( $settings['eael_fg_filter_duration'] ) ) : echo $settings['eael_fg_filter_duration']; else: echo '500'; endif; ?>',
|
| 991 |
-
effects: '<?php echo $fg_animation; ?>',
|
| 992 |
-
easing: 'cubic-bezier(0.245, 0.045, 0.955, 1)',
|
| 993 |
-
}
|
| 994 |
-
});
|
| 995 |
-
|
| 996 |
-
// Set Background Image
|
| 997 |
-
<?php if( $settings['eael_fg_grid_style'] == 'eael-hoverer' || $settings['eael_fg_grid_style'] == 'eael-tiles' ) : ?>
|
| 998 |
-
var postColumn = $( '.eael-filter-gallery-container .item' );
|
| 999 |
-
postColumn.each( function() {
|
| 1000 |
-
let dataBg = $(this).attr( 'data-item-bg' );
|
| 1001 |
-
$(this).css( 'background-image', 'url( '+ dataBg +' )' );
|
| 1002 |
-
} );
|
| 1003 |
-
<?php endif; ?>
|
| 1004 |
-
// Magnific Popup
|
| 1005 |
-
<?php if( 'true' == $settings['eael_fg_show_popup'] ) : ?>
|
| 1006 |
-
$('#eael-filter-gallery-wrapper-<?php echo esc_attr( $this->get_id() ); ?> .eael-magnific-link').magnificPopup({
|
| 1007 |
-
type: 'image',
|
| 1008 |
-
gallery:{
|
| 1009 |
-
enabled: <?php if( 'true' == $settings['eael_fg_show_popup_gallery'] ) : echo 'true'; else: echo 'false'; endif; ?>
|
| 1010 |
-
},
|
| 1011 |
-
callbacks: {
|
| 1012 |
-
close: function() {
|
| 1013 |
-
$( '#elementor-lightbox' ).hide();
|
| 1014 |
-
}
|
| 1015 |
-
}
|
| 1016 |
-
});
|
| 1017 |
-
<?php endif; ?>
|
| 1018 |
-
|
| 1019 |
-
});
|
| 1020 |
-
</script>
|
| 1021 |
<?php
|
| 1022 |
}
|
| 1023 |
|
| 17 |
return 'eicon-gallery-grid';
|
| 18 |
}
|
| 19 |
|
| 20 |
+
public function get_categories() {
|
| 21 |
return [ 'essential-addons-elementor' ];
|
| 22 |
}
|
| 23 |
|
| 24 |
+
public function get_script_depends() {
|
| 25 |
+
return [
|
| 26 |
+
'eael-scripts'
|
| 27 |
+
];
|
| 28 |
+
}
|
| 29 |
+
|
| 30 |
protected function _register_controls() {
|
| 31 |
/**
|
| 32 |
* Filter Gallery Settings
|
| 922 |
}
|
| 923 |
|
| 924 |
?>
|
| 925 |
+
<div id="eael-filter-gallery-wrapper-<?php echo esc_attr( $this->get_id() ); ?>" class="eael-filter-gallery-wrapper" data-grid-style="<?php echo $settings['eael_fg_grid_style']; ?>" data-duration="<?php if( !empty( $settings['eael_fg_filter_duration'] ) ) : echo $settings['eael_fg_filter_duration']; else: echo '500'; endif; ?>" data-effects="<?php echo $fg_animation; ?>" data-popup="<?php echo $settings['eael_fg_show_popup']; ?>" data-gallery-enabled="<?php if( 'true' == $settings['eael_fg_show_popup_gallery'] ) : echo 'true'; else: echo 'false'; endif; ?>">
|
| 926 |
<div class="eael-filter-gallery-control">
|
| 927 |
<ul>
|
| 928 |
<li><a href="javascript:;" class="control" data-filter="all">All</a></li>
|
| 980 |
</div>
|
| 981 |
<?php endif; ?>
|
| 982 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 983 |
<?php
|
| 984 |
}
|
| 985 |
|
elements/gravity-form/gravity-form.php
CHANGED
|
@@ -1,71 +1,282 @@
|
|
| 1 |
<?php
|
| 2 |
namespace Elementor;
|
| 3 |
|
| 4 |
-
if ( ! defined( 'ABSPATH' ) )
|
| 5 |
-
|
|
|
|
| 6 |
|
|
|
|
|
|
|
|
|
|
| 7 |
class Widget_Eael_GravityForm extends Widget_Base {
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
$this->add_control(
|
| 35 |
-
'
|
| 36 |
[
|
| 37 |
-
'label'
|
| 38 |
-
'
|
| 39 |
-
'
|
| 40 |
-
'options'
|
|
|
|
| 41 |
]
|
| 42 |
);
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
[
|
| 50 |
-
'label'
|
| 51 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 52 |
]
|
| 53 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 54 |
|
| 55 |
$this->add_control(
|
| 56 |
-
'
|
| 57 |
[
|
| 58 |
'label' => esc_html__( 'Form Background Color', 'essential-addons-elementor' ),
|
| 59 |
'type' => Controls_Manager::COLOR,
|
| 60 |
-
'default' => '',
|
| 61 |
'selectors' => [
|
| 62 |
-
'{{WRAPPER}} .eael-
|
| 63 |
],
|
| 64 |
]
|
| 65 |
);
|
| 66 |
-
|
| 67 |
$this->add_responsive_control(
|
| 68 |
-
'
|
| 69 |
[
|
| 70 |
'label' => esc_html__( 'Form Alignment', 'essential-addons-elementor' ),
|
| 71 |
'type' => Controls_Manager::CHOOSE,
|
|
@@ -77,24 +288,23 @@ class Widget_Eael_GravityForm extends Widget_Base {
|
|
| 77 |
],
|
| 78 |
'left' => [
|
| 79 |
'title' => esc_html__( 'Left', 'essential-addons-elementor' ),
|
| 80 |
-
'icon' => '
|
| 81 |
],
|
| 82 |
'center' => [
|
| 83 |
'title' => esc_html__( 'Center', 'essential-addons-elementor' ),
|
| 84 |
-
'icon' => '
|
| 85 |
],
|
| 86 |
'right' => [
|
| 87 |
'title' => esc_html__( 'Right', 'essential-addons-elementor' ),
|
| 88 |
-
'icon' => '
|
| 89 |
],
|
| 90 |
],
|
| 91 |
'default' => 'default',
|
| 92 |
-
'prefix_class' => 'eael-gravity-form-align-',
|
| 93 |
]
|
| 94 |
);
|
| 95 |
|
| 96 |
-
|
| 97 |
-
'
|
| 98 |
[
|
| 99 |
'label' => esc_html__( 'Form Width', 'essential-addons-elementor' ),
|
| 100 |
'type' => Controls_Manager::SLIDER,
|
|
@@ -110,13 +320,13 @@ class Widget_Eael_GravityForm extends Widget_Base {
|
|
| 110 |
],
|
| 111 |
],
|
| 112 |
'selectors' => [
|
| 113 |
-
'{{WRAPPER}} .eael-
|
| 114 |
],
|
| 115 |
]
|
| 116 |
);
|
| 117 |
|
| 118 |
$this->add_responsive_control(
|
| 119 |
-
'
|
| 120 |
[
|
| 121 |
'label' => esc_html__( 'Form Max Width', 'essential-addons-elementor' ),
|
| 122 |
'type' => Controls_Manager::SLIDER,
|
|
@@ -132,585 +342,1428 @@ class Widget_Eael_GravityForm extends Widget_Base {
|
|
| 132 |
],
|
| 133 |
],
|
| 134 |
'selectors' => [
|
| 135 |
-
'{{WRAPPER}} .eael-
|
| 136 |
],
|
| 137 |
]
|
| 138 |
);
|
| 139 |
-
|
|
|
|
| 140 |
$this->add_responsive_control(
|
| 141 |
-
'
|
| 142 |
[
|
| 143 |
'label' => esc_html__( 'Form Margin', 'essential-addons-elementor' ),
|
| 144 |
'type' => Controls_Manager::DIMENSIONS,
|
| 145 |
'size_units' => [ 'px', 'em', '%' ],
|
| 146 |
'selectors' => [
|
| 147 |
-
'{{WRAPPER}} .eael-
|
| 148 |
],
|
| 149 |
]
|
| 150 |
-
);
|
| 151 |
-
|
| 152 |
$this->add_responsive_control(
|
| 153 |
-
'
|
| 154 |
[
|
| 155 |
'label' => esc_html__( 'Form Padding', 'essential-addons-elementor' ),
|
| 156 |
'type' => Controls_Manager::DIMENSIONS,
|
| 157 |
'size_units' => [ 'px', 'em', '%' ],
|
| 158 |
'selectors' => [
|
| 159 |
-
'{{WRAPPER}} .eael-
|
| 160 |
],
|
| 161 |
]
|
| 162 |
);
|
| 163 |
-
|
|
|
|
| 164 |
$this->add_control(
|
| 165 |
-
'
|
| 166 |
[
|
| 167 |
'label' => esc_html__( 'Border Radius', 'essential-addons-elementor' ),
|
| 168 |
'type' => Controls_Manager::DIMENSIONS,
|
| 169 |
'separator' => 'before',
|
| 170 |
'size_units' => [ 'px' ],
|
| 171 |
'selectors' => [
|
| 172 |
-
'{{WRAPPER}} .eael-
|
| 173 |
],
|
| 174 |
]
|
| 175 |
);
|
| 176 |
-
|
|
|
|
| 177 |
$this->add_group_control(
|
| 178 |
Group_Control_Border::get_type(),
|
| 179 |
[
|
| 180 |
-
'name' => '
|
| 181 |
-
'selector' => '{{WRAPPER}} .eael-
|
| 182 |
]
|
| 183 |
);
|
| 184 |
-
|
|
|
|
| 185 |
$this->add_group_control(
|
| 186 |
Group_Control_Box_Shadow::get_type(),
|
| 187 |
[
|
| 188 |
-
'name' => '
|
| 189 |
-
'selector' => '{{WRAPPER}} .eael-
|
| 190 |
-
]
|
| 191 |
-
);
|
| 192 |
-
|
| 193 |
-
$this->end_controls_section();
|
| 194 |
-
|
| 195 |
-
/**
|
| 196 |
-
* Form Fields Styles
|
| 197 |
-
*/
|
| 198 |
-
$this->start_controls_section(
|
| 199 |
-
'eael_section_gravity_field_styles',
|
| 200 |
-
[
|
| 201 |
-
'label' => esc_html__( 'Form Fields Styles', 'essential-addons-elementor' ),
|
| 202 |
-
'tab' => Controls_Manager::TAB_STYLE
|
| 203 |
-
]
|
| 204 |
-
);
|
| 205 |
-
|
| 206 |
-
$this->add_control(
|
| 207 |
-
'eael_gravity_input_background',
|
| 208 |
-
[
|
| 209 |
-
'label' => esc_html__( 'Input Field Background', 'essential-addons-elementor' ),
|
| 210 |
-
'type' => Controls_Manager::COLOR,
|
| 211 |
-
'selectors' => [
|
| 212 |
-
'{{WRAPPER}} .eael-gravity-container .gfield input[type="text"],
|
| 213 |
-
{{WRAPPER}} .eael-gravity-container .gfield input[type="password"],
|
| 214 |
-
{{WRAPPER}} .eael-gravity-container .gfield input[type="email"],
|
| 215 |
-
{{WRAPPER}} .eael-gravity-container .gfield input[type="url"],
|
| 216 |
-
{{WRAPPER}} .eael-gravity-container .gfield input[type="number"],
|
| 217 |
-
{{WRAPPER}} .eael-gravity-container .gfield select,
|
| 218 |
-
{{WRAPPER}} .eael-gravity-container .gfield textarea' => 'background-color: {{VALUE}};',
|
| 219 |
-
],
|
| 220 |
]
|
| 221 |
);
|
| 222 |
|
| 223 |
-
|
| 224 |
-
|
| 225 |
-
|
| 226 |
-
|
| 227 |
-
|
| 228 |
-
|
| 229 |
-
|
| 230 |
-
|
| 231 |
-
|
| 232 |
-
|
| 233 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 234 |
],
|
| 235 |
-
'
|
| 236 |
-
'
|
| 237 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
| 238 |
],
|
| 239 |
],
|
| 240 |
-
'
|
| 241 |
-
|
| 242 |
-
|
| 243 |
-
{{WRAPPER}} .eael-gravity-container .gfield input[type="email"],
|
| 244 |
-
{{WRAPPER}} .eael-gravity-container .gfield input[type="url"],
|
| 245 |
-
{{WRAPPER}} .eael-gravity-container .gfield select,
|
| 246 |
-
{{WRAPPER}} .eael-gravity-container .gfield input[type="number"]' => 'width: {{SIZE}}{{UNIT}};',
|
| 247 |
],
|
| 248 |
-
|
| 249 |
-
|
| 250 |
-
|
| 251 |
-
|
| 252 |
-
|
| 253 |
-
|
| 254 |
-
|
| 255 |
-
|
| 256 |
-
'
|
| 257 |
-
|
| 258 |
-
|
| 259 |
-
|
| 260 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 261 |
],
|
| 262 |
-
'
|
| 263 |
-
'
|
| 264 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
| 265 |
],
|
| 266 |
],
|
| 267 |
-
'
|
| 268 |
-
|
| 269 |
-
|
| 270 |
-
]
|
| 271 |
-
);
|
| 272 |
-
|
| 273 |
-
$this->add_responsive_control(
|
| 274 |
-
'eael_gravity_input_padding',
|
| 275 |
-
[
|
| 276 |
-
'label' => esc_html__( 'Fields Padding', 'essential-addons-elementor' ),
|
| 277 |
-
'type' => Controls_Manager::DIMENSIONS,
|
| 278 |
-
'size_units' => [ 'px', 'em', '%' ],
|
| 279 |
-
'selectors' => [
|
| 280 |
-
'{{WRAPPER}} .eael-gravity-container .gfield input[type="text"],
|
| 281 |
-
{{WRAPPER}} .eael-gravity-container .gfield input[type="password"],
|
| 282 |
-
{{WRAPPER}} .eael-gravity-container .gfield input[type="email"],
|
| 283 |
-
{{WRAPPER}} .eael-gravity-container .gfield input[type="url"],
|
| 284 |
-
{{WRAPPER}} .eael-gravity-container .gfield select,
|
| 285 |
-
{{WRAPPER}} .eael-gravity-container .gfield input[type="number"],
|
| 286 |
-
{{WRAPPER}} .eael-gravity-container .gfield textarea' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
| 287 |
],
|
| 288 |
]
|
| 289 |
);
|
| 290 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 291 |
|
| 292 |
-
|
| 293 |
-
|
| 294 |
-
'eael_gravity_input_border_radius',
|
| 295 |
[
|
| 296 |
-
'label'
|
| 297 |
-
'type'
|
| 298 |
-
'
|
| 299 |
-
'
|
| 300 |
-
|
| 301 |
-
'{{WRAPPER}} .eael-gravity-container .gfield input[type="text"],
|
| 302 |
-
{{WRAPPER}} .eael-gravity-container .gfield input[type="password"],
|
| 303 |
-
{{WRAPPER}} .eael-gravity-container .gfield input[type="email"],
|
| 304 |
-
{{WRAPPER}} .eael-gravity-container .gfield input[type="url"],
|
| 305 |
-
{{WRAPPER}} .eael-gravity-container .gfield select,
|
| 306 |
-
{{WRAPPER}} .eael-gravity-container .gfield input[type="number"],
|
| 307 |
-
{{WRAPPER}} .eael-gravity-container .gfield textarea' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
| 308 |
],
|
| 309 |
]
|
| 310 |
);
|
| 311 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 312 |
|
| 313 |
$this->add_group_control(
|
| 314 |
Group_Control_Border::get_type(),
|
| 315 |
[
|
| 316 |
-
'name'
|
| 317 |
-
'
|
| 318 |
-
|
| 319 |
-
|
| 320 |
-
|
| 321 |
-
|
| 322 |
-
{{WRAPPER}} .eael-gravity-container .gfield select,
|
| 323 |
-
{{WRAPPER}} .eael-gravity-container .gfield input[type="number"],
|
| 324 |
-
{{WRAPPER}} .eael-gravity-container .gfield textarea',
|
| 325 |
-
]
|
| 326 |
-
);
|
| 327 |
-
|
| 328 |
-
|
| 329 |
-
$this->add_group_control(
|
| 330 |
-
Group_Control_Box_Shadow::get_type(),
|
| 331 |
-
[
|
| 332 |
-
'name' => 'eael_gravity_input_box_shadow',
|
| 333 |
-
'selector' => '
|
| 334 |
-
{{WRAPPER}} .eael-gravity-container .gfield input[type="text"],
|
| 335 |
-
{{WRAPPER}} .eael-gravity-container .gfield input[type="password"],
|
| 336 |
-
{{WRAPPER}} .eael-gravity-container .gfield input[type="email"],
|
| 337 |
-
{{WRAPPER}} .eael-gravity-container .gfield input[type="url"],
|
| 338 |
-
{{WRAPPER}} .eael-gravity-container .gfield select,
|
| 339 |
-
{{WRAPPER}} .eael-gravity-container .gfield input[type="number"],
|
| 340 |
-
{{WRAPPER}} .eael-gravity-container .gfield textarea',
|
| 341 |
]
|
| 342 |
);
|
| 343 |
|
| 344 |
$this->add_control(
|
| 345 |
-
'
|
| 346 |
[
|
| 347 |
-
'
|
| 348 |
-
'
|
| 349 |
-
'
|
|
|
|
|
|
|
|
|
|
| 350 |
]
|
| 351 |
);
|
| 352 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 353 |
|
| 354 |
$this->add_group_control(
|
| 355 |
Group_Control_Box_Shadow::get_type(),
|
| 356 |
[
|
| 357 |
-
'name'
|
| 358 |
-
'selector'
|
| 359 |
-
|
| 360 |
-
{{WRAPPER}} .eael-gravity-container .gfield input[type="password"]:focus,
|
| 361 |
-
{{WRAPPER}} .eael-gravity-container .gfield input[type="email"]:focus,
|
| 362 |
-
{{WRAPPER}} .eael-gravity-container .gfield input[type="url"]:focus,
|
| 363 |
-
{{WRAPPER}} .eael-gravity-container .gfield select:focus,
|
| 364 |
-
{{WRAPPER}} .eael-gravity-container .gfield input[type="number"]:focus,
|
| 365 |
-
{{WRAPPER}} .eael-gravity-container .gfield textarea:focus',
|
| 366 |
]
|
| 367 |
);
|
| 368 |
|
| 369 |
-
|
| 370 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 371 |
[
|
| 372 |
-
'
|
| 373 |
-
'
|
| 374 |
-
'
|
| 375 |
-
|
| 376 |
-
|
| 377 |
-
{{WRAPPER}} .eael-gravity-container .gfield input[type="email"]:focus,
|
| 378 |
-
{{WRAPPER}} .eael-gravity-container .gfield input[type="url"]:focus,
|
| 379 |
-
{{WRAPPER}} .eael-gravity-container .gfield select:focus,
|
| 380 |
-
{{WRAPPER}} .eael-gravity-container .gfield input[type="number"]:focus,
|
| 381 |
-
{{WRAPPER}} .eael-gravity-container .gfield textarea:focus' => 'border-color: {{VALUE}};',
|
| 382 |
-
],
|
| 383 |
]
|
| 384 |
);
|
| 385 |
|
| 386 |
-
$this->
|
| 387 |
-
|
| 388 |
-
/**
|
| 389 |
-
* Typography
|
| 390 |
-
*/
|
| 391 |
-
$this->start_controls_section(
|
| 392 |
-
'eael_section_gravity_typography',
|
| 393 |
[
|
| 394 |
-
'
|
| 395 |
-
'
|
|
|
|
| 396 |
]
|
| 397 |
);
|
| 398 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 399 |
|
| 400 |
-
$this->
|
| 401 |
-
'
|
| 402 |
[
|
| 403 |
-
'label'
|
| 404 |
-
'type'
|
| 405 |
-
'
|
| 406 |
-
|
|
|
|
| 407 |
],
|
|
|
|
| 408 |
]
|
| 409 |
);
|
| 410 |
-
|
| 411 |
-
|
| 412 |
-
|
| 413 |
-
|
| 414 |
-
|
| 415 |
-
|
| 416 |
-
|
| 417 |
-
|
| 418 |
-
|
| 419 |
-
|
| 420 |
-
|
| 421 |
-
|
| 422 |
-
|
| 423 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 424 |
],
|
| 425 |
-
|
| 426 |
-
|
| 427 |
|
| 428 |
$this->add_control(
|
| 429 |
-
'
|
| 430 |
[
|
| 431 |
-
'label'
|
| 432 |
-
'type'
|
| 433 |
-
'
|
| 434 |
-
|
| 435 |
-
'{{WRAPPER}} .eael-
|
| 436 |
-
'{{WRAPPER}} .eael-gravity-container ::-ms-input-placeholder' => 'color: {{VALUE}};',
|
| 437 |
],
|
|
|
|
|
|
|
|
|
|
| 438 |
]
|
| 439 |
);
|
| 440 |
-
|
| 441 |
-
|
| 442 |
-
|
| 443 |
-
|
| 444 |
-
|
| 445 |
-
|
| 446 |
-
'
|
| 447 |
-
|
| 448 |
-
|
| 449 |
-
|
| 450 |
-
|
| 451 |
-
$this->add_group_control(
|
| 452 |
-
Group_Control_Typography::get_type(),
|
| 453 |
-
[
|
| 454 |
-
'name' => 'eael_gravity_label_typography',
|
| 455 |
-
'selector' => '{{WRAPPER}} .eael-gravity-container, {{WRAPPER}} .eael-gravity-container .wpuf-label label',
|
| 456 |
-
]
|
| 457 |
-
);
|
| 458 |
-
|
| 459 |
|
| 460 |
$this->add_control(
|
| 461 |
-
'
|
| 462 |
[
|
| 463 |
-
'
|
| 464 |
-
'
|
| 465 |
-
'
|
| 466 |
-
|
| 467 |
-
|
| 468 |
-
|
| 469 |
-
|
| 470 |
-
|
| 471 |
-
|
| 472 |
-
'name' => 'eael_gravity_input_field_typography',
|
| 473 |
-
'selector' => '{{WRAPPER}} .eael-gravity-container .gfield input[type="text"],
|
| 474 |
-
{{WRAPPER}} .eael-gravity-container .gfield input[type="password"],
|
| 475 |
-
{{WRAPPER}} .eael-gravity-container .gfield input[type="email"],
|
| 476 |
-
{{WRAPPER}} .eael-gravity-container .gfield input[type="url"],
|
| 477 |
-
{{WRAPPER}} .eael-gravity-container .gfield select,
|
| 478 |
-
{{WRAPPER}} .eael-gravity-container .gfield input[type="number"],
|
| 479 |
-
{{WRAPPER}} .eael-gravity-container .gfield textarea',
|
| 480 |
]
|
| 481 |
);
|
| 482 |
|
| 483 |
-
|
| 484 |
-
|
| 485 |
-
|
| 486 |
-
|
| 487 |
-
|
| 488 |
-
|
| 489 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 490 |
[
|
| 491 |
-
'label'
|
| 492 |
-
'
|
| 493 |
-
|
| 494 |
-
|
| 495 |
-
|
| 496 |
-
|
| 497 |
-
'eael_gravity_submit_btn_width',
|
| 498 |
-
[
|
| 499 |
-
'label' => esc_html__( 'Button Width', 'essential-addons-elementor' ),
|
| 500 |
-
'type' => Controls_Manager::SLIDER,
|
| 501 |
-
'size_units' => [ 'px', 'em', '%' ],
|
| 502 |
-
'range' => [
|
| 503 |
-
'px' => [
|
| 504 |
-
'min' => 10,
|
| 505 |
-
'max' => 1500,
|
| 506 |
-
],
|
| 507 |
-
'em' => [
|
| 508 |
-
'min' => 1,
|
| 509 |
-
'max' => 80,
|
| 510 |
-
],
|
| 511 |
-
],
|
| 512 |
-
'selectors' => [
|
| 513 |
-
'{{WRAPPER}} .eael-gravity-container .gform_button' => 'width: {{SIZE}}{{UNIT}};',
|
| 514 |
-
],
|
| 515 |
-
]
|
| 516 |
-
);
|
| 517 |
-
|
| 518 |
-
$this->add_responsive_control(
|
| 519 |
-
'eael_gravity_submit_btn_alignment',
|
| 520 |
-
[
|
| 521 |
-
'label' => esc_html__( 'Button Alignment', 'essential-addons-elementor' ),
|
| 522 |
-
'type' => Controls_Manager::CHOOSE,
|
| 523 |
-
'label_block' => true,
|
| 524 |
-
'options' => [
|
| 525 |
-
'default' => [
|
| 526 |
-
'title' => __( 'Default', 'essential-addons-elementor' ),
|
| 527 |
-
'icon' => 'fa fa-ban',
|
| 528 |
],
|
| 529 |
-
'
|
| 530 |
-
'title'
|
| 531 |
-
'icon'
|
| 532 |
-
],
|
| 533 |
-
'center' => [
|
| 534 |
-
'title' => esc_html__( 'Center', 'essential-addons-elementor' ),
|
| 535 |
-
'icon' => 'fa fa-align-center',
|
| 536 |
],
|
| 537 |
-
'right'
|
| 538 |
-
'title'
|
| 539 |
-
'icon'
|
| 540 |
],
|
| 541 |
],
|
| 542 |
-
'default'
|
| 543 |
-
'
|
| 544 |
-
|
| 545 |
-
|
| 546 |
-
|
| 547 |
-
$this->add_group_control(
|
| 548 |
-
Group_Control_Typography::get_type(),
|
| 549 |
-
[
|
| 550 |
-
'name' => 'eael_gravity_submit_btn_typography',
|
| 551 |
-
'scheme' => Scheme_Typography::TYPOGRAPHY_1,
|
| 552 |
-
'selector' => '{{WRAPPER}} .eael-gravity-container .gform_button',
|
| 553 |
-
]
|
| 554 |
-
);
|
| 555 |
-
|
| 556 |
-
$this->add_responsive_control(
|
| 557 |
-
'eael_gravity_submit_btn_margin',
|
| 558 |
-
[
|
| 559 |
-
'label' => esc_html__( 'Margin', 'essential-addons-elementor' ),
|
| 560 |
-
'type' => Controls_Manager::DIMENSIONS,
|
| 561 |
-
'size_units' => [ 'px', 'em', '%' ],
|
| 562 |
-
'selectors' => [
|
| 563 |
-
'{{WRAPPER}} .eael-gravity-container .gform_button' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
| 564 |
],
|
|
|
|
|
|
|
|
|
|
| 565 |
]
|
| 566 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 567 |
|
| 568 |
-
$this->
|
| 569 |
-
|
| 570 |
[
|
| 571 |
-
'
|
| 572 |
-
'
|
| 573 |
-
'
|
| 574 |
-
'
|
| 575 |
-
|
| 576 |
-
],
|
| 577 |
]
|
| 578 |
);
|
| 579 |
|
| 580 |
-
$this->start_controls_tabs( 'eael_gravity_submit_button_tabs' );
|
| 581 |
-
|
| 582 |
-
$this->start_controls_tab( 'normal', [ 'label' => esc_html__( 'Normal', 'essential-addons-elementor' ) ] );
|
| 583 |
-
|
| 584 |
$this->add_control(
|
| 585 |
-
'
|
| 586 |
[
|
| 587 |
-
'label'
|
| 588 |
-
'type'
|
| 589 |
-
'
|
| 590 |
-
|
|
|
|
| 591 |
],
|
| 592 |
]
|
| 593 |
);
|
| 594 |
|
| 595 |
-
$this->
|
| 596 |
-
'
|
| 597 |
[
|
| 598 |
-
'label'
|
| 599 |
-
'type'
|
| 600 |
-
'
|
| 601 |
-
|
|
|
|
| 602 |
],
|
| 603 |
]
|
| 604 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 605 |
|
| 606 |
$this->add_group_control(
|
| 607 |
-
|
| 608 |
[
|
| 609 |
-
'name'
|
| 610 |
-
'selector'
|
|
|
|
| 611 |
]
|
| 612 |
);
|
| 613 |
-
|
| 614 |
-
|
| 615 |
-
|
| 616 |
-
|
| 617 |
-
|
| 618 |
-
|
| 619 |
-
|
| 620 |
-
|
| 621 |
-
|
| 622 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 623 |
],
|
| 624 |
-
|
| 625 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 626 |
],
|
| 627 |
-
|
| 628 |
-
|
| 629 |
-
|
| 630 |
-
|
| 631 |
-
|
| 632 |
-
|
| 633 |
-
|
| 634 |
-
|
| 635 |
-
|
| 636 |
-
|
| 637 |
-
|
| 638 |
-
[
|
| 639 |
-
'label' => esc_html__( 'Text Color', 'essential-addons-elementor' ),
|
| 640 |
-
'type' => Controls_Manager::COLOR,
|
| 641 |
-
'selectors' => [
|
| 642 |
-
'{{WRAPPER}} .eael-gravity-container .gform_button:hover' => 'color: {{VALUE}};',
|
| 643 |
],
|
| 644 |
-
|
| 645 |
-
|
| 646 |
-
|
| 647 |
-
|
| 648 |
-
|
| 649 |
-
|
| 650 |
-
|
| 651 |
-
|
| 652 |
-
|
| 653 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 654 |
],
|
| 655 |
-
|
| 656 |
-
|
| 657 |
-
|
| 658 |
-
|
| 659 |
-
|
| 660 |
-
|
| 661 |
-
|
| 662 |
-
|
| 663 |
-
|
| 664 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 665 |
],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 666 |
]
|
| 667 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 668 |
|
| 669 |
-
$this->end_controls_tab();
|
| 670 |
-
|
| 671 |
-
$this->end_controls_tabs();
|
| 672 |
-
|
| 673 |
-
|
| 674 |
-
$this->add_group_control(
|
| 675 |
-
Group_Control_Box_Shadow::get_type(),
|
| 676 |
-
[
|
| 677 |
-
'name' => 'eael_gravity_submit_btn_box_shadow',
|
| 678 |
-
'selector' => '{{WRAPPER}} .eael-gravity-container .gform_button',
|
| 679 |
-
]
|
| 680 |
-
);
|
| 681 |
-
|
| 682 |
-
|
| 683 |
-
$this->end_controls_section();
|
| 684 |
-
|
| 685 |
-
}
|
| 686 |
-
|
| 687 |
-
|
| 688 |
-
protected function render( ) {
|
| 689 |
-
|
| 690 |
-
$settings = $this->get_settings();
|
| 691 |
-
|
| 692 |
-
|
| 693 |
-
?>
|
| 694 |
-
|
| 695 |
-
|
| 696 |
-
<?php if ( ! empty( $settings['eael_gravity_form'] ) ) : ?>
|
| 697 |
-
<div class="eael-gravity-container">
|
| 698 |
-
<?php echo do_shortcode( '[gravityform id="'.$settings['eael_gravity_form'].'" title="true" description="true"]' ); ?>
|
| 699 |
-
</div>
|
| 700 |
-
<?php endif; ?>
|
| 701 |
-
|
| 702 |
-
<?php
|
| 703 |
-
|
| 704 |
-
}
|
| 705 |
-
|
| 706 |
-
protected function content_template() {''
|
| 707 |
-
|
| 708 |
-
?>
|
| 709 |
-
|
| 710 |
-
|
| 711 |
-
<?php
|
| 712 |
-
}
|
| 713 |
}
|
| 714 |
|
| 715 |
-
|
| 716 |
Plugin::instance()->widgets_manager->register_widget_type( new Widget_Eael_GravityForm() );
|
| 1 |
<?php
|
| 2 |
namespace Elementor;
|
| 3 |
|
| 4 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
| 5 |
+
exit; // Exit if accessed directly.
|
| 6 |
+
}
|
| 7 |
|
| 8 |
+
/**
|
| 9 |
+
* Gravity Forms Widget
|
| 10 |
+
*/
|
| 11 |
class Widget_Eael_GravityForm extends Widget_Base {
|
| 12 |
+
|
| 13 |
+
/**
|
| 14 |
+
* Retrieve gravity forms widget name.
|
| 15 |
+
*
|
| 16 |
+
* @access public
|
| 17 |
+
*
|
| 18 |
+
* @return string Widget name.
|
| 19 |
+
*/
|
| 20 |
+
public function get_name() {
|
| 21 |
+
return 'eael-gravity-form';
|
| 22 |
+
}
|
| 23 |
+
|
| 24 |
+
/**
|
| 25 |
+
* Retrieve gravity forms widget title.
|
| 26 |
+
*
|
| 27 |
+
* @access public
|
| 28 |
+
*
|
| 29 |
+
* @return string Widget title.
|
| 30 |
+
*/
|
| 31 |
+
public function get_title() {
|
| 32 |
+
return __( 'EA Gravity Forms', 'essential-addons-elementor' );
|
| 33 |
+
}
|
| 34 |
+
|
| 35 |
+
/**
|
| 36 |
+
* Retrieve the list of categories the gravity forms widget belongs to.
|
| 37 |
+
*
|
| 38 |
+
* Used to determine where to display the widget in the editor.
|
| 39 |
+
*
|
| 40 |
+
* @access public
|
| 41 |
+
*
|
| 42 |
+
* @return array Widget categories.
|
| 43 |
+
*/
|
| 44 |
+
public function get_categories() {
|
| 45 |
+
return [ 'essential-addons-elementor' ];
|
| 46 |
+
}
|
| 47 |
+
|
| 48 |
+
/**
|
| 49 |
+
* Retrieve gravity forms widget icon.
|
| 50 |
+
*
|
| 51 |
+
* @access public
|
| 52 |
+
*
|
| 53 |
+
* @return string Widget icon.
|
| 54 |
+
*/
|
| 55 |
+
public function get_icon() {
|
| 56 |
+
return 'fa fa-envelope-o';
|
| 57 |
+
}
|
| 58 |
+
|
| 59 |
+
/**
|
| 60 |
+
* Register gravity forms widget controls.
|
| 61 |
+
*
|
| 62 |
+
* Adds different input fields to allow the user to change and customize the widget settings.
|
| 63 |
+
*
|
| 64 |
+
* @access protected
|
| 65 |
+
*/
|
| 66 |
+
protected function _register_controls() {
|
| 67 |
+
|
| 68 |
+
/*-----------------------------------------------------------------------------------*/
|
| 69 |
+
/* CONTENT TAB
|
| 70 |
+
/*-----------------------------------------------------------------------------------*/
|
| 71 |
+
|
| 72 |
+
/**
|
| 73 |
+
* Content Tab: Contact Form
|
| 74 |
+
* -------------------------------------------------
|
| 75 |
+
*/
|
| 76 |
+
$this->start_controls_section(
|
| 77 |
+
'section_info_box',
|
| 78 |
+
[
|
| 79 |
+
'label' => __( 'Gravity Forms', 'essential-addons-elementor' ),
|
| 80 |
+
]
|
| 81 |
+
);
|
| 82 |
+
|
| 83 |
$this->add_control(
|
| 84 |
+
'contact_form_list',
|
| 85 |
[
|
| 86 |
+
'label' => esc_html__( 'Select Form', 'essential-addons-elementor' ),
|
| 87 |
+
'type' => Controls_Manager::SELECT,
|
| 88 |
+
'label_block' => true,
|
| 89 |
+
'options' => eael_select_gravity_form(),
|
| 90 |
+
'default' => '0',
|
| 91 |
]
|
| 92 |
);
|
| 93 |
+
|
| 94 |
+
$this->add_control(
|
| 95 |
+
'custom_title_description',
|
| 96 |
+
[
|
| 97 |
+
'label' => __( 'Custom Title & Description', 'essential-addons-elementor' ),
|
| 98 |
+
'type' => Controls_Manager::SWITCHER,
|
| 99 |
+
'label_on' => __( 'Yes', 'essential-addons-elementor' ),
|
| 100 |
+
'label_off' => __( 'No', 'essential-addons-elementor' ),
|
| 101 |
+
'return_value' => 'yes',
|
| 102 |
+
]
|
| 103 |
+
);
|
| 104 |
+
|
| 105 |
+
$this->add_control(
|
| 106 |
+
'form_title',
|
| 107 |
+
[
|
| 108 |
+
'label' => __( 'Title', 'essential-addons-elementor' ),
|
| 109 |
+
'type' => Controls_Manager::SWITCHER,
|
| 110 |
+
'default' => 'yes',
|
| 111 |
+
'label_on' => __( 'Show', 'essential-addons-elementor' ),
|
| 112 |
+
'label_off' => __( 'Hide', 'essential-addons-elementor' ),
|
| 113 |
+
'return_value' => 'yes',
|
| 114 |
+
'condition' => [
|
| 115 |
+
'custom_title_description!' => 'yes',
|
| 116 |
+
],
|
| 117 |
+
]
|
| 118 |
+
);
|
| 119 |
+
|
| 120 |
+
$this->add_control(
|
| 121 |
+
'form_description',
|
| 122 |
+
[
|
| 123 |
+
'label' => __( 'Description', 'essential-addons-elementor' ),
|
| 124 |
+
'type' => Controls_Manager::SWITCHER,
|
| 125 |
+
'default' => 'yes',
|
| 126 |
+
'label_on' => __( 'Show', 'essential-addons-elementor' ),
|
| 127 |
+
'label_off' => __( 'Hide', 'essential-addons-elementor' ),
|
| 128 |
+
'return_value' => 'yes',
|
| 129 |
+
'condition' => [
|
| 130 |
+
'custom_title_description!' => 'yes',
|
| 131 |
+
],
|
| 132 |
+
]
|
| 133 |
+
);
|
| 134 |
+
|
| 135 |
+
$this->add_control(
|
| 136 |
+
'form_title_custom',
|
| 137 |
[
|
| 138 |
+
'label' => esc_html__( 'Title', 'essential-addons-elementor' ),
|
| 139 |
+
'type' => Controls_Manager::TEXT,
|
| 140 |
+
'label_block' => true,
|
| 141 |
+
'default' => '',
|
| 142 |
+
'condition' => [
|
| 143 |
+
'custom_title_description' => 'yes',
|
| 144 |
+
],
|
| 145 |
]
|
| 146 |
);
|
| 147 |
+
|
| 148 |
+
$this->add_control(
|
| 149 |
+
'form_description_custom',
|
| 150 |
+
[
|
| 151 |
+
'label' => esc_html__( 'Description', 'essential-addons-elementor' ),
|
| 152 |
+
'type' => Controls_Manager::TEXTAREA,
|
| 153 |
+
'default' => '',
|
| 154 |
+
'condition' => [
|
| 155 |
+
'custom_title_description' => 'yes',
|
| 156 |
+
],
|
| 157 |
+
]
|
| 158 |
+
);
|
| 159 |
+
|
| 160 |
+
$this->add_control(
|
| 161 |
+
'labels_switch',
|
| 162 |
+
[
|
| 163 |
+
'label' => __( 'Labels', 'essential-addons-elementor' ),
|
| 164 |
+
'type' => Controls_Manager::SWITCHER,
|
| 165 |
+
'default' => 'yes',
|
| 166 |
+
'label_on' => __( 'Show', 'essential-addons-elementor' ),
|
| 167 |
+
'label_off' => __( 'Hide', 'essential-addons-elementor' ),
|
| 168 |
+
'return_value' => 'yes',
|
| 169 |
+
]
|
| 170 |
+
);
|
| 171 |
+
|
| 172 |
+
$this->add_control(
|
| 173 |
+
'placeholder_switch',
|
| 174 |
+
[
|
| 175 |
+
'label' => __( 'Placeholder', 'essential-addons-elementor' ),
|
| 176 |
+
'type' => Controls_Manager::SWITCHER,
|
| 177 |
+
'default' => 'yes',
|
| 178 |
+
'label_on' => __( 'Show', 'essential-addons-elementor' ),
|
| 179 |
+
'label_off' => __( 'Hide', 'essential-addons-elementor' ),
|
| 180 |
+
'return_value' => 'yes',
|
| 181 |
+
]
|
| 182 |
+
);
|
| 183 |
+
|
| 184 |
+
$this->add_control(
|
| 185 |
+
'form_ajax',
|
| 186 |
+
[
|
| 187 |
+
'label' => __( 'Use Ajax', 'essential-addons-elementor' ),
|
| 188 |
+
'type' => Controls_Manager::SWITCHER,
|
| 189 |
+
'description' => __( 'Use ajax to submit the form', 'essential-addons-elementor' ),
|
| 190 |
+
'label_on' => __( 'Yes', 'essential-addons-elementor' ),
|
| 191 |
+
'label_off' => __( 'No', 'essential-addons-elementor' ),
|
| 192 |
+
'return_value' => 'yes',
|
| 193 |
+
]
|
| 194 |
+
);
|
| 195 |
+
|
| 196 |
+
$this->end_controls_section();
|
| 197 |
+
|
| 198 |
+
/**
|
| 199 |
+
* Content Tab: Errors
|
| 200 |
+
* -------------------------------------------------
|
| 201 |
+
*/
|
| 202 |
+
$this->start_controls_section(
|
| 203 |
+
'section_errors',
|
| 204 |
+
[
|
| 205 |
+
'label' => __( 'Errors', 'essential-addons-elementor' ),
|
| 206 |
+
]
|
| 207 |
+
);
|
| 208 |
+
|
| 209 |
+
$this->add_control(
|
| 210 |
+
'error_messages',
|
| 211 |
+
[
|
| 212 |
+
'label' => __( 'Error Messages', 'essential-addons-elementor' ),
|
| 213 |
+
'type' => Controls_Manager::SELECT,
|
| 214 |
+
'default' => 'show',
|
| 215 |
+
'options' => [
|
| 216 |
+
'show' => __( 'Show', 'essential-addons-elementor' ),
|
| 217 |
+
'hide' => __( 'Hide', 'essential-addons-elementor' ),
|
| 218 |
+
],
|
| 219 |
+
'selectors_dictionary' => [
|
| 220 |
+
'show' => 'block',
|
| 221 |
+
'hide' => 'none',
|
| 222 |
+
],
|
| 223 |
+
'selectors' => [
|
| 224 |
+
'{{WRAPPER}} .eael-gravity-form .validation_message' => 'display: {{VALUE}} !important;',
|
| 225 |
+
],
|
| 226 |
+
]
|
| 227 |
+
);
|
| 228 |
+
|
| 229 |
+
$this->add_control(
|
| 230 |
+
'validation_errors',
|
| 231 |
+
[
|
| 232 |
+
'label' => __( 'Validation Errors', 'essential-addons-elementor' ),
|
| 233 |
+
'type' => Controls_Manager::SELECT,
|
| 234 |
+
'default' => 'show',
|
| 235 |
+
'options' => [
|
| 236 |
+
'show' => __( 'Show', 'essential-addons-elementor' ),
|
| 237 |
+
'hide' => __( 'Hide', 'essential-addons-elementor' ),
|
| 238 |
+
],
|
| 239 |
+
'selectors_dictionary' => [
|
| 240 |
+
'show' => 'block',
|
| 241 |
+
'hide' => 'none',
|
| 242 |
+
],
|
| 243 |
+
'selectors' => [
|
| 244 |
+
'{{WRAPPER}} .eael-gravity-form .validation_error' => 'display: {{VALUE}} !important;',
|
| 245 |
+
],
|
| 246 |
+
]
|
| 247 |
+
);
|
| 248 |
+
|
| 249 |
+
$this->end_controls_section();
|
| 250 |
+
|
| 251 |
+
/*-----------------------------------------------------------------------------------*/
|
| 252 |
+
/* STYLE TAB
|
| 253 |
+
/*-----------------------------------------------------------------------------------*/
|
| 254 |
+
|
| 255 |
+
/**
|
| 256 |
+
* Style Tab: Form Container
|
| 257 |
+
* -------------------------------------------------
|
| 258 |
+
*/
|
| 259 |
+
$this->start_controls_section(
|
| 260 |
+
'section_container_style',
|
| 261 |
+
[
|
| 262 |
+
'label' => __( 'Form Container', 'essential-addons-elementor' ),
|
| 263 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
| 264 |
+
]
|
| 265 |
+
);
|
| 266 |
|
| 267 |
$this->add_control(
|
| 268 |
+
'eael_gravity_form_background',
|
| 269 |
[
|
| 270 |
'label' => esc_html__( 'Form Background Color', 'essential-addons-elementor' ),
|
| 271 |
'type' => Controls_Manager::COLOR,
|
|
|
|
| 272 |
'selectors' => [
|
| 273 |
+
'{{WRAPPER}} .eael-contact-form' => 'background: {{VALUE}};',
|
| 274 |
],
|
| 275 |
]
|
| 276 |
);
|
| 277 |
+
|
| 278 |
$this->add_responsive_control(
|
| 279 |
+
'eael_gravity_form_alignment',
|
| 280 |
[
|
| 281 |
'label' => esc_html__( 'Form Alignment', 'essential-addons-elementor' ),
|
| 282 |
'type' => Controls_Manager::CHOOSE,
|
| 288 |
],
|
| 289 |
'left' => [
|
| 290 |
'title' => esc_html__( 'Left', 'essential-addons-elementor' ),
|
| 291 |
+
'icon' => 'eicon-h-align-left',
|
| 292 |
],
|
| 293 |
'center' => [
|
| 294 |
'title' => esc_html__( 'Center', 'essential-addons-elementor' ),
|
| 295 |
+
'icon' => 'eicon-h-align-center',
|
| 296 |
],
|
| 297 |
'right' => [
|
| 298 |
'title' => esc_html__( 'Right', 'essential-addons-elementor' ),
|
| 299 |
+
'icon' => 'eicon-h-align-right',
|
| 300 |
],
|
| 301 |
],
|
| 302 |
'default' => 'default',
|
|
|
|
| 303 |
]
|
| 304 |
);
|
| 305 |
|
| 306 |
+
$this->add_responsive_control(
|
| 307 |
+
'eael_gravity_form_width',
|
| 308 |
[
|
| 309 |
'label' => esc_html__( 'Form Width', 'essential-addons-elementor' ),
|
| 310 |
'type' => Controls_Manager::SLIDER,
|
| 320 |
],
|
| 321 |
],
|
| 322 |
'selectors' => [
|
| 323 |
+
'{{WRAPPER}} .eael-contact-form' => 'width: {{SIZE}}{{UNIT}};',
|
| 324 |
],
|
| 325 |
]
|
| 326 |
);
|
| 327 |
|
| 328 |
$this->add_responsive_control(
|
| 329 |
+
'eael_gravity_form_max_width',
|
| 330 |
[
|
| 331 |
'label' => esc_html__( 'Form Max Width', 'essential-addons-elementor' ),
|
| 332 |
'type' => Controls_Manager::SLIDER,
|
| 342 |
],
|
| 343 |
],
|
| 344 |
'selectors' => [
|
| 345 |
+
'{{WRAPPER}} .eael-contact-form' => 'max-width: {{SIZE}}{{UNIT}};',
|
| 346 |
],
|
| 347 |
]
|
| 348 |
);
|
| 349 |
+
|
| 350 |
+
|
| 351 |
$this->add_responsive_control(
|
| 352 |
+
'eael_gravity_form_margin',
|
| 353 |
[
|
| 354 |
'label' => esc_html__( 'Form Margin', 'essential-addons-elementor' ),
|
| 355 |
'type' => Controls_Manager::DIMENSIONS,
|
| 356 |
'size_units' => [ 'px', 'em', '%' ],
|
| 357 |
'selectors' => [
|
| 358 |
+
'{{WRAPPER}} .eael-contact-form' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
| 359 |
],
|
| 360 |
]
|
| 361 |
+
);
|
| 362 |
+
|
| 363 |
$this->add_responsive_control(
|
| 364 |
+
'eael_gravity_form_padding',
|
| 365 |
[
|
| 366 |
'label' => esc_html__( 'Form Padding', 'essential-addons-elementor' ),
|
| 367 |
'type' => Controls_Manager::DIMENSIONS,
|
| 368 |
'size_units' => [ 'px', 'em', '%' ],
|
| 369 |
'selectors' => [
|
| 370 |
+
'{{WRAPPER}} .eael-contact-form' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
| 371 |
],
|
| 372 |
]
|
| 373 |
);
|
| 374 |
+
|
| 375 |
+
|
| 376 |
$this->add_control(
|
| 377 |
+
'eael_gravity_form_border_radius',
|
| 378 |
[
|
| 379 |
'label' => esc_html__( 'Border Radius', 'essential-addons-elementor' ),
|
| 380 |
'type' => Controls_Manager::DIMENSIONS,
|
| 381 |
'separator' => 'before',
|
| 382 |
'size_units' => [ 'px' ],
|
| 383 |
'selectors' => [
|
| 384 |
+
'{{WRAPPER}} .eael-contact-form' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
| 385 |
],
|
| 386 |
]
|
| 387 |
);
|
| 388 |
+
|
| 389 |
+
|
| 390 |
$this->add_group_control(
|
| 391 |
Group_Control_Border::get_type(),
|
| 392 |
[
|
| 393 |
+
'name' => 'eael_gravity_form_border',
|
| 394 |
+
'selector' => '{{WRAPPER}} .eael-contact-form',
|
| 395 |
]
|
| 396 |
);
|
| 397 |
+
|
| 398 |
+
|
| 399 |
$this->add_group_control(
|
| 400 |
Group_Control_Box_Shadow::get_type(),
|
| 401 |
[
|
| 402 |
+
'name' => 'eael_gravity_form_box_shadow',
|
| 403 |
+
'selector' => '{{WRAPPER}} .eael-contact-form',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 404 |
]
|
| 405 |
);
|
| 406 |
|
| 407 |
+
$this->end_controls_section();
|
| 408 |
+
/**
|
| 409 |
+
* Style Tab: Title and Description
|
| 410 |
+
* -------------------------------------------------
|
| 411 |
+
*/
|
| 412 |
+
$this->start_controls_section(
|
| 413 |
+
'section_general_style',
|
| 414 |
+
[
|
| 415 |
+
'label' => __( 'Title & Description', 'essential-addons-elementor' ),
|
| 416 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
| 417 |
+
]
|
| 418 |
+
);
|
| 419 |
+
|
| 420 |
+
$this->add_responsive_control(
|
| 421 |
+
'heading_alignment',
|
| 422 |
+
[
|
| 423 |
+
'label' => __( 'Alignment', 'essential-addons-elementor' ),
|
| 424 |
+
'type' => Controls_Manager::CHOOSE,
|
| 425 |
+
'options' => [
|
| 426 |
+
'left' => [
|
| 427 |
+
'title' => __( 'Left', 'essential-addons-elementor' ),
|
| 428 |
+
'icon' => 'fa fa-align-left',
|
| 429 |
],
|
| 430 |
+
'center' => [
|
| 431 |
+
'title' => __( 'Center', 'essential-addons-elementor' ),
|
| 432 |
+
'icon' => 'fa fa-align-center',
|
| 433 |
+
],
|
| 434 |
+
'right' => [
|
| 435 |
+
'title' => __( 'Right', 'essential-addons-elementor' ),
|
| 436 |
+
'icon' => 'fa fa-align-right',
|
| 437 |
],
|
| 438 |
],
|
| 439 |
+
'default' => '',
|
| 440 |
+
'selectors' => [
|
| 441 |
+
'{{WRAPPER}} .eael-gravity-form .gform_wrapper .gform_heading' => 'text-align: {{VALUE}};',
|
|
|
|
|
|
|
|
|
|
|
|
|
| 442 |
],
|
| 443 |
+
]
|
| 444 |
+
);
|
| 445 |
+
|
| 446 |
+
$this->add_control(
|
| 447 |
+
'title_heading',
|
| 448 |
+
[
|
| 449 |
+
'label' => __( 'Title', 'essential-addons-elementor' ),
|
| 450 |
+
'type' => Controls_Manager::HEADING,
|
| 451 |
+
'separator' => 'before',
|
| 452 |
+
]
|
| 453 |
+
);
|
| 454 |
+
|
| 455 |
+
$this->add_control(
|
| 456 |
+
'title_text_color',
|
| 457 |
+
[
|
| 458 |
+
'label' => __( 'Text Color', 'essential-addons-elementor' ),
|
| 459 |
+
'type' => Controls_Manager::COLOR,
|
| 460 |
+
'default' => '',
|
| 461 |
+
'selectors' => [
|
| 462 |
+
'{{WRAPPER}} .eael-gravity-form .gform_wrapper .gform_title, {{WRAPPER}} .eael-gravity-form .eael-gravity-form-title' => 'color: {{VALUE}}',
|
| 463 |
+
],
|
| 464 |
+
]
|
| 465 |
+
);
|
| 466 |
+
|
| 467 |
+
$this->add_group_control(
|
| 468 |
+
Group_Control_Typography::get_type(),
|
| 469 |
+
[
|
| 470 |
+
'name' => 'title_typography',
|
| 471 |
+
'label' => __( 'Typography', 'essential-addons-elementor' ),
|
| 472 |
+
'scheme' => Scheme_Typography::TYPOGRAPHY_4,
|
| 473 |
+
'selector' => '{{WRAPPER}} .eael-gravity-form .gform_wrapper .gform_title, {{WRAPPER}} .eael-gravity-form .eael-gravity-form-title',
|
| 474 |
+
]
|
| 475 |
+
);
|
| 476 |
+
|
| 477 |
+
$this->add_control(
|
| 478 |
+
'description_heading',
|
| 479 |
+
[
|
| 480 |
+
'label' => __( 'Description', 'essential-addons-elementor' ),
|
| 481 |
+
'type' => Controls_Manager::HEADING,
|
| 482 |
+
'separator' => 'before',
|
| 483 |
+
]
|
| 484 |
+
);
|
| 485 |
+
|
| 486 |
+
$this->add_control(
|
| 487 |
+
'description_text_color',
|
| 488 |
+
[
|
| 489 |
+
'label' => __( 'Text Color', 'essential-addons-elementor' ),
|
| 490 |
+
'type' => Controls_Manager::COLOR,
|
| 491 |
+
'default' => '',
|
| 492 |
+
'selectors' => [
|
| 493 |
+
'{{WRAPPER}} .eael-gravity-form .gform_wrapper .gform_description, {{WRAPPER}} .eael-gravity-form .eael-gravity-form-description' => 'color: {{VALUE}}',
|
| 494 |
+
],
|
| 495 |
+
]
|
| 496 |
+
);
|
| 497 |
+
|
| 498 |
+
$this->add_group_control(
|
| 499 |
+
Group_Control_Typography::get_type(),
|
| 500 |
+
[
|
| 501 |
+
'name' => 'description_typography',
|
| 502 |
+
'label' => __( 'Typography', 'essential-addons-elementor' ),
|
| 503 |
+
'scheme' => Scheme_Typography::TYPOGRAPHY_4,
|
| 504 |
+
'selector' => '{{WRAPPER}} .eael-gravity-form .gform_wrapper .gform_description, {{WRAPPER}} .eael-gravity-form .eael-gravity-form-description',
|
| 505 |
+
]
|
| 506 |
+
);
|
| 507 |
+
|
| 508 |
+
$this->end_controls_section();
|
| 509 |
+
|
| 510 |
+
/**
|
| 511 |
+
* Style Tab: Labels
|
| 512 |
+
* -------------------------------------------------
|
| 513 |
+
*/
|
| 514 |
+
$this->start_controls_section(
|
| 515 |
+
'section_label_style',
|
| 516 |
+
[
|
| 517 |
+
'label' => __( 'Labels', 'essential-addons-elementor' ),
|
| 518 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
| 519 |
+
'condition' => [
|
| 520 |
+
'labels_switch' => 'yes',
|
| 521 |
+
],
|
| 522 |
+
]
|
| 523 |
+
);
|
| 524 |
+
|
| 525 |
+
$this->add_control(
|
| 526 |
+
'text_color_label',
|
| 527 |
+
[
|
| 528 |
+
'label' => __( 'Text Color', 'essential-addons-elementor' ),
|
| 529 |
+
'type' => Controls_Manager::COLOR,
|
| 530 |
+
'selectors' => [
|
| 531 |
+
'{{WRAPPER}} .eael-gravity-form .gfield label' => 'color: {{VALUE}}',
|
| 532 |
+
],
|
| 533 |
+
'condition' => [
|
| 534 |
+
'labels_switch' => 'yes',
|
| 535 |
+
],
|
| 536 |
+
]
|
| 537 |
+
);
|
| 538 |
+
|
| 539 |
+
$this->add_group_control(
|
| 540 |
+
Group_Control_Typography::get_type(),
|
| 541 |
+
[
|
| 542 |
+
'name' => 'typography_label',
|
| 543 |
+
'label' => __( 'Typography', 'essential-addons-elementor' ),
|
| 544 |
+
'selector' => '{{WRAPPER}} .eael-gravity-form .gfield label',
|
| 545 |
+
'condition' => [
|
| 546 |
+
'labels_switch' => 'yes',
|
| 547 |
+
],
|
| 548 |
+
]
|
| 549 |
+
);
|
| 550 |
+
|
| 551 |
+
$this->end_controls_section();
|
| 552 |
+
|
| 553 |
+
/**
|
| 554 |
+
* Style Tab: Input & Textarea
|
| 555 |
+
* -------------------------------------------------
|
| 556 |
+
*/
|
| 557 |
+
$this->start_controls_section(
|
| 558 |
+
'section_fields_style',
|
| 559 |
+
[
|
| 560 |
+
'label' => __( 'Input & Textarea', 'essential-addons-elementor' ),
|
| 561 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
| 562 |
+
]
|
| 563 |
+
);
|
| 564 |
+
|
| 565 |
+
$this->add_responsive_control(
|
| 566 |
+
'input_alignment',
|
| 567 |
+
[
|
| 568 |
+
'label' => __( 'Alignment', 'essential-addons-elementor' ),
|
| 569 |
+
'type' => Controls_Manager::CHOOSE,
|
| 570 |
+
'options' => [
|
| 571 |
+
'left' => [
|
| 572 |
+
'title' => __( 'Left', 'essential-addons-elementor' ),
|
| 573 |
+
'icon' => 'fa fa-align-left',
|
| 574 |
],
|
| 575 |
+
'center' => [
|
| 576 |
+
'title' => __( 'Center', 'essential-addons-elementor' ),
|
| 577 |
+
'icon' => 'fa fa-align-center',
|
| 578 |
+
],
|
| 579 |
+
'right' => [
|
| 580 |
+
'title' => __( 'Right', 'essential-addons-elementor' ),
|
| 581 |
+
'icon' => 'fa fa-align-right',
|
| 582 |
],
|
| 583 |
],
|
| 584 |
+
'default' => '',
|
| 585 |
+
'selectors' => [
|
| 586 |
+
'{{WRAPPER}} .eael-gravity-form .gfield input[type="text"], {{WRAPPER}} .eael-gravity-form .gfield textarea' => 'text-align: {{VALUE}};',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 587 |
],
|
| 588 |
]
|
| 589 |
);
|
| 590 |
|
| 591 |
+
$this->start_controls_tabs( 'tabs_fields_style' );
|
| 592 |
+
|
| 593 |
+
$this->start_controls_tab(
|
| 594 |
+
'tab_fields_normal',
|
| 595 |
+
[
|
| 596 |
+
'label' => __( 'Normal', 'essential-addons-elementor' ),
|
| 597 |
+
]
|
| 598 |
+
);
|
| 599 |
+
|
| 600 |
+
$this->add_control(
|
| 601 |
+
'field_bg_color',
|
| 602 |
+
[
|
| 603 |
+
'label' => __( 'Background Color', 'essential-addons-elementor' ),
|
| 604 |
+
'type' => Controls_Manager::COLOR,
|
| 605 |
+
'default' => '',
|
| 606 |
+
'selectors' => [
|
| 607 |
+
'{{WRAPPER}} .eael-gravity-form .gfield input[type="text"], {{WRAPPER}} .eael-gravity-form .gfield textarea, {{WRAPPER}} .eael-gravity-form .gfield select' => 'background-color: {{VALUE}}',
|
| 608 |
+
],
|
| 609 |
+
]
|
| 610 |
+
);
|
| 611 |
+
|
| 612 |
+
$this->add_control(
|
| 613 |
+
'field_text_color',
|
| 614 |
+
[
|
| 615 |
+
'label' => __( 'Text Color', 'essential-addons-elementor' ),
|
| 616 |
+
'type' => Controls_Manager::COLOR,
|
| 617 |
+
'default' => '',
|
| 618 |
+
'selectors' => [
|
| 619 |
+
'{{WRAPPER}} .eael-gravity-form .gfield input[type="text"], {{WRAPPER}} .eael-gravity-form .gfield textarea, {{WRAPPER}} .eael-gravity-form .gfield select' => 'color: {{VALUE}}',
|
| 620 |
+
],
|
| 621 |
+
]
|
| 622 |
+
);
|
| 623 |
+
|
| 624 |
+
$this->add_responsive_control(
|
| 625 |
+
'field_spacing',
|
| 626 |
+
[
|
| 627 |
+
'label' => __( 'Spacing', 'essential-addons-elementor' ),
|
| 628 |
+
'type' => Controls_Manager::SLIDER,
|
| 629 |
+
'range' => [
|
| 630 |
+
'px' => [
|
| 631 |
+
'min' => 0,
|
| 632 |
+
'max' => 100,
|
| 633 |
+
'step' => 1,
|
| 634 |
+
],
|
| 635 |
+
],
|
| 636 |
+
'size_units' => [ 'px', 'em', '%' ],
|
| 637 |
+
'selectors' => [
|
| 638 |
+
'{{WRAPPER}} .eael-gravity-form .gfield' => 'margin-bottom: {{SIZE}}{{UNIT}}',
|
| 639 |
+
],
|
| 640 |
+
]
|
| 641 |
+
);
|
| 642 |
|
| 643 |
+
$this->add_responsive_control(
|
| 644 |
+
'field_padding',
|
|
|
|
| 645 |
[
|
| 646 |
+
'label' => __( 'Padding', 'essential-addons-elementor' ),
|
| 647 |
+
'type' => Controls_Manager::DIMENSIONS,
|
| 648 |
+
'size_units' => [ 'px', 'em', '%' ],
|
| 649 |
+
'selectors' => [
|
| 650 |
+
'{{WRAPPER}} .eael-gravity-form .gform_wrapper input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]), {{WRAPPER}} .eael-gravity-form .gfield textarea' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 651 |
],
|
| 652 |
]
|
| 653 |
);
|
| 654 |
+
|
| 655 |
+
$this->add_responsive_control(
|
| 656 |
+
'text_indent',
|
| 657 |
+
[
|
| 658 |
+
'label' => __( 'Text Indent', 'essential-addons-elementor' ),
|
| 659 |
+
'type' => Controls_Manager::SLIDER,
|
| 660 |
+
'range' => [
|
| 661 |
+
'px' => [
|
| 662 |
+
'min' => 0,
|
| 663 |
+
'max' => 60,
|
| 664 |
+
'step' => 1,
|
| 665 |
+
],
|
| 666 |
+
'%' => [
|
| 667 |
+
'min' => 0,
|
| 668 |
+
'max' => 30,
|
| 669 |
+
'step' => 1,
|
| 670 |
+
],
|
| 671 |
+
],
|
| 672 |
+
'size_units' => [ 'px', 'em', '%' ],
|
| 673 |
+
'selectors' => [
|
| 674 |
+
'{{WRAPPER}} .eael-gravity-form .gfield input[type="text"], {{WRAPPER}} .eael-gravity-form .gfield textarea, {{WRAPPER}} .eael-gravity-form .gfield select' => 'text-indent: {{SIZE}}{{UNIT}}',
|
| 675 |
+
],
|
| 676 |
+
]
|
| 677 |
+
);
|
| 678 |
+
|
| 679 |
+
$this->add_responsive_control(
|
| 680 |
+
'input_width',
|
| 681 |
+
[
|
| 682 |
+
'label' => __( 'Input Width', 'essential-addons-elementor' ),
|
| 683 |
+
'type' => Controls_Manager::SLIDER,
|
| 684 |
+
'range' => [
|
| 685 |
+
'px' => [
|
| 686 |
+
'min' => 0,
|
| 687 |
+
'max' => 1200,
|
| 688 |
+
'step' => 1,
|
| 689 |
+
],
|
| 690 |
+
],
|
| 691 |
+
'size_units' => [ 'px', 'em', '%' ],
|
| 692 |
+
'selectors' => [
|
| 693 |
+
'{{WRAPPER}} .eael-gravity-form .gfield input[type="text"], {{WRAPPER}} .eael-gravity-form .gfield select' => 'width: {{SIZE}}{{UNIT}}',
|
| 694 |
+
],
|
| 695 |
+
]
|
| 696 |
+
);
|
| 697 |
+
|
| 698 |
+
$this->add_responsive_control(
|
| 699 |
+
'input_height',
|
| 700 |
+
[
|
| 701 |
+
'label' => __( 'Input Height', 'essential-addons-elementor' ),
|
| 702 |
+
'type' => Controls_Manager::SLIDER,
|
| 703 |
+
'range' => [
|
| 704 |
+
'px' => [
|
| 705 |
+
'min' => 0,
|
| 706 |
+
'max' => 80,
|
| 707 |
+
'step' => 1,
|
| 708 |
+
],
|
| 709 |
+
],
|
| 710 |
+
'size_units' => [ 'px', 'em', '%' ],
|
| 711 |
+
'selectors' => [
|
| 712 |
+
'{{WRAPPER}} .eael-gravity-form .gfield input[type="text"], {{WRAPPER}} .eael-gravity-form .gfield input[type="email"], {{WRAPPER}} .eael-gravity-form .gfield input[type="url"], {{WRAPPER}} .eael-gravity-form .gfield select' => 'height: {{SIZE}}{{UNIT}}',
|
| 713 |
+
],
|
| 714 |
+
]
|
| 715 |
+
);
|
| 716 |
+
|
| 717 |
+
$this->add_responsive_control(
|
| 718 |
+
'textarea_width',
|
| 719 |
+
[
|
| 720 |
+
'label' => __( 'Textarea Width', 'essential-addons-elementor' ),
|
| 721 |
+
'type' => Controls_Manager::SLIDER,
|
| 722 |
+
'range' => [
|
| 723 |
+
'px' => [
|
| 724 |
+
'min' => 0,
|
| 725 |
+
'max' => 1200,
|
| 726 |
+
'step' => 1,
|
| 727 |
+
],
|
| 728 |
+
],
|
| 729 |
+
'size_units' => [ 'px', 'em', '%' ],
|
| 730 |
+
'selectors' => [
|
| 731 |
+
'{{WRAPPER}} .eael-gravity-form .gfield textarea' => 'width: {{SIZE}}{{UNIT}}',
|
| 732 |
+
],
|
| 733 |
+
]
|
| 734 |
+
);
|
| 735 |
+
|
| 736 |
+
$this->add_responsive_control(
|
| 737 |
+
'textarea_height',
|
| 738 |
+
[
|
| 739 |
+
'label' => __( 'Textarea Height', 'essential-addons-elementor' ),
|
| 740 |
+
'type' => Controls_Manager::SLIDER,
|
| 741 |
+
'range' => [
|
| 742 |
+
'px' => [
|
| 743 |
+
'min' => 0,
|
| 744 |
+
'max' => 400,
|
| 745 |
+
'step' => 1,
|
| 746 |
+
],
|
| 747 |
+
],
|
| 748 |
+
'size_units' => [ 'px', 'em', '%' ],
|
| 749 |
+
'selectors' => [
|
| 750 |
+
'{{WRAPPER}} .eael-gravity-form .gfield textarea' => 'height: {{SIZE}}{{UNIT}}',
|
| 751 |
+
],
|
| 752 |
+
]
|
| 753 |
+
);
|
| 754 |
|
| 755 |
$this->add_group_control(
|
| 756 |
Group_Control_Border::get_type(),
|
| 757 |
[
|
| 758 |
+
'name' => 'field_border',
|
| 759 |
+
'label' => __( 'Border', 'essential-addons-elementor' ),
|
| 760 |
+
'placeholder' => '1px',
|
| 761 |
+
'default' => '1px',
|
| 762 |
+
'selector' => '{{WRAPPER}} .eael-gravity-form .gfield input[type="text"], {{WRAPPER}} .eael-gravity-form .gfield textarea, {{WRAPPER}} .eael-gravity-form .gfield select',
|
| 763 |
+
'separator' => 'before',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 764 |
]
|
| 765 |
);
|
| 766 |
|
| 767 |
$this->add_control(
|
| 768 |
+
'field_radius',
|
| 769 |
[
|
| 770 |
+
'label' => __( 'Border Radius', 'essential-addons-elementor' ),
|
| 771 |
+
'type' => Controls_Manager::DIMENSIONS,
|
| 772 |
+
'size_units' => [ 'px', 'em', '%' ],
|
| 773 |
+
'selectors' => [
|
| 774 |
+
'{{WRAPPER}} .eael-gravity-form .gfield input[type="text"], {{WRAPPER}} .eael-gravity-form .gfield textarea' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
| 775 |
+
],
|
| 776 |
]
|
| 777 |
);
|
| 778 |
+
|
| 779 |
+
$this->add_group_control(
|
| 780 |
+
Group_Control_Typography::get_type(),
|
| 781 |
+
[
|
| 782 |
+
'name' => 'field_typography',
|
| 783 |
+
'label' => __( 'Typography', 'essential-addons-elementor' ),
|
| 784 |
+
'scheme' => Scheme_Typography::TYPOGRAPHY_4,
|
| 785 |
+
'selector' => '{{WRAPPER}} .eael-gravity-form .gfield input[type="text"], {{WRAPPER}} .eael-gravity-form .gfield textarea, {{WRAPPER}} .eael-gravity-form .gfield select',
|
| 786 |
+
'separator' => 'before',
|
| 787 |
+
]
|
| 788 |
+
);
|
| 789 |
|
| 790 |
$this->add_group_control(
|
| 791 |
Group_Control_Box_Shadow::get_type(),
|
| 792 |
[
|
| 793 |
+
'name' => 'field_box_shadow',
|
| 794 |
+
'selector' => '{{WRAPPER}} .eael-gravity-form .gfield input[type="text"], {{WRAPPER}} .eael-gravity-form .gfield textarea, {{WRAPPER}} .eael-gravity-form .gfield select',
|
| 795 |
+
'separator' => 'before',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 796 |
]
|
| 797 |
);
|
| 798 |
|
| 799 |
+
$this->end_controls_tab();
|
| 800 |
+
|
| 801 |
+
$this->start_controls_tab(
|
| 802 |
+
'tab_fields_focus',
|
| 803 |
+
[
|
| 804 |
+
'label' => __( 'Focus', 'essential-addons-elementor' ),
|
| 805 |
+
]
|
| 806 |
+
);
|
| 807 |
+
|
| 808 |
+
$this->add_control(
|
| 809 |
+
'field_bg_color_focus',
|
| 810 |
+
[
|
| 811 |
+
'label' => __( 'Background Color', 'essential-addons-elementor' ),
|
| 812 |
+
'type' => Controls_Manager::COLOR,
|
| 813 |
+
'default' => '',
|
| 814 |
+
'selectors' => [
|
| 815 |
+
'{{WRAPPER}} .eael-gravity-form .gfield input:focus, {{WRAPPER}} .eael-gravity-form .gfield textarea:focus' => 'background-color: {{VALUE}}',
|
| 816 |
+
],
|
| 817 |
+
]
|
| 818 |
+
);
|
| 819 |
+
|
| 820 |
+
$this->add_group_control(
|
| 821 |
+
Group_Control_Border::get_type(),
|
| 822 |
[
|
| 823 |
+
'name' => 'focus_input_border',
|
| 824 |
+
'label' => __( 'Border', 'essential-addons-elementor' ),
|
| 825 |
+
'placeholder' => '1px',
|
| 826 |
+
'default' => '1px',
|
| 827 |
+
'selector' => '{{WRAPPER}} .eael-gravity-form .gfield input:focus, {{WRAPPER}} .eael-gravity-form .gfield textarea:focus',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 828 |
]
|
| 829 |
);
|
| 830 |
|
| 831 |
+
$this->add_group_control(
|
| 832 |
+
Group_Control_Box_Shadow::get_type(),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 833 |
[
|
| 834 |
+
'name' => 'focus_box_shadow',
|
| 835 |
+
'selector' => '{{WRAPPER}} .eael-gravity-form .gfield input:focus, {{WRAPPER}} .eael-gravity-form .gfield textarea:focus',
|
| 836 |
+
'separator' => 'before',
|
| 837 |
]
|
| 838 |
);
|
| 839 |
|
| 840 |
+
$this->end_controls_tab();
|
| 841 |
+
|
| 842 |
+
$this->end_controls_tabs();
|
| 843 |
+
|
| 844 |
+
$this->end_controls_section();
|
| 845 |
+
|
| 846 |
+
/**
|
| 847 |
+
* Style Tab: Field Description
|
| 848 |
+
* -------------------------------------------------
|
| 849 |
+
*/
|
| 850 |
+
$this->start_controls_section(
|
| 851 |
+
'section_field_description_style',
|
| 852 |
+
[
|
| 853 |
+
'label' => __( 'Field Description', 'essential-addons-elementor' ),
|
| 854 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
| 855 |
+
]
|
| 856 |
+
);
|
| 857 |
+
|
| 858 |
+
$this->add_control(
|
| 859 |
+
'field_description_text_color',
|
| 860 |
+
[
|
| 861 |
+
'label' => __( 'Text Color', 'essential-addons-elementor' ),
|
| 862 |
+
'type' => Controls_Manager::COLOR,
|
| 863 |
+
'selectors' => [
|
| 864 |
+
'{{WRAPPER}} .eael-gravity-form .gfield .gfield_description' => 'color: {{VALUE}}',
|
| 865 |
+
],
|
| 866 |
+
]
|
| 867 |
+
);
|
| 868 |
+
|
| 869 |
+
$this->add_group_control(
|
| 870 |
+
Group_Control_Typography::get_type(),
|
| 871 |
+
[
|
| 872 |
+
'name' => 'field_description_typography',
|
| 873 |
+
'label' => __( 'Typography', 'essential-addons-elementor' ),
|
| 874 |
+
'selector' => '{{WRAPPER}} .eael-gravity-form .gfield .gfield_description',
|
| 875 |
+
]
|
| 876 |
+
);
|
| 877 |
+
|
| 878 |
+
$this->add_responsive_control(
|
| 879 |
+
'field_description_spacing',
|
| 880 |
+
[
|
| 881 |
+
'label' => __( 'Spacing', 'essential-addons-elementor' ),
|
| 882 |
+
'type' => Controls_Manager::SLIDER,
|
| 883 |
+
'range' => [
|
| 884 |
+
'px' => [
|
| 885 |
+
'min' => 0,
|
| 886 |
+
'max' => 100,
|
| 887 |
+
'step' => 1,
|
| 888 |
+
],
|
| 889 |
+
],
|
| 890 |
+
'size_units' => [ 'px', 'em', '%' ],
|
| 891 |
+
'selectors' => [
|
| 892 |
+
'{{WRAPPER}} .eael-gravity-form .gfield .gfield_description' => 'padding-top: {{SIZE}}{{UNIT}}',
|
| 893 |
+
],
|
| 894 |
+
]
|
| 895 |
+
);
|
| 896 |
+
|
| 897 |
+
$this->end_controls_section();
|
| 898 |
+
|
| 899 |
+
/**
|
| 900 |
+
* Style Tab: Section Field
|
| 901 |
+
* -------------------------------------------------
|
| 902 |
+
*/
|
| 903 |
+
$this->start_controls_section(
|
| 904 |
+
'section_field_style',
|
| 905 |
+
[
|
| 906 |
+
'label' => __( 'Section Field', 'essential-addons-elementor' ),
|
| 907 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
| 908 |
+
]
|
| 909 |
+
);
|
| 910 |
+
|
| 911 |
+
$this->add_control(
|
| 912 |
+
'section_field_text_color',
|
| 913 |
+
[
|
| 914 |
+
'label' => __( 'Text Color', 'essential-addons-elementor' ),
|
| 915 |
+
'type' => Controls_Manager::COLOR,
|
| 916 |
+
'default' => '',
|
| 917 |
+
'selectors' => [
|
| 918 |
+
'{{WRAPPER}} .eael-gravity-form .gfield.gsection .gsection_title' => 'color: {{VALUE}}',
|
| 919 |
+
],
|
| 920 |
+
]
|
| 921 |
+
);
|
| 922 |
+
|
| 923 |
+
$this->add_group_control(
|
| 924 |
+
Group_Control_Typography::get_type(),
|
| 925 |
+
[
|
| 926 |
+
'name' => 'section_field_typography',
|
| 927 |
+
'label' => __( 'Typography', 'essential-addons-elementor' ),
|
| 928 |
+
'scheme' => Scheme_Typography::TYPOGRAPHY_4,
|
| 929 |
+
'selector' => '{{WRAPPER}} .eael-gravity-form .gfield.gsection .gsection_title',
|
| 930 |
+
'separator' => 'before',
|
| 931 |
+
]
|
| 932 |
+
);
|
| 933 |
+
|
| 934 |
+
$this->add_control(
|
| 935 |
+
'section_field_border_type',
|
| 936 |
+
[
|
| 937 |
+
'label' => __( 'Border Type', 'essential-addons-elementor' ),
|
| 938 |
+
'type' => Controls_Manager::SELECT,
|
| 939 |
+
'default' => 'solid',
|
| 940 |
+
'options' => [
|
| 941 |
+
'none' => __( 'None', 'essential-addons-elementor' ),
|
| 942 |
+
'solid' => __( 'Solid', 'essential-addons-elementor' ),
|
| 943 |
+
'double' => __( 'Double', 'essential-addons-elementor' ),
|
| 944 |
+
'dotted' => __( 'Dotted', 'essential-addons-elementor' ),
|
| 945 |
+
'dashed' => __( 'Dashed', 'essential-addons-elementor' ),
|
| 946 |
+
],
|
| 947 |
+
'selectors' => [
|
| 948 |
+
'{{WRAPPER}} .eael-gravity-form .gfield.gsection' => 'border-bottom-style: {{VALUE}}',
|
| 949 |
+
],
|
| 950 |
+
'separator' => 'before',
|
| 951 |
+
]
|
| 952 |
+
);
|
| 953 |
+
|
| 954 |
+
$this->add_responsive_control(
|
| 955 |
+
'section_field_border_height',
|
| 956 |
+
[
|
| 957 |
+
'label' => __( 'Border Height', 'essential-addons-elementor' ),
|
| 958 |
+
'type' => Controls_Manager::SLIDER,
|
| 959 |
+
'default' => [
|
| 960 |
+
'size' => 1,
|
| 961 |
+
],
|
| 962 |
+
'range' => [
|
| 963 |
+
'px' => [
|
| 964 |
+
'min' => 1,
|
| 965 |
+
'max' => 20,
|
| 966 |
+
'step' => 1,
|
| 967 |
+
],
|
| 968 |
+
],
|
| 969 |
+
'size_units' => [ 'px' ],
|
| 970 |
+
'selectors' => [
|
| 971 |
+
'{{WRAPPER}} .eael-gravity-form .gfield.gsection' => 'border-bottom-width: {{SIZE}}{{UNIT}}',
|
| 972 |
+
],
|
| 973 |
+
'condition' => [
|
| 974 |
+
'section_field_border_type!' => 'none',
|
| 975 |
+
],
|
| 976 |
+
]
|
| 977 |
+
);
|
| 978 |
+
|
| 979 |
+
$this->add_control(
|
| 980 |
+
'section_field_border_color',
|
| 981 |
+
[
|
| 982 |
+
'label' => __( 'Border Color', 'essential-addons-elementor' ),
|
| 983 |
+
'type' => Controls_Manager::COLOR,
|
| 984 |
+
'default' => '',
|
| 985 |
+
'selectors' => [
|
| 986 |
+
'{{WRAPPER}} .eael-gravity-form .gfield.gsection' => 'border-bottom-color: {{VALUE}}',
|
| 987 |
+
],
|
| 988 |
+
'condition' => [
|
| 989 |
+
'section_field_border_type!' => 'none',
|
| 990 |
+
],
|
| 991 |
+
]
|
| 992 |
+
);
|
| 993 |
|
| 994 |
+
$this->add_responsive_control(
|
| 995 |
+
'section_field_margin',
|
| 996 |
[
|
| 997 |
+
'label' => __( 'Margin', 'essential-addons-elementor' ),
|
| 998 |
+
'type' => Controls_Manager::DIMENSIONS,
|
| 999 |
+
'size_units' => [ 'px', 'em', '%' ],
|
| 1000 |
+
'selectors' => [
|
| 1001 |
+
'{{WRAPPER}} .eael-gravity-form .gfield.gsection' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
| 1002 |
],
|
| 1003 |
+
'separator' => 'before',
|
| 1004 |
]
|
| 1005 |
);
|
| 1006 |
+
|
| 1007 |
+
$this->end_controls_section();
|
| 1008 |
+
|
| 1009 |
+
/**
|
| 1010 |
+
* Style Tab: Section Field
|
| 1011 |
+
* -------------------------------------------------
|
| 1012 |
+
*/
|
| 1013 |
+
$this->start_controls_section(
|
| 1014 |
+
'section_price_style',
|
| 1015 |
+
[
|
| 1016 |
+
'label' => __( 'Price', 'essential-addons-elementor' ),
|
| 1017 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
| 1018 |
+
]
|
| 1019 |
+
);
|
| 1020 |
+
|
| 1021 |
+
$this->add_control(
|
| 1022 |
+
'price_label_color',
|
| 1023 |
+
[
|
| 1024 |
+
'label' => __( 'Price Label Color', 'essential-addons-elementor' ),
|
| 1025 |
+
'type' => Controls_Manager::COLOR,
|
| 1026 |
+
'default' => '',
|
| 1027 |
+
'selectors' => [
|
| 1028 |
+
'{{WRAPPER}} .eael-gravity-form .gform_wrapper .ginput_product_price_label' => 'color: {{VALUE}}',
|
| 1029 |
+
],
|
| 1030 |
+
]
|
| 1031 |
+
);
|
| 1032 |
+
|
| 1033 |
+
$this->add_control(
|
| 1034 |
+
'price_text_color',
|
| 1035 |
+
[
|
| 1036 |
+
'label' => __( 'Price Color', 'essential-addons-elementor' ),
|
| 1037 |
+
'type' => Controls_Manager::COLOR,
|
| 1038 |
+
'default' => '',
|
| 1039 |
+
'selectors' => [
|
| 1040 |
+
'{{WRAPPER}} .eael-gravity-form .gform_wrapper .ginput_product_price' => 'color: {{VALUE}}',
|
| 1041 |
+
],
|
| 1042 |
+
]
|
| 1043 |
+
);
|
| 1044 |
+
|
| 1045 |
+
$this->end_controls_section();
|
| 1046 |
+
|
| 1047 |
+
/**
|
| 1048 |
+
* Style Tab: Placeholder
|
| 1049 |
+
* -------------------------------------------------
|
| 1050 |
+
*/
|
| 1051 |
+
$this->start_controls_section(
|
| 1052 |
+
'section_placeholder_style',
|
| 1053 |
+
[
|
| 1054 |
+
'label' => __( 'Placeholder', 'essential-addons-elementor' ),
|
| 1055 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
| 1056 |
+
'condition' => [
|
| 1057 |
+
'placeholder_switch' => 'yes',
|
| 1058 |
+
],
|
| 1059 |
+
]
|
| 1060 |
+
);
|
| 1061 |
+
|
| 1062 |
+
$this->add_control(
|
| 1063 |
+
'text_color_placeholder',
|
| 1064 |
+
[
|
| 1065 |
+
'label' => __( 'Text Color', 'essential-addons-elementor' ),
|
| 1066 |
+
'type' => Controls_Manager::COLOR,
|
| 1067 |
+
'selectors' => [
|
| 1068 |
+
'{{WRAPPER}} .eael-gravity-form .gfield input::-webkit-input-placeholder, {{WRAPPER}} .eael-gravity-form .gfield textarea::-webkit-input-placeholder' => 'color: {{VALUE}}',
|
| 1069 |
+
],
|
| 1070 |
+
'condition' => [
|
| 1071 |
+
'placeholder_switch' => 'yes',
|
| 1072 |
+
],
|
| 1073 |
+
]
|
| 1074 |
+
);
|
| 1075 |
+
|
| 1076 |
+
$this->end_controls_section();
|
| 1077 |
+
|
| 1078 |
+
/**
|
| 1079 |
+
* Style Tab: Radio & Checkbox
|
| 1080 |
+
* -------------------------------------------------
|
| 1081 |
+
*/
|
| 1082 |
+
$this->start_controls_section(
|
| 1083 |
+
'section_radio_checkbox_style',
|
| 1084 |
+
[
|
| 1085 |
+
'label' => __( 'Radio & Checkbox', 'essential-addons-elementor' ),
|
| 1086 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
| 1087 |
+
]
|
| 1088 |
+
);
|
| 1089 |
+
|
| 1090 |
+
$this->add_control(
|
| 1091 |
+
'custom_radio_checkbox',
|
| 1092 |
+
[
|
| 1093 |
+
'label' => __( 'Custom Styles', 'essential-addons-elementor' ),
|
| 1094 |
+
'type' => Controls_Manager::SWITCHER,
|
| 1095 |
+
'label_on' => __( 'Yes', 'essential-addons-elementor' ),
|
| 1096 |
+
'label_off' => __( 'No', 'essential-addons-elementor' ),
|
| 1097 |
+
'return_value' => 'yes',
|
| 1098 |
+
]
|
| 1099 |
+
);
|
| 1100 |
+
|
| 1101 |
+
$this->add_responsive_control(
|
| 1102 |
+
'radio_checkbox_size',
|
| 1103 |
+
[
|
| 1104 |
+
'label' => __( 'Size', 'essential-addons-elementor' ),
|
| 1105 |
+
'type' => Controls_Manager::SLIDER,
|
| 1106 |
+
'default' => [
|
| 1107 |
+
'size' => '15',
|
| 1108 |
+
'unit' => 'px'
|
| 1109 |
+
],
|
| 1110 |
+
'range' => [
|
| 1111 |
+
'px' => [
|
| 1112 |
+
'min' => 0,
|
| 1113 |
+
'max' => 80,
|
| 1114 |
+
'step' => 1,
|
| 1115 |
+
],
|
| 1116 |
+
],
|
| 1117 |
+
'size_units' => [ 'px', 'em', '%' ],
|
| 1118 |
+
'selectors' => [
|
| 1119 |
+
'{{WRAPPER}} .eael-custom-radio-checkbox input[type="checkbox"], {{WRAPPER}} .eael-custom-radio-checkbox input[type="radio"]' => 'width: {{SIZE}}{{UNIT}} !important; height: {{SIZE}}{{UNIT}}',
|
| 1120 |
+
],
|
| 1121 |
+
'condition' => [
|
| 1122 |
+
'custom_radio_checkbox' => 'yes',
|
| 1123 |
+
],
|
| 1124 |
+
]
|
| 1125 |
+
);
|
| 1126 |
+
|
| 1127 |
+
$this->start_controls_tabs( 'tabs_radio_checkbox_style' );
|
| 1128 |
+
|
| 1129 |
+
$this->start_controls_tab(
|
| 1130 |
+
'radio_checkbox_normal',
|
| 1131 |
+
[
|
| 1132 |
+
'label' => __( 'Normal', 'essential-addons-elementor' ),
|
| 1133 |
+
'condition' => [
|
| 1134 |
+
'custom_radio_checkbox' => 'yes',
|
| 1135 |
+
],
|
| 1136 |
+
]
|
| 1137 |
+
);
|
| 1138 |
+
|
| 1139 |
+
$this->add_control(
|
| 1140 |
+
'radio_checkbox_color',
|
| 1141 |
+
[
|
| 1142 |
+
'label' => __( 'Color', 'essential-addons-elementor' ),
|
| 1143 |
+
'type' => Controls_Manager::COLOR,
|
| 1144 |
+
'default' => '',
|
| 1145 |
+
'selectors' => [
|
| 1146 |
+
'{{WRAPPER}} .eael-custom-radio-checkbox input[type="checkbox"], {{WRAPPER}} .eael-custom-radio-checkbox input[type="radio"]' => 'background: {{VALUE}}',
|
| 1147 |
+
],
|
| 1148 |
+
'condition' => [
|
| 1149 |
+
'custom_radio_checkbox' => 'yes',
|
| 1150 |
+
],
|
| 1151 |
+
]
|
| 1152 |
+
);
|
| 1153 |
+
|
| 1154 |
+
$this->add_responsive_control(
|
| 1155 |
+
'radio_checkbox_border_width',
|
| 1156 |
+
[
|
| 1157 |
+
'label' => __( 'Border Width', 'essential-addons-elementor' ),
|
| 1158 |
+
'type' => Controls_Manager::SLIDER,
|
| 1159 |
+
'range' => [
|
| 1160 |
+
'px' => [
|
| 1161 |
+
'min' => 0,
|
| 1162 |
+
'max' => 15,
|
| 1163 |
+
'step' => 1,
|
| 1164 |
+
],
|
| 1165 |
+
],
|
| 1166 |
+
'size_units' => [ 'px' ],
|
| 1167 |
+
'selectors' => [
|
| 1168 |
+
'{{WRAPPER}} .eael-custom-radio-checkbox input[type="checkbox"], {{WRAPPER}} .eael-custom-radio-checkbox input[type="radio"]' => 'border-width: {{SIZE}}{{UNIT}}',
|
| 1169 |
+
],
|
| 1170 |
+
'condition' => [
|
| 1171 |
+
'custom_radio_checkbox' => 'yes',
|
| 1172 |
+
],
|
| 1173 |
+
]
|
| 1174 |
+
);
|
| 1175 |
+
|
| 1176 |
+
$this->add_control(
|
| 1177 |
+
'radio_checkbox_border_color',
|
| 1178 |
+
[
|
| 1179 |
+
'label' => __( 'Border Color', 'essential-addons-elementor' ),
|
| 1180 |
+
'type' => Controls_Manager::COLOR,
|
| 1181 |
+
'default' => '',
|
| 1182 |
+
'selectors' => [
|
| 1183 |
+
'{{WRAPPER}} .eael-custom-radio-checkbox input[type="checkbox"], {{WRAPPER}} .eael-custom-radio-checkbox input[type="radio"]' => 'border-color: {{VALUE}}',
|
| 1184 |
+
],
|
| 1185 |
+
'condition' => [
|
| 1186 |
+
'custom_radio_checkbox' => 'yes',
|
| 1187 |
+
],
|
| 1188 |
+
]
|
| 1189 |
+
);
|
| 1190 |
+
|
| 1191 |
+
$this->add_control(
|
| 1192 |
+
'checkbox_heading',
|
| 1193 |
+
[
|
| 1194 |
+
'label' => __( 'Checkbox', 'essential-addons-elementor' ),
|
| 1195 |
+
'type' => Controls_Manager::HEADING,
|
| 1196 |
+
'condition' => [
|
| 1197 |
+
'custom_radio_checkbox' => 'yes',
|
| 1198 |
],
|
| 1199 |
+
]
|
| 1200 |
+
);
|
| 1201 |
|
| 1202 |
$this->add_control(
|
| 1203 |
+
'checkbox_border_radius',
|
| 1204 |
[
|
| 1205 |
+
'label' => __( 'Border Radius', 'essential-addons-elementor' ),
|
| 1206 |
+
'type' => Controls_Manager::DIMENSIONS,
|
| 1207 |
+
'size_units' => [ 'px', 'em', '%' ],
|
| 1208 |
+
'selectors' => [
|
| 1209 |
+
'{{WRAPPER}} .eael-custom-radio-checkbox input[type="checkbox"], {{WRAPPER}} .eael-custom-radio-checkbox input[type="checkbox"]:before' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
|
|
|
| 1210 |
],
|
| 1211 |
+
'condition' => [
|
| 1212 |
+
'custom_radio_checkbox' => 'yes',
|
| 1213 |
+
],
|
| 1214 |
]
|
| 1215 |
);
|
| 1216 |
+
|
| 1217 |
+
$this->add_control(
|
| 1218 |
+
'radio_heading',
|
| 1219 |
+
[
|
| 1220 |
+
'label' => __( 'Radio Buttons', 'essential-addons-elementor' ),
|
| 1221 |
+
'type' => Controls_Manager::HEADING,
|
| 1222 |
+
'condition' => [
|
| 1223 |
+
'custom_radio_checkbox' => 'yes',
|
| 1224 |
+
],
|
| 1225 |
+
]
|
| 1226 |
+
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1227 |
|
| 1228 |
$this->add_control(
|
| 1229 |
+
'radio_border_radius',
|
| 1230 |
[
|
| 1231 |
+
'label' => __( 'Border Radius', 'essential-addons-elementor' ),
|
| 1232 |
+
'type' => Controls_Manager::DIMENSIONS,
|
| 1233 |
+
'size_units' => [ 'px', 'em', '%' ],
|
| 1234 |
+
'selectors' => [
|
| 1235 |
+
'{{WRAPPER}} .eael-custom-radio-checkbox input[type="radio"], {{WRAPPER}} .eael-custom-radio-checkbox input[type="radio"]:before' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
| 1236 |
+
],
|
| 1237 |
+
'condition' => [
|
| 1238 |
+
'custom_radio_checkbox' => 'yes',
|
| 1239 |
+
],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1240 |
]
|
| 1241 |
);
|
| 1242 |
|
| 1243 |
+
$this->end_controls_tab();
|
| 1244 |
+
|
| 1245 |
+
$this->start_controls_tab(
|
| 1246 |
+
'radio_checkbox_checked',
|
| 1247 |
+
[
|
| 1248 |
+
'label' => __( 'Checked', 'essential-addons-elementor' ),
|
| 1249 |
+
'condition' => [
|
| 1250 |
+
'custom_radio_checkbox' => 'yes',
|
| 1251 |
+
],
|
| 1252 |
+
]
|
| 1253 |
+
);
|
| 1254 |
+
|
| 1255 |
+
$this->add_control(
|
| 1256 |
+
'radio_checkbox_color_checked',
|
| 1257 |
+
[
|
| 1258 |
+
'label' => __( 'Color', 'essential-addons-elementor' ),
|
| 1259 |
+
'type' => Controls_Manager::COLOR,
|
| 1260 |
+
'default' => '',
|
| 1261 |
+
'selectors' => [
|
| 1262 |
+
'{{WRAPPER}} .eael-custom-radio-checkbox input[type="checkbox"]:checked:before, {{WRAPPER}} .eael-custom-radio-checkbox input[type="radio"]:checked:before' => 'background: {{VALUE}}',
|
| 1263 |
+
],
|
| 1264 |
+
'condition' => [
|
| 1265 |
+
'custom_radio_checkbox' => 'yes',
|
| 1266 |
+
],
|
| 1267 |
+
]
|
| 1268 |
+
);
|
| 1269 |
+
|
| 1270 |
+
$this->end_controls_tab();
|
| 1271 |
+
|
| 1272 |
+
$this->end_controls_tabs();
|
| 1273 |
+
|
| 1274 |
+
$this->end_controls_section();
|
| 1275 |
+
|
| 1276 |
+
/**
|
| 1277 |
+
* Style Tab: Submit Button
|
| 1278 |
+
* -------------------------------------------------
|
| 1279 |
+
*/
|
| 1280 |
+
$this->start_controls_section(
|
| 1281 |
+
'section_submit_button_style',
|
| 1282 |
+
[
|
| 1283 |
+
'label' => __( 'Submit Button', 'essential-addons-elementor' ),
|
| 1284 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
| 1285 |
+
]
|
| 1286 |
+
);
|
| 1287 |
+
|
| 1288 |
+
$this->add_responsive_control(
|
| 1289 |
+
'button_align',
|
| 1290 |
[
|
| 1291 |
+
'label' => __( 'Alignment', 'essential-addons-elementor' ),
|
| 1292 |
+
'type' => Controls_Manager::CHOOSE,
|
| 1293 |
+
'options' => [
|
| 1294 |
+
'left' => [
|
| 1295 |
+
'title' => __( 'Left', 'essential-addons-elementor' ),
|
| 1296 |
+
'icon' => 'eicon-h-align-left',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1297 |
],
|
| 1298 |
+
'center' => [
|
| 1299 |
+
'title' => __( 'Center', 'essential-addons-elementor' ),
|
| 1300 |
+
'icon' => 'eicon-h-align-center',
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1301 |
],
|
| 1302 |
+
'right' => [
|
| 1303 |
+
'title' => __( 'Right', 'essential-addons-elementor' ),
|
| 1304 |
+
'icon' => 'eicon-h-align-right',
|
| 1305 |
],
|
| 1306 |
],
|
| 1307 |
+
'default' => '',
|
| 1308 |
+
'selectors' => [
|
| 1309 |
+
'{{WRAPPER}} .eael-gravity-form .gform_footer' => 'text-align: {{VALUE}};',
|
| 1310 |
+
'{{WRAPPER}} .eael-gravity-form .gform_footer input[type="submit"]' => 'display:inline-block;'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1311 |
],
|
| 1312 |
+
'condition' => [
|
| 1313 |
+
'button_width_type' => 'custom',
|
| 1314 |
+
],
|
| 1315 |
]
|
| 1316 |
);
|
| 1317 |
+
|
| 1318 |
+
$this->add_control(
|
| 1319 |
+
'button_width_type',
|
| 1320 |
+
[
|
| 1321 |
+
'label' => __( 'Width', 'essential-addons-elementor' ),
|
| 1322 |
+
'type' => Controls_Manager::SELECT,
|
| 1323 |
+
'default' => 'custom',
|
| 1324 |
+
'options' => [
|
| 1325 |
+
'full-width' => __( 'Full Width', 'essential-addons-elementor' ),
|
| 1326 |
+
'custom' => __( 'Custom', 'essential-addons-elementor' ),
|
| 1327 |
+
],
|
| 1328 |
+
'prefix_class' => 'eael-gravity-form-button-',
|
| 1329 |
+
]
|
| 1330 |
+
);
|
| 1331 |
+
|
| 1332 |
+
$this->add_responsive_control(
|
| 1333 |
+
'button_width',
|
| 1334 |
+
[
|
| 1335 |
+
'label' => __( 'Width', 'essential-addons-elementor' ),
|
| 1336 |
+
'type' => Controls_Manager::SLIDER,
|
| 1337 |
+
'default' => [
|
| 1338 |
+
'size' => '100',
|
| 1339 |
+
'unit' => 'px'
|
| 1340 |
+
],
|
| 1341 |
+
'range' => [
|
| 1342 |
+
'px' => [
|
| 1343 |
+
'min' => 0,
|
| 1344 |
+
'max' => 1200,
|
| 1345 |
+
'step' => 1,
|
| 1346 |
+
],
|
| 1347 |
+
],
|
| 1348 |
+
'size_units' => [ 'px', '%' ],
|
| 1349 |
+
'selectors' => [
|
| 1350 |
+
'{{WRAPPER}} .eael-gravity-form .gform_footer input[type="submit"]' => 'width: {{SIZE}}{{UNIT}}',
|
| 1351 |
+
],
|
| 1352 |
+
'condition' => [
|
| 1353 |
+
'button_width_type' => 'custom',
|
| 1354 |
+
],
|
| 1355 |
+
]
|
| 1356 |
+
);
|
| 1357 |
+
|
| 1358 |
+
$this->start_controls_tabs( 'tabs_button_style' );
|
| 1359 |
+
|
| 1360 |
+
$this->start_controls_tab(
|
| 1361 |
+
'tab_button_normal',
|
| 1362 |
+
[
|
| 1363 |
+
'label' => __( 'Normal', 'essential-addons-elementor' ),
|
| 1364 |
+
]
|
| 1365 |
+
);
|
| 1366 |
+
|
| 1367 |
+
$this->add_control(
|
| 1368 |
+
'button_bg_color_normal',
|
| 1369 |
+
[
|
| 1370 |
+
'label' => __( 'Background Color', 'essential-addons-elementor' ),
|
| 1371 |
+
'type' => Controls_Manager::COLOR,
|
| 1372 |
+
'default' => '',
|
| 1373 |
+
'selectors' => [
|
| 1374 |
+
'{{WRAPPER}} .eael-gravity-form .gform_footer input[type="submit"]' => 'background-color: {{VALUE}}',
|
| 1375 |
+
],
|
| 1376 |
+
]
|
| 1377 |
+
);
|
| 1378 |
+
|
| 1379 |
+
$this->add_control(
|
| 1380 |
+
'button_text_color_normal',
|
| 1381 |
+
[
|
| 1382 |
+
'label' => __( 'Text Color', 'essential-addons-elementor' ),
|
| 1383 |
+
'type' => Controls_Manager::COLOR,
|
| 1384 |
+
'default' => '',
|
| 1385 |
+
'selectors' => [
|
| 1386 |
+
'{{WRAPPER}} .eael-gravity-form .gform_footer input[type="submit"]' => 'color: {{VALUE}}',
|
| 1387 |
+
],
|
| 1388 |
+
]
|
| 1389 |
+
);
|
| 1390 |
|
| 1391 |
+
$this->add_group_control(
|
| 1392 |
+
Group_Control_Border::get_type(),
|
| 1393 |
[
|
| 1394 |
+
'name' => 'button_border_normal',
|
| 1395 |
+
'label' => __( 'Border', 'essential-addons-elementor' ),
|
| 1396 |
+
'placeholder' => '1px',
|
| 1397 |
+
'default' => '1px',
|
| 1398 |
+
'selector' => '{{WRAPPER}} .eael-gravity-form .gform_footer input[type="submit"]',
|
|
|
|
| 1399 |
]
|
| 1400 |
);
|
| 1401 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1402 |
$this->add_control(
|
| 1403 |
+
'button_border_radius',
|
| 1404 |
[
|
| 1405 |
+
'label' => __( 'Border Radius', 'essential-addons-elementor' ),
|
| 1406 |
+
'type' => Controls_Manager::DIMENSIONS,
|
| 1407 |
+
'size_units' => [ 'px', 'em', '%' ],
|
| 1408 |
+
'selectors' => [
|
| 1409 |
+
'{{WRAPPER}} .eael-gravity-form .gform_footer input[type="submit"]' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
| 1410 |
],
|
| 1411 |
]
|
| 1412 |
);
|
| 1413 |
|
| 1414 |
+
$this->add_responsive_control(
|
| 1415 |
+
'button_padding',
|
| 1416 |
[
|
| 1417 |
+
'label' => __( 'Padding', 'essential-addons-elementor' ),
|
| 1418 |
+
'type' => Controls_Manager::DIMENSIONS,
|
| 1419 |
+
'size_units' => [ 'px', 'em', '%' ],
|
| 1420 |
+
'selectors' => [
|
| 1421 |
+
'{{WRAPPER}} .eael-gravity-form .gform_footer input[type="submit"]' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
| 1422 |
],
|
| 1423 |
]
|
| 1424 |
);
|
| 1425 |
+
|
| 1426 |
+
$this->add_responsive_control(
|
| 1427 |
+
'button_margin',
|
| 1428 |
+
[
|
| 1429 |
+
'label' => __( 'Margin Top', 'essential-addons-elementor' ),
|
| 1430 |
+
'type' => Controls_Manager::SLIDER,
|
| 1431 |
+
'range' => [
|
| 1432 |
+
'px' => [
|
| 1433 |
+
'min' => 0,
|
| 1434 |
+
'max' => 100,
|
| 1435 |
+
'step' => 1,
|
| 1436 |
+
],
|
| 1437 |
+
],
|
| 1438 |
+
'size_units' => [ 'px', 'em', '%' ],
|
| 1439 |
+
'selectors' => [
|
| 1440 |
+
'{{WRAPPER}} .eael-gravity-form .gform_footer input[type="submit"]' => 'margin-top: {{SIZE}}{{UNIT}}',
|
| 1441 |
+
],
|
| 1442 |
+
]
|
| 1443 |
+
);
|
| 1444 |
+
|
| 1445 |
+
$this->end_controls_tab();
|
| 1446 |
+
|
| 1447 |
+
$this->start_controls_tab(
|
| 1448 |
+
'tab_button_hover',
|
| 1449 |
+
[
|
| 1450 |
+
'label' => __( 'Hover', 'essential-addons-elementor' ),
|
| 1451 |
+
]
|
| 1452 |
+
);
|
| 1453 |
+
|
| 1454 |
+
$this->add_control(
|
| 1455 |
+
'button_bg_color_hover',
|
| 1456 |
+
[
|
| 1457 |
+
'label' => __( 'Background Color', 'essential-addons-elementor' ),
|
| 1458 |
+
'type' => Controls_Manager::COLOR,
|
| 1459 |
+
'default' => '',
|
| 1460 |
+
'selectors' => [
|
| 1461 |
+
'{{WRAPPER}} .eael-gravity-form .gform_footer input[type="submit"]:hover' => 'background-color: {{VALUE}}',
|
| 1462 |
+
],
|
| 1463 |
+
]
|
| 1464 |
+
);
|
| 1465 |
+
|
| 1466 |
+
$this->add_control(
|
| 1467 |
+
'button_text_color_hover',
|
| 1468 |
+
[
|
| 1469 |
+
'label' => __( 'Text Color', 'essential-addons-elementor' ),
|
| 1470 |
+
'type' => Controls_Manager::COLOR,
|
| 1471 |
+
'default' => '',
|
| 1472 |
+
'selectors' => [
|
| 1473 |
+
'{{WRAPPER}} .eael-gravity-form .gform_footer input[type="submit"]:hover' => 'color: {{VALUE}}',
|
| 1474 |
+
],
|
| 1475 |
+
]
|
| 1476 |
+
);
|
| 1477 |
+
|
| 1478 |
+
$this->add_control(
|
| 1479 |
+
'button_border_color_hover',
|
| 1480 |
+
[
|
| 1481 |
+
'label' => __( 'Border Color', 'essential-addons-elementor' ),
|
| 1482 |
+
'type' => Controls_Manager::COLOR,
|
| 1483 |
+
'default' => '',
|
| 1484 |
+
'selectors' => [
|
| 1485 |
+
'{{WRAPPER}} .eael-gravity-form .gform_footer input[type="submit"]:hover' => 'border-color: {{VALUE}}',
|
| 1486 |
+
],
|
| 1487 |
+
]
|
| 1488 |
+
);
|
| 1489 |
+
|
| 1490 |
+
$this->end_controls_tab();
|
| 1491 |
+
|
| 1492 |
+
$this->end_controls_tabs();
|
| 1493 |
+
|
| 1494 |
+
$this->add_group_control(
|
| 1495 |
+
Group_Control_Typography::get_type(),
|
| 1496 |
+
[
|
| 1497 |
+
'name' => 'button_typography',
|
| 1498 |
+
'label' => __( 'Typography', 'essential-addons-elementor' ),
|
| 1499 |
+
'scheme' => Scheme_Typography::TYPOGRAPHY_4,
|
| 1500 |
+
'selector' => '{{WRAPPER}} .eael-gravity-form .gform_footer input[type="submit"]',
|
| 1501 |
+
'separator' => 'before',
|
| 1502 |
+
]
|
| 1503 |
+
);
|
| 1504 |
|
| 1505 |
$this->add_group_control(
|
| 1506 |
+
Group_Control_Box_Shadow::get_type(),
|
| 1507 |
[
|
| 1508 |
+
'name' => 'button_box_shadow',
|
| 1509 |
+
'selector' => '{{WRAPPER}} .eael-gravity-form .gform_footer input[type="submit"]',
|
| 1510 |
+
'separator' => 'before',
|
| 1511 |
]
|
| 1512 |
);
|
| 1513 |
+
|
| 1514 |
+
$this->end_controls_section();
|
| 1515 |
+
|
| 1516 |
+
/**
|
| 1517 |
+
* Style Tab: Errors
|
| 1518 |
+
* -------------------------------------------------
|
| 1519 |
+
*/
|
| 1520 |
+
$this->start_controls_section(
|
| 1521 |
+
'section_error_style',
|
| 1522 |
+
[
|
| 1523 |
+
'label' => __( 'Errors', 'essential-addons-elementor' ),
|
| 1524 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
| 1525 |
+
]
|
| 1526 |
+
);
|
| 1527 |
+
|
| 1528 |
+
$this->add_control(
|
| 1529 |
+
'error_messages_heading',
|
| 1530 |
+
[
|
| 1531 |
+
'label' => __( 'Error Messages', 'essential-addons-elementor' ),
|
| 1532 |
+
'type' => Controls_Manager::HEADING,
|
| 1533 |
+
'condition' => [
|
| 1534 |
+
'error_messages' => 'show',
|
| 1535 |
],
|
| 1536 |
+
]
|
| 1537 |
+
);
|
| 1538 |
+
|
| 1539 |
+
$this->add_control(
|
| 1540 |
+
'error_message_text_color',
|
| 1541 |
+
[
|
| 1542 |
+
'label' => __( 'Text Color', 'essential-addons-elementor' ),
|
| 1543 |
+
'type' => Controls_Manager::COLOR,
|
| 1544 |
+
'default' => '',
|
| 1545 |
+
'selectors' => [
|
| 1546 |
+
'{{WRAPPER}} .eael-gravity-form .gfield .validation_message' => 'color: {{VALUE}}',
|
| 1547 |
+
],
|
| 1548 |
+
'condition' => [
|
| 1549 |
+
'error_messages' => 'show',
|
| 1550 |
],
|
| 1551 |
+
]
|
| 1552 |
+
);
|
| 1553 |
+
|
| 1554 |
+
$this->add_control(
|
| 1555 |
+
'validation_errors_heading',
|
| 1556 |
+
[
|
| 1557 |
+
'label' => __( 'Validation Errors', 'essential-addons-elementor' ),
|
| 1558 |
+
'type' => Controls_Manager::HEADING,
|
| 1559 |
+
'separator' => 'before',
|
| 1560 |
+
'condition' => [
|
| 1561 |
+
'validation_errors' => 'show',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1562 |
],
|
| 1563 |
+
]
|
| 1564 |
+
);
|
| 1565 |
+
|
| 1566 |
+
$this->add_control(
|
| 1567 |
+
'validation_error_description_color',
|
| 1568 |
+
[
|
| 1569 |
+
'label' => __( 'Error Description Color', 'essential-addons-elementor' ),
|
| 1570 |
+
'type' => Controls_Manager::COLOR,
|
| 1571 |
+
'default' => '',
|
| 1572 |
+
'selectors' => [
|
| 1573 |
+
'{{WRAPPER}} .eael-gravity-form .gform_wrapper .validation_error' => 'color: {{VALUE}}',
|
| 1574 |
+
],
|
| 1575 |
+
'condition' => [
|
| 1576 |
+
'validation_errors' => 'show',
|
| 1577 |
],
|
| 1578 |
+
]
|
| 1579 |
+
);
|
| 1580 |
+
|
| 1581 |
+
$this->add_control(
|
| 1582 |
+
'validation_error_border_color',
|
| 1583 |
+
[
|
| 1584 |
+
'label' => __( 'Error Border Color', 'essential-addons-elementor' ),
|
| 1585 |
+
'type' => Controls_Manager::COLOR,
|
| 1586 |
+
'default' => '',
|
| 1587 |
+
'selectors' => [
|
| 1588 |
+
'{{WRAPPER}} .eael-gravity-form .gform_wrapper .validation_error' => 'border-top-color: {{VALUE}}; border-bottom-color: {{VALUE}}',
|
| 1589 |
+
'{{WRAPPER}} .eael-gravity-form .gfield_error' => 'border-top-color: {{VALUE}}; border-bottom-color: {{VALUE}}',
|
| 1590 |
+
],
|
| 1591 |
+
'condition' => [
|
| 1592 |
+
'validation_errors' => 'show',
|
| 1593 |
],
|
| 1594 |
+
]
|
| 1595 |
+
);
|
| 1596 |
+
|
| 1597 |
+
$this->add_control(
|
| 1598 |
+
'validation_errors_bg_color',
|
| 1599 |
+
[
|
| 1600 |
+
'label' => __( 'Error Field Background Color', 'essential-addons-elementor' ),
|
| 1601 |
+
'type' => Controls_Manager::COLOR,
|
| 1602 |
+
'default' => '',
|
| 1603 |
+
'selectors' => [
|
| 1604 |
+
'{{WRAPPER}} .eael-gravity-form .gfield_error' => 'background: {{VALUE}}',
|
| 1605 |
+
],
|
| 1606 |
+
'condition' => [
|
| 1607 |
+
'validation_errors' => 'show',
|
| 1608 |
+
],
|
| 1609 |
+
]
|
| 1610 |
+
);
|
| 1611 |
+
|
| 1612 |
+
$this->add_control(
|
| 1613 |
+
'validation_error_field_label_color',
|
| 1614 |
+
[
|
| 1615 |
+
'label' => __( 'Error Field Label Color', 'essential-addons-elementor' ),
|
| 1616 |
+
'type' => Controls_Manager::COLOR,
|
| 1617 |
+
'default' => '',
|
| 1618 |
+
'selectors' => [
|
| 1619 |
+
'{{WRAPPER}} .eael-gravity-form .gfield_error .gfield_label' => 'color: {{VALUE}}',
|
| 1620 |
+
],
|
| 1621 |
+
'condition' => [
|
| 1622 |
+
'validation_errors' => 'show',
|
| 1623 |
+
],
|
| 1624 |
+
]
|
| 1625 |
+
);
|
| 1626 |
+
|
| 1627 |
+
$this->add_control(
|
| 1628 |
+
'validation_error_field_input_border_color',
|
| 1629 |
+
[
|
| 1630 |
+
'label' => __( 'Error Field Input Border Color', 'essential-addons-elementor' ),
|
| 1631 |
+
'type' => Controls_Manager::COLOR,
|
| 1632 |
+
'default' => '',
|
| 1633 |
+
'selectors' => [
|
| 1634 |
+
'{{WRAPPER}} .eael-gravity-form .gform_wrapper li.gfield_error input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]), {{WRAPPER}} .gform_wrapper li.gfield_error textarea' => 'border-color: {{VALUE}}',
|
| 1635 |
+
],
|
| 1636 |
+
'condition' => [
|
| 1637 |
+
'validation_errors' => 'show',
|
| 1638 |
+
],
|
| 1639 |
+
]
|
| 1640 |
+
);
|
| 1641 |
+
|
| 1642 |
+
$this->add_control(
|
| 1643 |
+
'validation_error_field_input_border_width',
|
| 1644 |
+
[
|
| 1645 |
+
'label' => __( 'Error Field Input Border Width', 'essential-addons-elementor' ),
|
| 1646 |
+
'type' => Controls_Manager::NUMBER,
|
| 1647 |
+
'default' => 1,
|
| 1648 |
+
'min' => 1,
|
| 1649 |
+
'max' => 10,
|
| 1650 |
+
'step' => 1,
|
| 1651 |
+
'selectors' => [
|
| 1652 |
+
'{{WRAPPER}} .eael-gravity-form .gform_wrapper li.gfield_error input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]), {{WRAPPER}} .gform_wrapper li.gfield_error textarea' => 'border-width: {{VALUE}}px',
|
| 1653 |
+
],
|
| 1654 |
+
'condition' => [
|
| 1655 |
+
'validation_errors' => 'show',
|
| 1656 |
+
],
|
| 1657 |
+
]
|
| 1658 |
+
);
|
| 1659 |
+
|
| 1660 |
+
$this->end_controls_section();
|
| 1661 |
+
|
| 1662 |
+
/**
|
| 1663 |
+
* Style Tab: Thank You Message
|
| 1664 |
+
* -------------------------------------------------
|
| 1665 |
+
*/
|
| 1666 |
+
$this->start_controls_section(
|
| 1667 |
+
'section_ty_style',
|
| 1668 |
+
[
|
| 1669 |
+
'label' => __( 'Thank You Message', 'essential-addons-elementor' ),
|
| 1670 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
| 1671 |
+
]
|
| 1672 |
+
);
|
| 1673 |
+
|
| 1674 |
+
$this->add_control(
|
| 1675 |
+
'ty_message_text_color',
|
| 1676 |
+
[
|
| 1677 |
+
'label' => __( 'Text Color', 'essential-addons-elementor' ),
|
| 1678 |
+
'type' => Controls_Manager::COLOR,
|
| 1679 |
+
'default' => '',
|
| 1680 |
+
'selectors' => [
|
| 1681 |
+
'{{WRAPPER}} .eael-gravity-form .gform_confirmation_wrapper .gform_confirmation_message' => 'color: {{VALUE}}',
|
| 1682 |
+
],
|
| 1683 |
+
]
|
| 1684 |
+
);
|
| 1685 |
+
|
| 1686 |
+
$this->end_controls_section();
|
| 1687 |
+
}
|
| 1688 |
+
|
| 1689 |
+
/**
|
| 1690 |
+
* Render gravity forms widget output on the frontend.
|
| 1691 |
+
*
|
| 1692 |
+
* Written in PHP and used to generate the final HTML.
|
| 1693 |
+
*
|
| 1694 |
+
* @access protected
|
| 1695 |
+
*/
|
| 1696 |
+
protected function render() {
|
| 1697 |
+
$settings = $this->get_settings();
|
| 1698 |
+
|
| 1699 |
+
$this->add_render_attribute( 'contact-form', 'class', [
|
| 1700 |
+
'eael-contact-form',
|
| 1701 |
+
'eael-gravity-form',
|
| 1702 |
]
|
| 1703 |
);
|
| 1704 |
+
|
| 1705 |
+
if ( $settings['labels_switch'] != 'yes' ) {
|
| 1706 |
+
$this->add_render_attribute( 'contact-form', 'class', 'labels-hide' );
|
| 1707 |
+
}
|
| 1708 |
+
|
| 1709 |
+
if ( $settings['placeholder_switch'] != 'yes' ) {
|
| 1710 |
+
$this->add_render_attribute( 'contact-form', 'class', 'placeholder-hide' );
|
| 1711 |
+
}
|
| 1712 |
+
|
| 1713 |
+
if ( $settings['custom_title_description'] == 'yes' ) {
|
| 1714 |
+
$this->add_render_attribute( 'contact-form', 'class', 'title-description-hide' );
|
| 1715 |
+
}
|
| 1716 |
+
|
| 1717 |
+
if ( $settings['custom_radio_checkbox'] == 'yes' ) {
|
| 1718 |
+
$this->add_render_attribute( 'contact-form', 'class', 'eael-custom-radio-checkbox' );
|
| 1719 |
+
}
|
| 1720 |
+
|
| 1721 |
+
if ( $settings['eael_gravity_form_alignment'] == 'left' ) {
|
| 1722 |
+
$this->add_render_attribute( 'contact-form', 'class', 'eael-contact-form-align-left' );
|
| 1723 |
+
}
|
| 1724 |
+
elseif ( $settings['eael_gravity_form_alignment'] == 'center' ) {
|
| 1725 |
+
$this->add_render_attribute( 'contact-form', 'class', 'eael-contact-form-align-center' );
|
| 1726 |
+
}
|
| 1727 |
+
elseif ( $settings['eael_gravity_form_alignment'] == 'right' ) {
|
| 1728 |
+
$this->add_render_attribute( 'contact-form', 'class', 'eael-contact-form-align-right' );
|
| 1729 |
+
}
|
| 1730 |
+
else {
|
| 1731 |
+
$this->add_render_attribute( 'contact-form', 'class', 'eael-contact-form-align-default' );
|
| 1732 |
+
}
|
| 1733 |
+
|
| 1734 |
+
if ( class_exists( 'GFCommon' ) ) {
|
| 1735 |
+
if ( ! empty( $settings['contact_form_list'] ) ) { ?>
|
| 1736 |
+
<div <?php echo $this->get_render_attribute_string( 'contact-form' ); ?>>
|
| 1737 |
+
<?php if ( $settings['custom_title_description'] == 'yes' ) { ?>
|
| 1738 |
+
<div class="eael-gravity-form-heading">
|
| 1739 |
+
<?php if ( $settings['form_title_custom'] != '' ) { ?>
|
| 1740 |
+
<h3 class="eael-contact-form-title eael-gravity-form-title">
|
| 1741 |
+
<?php echo esc_attr( $settings['form_title_custom'] ); ?>
|
| 1742 |
+
</h3>
|
| 1743 |
+
<?php } ?>
|
| 1744 |
+
<?php if ( $settings['form_description_custom'] != '' ) { ?>
|
| 1745 |
+
<div class="eael-contact-form-description eael-gravity-form-description">
|
| 1746 |
+
<?php echo $this->parse_text_editor( $settings['form_description_custom'] ); ?>
|
| 1747 |
+
</div>
|
| 1748 |
+
<?php } ?>
|
| 1749 |
+
</div>
|
| 1750 |
+
<?php } ?>
|
| 1751 |
+
<?php
|
| 1752 |
+
$eael_form_id = $settings['contact_form_list'];
|
| 1753 |
+
$eael_form_title = $settings['form_title'];
|
| 1754 |
+
$eael_form_description = $settings['form_description'];
|
| 1755 |
+
$eael_form_ajax = $settings['form_ajax'];
|
| 1756 |
+
|
| 1757 |
+
gravity_form( $eael_form_id, $eael_form_title, $eael_form_description, $display_inactive = false, $field_values = null, $eael_form_ajax, '', $echo = true );
|
| 1758 |
+
?>
|
| 1759 |
+
</div>
|
| 1760 |
+
<?php
|
| 1761 |
+
}
|
| 1762 |
+
}
|
| 1763 |
+
}
|
| 1764 |
+
|
| 1765 |
+
protected function _content_template() {}
|
| 1766 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1767 |
}
|
| 1768 |
|
|
|
|
| 1769 |
Plugin::instance()->widgets_manager->register_widget_type( new Widget_Eael_GravityForm() );
|
elements/ninja-form/ninja-form.php
CHANGED
|
@@ -1,71 +1,211 @@
|
|
| 1 |
<?php
|
| 2 |
namespace Elementor;
|
| 3 |
|
| 4 |
-
if ( ! defined( 'ABSPATH' ) ) exit; //
|
| 5 |
-
|
| 6 |
|
| 7 |
class Widget_Eael_NinjaForm extends Widget_Base {
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
$this->add_control(
|
| 35 |
-
'
|
| 36 |
[
|
| 37 |
-
'label'
|
| 38 |
-
'
|
| 39 |
-
'
|
| 40 |
-
'options'
|
|
|
|
| 41 |
]
|
| 42 |
);
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
[
|
| 50 |
-
'label'
|
| 51 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
| 52 |
]
|
| 53 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 54 |
|
| 55 |
$this->add_control(
|
| 56 |
-
'
|
| 57 |
[
|
| 58 |
'label' => esc_html__( 'Form Background Color', 'essential-addons-elementor' ),
|
| 59 |
'type' => Controls_Manager::COLOR,
|
| 60 |
-
'default' => '#fff',
|
| 61 |
'selectors' => [
|
| 62 |
-
'{{WRAPPER}} .eael-
|
| 63 |
],
|
| 64 |
]
|
| 65 |
);
|
| 66 |
-
|
| 67 |
$this->add_responsive_control(
|
| 68 |
-
'
|
| 69 |
[
|
| 70 |
'label' => esc_html__( 'Form Alignment', 'essential-addons-elementor' ),
|
| 71 |
'type' => Controls_Manager::CHOOSE,
|
|
@@ -77,24 +217,23 @@ class Widget_Eael_NinjaForm extends Widget_Base {
|
|
| 77 |
],
|
| 78 |
'left' => [
|
| 79 |
'title' => esc_html__( 'Left', 'essential-addons-elementor' ),
|
| 80 |
-
'icon' => '
|
| 81 |
],
|
| 82 |
'center' => [
|
| 83 |
'title' => esc_html__( 'Center', 'essential-addons-elementor' ),
|
| 84 |
-
'icon' => '
|
| 85 |
],
|
| 86 |
'right' => [
|
| 87 |
'title' => esc_html__( 'Right', 'essential-addons-elementor' ),
|
| 88 |
-
'icon' => '
|
| 89 |
],
|
| 90 |
],
|
| 91 |
'default' => 'default',
|
| 92 |
-
'prefix_class' => 'eael-contact-form-align-',
|
| 93 |
]
|
| 94 |
);
|
| 95 |
|
| 96 |
-
|
| 97 |
-
'
|
| 98 |
[
|
| 99 |
'label' => esc_html__( 'Form Width', 'essential-addons-elementor' ),
|
| 100 |
'type' => Controls_Manager::SLIDER,
|
|
@@ -110,13 +249,13 @@ class Widget_Eael_NinjaForm extends Widget_Base {
|
|
| 110 |
],
|
| 111 |
],
|
| 112 |
'selectors' => [
|
| 113 |
-
'{{WRAPPER}} .eael-
|
| 114 |
],
|
| 115 |
]
|
| 116 |
);
|
| 117 |
|
| 118 |
$this->add_responsive_control(
|
| 119 |
-
'
|
| 120 |
[
|
| 121 |
'label' => esc_html__( 'Form Max Width', 'essential-addons-elementor' ),
|
| 122 |
'type' => Controls_Manager::SLIDER,
|
|
@@ -132,586 +271,1315 @@ class Widget_Eael_NinjaForm extends Widget_Base {
|
|
| 132 |
],
|
| 133 |
],
|
| 134 |
'selectors' => [
|
| 135 |
-
'{{WRAPPER}} .eael-
|
| 136 |
],
|
| 137 |
]
|
| 138 |
);
|
| 139 |
-
|
|
|
|
| 140 |
$this->add_responsive_control(
|
| 141 |
-
'
|
| 142 |
[
|
| 143 |
'label' => esc_html__( 'Form Margin', 'essential-addons-elementor' ),
|
| 144 |
'type' => Controls_Manager::DIMENSIONS,
|
| 145 |
'size_units' => [ 'px', 'em', '%' ],
|
| 146 |
'selectors' => [
|
| 147 |
-
'{{WRAPPER}} .eael-
|
| 148 |
],
|
| 149 |
]
|
| 150 |
-
);
|
| 151 |
-
|
| 152 |
$this->add_responsive_control(
|
| 153 |
-
'
|
| 154 |
[
|
| 155 |
'label' => esc_html__( 'Form Padding', 'essential-addons-elementor' ),
|
| 156 |
'type' => Controls_Manager::DIMENSIONS,
|
| 157 |
'size_units' => [ 'px', 'em', '%' ],
|
| 158 |
'selectors' => [
|
| 159 |
-
'{{WRAPPER}} .eael-
|
| 160 |
],
|
| 161 |
]
|
| 162 |
);
|
| 163 |
-
|
|
|
|
| 164 |
$this->add_control(
|
| 165 |
-
'
|
| 166 |
[
|
| 167 |
'label' => esc_html__( 'Border Radius', 'essential-addons-elementor' ),
|
| 168 |
'type' => Controls_Manager::DIMENSIONS,
|
| 169 |
'separator' => 'before',
|
| 170 |
'size_units' => [ 'px' ],
|
| 171 |
'selectors' => [
|
| 172 |
-
'{{WRAPPER}} .eael-
|
| 173 |
],
|
| 174 |
]
|
| 175 |
);
|
| 176 |
-
|
|
|
|
| 177 |
$this->add_group_control(
|
| 178 |
Group_Control_Border::get_type(),
|
| 179 |
[
|
| 180 |
-
'name' => '
|
| 181 |
-
'selector' => '{{WRAPPER}} .eael-
|
| 182 |
]
|
| 183 |
);
|
| 184 |
-
|
|
|
|
| 185 |
$this->add_group_control(
|
| 186 |
Group_Control_Box_Shadow::get_type(),
|
| 187 |
[
|
| 188 |
-
'name' => '
|
| 189 |
-
'selector' => '{{WRAPPER}} .eael-
|
| 190 |
-
]
|
| 191 |
-
);
|
| 192 |
-
|
| 193 |
-
$this->end_controls_section();
|
| 194 |
-
|
| 195 |
-
/**
|
| 196 |
-
* Form Fields Styles
|
| 197 |
-
*/
|
| 198 |
-
$this->start_controls_section(
|
| 199 |
-
'eael_section_ninja_field_styles',
|
| 200 |
-
[
|
| 201 |
-
'label' => esc_html__( 'Form Fields Styles', 'essential-addons-elementor' ),
|
| 202 |
-
'tab' => Controls_Manager::TAB_STYLE
|
| 203 |
]
|
| 204 |
);
|
| 205 |
|
| 206 |
-
|
| 207 |
-
|
| 208 |
-
|
| 209 |
-
|
| 210 |
-
|
| 211 |
-
|
| 212 |
-
|
| 213 |
-
|
| 214 |
-
|
| 215 |
-
|
| 216 |
-
|
| 217 |
-
|
| 218 |
-
|
| 219 |
-
|
| 220 |
-
|
| 221 |
-
|
| 222 |
-
|
| 223 |
-
|
| 224 |
-
|
| 225 |
-
|
| 226 |
-
|
| 227 |
-
|
| 228 |
-
|
| 229 |
-
'
|
| 230 |
-
|
| 231 |
-
|
| 232 |
-
'
|
| 233 |
-
'max' => 1500,
|
| 234 |
],
|
| 235 |
-
'
|
| 236 |
-
'
|
| 237 |
-
'
|
| 238 |
],
|
| 239 |
-
|
| 240 |
-
|
| 241 |
-
|
| 242 |
-
{{WRAPPER}} .eael-ninja-container .nf-field .nf-field-element input[type="password"],
|
| 243 |
-
{{WRAPPER}} .eael-ninja-container .nf-field .nf-field-element input[type="email"],
|
| 244 |
-
{{WRAPPER}} .eael-ninja-container .nf-field .nf-field-element input[type="url"],
|
| 245 |
-
{{WRAPPER}} .eael-ninja-container .nf-field .nf-field-element input[type="url"],
|
| 246 |
-
{{WRAPPER}} .eael-ninja-container .nf-field .nf-field-element input[type="number"]' => 'width: {{SIZE}}{{UNIT}};',
|
| 247 |
-
],
|
| 248 |
-
]
|
| 249 |
-
);
|
| 250 |
-
|
| 251 |
-
$this->add_responsive_control(
|
| 252 |
-
'eael_ninja_textarea_width',
|
| 253 |
-
[
|
| 254 |
-
'label' => esc_html__( 'Textarea Width', 'essential-addons-elementor' ),
|
| 255 |
-
'type' => Controls_Manager::SLIDER,
|
| 256 |
-
'size_units' => [ 'px', 'em', '%' ],
|
| 257 |
-
'range' => [
|
| 258 |
-
'px' => [
|
| 259 |
-
'min' => 10,
|
| 260 |
-
'max' => 1500,
|
| 261 |
],
|
| 262 |
-
'em' => [
|
| 263 |
-
'min' => 1,
|
| 264 |
-
'max' => 80,
|
| 265 |
-
],
|
| 266 |
-
],
|
| 267 |
-
'selectors' => [
|
| 268 |
-
'{{WRAPPER}} .eael-ninja-container .nf-field .nf-field-element textarea' => 'width: {{SIZE}}{{UNIT}};',
|
| 269 |
],
|
| 270 |
-
|
| 271 |
-
|
| 272 |
-
|
| 273 |
-
$this->add_responsive_control(
|
| 274 |
-
'eael_ninja_input_padding',
|
| 275 |
-
[
|
| 276 |
-
'label' => esc_html__( 'Fields Padding', 'essential-addons-elementor' ),
|
| 277 |
-
'type' => Controls_Manager::DIMENSIONS,
|
| 278 |
-
'size_units' => [ 'px', 'em', '%' ],
|
| 279 |
-
'selectors' => [
|
| 280 |
-
'{{WRAPPER}} .eael-ninja-container .nf-field .nf-field-element input[type="text"],
|
| 281 |
-
{{WRAPPER}} .eael-ninja-container .nf-field .nf-field-element input[type="password"],
|
| 282 |
-
{{WRAPPER}} .eael-ninja-container .nf-field .nf-field-element input[type="email"],
|
| 283 |
-
{{WRAPPER}} .eael-ninja-container .nf-field .nf-field-element input[type="url"],
|
| 284 |
-
{{WRAPPER}} .eael-ninja-container .nf-field .nf-field-element input[type="url"],
|
| 285 |
-
{{WRAPPER}} .eael-ninja-container .nf-field .nf-field-element input[type="number"],
|
| 286 |
-
{{WRAPPER}} .eael-ninja-container .nf-field .nf-field-element textarea' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
| 287 |
],
|
| 288 |
]
|
| 289 |
);
|
| 290 |
-
|
| 291 |
-
|
| 292 |
-
|
| 293 |
-
|
| 294 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 295 |
[
|
| 296 |
-
'label'
|
| 297 |
-
'type'
|
| 298 |
-
'
|
| 299 |
-
|
| 300 |
-
'
|
| 301 |
-
'
|
| 302 |
-
|
| 303 |
-
|
| 304 |
-
|
| 305 |
-
|
| 306 |
-
|
| 307 |
-
|
| 308 |
],
|
| 309 |
]
|
| 310 |
);
|
| 311 |
-
|
| 312 |
-
|
| 313 |
-
|
| 314 |
-
|
| 315 |
-
|
| 316 |
-
|
| 317 |
-
'
|
| 318 |
-
|
| 319 |
-
|
| 320 |
-
|
| 321 |
-
|
| 322 |
-
|
| 323 |
-
|
| 324 |
-
|
| 325 |
-
|
| 326 |
-
|
| 327 |
-
|
| 328 |
-
|
| 329 |
-
|
| 330 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 331 |
[
|
| 332 |
-
'
|
| 333 |
-
'
|
| 334 |
-
|
| 335 |
-
|
| 336 |
-
|
| 337 |
-
|
| 338 |
-
|
| 339 |
-
|
| 340 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 341 |
]
|
| 342 |
);
|
| 343 |
-
|
| 344 |
-
|
| 345 |
-
|
| 346 |
-
|
| 347 |
-
|
| 348 |
-
|
| 349 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 350 |
]
|
| 351 |
);
|
| 352 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 353 |
|
| 354 |
$this->add_group_control(
|
| 355 |
-
|
| 356 |
[
|
| 357 |
-
'name'
|
| 358 |
-
'
|
| 359 |
-
|
| 360 |
-
|
| 361 |
-
|
| 362 |
-
|
| 363 |
-
{{WRAPPER}} .eael-ninja-container .nf-field .nf-field-element input[type="url"]:focus,
|
| 364 |
-
{{WRAPPER}} .eael-ninja-container .nf-field .nf-field-element input[type="number"]:focus,
|
| 365 |
-
{{WRAPPER}} .eael-ninja-container .nf-field .nf-field-element textarea:focus',
|
| 366 |
]
|
| 367 |
);
|
| 368 |
|
| 369 |
$this->add_control(
|
| 370 |
-
'
|
| 371 |
[
|
| 372 |
-
'label'
|
| 373 |
-
'type'
|
| 374 |
-
'
|
| 375 |
-
|
| 376 |
-
|
| 377 |
-
{{WRAPPER}} .eael-ninja-container .nf-field .nf-field-element input[type="email"]:focus,
|
| 378 |
-
{{WRAPPER}} .eael-ninja-container .nf-field .nf-field-element input[type="url"]:focus,
|
| 379 |
-
{{WRAPPER}} .eael-ninja-container .nf-field .nf-field-element input[type="url"]:focus,
|
| 380 |
-
{{WRAPPER}} .eael-ninja-container .nf-field .nf-field-element input[type="number"]:focus,
|
| 381 |
-
{{WRAPPER}} .eael-ninja-container .nf-field .nf-field-element textarea:focus' => 'border-color: {{VALUE}};',
|
| 382 |
],
|
| 383 |
]
|
| 384 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 385 |
|
| 386 |
-
$this->
|
| 387 |
-
|
| 388 |
-
/**
|
| 389 |
-
* Typography
|
| 390 |
-
*/
|
| 391 |
-
$this->start_controls_section(
|
| 392 |
-
'eael_section_ninja_typography',
|
| 393 |
-
[
|
| 394 |
-
'label' => esc_html__( 'Color & Typography', 'essential-addons-elementor' ),
|
| 395 |
-
'tab' => Controls_Manager::TAB_STYLE
|
| 396 |
-
]
|
| 397 |
-
);
|
| 398 |
-
|
| 399 |
-
|
| 400 |
-
$this->add_control(
|
| 401 |
-
'eael_ninja_label_color',
|
| 402 |
[
|
| 403 |
-
'label'
|
| 404 |
-
'type'
|
| 405 |
-
'
|
| 406 |
-
|
|
|
|
| 407 |
],
|
|
|
|
| 408 |
]
|
| 409 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 410 |
|
| 411 |
-
$this->
|
| 412 |
-
|
| 413 |
[
|
| 414 |
-
'
|
| 415 |
-
'
|
| 416 |
-
'
|
| 417 |
-
'{{WRAPPER}} .eael-ninja-container .nf-field .nf-field-element input[type="text"],
|
| 418 |
-
{{WRAPPER}} .eael-ninja-container .nf-field .nf-field-element input[type="password"],
|
| 419 |
-
{{WRAPPER}} .eael-ninja-container .nf-field .nf-field-element input[type="email"],
|
| 420 |
-
{{WRAPPER}} .eael-ninja-container .nf-field .nf-field-element input[type="url"],
|
| 421 |
-
{{WRAPPER}} .eael-ninja-container .nf-field .nf-field-element input[type="url"],
|
| 422 |
-
{{WRAPPER}} .eael-ninja-container .nf-field .nf-field-element input[type="number"],
|
| 423 |
-
{{WRAPPER}} .eael-ninja-container .nf-field .nf-field-element textarea' => 'color: {{VALUE}};',
|
| 424 |
-
],
|
| 425 |
-
]
|
| 426 |
-
);
|
| 427 |
-
|
| 428 |
-
$this->add_control(
|
| 429 |
-
'eael_ninja_placeholder_color',
|
| 430 |
-
[
|
| 431 |
-
'label' => esc_html__( 'Placeholder Font Color', 'essential-addons-elementor' ),
|
| 432 |
-
'type' => Controls_Manager::COLOR,
|
| 433 |
-
'selectors' => [
|
| 434 |
-
'{{WRAPPER}} .eael-ninja-container ::-webkit-input-placeholder' => 'color: {{VALUE}};',
|
| 435 |
-
'{{WRAPPER}} .eael-ninja-container ::-moz-placeholder' => 'color: {{VALUE}};',
|
| 436 |
-
'{{WRAPPER}} .eael-ninja-container ::-ms-input-placeholder' => 'color: {{VALUE}};',
|
| 437 |
-
],
|
| 438 |
]
|
| 439 |
);
|
| 440 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 441 |
|
| 442 |
-
$this->
|
| 443 |
-
|
| 444 |
[
|
| 445 |
-
'
|
| 446 |
-
'label'
|
| 447 |
-
'
|
|
|
|
|
|
|
| 448 |
]
|
| 449 |
);
|
| 450 |
|
| 451 |
$this->add_group_control(
|
| 452 |
-
|
| 453 |
[
|
| 454 |
-
'name'
|
| 455 |
-
'selector'
|
|
|
|
| 456 |
]
|
| 457 |
);
|
| 458 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 459 |
|
| 460 |
$this->add_control(
|
| 461 |
-
'
|
| 462 |
[
|
| 463 |
-
'
|
| 464 |
-
'
|
| 465 |
-
'
|
| 466 |
-
|
| 467 |
-
|
| 468 |
-
|
| 469 |
-
|
| 470 |
-
|
| 471 |
-
|
| 472 |
-
'name' => 'eael_ninja_input_field_typography',
|
| 473 |
-
'selector' => '{{WRAPPER}} .eael-ninja-container .nf-field .nf-field-element input[type="text"],
|
| 474 |
-
{{WRAPPER}} .eael-ninja-container .nf-field .nf-field-element input[type="password"],
|
| 475 |
-
{{WRAPPER}} .eael-ninja-container .nf-field .nf-field-element input[type="email"],
|
| 476 |
-
{{WRAPPER}} .eael-ninja-container .nf-field .nf-field-element input[type="url"],
|
| 477 |
-
{{WRAPPER}} .eael-ninja-container .nf-field .nf-field-element input[type="url"],
|
| 478 |
-
{{WRAPPER}} .eael-ninja-container .nf-field .nf-field-element input[type="number"],
|
| 479 |
-
{{WRAPPER}} .eael-ninja-container .nf-field .nf-field-element textarea',
|
| 480 |
]
|
| 481 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 482 |
|
| 483 |
-
$this->
|
| 484 |
-
|
| 485 |
-
/**
|
| 486 |
-
* Button Style
|
| 487 |
-
*/
|
| 488 |
-
$this->start_controls_section(
|
| 489 |
-
'eael_section_ninja_submit_button_styles',
|
| 490 |
[
|
| 491 |
-
'label'
|
| 492 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 493 |
]
|
| 494 |
);
|
| 495 |
|
| 496 |
-
|
| 497 |
-
|
| 498 |
-
|
| 499 |
-
|
| 500 |
-
|
| 501 |
-
|
| 502 |
-
|
| 503 |
-
|
| 504 |
-
|
| 505 |
-
|
| 506 |
-
|
| 507 |
-
|
| 508 |
-
|
| 509 |
-
|
| 510 |
-
|
| 511 |
-
|
| 512 |
-
|
| 513 |
-
|
| 514 |
-
|
| 515 |
-
|
| 516 |
-
|
| 517 |
-
|
| 518 |
-
|
| 519 |
-
|
| 520 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 521 |
[
|
| 522 |
-
'label'
|
| 523 |
-
'type'
|
| 524 |
-
'
|
| 525 |
-
|
| 526 |
-
|
| 527 |
-
'
|
| 528 |
-
'icon' => 'fa fa-ban',
|
| 529 |
],
|
| 530 |
-
'
|
| 531 |
-
'title'
|
| 532 |
-
'icon'
|
| 533 |
],
|
| 534 |
-
'
|
| 535 |
-
'title'
|
| 536 |
-
'icon'
|
| 537 |
-
],
|
| 538 |
-
'right' => [
|
| 539 |
-
'title' => esc_html__( 'Right', 'essential-addons-elementor' ),
|
| 540 |
-
'icon' => 'fa fa-align-right',
|
| 541 |
],
|
| 542 |
],
|
| 543 |
-
'default'
|
| 544 |
-
'
|
| 545 |
-
|
| 546 |
-
);
|
| 547 |
-
|
| 548 |
-
$this->add_group_control(
|
| 549 |
-
Group_Control_Typography::get_type(),
|
| 550 |
-
[
|
| 551 |
-
'name' => 'eael_ninja_submit_btn_typography',
|
| 552 |
-
'scheme' => Scheme_Typography::TYPOGRAPHY_1,
|
| 553 |
-
'selector' => '{{WRAPPER}} .eael-ninja-container .nf-field .nf-field-element input[type="button"]',
|
| 554 |
-
]
|
| 555 |
-
);
|
| 556 |
-
|
| 557 |
-
$this->add_responsive_control(
|
| 558 |
-
'eael_ninja_submit_btn_margin',
|
| 559 |
-
[
|
| 560 |
-
'label' => esc_html__( 'Margin', 'essential-addons-elementor' ),
|
| 561 |
-
'type' => Controls_Manager::DIMENSIONS,
|
| 562 |
-
'size_units' => [ 'px', 'em', '%' ],
|
| 563 |
-
'selectors' => [
|
| 564 |
-
'{{WRAPPER}} .eael-ninja-container .nf-field .nf-field-element input[type="button"]' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
| 565 |
],
|
|
|
|
|
|
|
|
|
|
| 566 |
]
|
| 567 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 568 |
|
| 569 |
-
$this->
|
| 570 |
-
|
| 571 |
[
|
| 572 |
-
'
|
| 573 |
-
'
|
| 574 |
-
'
|
| 575 |
-
'
|
| 576 |
-
|
| 577 |
-
],
|
| 578 |
]
|
| 579 |
);
|
| 580 |
|
| 581 |
-
$this->start_controls_tabs( 'eael_ninja_submit_button_tabs' );
|
| 582 |
-
|
| 583 |
-
$this->start_controls_tab( 'normal', [ 'label' => esc_html__( 'Normal', 'essential-addons-elementor' ) ] );
|
| 584 |
-
|
| 585 |
$this->add_control(
|
| 586 |
-
'
|
| 587 |
[
|
| 588 |
-
'label'
|
| 589 |
-
'type'
|
| 590 |
-
'
|
| 591 |
-
|
|
|
|
| 592 |
],
|
| 593 |
]
|
| 594 |
);
|
| 595 |
|
| 596 |
-
$this->
|
| 597 |
-
'
|
| 598 |
[
|
| 599 |
-
'label'
|
| 600 |
-
'type'
|
| 601 |
-
'
|
| 602 |
-
|
|
|
|
| 603 |
],
|
| 604 |
]
|
| 605 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 606 |
|
| 607 |
$this->add_group_control(
|
| 608 |
-
|
| 609 |
[
|
| 610 |
-
'name'
|
| 611 |
-
'selector'
|
|
|
|
| 612 |
]
|
| 613 |
);
|
| 614 |
-
|
| 615 |
-
|
| 616 |
-
|
| 617 |
-
|
| 618 |
-
|
| 619 |
-
|
| 620 |
-
|
| 621 |
-
|
| 622 |
-
|
| 623 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 624 |
],
|
| 625 |
-
|
| 626 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 627 |
],
|
| 628 |
-
|
| 629 |
-
|
| 630 |
-
|
| 631 |
-
|
| 632 |
-
|
| 633 |
-
|
| 634 |
-
|
| 635 |
-
|
| 636 |
-
|
| 637 |
-
|
| 638 |
-
|
| 639 |
-
[
|
| 640 |
-
'label' => esc_html__( 'Text Color', 'essential-addons-elementor' ),
|
| 641 |
-
'type' => Controls_Manager::COLOR,
|
| 642 |
-
'selectors' => [
|
| 643 |
-
'{{WRAPPER}} .eael-ninja-container .nf-field .nf-field-element input[type="button"]:hover' => 'color: {{VALUE}};',
|
| 644 |
],
|
| 645 |
-
|
| 646 |
-
|
| 647 |
-
|
| 648 |
-
|
| 649 |
-
|
| 650 |
-
|
| 651 |
-
|
| 652 |
-
|
| 653 |
-
|
| 654 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 655 |
],
|
| 656 |
-
|
| 657 |
-
|
| 658 |
-
|
| 659 |
-
|
| 660 |
-
|
| 661 |
-
|
| 662 |
-
|
| 663 |
-
|
| 664 |
-
|
| 665 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 666 |
],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 667 |
]
|
| 668 |
);
|
| 669 |
-
|
| 670 |
-
|
| 671 |
-
|
| 672 |
-
$this->end_controls_tabs();
|
| 673 |
-
|
| 674 |
-
|
| 675 |
-
$this->add_group_control(
|
| 676 |
-
Group_Control_Box_Shadow::get_type(),
|
| 677 |
-
[
|
| 678 |
-
'name' => 'eael_ninja_submit_btn_box_shadow',
|
| 679 |
-
'selector' => '{{WRAPPER}} .eael-ninja-container .nf-field .nf-field-element input[type="button"]',
|
| 680 |
]
|
| 681 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 682 |
|
| 683 |
-
|
| 684 |
-
$this->end_controls_section();
|
| 685 |
-
|
| 686 |
-
}
|
| 687 |
-
|
| 688 |
-
|
| 689 |
-
protected function render( ) {
|
| 690 |
-
|
| 691 |
-
$settings = $this->get_settings();
|
| 692 |
-
|
| 693 |
-
|
| 694 |
-
?>
|
| 695 |
-
|
| 696 |
-
|
| 697 |
-
<?php if ( ! empty( $settings['eael_ninja_form'] ) ) : ?>
|
| 698 |
-
<div class="eael-ninja-container">
|
| 699 |
-
<?php echo do_shortcode( '[ninja_form id="'.$settings['eael_ninja_form'].'"]' ); ?>
|
| 700 |
-
</div>
|
| 701 |
-
<?php endif; ?>
|
| 702 |
-
|
| 703 |
-
<?php
|
| 704 |
-
|
| 705 |
-
}
|
| 706 |
-
|
| 707 |
-
protected function content_template() {''
|
| 708 |
-
|
| 709 |
-
?>
|
| 710 |
-
|
| 711 |
-
|
| 712 |
-
<?php
|
| 713 |
-
}
|
| 714 |
}
|
| 715 |
|
| 716 |
-
|
| 717 |
-
Plugin::instance()->widgets_manager->register_widget_type( new Widget_Eael_NinjaForm() );
|
| 1 |
<?php
|
| 2 |
namespace Elementor;
|
| 3 |
|
| 4 |
+
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
|
|
|
| 5 |
|
| 6 |
class Widget_Eael_NinjaForm extends Widget_Base {
|
| 7 |
+
|
| 8 |
+
public function get_name() {
|
| 9 |
+
return 'eael-ninja';
|
| 10 |
+
}
|
| 11 |
+
|
| 12 |
+
public function get_title() {
|
| 13 |
+
return __( 'EA Ninja Forms', 'essential-addons-elementor' );
|
| 14 |
+
}
|
| 15 |
+
|
| 16 |
+
public function get_categories() {
|
| 17 |
+
return [ 'essential-addons-elementor' ];
|
| 18 |
+
}
|
| 19 |
+
|
| 20 |
+
public function get_icon() {
|
| 21 |
+
return 'fa fa-envelope-o';
|
| 22 |
+
}
|
| 23 |
+
|
| 24 |
+
protected function _register_controls() {
|
| 25 |
+
|
| 26 |
+
/*-----------------------------------------------------------------------------------*/
|
| 27 |
+
/* CONTENT TAB
|
| 28 |
+
/*-----------------------------------------------------------------------------------*/
|
| 29 |
+
|
| 30 |
+
/**
|
| 31 |
+
* Content Tab: Ninja Forms
|
| 32 |
+
* -------------------------------------------------
|
| 33 |
+
*/
|
| 34 |
+
$this->start_controls_section(
|
| 35 |
+
'section_info_box',
|
| 36 |
+
[
|
| 37 |
+
'label' => __( 'Ninja Forms', 'essential-addons-elementor' ),
|
| 38 |
+
]
|
| 39 |
+
);
|
| 40 |
+
|
| 41 |
$this->add_control(
|
| 42 |
+
'contact_form_list',
|
| 43 |
[
|
| 44 |
+
'label' => esc_html__( 'Select Form', 'essential-addons-elementor' ),
|
| 45 |
+
'type' => Controls_Manager::SELECT,
|
| 46 |
+
'label_block' => true,
|
| 47 |
+
'options' => eael_select_ninja_form(),
|
| 48 |
+
'default' => '0',
|
| 49 |
]
|
| 50 |
);
|
| 51 |
+
|
| 52 |
+
$this->add_control(
|
| 53 |
+
'custom_title_description',
|
| 54 |
+
[
|
| 55 |
+
'label' => __( 'Custom Title & Description', 'essential-addons-elementor' ),
|
| 56 |
+
'type' => Controls_Manager::SWITCHER,
|
| 57 |
+
'label_on' => __( 'Yes', 'essential-addons-elementor' ),
|
| 58 |
+
'label_off' => __( 'No', 'essential-addons-elementor' ),
|
| 59 |
+
'return_value' => 'yes',
|
| 60 |
+
]
|
| 61 |
+
);
|
| 62 |
+
|
| 63 |
+
$this->add_control(
|
| 64 |
+
'form_title',
|
| 65 |
+
[
|
| 66 |
+
'label' => __( 'Title', 'essential-addons-elementor' ),
|
| 67 |
+
'type' => Controls_Manager::SWITCHER,
|
| 68 |
+
'default' => 'yes',
|
| 69 |
+
'label_on' => __( 'Show', 'essential-addons-elementor' ),
|
| 70 |
+
'label_off' => __( 'Hide', 'essential-addons-elementor' ),
|
| 71 |
+
'return_value' => 'yes',
|
| 72 |
+
'prefix_class' => 'eael-ninja-form-title-',
|
| 73 |
+
'condition' => [
|
| 74 |
+
'custom_title_description!' => 'yes',
|
| 75 |
+
],
|
| 76 |
+
]
|
| 77 |
+
);
|
| 78 |
+
|
| 79 |
+
$this->add_control(
|
| 80 |
+
'form_title_custom',
|
| 81 |
+
[
|
| 82 |
+
'label' => esc_html__( 'Title', 'essential-addons-elementor' ),
|
| 83 |
+
'type' => Controls_Manager::TEXT,
|
| 84 |
+
'label_block' => true,
|
| 85 |
+
'default' => '',
|
| 86 |
+
'condition' => [
|
| 87 |
+
'custom_title_description' => 'yes',
|
| 88 |
+
],
|
| 89 |
+
]
|
| 90 |
+
);
|
| 91 |
+
|
| 92 |
+
$this->add_control(
|
| 93 |
+
'form_description_custom',
|
| 94 |
[
|
| 95 |
+
'label' => esc_html__( 'Description', 'essential-addons-elementor' ),
|
| 96 |
+
'type' => Controls_Manager::TEXTAREA,
|
| 97 |
+
'default' => '',
|
| 98 |
+
'condition' => [
|
| 99 |
+
'custom_title_description' => 'yes',
|
| 100 |
+
],
|
| 101 |
]
|
| 102 |
);
|
| 103 |
+
|
| 104 |
+
$this->add_control(
|
| 105 |
+
'labels_switch',
|
| 106 |
+
[
|
| 107 |
+
'label' => __( 'Labels', 'essential-addons-elementor' ),
|
| 108 |
+
'type' => Controls_Manager::SWITCHER,
|
| 109 |
+
'default' => 'yes',
|
| 110 |
+
'label_on' => __( 'Show', 'essential-addons-elementor' ),
|
| 111 |
+
'label_off' => __( 'Hide', 'essential-addons-elementor' ),
|
| 112 |
+
'return_value' => 'yes',
|
| 113 |
+
'prefix_class' => 'eael-ninja-form-labels-',
|
| 114 |
+
]
|
| 115 |
+
);
|
| 116 |
+
|
| 117 |
+
$this->add_control(
|
| 118 |
+
'placeholder_switch',
|
| 119 |
+
[
|
| 120 |
+
'label' => __( 'Placeholder', 'essential-addons-elementor' ),
|
| 121 |
+
'type' => Controls_Manager::SWITCHER,
|
| 122 |
+
'default' => 'yes',
|
| 123 |
+
'label_on' => __( 'Show', 'essential-addons-elementor' ),
|
| 124 |
+
'label_off' => __( 'Hide', 'essential-addons-elementor' ),
|
| 125 |
+
'return_value' => 'yes',
|
| 126 |
+
]
|
| 127 |
+
);
|
| 128 |
+
|
| 129 |
+
$this->end_controls_section();
|
| 130 |
+
|
| 131 |
+
/**
|
| 132 |
+
* Content Tab: Errors
|
| 133 |
+
* -------------------------------------------------
|
| 134 |
+
*/
|
| 135 |
+
$this->start_controls_section(
|
| 136 |
+
'section_errors',
|
| 137 |
+
[
|
| 138 |
+
'label' => __( 'Errors', 'essential-addons-elementor' ),
|
| 139 |
+
]
|
| 140 |
+
);
|
| 141 |
+
|
| 142 |
+
$this->add_control(
|
| 143 |
+
'error_messages',
|
| 144 |
+
[
|
| 145 |
+
'label' => __( 'Error Messages', 'essential-addons-elementor' ),
|
| 146 |
+
'type' => Controls_Manager::SELECT,
|
| 147 |
+
'default' => 'show',
|
| 148 |
+
'options' => [
|
| 149 |
+
'show' => __( 'Show', 'essential-addons-elementor' ),
|
| 150 |
+
'hide' => __( 'Hide', 'essential-addons-elementor' ),
|
| 151 |
+
],
|
| 152 |
+
'selectors_dictionary' => [
|
| 153 |
+
'show' => 'block',
|
| 154 |
+
'hide' => 'none',
|
| 155 |
+
],
|
| 156 |
+
'selectors' => [
|
| 157 |
+
'{{WRAPPER}} .eael-ninja-form .nf-error-wrap .nf-error-required-error' => 'display: {{VALUE}} !important;',
|
| 158 |
+
],
|
| 159 |
+
]
|
| 160 |
+
);
|
| 161 |
+
|
| 162 |
+
$this->add_control(
|
| 163 |
+
'validation_errors',
|
| 164 |
+
[
|
| 165 |
+
'label' => __( 'Validation Errors', 'essential-addons-elementor' ),
|
| 166 |
+
'type' => Controls_Manager::SELECT,
|
| 167 |
+
'default' => 'show',
|
| 168 |
+
'options' => [
|
| 169 |
+
'show' => __( 'Show', 'essential-addons-elementor' ),
|
| 170 |
+
'hide' => __( 'Hide', 'essential-addons-elementor' ),
|
| 171 |
+
],
|
| 172 |
+
'selectors_dictionary' => [
|
| 173 |
+
'show' => 'block',
|
| 174 |
+
'hide' => 'none',
|
| 175 |
+
],
|
| 176 |
+
'selectors' => [
|
| 177 |
+
'{{WRAPPER}} .eael-ninja-form .nf-form-errors .nf-error-field-errors' => 'display: {{VALUE}} !important;',
|
| 178 |
+
],
|
| 179 |
+
]
|
| 180 |
+
);
|
| 181 |
+
|
| 182 |
+
$this->end_controls_section();
|
| 183 |
+
|
| 184 |
+
/**
|
| 185 |
+
* Style Tab: Form Container
|
| 186 |
+
* -------------------------------------------------
|
| 187 |
+
*/
|
| 188 |
+
$this->start_controls_section(
|
| 189 |
+
'section_container_style',
|
| 190 |
+
[
|
| 191 |
+
'label' => __( 'Form Container', 'essential-addons-elementor' ),
|
| 192 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
| 193 |
+
]
|
| 194 |
+
);
|
| 195 |
|
| 196 |
$this->add_control(
|
| 197 |
+
'eael_contact_form_background',
|
| 198 |
[
|
| 199 |
'label' => esc_html__( 'Form Background Color', 'essential-addons-elementor' ),
|
| 200 |
'type' => Controls_Manager::COLOR,
|
|
|
|
| 201 |
'selectors' => [
|
| 202 |
+
'{{WRAPPER}} .eael-contact-form' => 'background: {{VALUE}};',
|
| 203 |
],
|
| 204 |
]
|
| 205 |
);
|
| 206 |
+
|
| 207 |
$this->add_responsive_control(
|
| 208 |
+
'eael_contact_form_alignment',
|
| 209 |
[
|
| 210 |
'label' => esc_html__( 'Form Alignment', 'essential-addons-elementor' ),
|
| 211 |
'type' => Controls_Manager::CHOOSE,
|
| 217 |
],
|
| 218 |
'left' => [
|
| 219 |
'title' => esc_html__( 'Left', 'essential-addons-elementor' ),
|
| 220 |
+
'icon' => 'eicon-h-align-left',
|
| 221 |
],
|
| 222 |
'center' => [
|
| 223 |
'title' => esc_html__( 'Center', 'essential-addons-elementor' ),
|
| 224 |
+
'icon' => 'eicon-h-align-center',
|
| 225 |
],
|
| 226 |
'right' => [
|
| 227 |
'title' => esc_html__( 'Right', 'essential-addons-elementor' ),
|
| 228 |
+
'icon' => 'eicon-h-align-right',
|
| 229 |
],
|
| 230 |
],
|
| 231 |
'default' => 'default',
|
|
|
|
| 232 |
]
|
| 233 |
);
|
| 234 |
|
| 235 |
+
$this->add_responsive_control(
|
| 236 |
+
'eael_contact_form_width',
|
| 237 |
[
|
| 238 |
'label' => esc_html__( 'Form Width', 'essential-addons-elementor' ),
|
| 239 |
'type' => Controls_Manager::SLIDER,
|
| 249 |
],
|
| 250 |
],
|
| 251 |
'selectors' => [
|
| 252 |
+
'{{WRAPPER}} .eael-contact-form' => 'width: {{SIZE}}{{UNIT}};',
|
| 253 |
],
|
| 254 |
]
|
| 255 |
);
|
| 256 |
|
| 257 |
$this->add_responsive_control(
|
| 258 |
+
'eael_contact_form_max_width',
|
| 259 |
[
|
| 260 |
'label' => esc_html__( 'Form Max Width', 'essential-addons-elementor' ),
|
| 261 |
'type' => Controls_Manager::SLIDER,
|
| 271 |
],
|
| 272 |
],
|
| 273 |
'selectors' => [
|
| 274 |
+
'{{WRAPPER}} .eael-contact-form' => 'max-width: {{SIZE}}{{UNIT}};',
|
| 275 |
],
|
| 276 |
]
|
| 277 |
);
|
| 278 |
+
|
| 279 |
+
|
| 280 |
$this->add_responsive_control(
|
| 281 |
+
'eael_contact_form_margin',
|
| 282 |
[
|
| 283 |
'label' => esc_html__( 'Form Margin', 'essential-addons-elementor' ),
|
| 284 |
'type' => Controls_Manager::DIMENSIONS,
|
| 285 |
'size_units' => [ 'px', 'em', '%' ],
|
| 286 |
'selectors' => [
|
| 287 |
+
'{{WRAPPER}} .eael-contact-form' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
| 288 |
],
|
| 289 |
]
|
| 290 |
+
);
|
| 291 |
+
|
| 292 |
$this->add_responsive_control(
|
| 293 |
+
'eael_contact_form_padding',
|
| 294 |
[
|
| 295 |
'label' => esc_html__( 'Form Padding', 'essential-addons-elementor' ),
|
| 296 |
'type' => Controls_Manager::DIMENSIONS,
|
| 297 |
'size_units' => [ 'px', 'em', '%' ],
|
| 298 |
'selectors' => [
|
| 299 |
+
'{{WRAPPER}} .eael-contact-form' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
| 300 |
],
|
| 301 |
]
|
| 302 |
);
|
| 303 |
+
|
| 304 |
+
|
| 305 |
$this->add_control(
|
| 306 |
+
'eael_contact_form_border_radius',
|
| 307 |
[
|
| 308 |
'label' => esc_html__( 'Border Radius', 'essential-addons-elementor' ),
|
| 309 |
'type' => Controls_Manager::DIMENSIONS,
|
| 310 |
'separator' => 'before',
|
| 311 |
'size_units' => [ 'px' ],
|
| 312 |
'selectors' => [
|
| 313 |
+
'{{WRAPPER}} .eael-contact-form' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
| 314 |
],
|
| 315 |
]
|
| 316 |
);
|
| 317 |
+
|
| 318 |
+
|
| 319 |
$this->add_group_control(
|
| 320 |
Group_Control_Border::get_type(),
|
| 321 |
[
|
| 322 |
+
'name' => 'eael_contact_form_border',
|
| 323 |
+
'selector' => '{{WRAPPER}} .eael-contact-form',
|
| 324 |
]
|
| 325 |
);
|
| 326 |
+
|
| 327 |
+
|
| 328 |
$this->add_group_control(
|
| 329 |
Group_Control_Box_Shadow::get_type(),
|
| 330 |
[
|
| 331 |
+
'name' => 'eael_contact_form_box_shadow',
|
| 332 |
+
'selector' => '{{WRAPPER}} .eael-contact-form',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 333 |
]
|
| 334 |
);
|
| 335 |
|
| 336 |
+
$this->end_controls_section();
|
| 337 |
+
|
| 338 |
+
/*-----------------------------------------------------------------------------------*/
|
| 339 |
+
/* STYLE TAB
|
| 340 |
+
/*-----------------------------------------------------------------------------------*/
|
| 341 |
+
|
| 342 |
+
/**
|
| 343 |
+
* Style Tab: Form Title & Description
|
| 344 |
+
* -------------------------------------------------
|
| 345 |
+
*/
|
| 346 |
+
$this->start_controls_section(
|
| 347 |
+
'section_form_title_style',
|
| 348 |
+
[
|
| 349 |
+
'label' => __( 'Title & Description', 'essential-addons-elementor' ),
|
| 350 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
| 351 |
+
]
|
| 352 |
+
);
|
| 353 |
+
|
| 354 |
+
$this->add_responsive_control(
|
| 355 |
+
'heading_alignment',
|
| 356 |
+
[
|
| 357 |
+
'label' => __( 'Alignment', 'essential-addons-elementor' ),
|
| 358 |
+
'type' => Controls_Manager::CHOOSE,
|
| 359 |
+
'options' => [
|
| 360 |
+
'left' => [
|
| 361 |
+
'title' => __( 'Left', 'essential-addons-elementor' ),
|
| 362 |
+
'icon' => 'fa fa-align-left',
|
|
|
|
| 363 |
],
|
| 364 |
+
'center' => [
|
| 365 |
+
'title' => __( 'Center', 'essential-addons-elementor' ),
|
| 366 |
+
'icon' => 'fa fa-align-center',
|
| 367 |
],
|
| 368 |
+
'right' => [
|
| 369 |
+
'title' => __( 'Right', 'essential-addons-elementor' ),
|
| 370 |
+
'icon' => 'fa fa-align-right',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 371 |
],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 372 |
],
|
| 373 |
+
'default' => '',
|
| 374 |
+
'selectors' => [
|
| 375 |
+
'{{WRAPPER}} .eael-ninja-form .nf-form-title h3, {{WRAPPER}} .eael-ninja-form-heading' => 'text-align: {{VALUE}};',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 376 |
],
|
| 377 |
]
|
| 378 |
);
|
| 379 |
+
|
| 380 |
+
$this->add_control(
|
| 381 |
+
'title_heading',
|
| 382 |
+
[
|
| 383 |
+
'label' => __( 'Title', 'essential-addons-elementor' ),
|
| 384 |
+
'type' => Controls_Manager::HEADING,
|
| 385 |
+
'separator' => 'before',
|
| 386 |
+
]
|
| 387 |
+
);
|
| 388 |
+
|
| 389 |
+
$this->add_control(
|
| 390 |
+
'form_title_text_color',
|
| 391 |
+
[
|
| 392 |
+
'label' => __( 'Text Color', 'essential-addons-elementor' ),
|
| 393 |
+
'type' => Controls_Manager::COLOR,
|
| 394 |
+
'default' => '',
|
| 395 |
+
'selectors' => [
|
| 396 |
+
'{{WRAPPER}} .eael-ninja-form .nf-form-title h3, {{WRAPPER}} .eael-contact-form-title' => 'color: {{VALUE}}',
|
| 397 |
+
],
|
| 398 |
+
]
|
| 399 |
+
);
|
| 400 |
+
|
| 401 |
+
$this->add_group_control(
|
| 402 |
+
Group_Control_Typography::get_type(),
|
| 403 |
+
[
|
| 404 |
+
'name' => 'form_title_typography',
|
| 405 |
+
'label' => __( 'Typography', 'essential-addons-elementor' ),
|
| 406 |
+
'selector' => '{{WRAPPER}} .eael-ninja-form .nf-form-title h3, {{WRAPPER}} .eael-contact-form-title',
|
| 407 |
+
]
|
| 408 |
+
);
|
| 409 |
+
|
| 410 |
+
$this->add_responsive_control(
|
| 411 |
+
'form_title_margin',
|
| 412 |
[
|
| 413 |
+
'label' => __( 'Margin', 'essential-addons-elementor' ),
|
| 414 |
+
'type' => Controls_Manager::DIMENSIONS,
|
| 415 |
+
'size_units' => [ 'px', 'em', '%' ],
|
| 416 |
+
'allowed_dimensions' => 'vertical',
|
| 417 |
+
'placeholder' => [
|
| 418 |
+
'top' => '',
|
| 419 |
+
'right' => 'auto',
|
| 420 |
+
'bottom' => '',
|
| 421 |
+
'left' => 'auto',
|
| 422 |
+
],
|
| 423 |
+
'selectors' => [
|
| 424 |
+
'{{WRAPPER}} .eael-ninja-form .nf-form-title h3, {{WRAPPER}} .eael-contact-form-title' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
| 425 |
],
|
| 426 |
]
|
| 427 |
);
|
| 428 |
+
|
| 429 |
+
$this->add_control(
|
| 430 |
+
'description_heading',
|
| 431 |
+
[
|
| 432 |
+
'label' => __( 'Description', 'essential-addons-elementor' ),
|
| 433 |
+
'type' => Controls_Manager::HEADING,
|
| 434 |
+
'separator' => 'before',
|
| 435 |
+
]
|
| 436 |
+
);
|
| 437 |
+
|
| 438 |
+
$this->add_control(
|
| 439 |
+
'form_description_text_color',
|
| 440 |
+
[
|
| 441 |
+
'label' => __( 'Text Color', 'essential-addons-elementor' ),
|
| 442 |
+
'type' => Controls_Manager::COLOR,
|
| 443 |
+
'default' => '',
|
| 444 |
+
'selectors' => [
|
| 445 |
+
'{{WRAPPER}} .eael-ninja-form .eael-contact-form-description' => 'color: {{VALUE}}',
|
| 446 |
+
],
|
| 447 |
+
]
|
| 448 |
+
);
|
| 449 |
+
|
| 450 |
+
$this->add_group_control(
|
| 451 |
+
Group_Control_Typography::get_type(),
|
| 452 |
+
[
|
| 453 |
+
'name' => 'form_description_typography',
|
| 454 |
+
'label' => __( 'Typography', 'essential-addons-elementor' ),
|
| 455 |
+
'scheme' => Scheme_Typography::TYPOGRAPHY_4,
|
| 456 |
+
'selector' => '{{WRAPPER}} .eael-ninja-form .eael-contact-form-description',
|
| 457 |
+
]
|
| 458 |
+
);
|
| 459 |
+
|
| 460 |
+
$this->add_responsive_control(
|
| 461 |
+
'form_description_margin',
|
| 462 |
[
|
| 463 |
+
'label' => __( 'Margin', 'essential-addons-elementor' ),
|
| 464 |
+
'type' => Controls_Manager::DIMENSIONS,
|
| 465 |
+
'size_units' => [ 'px', 'em', '%' ],
|
| 466 |
+
'allowed_dimensions' => 'vertical',
|
| 467 |
+
'placeholder' => [
|
| 468 |
+
'top' => '',
|
| 469 |
+
'right' => 'auto',
|
| 470 |
+
'bottom' => '',
|
| 471 |
+
'left' => 'auto',
|
| 472 |
+
],
|
| 473 |
+
'selectors' => [
|
| 474 |
+
'{{WRAPPER}} .eael-contact-form-description' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
| 475 |
+
],
|
| 476 |
]
|
| 477 |
);
|
| 478 |
+
|
| 479 |
+
$this->end_controls_section();
|
| 480 |
+
|
| 481 |
+
/**
|
| 482 |
+
* Style Tab: Labels
|
| 483 |
+
* -------------------------------------------------
|
| 484 |
+
*/
|
| 485 |
+
$this->start_controls_section(
|
| 486 |
+
'section_label_style',
|
| 487 |
+
[
|
| 488 |
+
'label' => __( 'Labels', 'essential-addons-elementor' ),
|
| 489 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
| 490 |
+
'condition' => [
|
| 491 |
+
'labels_switch' => 'yes',
|
| 492 |
+
],
|
| 493 |
+
]
|
| 494 |
+
);
|
| 495 |
+
|
| 496 |
+
$this->add_control(
|
| 497 |
+
'text_color_label',
|
| 498 |
+
[
|
| 499 |
+
'label' => __( 'Text Color', 'essential-addons-elementor' ),
|
| 500 |
+
'type' => Controls_Manager::COLOR,
|
| 501 |
+
'selectors' => [
|
| 502 |
+
'{{WRAPPER}} .eael-ninja-form .nf-field-label label' => 'color: {{VALUE}}',
|
| 503 |
+
],
|
| 504 |
+
'condition' => [
|
| 505 |
+
'labels_switch' => 'yes',
|
| 506 |
+
],
|
| 507 |
+
]
|
| 508 |
+
);
|
| 509 |
+
|
| 510 |
+
$this->add_group_control(
|
| 511 |
+
Group_Control_Typography::get_type(),
|
| 512 |
+
[
|
| 513 |
+
'name' => 'typography_label',
|
| 514 |
+
'label' => __( 'Typography', 'essential-addons-elementor' ),
|
| 515 |
+
'selector' => '{{WRAPPER}} .eael-ninja-form .nf-field-label label',
|
| 516 |
+
'condition' => [
|
| 517 |
+
'labels_switch' => 'yes',
|
| 518 |
+
],
|
| 519 |
+
]
|
| 520 |
+
);
|
| 521 |
+
|
| 522 |
+
$this->end_controls_section();
|
| 523 |
+
|
| 524 |
+
/**
|
| 525 |
+
* Style Tab: Input & Textarea
|
| 526 |
+
* -------------------------------------------------
|
| 527 |
+
*/
|
| 528 |
+
$this->start_controls_section(
|
| 529 |
+
'section_fields_style',
|
| 530 |
+
[
|
| 531 |
+
'label' => __( 'Input & Textarea', 'essential-addons-elementor' ),
|
| 532 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
| 533 |
+
]
|
| 534 |
+
);
|
| 535 |
+
|
| 536 |
+
$this->add_responsive_control(
|
| 537 |
+
'input_alignment',
|
| 538 |
+
[
|
| 539 |
+
'label' => __( 'Alignment', 'essential-addons-elementor' ),
|
| 540 |
+
'type' => Controls_Manager::CHOOSE,
|
| 541 |
+
'options' => [
|
| 542 |
+
'left' => [
|
| 543 |
+
'title' => __( 'Left', 'essential-addons-elementor' ),
|
| 544 |
+
'icon' => 'fa fa-align-left',
|
| 545 |
+
],
|
| 546 |
+
'center' => [
|
| 547 |
+
'title' => __( 'Center', 'essential-addons-elementor' ),
|
| 548 |
+
'icon' => 'fa fa-align-center',
|
| 549 |
+
],
|
| 550 |
+
'right' => [
|
| 551 |
+
'title' => __( 'Right', 'essential-addons-elementor' ),
|
| 552 |
+
'icon' => 'fa fa-align-right',
|
| 553 |
+
],
|
| 554 |
+
],
|
| 555 |
+
'default' => '',
|
| 556 |
+
'selectors' => [
|
| 557 |
+
'{{WRAPPER}} .eael-ninja-form .nf-field input[type="text"], {{WRAPPER}} .eael-ninja-form .nf-field input[type="email"], {{WRAPPER}} .eael-ninja-form .nf-field input[type="tel"], {{WRAPPER}} .eael-ninja-form .nf-field textarea, {{WRAPPER}} .eael-ninja-form .nf-field select' => 'text-align: {{VALUE}};',
|
| 558 |
+
],
|
| 559 |
]
|
| 560 |
);
|
| 561 |
|
| 562 |
+
$this->start_controls_tabs( 'tabs_fields_style' );
|
| 563 |
+
|
| 564 |
+
$this->start_controls_tab(
|
| 565 |
+
'tab_fields_normal',
|
| 566 |
+
[
|
| 567 |
+
'label' => __( 'Normal', 'essential-addons-elementor' ),
|
| 568 |
+
]
|
| 569 |
+
);
|
| 570 |
+
|
| 571 |
+
$this->add_control(
|
| 572 |
+
'field_bg_color',
|
| 573 |
+
[
|
| 574 |
+
'label' => __( 'Background Color', 'essential-addons-elementor' ),
|
| 575 |
+
'type' => Controls_Manager::COLOR,
|
| 576 |
+
'default' => '',
|
| 577 |
+
'selectors' => [
|
| 578 |
+
'{{WRAPPER}} .eael-ninja-form .nf-field input[type="text"], {{WRAPPER}} .eael-ninja-form .nf-field input[type="email"], {{WRAPPER}} .eael-ninja-form .nf-field input[type="tel"], {{WRAPPER}} .eael-ninja-form .nf-field textarea, {{WRAPPER}} .eael-ninja-form .nf-field select' => 'background-color: {{VALUE}}',
|
| 579 |
+
],
|
| 580 |
+
]
|
| 581 |
+
);
|
| 582 |
+
|
| 583 |
+
$this->add_control(
|
| 584 |
+
'field_text_color',
|
| 585 |
+
[
|
| 586 |
+
'label' => __( 'Text Color', 'essential-addons-elementor' ),
|
| 587 |
+
'type' => Controls_Manager::COLOR,
|
| 588 |
+
'default' => '',
|
| 589 |
+
'selectors' => [
|
| 590 |
+
'{{WRAPPER}} .eael-ninja-form .nf-field input[type="text"], {{WRAPPER}} .eael-ninja-form .nf-field input[type="email"], {{WRAPPER}} .eael-ninja-form .nf-field input[type="tel"], {{WRAPPER}} .eael-ninja-form .nf-field textarea, {{WRAPPER}} .eael-ninja-form .nf-field select' => 'color: {{VALUE}}',
|
| 591 |
+
],
|
| 592 |
+
]
|
| 593 |
+
);
|
| 594 |
|
| 595 |
$this->add_group_control(
|
| 596 |
+
Group_Control_Border::get_type(),
|
| 597 |
[
|
| 598 |
+
'name' => 'field_border',
|
| 599 |
+
'label' => __( 'Border', 'essential-addons-elementor' ),
|
| 600 |
+
'placeholder' => '1px',
|
| 601 |
+
'default' => '1px',
|
| 602 |
+
'selector' => '{{WRAPPER}} .eael-ninja-form .nf-field input[type="text"], {{WRAPPER}} .eael-ninja-form .nf-field input[type="email"], {{WRAPPER}} .eael-ninja-form .nf-field input[type="tel"], {{WRAPPER}} .eael-ninja-form .nf-field textarea, {{WRAPPER}} .eael-ninja-form .nf-field select',
|
| 603 |
+
'separator' => 'before',
|
|
|
|
|
|
|
|
|
|
| 604 |
]
|
| 605 |
);
|
| 606 |
|
| 607 |
$this->add_control(
|
| 608 |
+
'field_radius',
|
| 609 |
[
|
| 610 |
+
'label' => __( 'Border Radius', 'essential-addons-elementor' ),
|
| 611 |
+
'type' => Controls_Manager::DIMENSIONS,
|
| 612 |
+
'size_units' => [ 'px', 'em', '%' ],
|
| 613 |
+
'selectors' => [
|
| 614 |
+
'{{WRAPPER}} .eael-ninja-form .nf-field input[type="text"], {{WRAPPER}} .eael-ninja-form .nf-field input[type="email"], {{WRAPPER}} .eael-ninja-form .nf-field input[type="tel"], {{WRAPPER}} .eael-ninja-form .nf-field textarea, {{WRAPPER}} .eael-ninja-form .nf-field select' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 615 |
],
|
| 616 |
]
|
| 617 |
);
|
| 618 |
+
|
| 619 |
+
$this->add_responsive_control(
|
| 620 |
+
'text_indent',
|
| 621 |
+
[
|
| 622 |
+
'label' => __( 'Text Indent', 'essential-addons-elementor' ),
|
| 623 |
+
'type' => Controls_Manager::SLIDER,
|
| 624 |
+
'range' => [
|
| 625 |
+
'px' => [
|
| 626 |
+
'min' => 0,
|
| 627 |
+
'max' => 60,
|
| 628 |
+
'step' => 1,
|
| 629 |
+
],
|
| 630 |
+
'%' => [
|
| 631 |
+
'min' => 0,
|
| 632 |
+
'max' => 30,
|
| 633 |
+
'step' => 1,
|
| 634 |
+
],
|
| 635 |
+
],
|
| 636 |
+
'size_units' => [ 'px', 'em', '%' ],
|
| 637 |
+
'selectors' => [
|
| 638 |
+
'{{WRAPPER}} .eael-ninja-form .nf-field input[type="text"], {{WRAPPER}} .eael-ninja-form .nf-field input[type="email"], {{WRAPPER}} .eael-ninja-form .nf-field input[type="tel"], {{WRAPPER}} .eael-ninja-form .nf-field textarea, {{WRAPPER}} .eael-ninja-form .nf-field select' => 'text-indent: {{SIZE}}{{UNIT}}',
|
| 639 |
+
],
|
| 640 |
+
'separator' => 'before',
|
| 641 |
+
]
|
| 642 |
+
);
|
| 643 |
+
|
| 644 |
+
$this->add_responsive_control(
|
| 645 |
+
'input_width',
|
| 646 |
+
[
|
| 647 |
+
'label' => __( 'Input Width', 'essential-addons-elementor' ),
|
| 648 |
+
'type' => Controls_Manager::SLIDER,
|
| 649 |
+
'range' => [
|
| 650 |
+
'px' => [
|
| 651 |
+
'min' => 0,
|
| 652 |
+
'max' => 1200,
|
| 653 |
+
'step' => 1,
|
| 654 |
+
],
|
| 655 |
+
],
|
| 656 |
+
'size_units' => [ 'px', 'em', '%' ],
|
| 657 |
+
'selectors' => [
|
| 658 |
+
'{{WRAPPER}} .eael-ninja-form .nf-field input[type="text"], {{WRAPPER}} .eael-ninja-form .nf-field input[type="email"], {{WRAPPER}} .eael-ninja-form .nf-field input[type="tel"], {{WRAPPER}} .eael-ninja-form .nf-field select' => 'width: {{SIZE}}{{UNIT}}',
|
| 659 |
+
],
|
| 660 |
+
'separator' => 'before',
|
| 661 |
+
]
|
| 662 |
+
);
|
| 663 |
+
|
| 664 |
+
$this->add_responsive_control(
|
| 665 |
+
'input_height',
|
| 666 |
+
[
|
| 667 |
+
'label' => __( 'Input Height', 'essential-addons-elementor' ),
|
| 668 |
+
'type' => Controls_Manager::SLIDER,
|
| 669 |
+
'range' => [
|
| 670 |
+
'px' => [
|
| 671 |
+
'min' => 0,
|
| 672 |
+
'max' => 80,
|
| 673 |
+
'step' => 1,
|
| 674 |
+
],
|
| 675 |
+
],
|
| 676 |
+
'size_units' => [ 'px', 'em', '%' ],
|
| 677 |
+
'selectors' => [
|
| 678 |
+
'{{WRAPPER}} .eael-ninja-form .nf-field input[type="text"], {{WRAPPER}} .eael-ninja-form .nf-field input[type="email"], {{WRAPPER}} .eael-ninja-form .nf-field input[type="tel"], {{WRAPPER}} .eael-ninja-form .nf-field select' => 'height: {{SIZE}}{{UNIT}}',
|
| 679 |
+
],
|
| 680 |
+
]
|
| 681 |
+
);
|
| 682 |
+
|
| 683 |
+
$this->add_responsive_control(
|
| 684 |
+
'textarea_width',
|
| 685 |
+
[
|
| 686 |
+
'label' => __( 'Textarea Width', 'essential-addons-elementor' ),
|
| 687 |
+
'type' => Controls_Manager::SLIDER,
|
| 688 |
+
'range' => [
|
| 689 |
+
'px' => [
|
| 690 |
+
'min' => 0,
|
| 691 |
+
'max' => 1200,
|
| 692 |
+
'step' => 1,
|
| 693 |
+
],
|
| 694 |
+
],
|
| 695 |
+
'size_units' => [ 'px', 'em', '%' ],
|
| 696 |
+
'selectors' => [
|
| 697 |
+
'{{WRAPPER}} .eael-ninja-form .nf-field textarea' => 'width: {{SIZE}}{{UNIT}}',
|
| 698 |
+
],
|
| 699 |
+
]
|
| 700 |
+
);
|
| 701 |
+
|
| 702 |
+
$this->add_responsive_control(
|
| 703 |
+
'textarea_height',
|
| 704 |
+
[
|
| 705 |
+
'label' => __( 'Textarea Height', 'essential-addons-elementor' ),
|
| 706 |
+
'type' => Controls_Manager::SLIDER,
|
| 707 |
+
'range' => [
|
| 708 |
+
'px' => [
|
| 709 |
+
'min' => 0,
|
| 710 |
+
'max' => 400,
|
| 711 |
+
'step' => 1,
|
| 712 |
+
],
|
| 713 |
+
],
|
| 714 |
+
'size_units' => [ 'px', 'em', '%' ],
|
| 715 |
+
'selectors' => [
|
| 716 |
+
'{{WRAPPER}} .eael-ninja-form .nf-field textarea' => 'height: {{SIZE}}{{UNIT}}',
|
| 717 |
+
],
|
| 718 |
+
]
|
| 719 |
+
);
|
| 720 |
|
| 721 |
+
$this->add_responsive_control(
|
| 722 |
+
'field_padding',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 723 |
[
|
| 724 |
+
'label' => __( 'Padding', 'essential-addons-elementor' ),
|
| 725 |
+
'type' => Controls_Manager::DIMENSIONS,
|
| 726 |
+
'size_units' => [ 'px', 'em', '%' ],
|
| 727 |
+
'selectors' => [
|
| 728 |
+
'{{WRAPPER}} .eael-ninja-form .nf-field input[type="text"], {{WRAPPER}} .eael-ninja-form .nf-field input[type="email"], {{WRAPPER}} .eael-ninja-form .nf-field input[type="tel"], {{WRAPPER}} .eael-ninja-form .nf-field textarea, {{WRAPPER}} .eael-ninja-form .nf-field select' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
| 729 |
],
|
| 730 |
+
'separator' => 'before',
|
| 731 |
]
|
| 732 |
);
|
| 733 |
+
|
| 734 |
+
$this->add_responsive_control(
|
| 735 |
+
'field_spacing',
|
| 736 |
+
[
|
| 737 |
+
'label' => __( 'Spacing', 'essential-addons-elementor' ),
|
| 738 |
+
'type' => Controls_Manager::SLIDER,
|
| 739 |
+
'range' => [
|
| 740 |
+
'px' => [
|
| 741 |
+
'min' => 0,
|
| 742 |
+
'max' => 100,
|
| 743 |
+
'step' => 1,
|
| 744 |
+
],
|
| 745 |
+
],
|
| 746 |
+
'size_units' => [ 'px', 'em', '%' ],
|
| 747 |
+
'selectors' => [
|
| 748 |
+
'{{WRAPPER}} .eael-ninja-form .nf-field-container' => 'margin-bottom: {{SIZE}}{{UNIT}}',
|
| 749 |
+
],
|
| 750 |
+
]
|
| 751 |
+
);
|
| 752 |
+
|
| 753 |
+
$this->add_group_control(
|
| 754 |
+
Group_Control_Typography::get_type(),
|
| 755 |
+
[
|
| 756 |
+
'name' => 'field_typography',
|
| 757 |
+
'label' => __( 'Typography', 'essential-addons-elementor' ),
|
| 758 |
+
'selector' => '{{WRAPPER}} .eael-ninja-form .nf-field input[type="text"], {{WRAPPER}} .eael-ninja-form .nf-field input[type="email"], {{WRAPPER}} .eael-ninja-form .nf-field input[type="tel"], {{WRAPPER}} .eael-ninja-form .nf-field textarea, {{WRAPPER}} .eael-ninja-form .nf-field select',
|
| 759 |
+
'separator' => 'before',
|
| 760 |
+
]
|
| 761 |
+
);
|
| 762 |
|
| 763 |
+
$this->add_group_control(
|
| 764 |
+
Group_Control_Box_Shadow::get_type(),
|
| 765 |
[
|
| 766 |
+
'name' => 'field_box_shadow',
|
| 767 |
+
'selector' => '{{WRAPPER}} .eael-ninja-form .nf-field input[type="text"], {{WRAPPER}} .eael-ninja-form .nf-field input[type="email"], {{WRAPPER}} .eael-ninja-form .nf-field input[type="tel"], {{WRAPPER}} .eael-ninja-form .nf-field textarea, {{WRAPPER}} .eael-ninja-form .nf-field select',
|
| 768 |
+
'separator' => 'before',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 769 |
]
|
| 770 |
);
|
| 771 |
|
| 772 |
+
$this->end_controls_tab();
|
| 773 |
+
|
| 774 |
+
$this->start_controls_tab(
|
| 775 |
+
'tab_fields_focus',
|
| 776 |
+
[
|
| 777 |
+
'label' => __( 'Focus', 'essential-addons-elementor' ),
|
| 778 |
+
]
|
| 779 |
+
);
|
| 780 |
+
|
| 781 |
+
$this->add_control(
|
| 782 |
+
'field_bg_color_focus',
|
| 783 |
+
[
|
| 784 |
+
'label' => __( 'Background Color', 'essential-addons-elementor' ),
|
| 785 |
+
'type' => Controls_Manager::COLOR,
|
| 786 |
+
'default' => '',
|
| 787 |
+
'selectors' => [
|
| 788 |
+
'{{WRAPPER}} .eael-ninja-form .nf-field input:focus, {{WRAPPER}} .eael-ninja-form .nf-field textarea:focus' => 'background-color: {{VALUE}}',
|
| 789 |
+
],
|
| 790 |
+
]
|
| 791 |
+
);
|
| 792 |
|
| 793 |
+
$this->add_group_control(
|
| 794 |
+
Group_Control_Border::get_type(),
|
| 795 |
[
|
| 796 |
+
'name' => 'focus_input_border',
|
| 797 |
+
'label' => __( 'Border', 'essential-addons-elementor' ),
|
| 798 |
+
'placeholder' => '1px',
|
| 799 |
+
'default' => '1px',
|
| 800 |
+
'selector' => '{{WRAPPER}} .eael-ninja-form .nf-field input:focus, {{WRAPPER}} .eael-ninja-form .nf-field textarea:focus',
|
| 801 |
]
|
| 802 |
);
|
| 803 |
|
| 804 |
$this->add_group_control(
|
| 805 |
+
Group_Control_Box_Shadow::get_type(),
|
| 806 |
[
|
| 807 |
+
'name' => 'focus_box_shadow',
|
| 808 |
+
'selector' => '{{WRAPPER}} .eael-ninja-form .nf-field input:focus, {{WRAPPER}} .eael-ninja-form .nf-field textarea:focus',
|
| 809 |
+
'separator' => 'before',
|
| 810 |
]
|
| 811 |
);
|
| 812 |
|
| 813 |
+
$this->end_controls_tab();
|
| 814 |
+
|
| 815 |
+
$this->end_controls_tabs();
|
| 816 |
+
|
| 817 |
+
$this->end_controls_section();
|
| 818 |
+
|
| 819 |
+
/**
|
| 820 |
+
* Style Tab: Field Description
|
| 821 |
+
* -------------------------------------------------
|
| 822 |
+
*/
|
| 823 |
+
$this->start_controls_section(
|
| 824 |
+
'section_field_description_style',
|
| 825 |
+
[
|
| 826 |
+
'label' => __( 'Field Description', 'essential-addons-elementor' ),
|
| 827 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
| 828 |
+
]
|
| 829 |
+
);
|
| 830 |
+
|
| 831 |
+
$this->add_control(
|
| 832 |
+
'field_description_text_color',
|
| 833 |
+
[
|
| 834 |
+
'label' => __( 'Text Color', 'essential-addons-elementor' ),
|
| 835 |
+
'type' => Controls_Manager::COLOR,
|
| 836 |
+
'selectors' => [
|
| 837 |
+
'{{WRAPPER}} .eael-ninja-form .nf-field .nf-field-description' => 'color: {{VALUE}}',
|
| 838 |
+
],
|
| 839 |
+
]
|
| 840 |
+
);
|
| 841 |
+
|
| 842 |
+
$this->add_group_control(
|
| 843 |
+
Group_Control_Typography::get_type(),
|
| 844 |
+
[
|
| 845 |
+
'name' => 'field_description_typography',
|
| 846 |
+
'label' => __( 'Typography', 'essential-addons-elementor' ),
|
| 847 |
+
'selector' => '{{WRAPPER}} .eael-ninja-form .nf-field .nf-field-description',
|
| 848 |
+
]
|
| 849 |
+
);
|
| 850 |
+
|
| 851 |
+
$this->add_responsive_control(
|
| 852 |
+
'field_description_spacing',
|
| 853 |
+
[
|
| 854 |
+
'label' => __( 'Spacing', 'essential-addons-elementor' ),
|
| 855 |
+
'type' => Controls_Manager::SLIDER,
|
| 856 |
+
'range' => [
|
| 857 |
+
'px' => [
|
| 858 |
+
'min' => 0,
|
| 859 |
+
'max' => 100,
|
| 860 |
+
'step' => 1,
|
| 861 |
+
],
|
| 862 |
+
],
|
| 863 |
+
'size_units' => [ 'px', 'em', '%' ],
|
| 864 |
+
'selectors' => [
|
| 865 |
+
'{{WRAPPER}} .eael-ninja-form .nf-field .nf-field-description' => 'margin-bottom: {{SIZE}}{{UNIT}}',
|
| 866 |
+
],
|
| 867 |
+
]
|
| 868 |
+
);
|
| 869 |
+
|
| 870 |
+
$this->end_controls_section();
|
| 871 |
+
|
| 872 |
+
/**
|
| 873 |
+
* Style Tab: Placeholder
|
| 874 |
+
* -------------------------------------------------
|
| 875 |
+
*/
|
| 876 |
+
$this->start_controls_section(
|
| 877 |
+
'section_placeholder_style',
|
| 878 |
+
[
|
| 879 |
+
'label' => __( 'Placeholder', 'essential-addons-elementor' ),
|
| 880 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
| 881 |
+
'condition' => [
|
| 882 |
+
'placeholder_switch' => 'yes',
|
| 883 |
+
],
|
| 884 |
+
]
|
| 885 |
+
);
|
| 886 |
+
|
| 887 |
+
$this->add_control(
|
| 888 |
+
'text_color_placeholder',
|
| 889 |
+
[
|
| 890 |
+
'label' => __( 'Text Color', 'essential-addons-elementor' ),
|
| 891 |
+
'type' => Controls_Manager::COLOR,
|
| 892 |
+
'selectors' => [
|
| 893 |
+
'{{WRAPPER}} .eael-ninja-form .nf-field input::-webkit-input-placeholder, {{WRAPPER}} .eael-ninja-form .nf-field textarea::-webkit-input-placeholder' => 'color: {{VALUE}}',
|
| 894 |
+
'{{WRAPPER}} .eael-ninja-form .nf-field input::-moz-input-placeholder, {{WRAPPER}} .eael-ninja-form .nf-field textarea::-moz-input-placeholder' => 'color: {{VALUE}}',
|
| 895 |
+
'{{WRAPPER}} .eael-ninja-form .nf-field input:-ms-input-placeholder, {{WRAPPER}} .eael-ninja-form .nf-field textarea:-ms-input-placeholder' => 'color: {{VALUE}}',
|
| 896 |
+
'{{WRAPPER}} .eael-ninja-form .nf-field input:-moz-placeholder, {{WRAPPER}} .eael-ninja-form .nf-field textarea:-moz-placeholder' => 'color: {{VALUE}}',
|
| 897 |
+
],
|
| 898 |
+
'condition' => [
|
| 899 |
+
'placeholder_switch' => 'yes',
|
| 900 |
+
],
|
| 901 |
+
]
|
| 902 |
+
);
|
| 903 |
+
|
| 904 |
+
$this->end_controls_section();
|
| 905 |
+
|
| 906 |
+
/**
|
| 907 |
+
* Style Tab: Radio & Checkbox
|
| 908 |
+
* -------------------------------------------------
|
| 909 |
+
*/
|
| 910 |
+
$this->start_controls_section(
|
| 911 |
+
'section_radio_checkbox_style',
|
| 912 |
+
[
|
| 913 |
+
'label' => __( 'Radio & Checkbox', 'essential-addons-elementor' ),
|
| 914 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
| 915 |
+
]
|
| 916 |
+
);
|
| 917 |
+
|
| 918 |
+
$this->add_control(
|
| 919 |
+
'custom_radio_checkbox',
|
| 920 |
+
[
|
| 921 |
+
'label' => __( 'Custom Styles', 'essential-addons-elementor' ),
|
| 922 |
+
'type' => Controls_Manager::SWITCHER,
|
| 923 |
+
'label_on' => __( 'Yes', 'essential-addons-elementor' ),
|
| 924 |
+
'label_off' => __( 'No', 'essential-addons-elementor' ),
|
| 925 |
+
'return_value' => 'yes',
|
| 926 |
+
]
|
| 927 |
+
);
|
| 928 |
+
|
| 929 |
+
$this->add_responsive_control(
|
| 930 |
+
'radio_checkbox_size',
|
| 931 |
+
[
|
| 932 |
+
'label' => __( 'Size', 'essential-addons-elementor' ),
|
| 933 |
+
'type' => Controls_Manager::SLIDER,
|
| 934 |
+
'default' => [
|
| 935 |
+
'size' => '15',
|
| 936 |
+
'unit' => 'px'
|
| 937 |
+
],
|
| 938 |
+
'range' => [
|
| 939 |
+
'px' => [
|
| 940 |
+
'min' => 0,
|
| 941 |
+
'max' => 80,
|
| 942 |
+
'step' => 1,
|
| 943 |
+
],
|
| 944 |
+
],
|
| 945 |
+
'size_units' => [ 'px', 'em', '%' ],
|
| 946 |
+
'selectors' => [
|
| 947 |
+
'{{WRAPPER}} .eael-custom-radio-checkbox input[type="checkbox"], {{WRAPPER}} .eael-custom-radio-checkbox input[type="radio"]' => 'width: {{SIZE}}{{UNIT}} !important; height: {{SIZE}}{{UNIT}}',
|
| 948 |
+
],
|
| 949 |
+
'condition' => [
|
| 950 |
+
'custom_radio_checkbox' => 'yes',
|
| 951 |
+
],
|
| 952 |
+
]
|
| 953 |
+
);
|
| 954 |
+
|
| 955 |
+
$this->start_controls_tabs( 'tabs_radio_checkbox_style' );
|
| 956 |
+
|
| 957 |
+
$this->start_controls_tab(
|
| 958 |
+
'radio_checkbox_normal',
|
| 959 |
+
[
|
| 960 |
+
'label' => __( 'Normal', 'essential-addons-elementor' ),
|
| 961 |
+
'condition' => [
|
| 962 |
+
'custom_radio_checkbox' => 'yes',
|
| 963 |
+
],
|
| 964 |
+
]
|
| 965 |
+
);
|
| 966 |
+
|
| 967 |
+
$this->add_control(
|
| 968 |
+
'radio_checkbox_color',
|
| 969 |
+
[
|
| 970 |
+
'label' => __( 'Color', 'essential-addons-elementor' ),
|
| 971 |
+
'type' => Controls_Manager::COLOR,
|
| 972 |
+
'default' => '',
|
| 973 |
+
'selectors' => [
|
| 974 |
+
'{{WRAPPER}} .eael-custom-radio-checkbox input[type="checkbox"], {{WRAPPER}} .eael-custom-radio-checkbox input[type="radio"]' => 'background: {{VALUE}}',
|
| 975 |
+
],
|
| 976 |
+
'condition' => [
|
| 977 |
+
'custom_radio_checkbox' => 'yes',
|
| 978 |
+
],
|
| 979 |
+
]
|
| 980 |
+
);
|
| 981 |
+
|
| 982 |
+
$this->add_responsive_control(
|
| 983 |
+
'radio_checkbox_border_width',
|
| 984 |
+
[
|
| 985 |
+
'label' => __( 'Border Width', 'essential-addons-elementor' ),
|
| 986 |
+
'type' => Controls_Manager::SLIDER,
|
| 987 |
+
'range' => [
|
| 988 |
+
'px' => [
|
| 989 |
+
'min' => 0,
|
| 990 |
+
'max' => 15,
|
| 991 |
+
'step' => 1,
|
| 992 |
+
],
|
| 993 |
+
],
|
| 994 |
+
'size_units' => [ 'px' ],
|
| 995 |
+
'selectors' => [
|
| 996 |
+
'{{WRAPPER}} .eael-custom-radio-checkbox input[type="checkbox"], {{WRAPPER}} .eael-custom-radio-checkbox input[type="radio"]' => 'border-width: {{SIZE}}{{UNIT}}',
|
| 997 |
+
],
|
| 998 |
+
'condition' => [
|
| 999 |
+
'custom_radio_checkbox' => 'yes',
|
| 1000 |
+
],
|
| 1001 |
+
]
|
| 1002 |
+
);
|
| 1003 |
+
|
| 1004 |
+
$this->add_control(
|
| 1005 |
+
'radio_checkbox_border_color',
|
| 1006 |
+
[
|
| 1007 |
+
'label' => __( 'Border Color', 'essential-addons-elementor' ),
|
| 1008 |
+
'type' => Controls_Manager::COLOR,
|
| 1009 |
+
'default' => '',
|
| 1010 |
+
'selectors' => [
|
| 1011 |
+
'{{WRAPPER}} .eael-custom-radio-checkbox input[type="checkbox"], {{WRAPPER}} .eael-custom-radio-checkbox input[type="radio"]' => 'border-color: {{VALUE}}',
|
| 1012 |
+
],
|
| 1013 |
+
'condition' => [
|
| 1014 |
+
'custom_radio_checkbox' => 'yes',
|
| 1015 |
+
],
|
| 1016 |
+
]
|
| 1017 |
+
);
|
| 1018 |
+
|
| 1019 |
+
$this->add_control(
|
| 1020 |
+
'checkbox_heading',
|
| 1021 |
+
[
|
| 1022 |
+
'label' => __( 'Checkbox', 'essential-addons-elementor' ),
|
| 1023 |
+
'type' => Controls_Manager::HEADING,
|
| 1024 |
+
'condition' => [
|
| 1025 |
+
'custom_radio_checkbox' => 'yes',
|
| 1026 |
+
],
|
| 1027 |
+
]
|
| 1028 |
+
);
|
| 1029 |
|
| 1030 |
$this->add_control(
|
| 1031 |
+
'checkbox_border_radius',
|
| 1032 |
[
|
| 1033 |
+
'label' => __( 'Border Radius', 'essential-addons-elementor' ),
|
| 1034 |
+
'type' => Controls_Manager::DIMENSIONS,
|
| 1035 |
+
'size_units' => [ 'px', 'em', '%' ],
|
| 1036 |
+
'selectors' => [
|
| 1037 |
+
'{{WRAPPER}} .eael-custom-radio-checkbox input[type="checkbox"], {{WRAPPER}} .eael-custom-radio-checkbox input[type="checkbox"]:before' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
| 1038 |
+
],
|
| 1039 |
+
'condition' => [
|
| 1040 |
+
'custom_radio_checkbox' => 'yes',
|
| 1041 |
+
],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1042 |
]
|
| 1043 |
);
|
| 1044 |
+
|
| 1045 |
+
$this->add_control(
|
| 1046 |
+
'radio_heading',
|
| 1047 |
+
[
|
| 1048 |
+
'label' => __( 'Radio Buttons', 'essential-addons-elementor' ),
|
| 1049 |
+
'type' => Controls_Manager::HEADING,
|
| 1050 |
+
'condition' => [
|
| 1051 |
+
'custom_radio_checkbox' => 'yes',
|
| 1052 |
+
],
|
| 1053 |
+
]
|
| 1054 |
+
);
|
| 1055 |
|
| 1056 |
+
$this->add_control(
|
| 1057 |
+
'radio_border_radius',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1058 |
[
|
| 1059 |
+
'label' => __( 'Border Radius', 'essential-addons-elementor' ),
|
| 1060 |
+
'type' => Controls_Manager::DIMENSIONS,
|
| 1061 |
+
'size_units' => [ 'px', 'em', '%' ],
|
| 1062 |
+
'selectors' => [
|
| 1063 |
+
'{{WRAPPER}} .eael-custom-radio-checkbox input[type="radio"], {{WRAPPER}} .eael-custom-radio-checkbox input[type="radio"]:before' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
| 1064 |
+
],
|
| 1065 |
+
'condition' => [
|
| 1066 |
+
'custom_radio_checkbox' => 'yes',
|
| 1067 |
+
],
|
| 1068 |
]
|
| 1069 |
);
|
| 1070 |
|
| 1071 |
+
$this->end_controls_tab();
|
| 1072 |
+
|
| 1073 |
+
$this->start_controls_tab(
|
| 1074 |
+
'radio_checkbox_checked',
|
| 1075 |
+
[
|
| 1076 |
+
'label' => __( 'Checked', 'essential-addons-elementor' ),
|
| 1077 |
+
'condition' => [
|
| 1078 |
+
'custom_radio_checkbox' => 'yes',
|
| 1079 |
+
],
|
| 1080 |
+
]
|
| 1081 |
+
);
|
| 1082 |
+
|
| 1083 |
+
$this->add_control(
|
| 1084 |
+
'radio_checkbox_color_checked',
|
| 1085 |
+
[
|
| 1086 |
+
'label' => __( 'Color', 'essential-addons-elementor' ),
|
| 1087 |
+
'type' => Controls_Manager::COLOR,
|
| 1088 |
+
'default' => '',
|
| 1089 |
+
'selectors' => [
|
| 1090 |
+
'{{WRAPPER}} .eael-custom-radio-checkbox input[type="checkbox"]:checked:before, {{WRAPPER}} .eael-custom-radio-checkbox input[type="radio"]:checked:before' => 'background: {{VALUE}}',
|
| 1091 |
+
],
|
| 1092 |
+
'condition' => [
|
| 1093 |
+
'custom_radio_checkbox' => 'yes',
|
| 1094 |
+
],
|
| 1095 |
+
]
|
| 1096 |
+
);
|
| 1097 |
+
|
| 1098 |
+
$this->end_controls_tab();
|
| 1099 |
+
|
| 1100 |
+
$this->end_controls_tabs();
|
| 1101 |
+
|
| 1102 |
+
$this->end_controls_section();
|
| 1103 |
+
|
| 1104 |
+
/**
|
| 1105 |
+
* Style Tab: Submit Button
|
| 1106 |
+
* -------------------------------------------------
|
| 1107 |
+
*/
|
| 1108 |
+
$this->start_controls_section(
|
| 1109 |
+
'section_submit_button_style',
|
| 1110 |
+
[
|
| 1111 |
+
'label' => __( 'Submit Button', 'essential-addons-elementor' ),
|
| 1112 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
| 1113 |
+
]
|
| 1114 |
+
);
|
| 1115 |
+
|
| 1116 |
+
$this->add_responsive_control(
|
| 1117 |
+
'button_align',
|
| 1118 |
[
|
| 1119 |
+
'label' => __( 'Alignment', 'essential-addons-elementor' ),
|
| 1120 |
+
'type' => Controls_Manager::CHOOSE,
|
| 1121 |
+
'options' => [
|
| 1122 |
+
'left' => [
|
| 1123 |
+
'title' => __( 'Left', 'essential-addons-elementor' ),
|
| 1124 |
+
'icon' => 'eicon-h-align-left',
|
|
|
|
| 1125 |
],
|
| 1126 |
+
'center' => [
|
| 1127 |
+
'title' => __( 'Center', 'essential-addons-elementor' ),
|
| 1128 |
+
'icon' => 'eicon-h-align-center',
|
| 1129 |
],
|
| 1130 |
+
'right' => [
|
| 1131 |
+
'title' => __( 'Right', 'essential-addons-elementor' ),
|
| 1132 |
+
'icon' => 'eicon-h-align-right',
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1133 |
],
|
| 1134 |
],
|
| 1135 |
+
'default' => '',
|
| 1136 |
+
'selectors' => [
|
| 1137 |
+
'{{WRAPPER}} .eael-ninja-form .submit-container' => 'text-align: {{VALUE}};',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1138 |
],
|
| 1139 |
+
'condition' => [
|
| 1140 |
+
'button_width_type' => 'custom',
|
| 1141 |
+
],
|
| 1142 |
]
|
| 1143 |
);
|
| 1144 |
+
|
| 1145 |
+
$this->add_control(
|
| 1146 |
+
'button_width_type',
|
| 1147 |
+
[
|
| 1148 |
+
'label' => __( 'Width', 'essential-addons-elementor' ),
|
| 1149 |
+
'type' => Controls_Manager::SELECT,
|
| 1150 |
+
'default' => 'custom',
|
| 1151 |
+
'options' => [
|
| 1152 |
+
'full-width' => __( 'Full Width', 'essential-addons-elementor' ),
|
| 1153 |
+
'custom' => __( 'Custom', 'essential-addons-elementor' ),
|
| 1154 |
+
],
|
| 1155 |
+
'prefix_class' => 'eael-ninja-form-button-',
|
| 1156 |
+
]
|
| 1157 |
+
);
|
| 1158 |
+
|
| 1159 |
+
$this->add_responsive_control(
|
| 1160 |
+
'button_width',
|
| 1161 |
+
[
|
| 1162 |
+
'label' => __( 'Width', 'essential-addons-elementor' ),
|
| 1163 |
+
'type' => Controls_Manager::SLIDER,
|
| 1164 |
+
'default' => [
|
| 1165 |
+
'size' => '130',
|
| 1166 |
+
'unit' => 'px'
|
| 1167 |
+
],
|
| 1168 |
+
'range' => [
|
| 1169 |
+
'px' => [
|
| 1170 |
+
'min' => 0,
|
| 1171 |
+
'max' => 1200,
|
| 1172 |
+
'step' => 1,
|
| 1173 |
+
],
|
| 1174 |
+
],
|
| 1175 |
+
'size_units' => [ 'px', '%' ],
|
| 1176 |
+
'selectors' => [
|
| 1177 |
+
'{{WRAPPER}} .eael-ninja-form .submit-container input[type="button"]' => 'width: {{SIZE}}{{UNIT}}',
|
| 1178 |
+
],
|
| 1179 |
+
'condition' => [
|
| 1180 |
+
'button_width_type' => 'custom',
|
| 1181 |
+
],
|
| 1182 |
+
]
|
| 1183 |
+
);
|
| 1184 |
+
|
| 1185 |
+
$this->start_controls_tabs( 'tabs_button_style' );
|
| 1186 |
+
|
| 1187 |
+
$this->start_controls_tab(
|
| 1188 |
+
'tab_button_normal',
|
| 1189 |
+
[
|
| 1190 |
+
'label' => __( 'Normal', 'essential-addons-elementor' ),
|
| 1191 |
+
]
|
| 1192 |
+
);
|
| 1193 |
+
|
| 1194 |
+
$this->add_control(
|
| 1195 |
+
'button_bg_color_normal',
|
| 1196 |
+
[
|
| 1197 |
+
'label' => __( 'Background Color', 'essential-addons-elementor' ),
|
| 1198 |
+
'type' => Controls_Manager::COLOR,
|
| 1199 |
+
'default' => '',
|
| 1200 |
+
'selectors' => [
|
| 1201 |
+
'{{WRAPPER}} .eael-ninja-form .submit-container input[type="button"]' => 'background-color: {{VALUE}}',
|
| 1202 |
+
],
|
| 1203 |
+
]
|
| 1204 |
+
);
|
| 1205 |
+
|
| 1206 |
+
$this->add_control(
|
| 1207 |
+
'button_text_color_normal',
|
| 1208 |
+
[
|
| 1209 |
+
'label' => __( 'Text Color', 'essential-addons-elementor' ),
|
| 1210 |
+
'type' => Controls_Manager::COLOR,
|
| 1211 |
+
'default' => '',
|
| 1212 |
+
'selectors' => [
|
| 1213 |
+
'{{WRAPPER}} .eael-ninja-form .submit-container input[type="button"]' => 'color: {{VALUE}}',
|
| 1214 |
+
],
|
| 1215 |
+
]
|
| 1216 |
+
);
|
| 1217 |
|
| 1218 |
+
$this->add_group_control(
|
| 1219 |
+
Group_Control_Border::get_type(),
|
| 1220 |
[
|
| 1221 |
+
'name' => 'button_border_normal',
|
| 1222 |
+
'label' => __( 'Border', 'essential-addons-elementor' ),
|
| 1223 |
+
'placeholder' => '1px',
|
| 1224 |
+
'default' => '1px',
|
| 1225 |
+
'selector' => '{{WRAPPER}} .eael-ninja-form .submit-container input[type="button"]',
|
|
|
|
| 1226 |
]
|
| 1227 |
);
|
| 1228 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1229 |
$this->add_control(
|
| 1230 |
+
'button_border_radius',
|
| 1231 |
[
|
| 1232 |
+
'label' => __( 'Border Radius', 'essential-addons-elementor' ),
|
| 1233 |
+
'type' => Controls_Manager::DIMENSIONS,
|
| 1234 |
+
'size_units' => [ 'px', 'em', '%' ],
|
| 1235 |
+
'selectors' => [
|
| 1236 |
+
'{{WRAPPER}} .eael-ninja-form .submit-container input[type="button"]' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
| 1237 |
],
|
| 1238 |
]
|
| 1239 |
);
|
| 1240 |
|
| 1241 |
+
$this->add_responsive_control(
|
| 1242 |
+
'button_padding',
|
| 1243 |
[
|
| 1244 |
+
'label' => __( 'Padding', 'essential-addons-elementor' ),
|
| 1245 |
+
'type' => Controls_Manager::DIMENSIONS,
|
| 1246 |
+
'size_units' => [ 'px', 'em', '%' ],
|
| 1247 |
+
'selectors' => [
|
| 1248 |
+
'{{WRAPPER}} .eael-ninja-form .submit-container input[type="button"]' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
| 1249 |
],
|
| 1250 |
]
|
| 1251 |
);
|
| 1252 |
+
|
| 1253 |
+
$this->add_responsive_control(
|
| 1254 |
+
'button_margin',
|
| 1255 |
+
[
|
| 1256 |
+
'label' => __( 'Margin Top', 'essential-addons-elementor' ),
|
| 1257 |
+
'type' => Controls_Manager::SLIDER,
|
| 1258 |
+
'range' => [
|
| 1259 |
+
'px' => [
|
| 1260 |
+
'min' => 0,
|
| 1261 |
+
'max' => 100,
|
| 1262 |
+
'step' => 1,
|
| 1263 |
+
],
|
| 1264 |
+
],
|
| 1265 |
+
'size_units' => [ 'px', 'em', '%' ],
|
| 1266 |
+
'selectors' => [
|
| 1267 |
+
'{{WRAPPER}} .eael-ninja-form .submit-container input[type="button"]' => 'margin-top: {{SIZE}}{{UNIT}}',
|
| 1268 |
+
],
|
| 1269 |
+
]
|
| 1270 |
+
);
|
| 1271 |
+
|
| 1272 |
+
$this->end_controls_tab();
|
| 1273 |
+
|
| 1274 |
+
$this->start_controls_tab(
|
| 1275 |
+
'tab_button_hover',
|
| 1276 |
+
[
|
| 1277 |
+
'label' => __( 'Hover', 'essential-addons-elementor' ),
|
| 1278 |
+
]
|
| 1279 |
+
);
|
| 1280 |
+
|
| 1281 |
+
$this->add_control(
|
| 1282 |
+
'button_bg_color_hover',
|
| 1283 |
+
[
|
| 1284 |
+
'label' => __( 'Background Color', 'essential-addons-elementor' ),
|
| 1285 |
+
'type' => Controls_Manager::COLOR,
|
| 1286 |
+
'default' => '',
|
| 1287 |
+
'selectors' => [
|
| 1288 |
+
'{{WRAPPER}} .eael-ninja-form .submit-container input[type="button"]:hover' => 'background-color: {{VALUE}}',
|
| 1289 |
+
],
|
| 1290 |
+
]
|
| 1291 |
+
);
|
| 1292 |
+
|
| 1293 |
+
$this->add_control(
|
| 1294 |
+
'button_text_color_hover',
|
| 1295 |
+
[
|
| 1296 |
+
'label' => __( 'Text Color', 'essential-addons-elementor' ),
|
| 1297 |
+
'type' => Controls_Manager::COLOR,
|
| 1298 |
+
'default' => '',
|
| 1299 |
+
'selectors' => [
|
| 1300 |
+
'{{WRAPPER}} .eael-ninja-form .submit-container input[type="button"]:hover' => 'color: {{VALUE}}',
|
| 1301 |
+
],
|
| 1302 |
+
]
|
| 1303 |
+
);
|
| 1304 |
+
|
| 1305 |
+
$this->add_control(
|
| 1306 |
+
'button_border_color_hover',
|
| 1307 |
+
[
|
| 1308 |
+
'label' => __( 'Border Color', 'essential-addons-elementor' ),
|
| 1309 |
+
'type' => Controls_Manager::COLOR,
|
| 1310 |
+
'default' => '',
|
| 1311 |
+
'selectors' => [
|
| 1312 |
+
'{{WRAPPER}} .eael-ninja-form .submit-container input[type="button"]:hover' => 'border-color: {{VALUE}}',
|
| 1313 |
+
],
|
| 1314 |
+
]
|
| 1315 |
+
);
|
| 1316 |
+
|
| 1317 |
+
$this->end_controls_tab();
|
| 1318 |
+
|
| 1319 |
+
$this->end_controls_tabs();
|
| 1320 |
+
|
| 1321 |
+
$this->add_group_control(
|
| 1322 |
+
Group_Control_Typography::get_type(),
|
| 1323 |
+
[
|
| 1324 |
+
'name' => 'button_typography',
|
| 1325 |
+
'label' => __( 'Typography', 'essential-addons-elementor' ),
|
| 1326 |
+
'scheme' => Scheme_Typography::TYPOGRAPHY_4,
|
| 1327 |
+
'selector' => '{{WRAPPER}} .eael-ninja-form .submit-container input[type="button"]',
|
| 1328 |
+
'separator' => 'before',
|
| 1329 |
+
]
|
| 1330 |
+
);
|
| 1331 |
|
| 1332 |
$this->add_group_control(
|
| 1333 |
+
Group_Control_Box_Shadow::get_type(),
|
| 1334 |
[
|
| 1335 |
+
'name' => 'button_box_shadow',
|
| 1336 |
+
'selector' => '{{WRAPPER}} .eael-ninja-form .submit-container input[type="button"]',
|
| 1337 |
+
'separator' => 'before',
|
| 1338 |
]
|
| 1339 |
);
|
| 1340 |
+
|
| 1341 |
+
$this->end_controls_section();
|
| 1342 |
+
|
| 1343 |
+
/**
|
| 1344 |
+
* Style Tab: Success Message
|
| 1345 |
+
* -------------------------------------------------
|
| 1346 |
+
*/
|
| 1347 |
+
$this->start_controls_section(
|
| 1348 |
+
'section_success_message_style',
|
| 1349 |
+
[
|
| 1350 |
+
'label' => __( 'Success Message', 'essential-addons-elementor' ),
|
| 1351 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
| 1352 |
+
]
|
| 1353 |
+
);
|
| 1354 |
+
|
| 1355 |
+
$this->add_control(
|
| 1356 |
+
'success_message_text_color',
|
| 1357 |
+
[
|
| 1358 |
+
'label' => __( 'Text Color', 'essential-addons-elementor' ),
|
| 1359 |
+
'type' => Controls_Manager::COLOR,
|
| 1360 |
+
'selectors' => [
|
| 1361 |
+
'{{WRAPPER}} .eael-ninja-form .nf-response-msg' => 'color: {{VALUE}}',
|
| 1362 |
+
],
|
| 1363 |
+
]
|
| 1364 |
+
);
|
| 1365 |
+
|
| 1366 |
+
$this->add_group_control(
|
| 1367 |
+
Group_Control_Typography::get_type(),
|
| 1368 |
+
[
|
| 1369 |
+
'name' => 'success_message_typography',
|
| 1370 |
+
'label' => __( 'Typography', 'essential-addons-elementor' ),
|
| 1371 |
+
'selector' => '{{WRAPPER}} .eael-ninja-form .nf-response-msg',
|
| 1372 |
+
]
|
| 1373 |
+
);
|
| 1374 |
+
|
| 1375 |
+
$this->end_controls_section();
|
| 1376 |
+
|
| 1377 |
+
/**
|
| 1378 |
+
* Style Tab: Required Fields Notice
|
| 1379 |
+
* -------------------------------------------------
|
| 1380 |
+
*/
|
| 1381 |
+
$this->start_controls_section(
|
| 1382 |
+
'section_required_notice_style',
|
| 1383 |
+
[
|
| 1384 |
+
'label' => __( 'Required Fields Notice', 'essential-addons-elementor' ),
|
| 1385 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
| 1386 |
+
]
|
| 1387 |
+
);
|
| 1388 |
+
|
| 1389 |
+
$this->add_control(
|
| 1390 |
+
'required_notice_text_color',
|
| 1391 |
+
[
|
| 1392 |
+
'label' => __( 'Color', 'essential-addons-elementor' ),
|
| 1393 |
+
'type' => Controls_Manager::COLOR,
|
| 1394 |
+
'default' => '',
|
| 1395 |
+
'selectors' => [
|
| 1396 |
+
'{{WRAPPER}} .eael-ninja-form .nf-form-fields-required' => 'color: {{VALUE}}',
|
| 1397 |
+
],
|
| 1398 |
+
]
|
| 1399 |
+
);
|
| 1400 |
+
|
| 1401 |
+
$this->add_responsive_control(
|
| 1402 |
+
'required_notice_spacing',
|
| 1403 |
+
[
|
| 1404 |
+
'label' => __( 'Spacing', 'essential-addons-elementor' ),
|
| 1405 |
+
'type' => Controls_Manager::SLIDER,
|
| 1406 |
+
'range' => [
|
| 1407 |
+
'px' => [
|
| 1408 |
+
'min' => 0,
|
| 1409 |
+
'max' => 100,
|
| 1410 |
+
'step' => 1,
|
| 1411 |
+
],
|
| 1412 |
+
],
|
| 1413 |
+
'size_units' => [ 'px', 'em', '%' ],
|
| 1414 |
+
'selectors' => [
|
| 1415 |
+
'{{WRAPPER}} .eael-ninja-form .nf-form-fields-required' => 'margin-bottom: {{SIZE}}{{UNIT}}',
|
| 1416 |
+
],
|
| 1417 |
+
]
|
| 1418 |
+
);
|
| 1419 |
+
|
| 1420 |
+
$this->add_group_control(
|
| 1421 |
+
Group_Control_Typography::get_type(),
|
| 1422 |
+
[
|
| 1423 |
+
'name' => 'required_notice_typography',
|
| 1424 |
+
'label' => __( 'Typography', 'essential-addons-elementor' ),
|
| 1425 |
+
'scheme' => Scheme_Typography::TYPOGRAPHY_4,
|
| 1426 |
+
'selector' => '{{WRAPPER}} .eael-ninja-form .nf-form-fields-required',
|
| 1427 |
+
]
|
| 1428 |
+
);
|
| 1429 |
+
|
| 1430 |
+
$this->end_controls_section();
|
| 1431 |
+
|
| 1432 |
+
/**
|
| 1433 |
+
* Style Tab: Errors
|
| 1434 |
+
* -------------------------------------------------
|
| 1435 |
+
*/
|
| 1436 |
+
$this->start_controls_section(
|
| 1437 |
+
'section_error_style',
|
| 1438 |
+
[
|
| 1439 |
+
'label' => __( 'Errors', 'essential-addons-elementor' ),
|
| 1440 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
| 1441 |
+
]
|
| 1442 |
+
);
|
| 1443 |
+
|
| 1444 |
+
$this->add_control(
|
| 1445 |
+
'error_messages_heading',
|
| 1446 |
+
[
|
| 1447 |
+
'label' => __( 'Error Messages', 'essential-addons-elementor' ),
|
| 1448 |
+
'type' => Controls_Manager::HEADING,
|
| 1449 |
+
'condition' => [
|
| 1450 |
+
'error_messages' => 'show',
|
| 1451 |
],
|
| 1452 |
+
]
|
| 1453 |
+
);
|
| 1454 |
+
|
| 1455 |
+
$this->add_control(
|
| 1456 |
+
'error_message_text_color',
|
| 1457 |
+
[
|
| 1458 |
+
'label' => __( 'Text Color', 'essential-addons-elementor' ),
|
| 1459 |
+
'type' => Controls_Manager::COLOR,
|
| 1460 |
+
'default' => '',
|
| 1461 |
+
'selectors' => [
|
| 1462 |
+
'{{WRAPPER}} .eael-ninja-form .nf-error-wrap .nf-error-required-error' => 'color: {{VALUE}}',
|
| 1463 |
+
],
|
| 1464 |
+
'condition' => [
|
| 1465 |
+
'error_messages' => 'show',
|
| 1466 |
],
|
| 1467 |
+
]
|
| 1468 |
+
);
|
| 1469 |
+
|
| 1470 |
+
$this->add_control(
|
| 1471 |
+
'validation_errors_heading',
|
| 1472 |
+
[
|
| 1473 |
+
'label' => __( 'Validation Errors', 'essential-addons-elementor' ),
|
| 1474 |
+
'type' => Controls_Manager::HEADING,
|
| 1475 |
+
'separator' => 'before',
|
| 1476 |
+
'condition' => [
|
| 1477 |
+
'validation_errors' => 'show',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1478 |
],
|
| 1479 |
+
]
|
| 1480 |
+
);
|
| 1481 |
+
|
| 1482 |
+
$this->add_control(
|
| 1483 |
+
'validation_error_description_color',
|
| 1484 |
+
[
|
| 1485 |
+
'label' => __( 'Error Description Color', 'essential-addons-elementor' ),
|
| 1486 |
+
'type' => Controls_Manager::COLOR,
|
| 1487 |
+
'default' => '',
|
| 1488 |
+
'selectors' => [
|
| 1489 |
+
'{{WRAPPER}} .eael-ninja-form .nf-form-errors .nf-error-field-errors' => 'color: {{VALUE}}',
|
| 1490 |
+
],
|
| 1491 |
+
'condition' => [
|
| 1492 |
+
'validation_errors' => 'show',
|
| 1493 |
],
|
| 1494 |
+
]
|
| 1495 |
+
);
|
| 1496 |
+
|
| 1497 |
+
$this->add_control(
|
| 1498 |
+
'validation_error_field_input_border_color',
|
| 1499 |
+
[
|
| 1500 |
+
'label' => __( 'Error Field Input Border Color', 'essential-addons-elementor' ),
|
| 1501 |
+
'type' => Controls_Manager::COLOR,
|
| 1502 |
+
'default' => '',
|
| 1503 |
+
'selectors' => [
|
| 1504 |
+
'{{WRAPPER}} .eael-ninja-form .nf-error .ninja-forms-field' => 'border-color: {{VALUE}}',
|
| 1505 |
+
],
|
| 1506 |
+
'condition' => [
|
| 1507 |
+
'validation_errors' => 'show',
|
| 1508 |
],
|
| 1509 |
+
]
|
| 1510 |
+
);
|
| 1511 |
+
|
| 1512 |
+
$this->end_controls_section();
|
| 1513 |
+
|
| 1514 |
+
}
|
| 1515 |
+
|
| 1516 |
+
protected function render() {
|
| 1517 |
+
$settings = $this->get_settings();
|
| 1518 |
+
|
| 1519 |
+
$this->add_render_attribute( 'contact-form', 'class', [
|
| 1520 |
+
'eael-contact-form',
|
| 1521 |
+
'eael-ninja-form',
|
| 1522 |
]
|
| 1523 |
);
|
| 1524 |
+
|
| 1525 |
+
$this->add_render_attribute( 'contact-form', 'id', [
|
| 1526 |
+
'eael-ninja-form-' . get_the_ID(),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1527 |
]
|
| 1528 |
);
|
| 1529 |
+
|
| 1530 |
+
if ( $settings['placeholder_switch'] != 'yes' ) {
|
| 1531 |
+
$this->add_render_attribute( 'contact-form', 'class', 'placeholder-hide' );
|
| 1532 |
+
}
|
| 1533 |
+
|
| 1534 |
+
if ( $settings['custom_title_description'] == 'yes' ) {
|
| 1535 |
+
$this->add_render_attribute( 'contact-form', 'class', 'title-description-hide' );
|
| 1536 |
+
}
|
| 1537 |
+
|
| 1538 |
+
if ( $settings['custom_radio_checkbox'] == 'yes' ) {
|
| 1539 |
+
$this->add_render_attribute( 'contact-form', 'class', 'eael-custom-radio-checkbox' );
|
| 1540 |
+
}
|
| 1541 |
+
if ( $settings['eael_contact_form_alignment'] == 'left' ) {
|
| 1542 |
+
$this->add_render_attribute( 'contact-form', 'class', 'eael-contact-form-align-left' );
|
| 1543 |
+
}
|
| 1544 |
+
elseif ( $settings['eael_contact_form_alignment'] == 'center' ) {
|
| 1545 |
+
$this->add_render_attribute( 'contact-form', 'class', 'eael-contact-form-align-center' );
|
| 1546 |
+
}
|
| 1547 |
+
elseif ( $settings['eael_contact_form_alignment'] == 'right' ) {
|
| 1548 |
+
$this->add_render_attribute( 'contact-form', 'class', 'eael-contact-form-align-right' );
|
| 1549 |
+
}
|
| 1550 |
+
else {
|
| 1551 |
+
$this->add_render_attribute( 'contact-form', 'class', 'eael-contact-form-align-default' );
|
| 1552 |
+
}
|
| 1553 |
+
if ( class_exists( 'Ninja_Forms' ) ) {
|
| 1554 |
+
if ( ! empty( $settings['contact_form_list'] ) ) { ?>
|
| 1555 |
+
<div <?php echo $this->get_render_attribute_string( 'contact-form' ); ?>>
|
| 1556 |
+
<?php if ( $settings['custom_title_description'] == 'yes' ) { ?>
|
| 1557 |
+
<div class="eael-ninja-form-heading">
|
| 1558 |
+
<?php if ( $settings['form_title_custom'] != '' ) { ?>
|
| 1559 |
+
<h3 class="eael-contact-form-title eael-ninja-form-title">
|
| 1560 |
+
<?php echo esc_attr( $settings['form_title_custom'] ); ?>
|
| 1561 |
+
</h3>
|
| 1562 |
+
<?php } ?>
|
| 1563 |
+
<?php if ( $settings['form_description_custom'] != '' ) { ?>
|
| 1564 |
+
<div class="eael-contact-form-description eael-ninja-form-description">
|
| 1565 |
+
<?php echo $this->parse_text_editor( $settings['form_description_custom'] ); ?>
|
| 1566 |
+
</div>
|
| 1567 |
+
<?php } ?>
|
| 1568 |
+
</div>
|
| 1569 |
+
<?php } ?>
|
| 1570 |
+
<?php
|
| 1571 |
+
$eael_form_id = $settings['contact_form_list'];
|
| 1572 |
+
|
| 1573 |
+
echo do_shortcode( '[ninja_form id="' . $eael_form_id . '" ]' );
|
| 1574 |
+
?>
|
| 1575 |
+
</div>
|
| 1576 |
+
<?php
|
| 1577 |
+
}
|
| 1578 |
+
}
|
| 1579 |
+
}
|
| 1580 |
+
|
| 1581 |
+
protected function _content_template() {}
|
| 1582 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1583 |
}
|
| 1584 |
|
| 1585 |
+
Plugin::instance()->widgets_manager->register_widget_type( new Widget_Eael_NinjaForm() );
|
|
|
elements/pricing-table/pricing-table.php
CHANGED
|
@@ -135,7 +135,29 @@ class Widget_Eael_Pricing_Table extends Widget_Base {
|
|
| 135 |
'default' => esc_html__( '99', 'essential-addons-elementor' )
|
| 136 |
]
|
| 137 |
);
|
| 138 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 139 |
$this->add_control(
|
| 140 |
'eael_pricing_table_price_cur',
|
| 141 |
[
|
|
@@ -155,9 +177,7 @@ class Widget_Eael_Pricing_Table extends Widget_Base {
|
|
| 155 |
'label_block' => false,
|
| 156 |
'options' => [
|
| 157 |
'left' => esc_html__( 'Left', 'essential-addons-elementor' ),
|
| 158 |
-
'left-sup' => esc_html__( 'Left (Sup)', 'essential-addons-elementor' ),
|
| 159 |
'right' => esc_html__( 'Right', 'essential-addons-elementor' ),
|
| 160 |
-
'right-sup' => esc_html__( 'Right (Sup)', 'essential-addons-elementor' ),
|
| 161 |
],
|
| 162 |
]
|
| 163 |
);
|
|
@@ -547,13 +567,13 @@ class Widget_Eael_Pricing_Table extends Widget_Base {
|
|
| 547 |
|
| 548 |
/**
|
| 549 |
* -------------------------------------------
|
| 550 |
-
*
|
| 551 |
* -------------------------------------------
|
| 552 |
*/
|
| 553 |
$this->start_controls_section(
|
| 554 |
-
'
|
| 555 |
[
|
| 556 |
-
'label' => esc_html__( '
|
| 557 |
'tab' => Controls_Manager::TAB_STYLE
|
| 558 |
]
|
| 559 |
);
|
|
@@ -657,10 +677,55 @@ class Widget_Eael_Pricing_Table extends Widget_Base {
|
|
| 657 |
|
| 658 |
);
|
| 659 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 660 |
$this->add_control(
|
| 661 |
'eael_pricing_table_price_tag_heading',
|
| 662 |
[
|
| 663 |
-
'label' => esc_html__( 'Price
|
| 664 |
'type' => Controls_Manager::HEADING,
|
| 665 |
'separator' => 'before'
|
| 666 |
]
|
|
@@ -689,7 +754,7 @@ class Widget_Eael_Pricing_Table extends Widget_Base {
|
|
| 689 |
$this->add_control(
|
| 690 |
'eael_pricing_table_price_currency_heading',
|
| 691 |
[
|
| 692 |
-
'label' => esc_html__( '
|
| 693 |
'type' => Controls_Manager::HEADING,
|
| 694 |
'separator' => 'before'
|
| 695 |
]
|
|
@@ -715,10 +780,22 @@ class Widget_Eael_Pricing_Table extends Widget_Base {
|
|
| 715 |
]
|
| 716 |
);
|
| 717 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 718 |
$this->add_control(
|
| 719 |
'eael_pricing_table_pricing_period_heading',
|
| 720 |
[
|
| 721 |
-
'label' => esc_html__( 'Pricing Period
|
| 722 |
'type' => Controls_Manager::HEADING,
|
| 723 |
'separator' => 'before'
|
| 724 |
]
|
|
@@ -744,12 +821,19 @@ class Widget_Eael_Pricing_Table extends Widget_Base {
|
|
| 744 |
]
|
| 745 |
);
|
| 746 |
|
| 747 |
-
|
| 748 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 749 |
[
|
| 750 |
-
'label' => esc_html__( 'Feature List
|
| 751 |
-
'
|
| 752 |
-
'separator' => 'before'
|
| 753 |
]
|
| 754 |
);
|
| 755 |
|
|
@@ -777,13 +861,13 @@ class Widget_Eael_Pricing_Table extends Widget_Base {
|
|
| 777 |
|
| 778 |
/**
|
| 779 |
* -------------------------------------------
|
| 780 |
-
*
|
| 781 |
* -------------------------------------------
|
| 782 |
*/
|
| 783 |
$this->start_controls_section(
|
| 784 |
'eael_section_pricing_table_style_3_featured_tag_settings',
|
| 785 |
[
|
| 786 |
-
'label' => esc_html__( 'Ribbon
|
| 787 |
'tab' => Controls_Manager::TAB_STYLE,
|
| 788 |
]
|
| 789 |
);
|
|
@@ -1064,8 +1148,6 @@ class Widget_Eael_Pricing_Table extends Widget_Base {
|
|
| 1064 |
]
|
| 1065 |
);
|
| 1066 |
|
| 1067 |
-
|
| 1068 |
-
|
| 1069 |
$this->add_control(
|
| 1070 |
'eael_pricing_table_icon_color',
|
| 1071 |
[
|
|
@@ -1144,7 +1226,7 @@ class Widget_Eael_Pricing_Table extends Widget_Base {
|
|
| 1144 |
$this->start_controls_section(
|
| 1145 |
'eael_section_pricing_table_btn_style_settings',
|
| 1146 |
[
|
| 1147 |
-
'label' => esc_html__( 'Button
|
| 1148 |
'tab' => Controls_Manager::TAB_STYLE
|
| 1149 |
]
|
| 1150 |
);
|
|
@@ -1302,6 +1384,20 @@ class Widget_Eael_Pricing_Table extends Widget_Base {
|
|
| 1302 |
$target = $settings['eael_pricing_table_btn_link']['is_external'] ? 'target="_blank"' : '';
|
| 1303 |
$nofollow = $settings['eael_pricing_table_btn_link']['nofollow'] ? 'rel="nofollow"' : '';
|
| 1304 |
if( 'yes' === $settings['eael_pricing_table_featured'] ) : $featured_class = 'featured '.$settings['eael_pricing_table_featured_styles']; else : $featured_class = ''; endif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1305 |
?>
|
| 1306 |
<?php if( 'style-1' === $settings['eael_pricing_table_style'] || 'style-3' === $settings['eael_pricing_table_style'] || 'style-4' === $settings['eael_pricing_table_style'] ) : ?>
|
| 1307 |
<div class="eael-pricing style-1">
|
|
@@ -1310,7 +1406,8 @@ class Widget_Eael_Pricing_Table extends Widget_Base {
|
|
| 1310 |
<h2 class="title"><?php echo $settings['eael_pricing_table_title']; ?></h2>
|
| 1311 |
</div>
|
| 1312 |
<div class="eael-pricing-tag">
|
| 1313 |
-
<span class="price-tag"><?php
|
|
|
|
| 1314 |
</div>
|
| 1315 |
<div class="body">
|
| 1316 |
<ul>
|
|
@@ -1351,7 +1448,8 @@ class Widget_Eael_Pricing_Table extends Widget_Base {
|
|
| 1351 |
<span class="subtitle"><?php echo $settings['eael_pricing_table_sub_title']; ?></span>
|
| 1352 |
</div>
|
| 1353 |
<div class="eael-pricing-tag">
|
| 1354 |
-
<span class="price-tag"><?php
|
|
|
|
| 1355 |
</div>
|
| 1356 |
<div class="body">
|
| 1357 |
<ul>
|
| 135 |
'default' => esc_html__( '99', 'essential-addons-elementor' )
|
| 136 |
]
|
| 137 |
);
|
| 138 |
+
$this->add_control(
|
| 139 |
+
'eael_pricing_table_onsale',
|
| 140 |
+
[
|
| 141 |
+
'label' => __( 'On Sale?', 'essential-addons-elementor' ),
|
| 142 |
+
'type' => Controls_Manager::SWITCHER,
|
| 143 |
+
'default' => 'no',
|
| 144 |
+
'label_on' => __( 'Yes', 'essential-addons-elementor' ),
|
| 145 |
+
'label_off' => __( 'No', 'essential-addons-elementor' ),
|
| 146 |
+
'return_value' => 'yes',
|
| 147 |
+
]
|
| 148 |
+
);
|
| 149 |
+
$this->add_control(
|
| 150 |
+
'eael_pricing_table_onsale_price',
|
| 151 |
+
[
|
| 152 |
+
'label' => esc_html__( 'Sale Price', 'essential-addons-elementor' ),
|
| 153 |
+
'type' => Controls_Manager::TEXT,
|
| 154 |
+
'label_block' => false,
|
| 155 |
+
'default' => esc_html__( '89', 'essential-addons-elementor' ),
|
| 156 |
+
'condition' => [
|
| 157 |
+
'eael_pricing_table_onsale' => 'yes'
|
| 158 |
+
]
|
| 159 |
+
]
|
| 160 |
+
);
|
| 161 |
$this->add_control(
|
| 162 |
'eael_pricing_table_price_cur',
|
| 163 |
[
|
| 177 |
'label_block' => false,
|
| 178 |
'options' => [
|
| 179 |
'left' => esc_html__( 'Left', 'essential-addons-elementor' ),
|
|
|
|
| 180 |
'right' => esc_html__( 'Right', 'essential-addons-elementor' ),
|
|
|
|
| 181 |
],
|
| 182 |
]
|
| 183 |
);
|
| 567 |
|
| 568 |
/**
|
| 569 |
* -------------------------------------------
|
| 570 |
+
* Style (Header)
|
| 571 |
* -------------------------------------------
|
| 572 |
*/
|
| 573 |
$this->start_controls_section(
|
| 574 |
+
'eael_section_pricing_table_header_style_settings',
|
| 575 |
[
|
| 576 |
+
'label' => esc_html__( 'Header', 'essential-addons-elementor' ),
|
| 577 |
'tab' => Controls_Manager::TAB_STYLE
|
| 578 |
]
|
| 579 |
);
|
| 677 |
|
| 678 |
);
|
| 679 |
|
| 680 |
+
$this->end_controls_section();
|
| 681 |
+
|
| 682 |
+
|
| 683 |
+
/**
|
| 684 |
+
* -------------------------------------------
|
| 685 |
+
* Style (Pricing)
|
| 686 |
+
* -------------------------------------------
|
| 687 |
+
*/
|
| 688 |
+
$this->start_controls_section(
|
| 689 |
+
'eael_section_pricing_table_title_style_settings',
|
| 690 |
+
[
|
| 691 |
+
'label' => esc_html__( 'Pricing', 'essential-addons-elementor' ),
|
| 692 |
+
'tab' => Controls_Manager::TAB_STYLE
|
| 693 |
+
]
|
| 694 |
+
);
|
| 695 |
+
|
| 696 |
+
$this->add_control(
|
| 697 |
+
'eael_pricing_table_price_tag_onsale_heading',
|
| 698 |
+
[
|
| 699 |
+
'label' => esc_html__( 'Original Price', 'essential-addons-elementor' ),
|
| 700 |
+
'type' => Controls_Manager::HEADING,
|
| 701 |
+
'separator' => 'before'
|
| 702 |
+
]
|
| 703 |
+
);
|
| 704 |
+
|
| 705 |
+
$this->add_control(
|
| 706 |
+
'eael_pricing_table_pricing_onsale_color',
|
| 707 |
+
[
|
| 708 |
+
'label' => esc_html__( 'Color', 'essential-addons-elementor' ),
|
| 709 |
+
'type' => Controls_Manager::COLOR,
|
| 710 |
+
'default' => '#999',
|
| 711 |
+
'selectors' => [
|
| 712 |
+
'{{WRAPPER}} .eael-pricing-item .muted-price' => 'color: {{VALUE}};',
|
| 713 |
+
],
|
| 714 |
+
]
|
| 715 |
+
);
|
| 716 |
+
|
| 717 |
+
$this->add_group_control(
|
| 718 |
+
Group_Control_Typography::get_type(),
|
| 719 |
+
[
|
| 720 |
+
'name' => 'eael_pricing_table_price_tag_onsale_typography',
|
| 721 |
+
'selector' => '{{WRAPPER}} .eael-pricing-item .muted-price',
|
| 722 |
+
]
|
| 723 |
+
);
|
| 724 |
+
|
| 725 |
$this->add_control(
|
| 726 |
'eael_pricing_table_price_tag_heading',
|
| 727 |
[
|
| 728 |
+
'label' => esc_html__( 'Sale Price', 'essential-addons-elementor' ),
|
| 729 |
'type' => Controls_Manager::HEADING,
|
| 730 |
'separator' => 'before'
|
| 731 |
]
|
| 754 |
$this->add_control(
|
| 755 |
'eael_pricing_table_price_currency_heading',
|
| 756 |
[
|
| 757 |
+
'label' => esc_html__( 'Currency', 'essential-addons-elementor' ),
|
| 758 |
'type' => Controls_Manager::HEADING,
|
| 759 |
'separator' => 'before'
|
| 760 |
]
|
| 780 |
]
|
| 781 |
);
|
| 782 |
|
| 783 |
+
$this->add_responsive_control(
|
| 784 |
+
'eael_pricing_table_price_cur_margin',
|
| 785 |
+
[
|
| 786 |
+
'label' => esc_html__( 'Margin', 'essential-addons-elementor' ),
|
| 787 |
+
'type' => Controls_Manager::DIMENSIONS,
|
| 788 |
+
'size_units' => [ 'px', 'em', '%' ],
|
| 789 |
+
'selectors' => [
|
| 790 |
+
'{{WRAPPER}} .eael-pricing-item .price-currency' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
| 791 |
+
],
|
| 792 |
+
]
|
| 793 |
+
);
|
| 794 |
+
|
| 795 |
$this->add_control(
|
| 796 |
'eael_pricing_table_pricing_period_heading',
|
| 797 |
[
|
| 798 |
+
'label' => esc_html__( 'Pricing Period', 'essential-addons-elementor' ),
|
| 799 |
'type' => Controls_Manager::HEADING,
|
| 800 |
'separator' => 'before'
|
| 801 |
]
|
| 821 |
]
|
| 822 |
);
|
| 823 |
|
| 824 |
+
|
| 825 |
+
$this->end_controls_section();
|
| 826 |
+
|
| 827 |
+
/**
|
| 828 |
+
* -------------------------------------------
|
| 829 |
+
* Style (Feature List)
|
| 830 |
+
* -------------------------------------------
|
| 831 |
+
*/
|
| 832 |
+
$this->start_controls_section(
|
| 833 |
+
'eael_section_pricing_table_style_featured_list_settings',
|
| 834 |
[
|
| 835 |
+
'label' => esc_html__( 'Feature List', 'essential-addons-elementor' ),
|
| 836 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
|
|
|
| 837 |
]
|
| 838 |
);
|
| 839 |
|
| 861 |
|
| 862 |
/**
|
| 863 |
* -------------------------------------------
|
| 864 |
+
* Style (Ribbon)
|
| 865 |
* -------------------------------------------
|
| 866 |
*/
|
| 867 |
$this->start_controls_section(
|
| 868 |
'eael_section_pricing_table_style_3_featured_tag_settings',
|
| 869 |
[
|
| 870 |
+
'label' => esc_html__( 'Ribbon', 'essential-addons-elementor' ),
|
| 871 |
'tab' => Controls_Manager::TAB_STYLE,
|
| 872 |
]
|
| 873 |
);
|
| 1148 |
]
|
| 1149 |
);
|
| 1150 |
|
|
|
|
|
|
|
| 1151 |
$this->add_control(
|
| 1152 |
'eael_pricing_table_icon_color',
|
| 1153 |
[
|
| 1226 |
$this->start_controls_section(
|
| 1227 |
'eael_section_pricing_table_btn_style_settings',
|
| 1228 |
[
|
| 1229 |
+
'label' => esc_html__( 'Button', 'essential-addons-elementor' ),
|
| 1230 |
'tab' => Controls_Manager::TAB_STYLE
|
| 1231 |
]
|
| 1232 |
);
|
| 1384 |
$target = $settings['eael_pricing_table_btn_link']['is_external'] ? 'target="_blank"' : '';
|
| 1385 |
$nofollow = $settings['eael_pricing_table_btn_link']['nofollow'] ? 'rel="nofollow"' : '';
|
| 1386 |
if( 'yes' === $settings['eael_pricing_table_featured'] ) : $featured_class = 'featured '.$settings['eael_pricing_table_featured_styles']; else : $featured_class = ''; endif;
|
| 1387 |
+
|
| 1388 |
+
if( 'yes' === $settings['eael_pricing_table_onsale'] ) {
|
| 1389 |
+
if( $settings['eael_pricing_table_price_cur_placement'] == 'left' ) {
|
| 1390 |
+
$pricing = '<del class="muted-price"><span class="muted-price-currency">'.$settings['eael_pricing_table_price_cur'].'</span>'.$settings['eael_pricing_table_price'].'</del> <span class="price-currency">'.$settings['eael_pricing_table_price_cur'].'</span>'.$settings['eael_pricing_table_onsale_price'];
|
| 1391 |
+
}else if( $settings['eael_pricing_table_price_cur_placement'] == 'right' ) {
|
| 1392 |
+
$pricing = '<del class="muted-price">'.$settings['eael_pricing_table_price'].'<span class="muted-price-currency">'.$settings['eael_pricing_table_price_cur'].'</span></del> '.$settings['eael_pricing_table_onsale_price'].'<span class="price-currency">'.$settings['eael_pricing_table_price_cur'].'</span>';
|
| 1393 |
+
}
|
| 1394 |
+
}else {
|
| 1395 |
+
if( $settings['eael_pricing_table_price_cur_placement'] == 'left' ) {
|
| 1396 |
+
$pricing = '<span class="price-currency">'.$settings['eael_pricing_table_price_cur'].'</span>'.$settings['eael_pricing_table_price'];
|
| 1397 |
+
}else if( $settings['eael_pricing_table_price_cur_placement'] == 'right' ) {
|
| 1398 |
+
$pricing = $settings['eael_pricing_table_price'].'<span class="price-currency">'.$settings['eael_pricing_table_price_cur'].'</span>';
|
| 1399 |
+
}
|
| 1400 |
+
}
|
| 1401 |
?>
|
| 1402 |
<?php if( 'style-1' === $settings['eael_pricing_table_style'] || 'style-3' === $settings['eael_pricing_table_style'] || 'style-4' === $settings['eael_pricing_table_style'] ) : ?>
|
| 1403 |
<div class="eael-pricing style-1">
|
| 1406 |
<h2 class="title"><?php echo $settings['eael_pricing_table_title']; ?></h2>
|
| 1407 |
</div>
|
| 1408 |
<div class="eael-pricing-tag">
|
| 1409 |
+
<span class="price-tag"><?php echo $pricing; ?></span>
|
| 1410 |
+
<span class="price-period"><?php echo $settings['eael_pricing_table_period_separator']; ?> <?php echo $settings['eael_pricing_table_price_period']; ?></span>
|
| 1411 |
</div>
|
| 1412 |
<div class="body">
|
| 1413 |
<ul>
|
| 1448 |
<span class="subtitle"><?php echo $settings['eael_pricing_table_sub_title']; ?></span>
|
| 1449 |
</div>
|
| 1450 |
<div class="eael-pricing-tag">
|
| 1451 |
+
<span class="price-tag"><?php echo $pricing; ?></span>
|
| 1452 |
+
<span class="price-period"><?php echo $settings['eael_pricing_table_period_separator']; ?> <?php echo $settings['eael_pricing_table_price_period']; ?></span>
|
| 1453 |
</div>
|
| 1454 |
<div class="body">
|
| 1455 |
<ul>
|
elements/tooltip/tooltip.php
CHANGED
|
@@ -601,16 +601,16 @@ class Widget_Eael_Tooltip extends Widget_Base {
|
|
| 601 |
<div class="eael-tooltip">
|
| 602 |
<?php if( $settings['eael_tooltip_type'] === 'text' ) : ?>
|
| 603 |
<<?php echo esc_attr( $settings['eael_tooltip_content_tag'] ); ?> class="eael-tooltip-content"><?php if( $settings['eael_tooltip_enable_link'] === 'yes' ) : ?><a href="<?php echo esc_url( $settings['eael_tooltip_link']['url'] ); ?>" <?php echo $target; ?> <?php echo $nofollow; ?> ><?php endif; ?><?php echo esc_html__( $settings['eael_tooltip_content'], 'essential-addons-elementor' ); ?><?php if( $settings['eael_tooltip_enable_link'] === 'yes' ) : ?></a><?php endif; ?></<?php echo esc_attr( $settings['eael_tooltip_content_tag'] ); ?>>
|
| 604 |
-
<span class="eael-tooltip-text eael-tooltip-<?php echo esc_attr( $settings['eael_tooltip_hover_dir'] ) ?>"><?php echo
|
| 605 |
<?php elseif( $settings['eael_tooltip_type'] === 'icon' ) : ?>
|
| 606 |
<span class="eael-tooltip-content"><?php if( $settings['eael_tooltip_enable_link'] === 'yes' ) : ?><a href="<?php echo esc_url( $settings['eael_tooltip_link']['url'] ); ?>" <?php echo $target; ?> <?php echo $nofollow; ?> ><?php endif; ?><i class="<?php echo esc_attr( $settings['eael_tooltip_icon_content'] ); ?>"></i><?php if( $settings['eael_tooltip_enable_link'] === 'yes' ) : ?></a><?php endif; ?></span>
|
| 607 |
-
<span class="eael-tooltip-text eael-tooltip-<?php echo esc_attr( $settings['eael_tooltip_hover_dir'] ) ?>"><?php echo
|
| 608 |
<?php elseif( $settings['eael_tooltip_type'] === 'image' ) : ?>
|
| 609 |
<span class="eael-tooltip-content"><?php if( $settings['eael_tooltip_enable_link'] === 'yes' ) : ?><a href="<?php echo esc_url( $settings['eael_tooltip_link']['url'] ); ?>" <?php echo $target; ?> <?php echo $nofollow; ?> ><?php endif; ?><img src="<?php echo esc_url( $settings['eael_tooltip_img_content']['url'] ); ?>" alt="<?php echo esc_attr( $settings['eael_tooltip_hover_content'] ); ?>"><?php if( $settings['eael_tooltip_enable_link'] === 'yes' ) : ?></a><?php endif; ?></span>
|
| 610 |
-
<span class="eael-tooltip-text eael-tooltip-<?php echo esc_attr( $settings['eael_tooltip_hover_dir'] ) ?>"><?php echo
|
| 611 |
<?php elseif( $settings['eael_tooltip_type'] === 'shortcode' ) : ?>
|
| 612 |
<div class="eael-tooltip-content"><?php echo do_shortcode( $settings['eael_tooltip_shortcode_content'] ); ?></div>
|
| 613 |
-
<span class="eael-tooltip-text eael-tooltip-<?php echo esc_attr( $settings['eael_tooltip_hover_dir'] ) ?>"><?php echo
|
| 614 |
<?php endif; ?>
|
| 615 |
</div>
|
| 616 |
<?php
|
| 601 |
<div class="eael-tooltip">
|
| 602 |
<?php if( $settings['eael_tooltip_type'] === 'text' ) : ?>
|
| 603 |
<<?php echo esc_attr( $settings['eael_tooltip_content_tag'] ); ?> class="eael-tooltip-content"><?php if( $settings['eael_tooltip_enable_link'] === 'yes' ) : ?><a href="<?php echo esc_url( $settings['eael_tooltip_link']['url'] ); ?>" <?php echo $target; ?> <?php echo $nofollow; ?> ><?php endif; ?><?php echo esc_html__( $settings['eael_tooltip_content'], 'essential-addons-elementor' ); ?><?php if( $settings['eael_tooltip_enable_link'] === 'yes' ) : ?></a><?php endif; ?></<?php echo esc_attr( $settings['eael_tooltip_content_tag'] ); ?>>
|
| 604 |
+
<span class="eael-tooltip-text eael-tooltip-<?php echo esc_attr( $settings['eael_tooltip_hover_dir'] ) ?>"><?php echo __( $settings['eael_tooltip_hover_content'] ); ?></span>
|
| 605 |
<?php elseif( $settings['eael_tooltip_type'] === 'icon' ) : ?>
|
| 606 |
<span class="eael-tooltip-content"><?php if( $settings['eael_tooltip_enable_link'] === 'yes' ) : ?><a href="<?php echo esc_url( $settings['eael_tooltip_link']['url'] ); ?>" <?php echo $target; ?> <?php echo $nofollow; ?> ><?php endif; ?><i class="<?php echo esc_attr( $settings['eael_tooltip_icon_content'] ); ?>"></i><?php if( $settings['eael_tooltip_enable_link'] === 'yes' ) : ?></a><?php endif; ?></span>
|
| 607 |
+
<span class="eael-tooltip-text eael-tooltip-<?php echo esc_attr( $settings['eael_tooltip_hover_dir'] ) ?>"><?php echo __( $settings['eael_tooltip_hover_content'] ); ?></span>
|
| 608 |
<?php elseif( $settings['eael_tooltip_type'] === 'image' ) : ?>
|
| 609 |
<span class="eael-tooltip-content"><?php if( $settings['eael_tooltip_enable_link'] === 'yes' ) : ?><a href="<?php echo esc_url( $settings['eael_tooltip_link']['url'] ); ?>" <?php echo $target; ?> <?php echo $nofollow; ?> ><?php endif; ?><img src="<?php echo esc_url( $settings['eael_tooltip_img_content']['url'] ); ?>" alt="<?php echo esc_attr( $settings['eael_tooltip_hover_content'] ); ?>"><?php if( $settings['eael_tooltip_enable_link'] === 'yes' ) : ?></a><?php endif; ?></span>
|
| 610 |
+
<span class="eael-tooltip-text eael-tooltip-<?php echo esc_attr( $settings['eael_tooltip_hover_dir'] ) ?>"><?php echo __( $settings['eael_tooltip_hover_content'] ); ?></span>
|
| 611 |
<?php elseif( $settings['eael_tooltip_type'] === 'shortcode' ) : ?>
|
| 612 |
<div class="eael-tooltip-content"><?php echo do_shortcode( $settings['eael_tooltip_shortcode_content'] ); ?></div>
|
| 613 |
+
<span class="eael-tooltip-text eael-tooltip-<?php echo esc_attr( $settings['eael_tooltip_hover_dir'] ) ?>"><?php echo __( $settings['eael_tooltip_hover_content'] ); ?></span>
|
| 614 |
<?php endif; ?>
|
| 615 |
</div>
|
| 616 |
<?php
|
essential_adons_elementor.php
CHANGED
|
@@ -4,7 +4,7 @@
|
|
| 4 |
* Description: The ultimate elements library for Elementor page builder plugin for WordPress.
|
| 5 |
* Plugin URI: https://essential-addons.com/elementor/
|
| 6 |
* Author: Codetic
|
| 7 |
-
* Version: 2.7.
|
| 8 |
* Author URI: https://www.codetic.net
|
| 9 |
*
|
| 10 |
* Text Domain: essential-addons-elementor
|
|
@@ -154,6 +154,14 @@ function essential_addons_el_enqueue(){
|
|
| 154 |
wp_enqueue_style('essential_addons_elementor-css',ESSENTIAL_ADDONS_EL_URL.'assets/css/essential-addons-elementor.css');
|
| 155 |
wp_enqueue_style('essential_addons_elementor-slick-css',ESSENTIAL_ADDONS_EL_URL.'assets/slick/slick.css');
|
| 156 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 157 |
if( $is_component_active['fancy-text'] ) {
|
| 158 |
wp_enqueue_script('essential_addons_elementor-fancy-text-js',ESSENTIAL_ADDONS_EL_URL.'assets/js/fancy-text.js', array('jquery'),'1.0', true);
|
| 159 |
}
|
|
@@ -187,7 +195,6 @@ function essential_addons_el_enqueue(){
|
|
| 187 |
}
|
| 188 |
add_action( 'wp_enqueue_scripts', 'essential_addons_el_enqueue' );
|
| 189 |
|
| 190 |
-
|
| 191 |
/**
|
| 192 |
* Editor Css
|
| 193 |
*/
|
|
@@ -258,6 +265,52 @@ if( ! function_exists( 'essential_addons_elementor_lite_start_plugin_tracking' )
|
|
| 258 |
essential_addons_elementor_lite_start_plugin_tracking();
|
| 259 |
}
|
| 260 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 261 |
/**
|
| 262 |
* Admin Notice
|
| 263 |
*
|
|
@@ -291,44 +344,4 @@ function eael_nag_ignore() {
|
|
| 291 |
add_user_meta($user_id, 'eael_ignore_notice260', 'true', true);
|
| 292 |
}
|
| 293 |
}
|
| 294 |
-
add_action('admin_init', 'eael_nag_ignore');
|
| 295 |
-
|
| 296 |
-
|
| 297 |
-
/**
|
| 298 |
-
* Check if Elementor is Installed or not
|
| 299 |
-
*/
|
| 300 |
-
if( ! function_exists( 'eael_is_elementor_active' ) ) :
|
| 301 |
-
function eael_is_elementor_active() {
|
| 302 |
-
$flie_path = 'elementor/elementor.php';
|
| 303 |
-
$installed_plugins = get_plugins();
|
| 304 |
-
return isset( $installed_plugins[$flie_path] );
|
| 305 |
-
}
|
| 306 |
-
endif;
|
| 307 |
-
|
| 308 |
-
/**
|
| 309 |
-
* This notice will appear if Elementor is not installed or activated or both
|
| 310 |
-
*/
|
| 311 |
-
function eael_is_failed_to_load() {
|
| 312 |
-
$elementor = 'elementor/elementor.php';
|
| 313 |
-
if( eael_is_elementor_active() ) {
|
| 314 |
-
if( ! current_user_can( 'activate_plugins' ) ) {
|
| 315 |
-
return;
|
| 316 |
-
}
|
| 317 |
-
$activation_url = wp_nonce_url( 'plugins.php?action=activate&plugin=' . $elementor . '&plugin_status=all&paged=1&s', 'activate-plugin_' . $elementor );
|
| 318 |
-
$message = __( 'Essential Addons Elementor requires Elementor plugin to be active. Please activate Elementor to continue.', 'essential-addons-elementor' );
|
| 319 |
-
$button_text = __( 'Activate Elementor', 'essential-addons-elementor' );
|
| 320 |
-
} else {
|
| 321 |
-
if( ! current_user_can( 'activate_plugins' ) ) {
|
| 322 |
-
return;
|
| 323 |
-
}
|
| 324 |
-
$activation_url = wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=elementor' ), 'install-plugin_elementor' );
|
| 325 |
-
$message = sprintf( __( 'Essentail Addons Elementor requires %1$s"Elementor"%2$s plugin to be installed and activated. Please install Elementor to continue.', 'essential-addons-elementor' ), '<strong>', '</strong>' );
|
| 326 |
-
$button_text = __( 'Install Elementor', 'essential-addons-elementor' );
|
| 327 |
-
}
|
| 328 |
-
$button = '<p><a href="' . $activation_url . '" class="button-primary">' . $button_text . '</a></p>';
|
| 329 |
-
printf( '<div class="error"><p>%1$s</p>%2$s</div>', esc_html( $message ), $button );
|
| 330 |
-
}
|
| 331 |
-
|
| 332 |
-
if( ! did_action( 'elementor/loaded' ) ) {
|
| 333 |
-
add_action( 'admin_notices', 'eael_is_failed_to_load' );
|
| 334 |
-
}
|
| 4 |
* Description: The ultimate elements library for Elementor page builder plugin for WordPress.
|
| 5 |
* Plugin URI: https://essential-addons.com/elementor/
|
| 6 |
* Author: Codetic
|
| 7 |
+
* Version: 2.7.1
|
| 8 |
* Author URI: https://www.codetic.net
|
| 9 |
*
|
| 10 |
* Text Domain: essential-addons-elementor
|
| 154 |
wp_enqueue_style('essential_addons_elementor-css',ESSENTIAL_ADDONS_EL_URL.'assets/css/essential-addons-elementor.css');
|
| 155 |
wp_enqueue_style('essential_addons_elementor-slick-css',ESSENTIAL_ADDONS_EL_URL.'assets/slick/slick.css');
|
| 156 |
|
| 157 |
+
wp_enqueue_script('eael-scripts',ESSENTIAL_ADDONS_EL_URL.'assets/js/eael-scripts.js', array('jquery'),'1.0', true);
|
| 158 |
+
if ( class_exists( 'GFCommon' ) ) {
|
| 159 |
+
foreach( eael_select_gravity_form() as $form_id => $form_name ){
|
| 160 |
+
if ( $form_id != '0' ) {
|
| 161 |
+
gravity_form_enqueue_scripts( $form_id );
|
| 162 |
+
}
|
| 163 |
+
};
|
| 164 |
+
}
|
| 165 |
if( $is_component_active['fancy-text'] ) {
|
| 166 |
wp_enqueue_script('essential_addons_elementor-fancy-text-js',ESSENTIAL_ADDONS_EL_URL.'assets/js/fancy-text.js', array('jquery'),'1.0', true);
|
| 167 |
}
|
| 195 |
}
|
| 196 |
add_action( 'wp_enqueue_scripts', 'essential_addons_el_enqueue' );
|
| 197 |
|
|
|
|
| 198 |
/**
|
| 199 |
* Editor Css
|
| 200 |
*/
|
| 265 |
essential_addons_elementor_lite_start_plugin_tracking();
|
| 266 |
}
|
| 267 |
|
| 268 |
+
|
| 269 |
+
function eael_init() {
|
| 270 |
+
if ( class_exists( 'Caldera_Forms' ) ) {
|
| 271 |
+
add_filter( 'caldera_forms_force_enqueue_styles_early', '__return_true' );
|
| 272 |
+
}
|
| 273 |
+
/**
|
| 274 |
+
* Check if Elementor is Installed or not
|
| 275 |
+
*/
|
| 276 |
+
if( ! function_exists( 'eael_is_elementor_active' ) ) :
|
| 277 |
+
function eael_is_elementor_active() {
|
| 278 |
+
$file_path = 'elementor/elementor.php';
|
| 279 |
+
$installed_plugins = get_plugins();
|
| 280 |
+
return isset( $installed_plugins[$file_path] );
|
| 281 |
+
}
|
| 282 |
+
endif;
|
| 283 |
+
|
| 284 |
+
/**
|
| 285 |
+
* This notice will appear if Elementor is not installed or activated or both
|
| 286 |
+
*/
|
| 287 |
+
function eael_is_failed_to_load() {
|
| 288 |
+
$elementor = 'elementor/elementor.php';
|
| 289 |
+
if( eael_is_elementor_active() ) {
|
| 290 |
+
if( ! current_user_can( 'activate_plugins' ) ) {
|
| 291 |
+
return;
|
| 292 |
+
}
|
| 293 |
+
$activation_url = wp_nonce_url( 'plugins.php?action=activate&plugin=' . $elementor . '&plugin_status=all&paged=1&s', 'activate-plugin_' . $elementor );
|
| 294 |
+
$message = __( '<strong>Essential Addons for Elementor</strong> requires <strong>Elementor</strong> plugin to be active. Please activate Elementor to continue.', 'essential-addons-elementor' );
|
| 295 |
+
$button_text = __( 'Activate Elementor', 'essential-addons-elementor' );
|
| 296 |
+
} else {
|
| 297 |
+
if( ! current_user_can( 'activate_plugins' ) ) {
|
| 298 |
+
return;
|
| 299 |
+
}
|
| 300 |
+
$activation_url = wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=elementor' ), 'install-plugin_elementor' );
|
| 301 |
+
$message = sprintf( __( '<strong>Essential Addons for Elementor</strong> requires <strong>Elementor</strong> plugin to be installed and activated. Please install Elementor to continue.', 'essential-addons-elementor' ), '<strong>', '</strong>' );
|
| 302 |
+
$button_text = __( 'Install Elementor', 'essential-addons-elementor' );
|
| 303 |
+
}
|
| 304 |
+
$button = '<p><a href="' . $activation_url . '" class="button-primary">' . $button_text . '</a></p>';
|
| 305 |
+
printf( '<div class="error"><p>%1$s</p>%2$s</div>', __( $message ), $button );
|
| 306 |
+
}
|
| 307 |
+
|
| 308 |
+
if( ! did_action( 'elementor/loaded' ) ) {
|
| 309 |
+
add_action( 'admin_notices', 'eael_is_failed_to_load' );
|
| 310 |
+
}
|
| 311 |
+
}
|
| 312 |
+
add_action( 'plugins_loaded', 'eael_init' );
|
| 313 |
+
|
| 314 |
/**
|
| 315 |
* Admin Notice
|
| 316 |
*
|
| 344 |
add_user_meta($user_id, 'eael_ignore_notice260', 'true', true);
|
| 345 |
}
|
| 346 |
}
|
| 347 |
+
add_action('admin_init', 'eael_nag_ignore');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/queries.php
CHANGED
|
@@ -248,15 +248,31 @@ function eael_select_contact_form(){
|
|
| 248 |
/**
|
| 249 |
* Get Gravity Form [ if exists ]
|
| 250 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
| 251 |
|
| 252 |
-
|
| 253 |
|
| 254 |
-
|
| 255 |
-
foreach( $forms as $form ) {
|
| 256 |
-
$options[ $form->id ] = $form->title;
|
| 257 |
-
}
|
| 258 |
-
return $options;
|
| 259 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 260 |
}
|
| 261 |
|
| 262 |
/**
|
|
@@ -284,30 +300,62 @@ function eael_select_weform() {
|
|
| 284 |
* Get Ninja Form List
|
| 285 |
* @return array
|
| 286 |
*/
|
| 287 |
-
|
| 288 |
-
|
| 289 |
-
|
| 290 |
-
|
| 291 |
-
|
| 292 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 293 |
}
|
| 294 |
-
return $options;
|
| 295 |
}
|
| 296 |
|
| 297 |
/**
|
| 298 |
* Get Caldera Form List
|
| 299 |
* @return array
|
| 300 |
*/
|
| 301 |
-
|
| 302 |
-
|
| 303 |
-
|
| 304 |
-
|
| 305 |
-
|
| 306 |
-
|
| 307 |
-
|
| 308 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 309 |
}
|
| 310 |
-
return $options;
|
| 311 |
}
|
| 312 |
|
| 313 |
|
| 248 |
/**
|
| 249 |
* Get Gravity Form [ if exists ]
|
| 250 |
*/
|
| 251 |
+
if ( !function_exists('eael_select_gravity_form') ) {
|
| 252 |
+
function eael_select_gravity_form() {
|
| 253 |
+
if ( class_exists( 'GFCommon' ) ) {
|
| 254 |
+
$options = array();
|
| 255 |
|
| 256 |
+
$gravity_forms = RGFormsModel::get_forms( null, 'title' );
|
| 257 |
|
| 258 |
+
if ( ! empty( $gravity_forms ) && ! is_wp_error( $gravity_forms ) ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
| 259 |
|
| 260 |
+
$i = 0;
|
| 261 |
+
|
| 262 |
+
foreach ( $gravity_forms as $form ) {
|
| 263 |
+
if ( $i == 0 ) {
|
| 264 |
+
$options[0] = esc_html__( 'Select Gravity Form', 'essential-addons-elementor' );
|
| 265 |
+
}
|
| 266 |
+
$options[ $form->id ] = $form->title;
|
| 267 |
+
$i++;
|
| 268 |
+
}
|
| 269 |
+
}
|
| 270 |
+
} else {
|
| 271 |
+
$options = array();
|
| 272 |
+
}
|
| 273 |
+
|
| 274 |
+
return $options;
|
| 275 |
+
}
|
| 276 |
}
|
| 277 |
|
| 278 |
/**
|
| 300 |
* Get Ninja Form List
|
| 301 |
* @return array
|
| 302 |
*/
|
| 303 |
+
if ( !function_exists('eael_select_ninja_form') ) {
|
| 304 |
+
function eael_select_ninja_form() {
|
| 305 |
+
if ( class_exists( 'Ninja_Forms' ) ) {
|
| 306 |
+
$options = array();
|
| 307 |
+
|
| 308 |
+
$contact_forms = Ninja_Forms()->form()->get_forms();
|
| 309 |
+
|
| 310 |
+
if ( ! empty( $contact_forms ) && ! is_wp_error( $contact_forms ) ) {
|
| 311 |
+
|
| 312 |
+
$i = 0;
|
| 313 |
+
|
| 314 |
+
foreach ( $contact_forms as $form ) {
|
| 315 |
+
if ( $i == 0 ) {
|
| 316 |
+
$options[0] = esc_html__( 'Select Ninja Form', 'essential-addons-elementor' );
|
| 317 |
+
}
|
| 318 |
+
$options[ $form->get_id() ] = $form->get_setting( 'title' );
|
| 319 |
+
$i++;
|
| 320 |
+
}
|
| 321 |
+
}
|
| 322 |
+
} else {
|
| 323 |
+
$options = array();
|
| 324 |
+
}
|
| 325 |
+
|
| 326 |
+
return $options;
|
| 327 |
}
|
|
|
|
| 328 |
}
|
| 329 |
|
| 330 |
/**
|
| 331 |
* Get Caldera Form List
|
| 332 |
* @return array
|
| 333 |
*/
|
| 334 |
+
if ( !function_exists('eael_select_caldera_form') ) {
|
| 335 |
+
function eael_select_caldera_form() {
|
| 336 |
+
if ( class_exists( 'Caldera_Forms' ) ) {
|
| 337 |
+
$options = array();
|
| 338 |
+
|
| 339 |
+
$contact_forms = Caldera_Forms_Forms::get_forms( true, true );
|
| 340 |
+
|
| 341 |
+
if ( ! empty( $contact_forms ) && ! is_wp_error( $contact_forms ) ) {
|
| 342 |
+
|
| 343 |
+
$i = 0;
|
| 344 |
+
|
| 345 |
+
foreach ( $contact_forms as $form ) {
|
| 346 |
+
if ( $i == 0 ) {
|
| 347 |
+
$options[0] = esc_html__( 'Select Caldera Form', 'essential-addons-elementor' );
|
| 348 |
+
}
|
| 349 |
+
$options[ $form['ID'] ] = $form['name'];
|
| 350 |
+
$i++;
|
| 351 |
+
}
|
| 352 |
+
}
|
| 353 |
+
} else {
|
| 354 |
+
$options = array();
|
| 355 |
+
}
|
| 356 |
+
|
| 357 |
+
return $options;
|
| 358 |
}
|
|
|
|
| 359 |
}
|
| 360 |
|
| 361 |
|
readme.txt
CHANGED
|
@@ -1,13 +1,13 @@
|
|
| 1 |
=== Elementor Essential Addons ===
|
| 2 |
-
Contributors: Codetic, re_enter_rupok, Asif2BD
|
| 3 |
Tags: elementor, elements, addons, elementor addon, elementor widget, page builder, builder, visual editor, wordpress page builder, elementor form
|
| 4 |
Requires at least: 4.0
|
| 5 |
Tested up to: 4.9.6
|
| 6 |
-
Stable tag: 2.7.
|
| 7 |
License: GPLv3
|
| 8 |
License URI: https://opensource.org/licenses/GPL-3.0
|
| 9 |
|
| 10 |
-
Ultimate elements library for Elementor WordPress Page Builder. Premium elements with endless customization options.
|
| 11 |
|
| 12 |
== Description ==
|
| 13 |
|
|
@@ -130,6 +130,19 @@ Your existing elements/content will work with premium version. So you won't lose
|
|
| 130 |
|
| 131 |
== Changelog ==
|
| 132 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 133 |
= 2.7.0 =
|
| 134 |
|
| 135 |
- Dynamic field support added to all elements
|
| 1 |
=== Elementor Essential Addons ===
|
| 2 |
+
Contributors: Codetic, re_enter_rupok, Asif2BD
|
| 3 |
Tags: elementor, elements, addons, elementor addon, elementor widget, page builder, builder, visual editor, wordpress page builder, elementor form
|
| 4 |
Requires at least: 4.0
|
| 5 |
Tested up to: 4.9.6
|
| 6 |
+
Stable tag: 2.7.1
|
| 7 |
License: GPLv3
|
| 8 |
License URI: https://opensource.org/licenses/GPL-3.0
|
| 9 |
|
| 10 |
+
Ultimate elements library for Elementor WordPress Page Builder. 44+ Premium elements with endless customization options.
|
| 11 |
|
| 12 |
== Description ==
|
| 13 |
|
| 130 |
|
| 131 |
== Changelog ==
|
| 132 |
|
| 133 |
+
= 2.7.1 =
|
| 134 |
+
|
| 135 |
+
- "On Sale Price" option added to Pricing Table element
|
| 136 |
+
- Testimonial avatar display issue fixed
|
| 137 |
+
- Advanced Tabs improved with custom icon option
|
| 138 |
+
- Contact Form 7 updated
|
| 139 |
+
- Ninja updated
|
| 140 |
+
- Gravity updated
|
| 141 |
+
- Caldera updated
|
| 142 |
+
- Post Grid load more button position fixed
|
| 143 |
+
- Filterable Gallery improved with less script dependency
|
| 144 |
+
- Few minor bugfix and improvements
|
| 145 |
+
|
| 146 |
= 2.7.0 =
|
| 147 |
|
| 148 |
- Dynamic field support added to all elements
|
