| 1 |
<?php |
| 2 |
if ( ! defined( 'ABSPATH' ) ) { |
| 3 |
die( 'You are not allowed to call this page directly.' ); |
| 4 |
} |
| 5 |
// This partial view is used in the visual styler sidebar in "edit" view. |
| 6 |
// It renders the sidebar when editing a single style. |
| 7 |
// It is accessed from /wp-admin/admin.php?page=formidable-styles&frm_action=edit&form=782 |
| 8 |
?> |
| 9 |
<div id="frm_style_sidebar" class="frm-right-panel frm-fields frm_wrap frm-p-6"> |
| 10 |
<form id="frm_styling_form" method="post" action="<?php echo esc_url( FrmStylesHelper::get_edit_url( $style, $form->id ) ); ?>"> |
| 11 |
<input type="hidden" name="ID" value="<?php echo esc_attr( $style->ID ); ?>" /> |
| 12 |
<input type="hidden" name="frm_action" value="save" /> |
| 13 |
|
| 14 |
<?php if ( ! $style->ID ) { ?> |
| 15 |
<?php |
| 16 |
// Include a hidden input for new styles so the new style name updates. |
| 17 |
?> |
| 18 |
<input name="<?php echo esc_attr( $frm_style->get_field_name( 'post_title', '' ) ); ?>" type="hidden" value="<?php echo esc_attr( $style->post_title ); ?>" /> |
| 19 |
<?php } ?> |
| 20 |
|
| 21 |
<?php |
| 22 |
wp_nonce_field( 'frm_style_nonce', 'frm_style' ); |
| 23 |
|
| 24 |
$frm_style = new FrmStyle( $style->ID ); |
| 25 |
include $style_views_path . '_style-options.php'; |
| 26 |
?> |
| 27 |
</form> |
| 28 |
|
| 29 |
<?php |
| 30 |
/** |
| 31 |
* We need this style_name field for calls made from the changeStyling function. |
| 32 |
* Without it, some styles (including background image opacity and repeater button icons) don't properly sync when updated. |
| 33 |
* It isn't required for frm_styling_form so it's left out of the form. |
| 34 |
* It is targetted in JavaScript by its #frm_style_sidebar parent though, so it's important that it's inside the sidebar. |
| 35 |
*/ |
| 36 |
?> |
| 37 |
<input type="hidden" name="style_name" value="frm_style_<?php echo esc_attr( $style->post_name ); ?>" /> |
| 38 |
|
| 39 |
<?php |
| 40 |
// This holds the custom CSS for a single theme that is being worked on on the edit page. |
| 41 |
// It gets populated with the frm_change_styling action. |
| 42 |
?> |
| 43 |
<div id="this_css"></div> |
| 44 |
</div> |
| 45 |
|