| @@ -6,14 +6,16 @@ | ||
| 6 | 6 | // It renders the sidebar when editing a single style. |
| 7 | 7 | // It is accessed from /wp-admin/admin.php?page=formidable-styles&frm_action=edit&form=782 |
| 8 | 8 | ?> |
| 9 | 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 ) ); ?>"> | |
| 10 | + <form id="frm_styling_form" method="post" action="<?php echo esc_url( FrmStylesHelper::get_edit_url( $style, $form->id, FrmAppHelper::get_param( 'section' ) ) ); ?>"> | |
| 11 | 11 | <input type="hidden" name="ID" value="<?php echo esc_attr( $style->ID ); ?>" /> |
| 12 | 12 | <input type="hidden" name="frm_action" value="save" /> |
| 13 | 13 | |
| 14 | 14 | <?php if ( ! $style->ID ) { ?> |
| 15 | - <?php // Include a hidden input for new styles so the new style name updates. ?> | |
| 15 | + <?php | |
| 16 | + // Include a hidden input for new styles so the new style name updates. | |
| 17 | + ?> | |
| 16 | 18 | <input name="<?php echo esc_attr( $frm_style->get_field_name( 'post_title', '' ) ); ?>" type="hidden" value="<?php echo esc_attr( $style->post_title ); ?>" /> |
| 17 | 19 | <?php } ?> |
| 18 | 20 | |
| 19 | 21 | <?php |
| @@ -19,9 +21,9 @@ | ||
| 19 | 21 | <?php |
| 20 | 22 | wp_nonce_field( 'frm_style_nonce', 'frm_style' ); |
| 21 | 23 | |
| 22 | 24 | $frm_style = new FrmStyle( $style->ID ); |
| 23 | - include $style_views_path . '_style-options.php'; | |
| 25 | + require $style_views_path . '_style-options.php'; | |
| 24 | 26 | ?> |
| 25 | 27 | </form> |
| 26 | 28 | |
| 27 | 29 | <?php |
| @@ -28,9 +30,9 @@ | ||
| 28 | 30 | /** |
| 29 | 31 | * We need this style_name field for calls made from the changeStyling function. |
| 30 | 32 | * Without it, some styles (including background image opacity and repeater button icons) don't properly sync when updated. |
| 31 | 33 | * It isn't required for frm_styling_form so it's left out of the form. |
| 32 | - * It is targetted in JavaScript by its #frm_style_sidebar parent though, so it's important that it's inside the sidebar. | |
| 34 | + * It is targeted in JavaScript by its #frm_style_sidebar parent though, so it's important that it's inside the sidebar. | |
| 33 | 35 | */ |
| 34 | 36 | ?> |
| 35 | 37 | <input type="hidden" name="style_name" value="frm_style_<?php echo esc_attr( $style->post_name ); ?>" /> |
| 36 | 38 | |