| @@ -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 | } |
| @@ -16,14 +16,12 @@ | ||
| 16 | 16 | if ( ! isset( $frm_style ) ) { |
| 17 | 17 | $frm_style = new FrmStyle(); |
| 18 | 18 | } |
| 19 | 19 | |
| 20 | -$styles = $frm_style->get_all(); | |
| 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 | -$pro_is_installed = FrmAppHelper::pro_is_installed(); | |
| 25 | -$use_chosen_js = FrmStylesHelper::use_chosen_js(); | |
| 20 | +$styles = $frm_style->get_all(); | |
| 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'; | |
| 26 | 24 | |
| 27 | 25 | ?> |
| 28 | 26 | .with_frm_style{ |
| 29 | 27 | <?php FrmStylesHelper::output_vars( $defaults ); ?> |
| @@ -38,9 +36,10 @@ | ||
| 38 | 36 | |
| 39 | 37 | .with_frm_style, |
| 40 | 38 | .with_frm_style form, |
| 41 | 39 | .with_frm_style .frm-show-form div.frm_description p{ |
| 42 | - text-align: var(--form-align)<?php echo esc_html( $important ); ?>; | |
| 40 | + text-align:<?php echo esc_html( $defaults['form_align'] . $important ); ?>; | |
| 41 | + text-align:var(--form-align)<?php echo esc_html( $important ); ?>; | |
| 43 | 42 | } |
| 44 | 43 | |
| 45 | 44 | /* Keep this. This is used for Honeypot */ |
| 46 | 45 | input:-webkit-autofill { |
| @@ -49,24 +48,36 @@ | ||
| 49 | 48 | |
| 50 | 49 | /* Form description */ |
| 51 | 50 | .with_frm_style .frm-show-form div.frm_description p{ |
| 52 | 51 | <?php if ( ! empty( $defaults['form_desc_size'] ) ) { ?> |
| 53 | - font-size: var(--form-desc-size)<?php echo esc_html( $important ); ?>; | |
| 52 | + font-size:<?php echo esc_html( $defaults['form_desc_size'] . $important ); ?>; | |
| 53 | + font-size:var(--form-desc-size)<?php echo esc_html( $important ); ?>; | |
| 54 | 54 | <?php } ?> |
| 55 | 55 | <?php if ( ! empty( $defaults['form_desc_color'] ) ) { ?> |
| 56 | - color: var(--form-desc-color)<?php echo esc_html( $important ); ?>; | |
| 56 | + color:<?php echo esc_html( $defaults['form_desc_color'] . $important ); ?>; | |
| 57 | + color:var(--form-desc-color)<?php echo esc_html( $important ); ?>; | |
| 57 | 58 | <?php } ?> |
| 58 | 59 | <?php if ( ! empty( $defaults['form_desc_margin_top'] ) ) { ?> |
| 59 | - margin-top: var(--form-desc-margin-top)<?php echo esc_html( $important ); ?>; | |
| 60 | + margin-top:<?php echo esc_html( $defaults['form_desc_margin_top'] . $important ); ?>; | |
| 61 | + margin-top:var(--form-desc-margin-top)<?php echo esc_html( $important ); ?>; | |
| 60 | 62 | <?php } ?> |
| 61 | 63 | <?php if ( ! empty( $defaults['form_desc_margin_bottom'] ) ) { ?> |
| 62 | - margin-bottom: var(--form-desc-margin-bottom)<?php echo esc_html( $important ); ?>; | |
| 64 | + margin-bottom:<?php echo esc_html( $defaults['form_desc_margin_bottom'] . $important ); ?>; | |
| 65 | + margin-bottom:var(--form-desc-margin-bottom)<?php echo esc_html( $important ); ?>; | |
| 63 | 66 | <?php } ?> |
| 64 | 67 | <?php if ( isset( $defaults['form_desc_padding'] ) ) { ?> |
| 65 | - padding: var(--form-desc-padding)<?php echo esc_html( $important ); ?>; | |
| 68 | + padding:<?php echo esc_html( $defaults['form_desc_padding'] . $important ); ?>; | |
| 69 | + padding:var(--form-desc-padding)<?php echo esc_html( $important ); ?>; | |
| 66 | 70 | <?php } ?> |
| 67 | 71 | } |
| 68 | 72 | |
| 73 | +form .<?php echo esc_html( FrmHoneypot::generate_class_name() ); ?> { | |
| 74 | + overflow: hidden; | |
| 75 | + width: 0; | |
| 76 | + height: 0; | |
| 77 | + position: absolute; | |
| 78 | +} | |
| 79 | + | |
| 69 | 80 | .with_frm_style fieldset{ |
| 70 | 81 | min-width:0; |
| 71 | 82 | display: block; /* Override 2021 theme */ |
| 72 | 83 | } |
| @@ -79,20 +90,24 @@ | ||
| 79 | 90 | } |
| 80 | 91 | |
| 81 | 92 | .with_frm_style .frm_form_fields > fieldset{ |
| 82 | 93 | <?php if ( isset( $defaults['fieldset'] ) && ( $defaults['fieldset'] || '0' === $defaults['fieldset'] ) ) { ?> |
| 83 | - border-width: var(--fieldset)<?php echo esc_html( $important ); ?>; | |
| 94 | + border-width:<?php echo esc_html( $defaults['fieldset'] . $important ); ?>; | |
| 95 | + border-width:var(--fieldset)<?php echo esc_html( $important ); ?>; | |
| 84 | 96 | <?php } ?> |
| 85 | 97 | border-style:solid; |
| 86 | 98 | <?php if ( ! empty( $defaults['fieldset_color'] ) ) { ?> |
| 87 | - border-color: var(--fieldset-color)<?php echo esc_html( $important ); ?>; | |
| 99 | + border-color:<?php echo esc_html( $defaults['fieldset_color'] . $important ); ?>; | |
| 100 | + border-color:var(--fieldset-color)<?php echo esc_html( $important ); ?>; | |
| 88 | 101 | <?php } ?> |
| 89 | 102 | margin:0; |
| 90 | 103 | <?php if ( ! empty( $defaults['fieldset_padding'] ) ) { ?> |
| 91 | - padding: var(--fieldset-padding)<?php echo esc_html( $important ); ?>; | |
| 104 | + padding:<?php echo esc_html( $defaults['fieldset_padding'] . $important ); ?>; | |
| 105 | + padding:var(--fieldset-padding)<?php echo esc_html( $important ); ?>; | |
| 92 | 106 | <?php } ?> |
| 93 | 107 | <?php if ( ! empty( $defaults['fieldset_bg_color'] ) ) { ?> |
| 94 | - background-color: var(--fieldset-bg-color)<?php echo esc_html( $important ); ?>; | |
| 108 | + background-color:<?php echo esc_html( $defaults['fieldset_bg_color'] ); ?>; | |
| 109 | + background-color:var(--fieldset-bg-color)<?php echo esc_html( $important ); ?>; | |
| 95 | 110 | <?php } ?> |
| 96 | 111 | <?php if ( ! empty( $defaults['font'] ) ) { ?> |
| 97 | 112 | font-family:var(--font); |
| 98 | 113 | <?php } ?> |
| @@ -116,21 +131,26 @@ | ||
| 116 | 131 | |
| 117 | 132 | .with_frm_style legend + h3, |
| 118 | 133 | .with_frm_style h3.frm_form_title{ |
| 119 | 134 | <?php if ( ! empty( $defaults['title_size'] ) ) { ?> |
| 120 | - font-size: var(--title-size)<?php echo esc_html( $important ); ?>; | |
| 135 | + font-size:<?php echo esc_html( $defaults['title_size'] . $important ); ?>; | |
| 136 | + font-size:var(--title-size)<?php echo esc_html( $important ); ?>; | |
| 121 | 137 | <?php } ?> |
| 122 | 138 | <?php if ( ! empty( $defaults['title_color'] ) ) { ?> |
| 123 | - color: var(--title-color)<?php echo esc_html( $important ); ?>; | |
| 139 | + color:<?php echo esc_html( $defaults['title_color'] . $important ); ?>; | |
| 140 | + color:var(--title-color)<?php echo esc_html( $important ); ?>; | |
| 124 | 141 | <?php } ?> |
| 125 | 142 | <?php if ( ! empty( $defaults['font'] ) ) { ?> |
| 126 | - font-family: var(--font); | |
| 143 | + font-family:<?php echo FrmAppHelper::kses( $defaults['font'] ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>; | |
| 144 | + font-family:var(--font); | |
| 127 | 145 | <?php } ?> |
| 128 | 146 | <?php if ( ! empty( $defaults['title_margin_top'] ) ) { ?> |
| 129 | - margin-top: var(--title-margin-top)<?php echo esc_html( $important ); ?>; | |
| 147 | + margin-top:<?php echo esc_html( $defaults['title_margin_top'] . $important ); ?>; | |
| 148 | + margin-top:var(--title-margin-top)<?php echo esc_html( $important ); ?>; | |
| 130 | 149 | <?php } ?> |
| 131 | 150 | <?php if ( ! empty( $defaults['title_margin_bottom'] ) ) { ?> |
| 132 | - margin-bottom: var(--title-margin-bottom)<?php echo esc_html( $important ); ?>; | |
| 151 | + margin-bottom:<?php echo esc_html( $defaults['title_margin_bottom'] . $important ); ?>; | |
| 152 | + margin-bottom:var(--title-margin-bottom)<?php echo esc_html( $important ); ?>; | |
| 133 | 153 | <?php } ?> |
| 134 | 154 | } |
| 135 | 155 | |
| 136 | 156 | .with_frm_style .frm_form_field.frm_html_container, |
| @@ -135,43 +155,46 @@ | ||
| 135 | 155 | |
| 136 | 156 | .with_frm_style .frm_form_field.frm_html_container, |
| 137 | 157 | .with_frm_style .frm_form_field .frm_show_it{ |
| 138 | 158 | <?php if ( ! empty( $defaults['font'] ) ) { ?> |
| 139 | - font-family: var(--font); | |
| 159 | + font-family:<?php echo FrmAppHelper::kses( $defaults['font'] ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>; | |
| 160 | + font-family:var(--font); | |
| 140 | 161 | <?php } ?> |
| 141 | 162 | <?php if ( ! empty( $defaults['form_desc_color'] ) ) { ?> |
| 142 | - color: var(--form-desc-color)<?php echo esc_html( $important ); ?>; | |
| 163 | + color:<?php echo esc_html( $defaults['form_desc_color'] . $important ); ?>; | |
| 164 | + color:var(--form-desc-color)<?php echo esc_html( $important ); ?>; | |
| 143 | 165 | <?php } ?> |
| 144 | 166 | } |
| 145 | 167 | |
| 168 | +<?php if ( ! empty( $defaults['form_desc_size'] ) ) { ?> | |
| 146 | 169 | .with_frm_style .frm_form_field.frm_html_container{ |
| 147 | -<?php if ( ! empty( $defaults['form_desc_size'] ) ) { ?> | |
| 148 | - font-size: var(--form-desc-size)<?php echo esc_html( $important ); ?>; | |
| 170 | + font-size:<?php echo esc_html( $defaults['form_desc_size'] . $important ); ?>; | |
| 171 | + font-size:var(--form-desc-size)<?php echo esc_html( $important ); ?>; | |
| 172 | +} | |
| 149 | 173 | <?php } ?> |
| 150 | - overflow-wrap: break-word<?php echo esc_html( $important ); ?>; | |
| 151 | -} | |
| 152 | 174 | |
| 153 | 175 | .with_frm_style .frm_form_field .frm_show_it{ |
| 154 | 176 | <?php if ( ! empty( $defaults['field_font_size'] ) ) { ?> |
| 155 | - font-size: var(--field-font-size)<?php echo esc_html( $important ); ?>; | |
| 177 | + font-size:<?php echo esc_html( $defaults['field_font_size'] . $important ); ?>; | |
| 178 | + font-size:var(--field-font-size)<?php echo esc_html( $important ); ?>; | |
| 156 | 179 | <?php } ?> |
| 157 | 180 | <?php if ( ! empty( $defaults['field_weight'] ) ) { ?> |
| 158 | - font-weight: var(--field-weight)<?php echo esc_html( $important ); ?>; | |
| 181 | + font-weight:<?php echo esc_html( $defaults['field_weight'] ); ?>; | |
| 182 | + font-weight:var(--field-weight)<?php echo esc_html( $important ); ?>; | |
| 159 | 183 | <?php } ?> |
| 160 | 184 | } |
| 161 | 185 | |
| 162 | -.with_frm_style .frm_required { | |
| 186 | +.with_frm_style .frm_required{ | |
| 163 | 187 | <?php if ( ! empty( $defaults['required_color'] ) ) { ?> |
| 164 | - color: var(--required-color)<?php echo esc_html( $important ); ?>; | |
| 188 | + color:<?php echo esc_html( $defaults['required_color'] . $important ); ?>; | |
| 189 | + color:var(--required-color)<?php echo esc_html( $important ); ?>; | |
| 165 | 190 | <?php } ?> |
| 166 | 191 | <?php if ( ! empty( $defaults['required_weight'] ) ) { ?> |
| 167 | - font-weight: var(--required-weight)<?php echo esc_html( $important ); ?>; | |
| 192 | + font-weight:<?php echo esc_html( $defaults['required_weight'] . $important ); ?>; | |
| 193 | + font-weight:var(--required-weight)<?php echo esc_html( $important ); ?>; | |
| 168 | 194 | <?php } ?> |
| 169 | 195 | } |
| 170 | 196 | |
| 171 | -<?php if ( $use_chosen_js ) { ?> | |
| 172 | -.with_frm_style .chosen-container, | |
| 173 | -<?php } ?> | |
| 174 | 197 | .with_frm_style input[type=text], |
| 175 | 198 | .with_frm_style input[type=password], |
| 176 | 199 | .with_frm_style input[type=email], |
| 177 | 200 | .with_frm_style input[type=number], |
| @@ -179,12 +202,14 @@ | ||
| 179 | 202 | .with_frm_style input[type=tel], |
| 180 | 203 | .with_frm_style input[type=search], |
| 181 | 204 | .with_frm_style select, |
| 182 | 205 | .with_frm_style textarea, |
| 183 | -.with_frm_style .frm-card-element.StripeElement { | |
| 206 | +.with_frm_style .frm-card-element.StripeElement, | |
| 207 | +.with_frm_style .chosen-container{ | |
| 184 | 208 | font-family:var(--font)<?php echo esc_html( $important ); ?>; |
| 185 | 209 | <?php if ( ! empty( $defaults['field_font_size'] ) ) { ?> |
| 186 | - font-size: var(--field-font-size)<?php echo esc_html( $important ); ?>; | |
| 210 | + font-size:<?php echo esc_html( $defaults['field_font_size'] ); ?>; | |
| 211 | + font-size:var(--field-font-size)<?php echo esc_html( $important ); ?>; | |
| 187 | 212 | <?php } ?> |
| 188 | 213 | margin-bottom:0<?php echo esc_html( $important ); ?>; |
| 189 | 214 | } |
| 190 | 215 | |
| @@ -192,14 +217,8 @@ | ||
| 192 | 217 | vertical-align:top; |
| 193 | 218 | height:auto; |
| 194 | 219 | } |
| 195 | 220 | |
| 196 | -<?php if ( $use_chosen_js ) { ?> | |
| 197 | -.with_frm_style .chosen-container-multi .chosen-choices, | |
| 198 | -.with_frm_style .chosen-container-single .chosen-single, | |
| 199 | -<?php } elseif ( $pro_is_installed ) { ?> | |
| 200 | -.with_frm_style .frm_slimselect.ss-main, | |
| 201 | -<?php } ?> | |
| 202 | 221 | .with_frm_style input[type=text], |
| 203 | 222 | .with_frm_style input[type=password], |
| 204 | 223 | .with_frm_style input[type=email], |
| 205 | 224 | .with_frm_style input[type=number], |
| @@ -212,34 +231,39 @@ | ||
| 212 | 231 | .frm_form_fields_style, |
| 213 | 232 | .with_frm_style .frm_scroll_box .frm_opt_container, |
| 214 | 233 | .frm_form_fields_active_style, |
| 215 | 234 | .frm_form_fields_error_style, |
| 216 | -.with_frm_style .frm-card-element.StripeElement { | |
| 217 | - color: var(--text-color)<?php echo esc_html( $important ); ?>; | |
| 218 | - background-color: var(--bg-color)<?php echo esc_html( $important ); ?>; | |
| 219 | - border-color: var(--border-color)<?php echo esc_html( $important ); ?>; | |
| 220 | - border-width: var(--field-border-width)<?php echo esc_html( $important ); ?>; | |
| 221 | - border-style: var(--field-border-style)<?php echo esc_html( $important ); ?>; | |
| 222 | - border-radius: var(--border-radius)<?php echo esc_html( $important ); ?>; | |
| 223 | - width: var(--field-width)<?php echo esc_html( $important ); ?>; | |
| 224 | - max-width: 100%; | |
| 225 | - font-size: var(--field-font-size)<?php echo esc_html( $important ); ?>; | |
| 226 | - padding: var(--field-pad)<?php echo esc_html( $important ); ?>; | |
| 227 | - box-sizing: border-box; | |
| 228 | - outline: none<?php echo esc_html( $important ); ?>; | |
| 229 | - font-weight: var(--field-weight); | |
| 235 | +.with_frm_style .frm-card-element.StripeElement, | |
| 236 | +.with_frm_style .chosen-container-multi .chosen-choices, | |
| 237 | +.with_frm_style .chosen-container-single .chosen-single, | |
| 238 | +.with_frm_style .frm_slimselect.ss-main { | |
| 239 | + color:<?php echo esc_html( $defaults['text_color'] ); ?>; | |
| 240 | + color:var(--text-color)<?php echo esc_html( $important ); ?>; | |
| 241 | + background-color:<?php echo esc_html( $defaults['bg_color'] . $important ); ?>; | |
| 242 | + background-color:var(--bg-color)<?php echo esc_html( $important ); ?>; | |
| 243 | + border-color:<?php echo esc_html( $defaults['border_color'] ); ?>; | |
| 244 | + border-color:var(--border-color)<?php echo esc_html( $important ); ?>; | |
| 245 | + border-width:<?php echo esc_html( $defaults['field_border_width'] ); ?>; | |
| 246 | + border-width:var(--field-border-width)<?php echo esc_html( $important ); ?>; | |
| 247 | + border-style:<?php echo esc_html( $defaults['field_border_style'] ); ?>; | |
| 248 | + border-style:var(--field-border-style)<?php echo esc_html( $important ); ?>; | |
| 249 | + border-radius:<?php echo esc_html( $defaults['border_radius'] ); ?>; | |
| 250 | + border-radius:var(--border-radius)<?php echo esc_html( $important ); ?>; | |
| 251 | + width:<?php echo esc_html( $defaults['field_width'] ); ?>; | |
| 252 | + width:var(--field-width)<?php echo esc_html( $important ); ?>; | |
| 253 | + max-width:100%; | |
| 254 | + font-size:<?php echo esc_html( $defaults['field_font_size'] ); ?>; | |
| 255 | + font-size:var(--field-font-size)<?php echo esc_html( $important ); ?>; | |
| 256 | + padding:<?php echo esc_html( $defaults['field_pad'] ); ?>; | |
| 257 | + padding:var(--field-pad)<?php echo esc_html( $important ); ?>; | |
| 258 | + box-sizing:border-box; | |
| 259 | + outline:none<?php echo esc_html( $important ); ?>; | |
| 260 | + font-weight:<?php echo esc_html( $defaults['field_weight'] ); ?>; | |
| 261 | + font-weight:var(--field-weight); | |
| 262 | + box-shadow:var(--box-shadow)<?php echo esc_html( $important ); ?>; | |
| 230 | 263 | } |
| 231 | 264 | |
| 232 | -.with_frm_style input:-webkit-autofill:focus { | |
| 233 | - /* Prevent the user agent autofill background color from taking effect on focus. */ | |
| 234 | - transition: background-color 5000s ease-in-out 0s<?php echo esc_html( $important ); ?>; | |
| 235 | -} | |
| 236 | - | |
| 237 | -<?php if ( $important ) : ?> | |
| 238 | - <?php if ( $use_chosen_js ) { ?> | |
| 239 | - .with_frm_style .chosen-container-multi .chosen-choices, | |
| 240 | - .with_frm_style .chosen-container-single .chosen-single, | |
| 241 | - <?php } ?> | |
| 265 | +<?php if ( ! empty( $important ) ) { ?> | |
| 242 | 266 | .with_frm_style input[type=text], |
| 243 | 267 | .with_frm_style input[type=password], |
| 244 | 268 | .with_frm_style input[type=email], |
| 245 | 269 | .with_frm_style input[type=number], |
| @@ -251,25 +275,30 @@ | ||
| 251 | 275 | .frm_form_fields_style, |
| 252 | 276 | .with_frm_style .frm_scroll_box .frm_opt_container, |
| 253 | 277 | .frm_form_fields_active_style, |
| 254 | 278 | .frm_form_fields_error_style, |
| 255 | -.with_frm_style .frm-card-element.StripeElement { | |
| 279 | +.with_frm_style .frm-card-element.StripeElement, | |
| 280 | +.with_frm_style .chosen-container-multi .chosen-choices, | |
| 281 | +.with_frm_style .chosen-container-single .chosen-single{ | |
| 256 | 282 | background-image:none !important; |
| 257 | 283 | } |
| 258 | -<?php endif; ?> | |
| 284 | +<?php } ?> | |
| 259 | 285 | |
| 260 | 286 | .with_frm_style select option { |
| 261 | - color: var(--text-color)<?php echo esc_html( $important ); ?>; | |
| 287 | + color:<?php echo esc_html( $defaults['text_color'] ); ?>; | |
| 288 | + color:var(--text-color)<?php echo esc_html( $important ); ?>; | |
| 262 | 289 | } |
| 263 | 290 | |
| 264 | 291 | .with_frm_style select option.frm-select-placeholder { |
| 265 | - color: var(--text-color-disabled)<?php echo esc_html( $important ); ?>; | |
| 292 | + color:<?php echo esc_html( $defaults['text_color_disabled'] ); ?>; | |
| 293 | + color:var(--text-color-disabled)<?php echo esc_html( $important ); ?>; | |
| 266 | 294 | } |
| 267 | 295 | |
| 268 | 296 | .with_frm_style input[type=radio], |
| 269 | 297 | .with_frm_style input[type=checkbox]{ |
| 270 | - border-color: var(--border-color)<?php echo esc_html( $important ); ?>; | |
| 271 | - box-shadow: var(--box-shadow)<?php echo esc_html( $important ); ?>; | |
| 298 | + border-color:<?php echo esc_html( $defaults['border_color'] . $important ); ?>; | |
| 299 | + border-color:var(--border-color)<?php echo esc_html( $important ); ?>; | |
| 300 | + box-shadow:var(--box-shadow)<?php echo esc_html( $important ); ?>; | |
| 272 | 301 | float: none; |
| 273 | 302 | } |
| 274 | 303 | |
| 275 | 304 | .with_frm_style input[type=radio]:after, |
| @@ -276,18 +305,8 @@ | ||
| 276 | 305 | .with_frm_style input[type=checkbox]:after { |
| 277 | 306 | display: none; /* 2021 conflict */ |
| 278 | 307 | } |
| 279 | 308 | |
| 280 | -.with_frm_style input[type=radio]:not(:checked):focus, | |
| 281 | -.with_frm_style input[type=checkbox]:not(:checked):focus { | |
| 282 | - border-color: var(--border-color) !important; | |
| 283 | -} | |
| 284 | - | |
| 285 | -.with_frm_style input[type=radio]:focus, | |
| 286 | -.with_frm_style input[type=checkbox]:focus { | |
| 287 | - box-shadow:0px 0px 0px 3px rgba(<?php echo esc_html( FrmStylesHelper::hex2rgb( $defaults['border_color_active'] ) ); ?>, 0.4) !important; | |
| 288 | -} | |
| 289 | - | |
| 290 | 309 | .with_frm_style input[type=text], |
| 291 | 310 | .with_frm_style input[type=password], |
| 292 | 311 | .with_frm_style input[type=email], |
| 293 | 312 | .with_frm_style input[type=number], |
| @@ -296,9 +315,10 @@ | ||
| 296 | 315 | .with_frm_style input[type=file], |
| 297 | 316 | .with_frm_style input[type=search], |
| 298 | 317 | .with_frm_style select, |
| 299 | 318 | .with_frm_style .frm-card-element.StripeElement{ |
| 300 | - min-height: var(--field-height)<?php echo esc_html( $important ); ?>; | |
| 319 | + min-height:<?php echo esc_html( $defaults['field_height'] ); ?>; | |
| 320 | + min-height:var(--field-height)<?php echo esc_html( $important ); ?>; | |
| 301 | 321 | line-height:1.3<?php echo esc_html( $important ); ?>; |
| 302 | 322 | } |
| 303 | 323 | |
| 304 | 324 | .with_frm_style select[multiple=multiple]{ |
| @@ -313,15 +333,17 @@ | ||
| 313 | 333 | box-shadow:none; |
| 314 | 334 | } |
| 315 | 335 | |
| 316 | 336 | .with_frm_style input[type=file]{ |
| 317 | - color: var(--text-color)<?php echo esc_html( $important ); ?>; | |
| 318 | - padding: 0px; | |
| 337 | + color:<?php echo esc_html( $defaults['text_color'] ); ?>; | |
| 338 | + color:var(--text-color)<?php echo esc_html( $important ); ?>; | |
| 339 | + padding:0px; | |
| 319 | 340 | <?php if ( ! empty( $defaults['font'] ) ) { ?> |
| 320 | - font-family: var(--font)<?php echo esc_html( $important ); ?>; | |
| 341 | + font-family:var(--font)<?php echo esc_html( $important ); ?>; | |
| 321 | 342 | <?php } ?> |
| 322 | - font-size: var(--field-font-size)<?php echo esc_html( $important ); ?>; | |
| 323 | - display: initial; | |
| 343 | + font-size:<?php echo esc_html( $defaults['field_font_size'] ); ?>; | |
| 344 | + font-size:var(--field-font-size)<?php echo esc_html( $important ); ?>; | |
| 345 | + display:initial; | |
| 324 | 346 | } |
| 325 | 347 | |
| 326 | 348 | .with_frm_style input[type=file].frm_transparent{ |
| 327 | 349 | color:transparent<?php echo esc_html( $important ); ?>; |
| @@ -326,11 +348,11 @@ | ||
| 326 | 348 | .with_frm_style input[type=file].frm_transparent{ |
| 327 | 349 | color:transparent<?php echo esc_html( $important ); ?>; |
| 328 | 350 | } |
| 329 | 351 | |
| 330 | -<?php if ( $pro_is_installed ) { ?> | |
| 331 | 352 | .with_frm_style .wp-editor-wrap{ |
| 332 | - width: var(--field-width)<?php echo esc_html( $important ); ?>; | |
| 353 | + width:<?php echo esc_html( $defaults['field_width'] . $important ); ?>; | |
| 354 | + width:var(--field-width)<?php echo esc_html( $important ); ?>; | |
| 333 | 355 | max-width:100%; |
| 334 | 356 | } |
| 335 | 357 | |
| 336 | 358 | .with_frm_style .wp-editor-container textarea{ |
| @@ -338,14 +360,15 @@ | ||
| 338 | 360 | box-shadow:none !important; |
| 339 | 361 | } |
| 340 | 362 | |
| 341 | 363 | .with_frm_style .mceIframeContainer{ |
| 342 | - background-color: var(--bg-color)<?php echo esc_html( $important ); ?>; | |
| 364 | + background-color:<?php echo esc_html( $defaults['bg_color'] . $important ); ?>; | |
| 365 | + background-color:var(--bg-color)<?php echo esc_html( $important ); ?>; | |
| 343 | 366 | } |
| 344 | -<?php } ?> | |
| 345 | 367 | |
| 346 | 368 | .with_frm_style select{ |
| 347 | - width: var(--auto-width)<?php echo esc_html( $important ); ?>; | |
| 369 | + width:<?php echo esc_html( $defaults['auto_width'] ); ?>; | |
| 370 | + width:var(--auto-width)<?php echo esc_html( $important ); ?>; | |
| 348 | 371 | max-width:100%; |
| 349 | 372 | background-position-y: calc(50% + 3px); |
| 350 | 373 | } |
| 351 | 374 | |
| @@ -353,12 +376,15 @@ | ||
| 353 | 376 | .with_frm_style select[disabled], |
| 354 | 377 | .with_frm_style textarea[disabled], |
| 355 | 378 | .with_frm_style input[readonly], |
| 356 | 379 | .with_frm_style select[readonly], |
| 357 | -.with_frm_style textarea[readonly] { | |
| 358 | - background-color: var(--bg-color-disabled)<?php echo esc_html( $important ); ?>; | |
| 359 | - color: var(--text-color-disabled)<?php echo esc_html( $important ); ?>; | |
| 360 | - border-color: var(--border-color-disabled)<?php echo esc_html( $important ); ?>; | |
| 380 | +.with_frm_style textarea[readonly]{ | |
| 381 | + background-color:<?php echo esc_html( $defaults['bg_color_disabled'] ); ?>; | |
| 382 | + background-color:var(--bg-color-disabled)<?php echo esc_html( $important ); ?>; | |
| 383 | + color:<?php echo esc_html( $defaults['text_color_disabled'] ); ?>; | |
| 384 | + color:var(--text-color-disabled)<?php echo esc_html( $important ); ?>; | |
| 385 | + border-color:<?php echo esc_html( $defaults['border_color_disabled'] ); ?>; | |
| 386 | + border-color:var(--border-color-disabled)<?php echo esc_html( $important ); ?>; | |
| 361 | 387 | } |
| 362 | 388 | |
| 363 | 389 | .frm_preview_page:before{ |
| 364 | 390 | content:normal !important; |
| @@ -370,24 +396,30 @@ | ||
| 370 | 396 | |
| 371 | 397 | .with_frm_style .frm_primary_label{ |
| 372 | 398 | max-width:100%; |
| 373 | 399 | <?php if ( ! empty( $defaults['font'] ) ) { ?> |
| 374 | - font-family: var(--font); | |
| 400 | + font-family:<?php echo FrmAppHelper::kses( $defaults['font'] ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>; | |
| 401 | + font-family:var(--font); | |
| 375 | 402 | <?php } ?> |
| 376 | 403 | <?php if ( ! empty( $defaults['font_size'] ) ) { ?> |
| 377 | - font-size: var(--font-size)<?php echo esc_html( $important ); ?>; | |
| 404 | + font-size:<?php echo esc_html( $defaults['font_size'] . $important ); ?>; | |
| 405 | + font-size:var(--font-size)<?php echo esc_html( $important ); ?>; | |
| 378 | 406 | <?php } ?> |
| 379 | 407 | <?php if ( ! empty( $defaults['label_color'] ) ) { ?> |
| 380 | - color: var(--label-color)<?php echo esc_html( $important ); ?>; | |
| 408 | + color:<?php echo esc_html( $defaults['label_color'] . $important ); ?>; | |
| 409 | + color:var(--label-color)<?php echo esc_html( $important ); ?>; | |
| 381 | 410 | <?php } ?> |
| 382 | 411 | <?php if ( ! empty( $defaults['weight'] ) ) { ?> |
| 383 | - font-weight: var(--weight)<?php echo esc_html( $important ); ?>; | |
| 412 | + font-weight:<?php echo esc_html( $defaults['weight'] . $important ); ?>; | |
| 413 | + font-weight:var(--weight)<?php echo esc_html( $important ); ?>; | |
| 384 | 414 | <?php } ?> |
| 385 | 415 | <?php if ( ! empty( $defaults['align'] ) ) { ?> |
| 386 | - text-align: var(--align)<?php echo esc_html( $important ); ?>; | |
| 416 | + text-align:<?php echo esc_html( $defaults['align'] . $important ); ?>; | |
| 417 | + text-align:var(--align)<?php echo esc_html( $important ); ?>; | |
| 387 | 418 | <?php } ?> |
| 388 | 419 | <?php if ( ! empty( $defaults['label_padding'] ) ) { ?> |
| 389 | - padding: var(--label-padding)<?php echo esc_html( $important ); ?>; | |
| 420 | + padding:<?php echo esc_html( $defaults['label_padding'] . $important ); ?>; | |
| 421 | + padding:var(--label-padding)<?php echo esc_html( $important ); ?>; | |
| 390 | 422 | <?php } ?> |
| 391 | 423 | margin:0; |
| 392 | 424 | width:auto; |
| 393 | 425 | display:block; |
| @@ -422,13 +454,11 @@ | ||
| 422 | 454 | .frm_none_container .frm_primary_label{ |
| 423 | 455 | display:none; |
| 424 | 456 | } |
| 425 | 457 | |
| 426 | -<?php if ( $pro_is_installed ) { ?> | |
| 427 | 458 | .with_frm_style .frm_section_heading.frm_hide_section{ |
| 428 | 459 | margin-top:0 !important; |
| 429 | 460 | } |
| 430 | -<?php } ?> | |
| 431 | 461 | |
| 432 | 462 | .with_frm_style .frm_hidden_container .frm_primary_label, |
| 433 | 463 | .with_frm_style .frm_pos_hidden, |
| 434 | 464 | .frm_hidden_container .frm_primary_label{ |
| @@ -442,9 +472,9 @@ | ||
| 442 | 472 | |
| 443 | 473 | /* Floating labels */ |
| 444 | 474 | .with_frm_style .frm_inside_container { |
| 445 | 475 | position: relative; |
| 446 | - padding-top: 18px; | |
| 476 | + padding-top: 16px; | |
| 447 | 477 | padding-top: calc(0.5 * var(--field-height)); |
| 448 | 478 | } |
| 449 | 479 | |
| 450 | 480 | .with_frm_style .frm_inside_container > input, |
| @@ -452,13 +482,26 @@ | ||
| 452 | 482 | .with_frm_style .frm_inside_container > textarea { |
| 453 | 483 | display: block; |
| 454 | 484 | } |
| 455 | 485 | |
| 486 | +/* These do not work if they are combined */ | |
| 456 | 487 | .with_frm_style input::placeholder, |
| 457 | 488 | .with_frm_style textarea::placeholder { |
| 458 | 489 | font-size: var(--field-font-size)<?php echo esc_html( $important ); ?>; |
| 459 | 490 | } |
| 460 | 491 | |
| 492 | +.with_frm_style .frm_inside_container > input::-moz-placeholder, | |
| 493 | +.with_frm_style .frm_inside_container > textarea::-moz-placeholder { | |
| 494 | + opacity: 0 !important; | |
| 495 | + transition: opacity 0.3s ease-in; | |
| 496 | +} | |
| 497 | + | |
| 498 | +.with_frm_style .frm_inside_container > input:-ms-input-placeholder, | |
| 499 | +.with_frm_style .frm_inside_container > textarea:-ms-input-placeholder { | |
| 500 | + opacity: 0; | |
| 501 | + transition: opacity 0.3s ease-in; | |
| 502 | +} | |
| 503 | + | |
| 461 | 504 | .with_frm_style .frm_inside_container > input::placeholder, |
| 462 | 505 | .with_frm_style .frm_inside_container > textarea::placeholder { |
| 463 | 506 | opacity: 0; |
| 464 | 507 | transition: opacity 0.3s ease-in; |
| @@ -467,9 +510,9 @@ | ||
| 467 | 510 | .with_frm_style .frm_inside_container > label { |
| 468 | 511 | transition: all 0.3s ease-in; |
| 469 | 512 | |
| 470 | 513 | position: absolute; |
| 471 | - top: 19px; | |
| 514 | + top: 17px; | |
| 472 | 515 | top: calc(1px + .5 * var(--field-height)); |
| 473 | 516 | left: 3px; |
| 474 | 517 | width: 100%; |
| 475 | 518 | |
| @@ -477,9 +520,9 @@ | ||
| 477 | 520 | text-overflow: ellipsis; |
| 478 | 521 | overflow: hidden; |
| 479 | 522 | white-space: nowrap; |
| 480 | 523 | |
| 481 | - padding: 8px 12px; | |
| 524 | + padding: 6px 10px; | |
| 482 | 525 | padding: var(--field-pad); |
| 483 | 526 | |
| 484 | 527 | font-size: 14px; |
| 485 | 528 | font-size: var(--field-font-size); |
| @@ -500,8 +543,21 @@ | ||
| 500 | 543 | font-size: 12px; |
| 501 | 544 | font-size: calc(0.85 * var(--field-font-size)); |
| 502 | 545 | } |
| 503 | 546 | |
| 547 | +/* These do not work if they are combined */ | |
| 548 | +.with_frm_style .frm_inside_container.frm_label_float_top > input::-moz-placeholder, | |
| 549 | +.with_frm_style .frm_inside_container.frm_label_float_top > textarea::-moz-placeholder { | |
| 550 | + opacity: 1 !important; | |
| 551 | + transition: opacity 0.3s ease-in; | |
| 552 | +} | |
| 553 | + | |
| 554 | +.with_frm_style .frm_inside_container.frm_label_float_top > input:-ms-input-placeholder, | |
| 555 | +.with_frm_style .frm_inside_container.frm_label_float_top > textarea:-ms-input-placeholder { | |
| 556 | + opacity: 1; | |
| 557 | + transition: opacity 0.3s ease-in; | |
| 558 | +} | |
| 559 | + | |
| 504 | 560 | .with_frm_style .frm_inside_container.frm_label_float_top > input::placeholder, |
| 505 | 561 | .with_frm_style .frm_inside_container.frm_label_float_top > textarea::placeholder { |
| 506 | 562 | opacity: 1; |
| 507 | 563 | transition: opacity 0.3s ease-in; |
| @@ -512,9 +568,9 @@ | ||
| 512 | 568 | .with_frm_style .frm_pro_max_limit_desc{ |
| 513 | 569 | clear:both; |
| 514 | 570 | } |
| 515 | 571 | |
| 516 | -.with_frm_style input[type=number][readonly] { | |
| 572 | +.with_frm_style input[type=number][readonly]{ | |
| 517 | 573 | -moz-appearance: textfield; |
| 518 | 574 | } |
| 519 | 575 | |
| 520 | 576 | .with_frm_style select[multiple="multiple"]{ |
| @@ -521,9 +577,8 @@ | ||
| 521 | 577 | height:auto; |
| 522 | 578 | line-height:normal; |
| 523 | 579 | } |
| 524 | 580 | |
| 525 | -<?php if ( $pro_is_installed ) { ?> | |
| 526 | 581 | .with_frm_style .frm_catlevel_2, |
| 527 | 582 | .with_frm_style .frm_catlevel_3, |
| 528 | 583 | .with_frm_style .frm_catlevel_4, |
| 529 | 584 | .with_frm_style .frm_catlevel_5{ |
| @@ -528,11 +583,9 @@ | ||
| 528 | 583 | .with_frm_style .frm_catlevel_4, |
| 529 | 584 | .with_frm_style .frm_catlevel_5{ |
| 530 | 585 | margin-left:18px; |
| 531 | 586 | } |
| 532 | -<?php } ?> | |
| 533 | 587 | |
| 534 | -<?php if ( $pro_is_installed ) { ?> | |
| 535 | 588 | .with_frm_style .wp-editor-container{ |
| 536 | 589 | border:1px solid #e5e5e5; |
| 537 | 590 | } |
| 538 | 591 | |
| @@ -542,9 +595,8 @@ | ||
| 542 | 595 | |
| 543 | 596 | .with_frm_style .wp-editor-container textarea{ |
| 544 | 597 | border:none; |
| 545 | 598 | } |
| 546 | -<?php } ?> | |
| 547 | 599 | |
| 548 | 600 | .with_frm_style .auto_width #loginform input, |
| 549 | 601 | .with_frm_style .auto_width input, |
| 550 | 602 | .with_frm_style input.auto_width, |
| @@ -552,20 +604,19 @@ | ||
| 552 | 604 | .with_frm_style textarea.auto_width{ |
| 553 | 605 | width:auto<?php echo esc_html( $important ); ?>; |
| 554 | 606 | } |
| 555 | 607 | |
| 556 | -<?php if ( $pro_is_installed ) { ?> | |
| 557 | 608 | .with_frm_style .frm_repeat_buttons{ |
| 558 | 609 | white-space:nowrap; |
| 559 | 610 | } |
| 560 | -<?php } ?> | |
| 561 | 611 | |
| 562 | 612 | .with_frm_style .frm_button{ |
| 563 | - text-decoration:none !important; | |
| 613 | + text-decoration:none !important;; | |
| 564 | 614 | border:1px solid #eee; |
| 565 | 615 | display:inline-block; |
| 566 | 616 | <?php if ( ! empty( $defaults['submit_padding'] ) ) { ?> |
| 567 | - padding: var(--submit-padding)<?php echo esc_html( $important ); ?>; | |
| 617 | + padding:<?php echo esc_html( $defaults['submit_padding'] . $important ); ?>; | |
| 618 | + padding:var(--submit-padding)<?php echo esc_html( $important ); ?>; | |
| 568 | 619 | <?php } else { ?> |
| 569 | 620 | padding:5px; |
| 570 | 621 | <?php } ?> |
| 571 | 622 | <?php if ( ! empty( $defaults['border_radius'] ) ) { ?> |
| @@ -572,30 +623,38 @@ | ||
| 572 | 623 | border-radius:<?php echo esc_html( $defaults['border_radius'] . $important ); ?>; |
| 573 | 624 | border-radius:var(--border-radius)<?php echo esc_html( $important ); ?>; |
| 574 | 625 | <?php } ?> |
| 575 | 626 | <?php if ( ! empty( $defaults['submit_font_size'] ) ) { ?> |
| 576 | - font-size: var(--submit-font-size)<?php echo esc_html( $important ); ?>; | |
| 627 | + font-size:<?php echo esc_html( $defaults['submit_font_size'] . $important ); ?>; | |
| 628 | + font-size:var(--submit-font-size)<?php echo esc_html( $important ); ?>; | |
| 577 | 629 | <?php } ?> |
| 578 | 630 | <?php if ( ! empty( $defaults['font'] ) ) { ?> |
| 579 | - font-family: var(--font)<?php echo esc_html( $important ); ?>; | |
| 631 | + font-family:<?php echo FrmAppHelper::kses( $defaults['font'] . $important ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>; | |
| 632 | + font-family:var(--font)<?php echo esc_html( $important ); ?>; | |
| 580 | 633 | <?php } ?> |
| 581 | 634 | <?php if ( ! empty( $defaults['submit_weight'] ) ) { ?> |
| 582 | - font-weight: var(--submit-weight)<?php echo esc_html( $important ); ?>; | |
| 635 | + font-weight:<?php echo esc_html( $defaults['submit_weight'] . $important ); ?>; | |
| 636 | + font-weight:var(--submit-weight)<?php echo esc_html( $important ); ?>; | |
| 583 | 637 | <?php } ?> |
| 584 | 638 | <?php if ( ! empty( $defaults['submit_text_color'] ) ) { ?> |
| 585 | - color: var(--submit-text-color)<?php echo esc_html( $important ); ?>; | |
| 639 | + color:<?php echo esc_html( $defaults['submit_text_color'] . $important ); ?>; | |
| 640 | + color:var(--submit-text-color)<?php echo esc_html( $important ); ?>; | |
| 586 | 641 | <?php } ?> |
| 587 | 642 | <?php if ( ! empty( $defaults['submit_bg_color'] ) ) { ?> |
| 588 | - background: var(--submit-bg-color)<?php echo esc_html( $important ); ?>; | |
| 643 | + background:<?php echo esc_html( $defaults['submit_bg_color'] . $important ); ?>; | |
| 644 | + background:var(--submit-bg-color)<?php echo esc_html( $important ); ?>; | |
| 589 | 645 | <?php } ?> |
| 590 | 646 | <?php if ( ! empty( $defaults['submit_border_width'] ) ) { ?> |
| 591 | - border-width: var(--submit-border-width)<?php echo esc_html( $important ); ?>; | |
| 647 | + border-width:<?php echo esc_html( $defaults['submit_border_width'] ); ?>; | |
| 648 | + border-width:var(--submit-border-width)<?php echo esc_html( $important ); ?>; | |
| 592 | 649 | <?php } ?> |
| 593 | 650 | <?php if ( ! empty( $defaults['submit_border_color'] ) ) { ?> |
| 594 | - border-color: var(--submit-border-color)<?php echo esc_html( $important ); ?>; | |
| 651 | + border-color:<?php echo esc_html( $defaults['submit_border_color'] . $important ); ?>; | |
| 652 | + border-color:var(--submit-border-color)<?php echo esc_html( $important ); ?>; | |
| 595 | 653 | <?php } ?> |
| 596 | 654 | <?php if ( ! empty( $defaults['submit_height'] ) ) { ?> |
| 597 | - height: var(--submit-height)<?php echo esc_html( $important ); ?>; | |
| 655 | + height:<?php echo esc_html( $defaults['submit_height'] . $important ); ?>; | |
| 656 | + height:var(--submit-height)<?php echo esc_html( $important ); ?>; | |
| 598 | 657 | <?php } ?> |
| 599 | 658 | } |
| 600 | 659 | |
| 601 | 660 | <?php if ( ! empty( $defaults['submit_text_color'] ) ) { ?> |
| @@ -655,11 +714,9 @@ | ||
| 655 | 714 | .with_frm_style.frm_center_submit .frm_submit button{ |
| 656 | 715 | margin-bottom:8px !important; |
| 657 | 716 | } |
| 658 | 717 | |
| 659 | -<?php if ( $pro_is_installed ) { ?> | |
| 660 | 718 | .with_frm_style .frm-edit-page-btn, |
| 661 | -<?php } ?> | |
| 662 | 719 | .with_frm_style .frm_submit input[type=submit], |
| 663 | 720 | .with_frm_style .frm_submit input[type=button], |
| 664 | 721 | .with_frm_style .frm_submit button{ |
| 665 | 722 | -webkit-appearance: none; |
| @@ -676,22 +733,19 @@ | ||
| 676 | 733 | /* keep this for reverse compatibility for old HTML */ |
| 677 | 734 | visibility:visible !important; |
| 678 | 735 | } |
| 679 | 736 | |
| 680 | -<?php if ( $pro_is_installed ) { ?> | |
| 681 | 737 | .with_frm_style .frm_loading_prev .frm_prev_page, |
| 682 | -<?php } ?> | |
| 683 | 738 | .with_frm_style .frm_loading_form .frm_button_submit { |
| 684 | 739 | position: relative; |
| 740 | + opacity: .8; | |
| 685 | 741 | color: transparent !important; |
| 686 | 742 | text-shadow: none !important; |
| 687 | 743 | } |
| 688 | 744 | |
| 689 | -<?php if ( $pro_is_installed ) { ?> | |
| 690 | 745 | .with_frm_style .frm_loading_prev .frm_prev_page:hover, |
| 691 | 746 | .with_frm_style .frm_loading_prev .frm_prev_page:active, |
| 692 | 747 | .with_frm_style .frm_loading_prev .frm_prev_page:focus, |
| 693 | -<?php } ?> | |
| 694 | 748 | .with_frm_style .frm_loading_form .frm_button_submit:hover, |
| 695 | 749 | .with_frm_style .frm_loading_form .frm_button_submit:active, |
| 696 | 750 | .with_frm_style .frm_loading_form .frm_button_submit:focus { |
| 697 | 751 | cursor: not-allowed; |
| @@ -699,11 +753,9 @@ | ||
| 699 | 753 | outline: none !important; |
| 700 | 754 | box-shadow: none; |
| 701 | 755 | } |
| 702 | 756 | |
| 703 | -<?php if ( $pro_is_installed ) { ?> | |
| 704 | 757 | .with_frm_style .frm_loading_prev .frm_prev_page::before, |
| 705 | -<?php } ?> | |
| 706 | 758 | .with_frm_style .frm_loading_form .frm_button_submit:before { |
| 707 | 759 | content: ''; |
| 708 | 760 | display: inline-block; |
| 709 | 761 | position: absolute; |
| @@ -712,9 +764,9 @@ | ||
| 712 | 764 | border-top-color: transparent; |
| 713 | 765 | border-left-color: transparent; |
| 714 | 766 | border-radius: 50%; |
| 715 | 767 | box-sizing: border-box; |
| 716 | - <?php $loader_size = 12; ?> | |
| 768 | + <?php $loader_size = 20; ?> | |
| 717 | 769 | top: 50%; |
| 718 | 770 | left: 50%; |
| 719 | 771 | margin-top: -<?php echo absint( $loader_size / 2 ); ?>px; |
| 720 | 772 | margin-left: -<?php echo absint( $loader_size / 2 ); ?>px; |
| @@ -727,13 +779,11 @@ | ||
| 727 | 779 | align-items: center; |
| 728 | 780 | gap: 2%; |
| 729 | 781 | } |
| 730 | 782 | |
| 731 | -<?php if ( $pro_is_installed ) { ?> | |
| 732 | 783 | .with_frm_style .frm_submit.frm_flex button.frm_button_submit ~ .frm_prev_page { |
| 733 | 784 | order: -1; |
| 734 | 785 | } |
| 735 | -<?php } ?> | |
| 736 | 786 | |
| 737 | 787 | <?php |
| 738 | 788 | foreach ( $styles as $style ) { |
| 739 | 789 | include __DIR__ . '/_single_theme.css.php'; |
| @@ -740,9 +790,9 @@ | ||
| 740 | 790 | unset( $style ); |
| 741 | 791 | } |
| 742 | 792 | |
| 743 | 793 | // Set it again since it may have been overridden. |
| 744 | -$important = ! empty( $defaults['important_style'] ) ? ' !important' : ''; | |
| 794 | +$important = empty( $defaults['important_style'] ) ? '' : ' !important'; | |
| 745 | 795 | ?> |
| 746 | 796 | |
| 747 | 797 | .frm_ajax_loading{ |
| 748 | 798 | visibility:hidden; |
| @@ -756,18 +806,19 @@ | ||
| 756 | 806 | a.frm_save_draft{ |
| 757 | 807 | cursor:pointer; |
| 758 | 808 | } |
| 759 | 809 | |
| 760 | -<?php if ( $pro_is_installed ) { ?> | |
| 761 | 810 | .with_frm_style a.frm_save_draft, |
| 762 | 811 | .with_frm_style a.frm_start_over{ |
| 763 | - <?php if ( ! empty( $defaults['font'] ) ) { ?> | |
| 764 | - font-family: var(--font); | |
| 812 | +<?php if ( ! empty( $defaults['font'] ) ) { ?> | |
| 813 | + font-family:<?php echo FrmAppHelper::kses( $defaults['font'] ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>; | |
| 814 | + font-family:var(--font); | |
| 765 | 815 | <?php } ?> |
| 766 | - font-size: var(--submit-font-size); | |
| 767 | - font-weight: var(--submit-weight); | |
| 816 | + font-size:<?php echo esc_html( $defaults['submit_font_size'] ); ?>; | |
| 817 | + font-size:var(--submit-font-size); | |
| 818 | + font-weight:<?php echo esc_html( $defaults['submit_weight'] ); ?>; | |
| 819 | + font-weight:var(--submit-weight); | |
| 768 | 820 | } |
| 769 | -<?php } ?> | |
| 770 | 821 | |
| 771 | 822 | .horizontal_radio .frm_radio{ |
| 772 | 823 | margin:0 5px 0 0; |
| 773 | 824 | } |
| @@ -773,9 +824,9 @@ | ||
| 773 | 824 | } |
| 774 | 825 | |
| 775 | 826 | .horizontal_radio .frm_checkbox{ |
| 776 | 827 | margin:0; |
| 777 | - margin-right:12px; | |
| 828 | + margin-right:5px; | |
| 778 | 829 | } |
| 779 | 830 | |
| 780 | 831 | .vertical_radio .frm_checkbox, |
| 781 | 832 | .vertical_radio .frm_radio, |
| @@ -790,13 +841,15 @@ | ||
| 790 | 841 | padding-left: 0; |
| 791 | 842 | } |
| 792 | 843 | |
| 793 | 844 | .with_frm_style .frm_radio{ |
| 794 | - display: var(--radio-align)<?php echo esc_html( $important ); ?>; | |
| 845 | + display:<?php echo esc_html( $defaults['radio_align'] . $important ); ?>; | |
| 846 | + display:var(--radio-align)<?php echo esc_html( $important ); ?>; | |
| 795 | 847 | } |
| 796 | 848 | |
| 797 | 849 | .with_frm_style .frm_checkbox{ |
| 798 | - display: var(--check-align)<?php echo esc_html( $important ); ?>; | |
| 850 | + display:<?php echo esc_html( $defaults['check_align'] . $important ); ?>; | |
| 851 | + display:var(--check-align)<?php echo esc_html( $important ); ?>; | |
| 799 | 852 | } |
| 800 | 853 | |
| 801 | 854 | .with_frm_style .vertical_radio .frm_checkbox, |
| 802 | 855 | .with_frm_style .vertical_radio .frm_radio, |
| @@ -801,9 +854,8 @@ | ||
| 801 | 854 | .with_frm_style .vertical_radio .frm_checkbox, |
| 802 | 855 | .with_frm_style .vertical_radio .frm_radio, |
| 803 | 856 | .vertical_radio .frm_catlevel_1{ |
| 804 | 857 | display:block<?php echo esc_html( $important ); ?>; |
| 805 | - margin-bottom: 10px; | |
| 806 | 858 | } |
| 807 | 859 | |
| 808 | 860 | .with_frm_style .horizontal_radio .frm_checkbox, |
| 809 | 861 | .with_frm_style .horizontal_radio .frm_radio, |
| @@ -811,45 +863,40 @@ | ||
| 811 | 863 | display:inline-block<?php echo esc_html( $important ); ?>; |
| 812 | 864 | } |
| 813 | 865 | |
| 814 | 866 | .with_frm_style .frm_checkbox label, |
| 815 | -.with_frm_style .frm_radio label { | |
| 816 | - display: inline-block; | |
| 817 | - vertical-align: middle; | |
| 867 | +.with_frm_style .frm_radio label{ | |
| 868 | + display: inline; | |
| 818 | 869 | white-space:normal; |
| 819 | 870 | } |
| 820 | 871 | |
| 821 | -.with_frm_style .frm_checkbox label input[type=checkbox], | |
| 822 | -.with_frm_style .frm_radio label input[type=radio] { | |
| 823 | - margin-right: 4px; | |
| 824 | -} | |
| 825 | - | |
| 826 | -.with_frm_style .frm_checkbox label:not(.frm-label-disabled), | |
| 827 | -.with_frm_style .frm_radio label:not(.frm-label-disabled) { | |
| 828 | - cursor: pointer; | |
| 829 | -} | |
| 830 | - | |
| 831 | 872 | .with_frm_style .vertical_radio .frm_checkbox label, |
| 832 | 873 | .with_frm_style .vertical_radio .frm_radio label{ |
| 833 | 874 | display: block; |
| 834 | - width: 100%; | |
| 875 | + padding-left: 20px; | |
| 876 | + text-indent: -20px; | |
| 835 | 877 | } |
| 836 | 878 | |
| 837 | 879 | .with_frm_style .frm_radio label, |
| 838 | -.with_frm_style .frm_checkbox label { | |
| 880 | +.with_frm_style .frm_checkbox label{ | |
| 839 | 881 | <?php if ( ! empty( $defaults['font'] ) ) { ?> |
| 840 | - font-family: var(--font); | |
| 882 | + font-family:<?php echo FrmAppHelper::kses( $defaults['font'] ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>; | |
| 883 | + font-family:var(--font); | |
| 841 | 884 | <?php } ?> |
| 842 | - font-size: var(--check-font-size)<?php echo esc_html( $important ); ?>; | |
| 843 | - color: var(--check-label-color)<?php echo esc_html( $important ); ?>; | |
| 844 | - font-weight: var(--check-weight)<?php echo esc_html( $important ); ?>; | |
| 885 | + font-size:<?php echo esc_html( $defaults['check_font_size'] . $important ); ?>; | |
| 886 | + font-size:var(--check-font-size)<?php echo esc_html( $important ); ?>; | |
| 887 | + color:<?php echo esc_html( $defaults['check_label_color'] . $important ); ?>; | |
| 888 | + color:var(--check-label-color)<?php echo esc_html( $important ); ?>; | |
| 889 | + font-weight:<?php echo esc_html( $defaults['check_weight'] . $important ); ?>; | |
| 890 | + font-weight:var(--check-weight)<?php echo esc_html( $important ); ?>; | |
| 845 | 891 | line-height: 1.3; |
| 846 | 892 | } |
| 847 | 893 | |
| 848 | 894 | .with_frm_style .frm_radio input[type=radio], |
| 849 | 895 | .with_frm_style .frm_checkbox input[type=checkbox] { |
| 850 | - font-size: var(--check-font-size)<?php echo esc_html( $important ); ?>; | |
| 851 | - position: static<?php echo esc_html( $important ); ?>; | |
| 896 | + font-size:<?php echo esc_html( $defaults['check_font_size'] . $important ); ?>; | |
| 897 | + font-size:var(--check-font-size)<?php echo esc_html( $important ); ?>; | |
| 898 | + position:static<?php echo esc_html( $important ); ?>; | |
| 852 | 899 | } |
| 853 | 900 | |
| 854 | 901 | .frm_file_container .frm_file_link, |
| 855 | 902 | .with_frm_style .frm_radio label .frm_file_container, |
| @@ -859,9 +906,9 @@ | ||
| 859 | 906 | vertical-align:middle; |
| 860 | 907 | } |
| 861 | 908 | |
| 862 | 909 | .with_frm_style .frm_radio input[type=radio] |
| 863 | -<?php if ( $pro_is_installed ) : ?> | |
| 910 | +<?php if ( FrmAppHelper::pro_is_installed() ) : ?> | |
| 864 | 911 | , .with_frm_style .frm_scale input[type=radio] |
| 865 | 912 | <?php endif; ?> |
| 866 | 913 | { |
| 867 | 914 | border-radius:50%; |
| @@ -866,14 +913,14 @@ | ||
| 866 | 913 | { |
| 867 | 914 | border-radius:50%; |
| 868 | 915 | } |
| 869 | 916 | |
| 870 | -.with_frm_style .frm_checkbox input[type=checkbox] { | |
| 871 | - border-radius: calc(var(--border-radius) / 2) !important; | |
| 917 | +.with_frm_style .frm_checkbox input[type=checkbox]{ | |
| 918 | + border-radius:0; | |
| 872 | 919 | } |
| 873 | 920 | |
| 874 | 921 | .with_frm_style .frm_radio input[type=radio], |
| 875 | -<?php if ( $pro_is_installed ) : ?> | |
| 922 | +<?php if ( FrmAppHelper::pro_is_installed() ) : ?> | |
| 876 | 923 | .with_frm_style .frm_scale input[type=radio], |
| 877 | 924 | <?php endif; ?> |
| 878 | 925 | .with_frm_style .frm_checkbox input[type=checkbox]{ |
| 879 | 926 | appearance: none; |
| @@ -879,83 +926,48 @@ | ||
| 879 | 926 | appearance: none; |
| 880 | 927 | background-color: var(--bg-color); |
| 881 | 928 | flex: none; |
| 882 | 929 | display:inline-block !important; |
| 883 | - width: 16px !important; | |
| 884 | - min-width: 16px !important; | |
| 885 | - height: 16px !important; | |
| 930 | + margin: 0 5px 0 0; | |
| 886 | 931 | color: var(--border-color); |
| 932 | + width: 18px; | |
| 933 | + min-width: 18px; | |
| 934 | + height: 18px; | |
| 887 | 935 | border: 1px solid currentColor; |
| 888 | 936 | border-color: var(--border-color); |
| 889 | 937 | vertical-align: middle; |
| 890 | 938 | position: initial; /* override Bootstrap */ |
| 891 | 939 | padding: 0; |
| 892 | - margin: 0; | |
| 893 | 940 | } |
| 894 | 941 | |
| 895 | -.frm_forms.with_frm_style .frm_fields_container .frm_radio input[type=radio]:not([disabled]):checked, | |
| 896 | -<?php if ( $pro_is_installed ) : ?> | |
| 897 | -.frm_forms.with_frm_style .frm_fields_container .frm_scale input[type=radio]:not([disabled]):checked, | |
| 942 | +.with_frm_style .frm_radio input[type=radio]:before, | |
| 943 | +<?php if ( FrmAppHelper::pro_is_installed() ) : ?> | |
| 944 | +.with_frm_style .frm_scale input[type=radio]:before, | |
| 898 | 945 | <?php endif; ?> |
| 899 | -.frm_forms.with_frm_style .frm_fields_container .frm_checkbox input[type=checkbox]:not([disabled]):checked { | |
| 900 | - border-color: var(--border-color-active) !important; | |
| 946 | +.with_frm_style .frm_checkbox input[type=checkbox]:before { | |
| 947 | + content: ''; | |
| 948 | + width: 12px; | |
| 949 | + height: 12px; | |
| 950 | + border-radius: 50%; | |
| 951 | + transform: scale(0); | |
| 952 | + transition: 120ms transform ease-in-out; | |
| 953 | + box-shadow: inset 10px 10px var(--text-color); | |
| 954 | + display: block; | |
| 955 | + margin: 2px 0 0 2px; | |
| 901 | 956 | } |
| 902 | 957 | |
| 903 | -.frm_forms.with_frm_style .frm_fields_container .frm_checkbox input[type=checkbox]:not([disabled]):checked { | |
| 904 | - background-color: var(--border-color-active) !important; | |
| 958 | +.with_frm_style .frm_checkbox input[type=checkbox]:before{ | |
| 959 | + clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%); | |
| 960 | + border-radius: 0; | |
| 905 | 961 | } |
| 906 | 962 | |
| 907 | -.with_frm_style .frm_radio input[type=radio][disabled]:checked, | |
| 908 | -<?php if ( $pro_is_installed ) : ?> | |
| 909 | -.with_frm_style .frm_scale input[type=radio][disabled]:checked, | |
| 910 | -<?php endif; ?> | |
| 911 | -.with_frm_style .frm_checkbox input[type=checkbox][disabled]:checked { | |
| 912 | - border-color: var(--border-color) !important; /* Override Style Preview */ | |
| 913 | -} | |
| 914 | - | |
| 915 | -.with_frm_style .frm_checkbox input[type=checkbox][disabled]:checked { | |
| 916 | - background-color: var(--border-color) !important; | |
| 917 | -} | |
| 918 | - | |
| 919 | 963 | .with_frm_style .frm_radio input[type=radio]:checked:before, |
| 920 | -<?php if ( $pro_is_installed ) { ?> | |
| 921 | -.with_frm_style .frm_scale input[type=radio]:checked:before, | |
| 922 | -<?php } ?> | |
| 923 | 964 | .with_frm_style .frm_checkbox input[type=checkbox]:checked:before { |
| 924 | - position: static !important; /* Override Style Preview */ | |
| 925 | - content: ''; | |
| 926 | - display: block; | |
| 965 | + transform: scale(1); | |
| 927 | 966 | } |
| 928 | 967 | |
| 929 | -.frm_forms.with_frm_style .frm_checkbox input[type=checkbox]:before { | |
| 930 | - width: 100% !important; | |
| 931 | - height: 100% !important; | |
| 932 | - background-image: url("data:image/svg+xml,%3Csvg width='12' height='9' viewBox='0 0 12 9' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10.6667 1.5L4.25001 7.91667L1.33334 5' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A") !important; | |
| 933 | - background-size: 9px !important; | |
| 934 | - background-repeat: no-repeat !important; | |
| 935 | - background-position: center !important; | |
| 936 | - margin: 0; | |
| 937 | -} | |
| 938 | - | |
| 939 | -<?php if ( $pro_is_installed ) { ?> | |
| 940 | -.with_frm_style .frm_scale input[type=radio]:before, | |
| 941 | -<?php } ?> | |
| 942 | -.with_frm_style .frm_radio input[type=radio]:before { | |
| 943 | - width: 8px; | |
| 944 | - height: 8px; | |
| 945 | - border-radius: 50%; | |
| 946 | - background-color: var(--border-color-active); | |
| 947 | - margin: 3px; | |
| 948 | -} | |
| 949 | - | |
| 950 | -<?php if ( $pro_is_installed ) { ?> | |
| 951 | -.with_frm_style .frm_scale input[type=radio][disabled]:before, | |
| 952 | -<?php } ?> | |
| 953 | -.with_frm_style .frm_radio input[type=radio][disabled]:before { | |
| 954 | - background-color: var(--border-color); | |
| 955 | -} | |
| 956 | - | |
| 957 | 968 | .with_frm_style :invalid, |
| 969 | +.with_frm_style :-moz-submit-invalid, | |
| 958 | 970 | .with_frm_style :-moz-ui-invalid{ |
| 959 | 971 | box-shadow:none; |
| 960 | 972 | } |
| 961 | 973 | |
| @@ -975,25 +987,27 @@ | ||
| 975 | 987 | border-radius:4px; |
| 976 | 988 | padding:15px; |
| 977 | 989 | } |
| 978 | 990 | |
| 979 | -.with_frm_style .frm_message p { | |
| 980 | - color: var(--success-text-color)<?php echo esc_html( $important ); ?>; | |
| 981 | - margin-bottom: 0; | |
| 991 | +.with_frm_style .frm_message p{ | |
| 992 | + margin-bottom:5px; | |
| 993 | + color:<?php echo esc_html( $defaults['success_text_color'] ); ?>; | |
| 994 | + color:var(--success-text-color)<?php echo esc_html( $important ); ?>; | |
| 982 | 995 | } |
| 983 | 996 | |
| 984 | -.with_frm_style .frm_message > p:first-of-type { | |
| 985 | - margin-top: 0; | |
| 986 | -} | |
| 987 | - | |
| 988 | 997 | .with_frm_style .frm_message, |
| 989 | -.frm_success_style { | |
| 990 | - margin: 5px 0 15px; | |
| 991 | - border: 1px solid var(--success-border-color); | |
| 992 | - background-color: var(--success-bg-color); | |
| 993 | - color: var(--success-text-color)<?php echo esc_html( $important ); ?>; | |
| 994 | - border-radius: var(--border-radius); | |
| 995 | - font-size: var(--success-font-size)<?php echo esc_html( $important ); ?>; | |
| 998 | +.frm_success_style{ | |
| 999 | + margin:5px 0 15px; | |
| 1000 | + border:1px solid <?php echo esc_html( $defaults['success_border_color'] ); ?>; | |
| 1001 | + border-color:var(--success-border-color); | |
| 1002 | + background-color:<?php echo esc_html( $defaults['success_bg_color'] ); ?>; | |
| 1003 | + background-color:var(--success-bg-color); | |
| 1004 | + color:<?php echo esc_html( $defaults['success_text_color'] ); ?>; | |
| 1005 | + color:var(--success-text-color)<?php echo esc_html( $important ); ?>; | |
| 1006 | + border-radius:<?php echo esc_html( $defaults['border_radius'] ); ?>; | |
| 1007 | + border-radius:var(--border-radius); | |
| 1008 | + font-size:<?php echo esc_html( $defaults['success_font_size'] ); ?>; | |
| 1009 | + font-size:var(--success-font-size)<?php echo esc_html( $important ); ?>; | |
| 996 | 1010 | } |
| 997 | 1011 | |
| 998 | 1012 | .with_frm_style .frm_plain_success .frm_message { |
| 999 | 1013 | background-color: transparent; |
| @@ -1029,9 +1043,10 @@ | ||
| 1029 | 1043 | padding:5px; |
| 1030 | 1044 | border-width:1px; |
| 1031 | 1045 | border-style:solid; |
| 1032 | 1046 | <?php if ( ! empty( $defaults['border_color'] ) ) { ?> |
| 1033 | - border-color: var(--border-color); | |
| 1047 | + border-color:<?php echo esc_html( $defaults['border_color'] ); ?>; | |
| 1048 | + border-color:var(--border-color); | |
| 1034 | 1049 | <?php } ?> |
| 1035 | 1050 | border-top:none; |
| 1036 | 1051 | border-left:none; |
| 1037 | 1052 | border-right:none; |
| @@ -1046,9 +1061,10 @@ | ||
| 1046 | 1061 | } |
| 1047 | 1062 | |
| 1048 | 1063 | <?php if ( ! empty( $defaults['border_color'] ) ) { ?> |
| 1049 | 1064 | .with_frm_style .frm-alt-table{ |
| 1050 | - border-color: var(--border-color); | |
| 1065 | + border-color:<?php echo esc_html( $defaults['border_color'] ); ?>; | |
| 1066 | + border-color:var(--border-color); | |
| 1051 | 1067 | } |
| 1052 | 1068 | <?php } ?> |
| 1053 | 1069 | |
| 1054 | 1070 | .frm-alt-table th { |
| @@ -1071,28 +1087,27 @@ | ||
| 1071 | 1087 | .frm-alt-table tr:nth-child(even) { |
| 1072 | 1088 | background-color:<?php echo esc_html( FrmStylesHelper::adjust_brightness( $defaults['border_color'], 45 ) ); ?>; |
| 1073 | 1089 | } |
| 1074 | 1090 | |
| 1075 | -<?php if ( $pro_is_installed ) { ?> | |
| 1076 | 1091 | table.form_results.with_frm_style{ |
| 1077 | - border-style: solid; | |
| 1078 | - border-width: var(--field-border-width)<?php echo esc_html( $important ); ?>; | |
| 1079 | - border-color: var(--border-color)<?php echo esc_html( $important ); ?>; | |
| 1092 | + border:<?php echo esc_html( $defaults['field_border_width'] ); ?> solid <?php echo esc_html( $defaults['border_color'] . $important ); ?>; | |
| 1093 | + border-width:var(--field-border-width)<?php echo esc_html( $important ); ?>; | |
| 1094 | + border-color:var(--border-color)<?php echo esc_html( $important ); ?>; | |
| 1080 | 1095 | } |
| 1081 | 1096 | |
| 1082 | 1097 | table.form_results.with_frm_style tr td{ |
| 1083 | 1098 | text-align:left; |
| 1084 | 1099 | padding:7px 9px; |
| 1085 | - <?php if ( ! empty( $defaults['text_color'] ) ) { ?> | |
| 1086 | - color: var(--text-color)<?php echo esc_html( $important ); ?>; | |
| 1100 | +<?php if ( ! empty( $defaults['text_color'] ) ) { ?> | |
| 1101 | + color:<?php echo esc_html( $defaults['text_color'] ); ?>; | |
| 1102 | + color:var(--text-color)<?php echo esc_html( $important ); ?>; | |
| 1087 | 1103 | <?php } ?> |
| 1088 | - <?php if ( ! empty( $defaults['border_color'] ) ) { ?> | |
| 1089 | - border-top-style: solid; | |
| 1090 | - border-top-width: var(--field-border-width)<?php echo esc_html( $important ); ?>; | |
| 1091 | - border-top-color: var(--border-color)<?php echo esc_html( $important ); ?>; | |
| 1104 | +<?php if ( ! empty( $defaults['border_color'] ) ) { ?> | |
| 1105 | + border-top:1px solid <?php echo esc_html( $defaults['border_color'] ); ?>; | |
| 1106 | + border-top-width:var(--field-border-width)<?php echo esc_html( $important ); ?>; | |
| 1107 | + border-top-color:var(--border-color)<?php echo esc_html( $important ); ?>; | |
| 1092 | 1108 | <?php } ?> |
| 1093 | 1109 | } |
| 1094 | -<?php } ?> | |
| 1095 | 1110 | |
| 1096 | 1111 | table.form_results.with_frm_style tr.frm_even, |
| 1097 | 1112 | .frm-grid .frm_even{ |
| 1098 | 1113 | background-color:#fff; |
| @@ -1100,10 +1115,11 @@ | ||
| 1100 | 1115 | } |
| 1101 | 1116 | |
| 1102 | 1117 | <?php if ( ! empty( $defaults['bg_color'] ) ) { ?> |
| 1103 | 1118 | table.form_results.with_frm_style tr.frm_odd, |
| 1104 | -.frm-grid .frm_odd { | |
| 1105 | - background-color: var(--bg-color)<?php echo esc_html( $important ); ?>; | |
| 1119 | +.frm-grid .frm_odd{ | |
| 1120 | + background-color:<?php echo esc_html( $defaults['bg_color'] ); ?>; | |
| 1121 | + background-color:var(--bg-color)<?php echo esc_html( $important ); ?>; | |
| 1106 | 1122 | } |
| 1107 | 1123 | <?php } ?> |
| 1108 | 1124 | |
| 1109 | 1125 | <?php if ( ! empty( $defaults['border_color'] ) ) { ?> |
| @@ -1111,23 +1127,18 @@ | ||
| 1111 | 1127 | background-color:<?php echo esc_html( FrmStylesHelper::adjust_brightness( $defaults['border_color'], 45 ) ); ?>; |
| 1112 | 1128 | padding: 40px; |
| 1113 | 1129 | } |
| 1114 | 1130 | |
| 1115 | - <?php if ( $pro_is_installed ) { ?> | |
| 1116 | 1131 | .with_frm_style .frm-show-form .frm_color_block.frm_section_heading h3, |
| 1117 | 1132 | .frm_color_block.frm_section_heading h3 { |
| 1118 | 1133 | border-width: 0 !important; |
| 1119 | 1134 | } |
| 1120 | - <?php } ?> | |
| 1121 | 1135 | <?php } ?> |
| 1122 | 1136 | |
| 1123 | -<?php if ( $pro_is_installed ) { ?> | |
| 1124 | 1137 | .frm_collapse .ui-icon{ |
| 1125 | 1138 | display:inline-block; |
| 1126 | 1139 | } |
| 1127 | -<?php } ?> | |
| 1128 | 1140 | |
| 1129 | -<?php if ( $pro_is_installed ) { ?> | |
| 1130 | 1141 | .frm_toggle_container{ |
| 1131 | 1142 | /* Prevent the slide and bounce */ |
| 1132 | 1143 | border:1px solid transparent; |
| 1133 | 1144 | } |
| @@ -1144,11 +1155,9 @@ | ||
| 1144 | 1155 | |
| 1145 | 1156 | .frm_toggle_container .frm_month_listing{ |
| 1146 | 1157 | margin-left:40px; |
| 1147 | 1158 | } |
| 1148 | -<?php } ?> | |
| 1149 | 1159 | |
| 1150 | -<?php if ( $pro_is_installed ) { ?> | |
| 1151 | 1160 | #frm_loading{ |
| 1152 | 1161 | display:none; |
| 1153 | 1162 | position:fixed; |
| 1154 | 1163 | top:0; |
| @@ -1191,30 +1200,28 @@ | ||
| 1191 | 1200 | #frm_loading .progress.active .progress-bar{ |
| 1192 | 1201 | animation:2s linear 0s normal none infinite progress-bar-stripes; |
| 1193 | 1202 | } |
| 1194 | 1203 | |
| 1195 | - <?php if ( ! empty( $defaults['bg_color'] ) ) { ?> | |
| 1196 | -#frm_loading .progress-striped .progress-bar { | |
| 1197 | - <?php if ( ! empty( $defaults['border_color'] ) ) { ?> | |
| 1198 | - 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 | +<?php if ( ! empty( $defaults['bg_color'] ) ) { ?> | |
| 1205 | +#frm_loading .progress-striped .progress-bar{ | |
| 1206 | + <?php if ( ! empty( $defaults['border_color'] ) ) { ?> | |
| 1207 | + background-image:linear-gradient(45deg, <?php echo esc_html( $defaults['border_color'] ); ?> 25%, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, 0) 50%, <?php echo esc_html( $defaults['border_color'] ); ?> 50%, <?php echo esc_html( $defaults['border_color'] ); ?> 75%, rgba(0, 0, 0, 0) 75%, rgba(0, 0, 0, 0)); | |
| 1199 | 1208 | <?php } ?> |
| 1200 | 1209 | background-size:40px 40px; |
| 1201 | 1210 | } |
| 1202 | 1211 | <?php } ?> |
| 1203 | 1212 | |
| 1204 | -#frm_loading .progress-bar { | |
| 1205 | - background-color: var(--bg-color); | |
| 1206 | - box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.15) inset; | |
| 1207 | - float: left; | |
| 1208 | - height: 100%; | |
| 1209 | - line-height: 20px; | |
| 1210 | - text-align: center; | |
| 1211 | - transition: width 0.6s ease 0s; | |
| 1212 | - width: 100%; | |
| 1213 | +#frm_loading .progress-bar{ | |
| 1214 | + background-color:<?php echo esc_html( $defaults['bg_color'] ); ?>; | |
| 1215 | + background-color:var(--bg-color); | |
| 1216 | + box-shadow:0 -1px 0 rgba(0, 0, 0, 0.15) inset; | |
| 1217 | + float:left; | |
| 1218 | + height:100%; | |
| 1219 | + line-height:20px; | |
| 1220 | + text-align:center; | |
| 1221 | + transition:width 0.6s ease 0s; | |
| 1222 | + width:100%; | |
| 1213 | 1223 | } |
| 1214 | - <?php | |
| 1215 | -}//end if | |
| 1216 | -?> | |
| 1217 | 1224 | |
| 1218 | 1225 | .frm_image_from_url{ |
| 1219 | 1226 | height:50px; |
| 1220 | 1227 | } |
| @@ -1223,9 +1230,8 @@ | ||
| 1223 | 1230 | background:url(../images/ajax_loader.gif) no-repeat center center; |
| 1224 | 1231 | padding:6px 12px; |
| 1225 | 1232 | } |
| 1226 | 1233 | |
| 1227 | -<?php if ( $pro_is_installed ) { ?> | |
| 1228 | 1234 | select.frm_loading_lookup{ |
| 1229 | 1235 | background-image: url(../images/ajax_loader.gif) !important; |
| 1230 | 1236 | background-position: 10px; |
| 1231 | 1237 | background-repeat: no-repeat; |
| @@ -1230,25 +1236,20 @@ | ||
| 1230 | 1236 | background-position: 10px; |
| 1231 | 1237 | background-repeat: no-repeat; |
| 1232 | 1238 | color: transparent !important; |
| 1233 | 1239 | } |
| 1234 | -<?php } ?> | |
| 1235 | 1240 | |
| 1236 | 1241 | <?php readfile( __DIR__ . '/frm_grids.css' ); ?> |
| 1237 | 1242 | |
| 1238 | -<?php if ( $pro_is_installed ) { ?> | |
| 1239 | 1243 | .frm_conf_field.frm_left_container .frm_primary_label{ |
| 1240 | 1244 | display:none; |
| 1241 | 1245 | } |
| 1242 | -<?php } ?> | |
| 1243 | 1246 | |
| 1244 | -<?php if ( $pro_is_installed ) { ?> | |
| 1245 | 1247 | .wp-editor-wrap *, |
| 1246 | 1248 | .wp-editor-wrap *:after, |
| 1247 | 1249 | .wp-editor-wrap *:before{ |
| 1248 | 1250 | box-sizing:content-box; |
| 1249 | 1251 | } |
| 1250 | -<?php } ?> | |
| 1251 | 1252 | |
| 1252 | 1253 | .with_frm_style .frm_grid, |
| 1253 | 1254 | .with_frm_style .frm_grid_first, |
| 1254 | 1255 | .with_frm_style .frm_grid_odd{ |
| @@ -1257,9 +1258,10 @@ | ||
| 1257 | 1258 | padding:5px; |
| 1258 | 1259 | border-width:1px; |
| 1259 | 1260 | border-style:solid; |
| 1260 | 1261 | <?php if ( ! empty( $defaults['border_color'] ) ) { ?> |
| 1261 | - border-color: var(--border-color)<?php echo esc_html( $important ); ?>; | |
| 1262 | + border-color:<?php echo esc_html( $defaults['border_color'] ); ?>; | |
| 1263 | + border-color:var(--border-color)<?php echo esc_html( $important ); ?>; | |
| 1262 | 1264 | <?php } ?> |
| 1263 | 1265 | border-left:none; |
| 1264 | 1266 | border-right:none; |
| 1265 | 1267 | } |
| @@ -1294,16 +1296,18 @@ | ||
| 1294 | 1296 | } |
| 1295 | 1297 | |
| 1296 | 1298 | <?php if ( ! empty( $defaults['bg_color'] ) ) { ?> |
| 1297 | 1299 | .frm_grid_first, |
| 1298 | -.frm_grid_odd { | |
| 1299 | - background-color: var(--bg-color); | |
| 1300 | +.frm_grid_odd{ | |
| 1301 | + background-color:<?php echo esc_html( $defaults['bg_color'] ); ?>; | |
| 1302 | + background-color:var(--bg-color); | |
| 1300 | 1303 | } |
| 1301 | 1304 | <?php } ?> |
| 1302 | 1305 | |
| 1303 | 1306 | <?php if ( ! empty( $defaults['bg_color_active'] ) ) { ?> |
| 1304 | -.frm_grid { | |
| 1305 | - background-color: var(--bg-color-active)<?php echo esc_html( $important ); ?>; | |
| 1307 | +.frm_grid{ | |
| 1308 | + background-color:<?php echo esc_html( $defaults['bg_color_active'] . $important ); ?>; | |
| 1309 | + background-color:var(--bg-color-active)<?php echo esc_html( $important ); ?>; | |
| 1306 | 1310 | } |
| 1307 | 1311 | <?php } ?> |
| 1308 | 1312 | |
| 1309 | 1313 | .with_frm_style .frm_grid.frm_blank_field, |
| @@ -1308,10 +1312,12 @@ | ||
| 1308 | 1312 | |
| 1309 | 1313 | .with_frm_style .frm_grid.frm_blank_field, |
| 1310 | 1314 | .with_frm_style .frm_grid_first.frm_blank_field, |
| 1311 | 1315 | .with_frm_style .frm_grid_odd.frm_blank_field{ |
| 1316 | + background-color:<?php echo esc_html( $defaults['error_bg'] . $important ); ?>; | |
| 1312 | 1317 | background-color:var(--error-bg)<?php echo esc_html( $important ); ?>; |
| 1313 | - border-color: var(--error-border); | |
| 1318 | + border-color:<?php echo esc_html( $defaults['error_border'] ); ?>; | |
| 1319 | + border-color:var(--error-bg); | |
| 1314 | 1320 | } |
| 1315 | 1321 | |
| 1316 | 1322 | .frm_grid .frm_primary_label, |
| 1317 | 1323 | .frm_grid_first .frm_primary_label, |
| @@ -1333,10 +1339,9 @@ | ||
| 1333 | 1339 | .frm_grid_odd .frm_radio label, |
| 1334 | 1340 | .frm_grid_first .frm_checkbox label, |
| 1335 | 1341 | .frm_grid .frm_checkbox label, |
| 1336 | 1342 | .frm_grid_odd .frm_checkbox label{ |
| 1337 | - color:transparent; | |
| 1338 | - text-indent: -9999px; | |
| 1343 | + visibility:hidden; | |
| 1339 | 1344 | white-space:nowrap; |
| 1340 | 1345 | text-align:left; |
| 1341 | 1346 | } |
| 1342 | 1347 | |
| @@ -1462,18 +1467,8 @@ | ||
| 1462 | 1467 | .frm_form_field.frm_left_container .frm_opt_container{ |
| 1463 | 1468 | padding-top:4px; |
| 1464 | 1469 | } |
| 1465 | 1470 | |
| 1466 | -.with_frm_style .frm_left_container > select.auto_width, | |
| 1467 | -.with_frm_style .frm_right_container > select.auto_width { | |
| 1468 | - width: max-content<?php echo esc_html( $important ); ?>; | |
| 1469 | -} | |
| 1470 | - | |
| 1471 | -.with_frm_style .frm_right_container > .frm_primary_label, | |
| 1472 | -.with_frm_style .frm_right_container > select.auto_width { | |
| 1473 | - margin-left: auto<?php echo esc_html( $important ); ?>; | |
| 1474 | -} | |
| 1475 | - | |
| 1476 | 1471 | .with_frm_style .frm_inline_container.frm_grid_first .frm_primary_label, |
| 1477 | 1472 | .with_frm_style .frm_inline_container.frm_grid .frm_primary_label, |
| 1478 | 1473 | .with_frm_style .frm_inline_container.frm_grid_odd .frm_primary_label, |
| 1479 | 1474 | .with_frm_style .frm_inline_container.frm_grid_first .frm_opt_container, |
| @@ -1508,9 +1503,11 @@ | ||
| 1508 | 1503 | grid-column-end: span 1; |
| 1509 | 1504 | } |
| 1510 | 1505 | |
| 1511 | 1506 | .frm_form_field .frm_checkbox, |
| 1512 | -.frm_form_field .frm_radio { | |
| 1507 | +.frm_form_field .frm_checkbox + .frm_checkbox, | |
| 1508 | +.frm_form_field .frm_radio, | |
| 1509 | +.frm_form_field .frm_radio + .frm_radio{ | |
| 1513 | 1510 | margin-top: 0; |
| 1514 | 1511 | margin-bottom: 0; |
| 1515 | 1512 | } |
| 1516 | 1513 | |
| @@ -1519,24 +1516,32 @@ | ||
| 1519 | 1516 | overflow:auto; |
| 1520 | 1517 | } |
| 1521 | 1518 | |
| 1522 | 1519 | .frm_html_container.frm_scroll_box, |
| 1523 | -.frm_form_field.frm_html_scroll_box { | |
| 1524 | - height: 100px; | |
| 1525 | - overflow: auto; | |
| 1526 | - background-color: var(--bg-color); | |
| 1527 | - border-color: var(--border-color); | |
| 1528 | - border-width: var(--field-border-width); | |
| 1529 | - border-style: var(--field-border-style); | |
| 1530 | - border-radius: var(--border-radius); | |
| 1531 | - width: var(--field-width); | |
| 1532 | - max-width: 100%; | |
| 1533 | - font-size: var(--field-font-size); | |
| 1534 | - padding: var(--field-pad); | |
| 1535 | - box-sizing: border-box; | |
| 1536 | - outline: none<?php echo esc_html( $important ); ?>; | |
| 1537 | - font-weight: normal; | |
| 1538 | - box-shadow: var(--box-shadow); | |
| 1520 | +.frm_form_field.frm_html_scroll_box{ | |
| 1521 | + height:100px; | |
| 1522 | + overflow:auto; | |
| 1523 | + background-color:<?php echo esc_html( $defaults['bg_color'] ); ?>; | |
| 1524 | + background-color:var(--bg-color); | |
| 1525 | + border-color:<?php echo esc_html( $defaults['border_color'] ); ?>; | |
| 1526 | + border-color:var(--border-color); | |
| 1527 | + border-width:<?php echo esc_html( $defaults['field_border_width'] ); ?>; | |
| 1528 | + border-width:var(--field-border-width); | |
| 1529 | + border-style:<?php echo esc_html( $defaults['field_border_style'] ); ?>; | |
| 1530 | + border-style:var(--field-border-style); | |
| 1531 | + border-radius:<?php echo esc_html( $defaults['border_radius'] ); ?>; | |
| 1532 | + border-radius:var(--border-radius); | |
| 1533 | + width:<?php echo esc_html( $defaults['field_width'] ); ?>; | |
| 1534 | + width:var(--field-width); | |
| 1535 | + max-width:100%; | |
| 1536 | + font-size:<?php echo esc_html( $defaults['field_font_size'] ); ?>; | |
| 1537 | + font-size:var(--field-font-size); | |
| 1538 | + padding:<?php echo esc_html( $defaults['field_pad'] ); ?>; | |
| 1539 | + padding:var(--field-pad); | |
| 1540 | + box-sizing:border-box; | |
| 1541 | + outline:none<?php echo esc_html( $important ); ?>; | |
| 1542 | + font-weight:normal; | |
| 1543 | + box-shadow:var(--box-shadow); | |
| 1539 | 1544 | } |
| 1540 | 1545 | |
| 1541 | 1546 | .frm_form_field.frm_total_big input, |
| 1542 | 1547 | .frm_form_field.frm_total_big textarea, |
| @@ -1604,9 +1609,8 @@ | ||
| 1604 | 1609 | /** |
| 1605 | 1610 | * Call action so other plugins can add additional CSS. |
| 1606 | 1611 | * |
| 1607 | 1612 | * @param array $args { |
| 1608 | - * | |
| 1609 | 1613 | * @type array $defaults |
| 1610 | 1614 | * } |
| 1611 | 1615 | */ |
| 1612 | 1616 | do_action( 'frm_include_front_css', compact( 'defaults' ) ); |
| @@ -1613,9 +1617,8 @@ | ||
| 1613 | 1617 | ?> |
| 1614 | 1618 | |
| 1615 | 1619 | /* Responsive */ |
| 1616 | 1620 | |
| 1617 | -<?php if ( $pro_is_installed ) { ?> | |
| 1618 | 1621 | @media only screen and (max-width: 900px) { |
| 1619 | 1622 | .frm_form_field .frm_repeat_grid .frm_form_field.frm_sixth .frm_primary_label, |
| 1620 | 1623 | .frm_form_field .frm_repeat_grid .frm_form_field.frm_seventh .frm_primary_label, |
| 1621 | 1624 | .frm_form_field .frm_repeat_grid .frm_form_field.frm_eighth .frm_primary_label{ |
| @@ -1621,9 +1624,8 @@ | ||
| 1621 | 1624 | .frm_form_field .frm_repeat_grid .frm_form_field.frm_eighth .frm_primary_label{ |
| 1622 | 1625 | display: block !important; |
| 1623 | 1626 | } |
| 1624 | 1627 | } |
| 1625 | -<?php } ?> | |
| 1626 | 1628 | |
| 1627 | 1629 | @media only screen and (max-width: 600px) { |
| 1628 | 1630 | .frm_form_field.frm_four_col .frm_opt_container{ |
| 1629 | 1631 | grid-template-columns: repeat(2, 1fr); |
| @@ -1628,14 +1630,12 @@ | ||
| 1628 | 1630 | .frm_form_field.frm_four_col .frm_opt_container{ |
| 1629 | 1631 | grid-template-columns: repeat(2, 1fr); |
| 1630 | 1632 | } |
| 1631 | 1633 | |
| 1632 | - <?php if ( $pro_is_installed ) { ?> | |
| 1633 | 1634 | .with_frm_style .frm_repeat_inline, |
| 1634 | 1635 | .with_frm_style .frm_repeat_grid{ |
| 1635 | 1636 | margin: 20px 0; |
| 1636 | 1637 | } |
| 1637 | - <?php } ?> | |
| 1638 | 1638 | } |
| 1639 | 1639 | |
| 1640 | 1640 | @media only screen and (max-width: 500px) { |
| 1641 | 1641 | .frm_form_field.frm_two_col .frm_radio, |
| @@ -1667,18 +1667,7 @@ | ||
| 1667 | 1667 | .with_frm_style .frm-g-recaptcha iframe{ |
| 1668 | 1668 | width:100%; |
| 1669 | 1669 | } |
| 1670 | 1670 | } |
| 1671 | - | |
| 1672 | -.frm-card-element .sq-card-wrapper .sq-card-message { | |
| 1673 | - margin-bottom: 0; | |
| 1674 | -} | |
| 1675 | -.frm-card-errors:empty { | |
| 1676 | - margin: 0; | |
| 1677 | -} | |
| 1678 | 1671 | <?php |
| 1679 | 1672 | |
| 1680 | -$frm_custom_css = strip_tags( FrmStylesController::get_custom_css() ); | |
| 1681 | - | |
| 1682 | -if ( $frm_custom_css ) { | |
| 1683 | - echo FrmStylesHelper::maybe_scope_css_for_admin( $frm_custom_css ) . PHP_EOL; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped | |
| 1684 | -} | |
| 1673 | +echo strip_tags( FrmStylesController::get_custom_css() ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped | |