1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
|
<?php defined( 'ABSPATH' ) or exit;
$tabs = array( 'fields' => esc_html__( 'Fields', 'mailchimp-for-wp' ), 'messages' => esc_html__( 'Messages', 'mailchimp-for-wp' ), 'settings' => esc_html__( 'Settings', 'mailchimp-for-wp' ), 'appearance' => esc_html__( 'Appearance', 'mailchimp-for-wp' ), );
/** * Filters the setting tabs on the "edit form" screen. * * @param array $tabs * @ignore */ $tabs = apply_filters( 'mc4wp_admin_edit_form_tabs', $tabs );
?> <div id="mc4wp-admin" class="wrap mc4wp-settings">
<p class="breadcrumbs"> <span class="prefix"><?php echo esc_html__( 'You are here: ', 'mailchimp-for-wp' ); ?></span> <a href="<?php echo esc_url( admin_url( 'admin.php?page=mailchimp-for-wp' ) ); ?>">Mailchimp for WordPress</a> › <a href="<?php echo esc_url( admin_url( 'admin.php?page=mailchimp-for-wp-forms' ) ); ?>"><?php echo esc_html__( 'Forms', 'mailchimp-for-wp' ); ?></a> › <span class="current-crumb"><strong><?php echo esc_html__( 'Form', 'mailchimp-for-wp' ); ?> <?php echo $form_id; ?> | <?php echo esc_html( $form->name ); ?></strong></span> </p>
<div class="row">
<!-- Main Content --> <div class="main-content col col-5">
<h1 class="page-title"> <?php echo esc_html__( 'Edit Form', 'mailchimp-for-wp' ); ?>
<!-- Form actions --> <?php
/** * @ignore */ do_action( 'mc4wp_admin_edit_form_after_title' ); ?> </h1>
<h2 style="display: none;"></h2><?php // fake h2 for admin notices ?>
<!-- Wrap entire page in <form> --> <form method="post"> <?php // default submit button to prevent opening preview ?> <input type="submit" style="display: none;" /> <input type="hidden" name="_mc4wp_action" value="edit_form"/> <input type="hidden" name="mc4wp_form_id" value="<?php echo esc_attr( $form->ID ); ?>"/> <?php wp_nonce_field( 'edit_form', '_mc4wp_nonce' ); ?>
<div id="titlediv" class="small-margin"> <div id="titlewrap"> <label class="screen-reader-text" for="title"><?php echo esc_html__( 'Enter form title here', 'mailchimp-for-wp' ); ?></label> <input type="text" name="mc4wp_form[name]" size="30" value="<?php echo esc_attr( $form->name ); ?>" id="title" spellcheck="true" autocomplete="off" placeholder="<?php echo esc_html__( 'Enter the title of your sign-up form', 'mailchimp-for-wp' ); ?>" style="line-height: initial;"> </div> <div> <?php echo sprintf( esc_html__( 'Use the shortcode %s to display this form inside a post, page or text widget.', 'mailchimp-for-wp' ), '<input type="text" onfocus="this.select();" readonly="readonly" value="' . esc_attr( sprintf( '[mc4wp_form id="%d"]', $form->ID ) ) . '" size="' . ( strlen( $form->ID ) + 18 ) . '">' ); ?> </div> </div>
<div> <h2 class="nav-tab-wrapper" id="mc4wp-tabs-nav"> <?php foreach ( $tabs as $tab => $name ) { $class = ( $active_tab === $tab ) ? 'nav-tab-active' : ''; echo sprintf( '<a class="nav-tab nav-tab-%s %s" href="%s">%s</a>', $tab, $class, esc_attr( $this->tab_url( $tab ) ), $name ); } ?> </h2>
<div id="mc4wp-tabs">
<?php foreach ( $tabs as $tab => $name ) :
$class = ( $active_tab === $tab ) ? 'tab-active' : '';
// start of .tab echo sprintf( '<div class="tab %s" id="tab-%s">', $class, $tab );
/** * Runs when outputting a tab section on the "edit form" screen * * @param string $tab * @ignore */ do_action( 'mc4wp_admin_edit_form_output_' . $tab . '_tab', $opts, $form );
$tab_file = __DIR__ . '/tabs/form-' . $tab . '.php'; if ( file_exists( $tab_file ) ) { include $tab_file; }
// end of .tab echo '</div>';
endforeach; // foreach tabs ?>
</div><!-- / tabs --> </div>
</form><!-- Entire page form wrap -->
<?php include MC4WP_PLUGIN_DIR . 'includes/views/parts/admin-footer.php'; ?>
</div>
<!-- Sidebar --> <div class="sidebar col col-1"> <?php include MC4WP_PLUGIN_DIR . 'includes/views/parts/admin-sidebar.php'; ?> </div>
</div>
</div>
|