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