PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 4.11.02
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v4.11.02
6.35 6.34 6.33.1 6.33 6.32.1 6.32 6.31 6.25 6.25.1 6.26 6.26.1 6.27 6.28 6.29 6.3 6.3.1 6.3.2 6.30 6.4 6.4.1 6.4.2 6.5 6.5.1 6.5.2 6.5.3 All 141 releases
← All changes | classes/views/styles/manage.php +72 -32 6.3.24.11.02 View file →
@@ -2,17 +2,39 @@
2 2 if ( ! defined( 'ABSPATH' ) ) {
3 3 die( 'You are not allowed to call this page directly.' );
4 4 }
5 5 ?>
6 -<div>
6 +<div class="frm_wrap">
7 + <form method="post">
8 + <div class="frm_page_container">
9 + <?php
10 + FrmAppHelper::get_admin_header(
11 + array(
12 + 'label' => __( 'Manage Styles', 'formidable' ),
13 + 'hide_title' => true,
14 + 'publish' => array( 'FrmStylesHelper::save_button', array() ),
15 + 'nav' => FrmStylesHelper::get_style_menu( 'manage' ),
16 + )
17 + );
18 + ?>
19 +
20 + <div class="columns-2">
21 + <div id="post-body-content">
22 +
23 + <div class="frm-inner-content">
24 +
25 + <h2 class="frm-h2">
26 + <?php esc_html_e( 'Manage Styles', 'formidable' ); ?>
27 + </h2>
7 28 <p class="howto">
8 - <?php esc_html_e( 'Easily change which style your forms are using by making changes below.', 'formidable' ); ?>
29 + <?php printf( esc_html__( 'Easily change which style your forms are using by making changes below.', 'formidable' ), '<a href="?page=formidable-styles&frm_action=new_style">', '</a>' ); ?>
9 30 </p>
10 31
11 - <?php include FrmAppHelper::plugin_path() . '/classes/views/shared/errors.php'; ?>
32 + <?php include( FrmAppHelper::plugin_path() . '/classes/views/shared/errors.php' ); ?>
12 33
13 - <table class="widefat fixed striped">
14 - <thead>
34 + <input type="hidden" name="frm_action" value="manage_styles"/>
35 + <table class="widefat fixed striped">
36 + <thead>
15 37 <tr>
16 38 <th scope="col" class="column-locations">
17 39 <?php esc_html_e( 'Form Title', 'formidable' ); ?>
18 40 </th>
@@ -19,39 +41,57 @@
19 41 <th scope="col">
20 42 <?php esc_html_e( 'Assigned Style Templates', 'formidable' ); ?>
21 43 </th>
22 44 </tr>
23 - </thead>
24 - <tbody>
25 - <?php
26 - if ( $forms ) {
27 - $row_view_file_path = FrmAppHelper::plugin_path() . '/classes/views/styles/_manage-styles-row.php';
28 - array_walk(
29 - $forms,
30 - /**
31 - * @param stdClass $form
32 - * @param array<WP_Post> $styles
33 - * @param WP_Post $default_style
34 - * @param string $row_view_file_path
35 - * @return void
36 - */
37 - function( $form ) use ( $styles, $default_style, $row_view_file_path ) {
38 - $active_style_id = isset( $form->options['custom_style'] ) ? (int) $form->options['custom_style'] : 1;
39 - if ( 1 === $active_style_id ) {
45 + </thead>
46 +
47 + <tbody>
48 + <?php
49 + if ( $forms ) {
50 + foreach ( $forms as $form ) {
51 + $this_style = isset( $form->options['custom_style'] ) ? (int) $form->options['custom_style'] : 1;
52 + if ( 1 === $this_style ) {
40 53 // use the default style
41 - $active_style_id = $default_style->ID;
54 + $this_style = $default_style->ID;
42 55 }
56 + ?>
57 + <tr>
58 + <td class="menu-location-title">
59 + <strong><?php echo esc_html( empty( $form->name ) ? __( '(no title)', 'formidable' ) : $form->name ); ?></strong>
60 + </td>
61 + <td>
62 + <input type="hidden" name="prev_style[<?php echo esc_attr( $form->id ); ?>]" value="<?php echo esc_attr( $this_style ); ?>" />
63 + <select name="style[<?php echo esc_attr( $form->id ); ?>]">
64 + <?php foreach ( $styles as $s ) { ?>
65 + <option value="<?php echo esc_attr( $s->ID ); ?>" <?php selected( $s->ID, $this_style ); ?>>
66 + <?php echo esc_html( $s->post_title . ( empty( $s->menu_order ) ? '' : ' (' . __( 'default', 'formidable' ) . ')' ) ); ?>
67 + </option>
68 + <?php } ?>
69 + <option value="" <?php selected( 0, $this_style ); ?>>
70 + <?php esc_html_e( 'Styling disabled', 'formidable' ); ?>
71 + </option>
72 + </select>
43 73
44 - include $row_view_file_path;
74 + </td>
75 + </tr>
76 + <?php
45 77 }
46 - );
47 - } else {
48 - ?>
78 + } else {
79 + ?>
49 80 <tr>
50 81 <td><?php esc_html_e( 'No Forms Found', 'formidable' ); ?></td>
51 82 </tr>
52 - <?php
53 - }
54 - ?>
55 - </tbody>
56 - </table>
83 + <?php
84 + }
85 + ?>
86 + </tbody>
87 + </table>
88 + <p>
89 + <input type="submit" name="submit" class="button button-primary frm-button-primary" value="<?php esc_attr_e( 'Update', 'formidable' ); ?>" />
90 + </p>
91 + <?php wp_nonce_field( 'frm_manage_style_nonce', 'frm_manage_style' ); ?>
92 +
93 +</div>
94 +</div>
95 +</div>
96 +</form>
57 97 </div>