PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 5.0
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v5.0
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/xml/import_form.php +24 -54 6.305.0 View file →
@@ -11,43 +11,19 @@
11 11 )
12 12 );
13 13 ?>
14 14 <div class="wrap">
15 - <?php require FrmAppHelper::plugin_path() . '/classes/views/shared/errors.php'; ?>
15 + <?php include( FrmAppHelper::plugin_path() . '/classes/views/shared/errors.php' ); ?>
16 16
17 17 <h2 class="frm-h2"><?php esc_html_e( 'Import', 'formidable' ); ?></h2>
18 - <p class="howto">
19 - <?php
20 - if ( FrmAppHelper::is_formidable_branding() ) {
21 - $page_description = esc_html__( 'Upload your Formidable XML file to import forms into this site. If your imported form key and creation date match a form on your site, that form will be updated.', 'formidable' );
22 - } else {
23 - $page_description = sprintf(
24 - // Translators: 1: Menu name
25 - esc_html__( 'Upload your %1$s XML file to import forms into this site. If your imported form key and creation date match a form on your site, that form will be updated.', 'formidable' ),
26 - FrmAppHelper::get_menu_name()
27 - );
28 - }
29 - echo esc_html( apply_filters( 'frm_upload_instructions1', $page_description ) );
30 - ?>
31 - </p>
18 + <p class="howto"><?php echo esc_html( apply_filters( 'frm_upload_instructions1', __( 'Upload your Formidable XML file to import forms into this site. If your imported form key and creation date match a form on your site, that form will be updated.', 'formidable' ) ) ); ?></p>
32 19 <br/>
33 - <form enctype="multipart/form-data" method="post" class="frm-fields">
20 + <form enctype="multipart/form-data" method="post">
34 21 <input type="hidden" name="frm_action" value="import_xml" />
35 22 <?php wp_nonce_field( 'import-xml-nonce', 'import-xml' ); ?>
36 23 <p>
37 - <label for="frm_import_file">
38 - <?php
39 - if ( FrmAppHelper::is_formidable_branding() ) {
40 - $file_section_title = esc_html__( 'Choose a Formidable XML file', 'formidable' );
41 - } else {
42 - $file_section_title = sprintf(
43 - // Translators: 1: Menu name
44 - esc_html__( 'Choose a %1$s XML file', 'formidable' ),
45 - FrmAppHelper::get_menu_name()
46 - );
47 - }
48 - echo esc_html( apply_filters( 'frm_upload_instructions2', $file_section_title ) );
49 - ?>
24 + <label>
25 + <?php echo esc_html( apply_filters( 'frm_upload_instructions2', __( 'Choose a Formidable XML file', 'formidable' ) ) ); ?>
50 26 (<?php
51 27 /* translators: %s: File size */
52 28 echo esc_html( sprintf( __( 'Maximum size: %s', 'formidable' ), ini_get( 'upload_max_filesize' ) ) );
53 29 ?>)
@@ -52,9 +28,9 @@
52 28 echo esc_html( sprintf( __( 'Maximum size: %s', 'formidable' ), ini_get( 'upload_max_filesize' ) ) );
53 29 ?>)
54 30 </label>
55 31 <br/>
56 - <input id="frm_import_file" type="file" name="frm_import_file" size="25" accept="<?php echo esc_attr( implode( ', ', FrmXMLHelper::get_supported_upload_file_types() ) ); ?>" />
32 + <input type="file" name="frm_import_file" size="25" />
57 33 </p>
58 34
59 35 <?php do_action( 'frm_csv_opts', $forms ); ?>
60 36
@@ -65,12 +41,12 @@
65 41 <?php FrmFormMigratorsHelper::maybe_show_download_link(); ?>
66 42 <?php FrmTipsHelper::pro_tip( 'get_import_tip' ); ?>
67 43
68 44 <?php do_action( 'frm_import_settings' ); ?>
69 -
45 + <br/><br/>
70 46 <h2 class="frm-h2"><?php esc_html_e( 'Export', 'formidable' ); ?></h2>
71 47 <p class="howto">
72 - <?php esc_html_e( 'Export your forms, entries, views, and styles so you can easily import them on another site.', 'formidable' ); ?>
48 + <?php echo esc_html( __( 'Export your forms, entries, views, and styles so you can easily import them on another site.', 'formidable' ) ); ?>
73 49 </p>
74 50 <form method="post" action="<?php echo esc_url( admin_url( 'admin-ajax.php' ) ); ?>" id="frm_export_xml" class="frm-fields frm_grid_container">
75 51 <input type="hidden" name="action" value="frm_export_xml" />
76 52 <?php wp_nonce_field( 'export-xml-nonce', 'export-xml' ); ?>
@@ -76,12 +52,12 @@
76 52 <?php wp_nonce_field( 'export-xml-nonce', 'export-xml' ); ?>
77 53
78 54 <p class="frm4 frm_form_field">
79 55 <label for="format"><?php esc_html_e( 'Export Format', 'formidable' ); ?></label>
80 - <select id="format" name="format">
56 + <select name="format">
81 57 <?php foreach ( $export_format as $t => $type ) { ?>
82 58 <option value="<?php echo esc_attr( $t ); ?>" data-support="<?php echo esc_attr( $type['support'] ); ?>" <?php echo isset( $type['count'] ) ? 'data-count="' . esc_attr( $type['count'] ) . '"' : ''; ?>>
83 - <?php echo esc_html( $type['name'] ?? $t ); ?>
59 + <?php echo esc_html( isset( $type['name'] ) ? $type['name'] : $t ); ?>
84 60 </option>
85 61 <?php } ?>
86 62 </select>
87 63 </p>
@@ -86,12 +62,12 @@
86 62 </select>
87 63 </p>
88 64
89 65 <p class="frm_hidden csv_opts export-filters frm4 frm_form_field">
90 - <label for="frm_csv_format" class="frm_help" title="<?php esc_attr_e( 'If your CSV special characters are not working correctly, try a different formatting option.', 'formidable' ); ?>">
66 + <label for="csv_format" class="frm_help" title="<?php esc_attr_e( 'If your CSV special characters are not working correctly, try a different formatting option.', 'formidable' ); ?>">
91 67 <?php esc_html_e( 'CSV Encoding Format', 'formidable' ); ?>
92 68 </label>
93 - <select id="frm_csv_format" name="csv_format">
69 + <select name="csv_format">
94 70 <?php foreach ( FrmCSVExportHelper::csv_format_options() as $format ) { ?>
95 71 <option value="<?php echo esc_attr( $format ); ?>">
96 72 <?php echo esc_html( $format ); ?>
97 73 </option>
@@ -99,9 +75,9 @@
99 75 </select>
100 76 </p>
101 77
102 78 <p class="frm_hidden csv_opts export-filters frm4 frm_form_field">
103 - <label for="frm_csv_col_sep">
79 + <label for="csv_col_sep">
104 80 <?php esc_html_e( 'Column Separation', 'formidable' ); ?>
105 81 </label>
106 82 <input id="frm_csv_col_sep" name="csv_col_sep" value="," type="text" />
107 83 </p>
@@ -108,9 +84,9 @@
108 84
109 85 <p id="frm_csv_data_export" class="xml_opts">
110 86 <label><?php esc_html_e( 'Include the following in the export file', 'formidable' ); ?></label>
111 87 <?php foreach ( $export_types as $t => $type ) { ?>
112 - <label class="frm_inline_label frm-export-xml-<?php echo esc_attr( $t ); ?>">
88 + <label class="frm_inline_label">
113 89 <input type="checkbox" name="type[]" value="<?php echo esc_attr( $t ); ?>"/>
114 90 <?php echo esc_html( $type ); ?>
115 91 </label> &nbsp;
116 92 <?php } ?>
@@ -116,9 +92,9 @@
116 92 <?php } ?>
117 93 </p>
118 94
119 95 <div class="frm-table-box">
120 - <p class="alignleft frm-mb-sm">
96 + <p class="alignleft" style="margin-bottom:0;">
121 97 <label class="xml_opts">
122 98 <?php esc_html_e( 'Select Form(s)', 'formidable' ); ?>
123 99 </label>
124 100 <label class="csv_opts frm_hidden">
@@ -134,15 +110,12 @@
134 110 )
135 111 );
136 112 ?>
137 113 <div class="frm-scroll-box">
138 - <table class="widefat striped frm-border frm-mt-0">
114 + <table class="widefat striped frm-border frm_no_top_margin">
139 115 <thead>
140 116 <tr>
141 - <td class="column-cb check-column">
142 - <label class="screen-reader-text" for="frm-export-select-all"><?php esc_html_e( 'Select All', 'formidable' ); ?></label>
143 - <input id="frm-export-select-all" type="checkbox">
144 - </td>
117 + <td class="column-cb check-column"></td>
145 118 <td><?php esc_html_e( 'Form Title', 'formidable' ); ?></td>
146 119 <td><?php esc_html_e( 'ID / Form Key', 'formidable' ); ?></td>
147 120 <td><?php esc_html_e( 'Type', 'formidable' ); ?></td>
148 121 <td class="column-entries"><?php esc_html_e( 'Entries', 'formidable' ); ?></td>
@@ -150,15 +123,15 @@
150 123 </tr>
151 124 </thead>
152 125 <tbody>
153 126 <?php foreach ( $forms as $form ) { ?>
154 - <tr class="frm-row <?php echo ! empty( $form->parent_form_id ) ? esc_attr( 'frm-is-repeater' ) : ''; ?>">
127 + <tr class="frm-row">
155 128 <td>
156 129 <input type="checkbox" name="frm_export_forms[]" value="<?php echo esc_attr( $form->id ); ?>" id="export_form_<?php echo esc_attr( $form->id ); ?>" />
157 130 </td>
158 131 <td>
159 132 <label for="export_form_<?php echo esc_attr( $form->id ); ?>">
160 - <?php echo esc_html( '' === $form->name ? FrmFormsHelper::get_no_title_text() : $form->name ); ?>
133 + <?php echo esc_html( '' === $form->name ? __( '(no title)', 'formidable' ) : $form->name ); ?>
161 134 </label>
162 135 </td>
163 136 <td>
164 137 <?php echo esc_html( $form->id ); ?> / <?php echo esc_html( $form->form_key ); ?>
@@ -186,21 +159,18 @@
186 159 </a>
187 160 </td>
188 161 <td class="column-entries">
189 162 <?php
190 - $style = $form->options['custom_style'] ?? 1;
191 -
192 - if ( $style ) {
163 + $style = isset( $form->options['custom_style'] ) ? $form->options['custom_style'] : 1;
164 + if ( empty( $style ) ) {
165 + echo '0';
166 + } else {
193 167 echo '1';
194 - } else {
195 - echo '0';
196 168 }
197 169 ?>
198 170 </td>
199 171 </tr>
200 - <?php
201 - }//end foreach
202 - ?>
172 + <?php } ?>
203 173 </tbody>
204 174 </table>
205 175 </div>
206 176 </div>