| @@ -6,9 +6,9 @@ | ||
| 6 | 6 | if ( ! isset( $saving ) ) { |
| 7 | 7 | header( 'Content-type: text/css' ); |
| 8 | 8 | |
| 9 | 9 | if ( ! empty( $css ) ) { |
| 10 | - echo strip_tags( FrmStylesHelper::maybe_scope_custom_css_in_cached_output( $css ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped | |
| 10 | + echo strip_tags( $css, 'all' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped | |
| 11 | 11 | FrmStylesController::maybe_hide_sample_form_error_message(); |
| 12 | 12 | die(); |
| 13 | 13 | } |
| 14 | 14 | } |
| @@ -18,19 +18,13 @@ | ||
| 18 | 18 | } |
| 19 | 19 | |
| 20 | 20 | $styles = $frm_style->get_all(); |
| 21 | 21 | $default_style = $frm_style->get_default_style( $styles ); |
| 22 | +$defaults = FrmStylesHelper::get_settings_for_output( $default_style ); | |
| 23 | +$important = empty( $defaults['important_style'] ) ? '' : ' !important'; | |
| 22 | 24 | $pro_is_installed = FrmAppHelper::pro_is_installed(); |
| 25 | +$use_chosen_js = FrmStylesHelper::use_chosen_js(); | |
| 23 | 26 | |
| 24 | -if ( ! $pro_is_installed && $default_style ) { | |
| 25 | - // Per-form styles are a Pro feature, so only the default style is ever used without Pro. | |
| 26 | - $styles = array( $default_style->ID => $default_style ); | |
| 27 | -} | |
| 28 | - | |
| 29 | -$defaults = FrmStylesHelper::get_settings_for_output( $default_style ); | |
| 30 | -$important = ! empty( $defaults['important_style'] ) ? ' !important' : ''; | |
| 31 | -$use_chosen_js = FrmStylesHelper::use_chosen_js(); | |
| 32 | - | |
| 33 | 27 | ?> |
| 34 | 28 | .with_frm_style{ |
| 35 | 29 | <?php FrmStylesHelper::output_vars( $defaults ); ?> |
| 36 | 30 | } |
| @@ -148,14 +142,13 @@ | ||
| 148 | 142 | color: var(--form-desc-color)<?php echo esc_html( $important ); ?>; |
| 149 | 143 | <?php } ?> |
| 150 | 144 | } |
| 151 | 145 | |
| 146 | +<?php if ( ! empty( $defaults['form_desc_size'] ) ) { ?> | |
| 152 | 147 | .with_frm_style .frm_form_field.frm_html_container{ |
| 153 | -<?php if ( ! empty( $defaults['form_desc_size'] ) ) { ?> | |
| 154 | 148 | font-size: var(--form-desc-size)<?php echo esc_html( $important ); ?>; |
| 149 | +} | |
| 155 | 150 | <?php } ?> |
| 156 | - overflow-wrap: break-word<?php echo esc_html( $important ); ?>; | |
| 157 | -} | |
| 158 | 151 | |
| 159 | 152 | .with_frm_style .frm_form_field .frm_show_it{ |
| 160 | 153 | <?php if ( ! empty( $defaults['field_font_size'] ) ) { ?> |
| 161 | 154 | font-size: var(--field-font-size)<?php echo esc_html( $important ); ?>; |
| @@ -198,14 +191,8 @@ | ||
| 198 | 191 | vertical-align:top; |
| 199 | 192 | height:auto; |
| 200 | 193 | } |
| 201 | 194 | |
| 202 | -<?php if ( $use_chosen_js ) { ?> | |
| 203 | -.with_frm_style .chosen-container-multi .chosen-choices, | |
| 204 | -.with_frm_style .chosen-container-single .chosen-single, | |
| 205 | -<?php } elseif ( $pro_is_installed ) { ?> | |
| 206 | -.with_frm_style .frm_slimselect.ss-main, | |
| 207 | -<?php } ?> | |
| 208 | 195 | .with_frm_style input[type=text], |
| 209 | 196 | .with_frm_style input[type=password], |
| 210 | 197 | .with_frm_style input[type=email], |
| 211 | 198 | .with_frm_style input[type=number], |
| @@ -218,9 +205,14 @@ | ||
| 218 | 205 | .frm_form_fields_style, |
| 219 | 206 | .with_frm_style .frm_scroll_box .frm_opt_container, |
| 220 | 207 | .frm_form_fields_active_style, |
| 221 | 208 | .frm_form_fields_error_style, |
| 222 | -.with_frm_style .frm-card-element.StripeElement { | |
| 209 | +.with_frm_style .frm-card-element.StripeElement, | |
| 210 | +<?php if ( $use_chosen_js ) { ?> | |
| 211 | +.with_frm_style .chosen-container-multi .chosen-choices, | |
| 212 | +.with_frm_style .chosen-container-single .chosen-single, | |
| 213 | +<?php } ?> | |
| 214 | +.with_frm_style .frm_slimselect.ss-main { | |
| 223 | 215 | color: var(--text-color)<?php echo esc_html( $important ); ?>; |
| 224 | 216 | background-color: var(--bg-color)<?php echo esc_html( $important ); ?>; |
| 225 | 217 | border-color: var(--border-color)<?php echo esc_html( $important ); ?>; |
| 226 | 218 | border-width: var(--field-border-width)<?php echo esc_html( $important ); ?>; |
| @@ -234,14 +226,9 @@ | ||
| 234 | 226 | outline: none<?php echo esc_html( $important ); ?>; |
| 235 | 227 | font-weight: var(--field-weight); |
| 236 | 228 | } |
| 237 | 229 | |
| 238 | -.with_frm_style input:-webkit-autofill:focus { | |
| 239 | - /* Prevent the user agent autofill background color from taking effect on focus. */ | |
| 240 | - transition: background-color 5000s ease-in-out 0s<?php echo esc_html( $important ); ?>; | |
| 241 | -} | |
| 242 | - | |
| 243 | -<?php if ( $important ) : ?> | |
| 230 | +<?php if ( ! empty( $important ) ) : ?> | |
| 244 | 231 | <?php if ( $use_chosen_js ) { ?> |
| 245 | 232 | .with_frm_style .chosen-container-multi .chosen-choices, |
| 246 | 233 | .with_frm_style .chosen-container-single .chosen-single, |
| 247 | 234 | <?php } ?> |
| @@ -332,9 +319,8 @@ | ||
| 332 | 319 | .with_frm_style input[type=file].frm_transparent{ |
| 333 | 320 | color:transparent<?php echo esc_html( $important ); ?>; |
| 334 | 321 | } |
| 335 | 322 | |
| 336 | -<?php if ( $pro_is_installed ) { ?> | |
| 337 | 323 | .with_frm_style .wp-editor-wrap{ |
| 338 | 324 | width: var(--field-width)<?php echo esc_html( $important ); ?>; |
| 339 | 325 | max-width:100%; |
| 340 | 326 | } |
| @@ -346,9 +332,8 @@ | ||
| 346 | 332 | |
| 347 | 333 | .with_frm_style .mceIframeContainer{ |
| 348 | 334 | background-color: var(--bg-color)<?php echo esc_html( $important ); ?>; |
| 349 | 335 | } |
| 350 | -<?php } ?> | |
| 351 | 336 | |
| 352 | 337 | .with_frm_style select{ |
| 353 | 338 | width: var(--auto-width)<?php echo esc_html( $important ); ?>; |
| 354 | 339 | max-width:100%; |
| @@ -428,13 +413,11 @@ | ||
| 428 | 413 | .frm_none_container .frm_primary_label{ |
| 429 | 414 | display:none; |
| 430 | 415 | } |
| 431 | 416 | |
| 432 | -<?php if ( $pro_is_installed ) { ?> | |
| 433 | 417 | .with_frm_style .frm_section_heading.frm_hide_section{ |
| 434 | 418 | margin-top:0 !important; |
| 435 | 419 | } |
| 436 | -<?php } ?> | |
| 437 | 420 | |
| 438 | 421 | .with_frm_style .frm_hidden_container .frm_primary_label, |
| 439 | 422 | .with_frm_style .frm_pos_hidden, |
| 440 | 423 | .frm_hidden_container .frm_primary_label{ |
| @@ -458,13 +441,26 @@ | ||
| 458 | 441 | .with_frm_style .frm_inside_container > textarea { |
| 459 | 442 | display: block; |
| 460 | 443 | } |
| 461 | 444 | |
| 445 | +/* These do not work if they are combined */ | |
| 462 | 446 | .with_frm_style input::placeholder, |
| 463 | 447 | .with_frm_style textarea::placeholder { |
| 464 | 448 | font-size: var(--field-font-size)<?php echo esc_html( $important ); ?>; |
| 465 | 449 | } |
| 466 | 450 | |
| 451 | +.with_frm_style .frm_inside_container > input::-moz-placeholder, | |
| 452 | +.with_frm_style .frm_inside_container > textarea::-moz-placeholder { | |
| 453 | + opacity: 0 !important; | |
| 454 | + transition: opacity 0.3s ease-in; | |
| 455 | +} | |
| 456 | + | |
| 457 | +.with_frm_style .frm_inside_container > input:-ms-input-placeholder, | |
| 458 | +.with_frm_style .frm_inside_container > textarea:-ms-input-placeholder { | |
| 459 | + opacity: 0; | |
| 460 | + transition: opacity 0.3s ease-in; | |
| 461 | +} | |
| 462 | + | |
| 467 | 463 | .with_frm_style .frm_inside_container > input::placeholder, |
| 468 | 464 | .with_frm_style .frm_inside_container > textarea::placeholder { |
| 469 | 465 | opacity: 0; |
| 470 | 466 | transition: opacity 0.3s ease-in; |
| @@ -506,8 +502,21 @@ | ||
| 506 | 502 | font-size: 12px; |
| 507 | 503 | font-size: calc(0.85 * var(--field-font-size)); |
| 508 | 504 | } |
| 509 | 505 | |
| 506 | +/* These do not work if they are combined */ | |
| 507 | +.with_frm_style .frm_inside_container.frm_label_float_top > input::-moz-placeholder, | |
| 508 | +.with_frm_style .frm_inside_container.frm_label_float_top > textarea::-moz-placeholder { | |
| 509 | + opacity: 1 !important; | |
| 510 | + transition: opacity 0.3s ease-in; | |
| 511 | +} | |
| 512 | + | |
| 513 | +.with_frm_style .frm_inside_container.frm_label_float_top > input:-ms-input-placeholder, | |
| 514 | +.with_frm_style .frm_inside_container.frm_label_float_top > textarea:-ms-input-placeholder { | |
| 515 | + opacity: 1; | |
| 516 | + transition: opacity 0.3s ease-in; | |
| 517 | +} | |
| 518 | + | |
| 510 | 519 | .with_frm_style .frm_inside_container.frm_label_float_top > input::placeholder, |
| 511 | 520 | .with_frm_style .frm_inside_container.frm_label_float_top > textarea::placeholder { |
| 512 | 521 | opacity: 1; |
| 513 | 522 | transition: opacity 0.3s ease-in; |
| @@ -518,9 +527,9 @@ | ||
| 518 | 527 | .with_frm_style .frm_pro_max_limit_desc{ |
| 519 | 528 | clear:both; |
| 520 | 529 | } |
| 521 | 530 | |
| 522 | -.with_frm_style input[type=number][readonly] { | |
| 531 | +.with_frm_style input[type=number][readonly]{ | |
| 523 | 532 | -moz-appearance: textfield; |
| 524 | 533 | } |
| 525 | 534 | |
| 526 | 535 | .with_frm_style select[multiple="multiple"]{ |
| @@ -527,9 +536,8 @@ | ||
| 527 | 536 | height:auto; |
| 528 | 537 | line-height:normal; |
| 529 | 538 | } |
| 530 | 539 | |
| 531 | -<?php if ( $pro_is_installed ) { ?> | |
| 532 | 540 | .with_frm_style .frm_catlevel_2, |
| 533 | 541 | .with_frm_style .frm_catlevel_3, |
| 534 | 542 | .with_frm_style .frm_catlevel_4, |
| 535 | 543 | .with_frm_style .frm_catlevel_5{ |
| @@ -534,11 +542,9 @@ | ||
| 534 | 542 | .with_frm_style .frm_catlevel_4, |
| 535 | 543 | .with_frm_style .frm_catlevel_5{ |
| 536 | 544 | margin-left:18px; |
| 537 | 545 | } |
| 538 | -<?php } ?> | |
| 539 | 546 | |
| 540 | -<?php if ( $pro_is_installed ) { ?> | |
| 541 | 547 | .with_frm_style .wp-editor-container{ |
| 542 | 548 | border:1px solid #e5e5e5; |
| 543 | 549 | } |
| 544 | 550 | |
| @@ -548,9 +554,8 @@ | ||
| 548 | 554 | |
| 549 | 555 | .with_frm_style .wp-editor-container textarea{ |
| 550 | 556 | border:none; |
| 551 | 557 | } |
| 552 | -<?php } ?> | |
| 553 | 558 | |
| 554 | 559 | .with_frm_style .auto_width #loginform input, |
| 555 | 560 | .with_frm_style .auto_width input, |
| 556 | 561 | .with_frm_style input.auto_width, |
| @@ -558,16 +563,14 @@ | ||
| 558 | 563 | .with_frm_style textarea.auto_width{ |
| 559 | 564 | width:auto<?php echo esc_html( $important ); ?>; |
| 560 | 565 | } |
| 561 | 566 | |
| 562 | -<?php if ( $pro_is_installed ) { ?> | |
| 563 | 567 | .with_frm_style .frm_repeat_buttons{ |
| 564 | 568 | white-space:nowrap; |
| 565 | 569 | } |
| 566 | -<?php } ?> | |
| 567 | 570 | |
| 568 | 571 | .with_frm_style .frm_button{ |
| 569 | - text-decoration:none !important; | |
| 572 | + text-decoration:none !important;; | |
| 570 | 573 | border:1px solid #eee; |
| 571 | 574 | display:inline-block; |
| 572 | 575 | <?php if ( ! empty( $defaults['submit_padding'] ) ) { ?> |
| 573 | 576 | padding: var(--submit-padding)<?php echo esc_html( $important ); ?>; |
| @@ -574,8 +577,9 @@ | ||
| 574 | 577 | <?php } else { ?> |
| 575 | 578 | padding:5px; |
| 576 | 579 | <?php } ?> |
| 577 | 580 | <?php if ( ! empty( $defaults['border_radius'] ) ) { ?> |
| 581 | + border-radius:<?php echo esc_html( $defaults['border_radius'] . $important ); ?>; | |
| 578 | 582 | border-radius:var(--border-radius)<?php echo esc_html( $important ); ?>; |
| 579 | 583 | <?php } ?> |
| 580 | 584 | <?php if ( ! empty( $defaults['submit_font_size'] ) ) { ?> |
| 581 | 585 | font-size: var(--submit-font-size)<?php echo esc_html( $important ); ?>; |
| @@ -660,11 +664,9 @@ | ||
| 660 | 664 | .with_frm_style.frm_center_submit .frm_submit button{ |
| 661 | 665 | margin-bottom:8px !important; |
| 662 | 666 | } |
| 663 | 667 | |
| 664 | -<?php if ( $pro_is_installed ) { ?> | |
| 665 | 668 | .with_frm_style .frm-edit-page-btn, |
| 666 | -<?php } ?> | |
| 667 | 669 | .with_frm_style .frm_submit input[type=submit], |
| 668 | 670 | .with_frm_style .frm_submit input[type=button], |
| 669 | 671 | .with_frm_style .frm_submit button{ |
| 670 | 672 | -webkit-appearance: none; |
| @@ -681,11 +683,9 @@ | ||
| 681 | 683 | /* keep this for reverse compatibility for old HTML */ |
| 682 | 684 | visibility:visible !important; |
| 683 | 685 | } |
| 684 | 686 | |
| 685 | -<?php if ( $pro_is_installed ) { ?> | |
| 686 | 687 | .with_frm_style .frm_loading_prev .frm_prev_page, |
| 687 | -<?php } ?> | |
| 688 | 688 | .with_frm_style .frm_loading_form .frm_button_submit { |
| 689 | 689 | position: relative; |
| 690 | 690 | color: transparent !important; |
| 691 | 691 | text-shadow: none !important; |
| @@ -690,13 +690,11 @@ | ||
| 690 | 690 | color: transparent !important; |
| 691 | 691 | text-shadow: none !important; |
| 692 | 692 | } |
| 693 | 693 | |
| 694 | -<?php if ( $pro_is_installed ) { ?> | |
| 695 | 694 | .with_frm_style .frm_loading_prev .frm_prev_page:hover, |
| 696 | 695 | .with_frm_style .frm_loading_prev .frm_prev_page:active, |
| 697 | 696 | .with_frm_style .frm_loading_prev .frm_prev_page:focus, |
| 698 | -<?php } ?> | |
| 699 | 697 | .with_frm_style .frm_loading_form .frm_button_submit:hover, |
| 700 | 698 | .with_frm_style .frm_loading_form .frm_button_submit:active, |
| 701 | 699 | .with_frm_style .frm_loading_form .frm_button_submit:focus { |
| 702 | 700 | cursor: not-allowed; |
| @@ -704,11 +702,9 @@ | ||
| 704 | 702 | outline: none !important; |
| 705 | 703 | box-shadow: none; |
| 706 | 704 | } |
| 707 | 705 | |
| 708 | -<?php if ( $pro_is_installed ) { ?> | |
| 709 | 706 | .with_frm_style .frm_loading_prev .frm_prev_page::before, |
| 710 | -<?php } ?> | |
| 711 | 707 | .with_frm_style .frm_loading_form .frm_button_submit:before { |
| 712 | 708 | content: ''; |
| 713 | 709 | display: inline-block; |
| 714 | 710 | position: absolute; |
| @@ -732,13 +728,11 @@ | ||
| 732 | 728 | align-items: center; |
| 733 | 729 | gap: 2%; |
| 734 | 730 | } |
| 735 | 731 | |
| 736 | -<?php if ( $pro_is_installed ) { ?> | |
| 737 | 732 | .with_frm_style .frm_submit.frm_flex button.frm_button_submit ~ .frm_prev_page { |
| 738 | 733 | order: -1; |
| 739 | 734 | } |
| 740 | -<?php } ?> | |
| 741 | 735 | |
| 742 | 736 | <?php |
| 743 | 737 | foreach ( $styles as $style ) { |
| 744 | 738 | include __DIR__ . '/_single_theme.css.php'; |
| @@ -745,9 +739,9 @@ | ||
| 745 | 739 | unset( $style ); |
| 746 | 740 | } |
| 747 | 741 | |
| 748 | 742 | // Set it again since it may have been overridden. |
| 749 | -$important = ! empty( $defaults['important_style'] ) ? ' !important' : ''; | |
| 743 | +$important = empty( $defaults['important_style'] ) ? '' : ' !important'; | |
| 750 | 744 | ?> |
| 751 | 745 | |
| 752 | 746 | .frm_ajax_loading{ |
| 753 | 747 | visibility:hidden; |
| @@ -761,18 +755,16 @@ | ||
| 761 | 755 | a.frm_save_draft{ |
| 762 | 756 | cursor:pointer; |
| 763 | 757 | } |
| 764 | 758 | |
| 765 | -<?php if ( $pro_is_installed ) { ?> | |
| 766 | 759 | .with_frm_style a.frm_save_draft, |
| 767 | 760 | .with_frm_style a.frm_start_over{ |
| 768 | - <?php if ( ! empty( $defaults['font'] ) ) { ?> | |
| 761 | +<?php if ( ! empty( $defaults['font'] ) ) { ?> | |
| 769 | 762 | font-family: var(--font); |
| 770 | 763 | <?php } ?> |
| 771 | 764 | font-size: var(--submit-font-size); |
| 772 | 765 | font-weight: var(--submit-weight); |
| 773 | 766 | } |
| 774 | -<?php } ?> | |
| 775 | 767 | |
| 776 | 768 | .horizontal_radio .frm_radio{ |
| 777 | 769 | margin:0 5px 0 0; |
| 778 | 770 | } |
| @@ -1076,9 +1068,8 @@ | ||
| 1076 | 1068 | .frm-alt-table tr:nth-child(even) { |
| 1077 | 1069 | background-color:<?php echo esc_html( FrmStylesHelper::adjust_brightness( $defaults['border_color'], 45 ) ); ?>; |
| 1078 | 1070 | } |
| 1079 | 1071 | |
| 1080 | -<?php if ( $pro_is_installed ) { ?> | |
| 1081 | 1072 | table.form_results.with_frm_style{ |
| 1082 | 1073 | border-style: solid; |
| 1083 | 1074 | border-width: var(--field-border-width)<?php echo esc_html( $important ); ?>; |
| 1084 | 1075 | border-color: var(--border-color)<?php echo esc_html( $important ); ?>; |
| @@ -1086,18 +1077,17 @@ | ||
| 1086 | 1077 | |
| 1087 | 1078 | table.form_results.with_frm_style tr td{ |
| 1088 | 1079 | text-align:left; |
| 1089 | 1080 | padding:7px 9px; |
| 1090 | - <?php if ( ! empty( $defaults['text_color'] ) ) { ?> | |
| 1081 | +<?php if ( ! empty( $defaults['text_color'] ) ) { ?> | |
| 1091 | 1082 | color: var(--text-color)<?php echo esc_html( $important ); ?>; |
| 1092 | 1083 | <?php } ?> |
| 1093 | - <?php if ( ! empty( $defaults['border_color'] ) ) { ?> | |
| 1084 | +<?php if ( ! empty( $defaults['border_color'] ) ) { ?> | |
| 1094 | 1085 | border-top-style: solid; |
| 1095 | 1086 | border-top-width: var(--field-border-width)<?php echo esc_html( $important ); ?>; |
| 1096 | 1087 | border-top-color: var(--border-color)<?php echo esc_html( $important ); ?>; |
| 1097 | 1088 | <?php } ?> |
| 1098 | 1089 | } |
| 1099 | -<?php } ?> | |
| 1100 | 1090 | |
| 1101 | 1091 | table.form_results.with_frm_style tr.frm_even, |
| 1102 | 1092 | .frm-grid .frm_even{ |
| 1103 | 1093 | background-color:#fff; |
| @@ -1116,23 +1106,18 @@ | ||
| 1116 | 1106 | background-color:<?php echo esc_html( FrmStylesHelper::adjust_brightness( $defaults['border_color'], 45 ) ); ?>; |
| 1117 | 1107 | padding: 40px; |
| 1118 | 1108 | } |
| 1119 | 1109 | |
| 1120 | - <?php if ( $pro_is_installed ) { ?> | |
| 1121 | 1110 | .with_frm_style .frm-show-form .frm_color_block.frm_section_heading h3, |
| 1122 | 1111 | .frm_color_block.frm_section_heading h3 { |
| 1123 | 1112 | border-width: 0 !important; |
| 1124 | 1113 | } |
| 1125 | - <?php } ?> | |
| 1126 | 1114 | <?php } ?> |
| 1127 | 1115 | |
| 1128 | -<?php if ( $pro_is_installed ) { ?> | |
| 1129 | 1116 | .frm_collapse .ui-icon{ |
| 1130 | 1117 | display:inline-block; |
| 1131 | 1118 | } |
| 1132 | -<?php } ?> | |
| 1133 | 1119 | |
| 1134 | -<?php if ( $pro_is_installed ) { ?> | |
| 1135 | 1120 | .frm_toggle_container{ |
| 1136 | 1121 | /* Prevent the slide and bounce */ |
| 1137 | 1122 | border:1px solid transparent; |
| 1138 | 1123 | } |
| @@ -1149,11 +1134,9 @@ | ||
| 1149 | 1134 | |
| 1150 | 1135 | .frm_toggle_container .frm_month_listing{ |
| 1151 | 1136 | margin-left:40px; |
| 1152 | 1137 | } |
| 1153 | -<?php } ?> | |
| 1154 | 1138 | |
| 1155 | -<?php if ( $pro_is_installed ) { ?> | |
| 1156 | 1139 | #frm_loading{ |
| 1157 | 1140 | display:none; |
| 1158 | 1141 | position:fixed; |
| 1159 | 1142 | top:0; |
| @@ -1196,11 +1179,11 @@ | ||
| 1196 | 1179 | #frm_loading .progress.active .progress-bar{ |
| 1197 | 1180 | animation:2s linear 0s normal none infinite progress-bar-stripes; |
| 1198 | 1181 | } |
| 1199 | 1182 | |
| 1200 | - <?php if ( ! empty( $defaults['bg_color'] ) ) { ?> | |
| 1183 | +<?php if ( ! empty( $defaults['bg_color'] ) ) { ?> | |
| 1201 | 1184 | #frm_loading .progress-striped .progress-bar { |
| 1202 | - <?php if ( ! empty( $defaults['border_color'] ) ) { ?> | |
| 1185 | + <?php if ( ! empty( $defaults['border_color'] ) ) { ?> | |
| 1203 | 1186 | background-image: linear-gradient(45deg, var(--border-color) 25%, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, 0) 50%, var(--border-color) 50%, var(--border-color) 75%, rgba(0, 0, 0, 0) 75%, rgba(0, 0, 0, 0)); |
| 1204 | 1187 | <?php } ?> |
| 1205 | 1188 | background-size:40px 40px; |
| 1206 | 1189 | } |
| @@ -1215,11 +1198,8 @@ | ||
| 1215 | 1198 | text-align: center; |
| 1216 | 1199 | transition: width 0.6s ease 0s; |
| 1217 | 1200 | width: 100%; |
| 1218 | 1201 | } |
| 1219 | - <?php | |
| 1220 | -}//end if | |
| 1221 | -?> | |
| 1222 | 1202 | |
| 1223 | 1203 | .frm_image_from_url{ |
| 1224 | 1204 | height:50px; |
| 1225 | 1205 | } |
| @@ -1228,9 +1208,8 @@ | ||
| 1228 | 1208 | background:url(../images/ajax_loader.gif) no-repeat center center; |
| 1229 | 1209 | padding:6px 12px; |
| 1230 | 1210 | } |
| 1231 | 1211 | |
| 1232 | -<?php if ( $pro_is_installed ) { ?> | |
| 1233 | 1212 | select.frm_loading_lookup{ |
| 1234 | 1213 | background-image: url(../images/ajax_loader.gif) !important; |
| 1235 | 1214 | background-position: 10px; |
| 1236 | 1215 | background-repeat: no-repeat; |
| @@ -1235,25 +1214,20 @@ | ||
| 1235 | 1214 | background-position: 10px; |
| 1236 | 1215 | background-repeat: no-repeat; |
| 1237 | 1216 | color: transparent !important; |
| 1238 | 1217 | } |
| 1239 | -<?php } ?> | |
| 1240 | 1218 | |
| 1241 | 1219 | <?php readfile( __DIR__ . '/frm_grids.css' ); ?> |
| 1242 | 1220 | |
| 1243 | -<?php if ( $pro_is_installed ) { ?> | |
| 1244 | 1221 | .frm_conf_field.frm_left_container .frm_primary_label{ |
| 1245 | 1222 | display:none; |
| 1246 | 1223 | } |
| 1247 | -<?php } ?> | |
| 1248 | 1224 | |
| 1249 | -<?php if ( $pro_is_installed ) { ?> | |
| 1250 | 1225 | .wp-editor-wrap *, |
| 1251 | 1226 | .wp-editor-wrap *:after, |
| 1252 | 1227 | .wp-editor-wrap *:before{ |
| 1253 | 1228 | box-sizing:content-box; |
| 1254 | 1229 | } |
| 1255 | -<?php } ?> | |
| 1256 | 1230 | |
| 1257 | 1231 | .with_frm_style .frm_grid, |
| 1258 | 1232 | .with_frm_style .frm_grid_first, |
| 1259 | 1233 | .with_frm_style .frm_grid_odd{ |
| @@ -1364,8 +1338,105 @@ | ||
| 1364 | 1338 | .frm_grid_odd .frm_checkbox{ |
| 1365 | 1339 | display:inline; |
| 1366 | 1340 | } |
| 1367 | 1341 | |
| 1342 | +.frm_grid_2 .frm_radio, | |
| 1343 | +.frm_grid_2 .frm_checkbox, | |
| 1344 | +.frm_grid_2 .frm_primary_label{ | |
| 1345 | + width:48% !important; | |
| 1346 | +} | |
| 1347 | + | |
| 1348 | +.frm_grid_2 .frm_radio, | |
| 1349 | +.frm_grid_2 .frm_checkbox{ | |
| 1350 | + margin-right:4%; | |
| 1351 | +} | |
| 1352 | + | |
| 1353 | +.frm_grid_3 .frm_radio, | |
| 1354 | +.frm_grid_3 .frm_checkbox, | |
| 1355 | +.frm_grid_3 .frm_primary_label{ | |
| 1356 | + width:30% !important; | |
| 1357 | +} | |
| 1358 | + | |
| 1359 | +.frm_grid_3 .frm_radio, | |
| 1360 | +.frm_grid_3 .frm_checkbox{ | |
| 1361 | + margin-right:3%; | |
| 1362 | +} | |
| 1363 | + | |
| 1364 | +.frm_grid_4 .frm_radio, | |
| 1365 | +.frm_grid_4 .frm_checkbox{ | |
| 1366 | + width:20% !important; | |
| 1367 | +} | |
| 1368 | + | |
| 1369 | +.frm_grid_4 .frm_primary_label{ | |
| 1370 | + width:28% !important; | |
| 1371 | +} | |
| 1372 | + | |
| 1373 | +.frm_grid_4 .frm_radio, | |
| 1374 | +.frm_grid_4 .frm_checkbox{ | |
| 1375 | + margin-right:4%; | |
| 1376 | +} | |
| 1377 | + | |
| 1378 | +.frm_grid_5 .frm_primary_label, | |
| 1379 | +.frm_grid_7 .frm_primary_label{ | |
| 1380 | + width:24% !important; | |
| 1381 | +} | |
| 1382 | + | |
| 1383 | +.frm_grid_5 .frm_radio, | |
| 1384 | +.frm_grid_5 .frm_checkbox{ | |
| 1385 | + width:17% !important; | |
| 1386 | + margin-right:2%; | |
| 1387 | +} | |
| 1388 | + | |
| 1389 | +.frm_grid_6 .frm_primary_label{ | |
| 1390 | + width:25% !important; | |
| 1391 | +} | |
| 1392 | + | |
| 1393 | +.frm_grid_6 .frm_radio, | |
| 1394 | +.frm_grid_6 .frm_checkbox{ | |
| 1395 | + width:14% !important; | |
| 1396 | + margin-right:1%; | |
| 1397 | +} | |
| 1398 | + | |
| 1399 | +.frm_grid_7 .frm_primary_label{ | |
| 1400 | + width:22% !important; | |
| 1401 | +} | |
| 1402 | + | |
| 1403 | +.frm_grid_7 .frm_radio, | |
| 1404 | +.frm_grid_7 .frm_checkbox{ | |
| 1405 | + width:12% !important; | |
| 1406 | + margin-right:1%; | |
| 1407 | +} | |
| 1408 | + | |
| 1409 | +.frm_grid_8 .frm_primary_label{ | |
| 1410 | + width:23% !important; | |
| 1411 | +} | |
| 1412 | + | |
| 1413 | +.frm_grid_8 .frm_radio, | |
| 1414 | +.frm_grid_8 .frm_checkbox{ | |
| 1415 | + width:10% !important; | |
| 1416 | + margin-right:1%; | |
| 1417 | +} | |
| 1418 | + | |
| 1419 | +.frm_grid_9 .frm_primary_label{ | |
| 1420 | + width:20% !important; | |
| 1421 | +} | |
| 1422 | + | |
| 1423 | +.frm_grid_9 .frm_radio, | |
| 1424 | +.frm_grid_9 .frm_checkbox{ | |
| 1425 | + width:9% !important; | |
| 1426 | + margin-right:1%; | |
| 1427 | +} | |
| 1428 | + | |
| 1429 | +.frm_grid_10 .frm_primary_label{ | |
| 1430 | + width:19% !important; | |
| 1431 | +} | |
| 1432 | + | |
| 1433 | +.frm_grid_10 .frm_radio, | |
| 1434 | +.frm_grid_10 .frm_checkbox{ | |
| 1435 | + width:8% !important; | |
| 1436 | + margin-right:1%; | |
| 1437 | +} | |
| 1438 | + | |
| 1368 | 1439 | .frm_form_field.frm_inline_container .frm_opt_container, |
| 1369 | 1440 | .frm_form_field.frm_right_container .frm_opt_container, |
| 1370 | 1441 | .frm_form_field.frm_left_container .frm_opt_container{ |
| 1371 | 1442 | padding-top:4px; |
| @@ -1512,9 +1583,8 @@ | ||
| 1512 | 1583 | /** |
| 1513 | 1584 | * Call action so other plugins can add additional CSS. |
| 1514 | 1585 | * |
| 1515 | 1586 | * @param array $args { |
| 1516 | - * | |
| 1517 | 1587 | * @type array $defaults |
| 1518 | 1588 | * } |
| 1519 | 1589 | */ |
| 1520 | 1590 | do_action( 'frm_include_front_css', compact( 'defaults' ) ); |
| @@ -1521,9 +1591,8 @@ | ||
| 1521 | 1591 | ?> |
| 1522 | 1592 | |
| 1523 | 1593 | /* Responsive */ |
| 1524 | 1594 | |
| 1525 | -<?php if ( $pro_is_installed ) { ?> | |
| 1526 | 1595 | @media only screen and (max-width: 900px) { |
| 1527 | 1596 | .frm_form_field .frm_repeat_grid .frm_form_field.frm_sixth .frm_primary_label, |
| 1528 | 1597 | .frm_form_field .frm_repeat_grid .frm_form_field.frm_seventh .frm_primary_label, |
| 1529 | 1598 | .frm_form_field .frm_repeat_grid .frm_form_field.frm_eighth .frm_primary_label{ |
| @@ -1529,9 +1598,8 @@ | ||
| 1529 | 1598 | .frm_form_field .frm_repeat_grid .frm_form_field.frm_eighth .frm_primary_label{ |
| 1530 | 1599 | display: block !important; |
| 1531 | 1600 | } |
| 1532 | 1601 | } |
| 1533 | -<?php } ?> | |
| 1534 | 1602 | |
| 1535 | 1603 | @media only screen and (max-width: 600px) { |
| 1536 | 1604 | .frm_form_field.frm_four_col .frm_opt_container{ |
| 1537 | 1605 | grid-template-columns: repeat(2, 1fr); |
| @@ -1536,14 +1604,12 @@ | ||
| 1536 | 1604 | .frm_form_field.frm_four_col .frm_opt_container{ |
| 1537 | 1605 | grid-template-columns: repeat(2, 1fr); |
| 1538 | 1606 | } |
| 1539 | 1607 | |
| 1540 | - <?php if ( $pro_is_installed ) { ?> | |
| 1541 | 1608 | .with_frm_style .frm_repeat_inline, |
| 1542 | 1609 | .with_frm_style .frm_repeat_grid{ |
| 1543 | 1610 | margin: 20px 0; |
| 1544 | 1611 | } |
| 1545 | - <?php } ?> | |
| 1546 | 1612 | } |
| 1547 | 1613 | |
| 1548 | 1614 | @media only screen and (max-width: 500px) { |
| 1549 | 1615 | .frm_form_field.frm_two_col .frm_radio, |
| @@ -1584,9 +1650,5 @@ | ||
| 1584 | 1650 | margin: 0; |
| 1585 | 1651 | } |
| 1586 | 1652 | <?php |
| 1587 | 1653 | |
| 1588 | -$frm_custom_css = strip_tags( FrmStylesController::get_custom_css() ); | |
| 1589 | - | |
| 1590 | -if ( $frm_custom_css ) { | |
| 1591 | - echo FrmStylesHelper::maybe_scope_css_for_admin( $frm_custom_css ) . PHP_EOL; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped | |
| 1592 | -} | |
| 1654 | +echo strip_tags( FrmStylesController::get_custom_css() ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped | |