PluginProbe
weForms – Easy Drag & Drop Contact Form Builder For WordPress / 1.0.4
weForms – Easy Drag & Drop Contact Form Builder For WordPress v1.0.4
1.6.7 1.6.8 1.6.9 1.6.12 1.6.13 1.6.14 1.6.15 1.6.16 1.6.17 1.6.18 1.6.19 1.6.2 1.6.20 1.6.21 1.6.22 1.6.23 1.6.24 1.6.25 1.6.26 1.6.27 1.6.28 1.6.3 1.6.4 1.6.5 1.6.6 All 74 releases
weforms / assets / js-templates / spa-components.php

spa-components.php in weForms – Easy Drag & Drop Contact Form Builder For WordPress 1.0.4, at assets/js-templates/spa-components.php

888 lines 49.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <script type="text/x-template" id="tmpl-wpuf-component-table">
2 <div>
3
4 <div class="tablenav top">
5
6 <div class="alignleft actions bulkactions">
7 <label for="bulk-action-selector-top" class="screen-reader-text"><?php _e( 'Select bulk action', 'weforms' ); ?></label>
8 <select name="action" v-model="bulkAction">
9 <option value="-1"><?php _e( 'Bulk Actions', 'weforms' ); ?></option>
10 <option value="delete"><?php _e( 'Delete Entries', 'weforms' ); ?></option>
11 </select>
12
13 <button class="button action" v-on:click.prevent="handleBulkAction"><?php _e( 'Apply', 'weforms' ); ?></button>
14 </div>
15
16 <div class="alignleft actions">
17 <a class="button" :href="'admin-post.php?action=weforms_export_form_entries&selected_forms=' + id + '&_wpnonce=' + nonce" style="margin-top: 0;"><span class="dashicons dashicons-download" style="margin-top: 4px;"></span> <?php _e( 'Export Entries', 'weforms' ); ?></a>
18 </div>
19
20 <div class="tablenav-pages">
21
22 <span v-if="totalItems" class="displaying-num">{{ totalItems }} <?php _e( 'items', 'weforms' ); ?></span>
23
24 <span class="pagination-links">
25 <span v-if="isFirstPage()" class="tablenav-pages-navspan" aria-hidden="true">«</span>
26 <a v-else class="first-page" href="#" @click.prevent="goFirstPage()"><span class="screen-reader-text"><?php _e( 'First page', 'weforms' ); ?></span><span aria-hidden="true">«</span></a>
27
28 <span v-if="currentPage == 1" class="tablenav-pages-navspan" aria-hidden="true"></span>
29 <a v-else class="prev-page" href="#" @click.prevent="goToPage('prev')"><span class="screen-reader-text"><?php _e( 'Previous page', 'weforms' ); ?></span><span aria-hidden="true"></span></a>
30
31 <span class="screen-reader-text"><?php _e( 'Current Page', 'weforms' ); ?></span><input @keydown.enter.prevent="goToPage(pageNumberInput)" class="current-page" id="current-page-selector" v-model="pageNumberInput" type="text" value="1" size="1" aria-describedby="table-paging"> <?php _e( 'of', 'weforms' ); ?> <span class="total-pages">{{ totalPage }}</span>
32
33 <span v-if="currentPage == totalPage" class="tablenav-pages-navspan" aria-hidden="true"></span>
34 <a v-else class="next-page" href="#" @click.prevent="goToPage('next')"><span class="screen-reader-text"><?php _e( 'Next page', 'weforms' ); ?></span><span aria-hidden="true"></span></a>
35
36 <span v-if="isLastPage()" class="tablenav-pages-navspan" aria-hidden="true">»</span>
37 <a v-else class="last-page" href="#" @click.prevent="goLastPage()"><span class="screen-reader-text"><?php _e( 'Last page', 'weforms' ); ?></span><span aria-hidden="true">»</span></a>
38 </span>
39 </div>
40 </div>
41
42 <table class="wp-list-table widefat fixed striped wpuf-contact-form">
43 <thead>
44 <tr>
45 <td id="cb" class="manage-column column-cb check-column">
46 <input type="checkbox" v-model="selectAll">
47 </td>
48 <th class="col-entry-id"><?php _e( 'ID', 'weforms' ); ?></th>
49 <th v-for="(header, index) in columns">{{ header }}</th>
50 <th>Actions</th>
51 </tr>
52 </thead>
53 <tfoot>
54 <tr>
55 <td id="cb" class="manage-column column-cb check-column">
56 <input type="checkbox" v-model="selectAll">
57 </td>
58 <th class="col-entry-id"><?php _e( 'ID', 'weforms' ); ?></th>
59 <th v-for="(header, index) in columns">{{ header }}</th>
60 <th class="col-entry-details"><?php _e( 'Actions', 'weforms' ); ?></th>
61 </tr>
62 </tfoot>
63 <tbody>
64 <tr v-if="loading">
65 <td v-bind:colspan="columnLength + 3"><?php _e( 'Loading...', 'weforms' ); ?></td>
66 </tr>
67 <tr v-if="!items.length && !loading">
68 <td v-bind:colspan="columnLength + 3"><?php _e( 'No entries found!', 'weforms' ); ?></td>
69 </tr>
70 <tr v-for="(entry, index) in items">
71 <th scope="row" class="check-column">
72 <input type="checkbox" name="post[]" v-model="checkedItems" :value="entry.id">
73 </th>
74 <th class="col-entry-id">
75 <router-link :to="{ name: 'formEntriesSingle', params: { entryid: entry.id }}">#{{ entry.id }}</router-link>
76 </th>
77 <td v-for="(header, index) in columns">{{ entry.fields[index] }}</td>
78 <th class="col-entry-details">
79 <router-link :to="{ name: 'formEntriesSingle', params: { entryid: entry.id }}"><?php _e( 'Details', 'weforms' ); ?></router-link>
80 </th>
81 </tr>
82 </tbody>
83 </table>
84
85 <div class="tablenav bottom">
86 <div class="alignleft actions bulkactions">
87 <label for="bulk-action-selector-top" class="screen-reader-text"><?php _e( 'Select bulk action', 'weforms' ); ?></label>
88 <select name="action" v-model="bulkAction">
89 <option value="-1"><?php _e( 'Bulk Actions', 'weforms' ); ?></option>
90 <option value="delete"><?php _e( 'Delete Entries', 'weforms' ); ?></option>
91 </select>
92
93 <button class="button action" v-on:click.prevent="handleBulkAction"><?php _e( 'Apply', 'weforms' ); ?></button>
94 </div>
95
96 <div class="tablenav-pages">
97
98 <span v-if="totalItems" class="displaying-num">{{ totalItems }} <?php _e( 'items', 'weforms' ); ?></span>
99
100 <span class="pagination-links">
101 <span v-if="isFirstPage()" class="tablenav-pages-navspan" aria-hidden="true">«</span>
102 <a v-else class="first-page" href="#" @click.prevent="goFirstPage()"><span class="screen-reader-text"><?php _e( 'First page', 'weforms' ); ?></span><span aria-hidden="true">«</span></a>
103
104 <span v-if="currentPage == 1" class="tablenav-pages-navspan" aria-hidden="true"></span>
105 <a v-else class="prev-page" href="#" @click.prevent="goToPage('prev')"><span class="screen-reader-text"><?php _e( 'Previous page', 'weforms' ); ?></span><span aria-hidden="true"></span></a>
106
107 <span class="screen-reader-text"><?php _e( 'Current Page', 'weforms' ); ?></span><input @keydown.enter.prevent="goToPage(pageNumberInput)" class="current-page" id="current-page-selector" v-model="pageNumberInput" type="text" value="1" size="1" aria-describedby="table-paging"> of <span class="total-pages">{{ totalPage }}</span>
108
109 <span v-if="currentPage == totalPage" class="tablenav-pages-navspan" aria-hidden="true"></span>
110 <a v-else class="next-page" href="#" @click.prevent="goToPage('next')"><span class="screen-reader-text"><?php _e( 'Next page', 'weforms' ); ?></span><span aria-hidden="true"></span></a>
111
112 <span v-if="isLastPage()" class="tablenav-pages-navspan" aria-hidden="true">»</span>
113 <a v-else class="last-page" href="#" @click.prevent="goLastPage()"><span class="screen-reader-text"><?php _e( 'Last page', 'weforms' ); ?></span><span aria-hidden="true">»</span></a>
114 </span>
115 </div>
116 </div>
117 </div></script>
118
119 <script type="text/x-template" id="tmpl-wpuf-form-builder">
120 <form id="wpuf-form-builder" class="wpuf-form-builder-contact_form" method="post" action="" @submit.prevent="save_form_builder" v-cloak>
121 <fieldset :class="[is_form_saving ? 'disabled' : '']" :disabled="is_form_saving">
122
123 <h2 class="nav-tab-wrapper">
124 <a href="#wpuf-form-builder-container" :class="['nav-tab', isActiveTab( 'editor' ) ? 'nav-tab-active' : '']" v-on:click.prevent="makeActive('editor')">
125 <?php _e( 'Form Editor', 'weforms' ); ?>
126 </a>
127
128 <a href="#wpuf-form-builder-settings" :class="['nav-tab', isActiveTab( 'settings' ) ? 'nav-tab-active' : '']" v-on:click.prevent="makeActive('settings')">
129 <?php _e( 'Settings', 'weforms' ); ?>
130 </a>
131
132 <?php do_action( "wpuf-form-builder-tabs-contact_form" ); ?>
133
134 <span class="pull-right">
135 <a :href="'<?php echo site_url( '/' ); ?>?weforms_preview=1&form_id=' + post.ID" target="_blank" class="button"><span class="dashicons dashicons-visibility" style="padding-top: 3px;"></span> <?php _e( 'Preview', 'weforms' ); ?></a>
136
137 <button v-if="!is_form_saving" type="button" class="button button-primary" @click="save_form_builder">
138 <?php _e( 'Save Form', 'weforms' ); ?>
139 </button>
140
141 <button v-else type="button" class="button button-primary button-ajax-working" disabled>
142 <span class="loader"></span> <?php _e( 'Saving Form Data', 'weforms' ); ?>
143 </button>
144 </span>
145 </h2>
146
147 <div class="tab-contents" v-if="!loading">
148 <div id="wpuf-form-builder-container" v-show="isActiveTab('editor')">
149 <div id="builder-stage">
150 <header class="clearfix">
151 <span v-if="!post_title_editing" title="<?php esc_attr_e( 'Click to edit the form name', 'weforms' ); ?>" class="form-title" @click.prevent="post_title_editing = true"><span class="dashicons dashicons-edit"></span> {{ post.post_title }}</span>
152
153 <span v-show="post_title_editing">
154 <input type="text" v-model="post.post_title" name="post_title" />
155 <button type="button" class="button button-small" style="margin-top: 8px;" @click.prevent="post_title_editing = false"><i class="fa fa-check"></i></button>
156 </span>
157
158 <span class="form-id" title="<?php echo esc_attr_e( 'Click to copy shortcode', 'weforms' ); ?>" :data-clipboard-text='"[weforms id=\"" + post.ID + "\"]"'><i class="fa fa-clipboard" aria-hidden="true"></i> #{{ post.ID }}</span>
159 </header>
160
161 <ul v-if="is_form_switcher" class="form-switcher-content">
162
163 </ul>
164
165 <section>
166 <div id="form-preview">
167 <builder-stage></builder-stage>
168 </div>
169 </section>
170 </div><!-- #builder-stage -->
171
172 <div id="builder-form-fields">
173 <header>
174 <ul class="clearfix">
175 <li :class="['form-fields' === current_panel ? 'active' : '']">
176 <a href="#add-fields" @click.prevent="set_current_panel('form-fields')">
177 <?php _e( 'Add Fields', 'weforms' ); ?>
178 </a>
179 </li>
180
181 <li :class="['field-options' === current_panel ? 'active' : '', !form_fields_count ? 'disabled' : '']">
182 <a href="#field-options" @click.prevent="set_current_panel('field-options')">
183 <?php _e( 'Field Options', 'weforms' ); ?>
184 </a>
185 </li>
186 </ul>
187 </header>
188
189 <section>
190 <div class="wpuf-form-builder-panel">
191 <component :is="current_panel"></component>
192 </div>
193 </section>
194 </div><!-- #builder-form-fields -->
195 </div><!-- #wpuf-form-builder-container -->
196
197 <div id="wpuf-form-builder-settings" class="clearfix" v-show="isActiveTab('settings')">
198 <fieldset>
199 <h2 id="wpuf-form-builder-settings-tabs" class="nav-tab-wrapper">
200 <?php do_action( "wpuf-form-builder-settings-tabs-contact_form" ); ?>
201 </h2><!-- #wpuf-form-builder-settings-tabs -->
202
203 <div id="wpuf-form-builder-settings-contents" class="tab-contents">
204 <?php do_action( "wpuf-form-builder-settings-tab-contents-contact_form" ); ?>
205 </div><!-- #wpuf-form-builder-settings-contents -->
206 </fieldset>
207 </div><!-- #wpuf-form-builder-settings -->
208
209 <?php do_action( "wpuf-form-builder-tab-contents-contact_form" ); ?>
210 </div>
211 <div v-else>
212 <div class="updating-message">
213 <p><?php _e( 'Loading the editor', 'weforms' ); ?></p>
214 </div>
215 </div>
216
217 <input type="hidden" name="form_settings_key" value="wpuf_form_settings">
218
219 <?php wp_nonce_field( 'wpuf_form_builder_save_form', 'wpuf_form_builder_nonce' ); ?>
220
221 <input type="hidden" name="wpuf_form_id" :value="post.ID">
222 </fieldset>
223 </form><!-- #wpuf-form-builder -->
224 </script>
225
226 <script type="text/x-template" id="tmpl-wpuf-form-entries">
227 <div class="wpuf-contact-form-entries">
228 <h1 class="wp-heading-inline">
229 <?php _e( 'Entries', 'weforms' ); ?>
230 <span class="dashicons dashicons-arrow-right-alt2" style="margin-top: 5px;"></span>
231 <span style="color: #999;" class="form-name">{{ form_title }}</span>
232 </h1>
233
234 <router-link class="page-title-action" to="/"><?php _e( 'Back to forms', 'weforms' ); ?></router-link>
235
236 <wpuf-table action="weforms_form_entries" :id="id" v-on:ajaxsuccess="form_title = $event.form_title"></wpuf-table>
237
238 </div></script>
239
240 <script type="text/x-template" id="tmpl-wpuf-form-entry-single">
241 <div class="wpuf-contact-form-entry">
242 <h1 class="wp-heading-inline"><?php _e( 'Entry Details', 'weforms' ); ?></h1>
243 <router-link class="page-title-action" :to="{ name: 'formEntries', params: { id: $route.params.id }}"><?php _e( 'Back to Entries', 'weforms' ); ?></router-link>
244
245 <div v-if="loading"><?php _e( 'Loading...', 'weforms' ); ?></div>
246 <div v-else class="wpuf-contact-form-entry-wrap">
247
248 <div class="wpuf-contact-form-entry-left">
249 <div class="postbox">
250 <h2 class="hndle ui-sortable-handle"><span>{{ entry.info.form_title }} : Entry # {{ $route.params.entryid }}</span></h2>
251
252 <div class="main">
253 <table v-if="hasFormFields" class="wp-list-table widefat fixed striped posts">
254 <tbody>
255 <template v-for="(field, index) in entry.form_fields">
256 <tr class="field-label">
257 <th><strong>{{ field.label }}</strong></th>
258 </tr>
259 <tr class="field-value">
260 <td>
261 <weforms-entry-gmap :lat="entry.meta_data[index]['lat']" :long="entry.meta_data[index]['long']" v-if="field.type == 'map'"></weforms-entry-gmap>
262 <div v-else-if="field.type === 'checkbox' || field.type === 'multiselect'">
263 <ul style="margin: 0;">
264 <li v-for="item in entry.meta_data[index]">- {{ item }}</li>
265 </ul>
266 </div>
267 <div v-else v-html="entry.meta_data[index]"></div>
268 </td>
269 </tr>
270 </template>
271 </tbody>
272 </table>
273 <div v-else><div class="inside"><?php _e( 'Loading...', 'weforms' ); ?></div></div>
274
275 </div>
276 </div>
277 </div>
278
279 <div class="wpuf-contact-form-entry-right">
280 <div class="postbox">
281 <h2 class="hndle ui-sortable-handle"><span><?php _e( 'Submission Info', 'weforms' ); ?></span></h2>
282 <div class="inside">
283 <div class="main">
284
285 <ul>
286 <li>
287 <span class="label"><?php _e( 'Entry ID', 'weforms' ); ?></span>
288 <span class="sep"> : </span>
289 <span class="value">#{{ $route.params.entryid }}</span>
290 </li>
291 <li>
292 <span class="label"><?php _e( 'User IP', 'weforms' ); ?></span>
293 <span class="sep"> : </span>
294 <span class="value">{{ entry.info.ip }}</span>
295 </li>
296 <li>
297 <span class="label"><?php _e( 'Page', 'weforms' ); ?></span>
298 <span class="sep"> : </span>
299 <span class="value"><a :href="entry.info.referer">{{ entry.info.referer }}</a></span>
300 </li>
301 <li v-if="entry.info.user">
302 <span class="label"><?php _e( 'From', 'weforms' ); ?></span>
303 <span class="sep"> : </span>
304 <span class="value">{{ entry.info.user }}</span>
305 </li>
306 <li>
307 <span class="label"><?php _e( 'Submitted On', 'weforms' ); ?></span>
308 <span class="sep"> : </span>
309 <span class="value">{{ entry.info.created }}</span>
310 </li>
311 </ul>
312 </div>
313 </div>
314
315 <div id="major-publishing-actions">
316 <div id="publishing-action">
317 <button class="button button-large button-secondary" v-on:click.prevent="trashEntry"><span class="dashicons dashicons-trash"></span><?php _e( ' Delete', 'weforms' ); ?></button>
318 </div>
319 <div class="clear"></div>
320 </div>
321 </div>
322 </div>
323 </div>
324 </div></script>
325
326 <script type="text/x-template" id="tmpl-wpuf-form-list-table">
327 <div class="content table-responsive table-full-width" style="margin-top: 20px;">
328
329 <div class="tablenav top">
330 <div class="alignleft actions bulkactions">
331 <label for="bulk-action-selector-top" class="screen-reader-text"><?php _e( 'Select bulk action', 'weforms' ); ?></label>
332 <select name="action" v-model="bulkAction">
333 <option value="-1"><?php _e( 'Bulk Actions', 'weforms' ); ?></option>
334 <option value="delete"><?php _e( 'Delete Forms', 'weforms' ); ?></option>
335 </select>
336
337 <button class="button action" v-on:click.prevent="handleBulkAction"><?php _e( 'Apply', 'weforms' ); ?></button>
338 </div>
339
340 <div class="tablenav-pages">
341
342 <span v-if="totalItems" class="displaying-num">{{ totalItems }} <?php _e( 'items', 'weforms' ); ?></span>
343
344 <span class="pagination-links">
345 <span v-if="isFirstPage()" class="tablenav-pages-navspan" aria-hidden="true">«</span>
346 <a v-else class="first-page" href="#" @click.prevent="goFirstPage()"><span class="screen-reader-text"><?php _e( 'First page', 'weforms' ); ?></span><span aria-hidden="true">«</span></a>
347
348 <span v-if="currentPage == 1" class="tablenav-pages-navspan" aria-hidden="true"></span>
349 <a v-else class="prev-page" href="#" @click.prevent="goToPage('prev')"><span class="screen-reader-text"><?php _e( 'Previous page', 'weforms' ); ?></span><span aria-hidden="true"></span></a>
350
351 <span class="screen-reader-text"><?php _e( 'Current Page', 'weforms' ); ?></span><input @keydown.enter.prevent="goToPage(pageNumberInput)" class="current-page" id="current-page-selector" v-model="pageNumberInput" type="text" value="1" size="1" aria-describedby="table-paging"> <?php _e( 'of', 'weforms' ); ?> <span class="total-pages">{{ totalPage }}</span>
352
353 <span v-if="currentPage == totalPage" class="tablenav-pages-navspan" aria-hidden="true"></span>
354 <a v-else class="next-page" href="#" @click.prevent="goToPage('next')"><span class="screen-reader-text"><?php _e( 'Next page', 'weforms' ); ?></span><span aria-hidden="true"></span></a>
355
356 <span v-if="isLastPage()" class="tablenav-pages-navspan" aria-hidden="true">»</span>
357 <a v-else class="last-page" href="#" @click.prevent="goLastPage()"><span class="screen-reader-text"><?php _e( 'Last page', 'weforms' ); ?></span><span aria-hidden="true">»</span></a>
358 </span>
359 </div>
360 </div>
361
362 <table class="wp-list-table widefat fixed striped posts">
363 <thead>
364 <tr>
365 <td id="cb" class="manage-column column-cb check-column">
366 <label class="screen-reader-text" for="cb-select-all-1"><?php _e( 'Select All', 'weforms' ); ?></label>
367 <input type="checkbox" v-model="selectAll">
368 </td>
369 <th scope="col" class="col-form-name"><?php _e( 'Name', 'weforms' ); ?></th>
370 <th scope="col" class="col-form-shortcode"><?php _e( 'Shortcode', 'weforms' ); ?></th>
371 <th scope="col" class="col-form-entries"><?php _e( 'Entries', 'weforms' ); ?></th>
372 <th scope="col" class="col-form-views"><?php _e( 'Views', 'weforms' ); ?></th>
373 <th scope="col" class="col-form-conversion"><?php _e( 'Conversion', 'weforms' ); ?></th>
374 </tr>
375 </thead>
376 <tbody>
377 <tr v-if="loading">
378 <td colspan="6"><?php _e( 'Loading...', 'weforms' ); ?></td>
379 </tr>
380 <tr v-if="!items.length && !loading">
381 <td colspan="6"><?php _e( 'No form found!', 'weforms' ); ?></td>
382 </tr>
383 <tr v-for="(form, index) in items">
384 <th scope="row" class="check-column">
385 <input type="checkbox" name="post[]" v-model="checkedItems" :value="form.ID">
386 </th>
387 <td class="title column-title has-row-actions column-primary page-title">
388 <strong><router-link :to="{ name: 'edit', params: { id: form.ID }}">{{ form.post_title }}</router-link> <span v-if="form.post_status != 'publish'">({{ form.post_status }})</span></strong>
389
390 <div class="row-actions">
391 <span class="edit"><router-link :to="{ name: 'edit', params: { id: form.ID }}"><?php _e( 'Edit', 'weforms' ); ?></router-link> | </span>
392 <span class="trash"><a href="#" v-on:click.prevent="deleteForm(index)" class="submitdelete"><?php _e( 'Delete', 'weforms' ); ?></a> | </span>
393 <span class="duplicate"><a href="#" v-on:click.prevent="duplicate(form.ID, index)"><?php _e( 'Duplicate', 'weforms' ); ?></a> <template v-if="form.entries">|</template> </span>
394 <router-link v-if="form.entries" :to="{ name: 'formEntries', params: { id: form.ID }}"><?php _e( 'View Entries', 'weforms' ); ?></router-link>
395 </div>
396 </td>
397 <td><code>[weforms id="{{ form.ID }}"]</code></td>
398 <td>
399 <router-link v-if="form.entries" :to="{ name: 'formEntries', params: { id: form.ID }}">{{ form.entries }}</router-link>
400 <span v-else>&mdash;</span>
401 </td>
402 <td>{{ form.views }}</td>
403 <td>
404 <span v-if="form.views">{{ ((form.entries/form.views) * 100).toFixed(2) }}%</span>
405 <span v-else>0%</span>
406 </td>
407 </tr>
408 </tbody>
409
410 <tfoot>
411 <tr>
412 <td id="cb" class="manage-column column-cb check-column">
413 <label class="screen-reader-text" for="cb-select-all-1"><?php _e( 'Select All', 'weforms' ); ?></label>
414 <input type="checkbox" v-model="selectAll">
415 </td>
416 <th scope="col" class="col-form-name"><?php _e( 'Name', 'weforms' ); ?></th>
417 <th scope="col" class="col-form-shortcode"><?php _e( 'Shortcode', 'weforms' ); ?></th>
418 <th scope="col" class="col-form-entries"><?php _e( 'Entries', 'weforms' ); ?></th>
419 <th scope="col" class="col-form-views"><?php _e( 'Views', 'weforms' ); ?></th>
420 <th scope="col" class="col-form-conversion"><?php _e( 'Conversion', 'weforms' ); ?></th>
421 </tr>
422 </tfoot>
423 </table>
424
425 <div class="tablenav bottom">
426 <div class="alignleft actions bulkactions">
427 <label for="bulk-action-selector-top" class="screen-reader-text"><?php _e( 'Select bulk action', 'weforms' ); ?></label>
428 <select name="action" v-model="bulkAction">
429 <option value="-1"><?php _e( 'Bulk Actions', 'weforms' ); ?></option>
430 <option value="delete"><?php _e( 'Delete Forms', 'weforms' ); ?></option>
431 </select>
432
433 <button class="button action" v-on:click.prevent="handleBulkAction"><?php _e( 'Apply', 'weforms' ); ?></button>
434 </div>
435
436 <div class="tablenav-pages">
437
438 <span v-if="totalItems" class="displaying-num">{{ totalItems }} <?php _e( 'items', 'weforms' ); ?></span>
439
440 <span class="pagination-links">
441 <span v-if="isFirstPage()" class="tablenav-pages-navspan" aria-hidden="true">«</span>
442 <a v-else class="first-page" href="#" @click.prevent="goFirstPage()"><span class="screen-reader-text"><?php _e( 'First page', 'weforms' ); ?></span><span aria-hidden="true">«</span></a>
443
444 <span v-if="currentPage == 1" class="tablenav-pages-navspan" aria-hidden="true"></span>
445 <a v-else class="prev-page" href="#" @click.prevent="goToPage('prev')"><span class="screen-reader-text"><?php _e( 'Previous page', 'weforms' ); ?></span><span aria-hidden="true"></span></a>
446
447 <span class="screen-reader-text"><?php _e( 'Current Page', 'weforms' ); ?></span><input @keydown.enter.prevent="goToPage(pageNumberInput)" class="current-page" id="current-page-selector" v-model="pageNumberInput" type="text" value="1" size="1" aria-describedby="table-paging"> <?php _e( 'of', 'weforms' ); ?> <span class="total-pages">{{ totalPage }}</span>
448
449 <span v-if="currentPage == totalPage" class="tablenav-pages-navspan" aria-hidden="true"></span>
450 <a v-else class="next-page" href="#" @click.prevent="goToPage('next')"><span class="screen-reader-text"><?php _e( 'Next page', 'weforms' ); ?></span><span aria-hidden="true"></span></a>
451
452 <span v-if="isLastPage()" class="tablenav-pages-navspan" aria-hidden="true">»</span>
453 <a v-else class="last-page" href="#" @click.prevent="goLastPage()"><span class="screen-reader-text"><?php _e( 'Last page', 'weforms' ); ?></span><span aria-hidden="true">»</span></a>
454 </span>
455 </div>
456 </div>
457 </div></script>
458
459 <script type="text/x-template" id="tmpl-wpuf-home-page">
460 <div class="contact-form-list">
461 <h1 class="wp-heading-inline"><?php _e( 'All Forms', 'weforms' ); ?></h1>
462 <a class="page-title-action add-form" herf="#" v-on:click.prevent="displayModal()"><?php _e( 'Add Form', 'weforms' ); ?></a>
463
464 <wpuf-template-modal :show.sync="showTemplateModal" :onClose="closeModal"></wpuf-template-modal>
465
466 <form-list-table></form-list-table>
467 </div></script>
468
469 <script type="text/x-template" id="tmpl-wpuf-tools">
470 <div class="export-import-wrap">
471
472 <h2 class="nav-tab-wrapper">
473 <a :class="['nav-tab', isActiveTab( 'export' ) ? 'nav-tab-active' : '']" href="#" v-on:click.prevent="makeActive('export')"><?php _e( 'Export', 'wpuf' ); ?></a>
474 <a :class="['nav-tab', isActiveTab( 'import' ) ? 'nav-tab-active' : '']" href="#" v-on:click.prevent="makeActive('import')"><?php _e( 'Import', 'wpuf' ); ?></a>
475 </h2>
476
477 <div class="nav-tab-content">
478 <div class="nav-tab-inside" v-show="isActiveTab('export')">
479 <h3><?php _e( 'Export Utility', 'weforms' ); ?></h3>
480
481 <p><?php _e( 'You can export your form, as well as exporting the submitted entries by the users', 'weforms' ); ?></p>
482
483 <div class="postboxes metabox-holder two-col">
484 <div class="postbox">
485 <h3 class="hndle"><?php _e( 'Export Forms', 'weforms' ); ?></h3>
486
487 <div class="inside">
488 <p class="help">
489 <?php _e( 'You can export your existing contact forms and import the same forms into a different site.', 'weforms' ); ?>
490 </p>
491
492 <template v-if="!loading">
493 <form action="admin-post.php?action=weforms_export_forms" method="post">
494 <p><label><input v-model="exportType" type="radio" name="export_type" value="all" checked> <?php _e( 'All Forms', 'weforms' ); ?></label></p>
495 <p><label><input v-model="exportType" type="radio" name="export_type" value="selected"> <?php _e( 'Selected Forms', 'weforms' ); ?></label></p>
496 <p v-show="exportType == 'selected'">
497 <select name="selected_forms[]" class="forms-list" multiple="multiple">
498 <option v-for="entry in forms" :value="entry.id">{{ entry.title }}</option>
499 </select>
500 </p>
501
502 <?php wp_nonce_field( 'weforms-export-forms' ); ?>
503 <input type="submit" class="button button-primary" name="weforms_export_forms" value="<?php _e( 'Export Forms', 'weforms' ) ?>">
504 </form>
505 </template>
506 <template v-else>
507 <div class="spinner loading-spinner is-active"></div>
508 </template>
509 </div>
510 </div><!-- .postbox -->
511
512 <div class="postbox">
513 <h3 class="hndle"><?php _e( 'Export Form Entries', 'weforms' ); ?></h3>
514
515 <div class="inside">
516 <p class="help">
517 <?php _e( 'Export your form entries/submissions as a <strong>CSV</strong> file.', 'weforms' ); ?>
518 </p>
519
520 <template v-if="!loading">
521 <form action="admin-post.php?action=weforms_export_form_entries" method="post">
522 <p>
523 <select name="selected_forms" class="forms-list">
524 <option value=""><?php _e( '&mdash; Select Form &mdash;', 'weforms' ); ?></option>
525 <option v-for="entry in forms" :value="entry.id">{{ entry.title }}</option>
526 </select>
527 </p>
528
529 <?php wp_nonce_field( 'weforms-export-entries' ); ?>
530 <input type="submit" class="button button-primary" name="weforms_export_entries" value="<?php _e( 'Export Entries', 'weforms' ) ?>">
531 </form>
532 </template>
533 <template v-else>
534 <div class="spinner loading-spinner is-active"></div>
535 </template>
536 </div>
537 </div><!-- .postbox -->
538 </div>
539 </div>
540
541 <div class="nav-tab-inside" v-show="isActiveTab('import')">
542 <h3><?php _e( 'Import Contact Form', 'weforms' ); ?></h3>
543
544 <p><?php _e( 'Browse and locate a json file you backed up before.', 'weforms' ); ?></p>
545 <p><?php _e( 'Press <strong>Import</strong> button, we will do the rest for you.', 'weforms' ); ?></p>
546
547 <div class="updated-message notice notice-success is-dismissible" v-if="isSuccess">
548 <p>{{ responseMessage }}</p>
549
550 <button type="button" class="notice-dismiss" v-on:click="currentStatus = 0">
551 <span class="screen-reader-text"><?php _e( 'Dismiss this notice.', 'weforms' ); ?></span>
552 </button>
553 </div>
554
555 <div class="update-message notice notice-error is-dismissible" v-if="isFailed">
556 <p>{{ responseMessage }}</p>
557
558 <button type="button" class="notice-dismiss" v-on:click="currentStatus = 0">
559 <span class="screen-reader-text"><?php _e( 'Dismiss this notice.', 'weforms' ); ?></span>
560 </button>
561 </div>
562
563 <form action="" method="post" enctype="multipart/form-data" style="margin-top: 20px;">
564 <input type="file" name="importFile" v-on:change="importForm( $event.target.name, $event.target.files, $event )" accept="application/json" />
565 <button type="submit" :class="['button', isSaving ? 'updating-message' : '']" disabled="disabled">{{ importButton }}</button>
566 </form>
567
568 <hr>
569 <h3><?php _e( 'Import Other Forms', 'weforms' ); ?></h3>
570 <p><?php _e( 'You can import other WordPress form plugins into weForms.', 'weforms' ); ?></p>
571
572 <div class="updated" v-if="ximport.title">
573 <p><strong>{{ ximport.title }}</strong></p>
574
575 <p>{{ ximport.message }}</p>
576 <p>{{ ximport.action }}</p>
577
578 <ul v-if="hasRefs">
579 <li v-for="ref in ximport.refs">
580 <a target="_blank" :href="'admin.php?page=weforms#/form/' + ref.weforms_id + '/edit'">{{ ref.title }}</a> - <a :href="'admin.php?page=weforms#/form/' + ref.weforms_id + '/edit'" target="_blank" class="button button-small"><span class="dashicons dashicons-external"></span> <?php _e( 'Edit', 'weforms' ); ?></a>
581 </li>
582 </ul>
583
584 <p>
585 <a href="#" class="button button-primary" @click.prevent="replaceX($event.target, 'replace')"><?php _e( 'Replace Shortcodes', 'weforms' ); ?></a>&nbsp;
586 <a href="#" class="button" @click.prevent="replaceX($event.target, 'skip')"><?php _e( 'No Thanks', 'weforms' ); ?></a>
587 </p>
588 </div>
589
590
591 <table style="min-width: 500px;">
592 <tbody>
593 <tr>
594 <td><?php _e( 'Contact Form 7', 'weforms' ); ?></td>
595 <th><button class="button" @click.prevent="importx($event.target, 'cf7')" data-importing="<?php esc_attr_e( 'Importing...', 'weforms' ); ?>" data-original="<?php esc_attr_e( 'Import', 'weforms' ); ?>"><?php _e( 'Import', 'weforms' ); ?></button></th>
596 </tr>
597 <tr>
598 <td><?php _e( 'Ninja Forms', 'weforms' ); ?></td>
599 <th><button class="button" @click.prevent="importx($event.target, 'nf')" data-importing="<?php esc_attr_e( 'Importing...', 'weforms' ); ?>" data-original="<?php esc_attr_e( 'Import', 'weforms' ); ?>"><?php _e( 'Import', 'weforms' ); ?></button></th>
600 </tr>
601 <tr>
602 <td><?php _e( 'Caldera Forms', 'weforms' ); ?></td>
603 <th><button class="button" @click.prevent="importx($event.target, 'caldera-forms')" data-importing="<?php esc_attr_e( 'Importing...', 'weforms' ); ?>" data-original="<?php esc_attr_e( 'Import', 'weforms' ); ?>"><?php _e( 'Import', 'weforms' ); ?></button></th>
604 </tr>
605 <tr>
606 <td><?php _e( 'Gravity Forms', 'weforms' ); ?></td>
607 <th><button class="button" @click.prevent="importx($event.target, 'gf')" data-importing="<?php esc_attr_e( 'Importing...', 'weforms' ); ?>" data-original="<?php esc_attr_e( 'Import', 'weforms' ); ?>"><?php _e( 'Import', 'weforms' ); ?></button></th>
608 </tr>
609 <tr>
610 <td><?php _e( 'WP Forms', 'weforms' ); ?></td>
611 <th><button class="button" @click.prevent="importx($event.target, 'wpforms')" data-importing="<?php esc_attr_e( 'Importing...', 'weforms' ); ?>" data-original="<?php esc_attr_e( 'Import', 'weforms' ); ?>"><?php _e( 'Import', 'weforms' ); ?></button></th>
612 </tr>
613 </tbody>
614 </table>
615 </div>
616 </div>
617 </div></script>
618
619 <script type="text/x-template" id="tmpl-wpuf-weforms-page-help">
620 <div class="weforms-help-page">
621
622 <div class="help-block">
623 <img src="<?php echo WEFORMS_ASSET_URI; ?>/images/help/docs.svg" alt="<?php esc_attr_e( 'Looking for Something?', 'weforms' ); ?>">
624
625 <h3><?php _e( 'Looking for Something?', 'weforms' ); ?></h3>
626
627 <p><?php _e( 'We have detailed documentation on every aspects of weForms.', 'weforms' ); ?></p>
628
629 <a target="_blank" class="button button-primary" href="https://docs.wedevs.com/docs/weforms/"><?php _e( 'Visit the Plugin Documentation', 'weforms' ); ?></a>
630 </div>
631
632 <div class="help-block">
633 <img src="<?php echo WEFORMS_ASSET_URI; ?>/images/help/support.svg" alt="<?php esc_attr_e( 'Need Any Assistance?', 'weforms' ); ?>">
634
635 <h3><?php _e( 'Need Any Assistance?', 'weforms' ); ?></h3>
636
637 <p><?php _e( 'Our EXPERT Support Team is always ready to Help you out.', 'weforms' ); ?></p>
638
639 <a target="_blank" class="button button-primary" href="https://wedevs.com/account/tickets/"><?php _e( 'Contact Support', 'weforms' ); ?></a>
640 </div>
641
642 <div class="help-block">
643 <img src="<?php echo WEFORMS_ASSET_URI; ?>/images/help/bugs.svg" alt="<?php esc_attr_e( 'Found Any Bugs?', 'weforms' ); ?>">
644
645 <h3><?php _e( 'Found Any Bugs?', 'weforms' ); ?></h3>
646
647 <p><?php _e( 'Report any Bug that you Discovered, Get Instant Solutions.', 'weforms' ); ?></p>
648
649 <a target="_blank" class="button button-primary" href="https://github.com/weDevsOfficial/weforms"><?php _e( 'Report to GitHub', 'weforms' ); ?></a>
650 </div>
651
652 <div class="help-block">
653 <img src="<?php echo WEFORMS_ASSET_URI; ?>/images/help/customization.svg" alt="<?php esc_attr_e( 'Require Customization?', 'weforms' ); ?>">
654
655 <h3><?php _e( 'Require Customization?', 'weforms' ); ?></h3>
656
657 <p><?php _e( 'We would Love to hear your Integration and Customization Ideas.', 'weforms' ); ?></p>
658
659 <a target="_blank" class="button button-primary" href="https://wedevs.com/contact/"><?php _e( 'Contact Our Services', 'weforms' ); ?></a>
660 </div>
661
662 <div class="help-block">
663 <img src="<?php echo WEFORMS_ASSET_URI; ?>/images/help/like.svg" alt="<?php esc_attr_e( 'Like The Plugin?', 'weforms' ); ?>">
664
665 <h3><?php _e( 'Like The Plugin?', 'weforms' ); ?></h3>
666
667 <p><?php _e( 'Your Review is very important to us as it helps us to grow more.', 'weforms' ); ?></p>
668
669 <a target="_blank" class="button button-primary" href="https://wordpress.org/support/plugin/weforms/reviews/?rate=5#new-post"><?php _e( 'Review Us on WP.org', 'weforms' ); ?></a>
670 </div>
671 </div></script>
672
673 <script type="text/x-template" id="tmpl-wpuf-weforms-premium">
674 <div class="wrap weforms-premium about-wrap">
675 <h1><?php _e( 'weForms Pro', 'weforms' ); ?></h1>
676
677 <p class="about-text"><?php _e( 'Upgrade to the premium versions of weForms and unlock even more useful features.', 'weforms' ); ?></p>
678 <div class="wp-badge">weForms Pro</div>
679
680 <hr>
681 <div class="feature-section one-col">
682 <div class="col">
683 <h2><?php _e( 'More Features', 'weforms' ); ?></h2>
684 <p style="text-align: center;">weForms Pro is designed just for you, specially to fulfil your business needs. We have designed and curated every package keeping your requirements in mind.</p>
685 </div>
686 </div>
687
688 <div class="feature-section two-col">
689 <div class="col">
690 <h3>Advanced Fields</h3>
691 <p>Build any kind of form flexibly with the advanced field option. Its user friendly interface makes sure you do not have to scratch your head over building forms.</p>
692 </div>
693
694 <div class="col">
695 <h3>Conditional Logic</h3>
696 <p>Configure your form’s settings and user flow based on conditional selection. Your forms should appear just the way you want it.</p>
697 </div>
698
699 <div class="col">
700 <h3>Multi-step Form</h3>
701 <p>Break down the long forms into small and attractive multi step forms. Long and lengthy forms are uninviting, why build one?</p>
702 </div>
703
704 <div class="col">
705 <h3>File Uploaders</h3>
706 <p>Let the user upload any kind of file by filling up your contact form. The process is unbelievably smooth and supports a wide range of file formats.</p>
707 </div>
708
709 <div class="col">
710 <h3>Form Submission Notification</h3>
711 <p>Receive email notification every time your form is submitted. You can now configure the notification settings just as you like it.</p>
712 </div>
713
714 <div class="col">
715 <h3>Manage Submission</h3>
716 <p>View, edit and manage all the submission data stored through your form. We believe that you should own it all- like literally!</p>
717 </div>
718 </div>
719
720 <hr>
721
722 <h2><?php _e( 'More Integrations', 'weforms' ); ?></h2>
723
724 <div class="headline-feature four-col">
725 <div class="col">
726 <img src="<?php echo WEFORMS_ASSET_URI; ?>/images/integrations/mailchimp.svg" alt="MailChimp Integration">
727 <h3>MailChimp</h3>
728 <p>Integrate your desired form to your MailChimp email newsletter using latest API.</p>
729 </div>
730
731 <div class="col">
732 <img src="<?php echo WEFORMS_ASSET_URI; ?>/images/integrations/campaign-monitor.svg" alt="">
733 <h3>Campaign Monitor</h3>
734 <p>Lets you add submission form in your Campaign Monitor email campaigns too.</p>
735 </div>
736
737 <div class="col">
738 <img src="<?php echo WEFORMS_ASSET_URI; ?>/images/integrations/constant-contact.svg" alt="">
739 <h3>Constant Contact</h3>
740 <p>Integrate your contact forms seamlessly with your Constant Contact account.</p>
741 </div>
742
743 <div class="col">
744 <img src="<?php echo WEFORMS_ASSET_URI; ?>/images/integrations/mailpoet.svg" alt="">
745 <h3>MailPoet</h3>
746 <p>Why only MailChimp? Do the same for MailPoet email campaigns as well!</p>
747 </div>
748
749 <div class="col">
750 <img src="<?php echo WEFORMS_ASSET_URI; ?>/images/integrations/aweber.svg" alt="">
751 <h3>AWeber</h3>
752 <p>Use highly customizable forms and create subscriber’s list for AWber email solution.</p>
753 </div>
754
755 <div class="col">
756 <img src="<?php echo WEFORMS_ASSET_URI; ?>/images/integrations/getresponse.svg" alt="">
757 <h3>Get Response</h3>
758 <p>Enjoy seamless integration of weForms with your Get Response account.</p>
759 </div>
760
761 <div class="col">
762 <img src="<?php echo WEFORMS_ASSET_URI; ?>/images/integrations/convertkit.svg" alt="">
763 <h3>ConvertKit</h3>
764 <p>Subscribe a contact to ConvertKit when a form is submited.</p>
765 </div>
766
767 <div class="col">
768 <img src="<?php echo WEFORMS_ASSET_URI; ?>/images/integrations/more.svg" alt="">
769 <h3>More...</h3>
770 <p>A bunch of more integrations are coming soon.</p>
771 </div>
772 </div>
773
774 <div style="display: block; height: 100px; overflow: hidden;"></div>
775
776 <div class="weforms-upgrade-sticky-footer">
777 <p><a class="button button-primary" href="<?php echo WeForms_Form_Builder_Assets::get_pro_url(); ?>" target="_blank"><?php _e( 'Upgrade Now', 'weforms' ); ?></a></p>
778 </div>
779
780 </div></script>
781
782 <script type="text/x-template" id="tmpl-wpuf-weforms-settings">
783 <div class="weforms-settings">
784 <h1><?php _e( 'Settings', 'weforms' ); ?></h1>
785
786 <div class="postboxes metabox-holder two-col">
787 <div class="postbox">
788 <h3 class="hndle"><?php _e( 'General Settings', 'weforms' ); ?></h3>
789
790 <div class="inside">
791 <p class="help">
792 <?php _e( 'For better email deliverability choose a email provider that will ensure the email reaches your inbox, as well as reducing your server load.', 'weforms' ); ?>
793 </p>
794
795 <table class="form-table">
796 <tr>
797 <th><?php _e( 'Send Email Via', 'weforms' ); ?></th>
798 <td>
799 <select v-model="settings.email_gateway">
800 <option value="wordpress"><?php _e( 'WordPress', 'weforms' ); ?></option>
801 <option value="sendgrid" :disabled="is_pro ? false : true"><?php _e( 'SendGrid', 'weforms' ); ?> <span v-if="!is_pro">(<?php _e( 'Premium', 'weforms' ); ?>)</span></option>
802 <option value="mailgun" :disabled="is_pro ? false : true"><?php _e( 'Mailgun', 'weforms' ); ?> <span v-if="!is_pro">(<?php _e( 'Premium', 'weforms' ); ?>)</span></option>
803 <option value="sparkpost" :disabled="is_pro ? false : true"><?php _e( 'SparkPost', 'weforms' ); ?> <span v-if="!is_pro">(<?php _e( 'Premium', 'weforms' ); ?>)</span></option>
804 </select>
805 </td>
806 </tr>
807 <tr v-if="settings.email_gateway == 'sendgrid'">
808 <th><?php _e( 'SendGrid API Key', 'weforms' ); ?></th>
809 <td>
810 <input type="text" v-model="settings.gateways.sendgrid" class="regular-text">
811
812 <p class="description"><?php printf( __( 'Fill your SendGrid <a href="%s" target="_blank">API Key</a>.', 'weforms' ), 'https://app.sendgrid.com/settings/api_keys' ); ?></p>
813 </td>
814 </tr>
815 <tr v-if="settings.email_gateway == 'mailgun'">
816 <th><?php _e( 'Domain Name', 'weforms' ); ?></th>
817 <td>
818 <input type="text" v-model="settings.gateways.mailgun_domain" class="regular-text">
819
820 <p class="description"><?php _e( 'Your Mailgun domain name', 'weforms' ); ?></p>
821 </td>
822 </tr>
823 <tr v-if="settings.email_gateway == 'mailgun'">
824 <th><?php _e( 'API Key', 'weforms' ); ?></th>
825 <td>
826 <input type="text" v-model="settings.gateways.mailgun" class="regular-text">
827
828 <p class="description"><?php printf( __( 'Fill your Mailgun <a href="%s" target="_blank">API Key</a>.', 'weforms' ), 'https://app.mailgun.com/app/account/security' ); ?></p>
829 </td>
830 </tr>
831 <tr v-if="settings.email_gateway == 'sparkpost'">
832 <th><?php _e( 'SparkPost API Key', 'weforms' ); ?></th>
833 <td>
834 <input type="text" v-model="settings.gateways.sparkpost" class="regular-text">
835
836 <p class="description"><?php printf( __( 'Fill your SparkPost <a href="%s" target="_blank">API Key</a>.', 'weforms' ), 'https://app.sparkpost.com/account/credentials' ); ?></p>
837 </td>
838 </tr>
839 <tr>
840 <th><?php _e( 'Show Credit', 'weforms' ); ?></th>
841 <td>
842 <label>
843 <input type="checkbox" v-model="settings.credit">
844 <?php _e( 'Show <em>powered by weForms</em> credit in form footer.', 'weforms' ); ?>
845 </label>
846 </td>
847 </tr>
848 </table>
849 </div>
850
851 <div class="submit-wrapper">
852 <button v-on:click.prevent="saveSettings($event.target)" class="button button-primary"><?php _e( 'Save Changes', 'weforms' ); ?></button>
853 </div>
854 </div>
855
856 <div class="postbox">
857 <h3 class="hndle"><?php _e( 'reCaptcha', 'weforms' ); ?></h3>
858
859 <div class="inside">
860 <p class="help">
861 <?php printf( __( '<a href="%s" target="_blank">reCAPTCHA</a> is a free anti-spam service from Google which helps to protect your website from spam and abuse. Get <a href="%s" target="_blank">your API Keys</a>.', 'weforms' ), 'https://www.google.com/recaptcha/intro/', 'https://www.google.com/recaptcha/admin#list' ); ?>
862 </p>
863
864 <table class="form-table">
865 <tr>
866 <th><?php _e( 'Site key', 'weforms' ); ?></th>
867 <td>
868 <input type="text" v-model="settings.recaptcha.key" class="regular-text">
869 </td>
870 </tr>
871 <tr>
872 <th><?php _e( 'Secret key', 'weforms' ); ?></th>
873 <td>
874 <input type="text" v-model="settings.recaptcha.secret" class="regular-text">
875 </td>
876 </tr>
877 </table>
878 </div>
879
880 <div class="submit-wrapper">
881 <button v-on:click.prevent="saveSettings($event.target)" class="button button-primary"><?php _e( 'Save Changes', 'weforms' ); ?></button>
882 </div>
883 </div>
884
885 <?php do_action( 'weforms_settings' ); ?>
886 </div>
887 </div></script>
888