| 1 |
<div class="nav-menus-php"> |
| 2 |
<div class="wrap"> |
| 3 |
<?php FrmStylesHelper::style_menu( 'manage' ); ?> |
| 4 |
|
| 5 |
<p><?php printf( esc_html__( 'Easily change which template your forms are using by making changes below.', 'formidable' ), '<a href="?page=formidable-styles&frm_action=new_style">', '</a>' ); ?></p> |
| 6 |
|
| 7 |
<?php include( FrmAppHelper::plugin_path() . '/classes/views/shared/errors.php' ); ?> |
| 8 |
|
| 9 |
<div id="menu-locations-wrap"> |
| 10 |
<form method="post"> |
| 11 |
<input type="hidden" name="frm_action" value="manage_styles"/> |
| 12 |
<table class="widefat fixed" id="menu-locations-table"> |
| 13 |
<thead> |
| 14 |
<tr> |
| 15 |
<th scope="col" class="manage-column column-locations"> |
| 16 |
<?php esc_html_e( 'Form Title', 'formidable' ) ?> |
| 17 |
</th> |
| 18 |
<th scope="col" class="manage-column column-menus"> |
| 19 |
<?php esc_html_e( 'Assigned Style Templates', 'formidable' ) ?> |
| 20 |
</th> |
| 21 |
</tr> |
| 22 |
</thead> |
| 23 |
|
| 24 |
<tbody class="menu-locations"> |
| 25 |
<?php |
| 26 |
if ( $forms ) { |
| 27 |
foreach ( $forms as $form ) { |
| 28 |
$this_style = isset( $form->options['custom_style'] ) ? (int) $form->options['custom_style'] : 1; |
| 29 |
if ( 1 === $this_style ) { |
| 30 |
// use the default style |
| 31 |
$this_style = $default_style->ID; |
| 32 |
} |
| 33 |
?> |
| 34 |
<tr id="menu-locations-row"> |
| 35 |
<td class="menu-location-title"> |
| 36 |
<strong><?php echo esc_html( empty( $form->name ) ? __( '(no title)', 'formidable' ) : $form->name ); ?></strong> |
| 37 |
</td> |
| 38 |
<td class="menu-location-menus"> |
| 39 |
<input type="hidden" name="prev_style[<?php echo esc_attr( $form->id ) ?>]" value="<?php echo esc_attr( $this_style ) ?>" /> |
| 40 |
<select name="style[<?php echo esc_attr( $form->id ) ?>]"> |
| 41 |
<?php foreach ( $styles as $s ) { ?> |
| 42 |
<option value="<?php echo esc_attr( $s->ID ) ?>" <?php selected( $s->ID, $this_style ) ?>> |
| 43 |
<?php echo esc_html( $s->post_title . ( empty( $s->menu_order ) ? '' : ' (' . __( 'default', 'formidable' ) . ')' ) ) ?> |
| 44 |
</option> |
| 45 |
<?php } ?> |
| 46 |
<option value="" <?php selected( 0, $this_style ) ?>> |
| 47 |
<?php esc_html_e( 'Styling disabled', 'formidable' ) ?> |
| 48 |
</option> |
| 49 |
</select> |
| 50 |
|
| 51 |
</td><!-- .menu-location-menus --> |
| 52 |
</tr><!-- #menu-locations-row --> |
| 53 |
<?php |
| 54 |
} |
| 55 |
} else { |
| 56 |
?> |
| 57 |
<tr> |
| 58 |
<td><?php esc_html_e( 'No Forms Found', 'formidable' ) ?></td> |
| 59 |
</tr> |
| 60 |
<?php |
| 61 |
} |
| 62 |
?> |
| 63 |
</tbody> |
| 64 |
</table> |
| 65 |
<p class="button-controls"><input type="submit" name="nav-menu-locations" id="nav-menu-locations" class="button button-primary left" value="<?php esc_attr_e( 'Save Changes', 'formidable' ) ?>" /></p> |
| 66 |
<?php wp_nonce_field( 'frm_manage_style_nonce', 'frm_manage_style' ); ?> |
| 67 |
</form> |
| 68 |
</div><!-- #menu-locations-wrap --> |
| 69 |
</div><!-- /.wrap--> |
| 70 |
|