| @@ -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( $css, 'all' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped | |
| 10 | + echo strip_tags( FrmStylesHelper::maybe_scope_custom_css_in_cached_output( $css ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped | |
| 11 | 11 | FrmStylesController::maybe_hide_sample_form_error_message(); |
| 12 | 12 | die(); |
| 13 | 13 | } |
| 14 | 14 | } |
| @@ -18,13 +18,19 @@ | ||
| 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'; | |
| 24 | 22 | $pro_is_installed = FrmAppHelper::pro_is_installed(); |
| 25 | -$use_chosen_js = FrmStylesHelper::use_chosen_js(); | |
| 26 | 23 | |
| 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 | + | |
| 27 | 33 | ?> |
| 28 | 34 | .with_frm_style{ |
| 29 | 35 | <?php FrmStylesHelper::output_vars( $defaults ); ?> |
| 30 | 36 | } |
| @@ -142,13 +148,14 @@ | ||
| 142 | 148 | color: var(--form-desc-color)<?php echo esc_html( $important ); ?>; |
| 143 | 149 | <?php } ?> |
| 144 | 150 | } |
| 145 | 151 | |
| 152 | +.with_frm_style .frm_form_field.frm_html_container{ | |
| 146 | 153 | <?php if ( ! empty( $defaults['form_desc_size'] ) ) { ?> |
| 147 | -.with_frm_style .frm_form_field.frm_html_container{ | |
| 148 | 154 | font-size: var(--form-desc-size)<?php echo esc_html( $important ); ?>; |
| 155 | +<?php } ?> | |
| 156 | + overflow-wrap: break-word<?php echo esc_html( $important ); ?>; | |
| 149 | 157 | } |
| 150 | -<?php } ?> | |
| 151 | 158 | |
| 152 | 159 | .with_frm_style .frm_form_field .frm_show_it{ |
| 153 | 160 | <?php if ( ! empty( $defaults['field_font_size'] ) ) { ?> |
| 154 | 161 | font-size: var(--field-font-size)<?php echo esc_html( $important ); ?>; |
| @@ -191,8 +198,14 @@ | ||
| 191 | 198 | vertical-align:top; |
| 192 | 199 | height:auto; |
| 193 | 200 | } |
| 194 | 201 | |
| 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 } ?> | |
| 195 | 208 | .with_frm_style input[type=text], |
| 196 | 209 | .with_frm_style input[type=password], |
| 197 | 210 | .with_frm_style input[type=email], |
| 198 | 211 | .with_frm_style input[type=number], |
| @@ -205,14 +218,9 @@ | ||
| 205 | 218 | .frm_form_fields_style, |
| 206 | 219 | .with_frm_style .frm_scroll_box .frm_opt_container, |
| 207 | 220 | .frm_form_fields_active_style, |
| 208 | 221 | .frm_form_fields_error_style, |
| 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 { | |
| 222 | +.with_frm_style .frm-card-element.StripeElement { | |
| 215 | 223 | color: var(--text-color)<?php echo esc_html( $important ); ?>; |
| 216 | 224 | background-color: var(--bg-color)<?php echo esc_html( $important ); ?>; |
| 217 | 225 | border-color: var(--border-color)<?php echo esc_html( $important ); ?>; |
| 218 | 226 | border-width: var(--field-border-width)<?php echo esc_html( $important ); ?>; |
| @@ -226,9 +234,14 @@ | ||
| 226 | 234 | outline: none<?php echo esc_html( $important ); ?>; |
| 227 | 235 | font-weight: var(--field-weight); |
| 228 | 236 | } |
| 229 | 237 | |
| 230 | -<?php if ( ! empty( $important ) ) : ?> | |
| 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 ) : ?> | |
| 231 | 244 | <?php if ( $use_chosen_js ) { ?> |
| 232 | 245 | .with_frm_style .chosen-container-multi .chosen-choices, |
| 233 | 246 | .with_frm_style .chosen-container-single .chosen-single, |
| 234 | 247 | <?php } ?> |
| @@ -319,8 +332,9 @@ | ||
| 319 | 332 | .with_frm_style input[type=file].frm_transparent{ |
| 320 | 333 | color:transparent<?php echo esc_html( $important ); ?>; |
| 321 | 334 | } |
| 322 | 335 | |
| 336 | +<?php if ( $pro_is_installed ) { ?> | |
| 323 | 337 | .with_frm_style .wp-editor-wrap{ |
| 324 | 338 | width: var(--field-width)<?php echo esc_html( $important ); ?>; |
| 325 | 339 | max-width:100%; |
| 326 | 340 | } |
| @@ -332,8 +346,9 @@ | ||
| 332 | 346 | |
| 333 | 347 | .with_frm_style .mceIframeContainer{ |
| 334 | 348 | background-color: var(--bg-color)<?php echo esc_html( $important ); ?>; |
| 335 | 349 | } |
| 350 | +<?php } ?> | |
| 336 | 351 | |
| 337 | 352 | .with_frm_style select{ |
| 338 | 353 | width: var(--auto-width)<?php echo esc_html( $important ); ?>; |
| 339 | 354 | max-width:100%; |
| @@ -413,11 +428,13 @@ | ||
| 413 | 428 | .frm_none_container .frm_primary_label{ |
| 414 | 429 | display:none; |
| 415 | 430 | } |
| 416 | 431 | |
| 432 | +<?php if ( $pro_is_installed ) { ?> | |
| 417 | 433 | .with_frm_style .frm_section_heading.frm_hide_section{ |
| 418 | 434 | margin-top:0 !important; |
| 419 | 435 | } |
| 436 | +<?php } ?> | |
| 420 | 437 | |
| 421 | 438 | .with_frm_style .frm_hidden_container .frm_primary_label, |
| 422 | 439 | .with_frm_style .frm_pos_hidden, |
| 423 | 440 | .frm_hidden_container .frm_primary_label{ |
| @@ -501,9 +518,9 @@ | ||
| 501 | 518 | .with_frm_style .frm_pro_max_limit_desc{ |
| 502 | 519 | clear:both; |
| 503 | 520 | } |
| 504 | 521 | |
| 505 | -.with_frm_style input[type=number][readonly]{ | |
| 522 | +.with_frm_style input[type=number][readonly] { | |
| 506 | 523 | -moz-appearance: textfield; |
| 507 | 524 | } |
| 508 | 525 | |
| 509 | 526 | .with_frm_style select[multiple="multiple"]{ |
| @@ -510,8 +527,9 @@ | ||
| 510 | 527 | height:auto; |
| 511 | 528 | line-height:normal; |
| 512 | 529 | } |
| 513 | 530 | |
| 531 | +<?php if ( $pro_is_installed ) { ?> | |
| 514 | 532 | .with_frm_style .frm_catlevel_2, |
| 515 | 533 | .with_frm_style .frm_catlevel_3, |
| 516 | 534 | .with_frm_style .frm_catlevel_4, |
| 517 | 535 | .with_frm_style .frm_catlevel_5{ |
| @@ -516,9 +534,11 @@ | ||
| 516 | 534 | .with_frm_style .frm_catlevel_4, |
| 517 | 535 | .with_frm_style .frm_catlevel_5{ |
| 518 | 536 | margin-left:18px; |
| 519 | 537 | } |
| 538 | +<?php } ?> | |
| 520 | 539 | |
| 540 | +<?php if ( $pro_is_installed ) { ?> | |
| 521 | 541 | .with_frm_style .wp-editor-container{ |
| 522 | 542 | border:1px solid #e5e5e5; |
| 523 | 543 | } |
| 524 | 544 | |
| @@ -528,8 +548,9 @@ | ||
| 528 | 548 | |
| 529 | 549 | .with_frm_style .wp-editor-container textarea{ |
| 530 | 550 | border:none; |
| 531 | 551 | } |
| 552 | +<?php } ?> | |
| 532 | 553 | |
| 533 | 554 | .with_frm_style .auto_width #loginform input, |
| 534 | 555 | .with_frm_style .auto_width input, |
| 535 | 556 | .with_frm_style input.auto_width, |
| @@ -537,11 +558,13 @@ | ||
| 537 | 558 | .with_frm_style textarea.auto_width{ |
| 538 | 559 | width:auto<?php echo esc_html( $important ); ?>; |
| 539 | 560 | } |
| 540 | 561 | |
| 562 | +<?php if ( $pro_is_installed ) { ?> | |
| 541 | 563 | .with_frm_style .frm_repeat_buttons{ |
| 542 | 564 | white-space:nowrap; |
| 543 | 565 | } |
| 566 | +<?php } ?> | |
| 544 | 567 | |
| 545 | 568 | .with_frm_style .frm_button{ |
| 546 | 569 | text-decoration:none !important; |
| 547 | 570 | border:1px solid #eee; |
| @@ -551,9 +574,8 @@ | ||
| 551 | 574 | <?php } else { ?> |
| 552 | 575 | padding:5px; |
| 553 | 576 | <?php } ?> |
| 554 | 577 | <?php if ( ! empty( $defaults['border_radius'] ) ) { ?> |
| 555 | - border-radius:<?php echo esc_html( $defaults['border_radius'] . $important ); ?>; | |
| 556 | 578 | border-radius:var(--border-radius)<?php echo esc_html( $important ); ?>; |
| 557 | 579 | <?php } ?> |
| 558 | 580 | <?php if ( ! empty( $defaults['submit_font_size'] ) ) { ?> |
| 559 | 581 | font-size: var(--submit-font-size)<?php echo esc_html( $important ); ?>; |
| @@ -638,9 +660,11 @@ | ||
| 638 | 660 | .with_frm_style.frm_center_submit .frm_submit button{ |
| 639 | 661 | margin-bottom:8px !important; |
| 640 | 662 | } |
| 641 | 663 | |
| 664 | +<?php if ( $pro_is_installed ) { ?> | |
| 642 | 665 | .with_frm_style .frm-edit-page-btn, |
| 666 | +<?php } ?> | |
| 643 | 667 | .with_frm_style .frm_submit input[type=submit], |
| 644 | 668 | .with_frm_style .frm_submit input[type=button], |
| 645 | 669 | .with_frm_style .frm_submit button{ |
| 646 | 670 | -webkit-appearance: none; |
| @@ -657,9 +681,11 @@ | ||
| 657 | 681 | /* keep this for reverse compatibility for old HTML */ |
| 658 | 682 | visibility:visible !important; |
| 659 | 683 | } |
| 660 | 684 | |
| 685 | +<?php if ( $pro_is_installed ) { ?> | |
| 661 | 686 | .with_frm_style .frm_loading_prev .frm_prev_page, |
| 687 | +<?php } ?> | |
| 662 | 688 | .with_frm_style .frm_loading_form .frm_button_submit { |
| 663 | 689 | position: relative; |
| 664 | 690 | color: transparent !important; |
| 665 | 691 | text-shadow: none !important; |
| @@ -664,11 +690,13 @@ | ||
| 664 | 690 | color: transparent !important; |
| 665 | 691 | text-shadow: none !important; |
| 666 | 692 | } |
| 667 | 693 | |
| 694 | +<?php if ( $pro_is_installed ) { ?> | |
| 668 | 695 | .with_frm_style .frm_loading_prev .frm_prev_page:hover, |
| 669 | 696 | .with_frm_style .frm_loading_prev .frm_prev_page:active, |
| 670 | 697 | .with_frm_style .frm_loading_prev .frm_prev_page:focus, |
| 698 | +<?php } ?> | |
| 671 | 699 | .with_frm_style .frm_loading_form .frm_button_submit:hover, |
| 672 | 700 | .with_frm_style .frm_loading_form .frm_button_submit:active, |
| 673 | 701 | .with_frm_style .frm_loading_form .frm_button_submit:focus { |
| 674 | 702 | cursor: not-allowed; |
| @@ -676,9 +704,11 @@ | ||
| 676 | 704 | outline: none !important; |
| 677 | 705 | box-shadow: none; |
| 678 | 706 | } |
| 679 | 707 | |
| 708 | +<?php if ( $pro_is_installed ) { ?> | |
| 680 | 709 | .with_frm_style .frm_loading_prev .frm_prev_page::before, |
| 710 | +<?php } ?> | |
| 681 | 711 | .with_frm_style .frm_loading_form .frm_button_submit:before { |
| 682 | 712 | content: ''; |
| 683 | 713 | display: inline-block; |
| 684 | 714 | position: absolute; |
| @@ -702,11 +732,13 @@ | ||
| 702 | 732 | align-items: center; |
| 703 | 733 | gap: 2%; |
| 704 | 734 | } |
| 705 | 735 | |
| 736 | +<?php if ( $pro_is_installed ) { ?> | |
| 706 | 737 | .with_frm_style .frm_submit.frm_flex button.frm_button_submit ~ .frm_prev_page { |
| 707 | 738 | order: -1; |
| 708 | 739 | } |
| 740 | +<?php } ?> | |
| 709 | 741 | |
| 710 | 742 | <?php |
| 711 | 743 | foreach ( $styles as $style ) { |
| 712 | 744 | include __DIR__ . '/_single_theme.css.php'; |
| @@ -713,9 +745,9 @@ | ||
| 713 | 745 | unset( $style ); |
| 714 | 746 | } |
| 715 | 747 | |
| 716 | 748 | // Set it again since it may have been overridden. |
| 717 | -$important = empty( $defaults['important_style'] ) ? '' : ' !important'; | |
| 749 | +$important = ! empty( $defaults['important_style'] ) ? ' !important' : ''; | |
| 718 | 750 | ?> |
| 719 | 751 | |
| 720 | 752 | .frm_ajax_loading{ |
| 721 | 753 | visibility:hidden; |
| @@ -729,16 +761,18 @@ | ||
| 729 | 761 | a.frm_save_draft{ |
| 730 | 762 | cursor:pointer; |
| 731 | 763 | } |
| 732 | 764 | |
| 765 | +<?php if ( $pro_is_installed ) { ?> | |
| 733 | 766 | .with_frm_style a.frm_save_draft, |
| 734 | 767 | .with_frm_style a.frm_start_over{ |
| 735 | -<?php if ( ! empty( $defaults['font'] ) ) { ?> | |
| 768 | + <?php if ( ! empty( $defaults['font'] ) ) { ?> | |
| 736 | 769 | font-family: var(--font); |
| 737 | 770 | <?php } ?> |
| 738 | 771 | font-size: var(--submit-font-size); |
| 739 | 772 | font-weight: var(--submit-weight); |
| 740 | 773 | } |
| 774 | +<?php } ?> | |
| 741 | 775 | |
| 742 | 776 | .horizontal_radio .frm_radio{ |
| 743 | 777 | margin:0 5px 0 0; |
| 744 | 778 | } |
| @@ -1042,8 +1076,9 @@ | ||
| 1042 | 1076 | .frm-alt-table tr:nth-child(even) { |
| 1043 | 1077 | background-color:<?php echo esc_html( FrmStylesHelper::adjust_brightness( $defaults['border_color'], 45 ) ); ?>; |
| 1044 | 1078 | } |
| 1045 | 1079 | |
| 1080 | +<?php if ( $pro_is_installed ) { ?> | |
| 1046 | 1081 | table.form_results.with_frm_style{ |
| 1047 | 1082 | border-style: solid; |
| 1048 | 1083 | border-width: var(--field-border-width)<?php echo esc_html( $important ); ?>; |
| 1049 | 1084 | border-color: var(--border-color)<?php echo esc_html( $important ); ?>; |
| @@ -1051,17 +1086,18 @@ | ||
| 1051 | 1086 | |
| 1052 | 1087 | table.form_results.with_frm_style tr td{ |
| 1053 | 1088 | text-align:left; |
| 1054 | 1089 | padding:7px 9px; |
| 1055 | -<?php if ( ! empty( $defaults['text_color'] ) ) { ?> | |
| 1090 | + <?php if ( ! empty( $defaults['text_color'] ) ) { ?> | |
| 1056 | 1091 | color: var(--text-color)<?php echo esc_html( $important ); ?>; |
| 1057 | 1092 | <?php } ?> |
| 1058 | -<?php if ( ! empty( $defaults['border_color'] ) ) { ?> | |
| 1093 | + <?php if ( ! empty( $defaults['border_color'] ) ) { ?> | |
| 1059 | 1094 | border-top-style: solid; |
| 1060 | 1095 | border-top-width: var(--field-border-width)<?php echo esc_html( $important ); ?>; |
| 1061 | 1096 | border-top-color: var(--border-color)<?php echo esc_html( $important ); ?>; |
| 1062 | 1097 | <?php } ?> |
| 1063 | 1098 | } |
| 1099 | +<?php } ?> | |
| 1064 | 1100 | |
| 1065 | 1101 | table.form_results.with_frm_style tr.frm_even, |
| 1066 | 1102 | .frm-grid .frm_even{ |
| 1067 | 1103 | background-color:#fff; |
| @@ -1080,18 +1116,23 @@ | ||
| 1080 | 1116 | background-color:<?php echo esc_html( FrmStylesHelper::adjust_brightness( $defaults['border_color'], 45 ) ); ?>; |
| 1081 | 1117 | padding: 40px; |
| 1082 | 1118 | } |
| 1083 | 1119 | |
| 1120 | + <?php if ( $pro_is_installed ) { ?> | |
| 1084 | 1121 | .with_frm_style .frm-show-form .frm_color_block.frm_section_heading h3, |
| 1085 | 1122 | .frm_color_block.frm_section_heading h3 { |
| 1086 | 1123 | border-width: 0 !important; |
| 1087 | 1124 | } |
| 1125 | + <?php } ?> | |
| 1088 | 1126 | <?php } ?> |
| 1089 | 1127 | |
| 1128 | +<?php if ( $pro_is_installed ) { ?> | |
| 1090 | 1129 | .frm_collapse .ui-icon{ |
| 1091 | 1130 | display:inline-block; |
| 1092 | 1131 | } |
| 1132 | +<?php } ?> | |
| 1093 | 1133 | |
| 1134 | +<?php if ( $pro_is_installed ) { ?> | |
| 1094 | 1135 | .frm_toggle_container{ |
| 1095 | 1136 | /* Prevent the slide and bounce */ |
| 1096 | 1137 | border:1px solid transparent; |
| 1097 | 1138 | } |
| @@ -1108,9 +1149,11 @@ | ||
| 1108 | 1149 | |
| 1109 | 1150 | .frm_toggle_container .frm_month_listing{ |
| 1110 | 1151 | margin-left:40px; |
| 1111 | 1152 | } |
| 1153 | +<?php } ?> | |
| 1112 | 1154 | |
| 1155 | +<?php if ( $pro_is_installed ) { ?> | |
| 1113 | 1156 | #frm_loading{ |
| 1114 | 1157 | display:none; |
| 1115 | 1158 | position:fixed; |
| 1116 | 1159 | top:0; |
| @@ -1153,11 +1196,11 @@ | ||
| 1153 | 1196 | #frm_loading .progress.active .progress-bar{ |
| 1154 | 1197 | animation:2s linear 0s normal none infinite progress-bar-stripes; |
| 1155 | 1198 | } |
| 1156 | 1199 | |
| 1157 | -<?php if ( ! empty( $defaults['bg_color'] ) ) { ?> | |
| 1200 | + <?php if ( ! empty( $defaults['bg_color'] ) ) { ?> | |
| 1158 | 1201 | #frm_loading .progress-striped .progress-bar { |
| 1159 | - <?php if ( ! empty( $defaults['border_color'] ) ) { ?> | |
| 1202 | + <?php if ( ! empty( $defaults['border_color'] ) ) { ?> | |
| 1160 | 1203 | 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)); |
| 1161 | 1204 | <?php } ?> |
| 1162 | 1205 | background-size:40px 40px; |
| 1163 | 1206 | } |
| @@ -1172,8 +1215,11 @@ | ||
| 1172 | 1215 | text-align: center; |
| 1173 | 1216 | transition: width 0.6s ease 0s; |
| 1174 | 1217 | width: 100%; |
| 1175 | 1218 | } |
| 1219 | + <?php | |
| 1220 | +}//end if | |
| 1221 | +?> | |
| 1176 | 1222 | |
| 1177 | 1223 | .frm_image_from_url{ |
| 1178 | 1224 | height:50px; |
| 1179 | 1225 | } |
| @@ -1182,8 +1228,9 @@ | ||
| 1182 | 1228 | background:url(../images/ajax_loader.gif) no-repeat center center; |
| 1183 | 1229 | padding:6px 12px; |
| 1184 | 1230 | } |
| 1185 | 1231 | |
| 1232 | +<?php if ( $pro_is_installed ) { ?> | |
| 1186 | 1233 | select.frm_loading_lookup{ |
| 1187 | 1234 | background-image: url(../images/ajax_loader.gif) !important; |
| 1188 | 1235 | background-position: 10px; |
| 1189 | 1236 | background-repeat: no-repeat; |
| @@ -1188,20 +1235,25 @@ | ||
| 1188 | 1235 | background-position: 10px; |
| 1189 | 1236 | background-repeat: no-repeat; |
| 1190 | 1237 | color: transparent !important; |
| 1191 | 1238 | } |
| 1239 | +<?php } ?> | |
| 1192 | 1240 | |
| 1193 | 1241 | <?php readfile( __DIR__ . '/frm_grids.css' ); ?> |
| 1194 | 1242 | |
| 1243 | +<?php if ( $pro_is_installed ) { ?> | |
| 1195 | 1244 | .frm_conf_field.frm_left_container .frm_primary_label{ |
| 1196 | 1245 | display:none; |
| 1197 | 1246 | } |
| 1247 | +<?php } ?> | |
| 1198 | 1248 | |
| 1249 | +<?php if ( $pro_is_installed ) { ?> | |
| 1199 | 1250 | .wp-editor-wrap *, |
| 1200 | 1251 | .wp-editor-wrap *:after, |
| 1201 | 1252 | .wp-editor-wrap *:before{ |
| 1202 | 1253 | box-sizing:content-box; |
| 1203 | 1254 | } |
| 1255 | +<?php } ?> | |
| 1204 | 1256 | |
| 1205 | 1257 | .with_frm_style .frm_grid, |
| 1206 | 1258 | .with_frm_style .frm_grid_first, |
| 1207 | 1259 | .with_frm_style .frm_grid_odd{ |
| @@ -1312,105 +1364,8 @@ | ||
| 1312 | 1364 | .frm_grid_odd .frm_checkbox{ |
| 1313 | 1365 | display:inline; |
| 1314 | 1366 | } |
| 1315 | 1367 | |
| 1316 | -.frm_grid_2 .frm_radio, | |
| 1317 | -.frm_grid_2 .frm_checkbox, | |
| 1318 | -.frm_grid_2 .frm_primary_label{ | |
| 1319 | - width:48% !important; | |
| 1320 | -} | |
| 1321 | - | |
| 1322 | -.frm_grid_2 .frm_radio, | |
| 1323 | -.frm_grid_2 .frm_checkbox{ | |
| 1324 | - margin-right:4%; | |
| 1325 | -} | |
| 1326 | - | |
| 1327 | -.frm_grid_3 .frm_radio, | |
| 1328 | -.frm_grid_3 .frm_checkbox, | |
| 1329 | -.frm_grid_3 .frm_primary_label{ | |
| 1330 | - width:30% !important; | |
| 1331 | -} | |
| 1332 | - | |
| 1333 | -.frm_grid_3 .frm_radio, | |
| 1334 | -.frm_grid_3 .frm_checkbox{ | |
| 1335 | - margin-right:3%; | |
| 1336 | -} | |
| 1337 | - | |
| 1338 | -.frm_grid_4 .frm_radio, | |
| 1339 | -.frm_grid_4 .frm_checkbox{ | |
| 1340 | - width:20% !important; | |
| 1341 | -} | |
| 1342 | - | |
| 1343 | -.frm_grid_4 .frm_primary_label{ | |
| 1344 | - width:28% !important; | |
| 1345 | -} | |
| 1346 | - | |
| 1347 | -.frm_grid_4 .frm_radio, | |
| 1348 | -.frm_grid_4 .frm_checkbox{ | |
| 1349 | - margin-right:4%; | |
| 1350 | -} | |
| 1351 | - | |
| 1352 | -.frm_grid_5 .frm_primary_label, | |
| 1353 | -.frm_grid_7 .frm_primary_label{ | |
| 1354 | - width:24% !important; | |
| 1355 | -} | |
| 1356 | - | |
| 1357 | -.frm_grid_5 .frm_radio, | |
| 1358 | -.frm_grid_5 .frm_checkbox{ | |
| 1359 | - width:17% !important; | |
| 1360 | - margin-right:2%; | |
| 1361 | -} | |
| 1362 | - | |
| 1363 | -.frm_grid_6 .frm_primary_label{ | |
| 1364 | - width:25% !important; | |
| 1365 | -} | |
| 1366 | - | |
| 1367 | -.frm_grid_6 .frm_radio, | |
| 1368 | -.frm_grid_6 .frm_checkbox{ | |
| 1369 | - width:14% !important; | |
| 1370 | - margin-right:1%; | |
| 1371 | -} | |
| 1372 | - | |
| 1373 | -.frm_grid_7 .frm_primary_label{ | |
| 1374 | - width:22% !important; | |
| 1375 | -} | |
| 1376 | - | |
| 1377 | -.frm_grid_7 .frm_radio, | |
| 1378 | -.frm_grid_7 .frm_checkbox{ | |
| 1379 | - width:12% !important; | |
| 1380 | - margin-right:1%; | |
| 1381 | -} | |
| 1382 | - | |
| 1383 | -.frm_grid_8 .frm_primary_label{ | |
| 1384 | - width:23% !important; | |
| 1385 | -} | |
| 1386 | - | |
| 1387 | -.frm_grid_8 .frm_radio, | |
| 1388 | -.frm_grid_8 .frm_checkbox{ | |
| 1389 | - width:10% !important; | |
| 1390 | - margin-right:1%; | |
| 1391 | -} | |
| 1392 | - | |
| 1393 | -.frm_grid_9 .frm_primary_label{ | |
| 1394 | - width:20% !important; | |
| 1395 | -} | |
| 1396 | - | |
| 1397 | -.frm_grid_9 .frm_radio, | |
| 1398 | -.frm_grid_9 .frm_checkbox{ | |
| 1399 | - width:9% !important; | |
| 1400 | - margin-right:1%; | |
| 1401 | -} | |
| 1402 | - | |
| 1403 | -.frm_grid_10 .frm_primary_label{ | |
| 1404 | - width:19% !important; | |
| 1405 | -} | |
| 1406 | - | |
| 1407 | -.frm_grid_10 .frm_radio, | |
| 1408 | -.frm_grid_10 .frm_checkbox{ | |
| 1409 | - width:8% !important; | |
| 1410 | - margin-right:1%; | |
| 1411 | -} | |
| 1412 | - | |
| 1413 | 1368 | .frm_form_field.frm_inline_container .frm_opt_container, |
| 1414 | 1369 | .frm_form_field.frm_right_container .frm_opt_container, |
| 1415 | 1370 | .frm_form_field.frm_left_container .frm_opt_container{ |
| 1416 | 1371 | padding-top:4px; |
| @@ -1566,8 +1521,9 @@ | ||
| 1566 | 1521 | ?> |
| 1567 | 1522 | |
| 1568 | 1523 | /* Responsive */ |
| 1569 | 1524 | |
| 1525 | +<?php if ( $pro_is_installed ) { ?> | |
| 1570 | 1526 | @media only screen and (max-width: 900px) { |
| 1571 | 1527 | .frm_form_field .frm_repeat_grid .frm_form_field.frm_sixth .frm_primary_label, |
| 1572 | 1528 | .frm_form_field .frm_repeat_grid .frm_form_field.frm_seventh .frm_primary_label, |
| 1573 | 1529 | .frm_form_field .frm_repeat_grid .frm_form_field.frm_eighth .frm_primary_label{ |
| @@ -1573,8 +1529,9 @@ | ||
| 1573 | 1529 | .frm_form_field .frm_repeat_grid .frm_form_field.frm_eighth .frm_primary_label{ |
| 1574 | 1530 | display: block !important; |
| 1575 | 1531 | } |
| 1576 | 1532 | } |
| 1533 | +<?php } ?> | |
| 1577 | 1534 | |
| 1578 | 1535 | @media only screen and (max-width: 600px) { |
| 1579 | 1536 | .frm_form_field.frm_four_col .frm_opt_container{ |
| 1580 | 1537 | grid-template-columns: repeat(2, 1fr); |
| @@ -1579,12 +1536,14 @@ | ||
| 1579 | 1536 | .frm_form_field.frm_four_col .frm_opt_container{ |
| 1580 | 1537 | grid-template-columns: repeat(2, 1fr); |
| 1581 | 1538 | } |
| 1582 | 1539 | |
| 1540 | + <?php if ( $pro_is_installed ) { ?> | |
| 1583 | 1541 | .with_frm_style .frm_repeat_inline, |
| 1584 | 1542 | .with_frm_style .frm_repeat_grid{ |
| 1585 | 1543 | margin: 20px 0; |
| 1586 | 1544 | } |
| 1545 | + <?php } ?> | |
| 1587 | 1546 | } |
| 1588 | 1547 | |
| 1589 | 1548 | @media only screen and (max-width: 500px) { |
| 1590 | 1549 | .frm_form_field.frm_two_col .frm_radio, |
| @@ -1625,5 +1584,9 @@ | ||
| 1625 | 1584 | margin: 0; |
| 1626 | 1585 | } |
| 1627 | 1586 | <?php |
| 1628 | 1587 | |
| 1629 | -echo strip_tags( FrmStylesController::get_custom_css() ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped | |
| 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 | +} | |