__( 'Apple', 'aw_elementor' ), 'behance' => __( 'Behance', 'aw_elementor' ), 'bitbucket' => __( 'BitBucket', 'aw_elementor' ), 'codepen' => __( 'CodePen', 'aw_elementor' ), 'delicious' => __( 'Delicious', 'aw_elementor' ), 'deviantart' => __( 'DeviantArt', 'aw_elementor' ), 'digg' => __( 'Digg', 'aw_elementor' ), 'dribbble' => __( 'Dribbble', 'aw_elementor' ), 'email' => __( 'Email', 'aw_elementor' ), 'facebook' => __( 'Facebook', 'aw_elementor' ), 'flickr' => __( 'Flicker', 'aw_elementor' ), 'foursquare' => __( 'FourSquare', 'aw_elementor' ), 'github' => __( 'Github', 'aw_elementor' ), 'houzz' => __( 'Houzz', 'aw_elementor' ), 'instagram' => __( 'Instagram', 'aw_elementor' ), 'jsfiddle' => __( 'JS Fiddle', 'aw_elementor' ), 'linkedin' => __( 'LinkedIn', 'aw_elementor' ), 'medium' => __( 'Medium', 'aw_elementor' ), 'pinterest' => __( 'Pinterest', 'aw_elementor' ), 'product-hunt' => __( 'Product Hunt', 'aw_elementor' ), 'reddit' => __( 'Reddit', 'aw_elementor' ), 'slideshare' => __( 'Slide Share', 'aw_elementor' ), 'snapchat' => __( 'Snapchat', 'aw_elementor' ), 'soundcloud' => __( 'SoundCloud', 'aw_elementor' ), 'spotify' => __( 'Spotify', 'aw_elementor' ), 'stack-overflow' => __( 'StackOverflow', 'aw_elementor' ), 'tripadvisor' => __( 'TripAdvisor', 'aw_elementor' ), 'tumblr' => __( 'Tumblr', 'aw_elementor' ), 'twitch' => __( 'Twitch', 'aw_elementor' ), 'twitter' => __( 'Twitter', 'aw_elementor' ), 'vimeo' => __( 'Vimeo', 'aw_elementor' ), 'vk' => __( 'VK', 'aw_elementor' ), 'website' => __( 'Website', 'aw_elementor' ), 'whatsapp' => __( 'WhatsApp', 'aw_elementor' ), 'wordpress' => __( 'WordPress', 'aw_elementor' ), 'xing' => __( 'Xing', 'aw_elementor' ), 'yelp' => __( 'Yelp', 'aw_elementor' ), 'youtube' => __( 'YouTube', 'aw_elementor' ), ]; } protected function _register_controls() { $this->start_controls_section( '_section_cf7', [ 'label' => Advance_Addons_is_cf7_activated() ? __( 'Contact Form 7', 'aw_elementor' ) : __( 'Notice', 'aw_elementor' ), 'tab' => Controls_Manager::TAB_CONTENT, ] ); if ( ! Advance_Addons_is_cf7_activated() ) { $this->add_control( 'cf7_missing_notice', [ 'type' => Controls_Manager::RAW_HTML, 'raw' => sprintf( __( 'Please install and activate %1$s first.', 'aw_elementor' ), 'Contact Form 7' ), 'content_classes' => 'elementor-panel-alert elementor-panel-alert-warning', ] ); $this->end_controls_section(); return; } $this->add_control( 'form_id', [ 'label' => __( 'Select Your Form', 'aw_elementor' ), 'type' => Controls_Manager::SELECT, 'label_block' => true, 'options' => ['' => __( '', 'aw_elementor' ) ] + \Advance_Addons_get_cf7_forms(), ] ); $this->add_responsive_control( 'align', [ 'label' => __( 'Alignment', 'aw_elementor' ), 'type' => Controls_Manager::CHOOSE, 'options' => [ 'left' => [ 'title' => __( 'Left', 'aw_elementor' ), 'icon' => 'fa fa-align-left', ], 'center' => [ 'title' => __( 'Center', 'aw_elementor' ), 'icon' => 'fa fa-align-center', ], 'right' => [ 'title' => __( 'Right', 'aw_elementor' ), 'icon' => 'fa fa-align-right', ], 'justify' => [ 'title' => __( 'Justify', 'aw_elementor' ), 'icon' => 'fa fa-align-justify', ], ], 'toggle' => true, 'selectors' => [ '{{WRAPPER}} .wpcf7' => 'text-align: {{VALUE}}' ] ] ); $this->add_control( 'html_class', [ 'label' => __( 'HTML Class', 'aw_elementor' ), 'type' => Controls_Manager::TEXT, 'label_block' => true, 'description' => __( 'Add CSS custom class to the form.', 'aw_elementor' ), ] ); $this->end_controls_section(); $this->start_controls_section( '_section_fields_style', [ 'label' => __( 'Form Fields', 'aw_elementor' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_responsive_control( 'field_width', [ 'label' => __( 'Width', 'aw_elementor' ), 'type' => Controls_Manager::SLIDER, 'default' => [ 'unit' => '%', ], 'tablet_default' => [ 'unit' => '%', ], 'mobile_default' => [ 'unit' => '%', ], 'size_units' => [ '%', 'px' ], 'range' => [ '%' => [ 'min' => 1, 'max' => 100, ], 'px' => [ 'min' => 1, 'max' => 500, ], ], 'selectors' => [ '{{WRAPPER}} .wpcf7-form-control:not(.wpcf7-submit)' => 'width: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .Advance_Addons-cf7-form label' => 'width: {{SIZE}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'field_padding', [ 'label' => __( 'Padding', 'aw_elementor' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em', '%' ], 'selectors' => [ '{{WRAPPER}} .wpcf7-form-control:not(.wpcf7-submit)' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'field_margins', [ 'label' => __( 'Margin', 'aw_elementor' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em', '%' ], 'selectors' => [ '{{WRAPPER}} .wpcf7-form-control:not(.wpcf7-submit)' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'field_border_radius', [ 'label' => __( 'Border Radius', 'aw_elementor' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%' ], 'selectors' => [ '{{WRAPPER}} .wpcf7-form-control:not(.wpcf7-submit)' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_control( 'hr', [ 'type' => Controls_Manager::DIVIDER, 'style' => 'thick', ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'field_typography', 'label' => __( 'Typography', 'aw_elementor' ), 'selector' => '{{WRAPPER}} .wpcf7-form-control:not(.wpcf7-submit)', 'scheme' => Scheme_Typography::TYPOGRAPHY_3 ] ); $this->add_control( 'field_color', [ 'label' => __( 'Text Color', 'aw_elementor' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .wpcf7-form-control:not(.wpcf7-submit)' => 'color: {{VALUE}}', ], ] ); $this->add_control( 'field_placeholder_color', [ 'label' => __( 'Placeholder Text Color', 'aw_elementor' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} ::-webkit-input-placeholder' => 'color: {{VALUE}};', '{{WRAPPER}} ::-moz-placeholder' => 'color: {{VALUE}};', '{{WRAPPER}} ::-ms-input-placeholder' => 'color: {{VALUE}};', ], ] ); $this->start_controls_tabs( 'tabs_field_state' ); $this->start_controls_tab( 'tab_field_normal', [ 'label' => __( 'Normal', 'aw_elementor' ), ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'field_border', 'selector' => '{{WRAPPER}} .wpcf7-form-control:not(.wpcf7-submit)', ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'field_box_shadow', 'selector' => '{{WRAPPER}} .wpcf7-form-control:not(.wpcf7-submit)', ] ); $this->add_control( 'field_bg_color', [ 'label' => __( 'Background Color', 'aw_elementor' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .wpcf7-form-control:not(.wpcf7-submit)' => 'background-color: {{VALUE}}', ], ] ); $this->end_controls_tab(); $this->start_controls_tab( 'tab_field_focus', [ 'label' => __( 'Focus', 'aw_elementor' ), ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'field_focus_border', 'selector' => '{{WRAPPER}} .wpcf7-form-control:not(.wpcf7-submit):focus', ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'field_focus_box_shadow', 'exclude' => [ 'box_shadow_position', ], 'selector' => '{{WRAPPER}} .wpcf7-form-control:not(.wpcf7-submit):focus', ] ); $this->add_control( 'field_focus_bg_color', [ 'label' => __( 'Background Color', 'aw_elementor' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .wpcf7-form-control:not(.wpcf7-submit):focus' => 'background-color: {{VALUE}}', ], ] ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->end_controls_section(); $this->start_controls_section( 'cf7-form-label', [ 'label' => __( 'Label Section', 'aw_elementor' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_responsive_control( 'label_margin', [ 'label' => __( 'Spacing Bottom', 'aw_elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 100, ], ], 'selectors' => [ '{{WRAPPER}} .wpcf7-form-control:not(.wpcf7-submit)' => 'margin-top: {{SIZE}}{{UNIT}};', ], ] ); $this->add_control( 'hr3', [ 'type' => Controls_Manager::DIVIDER, 'style' => 'thick', ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'label_typography', 'label' => __( 'Typography', 'aw_elementor' ), 'selector' => '{{WRAPPER}} label', 'scheme' => Scheme_Typography::TYPOGRAPHY_3 ] ); $this->add_control( 'label_color', [ 'label' => __( 'Text Color', 'aw_elementor' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} label' => 'color: {{VALUE}}', ], ] ); $this->end_controls_section(); $this->start_controls_section( 'submit', [ 'label' => __( 'Button Section', 'aw_elementor' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_responsive_control( 'submit_margin', [ 'label' => __( 'Margin', 'aw_elementor' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%' ], 'selectors' => [ '{{WRAPPER}} .wpcf7-submit' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'submit_padding', [ 'label' => __( 'Padding', 'aw_elementor' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em', '%' ], 'selectors' => [ '{{WRAPPER}} .wpcf7-submit' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'submit_typography', 'selector' => '{{WRAPPER}} .wpcf7-submit', 'scheme' => Scheme_Typography::TYPOGRAPHY_4 ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'submit_border', 'selector' => '{{WRAPPER}} .wpcf7-submit', ] ); $this->add_control( 'submit_border_radius', [ 'label' => __( 'Border Radius', 'aw_elementor' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%' ], 'selectors' => [ '{{WRAPPER}} .wpcf7-submit' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'submit_box_shadow', 'selector' => '{{WRAPPER}} .wpcf7-submit', ] ); $this->add_control( 'hr4', [ 'type' => Controls_Manager::DIVIDER, 'style' => 'thick', ] ); $this->start_controls_tabs( 'tabs_button_style' ); $this->start_controls_tab( 'tab_button_normal', [ 'label' => __( 'Normal', 'aw_elementor' ), ] ); $this->add_control( 'submit_color', [ 'label' => __( 'Text Color', 'aw_elementor' ), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => [ '{{WRAPPER}} .wpcf7-submit' => 'color: {{VALUE}};', ], ] ); $this->add_control( 'submit_bg_color', [ 'label' => __( 'Background Color', 'aw_elementor' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .wpcf7-submit' => 'background-color: {{VALUE}};', ], ] ); $this->end_controls_tab(); $this->start_controls_tab( 'tab_button_hover', [ 'label' => __( 'Hover', 'aw_elementor' ), ] ); $this->add_control( 'submit_hover_color', [ 'label' => __( 'Text Color', 'aw_elementor' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .wpcf7-submit:hover, {{WRAPPER}} .wpcf7-submit:focus' => 'color: {{VALUE}};', ], ] ); $this->add_control( 'submit_hover_bg_color', [ 'label' => __( 'Background Color', 'aw_elementor' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .wpcf7-submit:hover, {{WRAPPER}} .wpcf7-submit:focus' => 'background-color: {{VALUE}};', ], ] ); $this->add_control( 'submit_hover_border_color', [ 'label' => __( 'Border Color', 'aw_elementor' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .wpcf7-submit:hover, {{WRAPPER}} .wpcf7-submit:focus' => 'border-color: {{VALUE}};', ], ] ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->end_controls_section(); } protected function render() { require AWE_PATH . '/modules/cf7/template/view.php'; } }