PluginProbe ʕ •ᴥ•ʔ
Hustle – Email Marketing, Lead Generation, Optins, Popups / 7.8.9
Hustle – Email Marketing, Lead Generation, Optins, Popups v7.8.9
7.8.14 7.8.14.1 7.8.13 7.8.13.1 trunk 3.0 3.1 3.1.1 3.1.2 3.1.3 3.1.4 4.3.2 4.4.4 4.4.5 4.4.5.1 4.4.5.4 4.6 4.6.1.1 4.6.1.4 4.7.0.2 4.7.0.3 4.7.0.7 4.7.0.9 4.7.1.0 4.7.1.1 4.8.0.0 5.0.0 5.0.1 5.0.1.1 5.0.1.2 5.1 5.1.1 5.1.2 5.1.3 5.1.3.1 5.1.3.2 5.1.4 5.1.5 6.0 6.0.1 6.0.2 6.0.3 6.0.4.2 6.0.5 6.0.6.1 6.0.7 6.0.8.1 6.0.9 7.0.0.1 7.0.2 7.0.3 7.0.4 7.1.0 7.1.1 7.2.0 7.2.1 7.3.0 7.3.1 7.3.3 7.3.5 7.3.6 7.3.7 7.4.0 7.4.1 7.4.11 7.4.13 7.4.13.1 7.4.2 7.4.3 7.4.4 7.4.5 7.4.5.1 7.4.5.2 7.4.6 7.4.7 7.5.0 7.6.0 7.6.1 7.6.3 7.6.4 7.6.6 7.7.0 7.7.1 7.8.0 7.8.1 7.8.10 7.8.10.1 7.8.10.2 7.8.11 7.8.12 7.8.12.1 7.8.2 7.8.3 7.8.4 7.8.5 7.8.6 7.8.7 7.8.8 7.8.9 7.8.9.1 7.8.9.2 7.8.9.3
wordpress-popup / views / admin / commons / sui-wizard / wizard.php
wordpress-popup / views / admin / commons / sui-wizard Last commit date
dialogs 2 years ago elements 10 months ago tab-appearance 10 months ago tab-behaviour 10 months ago tab-content 10 months ago tab-display-options 10 months ago tab-emails 3 years ago tab-visibility 10 months ago templates 3 years ago navigation.php 10 months ago status-bar.php 5 years ago wizard.php 10 months ago
wizard.php
266 lines
1 <?php
2 /**
3 * Main wrapper for wizards.
4 *
5 * @uses ../../dialogs/migrate-dismiss-confirmation.php
6 * @uses ../../global/sui-components/sui-footer.php
7 * @uses ../dialogs/
8 * @uses ../templates/
9 * @uses ../navigation.php
10 * @uses ../status-bar.php
11 * @uses ../dialogs/modal-preview.php
12 *
13 * @package Hustle
14 * @since 4.0.0
15 */
16
17 $docs_section = Hustle_Module_Model::SOCIAL_SHARING_MODULE !== $module_type ? 'content' : 'social-sharing';
18 ?>
19
20 <div class="sui-header hui-header-with-settings">
21
22 <div class="hui-header-title">
23
24 <?php /* translators: module type capitalized and in singular */ ?>
25 <h1 class="sui-header-title"><?php printf( esc_html__( 'Edit %s', 'hustle' ), esc_html( $capitalize_singular ) ); ?></h1>
26
27 <?php $this->render( 'admin/commons/view-documentation', array( 'docs_section' => $docs_section ) ); ?>
28
29 </div>
30
31 <div class="hui-header-settings">
32
33 <div class="sui-actions-left">
34
35 <div id="hustle-module-name-wrapper" class="sui-form-field">
36
37 <label for="hustle-module-name" id="hustle-module-name-label" class="sui-screen-reader-text"><?php esc_html_e( 'Name your form', 'hustle' ); ?></label>
38
39 <input
40 type="text"
41 name="module_name"
42 value="<?php echo esc_attr( htmlspecialchars( $module_name, ENT_QUOTES, 'UTF-8' ) ); ?>"
43 placeholder="<?php esc_html_e( 'E.g. Newsletter', 'hustle' ); ?>"
44 id="hustle-module-name"
45 class="sui-form-control"
46 data-attribute="module_name"
47 aria-labelledby="hustle-module-name-label"
48 aria-describedby="hustle-module-name-message"
49 />
50
51 <p role="alert" id="hustle-module-name-error" class="sui-error-message" style="display: none; margin-bottom: 0px;" data-error-message="<?php esc_html_e( 'This field is required.', 'hustle' ); ?>"></p>
52
53 </div>
54
55 <?php // Dropdown list. ?>
56 <div id="hustle-module-more-options" class="sui-dropdown sui-accordion-item-action">
57
58 <?php
59 $this->render(
60 'admin/commons/sui-listing/elements/actions',
61 array(
62 'edit_page' => true,
63 'module' => $module,
64 'smallcaps_singular' => $smallcaps_singular,
65 'capitalize_singular' => $capitalize_singular,
66 )
67 );
68 ?>
69
70 </div>
71
72 <?php
73 // Create button.
74 $args = array(
75 'page' => Hustle_Data::get_listing_page_by_module_type( $module->module_type ),
76 'create-module' => 'true',
77 );
78
79 /* translators: module type */
80 $tooltip = sprintf( __( 'Create New %s', 'hustle' ), $capitalize_singular );
81 ?>
82 <a
83 href="<?php echo esc_url( add_query_arg( $args, 'admin.php' ) ); ?>"
84 class="sui-button-icon sui-tooltip sui-tooltip-bottom"
85 data-tooltip="<?php echo esc_attr( $tooltip ); ?>"
86 aria-label="<?php echo esc_attr( $tooltip ); ?>"
87 >
88 <span class="sui-icon-plus sui-md" aria-hidden="true"></span>
89 </a>
90
91 </div>
92
93 <?php $this->render( 'admin/commons/view-documentation', array( 'docs_section' => $docs_section ) ); ?>
94
95 </div>
96
97 </div>
98
99 <div id="hustle-floating-notifications-wrapper" class="sui-floating-notices"></div>
100
101 <div id="<?php echo esc_attr( $page_id ); ?>" class="sui-row-with-sidenav" data-nonce="<?php echo esc_attr( wp_create_nonce( 'hustle_save_module_wizard' ) ); ?>" data-id="<?php echo $module_id ? esc_attr( $module_id ) : '-1'; ?>">
102
103 <?php
104 // ELEMENT: Side Navigation.
105 $this->render(
106 'admin/commons/sui-wizard/navigation',
107 array(
108 'is_optin' => isset( $module_mode ) ? $module_mode : false,
109 'section' => $page_tab,
110 'wizard_tabs' => $wizard_tabs,
111 'module_name' => $module_name,
112 'module_type' => $module_type,
113 'module' => $module,
114 'smallcaps_singular' => $smallcaps_singular,
115 'capitalize_singular' => $capitalize_singular,
116 )
117 );
118 ?>
119
120 <div class="hustle-wizard-main-view">
121
122 <?php
123 // ELEMENT: Status Bar.
124 $this->render(
125 'admin/commons/sui-wizard/status-bar',
126 array(
127 'is_active' => $module_status,
128 'module_type' => $module_type,
129 )
130 );
131 ?>
132
133 <?php
134 foreach ( $wizard_tabs as $option ) {
135
136 $option_array = array();
137
138 if ( isset( $option['support'] ) ) {
139 $option_array = $option['support'];
140 }
141
142 if ( isset( $option['is_optin'] ) ) {
143
144 if ( $module_mode ) :
145
146 $this->render(
147 $option['template'],
148 $option_array
149 );
150
151 endif;
152
153 } else {
154
155 $this->render(
156 $option['template'],
157 $option_array
158 );
159 }
160 }
161 ?>
162
163 </div>
164
165 </div>
166
167 <?php $this->render( 'admin/global/sui-components/sui-footer' ); ?>
168
169 <?php if ( isset( $module_mode ) && $module_mode ) : ?>
170
171 <?php
172 // DIALOG: Integrations.
173 $this->render(
174 'admin/dialogs/modal-integration',
175 array( 'module_type' => $module_type )
176 );
177
178 // DIALOG: Optin Fields.
179 $this->render(
180 'admin/commons/sui-wizard/dialogs/optin-fields',
181 array(
182 'form_elements' => $form_elements,
183 )
184 );
185
186 // DIALOG: Edit Field.
187 $this->render(
188 'admin/commons/sui-wizard/dialogs/edit-field',
189 array(
190 'available_recaptchas' => Hustle_Settings_Admin::get_available_recaptcha_versions(),
191 )
192 );
193
194 // DIALOG: Final Field.
195 $this->render( 'admin/dialogs/final-integration-form-delete', array() );
196
197 // Row: Optin Field Row template.
198 $this->render( 'admin/commons/sui-wizard/elements/form-field', array() );
199 ?>
200
201 <?php endif; ?>
202
203 <?php
204 // DIALOG: add schedule. Only for non-ssharing modules.
205 if ( Hustle_Module_Model::SOCIAL_SHARING_MODULE !== $module->module_type ) {
206
207 $behavior_settings = $module->get_settings()->to_array();
208 $this->render(
209 'admin/commons/sui-wizard/dialogs/add-schedule',
210 array(
211 'module_type' => $module_type,
212 'settings' => $behavior_settings['schedule'],
213 )
214 );
215 }
216
217 // CHECK: Visibility Tab.
218 if ( array_key_exists( 'visibility', $wizard_tabs ) ) {
219
220 // DIALOG: Visibility.
221 $this->render(
222 'admin/commons/sui-wizard/dialogs/visibility-options',
223 array( 'smallcaps_singular' => $smallcaps_singular )
224 );
225
226 // TEMPLATE: Conditions.
227 $this->render(
228 'admin/commons/sui-wizard/tab-visibility/conditions',
229 array(
230 'smallcaps_singular' => $smallcaps_singular,
231 'module_type' => $module_type,
232 )
233 );
234 }
235
236 // CHECK: Services Tab.
237 if ( array_key_exists( 'services', $wizard_tabs ) ) {
238
239 // DIALOG: Social Platforms.
240 $this->render(
241 'admin/commons/sui-wizard/dialogs/add-platforms',
242 array()
243 );
244 }
245
246 // DIALOG: Publish Flow.
247 $this->render(
248 'admin/commons/sui-wizard/dialogs/publish-flow',
249 array(
250 'capitalize_singular' => $capitalize_singular,
251 'smallcaps_singular' => $smallcaps_singular,
252 )
253 );
254
255 // DIALOG: delete confirmation. For tracking.
256 $this->render( 'admin/commons/sui-listing/dialogs/delete-module' );
257
258 // DIALOG: Dissmiss migrate tracking notice modal confirmation.
259 if ( Hustle_Notifications::is_show_migrate_tracking_notice() ) {
260 $this->render( 'admin/dialogs/migrate-dismiss-confirmation' );
261 }
262
263 // Preview.
264 $this->render( 'admin/dialogs/modal-preview', array( 'module_type' => $capitalize_singular ) );
265 ?>
266