css.html
3 years ago
embedded-poll.html
2 years ago
index.html
2 years ago
index.php
3 years ago
link-poll.html
2 years ago
link-poll.html
63 lines
| 1 | <div class="mailpoet-deactivate-survey-modal" id="mailpoet-deactivate-survey-modal"> |
| 2 | <div class="mailpoet-deactivate-survey-wrap"> |
| 3 | <div class="mailpoet-deactivate-survey"> |
| 4 | |
| 5 | <script type="text/javascript"> |
| 6 | window.addEventListener('load', function() { |
| 7 | var deactivateLink = document.querySelector('#the-list [data-slug="mailpoet"] span.deactivate a'); |
| 8 | var overlay = document.querySelector('#mailpoet-deactivate-survey-modal'); |
| 9 | var closeButton = document.querySelector('#mailpoet-deactivate-survey-close'); |
| 10 | var participateButton = document.querySelector('#mailpoet-deactivate-survey-participate'); |
| 11 | var formOpen = false; |
| 12 | |
| 13 | if (!deactivateLink || !overlay || !closeButton || !participateButton) { |
| 14 | return; |
| 15 | } |
| 16 | |
| 17 | deactivateLink.addEventListener('click', function (event) { |
| 18 | event.preventDefault(); |
| 19 | overlay.style.display = 'table'; |
| 20 | formOpen = true; |
| 21 | }); |
| 22 | |
| 23 | closeButton.addEventListener('click', function (event) { |
| 24 | event.preventDefault(); |
| 25 | overlay.style.display = 'none'; |
| 26 | formOpen = false; |
| 27 | location.href = deactivateLink.getAttribute('href'); |
| 28 | }); |
| 29 | |
| 30 | participateButton.addEventListener('click', function (event) { |
| 31 | setTimeout(function() {closeButton.click(); }, 50); |
| 32 | }); |
| 33 | |
| 34 | document.addEventListener('keyup', function (event) { |
| 35 | if ((event.keyCode === 27) && formOpen) { |
| 36 | location.href = deactivateLink.getAttribute('href'); |
| 37 | } |
| 38 | }); |
| 39 | }); |
| 40 | </script> |
| 41 | |
| 42 | <p><strong> |
| 43 | |
| 44 | <%= __("We're sorry to see you go. Would you be open to sharing how MailPoet didn't work for you so we could improve it?") %> |
| 45 | </strong><br><%= __('It will take only a minute.') %></p> |
| 46 | <a |
| 47 | class="button button-primary" |
| 48 | id="mailpoet-deactivate-survey-participate" |
| 49 | href="https://poll.fm/11161195" |
| 50 | target="_blank" |
| 51 | rel="noopener nofollow" |
| 52 | ><%= __("Yes") %> →</a> |
| 53 | |
| 54 | <a |
| 55 | class="button" |
| 56 | id="mailpoet-deactivate-survey-close" |
| 57 | > |
| 58 | <%= __('No') %> |
| 59 | </a> |
| 60 | </div> |
| 61 | </div> |
| 62 | </div> |
| 63 |