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