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