PluginProbe
Easy Elements for Elementor – Addons & Website Templates / 1.5.3
Easy Elements for Elementor – Addons & Website Templates v1.5.3
1.5.3 1.5.2 1.5.1 1.5.0 1.4.9 1.4.6 1.4.7 1.4.8 1.4.5 1.4.4 1.4.3 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 1.3.9 1.4.0 All 47 releases
easy-elements / widgets / login-register / login-register.php

login-register.php in Easy Elements for Elementor – Addons & Website Templates 1.5.3, at widgets/login-register/login-register.php

1,849 lines 63.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace Easyel\EasyElements\Widgets;
3 /**
4 * Easy Elements Login Register Widget
5 * @package EasyElements
6 * @since 1.0.0
7 */
8 use Elementor\Controls_Manager;
9 use Elementor\Widget_Base;
10 use Elementor\Group_Control_Typography;
11 use Elementor\Group_Control_Border;
12 use Elementor\Group_Control_Box_Shadow;
13
14 if ( ! defined( 'ABSPATH' ) ) {
15 exit;
16 }
17 /**
18 *
19 * Handles the login register widget functionality for Elementor.
20 */
21 class Easyel_Login_Register_Widget extends \Elementor\Widget_Base {
22
23 /**
24 * Get widget style dependencies
25 *
26 * Loads the CSS file for the widget styling
27 *
28 * @return array Array of style handles
29 */
30 /**
31 * Get widget name
32 *
33 * @return string Widget name
34 */
35 public function get_name() {
36 return 'eel-login-register';
37 }
38
39 /**
40 * Get widget title
41 *
42 * @return string Widget title
43 */
44 public function get_title() {
45 return __( 'Login / Register Form', 'easy-elements' );
46 }
47
48 /**
49 * Get widget icon
50 *
51 * @return string Widget icon
52 */
53 public function get_icon() {
54 return 'easyicon easyelIcon-login';
55 }
56
57 /**
58 * Get widget categories
59 *
60 * @return array Widget categories
61 */
62 public function get_categories() {
63 return [ 'easyelements_category' ];
64 }
65
66 public function get_keywords() {
67 return [ 'login', 'register', 'from', 'text', 'form' ];
68 }
69
70 public function get_style_depends() {
71 return [
72 'eel-login-register',
73 ];
74 }
75
76 public function get_script_depends() {
77 return [
78 'eel-login-register',
79 ];
80 }
81
82
83 /**
84 * Register widget controls
85 *
86 * Defines all the controls for the widget
87 */
88 protected function register_controls() {
89 // ========================================
90 // CONTENT SECTION - Form Settings
91 // ========================================
92 $this->start_controls_section(
93 'content_section',
94 [
95 'label' => esc_html__( 'Form', 'easy-elements' ),
96 'tab' => Controls_Manager::TAB_CONTENT,
97 ]
98 );
99
100 $this->add_control(
101 'form_type',
102 [
103 'label' => esc_html__( 'Type', 'easy-elements' ),
104 'type' => \Elementor\Controls_Manager::SELECT,
105 'default' => 'login',
106 'options' => [
107 'login' => esc_html__( 'Login', 'easy-elements' ),
108 'register' => esc_html__( 'Register', 'easy-elements' ),
109 'both' => esc_html__( 'Both', 'easy-elements' ),
110 ],
111 ]
112 );
113 $this->add_control(
114 'default_form',
115 [
116 'label' => esc_html__( 'Show First', 'easy-elements' ),
117 'type' => \Elementor\Controls_Manager::SELECT,
118 'default' => 'login',
119 'options' => [
120 'login' => esc_html__( 'Login', 'easy-elements' ),
121 'register' => esc_html__( 'Register', 'easy-elements' ),
122 ],
123 'description' => esc_html__( 'Which form is shown first. The footer link toggles to the other form in place (no page redirect).', 'easy-elements' ),
124 'condition' => [
125 'form_type' => 'both',
126 ],
127 ]
128 );
129 $this->add_control(
130 'redirect_link_after_login',
131 [
132 'label' => esc_html__( 'Redirect Link After Login', 'easy-elements' ),
133 'type' => \Elementor\Controls_Manager::URL,
134 'options' => [ 'url', 'is_external', 'nofollow' ],
135 'default' => [
136 'url' => home_url(),
137 'is_external' => true,
138 'nofollow' => true,
139 ],
140 'label_block' => true,
141 'condition' => [
142 'form_type' => ['login', 'both'],
143 ],
144 ]
145 );
146
147
148 $this->add_control(
149 'register_options',
150 [
151 'label' => esc_html__( 'Register Actions', 'easy-elements' ),
152 'type' => \Elementor\Controls_Manager::SELECT2,
153 'multiple' => true,
154 'label_block' => true,
155 'options' => [
156 'notify_email' => esc_html__( 'Notify user by email', 'easy-elements' ),
157 'auto_login' => esc_html__( 'Auto login', 'easy-elements' ),
158 'redirect' => esc_html__( 'Redirect', 'easy-elements' ),
159 ],
160 'default' => [ 'auto_login', 'redirect' ],
161 'description' => esc_html__( 'Select which actions run after a successful registration. "Notify user by email" sends the standard WordPress new-user email.', 'easy-elements' ),
162 'condition' => [
163 'form_type' => ['register', 'both'],
164 ],
165 ]
166 );
167
168 $this->add_control(
169 'redirect_link_after_registration',
170 [
171 'label' => esc_html__( 'Redirect Link After Registration', 'easy-elements' ),
172 'type' => \Elementor\Controls_Manager::URL,
173 'options' => [ 'url', 'is_external', 'nofollow' ],
174 'default' => [
175 'url' => home_url(),
176 'is_external' => true,
177 'nofollow' => true,
178 // 'custom_attributes' => '',
179 ],
180 'label_block' => true,
181 'condition' => [
182 'form_type' => ['register', 'both'],
183 'register_options' => 'redirect',
184 ],
185 ]
186 );
187
188 $this->add_control(
189 'show_password_reset_link',
190 [
191 'label' => esc_html__( 'Show Password Reset Link', 'easy-elements' ),
192 'type' => \Elementor\Controls_Manager::SWITCHER,
193 'label_on' => esc_html__( 'Show', 'easy-elements' ),
194 'label_off' => esc_html__( 'Hide', 'easy-elements' ),
195 'return_value' => 'yes',
196 'default' => 'yes',
197 'condition' => [
198 'form_type' => ['login', 'both'],
199 ],
200 ]
201 );
202 $this->add_control(
203 'remember_me',
204 [
205 'label' => esc_html__( 'Show Remember Me', 'easy-elements' ),
206 'type' => \Elementor\Controls_Manager::SWITCHER,
207 'label_on' => esc_html__( 'Show', 'easy-elements' ),
208 'label_off' => esc_html__( 'Hide', 'easy-elements' ),
209 'return_value' => 'yes',
210 'default' => 'yes',
211 'condition' => [
212 'form_type' => ['login', 'both'],
213 ],
214 ]
215 );
216 $this->add_control(
217 'show_ajax_loader',
218 [
219 'label' => esc_html__( 'Show Ajax Loader', 'easy-elements' ),
220 'type' => \Elementor\Controls_Manager::SWITCHER,
221 'label_on' => esc_html__( 'Show', 'easy-elements' ),
222 'label_off' => esc_html__( 'Hide', 'easy-elements' ),
223 'return_value' => 'yes',
224 'default' => 'yes',
225 ]
226 );
227 $this->end_controls_section();
228
229
230 // ========================================
231 // CONTENT SECTION - Register Admin Email Options
232 // ========================================
233 $this->start_controls_section(
234 'register_admin_email_section',
235 [
236 'label' => esc_html__( 'Admin Email', 'easy-elements' ),
237 'tab' => Controls_Manager::TAB_CONTENT,
238 'condition' => [
239 'form_type' => ['register', 'both'],
240 ],
241 ]
242 );
243
244 $this->add_control(
245 'notify_admin_email',
246 [
247 'label' => esc_html__( 'Send Admin Notification', 'easy-elements' ),
248 'type' => \Elementor\Controls_Manager::SWITCHER,
249 'label_on' => esc_html__( 'Yes', 'easy-elements' ),
250 'label_off' => esc_html__( 'No', 'easy-elements' ),
251 'return_value' => 'yes',
252 'default' => 'yes',
253 'description' => esc_html__( 'Notify the site administrator by email when a new user registers (the standard WordPress admin notification).', 'easy-elements' ),
254 ]
255 );
256
257 $this->end_controls_section();
258
259
260 // ========================================
261 // CONTENT SECTION - Math Captcha
262 // ========================================
263 $this->start_controls_section(
264 'math_captcha_section',
265 [
266 'label' => esc_html__( 'Math Captcha', 'easy-elements' ),
267 'tab' => Controls_Manager::TAB_CONTENT,
268 'condition' => [
269 'form_type' => ['register', 'both'],
270 ],
271 ]
272 );
273
274 $this->add_control(
275 'enable_math_captcha',
276 [
277 'label' => esc_html__( 'Enable Math Captcha', 'easy-elements' ),
278 'type' => \Elementor\Controls_Manager::SWITCHER,
279 'label_on' => esc_html__( 'On', 'easy-elements' ),
280 'label_off' => esc_html__( 'Off', 'easy-elements' ),
281 'return_value' => 'yes',
282 'default' => '',
283 'description' => esc_html__( 'Show a simple math question (e.g. 3 + 5 = ?) on the registration form to block spam bots. No API key required.', 'easy-elements' ),
284 ]
285 );
286
287 $this->add_control(
288 'math_captcha_error_message',
289 [
290 'label' => esc_html__( 'Error Message', 'easy-elements' ),
291 'type' => \Elementor\Controls_Manager::TEXTAREA,
292 'label_block' => true,
293 'default' => esc_html__( 'Incorrect answer to the math question.', 'easy-elements' ),
294 'placeholder' => esc_html__( 'Type your message here', 'easy-elements' ),
295 'condition' => [
296 'enable_math_captcha' => 'yes',
297 ],
298 ]
299 );
300
301 $this->end_controls_section();
302
303
304 // ========================================
305 // CONTENT SECTION - Fields Settings
306 // ========================================
307 $this->start_controls_section(
308 'fields_section',
309 [
310 'label' => esc_html__( 'Fields', 'easy-elements' ),
311 'tab' => Controls_Manager::TAB_CONTENT,
312 ]
313 );
314
315 $this->add_control(
316 'login_fields',
317 [
318 'label' => esc_html__( 'Login Fields', 'easy-elements' ),
319 'type' => Controls_Manager::REPEATER,
320 'fields' => [
321 // Type Field
322 [
323 'name' => 'type',
324 'label' => esc_html__( 'Type', 'easy-elements' ),
325 'type' => \Elementor\Controls_Manager::SELECT,
326 'default' => 'username',
327 'options' => [
328 'username' => esc_html__( 'Username', 'easy-elements' ),
329 'password' => esc_html__( 'Password', 'easy-elements' ),
330 'static_text' => esc_html__( 'Static Text', 'easy-elements' ),
331 ],
332 ],
333 // Label Field
334 [
335 'name' => 'label',
336 'label' => esc_html__( 'Label', 'easy-elements' ),
337 'type' => Controls_Manager::TEXT,
338 'condition' => [
339 'type!' => 'static_text',
340 ],
341 ],
342 // Placeholder Field
343 [
344 'name' => 'placeholder',
345 'label' => esc_html__( 'Placeholder', 'easy-elements' ),
346 'type' => Controls_Manager::TEXT,
347 'condition' => [
348 'type!' => 'static_text',
349 ],
350 ],
351 // Icon Field
352 [
353 'name' => 'icon',
354 'label' => esc_html__( 'Icon', 'easy-elements' ),
355 'type' => Controls_Manager::ICONS,
356 'condition' => [
357 'type!' => 'static_text',
358 ],
359 ],
360 [
361 'name' => 'is_required',
362 'label' => esc_html__( 'Is Required', 'easy-elements' ),
363 'type' => \Elementor\Controls_Manager::SWITCHER,
364 'label_on' => esc_html__( 'Yes', 'easy-elements' ),
365 'label_off' => esc_html__( 'No', 'easy-elements' ),
366 'return_value' => 'yes',
367 'default' => 'yes',
368 'condition' => [
369 'type!' => 'static_text',
370 ],
371 ],
372 [
373 'name' => 'static_text',
374 'label' => esc_html__('Static Text', 'easy-elements'),
375 'type' => Controls_Manager::WYSIWYG,
376 'label_block' => true,
377 'default' => esc_html__("This is static field.", "easy-elements"),
378 'dynamic' => [
379 'active' => true,
380 ],
381 'condition' => [
382 'type' => 'static_text',
383 ],
384 ]
385 ],
386
387 // Default register fields
388 'default' => [
389 [
390 'type' => 'username',
391 'label' => esc_html__( 'Username', 'easy-elements' ),
392 'placeholder' => esc_html__( 'Username', 'easy-elements' ),
393 'is_required' => 'yes',
394 ],
395 [
396 'type' => 'password',
397 'label' => esc_html__( 'Password', 'easy-elements' ),
398 'placeholder' => esc_html__( 'Password', 'easy-elements' ),
399 'is_required' => 'yes',
400 ],
401 ],
402 'title_field' => '{{{ type }}}',
403 'condition' => [
404 'form_type' => ['login', 'both'],
405 ],
406 ]
407 );
408
409 $this->add_control(
410 'register_fields',
411 [
412 'label' => esc_html__( 'Register Fields', 'easy-elements' ),
413 'type' => Controls_Manager::REPEATER,
414 'fields' => [
415 // Type Field
416 [
417 'name' => 'type',
418 'label' => esc_html__( 'Type', 'easy-elements' ),
419 'type' => \Elementor\Controls_Manager::SELECT,
420 'default' => 'username',
421 'options' => [
422 'user_login' => esc_html__( 'Username', 'easy-elements' ),
423 'user_email' => esc_html__( 'Email', 'easy-elements' ),
424 'user_pass' => esc_html__( 'Password', 'easy-elements' ),
425 'confirm_password' => esc_html__( 'Confirm Password', 'easy-elements' ),
426 'first_name' => esc_html__( 'First Name', 'easy-elements' ),
427 'last_name' => esc_html__( 'Last Name', 'easy-elements' ),
428 'display_name' => esc_html__( 'Display Name', 'easy-elements' ),
429 'user_nicename' => esc_html__( 'Nice Name', 'easy-elements' ),
430 'nickname ' => esc_html__( 'Nice Name', 'easy-elements' ),
431 'user_url' => esc_html__( 'Website', 'easy-elements' ),
432 'description' => esc_html__( 'Description', 'easy-elements' ),
433 'easyel_consent' => esc_html__( 'Consent', 'easy-elements' ),
434 'custom' => esc_html__( 'Custom', 'easy-elements' ),
435 'static_text' => esc_html__( 'Static Text', 'easy-elements' ),
436 ],
437 ],
438 // Custom User Meta Key Field
439 [
440 'name' => 'meta_key',
441 'label' => esc_html__( 'Meta Key', 'easy-elements' ),
442 'type' => Controls_Manager::TEXT,
443 'condition' => [
444 'type' => 'custom',
445 ],
446 ],
447 // Label Field
448 [
449 'name' => 'label',
450 'label' => esc_html__( 'Label', 'easy-elements' ),
451 'type' => Controls_Manager::TEXT,
452 'condition' => [
453 'type!' => 'static_text',
454 ],
455 ],
456 // Placeholder Field
457 [
458 'name' => 'placeholder',
459 'label' => esc_html__( 'Placeholder', 'easy-elements' ),
460 'type' => Controls_Manager::TEXT,
461 'condition' => [
462 'type!' => 'static_text',
463 ],
464 ],
465 // Icon Field
466 [
467 'name' => 'icon',
468 'label' => esc_html__( 'Icon', 'easy-elements' ),
469 'type' => Controls_Manager::ICONS,
470 'condition' => [
471 'type!' => 'static_text',
472 ],
473 ],
474 [
475 'name' => 'min_length',
476 'label' => esc_html__( 'Min Length', 'easy-elements' ),
477 'type' => Controls_Manager::NUMBER,
478 'condition' => [
479 'type!' => 'static_text',
480 ],
481 ],
482 [
483 'name' => 'max_length',
484 'label' => esc_html__( 'Max Length', 'easy-elements' ),
485 'type' => Controls_Manager::NUMBER,
486 'condition' => [
487 'type!' => 'static_text',
488 ],
489 ],
490 [
491 'name' => 'is_required',
492 'label' => esc_html__( 'Is Required', 'easy-elements' ),
493 'type' => \Elementor\Controls_Manager::SWITCHER,
494 'label_on' => esc_html__( 'Yes', 'easy-elements' ),
495 'label_off' => esc_html__( 'No', 'easy-elements' ),
496 'return_value' => 'yes',
497 'default' => 'yes',
498 'condition' => [
499 'type!' => 'static_text',
500 ],
501 ],
502 [
503 'name' => 'static_text',
504 'label' => esc_html__('Static Text', 'easy-elements'),
505 'type' => Controls_Manager::WYSIWYG,
506 'label_block' => true,
507 'default' => esc_html__("Don't have account? Sign Up", "easy-elements"),
508 'dynamic' => [
509 'active' => true,
510 ],
511 'condition' => [
512 'type' => 'static_text',
513 ],
514 ],
515 [
516 'name' => 'width',
517 'label' => esc_html__('Width', 'easy-elements'),
518 'type' => Controls_Manager::SLIDER,
519 'size_units' => ['px', '%', 'em'],
520 'range' => [
521 'px' => [
522 'min' => 10,
523 'max' => 50,
524 ],
525 'em' => [
526 'min' => 0.5,
527 'max' => 10,
528 ],
529 '%' => [
530 'min' => 2,
531 'max' => 100,
532 ],
533 ],
534 'default' => [
535 'unit' => '%',
536 ],
537 ]
538 ],
539
540 // Default register fields
541 'default' => [
542 [
543 'type' => 'user_login',
544 'label' => esc_html__( 'Username', 'easy-elements' ),
545 'placeholder' => esc_html__( 'Username', 'easy-elements' ),
546 'is_required' => 'yes',
547 ],
548 [
549 'type' => 'user_email',
550 'label' => esc_html__( 'Email', 'easy-elements' ),
551 'placeholder' => esc_html__( 'Email', 'easy-elements' ),
552 'is_required' => 'yes',
553 ],
554 [
555 'type' => 'user_pass',
556 'label' => esc_html__( 'Password', 'easy-elements' ),
557 'placeholder' => esc_html__( 'Password', 'easy-elements' ),
558 'is_required' => 'yes',
559 'min_length' => 8,
560 ],
561 ],
562 'title_field' => '{{{ type }}}',
563 'condition' => [
564 'form_type' => ['register', 'both'],
565 ],
566 ]
567 );
568
569 $this->add_control(
570 'show_label',
571 [
572 'label' => esc_html__( 'Show Label', 'easy-elements' ),
573 'type' => \Elementor\Controls_Manager::SWITCHER,
574 'label_on' => esc_html__( 'Show', 'easy-elements' ),
575 'label_off' => esc_html__( 'Hide', 'easy-elements' ),
576 'return_value' => 'yes',
577 'default' => 'yes',
578 'condition' => [
579 'show_icon!' => 'yes',
580 ],
581 ]
582 );
583 $this->add_control(
584 'show_icon',
585 [
586 'label' => esc_html__( 'Show Icon', 'easy-elements' ),
587 'type' => \Elementor\Controls_Manager::SWITCHER,
588 'label_on' => esc_html__( 'Show', 'easy-elements' ),
589 'label_off' => esc_html__( 'Hide', 'easy-elements' ),
590 'return_value' => 'yes',
591 'description' => esc_html__( 'Enable this option to display an icon field inside the repeater items.', 'easy-elements' ),
592 ]
593 );
594
595 $this->add_control(
596 'login_fields_labels',
597 [
598 'label' => esc_html__( 'Labels', 'easy-elements' ),
599 'type' => \Elementor\Controls_Manager::HEADING,
600 'separator' => 'before',
601 'condition' => [
602 'form_type' => ['login', 'both'],
603 ],
604 ]
605 );
606 $this->add_control(
607 'password_reset_text',
608 [
609 'label' => esc_html__( 'Password Reset Text', 'easy-elements' ),
610 'type' => \Elementor\Controls_Manager::TEXT,
611 'label_block' => true,
612 'default' => esc_html__( 'Forgot your password?', 'easy-elements' ),
613 'placeholder' => esc_html__( 'Type your text here', 'easy-elements' ),
614 'condition' => [
615 'form_type' => ['login', 'both'],
616 'show_password_reset_link' => ['yes'],
617 ],
618 ]
619 );
620 $this->add_control(
621 'remember_label_text',
622 [
623 'label' => esc_html__('Remember', 'easy-elements'),
624 'type' => Controls_Manager::TEXT,
625 'label_block' => true,
626 'default' => esc_html__('Remember Me', 'easy-elements'),
627 'placeholder' => esc_html__('Enter text here', 'easy-elements'),
628 'dynamic' => [
629 'active' => true,
630 ],
631 'condition' => [
632 'form_type' => ['login', 'both'],
633 ],
634 ]
635 );
636 $this->end_controls_section();
637
638
639 // ========================================
640 // CONTENT SECTION - Submit Button
641 // ========================================
642 $this->start_controls_section(
643 'submit_button_section',
644 [
645 'label' => esc_html__( 'Submit', 'easy-elements' ),
646 'tab' => Controls_Manager::TAB_CONTENT,
647 ]
648 );
649 $this->add_control(
650 'submit_button_text',
651 [
652 'label' => esc_html__('Login Button Text', 'easy-elements'),
653 'type' => Controls_Manager::TEXT,
654 'label_block' => true,
655 'default' => esc_html__('Log In', 'easy-elements'),
656 'placeholder' => esc_html__('Enter text here', 'easy-elements'),
657 'dynamic' => [
658 'active' => true,
659 ],
660 'condition' => [
661 'form_type' => ['login', 'both'],
662 ],
663 ]
664 );
665
666 $this->add_control(
667 'register_button_text',
668 [
669 'label' => esc_html__('Register Button Text', 'easy-elements'),
670 'type' => Controls_Manager::TEXT,
671 'label_block' => true,
672 'default' => esc_html__('Register', 'easy-elements'),
673 'placeholder' => esc_html__('Enter text here', 'easy-elements'),
674 'dynamic' => [
675 'active' => true,
676 ],
677 'condition' => [
678 'form_type' => ['register', 'both'],
679 ],
680 ]
681 );
682
683 $this->add_control(
684 'submit_button_icon',
685 [
686 'label' => esc_html__('Icon', 'easy-elements'),
687 'type' => Controls_Manager::ICONS,
688 'default' => [
689 'value' => '',
690 'library' => '',
691 ],
692 ]
693 );
694
695 $this->add_control(
696 'submit_button_icon_position',
697 [
698 'label' => esc_html__('Icon Position', 'easy-elements'),
699 'type' => Controls_Manager::SELECT,
700 'default' => 'after',
701 'options' => [
702 'before' => esc_html__('Before Text', 'easy-elements'),
703 'after' => esc_html__('After Text', 'easy-elements'),
704 ],
705 'condition' => [
706 'submit_button_icon[value]!' => '',
707 ],
708 ]
709 );
710 $this->end_controls_section();
711
712
713 // ========================================
714 // CONTENT SECTION - Message
715 // ========================================
716 $this->start_controls_section(
717 'message_section',
718 [
719 'label' => esc_html__( 'Message', 'easy-elements' ),
720 'tab' => Controls_Manager::TAB_CONTENT,
721 ]
722 );
723 $this->add_control(
724 'show_success_message',
725 [
726 'label' => esc_html__( 'Show Success Message', 'easy-elements' ),
727 'type' => \Elementor\Controls_Manager::SWITCHER,
728 'label_on' => esc_html__( 'Show', 'easy-elements' ),
729 'label_off' => esc_html__( 'Hide', 'easy-elements' ),
730 'return_value' => 'yes',
731 'default' => 'yes',
732 ]
733 );
734 $this->add_control(
735 'login_success_message',
736 [
737 'label' => esc_html__( 'Login Succeess Message', 'easy-elements' ),
738 'type' => \Elementor\Controls_Manager::TEXTAREA,
739 'label_block' => true,
740 'default' => esc_html__( 'Login Success!', 'easy-elements' ),
741 'placeholder' => esc_html__( 'Type your message here', 'easy-elements' ),
742 'condition' => [
743 'form_type' => ['login', 'both'],
744 'show_success_message' => ['yes'],
745 ],
746 ]
747 );
748 $this->add_control(
749 'register_success_message',
750 [
751 'label' => esc_html__( 'Register Succeess Message', 'easy-elements' ),
752 'type' => \Elementor\Controls_Manager::TEXTAREA,
753 'label_block' => true,
754 'default' => esc_html__( 'Registration Success!', 'easy-elements' ),
755 'placeholder' => esc_html__( 'Type your message here', 'easy-elements' ),
756 'condition' => [
757 'form_type' => ['register', 'both'],
758 'show_success_message' => ['yes'],
759 ],
760 ]
761 );
762 $this->add_control(
763 'show_error_message',
764 [
765 'label' => esc_html__( 'Show Failed Message', 'easy-elements' ),
766 'type' => \Elementor\Controls_Manager::SWITCHER,
767 'label_on' => esc_html__( 'Show', 'easy-elements' ),
768 'label_off' => esc_html__( 'Hide', 'easy-elements' ),
769 'return_value' => 'yes',
770 'default' => 'yes',
771 ]
772 );
773 $this->add_control(
774 'login_error_message',
775 [
776 'label' => esc_html__( 'Login Failed Message', 'easy-elements' ),
777 'type' => \Elementor\Controls_Manager::TEXTAREA,
778 'label_block' => true,
779 'default' => esc_html__( 'Login failed! Enter correct email & password.', 'easy-elements' ),
780 'placeholder' => esc_html__( 'Type your message here', 'easy-elements' ),
781 'condition' => [
782 'form_type' => ['login', 'both'],
783 'show_error_message' => ['yes'],
784 ],
785 ]
786 );
787 $this->add_control(
788 'register_error_message',
789 [
790 'label' => esc_html__( 'Register Failed Message', 'easy-elements' ),
791 'type' => \Elementor\Controls_Manager::TEXTAREA,
792 'label_block' => true,
793 'default' => esc_html__( 'Registration Failed!', 'easy-elements' ),
794 'placeholder' => esc_html__( 'Type your message here', 'easy-elements' ),
795 'condition' => [
796 'form_type' => ['register', 'both'],
797 'show_error_message' => ['yes'],
798 ],
799 ]
800 );
801 $this->add_control(
802 'already_logged_in_message',
803 [
804 'label' => esc_html__( 'Already logged in Message', 'easy-elements' ),
805 'type' => \Elementor\Controls_Manager::TEXTAREA,
806 'label_block' => true,
807 'default' => esc_html__( 'You are already logged in. Goto Homepage', 'easy-elements' ),
808 'placeholder' => esc_html__( 'Type your message here', 'easy-elements' ),
809 ]
810 );
811 $this->add_control(
812 'empty_error_message',
813 [
814 'label' => esc_html__( 'Empty Message', 'easy-elements' ),
815 'type' => \Elementor\Controls_Manager::TEXTAREA,
816 'label_block' => true,
817 'default' => esc_html__( 'This field is required.', 'easy-elements' ),
818 'placeholder' => esc_html__( 'Type your message here', 'easy-elements' ),
819 ]
820 );
821 $this->add_control(
822 'confirm_pass_error_message',
823 [
824 'label' => esc_html__( 'Confirm Passowrd Error Message', 'easy-elements' ),
825 'type' => \Elementor\Controls_Manager::TEXTAREA,
826 'label_block' => true,
827 'default' => esc_html__( 'Confirm passowrd not matched', 'easy-elements' ),
828 'placeholder' => esc_html__( 'Type your message here', 'easy-elements' ),
829 ]
830 );
831 $this->add_control(
832 'min_length_error_message',
833 [
834 'label' => esc_html__( 'Minimum Characters Error Message', 'easy-elements' ),
835 'type' => \Elementor\Controls_Manager::TEXTAREA,
836 'label_block' => true,
837 'default' => esc_html__( 'Minimum {count} characters required.', 'easy-elements' ),
838 'placeholder' => esc_html__( 'Type your message here', 'easy-elements' ),
839 ]
840 );
841 $this->add_control(
842 'max_length_error_message',
843 [
844 'label' => esc_html__( 'Maximum Characters Error Message', 'easy-elements' ),
845 'type' => \Elementor\Controls_Manager::TEXTAREA,
846 'label_block' => true,
847 'default' => esc_html__( 'Maximum {count} characters required.', 'easy-elements' ),
848 'placeholder' => esc_html__( 'Type your message here', 'easy-elements' ),
849 ]
850 );
851 $this->end_controls_section();
852
853 // ========================================
854 // STYLE SECTION - Fields Style
855 // ========================================
856 $this->start_controls_section(
857 'form_fileds_style_section',
858 [
859 'label' => esc_html__( 'Fields', 'easy-elements' ),
860 'tab' => Controls_Manager::TAB_STYLE,
861 ]
862 );
863
864 $this->add_control(
865 'field_input_color',
866 [
867 'label' => esc_html__( 'Color', 'easy-elements' ),
868 'type' => Controls_Manager::COLOR,
869 'selectors' => [
870 '{{WRAPPER}} .eel-form-control' => 'color: {{VALUE}};',
871 ],
872 'separator' => 'before',
873 ]
874 );
875 $this->add_control(
876 'field_input_color_placeholder',
877 [
878 'label' => esc_html__( 'Placeholder Color', 'easy-elements' ),
879 'type' => Controls_Manager::COLOR,
880 'selectors' => [
881 '{{WRAPPER}} .eel-form-control::placeholder' => 'color: {{VALUE}};',
882 ],
883 ]
884 );
885
886 $this->add_control(
887 'field_wrapper_background_color',
888 [
889 'label' => esc_html__( 'Background Color', 'easy-elements' ),
890 'type' => Controls_Manager::COLOR,
891 'selectors' => [
892 '{{WRAPPER}} .eel-form-control, {{WRAPPER}} .eel-input-has-icon .eel-authentication-form-field:not(.eel-authentication-form-submit-field, {{WRAPPER}} .eel-authentication-form-cta-field) .eel-authentication-form-field-inner' => 'background-color: {{VALUE}};',
893 ],
894 ]
895 );
896
897 $this->add_group_control(
898 \Elementor\Group_Control_Typography::get_type(),
899 [
900 'name' => 'input_text_typography',
901 'selector' => '{{WRAPPER}} .eel-authentication-form .eel-form-control',
902 ]
903 );
904
905 $this->add_control(
906 'field_wrapper_padding',
907 [
908 'label' => esc_html__( 'Padding', 'easy-elements' ),
909 'type' => \Elementor\Controls_Manager::DIMENSIONS,
910 'size_units' => [ 'px', '%', 'em', 'rem', 'custom' ],
911 'selectors' => [
912 '{{WRAPPER}} .eel-authentication-form .eel-authentication-form-field-inner' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
913 ],
914 ]
915 );
916
917 $this->add_control(
918 'input_margin',
919 [
920 'label' => esc_html__( 'Margin', 'easy-elements' ),
921 'type' => \Elementor\Controls_Manager::DIMENSIONS,
922 'size_units' => [ 'px', '%', 'em', 'rem', 'custom' ],
923 'selectors' => [
924 '{{WRAPPER}} .eel-input-has-icon .eel-authentication-form-field:not(.eel-authentication-form-submit-field, {{WRAPPER}} .eel-authentication-form-cta-field) .eel-authentication-form-field-inner' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
925 ],
926 ]
927 );
928
929 $this->add_control(
930 'input_border_radius',
931 [
932 'label' => esc_html__( 'Border Radius', 'easy-elements' ),
933 'type' => Controls_Manager::DIMENSIONS,
934 'size_units' => [ 'px', '%' ],
935 'selectors' => [
936 '{{WRAPPER}} form:not(.eel-input-has-icon) .eel-authentication-form-field:not(.eel-authentication-form-submit-field, {{WRAPPER}} .eel-authentication-form-cta-field) .eel-form-control, {{WRAPPER}} .eel-input-has-icon .eel-authentication-form-field:not(.eel-authentication-form-submit-field, {{WRAPPER}} .eel-authentication-form-cta-field) .eel-authentication-form-field-inner' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
937 ],
938 ]
939 );
940
941 $this->add_group_control(
942 \Elementor\Group_Control_Border::get_type(),
943 [
944 'name' => 'field_wrapper_border',
945 'selector' => '{{WRAPPER}} form:not(.eel-input-has-icon) .eel-authentication-form-field:not(.eel-authentication-form-submit-field, {{WRAPPER}} .eel-authentication-form-cta-field) .eel-form-control, {{WRAPPER}} .eel-input-has-icon .eel-authentication-form-field:not(.eel-authentication-form-submit-field, {{WRAPPER}} .eel-authentication-form-cta-field) .eel-authentication-form-field-inner',
946 ]
947 );
948
949 $this->add_group_control(
950 \Elementor\Group_Control_Box_Shadow::get_type(),
951 [
952 'name' => 'field_wrapper_box_shadow',
953 'selector' => '{{WRAPPER}} form:not(.eel-input-has-icon) .eel-authentication-form-field:not(.eel-authentication-form-submit-field, {{WRAPPER}} .eel-authentication-form-cta-field) .eel-form-control, {{WRAPPER}} .eel-input-has-icon .eel-authentication-form-field:not(.eel-authentication-form-submit-field, {{WRAPPER}} .eel-authentication-form-cta-field) .eel-authentication-form-field-inner',
954 ]
955 );
956
957 $this->add_control(
958 'field_icon_styles',
959 [
960 'label' => esc_html__( 'Icons', 'easy-elements' ),
961 'type' => \Elementor\Controls_Manager::HEADING,
962 'separator' => 'before',
963 'condition' => [
964 'show_icon' => ['yes'],
965 ],
966 ]
967 );
968
969 $this->add_control(
970 'icon_color',
971 [
972 'label' => esc_html__( 'Color', 'easy-elements' ),
973 'type' => Controls_Manager::COLOR,
974 'selectors' => [
975 '{{WRAPPER}} .eel-authentication-form .eel-form-field-icon' => 'color: {{VALUE}};',
976 '{{WRAPPER}} .eel-authentication-form .eel-form-field-icon svg' => 'fill: {{VALUE}};',
977 ],
978 'condition' => [
979 'show_icon' => ['yes'],
980 ],
981 ]
982 );
983 $this->add_responsive_control(
984 'icon_size',
985 [
986 'label' => esc_html__('Icon Size', 'easy-elements'),
987 'type' => Controls_Manager::SLIDER,
988 'size_units' => ['px'],
989 'range' => [
990 'px' => [
991 'min' => 6,
992 'max' => 50,
993 ],
994 'em' => [
995 'min' => 0.5,
996 'max' => 10,
997 ],
998 ],
999 'default' => [
1000 'unit' => 'px',
1001 'size' => 18,
1002 ],
1003 'selectors' => [
1004 '{{WRAPPER}} .eel-authentication-form .eel-form-field-icon i' => 'font-size: {{SIZE}}{{UNIT}};',
1005 '{{WRAPPER}} .eel-authentication-form .eel-form-field-icon svg' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}};',
1006 ],
1007 'condition' => [
1008 'show_icon' => ['yes'],
1009 ],
1010 ]
1011 );
1012 $this->end_controls_section();
1013
1014
1015 // ========================================
1016 // STYLE SECTION - Fields Style
1017 // ========================================
1018 $this->start_controls_section(
1019 'form_label_style_section',
1020 [
1021 'label' => esc_html__( 'Label', 'easy-elements' ),
1022 'tab' => Controls_Manager::TAB_STYLE,
1023 'condition' => [
1024 'show_label' => ['yes'],
1025 ],
1026 ]
1027 );
1028
1029 $this->add_control(
1030 'field_label_color',
1031 [
1032 'label' => esc_html__( 'Color', 'easy-elements' ),
1033 'type' => Controls_Manager::COLOR,
1034 'selectors' => [
1035 '{{WRAPPER}} .eel-authentication-form .eel-authentication-form-label' => 'color: {{VALUE}};',
1036 ],
1037 'condition' => [
1038 'show_label' => ['yes'],
1039 ],
1040 ]
1041 );
1042
1043 $this->add_group_control(
1044 \Elementor\Group_Control_Typography::get_type(),
1045 [
1046 'name' => 'field_label_typography',
1047 'selector' => '{{WRAPPER}} .eel-authentication-form .eel-authentication-form-label',
1048 'separator' => 'before',
1049 'condition' => [
1050 'show_label' => ['yes'],
1051 ],
1052 ]
1053 );
1054
1055 $this->add_control(
1056 'field_label_margin',
1057 [
1058 'label' => esc_html__( 'Margin', 'easy-elements' ),
1059 'type' => \Elementor\Controls_Manager::DIMENSIONS,
1060 'size_units' => [ 'px', '%', 'em', 'rem', 'custom' ],
1061 'selectors' => [
1062 '{{WRAPPER}} .eel-authentication-form .eel-authentication-form-label' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1063 ],
1064 'condition' => [
1065 'show_label' => ['yes'],
1066 ],
1067 ]
1068 );
1069
1070 $this->end_controls_section();
1071
1072 // ========================================
1073 // STYLE SECTION - Links Style
1074 // ========================================
1075 $this->start_controls_section(
1076 'links_style_section',
1077 [
1078 'label' => esc_html__( 'Links', 'easy-elements' ),
1079 'tab' => Controls_Manager::TAB_STYLE,
1080 ]
1081 );
1082
1083 $this->add_control(
1084 'links_color',
1085 [
1086 'label' => esc_html__( 'Color', 'easy-elements' ),
1087 'type' => \Elementor\Controls_Manager::COLOR,
1088 'selectors' => [
1089 '{{WRAPPER}} .eel-authentication-form a' => 'color: {{VALUE}}',
1090 ],
1091 ]
1092 );
1093 $this->add_control(
1094 'links_color_hoevr',
1095 [
1096 'label' => esc_html__( 'Hover Color', 'easy-elements' ),
1097 'type' => \Elementor\Controls_Manager::COLOR,
1098 'selectors' => [
1099 '{{WRAPPER}} .eel-authentication-form a:hover' => 'color: {{VALUE}}',
1100 ],
1101 ]
1102 );
1103
1104 $this->add_group_control(
1105 \Elementor\Group_Control_Typography::get_type(),
1106 [
1107 'name' => 'links_typography',
1108 'selector' => '{{WRAPPER}} .eel-authentication-form a',
1109 ]
1110 );
1111
1112 // Border Control
1113 $this->add_group_control(
1114 Group_Control_Border::get_type(),
1115 [
1116 'name' => 'links_border',
1117 'selector' => '{{WRAPPER}} .eel-authentication-form .eel-authentication-form-field-inner.eel-authentication-form-links-field',
1118 ]
1119 );
1120 $this->end_controls_section();
1121
1122 // ========================================
1123 // STYLE SECTION - Submit Button Style
1124 // ========================================
1125 $this->start_controls_section(
1126 'submit_button_style_section',
1127 [
1128 'label' => esc_html__( 'Submit', 'easy-elements' ),
1129 'tab' => Controls_Manager::TAB_STYLE,
1130 ]
1131 );
1132
1133 $this->start_controls_tabs('submit_button_style_tabs');
1134
1135 $this->start_controls_tab(
1136 'submit_button_normal_tab',
1137 [
1138 'label' => esc_html__('Normal', 'easy-elements'),
1139 ]
1140 );
1141
1142 $this->add_control(
1143 'submit_button_color',
1144 [
1145 'label' => esc_html__( 'Color', 'easy-elements' ),
1146 'type' => Controls_Manager::COLOR,
1147 'selectors' => [
1148 '{{WRAPPER}} .eel-submit-button' => 'color: {{VALUE}};',
1149 '{{WRAPPER}} .eel-form-btn-icon svg path' => 'fill: {{VALUE}};',
1150 ],
1151 ]
1152 );
1153
1154 $this->add_group_control(
1155 \Elementor\Group_Control_Background::get_type(),
1156 [
1157 'name' => 'submit_button_background_color',
1158 'types' => [ 'classic', 'gradient', 'video' ],
1159 'selector' => '{{WRAPPER}} .eel-authentication-form .eel-submit-button',
1160 ]
1161 );
1162
1163 $this->add_control(
1164 'submit_button_wrapper_padding',
1165 [
1166 'label' => esc_html__( 'Padding', 'easy-elements' ),
1167 'type' => \Elementor\Controls_Manager::DIMENSIONS,
1168 'size_units' => [ 'px', '%', 'em', 'rem', 'custom' ],
1169 'selectors' => [
1170 '{{WRAPPER}} .eel-authentication-form .eel-submit-button' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1171 ],
1172 ]
1173 );
1174
1175 $this->add_control(
1176 'submit_button_wrapper_margin',
1177 [
1178 'label' => esc_html__( 'Margin', 'easy-elements' ),
1179 'type' => \Elementor\Controls_Manager::DIMENSIONS,
1180 'size_units' => [ 'px', '%', 'em', 'rem', 'custom' ],
1181 'selectors' => [
1182 '{{WRAPPER}} .eel-authentication-form .eel-submit-button' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1183 ],
1184 ]
1185 );
1186
1187 // Button Size Control
1188 $this->add_responsive_control(
1189 'submit_button_width',
1190 [
1191 'label' => esc_html__('Width', 'easy-elements'),
1192 'type' => Controls_Manager::SLIDER,
1193 'size_units' => ['px', '%', 'em'],
1194 'range' => [
1195 'px' => [
1196 'min' => 10,
1197 'max' => 500,
1198 ],
1199 'em' => [
1200 'min' => 0.5,
1201 'max' => 10,
1202 ],
1203 '%' => [
1204 'min' => 1,
1205 'max' => 100,
1206 ],
1207 ],
1208 'default' => [
1209 'unit' => '%',
1210 'size' => 100,
1211 ],
1212 'selectors' => [
1213 '{{WRAPPER}} .eel-authentication-form-field.eel-authentication-form-submit-field' => 'width: {{SIZE}}{{UNIT}};',
1214 ],
1215 ]
1216 );
1217
1218 // Border Radius Control
1219 $this->add_control(
1220 'submit_button_border_radius',
1221 [
1222 'label' => esc_html__( 'Border Radius', 'easy-elements' ),
1223 'type' => Controls_Manager::DIMENSIONS,
1224 'size_units' => [ 'px', '%' ],
1225 'selectors' => [
1226 '{{WRAPPER}} .eel-authentication-form .eel-submit-button' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1227 ],
1228 ]
1229 );
1230
1231 // Border Control
1232 $this->add_group_control(
1233 Group_Control_Border::get_type(),
1234 [
1235 'name' => 'submit_button_border',
1236 'selector' => '{{WRAPPER}} .eel-authentication-form .eel-submit-button',
1237 ]
1238 );
1239
1240 // Box Shadow Control
1241 $this->add_group_control(
1242 Group_Control_Box_Shadow::get_type(),
1243 [
1244 'name' => 'submit_button_box_shadow',
1245 'selector' => '{{WRAPPER}} .eel-authentication-form .eel-submit-button',
1246 ]
1247 );
1248
1249 // Icon Size Control
1250 $this->add_control(
1251 'submit_button_icon_size',
1252 [
1253 'label' => esc_html__( 'Icon Size', 'easy-elements' ),
1254 'type' => Controls_Manager::SLIDER,
1255 'size_units' => [ 'px', 'em' ],
1256 'range' => [
1257 'px' => [
1258 'min' => 10,
1259 'max' => 50,
1260 'step' => 1,
1261 ],
1262 'em' => [
1263 'min' => 0.5,
1264 'max' => 3,
1265 'step' => 0.1,
1266 ],
1267 ],
1268 'default' => [
1269 'unit' => 'px',
1270 'size' => 18,
1271 ],
1272 'selectors' => [
1273 '{{WRAPPER}} .eel-submit-button i' => 'font-size: {{SIZE}}{{UNIT}};',
1274 '{{WRAPPER}} .eel-submit-button svg' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}};',
1275 ],
1276 ]
1277 );
1278
1279 // Icon Horizontal Position
1280 $this->add_responsive_control(
1281 'submit_button_icon_position_x',
1282 [
1283 'label' => esc_html__( 'Icon Horizontal Position', 'easy-elements' ),
1284 'type' => Controls_Manager::SLIDER,
1285 'size_units' => [ 'px', '%', 'em' ],
1286 'range' => [
1287 'px' => [ 'min' => -100, 'max' => 100 ],
1288 '%' => [ 'min' => -100, 'max' => 100 ],
1289 'em' => [ 'min' => -5, 'max' => 5 ],
1290 ],
1291 'selectors' => [
1292 '{{WRAPPER}} .eel-form-btn-icon' => 'left: {{SIZE}}{{UNIT}};',
1293 ],
1294 ]
1295 );
1296
1297 // Icon Vertical Position
1298 $this->add_responsive_control(
1299 'submit_button_icon_position_y',
1300 [
1301 'label' => esc_html__( 'Icon Vertical Position', 'easy-elements' ),
1302 'type' => Controls_Manager::SLIDER,
1303 'size_units' => [ 'px', '%', 'em' ],
1304 'range' => [
1305 'px' => [ 'min' => -100, 'max' => 100 ],
1306 '%' => [ 'min' => -100, 'max' => 100 ],
1307 'em' => [ 'min' => -5, 'max' => 5 ],
1308 ],
1309 'selectors' => [
1310 '{{WRAPPER}} .eel-form-btn-icon' => 'top: {{SIZE}}{{UNIT}};',
1311 ],
1312 ]
1313 );
1314
1315
1316 $this->end_controls_tab();
1317
1318 $this->start_controls_tab(
1319 'submit_button_hover_tab',
1320 [
1321 'label' => esc_html__('Hover', 'easy-elements'),
1322 ]
1323 );
1324
1325 // Button Hover Color Control
1326 $this->add_control(
1327 'submit_button_hover_color',
1328 [
1329 'label' => esc_html__( 'Color', 'easy-elements' ),
1330 'type' => Controls_Manager::COLOR,
1331 'selectors' => [
1332 '{{WRAPPER}} .eel-authentication-form .eel-submit-button:hover' => 'color: {{VALUE}};',
1333 '{{WRAPPER}} .eel-authentication-form .eel-submit-button:hover svg path' => 'fill: {{VALUE}};',
1334 ],
1335 ]
1336 );
1337
1338 $this->add_group_control(
1339 \Elementor\Group_Control_Background::get_type(),
1340 [
1341 'name' => 'submit_button_hover_bg_color',
1342 'types' => [ 'classic', 'gradient', 'video' ],
1343 'selector' => '{{WRAPPER}} .eel-authentication-form .eel-submit-button:hover',
1344 ]
1345 );
1346
1347 $this->end_controls_tab();
1348 $this->end_controls_section();
1349
1350 $this->start_controls_section(
1351 'message_style_section',
1352 [
1353 'label' => esc_html__( 'Message', 'easy-elements' ),
1354 'tab' => Controls_Manager::TAB_STYLE,
1355 ]
1356 );
1357 $this->add_group_control(
1358 \Elementor\Group_Control_Typography::get_type(),
1359 [
1360 'name' => 'message_typography',
1361 'selector' => '{{WRAPPER}} .eel-authentication-form .eel-form-status',
1362 ]
1363 );
1364
1365 $this->add_control(
1366 'msg_padding',
1367 [
1368 'label' => esc_html__( 'Padding', 'easy-elements' ),
1369 'type' => \Elementor\Controls_Manager::DIMENSIONS,
1370 'size_units' => [ 'px', '%', 'em', 'rem', 'custom' ],
1371 'selectors' => [
1372 '{{WRAPPER}} .eel-authentication-form .eel-form-status' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1373 ],
1374 ]
1375 );
1376
1377 $this->add_control(
1378 'msg_margin',
1379 [
1380 'label' => esc_html__( 'Margin', 'easy-elements' ),
1381 'type' => \Elementor\Controls_Manager::DIMENSIONS,
1382 'size_units' => [ 'px', '%', 'em', 'rem', 'custom' ],
1383 'selectors' => [
1384 '{{WRAPPER}} .eel-authentication-form .eel-form-status' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1385 ],
1386 ]
1387 );
1388
1389 $this->add_control(
1390 'success_message_styles',
1391 [
1392 'label' => esc_html__( 'Success Message', 'easy-elements' ),
1393 'type' => \Elementor\Controls_Manager::HEADING,
1394 'separator' => 'before',
1395 ]
1396 );
1397
1398 $this->add_control(
1399 'success_message_color',
1400 [
1401 'label' => esc_html__( 'Color', 'easy-elements' ),
1402 'type' => \Elementor\Controls_Manager::COLOR,
1403 'selectors' => [
1404 '{{WRAPPER}} .eel-authentication-form .eel-form-status .eel-form-success-msg' => 'color: {{VALUE}}',
1405 ],
1406 ]
1407 );
1408 $this->add_control(
1409 'error_message_styles',
1410 [
1411 'label' => esc_html__( 'Failed Message', 'easy-elements' ),
1412 'type' => \Elementor\Controls_Manager::HEADING,
1413 'separator' => 'before',
1414 ]
1415 );
1416 $this->add_control(
1417 'error_message_color',
1418 [
1419 'label' => esc_html__( 'Color', 'easy-elements' ),
1420 'type' => \Elementor\Controls_Manager::COLOR,
1421 'selectors' => [
1422 '{{WRAPPER}} .eel-authentication-form .eel-form-status .eel-form-error-msg' => 'color: {{VALUE}}',
1423 ],
1424 ]
1425 );
1426
1427
1428 $this->end_controls_section();
1429 }
1430
1431 public function render_login_form($settings = [], $is_toggle = false) {
1432
1433 if ( is_user_logged_in() ) {
1434 $already_logged_in_message = !empty($settings['already_logged_in_message']) ? $settings['already_logged_in_message'] : 'You are already logged in. Goto Homepage';
1435 echo '<a href="'. esc_url(home_url()) .'">'. esc_html( $already_logged_in_message ) .'</a>';
1436 return;
1437 }
1438
1439 $show_ajax_loader = !empty($settings['show_ajax_loader']) ? $settings['show_ajax_loader'] : 'yes';
1440 $show_label = !empty($settings['show_label']) ? $settings['show_label'] : '';
1441 $show_icon = !empty($settings['show_icon']) ? $settings['show_icon'] : '';
1442 $show_icons = !empty($settings['show_icon']) ? 'eel-input-has-icon' : '';
1443 $show_success_message = !empty($settings['show_success_message']) ? $settings['show_success_message'] : 'yes';
1444 $show_error_message = !empty($settings['show_error_message']) ? $settings['show_error_message'] : 'yes';
1445 $login_success_message = !empty($settings['login_success_message']) ? $settings['login_success_message'] : 'Login Success';
1446 $login_error_message = !empty($settings['login_error_message']) ? $settings['login_error_message'] : 'Login failed! Enter correct email & password.';
1447 $empty_error_message = !empty($settings['empty_error_message']) ? $settings['empty_error_message'] : 'This field is required.';
1448
1449 $show_password_reset_link = !empty($settings['show_password_reset_link']) ? $settings['show_password_reset_link'] : 'yes';
1450 $password_reset_text = !empty($settings['password_reset_text']) ? $settings['password_reset_text'] : '';
1451
1452 $remember_me = !empty($settings['remember_me']) ? $settings['remember_me'] : '';
1453 $remember_label_text = !empty($settings['remember_label_text']) ? $settings['remember_label_text'] : 'Remember Me';
1454 $submit_button_text = !empty($settings['submit_button_text']) ? $settings['submit_button_text'] : 'Log in';
1455 $submit_button_icon = !empty($settings['submit_button_icon']['value']) ? $settings['submit_button_icon'] : '';
1456 $submit_button_icon_position = !empty($settings['submit_button_icon_position']) ? $settings['submit_button_icon_position'] : '';
1457
1458 $redirect_after_login = !empty($settings['redirect_after_login']) ? $settings['redirect_after_login'] : 'yes';
1459 $redirect_link_after_login = !empty($settings['redirect_link_after_login']['url']) ? $settings['redirect_link_after_login']['url'] : home_url();
1460
1461
1462 $login_fields = !empty($settings['login_fields']) ? $settings['login_fields'] : '';
1463
1464 ?>
1465 <form method="post" class="eel-authentication-form eel-login-form <?php echo esc_attr( $show_icons ); ?>" <?php echo $is_toggle ? 'data-form-name="login"' : ''; ?>>
1466 <?php wp_nonce_field( 'easy_elements_nonce', 'eel_login_nonce' ); ?>
1467 <input type="hidden" name="login_redirect_link" value="<?php echo esc_url( $redirect_link_after_login )?>">
1468 <input type="hidden" name="empty_error_msg" value="<?php echo esc_attr( $empty_error_message )?>">
1469 <?php
1470 if(!empty($login_fields) && is_array($login_fields)) {
1471 foreach ($login_fields as $field) {
1472 $type = !empty($field['type']) ? $field['type'] : 'username';
1473 $id = 'eel_' . $type;
1474 $label = !empty($field['label']) ? $field['label'] : '';
1475 $placeholder = !empty($field['placeholder']) ? $field['placeholder'] : '';
1476 $icon = !empty($field['icon']['value']) ? $field['icon'] : '';
1477 $is_required = !empty($field['is_required']) ? 'required' : '';
1478 $static_text = !empty($field['static_text']) ? $field['static_text'] : '';
1479
1480
1481 if($type =='static_text' && !empty($static_text)) {
1482 ?>
1483 <div class="eel-authentication-form-field eel-authentication-form-static-field">
1484 <div class="eel-authentication-form-field-inner">
1485 <div class="eel-form-control-wrap">
1486 <?php echo wp_kses_post( $static_text ); ?>
1487 </div>
1488 </div>
1489 </div>
1490 <?php
1491 }else{
1492 ?>
1493 <div class="eel-authentication-form-field">
1494 <div class="eel-authentication-form-field-inner">
1495 <?php if ($show_icon == 'yes' && !empty($icon['value'])): ?>
1496 <span class="eel-form-field-icon">
1497 <?php \Elementor\Icons_Manager::render_icon( $icon, [ 'aria-hidden' => 'true' ] ); ?>
1498 </span>
1499 <?php endif; ?>
1500 <div class="eel-form-control-wrap">
1501 <?php
1502 if($show_label == 'yes' && !empty($label)) {
1503 ?>
1504 <label for="<?php echo esc_attr( $id ) ?>" class="eel-authentication-form-label"><?php echo esc_html( $label ); ?></label>
1505 <?php
1506 }
1507 ?>
1508 <input type="<?php echo esc_attr( $type === 'password' ? 'password' : 'text' ); ?>" name="<?php echo esc_attr( $type ) ?>" class="eel-form-control" id="<?php echo esc_attr( $id ) ?>" placeholder="<?php echo esc_attr( $placeholder ) ?>" <?php echo esc_attr( $is_required ) ?> autocomplete />
1509 </div>
1510 </div>
1511 <div class="eel-error-msg" data-error-for="<?php echo esc_attr( $id )?>"></div>
1512 </div>
1513 <?php
1514 }
1515
1516
1517 }
1518 }
1519 ?>
1520 <?php
1521 if($remember_me == 'yes' || $show_password_reset_link == 'yes') { ?>
1522 <div class="eel-authentication-form-field eel-authentication-form-checkbox-field">
1523 <div class="eel-authentication-form-field-inner">
1524 <div class="eel-form-control-wrap">
1525 <?php if($remember_me == 'yes') { ?>
1526 <label class="eel-authentication-form-label">
1527 <input type="checkbox" name="eel_rememberme" id="eel_rememberme" value="forever" />
1528 <?php echo esc_attr( $remember_label_text )?>
1529 </label>
1530 <?php } ?>
1531 <?php
1532 if($show_password_reset_link == 'yes') { ?>
1533 <a href="<?php echo esc_url( wp_lostpassword_url() )?>" target="_blank"><?php echo esc_html( $password_reset_text ) ?></a>
1534 <?php } ?>
1535 </div>
1536 </div>
1537 </div>
1538 <?php } ?>
1539
1540
1541 <div class="eel-authentication-form-field eel-authentication-form-submit-field">
1542 <div class="eel-authentication-form-field-inner">
1543 <div class="eel-form-control-wrap">
1544 <button type="submit" name="eel_login_submit" class="eel-submit-button">
1545 <?php
1546 if(!empty($submit_button_icon) && $submit_button_icon_position == 'before') {
1547 ?>
1548 <span class="eel-form-btn-icon">
1549 <?php \Elementor\Icons_Manager::render_icon( $submit_button_icon, [ 'aria-hidden' => 'true' ] ); ?>
1550 </span>
1551 <?php
1552 }
1553 ?>
1554 <span class="eel-form-btn-text"><?php echo esc_attr( $submit_button_text )?></span>
1555 <?php
1556 if(!empty($submit_button_icon) && $submit_button_icon_position == 'after') {
1557 ?>
1558 <span class="eel-form-btn-icon">
1559 <?php \Elementor\Icons_Manager::render_icon( $submit_button_icon, [ 'aria-hidden' => 'true' ] ); ?>
1560 </span>
1561 <?php
1562 }
1563 ?>
1564 <?php
1565 if($show_ajax_loader == 'yes') { ?>
1566 <span class="eel-form-ajax-loader">
1567 <img src="<?php echo esc_url( EASYELEMENTS_DIR_URL . 'widgets/login-register/img/ajax-loader.gif' )?>" alt="ajax loader">
1568 </span>
1569 <?php } ?>
1570 </button>
1571 </div>
1572 </div>
1573 </div>
1574
1575 <?php
1576 if($is_toggle) { ?>
1577 <div class="eel-authentication-form-field eel-authentication-form-cta-field">
1578 <div class="eel-authentication-form-field-inner">
1579 <div class="eel-form-control-wrap eel-form-switcher" data-switch-to="register">
1580 <?php echo esc_html__( "Don't have an account?", 'easy-elements' ); ?>
1581 <span class="eel-switch-link"><?php echo esc_html__( 'Sign Up', 'easy-elements' ); ?></span>
1582 </div>
1583 </div>
1584 </div>
1585 <?php } ?>
1586
1587 <div class="eel-form-status">
1588 <?php
1589 if($show_error_message == 'yes') {
1590 ?>
1591 <p class="eel-form-error-msg"><?php echo esc_html( $login_error_message )?></p>
1592 <?php
1593 }
1594 if($show_success_message == 'yes') {
1595 ?>
1596 <p class="eel-form-success-msg"><?php echo esc_html( $login_success_message )?></p>
1597 <?php
1598 }
1599 ?>
1600 </div>
1601
1602 </form>
1603 <?php
1604
1605 }
1606
1607 public function render_register_form($settings = [], $is_toggle = false) {
1608 $show_ajax_loader = !empty($settings['show_ajax_loader']) ? $settings['show_ajax_loader'] : 'yes';
1609 $show_label = !empty($settings['show_label']) ? $settings['show_label'] : '';
1610 $show_icon = !empty($settings['show_icon']) ? $settings['show_icon'] : '';
1611 $show_icons = !empty($settings['show_icon']) ? 'eel-input-has-icon' : '';
1612
1613 $show_success_message = !empty($settings['show_success_message']) ? $settings['show_success_message'] : 'yes';
1614 $show_error_message = !empty($settings['show_error_message']) ? $settings['show_error_message'] : 'yes';
1615 $register_success_message = !empty($settings['register_success_message']) ? $settings['register_success_message'] : 'Register Success';
1616 $register_error_message = !empty($settings['register_error_message']) ? $settings['register_error_message'] : 'Registration Failed';
1617 $empty_error_message = !empty($settings['empty_error_message']) ? $settings['empty_error_message'] : 'This field is required.';
1618 $confirm_pass_error_message = !empty($settings['confirm_pass_error_message']) ? $settings['confirm_pass_error_message'] : 'Confirm passowrd not matched';
1619 $min_length_error_message = !empty($settings['min_length_error_message']) ? $settings['min_length_error_message'] : 'Minimum {count} characters required.';
1620 $max_length_error_message = !empty($settings['max_length_error_message']) ? $settings['max_length_error_message'] : 'Maximum {count} characters required.';
1621
1622 $submit_button_text = !empty($settings['register_button_text']) ? $settings['register_button_text'] : 'Register';
1623 $submit_button_icon = !empty($settings['submit_button_icon']) ? $settings['submit_button_icon'] : '';
1624 $submit_button_icon_position = !empty($settings['submit_button_icon_position']) ? $settings['submit_button_icon_position'] : '';
1625
1626 $register_options = ( !empty($settings['register_options']) && is_array($settings['register_options']) ) ? $settings['register_options'] : [];
1627 $auto_login_after_registration = in_array( 'auto_login', $register_options, true ) ? 'yes' : 'no';
1628 $send_new_user_email = in_array( 'notify_email', $register_options, true ) ? 'yes' : 'no';
1629 $redirect_after_register = in_array( 'redirect', $register_options, true ) ? 'yes' : 'no';
1630 $redirect_link_after_register = !empty($settings['redirect_link_after_registration']['url']) ? $settings['redirect_link_after_registration']['url'] : home_url();
1631 $notify_admin_email = !empty($settings['notify_admin_email']) ? $settings['notify_admin_email'] : 'no';
1632
1633 $register_fields = !empty($settings['register_fields']) ? $settings['register_fields'] : '';
1634
1635
1636
1637 ?>
1638 <form method="post" class="eel-authentication-form eel-register-form <?php echo esc_attr( $show_icons ); ?>" <?php echo $is_toggle ? 'data-form-name="register"' : ''; ?>>
1639 <?php
1640 wp_nonce_field( 'easy_elements_nonce', 'eel_register_nonce' );
1641 $auto_login_value = ( $auto_login_after_registration === 'yes' ) ? 'yes' : 'no';
1642 $send_new_user_email_value = ( $send_new_user_email === 'yes' ) ? 'yes' : 'no';
1643 $redirect_after_register_value = ( $redirect_after_register === 'yes' ) ? 'yes' : 'no';
1644 $notify_admin_email_value = ( $notify_admin_email === 'yes' ) ? 'yes' : 'no';
1645 ?>
1646 <input type="hidden" name="register_redirect_link" value="<?php echo esc_url( $redirect_link_after_register )?>">
1647 <input type="hidden" name="redirect_after_registration" value="<?php echo esc_attr( $redirect_after_register_value )?>">
1648 <input type="hidden" name="auto_login_after_registration" value="<?php echo esc_attr( $auto_login_value )?>">
1649 <input type="hidden" name="send_new_user_email" value="<?php echo esc_attr( $send_new_user_email_value )?>">
1650 <input type="hidden" name="notify_admin_email" value="<?php echo esc_attr( $notify_admin_email_value )?>">
1651 <input type="hidden" name="empty_error_msg" value="<?php echo esc_attr( $empty_error_message )?>">
1652 <input type="hidden" name="min_length_error_msg" value="<?php echo esc_attr( $min_length_error_message )?>">
1653 <input type="hidden" name="max_length_error_msg" value="<?php echo esc_attr( $max_length_error_message )?>">
1654 <input type="hidden" name="confirm_pass_error_msg" value="<?php echo esc_attr( $confirm_pass_error_message )?>">
1655 <?php
1656 if(!empty($register_fields) && is_array($register_fields)) {
1657 foreach ($register_fields as $field) {
1658
1659 $type = !empty($field['type']) ? $field['type'] : 'username';
1660 $input_type = $type == 'custom' && !empty($field['input_type']) ? $field['input_type'] : 'text';
1661 $meta_key = !empty($field['meta_key']) ? $field['meta_key'] : '';
1662 $id = 'eel_' . $type;
1663 $label = !empty($field['label']) ? $field['label'] : '';
1664 $placeholder = !empty($field['placeholder']) ? $field['placeholder'] : '';
1665 $icon = !empty($field['icon']['value']) ? $field['icon'] : '';
1666 $is_required = !empty($field['is_required']) ? 'required' : '';
1667 $static_text = !empty($field['static_text']) ? $field['static_text'] : '';
1668 $min_length = !empty($field['min_length']) ? $field['min_length'] : '1';
1669 $max_length = !empty($field['max_length']) ? $field['max_length'] : '';
1670 $width = !empty($field['width']['size']) ? $field['width']['size'] . $field['width']['unit'] : '';
1671
1672 if($type =='custom' && !empty($meta_key)){
1673 $type = 'custom_meta[' . $meta_key . ']';
1674 $id = 'eel_' . $meta_key;
1675 }
1676
1677 if($type =='easyel_consent') {
1678 ?>
1679 <div class="eel-authentication-form-field eel-authentication-form-checkbox-field" <?php echo !empty($width) ? 'style="width: '.esc_attr( $width ).';"' : '' ?>>
1680 <div class="eel-authentication-form-field-inner">
1681 <div class="eel-form-control-wrap">
1682 <label class="eel-authentication-form-label">
1683 <input type="checkbox" name="<?php echo esc_attr( $type ) ?>" id="<?php echo esc_attr( $id ) ?>" <?php echo esc_attr( $is_required ) ?>/>
1684 <?php echo esc_attr( $label )?>
1685 </label>
1686 </div>
1687 </div>
1688 <div class="eel-error-msg" data-error-for="<?php echo esc_attr( $id )?>"></div>
1689 </div>
1690 <?php
1691 }elseif($type =='static_text' && !empty($static_text)) {
1692 ?>
1693 <div class="eel-authentication-form-field eel-authentication-form-static-field" <?php echo !empty($width) ? 'style="width: '.esc_attr( $width ).';"' : '' ?>>
1694 <div class="eel-authentication-form-field-inner">
1695 <div class="eel-form-control-wrap">
1696 <?php echo wp_kses_post( $static_text ); ?>
1697 </div>
1698 </div>
1699 </div>
1700 <?php
1701 }else{
1702 ?>
1703 <div class="eel-authentication-form-field" <?php echo !empty($width) ? 'style="width: '.esc_attr( $width ).';"' : '' ?>>
1704 <div class="eel-authentication-form-field-inner">
1705 <?php if ($show_icon == 'yes' && !empty($icon['value'])): ?>
1706 <span class="eel-form-field-icon eel-user-icon">
1707 <?php \Elementor\Icons_Manager::render_icon( $icon, [ 'aria-hidden' => 'true' ] ); ?>
1708 </span>
1709 <?php endif; ?>
1710 <div class="eel-form-control-wrap">
1711 <?php
1712 if($show_label == 'yes' && !empty($label)) {
1713 ?>
1714 <label for="<?php echo esc_attr( $id ) ?>" class="eel-authentication-form-label"><?php echo esc_html( $label ); ?></label>
1715 <?php
1716 }
1717 ?>
1718 <input type="<?php echo esc_attr( in_array( $type, ['user_pass', 'confirm_password'] ) ? 'password' : ( $type === 'user_email' ? 'email' : 'text' ) ); ?>" name="<?php echo esc_attr( $type ) ?>" class="eel-form-control" id="<?php echo esc_attr( $id ) ?>" placeholder="<?php echo esc_attr( $placeholder ) ?>" <?php echo esc_attr( $is_required ) ?> min="<?php echo esc_attr( $min_length )?>" max="<?php echo esc_attr( $max_length )?>"/>
1719 </div>
1720 </div>
1721 <div class="eel-error-msg" data-error-for="<?php echo esc_attr( $id )?>"></div>
1722 </div>
1723 <?php
1724 }
1725
1726
1727 }
1728 }
1729 ?>
1730 <?php
1731 $enable_math_captcha = !empty($settings['enable_math_captcha']) ? $settings['enable_math_captcha'] : '';
1732 if($enable_math_captcha == 'yes') {
1733 $math_captcha_error_message = !empty($settings['math_captcha_error_message']) ? $settings['math_captcha_error_message'] : esc_html__( 'Incorrect answer to the math question.', 'easy-elements' );
1734 $eel_captcha_a = wp_rand( 1, 9 );
1735 $eel_captcha_b = wp_rand( 1, 9 );
1736 $eel_captcha_answer = $eel_captcha_a + $eel_captcha_b;
1737 $eel_captcha_hash = wp_hash( (string) $eel_captcha_answer );
1738 ?>
1739 <div class="eel-authentication-form-field eel-authentication-form-captcha-field">
1740 <div class="eel-authentication-form-field-inner">
1741 <div class="eel-form-control-wrap">
1742 <div class="eel-math-captcha-question">
1743 <span class="eel-math-captcha-equation"><?php echo esc_html( $eel_captcha_a . ' + ' . $eel_captcha_b . ' equals?' ); ?></span>
1744 </div>
1745 <input type="text" name="eel_math_captcha" class="eel-form-control" id="eel_math_captcha" inputmode="numeric" autocomplete="off" required />
1746 <input type="hidden" name="eel_math_captcha_hash" value="<?php echo esc_attr( $eel_captcha_hash ); ?>">
1747 <input type="hidden" name="math_captcha_error_msg" value="<?php echo esc_attr( $math_captcha_error_message ); ?>">
1748 </div>
1749 </div>
1750 <div class="eel-error-msg" data-error-for="eel_math_captcha"></div>
1751 </div>
1752 <?php
1753 }
1754 ?>
1755 <div class="eel-authentication-form-field eel-authentication-form-submit-field">
1756 <div class="eel-authentication-form-field-inner">
1757 <div class="eel-form-control-wrap">
1758 <button type="submit" name="eel_login_submit" class="eel-submit-button">
1759 <?php
1760 if(!empty($submit_button_icon) && $submit_button_icon_position == 'before') {
1761 ?>
1762 <span class="eel-form-btn-icon">
1763 <?php \Elementor\Icons_Manager::render_icon( $submit_button_icon, [ 'aria-hidden' => 'true' ] ); ?>
1764 </span>
1765 <?php
1766 }
1767 ?>
1768 <span class="eel-form-btn-text"><?php echo esc_attr( $submit_button_text )?></span>
1769 <?php
1770 if(!empty($submit_button_icon) && $submit_button_icon_position == 'after') {
1771 ?>
1772 <span class="eel-form-btn-icon">
1773 <?php \Elementor\Icons_Manager::render_icon( $submit_button_icon, [ 'aria-hidden' => 'true' ] ); ?>
1774 </span>
1775 <?php
1776 }
1777 ?>
1778 <?php
1779 if($show_ajax_loader == 'yes') { ?>
1780 <span class="eel-form-ajax-loader">
1781 <img src="<?php echo esc_url( EASYELEMENTS_DIR_URL . 'widgets/login-register/img/ajax-loader.gif' )?>" alt="ajax loader">
1782 </span>
1783 <?php } ?>
1784 </button>
1785 </div>
1786 </div>
1787 </div>
1788 <?php
1789 if($is_toggle) { ?>
1790 <div class="eel-authentication-form-field eel-authentication-form-cta-field">
1791 <div class="eel-authentication-form-field-inner">
1792 <div class="eel-form-control-wrap eel-form-switcher" data-switch-to="login">
1793 <?php echo esc_html__( 'Already have an account?', 'easy-elements' ); ?>
1794 <span class="eel-switch-link"><?php echo esc_html__( 'Login', 'easy-elements' ); ?></span>
1795 </div>
1796 </div>
1797 </div>
1798 <?php } ?>
1799
1800 <div class="eel-form-status">
1801 <?php
1802 if($show_error_message == 'yes') {
1803 ?>
1804 <p class="eel-form-error-msg"><?php echo esc_html( $register_error_message )?></p>
1805 <?php
1806 }
1807 if($show_success_message == 'yes') {
1808 ?>
1809 <p class="eel-form-success-msg"><?php echo esc_html( $register_success_message )?></p>
1810 <?php
1811 }
1812 ?>
1813
1814
1815 </div>
1816
1817 </form>
1818 <?php
1819
1820 }
1821
1822 /**
1823 * Render widget output on the frontend
1824 *
1825 * Generates the HTML markup for the login registers
1826 */
1827 protected function render() {
1828 $settings = $this->get_settings_for_display();
1829 $form_type = !empty($settings['form_type']) ? $settings['form_type'] : 'login';
1830
1831 if($form_type == 'login') {
1832 $this->render_login_form($settings);
1833 }elseif($form_type == 'register') {
1834 $this->render_register_form($settings);
1835 }else{
1836 $default_form = ( ! empty( $settings['default_form'] ) && $settings['default_form'] === 'register' ) ? 'register' : 'login';
1837 ?>
1838 <div class="eel-authentication-toggle-wrap" data-active-form="<?php echo esc_attr( $default_form ); ?>">
1839 <?php
1840 $this->render_login_form($settings, true);
1841 $this->render_register_form($settings, true);
1842 ?>
1843 </div>
1844 <?php
1845 }
1846
1847 }
1848
1849 }