PluginProbe ʕ •ᴥ•ʔ
Shortcodes and extra features for Phlox theme / 2.5.8
Shortcodes and extra features for Phlox theme v2.5.8
2.17.21 2.17.20 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.6 1.0.9 1.1.0 1.3.0 1.3.1 1.3.10 1.3.14 1.3.2 1.3.3 1.3.6 1.4.0 1.4.1 1.4.2 1.5.0 1.5.2 1.6.0 1.6.2 1.6.4 1.7.0 1.7.2 2.10.0 2.10.1 2.10.3 2.10.5 2.10.7 2.10.8 2.10.9 2.11.0 2.11.1 2.11.2 2.12.0 2.14.0 2.15.0 2.15.2 2.15.4 2.15.5 2.15.6 2.15.7 2.15.8 2.15.9 2.16.0 2.16.1 2.16.2 2.16.3 2.16.4 2.17.0 2.17.1 2.17.12 2.17.13 2.17.14 2.17.15 2.17.16 2.17.2 2.17.3 2.17.4 2.17.5 2.17.6 2.17.8 2.17.9 2.4.12 2.4.13 2.4.14 2.4.16 2.4.18 2.4.19 2.4.9 2.5.0 2.5.1 2.5.10 2.5.11 2.5.12 2.5.13 2.5.14 2.5.15 2.5.16 2.5.17 2.5.19 2.5.2 2.5.20 2.5.3 2.5.7 2.5.8 2.5.9 2.6.0 2.6.1 2.6.10 2.6.12 2.6.13 2.6.14 2.6.15 2.6.16 2.6.17 2.6.19 2.6.2 2.6.20 2.6.4 2.6.5 2.6.7 2.7.0 2.7.1 2.7.10 2.7.11 2.7.12 2.7.13 2.7.14 2.7.2 2.7.3 2.7.4 2.7.5 2.7.6 2.7.7 2.7.8 2.7.9 2.8.0 2.8.1 2.8.2 2.8.3 2.8.4 2.8.5 2.8.6 2.8.7 2.8.9 2.9.0 2.9.12 2.9.14 2.9.15 2.9.16 2.9.17 2.9.18 2.9.19 2.9.2 2.9.20 2.9.21 2.9.22 2.9.3 2.9.4 2.9.5 2.9.6 2.9.7 2.9.8
auxin-elements / includes / elementor / widgets / contact-form.php
auxin-elements / includes / elementor / widgets Last commit date
theme-elements 6 years ago accordion.php 6 years ago audio.php 6 years ago before-after.php 6 years ago button.php 6 years ago carousel-navigation.php 6 years ago contact-box.php 6 years ago contact-form.php 6 years ago custom-list.php 6 years ago divider.php 6 years ago gallery.php 6 years ago gmap.php 6 years ago heading-modern.php 6 years ago icon.php 6 years ago image.php 6 years ago mailchimp.php 6 years ago modern-button.php 6 years ago quote.php 6 years ago recent-comments.php 6 years ago recent-posts-grid-carousel.php 6 years ago recent-posts-land-style.php 6 years ago recent-posts-masonry.php 6 years ago recent-posts-tiles-carousel.php 6 years ago recent-posts-tiles.php 6 years ago recent-posts-timeline.php 6 years ago recent-products.php 6 years ago search.php 6 years ago staff.php 6 years ago svg.php 6 years ago tabs.php 6 years ago testimonial.php 6 years ago text.php 6 years ago touch-slider.php 6 years ago video.php 6 years ago
contact-form.php
1777 lines
1 <?php
2 namespace Auxin\Plugin\CoreElements\Elementor\Elements;
3
4 use Elementor\Plugin;
5 use Elementor\Widget_Base;
6 use Elementor\Controls_Manager;
7 use Elementor\Group_Control_Typography;
8 use Elementor\Group_Control_Background;
9 use Elementor\Group_Control_Box_Shadow;
10 use Elementor\Scheme_Typography;
11 use Elementor\Group_Control_Border;
12
13
14 if ( ! defined( 'ABSPATH' ) ) {
15 exit; // Exit if accessed directly.
16 }
17
18 /**
19 * Elementor 'Contact_Form' widget.
20 *
21 * Elementor widget that displays an 'Contact_Form' with lightbox.
22 *
23 * @since 1.0.0
24 */
25 class ContactForm extends Widget_Base {
26
27 /**
28 * Get widget name.
29 *
30 * Retrieve 'Contact_Form' widget name.
31 *
32 * @since 1.0.0
33 * @access public
34 *
35 * @return string Widget name.
36 */
37 public function get_name() {
38 return 'aux_contact_form';
39 }
40
41 /**
42 * Get widget title.
43 *
44 * Retrieve 'Contact_Form' widget title.
45 *
46 * @since 1.0.0
47 * @access public
48 *
49 * @return string Widget title.
50 */
51 public function get_title() {
52 return __('Contact Form', 'auxin-elements' );
53 }
54
55 /**
56 * Get widget icon.
57 *
58 * Retrieve 'Contact_Form' widget icon.
59 *
60 * @since 1.0.0
61 * @access public
62 *
63 * @return string Widget icon.
64 */
65 public function get_icon() {
66 return 'eicon-form-horizontal auxin-badge';
67 }
68
69 /**
70 * Get widget categories.
71 *
72 * Retrieve 'Contact_Form' widget icon.
73 *
74 * @since 1.0.0
75 * @access public
76 *
77 * @return string Widget icon.
78 */
79 public function get_categories() {
80 return ['auxin-core'];
81 }
82
83 /**
84 * Register 'Contact_Form' widget controls.
85 *
86 * Adds different input fields to allow the user to change and customize the widget settings.
87 *
88 * @since 1.0.0
89 * @access protected
90 */
91 protected function _register_controls() {
92
93 /*-----------------------------------------------------------------------------------*/
94 /* contact_section
95 /*-----------------------------------------------------------------------------------*/
96
97 $this->start_controls_section(
98 'contact_section',
99 array(
100 'label' => __('Contact', 'auxin-elements' ),
101 )
102 );
103
104 $this->add_control(
105 'type',
106 array(
107 'label' => __('Contact form Type','auxin-elements' ),
108 'description' => __('Specifies contact form element\'s type. Whether to use built-in form or Contact Form 7.', 'auxin-elements' ),
109 'label_block' => true,
110 'type' => Controls_Manager::SELECT,
111 'default' => 'phlox',
112 'options' => array(
113 'phlox' => __('Phlox Contact Form', 'auxin-elements' ),
114 'cf7' => __('Contact Form 7 Shortcode', 'auxin-elements' ),
115 )
116 )
117 );
118
119 $this->add_control(
120 'cf7_shortcode',
121 array(
122 'label' => __('Shortcode','auxin-elements' ),
123 'description' => __('Put a Contact Form 7 shortcode that you have already created.','auxin-elements' ),
124 'type' => Controls_Manager::TEXT,
125 'label_block' => true,
126 'separator' => 'before',
127 'condition' => [
128 'type' => ['cf7']
129 ],
130 )
131 );
132
133 $this->add_control(
134 'email',
135 array(
136 'label' => __('Email','auxin-elements' ),
137 'description' => __('Email address of message\'s recipient', 'auxin-elements' ),
138 'type' => Controls_Manager::TEXT,
139 'label_block' => true,
140 'input_type' => 'email',
141 'separator' => 'before',
142 'condition' => [
143 'type' => ['phlox']
144 ]
145 )
146 );
147
148 $this->end_controls_section();
149
150 /*-----------------------------------------------------------------------------------*/
151 /* Style TAB
152 /*-----------------------------------------------------------------------------------*/
153
154 /* -------------------------------------------------------------------------- */
155 /* General inputs
156 /* -------------------------------------------------------------------------- */
157
158 $this->start_controls_section(
159 'general_input_section',
160 [
161 'label' => __('All Inputs', 'auxin-elements' ),
162 'tab' => Controls_Manager::TAB_STYLE,
163 ]
164 );
165
166 $this->add_group_control(
167 Group_Control_Typography::get_type(),
168 [
169 'name' => 'general_input_typography',
170 'label' => __( 'Typography', 'auxin-elements' ),
171 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
172 'selector' => '{{WRAPPER}} input:not([type="submit"])'
173 ]
174 );
175
176 $this->add_control(
177 'general_input_color',
178 [
179 'label' => __( 'Color', 'auxin-elements' ),
180 'type' => Controls_Manager::COLOR,
181 'selectors' => [
182 '{{WRAPPER}} input:not([type="submit"])' => 'color: {{VALUE}};'
183 ]
184 ]
185 );
186
187 $this->add_responsive_control(
188 'general_input_width',
189 [
190 'label' => __( 'Width', 'auxin-elements' ),
191 'size_units' => [ 'px','em', '%'],
192 'type' => Controls_Manager::SLIDER,
193 'range' => [
194 'px' => [
195 'min' => 0,
196 'max' => 1000,
197 'step' => 5,
198 ],
199 '%' => [
200 'min' => 0,
201 'max' => 100,
202 ],
203 'em' => [
204 'min' => 0,
205 'max' => 100,
206 ],
207 ],
208 'selectors' => [
209 '{{WRAPPER}} input:not([type="submit"])' => 'width: {{SIZE}}{{UNIT}};'
210 ]
211 ]
212 );
213
214 $this->add_responsive_control(
215 'general_input_max_width',
216 [
217 'label' => __( 'Max Width', 'auxin-elements' ),
218 'size_units' => [ 'px','em', '%'],
219 'type' => Controls_Manager::SLIDER,
220 'range' => [
221 'px' => [
222 'min' => 0,
223 'max' => 1000,
224 'step' => 5
225 ],
226 '%' => [
227 'min' => 0,
228 'max' => 100
229 ],
230 'em' => [
231 'min' => 0,
232 'max' => 100
233 ]
234 ],
235 'selectors' => [
236 '{{WRAPPER}} input:not([type="submit"])' => 'max-width: {{SIZE}}{{UNIT}};'
237 ]
238 ]
239 );
240
241 $this->add_responsive_control(
242 'general_input_height',
243 [
244 'label' => __( 'Height', 'auxin-elements' ),
245 'size_units' => [ 'px', 'em'],
246 'type' => Controls_Manager::SLIDER,
247 'range' => [
248 'px' => [
249 'min' => 0,
250 'max' => 1000,
251 'step' => 5
252 ],
253 '%' => [
254 'min' => 0,
255 'max' => 100
256 ],
257 'em' => [
258 'min' => 0,
259 'max' => 100
260 ]
261 ],
262 'selectors' => [
263 '{{WRAPPER}} input:not([type="submit"])' => 'height: {{SIZE}}{{UNIT}};'
264 ],
265 'separator' => 'after'
266 ]
267 );
268
269
270 $this->add_responsive_control(
271 'general_input_border_radius',
272 [
273 'label' => __( 'Border Radius', 'auxin-elements' ),
274 'type' => Controls_Manager::DIMENSIONS,
275 'size_units' => [ 'px', '%' ],
276 'selectors' => [
277 '{{WRAPPER}} input:not([type="submit"])' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
278 ],
279 ]
280 );
281
282 $this->add_responsive_control(
283 'general_input_padding',
284 [
285 'label' => __( 'Padding', 'auxin-elements' ),
286 'type' => Controls_Manager::DIMENSIONS,
287 'size_units' => [ 'px', '%', 'em' ],
288 'selectors' => [
289 '{{WRAPPER}} input:not([type="submit"])' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
290 ],
291 'separator' => 'after'
292 ]
293 );
294
295 $this->add_responsive_control(
296 'general_input_margin',
297 [
298 'label' => __( 'Margin', 'auxin-elements' ),
299 'type' => Controls_Manager::DIMENSIONS,
300 'size_units' => [ 'px', '%', 'em' ],
301 'selectors' => [
302 '{{WRAPPER}} input:not([type="submit"])' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
303 ],
304 'separator' => 'after'
305 ]
306 );
307
308 // Background and Box Shadow for input - START
309 $this->start_controls_tabs( 'general_input_tabs' );
310
311 $this->start_controls_tab(
312 'general_input_tab_normal_state',
313 [
314 'label' => __( 'Normal', 'auxin-elements' ),
315 ]
316 );
317
318 $this->add_group_control(
319 Group_Control_Background::get_type(),
320 [
321 'name' => 'general_input_background',
322 'selector' => '{{WRAPPER}} input:not([type="submit"])',
323 'types' => [ 'classic', 'gradient']
324 ]
325 );
326
327 $this->add_group_control(
328 Group_Control_Box_Shadow::get_type(),
329 [
330 'name' => 'general_input_box_shadow',
331 'selector' => '{{WRAPPER}} input:not([type="submit"])'
332 ]
333 );
334
335 $this->add_group_control(
336 Group_Control_Border::get_type(),
337 [
338 'name' => 'general_input_border',
339 'selector' => '{{WRAPPER}} input:not([type="submit"])'
340 ]
341 );
342
343 $this->end_controls_tab();
344
345 $this->start_controls_tab(
346 'general_input_tab_hover_state',
347 [
348 'label' => __( 'Hover', 'auxin-elements' ),
349 ]
350 );
351
352 $this->add_group_control(
353 Group_Control_Background::get_type(),
354 [
355 'name' => 'general_input_background_hover',
356 'selector' => '{{WRAPPER}} input:not([type="submit"]):hover',
357 'types' => [ 'classic', 'gradient']
358 ]
359 );
360
361 $this->add_group_control(
362 Group_Control_Box_Shadow::get_type(),
363 [
364 'name' => 'general_input_box_shadow_hover',
365 'selector' => '{{WRAPPER}} input:not([type="submit"]):hover'
366 ]
367 );
368
369 $this->add_group_control(
370 Group_Control_Border::get_type(),
371 [
372 'name' => 'general_input_border_hover',
373 'selector' => '{{WRAPPER}} input:not([type="submit"]):hover'
374 ]
375 );
376
377 $this->add_control(
378 'general_input_transition',
379 [
380 'label' => __( 'Transition Duration', 'auxin-elements' ),
381 'type' => Controls_Manager::SLIDER,
382 'default' => [
383 'size' => 0.3,
384 ],
385 'range' => [
386 'px' => [
387 'max' => 3,
388 'step' => 0.1,
389 ],
390 ],
391 'render_type' => 'ui',
392 'selectors' => [
393 '{{WRAPPER}} input:not([type="submit"])' => "transition:all ease-out {{SIZE}}s;"
394 ]
395 ]
396 );
397
398 $this->end_controls_tab();
399
400 $this->start_controls_tab(
401 'general_input_tab_focus_state',
402 [
403 'label' => __( 'Focus', 'auxin-elements' ),
404 ]
405 );
406
407 $this->add_group_control(
408 Group_Control_Background::get_type(),
409 [
410 'name' => 'general_input_background_focus',
411 'selector' => '{{WRAPPER}} input:not([type="submit"]):focus',
412 'types' => [ 'classic', 'gradient']
413 ]
414 );
415
416 $this->add_group_control(
417 Group_Control_Box_Shadow::get_type(),
418 [
419 'name' => 'general_input_box_shadow_focus',
420 'selector' => '{{WRAPPER}} input:not([type="submit"]):focus'
421 ]
422 );
423
424 $this->add_group_control(
425 Group_Control_Border::get_type(),
426 [
427 'name' => 'general_input_border_focus',
428 'selector' => '{{WRAPPER}} input:not([type="submit"]):focus'
429 ]
430 );
431
432 $this->end_controls_tab();
433
434 $this->end_controls_tabs();
435 // Background and Box Shadow for input - END
436
437 $this->end_controls_section();
438
439
440 /* -------------------------------------------------------------------------- */
441 /* Placeholder Style
442 /* -------------------------------------------------------------------------- */
443 $this->start_controls_section(
444 'placeholder_section',
445 [
446 'label' => __('Input Placeholder', 'auxin-elements' ),
447 'tab' => Controls_Manager::TAB_STYLE
448 ]
449 );
450
451 $this->add_group_control(
452 Group_Control_Typography::get_type(),
453 [
454 'name' => 'placeholder_typography',
455 'label' => __( 'Typography', 'auxin-elements' ),
456 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
457 'selector' => '{{WRAPPER}} input:not([type="submit"])::placeholder'
458 ]
459 );
460
461 $this->add_control(
462 'placeholder_color',
463 [
464 'label' => __( 'Color', 'auxin-elements' ),
465 'type' => Controls_Manager::COLOR,
466 'selectors' => [
467 '{{WRAPPER}} input:not([type="submit"])::placeholder' => 'color: {{VALUE}};'
468 ]
469 ]
470 );
471
472 $this->end_controls_section();
473
474 /* -------------------------------------------------------------------------- */
475 /* Text Input Style
476 /* -------------------------------------------------------------------------- */
477
478 $this->start_controls_section(
479 'text_input_section',
480 [
481 'label' => __('Text Inputs', 'auxin-elements' ),
482 'tab' => Controls_Manager::TAB_STYLE,
483 ]
484 );
485
486 $this->add_control(
487 'text_input_color',
488 [
489 'label' => __( 'Color', 'auxin-elements' ),
490 'type' => Controls_Manager::COLOR,
491 'selectors' => [
492 '{{WRAPPER}} input[type="text"]' => 'color: {{VALUE}};'
493 ]
494 ]
495 );
496
497 $this->add_responsive_control(
498 'text_input_width',
499 [
500 'label' => __( 'Width', 'auxin-elements' ),
501 'size_units' => [ 'px','em', '%'],
502 'type' => Controls_Manager::SLIDER,
503 'range' => [
504 'px' => [
505 'min' => 0,
506 'max' => 1000,
507 'step' => 5,
508 ],
509 '%' => [
510 'min' => 0,
511 'max' => 100,
512 ],
513 'em' => [
514 'min' => 0,
515 'max' => 100,
516 ],
517 ],
518 'selectors' => [
519 '{{WRAPPER}} input[type="text"]' => 'width: {{SIZE}}{{UNIT}};',
520 ],
521 ]
522 );
523
524 $this->add_responsive_control(
525 'text_input_max_width',
526 [
527 'label' => __( 'Max Width', 'auxin-elements' ),
528 'size_units' => [ 'px','em', '%'],
529 'type' => Controls_Manager::SLIDER,
530 'range' => [
531 'px' => [
532 'min' => 0,
533 'max' => 1000,
534 'step' => 5
535 ],
536 '%' => [
537 'min' => 0,
538 'max' => 100
539 ],
540 'em' => [
541 'min' => 0,
542 'max' => 100
543 ]
544 ],
545 'selectors' => [
546 '{{WRAPPER}} input[type="text"]' => 'max-width: {{SIZE}}{{UNIT}};',
547 ]
548 ]
549 );
550
551 $this->add_responsive_control(
552 'text_input_height',
553 [
554 'label' => __( 'Height', 'auxin-elements' ),
555 'size_units' => [ 'px', 'em'],
556 'type' => Controls_Manager::SLIDER,
557 'range' => [
558 'px' => [
559 'min' => 0,
560 'max' => 1000,
561 'step' => 5
562 ],
563 '%' => [
564 'min' => 0,
565 'max' => 100
566 ],
567 'em' => [
568 'min' => 0,
569 'max' => 100
570 ]
571 ],
572 'selectors' => [
573 '{{WRAPPER}} input[type="text"]' => 'height: {{SIZE}}{{UNIT}};',
574 ],
575 'separator' => 'after'
576 ]
577 );
578
579
580 $this->add_group_control(
581 Group_Control_Border::get_type(),
582 [
583 'name' => 'text_input_border',
584 'selector' => '{{WRAPPER}} input[type="text"]'
585 ]
586 );
587
588 $this->add_responsive_control(
589 'text_input_border_radius',
590 [
591 'label' => __( 'Border Radius', 'auxin-elements' ),
592 'type' => Controls_Manager::DIMENSIONS,
593 'size_units' => [ 'px', '%' ],
594 'selectors' => [
595 '{{WRAPPER}} input[type="text"]' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
596 ],
597 ]
598 );
599
600 $this->add_responsive_control(
601 'text_input_padding',
602 [
603 'label' => __( 'Padding', 'auxin-elements' ),
604 'type' => Controls_Manager::DIMENSIONS,
605 'size_units' => [ 'px', '%', 'em' ],
606 'selectors' => [
607 '{{WRAPPER}} input[type="text"]' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
608 ],
609 'separator' => 'after'
610 ]
611 );
612
613 // Background and Box Shadow for input - START
614 $this->start_controls_tabs( 'text_input_tabs' );
615
616 $this->start_controls_tab(
617 'text_input_tab_normal_state',
618 [
619 'label' => __( 'Normal', 'auxin-elements' ),
620 ]
621 );
622
623 $this->add_group_control(
624 Group_Control_Background::get_type(),
625 [
626 'name' => 'text_input_background',
627 'selector' => '{{WRAPPER}} input[type="text"]',
628 'types' => [ 'classic', 'gradient']
629 ]
630 );
631
632 $this->add_group_control(
633 Group_Control_Box_Shadow::get_type(),
634 [
635 'name' => 'text_input_box_shadow',
636 'selector' => '{{WRAPPER}} input[type="text"]'
637 ]
638 );
639
640 $this->end_controls_tab();
641
642 $this->start_controls_tab(
643 'text_input_tab_hover_state',
644 [
645 'label' => __( 'Hover', 'auxin-elements' ),
646 ]
647 );
648
649 $this->add_group_control(
650 Group_Control_Background::get_type(),
651 [
652 'name' => 'text_input_background_hover',
653 'selector' => '{{WRAPPER}} input[type="text"]:hover',
654 'types' => [ 'classic', 'gradient']
655 ]
656 );
657
658 $this->add_group_control(
659 Group_Control_Box_Shadow::get_type(),
660 [
661 'name' => 'text_input_box_shadow_hover',
662 'selector' => '{{WRAPPER}} input[type="text"]:hover'
663 ]
664 );
665
666 $this->add_control(
667 'text_input_transition',
668 [
669 'label' => __( 'Transition Duration', 'auxin-elements' ),
670 'type' => Controls_Manager::SLIDER,
671 'default' => [
672 'size' => 0.3,
673 ],
674 'range' => [
675 'px' => [
676 'max' => 3,
677 'step' => 0.1,
678 ],
679 ],
680 'render_type' => 'ui',
681 'selectors' => [
682 '{{WRAPPER}} input[type="text"]' => "transition:all ease-out {{SIZE}}s;"
683 ]
684 ]
685 );
686
687 $this->end_controls_tab();
688
689 $this->end_controls_tabs();
690 // Background and Box Shadow for input - END
691
692 $this->end_controls_section();
693
694 /* -------------------------------------------------------------------------- */
695 /* Email Input Style
696 /* -------------------------------------------------------------------------- */
697
698 $this->start_controls_section(
699 'email_input_section',
700 [
701 'label' => __('Email Inputs', 'auxin-elements' ),
702 'tab' => Controls_Manager::TAB_STYLE
703 ]
704 );
705
706 $this->add_control(
707 'email_input_color',
708 [
709 'label' => __( 'Color', 'auxin-elements' ),
710 'type' => Controls_Manager::COLOR,
711 'selectors' => [
712 '{{WRAPPER}} input[type="email"]' => 'color: {{VALUE}};'
713 ]
714 ]
715 );
716
717 $this->add_responsive_control(
718 'email_input_width',
719 [
720 'label' => __( 'Width', 'auxin-elements' ),
721 'size_units' => [ 'px','em', '%'],
722 'type' => Controls_Manager::SLIDER,
723 'range' => [
724 'px' => [
725 'min' => 0,
726 'max' => 1000,
727 'step' => 5,
728 ],
729 '%' => [
730 'min' => 0,
731 'max' => 100,
732 ],
733 'em' => [
734 'min' => 0,
735 'max' => 100,
736 ],
737 ],
738 'selectors' => [
739 '{{WRAPPER}} input[type="email"]' => 'width: {{SIZE}}{{UNIT}};'
740 ],
741 ]
742 );
743
744 $this->add_responsive_control(
745 'email_input_max_width',
746 [
747 'label' => __( 'Max Width', 'auxin-elements' ),
748 'size_units' => [ 'px','em', '%'],
749 'type' => Controls_Manager::SLIDER,
750 'range' => [
751 'px' => [
752 'min' => 0,
753 'max' => 1000,
754 'step' => 5
755 ],
756 '%' => [
757 'min' => 0,
758 'max' => 100
759 ],
760 'em' => [
761 'min' => 0,
762 'max' => 100
763 ]
764 ],
765 'selectors' => [
766 '{{WRAPPER}} input[type="email"]' => 'max-width: {{SIZE}}{{UNIT}};'
767 ]
768 ]
769 );
770
771 $this->add_responsive_control(
772 'email_input_height',
773 [
774 'label' => __( 'Height', 'auxin-elements' ),
775 'size_units' => [ 'px', 'em'],
776 'type' => Controls_Manager::SLIDER,
777 'range' => [
778 'px' => [
779 'min' => 0,
780 'max' => 1000,
781 'step' => 5
782 ],
783 '%' => [
784 'min' => 0,
785 'max' => 100
786 ],
787 'em' => [
788 'min' => 0,
789 'max' => 100
790 ]
791 ],
792 'selectors' => [
793 '{{WRAPPER}} input[type="email"]' => 'height: {{SIZE}}{{UNIT}};'
794 ],
795 'separator' => 'after'
796 ]
797 );
798
799
800 $this->add_group_control(
801 Group_Control_Border::get_type(),
802 [
803 'name' => 'email_input_border',
804 'selector' => '{{WRAPPER}} input[type="email"]'
805 ]
806 );
807
808 $this->add_responsive_control(
809 'email_input_border_radius',
810 [
811 'label' => __( 'Border Radius', 'auxin-elements' ),
812 'type' => Controls_Manager::DIMENSIONS,
813 'size_units' => [ 'px', '%' ],
814 'selectors' => [
815 '{{WRAPPER}} input[type="email"]' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
816 ],
817 ]
818 );
819
820 $this->add_responsive_control(
821 'email_input_padding',
822 [
823 'label' => __( 'Padding', 'auxin-elements' ),
824 'type' => Controls_Manager::DIMENSIONS,
825 'size_units' => [ 'px', '%', 'em' ],
826 'selectors' => [
827 '{{WRAPPER}} input[type="email"]' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
828 ],
829 'separator' => 'after'
830 ]
831 );
832
833 // Background and Box Shadow for input - START
834 $this->start_controls_tabs( 'email_input_tabs' );
835
836 $this->start_controls_tab(
837 'email_input_tab_normal_state',
838 [
839 'label' => __( 'Normal', 'auxin-elements' ),
840 ]
841 );
842
843 $this->add_group_control(
844 Group_Control_Background::get_type(),
845 [
846 'name' => 'email_input_background',
847 'selector' => '{{WRAPPER}} input[type="email"]',
848 'types' => [ 'classic', 'gradient']
849 ]
850 );
851
852 $this->add_group_control(
853 Group_Control_Box_Shadow::get_type(),
854 [
855 'name' => 'email_input_box_shadow',
856 'selector' => '{{WRAPPER}} input[type="email"]'
857 ]
858 );
859
860 $this->end_controls_tab();
861
862 $this->start_controls_tab(
863 'email_input_tab_hover_state',
864 [
865 'label' => __( 'Hover', 'auxin-elements' ),
866 ]
867 );
868
869 $this->add_group_control(
870 Group_Control_Background::get_type(),
871 [
872 'name' => 'email_input_background_hover',
873 'selector' => '{{WRAPPER}} input[type="email"]:hover',
874 'types' => [ 'classic', 'gradient']
875 ]
876 );
877
878 $this->add_group_control(
879 Group_Control_Box_Shadow::get_type(),
880 [
881 'name' => 'email_input_box_shadow_hover',
882 'selector' => '{{WRAPPER}} input[type="email"]:hover'
883 ]
884 );
885
886 $this->add_control(
887 'email_input_transition',
888 [
889 'label' => __( 'Transition Duration', 'auxin-elements' ),
890 'type' => Controls_Manager::SLIDER,
891 'default' => [
892 'size' => 0.3,
893 ],
894 'range' => [
895 'px' => [
896 'max' => 3,
897 'step' => 0.1,
898 ],
899 ],
900 'render_type' => 'ui',
901 'selectors' => [
902 '{{WRAPPER}} input[type="email"]' => "transition:all ease-out {{SIZE}}s;"
903 ]
904 ]
905 );
906
907 $this->end_controls_tab();
908
909 $this->end_controls_tabs();
910
911 $this->end_controls_section();
912
913 /* -------------------------------------------------------------------------- */
914 /* Dropdown Style
915 /* -------------------------------------------------------------------------- */
916
917 $this->start_controls_section(
918 'dropdown_section',
919 [
920 'label' => __('Dropdown', 'auxin-elements' ),
921 'tab' => Controls_Manager::TAB_STYLE,
922 ]
923 );
924
925 $this->add_group_control(
926 Group_Control_Typography::get_type(),
927 [
928 'name' => 'dropdown_typography',
929 'label' => __( 'Typography', 'auxin-elements' ),
930 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
931 'selector' => '{{WRAPPER}} select',
932 ]
933 );
934
935 $this->add_control(
936 'dropdown_color',
937 [
938 'label' => __( 'Color', 'auxin-elements' ),
939 'type' => Controls_Manager::COLOR,
940 'selectors' => [
941 '{{WRAPPER}} select' => 'color: {{VALUE}};',
942 ]
943 ]
944 );
945
946 $this->add_responsive_control(
947 'dropdown_width',
948 [
949 'label' => __( 'Width', 'auxin-elements' ),
950 'size_units' => [ 'px','em', '%'],
951 'type' => Controls_Manager::SLIDER,
952 'range' => [
953 'px' => [
954 'min' => 0,
955 'max' => 1000,
956 'step' => 5,
957 ],
958 '%' => [
959 'min' => 0,
960 'max' => 100,
961 ],
962 'em' => [
963 'min' => 0,
964 'max' => 100,
965 ],
966 ],
967 'selectors' => [
968 '{{WRAPPER}} select' => 'width: {{SIZE}}{{UNIT}};',
969 ],
970 ]
971 );
972
973 $this->add_responsive_control(
974 'dropdown_max_width',
975 [
976 'label' => __( 'Max Width', 'auxin-elements' ),
977 'size_units' => [ 'px','em', '%'],
978 'type' => Controls_Manager::SLIDER,
979 'range' => [
980 'px' => [
981 'min' => 0,
982 'max' => 1000,
983 'step' => 5
984 ],
985 '%' => [
986 'min' => 0,
987 'max' => 100
988 ],
989 'em' => [
990 'min' => 0,
991 'max' => 100
992 ]
993 ],
994 'selectors' => [
995 '{{WRAPPER}} select' => 'max-width: {{SIZE}}{{UNIT}};',
996 ]
997 ]
998 );
999
1000 $this->add_responsive_control(
1001 'dropdown_height',
1002 [
1003 'label' => __( 'Height', 'auxin-elements' ),
1004 'size_units' => [ 'px', 'em'],
1005 'type' => Controls_Manager::SLIDER,
1006 'range' => [
1007 'px' => [
1008 'min' => 0,
1009 'max' => 1000,
1010 'step' => 5
1011 ],
1012 '%' => [
1013 'min' => 0,
1014 'max' => 100
1015 ],
1016 'em' => [
1017 'min' => 0,
1018 'max' => 100
1019 ]
1020 ],
1021 'selectors' => [
1022 '{{WRAPPER}} select' => 'height: {{SIZE}}{{UNIT}};',
1023 ],
1024 'separator' => 'after'
1025 ]
1026 );
1027
1028
1029 $this->add_group_control(
1030 Group_Control_Border::get_type(),
1031 [
1032 'name' => 'dropdown_border',
1033 'selector' => '{{WRAPPER}} select'
1034 ]
1035 );
1036
1037 $this->add_responsive_control(
1038 'dropdown_border_radius',
1039 [
1040 'label' => __( 'Border Radius', 'auxin-elements' ),
1041 'type' => Controls_Manager::DIMENSIONS,
1042 'size_units' => [ 'px', '%' ],
1043 'selectors' => [
1044 '{{WRAPPER}} select' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1045 ],
1046 ]
1047 );
1048
1049 $this->add_responsive_control(
1050 'dropdown_padding',
1051 [
1052 'label' => __( 'Padding', 'auxin-elements' ),
1053 'type' => Controls_Manager::DIMENSIONS,
1054 'size_units' => [ 'px', '%', 'em' ],
1055 'selectors' => [
1056 '{{WRAPPER}} select' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1057 ],
1058 'separator' => 'after'
1059 ]
1060 );
1061
1062 $this->add_responsive_control(
1063 'dropdown_margin',
1064 [
1065 'label' => __( 'Margin', 'auxin-elements' ),
1066 'type' => Controls_Manager::DIMENSIONS,
1067 'size_units' => [ 'px', '%', 'em' ],
1068 'selectors' => [
1069 '{{WRAPPER}} select' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1070 ],
1071 'separator' => 'after'
1072 ]
1073 );
1074
1075 // Background and Box Shadow for input - START
1076 $this->start_controls_tabs( 'dropdown_input_tabs' );
1077
1078 $this->start_controls_tab(
1079 'dropdown_tab_normal_state',
1080 [
1081 'label' => __( 'Normal', 'auxin-elements' ),
1082 ]
1083 );
1084
1085 $this->add_group_control(
1086 Group_Control_Background::get_type(),
1087 [
1088 'name' => 'dropdown_background',
1089 'selector' => '{{WRAPPER}} select',
1090 'types' => [ 'classic', 'gradient']
1091 ]
1092 );
1093
1094 $this->add_group_control(
1095 Group_Control_Box_Shadow::get_type(),
1096 [
1097 'name' => 'dropdown_box_shadow',
1098 'selector' => '{{WRAPPER}} select'
1099 ]
1100 );
1101
1102 $this->end_controls_tab();
1103
1104 $this->start_controls_tab(
1105 'dropdown_tab_hover_state',
1106 [
1107 'label' => __( 'Hover', 'auxin-elements' ),
1108 ]
1109 );
1110
1111 $this->add_group_control(
1112 Group_Control_Background::get_type(),
1113 [
1114 'name' => 'dropdown_background_hover',
1115 'selector' => '{{WRAPPER}} select:hover',
1116 'types' => [ 'classic', 'gradient']
1117 ]
1118 );
1119
1120 $this->add_group_control(
1121 Group_Control_Box_Shadow::get_type(),
1122 [
1123 'name' => 'dropdown_box_shadow_hover',
1124 'selector' => '{{WRAPPER}} select:hover'
1125 ]
1126 );
1127
1128 $this->add_control(
1129 'dropdown_transition',
1130 [
1131 'label' => __( 'Transition Duration', 'auxin-elements' ),
1132 'type' => Controls_Manager::SLIDER,
1133 'default' => [
1134 'size' => 0.3,
1135 ],
1136 'range' => [
1137 'px' => [
1138 'max' => 3,
1139 'step' => 0.1,
1140 ],
1141 ],
1142 'render_type' => 'ui',
1143 'selectors' => [
1144 '{{WRAPPER}} select' => "transition:all ease-out {{SIZE}}s;"
1145 ]
1146 ]
1147 );
1148
1149 $this->end_controls_tab();
1150
1151 $this->end_controls_tabs();
1152 // Background and Box Shadow for input - END
1153
1154 $this->end_controls_section();
1155
1156 /* -------------------------------------------------------------------------- */
1157 /* Textarea Style
1158 /* -------------------------------------------------------------------------- */
1159
1160 $this->start_controls_section(
1161 'textarea_section',
1162 [
1163 'label' => __('Textarea', 'auxin-elements' ),
1164 'tab' => Controls_Manager::TAB_STYLE,
1165 ]
1166 );
1167
1168 $this->add_group_control(
1169 Group_Control_Typography::get_type(),
1170 [
1171 'name' => 'textarea_typography',
1172 'label' => __( 'Typography', 'auxin-elements' ),
1173 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
1174 'selector' => '{{WRAPPER}} textarea',
1175 ]
1176 );
1177
1178 $this->add_control(
1179 'textarea_color',
1180 [
1181 'label' => __( 'Color', 'auxin-elements' ),
1182 'type' => Controls_Manager::COLOR,
1183 'selectors' => [
1184 '{{WRAPPER}} textarea' => 'color: {{VALUE}};',
1185 ]
1186 ]
1187 );
1188
1189 $this->add_responsive_control(
1190 'textarea_width',
1191 [
1192 'label' => __( 'Width', 'auxin-elements' ),
1193 'size_units' => [ 'px','em', '%'],
1194 'type' => Controls_Manager::SLIDER,
1195 'range' => [
1196 'px' => [
1197 'min' => 0,
1198 'max' => 1000,
1199 'step' => 5,
1200 ],
1201 '%' => [
1202 'min' => 0,
1203 'max' => 100,
1204 ],
1205 'em' => [
1206 'min' => 0,
1207 'max' => 100,
1208 ],
1209 ],
1210 'selectors' => [
1211 '{{WRAPPER}} textarea' => 'width: {{SIZE}}{{UNIT}};',
1212 ],
1213 ]
1214 );
1215
1216 $this->add_responsive_control(
1217 'textarea_max_width',
1218 [
1219 'label' => __( 'Max Width', 'auxin-elements' ),
1220 'size_units' => [ 'px','em', '%'],
1221 'type' => Controls_Manager::SLIDER,
1222 'range' => [
1223 'px' => [
1224 'min' => 0,
1225 'max' => 1000,
1226 'step' => 5
1227 ],
1228 '%' => [
1229 'min' => 0,
1230 'max' => 100
1231 ],
1232 'em' => [
1233 'min' => 0,
1234 'max' => 100
1235 ]
1236 ],
1237 'selectors' => [
1238 '{{WRAPPER}} textarea' => 'max-width: {{SIZE}}{{UNIT}};',
1239 ]
1240 ]
1241 );
1242
1243 $this->add_responsive_control(
1244 'textarea_height',
1245 [
1246 'label' => __( 'Height', 'auxin-elements' ),
1247 'size_units' => [ 'px', 'em'],
1248 'type' => Controls_Manager::SLIDER,
1249 'range' => [
1250 'px' => [
1251 'min' => 0,
1252 'max' => 1000,
1253 'step' => 5
1254 ],
1255 '%' => [
1256 'min' => 0,
1257 'max' => 100
1258 ],
1259 'em' => [
1260 'min' => 0,
1261 'max' => 100
1262 ]
1263 ],
1264 'selectors' => [
1265 '{{WRAPPER}} textarea' => 'height: {{SIZE}}{{UNIT}};',
1266 ],
1267 'separator' => 'after'
1268 ]
1269 );
1270
1271 $this->add_responsive_control(
1272 'textarea_border_radius',
1273 [
1274 'label' => __( 'Border Radius', 'auxin-elements' ),
1275 'type' => Controls_Manager::DIMENSIONS,
1276 'size_units' => [ 'px', '%' ],
1277 'selectors' => [
1278 '{{WRAPPER}} textarea' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1279 ],
1280 ]
1281 );
1282
1283 $this->add_responsive_control(
1284 'textarea_padding',
1285 [
1286 'label' => __( 'Padding', 'auxin-elements' ),
1287 'type' => Controls_Manager::DIMENSIONS,
1288 'size_units' => [ 'px', '%', 'em' ],
1289 'selectors' => [
1290 '{{WRAPPER}} textarea' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1291 ],
1292 'separator' => 'after'
1293 ]
1294 );
1295
1296 $this->add_responsive_control(
1297 'textarea_margin',
1298 [
1299 'label' => __( 'Margin', 'auxin-elements' ),
1300 'type' => Controls_Manager::DIMENSIONS,
1301 'size_units' => [ 'px', '%', 'em' ],
1302 'selectors' => [
1303 '{{WRAPPER}} textarea' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1304 ],
1305 'separator' => 'after'
1306 ]
1307 );
1308
1309 // Background and Box Shadow for input - START
1310 $this->start_controls_tabs( 'textarea_tabs' );
1311
1312 $this->start_controls_tab(
1313 'textarea_tab_normal_state',
1314 [
1315 'label' => __( 'Normal', 'auxin-elements' ),
1316 ]
1317 );
1318
1319 $this->add_group_control(
1320 Group_Control_Background::get_type(),
1321 [
1322 'name' => 'textarea_background',
1323 'selector' => '{{WRAPPER}} textarea',
1324 'types' => [ 'classic', 'gradient']
1325 ]
1326 );
1327
1328 $this->add_group_control(
1329 Group_Control_Box_Shadow::get_type(),
1330 [
1331 'name' => 'textarea_box_shadow',
1332 'selector' => '{{WRAPPER}} textarea'
1333 ]
1334 );
1335
1336 $this->add_group_control(
1337 Group_Control_Border::get_type(),
1338 [
1339 'name' => 'textarea_border',
1340 'selector' => '{{WRAPPER}} textarea'
1341 ]
1342 );
1343
1344 $this->end_controls_tab();
1345
1346 $this->start_controls_tab(
1347 'textarea_tab_hover_state',
1348 [
1349 'label' => __( 'Hover', 'auxin-elements' ),
1350 ]
1351 );
1352
1353 $this->add_group_control(
1354 Group_Control_Background::get_type(),
1355 [
1356 'name' => 'textarea_background_hover',
1357 'selector' => '{{WRAPPER}} textarea:hover',
1358 'types' => [ 'classic', 'gradient']
1359 ]
1360 );
1361
1362 $this->add_group_control(
1363 Group_Control_Box_Shadow::get_type(),
1364 [
1365 'name' => 'textarea_box_shadow_hover',
1366 'selector' => '{{WRAPPER}} textarea:hover'
1367 ]
1368 );
1369
1370 $this->add_group_control(
1371 Group_Control_Border::get_type(),
1372 [
1373 'name' => 'textarea_border_hover',
1374 'selector' => '{{WRAPPER}} textarea:hover'
1375 ]
1376 );
1377
1378 $this->add_control(
1379 'textarea_transition',
1380 [
1381 'label' => __( 'Transition Duration', 'auxin-elements' ),
1382 'type' => Controls_Manager::SLIDER,
1383 'default' => [
1384 'size' => 0.3,
1385 ],
1386 'range' => [
1387 'px' => [
1388 'max' => 3,
1389 'step' => 0.1,
1390 ],
1391 ],
1392 'render_type' => 'ui',
1393 'selectors' => [
1394 '{{WRAPPER}} textarea' => "transition:all ease-out {{SIZE}}s;"
1395 ]
1396 ]
1397 );
1398
1399 $this->end_controls_tab();
1400
1401 $this->start_controls_tab(
1402 'textarea_tab_focus_state',
1403 [
1404 'label' => __( 'Focus', 'auxin-elements' ),
1405 ]
1406 );
1407
1408 $this->add_group_control(
1409 Group_Control_Background::get_type(),
1410 [
1411 'name' => 'textarea_background_focus',
1412 'selector' => '{{WRAPPER}} textarea:focus',
1413 'types' => [ 'classic', 'gradient']
1414 ]
1415 );
1416
1417 $this->add_group_control(
1418 Group_Control_Box_Shadow::get_type(),
1419 [
1420 'name' => 'textarea_box_shadow_focus',
1421 'selector' => '{{WRAPPER}} textarea:focus'
1422 ]
1423 );
1424
1425 $this->add_group_control(
1426 Group_Control_Border::get_type(),
1427 [
1428 'name' => 'textarea_border_focus',
1429 'selector' => '{{WRAPPER}} textarea:focus'
1430 ]
1431 );
1432
1433 $this->end_controls_tab();
1434
1435 $this->end_controls_tabs();
1436
1437 $this->end_controls_section();
1438
1439 /* -------------------------------------------------------------------------- */
1440 /* Textarea Placeholder Style
1441 /* -------------------------------------------------------------------------- */
1442
1443 $this->start_controls_section(
1444 'textarea_placeholder_section',
1445 [
1446 'label' => __('Textarea Placeholder', 'auxin-elements' ),
1447 'tab' => Controls_Manager::TAB_STYLE
1448 ]
1449 );
1450
1451 $this->add_group_control(
1452 Group_Control_Typography::get_type(),
1453 [
1454 'name' => 'textarea_placeholder_typography',
1455 'label' => __( 'Typography', 'auxin-elements' ),
1456 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
1457 'selector' => '{{WRAPPER}} textarea::placeholder'
1458 ]
1459 );
1460
1461 $this->add_control(
1462 'textarea_placeholder_color',
1463 [
1464 'label' => __( 'Color', 'auxin-elements' ),
1465 'type' => Controls_Manager::COLOR,
1466 'selectors' => [
1467 '{{WRAPPER}} textarea:placeholder' => 'color: {{VALUE}};',
1468 ]
1469 ]
1470 );
1471
1472 $this->end_controls_section();
1473
1474 /* -------------------------------------------------------------------------- */
1475 /* Labels */
1476 /* -------------------------------------------------------------------------- */
1477
1478 $this->start_controls_section(
1479 'labels_section',
1480 [
1481 'label' => __('Labels', 'auxin-elements' ),
1482 'tab' => Controls_Manager::TAB_STYLE,
1483 ]
1484 );
1485
1486 $this->add_group_control(
1487 Group_Control_Typography::get_type(),
1488 [
1489 'name' => 'labels_typography',
1490 'label' => __( 'Typography', 'auxin-elements' ),
1491 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
1492 'selector' => '{{WRAPPER}} label'
1493 ]
1494 );
1495
1496 $this->add_control(
1497 'labels_color',
1498 [
1499 'label' => __( 'Color', 'auxin-elements' ),
1500 'type' => Controls_Manager::COLOR,
1501 'selectors' => [
1502 '{{WRAPPER}} label' => 'color: {{VALUE}};'
1503 ]
1504 ]
1505 );
1506
1507 $this->end_controls_section();
1508
1509 /* -------------------------------------------------------------------------- */
1510 /* Submit Button Style
1511 /* -------------------------------------------------------------------------- */
1512
1513 $this->start_controls_section(
1514 'submit_input_section',
1515 [
1516 'label' => __('Submit Button', 'auxin-elements' ),
1517 'tab' => Controls_Manager::TAB_STYLE,
1518 ]
1519 );
1520
1521 $this->add_group_control(
1522 Group_Control_Typography::get_type(),
1523 [
1524 'name' => 'submit_input_typography',
1525 'label' => __( 'Typography', 'auxin-elements' ),
1526 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
1527 'selector' => '{{WRAPPER}} input[type="submit"]',
1528 ]
1529 );
1530
1531 $this->add_control(
1532 'submit_input_color',
1533 [
1534 'label' => __( 'Color', 'auxin-elements' ),
1535 'type' => Controls_Manager::COLOR,
1536 'selectors' => [
1537 '{{WRAPPER}} input[type="submit"]' => 'color: {{VALUE}};',
1538 ]
1539 ]
1540 );
1541
1542 $this->add_responsive_control(
1543 'submit_input_width',
1544 [
1545 'label' => __( 'Width', 'auxin-elements' ),
1546 'size_units' => [ 'px','em', '%'],
1547 'type' => Controls_Manager::SLIDER,
1548 'range' => [
1549 'px' => [
1550 'min' => 0,
1551 'max' => 1000,
1552 'step' => 5,
1553 ],
1554 '%' => [
1555 'min' => 0,
1556 'max' => 100,
1557 ],
1558 'em' => [
1559 'min' => 0,
1560 'max' => 100,
1561 ],
1562 ],
1563 'selectors' => [
1564 '{{WRAPPER}} input[type="submit"]' => 'width: {{SIZE}}{{UNIT}};',
1565 ],
1566 ]
1567 );
1568
1569 $this->add_responsive_control(
1570 'submit_input_max_width',
1571 [
1572 'label' => __( 'Max Width', 'auxin-elements' ),
1573 'size_units' => [ 'px','em', '%'],
1574 'type' => Controls_Manager::SLIDER,
1575 'range' => [
1576 'px' => [
1577 'min' => 0,
1578 'max' => 1000,
1579 'step' => 5
1580 ],
1581 '%' => [
1582 'min' => 0,
1583 'max' => 100
1584 ],
1585 'em' => [
1586 'min' => 0,
1587 'max' => 100
1588 ]
1589 ],
1590 'selectors' => [
1591 '{{WRAPPER}} input[type="submit"]' => 'max-width: {{SIZE}}{{UNIT}};',
1592 ]
1593 ]
1594 );
1595
1596 $this->add_responsive_control(
1597 'submit_input_height',
1598 [
1599 'label' => __( 'Height', 'auxin-elements' ),
1600 'size_units' => [ 'px', 'em'],
1601 'type' => Controls_Manager::SLIDER,
1602 'range' => [
1603 'px' => [
1604 'min' => 0,
1605 'max' => 1000,
1606 'step' => 5
1607 ],
1608 '%' => [
1609 'min' => 0,
1610 'max' => 100
1611 ],
1612 'em' => [
1613 'min' => 0,
1614 'max' => 100
1615 ]
1616 ],
1617 'selectors' => [
1618 '{{WRAPPER}} input[type="submit"]' => 'height: {{SIZE}}{{UNIT}};',
1619 ],
1620 'separator' => 'after'
1621 ]
1622 );
1623
1624
1625 $this->add_group_control(
1626 Group_Control_Border::get_type(),
1627 [
1628 'name' => 'submit_input_border',
1629 'selector' => '{{WRAPPER}} input[type="submit"]'
1630 ]
1631 );
1632
1633 $this->add_responsive_control(
1634 'submit_input_border_radius',
1635 [
1636 'label' => __( 'Border Radius', 'auxin-elements' ),
1637 'type' => Controls_Manager::DIMENSIONS,
1638 'size_units' => [ 'px', '%' ],
1639 'selectors' => [
1640 '{{WRAPPER}} input[type="submit"]' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1641 ],
1642 ]
1643 );
1644
1645 $this->add_responsive_control(
1646 'submit_input_padding',
1647 [
1648 'label' => __( 'Padding', 'auxin-elements' ),
1649 'type' => Controls_Manager::DIMENSIONS,
1650 'size_units' => [ 'px', '%', 'em' ],
1651 'selectors' => [
1652 '{{WRAPPER}} input[type="submit"]' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1653 ],
1654 'separator' => 'after'
1655 ]
1656 );
1657
1658 $this->add_responsive_control(
1659 'submit_input_margin',
1660 [
1661 'label' => __( 'Margin', 'auxin-elements' ),
1662 'type' => Controls_Manager::DIMENSIONS,
1663 'size_units' => [ 'px', '%', 'em' ],
1664 'selectors' => [
1665 '{{WRAPPER}} input[type="submit"]' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1666 ],
1667 'separator' => 'after'
1668 ]
1669 );
1670
1671 // Background and Box Shadow for input - START
1672 $this->start_controls_tabs( 'submit_input_tabs' );
1673
1674 $this->start_controls_tab(
1675 'submit_input_tab_normal_state',
1676 [
1677 'label' => __( 'Normal', 'auxin-elements' ),
1678 ]
1679 );
1680
1681 $this->add_group_control(
1682 Group_Control_Background::get_type(),
1683 [
1684 'name' => 'submit_input_background',
1685 'selector' => '{{WRAPPER}} input[type="submit"]',
1686 'types' => [ 'classic', 'gradient']
1687 ]
1688 );
1689
1690 $this->add_group_control(
1691 Group_Control_Box_Shadow::get_type(),
1692 [
1693 'name' => 'submit_input_box_shadow',
1694 'selector' => '{{WRAPPER}} input[type="submit"]'
1695 ]
1696 );
1697
1698 $this->end_controls_tab();
1699
1700 $this->start_controls_tab(
1701 'submit_input_tab_hover_state',
1702 [
1703 'label' => __( 'Hover', 'auxin-elements' ),
1704 ]
1705 );
1706
1707 $this->add_group_control(
1708 Group_Control_Background::get_type(),
1709 [
1710 'name' => 'submit_input_background_hover',
1711 'selector' => '{{WRAPPER}} input[type="submit"]:hover',
1712 'types' => [ 'classic', 'gradient']
1713 ]
1714 );
1715
1716 $this->add_group_control(
1717 Group_Control_Box_Shadow::get_type(),
1718 [
1719 'name' => 'submit_input_box_shadow_hover',
1720 'selector' => '{{WRAPPER}} input[type="submit"]:hover'
1721 ]
1722 );
1723
1724 $this->add_control(
1725 'submit_input_transition',
1726 [
1727 'label' => __( 'Transition Duration', 'auxin-elements' ),
1728 'type' => Controls_Manager::SLIDER,
1729 'default' => [
1730 'size' => 0.3,
1731 ],
1732 'range' => [
1733 'px' => [
1734 'max' => 3,
1735 'step' => 0.1,
1736 ],
1737 ],
1738 'render_type' => 'ui',
1739 'selectors' => [
1740 '{{WRAPPER}} input[type="submit"]' => "transition:all ease-out {{SIZE}}s;"
1741 ]
1742 ]
1743 );
1744
1745 $this->end_controls_tab();
1746
1747 $this->end_controls_tabs();
1748 // Background and Box Shadow for input - END
1749
1750 $this->end_controls_section();
1751
1752 }
1753
1754 /**
1755 * Render image box widget output on the frontend.
1756 *
1757 * Written in PHP and used to generate the final HTML.
1758 *
1759 * @since 1.0.0
1760 * @access protected
1761 */
1762 protected function render() {
1763
1764 $settings = $this->get_settings_for_display();
1765
1766 $args = array(
1767 'type' => $settings['type'],
1768 'email' => $settings['email'],
1769 'cf7_shortcode' => $settings['cf7_shortcode']
1770 );
1771
1772 // get the shortcode base blog page
1773 echo auxin_widget_contact_form_callback( $args );
1774 }
1775
1776 }
1777