| @@ -5,15 +5,13 @@ | ||
| 5 | 5 | |
| 6 | 6 | $settings = FrmStylesHelper::get_settings_for_output( $style ); |
| 7 | 7 | extract( $settings ); // phpcs:ignore WordPress.PHP.DontExtract |
| 8 | 8 | |
| 9 | -$is_loaded_via_ajax = $is_loaded_via_ajax ?? false; | |
| 10 | -FrmStylesPreviewHelper::get_additional_preview_style( $settings, $is_loaded_via_ajax ); | |
| 9 | +$important = empty( $important_style ) ? '' : ' !important'; | |
| 11 | 10 | |
| 12 | -$important = ! empty( $important_style ) ? ' !important' : ''; | |
| 13 | -$submit_bg_img = FrmStylesHelper::get_submit_image_bg_url( $settings ); | |
| 14 | -$use_chosen_js = $use_chosen_js ?? FrmStylesHelper::use_chosen_js(); | |
| 15 | -$pro_is_installed = $pro_is_installed ?? FrmAppHelper::pro_is_installed(); | |
| 11 | +$minus_icons = FrmStylesHelper::minus_icons(); | |
| 12 | +$arrow_icons = FrmStylesHelper::arrow_icons(); | |
| 13 | + | |
| 16 | 14 | ?> |
| 17 | 15 | .<?php echo esc_html( $style_class ); ?>{ |
| 18 | 16 | <?php FrmStylesHelper::output_vars( $settings, $defaults ); ?> |
| 19 | 17 | } |
| @@ -18,11 +16,11 @@ | ||
| 18 | 16 | <?php FrmStylesHelper::output_vars( $settings, $defaults ); ?> |
| 19 | 17 | } |
| 20 | 18 | |
| 21 | 19 | .frm_forms.<?php echo esc_html( $style_class ); ?>{ |
| 22 | - max-width:var(--form-width)<?php echo esc_html( $important ); ?>; | |
| 23 | - direction:var(--direction)<?php echo esc_html( $important ); ?>; | |
| 24 | - <?php if ( 'rtl' === $direction ) { ?> | |
| 20 | + max-width:<?php echo esc_html( $form_width . $important ); ?>; | |
| 21 | + direction:<?php echo esc_html( $direction . $important ); ?>; | |
| 22 | + <?php if ( 'rtl' == $direction ) { ?> | |
| 25 | 23 | unicode-bidi:embed; |
| 26 | 24 | <?php } ?> |
| 27 | 25 | <?php if ( $center_form ) { ?> |
| 28 | 26 | margin:0 auto; |
| @@ -34,34 +32,65 @@ | ||
| 34 | 32 | text-align:center; |
| 35 | 33 | } |
| 36 | 34 | <?php } ?> |
| 37 | 35 | |
| 36 | +<?php if ( ! empty( $label_color ) ) { ?> | |
| 37 | +.<?php echo esc_html( $style_class ); ?> .frm_icon_font{ | |
| 38 | + color:<?php echo esc_html( $label_color . $important ); ?>; | |
| 39 | +} | |
| 40 | +<?php } ?> | |
| 41 | + | |
| 42 | +.<?php echo esc_html( $style_class ); ?> .frm_icon_font.frm_minus_icon:before{ | |
| 43 | + content:"\e<?php echo esc_html( isset( $minus_icons[ $repeat_icon ] ) ? $minus_icons[ $repeat_icon ]['-'] : $minus_icons[1]['-'] ); ?>"; | |
| 44 | +} | |
| 45 | + | |
| 46 | +.<?php echo esc_html( $style_class ); ?> .frm_icon_font.frm_plus_icon:before{ | |
| 47 | + content:"\e<?php echo esc_html( isset( $minus_icons[ $repeat_icon ] ) ? $minus_icons[ $repeat_icon ]['+'] : $minus_icons[1]['+'] ); ?>"; | |
| 48 | +} | |
| 49 | + | |
| 50 | +.<?php echo esc_html( $style_class ); ?> .frm_icon_font.frm_minus_icon:before, | |
| 51 | +.<?php echo esc_html( $style_class ); ?> .frm_icon_font.frm_plus_icon:before{ | |
| 52 | + <?php if ( ! empty( $submit_text_color ) ) { ?> | |
| 53 | + color:<?php echo esc_html( $submit_text_color . $important ); ?>; | |
| 54 | + <?php } ?> | |
| 55 | + vertical-align:middle; | |
| 56 | +} | |
| 57 | + | |
| 58 | +.<?php echo esc_html( $style_class ); ?> .frm_trigger.active .frm_icon_font.frm_arrow_icon:before{ | |
| 59 | + content:"\e<?php echo esc_html( isset( $arrow_icons[ $collapse_icon ] ) ? $arrow_icons[ $collapse_icon ]['-'] : $arrow_icons[1]['-'] ); ?>"; | |
| 60 | + <?php if ( ! empty( $section_color ) ) { ?> | |
| 61 | + color:<?php echo esc_html( $section_color . $important ); ?>; | |
| 62 | + <?php } ?> | |
| 63 | +} | |
| 64 | + | |
| 65 | +.<?php echo esc_html( $style_class ); ?> .frm_trigger .frm_icon_font.frm_arrow_icon:before{ | |
| 66 | + content:"\e<?php echo esc_html( isset( $arrow_icons[ $collapse_icon ] ) ? $arrow_icons[ $collapse_icon ]['+'] : $arrow_icons[1]['+'] ); ?>"; | |
| 67 | + <?php if ( ! empty( $section_color ) ) { ?> | |
| 68 | + color:<?php echo esc_html( $section_color . $important ); ?>; | |
| 69 | + <?php } ?> | |
| 70 | +} | |
| 71 | + | |
| 38 | 72 | <?php if ( ! empty( $field_margin ) ) { ?> |
| 39 | 73 | .<?php echo esc_html( $style_class ); ?> .form-field{ |
| 40 | - margin-bottom:var(--field-margin)<?php echo esc_html( $important ); ?>; | |
| 74 | + margin-bottom:<?php echo esc_html( $field_margin . $important ); ?>; | |
| 41 | 75 | } |
| 42 | 76 | <?php } ?> |
| 43 | 77 | |
| 44 | -<?php if ( $pro_is_installed ) { ?> | |
| 45 | 78 | .<?php echo esc_html( $style_class ); ?> .form-field.frm_section_heading{ |
| 46 | 79 | margin-bottom:0<?php echo esc_html( $important ); ?>; |
| 47 | 80 | } |
| 48 | -<?php } ?> | |
| 49 | 81 | |
| 50 | 82 | .<?php echo esc_html( $style_class ); ?> p.description, |
| 51 | 83 | .<?php echo esc_html( $style_class ); ?> div.description, |
| 52 | 84 | .<?php echo esc_html( $style_class ); ?> div.frm_description, |
| 53 | 85 | .<?php echo esc_html( $style_class ); ?> .frm-show-form > div.frm_description, |
| 54 | -.<?php echo esc_html( $style_class ); ?> .frm_error, | |
| 55 | -.<?php echo esc_html( $style_class ); ?> .frm_pro_max_limit_desc{ | |
| 86 | +.<?php echo esc_html( $style_class ); ?> .frm_error{ | |
| 56 | 87 | <?php if ( ! empty( $description_margin ) ) { ?> |
| 57 | 88 | margin:<?php echo esc_html( $description_margin . $important ); ?>; |
| 58 | - <?php } else { ?> | |
| 59 | - margin-top: 6px; | |
| 60 | 89 | <?php } ?> |
| 61 | 90 | padding:0; |
| 62 | 91 | <?php if ( ! empty( $font ) ) { ?> |
| 63 | - font-family:<?php FrmAppHelper::kses_echo( $font . $important ); ?>; | |
| 92 | + font-family:<?php echo FrmAppHelper::kses( $font . $important ); // WPCS: XSS ok. ?>; | |
| 64 | 93 | <?php } ?> |
| 65 | 94 | <?php if ( ! empty( $description_font_size ) ) { ?> |
| 66 | 95 | font-size:<?php echo esc_html( $description_font_size . $important ); ?>; |
| 67 | 96 | <?php } ?> |
| @@ -82,8 +111,10 @@ | ||
| 82 | 111 | |
| 83 | 112 | /* Left and right labels */ |
| 84 | 113 | <?php |
| 85 | 114 | |
| 115 | +$frm_settings = FrmAppHelper::get_settings(); | |
| 116 | + | |
| 86 | 117 | if ( '' === $field_height || 'auto' === $field_height ) { |
| 87 | 118 | foreach ( array( 'left', 'right', 'inline' ) as $alignit ) { |
| 88 | 119 | ?> |
| 89 | 120 | .<?php echo esc_html( $style_class ); ?> .frm_<?php echo esc_html( $alignit ); ?>_container input[type=text], |
| @@ -96,9 +127,13 @@ | ||
| 96 | 127 | .<?php echo esc_html( $style_class ); ?> .frm_<?php echo esc_html( $alignit ); ?>_container input[type=search], |
| 97 | 128 | .<?php echo esc_html( $style_class ); ?> .frm_<?php echo esc_html( $alignit ); ?>_container select, |
| 98 | 129 | <?php } ?> |
| 99 | 130 | .<?php echo esc_html( $style_class ); ?> .frm_left_container select{ |
| 100 | - height:fit-content<?php echo esc_html( $important ); ?>; | |
| 131 | + <?php if ( $frm_settings->old_css ) { ?> | |
| 132 | + height:auto<?php echo esc_html( $important ); ?>; | |
| 133 | + <?php } else { ?> | |
| 134 | + height:fit-content<?php echo esc_html( $important ); ?>; | |
| 135 | + <?php } ?> | |
| 101 | 136 | } |
| 102 | 137 | <?php } ?> |
| 103 | 138 | |
| 104 | 139 | .<?php echo esc_html( $style_class ); ?> .frm_form_field.frm_left_container{ |
| @@ -119,9 +154,9 @@ | ||
| 119 | 154 | } |
| 120 | 155 | |
| 121 | 156 | .<?php echo esc_html( $style_class ); ?> .frm_pos_right{ |
| 122 | 157 | display:inline<?php echo esc_html( $important ); ?>; |
| 123 | - width:var(--width)<?php echo esc_html( $important ); ?>; | |
| 158 | + width:<?php echo esc_html( $width . $important ); ?>; | |
| 124 | 159 | } |
| 125 | 160 | |
| 126 | 161 | .<?php echo esc_html( $style_class ); ?> .frm_none_container .frm_primary_label, |
| 127 | 162 | .<?php echo esc_html( $style_class ); ?> .frm_pos_none{ |
| @@ -127,15 +162,14 @@ | ||
| 127 | 162 | .<?php echo esc_html( $style_class ); ?> .frm_pos_none{ |
| 128 | 163 | display:none<?php echo esc_html( $important ); ?>; |
| 129 | 164 | } |
| 130 | 165 | |
| 131 | -<?php if ( $pro_is_installed ) : ?> | |
| 132 | 166 | .<?php echo esc_html( $style_class ); ?> .frm_scale label{ |
| 133 | 167 | <?php if ( ! empty( $check_weight ) ) { ?> |
| 134 | 168 | font-weight:<?php echo esc_html( $check_weight . $important ); ?>; |
| 135 | 169 | <?php } ?> |
| 136 | 170 | <?php if ( ! empty( $font ) ) { ?> |
| 137 | - font-family:<?php FrmAppHelper::kses_echo( $font . $important ); ?>; | |
| 171 | + font-family:<?php echo FrmAppHelper::kses( $font . $important ); // WPCS: XSS ok. ?>; | |
| 138 | 172 | <?php } ?> |
| 139 | 173 | <?php if ( ! empty( $check_font_size ) ) { ?> |
| 140 | 174 | font-size:<?php echo esc_html( $check_font_size . $important ); ?>; |
| 141 | 175 | <?php } ?> |
| @@ -142,30 +176,44 @@ | ||
| 142 | 176 | <?php if ( ! empty( $check_label_color ) ) { ?> |
| 143 | 177 | color:<?php echo esc_html( $check_label_color . $important ); ?>; |
| 144 | 178 | <?php } ?> |
| 145 | 179 | } |
| 146 | -<?php endif; ?> | |
| 147 | 180 | |
| 181 | +/* These do not work if they are combined */ | |
| 148 | 182 | .<?php echo esc_html( $style_class ); ?> input::placeholder, |
| 149 | 183 | .<?php echo esc_html( $style_class ); ?> textarea::placeholder{ |
| 150 | - color:var(--text-color-disabled)<?php echo esc_html( $important ); ?>; | |
| 184 | + color: <?php echo esc_html( $text_color_disabled . $important ); ?>; | |
| 151 | 185 | } |
| 186 | +.<?php echo esc_html( $style_class ); ?> input::-webkit-input-placeholder, | |
| 187 | +.<?php echo esc_html( $style_class ); ?> textarea::-webkit-input-placeholder{ | |
| 188 | + color: <?php echo esc_html( $text_color_disabled . $important ); ?>; | |
| 189 | +} | |
| 190 | +.<?php echo esc_html( $style_class ); ?> input::-moz-placeholder, | |
| 191 | +.<?php echo esc_html( $style_class ); ?> textarea::-moz-placeholder{ | |
| 192 | + color: <?php echo esc_html( $text_color_disabled . $important ); ?>; | |
| 193 | +} | |
| 194 | +.<?php echo esc_html( $style_class ); ?> input:-ms-input-placeholder, | |
| 195 | +<?php echo esc_html( $style_class ); ?> textarea:-ms-input-placeholder{ | |
| 196 | + color: <?php echo esc_html( $text_color_disabled . $important ); ?>; | |
| 197 | +} | |
| 198 | +.<?php echo esc_html( $style_class ); ?> input:-moz-placeholder, | |
| 199 | +.<?php echo esc_html( $style_class ); ?> textarea:-moz-placeholder{ | |
| 200 | + color: <?php echo esc_html( $text_color_disabled . $important ); ?>; | |
| 201 | +} | |
| 152 | 202 | |
| 153 | 203 | .<?php echo esc_html( $style_class ); ?> .frm_default, |
| 154 | 204 | .<?php echo esc_html( $style_class ); ?> input.frm_default, |
| 155 | 205 | .<?php echo esc_html( $style_class ); ?> textarea.frm_default, |
| 156 | 206 | .<?php echo esc_html( $style_class ); ?> select.frm_default, |
| 157 | -<?php if ( $use_chosen_js ) { ?> | |
| 207 | +.<?php echo esc_html( $style_class ); ?> .placeholder, | |
| 158 | 208 | .<?php echo esc_html( $style_class ); ?> .chosen-container-multi .chosen-choices li.search-field .default, |
| 159 | -.<?php echo esc_html( $style_class ); ?> .chosen-container-single .chosen-default, | |
| 160 | -<?php } ?> | |
| 161 | -.<?php echo esc_html( $style_class ); ?> .placeholder { | |
| 162 | - color:var(--text-color-disabled)<?php echo esc_html( $important ); ?>; | |
| 209 | +.<?php echo esc_html( $style_class ); ?> .chosen-container-single .chosen-default{ | |
| 210 | + color: <?php echo esc_html( $text_color_disabled . $important ); ?>; | |
| 163 | 211 | } |
| 164 | 212 | |
| 165 | -.<?php echo esc_html( $style_class ); ?> .form-field input:not([type=file]):not([type=range]):not([readonly]):focus, | |
| 213 | +.<?php echo esc_html( $style_class ); ?> .form-field input:not([type=file]):focus, | |
| 166 | 214 | .<?php echo esc_html( $style_class ); ?> select:focus, |
| 167 | -.<?php echo esc_html( $style_class ); ?> .form-field textarea:focus, | |
| 215 | +.<?php echo esc_html( $style_class ); ?> textarea:focus, | |
| 168 | 216 | .<?php echo esc_html( $style_class ); ?> .frm_focus_field input[type=text], |
| 169 | 217 | .<?php echo esc_html( $style_class ); ?> .frm_focus_field input[type=password], |
| 170 | 218 | .<?php echo esc_html( $style_class ); ?> .frm_focus_field input[type=email], |
| 171 | 219 | .<?php echo esc_html( $style_class ); ?> .frm_focus_field input[type=number], |
| @@ -172,36 +220,30 @@ | ||
| 172 | 220 | .<?php echo esc_html( $style_class ); ?> .frm_focus_field input[type=url], |
| 173 | 221 | .<?php echo esc_html( $style_class ); ?> .frm_focus_field input[type=tel], |
| 174 | 222 | .<?php echo esc_html( $style_class ); ?> .frm_focus_field input[type=search], |
| 175 | 223 | .frm_form_fields_active_style, |
| 176 | -<?php if ( $use_chosen_js ) { ?> | |
| 224 | +.<?php echo esc_html( $style_class ); ?> .frm_focus_field .frm-card-element.StripeElement, | |
| 177 | 225 | .<?php echo esc_html( $style_class ); ?> .chosen-container-single.chosen-container-active .chosen-single, |
| 178 | -.<?php echo esc_html( $style_class ); ?> .chosen-container-active .chosen-choices, | |
| 179 | -<?php } ?> | |
| 180 | -.<?php echo esc_html( $style_class ); ?> .frm_focus_field .frm-card-element.StripeElement { | |
| 181 | - background-color:var(--bg-color-active)<?php echo esc_html( $important ); ?>; | |
| 182 | - border-color:var(--border-color-active)<?php echo esc_html( $important ); ?>; | |
| 183 | - color:var(--text-color); | |
| 184 | - <?php if ( ! empty( $remove_box_shadow_active ) ) { ?> | |
| 226 | +.<?php echo esc_html( $style_class ); ?> .chosen-container-active .chosen-choices{ | |
| 227 | + background-color:<?php echo esc_html( $bg_color_active . $important ); ?>; | |
| 228 | + border-color:<?php echo esc_html( $border_color_active . $important ); ?>; | |
| 229 | + <?php if ( isset( $remove_box_shadow_active ) && $remove_box_shadow_active ) { ?> | |
| 185 | 230 | box-shadow:none; |
| 186 | - outline: none; | |
| 187 | 231 | <?php } else { ?> |
| 188 | - box-shadow:0px 0px 5px 0px rgba(<?php echo esc_html( FrmStylesHelper::hex2rgb( $border_color_active ) ); ?>, 0.6); | |
| 232 | + box-shadow:0 1px 1px rgba(0, 0, 0, 0.075) inset, 0 0 8px rgba(<?php echo esc_html( FrmStylesHelper::hex2rgb( $border_color_active ) ); ?>, 0.6); | |
| 189 | 233 | <?php } ?> |
| 190 | 234 | } |
| 191 | 235 | |
| 192 | 236 | <?php if ( ! $submit_style ) { ?> |
| 193 | - <?php if ( $pro_is_installed ) { ?> | |
| 194 | 237 | .<?php echo esc_html( $style_class ); ?> .frm_compact .frm_dropzone.dz-clickable .dz-message, |
| 195 | -.<?php echo esc_html( $style_class ); ?> .frm-edit-page-btn, | |
| 196 | - <?php } ?> | |
| 197 | 238 | .<?php echo esc_html( $style_class ); ?> input[type=submit], |
| 198 | 239 | .<?php echo esc_html( $style_class ); ?> .frm_submit input[type=button], |
| 199 | 240 | .<?php echo esc_html( $style_class ); ?> .frm_submit button, |
| 200 | -.frm_form_submit_style { | |
| 201 | - width:<?php echo esc_html( ( $submit_width == '' ? 'auto' : $submit_width ) . $important ); // phpcs:ignore Universal.Operators.StrictComparisons ?>; | |
| 241 | +.frm_form_submit_style, | |
| 242 | +.<?php echo esc_html( $style_class ); ?> .frm-edit-page-btn { | |
| 243 | + width:<?php echo esc_html( ( $submit_width == '' ? 'auto' : $submit_width ) . $important ); ?>; | |
| 202 | 244 | <?php if ( ! empty( $font ) ) { ?> |
| 203 | - font-family:<?php FrmAppHelper::kses_echo( $font ); ?>; | |
| 245 | + font-family:<?php echo FrmAppHelper::kses( $font ); // WPCS: XSS ok. ?>; | |
| 204 | 246 | <?php } ?> |
| 205 | 247 | font-size:<?php echo esc_html( $submit_font_size . $important ); ?>; |
| 206 | 248 | height:<?php echo esc_html( $submit_height . $important ); ?>; |
| 207 | 249 | line-height:normal<?php echo esc_html( $important ); ?>; |
| @@ -208,9 +250,8 @@ | ||
| 208 | 250 | text-align:center; |
| 209 | 251 | background: |
| 210 | 252 | <?php |
| 211 | 253 | echo esc_html( $submit_bg_color ); |
| 212 | - | |
| 213 | 254 | if ( ! empty( $submit_bg_img ) ) { |
| 214 | 255 | echo esc_html( ' url(' . $submit_bg_img . ')' ); |
| 215 | 256 | } |
| 216 | 257 | echo esc_html( $important ); |
| @@ -215,27 +256,31 @@ | ||
| 215 | 256 | } |
| 216 | 257 | echo esc_html( $important ); |
| 217 | 258 | ?> |
| 218 | 259 | ; |
| 219 | - <?php if ( '' !== $submit_border_width ) : ?> | |
| 220 | 260 | border-width:<?php echo esc_html( $submit_border_width ); ?>; |
| 221 | - <?php endif; ?> | |
| 222 | 261 | border-color: <?php echo esc_html( $submit_border_color . $important ); ?>; |
| 223 | 262 | border-style:solid; |
| 224 | 263 | color:<?php echo esc_html( $submit_text_color . $important ); ?>; |
| 225 | 264 | cursor:pointer; |
| 226 | 265 | font-weight:<?php echo esc_html( $submit_weight . $important ); ?>; |
| 266 | + -moz-border-radius:<?php echo esc_html( $submit_border_radius . $important ); ?>; | |
| 267 | + -webkit-border-radius:<?php echo esc_html( $submit_border_radius . $important ); ?>; | |
| 227 | 268 | border-radius:<?php echo esc_html( $submit_border_radius . $important ); ?>; |
| 228 | 269 | text-shadow:none; |
| 229 | 270 | padding:<?php echo esc_html( $submit_padding . $important ); ?>; |
| 271 | + -moz-box-sizing:border-box; | |
| 230 | 272 | box-sizing:border-box; |
| 273 | + -ms-box-sizing:border-box; | |
| 231 | 274 | <?php if ( ! empty( $submit_shadow_color ) ) { ?> |
| 275 | + -moz-box-shadow:0 1px 1px <?php echo esc_html( $submit_shadow_color ); ?>; | |
| 276 | + -webkit-box-shadow:0 1px 1px <?php echo esc_html( $submit_shadow_color ); ?>; | |
| 232 | 277 | box-shadow:0 1px 1px <?php echo esc_html( $submit_shadow_color ); ?>; |
| 233 | 278 | <?php } ?> |
| 234 | 279 | margin:<?php echo esc_html( $submit_margin ); ?>; |
| 235 | 280 | <?php |
| 236 | 281 | // For reverse compatibility... But allow "10px 10px". |
| 237 | - if ( ! str_contains( trim( $submit_margin ), ' ' ) ) { | |
| 282 | + if ( strpos( trim( $submit_margin ), ' ' ) === false ) { | |
| 238 | 283 | ?> |
| 239 | 284 | margin-left:0; |
| 240 | 285 | margin-right:0; |
| 241 | 286 | <?php } ?> |
| @@ -241,33 +286,27 @@ | ||
| 241 | 286 | <?php } ?> |
| 242 | 287 | vertical-align:middle; |
| 243 | 288 | } |
| 244 | 289 | |
| 245 | - <?php if ( $pro_is_installed ) { ?> | |
| 246 | 290 | .<?php echo esc_html( $style_class ); ?> .frm_compact .frm_dropzone.dz-clickable .dz-message{ |
| 247 | 291 | margin:0; |
| 248 | 292 | } |
| 249 | - <?php } ?> | |
| 250 | 293 | |
| 251 | 294 | <?php if ( empty( $submit_bg_img ) ) { ?> |
| 252 | - <?php if ( $pro_is_installed ) { ?> | |
| 253 | 295 | .<?php echo esc_html( $style_class ); ?> .frm-edit-page-btn:hover, |
| 254 | - <?php } ?> | |
| 255 | 296 | .<?php echo esc_html( $style_class ); ?> input[type=submit]:hover, |
| 256 | 297 | .<?php echo esc_html( $style_class ); ?> .frm_submit input[type=button]:hover, |
| 257 | 298 | .<?php echo esc_html( $style_class ); ?> .frm_submit button:hover{ |
| 258 | - background:var(--submit-hover-bg-color)<?php echo esc_html( $important ); ?>; | |
| 259 | - border-color:var(--submit-hover-border-color)<?php echo esc_html( $important ); ?>; | |
| 260 | - color:var(--submit-hover-color)<?php echo esc_html( $important ); ?>; | |
| 299 | + background: <?php echo esc_html( $submit_hover_bg_color . $important ); ?>; | |
| 300 | + border-color: <?php echo esc_html( $submit_hover_border_color . $important ); ?>; | |
| 301 | + color: <?php echo esc_html( $submit_hover_color . $important ); ?>; | |
| 261 | 302 | } |
| 262 | 303 | |
| 263 | 304 | .<?php echo esc_html( $style_class ); ?>.frm_center_submit .frm_submit .frm_ajax_loading{ |
| 264 | - margin-bottom:<?php echo esc_html( FrmStylesHelper::get_bottom_value( $submit_margin ) ); ?>; | |
| 305 | + margin-bottom:<?php echo esc_html( $submit_margin ); ?>; | |
| 265 | 306 | } |
| 266 | 307 | |
| 267 | - <?php if ( $pro_is_installed ) { ?> | |
| 268 | 308 | .<?php echo esc_html( $style_class ); ?> .frm-edit-page-btn:focus, |
| 269 | - <?php } ?> | |
| 270 | 309 | .<?php echo esc_html( $style_class ); ?> input[type=submit]:focus, |
| 271 | 310 | .<?php echo esc_html( $style_class ); ?> .frm_submit input[type=button]:focus, |
| 272 | 311 | .<?php echo esc_html( $style_class ); ?> .frm_submit button:focus, |
| 273 | 312 | .<?php echo esc_html( $style_class ); ?> input[type=submit]:active, |
| @@ -272,45 +311,39 @@ | ||
| 272 | 311 | .<?php echo esc_html( $style_class ); ?> .frm_submit button:focus, |
| 273 | 312 | .<?php echo esc_html( $style_class ); ?> input[type=submit]:active, |
| 274 | 313 | .<?php echo esc_html( $style_class ); ?> .frm_submit input[type=button]:active, |
| 275 | 314 | .<?php echo esc_html( $style_class ); ?> .frm_submit button:active{ |
| 276 | - background:var(--submit-active-bg-color)<?php echo esc_html( $important ); ?>; | |
| 277 | - border-color:var(--submit-active-border-color)<?php echo esc_html( $important ); ?>; | |
| 278 | - color:var(--submit-active-color)<?php echo esc_html( $important ); ?>; | |
| 279 | - outline: none; | |
| 315 | + background: <?php echo esc_html( $submit_active_bg_color . $important ); ?>; | |
| 316 | + border-color: <?php echo esc_html( $submit_active_border_color . $important ); ?>; | |
| 317 | + color: <?php echo esc_html( $submit_active_color . $important ); ?>; | |
| 280 | 318 | } |
| 281 | 319 | |
| 282 | - <?php if ( $pro_is_installed ) { ?> | |
| 283 | 320 | .<?php echo esc_html( $style_class ); ?> .frm_loading_prev .frm_prev_page, |
| 284 | 321 | .<?php echo esc_html( $style_class ); ?> .frm_loading_prev .frm_prev_page:hover, |
| 285 | 322 | .<?php echo esc_html( $style_class ); ?> .frm_loading_prev .frm_prev_page:active, |
| 286 | 323 | .<?php echo esc_html( $style_class ); ?> .frm_loading_prev .frm_prev_page:focus, |
| 287 | - <?php } ?> | |
| 288 | 324 | .<?php echo esc_html( $style_class ); ?> .frm_loading_form .frm_button_submit, |
| 289 | 325 | .<?php echo esc_html( $style_class ); ?> .frm_loading_form .frm_button_submit:hover, |
| 290 | 326 | .<?php echo esc_html( $style_class ); ?> .frm_loading_form .frm_button_submit:active, |
| 291 | 327 | .<?php echo esc_html( $style_class ); ?> .frm_loading_form .frm_button_submit:focus{ |
| 292 | - color: transparent<?php echo esc_html( $important ); ?>; | |
| 293 | - background:var(--submit-bg-color)<?php echo esc_html( $important ); ?>; | |
| 294 | - border-color:var(--submit-bg-color)<?php echo esc_html( $important ); ?>; | |
| 328 | + color: transparent <?php echo esc_html( $important ); ?>; | |
| 329 | + background: <?php echo esc_html( $submit_bg_color . $important ); ?>; | |
| 295 | 330 | } |
| 296 | 331 | |
| 297 | - <?php if ( $pro_is_installed ) { ?> | |
| 298 | 332 | .<?php echo esc_html( $style_class ); ?> .frm_loading_prev .frm_prev_page:before, |
| 299 | - <?php } ?> | |
| 300 | 333 | .<?php echo esc_html( $style_class ); ?> .frm_loading_form .frm_button_submit:before { |
| 301 | - border-bottom-color:var(--submit-text-color)<?php echo esc_html( $important ); ?>; | |
| 302 | - border-right-color:var(--submit-text-color)<?php echo esc_html( $important ); ?>; | |
| 334 | + border-bottom-color: <?php echo esc_html( $submit_text_color . $important ); ?>; | |
| 335 | + border-right-color: <?php echo esc_html( $submit_text_color . $important ); ?>; | |
| 303 | 336 | <?php if ( $submit_height !== 'auto' ) { ?> |
| 304 | - max-height:var(--submit-height)<?php echo esc_html( $important ); ?>; | |
| 337 | + max-height:<?php echo esc_html( $submit_height ); ?>; | |
| 305 | 338 | <?php } ?> |
| 306 | 339 | <?php if ( $submit_width !== 'auto' ) { ?> |
| 307 | - max-width:var(--submit-width)<?php echo esc_html( $important ); ?>; | |
| 340 | + max-width:<?php echo esc_html( $submit_width ); ?>; | |
| 308 | 341 | <?php } ?> |
| 309 | 342 | } |
| 310 | 343 | <?php |
| 311 | - }//end if | |
| 312 | -}//end if | |
| 344 | + } | |
| 345 | +} | |
| 313 | 346 | ?> |
| 314 | 347 | |
| 315 | 348 | .<?php echo esc_html( $style_class ); ?>.frm_inline_top .frm_submit::before, |
| 316 | 349 | .<?php echo esc_html( $style_class ); ?> .frm_submit.frm_inline_submit::before { |
| @@ -315,15 +348,15 @@ | ||
| 315 | 348 | .<?php echo esc_html( $style_class ); ?>.frm_inline_top .frm_submit::before, |
| 316 | 349 | .<?php echo esc_html( $style_class ); ?> .frm_submit.frm_inline_submit::before { |
| 317 | 350 | content:"before"; |
| 318 | 351 | <?php if ( ! empty( $font ) ) { ?> |
| 319 | - font-family:<?php FrmAppHelper::kses_echo( $font ); ?>; | |
| 352 | + font-family:<?php echo FrmAppHelper::kses( $font ); // WPCS: XSS ok. ?>; | |
| 320 | 353 | <?php } ?> |
| 321 | - font-size:var(--font-size)<?php echo esc_html( $important ); ?>; | |
| 322 | - color:var(--label-color)<?php echo esc_html( $important ); ?>; | |
| 323 | - font-weight:var(--weight)<?php echo esc_html( $important ); ?>; | |
| 354 | + font-size:<?php echo esc_html( $font_size . $important ); ?>; | |
| 355 | + color:<?php echo esc_html( $label_color . $important ); ?>; | |
| 356 | + font-weight:<?php echo esc_html( $weight . $important ); ?>; | |
| 324 | 357 | margin:0; |
| 325 | - padding:var(--label-padding)<?php echo esc_html( $important ); ?>; | |
| 358 | + padding:<?php echo esc_html( $label_padding . $important ); ?>; | |
| 326 | 359 | width:auto; |
| 327 | 360 | display:block; |
| 328 | 361 | visibility:hidden; |
| 329 | 362 | } |
| @@ -334,24 +367,17 @@ | ||
| 334 | 367 | .<?php echo esc_html( $style_class ); ?> .frm_submit.frm_inline_submit button { |
| 335 | 368 | margin: 0 !important; |
| 336 | 369 | } |
| 337 | 370 | |
| 338 | -<?php | |
| 339 | -// Only include this CSS when the math captcha plugin is active. | |
| 340 | -if ( class_exists( 'FrmCptController' ) ) : | |
| 341 | - ?> | |
| 342 | 371 | .<?php echo esc_html( $style_class ); ?> #frm_field_cptch_number_container{ |
| 343 | 372 | <?php if ( ! empty( $font ) ) { ?> |
| 344 | - font-family:<?php FrmAppHelper::kses_echo( $font ); ?>; | |
| 373 | + font-family:<?php echo FrmAppHelper::kses( $font ); // WPCS: XSS ok. ?>; | |
| 345 | 374 | <?php } ?> |
| 346 | - font-size:var(--font-size)<?php echo esc_html( $important ); ?>; | |
| 347 | - color:var(--label-color)<?php echo esc_html( $important ); ?>; | |
| 348 | - font-weight:var(--weight)<?php echo esc_html( $important ); ?>; | |
| 375 | + font-size:<?php echo esc_html( $font_size . $important ); ?>; | |
| 376 | + color:<?php echo esc_html( $label_color . $important ); ?>; | |
| 377 | + font-weight:<?php echo esc_html( $weight . $important ); ?>; | |
| 349 | 378 | clear:both; |
| 350 | 379 | } |
| 351 | - <?php | |
| 352 | -endif; | |
| 353 | -?> | |
| 354 | 380 | |
| 355 | 381 | .<?php echo esc_html( $style_class ); ?> .frm_blank_field input[type=text], |
| 356 | 382 | .<?php echo esc_html( $style_class ); ?> .frm_blank_field input[type=password], |
| 357 | 383 | .<?php echo esc_html( $style_class ); ?> .frm_blank_field input[type=url], |
| @@ -357,67 +383,55 @@ | ||
| 357 | 383 | .<?php echo esc_html( $style_class ); ?> .frm_blank_field input[type=url], |
| 358 | 384 | .<?php echo esc_html( $style_class ); ?> .frm_blank_field input[type=tel], |
| 359 | 385 | .<?php echo esc_html( $style_class ); ?> .frm_blank_field input[type=number], |
| 360 | 386 | .<?php echo esc_html( $style_class ); ?> .frm_blank_field input[type=email], |
| 361 | -.<?php echo esc_html( $style_class ); ?> .frm_blank_field input[type=checkbox], | |
| 362 | -.<?php echo esc_html( $style_class ); ?> .frm_blank_field input[type=radio], | |
| 363 | 387 | .<?php echo esc_html( $style_class ); ?> .frm_blank_field textarea, |
| 364 | -<?php if ( $pro_is_installed ) { ?> | |
| 365 | 388 | .<?php echo esc_html( $style_class ); ?> .frm_blank_field .mce-edit-area iframe, |
| 366 | -<?php } ?> | |
| 367 | -.<?php echo esc_html( $style_class ); ?> .frm_blank_field select:not(.ui-datepicker-month):not(.ui-datepicker-year), | |
| 389 | +.<?php echo esc_html( $style_class ); ?> .frm_blank_field select, | |
| 368 | 390 | .frm_form_fields_error_style, |
| 369 | 391 | .<?php echo esc_html( $style_class ); ?> .frm_blank_field .frm-g-recaptcha iframe, |
| 370 | 392 | .<?php echo esc_html( $style_class ); ?> .frm_blank_field .g-recaptcha iframe, |
| 371 | 393 | .<?php echo esc_html( $style_class ); ?> .frm_blank_field .frm-card-element.StripeElement, |
| 372 | -<?php if ( $use_chosen_js ) { ?> | |
| 373 | 394 | .<?php echo esc_html( $style_class ); ?> .frm_blank_field .chosen-container-multi .chosen-choices, |
| 374 | 395 | .<?php echo esc_html( $style_class ); ?> .frm_blank_field .chosen-container-single .chosen-single, |
| 375 | -<?php } ?> | |
| 376 | -.<?php echo esc_html( $style_class ); ?> .frm_form_field :invalid { | |
| 377 | - color:var(--text-color-error)<?php echo esc_html( $important ); ?>; | |
| 378 | - background-color:var(--bg-color-error)<?php echo esc_html( $important ); ?>; | |
| 379 | - border-color:var(--border-color-error)<?php echo esc_html( $important ); ?>; | |
| 380 | - border-width:var(--border-width-error)<?php echo esc_html( $important ); ?>; | |
| 381 | - border-style:var(--border-style-error)<?php echo esc_html( $important ); ?>; | |
| 396 | +.<?php echo esc_html( $style_class ); ?> .frm_form_field :invalid{ | |
| 397 | + color:<?php echo esc_html( $text_color_error . $important ); ?>; | |
| 398 | + background-color:<?php echo esc_html( $bg_color_error . $important ); ?>; | |
| 399 | + border-color:<?php echo esc_html( $border_color_error . $important ); ?>; | |
| 400 | + border-width:<?php echo esc_html( $border_width_error . $important ); ?>; | |
| 401 | + border-style:<?php echo esc_html( $border_style_error . $important ); ?>; | |
| 382 | 402 | } |
| 383 | 403 | |
| 384 | -<?php | |
| 385 | -// Only include this style when the signatures add-on is active | |
| 386 | -if ( class_exists( 'FrmSigField' ) ) : | |
| 387 | - ?> | |
| 388 | 404 | .<?php echo esc_html( $style_class ); ?> .frm_blank_field .sigWrapper{ |
| 389 | - border-color:var(--border-color-error) !important; | |
| 405 | + border-color:<?php echo esc_html( $border_color_error ); ?> !important; | |
| 390 | 406 | } |
| 391 | - <?php | |
| 392 | -endif; | |
| 393 | -?> | |
| 394 | 407 | |
| 395 | -.<?php echo esc_html( $style_class ); ?> .frm_error, | |
| 396 | -.<?php echo esc_html( $style_class ); ?> .frm_limit_error{ | |
| 397 | - font-weight:var(--weight)<?php echo esc_html( $important ); ?>; | |
| 398 | - color:var(--border-color-error)<?php echo esc_html( $important ); ?>; | |
| 408 | +.<?php echo esc_html( $style_class ); ?> .frm_error{ | |
| 409 | + font-weight:<?php echo esc_html( $weight . $important ); ?>; | |
| 399 | 410 | } |
| 400 | 411 | |
| 412 | +.<?php echo esc_html( $style_class ); ?> .frm_blank_field label, | |
| 413 | +.<?php echo esc_html( $style_class ); ?> .frm_error{ | |
| 414 | + color:<?php echo esc_html( $border_color_error . $important ); ?>; | |
| 415 | +} | |
| 416 | + | |
| 401 | 417 | .<?php echo esc_html( $style_class ); ?> .frm_error_style{ |
| 402 | - background-color:var(--error-bg)<?php echo esc_html( $important ); ?>; | |
| 403 | - border:1px solid var(--error-border)<?php echo esc_html( $important ); ?>; | |
| 404 | - border-radius:var(--border-radius)<?php echo esc_html( $important ); ?>; | |
| 405 | - color:var(--error-text)<?php echo esc_html( $important ); ?>; | |
| 406 | - font-size:var(--error-font-size)<?php echo esc_html( $important ); ?>; | |
| 418 | + background-color:<?php echo esc_html( $error_bg . $important ); ?>; | |
| 419 | + border:1px solid <?php echo esc_html( $error_border . $important ); ?>; | |
| 420 | + border-radius:<?php echo esc_html( $border_radius . $important ); ?>; | |
| 421 | + color: <?php echo esc_html( $error_text . $important ); ?>; | |
| 422 | + font-size:<?php echo esc_html( $error_font_size . $important ); ?>; | |
| 407 | 423 | margin:0; |
| 408 | - margin-bottom:var(--field-margin); | |
| 424 | + margin-bottom:<?php echo esc_html( $field_margin ); ?>; | |
| 409 | 425 | } |
| 410 | 426 | |
| 411 | -<?php if ( $pro_is_installed ) { ?> | |
| 412 | 427 | .<?php echo esc_html( $style_class ); ?> #frm_loading .progress-striped .progress-bar{ |
| 413 | 428 | background-image:linear-gradient(45deg, <?php echo esc_html( $border_color ); ?> 25%, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, 0) 50%, <?php echo esc_html( $border_color ); ?> 50%, <?php echo esc_html( $border_color ); ?> 75%, rgba(0, 0, 0, 0) 75%, rgba(0, 0, 0, 0)); |
| 414 | 429 | } |
| 415 | 430 | |
| 416 | 431 | .<?php echo esc_html( $style_class ); ?> #frm_loading .progress-bar{ |
| 417 | - background-color:var(--bg-color)<?php echo esc_html( $important ); ?>; | |
| 432 | + background-color:<?php echo esc_html( $bg_color . $important ); ?>; | |
| 418 | 433 | } |
| 419 | -<?php } ?> | |
| 420 | 434 | |
| 421 | 435 | .<?php echo esc_html( $style_class ); ?> .frm_form_field.frm_total_big input, |
| 422 | 436 | .<?php echo esc_html( $style_class ); ?> .frm_form_field.frm_total_big textarea, |
| 423 | 437 | .<?php echo esc_html( $style_class ); ?> .frm_form_field.frm_total input, |
| @@ -429,6 +443,5 @@ | ||
| 429 | 443 | width:auto<?php echo esc_html( $important ); ?>; |
| 430 | 444 | padding:0<?php echo esc_html( $important ); ?>; |
| 431 | 445 | } |
| 432 | 446 | |
| 433 | -<?php echo strip_tags( FrmStylesController::get_custom_css( $settings ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> | |
| 434 | 447 | <?php do_action( 'frm_output_single_style', $settings ); ?> |