Edit File by line
/home/zeestwma/richards.../wp-conte.../plugins/chaty/views/admin
File: help.php
<?php
[0] Fix | Delete
if (! defined('ABSPATH')) {
[1] Fix | Delete
exit;
[2] Fix | Delete
}
[3] Fix | Delete
$data = array(
[4] Fix | Delete
'help_icon' => esc_url(CHT_PLUGIN_URL."admin/assets/images/help/help-icon.svg"),
[5] Fix | Delete
'close_icon' => esc_url(CHT_PLUGIN_URL."admin/assets/images/help/close.svg"),
[6] Fix | Delete
'pro_icon' => esc_url(CHT_PLUGIN_URL."admin/assets/images/help/pro.svg"),
[7] Fix | Delete
'support_icon' => esc_url(CHT_PLUGIN_URL."admin/assets/images/help/help-circle.svg"),
[8] Fix | Delete
'contact_icon' => esc_url(CHT_PLUGIN_URL."admin/assets/images/help/headphones.svg"),
[9] Fix | Delete
'get_support_link' => esc_url("https://wordpress.org/support/plugin/chaty/"),
[10] Fix | Delete
'upgrade_to_pro_link' => esc_url(admin_url("admin.php?page=chaty-app-upgrade")),
[11] Fix | Delete
'recommended_plugins_link' => esc_url(admin_url("admin.php?page=recommended-chaty-plugins")),
[12] Fix | Delete
'recommended_plugins_link_status' => get_option("hide_chaty_recommended_plugin"),
[13] Fix | Delete
'chaty_live_chat_link' => esc_url(admin_url("admin.php?page=chaty-live-chat")),
[14] Fix | Delete
'chaty_live_chat_link_status' => apply_filters('check_for_chatway', false),
[15] Fix | Delete
'premio_site_info' => esc_url('https://premio.io/'),
[16] Fix | Delete
'help_center_link' => esc_url('https://premio.io/help/chaty/?utm_source=pluginspage'),
[17] Fix | Delete
)
[18] Fix | Delete
[19] Fix | Delete
?>
[20] Fix | Delete
<style>
[21] Fix | Delete
/* Old CSS */
[22] Fix | Delete
/* Help btn */
[23] Fix | Delete
#wpfooter{
[24] Fix | Delete
display: none;
[25] Fix | Delete
}
[26] Fix | Delete
.premio-help-form {
[27] Fix | Delete
position: fixed;
[28] Fix | Delete
right: 25px;
[29] Fix | Delete
border: 1px solid #e9edf0;
[30] Fix | Delete
bottom: 100px;
[31] Fix | Delete
background: #fff;
[32] Fix | Delete
-webkit-border-radius: 10px;
[33] Fix | Delete
-moz-border-radius: 10px;
[34] Fix | Delete
border-radius: 10px;
[35] Fix | Delete
width: 320px;
[36] Fix | Delete
z-index: 1001;
[37] Fix | Delete
direction: ltr;
[38] Fix | Delete
visibility: hidden;
[39] Fix | Delete
opacity: 0;
[40] Fix | Delete
transition: .4s;
[41] Fix | Delete
-webkit-transition: .4s;
[42] Fix | Delete
-moz-transition: .4s
[43] Fix | Delete
}
[44] Fix | Delete
.premio-help-form.active {
[45] Fix | Delete
opacity: 1;
[46] Fix | Delete
visibility: visible;
[47] Fix | Delete
pointer-events: inherit
[48] Fix | Delete
}
[49] Fix | Delete
.premio-help-header {
[50] Fix | Delete
background: #f4f4f4;
[51] Fix | Delete
border-bottom: solid 1px #e9edf0;
[52] Fix | Delete
padding: 5px 20px;
[53] Fix | Delete
-webkit-border-radius: 10px;
[54] Fix | Delete
-moz-border-radius: 10px;
[55] Fix | Delete
border-radius: 10px 10px 0 0;
[56] Fix | Delete
font-size: 16px;
[57] Fix | Delete
text-align: right
[58] Fix | Delete
}
[59] Fix | Delete
.premio-help-header b {
[60] Fix | Delete
float: left
[61] Fix | Delete
}
[62] Fix | Delete
.premio-help-content {
[63] Fix | Delete
margin-bottom: 10px;
[64] Fix | Delete
padding: 20px 20px 10px
[65] Fix | Delete
}
[66] Fix | Delete
.premio-help-form p {
[67] Fix | Delete
margin: 0 0 1em
[68] Fix | Delete
}
[69] Fix | Delete
.premio-form-field {
[70] Fix | Delete
margin-bottom: 10px
[71] Fix | Delete
}
[72] Fix | Delete
.premio-form-field input, .premio-form-field textarea {
[73] Fix | Delete
-webkit-border-radius: 5px;
[74] Fix | Delete
-moz-border-radius: 5px;
[75] Fix | Delete
border-radius: 5px;
[76] Fix | Delete
padding: 5px;
[77] Fix | Delete
width: 100%;
[78] Fix | Delete
box-sizing: border-box;
[79] Fix | Delete
border: 1px solid #c5c5c5
[80] Fix | Delete
}
[81] Fix | Delete
.premio-form-field textarea {
[82] Fix | Delete
height: 70px
[83] Fix | Delete
}
[84] Fix | Delete
.premio-help-button {
[85] Fix | Delete
border: none;
[86] Fix | Delete
padding: 8px 0;
[87] Fix | Delete
width: 100%;
[88] Fix | Delete
background: #ff6624;
[89] Fix | Delete
color: #fff;
[90] Fix | Delete
border-radius: 18px
[91] Fix | Delete
}
[92] Fix | Delete
.premio-help-form .error-message {
[93] Fix | Delete
font-weight: 400;
[94] Fix | Delete
font-size: 14px
[95] Fix | Delete
}
[96] Fix | Delete
.premio-help-form input.input-error, .premio-help-form textarea.input-error {
[97] Fix | Delete
border-color: #dc3232
[98] Fix | Delete
}
[99] Fix | Delete
p.error-p, p.success-p {
[100] Fix | Delete
margin: 0;
[101] Fix | Delete
font-size: 14px;
[102] Fix | Delete
text-align: center
[103] Fix | Delete
}
[104] Fix | Delete
/* Help From */
[105] Fix | Delete
p.success-p {
[106] Fix | Delete
color: green
[107] Fix | Delete
}
[108] Fix | Delete
p.error-p {
[109] Fix | Delete
color: #dc3232
[110] Fix | Delete
}
[111] Fix | Delete
html[dir=rtl] .premio-help-btn {
[112] Fix | Delete
left: 20px;
[113] Fix | Delete
right: auto
[114] Fix | Delete
}
[115] Fix | Delete
html[dir=rtl] .premio-help-form {
[116] Fix | Delete
left: 85px;
[117] Fix | Delete
right: auto
[118] Fix | Delete
}
[119] Fix | Delete
/* Old CSS */
[120] Fix | Delete
[121] Fix | Delete
.premio-footer-help {
[122] Fix | Delete
position: absolute;
[123] Fix | Delete
bottom: 0;
[124] Fix | Delete
left: 0;
[125] Fix | Delete
right: 0;
[126] Fix | Delete
padding: 0 80px;
[127] Fix | Delete
color: #50575e;
[128] Fix | Delete
margin-top: 50px;
[129] Fix | Delete
}
[130] Fix | Delete
.premio-footer-help *{
[131] Fix | Delete
box-sizing: border-box
[132] Fix | Delete
}
[133] Fix | Delete
.premio-help-wrap {
[134] Fix | Delete
display: flex;
[135] Fix | Delete
justify-content: space-between;
[136] Fix | Delete
padding-left: 180px;
[137] Fix | Delete
height: 60px;
[138] Fix | Delete
}
[139] Fix | Delete
.premio-help-menu {
[140] Fix | Delete
display: flex;
[141] Fix | Delete
gap: 24px;
[142] Fix | Delete
padding: 20px 20px 10px;
[143] Fix | Delete
}
[144] Fix | Delete
.premio-help-menu a {
[145] Fix | Delete
color: #7459B3;
[146] Fix | Delete
text-align: center;
[147] Fix | Delete
/* font-family: Poppins; */
[148] Fix | Delete
font-size: 12px;
[149] Fix | Delete
font-style: normal;
[150] Fix | Delete
font-weight: 600;
[151] Fix | Delete
line-height: 140%;
[152] Fix | Delete
text-decoration: none;
[153] Fix | Delete
}
[154] Fix | Delete
.premio-help-menu a:focus {
[155] Fix | Delete
outline: none !important;
[156] Fix | Delete
border: none !important;
[157] Fix | Delete
box-shadow: none !important;
[158] Fix | Delete
}
[159] Fix | Delete
.premio-help-content p {
[160] Fix | Delete
color: #83A1B7;
[161] Fix | Delete
text-align: center;
[162] Fix | Delete
/* font-family: Poppins; */
[163] Fix | Delete
font-size: 14px;
[164] Fix | Delete
font-style: normal;
[165] Fix | Delete
font-weight: 400;
[166] Fix | Delete
line-height: 140%;
[167] Fix | Delete
margin: 0 !important;
[168] Fix | Delete
}
[169] Fix | Delete
.premio-help-content p a {
[170] Fix | Delete
color: #7459B3;
[171] Fix | Delete
font-weight: 700;
[172] Fix | Delete
text-decoration: none;
[173] Fix | Delete
}
[174] Fix | Delete
[175] Fix | Delete
.premio-help-btn-wrap {
[176] Fix | Delete
height: 64px;
[177] Fix | Delete
width: 64px;
[178] Fix | Delete
position: fixed;
[179] Fix | Delete
bottom: 25px;
[180] Fix | Delete
right: 25px;
[181] Fix | Delete
}
[182] Fix | Delete
.premio-help-btn-wrap img {
[183] Fix | Delete
height: 100%;
[184] Fix | Delete
width: 100%;
[185] Fix | Delete
margin: 0 auto;
[186] Fix | Delete
}
[187] Fix | Delete
.premio-help-btn, .premio-help-close-btn {
[188] Fix | Delete
background-color: #7459B3;
[189] Fix | Delete
display: inline-block;
[190] Fix | Delete
height: 64px;
[191] Fix | Delete
width: 64px;
[192] Fix | Delete
padding: 11px;
[193] Fix | Delete
border-radius: 50%;
[194] Fix | Delete
transition: 0.4s;
[195] Fix | Delete
}
[196] Fix | Delete
.premio-help-btn.hide{
[197] Fix | Delete
display: none;
[198] Fix | Delete
}
[199] Fix | Delete
.premio-help-close-btn{
[200] Fix | Delete
background-color: #000 !important;
[201] Fix | Delete
padding: 16px;
[202] Fix | Delete
display: none;
[203] Fix | Delete
}
[204] Fix | Delete
.premio-help-close-btn.show{
[205] Fix | Delete
display: inline-block;
[206] Fix | Delete
}
[207] Fix | Delete
.premio-help-btn-wrap span.tooltiptext {
[208] Fix | Delete
position: absolute;
[209] Fix | Delete
background: #000;
[210] Fix | Delete
font-size: 12px;
[211] Fix | Delete
color: #fff;
[212] Fix | Delete
top: -40px;
[213] Fix | Delete
max-width: 140%;
[214] Fix | Delete
text-align: center;
[215] Fix | Delete
left: -14%;
[216] Fix | Delete
border-radius: 5px;
[217] Fix | Delete
direction: ltr;
[218] Fix | Delete
visibility: visible;
[219] Fix | Delete
opacity: 1;
[220] Fix | Delete
padding: 8px 12px;
[221] Fix | Delete
font-weight: 600;
[222] Fix | Delete
}
[223] Fix | Delete
.premio-help-btn-wrap span.tooltiptext:after {
[224] Fix | Delete
bottom: -9px;
[225] Fix | Delete
content: "";
[226] Fix | Delete
transform: translateX(-50%);
[227] Fix | Delete
border-width: 10px 5px 0;
[228] Fix | Delete
border-style: solid;
[229] Fix | Delete
border-color: #000 transparent transparent;
[230] Fix | Delete
left: 75%;
[231] Fix | Delete
position: absolute;
[232] Fix | Delete
}
[233] Fix | Delete
.premio-form-field input,
[234] Fix | Delete
.premio-form-field textarea {
[235] Fix | Delete
min-height: 1px;
[236] Fix | Delete
line-height: 1.4;
[237] Fix | Delete
-webkit-border-radius: 5px;
[238] Fix | Delete
-moz-border-radius: 5px;
[239] Fix | Delete
border-radius: 5px;
[240] Fix | Delete
padding: 5px 10px;
[241] Fix | Delete
display: block;
[242] Fix | Delete
width: 100%;
[243] Fix | Delete
box-sizing: border-box;
[244] Fix | Delete
border: 1px solid #c5c5c5;
[245] Fix | Delete
}
[246] Fix | Delete
.help-form-footer {
[247] Fix | Delete
text-align: center;
[248] Fix | Delete
}
[249] Fix | Delete
.help-form-footer p {
[250] Fix | Delete
margin: 0;
[251] Fix | Delete
padding: 0;
[252] Fix | Delete
}
[253] Fix | Delete
.help-form-footer p + p {
[254] Fix | Delete
margin: 0;
[255] Fix | Delete
padding: 10px 0;
[256] Fix | Delete
}
[257] Fix | Delete
.premio-help-form input.input-error,
[258] Fix | Delete
.premio-help-form textarea.input-error {
[259] Fix | Delete
border-color: #dc3232;
[260] Fix | Delete
}
[261] Fix | Delete
[262] Fix | Delete
[263] Fix | Delete
.premio-help-absulate-content {
[264] Fix | Delete
position: absolute;
[265] Fix | Delete
right: 0;
[266] Fix | Delete
bottom: 100%;
[267] Fix | Delete
width: 200px;
[268] Fix | Delete
visibility: hidden;
[269] Fix | Delete
opacity: 0;
[270] Fix | Delete
transform: translateY(10px); /* optional slide effect */
[271] Fix | Delete
transition: opacity 0.4s ease, transform 0.4s ease;
[272] Fix | Delete
pointer-events: none; /* prevent interaction when hidden */
[273] Fix | Delete
}
[274] Fix | Delete
/* .premio-help-btn-wrap:hover .premio-help-absulate-content, */
[275] Fix | Delete
.premio-help-absulate-content.active
[276] Fix | Delete
{
[277] Fix | Delete
visibility: visible;
[278] Fix | Delete
opacity: 1;
[279] Fix | Delete
transform: translateY(0);
[280] Fix | Delete
pointer-events: auto;
[281] Fix | Delete
}
[282] Fix | Delete
.premio-help-absulate-content-single {
[283] Fix | Delete
opacity: 0;
[284] Fix | Delete
visibility: hidden;
[285] Fix | Delete
pointer-events: none;
[286] Fix | Delete
transform: translateY(20px);
[287] Fix | Delete
}
[288] Fix | Delete
.premio-help-absulate-content.active .premio-help-absulate-content-single {
[289] Fix | Delete
animation: slideInBottom 0.4s forwards ease;
[290] Fix | Delete
pointer-events: auto;
[291] Fix | Delete
visibility: visible;
[292] Fix | Delete
}
[293] Fix | Delete
.premio-help-absulate-content.hide .premio-help-absulate-content-single {
[294] Fix | Delete
animation: slideOutTop 0.4s forwards ease;
[295] Fix | Delete
}
[296] Fix | Delete
@keyframes slideInBottom {
[297] Fix | Delete
0% {
[298] Fix | Delete
opacity: 0;
[299] Fix | Delete
transform: translateY(20px);
[300] Fix | Delete
visibility: visible;
[301] Fix | Delete
}
[302] Fix | Delete
100% {
[303] Fix | Delete
opacity: 1;
[304] Fix | Delete
transform: translateY(0);
[305] Fix | Delete
visibility: visible;
[306] Fix | Delete
}
[307] Fix | Delete
}
[308] Fix | Delete
@keyframes slideOutTop {
[309] Fix | Delete
0% {
[310] Fix | Delete
opacity: 1;
[311] Fix | Delete
transform: translateY(0);
[312] Fix | Delete
visibility: visible;
[313] Fix | Delete
}
[314] Fix | Delete
100% {
[315] Fix | Delete
opacity: 0;
[316] Fix | Delete
transform: translateY(20px);
[317] Fix | Delete
visibility: hidden;
[318] Fix | Delete
}
[319] Fix | Delete
}
[320] Fix | Delete
.premio-help-absulate-content a {
[321] Fix | Delete
display: flex;
[322] Fix | Delete
justify-content: end;
[323] Fix | Delete
gap: 8px;
[324] Fix | Delete
align-items: center;
[325] Fix | Delete
margin-bottom: 8px;
[326] Fix | Delete
}
[327] Fix | Delete
.premio-help-absulate-content-single span {
[328] Fix | Delete
background-color: #7459B3;
[329] Fix | Delete
color: #fff;
[330] Fix | Delete
}
[331] Fix | Delete
.premio-help-absulate-content-single .icon-img {
[332] Fix | Delete
padding: 16px;
[333] Fix | Delete
height: 64px;
[334] Fix | Delete
width: 64px;
[335] Fix | Delete
display: inline-block;
[336] Fix | Delete
border-radius: 50%;
[337] Fix | Delete
}
[338] Fix | Delete
.premio-help-absulate-content-single .icon-img.pro {
[339] Fix | Delete
background: var(--Main-gradient, linear-gradient(180deg, #F69D01 0%, #F65901 100%));
[340] Fix | Delete
}
[341] Fix | Delete
.premio-help-absulate-content-single .text {
[342] Fix | Delete
padding: 8px 16px;
[343] Fix | Delete
border-radius: 8px;
[344] Fix | Delete
box-shadow: 0px 12px 16px -4px rgba(10, 13, 18, 0.08), 0px 4px 6px -2px rgba(10, 13, 18, 0.03);
[345] Fix | Delete
}
[346] Fix | Delete
.premio-form-response p{
[347] Fix | Delete
margin: 10px 0;
[348] Fix | Delete
}
[349] Fix | Delete
@media (max-width: 960px) {
[350] Fix | Delete
.premio-help-wrap{
[351] Fix | Delete
padding-left: 20px;
[352] Fix | Delete
}
[353] Fix | Delete
}
[354] Fix | Delete
@media (max-width: 576px) {
[355] Fix | Delete
.premio-help-menu {
[356] Fix | Delete
gap: 8px;
[357] Fix | Delete
padding: 0;
[358] Fix | Delete
}
[359] Fix | Delete
.premio-help-content{
[360] Fix | Delete
padding: 0;
[361] Fix | Delete
}
[362] Fix | Delete
}
[363] Fix | Delete
@media (max-width: 480px) {
[364] Fix | Delete
.premio-help-menu {
[365] Fix | Delete
display: none;
[366] Fix | Delete
}
[367] Fix | Delete
}
[368] Fix | Delete
</style>
[369] Fix | Delete
<div class="premio-footer-help">
[370] Fix | Delete
<div class="premio-help-wrap">
[371] Fix | Delete
<div class="premio-help-menu">
[372] Fix | Delete
<a target="_blank" href="<?php echo esc_url($data['get_support_link']) ?>"><?php esc_html_e("Get Support", "chaty") ?></a>
[373] Fix | Delete
<a target="_blank" href="<?php echo esc_url($data['upgrade_to_pro_link']) ?>"><?php esc_html_e("Upgrade to Pro", "chaty") ?></a>
[374] Fix | Delete
<?php if($data['recommended_plugins_link_status'] != true): ?>
[375] Fix | Delete
<a target="_blank" href="<?php echo esc_url($data['recommended_plugins_link']) ?>"><?php esc_html_e("Recommended Plugins", "chaty") ?></a>
[376] Fix | Delete
<?php endif; ?>
[377] Fix | Delete
<?php if($data['chaty_live_chat_link_status'] != true): ?>
[378] Fix | Delete
<a target="_blank" href="<?php echo esc_url($data['chaty_live_chat_link']) ?>"><?php esc_html_e("Add Live Chat", "chaty") ?></a>
[379] Fix | Delete
<?php endif; ?>
[380] Fix | Delete
</div>
[381] Fix | Delete
<div class="premio-help-content">
[382] Fix | Delete
<p><?php esc_html_e("Powered by ", "chaty") ?><a target="_blank" href="<?php echo esc_url($data['premio_site_info']) ?>"><?php esc_html_e("Premio", "chaty") ?></a></p>
[383] Fix | Delete
</div>
[384] Fix | Delete
</div>
[385] Fix | Delete
<div class="premio-help-btn-wrap">
[386] Fix | Delete
<!-- Free/Pro Only URL Change -->
[387] Fix | Delete
<a class="premio-help-btn" href="#"><img src="<?php echo esc_url($data['help_icon']) ?>" alt="<?php esc_html_e("Need help?", 'chaty'); ?>" /></a>
[388] Fix | Delete
<a class="premio-help-close-btn" href="#"><img src="<?php echo esc_url($data['close_icon']) ?>" alt="<?php esc_html_e("Close", 'chaty'); ?>" /></a>
[389] Fix | Delete
[390] Fix | Delete
<?php
[391] Fix | Delete
$option = get_option("hide_chaty_cta");
[392] Fix | Delete
if ($option !== "yes") { ?>
[393] Fix | Delete
<span class="tooltiptext"><?php esc_html_e("Support", "chaty") ?></span>
[394] Fix | Delete
<?php } ?>
[395] Fix | Delete
<div class="premio-help-absulate-content">
[396] Fix | Delete
<a target="_blank" href="<?php echo esc_url($data['upgrade_to_pro_link']) ?>" class="premio-help-absulate-content-single premio-click-to-close">
[397] Fix | Delete
<span class="text"><?php esc_html_e("Upgrade to Pro", "chaty") ?></span>
[398] Fix | Delete
<span class="icon-img pro"><img src="<?php echo esc_url($data['pro_icon']) ?>" alt=""></span>
[399] Fix | Delete
</a>
[400] Fix | Delete
<a target="_blank" href="<?php echo esc_url($data['get_support_link']) ?>" class="premio-help-absulate-content-single premio-click-to-close">
[401] Fix | Delete
<span class="text"><?php esc_html_e("Get Support", "chaty") ?></span>
[402] Fix | Delete
<span class="icon-img"><img src="<?php echo esc_url($data['support_icon']) ?>" alt=""></span>
[403] Fix | Delete
</a>
[404] Fix | Delete
<a href="#" class="premio-help-absulate-content-single contact-us-btn">
[405] Fix | Delete
<span class="text"><?php esc_html_e("Contact Us", "chaty") ?></span>
[406] Fix | Delete
<span class="icon-img"><img src="<?php echo esc_url($data['contact_icon']) ?>" alt=""></span>
[407] Fix | Delete
</a>
[408] Fix | Delete
</div>
[409] Fix | Delete
[410] Fix | Delete
</div>
[411] Fix | Delete
<div class="premio-help-form">
[412] Fix | Delete
[413] Fix | Delete
<form action="<?php echo esc_url(admin_url('admin-ajax.php')) ?>" method="post" id="premio-help-form">
[414] Fix | Delete
<div class="premio-help-header">
[415] Fix | Delete
<b>Gal Dubinski</b> <?php esc_html_e("Co-Founder at Premio", "chaty") ?>
[416] Fix | Delete
</div>
[417] Fix | Delete
<div class="premio-help-content">
[418] Fix | Delete
<p><?php esc_html_e("Hello! Are you experiencing any problems with Chaty? Please let me know :)", 'chaty'); ?></p>
[419] Fix | Delete
<div class="premio-form-field">
[420] Fix | Delete
<input type="text" name="user_email" id="user_email" placeholder="<?php esc_html_e("Email", 'chaty'); ?>">
[421] Fix | Delete
</div>
[422] Fix | Delete
<div class="premio-form-field">
[423] Fix | Delete
<textarea type="text" name="textarea_text" id="textarea_text" placeholder="<?php esc_html_e("How can I help you?", 'chaty'); ?>"></textarea>
[424] Fix | Delete
</div>
[425] Fix | Delete
<div class="form-button">
[426] Fix | Delete
<button type="submit" class="premio-help-button" ><?php esc_html_e("Chat", 'chaty') ?></button>
[427] Fix | Delete
<input type="hidden" name="action" value="wcp_admin_send_message_to_owner" >
[428] Fix | Delete
<input type="hidden" id="nonce" name="nonce" value="<?php echo esc_attr(wp_create_nonce('chaty_send_message_to_owner')) ?>" >
[429] Fix | Delete
</div>
[430] Fix | Delete
</div>
[431] Fix | Delete
<div class="help-form-footer">
[432] Fix | Delete
<p><?php esc_html_e("Or", 'chaty'); ?></p>
[433] Fix | Delete
<p><a href="<?php echo esc_url($data['help_center_link']) ?>" target="_blank"><?php esc_html_e("Visit our Help Center >>", 'chaty'); ?></a></p>
[434] Fix | Delete
</div>
[435] Fix | Delete
</form>
[436] Fix | Delete
<div class="premio-form-response"></div>
[437] Fix | Delete
</div>
[438] Fix | Delete
</div>
[439] Fix | Delete
[440] Fix | Delete
<script>
[441] Fix | Delete
jQuery(document).ready(function(){
[442] Fix | Delete
[443] Fix | Delete
jQuery(".premio-help-btn").click(function(e){
[444] Fix | Delete
e.stopPropagation();
[445] Fix | Delete
jQuery(".premio-help-btn-wrap .tooltiptext").hide();
[446] Fix | Delete
jQuery(".premio-help-close-btn").addClass('show');
[447] Fix | Delete
jQuery(".premio-help-btn").addClass('hide');
[448] Fix | Delete
jQuery(".premio-help-absulate-content").addClass('active');
[449] Fix | Delete
jQuery(".premio-help-absulate-content").removeClass('hide');
[450] Fix | Delete
[451] Fix | Delete
});
[452] Fix | Delete
jQuery(".premio-help-close-btn").click(function(e){
[453] Fix | Delete
e.stopPropagation();
[454] Fix | Delete
jQuery(".premio-help-close-btn").removeClass('show');
[455] Fix | Delete
jQuery(".premio-help-btn").removeClass('hide');
[456] Fix | Delete
jQuery(".premio-help-absulate-content").removeClass('active');
[457] Fix | Delete
jQuery(".premio-help-absulate-content").addClass('hide');
[458] Fix | Delete
jQuery(".premio-help-form").hide();
[459] Fix | Delete
[460] Fix | Delete
});
[461] Fix | Delete
jQuery(".premio-click-to-close").click(function(e){
[462] Fix | Delete
jQuery(".premio-help-close-btn").removeClass('show');
[463] Fix | Delete
jQuery(".premio-help-btn").removeClass('hide');
[464] Fix | Delete
jQuery(".premio-help-absulate-content").removeClass('active');
[465] Fix | Delete
jQuery(".premio-help-absulate-content").addClass('hide');
[466] Fix | Delete
[467] Fix | Delete
});
[468] Fix | Delete
jQuery("#premio-help-form").submit(function(){
[469] Fix | Delete
jQuery(".premio-help-button").attr("disabled",true);
[470] Fix | Delete
jQuery(".premio-help-button").text("<?php esc_html_e("Sending Request...", "chaty") ?>");
[471] Fix | Delete
formData = jQuery(this).serialize();
[472] Fix | Delete
jQuery.ajax({
[473] Fix | Delete
url: "<?php echo esc_url(admin_url('admin-ajax.php')) ?>",
[474] Fix | Delete
data: formData,
[475] Fix | Delete
type: "post",
[476] Fix | Delete
success: function(responseArray){
[477] Fix | Delete
jQuery("#premio-help-form").find(".error-message").remove();
[478] Fix | Delete
jQuery("#premio-help-form").find(".input-error").removeClass("input-error");
[479] Fix | Delete
if(responseArray.error == 1) {
[480] Fix | Delete
jQuery(".premio-help-button").attr("disabled",false);
[481] Fix | Delete
jQuery(".premio-help-button").text("<?php esc_html_e("Chat", 'chaty'); ?>");
[482] Fix | Delete
for(i=0;i<responseArray.errors.length;i++) {
[483] Fix | Delete
jQuery("#"+responseArray.errors[i]['key']).addClass("input-error");
[484] Fix | Delete
jQuery("#"+responseArray.errors[i]['key']).after('<span class="error-message">'+responseArray.errors[i]['message']+'</span>');
[485] Fix | Delete
}
[486] Fix | Delete
} else if(responseArray.status == 1) {
[487] Fix | Delete
jQuery(".premio-help-button").text("<?php esc_html_e("Done!", 'chaty'); ?>");
[488] Fix | Delete
setTimeout(function(){
[489] Fix | Delete
jQuery("#user_email").val("");
[490] Fix | Delete
jQuery("#textarea_text").val("");
[491] Fix | Delete
jQuery("#premio-help-form").hide();
[492] Fix | Delete
jQuery(".premio-help-header").hide();
[493] Fix | Delete
jQuery(".help-form-footer").hide();
[494] Fix | Delete
jQuery(".premio-form-response").html("<p class='success-p'><?php esc_html_e("Your message is sent successfully.", 'chaty'); ?></p>");
[495] Fix | Delete
},1000);
[496] Fix | Delete
} else if(responseArray.status == 0) {
[497] Fix | Delete
jQuery("#premio-help-form").hide();
[498] Fix | Delete
jQuery(".premio-help-header").hide();
[499] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function