PluginProbe
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder / 6.2.14
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder v6.2.14
6.2.14 6.2.13 6.2.12 6.2.10 6.2.11 6.2.9 6.2.8 6.2.7 6.2.6 6.2.5 6.2.4 6.2.3 6.2.2 3.6.22 3.6.31 3.6.40 3.6.41 3.6.42 3.6.50 3.6.51 3.6.60 3.6.61 3.6.62 3.6.64 3.6.65 All 196 releases
← All changes | app/Modules/Widgets/FluentFormWidget.php +783 -640 3.6.416.2.14 View file →
@@ -1,5 +1,6 @@
1 1 <?php
2 +
2 3 namespace FluentForm\App\Modules\Widgets;
3 4
4 5 use Elementor\Widget_Base;
5 6 use Elementor\Controls_Manager;
@@ -5,29 +6,36 @@
5 6 use Elementor\Controls_Manager;
6 7 use Elementor\Group_Control_Border;
7 8 use Elementor\Group_Control_Box_Shadow;
8 9 use Elementor\Group_Control_Typography;
9 -use \Elementor\Scheme_Typography as Scheme_Typography;
10 10 use Elementor\Group_Control_Background;
11 -use \Elementor\Scheme_Color;
11 +use FluentForm\App\Helpers\Helper;
12 +use Elementor\Core\Kits\Documents\Tabs\Global_Typography;
13 +use Elementor\Core\Kits\Documents\Tabs\Global_Colors;
12 14
13 -if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
15 +if (!defined('ABSPATH')) {
16 + exit;
17 +} // Exit if accessed directly
14 18
15 -class FluentFormWidget extends Widget_Base {
16 -
17 - public function get_name() {
19 +class FluentFormWidget extends Widget_Base
20 +{
21 + public function get_name()
22 + {
18 23 return 'fluent-form-widget';
19 24 }
20 25
21 - public function get_title() {
22 - return __( 'Fluent Form', 'fluentform' );
26 + public function get_title()
27 + {
28 + return __('Fluent Forms', 'fluentform');
23 29 }
24 30
25 - public function get_icon() {
31 + public function get_icon()
32 + {
26 33 return 'eicon-form-horizontal';
27 34 }
28 35
29 - public function get_keywords() {
36 + public function get_keywords()
37 + {
30 38 return [
31 39 'fluentform',
32 40 'fluentforms',
33 41 'fluent form',
@@ -37,63 +45,92 @@
37 45 'elementor form',
38 46 ];
39 47 }
40 48
41 - public function get_categories() {
42 - return array('general');
49 + public function get_categories()
50 + {
51 + return ['general'];
43 52 }
44 53
45 - public function get_style_depends() {
54 + public function get_style_depends()
55 + {
46 56 return [
47 57 'fluent-form-styles',
48 - 'fluentform-public-default'
58 + 'fluentform-public-default',
49 59 ];
50 60 }
51 61
52 - public function get_script_depends() {
53 - return [ 'fluentform-elementor'];
62 + public function get_script_depends()
63 + {
64 + return ['fluentform-elementor'];
54 65 }
55 66
56 - protected function _register_controls()
67 + protected function register_controls()
57 68 {
58 -
59 - $this->register_general_controls();
60 - $this->register_error_controls();
61 - $this->register_title_description_style_controls();
62 - $this->register_form_container_style_controls();
63 - $this->register_label_style_controls();
64 - $this->register_input_textarea_style_controls();
65 - $this->register_placeholder_style_controls();
66 - $this->register_radio_checkbox_style_controls();
67 - $this->register_section_break_style_controls();
68 - $this->register_checkbox_grid_style_controls();
69 - $this->register_address_line_style_controls();
70 - $this->register_image_upload_style_controls();
71 - $this->register_pagination_style_controls();
72 - $this->register_submit_button_style_controls();
73 - $this->register_success_message_style_controls();
74 - $this->register_errors_style_controls();
75 -
76 -
69 + $this->register_general_controls();
70 + $this->register_error_controls();
71 + $this->register_title_description_style_controls();
72 + $this->register_form_container_style_controls();
73 + $this->register_label_style_controls();
74 + $this->register_input_textarea_style_controls();
75 + $this->register_placeholder_style_controls();
76 + $this->register_radio_checkbox_style_controls();
77 + $this->register_terms_gdpr_style_controls();
78 + $this->register_section_break_style_controls();
79 + $this->register_checkbox_grid_style_controls();
80 + $this->register_address_line_style_controls();
81 + $this->register_image_upload_style_controls();
82 + $this->register_pagination_style_controls();
83 + $this->register_submit_button_style_controls();
84 + $this->register_success_message_style_controls();
85 + $this->register_errors_style_controls();
77 86 }
78 87
79 - protected function register_general_controls(){
88 + protected function register_general_controls()
89 + {
80 90 $this->start_controls_section(
81 91 'section_fluent_form',
82 92 [
83 - 'label' => __('Fluent Form', 'fluentform'),
93 + 'label' => __('Fluent Forms', 'fluentform'),
84 94 ]
85 95 );
86 96
97 + $this->add_control(
98 + 'form_list',
99 + [
100 + 'label' => esc_html__('Fluent Forms', 'fluentform'),
101 + 'type' => Controls_Manager::SELECT2,
102 + 'label_block' => true,
103 + 'multiple' => false,
104 + 'options' => Helper::getForms(),
105 + 'default' => '0',
106 + ]
107 + );
87 108
88 109 $this->add_control(
89 - 'form_list',
110 + 'form_edit_button',
90 111 [
91 - 'label' => esc_html__('Fluent Form', 'fluentform'),
92 - 'type' => Controls_Manager::SELECT,
112 + 'type' => Controls_Manager::RAW_HTML,
113 + 'raw' => '<a href="#" class="fluentform-edit-link" style="display: block; text-align: center; padding: 10px; margin-top: 10px; background-color: #6EC1E4; color: #fff; border-radius: 3px; text-decoration: none; cursor: pointer;" target="_blank" rel="noopener" data-form-id="">' . esc_html__('Edit Form', 'fluentform') . '</a>',
114 + 'content_classes' => 'fluentform-edit-button-wrapper',
115 + 'condition' => [
116 + 'form_list!' => '0',
117 + ],
118 + ]
119 + );
120 +
121 + $this->add_control(
122 + 'theme_style',
123 + [
124 + 'label' => __('Form Style Template', 'fluentform'),
125 + 'type' => Controls_Manager::SELECT2,
93 126 'label_block' => true,
94 - 'options' => ElementorWidget::getForms(),
95 - 'default' => '0',
127 + 'multiple' => false,
128 + 'options' => $this->getStylePresets(),
129 + 'default' => '',
130 + 'condition' => [
131 + 'form_list!' => '0',
132 + ],
96 133 ]
97 134 );
98 135
99 136 $this->add_control(
@@ -98,12 +135,12 @@
98 135
99 136 $this->add_control(
100 137 'custom_title_description',
101 138 [
102 - 'label' => __('Custom Title & Description', 'fluentform'),
103 - 'type' => Controls_Manager::SWITCHER,
104 - 'label_on' => __('Yes', 'fluentform'),
105 - 'label_off' => __('No', 'fluentform'),
139 + 'label' => __('Custom Title & Description', 'fluentform'),
140 + 'type' => Controls_Manager::SWITCHER,
141 + 'label_on' => __('Yes', 'fluentform'),
142 + 'label_off' => __('No', 'fluentform'),
106 143 'return_value' => 'yes',
107 144 ]
108 145 );
109 146
@@ -109,13 +146,13 @@
109 146
110 147 $this->add_control(
111 148 'form_title_custom',
112 149 [
113 - 'label' => esc_html__('Title', 'fluentform'),
114 - 'type' => Controls_Manager::TEXT,
150 + 'label' => esc_html__('Title', 'fluentform'),
151 + 'type' => Controls_Manager::TEXT,
115 152 'label_block' => true,
116 - 'default' => '',
117 - 'condition' => [
153 + 'default' => '',
154 + 'condition' => [
118 155 'custom_title_description' => 'yes',
119 156 ],
120 157 ]
121 158 );
@@ -122,11 +159,11 @@
122 159
123 160 $this->add_control(
124 161 'form_description_custom',
125 162 [
126 - 'label' => esc_html__('Description', 'fluentform'),
127 - 'type' => Controls_Manager::TEXTAREA,
128 - 'default' => '',
163 + 'label' => esc_html__('Description', 'fluentform'),
164 + 'type' => Controls_Manager::TEXTAREA,
165 + 'default' => '',
129 166 'condition' => [
130 167 'custom_title_description' => 'yes',
131 168 ],
132 169 ]
@@ -134,14 +171,14 @@
134 171
135 172 $this->add_control(
136 173 'labels_switch',
137 174 [
138 - 'label' => __('Labels', 'fluentform'),
139 - 'type' => Controls_Manager::SWITCHER,
140 - 'default' => 'yes',
141 - 'label_on' => __('Show', 'fluentform'),
142 - 'label_off' => __('Hide', 'fluentform'),
143 - 'return_value' => 'yes'
175 + 'label' => __('Labels ', 'fluentform'),
176 + 'type' => Controls_Manager::SWITCHER,
177 + 'default' => 'yes',
178 + 'label_on' => __('Show', 'fluentform'),
179 + 'label_off' => __('Hide', 'fluentform'),
180 + 'return_value' => 'yes',
144 181 ]
145 182 );
146 183
147 184 $this->add_control(
@@ -146,13 +183,13 @@
146 183
147 184 $this->add_control(
148 185 'placeholder_switch',
149 186 [
150 - 'label' => __('Placeholder', 'fluentform'),
151 - 'type' => Controls_Manager::SWITCHER,
152 - 'default' => 'yes',
153 - 'label_on' => __('Show', 'fluentform'),
154 - 'label_off' => __('Hide', 'fluentform'),
187 + 'label' => __('Placeholder', 'fluentform'),
188 + 'type' => Controls_Manager::SWITCHER,
189 + 'default' => 'yes',
190 + 'label_on' => __('Show', 'fluentform'),
191 + 'label_off' => __('Hide', 'fluentform'),
155 192 'return_value' => 'yes',
156 193 ]
157 194 );
158 195
@@ -158,9 +195,10 @@
158 195
159 196 $this->end_controls_section();
160 197 }
161 198
162 - protected function register_error_controls(){
199 + protected function register_error_controls()
200 + {
163 201 $this->start_controls_section(
164 202 'section_errors',
165 203 [
166 204 'label' => __('Errors', 'fluentform'),
@@ -169,13 +207,13 @@
169 207
170 208 $this->add_control(
171 209 'error_messages',
172 210 [
173 - 'label' => __('Error Messages', 'fluentform'),
174 - 'type' => Controls_Manager::SWITCHER,
175 - 'default' => 'yes',
176 - 'label_on' => __('Show', 'fluentform'),
177 - 'label_off' => __('Hide', 'fluentform'),
211 + 'label' => __('Error Messages', 'fluentform'),
212 + 'type' => Controls_Manager::SWITCHER,
213 + 'default' => 'yes',
214 + 'label_on' => __('Show', 'fluentform'),
215 + 'label_off' => __('Hide', 'fluentform'),
178 216 'return_value' => 'yes',
179 217 ]
180 218 );
181 219
@@ -181,14 +219,15 @@
181 219
182 220 $this->end_controls_section();
183 221 }
184 222
185 - protected function register_title_description_style_controls(){
223 + protected function register_title_description_style_controls()
224 + {
186 225 $this->start_controls_section(
187 226 'section_form_title_style',
188 227 [
189 - 'label' => __('Title & Description', 'fluentform'),
190 - 'tab' => Controls_Manager::TAB_STYLE,
228 + 'label' => __('Title & Description', 'fluentform'),
229 + 'tab' => Controls_Manager::TAB_STYLE,
191 230 'condition' => [
192 231 'custom_title_description' => 'yes',
193 232 ],
194 233 ]
@@ -196,27 +235,27 @@
196 235
197 236 $this->add_responsive_control(
198 237 'heading_alignment',
199 238 [
200 - 'label' => __('Alignment', 'fluentform'),
201 - 'type' => Controls_Manager::CHOOSE,
239 + 'label' => __('Alignment', 'fluentform'),
240 + 'type' => Controls_Manager::CHOOSE,
202 241 'options' => [
203 242 'left' => [
204 243 'title' => __('Left', 'fluentform'),
205 - 'icon' => 'fa fa-align-left',
244 + 'icon' => 'fa fa-align-left',
206 245 ],
207 246 'center' => [
208 247 'title' => __('Center', 'fluentform'),
209 - 'icon' => 'fa fa-align-center',
248 + 'icon' => 'fa fa-align-center',
210 249 ],
211 250 'right' => [
212 251 'title' => __('Right', 'fluentform'),
213 - 'icon' => 'fa fa-align-right',
252 + 'icon' => 'fa fa-align-right',
214 253 ],
215 254 ],
216 - 'default' => '',
255 + 'default' => '',
217 256 'selectors' => [
218 - '{{WRAPPER}} .fluentform-widget-title' => 'text-align: {{VALUE}};',
257 + '{{WRAPPER}} .fluentform-widget-title' => 'text-align: {{VALUE}};',
219 258 '{{WRAPPER}} .fluentform-widget-description' => 'text-align: {{VALUE}};',
220 259 ],
221 260 'condition' => [
222 261 'custom_title_description' => 'yes',
@@ -226,10 +265,10 @@
226 265
227 266 $this->add_control(
228 267 'heading_title',
229 268 [
230 - 'label' => __('Title', 'fluentform'),
231 - 'type' => Controls_Manager::HEADING,
269 + 'label' => __('Title', 'fluentform'),
270 + 'type' => Controls_Manager::HEADING,
232 271 'separator' => 'before',
233 272 'condition' => [
234 273 'custom_title_description' => 'yes',
235 274 ],
@@ -238,11 +277,11 @@
238 277
239 278 $this->add_control(
240 279 'form_title_text_color',
241 280 [
242 - 'label' => __('Color', 'fluentform'),
243 - 'type' => Controls_Manager::COLOR,
244 - 'default' => '',
281 + 'label' => __('Color', 'fluentform'),
282 + 'type' => Controls_Manager::COLOR,
283 + 'default' => '',
245 284 'selectors' => [
246 285 '{{WRAPPER}} .fluentform-widget-title' => 'color: {{VALUE}}',
247 286 ],
248 287 'condition' => [
@@ -253,11 +292,11 @@
253 292
254 293 $this->add_group_control(
255 294 Group_Control_Typography::get_type(),
256 295 [
257 - 'name' => 'form_title_typography',
258 - 'label' => __('Typography', 'fluentform'),
259 - 'selector' => '{{WRAPPER}} .fluentform-widget-title',
296 + 'name' => 'form_title_typography',
297 + 'label' => __('Typography', 'fluentform'),
298 + 'selector' => '{{WRAPPER}} .fluentform-widget-title',
260 299 'condition' => [
261 300 'custom_title_description' => 'yes',
262 301 ],
263 302 ]
@@ -265,17 +304,17 @@
265 304
266 305 $this->add_responsive_control(
267 306 'form_title_margin',
268 307 [
269 - 'label' => __('Margin', 'fluentform'),
270 - 'type' => Controls_Manager::DIMENSIONS,
271 - 'size_units' => ['px', 'em', '%'],
308 + 'label' => __('Margin', 'fluentform'),
309 + 'type' => Controls_Manager::DIMENSIONS,
310 + 'size_units' => ['px', 'em', '%'],
272 311 'allowed_dimensions' => 'vertical',
273 - 'placeholder' => [
274 - 'top' => '',
275 - 'right' => 'auto',
312 + 'placeholder' => [
313 + 'top' => '',
314 + 'right' => 'auto',
276 315 'bottom' => '',
277 - 'left' => 'auto',
316 + 'left' => 'auto',
278 317 ],
279 318 'selectors' => [
280 319 '{{WRAPPER}} .fluentform-widget-title' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
281 320 ],
@@ -287,23 +326,22 @@
287 326
288 327 $this->add_responsive_control(
289 328 'form_title_padding',
290 329 [
291 - 'label' => esc_html__('Padding', 'fluentform'),
292 - 'type' => Controls_Manager::DIMENSIONS,
330 + 'label' => esc_html__('Padding', 'fluentform'),
331 + 'type' => Controls_Manager::DIMENSIONS,
293 332 'size_units' => ['px', 'em', '%'],
294 - 'selectors' => [
333 + 'selectors' => [
295 334 '{{WRAPPER}} .fluentform-widget-title' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
296 335 ],
297 336 ]
298 337 );
299 338
300 -
301 339 $this->add_control(
302 340 'heading_description',
303 341 [
304 - 'label' => __('Description', 'fluentform'),
305 - 'type' => Controls_Manager::HEADING,
342 + 'label' => __('Description', 'fluentform'),
343 + 'type' => Controls_Manager::HEADING,
306 344 'separator' => 'before',
307 345 'condition' => [
308 346 'custom_title_description' => 'yes',
309 347 ],
@@ -312,11 +350,11 @@
312 350
313 351 $this->add_control(
314 352 'heading_description_text_color',
315 353 [
316 - 'label' => __('Color', 'fluentform'),
317 - 'type' => Controls_Manager::COLOR,
318 - 'default' => '',
354 + 'label' => __('Color', 'fluentform'),
355 + 'type' => Controls_Manager::COLOR,
356 + 'default' => '',
319 357 'selectors' => [
320 358 '{{WRAPPER}} .fluentform-widget-description' => 'color: {{VALUE}}',
321 359 ],
322 360 'condition' => [
@@ -327,12 +365,14 @@
327 365
328 366 $this->add_group_control(
329 367 Group_Control_Typography::get_type(),
330 368 [
331 - 'name' => 'heading_description_typography',
332 - 'label' => __('Typography', 'fluentform'),
333 - 'scheme' => Scheme_Typography::TYPOGRAPHY_4,
334 - 'selector' => '{{WRAPPER}} .fluentform-widget-description',
369 + 'name' => 'heading_description_typography',
370 + 'label' => __('Typography', 'fluentform'),
371 + 'selector' => '{{WRAPPER}} .fluentform-widget-description',
372 + 'global' => [
373 + 'default' => Global_Typography::TYPOGRAPHY_ACCENT,
374 + ],
335 375 'condition' => [
336 376 'custom_title_description' => 'yes',
337 377 ],
338 378 ]
@@ -337,21 +377,20 @@
337 377 ],
338 378 ]
339 379 );
340 380
341 -
342 381 $this->add_responsive_control(
343 382 'heading_description_margin',
344 383 [
345 - 'label' => __('Margin', 'fluentform'),
346 - 'type' => Controls_Manager::DIMENSIONS,
347 - 'size_units' => ['px', 'em', '%'],
384 + 'label' => __('Margin', 'fluentform'),
385 + 'type' => Controls_Manager::DIMENSIONS,
386 + 'size_units' => ['px', 'em', '%'],
348 387 'allowed_dimensions' => 'vertical',
349 - 'placeholder' => [
350 - 'top' => '',
351 - 'right' => 'auto',
388 + 'placeholder' => [
389 + 'top' => '',
390 + 'right' => 'auto',
352 391 'bottom' => '',
353 - 'left' => 'auto',
392 + 'left' => 'auto',
354 393 ],
355 394 'selectors' => [
356 395 '{{WRAPPER}} .fluentform-widget-description' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
357 396 ],
@@ -363,12 +402,12 @@
363 402
364 403 $this->add_responsive_control(
365 404 'heading_description_padding',
366 405 [
367 - 'label' => esc_html__('Padding', 'fluentform'),
368 - 'type' => Controls_Manager::DIMENSIONS,
406 + 'label' => esc_html__('Padding', 'fluentform'),
407 + 'type' => Controls_Manager::DIMENSIONS,
369 408 'size_units' => ['px', 'em', '%'],
370 - 'selectors' => [
409 + 'selectors' => [
371 410 '{{WRAPPER}} .fluentform-widget-description' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
372 411 ],
373 412 ]
374 413 );
@@ -375,36 +414,34 @@
375 414
376 415 $this->end_controls_section();
377 416 }
378 417
379 - protected function register_form_container_style_controls(){
380 -
418 + protected function register_form_container_style_controls()
419 + {
381 420 $this->start_controls_section(
382 421 'section_form_container_style',
383 422 [
384 423 'label' => __('Form Container', 'fluentform'),
385 - 'tab' => Controls_Manager::TAB_STYLE,
424 + 'tab' => Controls_Manager::TAB_STYLE,
386 425 ]
387 426 );
388 427
389 -
390 428 $this->add_group_control(
391 429 Group_Control_Background::get_type(),
392 430 [
393 - 'name' => 'form_container_background',
394 - 'label' => __( 'Background', 'fluentform' ),
395 - 'types' => [ 'classic', 'gradient' ],
431 + 'name' => 'form_container_background',
432 + 'label' => __('Background', 'fluentform'),
433 + 'types' => ['classic', 'gradient'],
396 434 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper',
397 435 ]
398 436 );
399 437
400 -
401 438 $this->add_control(
402 439 'form_container_link_color',
403 440 [
404 - 'label' => __('Link Color', 'fluentform'),
405 - 'type' => Controls_Manager::COLOR,
406 - 'default' => '',
441 + 'label' => __('Link Color', 'fluentform'),
442 + 'type' => Controls_Manager::COLOR,
443 + 'default' => '',
407 444 'selectors' => [
408 445 '{{WRAPPER}} .fluentform-widget-wrapper .ff-el-group a' => 'color: {{VALUE}};',
409 446 ],
410 447 ]
@@ -412,12 +449,12 @@
412 449
413 450 $this->add_responsive_control(
414 451 'form_container_max_width',
415 452 [
416 - 'label' => esc_html__('Max Width', 'fluentform'),
417 - 'type' => Controls_Manager::SLIDER,
453 + 'label' => esc_html__('Max Width', 'fluentform'),
454 + 'type' => Controls_Manager::SLIDER,
418 455 'size_units' => ['px', 'em', '%'],
419 - 'range' => [
456 + 'range' => [
420 457 'px' => [
421 458 'min' => 10,
422 459 'max' => 1500,
423 460 ],
@@ -426,9 +463,9 @@
426 463 'max' => 80,
427 464 ],
428 465 ],
429 466 'selectors' => [
430 - '{{WRAPPER}} .fluentform-widget-wrapper' => 'width: {{SIZE}}{{UNIT}};'
467 + '{{WRAPPER}} .fluentform-widget-wrapper' => 'width: {{SIZE}}{{UNIT}};',
431 468 ],
432 469 ]
433 470 );
434 471
@@ -434,27 +471,27 @@
434 471
435 472 $this->add_responsive_control(
436 473 'form_container_alignment',
437 474 [
438 - 'label' => esc_html__('Alignment', 'fluentform'),
439 - 'type' => Controls_Manager::CHOOSE,
475 + 'label' => esc_html__('Alignment', 'fluentform'),
476 + 'type' => Controls_Manager::CHOOSE,
440 477 'label_block' => true,
441 - 'options' => [
478 + 'options' => [
442 479 'default' => [
443 480 'title' => __('Default', 'fluentform'),
444 - 'icon' => 'fa fa-ban',
481 + 'icon' => 'fa fa-ban',
445 482 ],
446 483 'left' => [
447 484 'title' => esc_html__('Left', 'fluentform'),
448 - 'icon' => 'eicon-h-align-left',
485 + 'icon' => 'eicon-h-align-left',
449 486 ],
450 487 'center' => [
451 488 'title' => esc_html__('Center', 'fluentform'),
452 - 'icon' => 'eicon-h-align-center',
489 + 'icon' => 'eicon-h-align-center',
453 490 ],
454 491 'right' => [
455 492 'title' => esc_html__('Right', 'fluentform'),
456 - 'icon' => 'eicon-h-align-right',
493 + 'icon' => 'eicon-h-align-right',
457 494 ],
458 495 ],
459 496 'default' => 'default',
460 497 ]
@@ -462,12 +499,12 @@
462 499
463 500 $this->add_responsive_control(
464 501 'form_container_margin',
465 502 [
466 - 'label' => esc_html__('Margin', 'fluentform'),
467 - 'type' => Controls_Manager::DIMENSIONS,
503 + 'label' => esc_html__('Margin', 'fluentform'),
504 + 'type' => Controls_Manager::DIMENSIONS,
468 505 'size_units' => ['px', 'em', '%'],
469 - 'selectors' => [
506 + 'selectors' => [
470 507 '{{WRAPPER}} .fluentform-widget-wrapper' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
471 508 ],
472 509 ]
473 510 );
@@ -474,22 +511,21 @@
474 511
475 512 $this->add_responsive_control(
476 513 'form_container_padding',
477 514 [
478 - 'label' => esc_html__('Padding', 'fluentform'),
479 - 'type' => Controls_Manager::DIMENSIONS,
515 + 'label' => esc_html__('Padding', 'fluentform'),
516 + 'type' => Controls_Manager::DIMENSIONS,
480 517 'size_units' => ['px', 'em', '%'],
481 - 'selectors' => [
518 + 'selectors' => [
482 519 '{{WRAPPER}} .fluentform-widget-wrapper' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
483 520 ],
484 521 ]
485 522 );
486 523
487 -
488 524 $this->add_group_control(
489 525 Group_Control_Border::get_type(),
490 526 [
491 - 'name' => 'form_container_border',
527 + 'name' => 'form_container_border',
492 528 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper',
493 529 ]
494 530 );
495 531
@@ -495,13 +531,13 @@
495 531
496 532 $this->add_control(
497 533 'form_container_border_radius',
498 534 [
499 - 'label' => esc_html__('Border Radius', 'fluentform'),
500 - 'type' => Controls_Manager::DIMENSIONS,
501 - 'separator' => 'before',
535 + 'label' => esc_html__('Border Radius', 'fluentform'),
536 + 'type' => Controls_Manager::DIMENSIONS,
537 + 'separator' => 'before',
502 538 'size_units' => ['px'],
503 - 'selectors' => [
539 + 'selectors' => [
504 540 '{{WRAPPER}} .fluentform-widget-wrapper' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
505 541 ],
506 542 ]
507 543 );
@@ -508,57 +544,91 @@
508 544
509 545 $this->add_group_control(
510 546 Group_Control_Box_Shadow::get_type(),
511 547 [
512 - 'name' => 'form_container_box_shadow',
548 + 'name' => 'form_container_box_shadow',
513 549 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper',
514 550 ]
515 551 );
516 552
517 553 $this->end_controls_section();
518 -
519 554 }
520 555
521 - protected function register_label_style_controls(){
522 -
556 + protected function register_label_style_controls()
557 + {
523 558 $this->start_controls_section(
524 559 'section_form_label_style',
525 560 [
526 561 'label' => __('Labels', 'fluentform'),
527 - 'tab' => Controls_Manager::TAB_STYLE,
562 + 'tab' => Controls_Manager::TAB_STYLE,
528 563 ]
529 564 );
530 -
531 565 $this->add_control(
532 566 'form_label_text_color',
533 567 [
534 - 'label' => __('Text Color', 'fluentform'),
535 - 'type' => Controls_Manager::COLOR,
568 + 'label' => __('Text Color', 'fluentform'),
569 + 'type' => Controls_Manager::COLOR,
536 570 'selectors' => [
537 571 '{{WRAPPER}} .fluentform-widget-wrapper .ff-el-input--label label' => 'color: {{VALUE}}',
538 572 ],
539 573 ]
540 574 );
541 -
575 +
542 576 $this->add_group_control(
543 577 Group_Control_Typography::get_type(),
544 578 [
545 - 'name' => 'form_label_typography',
546 - 'label' => __('Typography', 'fluentform'),
579 + 'name' => 'form_label_typography',
580 + 'label' => __('Typography', 'fluentform'),
547 581 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper .ff-el-input--label label',
548 582 ]
549 583 );
584 +
585 + $this->add_control(
586 + 'form_label_asterisk_color',
587 + [
588 + 'label' => __('Asterisk Color', 'fluentform'),
589 + 'type' => Controls_Manager::COLOR,
590 + 'selectors' => [
591 + '{{WRAPPER}} .ff-el-is-required.asterisk-right label:after' => 'color: {{VALUE}} !important',
592 + ],
593 + ]
594 + );
595 + $this->add_control(
596 + 'form_label_asterisk_size',
597 + [
598 + 'label' => __('Asterisk Size', 'fluentform'),
599 + 'type' => Controls_Manager::SLIDER,
600 + 'range' => [
601 + 'px' => [
602 + 'min' => 0,
603 + 'max' => 30,
604 + 'step' => 1,
605 + ],
606 + '%' => [
607 + 'min' => 0,
608 + 'max' => 30,
609 + 'step' => 1,
610 + ],
611 + ],
612 + 'size_units' => ['px', 'em', '%'],
613 + 'selectors' => [
614 + '{{WRAPPER}} .ff-el-is-required.asterisk-right label:after' => 'font-size: {{SIZE}}{{UNIT}}',
615 + ],
616 + 'separator' => 'before',
617 + ]
618 + );
619 +
550 620
551 621 $this->end_controls_section();
552 622 }
553 623
554 - protected function register_input_textarea_style_controls(){
555 -
624 + protected function register_input_textarea_style_controls()
625 + {
556 626 $this->start_controls_section(
557 627 'section_form_fields_style',
558 628 [
559 - 'label' => __('Input & Textarea', 'fluentform'),
560 - 'tab' => Controls_Manager::TAB_STYLE,
629 + 'label' => __('Input & Text Area', 'fluentform'),
630 + 'tab' => Controls_Manager::TAB_STYLE,
561 631 ]
562 632 );
563 633
564 634 $this->add_responsive_control(
@@ -563,25 +633,25 @@
563 633
564 634 $this->add_responsive_control(
565 635 'input_alignment',
566 636 [
567 - 'label' => __('Alignment', 'fluentform'),
568 - 'type' => Controls_Manager::CHOOSE,
637 + 'label' => __('Alignment', 'fluentform'),
638 + 'type' => Controls_Manager::CHOOSE,
569 639 'options' => [
570 640 'left' => [
571 641 'title' => __('Left', 'fluentform'),
572 - 'icon' => 'fa fa-align-left',
642 + 'icon' => 'fa fa-align-left',
573 643 ],
574 644 'center' => [
575 645 'title' => __('Center', 'fluentform'),
576 - 'icon' => 'fa fa-align-center',
646 + 'icon' => 'fa fa-align-center',
577 647 ],
578 648 'right' => [
579 649 'title' => __('Right', 'fluentform'),
580 - 'icon' => 'fa fa-align-right',
650 + 'icon' => 'fa fa-align-right',
581 651 ],
582 652 ],
583 - 'default' => '',
653 + 'default' => '',
584 654 'selectors' => [
585 655 '{{WRAPPER}} .fluentform-widget-wrapper input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]), {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group textarea, {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group select' => 'text-align: {{VALUE}};',
586 656 ],
587 657 ]
@@ -598,11 +668,11 @@
598 668
599 669 $this->add_control(
600 670 'form_field_bg_color',
601 671 [
602 - 'label' => __('Background Color', 'fluentform'),
603 - 'type' => Controls_Manager::COLOR,
604 - 'default' => '',
672 + 'label' => __('Background Color', 'fluentform'),
673 + 'type' => Controls_Manager::COLOR,
674 + 'default' => '',
605 675 'selectors' => [
606 676 '{{WRAPPER}} .fluentform-widget-wrapper input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]):not(.select2-search__field), {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group textarea, {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group select, {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group .select2-container--default .select2-selection--multiple' => 'background-color: {{VALUE}}',
607 677 ],
608 678 ]
@@ -610,11 +680,11 @@
610 680
611 681 $this->add_control(
612 682 'form_field_text_color',
613 683 [
614 - 'label' => __('Text Color', 'fluentform'),
615 - 'type' => Controls_Manager::COLOR,
616 - 'default' => '',
684 + 'label' => __('Text Color', 'fluentform'),
685 + 'type' => Controls_Manager::COLOR,
686 + 'default' => '',
617 687 'selectors' => [
618 688 '{{WRAPPER}} .fluentform-widget-wrapper input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]), {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group textarea, {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group select' => 'color: {{VALUE}}',
619 689 ],
620 690 ]
@@ -622,14 +692,14 @@
622 692
623 693 $this->add_group_control(
624 694 Group_Control_Border::get_type(),
625 695 [
626 - 'name' => 'form_field_border',
627 - 'label' => __('Border', 'fluentform'),
696 + 'name' => 'form_field_border',
697 + 'label' => __('Border', 'fluentform'),
628 698 'placeholder' => '1px',
629 - 'default' => '1px',
630 - 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]):not(.select2-search__field), {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group textarea, {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group select, {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group .select2-container--default .select2-selection--multiple',
631 - 'separator' => 'before',
699 + 'default' => '1px',
700 + 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]):not(.select2-search__field), {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group textarea, {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group select, {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group .select2-container--default .select2-selection--multiple',
701 + 'separator' => 'before',
632 702 ]
633 703 );
634 704
635 705 $this->add_control(
@@ -634,12 +704,12 @@
634 704
635 705 $this->add_control(
636 706 'form_field_radius',
637 707 [
638 - 'label' => __('Border Radius', 'fluentform'),
639 - 'type' => Controls_Manager::DIMENSIONS,
708 + 'label' => __('Border Radius', 'fluentform'),
709 + 'type' => Controls_Manager::DIMENSIONS,
640 710 'size_units' => ['px', 'em', '%'],
641 - 'selectors' => [
711 + 'selectors' => [
642 712 '{{WRAPPER}} .fluentform-widget-wrapper input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]), {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group textarea, {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group select, {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group .select2-container--default .select2-selection--multiple' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
643 713 ],
644 714 ]
645 715 );
@@ -647,23 +717,23 @@
647 717 $this->add_responsive_control(
648 718 'form_field_text_indent',
649 719 [
650 720 'label' => __('Text Indent', 'fluentform'),
651 - 'type' => Controls_Manager::SLIDER,
721 + 'type' => Controls_Manager::SLIDER,
652 722 'range' => [
653 723 'px' => [
654 - 'min' => 0,
655 - 'max' => 60,
724 + 'min' => 0,
725 + 'max' => 60,
656 726 'step' => 1,
657 727 ],
658 728 '%' => [
659 - 'min' => 0,
660 - 'max' => 30,
729 + 'min' => 0,
730 + 'max' => 30,
661 731 'step' => 1,
662 732 ],
663 733 ],
664 734 'size_units' => ['px', 'em', '%'],
665 - 'selectors' => [
735 + 'selectors' => [
666 736 '{{WRAPPER}} .fluentform-widget-wrapper input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]), {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group textarea, {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group select' => 'text-indent: {{SIZE}}{{UNIT}}',
667 737 ],
668 738 'separator' => 'before',
669 739 ]
@@ -672,18 +742,18 @@
672 742 $this->add_responsive_control(
673 743 'form_input_width',
674 744 [
675 745 'label' => __('Input Width', 'fluentform'),
676 - 'type' => Controls_Manager::SLIDER,
746 + 'type' => Controls_Manager::SLIDER,
677 747 'range' => [
678 748 'px' => [
679 - 'min' => 0,
680 - 'max' => 1200,
749 + 'min' => 0,
750 + 'max' => 1200,
681 751 'step' => 1,
682 752 ],
683 753 ],
684 754 'size_units' => ['px', 'em', '%'],
685 - 'selectors' => [
755 + 'selectors' => [
686 756 '{{WRAPPER}} .fluentform-widget-wrapper input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]), {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group select' => 'width: {{SIZE}}{{UNIT}}',
687 757 ],
688 758 ]
689 759 );
@@ -691,18 +761,18 @@
691 761 $this->add_responsive_control(
692 762 'form_input_height',
693 763 [
694 764 'label' => __('Input Height', 'fluentform'),
695 - 'type' => Controls_Manager::SLIDER,
765 + 'type' => Controls_Manager::SLIDER,
696 766 'range' => [
697 767 'px' => [
698 - 'min' => 0,
699 - 'max' => 80,
768 + 'min' => 0,
769 + 'max' => 80,
700 770 'step' => 1,
701 771 ],
702 772 ],
703 773 'size_units' => ['px', 'em', '%'],
704 - 'selectors' => [
774 + 'selectors' => [
705 775 '{{WRAPPER}} .fluentform-widget-wrapper input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]), {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group select' => 'height: {{SIZE}}{{UNIT}}',
706 776 ],
707 777 ]
708 778 );
@@ -710,18 +780,18 @@
710 780 $this->add_responsive_control(
711 781 'form_textarea_width',
712 782 [
713 783 'label' => __('Textarea Width', 'fluentform'),
714 - 'type' => Controls_Manager::SLIDER,
784 + 'type' => Controls_Manager::SLIDER,
715 785 'range' => [
716 786 'px' => [
717 - 'min' => 0,
718 - 'max' => 1200,
787 + 'min' => 0,
788 + 'max' => 1200,
719 789 'step' => 1,
720 790 ],
721 791 ],
722 792 'size_units' => ['px', 'em', '%'],
723 - 'selectors' => [
793 + 'selectors' => [
724 794 '{{WRAPPER}} .fluentform-widget-wrapper .ff-el-group textarea' => 'width: {{SIZE}}{{UNIT}}',
725 795 ],
726 796 ]
727 797 );
@@ -729,18 +799,18 @@
729 799 $this->add_responsive_control(
730 800 'form_textarea_height',
731 801 [
732 802 'label' => __('Textarea Height', 'fluentform'),
733 - 'type' => Controls_Manager::SLIDER,
803 + 'type' => Controls_Manager::SLIDER,
734 804 'range' => [
735 805 'px' => [
736 - 'min' => 0,
737 - 'max' => 400,
806 + 'min' => 0,
807 + 'max' => 400,
738 808 'step' => 1,
739 809 ],
740 810 ],
741 811 'size_units' => ['px', 'em', '%'],
742 - 'selectors' => [
812 + 'selectors' => [
743 813 '{{WRAPPER}} .fluentform-widget-wrapper .ff-el-group textarea' => 'height: {{SIZE}}{{UNIT}}',
744 814 ],
745 815 ]
746 816 );
@@ -747,12 +817,12 @@
747 817
748 818 $this->add_responsive_control(
749 819 'form_field_padding',
750 820 [
751 - 'label' => __('Padding', 'fluentform'),
752 - 'type' => Controls_Manager::DIMENSIONS,
821 + 'label' => __('Padding', 'fluentform'),
822 + 'type' => Controls_Manager::DIMENSIONS,
753 823 'size_units' => ['px', 'em', '%'],
754 - 'selectors' => [
824 + 'selectors' => [
755 825 '{{WRAPPER}} .fluentform-widget-wrapper input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]), {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group textarea, {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group select' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
756 826 ],
757 827 ]
758 828 );
@@ -760,18 +830,18 @@
760 830 $this->add_responsive_control(
761 831 'form_field_spacing',
762 832 [
763 833 'label' => __('Spacing', 'fluentform'),
764 - 'type' => Controls_Manager::SLIDER,
834 + 'type' => Controls_Manager::SLIDER,
765 835 'range' => [
766 836 'px' => [
767 - 'min' => 0,
768 - 'max' => 100,
837 + 'min' => 0,
838 + 'max' => 100,
769 839 'step' => 1,
770 840 ],
771 841 ],
772 842 'size_units' => ['px', 'em', '%'],
773 - 'selectors' => [
843 + 'selectors' => [
774 844 '{{WRAPPER}} .fluentform-widget-wrapper .ff-el-group' => 'margin-bottom: {{SIZE}}{{UNIT}}',
775 845 ],
776 846 ]
777 847 );
@@ -778,11 +848,11 @@
778 848
779 849 $this->add_group_control(
780 850 Group_Control_Typography::get_type(),
781 851 [
782 - 'name' => 'form_field_typography',
783 - 'label' => __('Typography', 'fluentform'),
784 - 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]), {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group textarea, {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group select',
852 + 'name' => 'form_field_typography',
853 + 'label' => __('Typography', 'fluentform'),
854 + 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]), {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group textarea, {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group select',
785 855 'separator' => 'before',
786 856 ]
787 857 );
788 858
@@ -788,10 +858,10 @@
788 858
789 859 $this->add_group_control(
790 860 Group_Control_Box_Shadow::get_type(),
791 861 [
792 - 'name' => 'form_field_box_shadow',
793 - 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]), {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group textarea, {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group select',
862 + 'name' => 'form_field_box_shadow',
863 + 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]), {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group textarea, {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group select',
794 864 'separator' => 'before',
795 865 ]
796 866 );
797 867
@@ -806,11 +876,11 @@
806 876
807 877 $this->add_control(
808 878 'form_field_bg_color_focus',
809 879 [
810 - 'label' => __('Background Color', 'fluentform'),
811 - 'type' => Controls_Manager::COLOR,
812 - 'default' => '',
880 + 'label' => __('Background Color', 'fluentform'),
881 + 'type' => Controls_Manager::COLOR,
882 + 'default' => '',
813 883 'selectors' => [
814 884 '{{WRAPPER}} .fluentform-widget-wrapper input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]):focus, {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group textarea:focus' => 'background-color: {{VALUE}}',
815 885 ],
816 886 ]
@@ -818,13 +888,13 @@
818 888
819 889 $this->add_group_control(
820 890 Group_Control_Border::get_type(),
821 891 [
822 - 'name' => 'form_input_focus_border',
823 - 'label' => __('Border', 'fluentform'),
892 + 'name' => 'form_input_focus_border',
893 + 'label' => __('Border', 'fluentform'),
824 894 'placeholder' => '1px',
825 - 'default' => '1px',
826 - 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]):focus, {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group textarea:focus',
895 + 'default' => '1px',
896 + 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]):focus, {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group textarea:focus',
827 897 ]
828 898 );
829 899
830 900 $this->add_group_control(
@@ -829,10 +899,10 @@
829 899
830 900 $this->add_group_control(
831 901 Group_Control_Box_Shadow::get_type(),
832 902 [
833 - 'name' => 'form_input_focus_box_shadow',
834 - 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]):focus, {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group textarea:focus',
903 + 'name' => 'form_input_focus_box_shadow',
904 + 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]):focus, {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group textarea:focus',
835 905 'separator' => 'before',
836 906 ]
837 907 );
838 908
@@ -842,14 +912,71 @@
842 912
843 913 $this->end_controls_section();
844 914 }
845 915
846 - protected function register_placeholder_style_controls(){
916 + protected function register_terms_gdpr_style_controls()
917 + {
847 918 $this->start_controls_section(
919 + 'section_form_terms_gdpr_style',
920 + [
921 + 'label' => __('GDPR , Terms & Condition ', 'fluentform'),
922 + 'tab' => Controls_Manager::TAB_STYLE,
923 + ]
924 + );
925 +
926 + $this->add_responsive_control(
927 + 'form_terms_gdpr_alignment',
928 + [
929 + 'label' => __('Alignment', 'fluentform'),
930 + 'type' => Controls_Manager::CHOOSE,
931 + 'options' => [
932 + 'left' => [
933 + 'title' => __('Left', 'fluentform'),
934 + 'icon' => 'fa fa-align-left',
935 + ],
936 + 'center' => [
937 + 'title' => __('Center', 'fluentform'),
938 + 'icon' => 'fa fa-align-center',
939 + ],
940 + 'right' => [
941 + 'title' => __('Right', 'fluentform'),
942 + 'icon' => 'fa fa-align-right',
943 + ],
944 + ],
945 + 'default' => '',
946 + 'selectors' => ['{{WRAPPER}} .fluentform-widget-wrapper .ff_t_c' => 'text-align: {{VALUE}};'],
947 + ]
948 + );
949 +
950 + $this->add_group_control(
951 + Group_Control_Typography::get_type(),
952 + [
953 + 'name' => 'form_terms_gdpr_typography',
954 + 'label' => __('Typography', 'fluentform'),
955 + 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper .ff_t_c ',
956 +
957 + ]
958 + );
959 + $this->add_control(
960 + 'form_terms_gdpr_color',
961 + [
962 + 'label' => __('Color', 'fluentform'),
963 + 'type' => Controls_Manager::COLOR,
964 + 'default' => '',
965 + 'selectors' => ['{{WRAPPER}} .fluentform-widget-wrapper .ff_t_c ' => 'color: {{VALUE}};'],
966 + ]
967 + );
968 +
969 + $this->end_controls_section();
970 + }
971 +
972 + protected function register_placeholder_style_controls()
973 + {
974 + $this->start_controls_section(
848 975 'section_placeholder_style',
849 976 [
850 - 'label' => __('Placeholder', 'fluentform'),
851 - 'tab' => Controls_Manager::TAB_STYLE,
977 + 'label' => __('Placeholder', 'fluentform'),
978 + 'tab' => Controls_Manager::TAB_STYLE,
852 979 'condition' => [
853 980 'placeholder_switch' => 'yes',
854 981 ],
855 982 ]
@@ -857,10 +984,10 @@
857 984
858 985 $this->add_control(
859 986 'form_placeholder_text_color',
860 987 [
861 - 'label' => __('Text Color', 'fluentform'),
862 - 'type' => Controls_Manager::COLOR,
988 + 'label' => __('Text Color', 'fluentform'),
989 + 'type' => Controls_Manager::COLOR,
863 990 'selectors' => [
864 991 '{{WRAPPER}} .fluentform-widget-wrapper .ff-el-group input::-webkit-input-placeholder, {{WRAPPER}} .fluentform-widget-wrapper .ff-el-group textarea::-webkit-input-placeholder' => 'color: {{VALUE}}',
865 992 ],
866 993 'condition' => [
@@ -871,15 +998,15 @@
871 998
872 999 $this->end_controls_section();
873 1000 }
874 1001
875 - protected function register_radio_checkbox_style_controls(){
876 -
1002 + protected function register_radio_checkbox_style_controls()
1003 + {
877 1004 $this->start_controls_section(
878 1005 'section_form_radio_checkbox_style',
879 1006 [
880 1007 'label' => __('Radio & Checkbox', 'fluentform'),
881 - 'tab' => Controls_Manager::TAB_STYLE,
1008 + 'tab' => Controls_Manager::TAB_STYLE,
882 1009 ]
883 1010 );
884 1011
885 1012 $this->add_control(
@@ -884,12 +1011,12 @@
884 1011
885 1012 $this->add_control(
886 1013 'form_custom_radio_checkbox',
887 1014 [
888 - 'label' => __('Custom Styles', 'fluentform'),
889 - 'type' => Controls_Manager::SWITCHER,
890 - 'label_on' => __('Yes', 'fluentform'),
891 - 'label_off' => __('No', 'fluentform'),
1015 + 'label' => __('Custom Styles', 'fluentform'),
1016 + 'type' => Controls_Manager::SWITCHER,
1017 + 'label_on' => __('Yes', 'fluentform'),
1018 + 'label_off' => __('No', 'fluentform'),
892 1019 'return_value' => 'yes',
893 1020 ]
894 1021 );
895 1022
@@ -895,10 +1022,10 @@
895 1022
896 1023 $this->add_responsive_control(
897 1024 'form_radio_checkbox_size',
898 1025 [
899 - 'label' => __('Size', 'fluentform'),
900 - 'type' => Controls_Manager::SLIDER,
1026 + 'label' => __('Size', 'fluentform'),
1027 + 'type' => Controls_Manager::SLIDER,
901 1028 'default' => [
902 1029 'size' => '15',
903 1030 'unit' => 'px',
904 1031 ],
@@ -903,15 +1030,15 @@
903 1030 'unit' => 'px',
904 1031 ],
905 1032 'range' => [
906 1033 'px' => [
907 - 'min' => 0,
908 - 'max' => 80,
1034 + 'min' => 0,
1035 + 'max' => 80,
909 1036 'step' => 1,
910 1037 ],
911 1038 ],
912 1039 'size_units' => ['px', 'em', '%'],
913 - 'selectors' => [
1040 + 'selectors' => [
914 1041 '{{WRAPPER}} .fluentform-widget-custom-radio-checkbox input[type="checkbox"], {{WRAPPER}} .fluentform-widget-custom-radio-checkbox input[type="radio"]' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}}',
915 1042 ],
916 1043 'condition' => [
917 1044 'form_custom_radio_checkbox' => 'yes',
@@ -922,23 +1049,23 @@
922 1049 $this->add_responsive_control(
923 1050 'form_radio_checkbox_text_indent',
924 1051 [
925 1052 'label' => __('Text Indent', 'fluentform'),
926 - 'type' => Controls_Manager::SLIDER,
1053 + 'type' => Controls_Manager::SLIDER,
927 1054 'range' => [
928 1055 'px' => [
929 - 'min' => 0,
930 - 'max' => 60,
1056 + 'min' => 0,
1057 + 'max' => 60,
931 1058 'step' => 1,
932 1059 ],
933 1060 '%' => [
934 - 'min' => 0,
935 - 'max' => 30,
1061 + 'min' => 0,
1062 + 'max' => 30,
936 1063 'step' => 1,
937 1064 ],
938 1065 ],
939 1066 'size_units' => ['px', 'em', '%'],
940 - 'selectors' => [
1067 + 'selectors' => [
941 1068 '{{WRAPPER}} .fluentform-widget-custom-radio-checkbox input[type="checkbox"], {{WRAPPER}} .fluentform-widget-custom-radio-checkbox input[type="radio"]' => 'margin-right: {{SIZE}}{{UNIT}}',
942 1069 ],
943 1070 'condition' => [
944 1071 'form_custom_radio_checkbox' => 'yes',
@@ -950,9 +1077,9 @@
950 1077
951 1078 $this->start_controls_tab(
952 1079 'form_radio_checkbox_normal',
953 1080 [
954 - 'label' => __('Normal', 'fluentform'),
1081 + 'label' => __('Normal', 'fluentform'),
955 1082 'condition' => [
956 1083 'form_custom_radio_checkbox' => 'yes',
957 1084 ],
958 1085 ]
@@ -960,11 +1087,11 @@
960 1087
961 1088 $this->add_control(
962 1089 'form_radio_checkbox_bg_color',
963 1090 [
964 - 'label' => __('Background Color', 'fluentform'),
965 - 'type' => Controls_Manager::COLOR,
966 - 'default' => '',
1091 + 'label' => __('Background Color', 'fluentform'),
1092 + 'type' => Controls_Manager::COLOR,
1093 + 'default' => '',
967 1094 'selectors' => [
968 1095 '{{WRAPPER}} .fluentform-widget-custom-radio-checkbox input[type="checkbox"]:after, {{WRAPPER}} .fluentform-widget-custom-radio-checkbox input[type="radio"]:after' => 'background-color: {{VALUE}}',
969 1096 ],
970 1097 'condition' => [
@@ -976,18 +1103,18 @@
976 1103 $this->add_responsive_control(
977 1104 'form_checkbox_border_width',
978 1105 [
979 1106 'label' => __('Border Width', 'fluentform'),
980 - 'type' => Controls_Manager::SLIDER,
1107 + 'type' => Controls_Manager::SLIDER,
981 1108 'range' => [
982 1109 'px' => [
983 - 'min' => 0,
984 - 'max' => 15,
1110 + 'min' => 0,
1111 + 'max' => 15,
985 1112 'step' => 1,
986 1113 ],
987 1114 ],
988 1115 'size_units' => ['px'],
989 - 'selectors' => [
1116 + 'selectors' => [
990 1117 '{{WRAPPER}} .fluentform-widget-custom-radio-checkbox input[type="checkbox"]:after, {{WRAPPER}} .fluentform-widget-custom-radio-checkbox input[type="radio"]:after' => 'border-width: {{SIZE}}{{UNIT}}',
991 1118 ],
992 1119 'condition' => [
993 1120 'form_custom_radio_checkbox' => 'yes',
@@ -997,11 +1124,11 @@
997 1124
998 1125 $this->add_control(
999 1126 'form_checkbox_border_color',
1000 1127 [
1001 - 'label' => __('Border Color', 'fluentform'),
1002 - 'type' => Controls_Manager::COLOR,
1003 - 'default' => '',
1128 + 'label' => __('Border Color', 'fluentform'),
1129 + 'type' => Controls_Manager::COLOR,
1130 + 'default' => '',
1004 1131 'selectors' => [
1005 1132 '{{WRAPPER}} .fluentform-widget-custom-radio-checkbox input[type="checkbox"]:after, {{WRAPPER}} .fluentform-widget-custom-radio-checkbox input[type="radio"]:after' => 'border-color: {{VALUE}}',
1006 1133 ],
1007 1134 'condition' => [
@@ -1012,10 +1139,10 @@
1012 1139
1013 1140 $this->add_control(
1014 1141 'form_checkbox_heading',
1015 1142 [
1016 - 'label' => __('Checkbox', 'fluentform'),
1017 - 'type' => Controls_Manager::HEADING,
1143 + 'label' => __('Checkbox', 'fluentform'),
1144 + 'type' => Controls_Manager::HEADING,
1018 1145 'condition' => [
1019 1146 'form_custom_radio_checkbox' => 'yes',
1020 1147 ],
1021 1148 ]
@@ -1023,12 +1150,12 @@
1023 1150
1024 1151 $this->add_control(
1025 1152 'form_checkbox_border_radius',
1026 1153 [
1027 - 'label' => __('Border Radius', 'fluentform'),
1028 - 'type' => Controls_Manager::DIMENSIONS,
1154 + 'label' => __('Border Radius', 'fluentform'),
1155 + 'type' => Controls_Manager::DIMENSIONS,
1029 1156 'size_units' => ['px', 'em', '%'],
1030 - 'selectors' => [
1157 + 'selectors' => [
1031 1158 '{{WRAPPER}} .fluentform-widget-custom-radio-checkbox input[type="checkbox"]:after, {{WRAPPER}} .fluentform-widget-custom-radio-checkbox input[type="radio"]:after' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1032 1159 ],
1033 1160 'condition' => [
1034 1161 'form_custom_radio_checkbox' => 'yes',
@@ -1038,10 +1165,10 @@
1038 1165
1039 1166 $this->add_control(
1040 1167 'form_radio_heading',
1041 1168 [
1042 - 'label' => __('Radio Buttons', 'fluentform'),
1043 - 'type' => Controls_Manager::HEADING,
1169 + 'label' => __('Radio Buttons', 'fluentform'),
1170 + 'type' => Controls_Manager::HEADING,
1044 1171 'condition' => [
1045 1172 'form_custom_radio_checkbox' => 'yes',
1046 1173 ],
1047 1174 ]
@@ -1049,12 +1176,12 @@
1049 1176
1050 1177 $this->add_control(
1051 1178 'form_radio_border_radius',
1052 1179 [
1053 - 'label' => __('Border Radius', 'fluentform'),
1054 - 'type' => Controls_Manager::DIMENSIONS,
1180 + 'label' => __('Border Radius', 'fluentform'),
1181 + 'type' => Controls_Manager::DIMENSIONS,
1055 1182 'size_units' => ['px', 'em', '%'],
1056 - 'selectors' => [
1183 + 'selectors' => [
1057 1184 '{{WRAPPER}} .fluentform-widget-custom-radio-checkbox input[type="radio"]:after, {{WRAPPER}} .fluentform-widget-custom-radio-checkbox input[type="radio"]:after' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1058 1185 ],
1059 1186 'condition' => [
1060 1187 'form_custom_radio_checkbox' => 'yes',
@@ -1066,9 +1193,9 @@
1066 1193
1067 1194 $this->start_controls_tab(
1068 1195 'form_radio_checkbox_checked',
1069 1196 [
1070 - 'label' => __('Checked', 'fluentform'),
1197 + 'label' => __('Checked', 'fluentform'),
1071 1198 'condition' => [
1072 1199 'form_custom_radio_checkbox' => 'yes',
1073 1200 ],
1074 1201 ]
@@ -1076,11 +1203,11 @@
1076 1203
1077 1204 $this->add_control(
1078 1205 'form_radio_checkbox_bg_color_checked',
1079 1206 [
1080 - 'label' => __('Background Color', 'fluentform'),
1081 - 'type' => Controls_Manager::COLOR,
1082 - 'default' => '',
1207 + 'label' => __('Background Color', 'fluentform'),
1208 + 'type' => Controls_Manager::COLOR,
1209 + 'default' => '',
1083 1210 'selectors' => [
1084 1211 '{{WRAPPER}} .fluentform-widget-custom-radio-checkbox input[type="checkbox"]:checked:after, {{WRAPPER}} .fluentform-widget-custom-radio-checkbox input[type="radio"]:checked:after' => 'background-color: {{VALUE}}',
1085 1212 ],
1086 1213 'condition' => [
@@ -1091,11 +1218,11 @@
1091 1218
1092 1219 $this->add_control(
1093 1220 'form_radio_checkbox_border_checked',
1094 1221 [
1095 - 'label' => __('Border Color', 'fluentform'),
1096 - 'type' => Controls_Manager::COLOR,
1097 - 'default' => '',
1222 + 'label' => __('Border Color', 'fluentform'),
1223 + 'type' => Controls_Manager::COLOR,
1224 + 'default' => '',
1098 1225 'selectors' => [
1099 1226 '{{WRAPPER}} .fluentform-widget-custom-radio-checkbox input[type="checkbox"]:checked:after, {{WRAPPER}} .fluentform-widget-custom-radio-checkbox input[type="radio"]:checked:after' => 'border-color: {{VALUE}}',
1100 1227 ],
1101 1228 'condition' => [
@@ -1110,14 +1237,15 @@
1110 1237
1111 1238 $this->end_controls_section();
1112 1239 }
1113 1240
1114 - protected function register_section_break_style_controls(){
1241 + protected function register_section_break_style_controls()
1242 + {
1115 1243 $this->start_controls_section(
1116 1244 'form_section_break_style',
1117 1245 [
1118 1246 'label' => __('Section Break', 'fluentform'),
1119 - 'tab' => Controls_Manager::TAB_STYLE,
1247 + 'tab' => Controls_Manager::TAB_STYLE,
1120 1248 ]
1121 1249 );
1122 1250
1123 1251 $this->add_control(
@@ -1123,9 +1251,9 @@
1123 1251 $this->add_control(
1124 1252 'form_section_break_label',
1125 1253 [
1126 1254 'label' => __('Label', 'fluentform'),
1127 - 'type' => Controls_Manager::HEADING
1255 + 'type' => Controls_Manager::HEADING,
1128 1256 ]
1129 1257 );
1130 1258
1131 1259 $this->add_control(
@@ -1130,11 +1258,11 @@
1130 1258
1131 1259 $this->add_control(
1132 1260 'form_section_break_label_color',
1133 1261 [
1134 - 'label' => __('Color', 'fluentform'),
1135 - 'type' => Controls_Manager::COLOR,
1136 - 'default' => '',
1262 + 'label' => __('Color', 'fluentform'),
1263 + 'type' => Controls_Manager::COLOR,
1264 + 'default' => '',
1137 1265 'selectors' => [
1138 1266 '{{WRAPPER}} .fluentform-widget-wrapper .ff-el-section-break .ff-el-section-title' => 'color: {{VALUE}};',
1139 1267 ],
1140 1268 ]
@@ -1142,11 +1270,11 @@
1142 1270
1143 1271 $this->add_group_control(
1144 1272 Group_Control_Typography::get_type(),
1145 1273 [
1146 - 'name' => 'form_section_break_label_typography',
1147 - 'label' => __('Typography', 'fluentform'),
1148 - 'selector' => '.fluentform-widget-wrapper .ff-el-section-break .ff-el-section-title',
1274 + 'name' => 'form_section_break_label_typography',
1275 + 'label' => __('Typography', 'fluentform'),
1276 + 'selector' => '.fluentform-widget-wrapper .ff-el-section-break .ff-el-section-title',
1149 1277 'separator' => 'before',
1150 1278 ]
1151 1279 );
1152 1280
@@ -1152,12 +1280,12 @@
1152 1280
1153 1281 $this->add_responsive_control(
1154 1282 'form_section_break_label_padding',
1155 1283 [
1156 - 'label' => __('Padding', 'fluentform'),
1157 - 'type' => Controls_Manager::DIMENSIONS,
1284 + 'label' => __('Padding', 'fluentform'),
1285 + 'type' => Controls_Manager::DIMENSIONS,
1158 1286 'size_units' => ['px', 'em', '%'],
1159 - 'selectors' => [
1287 + 'selectors' => [
1160 1288 '{{WRAPPER}} .fluentform-widget-wrapper .ff-el-section-break .ff-el-section-title' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1161 1289 ],
1162 1290 ]
1163 1291 );
@@ -1164,12 +1292,12 @@
1164 1292
1165 1293 $this->add_responsive_control(
1166 1294 'form_section_break_label_margin',
1167 1295 [
1168 - 'label' => __('Margin', 'fluentform'),
1169 - 'type' => Controls_Manager::DIMENSIONS,
1296 + 'label' => __('Margin', 'fluentform'),
1297 + 'type' => Controls_Manager::DIMENSIONS,
1170 1298 'size_units' => ['px', 'em', '%'],
1171 - 'selectors' => [
1299 + 'selectors' => [
1172 1300 '{{WRAPPER}} .fluentform-widget-wrapper .ff-el-section-break .ff-el-section-title' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1173 1301 ],
1174 1302 ]
1175 1303 );
@@ -1176,11 +1304,11 @@
1176 1304
1177 1305 $this->add_control(
1178 1306 'form_section_break_description',
1179 1307 [
1180 - 'label' => __('Description', 'fluentform'),
1181 - 'type' => Controls_Manager::HEADING,
1182 - 'separator' => 'before'
1308 + 'label' => __('Description', 'fluentform'),
1309 + 'type' => Controls_Manager::HEADING,
1310 + 'separator' => 'before',
1183 1311 ]
1184 1312 );
1185 1313
1186 1314 $this->add_control(
@@ -1185,11 +1313,11 @@
1185 1313
1186 1314 $this->add_control(
1187 1315 'form_section_break_description_color',
1188 1316 [
1189 - 'label' => __('Color', 'fluentform'),
1190 - 'type' => Controls_Manager::COLOR,
1191 - 'default' => '',
1317 + 'label' => __('Color', 'fluentform'),
1318 + 'type' => Controls_Manager::COLOR,
1319 + 'default' => '',
1192 1320 'selectors' => [
1193 1321 '{{WRAPPER}} .fluentform-widget-wrapper .ff-el-section-break .ff-section_break_desk' => 'color: {{VALUE}};',
1194 1322 ],
1195 1323 ]
@@ -1197,11 +1325,11 @@
1197 1325
1198 1326 $this->add_group_control(
1199 1327 Group_Control_Typography::get_type(),
1200 1328 [
1201 - 'name' => 'form_section_break_description_typography',
1202 - 'label' => __('Typography', 'fluentform'),
1203 - 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper .ff-el-section-break div',
1329 + 'name' => 'form_section_break_description_typography',
1330 + 'label' => __('Typography', 'fluentform'),
1331 + 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper .ff-el-section-break div',
1204 1332 'separator' => 'before',
1205 1333 ]
1206 1334 );
1207 1335
@@ -1207,12 +1335,12 @@
1207 1335
1208 1336 $this->add_responsive_control(
1209 1337 'form_section_break_description_padding',
1210 1338 [
1211 - 'label' => __('Padding', 'fluentform'),
1212 - 'type' => Controls_Manager::DIMENSIONS,
1339 + 'label' => __('Padding', 'fluentform'),
1340 + 'type' => Controls_Manager::DIMENSIONS,
1213 1341 'size_units' => ['px', 'em', '%'],
1214 - 'selectors' => [
1342 + 'selectors' => [
1215 1343 '{{WRAPPER}} .fluentform-widget-wrapper .ff-el-section-break .ff-section_break_desk' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1216 1344 ],
1217 1345 ]
1218 1346 );
@@ -1219,12 +1347,12 @@
1219 1347
1220 1348 $this->add_responsive_control(
1221 1349 'form_section_break_description_margin',
1222 1350 [
1223 - 'label' => __('Margin', 'fluentform'),
1224 - 'type' => Controls_Manager::DIMENSIONS,
1351 + 'label' => __('Margin', 'fluentform'),
1352 + 'type' => Controls_Manager::DIMENSIONS,
1225 1353 'size_units' => ['px', 'em', '%'],
1226 - 'selectors' => [
1354 + 'selectors' => [
1227 1355 '{{WRAPPER}} .fluentform-widget-wrapper .ff-el-section-break .ff-section_break_desk' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1228 1356 ],
1229 1357 ]
1230 1358 );
@@ -1231,25 +1359,25 @@
1231 1359
1232 1360 $this->add_responsive_control(
1233 1361 'form_section_break_alignment',
1234 1362 [
1235 - 'label' => __('Alignment', 'fluentform'),
1236 - 'type' => Controls_Manager::CHOOSE,
1363 + 'label' => __('Alignment', 'fluentform'),
1364 + 'type' => Controls_Manager::CHOOSE,
1237 1365 'options' => [
1238 1366 'left' => [
1239 1367 'title' => __('Left', 'fluentform'),
1240 - 'icon' => 'eicon-h-align-left',
1368 + 'icon' => 'eicon-h-align-left',
1241 1369 ],
1242 1370 'center' => [
1243 1371 'title' => __('Center', 'fluentform'),
1244 - 'icon' => 'eicon-h-align-center',
1372 + 'icon' => 'eicon-h-align-center',
1245 1373 ],
1246 1374 'right' => [
1247 1375 'title' => __('Right', 'fluentform'),
1248 - 'icon' => 'eicon-h-align-right',
1376 + 'icon' => 'eicon-h-align-right',
1249 1377 ],
1250 1378 ],
1251 - 'prefix_class' => 'fluentform-widget-section-break-content-'
1379 + 'prefix_class' => 'fluentform-widget-section-break-content-',
1252 1380 ]
1253 1381 );
1254 1382
1255 1383 $this->end_controls_section();
@@ -1254,15 +1382,15 @@
1254 1382
1255 1383 $this->end_controls_section();
1256 1384 }
1257 1385
1258 - protected function register_checkbox_grid_style_controls(){
1259 -
1386 + protected function register_checkbox_grid_style_controls()
1387 + {
1260 1388 $this->start_controls_section(
1261 1389 'section_form_checkbox_grid',
1262 1390 [
1263 1391 'label' => __('Checkbox Grid', 'fluentform'),
1264 - 'tab' => Controls_Manager::TAB_STYLE,
1392 + 'tab' => Controls_Manager::TAB_STYLE,
1265 1393 ]
1266 1394 );
1267 1395
1268 1396 $this->add_control(
@@ -1267,11 +1395,11 @@
1267 1395
1268 1396 $this->add_control(
1269 1397 'section_form_checkbox_grid_head',
1270 1398 [
1271 - 'label' => __('Grid Table Head', 'fluentform'),
1272 - 'type' => Controls_Manager::HEADING,
1273 - 'separator' => 'before'
1399 + 'label' => __('Grid Table Head', 'fluentform'),
1400 + 'type' => Controls_Manager::HEADING,
1401 + 'separator' => 'before',
1274 1402 ]
1275 1403 );
1276 1404
1277 1405 $this->add_control(
@@ -1276,11 +1404,11 @@
1276 1404
1277 1405 $this->add_control(
1278 1406 'form_checkbox_grid_table_head_text_color',
1279 1407 [
1280 - 'label' => __('Color', 'fluentform'),
1281 - 'type' => Controls_Manager::COLOR,
1282 - 'default' => '',
1408 + 'label' => __('Color', 'fluentform'),
1409 + 'type' => Controls_Manager::COLOR,
1410 + 'default' => '',
1283 1411 'selectors' => [
1284 1412 '{{WRAPPER}} .fluentform-widget-wrapper .ff-table thead th' => 'color: {{VALUE}};',
1285 1413 ],
1286 1414 ]
@@ -1288,11 +1416,11 @@
1288 1416
1289 1417 $this->add_control(
1290 1418 'form_checkbox_grid_table_head_color',
1291 1419 [
1292 - 'label' => __('Background Color', 'fluentform'),
1293 - 'type' => Controls_Manager::COLOR,
1294 - 'default' => '',
1420 + 'label' => __('Background Color', 'fluentform'),
1421 + 'type' => Controls_Manager::COLOR,
1422 + 'default' => '',
1295 1423 'selectors' => [
1296 1424 '{{WRAPPER}} .fluentform-widget-wrapper .ff-table thead th' => 'background-color: {{VALUE}};',
1297 1425 ],
1298 1426 ]
@@ -1300,11 +1428,11 @@
1300 1428
1301 1429 $this->add_group_control(
1302 1430 Group_Control_Typography::get_type(),
1303 1431 [
1304 - 'name' => 'form_checkbox_grid_table_head_typography',
1305 - 'label' => __('Typography', 'fluentform'),
1306 - 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper .ff-table thead th',
1432 + 'name' => 'form_checkbox_grid_table_head_typography',
1433 + 'label' => __('Typography', 'fluentform'),
1434 + 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper .ff-table thead th',
1307 1435 'separator' => 'before',
1308 1436 ]
1309 1437 );
1310 1438
@@ -1311,20 +1439,20 @@
1311 1439 $this->add_responsive_control(
1312 1440 'form_checkbox_grid_table_head_height',
1313 1441 [
1314 1442 'label' => __('Height', 'fluentform'),
1315 - 'type' => Controls_Manager::SLIDER,
1443 + 'type' => Controls_Manager::SLIDER,
1316 1444 'range' => [
1317 1445 'px' => [
1318 - 'min' => 0,
1319 - 'max' => 1200,
1446 + 'min' => 0,
1447 + 'max' => 1200,
1320 1448 'step' => 1,
1321 1449 ],
1322 1450 ],
1323 1451 'size_units' => ['px', '%'],
1324 - 'selectors' => [
1452 + 'selectors' => [
1325 1453 '{{WRAPPER}} .fluentform-widget-wrapper .ff-table thead th' => 'height: {{SIZE}}{{UNIT}}',
1326 - ]
1454 + ],
1327 1455 ]
1328 1456 );
1329 1457
1330 1458 $this->add_group_control(
@@ -1329,11 +1457,11 @@
1329 1457
1330 1458 $this->add_group_control(
1331 1459 Group_Control_Border::get_type(),
1332 1460 [
1333 - 'name' => 'form_checkbox_grid_table_head_border',
1334 - 'label' => __('Border', 'fluentform'),
1335 - 'default' => '',
1461 + 'name' => 'form_checkbox_grid_table_head_border',
1462 + 'label' => __('Border', 'fluentform'),
1463 + 'default' => '',
1336 1464 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper .ff-table thead tr',
1337 1465 ]
1338 1466 );
1339 1467
@@ -1339,12 +1467,12 @@
1339 1467
1340 1468 $this->add_responsive_control(
1341 1469 'form_checkbox_grid_table_head_padding',
1342 1470 [
1343 - 'label' => __('Padding', 'fluentform'),
1344 - 'type' => Controls_Manager::DIMENSIONS,
1471 + 'label' => __('Padding', 'fluentform'),
1472 + 'type' => Controls_Manager::DIMENSIONS,
1345 1473 'size_units' => ['px', 'em', '%'],
1346 - 'selectors' => [
1474 + 'selectors' => [
1347 1475 '{{WRAPPER}} .fluentform-widget-wrapper .ff-table thead th' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1348 1476 ],
1349 1477 ]
1350 1478 );
@@ -1351,11 +1479,11 @@
1351 1479
1352 1480 $this->add_control(
1353 1481 'form_checkbox_grid_table_item',
1354 1482 [
1355 - 'label' => __('Grid Table Item', 'fluentform'),
1356 - 'type' => Controls_Manager::HEADING,
1357 - 'separator' => 'before'
1483 + 'label' => __('Grid Table Item', 'fluentform'),
1484 + 'type' => Controls_Manager::HEADING,
1485 + 'separator' => 'before',
1358 1486 ]
1359 1487 );
1360 1488
1361 1489 $this->add_control(
@@ -1360,11 +1488,11 @@
1360 1488
1361 1489 $this->add_control(
1362 1490 'form_checkbox_grid_table_item_color',
1363 1491 [
1364 - 'label' => __('Color', 'fluentform'),
1365 - 'type' => Controls_Manager::COLOR,
1366 - 'default' => '',
1492 + 'label' => __('Color', 'fluentform'),
1493 + 'type' => Controls_Manager::COLOR,
1494 + 'default' => '',
1367 1495 'selectors' => [
1368 1496 '{{WRAPPER}} .fluentform-widget-wrapper .ff-table tbody tr td' => 'color: {{VALUE}} !important;',
1369 1497 ],
1370 1498 ]
@@ -1372,11 +1500,11 @@
1372 1500
1373 1501 $this->add_control(
1374 1502 'form_checkbox_grid_table_item_bg_color',
1375 1503 [
1376 - 'label' => __('Background Color', 'fluentform'),
1377 - 'type' => Controls_Manager::COLOR,
1378 - 'default' => '',
1504 + 'label' => __('Background Color', 'fluentform'),
1505 + 'type' => Controls_Manager::COLOR,
1506 + 'default' => '',
1379 1507 'selectors' => [
1380 1508 '{{WRAPPER}} .fluentform-widget-wrapper .ff-table tbody tr td' => 'background-color: {{VALUE}};',
1381 1509 ],
1382 1510 ]
@@ -1384,11 +1512,11 @@
1384 1512
1385 1513 $this->add_control(
1386 1514 'form_checkbox_grid_table_item_odd_bg_color',
1387 1515 [
1388 - 'label' => __('Odd Item Background Color', 'fluentform'),
1389 - 'type' => Controls_Manager::COLOR,
1390 - 'default' => '',
1516 + 'label' => __('Odd Item Background Color', 'fluentform'),
1517 + 'type' => Controls_Manager::COLOR,
1518 + 'default' => '',
1391 1519 'selectors' => [
1392 1520 '{{WRAPPER}} .fluentform-widget-wrapper tbody>tr:nth-child(2n)>td' => 'background-color: {{VALUE}} !important;',
1393 1521 ],
1394 1522 ]
@@ -1396,10 +1524,10 @@
1396 1524
1397 1525 $this->add_group_control(
1398 1526 Group_Control_Typography::get_type(),
1399 1527 [
1400 - 'name' => 'form_checkbox_grid_table_item_typography',
1401 - 'label' => __('Typography', 'fluentform'),
1528 + 'name' => 'form_checkbox_grid_table_item_typography',
1529 + 'label' => __('Typography', 'fluentform'),
1402 1530 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper .ff-table tbody tr td',
1403 1531 ]
1404 1532 );
1405 1533
@@ -1406,20 +1534,20 @@
1406 1534 $this->add_responsive_control(
1407 1535 'form_checkbox_grid_table_item_height',
1408 1536 [
1409 1537 'label' => __('Height', 'fluentform'),
1410 - 'type' => Controls_Manager::SLIDER,
1538 + 'type' => Controls_Manager::SLIDER,
1411 1539 'range' => [
1412 1540 'px' => [
1413 - 'min' => 0,
1414 - 'max' => 1200,
1541 + 'min' => 0,
1542 + 'max' => 1200,
1415 1543 'step' => 1,
1416 1544 ],
1417 1545 ],
1418 1546 'size_units' => ['px', '%'],
1419 - 'selectors' => [
1547 + 'selectors' => [
1420 1548 '{{WRAPPER}} .fluentform-widget-wrapper .ff-table tbody tr td' => 'height: {{SIZE}}{{UNIT}}',
1421 - ]
1549 + ],
1422 1550 ]
1423 1551 );
1424 1552
1425 1553 $this->add_group_control(
@@ -1424,11 +1552,11 @@
1424 1552
1425 1553 $this->add_group_control(
1426 1554 Group_Control_Border::get_type(),
1427 1555 [
1428 - 'name' => 'form_checkbox_grid_table_item_border',
1429 - 'label' => __('Border', 'fluentform'),
1430 - 'default' => '',
1556 + 'name' => 'form_checkbox_grid_table_item_border',
1557 + 'label' => __('Border', 'fluentform'),
1558 + 'default' => '',
1431 1559 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper .ff-table tbody tr',
1432 1560 ]
1433 1561 );
1434 1562
@@ -1434,12 +1562,12 @@
1434 1562
1435 1563 $this->add_responsive_control(
1436 1564 'form_checkbox_grid_table_item_padding',
1437 1565 [
1438 - 'label' => __('Padding', 'fluentform'),
1439 - 'type' => Controls_Manager::DIMENSIONS,
1566 + 'label' => __('Padding', 'fluentform'),
1567 + 'type' => Controls_Manager::DIMENSIONS,
1440 1568 'size_units' => ['px', 'em', '%'],
1441 - 'selectors' => [
1569 + 'selectors' => [
1442 1570 '{{WRAPPER}} .fluentform-widget-wrapper .ff-table tbody tr td' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1443 1571 ],
1444 1572 ]
1445 1573 );
@@ -1446,14 +1574,15 @@
1446 1574
1447 1575 $this->end_controls_section();
1448 1576 }
1449 1577
1450 - protected function register_address_line_style_controls(){
1578 + protected function register_address_line_style_controls()
1579 + {
1451 1580 $this->start_controls_section(
1452 1581 'section_form_address_line_style',
1453 1582 [
1454 1583 'label' => __('Address Line', 'fluentform'),
1455 - 'tab' => Controls_Manager::TAB_STYLE,
1584 + 'tab' => Controls_Manager::TAB_STYLE,
1456 1585 ]
1457 1586 );
1458 1587
1459 1588 $this->add_control(
@@ -1458,11 +1587,11 @@
1458 1587
1459 1588 $this->add_control(
1460 1589 'address_line_label_color',
1461 1590 [
1462 - 'label' => __('Label Color', 'fluentform'),
1463 - 'type' => Controls_Manager::COLOR,
1464 - 'default' => '',
1591 + 'label' => __('Label Color', 'fluentform'),
1592 + 'type' => Controls_Manager::COLOR,
1593 + 'default' => '',
1465 1594 'selectors' => [
1466 1595 '{{WRAPPER}} .fluentform-widget-wrapper .fluent-address label' => 'color: {{VALUE}};',
1467 1596 ],
1468 1597 ]
@@ -1470,10 +1599,10 @@
1470 1599
1471 1600 $this->add_group_control(
1472 1601 Group_Control_Typography::get_type(),
1473 1602 [
1474 - 'name' => 'address_line_label_typography',
1475 - 'label' => __('Typography', 'fluentform'),
1603 + 'name' => 'address_line_label_typography',
1604 + 'label' => __('Typography', 'fluentform'),
1476 1605 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper .fluent-address label',
1477 1606 ]
1478 1607 );
1479 1608
@@ -1479,14 +1608,15 @@
1479 1608
1480 1609 $this->end_controls_section();
1481 1610 }
1482 1611
1483 - protected function register_image_upload_style_controls(){
1612 + protected function register_image_upload_style_controls()
1613 + {
1484 1614 $this->start_controls_section(
1485 1615 'section_form_image_upload_style',
1486 1616 [
1487 1617 'label' => __('Image Upload', 'fluentform'),
1488 - 'tab' => Controls_Manager::TAB_STYLE,
1618 + 'tab' => Controls_Manager::TAB_STYLE,
1489 1619 ]
1490 1620 );
1491 1621
1492 1622 $this->start_controls_tabs('tabs_form_image_upload_button_style');
@@ -1500,11 +1630,11 @@
1500 1630
1501 1631 $this->add_control(
1502 1632 'form_image_upload_bg_color',
1503 1633 [
1504 - 'label' => __('Background Color', 'fluentform'),
1505 - 'type' => Controls_Manager::COLOR,
1506 - 'default' => '',
1634 + 'label' => __('Background Color', 'fluentform'),
1635 + 'type' => Controls_Manager::COLOR,
1636 + 'default' => '',
1507 1637 'selectors' => [
1508 1638 '{{WRAPPER}} .fluentform-widget-wrapper .ff_upload_btn.ff-btn' => 'background-color: {{VALUE}};',
1509 1639 ],
1510 1640 ]
@@ -1512,11 +1642,11 @@
1512 1642
1513 1643 $this->add_group_control(
1514 1644 Group_Control_Border::get_type(),
1515 1645 [
1516 - 'name' => 'form_image_upload_button_border_normal',
1517 - 'label' => __('Border', 'fluentform'),
1518 - 'default' => '',
1646 + 'name' => 'form_image_upload_button_border_normal',
1647 + 'label' => __('Border', 'fluentform'),
1648 + 'default' => '',
1519 1649 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper .ff_upload_btn.ff-btn',
1520 1650 ]
1521 1651 );
1522 1652
@@ -1522,12 +1652,12 @@
1522 1652
1523 1653 $this->add_control(
1524 1654 'form_image_upload_button_border_radius',
1525 1655 [
1526 - 'label' => __('Border Radius', 'fluentform'),
1527 - 'type' => Controls_Manager::DIMENSIONS,
1656 + 'label' => __('Border Radius', 'fluentform'),
1657 + 'type' => Controls_Manager::DIMENSIONS,
1528 1658 'size_units' => ['px', 'em', '%'],
1529 - 'selectors' => [
1659 + 'selectors' => [
1530 1660 '{{WRAPPER}} .fluentform-widget-wrapper .ff_upload_btn.ff-btn' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1531 1661 ],
1532 1662 ]
1533 1663 );
@@ -1534,12 +1664,12 @@
1534 1664
1535 1665 $this->add_responsive_control(
1536 1666 'form_image_upload_button_padding',
1537 1667 [
1538 - 'label' => __('Padding', 'fluentform'),
1539 - 'type' => Controls_Manager::DIMENSIONS,
1668 + 'label' => __('Padding', 'fluentform'),
1669 + 'type' => Controls_Manager::DIMENSIONS,
1540 1670 'size_units' => ['px', 'em', '%'],
1541 - 'selectors' => [
1671 + 'selectors' => [
1542 1672 '{{WRAPPER}} .fluentform-widget-wrapper .ff_upload_btn.ff-btn' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1543 1673 ],
1544 1674 ]
1545 1675 );
@@ -1546,10 +1676,10 @@
1546 1676
1547 1677 $this->add_group_control(
1548 1678 Group_Control_Typography::get_type(),
1549 1679 [
1550 - 'name' => 'form_image_upload_typography',
1551 - 'label' => __('Typography', 'fluentform'),
1680 + 'name' => 'form_image_upload_typography',
1681 + 'label' => __('Typography', 'fluentform'),
1552 1682 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper .ff_upload_btn.ff-btn',
1553 1683 ]
1554 1684 );
1555 1685
@@ -1555,9 +1685,9 @@
1555 1685
1556 1686 $this->add_group_control(
1557 1687 Group_Control_Box_Shadow::get_type(),
1558 1688 [
1559 - 'name' => 'form_image_upload_button_box_shadow',
1689 + 'name' => 'form_image_upload_button_box_shadow',
1560 1690 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper .ff_upload_btn.ff-btn',
1561 1691 ]
1562 1692 );
1563 1693
@@ -1572,11 +1702,11 @@
1572 1702
1573 1703 $this->add_control(
1574 1704 'form_image_upload_button_bg_color_hover',
1575 1705 [
1576 - 'label' => __('Background Color', 'fluentform'),
1577 - 'type' => Controls_Manager::COLOR,
1578 - 'default' => '',
1706 + 'label' => __('Background Color', 'fluentform'),
1707 + 'type' => Controls_Manager::COLOR,
1708 + 'default' => '',
1579 1709 'selectors' => [
1580 1710 '{{WRAPPER}} .fluentform-widget-wrapper .ff_upload_btn.ff-btn:hover' => 'background-color: {{VALUE}} !important;',
1581 1711 ],
1582 1712 ]
@@ -1584,11 +1714,11 @@
1584 1714
1585 1715 $this->add_control(
1586 1716 'form_image_upload_button_text_color_hover',
1587 1717 [
1588 - 'label' => __('Text Color', 'fluentform'),
1589 - 'type' => Controls_Manager::COLOR,
1590 - 'default' => '',
1718 + 'label' => __('Text Color', 'fluentform'),
1719 + 'type' => Controls_Manager::COLOR,
1720 + 'default' => '',
1591 1721 'selectors' => [
1592 1722 '{{WRAPPER}} .fluentform-widget-wrapper .ff_upload_btn.ff-btn:hover' => 'color: {{VALUE}} !important;',
1593 1723 ],
1594 1724 ]
@@ -1596,11 +1726,11 @@
1596 1726
1597 1727 $this->add_control(
1598 1728 'form_image_upload_button_border_color_hover',
1599 1729 [
1600 - 'label' => __('Border Color', 'fluentform'),
1601 - 'type' => Controls_Manager::COLOR,
1602 - 'default' => '',
1730 + 'label' => __('Border Color', 'fluentform'),
1731 + 'type' => Controls_Manager::COLOR,
1732 + 'default' => '',
1603 1733 'selectors' => [
1604 1734 '{{WRAPPER}} .fluentform-widget-wrapper .ff_upload_btn.ff-btn:hover' => 'border-color: {{VALUE}}',
1605 1735 ],
1606 1736 ]
@@ -1611,16 +1741,16 @@
1611 1741 $this->end_controls_tabs();
1612 1742 $this->end_controls_section();
1613 1743 }
1614 1744
1615 - protected function register_pagination_style_controls(){
1616 - if( defined("FLUENTFORMPRO") ) {
1617 -
1745 + protected function register_pagination_style_controls()
1746 + {
1747 + if (defined('FLUENTFORMPRO')) {
1618 1748 $this->start_controls_section(
1619 1749 'section_form_pagination_style',
1620 1750 [
1621 1751 'label' => __('Pagination', 'fluentform'),
1622 - 'tab' => Controls_Manager::TAB_STYLE,
1752 + 'tab' => Controls_Manager::TAB_STYLE,
1623 1753 ]
1624 1754 );
1625 1755
1626 1756 $this->add_control(
@@ -1626,9 +1756,9 @@
1626 1756 $this->add_control(
1627 1757 'form_pagination_progressbar_label',
1628 1758 [
1629 1759 'label' => __('Progressbar Label', 'fluentform'),
1630 - 'type' => Controls_Manager::HEADING
1760 + 'type' => Controls_Manager::HEADING,
1631 1761 ]
1632 1762 );
1633 1763
1634 1764 $this->add_control(
@@ -1633,15 +1763,15 @@
1633 1763
1634 1764 $this->add_control(
1635 1765 'show_label',
1636 1766 [
1637 - 'label' => __( 'Show Label', 'fluentform' ),
1638 - 'type' => Controls_Manager::SWITCHER,
1639 - 'label_on' => __( 'Show', 'fluentform' ),
1640 - 'label_off' => __( 'Hide', 'fluentform' ),
1767 + 'label' => __('Show Label', 'fluentform'),
1768 + 'type' => Controls_Manager::SWITCHER,
1769 + 'label_on' => __('Show', 'fluentform'),
1770 + 'label_off' => __('Hide', 'fluentform'),
1641 1771 'return_value' => 'yes',
1642 - 'default' => 'yes',
1643 - 'prefix_class' => 'fluent-form-widget-step-header-'
1772 + 'default' => 'yes',
1773 + 'prefix_class' => 'fluent-form-widget-step-header-',
1644 1774 ]
1645 1775 );
1646 1776
1647 1777 $this->add_control(
@@ -1646,20 +1776,19 @@
1646 1776
1647 1777 $this->add_control(
1648 1778 'form_progressbar_label_color',
1649 1779 [
1650 - 'label' => __( 'Label Color', 'fluentform' ),
1651 - 'type' => Controls_Manager::COLOR,
1652 - 'scheme' => [
1653 - 'type' => Scheme_Color::get_type(),
1654 - 'value' => Scheme_Color::COLOR_1,
1655 - ],
1780 + 'label' => __('Label Color', 'fluentform'),
1781 + 'type' => Controls_Manager::COLOR,
1656 1782 'selectors' => [
1657 1783 '{{WRAPPER}} .ff-el-progress-status' => 'color: {{VALUE}}',
1658 1784 ],
1785 + 'global' => [
1786 + 'default' => Global_Colors::COLOR_PRIMARY,
1787 + ],
1659 1788 'condition' => [
1660 - 'show_label' => 'yes'
1661 - ]
1789 + 'show_label' => 'yes',
1790 + ],
1662 1791 ]
1663 1792 );
1664 1793
1665 1794 $this->add_group_control(
@@ -1664,15 +1793,17 @@
1664 1793
1665 1794 $this->add_group_control(
1666 1795 Group_Control_Typography::get_type(),
1667 1796 [
1668 - 'name' => 'form_progressbar_label_typography',
1669 - 'label' => __( 'Typography', 'fluentform' ),
1670 - 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
1671 - 'selector' => '{{WRAPPER}} .ff-el-progress-status',
1797 + 'name' => 'form_progressbar_label_typography',
1798 + 'label' => __('Typography', 'fluentform'),
1799 + 'selector' => '{{WRAPPER}} .ff-el-progress-status',
1800 + 'global' => [
1801 + 'default' => Global_Typography::TYPOGRAPHY_PRIMARY
1802 + ],
1672 1803 'condition' => [
1673 - 'show_label' => 'yes'
1674 - ]
1804 + 'show_label' => 'yes',
1805 + ],
1675 1806 ]
1676 1807 );
1677 1808
1678 1809 $this->add_control(
@@ -1677,18 +1808,18 @@
1677 1808
1678 1809 $this->add_control(
1679 1810 'form_progressbar_label_space',
1680 1811 [
1681 - 'label' => __( 'Spacing', 'fluentform' ),
1682 - 'type' => Controls_Manager::DIMENSIONS,
1683 - 'size_units' => [ 'px', '%', 'em' ],
1684 - 'selectors' => [
1812 + 'label' => __('Spacing', 'fluentform'),
1813 + 'type' => Controls_Manager::DIMENSIONS,
1814 + 'size_units' => ['px', '%', 'em'],
1815 + 'selectors' => [
1685 1816 '{{WRAPPER}} .ff-el-progress-status' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1686 1817 ],
1687 1818 'condition' => [
1688 - 'show_label' => 'yes'
1819 + 'show_label' => 'yes',
1689 1820 ],
1690 - 'separator' => 'after'
1821 + 'separator' => 'after',
1691 1822 ]
1692 1823 );
1693 1824
1694 1825 $this->add_control(
@@ -1694,9 +1825,9 @@
1694 1825 $this->add_control(
1695 1826 'form_pagination_progressbar',
1696 1827 [
1697 1828 'label' => __('Progressbar', 'fluentform'),
1698 - 'type' => Controls_Manager::HEADING,
1829 + 'type' => Controls_Manager::HEADING,
1699 1830 ]
1700 1831 );
1701 1832
1702 1833 $this->add_control(
@@ -1701,15 +1832,15 @@
1701 1832
1702 1833 $this->add_control(
1703 1834 'show_form_progressbar',
1704 1835 [
1705 - 'label' => __( 'Show Progressbar', 'fluentform' ),
1706 - 'type' => Controls_Manager::SWITCHER,
1707 - 'label_on' => __( 'Show', 'fluentform' ),
1708 - 'label_off' => __( 'Hide', 'fluentform' ),
1836 + 'label' => __('Show Progressbar', 'fluentform'),
1837 + 'type' => Controls_Manager::SWITCHER,
1838 + 'label_on' => __('Show', 'fluentform'),
1839 + 'label_off' => __('Hide', 'fluentform'),
1709 1840 'return_value' => 'yes',
1710 - 'default' => 'yes',
1711 - 'prefix_class' => 'fluent-form-widget-step-progressbar-'
1841 + 'default' => 'yes',
1842 + 'prefix_class' => 'fluent-form-widget-step-progressbar-',
1712 1843 ]
1713 1844 );
1714 1845
1715 1846 $this->start_controls_tabs('form_progressbar_style_tabs');
@@ -1716,11 +1847,11 @@
1716 1847
1717 1848 $this->start_controls_tab(
1718 1849 'form_progressbar_normal',
1719 1850 [
1720 - 'label' => __('Normal', 'fluentform'),
1851 + 'label' => __('Normal', 'fluentform'),
1721 1852 'condition' => [
1722 - 'show_form_progressbar' => 'yes'
1853 + 'show_form_progressbar' => 'yes',
1723 1854 ],
1724 1855 ]
1725 1856 );
1726 1857
@@ -1726,18 +1857,19 @@
1726 1857
1727 1858 $this->add_group_control(
1728 1859 Group_Control_Background::get_type(),
1729 1860 [
1730 - 'name' => 'form_progressbar_bg',
1731 - 'label' => __( 'Background', 'fluentform' ),
1732 - 'types' => [ 'classic', 'gradient' ],
1733 - 'selector' => '{{WRAPPER}} .ff-el-progress',
1861 + 'name' => 'form_progressbar_bg',
1862 + 'label' => __('Background', 'fluentform'),
1863 + 'types' => ['classic', 'gradient'],
1864 + 'selector' => '{{WRAPPER}} .ff-el-progress',
1734 1865 'condition' => [
1735 - 'show_form_progressbar' => 'yes'
1866 + 'show_form_progressbar' => 'yes',
1736 1867 ],
1737 - 'exclude' => [
1738 - 'image'
1739 - ]
1868 + // phpcs:ignore WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_exclude -- Elementor widget parameter, not WP_Query
1869 + 'exclude' => [
1870 + 'image',
1871 + ],
1740 1872 ]
1741 1873 );
1742 1874
1743 1875 $this->add_control(
@@ -1742,20 +1874,19 @@
1742 1874
1743 1875 $this->add_control(
1744 1876 'form_progressbar_color',
1745 1877 [
1746 - 'label' => __( 'Text Color', 'fluentform' ),
1747 - 'type' => Controls_Manager::COLOR,
1748 - 'scheme' => [
1749 - 'type' => Scheme_Color::get_type(),
1750 - 'value' => Scheme_Color::COLOR_1,
1751 - ],
1878 + 'label' => __('Text Color', 'fluentform'),
1879 + 'type' => Controls_Manager::COLOR,
1752 1880 'selectors' => [
1753 1881 '{{WRAPPER}} .ff-el-progress-bar span' => 'color: {{VALUE}};',
1754 1882 ],
1883 + 'global' => [
1884 + 'default' => Global_Colors::COLOR_PRIMARY
1885 + ],
1755 1886 'condition' => [
1756 - 'show_form_progressbar' => 'yes'
1757 - ]
1887 + 'show_form_progressbar' => 'yes',
1888 + ],
1758 1889 ]
1759 1890 );
1760 1891
1761 1892 $this->add_control(
@@ -1760,24 +1891,24 @@
1760 1891
1761 1892 $this->add_control(
1762 1893 'form_progressbar_height',
1763 1894 [
1764 - 'label' => __( 'Height', 'fluentform' ),
1765 - 'type' => Controls_Manager::SLIDER,
1766 - 'size_units' => [ 'px' ],
1767 - 'range' => [
1895 + 'label' => __('Height', 'fluentform'),
1896 + 'type' => Controls_Manager::SLIDER,
1897 + 'size_units' => ['px'],
1898 + 'range' => [
1768 1899 'px' => [
1769 - 'min' => 0,
1770 - 'max' => 100,
1900 + 'min' => 0,
1901 + 'max' => 100,
1771 1902 'step' => 1,
1772 - ]
1903 + ],
1773 1904 ],
1774 1905 'selectors' => [
1775 1906 '{{WRAPPER}} .ff-el-progress' => 'height: {{SIZE}}{{UNIT}};',
1776 1907 ],
1777 1908 'condition' => [
1778 - 'show_form_progressbar' => 'yes'
1779 - ]
1909 + 'show_form_progressbar' => 'yes',
1910 + ],
1780 1911 ]
1781 1912 );
1782 1913
1783 1914 $this->add_group_control(
@@ -1782,14 +1913,14 @@
1782 1913
1783 1914 $this->add_group_control(
1784 1915 Group_Control_Border::get_type(),
1785 1916 [
1786 - 'name' => 'form_progressbar_border',
1787 - 'label' => __( 'Border', 'fluentform' ),
1788 - 'selector' => '{{WRAPPER}} .ff-el-progress',
1917 + 'name' => 'form_progressbar_border',
1918 + 'label' => __('Border', 'fluentform'),
1919 + 'selector' => '{{WRAPPER}} .ff-el-progress',
1789 1920 'condition' => [
1790 - 'show_form_progressbar' => 'yes'
1791 - ]
1921 + 'show_form_progressbar' => 'yes',
1922 + ],
1792 1923 ]
1793 1924 );
1794 1925
1795 1926 $this->add_control(
@@ -1794,17 +1925,17 @@
1794 1925
1795 1926 $this->add_control(
1796 1927 'form_progressbar_border_radius',
1797 1928 [
1798 - 'label' => __( 'Border Radius', 'fluentform' ),
1799 - 'type' => Controls_Manager::DIMENSIONS,
1800 - 'size_units' => [ 'px', '%', 'em' ],
1801 - 'selectors' => [
1929 + 'label' => __('Border Radius', 'fluentform'),
1930 + 'type' => Controls_Manager::DIMENSIONS,
1931 + 'size_units' => ['px', '%', 'em'],
1932 + 'selectors' => [
1802 1933 '{{WRAPPER}} .ff-el-progress' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1803 1934 ],
1804 1935 'condition' => [
1805 - 'show_form_progressbar' => 'yes'
1806 - ]
1936 + 'show_form_progressbar' => 'yes',
1937 + ],
1807 1938 ]
1808 1939 );
1809 1940
1810 1941 $this->end_controls_tab();
@@ -1811,11 +1942,11 @@
1811 1942
1812 1943 $this->start_controls_tab(
1813 1944 'form_progressbar_filled',
1814 1945 [
1815 - 'label' => __('Filled', 'fluentform'),
1946 + 'label' => __('Filled', 'fluentform'),
1816 1947 'condition' => [
1817 - 'show_form_progressbar' => 'yes'
1948 + 'show_form_progressbar' => 'yes',
1818 1949 ],
1819 1950 ]
1820 1951 );
1821 1952
@@ -1821,34 +1952,32 @@
1821 1952
1822 1953 $this->add_group_control(
1823 1954 Group_Control_Background::get_type(),
1824 1955 [
1825 - 'name' => 'form_progressbar_bg_filled',
1826 - 'label' => __( 'Background', 'fluentform' ),
1827 - 'types' => [ 'classic', 'gradient' ],
1828 - 'selector' => '{{WRAPPER}} .ff-el-progress-bar',
1956 + 'name' => 'form_progressbar_bg_filled',
1957 + 'label' => __('Background', 'fluentform'),
1958 + 'types' => ['classic', 'gradient'],
1959 + 'selector' => '{{WRAPPER}} .ff-el-progress-bar',
1829 1960 'condition' => [
1830 - 'show_form_progressbar' => 'yes'
1961 + 'show_form_progressbar' => 'yes',
1831 1962 ],
1832 - 'exclude' => [
1833 - 'image'
1834 - ]
1963 + // phpcs:ignore WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_exclude -- Elementor widget parameter, not WP_Query
1964 + 'exclude' => [
1965 + 'image',
1966 + ],
1835 1967 ]
1836 1968 );
1837 1969
1838 -
1839 1970 $this->end_controls_tab();
1840 1971
1841 1972 $this->end_controls_tabs();
1842 1973
1843 -
1844 -
1845 1974 $this->add_control(
1846 1975 'form_pagination_button_style',
1847 1976 [
1848 - 'label' => __('Button', 'fluentform'),
1849 - 'type' => Controls_Manager::HEADING,
1850 - 'separator' => 'before'
1977 + 'label' => __('Button', 'fluentform'),
1978 + 'type' => Controls_Manager::HEADING,
1979 + 'separator' => 'before',
1851 1980 ]
1852 1981 );
1853 1982
1854 1983 $this->start_controls_tabs(
@@ -1854,9 +1983,8 @@
1854 1983 $this->start_controls_tabs(
1855 1984 'form_pagination_button_style_tabs'
1856 1985 );
1857 1986
1858 -
1859 1987 $this->start_controls_tab(
1860 1988 'form_pagination_button',
1861 1989 [
1862 1990 'label' => __('Normal', 'fluentform'),
@@ -1862,17 +1990,16 @@
1862 1990 'label' => __('Normal', 'fluentform'),
1863 1991 ]
1864 1992 );
1865 1993
1866 -
1867 1994 $this->add_control(
1868 1995 'form_pagination_button_color',
1869 1996 [
1870 - 'label' => __( 'Color', 'fluentform' ),
1871 - 'type' => Controls_Manager::COLOR,
1997 + 'label' => __('Color', 'fluentform'),
1998 + 'type' => Controls_Manager::COLOR,
1872 1999 'selectors' => [
1873 2000 '{{WRAPPER}} .step-nav button' => 'color: {{VALUE}};',
1874 - ]
2001 + ],
1875 2002 ]
1876 2003 );
1877 2004
1878 2005 $this->add_group_control(
@@ -1877,12 +2004,14 @@
1877 2004
1878 2005 $this->add_group_control(
1879 2006 Group_Control_Typography::get_type(),
1880 2007 [
1881 - 'name' => 'form_pagination_button_typography',
1882 - 'label' => __( 'Typography', 'fluentform' ),
1883 - 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
2008 + 'name' => 'form_pagination_button_typography',
2009 + 'label' => __('Typography', 'fluentform'),
1884 2010 'selector' => '{{WRAPPER}} .step-nav button',
2011 + 'global' => [
2012 + 'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
2013 + ]
1885 2014 ]
1886 2015 );
1887 2016
1888 2017 $this->add_group_control(
@@ -1887,11 +2016,11 @@
1887 2016
1888 2017 $this->add_group_control(
1889 2018 Group_Control_Background::get_type(),
1890 2019 [
1891 - 'name' => 'form_pagination_button_bg',
1892 - 'label' => __( 'Background', 'fluentform' ),
1893 - 'types' => [ 'classic', 'gradient' ],
2020 + 'name' => 'form_pagination_button_bg',
2021 + 'label' => __('Background', 'fluentform'),
2022 + 'types' => ['classic', 'gradient'],
1894 2023 'selector' => '{{WRAPPER}} .step-nav button',
1895 2024 ]
1896 2025 );
1897 2026
@@ -1897,10 +2026,10 @@
1897 2026
1898 2027 $this->add_group_control(
1899 2028 Group_Control_Border::get_type(),
1900 2029 [
1901 - 'name' => 'form_pagination_button_border',
1902 - 'label' => __( 'Border', 'fluentform' ),
2030 + 'name' => 'form_pagination_button_border',
2031 + 'label' => __('Border', 'fluentform'),
1903 2032 'selector' => '{{WRAPPER}} .step-nav button',
1904 2033 ]
1905 2034 );
1906 2035
@@ -1906,12 +2035,12 @@
1906 2035
1907 2036 $this->add_control(
1908 2037 'form_pagination_button_border_radius',
1909 2038 [
1910 - 'label' => __( 'Border Radius', 'fluentform' ),
1911 - 'type' => Controls_Manager::DIMENSIONS,
1912 - 'size_units' => [ 'px', '%', 'em' ],
1913 - 'selectors' => [
2039 + 'label' => __('Border Radius', 'fluentform'),
2040 + 'type' => Controls_Manager::DIMENSIONS,
2041 + 'size_units' => ['px', '%', 'em'],
2042 + 'selectors' => [
1914 2043 '{{WRAPPER}} .step-nav button' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1915 2044 ],
1916 2045 ]
1917 2046 );
@@ -1918,12 +2047,12 @@
1918 2047
1919 2048 $this->add_control(
1920 2049 'form_pagination_button_padding',
1921 2050 [
1922 - 'label' => __( 'Padding', 'fluentform' ),
1923 - 'type' => Controls_Manager::DIMENSIONS,
1924 - 'size_units' => [ 'px', '%', 'em' ],
1925 - 'selectors' => [
2051 + 'label' => __('Padding', 'fluentform'),
2052 + 'type' => Controls_Manager::DIMENSIONS,
2053 + 'size_units' => ['px', '%', 'em'],
2054 + 'selectors' => [
1926 2055 '{{WRAPPER}} .step-nav button' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1927 2056 ],
1928 2057 ]
1929 2058 );
@@ -1939,13 +2068,13 @@
1939 2068
1940 2069 $this->add_control(
1941 2070 'form_pagination_button_hover_color',
1942 2071 [
1943 - 'label' => __( 'Color', 'fluentform' ),
1944 - 'type' => Controls_Manager::COLOR,
2072 + 'label' => __('Color', 'fluentform'),
2073 + 'type' => Controls_Manager::COLOR,
1945 2074 'selectors' => [
1946 2075 '{{WRAPPER}} .step-nav button:hover' => 'color: {{VALUE}};',
1947 - ]
2076 + ],
1948 2077 ]
1949 2078 );
1950 2079
1951 2080 $this->add_group_control(
@@ -1950,11 +2079,11 @@
1950 2079
1951 2080 $this->add_group_control(
1952 2081 Group_Control_Background::get_type(),
1953 2082 [
1954 - 'name' => 'form_pagination_button_hover_bg',
1955 - 'label' => __( 'Background', 'fluentform' ),
1956 - 'types' => [ 'classic', 'gradient' ],
2083 + 'name' => 'form_pagination_button_hover_bg',
2084 + 'label' => __('Background', 'fluentform'),
2085 + 'types' => ['classic', 'gradient'],
1957 2086 'selector' => '{{WRAPPER}} .step-nav button:hover',
1958 2087 ]
1959 2088 );
1960 2089
@@ -1960,13 +2089,13 @@
1960 2089
1961 2090 $this->add_control(
1962 2091 'form_pagination_button_border_hover_color',
1963 2092 [
1964 - 'label' => __( 'Border Color', 'fluentform' ),
1965 - 'type' => Controls_Manager::COLOR,
2093 + 'label' => __('Border Color', 'fluentform'),
2094 + 'type' => Controls_Manager::COLOR,
1966 2095 'selectors' => [
1967 2096 '{{WRAPPER}} .step-nav button:hover' => 'border-color: {{VALUE}};',
1968 - ]
2097 + ],
1969 2098 ]
1970 2099 );
1971 2100
1972 2101 $this->add_control(
@@ -1971,12 +2100,12 @@
1971 2100
1972 2101 $this->add_control(
1973 2102 'form_pagination_button_border_hover_radius',
1974 2103 [
1975 - 'label' => __( 'Border Radius', 'fluentform' ),
1976 - 'type' => Controls_Manager::DIMENSIONS,
1977 - 'size_units' => [ 'px', '%', 'em' ],
1978 - 'selectors' => [
2104 + 'label' => __('Border Radius', 'fluentform'),
2105 + 'type' => Controls_Manager::DIMENSIONS,
2106 + 'size_units' => ['px', '%', 'em'],
2107 + 'selectors' => [
1979 2108 '{{WRAPPER}} .step-nav button:hover' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1980 2109 ],
1981 2110 ]
1982 2111 );
@@ -1984,19 +2113,19 @@
1984 2113 $this->end_controls_tab();
1985 2114
1986 2115 $this->end_controls_tabs();
1987 2116
1988 -
1989 2117 $this->end_controls_section();
1990 2118 }
1991 2119 }
1992 2120
1993 - protected function register_submit_button_style_controls(){
2121 + protected function register_submit_button_style_controls()
2122 + {
1994 2123 $this->start_controls_section(
1995 2124 'section_form_submit_button_style',
1996 2125 [
1997 2126 'label' => __('Submit Button', 'fluentform'),
1998 - 'tab' => Controls_Manager::TAB_STYLE,
2127 + 'tab' => Controls_Manager::TAB_STYLE,
1999 2128 ]
2000 2129 );
2001 2130
2002 2131 $this->add_responsive_control(
@@ -2001,27 +2130,27 @@
2001 2130
2002 2131 $this->add_responsive_control(
2003 2132 'form_submit_button_align',
2004 2133 [
2005 - 'label' => __('Alignment', 'fluentform'),
2006 - 'type' => Controls_Manager::CHOOSE,
2134 + 'label' => __('Alignment', 'fluentform'),
2135 + 'type' => Controls_Manager::CHOOSE,
2007 2136 'options' => [
2008 2137 'left' => [
2009 2138 'title' => __('Left', 'fluentform'),
2010 - 'icon' => 'eicon-h-align-left',
2139 + 'icon' => 'eicon-h-align-left',
2011 2140 ],
2012 2141 'center' => [
2013 2142 'title' => __('Center', 'fluentform'),
2014 - 'icon' => 'eicon-h-align-center',
2143 + 'icon' => 'eicon-h-align-center',
2015 2144 ],
2016 2145 'right' => [
2017 2146 'title' => __('Right', 'fluentform'),
2018 - 'icon' => 'eicon-h-align-right',
2147 + 'icon' => 'eicon-h-align-right',
2019 2148 ],
2020 2149 ],
2021 - 'default' => '',
2150 + 'default' => '',
2022 2151 'prefix_class' => 'fluentform-widget-submit-button-',
2023 - 'condition' => [
2152 + 'condition' => [
2024 2153 'form_submit_button_width_type' => 'custom',
2025 2154 ],
2026 2155 ]
2027 2156 );
@@ -2028,14 +2157,14 @@
2028 2157
2029 2158 $this->add_control(
2030 2159 'form_submit_button_width_type',
2031 2160 [
2032 - 'label' => __('Width', 'fluentform'),
2033 - 'type' => Controls_Manager::SELECT,
2161 + 'label' => __('Width', 'fluentform'),
2162 + 'type' => Controls_Manager::SELECT,
2034 2163 'default' => 'custom',
2035 2164 'options' => [
2036 2165 'full-width' => __('Full Width', 'fluentform'),
2037 - 'custom' => __('Custom', 'fluentform'),
2166 + 'custom' => __('Custom', 'fluentform'),
2038 2167 ],
2039 2168 'prefix_class' => 'fluentform-widget-submit-button-',
2040 2169 ]
2041 2170 );
@@ -2043,20 +2172,19 @@
2043 2172 $this->add_responsive_control(
2044 2173 'form_submit_button_width',
2045 2174 [
2046 2175 'label' => __('Width', 'fluentform'),
2047 - 'type' => Controls_Manager::SLIDER,
2176 + 'type' => Controls_Manager::SLIDER,
2048 2177 'range' => [
2049 2178 'px' => [
2050 - 'min' => 0,
2051 - 'max' => 1200,
2179 + 'min' => 0,
2180 + 'max' => 1200,
2052 2181 'step' => 1,
2053 2182 ],
2054 2183 ],
2055 2184 'size_units' => ['px', '%'],
2056 - 'selectors' => [
2057 - '{{WRAPPER}} .fluentform-widget-wrapper .ff-el-group .ff-btn-submit' => 'width: {{SIZE}}{{UNIT}}',
2058 - ],
2185 + 'selectors' => [
2186 + '{{WRAPPER}} .fluentform-widget-wrapper .ff-el-group .ff-btn-submit' => 'width: {{SIZE}}{{UNIT}}', ],
2059 2187 'condition' => [
2060 2188 'form_submit_button_width_type' => 'custom',
2061 2189 ],
2062 2190 ]
@@ -2073,11 +2201,11 @@
2073 2201
2074 2202 $this->add_control(
2075 2203 'form_submit_button_bg_color_normal',
2076 2204 [
2077 - 'label' => __('Background Color', 'fluentform'),
2078 - 'type' => Controls_Manager::COLOR,
2079 - 'default' => '#409EFF',
2205 + 'label' => __('Background Color', 'fluentform'),
2206 + 'type' => Controls_Manager::COLOR,
2207 + 'default' => '#1a7efb',
2080 2208 'selectors' => [
2081 2209 '{{WRAPPER}} .fluentform-widget-wrapper .ff-el-group .ff-btn-submit' => 'background-color: {{VALUE}} !important;',
2082 2210 ],
2083 2211 ]
@@ -2085,11 +2213,11 @@
2085 2213
2086 2214 $this->add_control(
2087 2215 'form_submit_button_text_color_normal',
2088 2216 [
2089 - 'label' => __('Text Color', 'fluentform'),
2090 - 'type' => Controls_Manager::COLOR,
2091 - 'default' => '#ffffff',
2217 + 'label' => __('Text Color', 'fluentform'),
2218 + 'type' => Controls_Manager::COLOR,
2219 + 'default' => '#ffffff',
2092 2220 'selectors' => [
2093 2221 '{{WRAPPER}} .fluentform-widget-wrapper .ff-el-group .ff-btn-submit' => 'color: {{VALUE}} !important;',
2094 2222 ],
2095 2223 ]
@@ -2097,13 +2225,13 @@
2097 2225
2098 2226 $this->add_group_control(
2099 2227 Group_Control_Border::get_type(),
2100 2228 [
2101 - 'name' => 'form_submit_button_border_normal',
2102 - 'label' => __('Border', 'fluentform'),
2229 + 'name' => 'form_submit_button_border_normal',
2230 + 'label' => __('Border', 'fluentform'),
2103 2231 'placeholder' => '1px',
2104 - 'default' => '1px',
2105 - 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper .ff-el-group .ff-btn-submit',
2232 + 'default' => '1px',
2233 + 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper .ff-el-group .ff-btn-submit',
2106 2234 ]
2107 2235 );
2108 2236
2109 2237 $this->add_control(
@@ -2108,12 +2236,12 @@
2108 2236
2109 2237 $this->add_control(
2110 2238 'form_submit_button_border_radius',
2111 2239 [
2112 - 'label' => __('Border Radius', 'fluentform'),
2113 - 'type' => Controls_Manager::DIMENSIONS,
2240 + 'label' => __('Border Radius', 'fluentform'),
2241 + 'type' => Controls_Manager::DIMENSIONS,
2114 2242 'size_units' => ['px', 'em', '%'],
2115 - 'selectors' => [
2243 + 'selectors' => [
2116 2244 '{{WRAPPER}} .fluentform-widget-wrapper .ff-el-group .ff-btn-submit' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
2117 2245 ],
2118 2246 ]
2119 2247 );
@@ -2120,12 +2248,12 @@
2120 2248
2121 2249 $this->add_responsive_control(
2122 2250 'form_submit_button_padding',
2123 2251 [
2124 - 'label' => __('Padding', 'fluentform'),
2125 - 'type' => Controls_Manager::DIMENSIONS,
2252 + 'label' => __('Padding', 'fluentform'),
2253 + 'type' => Controls_Manager::DIMENSIONS,
2126 2254 'size_units' => ['px', 'em', '%'],
2127 - 'selectors' => [
2255 + 'selectors' => [
2128 2256 '{{WRAPPER}} .fluentform-widget-wrapper .ff-el-group .ff-btn-submit' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
2129 2257 ],
2130 2258 ]
2131 2259 );
@@ -2133,18 +2261,18 @@
2133 2261 $this->add_responsive_control(
2134 2262 'form_submit_button_margin',
2135 2263 [
2136 2264 'label' => __('Margin Top', 'fluentform'),
2137 - 'type' => Controls_Manager::SLIDER,
2265 + 'type' => Controls_Manager::SLIDER,
2138 2266 'range' => [
2139 2267 'px' => [
2140 - 'min' => 0,
2141 - 'max' => 150,
2268 + 'min' => 0,
2269 + 'max' => 150,
2142 2270 'step' => 1,
2143 2271 ],
2144 2272 ],
2145 2273 'size_units' => ['px', 'em', '%'],
2146 - 'selectors' => [
2274 + 'selectors' => [
2147 2275 '{{WRAPPER}} .fluentform-widget-wrapper .ff-el-group .ff-btn-submit' => 'margin-top: {{SIZE}}{{UNIT}}',
2148 2276 ],
2149 2277 ]
2150 2278 );
@@ -2151,11 +2279,11 @@
2151 2279
2152 2280 $this->add_group_control(
2153 2281 Group_Control_Typography::get_type(),
2154 2282 [
2155 - 'name' => 'form_submit_button_typography',
2156 - 'label' => __('Typography', 'fluentform'),
2157 - 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper .ff-el-group .ff-btn-submit',
2283 + 'name' => 'form_submit_button_typography',
2284 + 'label' => __('Typography', 'fluentform'),
2285 + 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper .ff-el-group .ff-btn-submit',
2158 2286 'separator' => 'before',
2159 2287 ]
2160 2288 );
2161 2289
@@ -2161,10 +2289,10 @@
2161 2289
2162 2290 $this->add_group_control(
2163 2291 Group_Control_Box_Shadow::get_type(),
2164 2292 [
2165 - 'name' => 'form_submit_button_box_shadow',
2166 - 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper .ff-el-group .ff-btn-submit',
2293 + 'name' => 'form_submit_button_box_shadow',
2294 + 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper .ff-el-group .ff-btn-submit',
2167 2295 'separator' => 'before',
2168 2296 ]
2169 2297 );
2170 2298
@@ -2179,11 +2307,11 @@
2179 2307
2180 2308 $this->add_control(
2181 2309 'form_submit_button_bg_color_hover',
2182 2310 [
2183 - 'label' => __('Background Color', 'fluentform'),
2184 - 'type' => Controls_Manager::COLOR,
2185 - 'default' => '',
2311 + 'label' => __('Background Color', 'fluentform'),
2312 + 'type' => Controls_Manager::COLOR,
2313 + 'default' => '',
2186 2314 'selectors' => [
2187 2315 '{{WRAPPER}} .fluentform-widget-wrapper .ff-el-group .ff-btn-submit:hover' => 'background-color: {{VALUE}} !important;',
2188 2316 ],
2189 2317 ]
@@ -2191,11 +2319,11 @@
2191 2319
2192 2320 $this->add_control(
2193 2321 'form_submit_button_text_color_hover',
2194 2322 [
2195 - 'label' => __('Text Color', 'fluentform'),
2196 - 'type' => Controls_Manager::COLOR,
2197 - 'default' => '',
2323 + 'label' => __('Text Color', 'fluentform'),
2324 + 'type' => Controls_Manager::COLOR,
2325 + 'default' => '',
2198 2326 'selectors' => [
2199 2327 '{{WRAPPER}} .fluentform-widget-wrapper .ff-el-group .ff-btn-submit:hover' => 'color: {{VALUE}} !important;',
2200 2328 ],
2201 2329 ]
@@ -2203,11 +2331,11 @@
2203 2331
2204 2332 $this->add_control(
2205 2333 'form_submit_button_border_color_hover',
2206 2334 [
2207 - 'label' => __('Border Color', 'fluentform'),
2208 - 'type' => Controls_Manager::COLOR,
2209 - 'default' => '',
2335 + 'label' => __('Border Color', 'fluentform'),
2336 + 'type' => Controls_Manager::COLOR,
2337 + 'default' => '',
2210 2338 'selectors' => [
2211 2339 '{{WRAPPER}} .fluentform-widget-wrapper .ff-el-group .ff-btn-submit:hover' => 'border-color: {{VALUE}}',
2212 2340 ],
2213 2341 ]
@@ -2219,15 +2347,15 @@
2219 2347
2220 2348 $this->end_controls_section();
2221 2349 }
2222 2350
2223 - protected function register_success_message_style_controls(){
2224 -
2351 + protected function register_success_message_style_controls()
2352 + {
2225 2353 $this->start_controls_section(
2226 2354 'section_form_success_message_style',
2227 2355 [
2228 2356 'label' => __('Success Message', 'fluentform'),
2229 - 'tab' => Controls_Manager::TAB_STYLE,
2357 + 'tab' => Controls_Manager::TAB_STYLE,
2230 2358 ]
2231 2359 );
2232 2360
2233 2361 $this->add_control(
@@ -2232,10 +2360,10 @@
2232 2360
2233 2361 $this->add_control(
2234 2362 'form_success_message_bg_color',
2235 2363 [
2236 - 'label' => __('Background Color', 'fluentform'),
2237 - 'type' => Controls_Manager::COLOR,
2364 + 'label' => __('Background Color', 'fluentform'),
2365 + 'type' => Controls_Manager::COLOR,
2238 2366 'selectors' => [
2239 2367 '{{WRAPPER}} .fluentform-widget-wrapper .ff-message-success' => 'background-color: {{VALUE}}',
2240 2368 ],
2241 2369 ]
@@ -2243,10 +2371,10 @@
2243 2371
2244 2372 $this->add_control(
2245 2373 'form_success_message_text_color',
2246 2374 [
2247 - 'label' => __('Text Color', 'fluentform'),
2248 - 'type' => Controls_Manager::COLOR,
2375 + 'label' => __('Text Color', 'fluentform'),
2376 + 'type' => Controls_Manager::COLOR,
2249 2377 'selectors' => [
2250 2378 '{{WRAPPER}} .fluentform-widget-wrapper .ff-message-success' => 'color: {{VALUE}}',
2251 2379 ],
2252 2380 ]
@@ -2254,13 +2382,13 @@
2254 2382
2255 2383 $this->add_group_control(
2256 2384 Group_Control_Border::get_type(),
2257 2385 [
2258 - 'name' => 'form_success_message_border',
2259 - 'label' => __('Border', 'fluentform'),
2386 + 'name' => 'form_success_message_border',
2387 + 'label' => __('Border', 'fluentform'),
2260 2388 'placeholder' => '1px',
2261 - 'default' => '1px',
2262 - 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper .ff-message-success',
2389 + 'default' => '1px',
2390 + 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper .ff-message-success',
2263 2391 ]
2264 2392 );
2265 2393
2266 2394 $this->add_group_control(
@@ -2265,10 +2393,10 @@
2265 2393
2266 2394 $this->add_group_control(
2267 2395 Group_Control_Typography::get_type(),
2268 2396 [
2269 - 'name' => 'form_success_message_typography',
2270 - 'label' => __('Typography', 'fluentform'),
2397 + 'name' => 'form_success_message_typography',
2398 + 'label' => __('Typography', 'fluentform'),
2271 2399 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper .ff-message-success',
2272 2400 ]
2273 2401 );
2274 2402
@@ -2274,14 +2402,15 @@
2274 2402
2275 2403 $this->end_controls_section();
2276 2404 }
2277 2405
2278 - protected function register_errors_style_controls(){
2406 + protected function register_errors_style_controls()
2407 + {
2279 2408 $this->start_controls_section(
2280 2409 'section_form_error_style',
2281 2410 [
2282 2411 'label' => __('Error Message', 'fluentform'),
2283 - 'tab' => Controls_Manager::TAB_STYLE,
2412 + 'tab' => Controls_Manager::TAB_STYLE,
2284 2413 ]
2285 2414 );
2286 2415
2287 2416 $this->add_control(
@@ -2286,11 +2415,11 @@
2286 2415
2287 2416 $this->add_control(
2288 2417 'form_error_message_text_color',
2289 2418 [
2290 - 'label' => __('Color', 'fluentform'),
2291 - 'type' => Controls_Manager::COLOR,
2292 - 'default' => '',
2419 + 'label' => __('Color', 'fluentform'),
2420 + 'type' => Controls_Manager::COLOR,
2421 + 'default' => '',
2293 2422 'selectors' => [
2294 2423 '{{WRAPPER}} .fluentform-widget-wrapper .error.text-danger' => 'color: {{VALUE}}',
2295 2424 ],
2296 2425 ]
@@ -2298,10 +2427,10 @@
2298 2427
2299 2428 $this->add_group_control(
2300 2429 Group_Control_Typography::get_type(),
2301 2430 [
2302 - 'name' => 'form_error_message_typography',
2303 - 'label' => __('Typography', 'fluentform'),
2431 + 'name' => 'form_error_message_typography',
2432 + 'label' => __('Typography', 'fluentform'),
2304 2433 'selector' => '{{WRAPPER}} .fluentform-widget-wrapper .error.text-danger',
2305 2434 ]
2306 2435 );
2307 2436
@@ -2307,12 +2436,12 @@
2307 2436
2308 2437 $this->add_responsive_control(
2309 2438 'form_error_message_padding',
2310 2439 [
2311 - 'label' => __('Padding', 'fluentform'),
2312 - 'type' => Controls_Manager::DIMENSIONS,
2440 + 'label' => __('Padding', 'fluentform'),
2441 + 'type' => Controls_Manager::DIMENSIONS,
2313 2442 'size_units' => ['px', 'em', '%'],
2314 - 'selectors' => [
2443 + 'selectors' => [
2315 2444 '{{WRAPPER}} .fluentform-widget-wrapper .error.text-danger' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
2316 2445 ],
2317 2446 ]
2318 2447 );
@@ -2319,12 +2448,12 @@
2319 2448
2320 2449 $this->add_responsive_control(
2321 2450 'form_error_message_margin',
2322 2451 [
2323 - 'label' => __('Margin', 'fluentform'),
2324 - 'type' => Controls_Manager::DIMENSIONS,
2452 + 'label' => __('Margin', 'fluentform'),
2453 + 'type' => Controls_Manager::DIMENSIONS,
2325 2454 'size_units' => ['px', 'em', '%'],
2326 - 'selectors' => [
2455 + 'selectors' => [
2327 2456 '{{WRAPPER}} .fluentform-widget-wrapper .error.text-danger' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
2328 2457 ],
2329 2458 ]
2330 2459 );
@@ -2331,8 +2460,15 @@
2331 2460
2332 2461 $this->end_controls_section();
2333 2462 }
2334 2463
2464 + private function getStylePresets()
2465 + {
2466 + return [
2467 + 'ffs_default' => __('Default', 'fluentform'),
2468 + 'ffs_inherit_theme' => __('Inherit Theme Style', 'fluentform'),
2469 + ];
2470 + }
2335 2471
2336 2472 /**
2337 2473 * Render the widget output on the frontend.
2338 2474 *
@@ -2341,9 +2477,10 @@
2341 2477 * @since 1.0.0
2342 2478 *
2343 2479 * @access protected
2344 2480 */
2345 - protected function render() {
2481 + protected function render()
2482 + {
2346 2483 $settings = $this->get_settings_for_display();
2347 2484 extract($settings);
2348 2485
2349 2486 $this->add_render_attribute(
@@ -2350,53 +2487,58 @@
2350 2487 'fluentform_widget_wrapper',
2351 2488 [
2352 2489 'class' => [
2353 2490 'fluentform-widget-wrapper',
2354 - ]
2491 + ],
2355 2492 ]
2356 2493 );
2357 2494
2495 + if ('yes' != $placeholder_switch) {
2496 + $this->add_render_attribute('fluentform_widget_wrapper', 'class', 'hide-placeholder');
2497 + }
2358 2498
2359 - if ( $placeholder_switch != 'yes' ) {
2360 - $this->add_render_attribute( 'fluentform_widget_wrapper', 'class', 'hide-placeholder' );
2499 + if ('yes' != $labels_switch) {
2500 + $this->add_render_attribute('fluentform_widget_wrapper', 'class', 'hide-fluent-form-labels');
2361 2501 }
2362 2502
2363 - if( $labels_switch != 'yes' ) {
2364 - $this->add_render_attribute( 'fluentform_widget_wrapper', 'class', 'hide-fluent-form-labels' );
2503 + if ('no' == $error_messages) {
2504 + $this->add_render_attribute('fluentform_widget_wrapper', 'class', 'hide-error-message');
2365 2505 }
2366 2506
2367 - if( $error_messages == 'no' ) {
2368 - $this->add_render_attribute( 'fluentform_widget_wrapper', 'class', 'hide-error-message' );
2507 + if ('yes' == $form_custom_radio_checkbox) {
2508 + $this->add_render_attribute('fluentform_widget_wrapper', 'class', 'fluentform-widget-custom-radio-checkbox');
2369 2509 }
2370 2510
2371 - if ( $form_custom_radio_checkbox == 'yes' ) {
2372 - $this->add_render_attribute( 'fluentform_widget_wrapper', 'class', 'fluentform-widget-custom-radio-checkbox' );
2511 + if ($form_container_alignment) {
2512 + $this->add_render_attribute('fluentform_widget_wrapper', 'class', 'fluentform-widget-align-' . $form_container_alignment . '');
2373 2513 }
2374 -
2375 - if ( $form_container_alignment ) {
2376 - $this->add_render_attribute( 'fluentform_widget_wrapper', 'class', 'fluentform-widget-align-'.$form_container_alignment.'' );
2514 +
2515 + if (isset($theme_style)) {
2516 + $theme_style = sanitize_text_field($theme_style);
2517 + } else {
2518 + $theme_style = '';
2377 2519 }
2378 2520
2379 - if ( ! empty( $form_list ) ) { ?>
2521 + if (!empty($form_list)) { ?>
2380 2522
2381 - <div <?php echo $this->get_render_attribute_string('fluentform_widget_wrapper'); ?>>
2523 + <div <?php echo wp_kses_post($this->get_render_attribute_string('fluentform_widget_wrapper')); ?>>
2382 2524
2383 - <?php if ($custom_title_description == 'yes') { ?>
2384 - <div class="fluentform-widget-heading">
2385 - <?php if ($form_title_custom != '') { ?>
2386 - <h3 class="fluentform-widget-title">
2387 - <?php echo esc_attr($form_title_custom); ?>
2388 - </h3>
2389 - <?php } ?>
2390 - <?php if ($form_description_custom != '') { ?>
2391 - <p class="fluentform-widget-description">
2392 - <?php echo $this->parse_text_editor($form_description_custom); ?>
2393 - </p>
2394 - <?php } ?>
2395 - </div>
2396 - <?php } ?>
2525 + <?php if ('yes' == $custom_title_description) { ?>
2526 + <div class="fluentform-widget-heading">
2527 + <?php if ('' != $form_title_custom) { ?>
2528 + <h3 class="fluentform-widget-title">
2529 + <?php echo esc_attr($form_title_custom); ?>
2530 + </h3>
2531 + <?php } ?>
2532 + <?php if ('' != $form_description_custom) { ?>
2533 + <p class="fluentform-widget-description">
2534 + <?php echo wp_kses_post($this->parse_text_editor($form_description_custom)); ?>
2535 + </p>
2536 + <?php } ?>
2537 + </div>
2538 + <?php } ?>
2397 2539
2398 - <?php echo do_shortcode('[fluentform id="' . $form_list . '"]'); ?>
2540 + <?php echo do_shortcode('[fluentform id="' . $form_list . '" theme="' . $theme_style . '"]'); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- $form_list is escaped before being passed in.?>
2399 2541 </div>
2400 2542
2401 2543 <?php
2402 2544 }
@@ -2401,9 +2543,8 @@
2401 2543 <?php
2402 2544 }
2403 2545 }
2404 2546
2405 -
2406 2547 /**
2407 2548 * Render the widget output in the editor.
2408 2549 *
2409 2550 * Written as a Backbone JavaScript template and used to generate the live preview.
@@ -2411,6 +2552,8 @@
2411 2552 * @since 1.0.0
2412 2553 *
2413 2554 * @access protected
2414 2555 */
2415 - protected function _content_template() {}
2556 + protected function content_template()
2557 + {
2558 + }
2416 2559 }