Version Description
Bugs fixed
Download this release
Release Info
Developer | galdub |
Plugin | Floating Chat Widget: Contact Chat Icons, Telegram Chat, Line, WeChat, Email, SMS, Call Button – Chaty |
Version | 2.8.3 |
Comparing to | |
See all releases |
Code changes from version 2.8.2 to 2.8.3
- cht-icons.php +2 -2
- readme.txt +11 -7
- views/admin/contact-form-feed.php +105 -103
cht-icons.php
CHANGED
@@ -7,7 +7,7 @@
|
|
7 |
Author URI: https://premio.io/downloads/chaty/
|
8 |
Text Domain: chaty
|
9 |
Domain Path: /languages
|
10 |
-
Version: 2.8.
|
11 |
License: GPL2
|
12 |
*/
|
13 |
|
@@ -27,7 +27,7 @@ define('CHT_INC', CHT_DIR . '/includes');
|
|
27 |
define('CHT_PRO_URL', admin_url("admin.php?page=chaty-app-upgrade"));
|
28 |
define('CHT_PLUGIN_URL', plugin_dir_url(__FILE__));
|
29 |
define('CHT_PLUGIN_BASE', plugin_basename(CHT_FILE));
|
30 |
-
define('CHT_VERSION', "2.8.
|
31 |
|
32 |
if (!function_exists('wp_doing_ajax')) {
|
33 |
function wp_doing_ajax()
|
7 |
Author URI: https://premio.io/downloads/chaty/
|
8 |
Text Domain: chaty
|
9 |
Domain Path: /languages
|
10 |
+
Version: 2.8.3
|
11 |
License: GPL2
|
12 |
*/
|
13 |
|
27 |
define('CHT_PRO_URL', admin_url("admin.php?page=chaty-app-upgrade"));
|
28 |
define('CHT_PLUGIN_URL', plugin_dir_url(__FILE__));
|
29 |
define('CHT_PLUGIN_BASE', plugin_basename(CHT_FILE));
|
30 |
+
define('CHT_VERSION', "2.8.3");
|
31 |
|
32 |
if (!function_exists('wp_doing_ajax')) {
|
33 |
function wp_doing_ajax()
|
readme.txt
CHANGED
@@ -2,19 +2,19 @@
|
|
2 |
Contributors: galdub, tomeraharon, premio
|
3 |
Tags: whatsapp, whatsapp chat, facebook messenger, click to chat, chat, chat button, call now button, messenger, whatsapp button, chat icon, contact button, click to call
|
4 |
Requires at least: 3.1
|
5 |
-
Tested up to: 5.
|
6 |
-
Stable tag: 2.8.
|
7 |
Plugin URI: https://premio.io/downloads/chaty/
|
8 |
|
9 |
-
|
10 |
|
11 |
== Description ==
|
12 |
|
13 |
-
<strong>Chat with your website visitors via their favorite channels.
|
14 |
Show a chat button on the bottom of your site and communicate with your customers.</strong>
|
15 |
|
16 |
* Get more leads and calls
|
17 |
-
* Let your customers chat with you via their favorite channels like Facebook Messenger, WhatsApp, Viber, Slack, Telegram, TikTok and many other chat channels
|
18 |
* Improve your customer support
|
19 |
* Direct customers to your store's location
|
20 |
|
@@ -258,6 +258,9 @@ Yes! You can even decide what chat buttons will show up on each device (desktop/
|
|
258 |
|
259 |
== Changelog ==
|
260 |
|
|
|
|
|
|
|
261 |
= 2.8.2 =
|
262 |
Support route changed
|
263 |
|
@@ -346,7 +349,7 @@ Show your chat buttons vertical mode or horizontal mode. Also, Make your custom
|
|
346 |
Launch Chaty chat button using this JavaScript function whenever you want: launch_chaty();
|
347 |
|
348 |
= 2.4.9 =
|
349 |
-
Added an explanation
|
350 |
|
351 |
= 2.4.8 =
|
352 |
Route fix
|
@@ -478,4 +481,5 @@ Fixed some rare bugs
|
|
478 |
Many cool new features including: new widget icons (including custom widget), decide which channels will be displayed on mobile/desktop, and change widget size
|
479 |
|
480 |
= 1.2.1 =
|
481 |
-
* Bug fixes
|
|
2 |
Contributors: galdub, tomeraharon, premio
|
3 |
Tags: whatsapp, whatsapp chat, facebook messenger, click to chat, chat, chat button, call now button, messenger, whatsapp button, chat icon, contact button, click to call
|
4 |
Requires at least: 3.1
|
5 |
+
Tested up to: 5.9
|
6 |
+
Stable tag: 2.8.3
|
7 |
Plugin URI: https://premio.io/downloads/chaty/
|
8 |
|
9 |
+
WhatsApp chat, Facebook Messenger, Telegram, TikTok Viber, Email, Phone call, SMS, and more with customizable chat & call buttons. Chat with your visitors on WhatsApp, Facebook Messenger, and other chat channels!
|
10 |
|
11 |
== Description ==
|
12 |
|
13 |
+
<strong>Chat with your website visitors via their favorite channels like WhatsApp chat, Facebook Messenger, and more.
|
14 |
Show a chat button on the bottom of your site and communicate with your customers.</strong>
|
15 |
|
16 |
* Get more leads and calls
|
17 |
+
* Let your customers chat with you via their favorite channels like Facebook Messenger, WhatsApp, Viber, Slack, Telegram, TikTok, and many other chat channels
|
18 |
* Improve your customer support
|
19 |
* Direct customers to your store's location
|
20 |
|
258 |
|
259 |
== Changelog ==
|
260 |
|
261 |
+
= 2.8.3 =
|
262 |
+
Bugs fixed
|
263 |
+
|
264 |
= 2.8.2 =
|
265 |
Support route changed
|
266 |
|
349 |
Launch Chaty chat button using this JavaScript function whenever you want: launch_chaty();
|
350 |
|
351 |
= 2.4.9 =
|
352 |
+
Added an explanation for the phone based channels like WhatsApp, Viber, Phone, SMS text to make it clearer. When you click on enter while editing any of the chat channels, your settings will be saved.
|
353 |
|
354 |
= 2.4.8 =
|
355 |
Route fix
|
481 |
Many cool new features including: new widget icons (including custom widget), decide which channels will be displayed on mobile/desktop, and change widget size
|
482 |
|
483 |
= 1.2.1 =
|
484 |
+
* Bug fixes
|
485 |
+
|
views/admin/contact-form-feed.php
CHANGED
@@ -8,49 +8,49 @@ $current = intval($current);
|
|
8 |
|
9 |
$search_for = "all_time";
|
10 |
$search_list = array(
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
);
|
20 |
|
21 |
if(isset($_GET['search_for']) && !empty($_GET['search_for']) && isset($search_list[$_GET['search_for']])) {
|
22 |
-
|
23 |
}
|
24 |
$start_date = "";
|
25 |
$end_date = "";
|
26 |
if($search_for == "today") {
|
27 |
-
|
28 |
-
|
29 |
} else if($search_for == "yesterday") {
|
30 |
-
|
31 |
-
|
32 |
} else if($search_for == "last_7_days") {
|
33 |
-
|
34 |
-
|
35 |
} else if($search_for == "last_30_days") {
|
36 |
-
|
37 |
-
|
38 |
} else if($search_for == "this_week") {
|
39 |
-
|
40 |
-
|
41 |
} else if($search_for == "this_month") {
|
42 |
-
|
43 |
-
|
44 |
} else if($search_for == "custom") {
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
} else if($search_for == "all_time") {
|
52 |
-
|
53 |
-
|
54 |
}
|
55 |
|
56 |
$hasSearch = isset($_GET['search'])&&!empty($_GET['search'])?$_GET['search']:false;
|
@@ -61,32 +61,34 @@ $search = "";
|
|
61 |
$condition = "";
|
62 |
$conditionArray = array();
|
63 |
if($hasSearch !== false) {
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
}
|
72 |
|
|
|
|
|
73 |
if(!empty($start_date) && !empty($end_date)) {
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
}
|
83 |
if(!empty($condition)) {
|
84 |
-
|
85 |
}
|
86 |
$query .= " ORDER BY ID DESC";
|
87 |
|
88 |
if(!empty($conditionArray)) {
|
89 |
-
|
90 |
}
|
91 |
|
92 |
$total_records = $wpdb->get_var($query);
|
@@ -95,11 +97,11 @@ $total_pages = ceil($total_records / $per_page);
|
|
95 |
|
96 |
$query = "SELECT * FROM ".$table_name;
|
97 |
if(!empty($condition)) {
|
98 |
-
|
99 |
}
|
100 |
|
101 |
if($current > $total_pages) {
|
102 |
-
|
103 |
}
|
104 |
$start_from = ($current-1)*$per_page;
|
105 |
|
@@ -107,7 +109,7 @@ $query .= " ORDER BY ID DESC";
|
|
107 |
$query .= " LIMIT $start_from, $per_page";
|
108 |
|
109 |
if(!empty($conditionArray)) {
|
110 |
-
|
111 |
}
|
112 |
?>
|
113 |
<style>
|
@@ -164,19 +166,19 @@ if(!empty($conditionArray)) {
|
|
164 |
}
|
165 |
</style>
|
166 |
<div class="wrap">
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
<div>
|
171 |
-
|
172 |
<h1 class="wp-heading">Contact Form Leads
|
173 |
<div class="lead-search-box">
|
174 |
<form action="<?php echo admin_url("admin.php") ?>" method="get">
|
175 |
<label class="screen-reader-text" for="post-search-input">Search:</label>
|
176 |
<select class="search-input" name="search_for" style="" id="date-range">
|
177 |
-
|
178 |
-
<option <?php selected($key, $search_for) ?> value="<?php echo $key ?>"><?php echo $value ?></option>
|
179 |
-
|
180 |
</select>
|
181 |
<input type="search" class="search-input" name="search" value="<?php echo esc_attr($search) ?>" class="">
|
182 |
<input type="submit" id="search-submit" class="button" value="Search">
|
@@ -188,9 +190,9 @@ if(!empty($conditionArray)) {
|
|
188 |
</form>
|
189 |
</div>
|
190 |
</h1>
|
191 |
-
|
192 |
<form action="" method="post">
|
193 |
-
|
194 |
<div class="tablenav top">
|
195 |
<div class="alignleft actions bulkactions">
|
196 |
<select name="action" id="bulk-action-selector-top">
|
@@ -208,10 +210,10 @@ if(!empty($conditionArray)) {
|
|
208 |
position: inherit;
|
209 |
}
|
210 |
</style>
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
<table border="0" class="responstable">
|
216 |
<tr>
|
217 |
<th style="width:1%"><?php esc_html_e( 'Bulk', 'chaty' );?></th>
|
@@ -225,17 +227,17 @@ if(!empty($conditionArray)) {
|
|
225 |
<th class="text-center"><?php esc_html_e( 'URL', 'chaty');?></th>
|
226 |
<th class="text-center"><?php esc_html_e( 'Delete', 'chaty');?></th>
|
227 |
</tr>
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
<tr data-id="<?php echo $res->id ?>">
|
240 |
<td><input type="checkbox" value="<?php echo $res->id ?>" name="chaty_leads[]"></td>
|
241 |
<td><?php echo $res->id ?></td>
|
@@ -248,45 +250,45 @@ if(!empty($conditionArray)) {
|
|
248 |
<td class="text-center"><a class="url" target="_blank" href="<?php echo $res->ref_page ?>"><span class="dashicons dashicons-external"></span></a></td>
|
249 |
<td class="text-center"><a class="remove-record" href="#"><span class="dashicons dashicons-trash"></span></a></td>
|
250 |
</tr>
|
251 |
-
|
252 |
</table>
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
<div class="leads-buttons">
|
279 |
<a href="<?php echo admin_url("?download_chaty_file=chaty_contact_leads&nonce=".wp_create_nonce("download_chaty_contact_leads")) ?>" class="wpappp_buton" id="wpappp_export_to_csv" value="Export to CSV">Download & Export to CSV</a>
|
280 |
<input type="button" class="wpappp_buton" id="chaty_delete_all_leads" value="Delete All Data">
|
281 |
</div>
|
282 |
-
|
283 |
<div class="chaty-updates-form">
|
284 |
<div class="updates-form-form-right">
|
285 |
<div class="update-title">Contact Form Leads</div>
|
286 |
<p>No records are found</p>
|
287 |
</div>
|
288 |
</div>
|
289 |
-
|
290 |
<div class="chaty-updates-form">
|
291 |
<div class="updates-form-form-left">
|
292 |
<script src="https://unpkg.com/@lottiefiles/lottie-player@latest/dist/lottie-player.js"></script>
|
@@ -297,7 +299,7 @@ if(!empty($conditionArray)) {
|
|
297 |
<p>Your contact form leads will appear here once you get some leads. Please make sure you've added the contact form channel to your Chaty channels in order to collect leads</p>
|
298 |
</div>
|
299 |
</div>
|
300 |
-
|
301 |
<input type="hidden" name="remove_chaty_leads" value="<?php echo wp_create_nonce("remove_chaty_leads") ?>">
|
302 |
<input type="hidden" name="paged" value="<?php echo esc_attr($current) ?>">
|
303 |
<input type="hidden" name="search" value="<?php echo esc_attr($search) ?>">
|
@@ -307,7 +309,7 @@ if(!empty($conditionArray)) {
|
|
307 |
|
308 |
<script>
|
309 |
jQuery(document).ready(function(){
|
310 |
-
var selectedURL = '<?php echo admin_url("admin.php?page=chaty-contact-form-feed&remove_chaty_leads=".wp_create_nonce("remove_chaty_leads")."&action=delete_message&paged={$current}&search=
|
311 |
jQuery(document).on("click", ".remove-record", function(e){
|
312 |
e.preventDefault();
|
313 |
var redirectRemoveURL = selectedURL+jQuery(this).closest("tr").data("id");
|
8 |
|
9 |
$search_for = "all_time";
|
10 |
$search_list = array(
|
11 |
+
'today' => 'Today',
|
12 |
+
'yesterday' => 'Yesterday',
|
13 |
+
'last_7_days' => 'Last 7 Days',
|
14 |
+
'last_30_days' => 'Last 30 Days',
|
15 |
+
'this_week' => 'This Week',
|
16 |
+
'this_month' => 'This Month',
|
17 |
+
'all_time' => 'All Time',
|
18 |
+
'custom' => 'Custom Date'
|
19 |
);
|
20 |
|
21 |
if(isset($_GET['search_for']) && !empty($_GET['search_for']) && isset($search_list[$_GET['search_for']])) {
|
22 |
+
$search_for = esc_attr($_GET['search_for']);
|
23 |
}
|
24 |
$start_date = "";
|
25 |
$end_date = "";
|
26 |
if($search_for == "today") {
|
27 |
+
$start_date = date("Y-m-d");
|
28 |
+
$end_date = date("Y-m-d");
|
29 |
} else if($search_for == "yesterday") {
|
30 |
+
$start_date = date("Y-m-d", strtotime("-1 days"));
|
31 |
+
$end_date = date("Y-m-d", strtotime("-1 days"));
|
32 |
} else if($search_for == "last_7_days") {
|
33 |
+
$start_date = date("Y-m-d", strtotime("-7 days"));
|
34 |
+
$end_date = date("Y-m-d");
|
35 |
} else if($search_for == "last_30_days") {
|
36 |
+
$start_date = date("Y-m-d", strtotime("-30 days"));
|
37 |
+
$end_date = date("Y-m-d");
|
38 |
} else if($search_for == "this_week") {
|
39 |
+
$start_date = date("Y-m-d", strtotime('monday this week'));
|
40 |
+
$end_date = date("Y-m-d");
|
41 |
} else if($search_for == "this_month") {
|
42 |
+
$start_date = date("Y-m-01");
|
43 |
+
$end_date = date("Y-m-d");
|
44 |
} else if($search_for == "custom") {
|
45 |
+
if(isset($_GET['start_date']) && !empty($_GET['start_date'])) {
|
46 |
+
$start_date = $_GET['start_date'];
|
47 |
+
}
|
48 |
+
if(isset($_GET['end_date']) && !empty($_GET['end_date'])) {
|
49 |
+
$end_date = $_GET['end_date'];
|
50 |
+
}
|
51 |
} else if($search_for == "all_time") {
|
52 |
+
$start_date = "";
|
53 |
+
$end_date = "";
|
54 |
}
|
55 |
|
56 |
$hasSearch = isset($_GET['search'])&&!empty($_GET['search'])?$_GET['search']:false;
|
61 |
$condition = "";
|
62 |
$conditionArray = array();
|
63 |
if($hasSearch !== false) {
|
64 |
+
$search = $hasSearch;
|
65 |
+
$hasSearch = "%".esc_attr($hasSearch)."%";
|
66 |
+
$condition .= " (name LIKE %s OR email LIKE %s OR phone_number LIKE %s OR message LIKE %s)";
|
67 |
+
$conditionArray[] = $hasSearch;
|
68 |
+
$conditionArray[] = $hasSearch;
|
69 |
+
$conditionArray[] = $hasSearch;
|
70 |
+
$conditionArray[] = $hasSearch;
|
71 |
}
|
72 |
|
73 |
+
$start_date = esc_attr($start_date);
|
74 |
+
$end_date = esc_attr($end_date);
|
75 |
if(!empty($start_date) && !empty($end_date)) {
|
76 |
+
if(!empty($condition)) {
|
77 |
+
$condition .= " AND ";
|
78 |
+
}
|
79 |
+
$c_start_date = date("Y-m-d 00:00:00", strtotime($start_date));
|
80 |
+
$c_end_date = date("Y-m-d 23:59:59", strtotime($end_date));
|
81 |
+
$condition .= " created_on >= %s AND created_on <= %s";
|
82 |
+
$conditionArray[] = $c_start_date;
|
83 |
+
$conditionArray[] = $c_end_date;
|
84 |
}
|
85 |
if(!empty($condition)) {
|
86 |
+
$query .= " WHERE ".$condition;
|
87 |
}
|
88 |
$query .= " ORDER BY ID DESC";
|
89 |
|
90 |
if(!empty($conditionArray)) {
|
91 |
+
$query = $wpdb->prepare($query, $conditionArray);
|
92 |
}
|
93 |
|
94 |
$total_records = $wpdb->get_var($query);
|
97 |
|
98 |
$query = "SELECT * FROM ".$table_name;
|
99 |
if(!empty($condition)) {
|
100 |
+
$query .= " WHERE ".$condition;
|
101 |
}
|
102 |
|
103 |
if($current > $total_pages) {
|
104 |
+
$current = 1;
|
105 |
}
|
106 |
$start_from = ($current-1)*$per_page;
|
107 |
|
109 |
$query .= " LIMIT $start_from, $per_page";
|
110 |
|
111 |
if(!empty($conditionArray)) {
|
112 |
+
$query = $wpdb->prepare($query, $conditionArray);
|
113 |
}
|
114 |
?>
|
115 |
<style>
|
166 |
}
|
167 |
</style>
|
168 |
<div class="wrap">
|
169 |
+
<?php
|
170 |
+
$result = $wpdb->get_results ($query);
|
171 |
+
?>
|
172 |
<div>
|
173 |
+
<?php if($result || !empty($search) || $search_for != 'all_time'){ ?>
|
174 |
<h1 class="wp-heading">Contact Form Leads
|
175 |
<div class="lead-search-box">
|
176 |
<form action="<?php echo admin_url("admin.php") ?>" method="get">
|
177 |
<label class="screen-reader-text" for="post-search-input">Search:</label>
|
178 |
<select class="search-input" name="search_for" style="" id="date-range">
|
179 |
+
<?php foreach($search_list as $key=>$value) { ?>
|
180 |
+
<option <?php selected($key, $search_for) ?> value="<?php echo esc_attr($key) ?>"><?php echo esc_attr($value) ?></option>
|
181 |
+
<?php } ?>
|
182 |
</select>
|
183 |
<input type="search" class="search-input" name="search" value="<?php echo esc_attr($search) ?>" class="">
|
184 |
<input type="submit" id="search-submit" class="button" value="Search">
|
190 |
</form>
|
191 |
</div>
|
192 |
</h1>
|
193 |
+
<?php } ?>
|
194 |
<form action="" method="post">
|
195 |
+
<?php if($result){ ?>
|
196 |
<div class="tablenav top">
|
197 |
<div class="alignleft actions bulkactions">
|
198 |
<select name="action" id="bulk-action-selector-top">
|
210 |
position: inherit;
|
211 |
}
|
212 |
</style>
|
213 |
+
<?php } ?>
|
214 |
+
<?php
|
215 |
+
if($result){
|
216 |
+
?>
|
217 |
<table border="0" class="responstable">
|
218 |
<tr>
|
219 |
<th style="width:1%"><?php esc_html_e( 'Bulk', 'chaty' );?></th>
|
227 |
<th class="text-center"><?php esc_html_e( 'URL', 'chaty');?></th>
|
228 |
<th class="text-center"><?php esc_html_e( 'Delete', 'chaty');?></th>
|
229 |
</tr>
|
230 |
+
<?php
|
231 |
+
foreach( $result as $res ) {
|
232 |
+
if($res->widget_id == 0) {
|
233 |
+
$widget_name = "Default";
|
234 |
+
} else {
|
235 |
+
$widget_name = get_option("cht_widget_title_".$res->widget_id);
|
236 |
+
if(empty($widget_name)) {
|
237 |
+
$widget_name = "Widget #".($res->widget_id+1);
|
238 |
+
}
|
239 |
+
}
|
240 |
+
?>
|
241 |
<tr data-id="<?php echo $res->id ?>">
|
242 |
<td><input type="checkbox" value="<?php echo $res->id ?>" name="chaty_leads[]"></td>
|
243 |
<td><?php echo $res->id ?></td>
|
250 |
<td class="text-center"><a class="url" target="_blank" href="<?php echo $res->ref_page ?>"><span class="dashicons dashicons-external"></span></a></td>
|
251 |
<td class="text-center"><a class="remove-record" href="#"><span class="dashicons dashicons-trash"></span></a></td>
|
252 |
</tr>
|
253 |
+
<?php } ?>
|
254 |
</table>
|
255 |
+
<?php
|
256 |
+
if($total_pages > 1) {
|
257 |
+
$baseURL = admin_url("admin.php?paged=%#%&page=chaty-contact-form-feed");
|
258 |
+
if(!empty($search)) {
|
259 |
+
$baseURL .= "&search=".esc_attr($search);
|
260 |
+
}
|
261 |
+
echo '<div class="custom-pagination">';
|
262 |
+
echo paginate_links(array(
|
263 |
+
'base' => $baseURL,
|
264 |
+
'total' => $total_pages,
|
265 |
+
'current' => $current,
|
266 |
+
'format' => '?paged=%#%',
|
267 |
+
'show_all' => false,
|
268 |
+
'type' => 'list',
|
269 |
+
'end_size' => 3,
|
270 |
+
'mid_size' => 1,
|
271 |
+
'prev_next' => true,
|
272 |
+
'prev_text' => sprintf('%1$s', '<span class="dashicons dashicons-arrow-left-alt2"></span>'),
|
273 |
+
'next_text' => sprintf('%1$s', '<span class="dashicons dashicons-arrow-right-alt2"></span>'),
|
274 |
+
'add_args' => false,
|
275 |
+
'add_fragment' => '',
|
276 |
+
));
|
277 |
+
echo "</div>";
|
278 |
+
}
|
279 |
+
?>
|
280 |
<div class="leads-buttons">
|
281 |
<a href="<?php echo admin_url("?download_chaty_file=chaty_contact_leads&nonce=".wp_create_nonce("download_chaty_contact_leads")) ?>" class="wpappp_buton" id="wpappp_export_to_csv" value="Export to CSV">Download & Export to CSV</a>
|
282 |
<input type="button" class="wpappp_buton" id="chaty_delete_all_leads" value="Delete All Data">
|
283 |
</div>
|
284 |
+
<?php } else if(!empty($search) || $search_for != "all_time") { ?>
|
285 |
<div class="chaty-updates-form">
|
286 |
<div class="updates-form-form-right">
|
287 |
<div class="update-title">Contact Form Leads</div>
|
288 |
<p>No records are found</p>
|
289 |
</div>
|
290 |
</div>
|
291 |
+
<?php } else { ?>
|
292 |
<div class="chaty-updates-form">
|
293 |
<div class="updates-form-form-left">
|
294 |
<script src="https://unpkg.com/@lottiefiles/lottie-player@latest/dist/lottie-player.js"></script>
|
299 |
<p>Your contact form leads will appear here once you get some leads. Please make sure you've added the contact form channel to your Chaty channels in order to collect leads</p>
|
300 |
</div>
|
301 |
</div>
|
302 |
+
<?php } ?>
|
303 |
<input type="hidden" name="remove_chaty_leads" value="<?php echo wp_create_nonce("remove_chaty_leads") ?>">
|
304 |
<input type="hidden" name="paged" value="<?php echo esc_attr($current) ?>">
|
305 |
<input type="hidden" name="search" value="<?php echo esc_attr($search) ?>">
|
309 |
|
310 |
<script>
|
311 |
jQuery(document).ready(function(){
|
312 |
+
var selectedURL = '<?php echo admin_url("admin.php?page=chaty-contact-form-feed&remove_chaty_leads=".wp_create_nonce("remove_chaty_leads")."&action=delete_message&paged={$current}&search=".esc_attr($search)."&chaty_leads=") ?>';
|
313 |
jQuery(document).on("click", ".remove-record", function(e){
|
314 |
e.preventDefault();
|
315 |
var redirectRemoveURL = selectedURL+jQuery(this).closest("tr").data("id");
|