mystickymenu
Last commit date
css
1 year ago
fonts
4 years ago
images
1 year ago
js
1 year ago
languages
2 years ago
class-review-box.php
1 year ago
class-upgrade-box.php
1 year ago
help.php
1 year ago
index.php
8 years ago
mystickymenu-admin-widgetanalytics.php
1 year ago
mystickymenu-affiliate.php
1 year ago
mystickymenu-contact-leads.php
1 year ago
mystickymenu-deactivate-form.php
1 year ago
mystickymenu-fonts.php
2 years ago
mystickymenu-popup.php
1 year ago
mystickymenu-review-popup.php
1 year ago
mystickymenu.php
1 year ago
mystickymeny-new-welcomebar.php
1 year ago
readme.txt
1 year ago
recommended-plugins.php
1 year ago
stickymenu-dashboard.php
1 year ago
uninstall.php
2 years ago
update.php
1 year ago
upgrade-to-pro.php
1 year ago
welcome-bar.php
1 year ago
help.php
83 lines
| 1 | <div class="mystickymenu-help-form"> |
| 2 | <form action="<?php echo esc_url(admin_url( 'admin-ajax.php' )) ?>" method="post" id="mystickymenu-help-form"> |
| 3 | <div class="mystickymenu-help-header"> |
| 4 | <b>Gal Dubinski</b> Co-Founder at Premio |
| 5 | </div> |
| 6 | <div class="mystickymenu-help-content"> |
| 7 | <p><?php echo esc_html__("Hello! Are you experiencing any problems with My Sticky Bar? Please let me know :)", "mystickymenu") ?></p> |
| 8 | <div class="mystickymenu-form-field"> |
| 9 | <input type="text" name="user_email" id="user_email" placeholder="<?php echo esc_html__("Email", "mystickymenu") ?>"> |
| 10 | </div> |
| 11 | <div class="mystickymenu-form-field"> |
| 12 | <textarea type="text" name="textarea_text" id="textarea_text" placeholder="<?php echo esc_html__("How can I help you?", "mystickymenu") ?>"></textarea> |
| 13 | </div> |
| 14 | <div class="form-button"> |
| 15 | <button type="submit" class="mystickymenu-help-button" ><?php echo esc_html__("Chat", 'mystickymenu') ?></button> |
| 16 | <input type="hidden" name="action" value="mystickymenu_admin_send_message_to_owner" > |
| 17 | <input type="hidden" id="nonce" name="nonce" value="<?php echo esc_attr(wp_create_nonce("mystickymenu_send_message_to_owner")) ?>"> |
| 18 | </div> |
| 19 | <p class="mystickymenu-help-center"> |
| 20 | Or |
| 21 | </p> |
| 22 | <p class="mystickymenu-help-center" > |
| 23 | <a href="https://premio.io/help/mystickymenu/?utm_source=pluginchat" target="_blank" ><?php echo esc_html__('Visit our Help Center >>', 'mystickymenu' );?></a> |
| 24 | </p> |
| 25 | </div> |
| 26 | </form> |
| 27 | </div> |
| 28 | <div class="mystickymenu-help-btn"> |
| 29 | <a class="mystickymenu-help-tooltip" href="javascript:;"><img src="<?php echo esc_url(MYSTICKYMENU_URL) ?>images/owner.png)" alt="<?php echo esc_html__("Need help?", "mystickymenu") ?>" /></a> |
| 30 | <?php if ( !isset($_COOKIE['mse-help-cta'])):?> |
| 31 | <span class="tooltiptext"><?php echo esc_html__("Need help?", "mystickymenu") ?></span> |
| 32 | <?php endif;?> |
| 33 | </div> |
| 34 | <script> |
| 35 | jQuery(document).ready(function(){ |
| 36 | jQuery("#mystickymenu-help-form").on( 'submit', function(){ |
| 37 | jQuery(".mystickymenu-help-button").attr("disabled",true); |
| 38 | jQuery(".mystickymenu-help-button").text("<?php echo esc_html__("Sending Request...", "mystickymenu") ?>"); |
| 39 | formData = jQuery(this).serialize(); |
| 40 | jQuery.ajax({ |
| 41 | url: "<?php echo esc_url(admin_url( 'admin-ajax.php' )) ?>", |
| 42 | data: formData, |
| 43 | type: "post", |
| 44 | success: function(responseText){ |
| 45 | jQuery("#mystickymenu-help-form").find(".error-message").remove(); |
| 46 | jQuery("#mystickymenu-help-form").find(".input-error").removeClass("input-error"); |
| 47 | responseArray = jQuery.parseJSON(responseText); |
| 48 | if(responseArray.error == 1) { |
| 49 | jQuery(".mystickymenu-help-button").attr("disabled",false); |
| 50 | jQuery(".mystickymenu-help-button").text("<?php echo esc_html__("Chat", "mystickymenu") ?>"); |
| 51 | for(i=0;i<responseArray.errors.length;i++) { |
| 52 | jQuery("#"+responseArray.errors[i]['key']).addClass("input-error"); |
| 53 | jQuery("#"+responseArray.errors[i]['key']).after('<span class="error-message">'+responseArray.errors[i]['message']+'</span>'); |
| 54 | } |
| 55 | } else if(responseArray.status == 1) { |
| 56 | jQuery(".mystickymenu-help-button").text("<?php echo esc_html__("Done!", "mystickymenu") ?>"); |
| 57 | setTimeout(function(){ |
| 58 | jQuery(".mystickymenu-help-header").remove(); |
| 59 | jQuery(".mystickymenu-help-content").html("<p class='success-p'><?php echo esc_html__("Your message was sent successfully.", "mystickymenu") ?></p>"); |
| 60 | },1000); |
| 61 | } else if(responseArray.status == 0) { |
| 62 | jQuery(".mystickymenu-help-content").html("<p class='error-p'><?php echo esc_html__("There is some problem in sending request. Please send us mail on <a href='mailto:contact@premio.io'>contact@premio.io</a>", "mystickymenu") ?></p>"); |
| 63 | } |
| 64 | } |
| 65 | }); |
| 66 | return false; |
| 67 | }); |
| 68 | jQuery(".mystickymenu-help-tooltip").on( 'click', function(e){ |
| 69 | e.stopPropagation(); |
| 70 | jQuery(".mystickymenu-help-form").toggleClass("active"); |
| 71 | if ( jQuery(".mystickymenu-help-btn .tooltiptext").length != 0) { |
| 72 | jQuery(".mystickymenu-help-btn .tooltiptext").remove(); |
| 73 | } |
| 74 | document.cookie = "mse-help-cta=hide"; |
| 75 | }); |
| 76 | jQuery(".mystickymenu-help-form").on( 'click', function(e){ |
| 77 | e.stopPropagation(); |
| 78 | }); |
| 79 | jQuery("body").on( 'click', function(){ |
| 80 | jQuery(".mystickymenu-help-form").removeClass("active"); |
| 81 | }); |
| 82 | }); |
| 83 | </script> |