Version Description
- 20/08/2020 =
- Added: Google reCAPTCHA option in EA Login | Register Form
- Added: Compatibility with WooCommerce 4.4.1
- Fixed: User Role not setting correctly in EA Login | Register Form
- Few minor bugfix and improvements
Download this release
Release Info
Developer | re_enter_rupok |
Plugin | Elementor Essential Addons |
Version | 4.2.1 |
Comparing to | |
See all releases |
Code changes from version 4.2.0 to 4.2.1
- assets/front-end/css/view/login-register.css +7 -4
- assets/front-end/css/view/login-register.min.css +1 -1
- assets/front-end/js/view/login-register.js +1 -1
- assets/front-end/js/view/login-register.min.js +1 -1
- essential_adons_elementor.php +3 -3
- includes/Classes/Bootstrap.php +4 -2
- includes/Elements/Login_Register.php +511 -61
- includes/Traits/Admin.php +7 -0
- includes/Traits/Enqueue.php +1 -0
- includes/Traits/Login_Registration.php +58 -11
- includes/templates/admin/elements.php +8 -2
- readme.txt +7 -1
assets/front-end/css/view/login-register.css
CHANGED
@@ -224,13 +224,13 @@
|
|
224 |
}
|
225 |
.eael-lr-form-wrapper .lr-form-header.header-inline .form-logo {
|
226 |
-webkit-box-flex: 0;
|
227 |
-
-ms-flex: 0 0
|
228 |
-
flex: 0 0
|
229 |
}
|
230 |
.eael-lr-form-wrapper .lr-form-header.header-inline .form-dsc {
|
231 |
-webkit-box-flex: 0;
|
232 |
-
-ms-flex: 0 0
|
233 |
-
flex: 0 0
|
234 |
padding-left: 15px;
|
235 |
}
|
236 |
.eael-lr-form-wrapper .lr-form-header img {
|
@@ -283,6 +283,9 @@
|
|
283 |
margin-left: 5px;
|
284 |
display: inline-block;
|
285 |
}
|
|
|
|
|
|
|
286 |
.eael-lr-form-wrapper .eael-lr-footer {
|
287 |
display: -webkit-box;
|
288 |
display: -ms-flexbox;
|
224 |
}
|
225 |
.eael-lr-form-wrapper .lr-form-header.header-inline .form-logo {
|
226 |
-webkit-box-flex: 0;
|
227 |
+
-ms-flex: 0 0 auto;
|
228 |
+
flex: 0 0 auto;
|
229 |
}
|
230 |
.eael-lr-form-wrapper .lr-form-header.header-inline .form-dsc {
|
231 |
-webkit-box-flex: 0;
|
232 |
+
-ms-flex: 0 0 auto;
|
233 |
+
flex: 0 0 auto;
|
234 |
padding-left: 15px;
|
235 |
}
|
236 |
.eael-lr-form-wrapper .lr-form-header img {
|
283 |
margin-left: 5px;
|
284 |
display: inline-block;
|
285 |
}
|
286 |
+
.eael-lr-form-wrapper .eael-recaptcha-wrapper {
|
287 |
+
margin-bottom: 1rem;
|
288 |
+
}
|
289 |
.eael-lr-form-wrapper .eael-lr-footer {
|
290 |
display: -webkit-box;
|
291 |
display: -ms-flexbox;
|
assets/front-end/css/view/login-register.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.eael-w-10{width:10%}.eael-w-20{width:20%}.eael-w-25{width:25%}.eael-w-30{width:30%}.eael-w-33{width:33%}.eael-w-40{width:40%}.eael-w-50{width:50%}.eael-w-60{width:60%}.eael-w-66{width:66%}.eael-w-70{width:70%}.eael-w-75{width:75%}.eael-w-80{width:80%}.eael-w-90{width:90%}.eael-w-100{width:100%}.d-none{display:none}.d-ib{display:inline-block}.mr-auto{margin-right:auto}.ml-auto{margin-left:auto}.fd-row{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.fd-col{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.eael-lr-form-wrapper{width:370px;margin:0 auto;background-color:#fff;padding:35px;border-radius:10px;-webkit-box-shadow:0 0 37.5px 14px rgba(2,8,53,.06);box-shadow:0 0 37.5px 14px rgba(2,8,53,.06)}.eael-lr-form-wrapper.style-2{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;padding:0;border-radius:0}@media(max-width: 767px){.eael-lr-form-wrapper.style-2{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}}.eael-lr-form-wrapper.style-2 .lr-form-illustration{width:50%;background-repeat:no-repeat;background-size:cover;background-position:center;position:relative;z-index:1}@media(max-width: 767px){.eael-lr-form-wrapper.style-2 .lr-form-illustration{padding-bottom:200px}}.eael-lr-form-wrapper.style-2 .lr-form-wrapper{padding:35px;width:370px}.eael-lr-form-wrapper .eael-lr-form-group{margin-bottom:1rem}.eael-lr-form-wrapper .eael-lr-form-group label{display:inline-block;margin-bottom:.5rem}.eael-lr-form-wrapper .eael-lr-form-group label.mark-required{position:relative}.eael-lr-form-wrapper .eael-lr-form-group label.mark-required::after{content:" *";color:red;position:absolute;line-height:0;top:17px;right:-10px}.eael-lr-form-wrapper .eael-lr-form-group .eael-lr-form-control{display:block;width:100%;padding:15px;font-size:1rem;line-height:1.5;color:#495057;background-color:#fff;background-clip:padding-box;border:1px solid #cfcfe8;border-radius:3px;-webkit-transition:border-color .15s ease-in-out,-webkit-box-shadow .15s ease-in-out;transition:border-color .15s ease-in-out,-webkit-box-shadow .15s ease-in-out;-o-transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out,-webkit-box-shadow .15s ease-in-out;outline:none}.eael-lr-form-wrapper .eael-forever-forget{display:-webkit-box;display:-ms-flexbox;display:flex;font-size:.9em}.eael-lr-form-wrapper .eael-forever-forget .forget-menot{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.eael-lr-form-wrapper .eael-forever-forget .forget-menot label{margin:0 0 0 10px}.eael-lr-form-wrapper .eael-forever-forget .forget-menot,.eael-lr-form-wrapper .eael-forever-forget .forget-pass{-webkit-box-flex:1;-ms-flex:1;flex:1;margin:0}.eael-lr-form-wrapper .eael-forever-forget .forget-pass{text-align:right}.eael-lr-form-wrapper .eael-lr-password-wrapper{position:relative}.eael-lr-form-wrapper .eael-lr-password-wrapper button{position:absolute;top:0;right:0;height:100%;background:transparent;border:none;color:red}.eael-lr-form-wrapper .eael-lr-btn{background-color:#744ffb;color:#fff;position:relative;overflow:hidden;display:inline-block;vertical-align:top;text-decoration:none;border:none;-webkit-transition:all .2s;-o-transition:all .2s;transition:all .2s;padding:15px;width:130px}.eael-lr-form-wrapper .eael-lr-btn.eael-lr-btn-block{display:block}.eael-lr-form-wrapper .eael-lr-btn.eael-lr-btn-inline{display:inline-block}.eael-lr-form-wrapper .eael-lr-link{display:inline-block}.eael-lr-form-wrapper .eael-sign-wrapper{text-align:center;padding:20px 0 0}.eael-lr-form-wrapper .lr-form-header.header-inline{display:-webkit-box;display:-ms-flexbox;display:flex}.eael-lr-form-wrapper .lr-form-header.header-inline .form-logo{-webkit-box-flex:0;-ms-flex:0 0
|
1 |
+
.eael-w-10{width:10%}.eael-w-20{width:20%}.eael-w-25{width:25%}.eael-w-30{width:30%}.eael-w-33{width:33%}.eael-w-40{width:40%}.eael-w-50{width:50%}.eael-w-60{width:60%}.eael-w-66{width:66%}.eael-w-70{width:70%}.eael-w-75{width:75%}.eael-w-80{width:80%}.eael-w-90{width:90%}.eael-w-100{width:100%}.d-none{display:none}.d-ib{display:inline-block}.mr-auto{margin-right:auto}.ml-auto{margin-left:auto}.fd-row{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.fd-col{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.eael-lr-form-wrapper{width:370px;margin:0 auto;background-color:#fff;padding:35px;border-radius:10px;-webkit-box-shadow:0 0 37.5px 14px rgba(2,8,53,.06);box-shadow:0 0 37.5px 14px rgba(2,8,53,.06)}.eael-lr-form-wrapper.style-2{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;padding:0;border-radius:0}@media(max-width: 767px){.eael-lr-form-wrapper.style-2{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}}.eael-lr-form-wrapper.style-2 .lr-form-illustration{width:50%;background-repeat:no-repeat;background-size:cover;background-position:center;position:relative;z-index:1}@media(max-width: 767px){.eael-lr-form-wrapper.style-2 .lr-form-illustration{padding-bottom:200px}}.eael-lr-form-wrapper.style-2 .lr-form-wrapper{padding:35px;width:370px}.eael-lr-form-wrapper .eael-lr-form-group{margin-bottom:1rem}.eael-lr-form-wrapper .eael-lr-form-group label{display:inline-block;margin-bottom:.5rem}.eael-lr-form-wrapper .eael-lr-form-group label.mark-required{position:relative}.eael-lr-form-wrapper .eael-lr-form-group label.mark-required::after{content:" *";color:red;position:absolute;line-height:0;top:17px;right:-10px}.eael-lr-form-wrapper .eael-lr-form-group .eael-lr-form-control{display:block;width:100%;padding:15px;font-size:1rem;line-height:1.5;color:#495057;background-color:#fff;background-clip:padding-box;border:1px solid #cfcfe8;border-radius:3px;-webkit-transition:border-color .15s ease-in-out,-webkit-box-shadow .15s ease-in-out;transition:border-color .15s ease-in-out,-webkit-box-shadow .15s ease-in-out;-o-transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out,-webkit-box-shadow .15s ease-in-out;outline:none}.eael-lr-form-wrapper .eael-forever-forget{display:-webkit-box;display:-ms-flexbox;display:flex;font-size:.9em}.eael-lr-form-wrapper .eael-forever-forget .forget-menot{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.eael-lr-form-wrapper .eael-forever-forget .forget-menot label{margin:0 0 0 10px}.eael-lr-form-wrapper .eael-forever-forget .forget-menot,.eael-lr-form-wrapper .eael-forever-forget .forget-pass{-webkit-box-flex:1;-ms-flex:1;flex:1;margin:0}.eael-lr-form-wrapper .eael-forever-forget .forget-pass{text-align:right}.eael-lr-form-wrapper .eael-lr-password-wrapper{position:relative}.eael-lr-form-wrapper .eael-lr-password-wrapper button{position:absolute;top:0;right:0;height:100%;background:transparent;border:none;color:red}.eael-lr-form-wrapper .eael-lr-btn{background-color:#744ffb;color:#fff;position:relative;overflow:hidden;display:inline-block;vertical-align:top;text-decoration:none;border:none;-webkit-transition:all .2s;-o-transition:all .2s;transition:all .2s;padding:15px;width:130px}.eael-lr-form-wrapper .eael-lr-btn.eael-lr-btn-block{display:block}.eael-lr-form-wrapper .eael-lr-btn.eael-lr-btn-inline{display:inline-block}.eael-lr-form-wrapper .eael-lr-link{display:inline-block}.eael-lr-form-wrapper .eael-sign-wrapper{text-align:center;padding:20px 0 0}.eael-lr-form-wrapper .lr-form-header.header-inline{display:-webkit-box;display:-ms-flexbox;display:flex}.eael-lr-form-wrapper .lr-form-header.header-inline .form-logo{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto}.eael-lr-form-wrapper .lr-form-header.header-inline .form-dsc{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;padding-left:15px}.eael-lr-form-wrapper .lr-form-header img{width:100px}.eael-lr-form-wrapper .lr-form-header h4{font-size:18px;font-weight:500;margin-top:0}.eael-lr-form-wrapper .lr-form-header p{font-size:14px}.eael-lr-form-wrapper .eael-form-msg{display:block;width:100%;margin-top:1rem;font-size:1rem;padding:10px 15px;border-top-right-radius:8px;border-bottom-right-radius:8px}.eael-lr-form-wrapper .eael-form-msg.invalid{color:#721c24;background-color:#f8d7da;border-left:3px solid red}.eael-lr-form-wrapper .eael-form-msg.valid{color:#155724;background-color:#d4edda;border-left:3px solid green}.eael-lr-form-wrapper ul,.eael-lr-form-wrapper ol,.eael-lr-form-wrapper .eael-form-msg ul,.eael-lr-form-wrapper .eael-form-msg ol{margin:0;padding-left:30px}.eael-lr-form-wrapper ul li:not(:last-child),.eael-lr-form-wrapper ol li:not(:last-child),.eael-lr-form-wrapper .eael-form-msg ul li:not(:last-child),.eael-lr-form-wrapper .eael-form-msg ol li:not(:last-child){padding-bottom:10px}.eael-lr-form-wrapper .eael_accept_tnc_wrap{display:-webkit-box;display:-ms-flexbox;display:flex;margin-bottom:1rem;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.eael-lr-form-wrapper .eael_accept_tnc_wrap .eael-lr-tnc-link{margin-left:5px;display:inline-block}.eael-lr-form-wrapper .eael-recaptcha-wrapper{margin-bottom:1rem}.eael-lr-form-wrapper .eael-lr-footer{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center}@supports(-webkit-appearance: none) or (-moz-appearance: none){.eael-lr-form-wrapper input[type=checkbox]{--active: #275EFE;--active-inner: #fff;--focus: 0;--border: #b7b7b7;--border-hover: var(--active);--background: #fff;--disabled: #F6F8FF;--disabled-inner: #E1E6F9;-webkit-appearance:none;-moz-appearance:none;height:18px;outline:none;display:inline-block;vertical-align:top;position:relative;top:2px;margin:0;cursor:pointer;border:2px solid var(--bc, var(--border));background:var(--b, var(--background));-webkit-transition:background .3s,border-color .3s,-webkit-box-shadow .2s;transition:background .3s,border-color .3s,-webkit-box-shadow .2s;-o-transition:background .3s,border-color .3s,box-shadow .2s;transition:background .3s,border-color .3s,box-shadow .2s;transition:background .3s,border-color .3s,box-shadow .2s,-webkit-box-shadow .2s}.eael-lr-form-wrapper input[type=checkbox]:after{content:"";display:block;left:0;top:0;position:absolute;-webkit-transition:opacity var(--d-o, 0.2s),-webkit-transform var(--d-t, 0.3s) var(--d-t-e, ease);transition:opacity var(--d-o, 0.2s),-webkit-transform var(--d-t, 0.3s) var(--d-t-e, ease);-o-transition:transform var(--d-t, 0.3s) var(--d-t-e, ease),opacity var(--d-o, 0.2s);transition:transform var(--d-t, 0.3s) var(--d-t-e, ease),opacity var(--d-o, 0.2s);transition:transform var(--d-t, 0.3s) var(--d-t-e, ease),opacity var(--d-o, 0.2s),-webkit-transform var(--d-t, 0.3s) var(--d-t-e, ease)}.eael-lr-form-wrapper input[type=checkbox]:before{content:none}.eael-lr-form-wrapper input[type=checkbox]:checked{--b: var(--active);--bc: var(--active);--d-o: .3s;--d-t: .6s;--d-t-e: cubic-bezier(.2, .85, .32, 1.2)}.eael-lr-form-wrapper input[type=checkbox]:checked:before{content:none}.eael-lr-form-wrapper input[type=checkbox]:disabled{--b: var(--disabled);cursor:not-allowed;opacity:.9}.eael-lr-form-wrapper input[type=checkbox]:disabled:checked{--b: var(--disabled-inner);--bc: var(--border)}.eael-lr-form-wrapper input[type=checkbox]:disabled+label{cursor:not-allowed}.eael-lr-form-wrapper input[type=checkbox]:hover:not(:checked):not(:disabled){--bc: var(--border-hover)}.eael-lr-form-wrapper input[type=checkbox]:focus{-webkit-box-shadow:0 0 0 var(--focus);box-shadow:0 0 0 var(--focus)}.eael-lr-form-wrapper input[type=checkbox]:not(#eael_accept_tnc){width:18px}.eael-lr-form-wrapper input[type=checkbox]:not(#eael_accept_tnc):after{opacity:var(--o, 0)}.eael-lr-form-wrapper input[type=checkbox]:not(#eael_accept_tnc):checked{--o: 1}.eael-lr-form-wrapper input[type=checkbox]+label{font-size:14px;line-height:21px;display:inline-block;vertical-align:top;cursor:pointer;margin-left:4px}.eael-lr-form-wrapper input[type=checkbox]:not(#eael_accept_tnc){border-radius:3px}.eael-lr-form-wrapper input[type=checkbox]:not(#eael_accept_tnc):after{width:5px;height:9px;border:2px solid var(--active-inner);border-top:0;border-left:0;left:5px;top:1px;-webkit-transform:rotate(var(--r, 20deg));-ms-transform:rotate(var(--r, 20deg));transform:rotate(var(--r, 20deg))}.eael-lr-form-wrapper input[type=checkbox]:not(#eael_accept_tnc):checked{--r: 43deg}.eael-lr-form-wrapper input[type=checkbox]#eael_accept_tnc{width:31px;border-radius:11px;border-width:1px}.eael-lr-form-wrapper input[type=checkbox]#eael_accept_tnc:after{left:2px;top:2px;border-radius:50%;width:12px;height:12px;background:var(--ab, var(--border));-webkit-transform:translateX(var(--x, 0));-ms-transform:translateX(var(--x, 0));transform:translateX(var(--x, 0))}.eael-lr-form-wrapper input[type=checkbox]#eael_accept_tnc:checked{--ab: var(--active-inner);--x: 13px}.eael-lr-form-wrapper input[type=checkbox]#eael_accept_tnc:disabled:not(:checked):after{opacity:.6}}
|
assets/front-end/js/view/login-register.js
CHANGED
@@ -93,7 +93,7 @@
|
|
93 |
/*! no static exports found */
|
94 |
/***/ (function(module, exports) {
|
95 |
|
96 |
-
eval("ea.hooks.addAction(\"init\", \"ea\", function () {\n var EALoginRegister = function EALoginRegister($scope, $) {\n var $loginFormWrapper = $scope.find(\"#eael-login-form-wrapper\");\n var $regFormWrapper = $scope.find(\"#eael-register-form-wrapper\");\n var $regLinkAction = $scope.find('#eael-lr-reg-toggle');\n var $loginLinkAction = $scope.find('#eael-lr-login-toggle');\n var $passField = $loginFormWrapper.find('#eael-user-password');\n\n if ('form' === $regLinkAction.data('action')) {\n $regLinkAction.on('click', function (e) {\n e.preventDefault();\n $loginFormWrapper.hide();\n $regFormWrapper.fadeIn();\n });\n }\n\n if ('form' === $loginLinkAction.data('action')) {\n $loginLinkAction.on('click', function (e) {\n e.preventDefault();\n $regFormWrapper.hide();\n $loginFormWrapper.fadeIn();\n });\n } // Password Visibility Toggle\n\n\n var pass_shown = false;\n $(document).on('click', '#wp-hide-pw', function (e) {\n var $icon = $(this).find('span'); // cache\n\n if (pass_shown) {\n $passField.attr('type', 'password');\n $icon.removeClass('dashicons-hidden').addClass('dashicons-visibility');\n pass_shown = false;\n } else {\n $passField.attr('type', 'text');\n $icon.removeClass('dashicons-visibility').addClass('dashicons-hidden');\n pass_shown = true;\n }\n });\n };\n\n elementorFrontend.hooks.addAction(\"frontend/element_ready/eael-login-register.default\", EALoginRegister);\n});\n\n//# sourceURL=webpack:///./src/js/view/login-register.js?");
|
97 |
|
98 |
/***/ })
|
99 |
|
93 |
/*! no static exports found */
|
94 |
/***/ (function(module, exports) {
|
95 |
|
96 |
+
eval("ea.hooks.addAction(\"init\", \"ea\", function () {\n var EALoginRegister = function EALoginRegister($scope, $) {\n var $wrap = $scope.find('.eael-login-registration-wrapper'); // cache wrapper\n //const recaptchaEnabled = $wrap.data('is-recaptcha');\n\n var widgetId = $wrap.data('widget-id');\n var recaptchaSiteKey = $wrap.data('recaptcha-sitekey');\n var $loginFormWrapper = $scope.find(\"#eael-login-form-wrapper\");\n var $regFormWrapper = $scope.find(\"#eael-register-form-wrapper\");\n var $regLinkAction = $scope.find('#eael-lr-reg-toggle');\n var $loginLinkAction = $scope.find('#eael-lr-login-toggle');\n var $passField = $loginFormWrapper.find('#eael-user-password');\n\n if ('form' === $regLinkAction.data('action')) {\n $regLinkAction.on('click', function (e) {\n e.preventDefault();\n $loginFormWrapper.hide();\n $regFormWrapper.fadeIn();\n });\n }\n\n if ('form' === $loginLinkAction.data('action')) {\n $loginLinkAction.on('click', function (e) {\n e.preventDefault();\n $regFormWrapper.hide();\n $loginFormWrapper.fadeIn();\n });\n } // Password Visibility Toggle\n\n\n var pass_shown = false;\n $(document).on('click', '#wp-hide-pw', function (e) {\n var $icon = $(this).find('span'); // cache\n\n if (pass_shown) {\n $passField.attr('type', 'password');\n $icon.removeClass('dashicons-hidden').addClass('dashicons-visibility');\n pass_shown = false;\n } else {\n $passField.attr('type', 'text');\n $icon.removeClass('dashicons-visibility').addClass('dashicons-hidden');\n pass_shown = true;\n }\n }); // Recaptcha\n\n function onloadLRcb() {\n var loginRecaptchaNode = document.getElementById('login-recaptcha-node-' + widgetId);\n var registerRecaptchaNode = document.getElementById('register-recaptcha-node-' + widgetId);\n\n if (loginRecaptchaNode) {\n grecaptcha.render(loginRecaptchaNode, {\n 'sitekey': recaptchaSiteKey\n });\n }\n\n if (registerRecaptchaNode) {\n grecaptcha.render(registerRecaptchaNode, {\n 'sitekey': recaptchaSiteKey\n });\n }\n }\n\n if (grecaptcha && isEditMode) {\n // on elementor editor, window load event already fired, so run recaptcha\n onloadLRcb();\n } else {\n // on frontend, load even is yet to fire, so wait and fire recaptcha\n $(window).load(function () {\n if (grecaptcha) {\n onloadLRcb();\n }\n });\n }\n };\n\n elementorFrontend.hooks.addAction(\"frontend/element_ready/eael-login-register.default\", EALoginRegister);\n});\n\n//# sourceURL=webpack:///./src/js/view/login-register.js?");
|
97 |
|
98 |
/***/ })
|
99 |
|
assets/front-end/js/view/login-register.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e){var
|
1 |
+
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=13)}({13:function(e,t){ea.hooks.addAction("init","ea",(function(){elementorFrontend.hooks.addAction("frontend/element_ready/eael-login-register.default",(function(e,t){var n=e.find(".eael-login-registration-wrapper"),r=n.data("widget-id"),o=n.data("recaptcha-sitekey"),i=e.find("#eael-login-form-wrapper"),a=e.find("#eael-register-form-wrapper"),d=e.find("#eael-lr-reg-toggle"),c=e.find("#eael-lr-login-toggle"),l=i.find("#eael-user-password");"form"===d.data("action")&&d.on("click",(function(e){e.preventDefault(),i.hide(),a.fadeIn()})),"form"===c.data("action")&&c.on("click",(function(e){e.preventDefault(),a.hide(),i.fadeIn()}));var f=!1;function u(){var e=document.getElementById("login-recaptcha-node-"+r),t=document.getElementById("register-recaptcha-node-"+r);e&&grecaptcha.render(e,{sitekey:o}),t&&grecaptcha.render(t,{sitekey:o})}t(document).on("click","#wp-hide-pw",(function(e){var n=t(this).find("span");f?(l.attr("type","password"),n.removeClass("dashicons-hidden").addClass("dashicons-visibility"),f=!1):(l.attr("type","text"),n.removeClass("dashicons-visibility").addClass("dashicons-hidden"),f=!0)})),grecaptcha&&isEditMode?u():t(window).load((function(){grecaptcha&&u()}))}))}))}});
|
essential_adons_elementor.php
CHANGED
@@ -4,12 +4,12 @@
|
|
4 |
* Description: The Essential plugin you install after Elementor! 70+ Premium elements, including WooCommerce, Event Calender, Data Table, Post Grid, Instagram Feed.
|
5 |
* Plugin URI: https://essential-addons.com/elementor/
|
6 |
* Author: WPDeveloper
|
7 |
-
* Version: 4.2.
|
8 |
* Author URI: https://wpdeveloper.net/
|
9 |
* Text Domain: essential-addons-for-elementor-lite
|
10 |
* Domain Path: /languages
|
11 |
*
|
12 |
-
* WC tested up to: 4.
|
13 |
*/
|
14 |
|
15 |
if (!defined('ABSPATH')) {
|
@@ -26,7 +26,7 @@ define('EAEL_PLUGIN_FILE', __FILE__);
|
|
26 |
define('EAEL_PLUGIN_BASENAME', plugin_basename(__FILE__));
|
27 |
define('EAEL_PLUGIN_PATH', trailingslashit(plugin_dir_path(__FILE__)));
|
28 |
define('EAEL_PLUGIN_URL', trailingslashit(plugins_url('/', __FILE__)));
|
29 |
-
define('EAEL_PLUGIN_VERSION', '4.2.
|
30 |
define('EAEL_ASSET_PATH', wp_upload_dir()['basedir'] . '/essential-addons-elementor');
|
31 |
define('EAEL_ASSET_URL', wp_upload_dir()['baseurl'] . '/essential-addons-elementor');
|
32 |
define('EAEL_TEXTDOMAIN', 'essential-addons-for-elementor-lite');
|
4 |
* Description: The Essential plugin you install after Elementor! 70+ Premium elements, including WooCommerce, Event Calender, Data Table, Post Grid, Instagram Feed.
|
5 |
* Plugin URI: https://essential-addons.com/elementor/
|
6 |
* Author: WPDeveloper
|
7 |
+
* Version: 4.2.1
|
8 |
* Author URI: https://wpdeveloper.net/
|
9 |
* Text Domain: essential-addons-for-elementor-lite
|
10 |
* Domain Path: /languages
|
11 |
*
|
12 |
+
* WC tested up to: 4.4.1
|
13 |
*/
|
14 |
|
15 |
if (!defined('ABSPATH')) {
|
26 |
define('EAEL_PLUGIN_BASENAME', plugin_basename(__FILE__));
|
27 |
define('EAEL_PLUGIN_PATH', trailingslashit(plugin_dir_path(__FILE__)));
|
28 |
define('EAEL_PLUGIN_URL', trailingslashit(plugins_url('/', __FILE__)));
|
29 |
+
define('EAEL_PLUGIN_VERSION', '4.2.1');
|
30 |
define('EAEL_ASSET_PATH', wp_upload_dir()['basedir'] . '/essential-addons-elementor');
|
31 |
define('EAEL_ASSET_URL', wp_upload_dir()['baseurl'] . '/essential-addons-elementor');
|
32 |
define('EAEL_TEXTDOMAIN', 'essential-addons-for-elementor-lite');
|
includes/Classes/Bootstrap.php
CHANGED
@@ -113,6 +113,8 @@ class Bootstrap
|
|
113 |
|
114 |
// Enqueue
|
115 |
add_action('eael/before_enqueue_styles', array($this, 'before_enqueue_styles'));
|
|
|
|
|
116 |
add_action('wp_enqueue_scripts', array($this, 'enqueue_scripts'));
|
117 |
add_action('elementor/css-file/post/enqueue', [$this, 'enqueue_template_scripts']);
|
118 |
add_action('elementor/editor/before_enqueue_scripts', array($this, 'editor_enqueue_scripts'));
|
@@ -141,10 +143,10 @@ class Bootstrap
|
|
141 |
add_filter('eael/event-calendar/source', [$this, 'eael_event_calendar_source']);
|
142 |
add_action('eael/advanced-data-table/source/control', [$this, 'advanced_data_table_source_control']);
|
143 |
add_filter('eael/advanced-data-table/table_html/integration/ninja', [$this, 'advanced_data_table_ninja_integration'], 10, 1);
|
144 |
-
|
|
|
145 |
add_filter( 'wp_new_user_notification_email', array( $this, 'new_user_notification_email' ), 10, 3 );
|
146 |
add_filter( 'wp_new_user_notification_email_admin', array( $this, 'new_user_notification_email_admin' ), 10, 3 );
|
147 |
-
|
148 |
//rank math support
|
149 |
add_filter('rank_math/researches/toc_plugins', [$this, 'eael_toc_rank_math_support']);
|
150 |
|
113 |
|
114 |
// Enqueue
|
115 |
add_action('eael/before_enqueue_styles', array($this, 'before_enqueue_styles'));
|
116 |
+
add_action('elementor/editor/before_enqueue_scripts', array($this, 'lr_enqueue_scripts'));
|
117 |
+
add_action('wp_enqueue_scripts', array($this, 'lr_enqueue_scripts'));
|
118 |
add_action('wp_enqueue_scripts', array($this, 'enqueue_scripts'));
|
119 |
add_action('elementor/css-file/post/enqueue', [$this, 'enqueue_template_scripts']);
|
120 |
add_action('elementor/editor/before_enqueue_scripts', array($this, 'editor_enqueue_scripts'));
|
143 |
add_filter('eael/event-calendar/source', [$this, 'eael_event_calendar_source']);
|
144 |
add_action('eael/advanced-data-table/source/control', [$this, 'advanced_data_table_source_control']);
|
145 |
add_filter('eael/advanced-data-table/table_html/integration/ninja', [$this, 'advanced_data_table_ninja_integration'], 10, 1);
|
146 |
+
// Login | Register
|
147 |
+
add_action( 'init', [ $this, 'login_or_register_user'] );
|
148 |
add_filter( 'wp_new_user_notification_email', array( $this, 'new_user_notification_email' ), 10, 3 );
|
149 |
add_filter( 'wp_new_user_notification_email_admin', array( $this, 'new_user_notification_email_admin' ), 10, 3 );
|
|
|
150 |
//rank math support
|
151 |
add_filter('rank_math/researches/toc_plugins', [$this, 'eael_toc_rank_math_support']);
|
152 |
|
includes/Elements/Login_Register.php
CHANGED
@@ -83,6 +83,11 @@ class Login_Register extends Widget_Base {
|
|
83 |
* @var mixed|string
|
84 |
*/
|
85 |
protected $form_logo_pos;
|
|
|
|
|
|
|
|
|
|
|
86 |
|
87 |
/**
|
88 |
* Login_Register constructor.
|
@@ -92,9 +97,18 @@ class Login_Register extends Widget_Base {
|
|
92 |
public function __construct( $data = [], $args = null ) {
|
93 |
parent::__construct( $data, $args );
|
94 |
$this->user_can_register = get_option( 'users_can_register' );
|
|
|
95 |
$this->in_editor = Plugin::instance()->editor->is_edit_mode();
|
|
|
96 |
}
|
97 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
98 |
/**
|
99 |
* @inheritDoc
|
100 |
*/
|
@@ -142,8 +156,8 @@ class Login_Register extends Widget_Base {
|
|
142 |
];
|
143 |
}
|
144 |
|
145 |
-
|
146 |
-
{
|
147 |
return 'https://essential-addons.com/elementor/docs/login-register-form/';
|
148 |
}
|
149 |
|
@@ -181,6 +195,7 @@ class Login_Register extends Widget_Base {
|
|
181 |
// Login Form Related---
|
182 |
$this->init_content_login_fields_controls();
|
183 |
$this->init_content_login_options_controls();
|
|
|
184 |
// Registration For Related---
|
185 |
$this->init_content_register_fields_controls();
|
186 |
$this->init_content_register_options_controls();
|
@@ -361,6 +376,24 @@ class Login_Register extends Widget_Base {
|
|
361 |
'separator' => 'before',
|
362 |
] );
|
363 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
364 |
$this->end_popover();
|
365 |
|
366 |
|
@@ -421,7 +454,26 @@ class Login_Register extends Widget_Base {
|
|
421 |
'show_login_link' => 'yes',
|
422 |
],
|
423 |
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
424 |
$this->end_popover();
|
|
|
425 |
} else {
|
426 |
$this->add_control( 'show_login_link', [
|
427 |
'label' => __( 'Show Login Link', EAEL_TEXTDOMAIN ),
|
@@ -982,7 +1034,7 @@ class Login_Register extends Widget_Base {
|
|
982 |
$this->add_control( 'register_user_role', [
|
983 |
'label' => __( 'New User Role', EAEL_TEXTDOMAIN ),
|
984 |
'type' => Controls_Manager::SELECT,
|
985 |
-
'default' => '
|
986 |
'options' => $this->get_user_roles(),
|
987 |
'separator' => 'before',
|
988 |
] );
|
@@ -1219,6 +1271,7 @@ class Login_Register extends Widget_Base {
|
|
1219 |
$this->end_controls_section();
|
1220 |
}
|
1221 |
|
|
|
1222 |
/**
|
1223 |
* It prints controls for managing general style of both login and registration form
|
1224 |
*/
|
@@ -1280,7 +1333,7 @@ class Login_Register extends Widget_Base {
|
|
1280 |
],
|
1281 |
] );
|
1282 |
|
1283 |
-
$this->
|
1284 |
'label' => __( 'Margin', EAEL_TEXTDOMAIN ),
|
1285 |
'type' => Controls_Manager::DIMENSIONS,
|
1286 |
'size_units' => [
|
@@ -1295,7 +1348,7 @@ class Login_Register extends Widget_Base {
|
|
1295 |
'form_form_wrap_po_toggle' => 'yes',
|
1296 |
],
|
1297 |
] );
|
1298 |
-
$this->
|
1299 |
'label' => __( 'Padding', EAEL_TEXTDOMAIN ),
|
1300 |
'type' => Controls_Manager::DIMENSIONS,
|
1301 |
'size_units' => [
|
@@ -1350,7 +1403,7 @@ class Login_Register extends Widget_Base {
|
|
1350 |
],
|
1351 |
] );
|
1352 |
|
1353 |
-
//----Form-----
|
1354 |
$this->add_control( 'form_form_po_toggle', [
|
1355 |
'label' => __( 'Form', EAEL_TEXTDOMAIN ),
|
1356 |
'type' => Controls_Manager::POPOVER_TOGGLE,
|
@@ -1360,8 +1413,14 @@ class Login_Register extends Widget_Base {
|
|
1360 |
'separator' => 'before',
|
1361 |
] );
|
1362 |
$this->start_popover();
|
|
|
|
|
|
|
|
|
|
|
|
|
1363 |
$this->add_responsive_control( "eael_form_width", [
|
1364 |
-
'label' => esc_html__( 'width', EAEL_TEXTDOMAIN ),
|
1365 |
'type' => Controls_Manager::SLIDER,
|
1366 |
'size_units' => [
|
1367 |
'px',
|
@@ -1404,8 +1463,8 @@ class Login_Register extends Widget_Base {
|
|
1404 |
],
|
1405 |
] );
|
1406 |
|
1407 |
-
$this->
|
1408 |
-
'label' => __( '
|
1409 |
'type' => Controls_Manager::DIMENSIONS,
|
1410 |
'size_units' => [
|
1411 |
'px',
|
@@ -1419,8 +1478,8 @@ class Login_Register extends Widget_Base {
|
|
1419 |
'form_form_po_toggle' => 'yes',
|
1420 |
],
|
1421 |
] );
|
1422 |
-
$this->
|
1423 |
-
'label' => __( '
|
1424 |
'type' => Controls_Manager::DIMENSIONS,
|
1425 |
'size_units' => [
|
1426 |
'px',
|
@@ -1442,7 +1501,7 @@ class Login_Register extends Widget_Base {
|
|
1442 |
],
|
1443 |
] );
|
1444 |
$this->add_control( "eael_form_border_radius", [
|
1445 |
-
'label' => __( 'Border Radius', EAEL_TEXTDOMAIN ),
|
1446 |
'type' => Controls_Manager::DIMENSIONS,
|
1447 |
'size_units' => [
|
1448 |
'px',
|
@@ -1464,21 +1523,134 @@ class Login_Register extends Widget_Base {
|
|
1464 |
],
|
1465 |
'selector' => "{{WRAPPER}} .lr-form-wrapper",
|
1466 |
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1467 |
$this->end_popover();
|
|
|
1468 |
$this->add_group_control( Group_Control_Box_Shadow::get_type(), [
|
1469 |
-
'label' => __( 'Form Shadow', EAEL_TEXTDOMAIN ),
|
1470 |
'name' => 'eael_form_shadow',
|
1471 |
'selector' => "{{WRAPPER}} .lr-form-wrapper",
|
1472 |
'exclude' => [
|
1473 |
'box_shadow_position',
|
1474 |
],
|
1475 |
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1476 |
$this->end_controls_section();
|
1477 |
}
|
1478 |
|
1479 |
protected function init_style_header_content_controls( $form_type = 'login' ) {
|
1480 |
$this->start_controls_section( "section_style_{$form_type}_header_content", [
|
1481 |
-
'label' => sprintf( __( '%s Form Header', EAEL_TEXTDOMAIN ), ucfirst( $form_type ) ),
|
1482 |
'tab' => Controls_Manager::TAB_STYLE,
|
1483 |
'conditions' => $this->get_form_controls_display_condition( $form_type ),
|
1484 |
] );
|
@@ -1488,6 +1660,152 @@ class Login_Register extends Widget_Base {
|
|
1488 |
$logo_selector = "{{WRAPPER}} .eael-{$form_type}-form-wrapper .lr-form-header img";
|
1489 |
$title_selector = "{{WRAPPER}} .eael-{$form_type}-form-wrapper .lr-form-header .form-dsc h4";
|
1490 |
$subtitle_selector = "{{WRAPPER}} .eael-{$form_type}-form-wrapper .lr-form-header .form-dsc p";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1491 |
|
1492 |
$this->add_control( "{$form_type}_form_img_po_toggle", [
|
1493 |
'label' => __( 'Form Illustration', EAEL_TEXTDOMAIN ),
|
@@ -1495,6 +1813,7 @@ class Login_Register extends Widget_Base {
|
|
1495 |
'label_off' => __( 'Default', EAEL_TEXTDOMAIN ),
|
1496 |
'label_on' => __( 'Custom', EAEL_TEXTDOMAIN ),
|
1497 |
'return_value' => 'yes',
|
|
|
1498 |
] );
|
1499 |
$this->start_popover();
|
1500 |
$this->add_responsive_control( "{$form_type}_form_img_width", [
|
@@ -1647,7 +1966,77 @@ class Login_Register extends Widget_Base {
|
|
1647 |
'separator' => 'before',
|
1648 |
] );
|
1649 |
$this->start_popover();
|
1650 |
-
$this->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1651 |
'label' => __( 'Margin', EAEL_TEXTDOMAIN ),
|
1652 |
'type' => Controls_Manager::DIMENSIONS,
|
1653 |
'size_units' => [
|
@@ -1662,7 +2051,7 @@ class Login_Register extends Widget_Base {
|
|
1662 |
"{$form_type}_form_logo_po_toggle" => 'yes',
|
1663 |
],
|
1664 |
] );
|
1665 |
-
$this->
|
1666 |
'label' => __( 'Padding', EAEL_TEXTDOMAIN ),
|
1667 |
'type' => Controls_Manager::DIMENSIONS,
|
1668 |
'size_units' => [
|
@@ -1677,6 +2066,7 @@ class Login_Register extends Widget_Base {
|
|
1677 |
"{$form_type}_form_logo_po_toggle" => 'yes',
|
1678 |
],
|
1679 |
] );
|
|
|
1680 |
$this->add_group_control( Group_Control_Border::get_type(), [
|
1681 |
'name' => "{$form_type}_form_logo_border",
|
1682 |
'selector' => $logo_selector,
|
@@ -1708,15 +2098,6 @@ class Login_Register extends Widget_Base {
|
|
1708 |
],
|
1709 |
] );
|
1710 |
|
1711 |
-
$this->add_group_control( Group_Control_Background::get_type(), [
|
1712 |
-
'name' => "{$form_type}_form_header_bg",
|
1713 |
-
'label' => __( 'Background Color', EAEL_TEXTDOMAIN ),
|
1714 |
-
'types' => [
|
1715 |
-
'classic',
|
1716 |
-
'gradient',
|
1717 |
-
],
|
1718 |
-
'selector' => $header_selector,
|
1719 |
-
] );
|
1720 |
|
1721 |
|
1722 |
/*-- Title Typography --*/
|
@@ -1729,7 +2110,7 @@ class Login_Register extends Widget_Base {
|
|
1729 |
'separator' => 'before',
|
1730 |
] );
|
1731 |
$this->start_popover();
|
1732 |
-
$this->
|
1733 |
'label' => __( 'Margin', EAEL_TEXTDOMAIN ),
|
1734 |
'type' => Controls_Manager::DIMENSIONS,
|
1735 |
'size_units' => [
|
@@ -1744,7 +2125,7 @@ class Login_Register extends Widget_Base {
|
|
1744 |
"{$form_type}_form_title_po_toggle" => 'yes',
|
1745 |
],
|
1746 |
] );
|
1747 |
-
$this->
|
1748 |
'label' => __( 'Padding', EAEL_TEXTDOMAIN ),
|
1749 |
'type' => Controls_Manager::DIMENSIONS,
|
1750 |
'size_units' => [
|
@@ -1918,7 +2299,7 @@ class Login_Register extends Widget_Base {
|
|
1918 |
] );
|
1919 |
|
1920 |
$this->start_popover();
|
1921 |
-
$this->
|
1922 |
'label' => __( 'Margin', EAEL_TEXTDOMAIN ),
|
1923 |
'type' => Controls_Manager::DIMENSIONS,
|
1924 |
'size_units' => [
|
@@ -1927,14 +2308,14 @@ class Login_Register extends Widget_Base {
|
|
1927 |
'%',
|
1928 |
],
|
1929 |
'selectors' => [
|
1930 |
-
"{{WRAPPER}} .lr-form-wrapper .eael-lr-form-
|
1931 |
],
|
1932 |
'condition' => [
|
1933 |
'eael_form_field_po_toggle' => 'yes',
|
1934 |
],
|
1935 |
] );
|
1936 |
|
1937 |
-
$this->
|
1938 |
'label' => __( 'Padding', EAEL_TEXTDOMAIN ),
|
1939 |
'type' => Controls_Manager::DIMENSIONS,
|
1940 |
'size_units' => [
|
@@ -1954,6 +2335,28 @@ class Login_Register extends Widget_Base {
|
|
1954 |
'name' => "eael_fields_typography",
|
1955 |
'selector' => "{{WRAPPER}} .lr-form-wrapper .eael-lr-form-control",
|
1956 |
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1957 |
$this->add_control( 'eael_form_label_colors_heading', [
|
1958 |
'type' => Controls_Manager::HEADING,
|
1959 |
'label' => __( 'Colors & Border', EAEL_TEXTDOMAIN ),
|
@@ -2059,7 +2462,7 @@ class Login_Register extends Widget_Base {
|
|
2059 |
] );
|
2060 |
|
2061 |
$this->start_popover();
|
2062 |
-
$this->
|
2063 |
'label' => __( 'Margin', EAEL_TEXTDOMAIN ),
|
2064 |
'type' => Controls_Manager::DIMENSIONS,
|
2065 |
'size_units' => [
|
@@ -2074,7 +2477,7 @@ class Login_Register extends Widget_Base {
|
|
2074 |
'eael_form_label_po_toggle' => 'yes',
|
2075 |
],
|
2076 |
] );
|
2077 |
-
$this->
|
2078 |
'label' => __( 'Padding', EAEL_TEXTDOMAIN ),
|
2079 |
'type' => Controls_Manager::DIMENSIONS,
|
2080 |
'size_units' => [
|
@@ -2214,7 +2617,7 @@ class Login_Register extends Widget_Base {
|
|
2214 |
],
|
2215 |
] );
|
2216 |
|
2217 |
-
$this->
|
2218 |
'label' => esc_html__( 'Vertical Alignment', EAEL_TEXTDOMAIN ),
|
2219 |
'type' => Controls_Manager::SLIDER,
|
2220 |
'range' => [
|
@@ -2235,7 +2638,7 @@ class Login_Register extends Widget_Base {
|
|
2235 |
'rmark_po_toggle' => 'yes',
|
2236 |
],
|
2237 |
] );
|
2238 |
-
$this->
|
2239 |
'label' => esc_html__( 'Horizontal Alignment', EAEL_TEXTDOMAIN ),
|
2240 |
'type' => Controls_Manager::SLIDER,
|
2241 |
'range' => [
|
@@ -2267,7 +2670,7 @@ class Login_Register extends Widget_Base {
|
|
2267 |
] );
|
2268 |
$this->start_popover();
|
2269 |
|
2270 |
-
$this->
|
2271 |
'label' => esc_html__( 'Icon Size', EAEL_TEXTDOMAIN ),
|
2272 |
'type' => Controls_Manager::SLIDER,
|
2273 |
'size_units' => [
|
@@ -2310,7 +2713,7 @@ class Login_Register extends Widget_Base {
|
|
2310 |
],
|
2311 |
] );
|
2312 |
|
2313 |
-
$this->
|
2314 |
'label' => esc_html__( 'Vertical Alignment', EAEL_TEXTDOMAIN ),
|
2315 |
'type' => Controls_Manager::SLIDER,
|
2316 |
'range' => [
|
@@ -2331,7 +2734,7 @@ class Login_Register extends Widget_Base {
|
|
2331 |
'lpv_po_toggle' => 'yes',
|
2332 |
],
|
2333 |
] );
|
2334 |
-
$this->
|
2335 |
'label' => esc_html__( 'Horizontal Alignment', EAEL_TEXTDOMAIN ),
|
2336 |
'type' => Controls_Manager::SLIDER,
|
2337 |
'range' => [
|
@@ -2393,7 +2796,7 @@ class Login_Register extends Widget_Base {
|
|
2393 |
'return_value' => 'yes',
|
2394 |
] );
|
2395 |
$this->start_popover();
|
2396 |
-
$this->
|
2397 |
'label' => __( 'Margin', EAEL_TEXTDOMAIN ),
|
2398 |
'type' => Controls_Manager::DIMENSIONS,
|
2399 |
'size_units' => [
|
@@ -2408,7 +2811,7 @@ class Login_Register extends Widget_Base {
|
|
2408 |
"{$button_type}_btn_pot" => 'yes',
|
2409 |
],
|
2410 |
] );
|
2411 |
-
$this->
|
2412 |
'label' => __( 'Padding', EAEL_TEXTDOMAIN ),
|
2413 |
'type' => Controls_Manager::DIMENSIONS,
|
2414 |
'size_units' => [
|
@@ -2428,7 +2831,7 @@ class Login_Register extends Widget_Base {
|
|
2428 |
'name' => "{$button_type}_btn_typography",
|
2429 |
'selector' => "{{WRAPPER}} .eael-{$button_type}-form .eael-lr-btn",
|
2430 |
] );
|
2431 |
-
$this->
|
2432 |
'label' => __( 'Display as', EAEL_TEXTDOMAIN ),
|
2433 |
'type' => Controls_Manager::SELECT,
|
2434 |
'options' => [
|
@@ -2462,7 +2865,7 @@ class Login_Register extends Widget_Base {
|
|
2462 |
"{{WRAPPER}} .eael-{$button_type}-form .eael-lr-footer" => 'justify-content: {{VALUE}};',
|
2463 |
],
|
2464 |
] );
|
2465 |
-
$this->
|
2466 |
'label' => __( 'Alignment', EAEL_TEXTDOMAIN ),
|
2467 |
'type' => Controls_Manager::CHOOSE,
|
2468 |
'options' => [
|
@@ -2642,7 +3045,7 @@ class Login_Register extends Widget_Base {
|
|
2642 |
'return_value' => 'yes',
|
2643 |
] );
|
2644 |
$this->start_popover();
|
2645 |
-
$this->
|
2646 |
'label' => __( 'Margin', EAEL_TEXTDOMAIN ),
|
2647 |
'type' => Controls_Manager::DIMENSIONS,
|
2648 |
'size_units' => [
|
@@ -2657,7 +3060,7 @@ class Login_Register extends Widget_Base {
|
|
2657 |
"{$form_type}_link_pot" => 'yes',
|
2658 |
],
|
2659 |
] );
|
2660 |
-
$this->
|
2661 |
'label' => __( 'Padding', EAEL_TEXTDOMAIN ),
|
2662 |
'type' => Controls_Manager::DIMENSIONS,
|
2663 |
'size_units' => [
|
@@ -2678,7 +3081,7 @@ class Login_Register extends Widget_Base {
|
|
2678 |
'selector' => "{{WRAPPER}} .eael-{$form_type}-form .eael-lr-link",
|
2679 |
] );
|
2680 |
|
2681 |
-
$this->
|
2682 |
'label' => __( 'Display as', EAEL_TEXTDOMAIN ),
|
2683 |
'type' => Controls_Manager::SELECT,
|
2684 |
'options' => [
|
@@ -2732,7 +3135,7 @@ class Login_Register extends Widget_Base {
|
|
2732 |
],
|
2733 |
] );
|
2734 |
|
2735 |
-
$this->
|
2736 |
'label' => __( 'Alignment', EAEL_TEXTDOMAIN ),
|
2737 |
'type' => Controls_Manager::CHOOSE,
|
2738 |
'options' => [
|
@@ -2916,7 +3319,7 @@ class Login_Register extends Widget_Base {
|
|
2916 |
*
|
2917 |
* @return array
|
2918 |
*/
|
2919 |
-
|
2920 |
$form_type = in_array( $type, [
|
2921 |
'login',
|
2922 |
'register',
|
@@ -2963,13 +3366,15 @@ class Login_Register extends Widget_Base {
|
|
2963 |
$this->form_logo = Group_Control_Image_Size::get_attachment_image_src( $form_logo_id, 'lr_form_logo', $this->ds );
|
2964 |
$this->form_logo_pos = ! empty( $this->ds['lr_form_logo_position'] ) ? $this->ds['lr_form_logo_position'] : 'inline';
|
2965 |
?>
|
2966 |
-
<div class="eael-login-registration-wrapper" data-is-ajax="<?php echo esc_attr($this->get_settings_for_display('enable_ajax')); ?>" >
|
2967 |
<?php
|
2968 |
$this->print_login_form();
|
2969 |
$this->print_register_form();
|
2970 |
?>
|
2971 |
</div>
|
|
|
2972 |
<?php
|
|
|
2973 |
}
|
2974 |
|
2975 |
protected function print_login_form() {
|
@@ -3092,8 +3497,17 @@ class Login_Register extends Widget_Base {
|
|
3092 |
} ?>
|
3093 |
|
3094 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3095 |
<div class="eael-lr-footer">
|
3096 |
-
<input type="submit" name="eael-login-submit" id="eael-login-submit" class="eael-lr-btn eael-lr-btn-block <?php echo esc_attr( $btn_align ); ?>" value="<?php echo esc_attr( $btn_text ); ?>"/>
|
3097 |
<?php if ( $show_reg_link ) { ?>
|
3098 |
<div class="eael-sign-wrapper <?php echo esc_attr( $link_align ); ?>">
|
3099 |
<?php echo $reg_link; // XSS ok. already escaped ?>
|
@@ -3101,8 +3515,10 @@ class Login_Register extends Widget_Base {
|
|
3101 |
<?php } ?>
|
3102 |
|
3103 |
</div>
|
|
|
|
|
3104 |
<div class="eael-form-validation-container">
|
3105 |
-
|
3106 |
</div>
|
3107 |
<?php
|
3108 |
$this->print_necessary_hidden_fields( 'login' );
|
@@ -3121,6 +3537,7 @@ class Login_Register extends Widget_Base {
|
|
3121 |
}
|
3122 |
?>
|
3123 |
</div>
|
|
|
3124 |
</section>
|
3125 |
<?php
|
3126 |
}
|
@@ -3191,7 +3608,7 @@ class Login_Register extends Widget_Base {
|
|
3191 |
do_action( 'eael/login-register/before-register-form', $this );
|
3192 |
?>
|
3193 |
<form class="eael-register-form eael-lr-form" id="eael-register-form" method="post">
|
3194 |
-
|
3195 |
<?php // Print all dynamic fields
|
3196 |
foreach ( $this->ds['register_fields'] as $f_index => $field ) :
|
3197 |
$field_type = $field['field_type'];
|
@@ -3297,7 +3714,9 @@ class Login_Register extends Widget_Base {
|
|
3297 |
endforeach;
|
3298 |
$this->print_necessary_hidden_fields( 'register' );
|
3299 |
$this->print_terms_condition_notice();
|
|
|
3300 |
?>
|
|
|
3301 |
<div class="eael-lr-footer">
|
3302 |
<input type="submit" name="eael-register-submit" id="eael-register-submit" class="eael-lr-btn eael-lr-btn-block<?php echo esc_attr( $btn_align ); ?>" value="<?php echo esc_attr( $btn_text ); ?>"/>
|
3303 |
<?php if ( $show_lgn_link ) { ?>
|
@@ -3308,14 +3727,14 @@ class Login_Register extends Widget_Base {
|
|
3308 |
</div>
|
3309 |
|
3310 |
<div class="eael-form-validation-container">
|
3311 |
-
|
3312 |
</div>
|
3313 |
<?php
|
3314 |
|
3315 |
-
do_action( 'eael/login-register/before-register-form-close', $this);
|
3316 |
-
|
3317 |
</form>
|
3318 |
-
|
3319 |
</div>
|
3320 |
<?php if ( 'right' === $this->form_illustration_pos ) {
|
3321 |
$this->print_form_illustration();
|
@@ -3323,7 +3742,7 @@ class Login_Register extends Widget_Base {
|
|
3323 |
</div>
|
3324 |
</section>
|
3325 |
<?php
|
3326 |
-
$form_markup = apply_filters('eael/login-register/register-form-markup', ob_get_clean());
|
3327 |
// if we are in the editor then show error related to different input field.
|
3328 |
if ( $this->in_editor ) {
|
3329 |
$repeated = $this->print_error_for_repeated_fields( $repeated_f_labels );
|
@@ -3451,6 +3870,37 @@ class Login_Register extends Widget_Base {
|
|
3451 |
}
|
3452 |
}
|
3453 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3454 |
protected function print_error_for_repeated_fields( $repeated_fields ) {
|
3455 |
if ( ! empty( $repeated_fields ) ) {
|
3456 |
$error_fields = '<strong>' . implode( "</strong>, <strong>", $repeated_fields ) . '</strong>';
|
@@ -3514,11 +3964,11 @@ class Login_Register extends Widget_Base {
|
|
3514 |
if ( empty( $errors ) && empty( $success ) ) {
|
3515 |
return;
|
3516 |
}
|
3517 |
-
|
3518 |
-
|
3519 |
-
|
3520 |
-
|
3521 |
-
|
3522 |
}
|
3523 |
|
3524 |
protected function print_registration_errors_message( $errors ) {
|
@@ -3566,4 +4016,4 @@ class Login_Register extends Widget_Base {
|
|
3566 |
return "{$css_property}: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};";
|
3567 |
}
|
3568 |
|
3569 |
-
}
|
83 |
* @var mixed|string
|
84 |
*/
|
85 |
protected $form_logo_pos;
|
86 |
+
/**
|
87 |
+
* Google Recaptcha Site key
|
88 |
+
* @var string|false
|
89 |
+
*/
|
90 |
+
protected $recaptcha_sitekey;
|
91 |
|
92 |
/**
|
93 |
* Login_Register constructor.
|
97 |
public function __construct( $data = [], $args = null ) {
|
98 |
parent::__construct( $data, $args );
|
99 |
$this->user_can_register = get_option( 'users_can_register' );
|
100 |
+
$this->recaptcha_sitekey = get_option( 'eael_recaptcha_sitekey' );
|
101 |
$this->in_editor = Plugin::instance()->editor->is_edit_mode();
|
102 |
+
|
103 |
}
|
104 |
|
105 |
+
public function get_script_depends() {
|
106 |
+
$scripts = parent::get_script_depends();
|
107 |
+
$scripts[] = 'eael-recaptcha'; //@TODO; debug later why this does not let recaptcha work on editor.
|
108 |
+
return $scripts;
|
109 |
+
}
|
110 |
+
|
111 |
+
|
112 |
/**
|
113 |
* @inheritDoc
|
114 |
*/
|
156 |
];
|
157 |
}
|
158 |
|
159 |
+
|
160 |
+
public function get_custom_help_url() {
|
161 |
return 'https://essential-addons.com/elementor/docs/login-register-form/';
|
162 |
}
|
163 |
|
195 |
// Login Form Related---
|
196 |
$this->init_content_login_fields_controls();
|
197 |
$this->init_content_login_options_controls();
|
198 |
+
do_action( 'eael/login-register/after-login-controls-section', $this);
|
199 |
// Registration For Related---
|
200 |
$this->init_content_register_fields_controls();
|
201 |
$this->init_content_register_options_controls();
|
376 |
'separator' => 'before',
|
377 |
] );
|
378 |
}
|
379 |
+
$this->add_control( 'enable_login_recaptcha', [
|
380 |
+
'label' => __( 'Enable Google reCAPTCHA', EAEL_TEXTDOMAIN ),
|
381 |
+
'description' => __( 'reCAPTCHA will prevent spam login from bots.', EAEL_TEXTDOMAIN ),
|
382 |
+
'type' => Controls_Manager::SWITCHER,
|
383 |
+
'label_on' => __( 'Yes', EAEL_TEXTDOMAIN ),
|
384 |
+
'label_off' => __( 'No', EAEL_TEXTDOMAIN ),
|
385 |
+
'return_value' => 'yes',
|
386 |
+
] );
|
387 |
+
if ( empty( $this->recaptcha_sitekey ) ) {
|
388 |
+
$this->add_control( 'eael_login_recaptcha_keys_missing', [
|
389 |
+
'type' => Controls_Manager::RAW_HTML,
|
390 |
+
'raw' => sprintf( __( 'reCAPTCHA API keys are missing. Please add them from %sDashboard >> Essential Addons >> Elements >> Login | Register Form %sSettings', EAEL_TEXTDOMAIN ), '<strong>', '</strong>' ),
|
391 |
+
'content_classes' => 'eael-warning',
|
392 |
+
'condition' => [
|
393 |
+
'enable_login_recaptcha' => 'yes',
|
394 |
+
],
|
395 |
+
] );
|
396 |
+
}
|
397 |
$this->end_popover();
|
398 |
|
399 |
|
454 |
'show_login_link' => 'yes',
|
455 |
],
|
456 |
] );
|
457 |
+
$this->add_control( 'enable_register_recaptcha', [
|
458 |
+
'label' => __( 'Enable Google reCAPTCHA', EAEL_TEXTDOMAIN ),
|
459 |
+
'description' => __( 'reCAPTCHA will prevent spam registration from bots.', EAEL_TEXTDOMAIN ),
|
460 |
+
'type' => Controls_Manager::SWITCHER,
|
461 |
+
'label_on' => __( 'Yes', EAEL_TEXTDOMAIN ),
|
462 |
+
'label_off' => __( 'No', EAEL_TEXTDOMAIN ),
|
463 |
+
'return_value' => 'yes',
|
464 |
+
] );
|
465 |
+
if ( empty( $this->recaptcha_sitekey ) ) {
|
466 |
+
$this->add_control( 'eael_recaptcha_keys_missing', [
|
467 |
+
'type' => Controls_Manager::RAW_HTML,
|
468 |
+
'raw' => sprintf( __( 'Recaptcha API keys are missing. Please add them from %sDashboard >> Essential Addons >> Elements >> Login | Register Form %sSettings', EAEL_TEXTDOMAIN ), '<strong>', '</strong>' ),
|
469 |
+
'content_classes' => 'eael-warning',
|
470 |
+
'condition' => [
|
471 |
+
'enable_register_recaptcha' => 'yes',
|
472 |
+
],
|
473 |
+
] );
|
474 |
+
}
|
475 |
$this->end_popover();
|
476 |
+
|
477 |
} else {
|
478 |
$this->add_control( 'show_login_link', [
|
479 |
'label' => __( 'Show Login Link', EAEL_TEXTDOMAIN ),
|
1034 |
$this->add_control( 'register_user_role', [
|
1035 |
'label' => __( 'New User Role', EAEL_TEXTDOMAIN ),
|
1036 |
'type' => Controls_Manager::SELECT,
|
1037 |
+
'default' => '',
|
1038 |
'options' => $this->get_user_roles(),
|
1039 |
'separator' => 'before',
|
1040 |
] );
|
1271 |
$this->end_controls_section();
|
1272 |
}
|
1273 |
|
1274 |
+
|
1275 |
/**
|
1276 |
* It prints controls for managing general style of both login and registration form
|
1277 |
*/
|
1333 |
],
|
1334 |
] );
|
1335 |
|
1336 |
+
$this->add_responsive_control( "eael_form_wrap_margin", [
|
1337 |
'label' => __( 'Margin', EAEL_TEXTDOMAIN ),
|
1338 |
'type' => Controls_Manager::DIMENSIONS,
|
1339 |
'size_units' => [
|
1348 |
'form_form_wrap_po_toggle' => 'yes',
|
1349 |
],
|
1350 |
] );
|
1351 |
+
$this->add_responsive_control( "eael_form_wrap_padding", [
|
1352 |
'label' => __( 'Padding', EAEL_TEXTDOMAIN ),
|
1353 |
'type' => Controls_Manager::DIMENSIONS,
|
1354 |
'size_units' => [
|
1403 |
],
|
1404 |
] );
|
1405 |
|
1406 |
+
//----Form Wrapper-----
|
1407 |
$this->add_control( 'form_form_po_toggle', [
|
1408 |
'label' => __( 'Form', EAEL_TEXTDOMAIN ),
|
1409 |
'type' => Controls_Manager::POPOVER_TOGGLE,
|
1413 |
'separator' => 'before',
|
1414 |
] );
|
1415 |
$this->start_popover();
|
1416 |
+
$this->add_control( 'eael_form_wrapper_heading', [
|
1417 |
+
'type' => Controls_Manager::HEADING,
|
1418 |
+
'label' => __( '---Form Wrapper---', EAEL_TEXTDOMAIN ),
|
1419 |
+
'separator' => 'before',
|
1420 |
+
] );
|
1421 |
+
|
1422 |
$this->add_responsive_control( "eael_form_width", [
|
1423 |
+
'label' => esc_html__( 'Wrapper width', EAEL_TEXTDOMAIN ),
|
1424 |
'type' => Controls_Manager::SLIDER,
|
1425 |
'size_units' => [
|
1426 |
'px',
|
1463 |
],
|
1464 |
] );
|
1465 |
|
1466 |
+
$this->add_responsive_control( "eael_form_margin", [
|
1467 |
+
'label' => __( 'Wrapper Margin', EAEL_TEXTDOMAIN ),
|
1468 |
'type' => Controls_Manager::DIMENSIONS,
|
1469 |
'size_units' => [
|
1470 |
'px',
|
1478 |
'form_form_po_toggle' => 'yes',
|
1479 |
],
|
1480 |
] );
|
1481 |
+
$this->add_responsive_control( "eael_form_padding", [
|
1482 |
+
'label' => __( 'Wrapper Padding', EAEL_TEXTDOMAIN ),
|
1483 |
'type' => Controls_Manager::DIMENSIONS,
|
1484 |
'size_units' => [
|
1485 |
'px',
|
1501 |
],
|
1502 |
] );
|
1503 |
$this->add_control( "eael_form_border_radius", [
|
1504 |
+
'label' => __( 'Wrapper Border Radius', EAEL_TEXTDOMAIN ),
|
1505 |
'type' => Controls_Manager::DIMENSIONS,
|
1506 |
'size_units' => [
|
1507 |
'px',
|
1523 |
],
|
1524 |
'selector' => "{{WRAPPER}} .lr-form-wrapper",
|
1525 |
] );
|
1526 |
+
|
1527 |
+
$this->add_control( 'eael_form_input_container', [
|
1528 |
+
'type' => Controls_Manager::HEADING,
|
1529 |
+
'label' => __( '---Form Style---', EAEL_TEXTDOMAIN ),
|
1530 |
+
'separator' => 'before',
|
1531 |
+
] );
|
1532 |
+
$this->add_responsive_control( "eael_form_ic_width", [
|
1533 |
+
'label' => esc_html__( 'Form width', EAEL_TEXTDOMAIN ),
|
1534 |
+
'type' => Controls_Manager::SLIDER,
|
1535 |
+
'size_units' => [
|
1536 |
+
'px',
|
1537 |
+
'rem',
|
1538 |
+
'%',
|
1539 |
+
],
|
1540 |
+
'range' => [
|
1541 |
+
'px' => [
|
1542 |
+
'min' => 0,
|
1543 |
+
'max' => 1000,
|
1544 |
+
'step' => 5,
|
1545 |
+
],
|
1546 |
+
'rem' => [
|
1547 |
+
'min' => 0,
|
1548 |
+
'max' => 10,
|
1549 |
+
'step' => .5,
|
1550 |
+
],
|
1551 |
+
'%' => [
|
1552 |
+
'min' => 0,
|
1553 |
+
'max' => 100,
|
1554 |
+
],
|
1555 |
+
],
|
1556 |
+
'default' => [
|
1557 |
+
'unit' => '%',
|
1558 |
+
'size' => 100,
|
1559 |
+
],
|
1560 |
+
'selectors' => [
|
1561 |
+
"{{WRAPPER}} .lr-form-wrapper form" => 'width: {{SIZE}}{{UNIT}};',
|
1562 |
+
],
|
1563 |
+
'condition' => [
|
1564 |
+
'form_form_po_toggle' => 'yes',
|
1565 |
+
],
|
1566 |
+
] );
|
1567 |
+
|
1568 |
+
$this->add_responsive_control( "eael_form_ic_margin", [
|
1569 |
+
'label' => __( 'Form Margin', EAEL_TEXTDOMAIN ),
|
1570 |
+
'type' => Controls_Manager::DIMENSIONS,
|
1571 |
+
'size_units' => [
|
1572 |
+
'px',
|
1573 |
+
'em',
|
1574 |
+
'%',
|
1575 |
+
],
|
1576 |
+
'selectors' => [
|
1577 |
+
"{{WRAPPER}} .lr-form-wrapper form" => $this->apply_dim( 'margin' ),
|
1578 |
+
],
|
1579 |
+
'condition' => [
|
1580 |
+
'form_form_po_toggle' => 'yes',
|
1581 |
+
],
|
1582 |
+
] );
|
1583 |
+
$this->add_responsive_control( "eael_form_ic_padding", [
|
1584 |
+
'label' => __( 'Form Padding', EAEL_TEXTDOMAIN ),
|
1585 |
+
'type' => Controls_Manager::DIMENSIONS,
|
1586 |
+
'size_units' => [
|
1587 |
+
'px',
|
1588 |
+
'em',
|
1589 |
+
'%',
|
1590 |
+
],
|
1591 |
+
'selectors' => [
|
1592 |
+
"{{WRAPPER}} .lr-form-wrapper form" => $this->apply_dim( 'padding' ),
|
1593 |
+
],
|
1594 |
+
'condition' => [
|
1595 |
+
'form_form_po_toggle' => 'yes',
|
1596 |
+
],
|
1597 |
+
] );
|
1598 |
+
$this->add_group_control( Group_Control_Border::get_type(), [
|
1599 |
+
'name' => "eael_form_ic_border",
|
1600 |
+
'selector' => "{{WRAPPER}} .lr-form-wrapper form",
|
1601 |
+
'condition' => [
|
1602 |
+
'form_form_po_toggle' => 'yes',
|
1603 |
+
],
|
1604 |
+
] );
|
1605 |
+
$this->add_control( "eael_form_ic_border_radius", [
|
1606 |
+
'label' => __( 'Border Radius', EAEL_TEXTDOMAIN ),
|
1607 |
+
'type' => Controls_Manager::DIMENSIONS,
|
1608 |
+
'size_units' => [
|
1609 |
+
'px',
|
1610 |
+
'%',
|
1611 |
+
],
|
1612 |
+
'selectors' => [
|
1613 |
+
"{{WRAPPER}} .lr-form-wrapper form" => $this->apply_dim( 'border-radius' ),
|
1614 |
+
],
|
1615 |
+
'condition' => [
|
1616 |
+
'form_form_po_toggle' => 'yes',
|
1617 |
+
],
|
1618 |
+
] );
|
1619 |
+
$this->add_group_control( Group_Control_Background::get_type(), [
|
1620 |
+
'name' => "eael_form_ic_bg_color",
|
1621 |
+
'label' => __( 'Background Color', EAEL_TEXTDOMAIN ),
|
1622 |
+
'types' => [
|
1623 |
+
'classic',
|
1624 |
+
'gradient',
|
1625 |
+
],
|
1626 |
+
'selector' => "{{WRAPPER}} .lr-form-wrapper form",
|
1627 |
+
] );
|
1628 |
$this->end_popover();
|
1629 |
+
|
1630 |
$this->add_group_control( Group_Control_Box_Shadow::get_type(), [
|
1631 |
+
'label' => __( 'Form Wrapper Shadow', EAEL_TEXTDOMAIN ),
|
1632 |
'name' => 'eael_form_shadow',
|
1633 |
'selector' => "{{WRAPPER}} .lr-form-wrapper",
|
1634 |
'exclude' => [
|
1635 |
'box_shadow_position',
|
1636 |
],
|
1637 |
] );
|
1638 |
+
|
1639 |
+
$this->add_group_control( Group_Control_Box_Shadow::get_type(), [
|
1640 |
+
'label' => __( 'Form Shadow', EAEL_TEXTDOMAIN ),
|
1641 |
+
'name' => 'eael_form_ic_shadow',
|
1642 |
+
'selector' => "{{WRAPPER}} .lr-form-wrapper form",
|
1643 |
+
'exclude' => [
|
1644 |
+
'box_shadow_position',
|
1645 |
+
],
|
1646 |
+
] );
|
1647 |
+
//@TODO; add only input wrapper shadow
|
1648 |
$this->end_controls_section();
|
1649 |
}
|
1650 |
|
1651 |
protected function init_style_header_content_controls( $form_type = 'login' ) {
|
1652 |
$this->start_controls_section( "section_style_{$form_type}_header_content", [
|
1653 |
+
'label' => sprintf( __( '%s Form Header', EAEL_TEXTDOMAIN ), ucfirst( $form_type ) ), // Login Form Header | Register Form Header
|
1654 |
'tab' => Controls_Manager::TAB_STYLE,
|
1655 |
'conditions' => $this->get_form_controls_display_condition( $form_type ),
|
1656 |
] );
|
1660 |
$logo_selector = "{{WRAPPER}} .eael-{$form_type}-form-wrapper .lr-form-header img";
|
1661 |
$title_selector = "{{WRAPPER}} .eael-{$form_type}-form-wrapper .lr-form-header .form-dsc h4";
|
1662 |
$subtitle_selector = "{{WRAPPER}} .eael-{$form_type}-form-wrapper .lr-form-header .form-dsc p";
|
1663 |
+
$this->add_control( "{$form_type}_fhc_po_toggle", [
|
1664 |
+
'label' => __( 'Header Content', EAEL_TEXTDOMAIN ),
|
1665 |
+
'type' => Controls_Manager::POPOVER_TOGGLE,
|
1666 |
+
'label_off' => __( 'Default', EAEL_TEXTDOMAIN ),
|
1667 |
+
'label_on' => __( 'Custom', EAEL_TEXTDOMAIN ),
|
1668 |
+
'return_value' => 'yes',
|
1669 |
+
] );
|
1670 |
+
|
1671 |
+
$this->start_popover();
|
1672 |
+
|
1673 |
+
$this->add_responsive_control( "{$form_type}_fhc_width", [
|
1674 |
+
'label' => esc_html__( 'Header width', EAEL_TEXTDOMAIN ),
|
1675 |
+
'type' => Controls_Manager::SLIDER,
|
1676 |
+
'size_units' => [
|
1677 |
+
'px',
|
1678 |
+
'rem',
|
1679 |
+
'%',
|
1680 |
+
],
|
1681 |
+
'range' => [
|
1682 |
+
'px' => [
|
1683 |
+
'min' => 0,
|
1684 |
+
'max' => 1000,
|
1685 |
+
'step' => 5,
|
1686 |
+
],
|
1687 |
+
'rem' => [
|
1688 |
+
'min' => 0,
|
1689 |
+
'max' => 10,
|
1690 |
+
'step' => .5,
|
1691 |
+
],
|
1692 |
+
'%' => [
|
1693 |
+
'min' => 0,
|
1694 |
+
'max' => 100,
|
1695 |
+
],
|
1696 |
+
],
|
1697 |
+
'default' => [
|
1698 |
+
'unit' => '%',
|
1699 |
+
'size' => 100,
|
1700 |
+
],
|
1701 |
+
'selectors' => [
|
1702 |
+
$header_selector => 'width: {{SIZE}}{{UNIT}};',
|
1703 |
+
],
|
1704 |
+
'condition' => [
|
1705 |
+
"{$form_type}_fhc_po_toggle" => 'yes',
|
1706 |
+
],
|
1707 |
+
] );
|
1708 |
+
$this->add_responsive_control( "{$form_type}_fhc_height", [
|
1709 |
+
'label' => esc_html__( 'Header height', EAEL_TEXTDOMAIN ),
|
1710 |
+
'type' => Controls_Manager::SLIDER,
|
1711 |
+
'size_units' => [
|
1712 |
+
'px',
|
1713 |
+
'rem',
|
1714 |
+
'%',
|
1715 |
+
],
|
1716 |
+
'range' => [
|
1717 |
+
'px' => [
|
1718 |
+
'min' => 0,
|
1719 |
+
'max' => 1000,
|
1720 |
+
'step' => 5,
|
1721 |
+
],
|
1722 |
+
'rem' => [
|
1723 |
+
'min' => 0,
|
1724 |
+
'max' => 10,
|
1725 |
+
'step' => .5,
|
1726 |
+
],
|
1727 |
+
'%' => [
|
1728 |
+
'min' => 0,
|
1729 |
+
'max' => 100,
|
1730 |
+
],
|
1731 |
+
],
|
1732 |
+
'selectors' => [
|
1733 |
+
$header_selector => 'height: {{SIZE}}{{UNIT}};',
|
1734 |
+
],
|
1735 |
+
'condition' => [
|
1736 |
+
"{$form_type}_fhc_po_toggle" => 'yes',
|
1737 |
+
],
|
1738 |
+
] );
|
1739 |
+
$this->add_responsive_control( "{$form_type}_fhc_margin", [
|
1740 |
+
'label' => __( 'Header Margin', EAEL_TEXTDOMAIN ),
|
1741 |
+
'type' => Controls_Manager::DIMENSIONS,
|
1742 |
+
'size_units' => [
|
1743 |
+
'px',
|
1744 |
+
'em',
|
1745 |
+
'%',
|
1746 |
+
],
|
1747 |
+
'selectors' => [
|
1748 |
+
$header_selector => $this->apply_dim( 'margin' ),
|
1749 |
+
],
|
1750 |
+
'condition' => [
|
1751 |
+
"{$form_type}_fhc_po_toggle" => 'yes',
|
1752 |
+
],
|
1753 |
+
] );
|
1754 |
+
$this->add_responsive_control( "{$form_type}_fhc_padding", [
|
1755 |
+
'label' => __( 'Header Padding', EAEL_TEXTDOMAIN ),
|
1756 |
+
'type' => Controls_Manager::DIMENSIONS,
|
1757 |
+
'size_units' => [
|
1758 |
+
'px',
|
1759 |
+
'em',
|
1760 |
+
'%',
|
1761 |
+
],
|
1762 |
+
'selectors' => [
|
1763 |
+
$header_selector => $this->apply_dim( 'padding' ),
|
1764 |
+
],
|
1765 |
+
'condition' => [
|
1766 |
+
"{$form_type}_fhc_po_toggle" => 'yes',
|
1767 |
+
],
|
1768 |
+
] );
|
1769 |
+
|
1770 |
+
|
1771 |
+
$this->add_group_control( Group_Control_Border::get_type(), [
|
1772 |
+
'name' => "{$form_type}_fhc_border",
|
1773 |
+
'selector' => $header_selector,
|
1774 |
+
'condition' => [
|
1775 |
+
"{$form_type}_fhc_po_toggle" => 'yes',
|
1776 |
+
],
|
1777 |
+
] );
|
1778 |
+
$this->add_control( "{$form_type}_fhc_border_radius", [
|
1779 |
+
'label' => __( 'Border Radius', EAEL_TEXTDOMAIN ),
|
1780 |
+
'type' => Controls_Manager::DIMENSIONS,
|
1781 |
+
'size_units' => [
|
1782 |
+
'px',
|
1783 |
+
'%',
|
1784 |
+
],
|
1785 |
+
'selectors' => [
|
1786 |
+
$header_selector => $this->apply_dim( 'border-radius' ),
|
1787 |
+
],
|
1788 |
+
'condition' => [
|
1789 |
+
"{$form_type}_fhc_po_toggle" => 'yes',
|
1790 |
+
],
|
1791 |
+
] );
|
1792 |
+
$this->add_group_control( Group_Control_Background::get_type(), [
|
1793 |
+
'name' => "{$form_type}_form_header_bg",
|
1794 |
+
'label' => __( 'Background Color', EAEL_TEXTDOMAIN ),
|
1795 |
+
'types' => [
|
1796 |
+
'classic',
|
1797 |
+
'gradient',
|
1798 |
+
],
|
1799 |
+
'selector' => $header_selector,
|
1800 |
+
'condition' => [
|
1801 |
+
"{$form_type}_fhc_po_toggle" => 'yes',
|
1802 |
+
],
|
1803 |
+
] );
|
1804 |
+
$this->end_popover();
|
1805 |
+
|
1806 |
+
|
1807 |
+
|
1808 |
+
|
1809 |
|
1810 |
$this->add_control( "{$form_type}_form_img_po_toggle", [
|
1811 |
'label' => __( 'Form Illustration', EAEL_TEXTDOMAIN ),
|
1813 |
'label_off' => __( 'Default', EAEL_TEXTDOMAIN ),
|
1814 |
'label_on' => __( 'Custom', EAEL_TEXTDOMAIN ),
|
1815 |
'return_value' => 'yes',
|
1816 |
+
'separator' => 'before',
|
1817 |
] );
|
1818 |
$this->start_popover();
|
1819 |
$this->add_responsive_control( "{$form_type}_form_img_width", [
|
1966 |
'separator' => 'before',
|
1967 |
] );
|
1968 |
$this->start_popover();
|
1969 |
+
$this->add_responsive_control( "{$form_type}_form_logo_width", [
|
1970 |
+
'label' => esc_html__( 'width', EAEL_TEXTDOMAIN ),
|
1971 |
+
'type' => Controls_Manager::SLIDER,
|
1972 |
+
'size_units' => [
|
1973 |
+
'px',
|
1974 |
+
'rem',
|
1975 |
+
'%',
|
1976 |
+
],
|
1977 |
+
'range' => [
|
1978 |
+
'px' => [
|
1979 |
+
'min' => 0,
|
1980 |
+
'max' => 1000,
|
1981 |
+
'step' => 5,
|
1982 |
+
],
|
1983 |
+
'rem' => [
|
1984 |
+
'min' => 0,
|
1985 |
+
'max' => 10,
|
1986 |
+
'step' => .5,
|
1987 |
+
],
|
1988 |
+
'%' => [
|
1989 |
+
'min' => 0,
|
1990 |
+
'max' => 100,
|
1991 |
+
],
|
1992 |
+
],
|
1993 |
+
'default' => [
|
1994 |
+
'unit' => 'px',
|
1995 |
+
'size' => 100,
|
1996 |
+
],
|
1997 |
+
'selectors' => [
|
1998 |
+
$logo_selector => 'width: {{SIZE}}{{UNIT}};',
|
1999 |
+
],
|
2000 |
+
'condition' => [
|
2001 |
+
"{$form_type}_form_logo_po_toggle" => 'yes',
|
2002 |
+
],
|
2003 |
+
] );
|
2004 |
+
$this->add_responsive_control( "{$form_type}_form_logo_height", [
|
2005 |
+
'label' => esc_html__( 'height', EAEL_TEXTDOMAIN ),
|
2006 |
+
'type' => Controls_Manager::SLIDER,
|
2007 |
+
'size_units' => [
|
2008 |
+
'px',
|
2009 |
+
'rem',
|
2010 |
+
'%',
|
2011 |
+
],
|
2012 |
+
'range' => [
|
2013 |
+
'px' => [
|
2014 |
+
'min' => 0,
|
2015 |
+
'max' => 1000,
|
2016 |
+
'step' => 5,
|
2017 |
+
],
|
2018 |
+
'rem' => [
|
2019 |
+
'min' => 0,
|
2020 |
+
'max' => 10,
|
2021 |
+
'step' => .5,
|
2022 |
+
],
|
2023 |
+
'%' => [
|
2024 |
+
'min' => 0,
|
2025 |
+
'max' => 100,
|
2026 |
+
],
|
2027 |
+
],
|
2028 |
+
'default' => [
|
2029 |
+
'unit' => 'px',
|
2030 |
+
'size' => 100,
|
2031 |
+
],
|
2032 |
+
'selectors' => [
|
2033 |
+
$logo_selector => 'height: {{SIZE}}{{UNIT}};',
|
2034 |
+
],
|
2035 |
+
'condition' => [
|
2036 |
+
"{$form_type}_form_logo_po_toggle" => 'yes',
|
2037 |
+
],
|
2038 |
+
] );
|
2039 |
+
$this->add_responsive_control( "{$form_type}_form_logo_margin", [
|
2040 |
'label' => __( 'Margin', EAEL_TEXTDOMAIN ),
|
2041 |
'type' => Controls_Manager::DIMENSIONS,
|
2042 |
'size_units' => [
|
2051 |
"{$form_type}_form_logo_po_toggle" => 'yes',
|
2052 |
],
|
2053 |
] );
|
2054 |
+
$this->add_responsive_control( "{$form_type}_form_logo_padding", [
|
2055 |
'label' => __( 'Padding', EAEL_TEXTDOMAIN ),
|
2056 |
'type' => Controls_Manager::DIMENSIONS,
|
2057 |
'size_units' => [
|
2066 |
"{$form_type}_form_logo_po_toggle" => 'yes',
|
2067 |
],
|
2068 |
] );
|
2069 |
+
|
2070 |
$this->add_group_control( Group_Control_Border::get_type(), [
|
2071 |
'name' => "{$form_type}_form_logo_border",
|
2072 |
'selector' => $logo_selector,
|
2098 |
],
|
2099 |
] );
|
2100 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2101 |
|
2102 |
|
2103 |
/*-- Title Typography --*/
|
2110 |
'separator' => 'before',
|
2111 |
] );
|
2112 |
$this->start_popover();
|
2113 |
+
$this->add_responsive_control( "{$form_type}_form_title_margin", [
|
2114 |
'label' => __( 'Margin', EAEL_TEXTDOMAIN ),
|
2115 |
'type' => Controls_Manager::DIMENSIONS,
|
2116 |
'size_units' => [
|
2125 |
"{$form_type}_form_title_po_toggle" => 'yes',
|
2126 |
],
|
2127 |
] );
|
2128 |
+
$this->add_responsive_control( "{$form_type}_form_title_padding", [
|
2129 |
'label' => __( 'Padding', EAEL_TEXTDOMAIN ),
|
2130 |
'type' => Controls_Manager::DIMENSIONS,
|
2131 |
'size_units' => [
|
2299 |
] );
|
2300 |
|
2301 |
$this->start_popover();
|
2302 |
+
$this->add_responsive_control( "eael_form_field_margin", [
|
2303 |
'label' => __( 'Margin', EAEL_TEXTDOMAIN ),
|
2304 |
'type' => Controls_Manager::DIMENSIONS,
|
2305 |
'size_units' => [
|
2308 |
'%',
|
2309 |
],
|
2310 |
'selectors' => [
|
2311 |
+
"{{WRAPPER}} .lr-form-wrapper .eael-lr-form-group" => $this->apply_dim( 'margin' ),
|
2312 |
],
|
2313 |
'condition' => [
|
2314 |
'eael_form_field_po_toggle' => 'yes',
|
2315 |
],
|
2316 |
] );
|
2317 |
|
2318 |
+
$this->add_responsive_control( "eael_form_field_padding", [
|
2319 |
'label' => __( 'Padding', EAEL_TEXTDOMAIN ),
|
2320 |
'type' => Controls_Manager::DIMENSIONS,
|
2321 |
'size_units' => [
|
2335 |
'name' => "eael_fields_typography",
|
2336 |
'selector' => "{{WRAPPER}} .lr-form-wrapper .eael-lr-form-control",
|
2337 |
] );
|
2338 |
+
$this->add_responsive_control( "ph_align", [
|
2339 |
+
'label' => __( 'Text Alignment', EAEL_TEXTDOMAIN ),
|
2340 |
+
'type' => Controls_Manager::CHOOSE,
|
2341 |
+
'options' => [
|
2342 |
+
'left' => [
|
2343 |
+
'title' => __( 'Left', EAEL_TEXTDOMAIN ),
|
2344 |
+
'icon' => 'eicon-h-align-left',
|
2345 |
+
],
|
2346 |
+
'center' => [
|
2347 |
+
'title' => __( 'Center', EAEL_TEXTDOMAIN ),
|
2348 |
+
'icon' => 'eicon-h-align-center',
|
2349 |
+
],
|
2350 |
+
'right' => [
|
2351 |
+
'title' => __( 'Right', EAEL_TEXTDOMAIN ),
|
2352 |
+
'icon' => 'eicon-h-align-right',
|
2353 |
+
],
|
2354 |
+
],
|
2355 |
+
'default' => 'left',
|
2356 |
+
'selectors' => [
|
2357 |
+
"{{WRAPPER}} .lr-form-wrapper .eael-lr-form-control" => 'text-align: {{VALUE}};',
|
2358 |
+
],
|
2359 |
+
] );
|
2360 |
$this->add_control( 'eael_form_label_colors_heading', [
|
2361 |
'type' => Controls_Manager::HEADING,
|
2362 |
'label' => __( 'Colors & Border', EAEL_TEXTDOMAIN ),
|
2462 |
] );
|
2463 |
|
2464 |
$this->start_popover();
|
2465 |
+
$this->add_responsive_control( "eael_form_label_margin", [
|
2466 |
'label' => __( 'Margin', EAEL_TEXTDOMAIN ),
|
2467 |
'type' => Controls_Manager::DIMENSIONS,
|
2468 |
'size_units' => [
|
2477 |
'eael_form_label_po_toggle' => 'yes',
|
2478 |
],
|
2479 |
] );
|
2480 |
+
$this->add_responsive_control( "eael_form_label_padding", [
|
2481 |
'label' => __( 'Padding', EAEL_TEXTDOMAIN ),
|
2482 |
'type' => Controls_Manager::DIMENSIONS,
|
2483 |
'size_units' => [
|
2617 |
],
|
2618 |
] );
|
2619 |
|
2620 |
+
$this->add_responsive_control( "rmark_valign", [
|
2621 |
'label' => esc_html__( 'Vertical Alignment', EAEL_TEXTDOMAIN ),
|
2622 |
'type' => Controls_Manager::SLIDER,
|
2623 |
'range' => [
|
2638 |
'rmark_po_toggle' => 'yes',
|
2639 |
],
|
2640 |
] );
|
2641 |
+
$this->add_responsive_control( "rmark_halign", [
|
2642 |
'label' => esc_html__( 'Horizontal Alignment', EAEL_TEXTDOMAIN ),
|
2643 |
'type' => Controls_Manager::SLIDER,
|
2644 |
'range' => [
|
2670 |
] );
|
2671 |
$this->start_popover();
|
2672 |
|
2673 |
+
$this->add_responsive_control( "lpv_size", [
|
2674 |
'label' => esc_html__( 'Icon Size', EAEL_TEXTDOMAIN ),
|
2675 |
'type' => Controls_Manager::SLIDER,
|
2676 |
'size_units' => [
|
2713 |
],
|
2714 |
] );
|
2715 |
|
2716 |
+
$this->add_responsive_control( "lpv_valign", [
|
2717 |
'label' => esc_html__( 'Vertical Alignment', EAEL_TEXTDOMAIN ),
|
2718 |
'type' => Controls_Manager::SLIDER,
|
2719 |
'range' => [
|
2734 |
'lpv_po_toggle' => 'yes',
|
2735 |
],
|
2736 |
] );
|
2737 |
+
$this->add_responsive_control( "lpv_halign", [
|
2738 |
'label' => esc_html__( 'Horizontal Alignment', EAEL_TEXTDOMAIN ),
|
2739 |
'type' => Controls_Manager::SLIDER,
|
2740 |
'range' => [
|
2796 |
'return_value' => 'yes',
|
2797 |
] );
|
2798 |
$this->start_popover();
|
2799 |
+
$this->add_responsive_control( "{$button_type}_btn_margin", [
|
2800 |
'label' => __( 'Margin', EAEL_TEXTDOMAIN ),
|
2801 |
'type' => Controls_Manager::DIMENSIONS,
|
2802 |
'size_units' => [
|
2811 |
"{$button_type}_btn_pot" => 'yes',
|
2812 |
],
|
2813 |
] );
|
2814 |
+
$this->add_responsive_control( "{$button_type}_btn_padding", [
|
2815 |
'label' => __( 'Padding', EAEL_TEXTDOMAIN ),
|
2816 |
'type' => Controls_Manager::DIMENSIONS,
|
2817 |
'size_units' => [
|
2831 |
'name' => "{$button_type}_btn_typography",
|
2832 |
'selector' => "{{WRAPPER}} .eael-{$button_type}-form .eael-lr-btn",
|
2833 |
] );
|
2834 |
+
$this->add_responsive_control( "{$button_type}_btn_d_type", [
|
2835 |
'label' => __( 'Display as', EAEL_TEXTDOMAIN ),
|
2836 |
'type' => Controls_Manager::SELECT,
|
2837 |
'options' => [
|
2865 |
"{{WRAPPER}} .eael-{$button_type}-form .eael-lr-footer" => 'justify-content: {{VALUE}};',
|
2866 |
],
|
2867 |
] );
|
2868 |
+
$this->add_responsive_control( "{$button_type}_btn_align", [
|
2869 |
'label' => __( 'Alignment', EAEL_TEXTDOMAIN ),
|
2870 |
'type' => Controls_Manager::CHOOSE,
|
2871 |
'options' => [
|
3045 |
'return_value' => 'yes',
|
3046 |
] );
|
3047 |
$this->start_popover();
|
3048 |
+
$this->add_responsive_control( "{$form_type}_link_margin", [
|
3049 |
'label' => __( 'Margin', EAEL_TEXTDOMAIN ),
|
3050 |
'type' => Controls_Manager::DIMENSIONS,
|
3051 |
'size_units' => [
|
3060 |
"{$form_type}_link_pot" => 'yes',
|
3061 |
],
|
3062 |
] );
|
3063 |
+
$this->add_responsive_control( "{$form_type}_link_padding", [
|
3064 |
'label' => __( 'Padding', EAEL_TEXTDOMAIN ),
|
3065 |
'type' => Controls_Manager::DIMENSIONS,
|
3066 |
'size_units' => [
|
3081 |
'selector' => "{{WRAPPER}} .eael-{$form_type}-form .eael-lr-link",
|
3082 |
] );
|
3083 |
|
3084 |
+
$this->add_responsive_control( "{$form_type}_link_d_type", [
|
3085 |
'label' => __( 'Display as', EAEL_TEXTDOMAIN ),
|
3086 |
'type' => Controls_Manager::SELECT,
|
3087 |
'options' => [
|
3135 |
],
|
3136 |
] );
|
3137 |
|
3138 |
+
$this->add_responsive_control( "{$form_type}_link_align", [
|
3139 |
'label' => __( 'Alignment', EAEL_TEXTDOMAIN ),
|
3140 |
'type' => Controls_Manager::CHOOSE,
|
3141 |
'options' => [
|
3319 |
*
|
3320 |
* @return array
|
3321 |
*/
|
3322 |
+
public function get_form_controls_display_condition( $type = 'login' ) {
|
3323 |
$form_type = in_array( $type, [
|
3324 |
'login',
|
3325 |
'register',
|
3366 |
$this->form_logo = Group_Control_Image_Size::get_attachment_image_src( $form_logo_id, 'lr_form_logo', $this->ds );
|
3367 |
$this->form_logo_pos = ! empty( $this->ds['lr_form_logo_position'] ) ? $this->ds['lr_form_logo_position'] : 'inline';
|
3368 |
?>
|
3369 |
+
<div class="eael-login-registration-wrapper" data-is-ajax="<?php echo esc_attr( $this->get_settings_for_display( 'enable_ajax' ) ); ?>" data-widget-id="<?php echo esc_attr( $this->get_id() ); ?>" data-recaptcha-sitekey="<?php echo esc_attr(get_option('eael_recaptcha_sitekey')); ?>">
|
3370 |
<?php
|
3371 |
$this->print_login_form();
|
3372 |
$this->print_register_form();
|
3373 |
?>
|
3374 |
</div>
|
3375 |
+
|
3376 |
<?php
|
3377 |
+
$this->print_recaptcha_script();
|
3378 |
}
|
3379 |
|
3380 |
protected function print_login_form() {
|
3497 |
} ?>
|
3498 |
|
3499 |
</div>
|
3500 |
+
|
3501 |
+
<?php
|
3502 |
+
do_action( 'eael/login-register/before-recaptcha', $this );
|
3503 |
+
$this->print_recaptcha_node( 'login' );
|
3504 |
+
do_action( 'eael/login-register/after-recaptcha', $this );
|
3505 |
+
do_action( 'eael/login-register/before-login-footer', $this );
|
3506 |
+
?>
|
3507 |
+
|
3508 |
+
|
3509 |
<div class="eael-lr-footer">
|
3510 |
+
<input type="submit" name="eael-login-submit" id="eael-login-submit" class="g-recaptcha eael-lr-btn eael-lr-btn-block <?php echo esc_attr( $btn_align ); ?>" value="<?php echo esc_attr( $btn_text ); ?>"/>
|
3511 |
<?php if ( $show_reg_link ) { ?>
|
3512 |
<div class="eael-sign-wrapper <?php echo esc_attr( $link_align ); ?>">
|
3513 |
<?php echo $reg_link; // XSS ok. already escaped ?>
|
3515 |
<?php } ?>
|
3516 |
|
3517 |
</div>
|
3518 |
+
<?php do_action( 'eael/login-register/after-login-footer', $this );
|
3519 |
+
?>
|
3520 |
<div class="eael-form-validation-container">
|
3521 |
+
<?php $this->print_login_validation_errors(); ?>
|
3522 |
</div>
|
3523 |
<?php
|
3524 |
$this->print_necessary_hidden_fields( 'login' );
|
3537 |
}
|
3538 |
?>
|
3539 |
</div>
|
3540 |
+
|
3541 |
</section>
|
3542 |
<?php
|
3543 |
}
|
3608 |
do_action( 'eael/login-register/before-register-form', $this );
|
3609 |
?>
|
3610 |
<form class="eael-register-form eael-lr-form" id="eael-register-form" method="post">
|
3611 |
+
<?php do_action( 'eael/login-register/after-register-form-open', $this ); ?>
|
3612 |
<?php // Print all dynamic fields
|
3613 |
foreach ( $this->ds['register_fields'] as $f_index => $field ) :
|
3614 |
$field_type = $field['field_type'];
|
3714 |
endforeach;
|
3715 |
$this->print_necessary_hidden_fields( 'register' );
|
3716 |
$this->print_terms_condition_notice();
|
3717 |
+
$this->print_recaptcha_node( 'register' );
|
3718 |
?>
|
3719 |
+
|
3720 |
<div class="eael-lr-footer">
|
3721 |
<input type="submit" name="eael-register-submit" id="eael-register-submit" class="eael-lr-btn eael-lr-btn-block<?php echo esc_attr( $btn_align ); ?>" value="<?php echo esc_attr( $btn_text ); ?>"/>
|
3722 |
<?php if ( $show_lgn_link ) { ?>
|
3727 |
</div>
|
3728 |
|
3729 |
<div class="eael-form-validation-container">
|
3730 |
+
<?php $this->print_validation_message(); ?>
|
3731 |
</div>
|
3732 |
<?php
|
3733 |
|
3734 |
+
do_action( 'eael/login-register/before-register-form-close', $this );
|
3735 |
+
?>
|
3736 |
</form>
|
3737 |
+
<?php do_action( 'eael/login-register/after-register-form', $this ); ?>
|
3738 |
</div>
|
3739 |
<?php if ( 'right' === $this->form_illustration_pos ) {
|
3740 |
$this->print_form_illustration();
|
3742 |
</div>
|
3743 |
</section>
|
3744 |
<?php
|
3745 |
+
$form_markup = apply_filters( 'eael/login-register/register-form-markup', ob_get_clean() );
|
3746 |
// if we are in the editor then show error related to different input field.
|
3747 |
if ( $this->in_editor ) {
|
3748 |
$repeated = $this->print_error_for_repeated_fields( $repeated_f_labels );
|
3870 |
}
|
3871 |
}
|
3872 |
|
3873 |
+
protected function print_recaptcha_script() {
|
3874 |
+
return;
|
3875 |
+
if ( ! empty( $this->recaptcha_sitekey ) ) { ?>
|
3876 |
+
<script type="text/javascript">
|
3877 |
+
function onloadLRcb() {
|
3878 |
+
var loginRecaptchaNode = document.getElementById('login-recaptcha-node-<?php echo $this->get_id(); ?>');
|
3879 |
+
var registerRecaptchaNode = document.getElementById('register-recaptcha-node-<?php echo $this->get_id(); ?>');
|
3880 |
+
|
3881 |
+
if (loginRecaptchaNode) {
|
3882 |
+
grecaptcha.render(loginRecaptchaNode, {
|
3883 |
+
'sitekey': '<?php echo esc_js( $this->recaptcha_sitekey ); ?>',
|
3884 |
+
});
|
3885 |
+
}
|
3886 |
+
if (registerRecaptchaNode) {
|
3887 |
+
grecaptcha.render(registerRecaptchaNode, {
|
3888 |
+
'sitekey': '<?php echo esc_js( $this->recaptcha_sitekey ); ?>',
|
3889 |
+
});
|
3890 |
+
}
|
3891 |
+
}
|
3892 |
+
</script>
|
3893 |
+
<?php
|
3894 |
+
}
|
3895 |
+
}
|
3896 |
+
|
3897 |
+
protected function print_recaptcha_node( $form_type = 'login' ) {
|
3898 |
+
if ( 'yes' === $this->get_settings_for_display( "enable_{$form_type}_recaptcha" ) ) {
|
3899 |
+
$id = "{$form_type}-recaptcha-node-" . $this->get_id();
|
3900 |
+
echo "<input type='hidden' name='g-recaptcha-enabled' value='1'/><div id='{$id}' class='eael-recaptcha-wrapper'></div>";
|
3901 |
+
}
|
3902 |
+
}
|
3903 |
+
|
3904 |
protected function print_error_for_repeated_fields( $repeated_fields ) {
|
3905 |
if ( ! empty( $repeated_fields ) ) {
|
3906 |
$error_fields = '<strong>' . implode( "</strong>, <strong>", $repeated_fields ) . '</strong>';
|
3964 |
if ( empty( $errors ) && empty( $success ) ) {
|
3965 |
return;
|
3966 |
}
|
3967 |
+
if ( ! empty( $errors ) && is_array( $errors ) ) {
|
3968 |
+
$this->print_registration_errors_message( $errors );
|
3969 |
+
} else {
|
3970 |
+
$this->print_registration_success_message( $success );
|
3971 |
+
}
|
3972 |
}
|
3973 |
|
3974 |
protected function print_registration_errors_message( $errors ) {
|
4016 |
return "{$css_property}: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};";
|
4017 |
}
|
4018 |
|
4019 |
+
}
|
includes/Traits/Admin.php
CHANGED
@@ -212,6 +212,13 @@ include_once EAEL_PLUGIN_PATH . DIRECTORY_SEPARATOR . 'includes/templates/admin/
|
|
212 |
}
|
213 |
|
214 |
parse_str($_POST['fields'], $settings);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
215 |
|
216 |
// Saving Google Map Api Key
|
217 |
update_option('eael_save_google_map_api', @$settings['google-map-api']);
|
212 |
}
|
213 |
|
214 |
parse_str($_POST['fields'], $settings);
|
215 |
+
// Recaptcha Related stuff
|
216 |
+
$r_keys = !empty( $settings['eael_recaptcha_keys']) ? explode( ':', sanitize_text_field( $settings['eael_recaptcha_keys'])): [];
|
217 |
+
$eael_recaptcha_site_key = !empty( $r_keys[0]) ? sanitize_text_field( $r_keys[0]): '';
|
218 |
+
$eael_recaptcha_secret = !empty( $r_keys[1]) ? sanitize_text_field( $r_keys[1]): '';
|
219 |
+
// Saving recaptcha keys
|
220 |
+
update_option( 'eael_recaptcha_sitekey', $eael_recaptcha_site_key);
|
221 |
+
update_option( 'eael_recaptcha_secret', $eael_recaptcha_secret);
|
222 |
|
223 |
// Saving Google Map Api Key
|
224 |
update_option('eael_save_google_map_api', @$settings['google-map-api']);
|
includes/Traits/Enqueue.php
CHANGED
@@ -56,6 +56,7 @@ trait Enqueue
|
|
56 |
wp_add_inline_script('nf-front-end', 'var nfForms = nfForms || [];');
|
57 |
});
|
58 |
}
|
|
|
59 |
}
|
60 |
|
61 |
public function enqueue_template_scripts($css_file)
|
56 |
wp_add_inline_script('nf-front-end', 'var nfForms = nfForms || [];');
|
57 |
});
|
58 |
}
|
59 |
+
|
60 |
}
|
61 |
|
62 |
public function enqueue_template_scripts($css_file)
|
includes/Traits/Login_Registration.php
CHANGED
@@ -31,13 +31,15 @@ trait Login_Registration {
|
|
31 |
public static $email_options = [];
|
32 |
|
33 |
public function login_or_register_user() {
|
34 |
-
|
35 |
// login or register form?
|
36 |
if ( isset( $_POST['eael-login-submit'] ) ) {
|
37 |
$this->log_user_in();
|
38 |
} elseif ( isset( $_POST['eael-register-submit'] ) ) {
|
39 |
$this->register_user();
|
40 |
}
|
|
|
|
|
41 |
}
|
42 |
|
43 |
/**
|
@@ -50,24 +52,36 @@ trait Login_Registration {
|
|
50 |
if ( $ajax ) {
|
51 |
wp_send_json_error( __( 'Insecure form submitted without security token', EAEL_TEXTDOMAIN ) );
|
52 |
}
|
|
|
53 |
return false;
|
54 |
}
|
55 |
if ( ! wp_verify_nonce( $_POST['eael-login-nonce'], 'eael-login-action' ) ) {
|
56 |
if ( $ajax ) {
|
57 |
wp_send_json_error( __( 'Security token did not match', EAEL_TEXTDOMAIN ) );
|
58 |
}
|
|
|
59 |
return false;
|
60 |
}
|
61 |
if ( is_user_logged_in() ) {
|
62 |
if ( $ajax ) {
|
63 |
wp_send_json_error( __( 'You are already logged in', EAEL_TEXTDOMAIN ) );
|
64 |
}
|
|
|
65 |
return false;
|
66 |
}
|
67 |
|
68 |
do_action( 'eael/login-register/before-login' );
|
69 |
|
70 |
$widget_id = ! empty( $_POST['widget_id'] ) ? sanitize_text_field( $_POST['widget_id'] ) : '';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
|
72 |
$user_login = ! empty( $_POST['eael-user-login'] ) ? sanitize_text_field( $_POST['eael-user-login'] ) : '';
|
73 |
if ( is_email( $user_login ) ) {
|
@@ -111,12 +125,12 @@ trait Login_Registration {
|
|
111 |
do_action( 'eael/login-register/after-login', $user_data->user_login, $user_data );
|
112 |
if ( $ajax ) {
|
113 |
$data = [
|
114 |
-
'message' => __('You are logged in successfully', EAEL_TEXTDOMAIN)
|
115 |
];
|
116 |
if ( ! empty( $_POST['redirect_to'] ) ) {
|
117 |
$data['redirect_to'] = esc_url( $_POST['redirect_to'] );
|
118 |
}
|
119 |
-
wp_send_json_success($data);
|
120 |
}
|
121 |
|
122 |
if ( ! empty( $_POST['redirect_to'] ) ) {
|
@@ -137,12 +151,14 @@ trait Login_Registration {
|
|
137 |
if ( $ajax ) {
|
138 |
wp_send_json_error( __( 'Insecure form submitted without security token', EAEL_TEXTDOMAIN ) );
|
139 |
}
|
|
|
140 |
return false;
|
141 |
}
|
142 |
if ( ! wp_verify_nonce( $_POST['eael-register-nonce'], 'eael-register-action' ) ) {
|
143 |
if ( $ajax ) {
|
144 |
wp_send_json_error( __( 'Security token did not match', EAEL_TEXTDOMAIN ) );
|
145 |
}
|
|
|
146 |
return false;
|
147 |
}
|
148 |
|
@@ -150,6 +166,7 @@ trait Login_Registration {
|
|
150 |
if ( $ajax ) {
|
151 |
wp_send_json_error( __( 'You are already logged in. Logged out to register a new account', EAEL_TEXTDOMAIN ) );
|
152 |
}
|
|
|
153 |
return false;
|
154 |
}
|
155 |
|
@@ -188,6 +205,9 @@ trait Login_Registration {
|
|
188 |
if ( isset( $_POST['eael_tnc_active'] ) && empty( $_POST['eael_accept_tnc'] ) ) {
|
189 |
$errors['terms_conditions'] = __( 'You did not accept the Terms and Conditions. Please accept it and try again.', EAEL_TEXTDOMAIN );
|
190 |
}
|
|
|
|
|
|
|
191 |
|
192 |
if ( ! empty( $_POST['email'] ) && is_email( $_POST['email'] ) ) {
|
193 |
$email = sanitize_email( $_POST['email'] );
|
@@ -233,9 +253,9 @@ trait Login_Registration {
|
|
233 |
if ( $ajax ) {
|
234 |
$err_msg = '<ol>';
|
235 |
foreach ( $errors as $error ) {
|
236 |
-
$err_msg .="<li>{$error}</li>";
|
237 |
}
|
238 |
-
$err_msg .='</ol>';
|
239 |
wp_send_json_error( $err_msg );
|
240 |
}
|
241 |
$this->set_transient( 'eael_register_errors_' . $widget_id, $errors );
|
@@ -357,7 +377,7 @@ trait Login_Registration {
|
|
357 |
wp_new_user_notification( $user_id, null, $admin_or_both );
|
358 |
|
359 |
// success & handle after registration action as defined by user in the widget
|
360 |
-
if (
|
361 |
$this->set_transient( 'eael_register_success_' . $widget_id, 1 );
|
362 |
}
|
363 |
|
@@ -375,13 +395,13 @@ trait Login_Registration {
|
|
375 |
|
376 |
if ( $ajax ) {
|
377 |
$data = [
|
378 |
-
'message' => __('Your registration completed successfully.', EAEL_TEXTDOMAIN)
|
379 |
];
|
380 |
|
381 |
if ( in_array( 'redirect', $register_actions ) ) {
|
382 |
$data['redirect_to'] = $custom_redirect_url;
|
383 |
}
|
384 |
-
wp_send_json_success($data);
|
385 |
}
|
386 |
|
387 |
// if custom redirect not available then refresh the current page to show admin bar
|
@@ -394,13 +414,13 @@ trait Login_Registration {
|
|
394 |
// custom redirect?
|
395 |
if ( $ajax ) {
|
396 |
$data = [
|
397 |
-
'message' => __('Your registration completed successfully.', EAEL_TEXTDOMAIN)
|
398 |
];
|
399 |
|
400 |
if ( in_array( 'redirect', $register_actions ) ) {
|
401 |
$data['redirect_to'] = $custom_redirect_url;
|
402 |
}
|
403 |
-
wp_send_json_success($data);
|
404 |
}
|
405 |
|
406 |
if ( in_array( 'redirect', $register_actions ) ) {
|
@@ -476,7 +496,7 @@ trait Login_Registration {
|
|
476 |
}
|
477 |
|
478 |
public function get_user_roles() {
|
479 |
-
$user_roles['
|
480 |
if ( function_exists( 'get_editable_roles' ) ) {
|
481 |
$wp_roles = get_editable_roles();
|
482 |
$roles = $wp_roles ? $wp_roles : [];
|
@@ -609,4 +629,31 @@ trait Login_Registration {
|
|
609 |
|
610 |
return preg_replace( $placeholders, $replacement, $message );
|
611 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
612 |
}
|
31 |
public static $email_options = [];
|
32 |
|
33 |
public function login_or_register_user() {
|
34 |
+
do_action( 'eael/login-register/before-processing-login-register', $_POST );
|
35 |
// login or register form?
|
36 |
if ( isset( $_POST['eael-login-submit'] ) ) {
|
37 |
$this->log_user_in();
|
38 |
} elseif ( isset( $_POST['eael-register-submit'] ) ) {
|
39 |
$this->register_user();
|
40 |
}
|
41 |
+
do_action( 'eael/login-register/after-processing-login-register', $_POST );
|
42 |
+
|
43 |
}
|
44 |
|
45 |
/**
|
52 |
if ( $ajax ) {
|
53 |
wp_send_json_error( __( 'Insecure form submitted without security token', EAEL_TEXTDOMAIN ) );
|
54 |
}
|
55 |
+
|
56 |
return false;
|
57 |
}
|
58 |
if ( ! wp_verify_nonce( $_POST['eael-login-nonce'], 'eael-login-action' ) ) {
|
59 |
if ( $ajax ) {
|
60 |
wp_send_json_error( __( 'Security token did not match', EAEL_TEXTDOMAIN ) );
|
61 |
}
|
62 |
+
|
63 |
return false;
|
64 |
}
|
65 |
if ( is_user_logged_in() ) {
|
66 |
if ( $ajax ) {
|
67 |
wp_send_json_error( __( 'You are already logged in', EAEL_TEXTDOMAIN ) );
|
68 |
}
|
69 |
+
|
70 |
return false;
|
71 |
}
|
72 |
|
73 |
do_action( 'eael/login-register/before-login' );
|
74 |
|
75 |
$widget_id = ! empty( $_POST['widget_id'] ) ? sanitize_text_field( $_POST['widget_id'] ) : '';
|
76 |
+
if ( isset( $_POST['g-recaptcha-enabled'] ) && ! $this->lr_validate_recaptcha() ) {
|
77 |
+
$err_msg = __( 'You did not pass recaptcha challenge.', EAEL_TEXTDOMAIN );
|
78 |
+
if ( $ajax ) {
|
79 |
+
wp_send_json_error( $err_msg );
|
80 |
+
}
|
81 |
+
$this->set_transient( 'eael_login_error_' . $widget_id, $err_msg );
|
82 |
+
|
83 |
+
return false; // vail early if recaptcha failed
|
84 |
+
}
|
85 |
|
86 |
$user_login = ! empty( $_POST['eael-user-login'] ) ? sanitize_text_field( $_POST['eael-user-login'] ) : '';
|
87 |
if ( is_email( $user_login ) ) {
|
125 |
do_action( 'eael/login-register/after-login', $user_data->user_login, $user_data );
|
126 |
if ( $ajax ) {
|
127 |
$data = [
|
128 |
+
'message' => __( 'You are logged in successfully', EAEL_TEXTDOMAIN ),
|
129 |
];
|
130 |
if ( ! empty( $_POST['redirect_to'] ) ) {
|
131 |
$data['redirect_to'] = esc_url( $_POST['redirect_to'] );
|
132 |
}
|
133 |
+
wp_send_json_success( $data );
|
134 |
}
|
135 |
|
136 |
if ( ! empty( $_POST['redirect_to'] ) ) {
|
151 |
if ( $ajax ) {
|
152 |
wp_send_json_error( __( 'Insecure form submitted without security token', EAEL_TEXTDOMAIN ) );
|
153 |
}
|
154 |
+
|
155 |
return false;
|
156 |
}
|
157 |
if ( ! wp_verify_nonce( $_POST['eael-register-nonce'], 'eael-register-action' ) ) {
|
158 |
if ( $ajax ) {
|
159 |
wp_send_json_error( __( 'Security token did not match', EAEL_TEXTDOMAIN ) );
|
160 |
}
|
161 |
+
|
162 |
return false;
|
163 |
}
|
164 |
|
166 |
if ( $ajax ) {
|
167 |
wp_send_json_error( __( 'You are already logged in. Logged out to register a new account', EAEL_TEXTDOMAIN ) );
|
168 |
}
|
169 |
+
|
170 |
return false;
|
171 |
}
|
172 |
|
205 |
if ( isset( $_POST['eael_tnc_active'] ) && empty( $_POST['eael_accept_tnc'] ) ) {
|
206 |
$errors['terms_conditions'] = __( 'You did not accept the Terms and Conditions. Please accept it and try again.', EAEL_TEXTDOMAIN );
|
207 |
}
|
208 |
+
if ( isset( $_POST['g-recaptcha-enabled'] ) && ! $this->lr_validate_recaptcha() ) {
|
209 |
+
$errors['recaptcha'] = __( 'You did not pass recaptcha challenge.', EAEL_TEXTDOMAIN );
|
210 |
+
}
|
211 |
|
212 |
if ( ! empty( $_POST['email'] ) && is_email( $_POST['email'] ) ) {
|
213 |
$email = sanitize_email( $_POST['email'] );
|
253 |
if ( $ajax ) {
|
254 |
$err_msg = '<ol>';
|
255 |
foreach ( $errors as $error ) {
|
256 |
+
$err_msg .= "<li>{$error}</li>";
|
257 |
}
|
258 |
+
$err_msg .= '</ol>';
|
259 |
wp_send_json_error( $err_msg );
|
260 |
}
|
261 |
$this->set_transient( 'eael_register_errors_' . $widget_id, $errors );
|
377 |
wp_new_user_notification( $user_id, null, $admin_or_both );
|
378 |
|
379 |
// success & handle after registration action as defined by user in the widget
|
380 |
+
if ( ! $ajax ) {
|
381 |
$this->set_transient( 'eael_register_success_' . $widget_id, 1 );
|
382 |
}
|
383 |
|
395 |
|
396 |
if ( $ajax ) {
|
397 |
$data = [
|
398 |
+
'message' => __( 'Your registration completed successfully.', EAEL_TEXTDOMAIN ),
|
399 |
];
|
400 |
|
401 |
if ( in_array( 'redirect', $register_actions ) ) {
|
402 |
$data['redirect_to'] = $custom_redirect_url;
|
403 |
}
|
404 |
+
wp_send_json_success( $data );
|
405 |
}
|
406 |
|
407 |
// if custom redirect not available then refresh the current page to show admin bar
|
414 |
// custom redirect?
|
415 |
if ( $ajax ) {
|
416 |
$data = [
|
417 |
+
'message' => __( 'Your registration completed successfully.', EAEL_TEXTDOMAIN ),
|
418 |
];
|
419 |
|
420 |
if ( in_array( 'redirect', $register_actions ) ) {
|
421 |
$data['redirect_to'] = $custom_redirect_url;
|
422 |
}
|
423 |
+
wp_send_json_success( $data );
|
424 |
}
|
425 |
|
426 |
if ( in_array( 'redirect', $register_actions ) ) {
|
496 |
}
|
497 |
|
498 |
public function get_user_roles() {
|
499 |
+
$user_roles[''] = __( 'Default', EAEL_TEXTDOMAIN );
|
500 |
if ( function_exists( 'get_editable_roles' ) ) {
|
501 |
$wp_roles = get_editable_roles();
|
502 |
$roles = $wp_roles ? $wp_roles : [];
|
629 |
|
630 |
return preg_replace( $placeholders, $replacement, $message );
|
631 |
}
|
632 |
+
|
633 |
+
public function lr_validate_recaptcha() {
|
634 |
+
if ( ! isset( $_REQUEST['g-recaptcha-response'] ) ) {
|
635 |
+
return false;
|
636 |
+
}
|
637 |
+
$endpoint = 'https://www.google.com/recaptcha/api/siteverify';
|
638 |
+
$data = [
|
639 |
+
'secret' => get_option( 'eael_recaptcha_secret' ),
|
640 |
+
'response' => $_REQUEST['g-recaptcha-response'],
|
641 |
+
'ip' => $_SERVER['REMOTE_ADDR'],
|
642 |
+
];
|
643 |
+
|
644 |
+
$res = json_decode( wp_remote_retrieve_body( wp_remote_post( $endpoint, [ 'body' => $data ] ) ), 1 );
|
645 |
+
if ( isset( $res['success'] ) ) {
|
646 |
+
return $res['success'];
|
647 |
+
}
|
648 |
+
|
649 |
+
return false;
|
650 |
+
}
|
651 |
+
|
652 |
+
public function lr_enqueue_scripts( ) {
|
653 |
+
$version = defined( 'WP_DEBUG' ) ? time() : EAEL_PLUGIN_VERSION; // stop cache on debug mode
|
654 |
+
if ( $site_key = get_option( 'eael_recaptcha_sitekey' ) ) {
|
655 |
+
wp_register_script( 'eael-recaptcha', "https://www.google.com/recaptcha/api.js?render=explicit", false,
|
656 |
+
$version, false );
|
657 |
+
}
|
658 |
+
}
|
659 |
}
|
includes/templates/admin/elements.php
CHANGED
@@ -550,8 +550,14 @@ $elements = apply_filters( 'add_eael_elementor_addons', $elements );
|
|
550 |
echo '<span style="font-size: 12px; font-style:italic;">
|
551 |
'.sprintf("<a id='eael-typeform-get-access' data-link='%s' href='#'>Get Access</a>", esc_url($url)).'
|
552 |
</span>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
553 |
}
|
554 |
-
|
555 |
?>
|
556 |
</p>
|
557 |
<?php if (!empty( $item['demo_link'])) { ?>
|
@@ -583,4 +589,4 @@ $elements = apply_filters( 'add_eael_elementor_addons', $elements );
|
|
583 |
</div>
|
584 |
</div>
|
585 |
</div>
|
586 |
-
</div>
|
550 |
echo '<span style="font-size: 12px; font-style:italic;">
|
551 |
'.sprintf("<a id='eael-typeform-get-access' data-link='%s' href='#'>Get Access</a>", esc_url($url)).'
|
552 |
</span>';
|
553 |
+
} elseif ($item['key'] === 'login-register') {
|
554 |
+
$r_key = get_option('eael_recaptcha_sitekey');
|
555 |
+
$secret = get_option('eael_recaptcha_secret');
|
556 |
+
$r_old_val = !empty( $r_key) && !empty( $secret)? "{$r_key}:{$secret}" : '';
|
557 |
+
echo '<span style="font-size: 12px; font-style:italic;"><a href="#" class="eael-admin-settings-popup" data-title="Google reCAPTCHA API Keys" data-placeholder="Insert like Site Key:Secret Key" data-doc="#google-recaptcha-doc" data-target="#eael_recaptcha_keys">'.__('Settings', 'essential-addons-for-elementor-lite').'</a></span>
|
558 |
+
<a style="display: none" id="google-recaptcha-doc" target="_blank" href="https://www.google.com/recaptcha/admin/create">'.__('To retrieve your API Keys, click here', 'essential-addons-for-elementor-lite').'</a>
|
559 |
+
<input type="hidden" name="eael_recaptcha_keys" id="eael_recaptcha_keys" class="eael_recaptcha_keys" value="' . esc_attr( $r_old_val) . '">';
|
560 |
}
|
|
|
561 |
?>
|
562 |
</p>
|
563 |
<?php if (!empty( $item['demo_link'])) { ?>
|
589 |
</div>
|
590 |
</div>
|
591 |
</div>
|
592 |
+
</div>
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: elementor, elements, addons, elementor addon, elementor widget, elementor
|
|
4 |
Requires at least: 4.0
|
5 |
Tested up to: 5.5
|
6 |
Requires PHP: 5.4
|
7 |
-
Stable tag: 4.2.
|
8 |
License: GPLv3
|
9 |
License URI: https://opensource.org/licenses/GPL-3.0
|
10 |
|
@@ -224,6 +224,12 @@ Your existing elements/content will work with premium version. So you won't lose
|
|
224 |
|
225 |
== Changelog ==
|
226 |
|
|
|
|
|
|
|
|
|
|
|
|
|
227 |
= 4.2.0 - 06/08/2020 =
|
228 |
- Added: EA Login | Register Widget
|
229 |
- Removed: Upsell Notices
|
4 |
Requires at least: 4.0
|
5 |
Tested up to: 5.5
|
6 |
Requires PHP: 5.4
|
7 |
+
Stable tag: 4.2.1
|
8 |
License: GPLv3
|
9 |
License URI: https://opensource.org/licenses/GPL-3.0
|
10 |
|
224 |
|
225 |
== Changelog ==
|
226 |
|
227 |
+
= 4.2.1 - 20/08/2020 =
|
228 |
+
- Added: Google reCAPTCHA option in EA Login | Register Form
|
229 |
+
- Added: Compatibility with WooCommerce 4.4.1
|
230 |
+
- Fixed: User Role not setting correctly in EA Login | Register Form
|
231 |
+
- Few minor bugfix and improvements
|
232 |
+
|
233 |
= 4.2.0 - 06/08/2020 =
|
234 |
- Added: EA Login | Register Widget
|
235 |
- Removed: Upsell Notices
|