| @@ -225,7 +225,67 @@ | ||
| 225 | 225 | ); |
| 226 | 226 | ?> |
| 227 | 227 | </div> |
| 228 | 228 | |
| 229 | +<div class="frm5 frm_form_field"> | |
| 230 | + <label | |
| 231 | + for="frm_enable_single_style_custom_css" | |
| 232 | + class="frm-style-item-heading"> | |
| 233 | + <?php esc_html_e( 'Custom CSS', 'formidable' ); ?> | |
| 234 | + </label> | |
| 235 | +</div> | |
| 236 | +<div class="frm7 frm_form_field frm-style-component"> | |
| 237 | + <?php | |
| 238 | + FrmHtmlHelper::toggle( | |
| 239 | + 'frm_enable_single_style_custom_css', | |
| 240 | + $frm_style->get_field_name( 'enable_style_custom_css' ), | |
| 241 | + array( | |
| 242 | + 'div_class' => 'with_frm_style frm_toggle', | |
| 243 | + 'checked' => ! empty( $style->post_content['enable_style_custom_css'] ), | |
| 244 | + 'echo' => true, | |
| 245 | + 'aria-label-attr' => __( 'Custom CSS', 'formidable' ), | |
| 246 | + ) | |
| 247 | + ); | |
| 248 | + ?> | |
| 249 | +</div> | |
| 250 | + | |
| 251 | +<div id="frm_single_style_custom_css_editor" class="frm12 frm_form_field frm-style-component <?php echo ! empty( $style->post_content['enable_style_custom_css'] ) ? '' : 'frm_hidden'; ?>"> | |
| 252 | + <?php | |
| 253 | + $css_scope_helper = new FrmCssScopeHelper(); | |
| 254 | + $custom_css = $style->post_content['single_style_custom_css'] ?? ''; | |
| 255 | + | |
| 256 | + if ( $custom_css ) { | |
| 257 | + $custom_css = $css_scope_helper->unnest( $custom_css, 'frm_style_' . $style->post_name ); | |
| 258 | + } | |
| 259 | + | |
| 260 | + FrmStylesController::custom_css( | |
| 261 | + '', | |
| 262 | + array( | |
| 263 | + 'heading' => '', | |
| 264 | + 'id' => 'frm_single_style_custom_css', | |
| 265 | + 'textarea_params' => array( | |
| 266 | + 'name' => $frm_style->get_field_name( 'single_style_custom_css' ), | |
| 267 | + 'id' => 'frm_single_style_custom_css', | |
| 268 | + ), | |
| 269 | + 'custom_css' => $custom_css, | |
| 270 | + 'placeholder' => __( '/* Enter your custom CSS here */', 'formidable' ), | |
| 271 | + 'show_errors' => false, | |
| 272 | + ) | |
| 273 | + ); | |
| 274 | + ?> | |
| 275 | +</div> | |
| 276 | +<div class="frm3 frm_form_field"> | |
| 277 | + <label | |
| 278 | + for="frm_style_class" | |
| 279 | + class="frm-style-item-heading"><?php esc_html_e( 'Style Class', 'formidable' ); ?></label> | |
| 280 | +</div> | |
| 281 | +<div class="frm9 frm_form_field frm-style-component" id="frm_style_class_custom_css" data-css-scope="<?php echo esc_attr( 'frm_style_' . $style->post_name ); ?>"> | |
| 282 | + <label class="frm-copy-text">.frm_style_<?php | |
| 283 | + echo esc_html( $style->post_name ); | |
| 284 | + FrmAppHelper::icon_by_class( 'frmfont frm-copy-icon' ); | |
| 285 | + ?> | |
| 286 | + </label> | |
| 287 | +</div> | |
| 288 | + | |
| 229 | 289 | <hr class="frm12"/> |
| 230 | 290 | |
| 231 | 291 | <a id="frm-style-advanced-settings-button" class="frm-button-secondary frm-mt-md frmcenter" href="#"><?php esc_html_e( 'Show advanced settings', 'formidable' ); ?></a> |