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 3.9-beta 3.9.1 3.9.2 3.9.3 4.0 4.0.1 4.0.2 4.0.3 4.1 4.1-beta 4.1.1 4.1.2 4.2 4.2-beta 4.2.1 4.2.2 4.3 4.3.1 4.4 4.4.1 4.4.2 4.5 4.5.1 4.6 4.6.1 4.7 4.8 4.8.1 4.9 4.9.1 4.9.2 5.0 5.0.1
contact-form-7 / admin / edit-contact-form.php
contact-form-7 / admin Last commit date
includes 1 year ago admin.php 1 year ago edit-contact-form.php 1 year ago
edit-contact-form.php
351 lines
1 <?php
2
3 // don't load directly
4 if ( ! defined( 'ABSPATH' ) ) {
5 die( '-1' );
6 }
7
8 $save_button = sprintf(
9 '<input %s />',
10 wpcf7_format_atts( array(
11 'type' => 'submit',
12 'class' => 'button-primary',
13 'name' => 'wpcf7-save',
14 'value' => __( 'Save', 'contact-form-7' ),
15 ) )
16 );
17
18 ?>
19
20 <div class="wrap" id="wpcf7-contact-form-editor">
21
22 <?php
23
24 echo sprintf(
25 '<h1 class="wp-heading-inline">%1$s</h1> %2$s',
26 esc_html(
27 $post->initial()
28 ? __( 'Add New Contact Form', 'contact-form-7' )
29 : __( 'Edit Contact Form', 'contact-form-7' )
30 ),
31 ( $post->initial() || ! current_user_can( 'wpcf7_edit_contact_forms' ) )
32 ? ''
33 : wpcf7_link(
34 menu_page_url( 'wpcf7-new', false ),
35 __( 'Add New', 'contact-form-7' ),
36 array( 'class' => 'page-title-action' )
37 )
38 );
39
40 ?>
41
42 <hr class="wp-header-end">
43
44 <?php
45
46 do_action( 'wpcf7_admin_warnings',
47 $post->initial() ? 'wpcf7-new' : 'wpcf7',
48 wpcf7_current_action(),
49 $post
50 );
51
52 do_action( 'wpcf7_admin_notices',
53 $post->initial() ? 'wpcf7-new' : 'wpcf7',
54 wpcf7_current_action(),
55 $post
56 );
57
58 if ( $post ) :
59
60 echo sprintf(
61 '<form %s>',
62 wpcf7_format_atts( array(
63 'method' => 'post',
64 'action' => esc_url( add_query_arg(
65 array( 'post' => $post_id ),
66 menu_page_url( 'wpcf7', false )
67 ) ),
68 'id' => 'wpcf7-admin-form-element',
69 'disabled' => ! current_user_can( 'wpcf7_edit_contact_form', $post_id ),
70 ) )
71 );
72
73 if ( current_user_can( 'wpcf7_edit_contact_form', $post_id ) ) {
74 wp_nonce_field( 'wpcf7-save-contact-form_' . $post_id );
75 }
76
77 ?>
78 <input type="hidden" id="post_ID" name="post_ID" value="<?php echo (int) $post_id; ?>" />
79 <input type="hidden" id="wpcf7-locale" name="wpcf7-locale" value="<?php echo esc_attr( $post->locale() ); ?>" />
80 <input type="hidden" id="hiddenaction" name="action" value="save" />
81 <input type="hidden" id="active-tab" name="active-tab" value="<?php echo esc_attr( $_GET['active-tab'] ?? '' ); ?>" />
82
83 <div id="poststuff">
84 <div id="post-body" class="metabox-holder columns-2 wp-clearfix">
85 <div id="post-body-content">
86 <div id="titlediv">
87 <div id="titlewrap">
88 <?php
89
90 echo sprintf(
91 '<input %s />',
92 wpcf7_format_atts( array(
93 'type' => 'text',
94 'name' => 'post_title',
95 'value' => $post->initial() ? '' : $post->title(),
96 'id' => 'title',
97 'spellcheck' => 'true',
98 'autocomplete' => 'off',
99 'disabled' => ! current_user_can( 'wpcf7_edit_contact_form', $post_id ),
100 'placeholder' => __( 'Enter title here', 'contact-form-7' ),
101 'aria-label' => __( 'Enter title here', 'contact-form-7' ),
102 ) )
103 );
104
105 ?>
106 </div><!-- #titlewrap -->
107
108 <div class="inside">
109 <?php
110
111 if ( ! $post->initial() ) {
112
113 if ( $shortcode = $post->shortcode() ) {
114 echo sprintf(
115 '<p class="description"><label for="wpcf7-shortcode">%1$s</label> <span class="shortcode wp-ui-highlight"><input %2$s /></span></p>',
116 esc_html( __( "Copy this shortcode and paste it into your post, page, or text widget content:", 'contact-form-7' ) ),
117 wpcf7_format_atts( array(
118 'type' => 'text',
119 'id' => 'wpcf7-shortcode',
120 'onfocus' => 'this.select();',
121 'readonly' => true,
122 'class' => 'large-text code',
123 'value' => $shortcode,
124 ) )
125 );
126 }
127
128 if ( $shortcode = $post->shortcode( array( 'use_old_format' => true ) ) ) {
129 echo sprintf(
130 '<p class="description"><label for="wpcf7-shortcode-old">%1$s</label> <span class="shortcode old"><input %2$s /></span></p>',
131 esc_html( __( "You can also use this old-style shortcode:", 'contact-form-7' ) ),
132 wpcf7_format_atts( array(
133 'type' => 'text',
134 'id' => 'wpcf7-shortcode-old',
135 'onfocus' => 'this.select();',
136 'readonly' => true,
137 'class' => 'large-text code',
138 'value' => $shortcode,
139 ) )
140 );
141 }
142
143 }
144
145 ?>
146 </div>
147
148 </div><!-- #titlediv -->
149 </div><!-- #post-body-content -->
150
151 <div id="postbox-container-1" class="postbox-container">
152
153 <?php
154
155 if ( current_user_can( 'wpcf7_edit_contact_form', $post_id ) ) :
156
157 ?>
158
159 <section id="submitdiv" class="postbox">
160 <h2><?php echo esc_html( __( 'Status', 'contact-form-7' ) ); ?></h2>
161 <div class="inside">
162 <div class="submitbox" id="submitpost">
163
164 <div id="minor-publishing-actions">
165
166 <div class="hidden">
167 <input type="submit" class="button-primary" name="wpcf7-save" value="<?php echo esc_attr( __( 'Save', 'contact-form-7' ) ); ?>" />
168 </div>
169
170 <?php
171
172 if ( ! $post->initial() ) {
173 echo sprintf(
174 '<input %s />',
175 wpcf7_format_atts( array(
176 'type' => 'submit',
177 'name' => 'wpcf7-copy',
178 'class' => 'copy button',
179 'value' => __( 'Duplicate', 'contact-form-7' ),
180 ) )
181 );
182 }
183
184 ?>
185
186 </div><!-- #minor-publishing-actions -->
187
188 <div id="misc-publishing-actions">
189
190 <?php
191
192 do_action( 'wpcf7_admin_misc_pub_section', $post_id );
193
194 ?>
195 </div><!-- #misc-publishing-actions -->
196
197 <div id="major-publishing-actions">
198
199 <?php
200
201 if ( ! $post->initial() ) {
202 echo sprintf(
203 '<div id="delete-action"><input %s /></div>',
204 wpcf7_format_atts( array(
205 'type' => 'submit',
206 'name' => 'wpcf7-delete',
207 'class' => 'delete submitdelete',
208 'value' => __( 'Delete', 'contact-form-7' ),
209 ) )
210 );
211 }
212
213 ?>
214
215 <div id="publishing-action">
216 <span class="spinner"></span>
217 <?php echo $save_button; ?>
218 </div>
219 <div class="clear"></div>
220 </div><!-- #major-publishing-actions -->
221 </div><!-- #submitpost -->
222 </div>
223 </section><!-- #submitdiv -->
224
225 <?php
226
227 endif;
228
229 ?>
230
231 <section id="informationdiv" class="postbox">
232 <h2><?php echo esc_html( __( "Do you need help?", 'contact-form-7' ) ); ?></h2>
233 <div class="inside">
234 <p><?php echo esc_html( __( "Here are some available options to help solve your problems.", 'contact-form-7' ) ); ?></p>
235 <ol>
236 <li><?php echo sprintf(
237 /* translators: 1: FAQ, 2: Docs ("FAQ & Docs") */
238 __( '%1$s and %2$s', 'contact-form-7' ),
239 wpcf7_link(
240 __( 'https://contactform7.com/faq/', 'contact-form-7' ),
241 __( 'FAQ', 'contact-form-7' )
242 ),
243 wpcf7_link(
244 __( 'https://contactform7.com/docs/', 'contact-form-7' ),
245 __( 'docs', 'contact-form-7' )
246 )
247 ); ?></li>
248 <li><?php echo wpcf7_link(
249 __( 'https://wordpress.org/support/plugin/contact-form-7/', 'contact-form-7' ),
250 __( 'Support forums', 'contact-form-7' )
251 ); ?></li>
252 <li><?php echo wpcf7_link(
253 __( 'https://contactform7.com/custom-development/', 'contact-form-7' ),
254 __( 'Professional services', 'contact-form-7' )
255 ); ?></li>
256 </ol>
257 </div>
258 </section><!-- #informationdiv -->
259
260 </div><!-- #postbox-container-1 -->
261
262 <div id="postbox-container-2" class="postbox-container">
263 <div id="contact-form-editor" data-active-tab="">
264
265 <?php
266
267 $editor = new WPCF7_Editor( $post );
268 $panels = array();
269
270 if ( current_user_can( 'wpcf7_edit_contact_form', $post_id ) ) {
271 $panels = array(
272 'form-panel' => array(
273 'title' => __( 'Form', 'contact-form-7' ),
274 'callback' => 'wpcf7_editor_panel_form',
275 ),
276 'mail-panel' => array(
277 'title' => __( 'Mail', 'contact-form-7' ),
278 'callback' => 'wpcf7_editor_panel_mail',
279 ),
280 'messages-panel' => array(
281 'title' => __( 'Messages', 'contact-form-7' ),
282 'callback' => 'wpcf7_editor_panel_messages',
283 ),
284 );
285
286 $additional_settings = $post->prop( 'additional_settings' );
287
288 if ( ! is_scalar( $additional_settings ) ) {
289 $additional_settings = '';
290 }
291
292 $additional_settings = trim( $additional_settings );
293 $additional_settings = explode( "\n", $additional_settings );
294 $additional_settings = array_filter( $additional_settings );
295 $additional_settings = count( $additional_settings );
296
297 $panels['additional-settings-panel'] = array(
298 'title' => $additional_settings
299 ? sprintf(
300 /* translators: %d: number of additional settings */
301 __( 'Additional Settings (%d)', 'contact-form-7' ),
302 $additional_settings )
303 : __( 'Additional Settings', 'contact-form-7' ),
304 'callback' => 'wpcf7_editor_panel_additional_settings',
305 );
306 }
307
308 $panels = apply_filters( 'wpcf7_editor_panels', $panels );
309
310 foreach ( $panels as $id => $panel ) {
311 $editor->add_panel( $id, $panel['title'], $panel['callback'] );
312 }
313
314 $editor->display();
315
316 ?>
317 </div><!-- #contact-form-editor -->
318
319 <?php
320
321 if ( current_user_can( 'wpcf7_edit_contact_form', $post_id ) ) {
322 echo sprintf(
323 '<p class="submit">%s</p>',
324 $save_button
325 );
326 }
327
328 ?>
329
330 </div><!-- #postbox-container-2 -->
331
332 </div><!-- #post-body -->
333 <br class="clear" />
334 </div><!-- #poststuff -->
335 </form>
336
337 <?php
338
339 endif;
340
341 ?>
342
343 </div><!-- .wrap -->
344
345 <?php
346
347 $tag_generator = WPCF7_TagGenerator::get_instance();
348 $tag_generator->print_panels( $post );
349
350 do_action( 'wpcf7_admin_footer', $post );
351