| @@ -5,12 +5,17 @@ | ||
| 5 | 5 | |
| 6 | 6 | $settings = FrmStylesHelper::get_settings_for_output( $style ); |
| 7 | 7 | extract( $settings ); // phpcs:ignore WordPress.PHP.DontExtract |
| 8 | 8 | |
| 9 | +$is_loaded_via_ajax = isset( $is_loaded_via_ajax ) ? $is_loaded_via_ajax : false; | |
| 10 | +FrmStylesPreviewHelper::get_additional_preview_style( $settings, $is_loaded_via_ajax ); | |
| 11 | + | |
| 9 | 12 | $important = empty( $important_style ) ? '' : ' !important'; |
| 10 | 13 | |
| 11 | -$minus_icons = FrmStylesHelper::minus_icons(); | |
| 12 | -$arrow_icons = FrmStylesHelper::arrow_icons(); | |
| 14 | +$minus_icons = FrmStylesHelper::minus_icons(); | |
| 15 | +$arrow_icons = FrmStylesHelper::arrow_icons(); | |
| 16 | +$submit_bg_img = FrmStylesHelper::get_submit_image_bg_url( $settings ); | |
| 17 | +$use_chosen_js = FrmStylesHelper::use_chosen_js(); | |
| 13 | 18 | |
| 14 | 19 | ?> |
| 15 | 20 | .<?php echo esc_html( $style_class ); ?>{ |
| 16 | 21 | <?php FrmStylesHelper::output_vars( $settings, $defaults ); ?> |
| @@ -32,44 +37,8 @@ | ||
| 32 | 37 | text-align:center; |
| 33 | 38 | } |
| 34 | 39 | <?php } ?> |
| 35 | 40 | |
| 36 | -<?php if ( ! empty( $label_color ) ) { ?> | |
| 37 | -.<?php echo esc_html( $style_class ); ?> .frm_icon_font{ | |
| 38 | - color:<?php echo esc_html( $label_color . $important ); ?>; | |
| 39 | -} | |
| 40 | -<?php } ?> | |
| 41 | - | |
| 42 | -.<?php echo esc_html( $style_class ); ?> .frm_icon_font.frm_minus_icon:before{ | |
| 43 | - content:"\e<?php echo esc_html( isset( $minus_icons[ $repeat_icon ] ) ? $minus_icons[ $repeat_icon ]['-'] : $minus_icons[1]['-'] ); ?>"; | |
| 44 | -} | |
| 45 | - | |
| 46 | -.<?php echo esc_html( $style_class ); ?> .frm_icon_font.frm_plus_icon:before{ | |
| 47 | - content:"\e<?php echo esc_html( isset( $minus_icons[ $repeat_icon ] ) ? $minus_icons[ $repeat_icon ]['+'] : $minus_icons[1]['+'] ); ?>"; | |
| 48 | -} | |
| 49 | - | |
| 50 | -.<?php echo esc_html( $style_class ); ?> .frm_icon_font.frm_minus_icon:before, | |
| 51 | -.<?php echo esc_html( $style_class ); ?> .frm_icon_font.frm_plus_icon:before{ | |
| 52 | - <?php if ( ! empty( $submit_text_color ) ) { ?> | |
| 53 | - color:<?php echo esc_html( $submit_text_color . $important ); ?>; | |
| 54 | - <?php } ?> | |
| 55 | - vertical-align:middle; | |
| 56 | -} | |
| 57 | - | |
| 58 | -.<?php echo esc_html( $style_class ); ?> .frm_trigger.active .frm_icon_font.frm_arrow_icon:before{ | |
| 59 | - content:"\e<?php echo esc_html( isset( $arrow_icons[ $collapse_icon ] ) ? $arrow_icons[ $collapse_icon ]['-'] : $arrow_icons[1]['-'] ); ?>"; | |
| 60 | - <?php if ( ! empty( $section_color ) ) { ?> | |
| 61 | - color:<?php echo esc_html( $section_color . $important ); ?>; | |
| 62 | - <?php } ?> | |
| 63 | -} | |
| 64 | - | |
| 65 | -.<?php echo esc_html( $style_class ); ?> .frm_trigger .frm_icon_font.frm_arrow_icon:before{ | |
| 66 | - content:"\e<?php echo esc_html( isset( $arrow_icons[ $collapse_icon ] ) ? $arrow_icons[ $collapse_icon ]['+'] : $arrow_icons[1]['+'] ); ?>"; | |
| 67 | - <?php if ( ! empty( $section_color ) ) { ?> | |
| 68 | - color:<?php echo esc_html( $section_color . $important ); ?>; | |
| 69 | - <?php } ?> | |
| 70 | -} | |
| 71 | - | |
| 72 | 41 | <?php if ( ! empty( $field_margin ) ) { ?> |
| 73 | 42 | .<?php echo esc_html( $style_class ); ?> .form-field{ |
| 74 | 43 | margin-bottom:<?php echo esc_html( $field_margin . $important ); ?>; |
| 75 | 44 | } |
| @@ -86,8 +55,10 @@ | ||
| 86 | 55 | .<?php echo esc_html( $style_class ); ?> .frm_error, |
| 87 | 56 | .<?php echo esc_html( $style_class ); ?> .frm_pro_max_limit_desc{ |
| 88 | 57 | <?php if ( ! empty( $description_margin ) ) { ?> |
| 89 | 58 | margin:<?php echo esc_html( $description_margin . $important ); ?>; |
| 59 | + <?php } else { ?> | |
| 60 | + margin-top: 6px; | |
| 90 | 61 | <?php } ?> |
| 91 | 62 | padding:0; |
| 92 | 63 | <?php if ( ! empty( $font ) ) { ?> |
| 93 | 64 | font-family:<?php echo FrmAppHelper::kses( $font . $important ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>; |
| @@ -187,9 +158,8 @@ | ||
| 187 | 158 | color: <?php echo esc_html( $text_color_disabled . $important ); ?>; |
| 188 | 159 | } |
| 189 | 160 | .<?php echo esc_html( $style_class ); ?> input::-moz-placeholder, |
| 190 | 161 | .<?php echo esc_html( $style_class ); ?> textarea::-moz-placeholder{ |
| 191 | - color: <?php echo esc_html( $text_color_disabled . $important ); ?>; | |
| 192 | 162 | opacity: 1; |
| 193 | 163 | } |
| 194 | 164 | .<?php echo esc_html( $style_class ); ?> input:-ms-input-placeholder, |
| 195 | 165 | <?php echo esc_html( $style_class ); ?> textarea:-ms-input-placeholder{ |
| @@ -194,24 +164,22 @@ | ||
| 194 | 164 | .<?php echo esc_html( $style_class ); ?> input:-ms-input-placeholder, |
| 195 | 165 | <?php echo esc_html( $style_class ); ?> textarea:-ms-input-placeholder{ |
| 196 | 166 | color: <?php echo esc_html( $text_color_disabled . $important ); ?>; |
| 197 | 167 | } |
| 198 | -.<?php echo esc_html( $style_class ); ?> input:-moz-placeholder, | |
| 199 | -.<?php echo esc_html( $style_class ); ?> textarea:-moz-placeholder{ | |
| 200 | - color: <?php echo esc_html( $text_color_disabled . $important ); ?>; | |
| 201 | -} | |
| 202 | 168 | |
| 203 | 169 | .<?php echo esc_html( $style_class ); ?> .frm_default, |
| 204 | 170 | .<?php echo esc_html( $style_class ); ?> input.frm_default, |
| 205 | 171 | .<?php echo esc_html( $style_class ); ?> textarea.frm_default, |
| 206 | 172 | .<?php echo esc_html( $style_class ); ?> select.frm_default, |
| 207 | -.<?php echo esc_html( $style_class ); ?> .placeholder, | |
| 173 | +<?php if ( $use_chosen_js ) { ?> | |
| 208 | 174 | .<?php echo esc_html( $style_class ); ?> .chosen-container-multi .chosen-choices li.search-field .default, |
| 209 | -.<?php echo esc_html( $style_class ); ?> .chosen-container-single .chosen-default{ | |
| 175 | +.<?php echo esc_html( $style_class ); ?> .chosen-container-single .chosen-default, | |
| 176 | +<?php } ?> | |
| 177 | +.<?php echo esc_html( $style_class ); ?> .placeholder { | |
| 210 | 178 | color: <?php echo esc_html( $text_color_disabled . $important ); ?>; |
| 211 | 179 | } |
| 212 | 180 | |
| 213 | -.<?php echo esc_html( $style_class ); ?> .form-field input:not([type=file]):focus, | |
| 181 | +.<?php echo esc_html( $style_class ); ?> .form-field input:not([type=file]):not([type=range]):not([readonly]):focus, | |
| 214 | 182 | .<?php echo esc_html( $style_class ); ?> select:focus, |
| 215 | 183 | .<?php echo esc_html( $style_class ); ?> textarea:focus, |
| 216 | 184 | .<?php echo esc_html( $style_class ); ?> .frm_focus_field input[type=text], |
| 217 | 185 | .<?php echo esc_html( $style_class ); ?> .frm_focus_field input[type=password], |
| @@ -220,11 +188,13 @@ | ||
| 220 | 188 | .<?php echo esc_html( $style_class ); ?> .frm_focus_field input[type=url], |
| 221 | 189 | .<?php echo esc_html( $style_class ); ?> .frm_focus_field input[type=tel], |
| 222 | 190 | .<?php echo esc_html( $style_class ); ?> .frm_focus_field input[type=search], |
| 223 | 191 | .frm_form_fields_active_style, |
| 224 | -.<?php echo esc_html( $style_class ); ?> .frm_focus_field .frm-card-element.StripeElement, | |
| 192 | +<?php if ( $use_chosen_js ) { ?> | |
| 225 | 193 | .<?php echo esc_html( $style_class ); ?> .chosen-container-single.chosen-container-active .chosen-single, |
| 226 | -.<?php echo esc_html( $style_class ); ?> .chosen-container-active .chosen-choices{ | |
| 194 | +.<?php echo esc_html( $style_class ); ?> .chosen-container-active .chosen-choices, | |
| 195 | +<?php } ?> | |
| 196 | +.<?php echo esc_html( $style_class ); ?> .frm_focus_field .frm-card-element.StripeElement { | |
| 227 | 197 | background-color:<?php echo esc_html( $bg_color_active . $important ); ?>; |
| 228 | 198 | border-color:<?php echo esc_html( $border_color_active . $important ); ?>; |
| 229 | 199 | color: var(--text-color); |
| 230 | 200 | <?php if ( isset( $remove_box_shadow_active ) && $remove_box_shadow_active ) { ?> |
| @@ -230,9 +200,9 @@ | ||
| 230 | 200 | <?php if ( isset( $remove_box_shadow_active ) && $remove_box_shadow_active ) { ?> |
| 231 | 201 | box-shadow:none; |
| 232 | 202 | outline: none; |
| 233 | 203 | <?php } else { ?> |
| 234 | - box-shadow:0 1px 1px rgba(0, 0, 0, 0.075) inset, 0 0 8px rgba(<?php echo esc_html( FrmStylesHelper::hex2rgb( $border_color_active ) ); ?>, 0.6); | |
| 204 | + box-shadow:0px 0px 5px 0px rgba(<?php echo esc_html( FrmStylesHelper::hex2rgb( $border_color_active ) ); ?>, 0.6); | |
| 235 | 205 | <?php } ?> |
| 236 | 206 | } |
| 237 | 207 | |
| 238 | 208 | <?php if ( ! $submit_style ) { ?> |
| @@ -258,25 +228,21 @@ | ||
| 258 | 228 | } |
| 259 | 229 | echo esc_html( $important ); |
| 260 | 230 | ?> |
| 261 | 231 | ; |
| 232 | + <?php if ( '' !== $submit_border_width ) : ?> | |
| 262 | 233 | border-width:<?php echo esc_html( $submit_border_width ); ?>; |
| 234 | + <?php endif; ?> | |
| 263 | 235 | border-color: <?php echo esc_html( $submit_border_color . $important ); ?>; |
| 264 | 236 | border-style:solid; |
| 265 | 237 | color:<?php echo esc_html( $submit_text_color . $important ); ?>; |
| 266 | 238 | cursor:pointer; |
| 267 | 239 | font-weight:<?php echo esc_html( $submit_weight . $important ); ?>; |
| 268 | - -moz-border-radius:<?php echo esc_html( $submit_border_radius . $important ); ?>; | |
| 269 | - -webkit-border-radius:<?php echo esc_html( $submit_border_radius . $important ); ?>; | |
| 270 | 240 | border-radius:<?php echo esc_html( $submit_border_radius . $important ); ?>; |
| 271 | 241 | text-shadow:none; |
| 272 | 242 | padding:<?php echo esc_html( $submit_padding . $important ); ?>; |
| 273 | - -moz-box-sizing:border-box; | |
| 274 | 243 | box-sizing:border-box; |
| 275 | - -ms-box-sizing:border-box; | |
| 276 | 244 | <?php if ( ! empty( $submit_shadow_color ) ) { ?> |
| 277 | - -moz-box-shadow:0 1px 1px <?php echo esc_html( $submit_shadow_color ); ?>; | |
| 278 | - -webkit-box-shadow:0 1px 1px <?php echo esc_html( $submit_shadow_color ); ?>; | |
| 279 | 245 | box-shadow:0 1px 1px <?php echo esc_html( $submit_shadow_color ); ?>; |
| 280 | 246 | <?php } ?> |
| 281 | 247 | margin:<?php echo esc_html( $submit_margin ); ?>; |
| 282 | 248 | <?php |
| @@ -329,8 +295,9 @@ | ||
| 329 | 295 | .<?php echo esc_html( $style_class ); ?> .frm_loading_form .frm_button_submit:active, |
| 330 | 296 | .<?php echo esc_html( $style_class ); ?> .frm_loading_form .frm_button_submit:focus{ |
| 331 | 297 | color: transparent <?php echo esc_html( $important ); ?>; |
| 332 | 298 | background: <?php echo esc_html( $submit_bg_color . $important ); ?>; |
| 299 | + border-color: <?php echo esc_html( $submit_bg_color . $important ); ?>; | |
| 333 | 300 | } |
| 334 | 301 | |
| 335 | 302 | .<?php echo esc_html( $style_class ); ?> .frm_loading_prev .frm_prev_page:before, |
| 336 | 303 | .<?php echo esc_html( $style_class ); ?> .frm_loading_form .frm_button_submit:before { |
| @@ -343,10 +310,10 @@ | ||
| 343 | 310 | max-width:<?php echo esc_html( $submit_width ); ?>; |
| 344 | 311 | <?php } ?> |
| 345 | 312 | } |
| 346 | 313 | <?php |
| 347 | - } | |
| 348 | -} | |
| 314 | + }//end if | |
| 315 | +}//end if | |
| 349 | 316 | ?> |
| 350 | 317 | |
| 351 | 318 | .<?php echo esc_html( $style_class ); ?>.frm_inline_top .frm_submit::before, |
| 352 | 319 | .<?php echo esc_html( $style_class ); ?> .frm_submit.frm_inline_submit::before { |
| @@ -393,15 +360,17 @@ | ||
| 393 | 360 | .frm_form_fields_error_style, |
| 394 | 361 | .<?php echo esc_html( $style_class ); ?> .frm_blank_field .frm-g-recaptcha iframe, |
| 395 | 362 | .<?php echo esc_html( $style_class ); ?> .frm_blank_field .g-recaptcha iframe, |
| 396 | 363 | .<?php echo esc_html( $style_class ); ?> .frm_blank_field .frm-card-element.StripeElement, |
| 364 | +<?php if ( $use_chosen_js ) { ?> | |
| 397 | 365 | .<?php echo esc_html( $style_class ); ?> .frm_blank_field .chosen-container-multi .chosen-choices, |
| 398 | 366 | .<?php echo esc_html( $style_class ); ?> .frm_blank_field .chosen-container-single .chosen-single, |
| 399 | -.<?php echo esc_html( $style_class ); ?> .frm_form_field :invalid{ | |
| 367 | +<?php } ?> | |
| 368 | +.<?php echo esc_html( $style_class ); ?> .frm_form_field :invalid { | |
| 400 | 369 | color:<?php echo esc_html( $text_color_error . $important ); ?>; |
| 401 | 370 | background-color:<?php echo esc_html( $bg_color_error . $important ); ?>; |
| 402 | 371 | border-color:<?php echo esc_html( $border_color_error . $important ); ?>; |
| 403 | - border-width:<?php echo esc_html( $border_width_error . $important ); ?>; | |
| 372 | + border-width:var(--border-width-error) <?php echo esc_html( $important ); ?>; | |
| 404 | 373 | border-style:<?php echo esc_html( $border_style_error . $important ); ?>; |
| 405 | 374 | } |
| 406 | 375 | |
| 407 | 376 | .<?php echo esc_html( $style_class ); ?> .frm_blank_field .sigWrapper{ |
| @@ -412,12 +381,11 @@ | ||
| 412 | 381 | .<?php echo esc_html( $style_class ); ?> .frm_limit_error{ |
| 413 | 382 | font-weight:<?php echo esc_html( $weight . $important ); ?>; |
| 414 | 383 | } |
| 415 | 384 | |
| 416 | -.<?php echo esc_html( $style_class ); ?> .frm_blank_field label, | |
| 417 | 385 | .<?php echo esc_html( $style_class ); ?> .frm_error, |
| 418 | 386 | .<?php echo esc_html( $style_class ); ?> .frm_limit_error{ |
| 419 | - color:<?php echo esc_html( $border_color_error . $important ); ?>; | |
| 387 | + color:<?php echo esc_html( $text_color_error . $important ); ?>; | |
| 420 | 388 | } |
| 421 | 389 | |
| 422 | 390 | .<?php echo esc_html( $style_class ); ?> .frm_error_style{ |
| 423 | 391 | background-color:<?php echo esc_html( $error_bg . $important ); ?>; |