configs
1 year ago
customize
1 week ago
views
6 months ago
class-everest-forms-style-customizer.php
1 week ago
class-evf-style-customizer-ajax.php
1 year ago
class-evf-style-customizer-api.php
1 week ago
functions.php
1 week ago
class-everest-forms-style-customizer.php
1829 lines
| 1 | <?php |
| 2 | /** |
| 3 | * EverestForms Style Customizer setup |
| 4 | * |
| 5 | * @package EverestForms_Style_Customizer |
| 6 | * @since 1.0.0 |
| 7 | */ |
| 8 | |
| 9 | defined( 'ABSPATH' ) || exit; |
| 10 | |
| 11 | /** |
| 12 | * Main EverestForms Style Customizer Class. |
| 13 | * |
| 14 | * @class EverestForms_Style_Customizer |
| 15 | */ |
| 16 | if ( ! class_exists( 'EverestForms_Style_Customizer' ) ) { |
| 17 | |
| 18 | class EverestForms_Style_Customizer { |
| 19 | |
| 20 | /** |
| 21 | * Instance of this class. |
| 22 | * |
| 23 | * @var object |
| 24 | */ |
| 25 | protected static $instance = null; |
| 26 | |
| 27 | /** |
| 28 | * Initialize the plugin. |
| 29 | */ |
| 30 | private function __construct() { |
| 31 | |
| 32 | $this->configs(); |
| 33 | $this->includes(); |
| 34 | |
| 35 | // Hooks. |
| 36 | add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) ); |
| 37 | add_action( 'everest_forms_shortcode_scripts', array( $this, 'enqueue_shortcode_scripts' ) ); |
| 38 | // The v1 Form Designer launcher is superseded by the v2 Style tab; show it only if v2 is off. |
| 39 | if ( ! \EverestForms\Addons\StyleCustomizer\V2\Engine::enabled() ) { |
| 40 | add_action( 'everest_forms_builder_content_fields', array( $this, 'output_form_designer' ) ); |
| 41 | } |
| 42 | if ( defined( 'EFP_PLUGIN_FILE' ) ) { |
| 43 | add_action( 'everest_form_elemntor_style', array( $this, 'evf_elementor' ), 10, 1 ); |
| 44 | } |
| 45 | } |
| 46 | |
| 47 | /** |
| 48 | * Return an instance of this class. |
| 49 | * |
| 50 | * @return object A single instance of this class. |
| 51 | */ |
| 52 | public static function get_instance() { |
| 53 | // If the single instance hasn't been set, set it now. |
| 54 | if ( is_null( self::$instance ) ) { |
| 55 | self::$instance = new self(); |
| 56 | } |
| 57 | return self::$instance; |
| 58 | } |
| 59 | |
| 60 | |
| 61 | /** |
| 62 | * Configs. |
| 63 | */ |
| 64 | private function configs() { |
| 65 | require_once __DIR__ . '/configs/evf-style-customizer-form-wrapper-configs.php'; |
| 66 | require_once __DIR__ . '/configs/evf-style-customizer-color-palette.php'; |
| 67 | require_once __DIR__ . '/configs/evf-style-customizer-submission-message-configs.php'; |
| 68 | } |
| 69 | |
| 70 | /** |
| 71 | * Includes. |
| 72 | */ |
| 73 | private function includes() { |
| 74 | require_once __DIR__ . '/functions.php'; |
| 75 | require_once __DIR__ . '/class-evf-style-customizer-api.php'; |
| 76 | require_once __DIR__ . '/class-evf-style-customizer-ajax.php'; |
| 77 | } |
| 78 | |
| 79 | /** |
| 80 | * Get the customizer url. |
| 81 | */ |
| 82 | private function get_customizer_url() { |
| 83 | $form_id = isset( $_GET['form_id'] ) ? absint( $_GET['form_id'] ) : false; // phpcs:ignore WordPress.Security.NonceVerification |
| 84 | $customizer_url = esc_url_raw( |
| 85 | add_query_arg( |
| 86 | array( |
| 87 | 'evf-style-customizer' => true, |
| 88 | 'form_id' => $form_id, |
| 89 | 'return' => rawurlencode( |
| 90 | add_query_arg( |
| 91 | array( |
| 92 | 'page' => 'evf-builder', |
| 93 | 'tab' => 'fields', |
| 94 | 'form_id' => $form_id, |
| 95 | ), |
| 96 | admin_url( 'admin.php' ) |
| 97 | ) |
| 98 | ), |
| 99 | ), |
| 100 | admin_url( 'customize.php' ) |
| 101 | ) |
| 102 | ); |
| 103 | |
| 104 | return $customizer_url; |
| 105 | } |
| 106 | |
| 107 | |
| 108 | /** |
| 109 | * Enqueue scripts. |
| 110 | */ |
| 111 | public function admin_enqueue_scripts() { |
| 112 | $screen = get_current_screen(); |
| 113 | $screen_id = $screen ? $screen->id : ''; |
| 114 | |
| 115 | // Register admin scripts. |
| 116 | wp_register_style( 'everest-forms-customize-admin', plugins_url( 'assets/css/customize-admin.css', EVF_PLUGIN_FILE ), array(), EVF_VERSION ); |
| 117 | |
| 118 | // Add RTL support for admin styles. |
| 119 | wp_style_add_data( 'everest-forms-customize-admin', 'rtl', 'replace' ); |
| 120 | |
| 121 | // Admin styles for EVF pages only. |
| 122 | if ( in_array( $screen_id, evf_get_screen_ids(), true ) ) { |
| 123 | wp_enqueue_style( 'everest-forms-customize-admin' ); |
| 124 | } |
| 125 | } |
| 126 | |
| 127 | /** |
| 128 | * Enqueue shortcode scripts. |
| 129 | * |
| 130 | * @param array $atts Shortcode Attributes. |
| 131 | */ |
| 132 | public function enqueue_shortcode_scripts( $atts ) { |
| 133 | $form_id = absint( $atts['id'] ); |
| 134 | $upload_dir = wp_upload_dir( null, false ); |
| 135 | $style_options = get_option( 'everest_forms_styles' ); |
| 136 | |
| 137 | // Enqueue shortcode styles. |
| 138 | if ( file_exists( trailingslashit( $upload_dir['basedir'] ) . 'everest_forms_styles/everest-forms-' . $form_id . '.css' ) ) { |
| 139 | wp_enqueue_style( 'everest-forms-style-' . $form_id, esc_url_raw( set_url_scheme( $upload_dir['baseurl'] . '/everest_forms_styles/everest-forms-' . $form_id . '.css' ) ), array(), filemtime( trailingslashit( $upload_dir['basedir'] ) . 'everest_forms_styles/everest-forms-' . $form_id . '.css' ), 'all' ); |
| 140 | } |
| 141 | |
| 142 | if ( |
| 143 | isset( $style_options[ $form_id ]['font']['show_theme_font'], $style_options[ $form_id ]['font']['font_family'] ) && isset( $style_options[ $form_id ]['font']['show_theme_font'] ) |
| 144 | && 0 === absint( $style_options[ $form_id ]['font']['show_theme_font'] ) && |
| 145 | '' !== $style_options[ $form_id ]['font']['font_family'] |
| 146 | ) { |
| 147 | $font_family = $style_options[ $form_id ]['font']['font_family']; |
| 148 | evfsc_enqueue_fonts( $font_family ); |
| 149 | } |
| 150 | |
| 151 | } |
| 152 | |
| 153 | /** |
| 154 | * Output form designer. |
| 155 | */ |
| 156 | public function output_form_designer() { |
| 157 | ?> |
| 158 | <a href="<?php echo esc_url( $this->get_customizer_url() ); ?>" class="everest-forms-designer-icon tips" title="<?php esc_attr_e( 'Form Designer', 'everest-forms' ); ?>"> |
| 159 | <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M16.85 9.08l-4.07 4.06a.57.57 0 0 0-.06.81l.06.05 1.37 1.37.1.1c.09-.09.16-.18.25-.25a.78.78 0 0 1 1.06 0q1.55 1.53 3.07 3.07a.79.79 0 0 1 0 1.11q-.58.59-1.17 1.17a.8.8 0 0 1-1.13 0l-3-3-.1-.12a.8.8 0 0 1 .09-1l.19-.19-.1-.1-1.76-1.76a1.14 1.14 0 0 1 0-1.61l4.07-4a.63.63 0 0 0 0-.89c-.48-.44-.94-.93-1.41-1.4a.57.57 0 0 0-.81 0l-.33.31.07.08.54.54a.71.71 0 0 1 0 1l-6.58 6.5a.71.71 0 0 1-.81.2.78.78 0 0 1-.27-.13l-2-2a.71.71 0 0 1 0-1l6.51-6.51a.72.72 0 0 1 1-.09l.09.09.49.49.15.02.7-.71a1.14 1.14 0 0 1 1.61 0l2.17 2.17a1.14 1.14 0 0 1 0 1.61z"/></svg> |
| 160 | </a> |
| 161 | <?php |
| 162 | } |
| 163 | |
| 164 | |
| 165 | /** |
| 166 | * Register controls for Pro. |
| 167 | * |
| 168 | * @param class $widget gives the widget class name. |
| 169 | * |
| 170 | * @since 1.1.2 |
| 171 | */ |
| 172 | public function evf_elementor( $widget ) { |
| 173 | |
| 174 | $widget->start_controls_section( |
| 175 | 'everest_form_container', |
| 176 | array( |
| 177 | 'label' => esc_html__( 'Form Wrapper', 'everest-forms' ), |
| 178 | // 'tab' => \Elementor\::TAB_STYLE, |
| 179 | ) |
| 180 | ); |
| 181 | |
| 182 | $widget->add_responsive_control( |
| 183 | 'form_cont_padding', |
| 184 | array( |
| 185 | 'label' => esc_html__( 'Form Padding', 'everest-forms' ), |
| 186 | 'type' => \Elementor\Controls_Manager::DIMENSIONS, |
| 187 | 'size_units' => array( 'px', '%' ), |
| 188 | 'selectors' => array( |
| 189 | '{{WRAPPER}} .everest-forms ' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 190 | ), |
| 191 | ) |
| 192 | ); |
| 193 | |
| 194 | $widget->add_responsive_control( |
| 195 | 'form_cont_margin', |
| 196 | array( |
| 197 | 'label' => esc_html__( ' Form Margin', 'everest-forms' ), |
| 198 | 'type' => \Elementor\Controls_Manager::DIMENSIONS, |
| 199 | 'size_units' => array( 'px', '%' ), |
| 200 | 'selectors' => array( |
| 201 | '{{WRAPPER}} .everest-forms ' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 202 | ), |
| 203 | 'separator' => 'after', |
| 204 | ) |
| 205 | ); |
| 206 | |
| 207 | $widget->start_controls_tabs( 'tabs_form_container' ); |
| 208 | $widget->start_controls_tab( |
| 209 | 'form_normal', |
| 210 | array( |
| 211 | 'label' => esc_html__( 'Normal', 'everest-forms' ), |
| 212 | ) |
| 213 | ); |
| 214 | $widget->add_group_control( |
| 215 | \Elementor\Group_Control_Background::get_type(), |
| 216 | array( |
| 217 | 'name' => 'form_bg', |
| 218 | 'types' => array( 'classic', 'gradient' ), |
| 219 | 'selector' => '{{WRAPPER}} .everest-forms ', |
| 220 | ) |
| 221 | ); |
| 222 | $widget->add_group_control( |
| 223 | \Elementor\Group_Control_Border::get_type(), |
| 224 | array( |
| 225 | 'name' => 'form_border', |
| 226 | 'label' => esc_html__( 'Border', 'everest-forms' ), |
| 227 | 'selector' => '{{WRAPPER}} .everest-forms ', |
| 228 | ) |
| 229 | ); |
| 230 | |
| 231 | $widget->add_responsive_control( |
| 232 | 'form_border_radius', |
| 233 | array( |
| 234 | 'label' => esc_html__( 'Border Radius', 'everest-forms' ), |
| 235 | 'type' => \Elementor\Controls_Manager::DIMENSIONS, |
| 236 | 'size_units' => array( 'px', '%' ), |
| 237 | 'selectors' => array( |
| 238 | '{{WRAPPER}} .everest-forms ' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 239 | ), |
| 240 | ) |
| 241 | ); |
| 242 | |
| 243 | $widget->add_group_control( |
| 244 | \Elementor\Group_Control_Box_Shadow::get_type(), |
| 245 | array( |
| 246 | 'name' => 'form_shadow', |
| 247 | 'selector' => '{{WRAPPER}} .everest-forms .everest-forms', |
| 248 | ) |
| 249 | ); |
| 250 | |
| 251 | $widget->end_controls_tab(); |
| 252 | |
| 253 | $widget->start_controls_tab( |
| 254 | 'form_hover', |
| 255 | array( |
| 256 | 'label' => esc_html__( 'Hover', 'everest-forms' ), |
| 257 | ) |
| 258 | ); |
| 259 | |
| 260 | $widget->add_group_control( |
| 261 | \Elementor\Group_Control_Background::get_type(), |
| 262 | array( |
| 263 | 'name' => 'form_bg_hover', |
| 264 | 'types' => array( 'classic', 'gradient' ), |
| 265 | 'selector' => '{{WRAPPER}} .everest-forms .everest-forms:hover', |
| 266 | ) |
| 267 | ); |
| 268 | |
| 269 | $widget->add_group_control( |
| 270 | \Elementor\Group_Control_Border::get_type(), |
| 271 | array( |
| 272 | 'name' => 'form_border_hover', |
| 273 | 'label' => esc_html__( 'Border', 'everest-forms' ), |
| 274 | 'selector' => '{{WRAPPER}} .everest-forms .everest-forms:hover', |
| 275 | ) |
| 276 | ); |
| 277 | |
| 278 | $widget->add_responsive_control( |
| 279 | 'form_border_radius_hover', |
| 280 | array( |
| 281 | 'label' => esc_html__( 'Border Radius', 'everest-forms' ), |
| 282 | 'type' => \Elementor\Controls_Manager::DIMENSIONS, |
| 283 | 'size_units' => array( 'px', '%' ), |
| 284 | 'selectors' => array( |
| 285 | '{{WRAPPER}} .everest-forms .everest-forms:hover' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 286 | ), |
| 287 | ) |
| 288 | ); |
| 289 | |
| 290 | $widget->add_group_control( |
| 291 | \Elementor\Group_Control_Box_Shadow::get_type(), |
| 292 | array( |
| 293 | 'name' => 'form_shadow_hover', |
| 294 | 'selector' => '{{WRAPPER}} .everest-forms .everest-forms:hover', |
| 295 | ) |
| 296 | ); |
| 297 | |
| 298 | $widget->end_controls_tab(); |
| 299 | |
| 300 | $widget->end_controls_tabs(); |
| 301 | |
| 302 | $widget->end_controls_section(); |
| 303 | $widget->start_controls_section( |
| 304 | 'everest_form_label', |
| 305 | array( |
| 306 | 'label' => esc_html__( 'Field Label', 'everest-forms' ), |
| 307 | 'tab' => \Elementor\Controls_Manager::TAB_STYLE, |
| 308 | ) |
| 309 | ); |
| 310 | |
| 311 | $widget->add_responsive_control( |
| 312 | 'label_padding', |
| 313 | array( |
| 314 | 'label' => esc_html__( 'Padding', 'everest-forms' ), |
| 315 | 'type' => \Elementor\Controls_Manager::DIMENSIONS, |
| 316 | 'size_units' => array( 'px', '%' ), |
| 317 | 'selectors' => array( |
| 318 | '{{WRAPPER}} .everest-forms .evf-field-label .evf-label' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 319 | ), |
| 320 | 'separator' => 'after', |
| 321 | ) |
| 322 | ); |
| 323 | |
| 324 | $widget->add_responsive_control( |
| 325 | 'label_margin', |
| 326 | array( |
| 327 | 'label' => esc_html__( 'Margin', 'everest-forms' ), |
| 328 | 'type' => \Elementor\Controls_Manager::DIMENSIONS, |
| 329 | 'size_units' => array( 'px', '%' ), |
| 330 | 'selectors' => array( |
| 331 | '{{WRAPPER}} .everest-forms .evf-field-label .evf-label' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 332 | ), |
| 333 | 'separator' => 'after', |
| 334 | ) |
| 335 | ); |
| 336 | |
| 337 | $widget->add_group_control( |
| 338 | \Elementor\Group_Control_Typography::get_type(), |
| 339 | array( |
| 340 | 'name' => 'label_typography', |
| 341 | 'selector' => '{{WRAPPER}} .everest-forms .evf-field-label .evf-label', |
| 342 | ) |
| 343 | ); |
| 344 | |
| 345 | $widget->add_control( |
| 346 | 'label_color', |
| 347 | array( |
| 348 | 'label' => esc_html__( 'Label', 'everest-forms' ), |
| 349 | 'type' => \Elementor\Controls_Manager::COLOR, |
| 350 | 'selectors' => array( |
| 351 | '{{WRAPPER}} .everest-forms .evf-field-label .evf-label' => 'color: {{VALUE}}', |
| 352 | 'separator' => 'after', |
| 353 | ), |
| 354 | ) |
| 355 | ); |
| 356 | |
| 357 | $widget->add_control( |
| 358 | 'inline_help_label_color', |
| 359 | array( |
| 360 | 'label' => esc_html__( 'Inline/Description Text', 'everest-forms' ), |
| 361 | 'type' => \Elementor\Controls_Manager::COLOR, |
| 362 | 'selectors' => array( |
| 363 | '{{WRAPPER}} .everest-forms .form-row .everest-forms-field-label-inline,{{WRAPPER}} .everest-forms .form-row .evf-field-description' => 'color: {{VALUE}}', |
| 364 | 'separator' => 'after', |
| 365 | ), |
| 366 | ) |
| 367 | ); |
| 368 | |
| 369 | $widget->add_control( |
| 370 | 'req_symbol_color', |
| 371 | array( |
| 372 | 'label' => esc_html__( 'Required Symbol', 'everest-forms' ), |
| 373 | 'type' => \Elementor\Controls_Manager::COLOR, |
| 374 | 'selectors' => array( |
| 375 | '{{WRAPPER}} .everest-forms .evf-field-container .evf-frontend-row label .required' => 'color: {{VALUE}} !important', |
| 376 | ), |
| 377 | ) |
| 378 | ); |
| 379 | |
| 380 | $widget->end_controls_section(); |
| 381 | |
| 382 | $widget->start_controls_section( |
| 383 | 'section_style_input', |
| 384 | array( |
| 385 | 'label' => esc_html__( 'Input Fields', 'everest-forms' ), |
| 386 | 'tab' => \Elementor\Controls_Manager::TAB_STYLE, |
| 387 | ) |
| 388 | ); |
| 389 | |
| 390 | $widget->add_group_control( |
| 391 | \Elementor\Group_Control_Typography::get_type(), |
| 392 | array( |
| 393 | 'name' => 'input_typography', |
| 394 | 'selector' => '{{WRAPPER}} .everest-forms input[type="text"], |
| 395 | {{WRAPPER}} .everest-forms input[type="email"], |
| 396 | {{WRAPPER}} .everest-forms input[type="number"], |
| 397 | {{WRAPPER}} .everest-forms input[type="url"], |
| 398 | {{WRAPPER}} .everest-forms .evf-field-container .evf-frontend-row select', |
| 399 | ) |
| 400 | ); |
| 401 | |
| 402 | $widget->add_control( |
| 403 | 'input_placeholder_color', |
| 404 | array( |
| 405 | 'label' => esc_html__( 'Placeholder Color', 'everest-forms' ), |
| 406 | 'type' => \Elementor\Controls_Manager::COLOR, |
| 407 | 'selectors' => array( |
| 408 | '{{WRAPPER}} .everest-forms input::-webkit-input-placeholder, |
| 409 | {{WRAPPER}} .everest-forms email::-webkit-input-placeholder, |
| 410 | {{WRAPPER}} .everest-forms number::-webkit-input-placeholder, |
| 411 | {{WRAPPER}} .everest-forms select::-webkit-input-placeholder, |
| 412 | {{WRAPPER}} .everest-forms url::-webkit-input-placeholder' => 'color: {{VALUE}};', |
| 413 | ), |
| 414 | ) |
| 415 | ); |
| 416 | |
| 417 | $widget->add_responsive_control( |
| 418 | 'input_padding', |
| 419 | array( |
| 420 | 'label' => esc_html__( 'Padding', 'everest-forms' ), |
| 421 | 'type' => \Elementor\Controls_Manager::DIMENSIONS, |
| 422 | 'size_units' => array( 'px', '%' ), |
| 423 | 'selectors' => array( |
| 424 | '{{WRAPPER}} .everest-forms input[type="text"], |
| 425 | {{WRAPPER}} .everest-forms input[type="email"], |
| 426 | {{WRAPPER}} .everest-forms input[type="number"], |
| 427 | {{WRAPPER}} .everest-forms input[type="url"], |
| 428 | {{WRAPPER}} .everest-forms .evf-field-container .evf-frontend-row select' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 429 | ), |
| 430 | 'separator' => 'after', |
| 431 | ) |
| 432 | ); |
| 433 | |
| 434 | $widget->add_responsive_control( |
| 435 | 'input_margin', |
| 436 | array( |
| 437 | 'label' => esc_html__( 'Margin', 'everest-forms' ), |
| 438 | 'type' => \Elementor\Controls_Manager::DIMENSIONS, |
| 439 | 'size_units' => array( 'px', '%' ), |
| 440 | 'selectors' => array( |
| 441 | '{{WRAPPER}} .everest-forms input[type="text"], |
| 442 | {{WRAPPER}} .everest-forms input[type="password"], |
| 443 | {{WRAPPER}} .everest-forms input[type="email"], |
| 444 | {{WRAPPER}} .everest-forms input[type="number"], |
| 445 | {{WRAPPER}} .everest-forms input[type="url"], |
| 446 | {{WRAPPER}} .everest-forms .evf-field-container .evf-frontend-row select' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 447 | ), |
| 448 | 'separator' => 'after', |
| 449 | ) |
| 450 | ); |
| 451 | |
| 452 | $widget->start_controls_tabs( 'tabs_input_field_style' ); |
| 453 | $widget->start_controls_tab( |
| 454 | 'tab_input_field_normal', |
| 455 | array( |
| 456 | 'label' => esc_html__( 'Normal', 'everest-forms' ), |
| 457 | ) |
| 458 | ); |
| 459 | |
| 460 | $widget->add_control( |
| 461 | 'input_field_color', |
| 462 | array( |
| 463 | 'label' => esc_html__( 'Text Color', 'everest-forms' ), |
| 464 | 'type' => \Elementor\Controls_Manager::COLOR, |
| 465 | 'selectors' => array( |
| 466 | '{{WRAPPER}} .everest-forms input[type="text"], |
| 467 | {{WRAPPER}} .everest-forms input[type="email"], |
| 468 | {{WRAPPER}} .everest-forms input[type="number"], |
| 469 | {{WRAPPER}} .everest-forms input[type="url"], |
| 470 | {{WRAPPER}} .everest-forms .evf-field-container .evf-frontend-row select' => 'color: {{VALUE}};', |
| 471 | ), |
| 472 | ) |
| 473 | ); |
| 474 | |
| 475 | $widget->add_group_control( |
| 476 | \Elementor\Group_Control_Background::get_type(), |
| 477 | array( |
| 478 | 'name' => 'input_field_bg', |
| 479 | 'types' => array( 'classic', 'gradient' ), |
| 480 | 'selector' => '{{WRAPPER}} .everest-forms input[type="text"], |
| 481 | {{WRAPPER}} .everest-forms input[type="email"], |
| 482 | {{WRAPPER}} .everest-forms input[type="number"], |
| 483 | {{WRAPPER}} .everest-forms input[type="url"], |
| 484 | {{WRAPPER}} .everest-forms .evf-field-container .evf-frontend-row select', |
| 485 | ) |
| 486 | ); |
| 487 | |
| 488 | $widget->end_controls_tab(); |
| 489 | |
| 490 | $widget->start_controls_tab( |
| 491 | 'tab_input_field_focus', |
| 492 | array( |
| 493 | 'label' => esc_html__( 'Focus', 'everest-forms' ), |
| 494 | ) |
| 495 | ); |
| 496 | |
| 497 | $widget->add_control( |
| 498 | 'input_field_focus_color', |
| 499 | array( |
| 500 | 'label' => esc_html__( 'Text Color', 'everest-forms' ), |
| 501 | 'type' => \Elementor\Controls_Manager::COLOR, |
| 502 | 'selectors' => array( |
| 503 | '{{WRAPPER}} .everest-forms input[type="text"]:focus, |
| 504 | {{WRAPPER}} .everest-forms input[type="email"]:focus, |
| 505 | {{WRAPPER}} .everest-forms input[type="number"]:focus, |
| 506 | {{WRAPPER}} .everest-forms input[type="url"]:focus, |
| 507 | {{WRAPPER}} .everest-forms .evf-field-container .evf-frontend-row select:focus' => 'color: {{VALUE}};', |
| 508 | ), |
| 509 | ) |
| 510 | ); |
| 511 | |
| 512 | $widget->add_group_control( |
| 513 | \Elementor\Group_Control_Background::get_type(), |
| 514 | array( |
| 515 | 'name' => 'input_field_focus_bg', |
| 516 | 'types' => array( 'classic', 'gradient' ), |
| 517 | 'selector' => '{{WRAPPER}} .everest-forms input[type="text"]:focus, |
| 518 | {{WRAPPER}} .everest-forms input[type="email"]:focus, |
| 519 | {{WRAPPER}} .everest-forms input[type="number"]:focus, |
| 520 | {{WRAPPER}} .everest-forms input[type="url"]:focus, |
| 521 | {{WRAPPER}} .everest-forms .evf-field-container .evf-frontend-row select:focus', |
| 522 | ) |
| 523 | ); |
| 524 | |
| 525 | $widget->end_controls_tab(); |
| 526 | |
| 527 | $widget->end_controls_tabs(); |
| 528 | |
| 529 | $widget->add_control( |
| 530 | 'input_border_options', |
| 531 | array( |
| 532 | 'label' => esc_html__( 'Border Options', 'everest-forms' ), |
| 533 | 'type' => \Elementor\Controls_Manager::HEADING, |
| 534 | 'separator' => 'before', |
| 535 | ) |
| 536 | ); |
| 537 | |
| 538 | $widget->add_control( |
| 539 | 'box_border', |
| 540 | array( |
| 541 | 'label' => esc_html__( 'Box Border', 'everest-forms' ), |
| 542 | 'type' => \Elementor\Controls_Manager::SWITCHER, |
| 543 | 'label_on' => esc_html__( 'Show', 'everest-forms' ), |
| 544 | 'label_off' => esc_html__( 'Hide', 'everest-forms' ), |
| 545 | 'default' => 'no', |
| 546 | ) |
| 547 | ); |
| 548 | |
| 549 | $widget->add_control( |
| 550 | 'border_style', |
| 551 | array( |
| 552 | 'label' => esc_html__( 'Border Style', 'everest-forms' ), |
| 553 | 'type' => \Elementor\Controls_Manager::SELECT, |
| 554 | 'default' => 'solid', |
| 555 | 'options' => array( |
| 556 | 'solid' => esc_html__( 'Solid', 'everest-forms' ), |
| 557 | 'dotted' => esc_html__( 'Dotted', 'everest-forms' ), |
| 558 | 'dashed' => esc_html__( 'Dashed', 'everest-forms' ), |
| 559 | 'groove' => esc_html__( 'Groove', 'everest-forms' ), |
| 560 | ), |
| 561 | 'selectors' => array( |
| 562 | '{{WRAPPER}} .everest-forms input[type="text"], |
| 563 | {{WRAPPER}} .everest-forms input[type="email"], |
| 564 | {{WRAPPER}} .everest-forms input[type="number"], |
| 565 | {{WRAPPER}} .everest-forms input[type="url"], |
| 566 | {{WRAPPER}} .everest-forms .evf-field-container .evf-frontend-row select' => 'border-style: {{VALUE}};', |
| 567 | ), |
| 568 | 'condition' => array( |
| 569 | 'box_border' => 'yes', |
| 570 | ), |
| 571 | ) |
| 572 | ); |
| 573 | |
| 574 | $widget->add_responsive_control( |
| 575 | 'box_border_width', |
| 576 | array( |
| 577 | 'label' => esc_html__( 'Border Width', 'everest-forms' ), |
| 578 | 'type' => \Elementor\Controls_Manager::DIMENSIONS, |
| 579 | 'size_units' => array( 'px', '%' ), |
| 580 | 'default' => array( |
| 581 | 'top' => 1, |
| 582 | 'right' => 1, |
| 583 | 'bottom' => 1, |
| 584 | 'left' => 1, |
| 585 | ), |
| 586 | 'selectors' => array( |
| 587 | '{{WRAPPER}} .everest-forms input[type="text"], |
| 588 | {{WRAPPER}} .everest-forms input[type="email"], |
| 589 | {{WRAPPER}} .everest-forms input[type="number"], |
| 590 | {{WRAPPER}} .everest-forms input[type="url"], |
| 591 | {{WRAPPER}} .everest-forms .evf-field-container .evf-frontend-row select' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 592 | ), |
| 593 | 'condition' => array( |
| 594 | 'box_border' => 'yes', |
| 595 | ), |
| 596 | ) |
| 597 | ); |
| 598 | |
| 599 | $widget->start_controls_tabs( 'tabs_border_style' ); |
| 600 | |
| 601 | $widget->start_controls_tab( |
| 602 | 'tab_border_normal', |
| 603 | array( |
| 604 | 'label' => esc_html__( 'Normal', 'everest-forms' ), |
| 605 | 'condition' => array( |
| 606 | 'box_border' => 'yes', |
| 607 | ), |
| 608 | ) |
| 609 | ); |
| 610 | |
| 611 | $widget->add_control( |
| 612 | 'box_border_color', |
| 613 | array( |
| 614 | 'label' => esc_html__( 'Border Color', 'everest-forms' ), |
| 615 | 'type' => \Elementor\Controls_Manager::COLOR, |
| 616 | 'default' => '#252525', |
| 617 | 'selectors' => array( |
| 618 | '{{WRAPPER}} .everest-forms input[type="text"], |
| 619 | {{WRAPPER}} .everest-forms input[type="email"], |
| 620 | {{WRAPPER}} .everest-forms input[type="number"], |
| 621 | {{WRAPPER}} .everest-forms input[type="url"], |
| 622 | {{WRAPPER}} .everest-forms .evf-field-container .evf-frontend-row select' => 'border-color: {{VALUE}};', |
| 623 | ), |
| 624 | 'condition' => array( |
| 625 | 'box_border' => 'yes', |
| 626 | ), |
| 627 | ) |
| 628 | ); |
| 629 | |
| 630 | $widget->add_responsive_control( |
| 631 | 'border_radius', |
| 632 | array( |
| 633 | 'label' => esc_html__( 'Border Radius', 'everest-forms' ), |
| 634 | 'type' => \Elementor\Controls_Manager::DIMENSIONS, |
| 635 | 'size_units' => array( 'px', '%' ), |
| 636 | 'selectors' => array( |
| 637 | '{{WRAPPER}} .everest-forms input[type="text"], |
| 638 | {{WRAPPER}} .everest-forms input[type="email"], |
| 639 | {{WRAPPER}} .everest-forms input[type="number"], |
| 640 | {{WRAPPER}} .everest-forms input[type="url"], |
| 641 | {{WRAPPER}} .everest-forms .evf-field-container .evf-frontend-row select' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 642 | ), |
| 643 | 'condition' => array( |
| 644 | 'box_border' => 'yes', |
| 645 | ), |
| 646 | ) |
| 647 | ); |
| 648 | |
| 649 | $widget->end_controls_tab(); |
| 650 | |
| 651 | $widget->start_controls_tab( |
| 652 | 'tab_border_hover', |
| 653 | array( |
| 654 | 'label' => esc_html__( 'Focus', 'everest-forms' ), |
| 655 | 'condition' => array( |
| 656 | 'box_border' => 'yes', |
| 657 | ), |
| 658 | ) |
| 659 | ); |
| 660 | |
| 661 | $widget->add_control( |
| 662 | 'box_border_hover_color', |
| 663 | array( |
| 664 | 'label' => esc_html__( 'Border Color', 'everest-forms' ), |
| 665 | 'type' => \Elementor\Controls_Manager::COLOR, |
| 666 | 'default' => '', |
| 667 | 'selectors' => array( |
| 668 | '{{WRAPPER}} .everest-forms input[type="text"]:focus, |
| 669 | {{WRAPPER}} .everest-forms input[type="email"]:focus, |
| 670 | {{WRAPPER}} .everest-forms input[type="number"]:focus, |
| 671 | {{WRAPPER}} .everest-forms input[type="url"]:focus, |
| 672 | {{WRAPPER}} .everest-forms .evf-field-container .evf-frontend-row select:focus' => 'border-color: {{VALUE}};', |
| 673 | ), |
| 674 | 'condition' => array( |
| 675 | 'box_border' => 'yes', |
| 676 | ), |
| 677 | ) |
| 678 | ); |
| 679 | |
| 680 | $widget->add_responsive_control( |
| 681 | 'border_hover_radius', |
| 682 | array( |
| 683 | 'label' => esc_html__( 'Border Radius', 'everest-forms' ), |
| 684 | 'type' => \Elementor\Controls_Manager::DIMENSIONS, |
| 685 | 'size_units' => array( 'px', '%' ), |
| 686 | 'selectors' => array( |
| 687 | '{{WRAPPER}} .everest-forms input[type="text"]:focus, |
| 688 | {{WRAPPER}} .everest-forms input[type="email"]:focus, |
| 689 | {{WRAPPER}} .everest-forms input[type="number"]:focus, |
| 690 | {{WRAPPER}} .everest-forms input[type="url"]:focus, |
| 691 | {{WRAPPER}} .everest-forms .evf-field-container .evf-frontend-row select:focus' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 692 | ), |
| 693 | 'condition' => array( |
| 694 | 'box_border' => 'yes', |
| 695 | ), |
| 696 | ) |
| 697 | ); |
| 698 | |
| 699 | $widget->end_controls_tab(); |
| 700 | |
| 701 | $widget->end_controls_tabs(); |
| 702 | |
| 703 | $widget->add_control( |
| 704 | 'shadow_options', |
| 705 | array( |
| 706 | 'label' => esc_html__( 'Box Shadow Options', 'everest-forms' ), |
| 707 | 'type' => \Elementor\Controls_Manager::HEADING, |
| 708 | 'separator' => 'before', |
| 709 | ) |
| 710 | ); |
| 711 | |
| 712 | $widget->start_controls_tabs( 'tabs_shadow_style' ); |
| 713 | |
| 714 | $widget->start_controls_tab( |
| 715 | 'tab_shadow_normal', |
| 716 | array( |
| 717 | 'label' => esc_html__( 'Normal', 'everest-forms' ), |
| 718 | ) |
| 719 | ); |
| 720 | |
| 721 | $widget->add_group_control( |
| 722 | \Elementor\Group_Control_Box_Shadow::get_type(), |
| 723 | array( |
| 724 | 'name' => 'box_shadow', |
| 725 | 'selector' => '{{WRAPPER}} .everest-forms input[type="text"], |
| 726 | {{WRAPPER}} .everest-forms input[type="email"], |
| 727 | {{WRAPPER}} .everest-forms input[type="number"], |
| 728 | {{WRAPPER}} .everest-forms input[type="url"], |
| 729 | {{WRAPPER}} .everest-forms .evf-field-container .evf-frontend-row select', |
| 730 | ) |
| 731 | ); |
| 732 | |
| 733 | $widget->end_controls_tab(); |
| 734 | |
| 735 | $widget->start_controls_tab( |
| 736 | 'tab_shadow_hover', |
| 737 | array( |
| 738 | 'label' => esc_html__( 'Focus', 'everest-forms' ), |
| 739 | ) |
| 740 | ); |
| 741 | |
| 742 | $widget->add_group_control( |
| 743 | \Elementor\Group_Control_Box_Shadow::get_type(), |
| 744 | array( |
| 745 | 'name' => 'box_active_shadow', |
| 746 | 'selector' => '{{WRAPPER}} .everest-forms input[type="text"]:focus, |
| 747 | {{WRAPPER}} .everest-forms input[type="email"]:focus, |
| 748 | {{WRAPPER}} .everest-forms input[type="number"]:focus, |
| 749 | {{WRAPPER}} .everest-forms input[type="url"]:focus, |
| 750 | {{WRAPPER}} .everest-forms .evf-field-container .evf-frontend-row select:focus', |
| 751 | ) |
| 752 | ); |
| 753 | |
| 754 | $widget->end_controls_tab(); |
| 755 | |
| 756 | $widget->end_controls_tabs(); |
| 757 | |
| 758 | $widget->end_controls_section(); |
| 759 | |
| 760 | $widget->start_controls_section( |
| 761 | 'section_style_textarea', |
| 762 | array( |
| 763 | 'label' => esc_html__( 'Textarea Fields', 'everest-forms' ), |
| 764 | 'tab' => \Elementor\Controls_Manager::TAB_STYLE, |
| 765 | ) |
| 766 | ); |
| 767 | |
| 768 | $widget->add_responsive_control( |
| 769 | 'textarea_padding', |
| 770 | array( |
| 771 | 'label' => esc_html__( 'Padding', 'everest-forms' ), |
| 772 | 'type' => \Elementor\Controls_Manager::DIMENSIONS, |
| 773 | 'size_units' => array( 'px', '%' ), |
| 774 | 'selectors' => array( |
| 775 | '{{WRAPPER}} .everest-forms .evf-field-container .evf-frontend-row textarea' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 776 | ), |
| 777 | 'separator' => 'after', |
| 778 | ) |
| 779 | ); |
| 780 | |
| 781 | $widget->add_responsive_control( |
| 782 | 'textarea_margin', |
| 783 | array( |
| 784 | 'label' => esc_html__( 'Margin', 'everest-forms' ), |
| 785 | 'type' => \Elementor\Controls_Manager::DIMENSIONS, |
| 786 | 'size_units' => array( 'px', '%' ), |
| 787 | 'selectors' => array( |
| 788 | '{{WRAPPER}} .everest-forms .evf-field-container .evf-frontend-row textarea' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 789 | ), |
| 790 | 'separator' => 'after', |
| 791 | ) |
| 792 | ); |
| 793 | |
| 794 | $widget->add_group_control( |
| 795 | \Elementor\Group_Control_Typography::get_type(), |
| 796 | array( |
| 797 | 'name' => 'textarea_typography', |
| 798 | 'selector' => '{{WRAPPER}} .everest-forms .evf-field-container .evf-frontend-row textarea', |
| 799 | ) |
| 800 | ); |
| 801 | |
| 802 | $widget->add_control( |
| 803 | 'textarea_placeholder_color', |
| 804 | array( |
| 805 | 'label' => esc_html__( 'Placeholder Color', 'everest-forms' ), |
| 806 | 'type' => \Elementor\Controls_Manager::COLOR, |
| 807 | 'selectors' => array( |
| 808 | '{{WRAPPER}} .everest-forms textarea::-webkit-input-placeholder' => 'color: {{VALUE}};', |
| 809 | ), |
| 810 | ) |
| 811 | ); |
| 812 | |
| 813 | $widget->start_controls_tabs( 'tabs_textarea_field_style' ); |
| 814 | |
| 815 | $widget->start_controls_tab( |
| 816 | 'tab_textarea_field_normal', |
| 817 | array( |
| 818 | 'label' => esc_html__( 'Normal', 'everest-forms' ), |
| 819 | ) |
| 820 | ); |
| 821 | |
| 822 | $widget->add_control( |
| 823 | 'textarea_field_color', |
| 824 | array( |
| 825 | 'label' => esc_html__( 'Text Color', 'everest-forms' ), |
| 826 | 'type' => \Elementor\Controls_Manager::COLOR, |
| 827 | 'selectors' => array( |
| 828 | '{{WRAPPER}} .everest-forms .everest-forms .evf-field-container .evf-frontend-row textarea' => 'color: {{VALUE}};', |
| 829 | ), |
| 830 | ) |
| 831 | ); |
| 832 | |
| 833 | $widget->add_group_control( |
| 834 | \Elementor\Group_Control_Background::get_type(), |
| 835 | array( |
| 836 | 'name' => 'textarea_field_bg', |
| 837 | 'types' => array( 'classic', 'gradient' ), |
| 838 | 'selector' => '{{WRAPPER}} .everest-forms .evf-field-container .evf-frontend-row textarea', |
| 839 | ) |
| 840 | ); |
| 841 | |
| 842 | $widget->end_controls_tab(); |
| 843 | |
| 844 | $widget->start_controls_tab( |
| 845 | 'tab_textarea_field_focus', |
| 846 | array( |
| 847 | 'label' => esc_html__( 'Focus', 'everest-forms' ), |
| 848 | ) |
| 849 | ); |
| 850 | |
| 851 | $widget->add_control( |
| 852 | 'textarea_field_focus_color', |
| 853 | array( |
| 854 | 'label' => esc_html__( 'Text Color', 'everest-forms' ), |
| 855 | 'type' => \Elementor\Controls_Manager::COLOR, |
| 856 | 'selectors' => array( |
| 857 | '{{WRAPPER}} .everest-forms .evf-field-container .evf-frontend-row textarea:focus' => 'color: {{VALUE}};', |
| 858 | ), |
| 859 | ) |
| 860 | ); |
| 861 | |
| 862 | $widget->add_group_control( |
| 863 | \Elementor\Group_Control_Background::get_type(), |
| 864 | array( |
| 865 | 'name' => 'textarea_field_focus_bg', |
| 866 | 'types' => array( 'classic', 'gradient' ), |
| 867 | 'selector' => '{{WRAPPER}} .everest-forms .evf-field-container .evf-frontend-row textarea:focus', |
| 868 | ) |
| 869 | ); |
| 870 | |
| 871 | $widget->end_controls_tab(); |
| 872 | |
| 873 | $widget->end_controls_tabs(); |
| 874 | |
| 875 | $widget->add_control( |
| 876 | 'textarea_border_options', |
| 877 | array( |
| 878 | 'label' => esc_html__( 'Border Options', 'everest-forms' ), |
| 879 | 'type' => \Elementor\Controls_Manager::HEADING, |
| 880 | 'separator' => 'before', |
| 881 | ) |
| 882 | ); |
| 883 | |
| 884 | $widget->add_control( |
| 885 | 'ta_box_border', |
| 886 | array( |
| 887 | 'label' => esc_html__( 'Box Border', 'everest-forms' ), |
| 888 | 'type' => \Elementor\Controls_Manager::SWITCHER, |
| 889 | 'label_on' => esc_html__( 'Show', 'everest-forms' ), |
| 890 | 'label_off' => esc_html__( 'Hide', 'everest-forms' ), |
| 891 | 'default' => 'no', |
| 892 | ) |
| 893 | ); |
| 894 | |
| 895 | $widget->add_control( |
| 896 | 'ta_border_style', |
| 897 | array( |
| 898 | 'label' => esc_html__( 'Border Style', 'everest-forms' ), |
| 899 | 'type' => \Elementor\Controls_Manager::SELECT, |
| 900 | 'default' => 'solid', |
| 901 | 'options' => array( |
| 902 | 'solid' => esc_html__( 'Solid', 'everest-forms' ), |
| 903 | 'dotted' => esc_html__( 'Dotted', 'everest-forms' ), |
| 904 | 'dashed' => esc_html__( 'Dashed', 'everest-forms' ), |
| 905 | 'groove' => esc_html__( 'Groove', 'everest-forms' ), |
| 906 | ), |
| 907 | 'selectors' => array( |
| 908 | '{{WRAPPER}} .everest-forms .evf-field-container .evf-frontend-row textarea' => 'border-style: {{VALUE}};', |
| 909 | ), |
| 910 | 'condition' => array( |
| 911 | 'ta_box_border' => 'yes', |
| 912 | ), |
| 913 | ) |
| 914 | ); |
| 915 | |
| 916 | $widget->add_responsive_control( |
| 917 | 'ta_box_border_width', |
| 918 | array( |
| 919 | 'label' => esc_html__( 'Border Width', 'everest-forms' ), |
| 920 | 'type' => \Elementor\Controls_Manager::DIMENSIONS, |
| 921 | 'size_units' => array( 'px', '%' ), |
| 922 | 'default' => array( |
| 923 | 'top' => 1, |
| 924 | 'right' => 1, |
| 925 | 'bottom' => 1, |
| 926 | 'left' => 1, |
| 927 | ), |
| 928 | 'selectors' => array( |
| 929 | '{{WRAPPER}} .everest-forms .evf-field-container .evf-frontend-row textarea' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 930 | ), |
| 931 | 'condition' => array( |
| 932 | 'ta_box_border' => 'yes', |
| 933 | ), |
| 934 | ) |
| 935 | ); |
| 936 | |
| 937 | $widget->start_controls_tabs( 'tabs_ta_border_style' ); |
| 938 | |
| 939 | $widget->start_controls_tab( |
| 940 | 'tab_ta_border_normal', |
| 941 | array( |
| 942 | 'label' => esc_html__( 'Normal', 'everest-forms' ), |
| 943 | 'condition' => array( |
| 944 | 'ta_box_border' => 'yes', |
| 945 | ), |
| 946 | ) |
| 947 | ); |
| 948 | |
| 949 | $widget->add_control( |
| 950 | 'ta_box_border_color', |
| 951 | array( |
| 952 | 'label' => esc_html__( 'Border Color', 'everest-forms' ), |
| 953 | 'type' => \Elementor\Controls_Manager::COLOR, |
| 954 | 'selectors' => array( |
| 955 | '{{WRAPPER}} .everest-forms .evf-field-container .evf-frontend-row textarea' => 'border-color: {{VALUE}};', |
| 956 | ), |
| 957 | 'condition' => array( |
| 958 | 'ta_box_border' => 'yes', |
| 959 | ), |
| 960 | ) |
| 961 | ); |
| 962 | |
| 963 | $widget->add_responsive_control( |
| 964 | 'ta_border_radius', |
| 965 | array( |
| 966 | 'label' => esc_html__( 'Border Radius', 'everest-forms' ), |
| 967 | 'type' => \Elementor\Controls_Manager::DIMENSIONS, |
| 968 | 'size_units' => array( 'px', '%' ), |
| 969 | 'selectors' => array( |
| 970 | '{{WRAPPER}} .everest-forms .evf-field-container .evf-frontend-row textarea' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 971 | ), |
| 972 | 'condition' => array( |
| 973 | 'ta_box_border' => 'yes', |
| 974 | ), |
| 975 | ) |
| 976 | ); |
| 977 | |
| 978 | $widget->end_controls_tab(); |
| 979 | |
| 980 | $widget->start_controls_tab( |
| 981 | 'tab_ta_border_hover', |
| 982 | array( |
| 983 | 'label' => esc_html__( 'Focus', 'everest-forms' ), |
| 984 | 'condition' => array( |
| 985 | 'ta_box_border' => 'yes', |
| 986 | ), |
| 987 | ) |
| 988 | ); |
| 989 | |
| 990 | $widget->add_control( |
| 991 | 'ta_box_border_hover_color', |
| 992 | array( |
| 993 | 'label' => esc_html__( 'Border Color', 'everest-forms' ), |
| 994 | 'type' => \Elementor\Controls_Manager::COLOR, |
| 995 | 'default' => '', |
| 996 | 'selectors' => array( |
| 997 | '{{WRAPPER}} .everest-forms .evf-field-container .evf-frontend-row textarea:focus' => 'border-color: {{VALUE}};', |
| 998 | ), |
| 999 | 'condition' => array( |
| 1000 | 'ta_box_border' => 'yes', |
| 1001 | ), |
| 1002 | ) |
| 1003 | ); |
| 1004 | |
| 1005 | $widget->add_responsive_control( |
| 1006 | 'ta_border_hover_radius', |
| 1007 | array( |
| 1008 | 'label' => esc_html__( 'Border Radius', 'everest-forms' ), |
| 1009 | 'type' => \Elementor\Controls_Manager::DIMENSIONS, |
| 1010 | 'size_units' => array( 'px', '%' ), |
| 1011 | 'selectors' => array( |
| 1012 | '{{WRAPPER}} .everest-forms .evf-field-container .evf-frontend-row textarea:focus' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1013 | ), |
| 1014 | 'condition' => array( |
| 1015 | 'ta_box_border' => 'yes', |
| 1016 | ), |
| 1017 | ) |
| 1018 | ); |
| 1019 | |
| 1020 | $widget->end_controls_tab(); |
| 1021 | |
| 1022 | $widget->end_controls_tabs(); |
| 1023 | |
| 1024 | $widget->add_control( |
| 1025 | 'ta_shadow_options', |
| 1026 | array( |
| 1027 | 'label' => esc_html__( 'Box Shadow Options', 'everest-forms' ), |
| 1028 | 'type' => \Elementor\Controls_Manager::HEADING, |
| 1029 | 'separator' => 'before', |
| 1030 | ) |
| 1031 | ); |
| 1032 | |
| 1033 | $widget->start_controls_tabs( 'tabs_ta_shadow_style' ); |
| 1034 | |
| 1035 | $widget->start_controls_tab( |
| 1036 | 'tab_ta_shadow_normal', |
| 1037 | array( |
| 1038 | 'label' => esc_html__( 'Normal', 'everest-forms' ), |
| 1039 | ) |
| 1040 | ); |
| 1041 | |
| 1042 | $widget->add_group_control( |
| 1043 | \Elementor\Group_Control_Box_Shadow::get_type(), |
| 1044 | array( |
| 1045 | 'name' => 'ta_box_shadow', |
| 1046 | 'selector' => '{{WRAPPER}} .everest-forms .evf-field-container .evf-frontend-row textarea', |
| 1047 | ) |
| 1048 | ); |
| 1049 | |
| 1050 | $widget->end_controls_tab(); |
| 1051 | |
| 1052 | $widget->start_controls_tab( |
| 1053 | 'tab_ta_shadow_hover', |
| 1054 | array( |
| 1055 | 'label' => esc_html__( 'Focus', 'everest-forms' ), |
| 1056 | ) |
| 1057 | ); |
| 1058 | |
| 1059 | $widget->add_group_control( |
| 1060 | \Elementor\Group_Control_Box_Shadow::get_type(), |
| 1061 | array( |
| 1062 | 'name' => 'ta_box_active_shadow', |
| 1063 | 'selector' => '{{WRAPPER}} .everest-forms .evf-field-container .evf-frontend-row textarea:focus', |
| 1064 | ) |
| 1065 | ); |
| 1066 | |
| 1067 | $widget->end_controls_tab(); |
| 1068 | |
| 1069 | $widget->end_controls_tabs(); |
| 1070 | |
| 1071 | $widget->end_controls_section(); |
| 1072 | |
| 1073 | $widget->start_controls_section( |
| 1074 | 'section_checked_styling', |
| 1075 | array( |
| 1076 | 'label' => esc_html__( 'Radio/Checkbox Field', 'everest-forms' ), |
| 1077 | 'tab' => \Elementor\Controls_Manager::TAB_STYLE, |
| 1078 | ) |
| 1079 | ); |
| 1080 | |
| 1081 | $widget->start_controls_tabs( 'tabs_checkbox_field_style' ); |
| 1082 | $widget->start_controls_tab( |
| 1083 | 'tab_unchecked_field_bg', |
| 1084 | array( |
| 1085 | 'label' => esc_html__( 'Check Box', 'everest-forms' ), |
| 1086 | ) |
| 1087 | ); |
| 1088 | |
| 1089 | $widget->add_group_control( |
| 1090 | \Elementor\Group_Control_Typography::get_type(), |
| 1091 | array( |
| 1092 | 'name' => 'checkbox_text_typography', |
| 1093 | 'selector' => '{{WRAPPER}} .everest-forms .evf-field-checkbox label.everest-forms-field-label-inline', |
| 1094 | ) |
| 1095 | ); |
| 1096 | |
| 1097 | $widget->add_control( |
| 1098 | 'checked_field_text_color', |
| 1099 | array( |
| 1100 | 'label' => esc_html__( 'Text Color', 'everest-forms' ), |
| 1101 | 'type' => \Elementor\Controls_Manager::COLOR, |
| 1102 | 'selectors' => array( |
| 1103 | '{{WRAPPER}} .everest-forms .evf-field-checkbox label.everest-forms-field-label-inline' => 'color: {{VALUE}};', |
| 1104 | ), |
| 1105 | 'separator' => 'after', |
| 1106 | ) |
| 1107 | ); |
| 1108 | |
| 1109 | $widget->end_controls_tab(); |
| 1110 | |
| 1111 | $widget->start_controls_tab( |
| 1112 | 'tab_radio_field', |
| 1113 | array( |
| 1114 | 'label' => esc_html__( 'Radio Button', 'everest-forms' ), |
| 1115 | ) |
| 1116 | ); |
| 1117 | |
| 1118 | $widget->add_group_control( |
| 1119 | \Elementor\Group_Control_Typography::get_type(), |
| 1120 | array( |
| 1121 | 'name' => 'radio_text_typography', |
| 1122 | 'selector' => '{{WRAPPER}} .everest-forms .evf-field-radio label.everest-forms-field-label-inline', |
| 1123 | ) |
| 1124 | ); |
| 1125 | |
| 1126 | $widget->add_control( |
| 1127 | 'radio_field_text_color', |
| 1128 | array( |
| 1129 | 'label' => esc_html__( 'Text Color', 'everest-forms' ), |
| 1130 | 'type' => \Elementor\Controls_Manager::COLOR, |
| 1131 | 'selectors' => array( |
| 1132 | '{{WRAPPER}} .everest-forms .evf-field-radio label.everest-forms-field-label-inline' => 'color: {{VALUE}};', |
| 1133 | ), |
| 1134 | 'separator' => 'after', |
| 1135 | ) |
| 1136 | ); |
| 1137 | |
| 1138 | $widget->end_controls_tab(); |
| 1139 | |
| 1140 | $widget->end_controls_tabs(); |
| 1141 | |
| 1142 | $widget->end_controls_section(); |
| 1143 | |
| 1144 | $widget->start_controls_section( |
| 1145 | 'section_button_styling', |
| 1146 | array( |
| 1147 | 'label' => esc_html__( 'Button Styles', 'everest-forms' ), |
| 1148 | 'tab' => \Elementor\Controls_Manager::TAB_STYLE, |
| 1149 | ) |
| 1150 | ); |
| 1151 | |
| 1152 | $widget->add_responsive_control( |
| 1153 | 'button_max_width', |
| 1154 | array( |
| 1155 | 'type' => \Elementor\Controls_Manager::SLIDER, |
| 1156 | 'label' => esc_html__( 'Width', 'everest-forms' ), |
| 1157 | 'size_units' => array( 'px', '%' ), |
| 1158 | 'range' => array( |
| 1159 | 'px' => array( |
| 1160 | 'min' => 100, |
| 1161 | 'max' => 2000, |
| 1162 | 'step' => 5, |
| 1163 | ), |
| 1164 | '%' => array( |
| 1165 | 'min' => 10, |
| 1166 | 'max' => 100, |
| 1167 | 'step' => 1, |
| 1168 | ), |
| 1169 | ), |
| 1170 | 'render_type' => 'ui', |
| 1171 | 'selectors' => array( |
| 1172 | '{{WRAPPER}} .everest-forms .everest-forms-part-button,{{WRAPPER}} .everest-forms button[type=submit],{{WRAPPER}} .everest-forms s input[type=submit]' => 'width: {{SIZE}}{{UNIT}}', |
| 1173 | ), |
| 1174 | 'separator' => 'after', |
| 1175 | ) |
| 1176 | ); |
| 1177 | |
| 1178 | $widget->add_group_control( |
| 1179 | \Elementor\Group_Control_Typography::get_type(), |
| 1180 | array( |
| 1181 | 'name' => 'button_typography', |
| 1182 | 'selector' => '{{WRAPPER}} .everest-forms .everest-forms-part-button,{{WRAPPER}} .everest-forms button[type=submit],{{WRAPPER}} .everest-forms input[type=submit]', |
| 1183 | ) |
| 1184 | ); |
| 1185 | |
| 1186 | $widget->add_responsive_control( |
| 1187 | 'button_inner_padding', |
| 1188 | array( |
| 1189 | 'label' => esc_html__( 'Padding', 'everest-forms' ), |
| 1190 | 'type' => \Elementor\Controls_Manager::DIMENSIONS, |
| 1191 | 'size_units' => array( 'px', '%' ), |
| 1192 | 'selectors' => array( |
| 1193 | '{{WRAPPER}} .everest-forms .everest-forms-part-button,{{WRAPPER}} .everest-forms button[type=submit],{{WRAPPER}} .everest-forms input[type=submit]' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1194 | ), |
| 1195 | 'separator' => 'before', |
| 1196 | ) |
| 1197 | ); |
| 1198 | |
| 1199 | $widget->add_responsive_control( |
| 1200 | 'button_margin', |
| 1201 | array( |
| 1202 | 'label' => esc_html__( 'Margin', 'everest-forms' ), |
| 1203 | 'type' => \Elementor\Controls_Manager::DIMENSIONS, |
| 1204 | 'size_units' => array( 'px', '%' ), |
| 1205 | 'selectors' => array( |
| 1206 | '{{WRAPPER}} .everest-forms .everest-forms-part-button,{{WRAPPER}} .everest-forms button[type=submit],{{WRAPPER}} .everest-forms input[type=submit]' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1207 | ), |
| 1208 | 'separator' => 'after', |
| 1209 | ) |
| 1210 | ); |
| 1211 | |
| 1212 | $widget->start_controls_tabs( 'tabs_button_style' ); |
| 1213 | |
| 1214 | $widget->start_controls_tab( |
| 1215 | 'tab_button_normal', |
| 1216 | array( |
| 1217 | 'label' => esc_html__( 'Normal', 'everest-forms' ), |
| 1218 | ) |
| 1219 | ); |
| 1220 | |
| 1221 | $widget->add_control( |
| 1222 | 'button_color', |
| 1223 | array( |
| 1224 | 'label' => esc_html__( 'Text Color', 'everest-forms' ), |
| 1225 | 'type' => \Elementor\Controls_Manager::COLOR, |
| 1226 | 'selectors' => array( |
| 1227 | '{{WRAPPER}} .everest-forms .everest-forms-part-button,{{WRAPPER}} .everest-forms button[type=submit],{{WRAPPER}} .everest-forms input[type=submit]' => 'color: {{VALUE}};', |
| 1228 | ), |
| 1229 | ) |
| 1230 | ); |
| 1231 | |
| 1232 | $widget->add_group_control( |
| 1233 | \Elementor\Group_Control_Background::get_type(), |
| 1234 | array( |
| 1235 | 'name' => 'button_bg', |
| 1236 | 'types' => array( 'classic', 'gradient' ), |
| 1237 | 'selector' => '{{WRAPPER}} .everest-forms .everest-forms-part-button,{{WRAPPER}} .everest-forms button[type=submit],{{WRAPPER}} .everest-forms input[type=submit]', |
| 1238 | ) |
| 1239 | ); |
| 1240 | |
| 1241 | $widget->end_controls_tab(); |
| 1242 | |
| 1243 | $widget->start_controls_tab( |
| 1244 | 'tab_button_hover', |
| 1245 | array( |
| 1246 | 'label' => esc_html__( 'Hover', 'everest-forms' ), |
| 1247 | ) |
| 1248 | ); |
| 1249 | |
| 1250 | $widget->add_control( |
| 1251 | 'button_hover_color', |
| 1252 | array( |
| 1253 | 'label' => esc_html__( 'Text Color', 'everest-forms' ), |
| 1254 | 'type' => \Elementor\Controls_Manager::COLOR, |
| 1255 | 'selectors' => array( |
| 1256 | '{{WRAPPER}} .everest-forms .everest-forms-part-button:hover,{{WRAPPER}} .everest-forms button[type=submit]:hover,{{WRAPPER}} .everest-forms input[type=submit]:hover' => 'color: {{VALUE}};', |
| 1257 | ), |
| 1258 | ) |
| 1259 | ); |
| 1260 | |
| 1261 | $widget->add_group_control( |
| 1262 | \Elementor\Group_Control_Background::get_type(), |
| 1263 | array( |
| 1264 | 'name' => 'button_hover_bg', |
| 1265 | 'types' => array( 'classic', 'gradient' ), |
| 1266 | 'selector' => '{{WRAPPER}} .everest-forms .everest-forms-part-button:hover,{{WRAPPER}} .everest-forms button[type=submit]:hover,{{WRAPPER}} .everest-forms .everest-forms input[type=submit]:hover', |
| 1267 | ) |
| 1268 | ); |
| 1269 | |
| 1270 | $widget->end_controls_tab(); |
| 1271 | |
| 1272 | $widget->end_controls_tabs(); |
| 1273 | |
| 1274 | $widget->add_control( |
| 1275 | 'button_border_options', |
| 1276 | array( |
| 1277 | 'label' => esc_html__( 'Border Options', 'everest-forms' ), |
| 1278 | 'type' => \Elementor\Controls_Manager::HEADING, |
| 1279 | 'separator' => 'before', |
| 1280 | ) |
| 1281 | ); |
| 1282 | |
| 1283 | $widget->add_control( |
| 1284 | 'button_box_border', |
| 1285 | array( |
| 1286 | 'label' => esc_html__( 'Box Border', 'everest-forms' ), |
| 1287 | 'type' => \Elementor\Controls_Manager::SWITCHER, |
| 1288 | 'label_on' => esc_html__( 'Show', 'everest-forms' ), |
| 1289 | 'label_off' => esc_html__( 'Hide', 'everest-forms' ), |
| 1290 | 'default' => 'no', |
| 1291 | ) |
| 1292 | ); |
| 1293 | |
| 1294 | $widget->add_control( |
| 1295 | 'button_border_style', |
| 1296 | array( |
| 1297 | 'label' => esc_html__( 'Border Style', 'everest-forms' ), |
| 1298 | 'type' => \Elementor\Controls_Manager::SELECT, |
| 1299 | 'default' => 'solid', |
| 1300 | 'options' => array( |
| 1301 | 'solid' => esc_html__( 'Solid', 'everest-forms' ), |
| 1302 | 'dotted' => esc_html__( 'Dotted', 'everest-forms' ), |
| 1303 | 'dashed' => esc_html__( 'Dashed', 'everest-forms' ), |
| 1304 | 'groove' => esc_html__( 'Groove', 'everest-forms' ), |
| 1305 | ), |
| 1306 | 'selectors' => array( |
| 1307 | '{{WRAPPER}} .everest-forms .everest-forms-part-button,{{WRAPPER}} .everest-forms button[type=submit],{{WRAPPER}} .everest-forms input[type=submit]' => 'border-style: {{VALUE}};', |
| 1308 | ), |
| 1309 | 'condition' => array( |
| 1310 | 'button_box_border' => 'yes', |
| 1311 | ), |
| 1312 | ) |
| 1313 | ); |
| 1314 | |
| 1315 | $widget->add_responsive_control( |
| 1316 | 'button_box_border_width', |
| 1317 | array( |
| 1318 | 'label' => esc_html__( 'Border Width', 'everest-forms' ), |
| 1319 | 'type' => \Elementor\Controls_Manager::DIMENSIONS, |
| 1320 | 'size_units' => array( 'px', '%' ), |
| 1321 | 'default' => array( |
| 1322 | 'top' => 1, |
| 1323 | 'right' => 1, |
| 1324 | 'bottom' => 1, |
| 1325 | 'left' => 1, |
| 1326 | ), |
| 1327 | 'selectors' => array( |
| 1328 | '{{WRAPPER}} .everest-forms .everest-forms-part-button,{{WRAPPER}} .everest-forms button[type=submit],{{WRAPPER}} .everest-forms input[type=submit]' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1329 | ), |
| 1330 | 'condition' => array( |
| 1331 | 'button_box_border' => 'yes', |
| 1332 | ), |
| 1333 | ) |
| 1334 | ); |
| 1335 | |
| 1336 | $widget->start_controls_tabs( 'tabs_button_border_style' ); |
| 1337 | |
| 1338 | $widget->start_controls_tab( |
| 1339 | 'tab_button_border_normal', |
| 1340 | array( |
| 1341 | 'label' => esc_html__( 'Normal', 'everest-forms' ), |
| 1342 | 'condition' => array( |
| 1343 | 'button_box_border' => 'yes', |
| 1344 | ), |
| 1345 | ) |
| 1346 | ); |
| 1347 | |
| 1348 | $widget->add_control( |
| 1349 | 'button_box_border_color', |
| 1350 | array( |
| 1351 | 'label' => esc_html__( 'Border Color', 'everest-forms' ), |
| 1352 | 'type' => \Elementor\Controls_Manager::COLOR, |
| 1353 | 'selectors' => array( |
| 1354 | '{{WRAPPER}} .everest-forms .everest-forms-part-button,{{WRAPPER}} .everest-forms button[type=submit],{{WRAPPER}} .everest-forms input[type=submit]' => 'border-color: {{VALUE}};', |
| 1355 | ), |
| 1356 | 'condition' => array( |
| 1357 | 'button_box_border' => 'yes', |
| 1358 | ), |
| 1359 | ) |
| 1360 | ); |
| 1361 | |
| 1362 | $widget->add_responsive_control( |
| 1363 | 'button_border_radius', |
| 1364 | array( |
| 1365 | 'label' => esc_html__( 'Border Radius', 'everest-forms' ), |
| 1366 | 'type' => \Elementor\Controls_Manager::DIMENSIONS, |
| 1367 | 'size_units' => array( 'px', '%' ), |
| 1368 | 'selectors' => array( |
| 1369 | '{{WRAPPER}} .everest-forms .everest-forms-part-button,{{WRAPPER}} .everest-forms button[type=submit],{{WRAPPER}} .everest-forms input[type=submit]' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1370 | ), |
| 1371 | 'condition' => array( |
| 1372 | 'button_box_border' => 'yes', |
| 1373 | ), |
| 1374 | ) |
| 1375 | ); |
| 1376 | |
| 1377 | $widget->end_controls_tab(); |
| 1378 | |
| 1379 | $widget->start_controls_tab( |
| 1380 | 'tab_button_border_hover', |
| 1381 | array( |
| 1382 | 'label' => esc_html__( 'Hover', 'everest-forms' ), |
| 1383 | 'condition' => array( |
| 1384 | 'button_box_border' => 'yes', |
| 1385 | ), |
| 1386 | ) |
| 1387 | ); |
| 1388 | |
| 1389 | $widget->add_control( |
| 1390 | 'button_box_border_hover_color', |
| 1391 | array( |
| 1392 | 'label' => esc_html__( 'Border Color', 'everest-forms' ), |
| 1393 | 'type' => \Elementor\Controls_Manager::COLOR, |
| 1394 | 'default' => '', |
| 1395 | 'selectors' => array( |
| 1396 | '{{WRAPPER}} .everest-forms .everest-forms-part-button:hover,{{WRAPPER}} .everest-forms button[type=submit]:hover,{{WRAPPER}} .everest-forms input[type=submit]:hover' => 'border-color: {{VALUE}};', |
| 1397 | ), |
| 1398 | 'condition' => array( |
| 1399 | 'button_box_border' => 'yes', |
| 1400 | ), |
| 1401 | ) |
| 1402 | ); |
| 1403 | |
| 1404 | $widget->add_responsive_control( |
| 1405 | 'button_border_hover_radius', |
| 1406 | array( |
| 1407 | 'label' => esc_html__( 'Border Radius', 'everest-forms' ), |
| 1408 | 'type' => \Elementor\Controls_Manager::DIMENSIONS, |
| 1409 | 'size_units' => array( 'px', '%' ), |
| 1410 | 'selectors' => array( |
| 1411 | '{{WRAPPER}} .everest-forms .everest-forms-part-button:hover,{{WRAPPER}} .everest-forms button[type=submit]:hover,{{WRAPPER}} .everest-forms input[type=submit]:hover' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;', |
| 1412 | ), |
| 1413 | 'condition' => array( |
| 1414 | 'button_box_border' => 'yes', |
| 1415 | ), |
| 1416 | ) |
| 1417 | ); |
| 1418 | |
| 1419 | $widget->end_controls_tab(); |
| 1420 | |
| 1421 | $widget->end_controls_tabs(); |
| 1422 | |
| 1423 | $widget->add_control( |
| 1424 | 'button_shadow_options', |
| 1425 | array( |
| 1426 | 'label' => esc_html__( 'Box Shadow Options', 'everest-forms' ), |
| 1427 | 'type' => \Elementor\Controls_Manager::HEADING, |
| 1428 | 'separator' => 'before', |
| 1429 | ) |
| 1430 | ); |
| 1431 | |
| 1432 | $widget->start_controls_tabs( 'tabs_button_shadow_style' ); |
| 1433 | |
| 1434 | $widget->start_controls_tab( |
| 1435 | 'tab_button_shadow_normal', |
| 1436 | array( |
| 1437 | 'label' => esc_html__( 'Normal', 'everest-forms' ), |
| 1438 | ) |
| 1439 | ); |
| 1440 | |
| 1441 | $widget->add_group_control( |
| 1442 | \Elementor\Group_Control_Box_Shadow::get_type(), |
| 1443 | array( |
| 1444 | 'name' => 'button_shadow', |
| 1445 | 'selector' => '{{WRAPPER}} .everest-forms .everest-forms-part-button,{{WRAPPER}} .everest-forms button[type=submit],{{WRAPPER}} .everest-forms input[type=submit]', |
| 1446 | ) |
| 1447 | ); |
| 1448 | |
| 1449 | $widget->end_controls_tab(); |
| 1450 | |
| 1451 | $widget->start_controls_tab( |
| 1452 | 'tab_button_shadow_hover', |
| 1453 | array( |
| 1454 | 'label' => esc_html__( 'Hover', 'everest-forms' ), |
| 1455 | ) |
| 1456 | ); |
| 1457 | |
| 1458 | $widget->add_group_control( |
| 1459 | \Elementor\Group_Control_Box_Shadow::get_type(), |
| 1460 | array( |
| 1461 | 'name' => 'button_hover_shadow', |
| 1462 | 'selector' => '{{WRAPPER}} .everest-forms .everest-forms-part-button:hover,{{WRAPPER}} .everest-forms button[type=submit]:hover,{{WRAPPER}} .everest-forms input[type=submit]:hover', |
| 1463 | ) |
| 1464 | ); |
| 1465 | |
| 1466 | $widget->end_controls_tab(); |
| 1467 | |
| 1468 | $widget->end_controls_tabs(); |
| 1469 | |
| 1470 | $widget->end_controls_section(); |
| 1471 | |
| 1472 | $widget->start_controls_section( |
| 1473 | 'section_oute_r_styling', |
| 1474 | array( |
| 1475 | 'label' => esc_html__( 'Outer Field', 'everest-forms' ), |
| 1476 | 'tab' => \Elementor\Controls_Manager::TAB_STYLE, |
| 1477 | ) |
| 1478 | ); |
| 1479 | |
| 1480 | $widget->add_responsive_control( |
| 1481 | 'oute_r_inner_margin', |
| 1482 | array( |
| 1483 | 'label' => esc_html__( 'Margin', 'everest-forms' ), |
| 1484 | 'type' => \Elementor\Controls_Manager::DIMENSIONS, |
| 1485 | 'size_units' => array( 'px', '%' ), |
| 1486 | 'selectors' => array( |
| 1487 | '{{WRAPPER}} .everest-forms .evf-field' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1488 | ), |
| 1489 | ) |
| 1490 | ); |
| 1491 | |
| 1492 | $widget->add_responsive_control( |
| 1493 | 'oute_r_inner_padding', |
| 1494 | array( |
| 1495 | 'label' => esc_html__( 'Padding', 'everest-forms' ), |
| 1496 | 'type' => \Elementor\Controls_Manager::DIMENSIONS, |
| 1497 | 'size_units' => array( 'px', '%' ), |
| 1498 | 'selectors' => array( |
| 1499 | '{{WRAPPER}} .everest-forms .evf-field' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1500 | ), |
| 1501 | 'separator' => 'after', |
| 1502 | ) |
| 1503 | ); |
| 1504 | |
| 1505 | $widget->start_controls_tabs( 'tabs_oute_r' ); |
| 1506 | |
| 1507 | $widget->start_controls_tab( |
| 1508 | 'oute_r_normal', |
| 1509 | array( |
| 1510 | 'label' => esc_html__( 'Normal', 'everest-forms' ), |
| 1511 | ) |
| 1512 | ); |
| 1513 | |
| 1514 | $widget->add_group_control( |
| 1515 | \Elementor\Group_Control_Background::get_type(), |
| 1516 | array( |
| 1517 | 'name' => 'oute_r_field_bg', |
| 1518 | 'types' => array( 'classic', 'gradient' ), |
| 1519 | 'selector' => '{{WRAPPER}} .everest-forms .evf-field', |
| 1520 | ) |
| 1521 | ); |
| 1522 | |
| 1523 | $widget->add_group_control( |
| 1524 | \Elementor\Group_Control_Border::get_type(), |
| 1525 | array( |
| 1526 | 'name' => 'oute_r__border', |
| 1527 | 'label' => esc_html__( 'Border', 'everest-forms' ), |
| 1528 | 'selector' => '{{WRAPPER}} .everest-forms .evf-field', |
| 1529 | ) |
| 1530 | ); |
| 1531 | |
| 1532 | $widget->add_responsive_control( |
| 1533 | 'oute_r_border_radius', |
| 1534 | array( |
| 1535 | 'label' => esc_html__( 'Border Radius', 'everest-forms' ), |
| 1536 | 'type' => \Elementor\Controls_Manager::DIMENSIONS, |
| 1537 | 'size_units' => array( 'px', '%' ), |
| 1538 | 'selectors' => array( |
| 1539 | '{{WRAPPER}} .everest-forms .evf-field' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1540 | ), |
| 1541 | ) |
| 1542 | ); |
| 1543 | |
| 1544 | $widget->add_group_control( |
| 1545 | \Elementor\Group_Control_Box_Shadow::get_type(), |
| 1546 | array( |
| 1547 | 'name' => 'oute_r_shadow', |
| 1548 | 'selector' => '{{WRAPPER}} .everest-forms .evf-field', |
| 1549 | ) |
| 1550 | ); |
| 1551 | |
| 1552 | $widget->end_controls_tab(); |
| 1553 | |
| 1554 | $widget->start_controls_tab( |
| 1555 | 'oute_r_hover', |
| 1556 | array( |
| 1557 | 'label' => esc_html__( 'Hover', 'everest-forms' ), |
| 1558 | ) |
| 1559 | ); |
| 1560 | |
| 1561 | $widget->add_group_control( |
| 1562 | \Elementor\Group_Control_Background::get_type(), |
| 1563 | array( |
| 1564 | 'name' => 'oute_r_field_bg_hover', |
| 1565 | 'types' => array( 'classic', 'gradient' ), |
| 1566 | 'selector' => '{{WRAPPER}} .everest-forms .evf-field:hover', |
| 1567 | ) |
| 1568 | ); |
| 1569 | |
| 1570 | $widget->add_group_control( |
| 1571 | \Elementor\Group_Control_Border::get_type(), |
| 1572 | array( |
| 1573 | 'name' => 'oute_r__border_hover', |
| 1574 | 'label' => esc_html__( 'Border', 'everest-forms' ), |
| 1575 | 'selector' => '{{WRAPPER}} .everest-forms .evf-field:hover', |
| 1576 | ) |
| 1577 | ); |
| 1578 | |
| 1579 | $widget->add_responsive_control( |
| 1580 | 'oute_r_border_radius_hover', |
| 1581 | array( |
| 1582 | 'label' => esc_html__( 'Border Radius', 'everest-forms' ), |
| 1583 | 'type' => \Elementor\Controls_Manager::DIMENSIONS, |
| 1584 | 'size_units' => array( 'px', '%' ), |
| 1585 | 'selectors' => array( |
| 1586 | '{{WRAPPER}} .everest-forms .evf-field:hover' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1587 | ), |
| 1588 | ) |
| 1589 | ); |
| 1590 | |
| 1591 | $widget->add_group_control( |
| 1592 | \Elementor\Group_Control_Box_Shadow::get_type(), |
| 1593 | array( |
| 1594 | 'name' => 'oute_r_shadow_hover', |
| 1595 | 'selector' => '{{WRAPPER}} .everest-forms .evf-field:hover', |
| 1596 | ) |
| 1597 | ); |
| 1598 | |
| 1599 | $widget->end_controls_tab(); |
| 1600 | |
| 1601 | $widget->end_controls_tabs(); |
| 1602 | |
| 1603 | $widget->end_controls_section(); |
| 1604 | |
| 1605 | $widget->start_controls_section( |
| 1606 | 'section_response_message', |
| 1607 | array( |
| 1608 | 'label' => esc_html__( 'Form Message', 'everest-forms' ), |
| 1609 | 'tab' => \Elementor\Controls_Manager::TAB_STYLE, |
| 1610 | ) |
| 1611 | ); |
| 1612 | |
| 1613 | $widget->start_controls_tabs( 'tabs_response_style' ); |
| 1614 | $widget->start_controls_tab( |
| 1615 | 'tab_response_success', |
| 1616 | array( |
| 1617 | 'label' => esc_html__( 'Success', 'everest-forms' ), |
| 1618 | ) |
| 1619 | ); |
| 1620 | |
| 1621 | $widget->add_responsive_control( |
| 1622 | 'response_success_margin', |
| 1623 | array( |
| 1624 | 'label' => esc_html__( 'Margin', 'everest-forms' ), |
| 1625 | 'type' => \Elementor\Controls_Manager::DIMENSIONS, |
| 1626 | 'size_units' => array( 'px', '%' ), |
| 1627 | 'selectors' => array( |
| 1628 | '{{WRAPPER}} .everest-forms .everest-forms-notice--success' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1629 | ), |
| 1630 | ) |
| 1631 | ); |
| 1632 | |
| 1633 | $widget->add_responsive_control( |
| 1634 | 'response_success_padding', |
| 1635 | array( |
| 1636 | 'label' => esc_html__( 'Padding', 'everest-forms' ), |
| 1637 | 'type' => \Elementor\Controls_Manager::DIMENSIONS, |
| 1638 | 'size_units' => array( 'px', '%' ), |
| 1639 | 'selectors' => array( |
| 1640 | '{{WRAPPER}} .everest-forms .everest-forms-notice--success,{{WRAPPER}} .everest-forms .everest-forms .everest-forms-notice::before' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1641 | ), |
| 1642 | 'separator' => 'after', |
| 1643 | ) |
| 1644 | ); |
| 1645 | |
| 1646 | $widget->add_group_control( |
| 1647 | \Elementor\Group_Control_Typography::get_type(), |
| 1648 | array( |
| 1649 | 'name' => 'response_success_typography', |
| 1650 | 'selector' => '{{WRAPPER}} .everest-forms .everest-forms-notice--success', |
| 1651 | ) |
| 1652 | ); |
| 1653 | |
| 1654 | $widget->add_control( |
| 1655 | 'response_success_color', |
| 1656 | array( |
| 1657 | 'label' => esc_html__( 'Text Color', 'everest-forms' ), |
| 1658 | 'type' => \Elementor\Controls_Manager::COLOR, |
| 1659 | 'selectors' => array( |
| 1660 | '{{WRAPPER}} .everest-forms .everest-forms-notice--success' => 'color: {{VALUE}};', |
| 1661 | ), |
| 1662 | ) |
| 1663 | ); |
| 1664 | |
| 1665 | $widget->add_group_control( |
| 1666 | \Elementor\Group_Control_Background::get_type(), |
| 1667 | array( |
| 1668 | 'name' => 'response_success_bg', |
| 1669 | 'types' => array( 'classic', 'gradient' ), |
| 1670 | 'selector' => '{{WRAPPER}} .everest-forms .everest-forms-notice--success', |
| 1671 | ) |
| 1672 | ); |
| 1673 | |
| 1674 | $widget->add_group_control( |
| 1675 | \Elementor\Group_Control_Border::get_type(), |
| 1676 | array( |
| 1677 | 'name' => 'response_success_border', |
| 1678 | 'label' => esc_html__( 'Border', 'everest-forms' ), |
| 1679 | 'selector' => '{{WRAPPER}} .everest-forms .everest-forms-notice--success', |
| 1680 | ) |
| 1681 | ); |
| 1682 | |
| 1683 | $widget->add_responsive_control( |
| 1684 | 'response_success_border_radius', |
| 1685 | array( |
| 1686 | 'label' => esc_html__( 'Border Radius', 'everest-forms' ), |
| 1687 | 'type' => \Elementor\Controls_Manager::DIMENSIONS, |
| 1688 | 'size_units' => array( 'px', '%' ), |
| 1689 | 'selectors' => array( |
| 1690 | '{{WRAPPER}} .everest-forms .everest-forms-notice--success' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1691 | ), |
| 1692 | ) |
| 1693 | ); |
| 1694 | |
| 1695 | $widget->end_controls_tab(); |
| 1696 | |
| 1697 | $widget->start_controls_tab( |
| 1698 | 'tab_response_validation', |
| 1699 | array( |
| 1700 | 'label' => esc_html__( 'Validation/Error', 'everest-forms' ), |
| 1701 | ) |
| 1702 | ); |
| 1703 | |
| 1704 | $widget->add_responsive_control( |
| 1705 | 'response_validation_padding', |
| 1706 | array( |
| 1707 | 'label' => esc_html__( 'Padding', 'everest-forms' ), |
| 1708 | 'type' => \Elementor\Controls_Manager::DIMENSIONS, |
| 1709 | 'size_units' => array( 'px', '%' ), |
| 1710 | 'selectors' => array( |
| 1711 | '{{WRAPPER}} .everest-forms label.evf-error' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1712 | ), |
| 1713 | |
| 1714 | ) |
| 1715 | ); |
| 1716 | |
| 1717 | $widget->add_responsive_control( |
| 1718 | 'response_validation_margin', |
| 1719 | array( |
| 1720 | 'label' => esc_html__( 'Margin', 'everest-forms' ), |
| 1721 | 'type' => \Elementor\Controls_Manager::DIMENSIONS, |
| 1722 | 'size_units' => array( 'px', '%' ), |
| 1723 | 'selectors' => array( |
| 1724 | '{{WRAPPER}} .everest-forms label.evf-error' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1725 | ), |
| 1726 | 'separator' => 'after', |
| 1727 | ) |
| 1728 | ); |
| 1729 | |
| 1730 | $widget->add_group_control( |
| 1731 | \Elementor\Group_Control_Typography::get_type(), |
| 1732 | array( |
| 1733 | 'name' => 'response_validation_typography', |
| 1734 | 'selector' => '{{WRAPPER}} .everest-forms label.evf-error', |
| 1735 | ) |
| 1736 | ); |
| 1737 | |
| 1738 | $widget->add_control( |
| 1739 | 'response_validation_color', |
| 1740 | array( |
| 1741 | 'label' => esc_html__( 'Text Color/Field Border', 'everest-forms' ), |
| 1742 | 'type' => \Elementor\Controls_Manager::COLOR, |
| 1743 | 'selectors' => array( |
| 1744 | '{{WRAPPER}} .everest-forms label.evf-error' => 'color: {{VALUE}};', |
| 1745 | '{{WRAPPER}} .everest-forms .evf-field-container .evf-frontend-row .evf-frontend-grid .evf-field.everest-forms-invalid .select2-container, |
| 1746 | {{WRAPPER}} .everest-forms .evf-field-container .evf-frontend-row .evf-frontend-grid .evf-field.everest-forms-invalid input.input-text, |
| 1747 | {{WRAPPER}} .everest-forms .evf-field-container .evf-frontend-row .evf-frontend-grid .evf-field.everest-forms-invalid select, |
| 1748 | {{WRAPPER}} .everest-forms .evf-field-container .evf-frontend-row .evf-frontend-grid .evf-field.everest-forms-invalid textarea' => 'border-color: {{VALUE}};', |
| 1749 | ), |
| 1750 | ) |
| 1751 | ); |
| 1752 | |
| 1753 | $widget->add_control( |
| 1754 | 'response_validation_bg', |
| 1755 | array( |
| 1756 | 'label' => esc_html__( 'Background', 'everest-forms' ), |
| 1757 | 'type' => \Elementor\Controls_Manager::COLOR, |
| 1758 | 'selectors' => array( |
| 1759 | '{{WRAPPER}} .everest-forms label.evf-error' => 'background: {{VALUE}};', |
| 1760 | ), |
| 1761 | ) |
| 1762 | ); |
| 1763 | |
| 1764 | $widget->add_group_control( |
| 1765 | \Elementor\Group_Control_Border::get_type(), |
| 1766 | array( |
| 1767 | 'name' => 'response_validation_border', |
| 1768 | 'label' => esc_html__( 'Border', 'everest-forms' ), |
| 1769 | 'selector' => '{{WRAPPER}} .everest-forms label.evf-error', |
| 1770 | ) |
| 1771 | ); |
| 1772 | |
| 1773 | $widget->add_responsive_control( |
| 1774 | 'response_validation_border_radius', |
| 1775 | array( |
| 1776 | 'label' => esc_html__( 'Border Radius', 'everest-forms' ), |
| 1777 | 'type' => \Elementor\Controls_Manager::DIMENSIONS, |
| 1778 | 'size_units' => array( 'px', '%' ), |
| 1779 | 'selectors' => array( |
| 1780 | '{{WRAPPER}} .everest-forms label.evf-error' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1781 | ), |
| 1782 | ) |
| 1783 | ); |
| 1784 | |
| 1785 | $widget->end_controls_tab(); |
| 1786 | |
| 1787 | $widget->end_controls_tabs(); |
| 1788 | |
| 1789 | $widget->end_controls_section(); |
| 1790 | |
| 1791 | $widget->start_controls_section( |
| 1792 | 'section_extra_option_styling', |
| 1793 | array( |
| 1794 | 'label' => esc_html__( 'Extra Option', 'everest-forms' ), |
| 1795 | 'tab' => \Elementor\Controls_Manager::TAB_STYLE, |
| 1796 | ) |
| 1797 | ); |
| 1798 | |
| 1799 | $widget->add_responsive_control( |
| 1800 | 'content_max_width', |
| 1801 | array( |
| 1802 | 'type' => \Elementor\Controls_Manager::SLIDER, |
| 1803 | 'label' => esc_html__( 'Maximum Width', 'everest-forms' ), |
| 1804 | 'size_units' => array( 'px', '%' ), |
| 1805 | 'range' => array( |
| 1806 | 'px' => array( |
| 1807 | 'min' => 250, |
| 1808 | 'max' => 2000, |
| 1809 | 'step' => 5, |
| 1810 | ), |
| 1811 | '%' => array( |
| 1812 | 'min' => 10, |
| 1813 | 'max' => 100, |
| 1814 | 'step' => 1, |
| 1815 | ), |
| 1816 | ), |
| 1817 | 'render_type' => 'ui', |
| 1818 | 'selectors' => array( |
| 1819 | '{{WRAPPER}} .everest-forms ' => 'max-width: {{SIZE}}{{UNIT}}', |
| 1820 | ), |
| 1821 | ) |
| 1822 | ); |
| 1823 | |
| 1824 | $widget->end_controls_section(); |
| 1825 | } |
| 1826 | |
| 1827 | } |
| 1828 | } |
| 1829 |