Easy Forms for MailChimp - Version 6.5.3

Version Description

  • July 1st, 2019 =
  • Added support for showing whether your site is being blocked by Mailchimp. If you're blocked, you will now see an error on the plugin's General Settings page.
  • Added a filter for our checkbox integrations, yikes_mailchimp_checkbox_integration_additional_vars. This allows you to use custom variables in our other filters.
  • Added a filter for changing the placement (above/below/both) of form error/success messages. See the filter yikes_mailchimp_feedback_message_placement.
  • Added support for setting the timestamp_signup Mailchimp merge variable to all new subscribers.
  • Removed support for setting the timestamp_opt variable for all subscribers. This plugin will no longer set the timestamp_opt Mailchimp merge variable.
  • Fixed an issue with default selected interest groups not working in our Gutenberg block.
  • Fixed admin input field code injection vulnerability. Thanks to Henri Salo from Nixu Corporation for finding and reporting this to us.
  • Fixed an error w/ error handling a failed API hit on the Manage Lists page.
Download this release

Release Info

Developer metalandcoffee
Plugin Icon 128x128 Easy Forms for MailChimp
Version 6.5.3
Comparing to
See all releases

Code changes from version 6.5.2 to 6.5.3

Files changed (49) hide show
  1. admin/css/jquery.qtip.min.css +2 -2
  2. admin/css/yikes-inc-easy-mailchimp-extender-addons.min.css +1 -1
  3. admin/css/yikes-inc-easy-mailchimp-extender-admin.css +5 -0
  4. admin/css/yikes-inc-easy-mailchimp-extender-admin.min.css +1 -1
  5. admin/js/jquery.timepicker.min.js +6 -6
  6. admin/js/min/jquery.qtip.min.js +13 -13
  7. admin/js/support.js +11 -11
  8. admin/js/yikes-inc-easy-mailchimp-tinymce-button.js +124 -124
  9. admin/partials/ajax/add_field_to_form.php +377 -377
  10. admin/partials/ajax/add_interest_group_to_form.php +250 -250
  11. admin/partials/ajax/class.ajax.php +227 -227
  12. admin/partials/dashboard-widgets/class.list-activity-widget.php +107 -107
  13. admin/partials/dashboard-widgets/templates/stats-list-template.php +67 -67
  14. admin/partials/edit-form.php +1019 -1019
  15. admin/partials/front-end-widgets/front-end-widget-form.php +163 -163
  16. admin/partials/helpers/edit-form-hidden-section-template.php +75 -75
  17. admin/partials/helpers/fields/js/yikes-mc-file-upload.js +71 -71
  18. admin/partials/helpers/fields/yikes-mailchimp-checkbox-field.php +20 -20
  19. admin/partials/helpers/fields/yikes-mailchimp-file-field.php +41 -41
  20. admin/partials/helpers/fields/yikes-mailchimp-radio-field.php +29 -29
  21. admin/partials/helpers/fields/yikes-mailchimp-select-field.php +28 -28
  22. admin/partials/helpers/fields/yikes-mailchimp-text-field.php +19 -19
  23. admin/partials/helpers/fields/yikes-mailchimp-wysiwyg-field.php +23 -23
  24. admin/partials/helpers/free-support.php +69 -69
  25. admin/partials/helpers/init.php +75 -75
  26. admin/partials/helpers/premium-support.php +74 -74
  27. admin/partials/menu/add-ons.php +35 -35
  28. admin/partials/menu/manage-forms.php +254 -254
  29. admin/partials/menu/manage-lists.php +216 -207
  30. admin/partials/menu/options-sections/api-cache-settings.php +21 -21
  31. admin/partials/menu/options-sections/debug-settings.php +59 -60
  32. admin/partials/menu/options-sections/general-settings.php +76 -58
  33. admin/partials/menu/options-sections/import-export-forms.php +63 -63
  34. admin/partials/menu/options-sections/recaptcha-settings.php +53 -53
  35. admin/partials/menu/options-sections/templates/integration-interest-groups.php +108 -108
  36. admin/partials/menu/options.php +176 -176
  37. admin/partials/menu/support.php +33 -33
  38. admin/partials/view-list.php +401 -401
  39. admin/partials/view-user.php +316 -316
  40. blocks/api/api.php +108 -108
  41. blocks/blocks.php +42 -42
  42. blocks/components/api.js +51 -51
  43. blocks/components/class.MailChimpForms.js +870 -870
  44. blocks/components/constants.js +390 -390
  45. blocks/components/enable-submit-button-editing.js +16 -16
  46. blocks/components/slugify.js +19 -19
  47. blocks/easy-forms-block/dev-easy-forms-block.js +218 -218
  48. blocks/easy-forms-block/easy-forms-block.js +7 -7
  49. blocks/easy-forms-block/easy-forms-block.js.map +0 -1
admin/css/jquery.qtip.min.css CHANGED
@@ -1,3 +1,3 @@
1
- /* qTip2 v2.2.1 | Plugins: tips viewport imagemap svg modal ie6 | Styles: core basic css3 | qtip2.com | Licensed MIT | Sat Sep 06 2014 18:25:07 */
2
- .qtip{position:absolute;left:-28000px;top:-28000px;display:none;max-width:280px;min-width:50px;font-size:10.5px;line-height:12px;direction:ltr;box-shadow:none;padding:0}.qtip-content{position:relative;padding:5px 9px;overflow:hidden;text-align:left;word-wrap:break-word}.qtip-titlebar{position:relative;padding:5px 35px 5px 10px;overflow:hidden;border-width:0 0 1px;font-weight:700}.qtip-titlebar+.qtip-content{border-top-width:0!important}.qtip-close{position:absolute;right:-9px;top:-9px;z-index:11;cursor:pointer;outline:medium none;border:1px solid transparent}.qtip-titlebar .qtip-close{right:4px;top:50%;margin-top:-9px}* html .qtip-titlebar .qtip-close{top:16px}.qtip-titlebar .ui-icon,.qtip-icon .ui-icon{display:block;text-indent:-1000em;direction:ltr}.qtip-icon,.qtip-icon .ui-icon{border-radius:3px;text-decoration:none}.qtip-icon .ui-icon{width:18px;height:14px;line-height:14px;text-align:center;text-indent:0;font:400 bold 10px/13px Tahoma,sans-serif;color:inherit;background:transparent none no-repeat -100em -100em}.qtip-focus{}.qtip-hover{}.qtip-default{border:1px solid #F1D031;background-color:#FFFFA3;color:#555}.qtip-default .qtip-titlebar{background-color:#FFEF93}.qtip-default .qtip-icon{border-color:#CCC;background:#F1F1F1;color:#777}.qtip-default .qtip-titlebar .qtip-close{border-color:#AAA;color:#111} .qtip-light{background-color:#fff;border-color:#E2E2E2;color:#454545}.qtip-light .qtip-titlebar{background-color:#f1f1f1} .qtip-dark{background-color:#505050;border-color:#303030;color:#f3f3f3}.qtip-dark .qtip-titlebar{background-color:#404040}.qtip-dark .qtip-icon{border-color:#444}.qtip-dark .qtip-titlebar .ui-state-hover{border-color:#303030} .qtip-cream{background-color:#FBF7AA;border-color:#F9E98E;color:#A27D35}.qtip-cream .qtip-titlebar{background-color:#F0DE7D}.qtip-cream .qtip-close .qtip-icon{background-position:-82px 0} .qtip-red{background-color:#F78B83;border-color:#D95252;color:#912323}.qtip-red .qtip-titlebar{background-color:#F06D65}.qtip-red .qtip-close .qtip-icon{background-position:-102px 0}.qtip-red .qtip-icon{border-color:#D95252}.qtip-red .qtip-titlebar .ui-state-hover{border-color:#D95252} .qtip-green{background-color:#CAED9E;border-color:#90D93F;color:#3F6219}.qtip-green .qtip-titlebar{background-color:#B0DE78}.qtip-green .qtip-close .qtip-icon{background-position:-42px 0} .qtip-blue{background-color:#E5F6FE;border-color:#ADD9ED;color:#5E99BD}.qtip-blue .qtip-titlebar{background-color:#D0E9F5}.qtip-blue .qtip-close .qtip-icon{background-position:-2px 0}.qtip-shadow{box-shadow:1px 1px 3px 1px rgba(0,0,0,.15)}.qtip-rounded,.qtip-tipsy,.qtip-bootstrap{border-radius:5px}.qtip-rounded .qtip-titlebar{border-radius:4px 4px 0 0}.qtip-youtube{border-radius:2px;box-shadow:0 0 3px #333;color:#fff;border:0 solid transparent;background:#4A4A4A;background-image:-o-linear-gradient(top,#4A4A4A 0,#000 100%)}.qtip-youtube .qtip-titlebar{background-color:#4A4A4A;background-color:rgba(0,0,0,0)}.qtip-youtube .qtip-content{padding:.75em;font:12px arial,sans-serif;filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=#4a4a4a, EndColorStr=#000000);-ms-filter:"progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=#4a4a4a, EndColorStr=#000000);"}.qtip-youtube .qtip-icon{border-color:#222}.qtip-youtube .qtip-titlebar .ui-state-hover{border-color:#303030}.qtip-jtools{background:#232323;background:rgba(0,0,0,.7);background-image:-o-linear-gradient(top,#717171,#232323);border:2px solid #ddd;border:2px solid rgba(241,241,241,1);border-radius:2px;box-shadow:0 0 12px #333}.qtip-jtools .qtip-titlebar{background-color:transparent;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#717171, endColorstr=#4A4A4A);-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#717171, endColorstr=#4A4A4A)"}.qtip-jtools .qtip-content{filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4A4A4A, endColorstr=#232323);-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#4A4A4A, endColorstr=#232323)"}.qtip-jtools .qtip-titlebar,.qtip-jtools .qtip-content{background:transparent;color:#fff;border:0 dashed transparent}.qtip-jtools .qtip-icon{border-color:#555}.qtip-jtools .qtip-titlebar .ui-state-hover{border-color:#333}.qtip-cluetip{box-shadow:4px 4px 5px rgba(0,0,0,.4);background-color:#D9D9C2;color:#111;border:0 dashed transparent}.qtip-cluetip .qtip-titlebar{background-color:#87876A;color:#fff;border:0 dashed transparent}.qtip-cluetip .qtip-icon{border-color:#808064}.qtip-cluetip .qtip-titlebar .ui-state-hover{border-color:#696952;color:#696952}.qtip-tipsy{background:#000;background:rgba(0,0,0,.87);color:#fff;border:0 solid transparent;font-size:11px;font-family:'Lucida Grande',sans-serif;font-weight:700;line-height:16px;text-shadow:0 1px #000}.qtip-tipsy .qtip-titlebar{padding:6px 35px 0 10px;background-color:transparent}.qtip-tipsy .qtip-content{padding:6px 10px}.qtip-tipsy .qtip-icon{border-color:#222;text-shadow:none}.qtip-tipsy .qtip-titlebar .ui-state-hover{border-color:#303030}.qtip-tipped{border:3px solid #959FA9;border-radius:3px;background-color:#F9F9F9;color:#454545;font-weight:400;font-family:serif}.qtip-tipped .qtip-titlebar{border-bottom-width:0;color:#fff;background:#3A79B8;background-image:-o-linear-gradient(top,#3A79B8,#2E629D);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#3A79B8, endColorstr=#2E629D);-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#3A79B8, endColorstr=#2E629D)"}.qtip-tipped .qtip-icon{border:2px solid #285589;background:#285589}.qtip-tipped .qtip-icon .ui-icon{background-color:#FBFBFB;color:#555}.qtip-bootstrap{font-size:14px;line-height:20px;color:#333;padding:1px;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;box-shadow:0 5px 10px rgba(0,0,0,.2);background-clip:padding-box}.qtip-bootstrap .qtip-titlebar{padding:8px 14px;margin:0;font-size:14px;font-weight:400;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.qtip-bootstrap .qtip-titlebar .qtip-close{right:11px;top:45%;border-style:none}.qtip-bootstrap .qtip-content{padding:9px 14px}.qtip-bootstrap .qtip-icon{background:transparent}.qtip-bootstrap .qtip-icon .ui-icon{width:auto;height:auto;float:right;font-size:20px;font-weight:700;line-height:18px;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.qtip-bootstrap .qtip-icon .ui-icon:hover{color:#000;text-decoration:none;cursor:pointer;opacity:.4;filter:alpha(opacity=40)}.qtip:not(.ie9haxors) div.qtip-content,.qtip:not(.ie9haxors) div.qtip-titlebar{filter:none;-ms-filter:none}.qtip .qtip-tip{margin:0 auto;overflow:hidden;z-index:10}x:-o-prefocus,.qtip .qtip-tip{visibility:hidden}.qtip .qtip-tip,.qtip .qtip-tip .qtip-vml,.qtip .qtip-tip canvas{position:absolute;color:#123456;background:transparent;border:0 dashed transparent}.qtip .qtip-tip canvas{top:0;left:0}.qtip .qtip-tip .qtip-vml{behavior:url(#default#VML);display:inline-block;visibility:visible}#qtip-overlay{position:fixed;left:0;top:0;width:100%;height:100%}#qtip-overlay.blurs{cursor:pointer}#qtip-overlay div{position:absolute;left:0;top:0;width:100%;height:100%;background-color:#000;opacity:.7;filter:alpha(opacity=70);-ms-filter:"alpha(Opacity=70)"}.qtipmodal-ie6fix{position:absolute!important}
3
  /*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImpxdWVyeS5xdGlwLm1pbi5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsa0pBQWtKO0FBQ2xKLE1BQU0sa0JBQWtCLGNBQWMsYUFBYSxhQUFhLGdCQUFnQixlQUFlLGlCQUFpQixpQkFBaUIsY0FBYyxnQkFBZ0IsU0FBUyxDQUFDLGNBQWMsa0JBQWtCLGdCQUFnQixnQkFBZ0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NTCk7ZGlzcGxheTppbmxpbmUtYmxvY2s7dmlzaWJpbGl0eTp2aXNpYmxlfSNxdGlwLW92ZXJsYXl7cG9zaXRpb246Zml4ZWQ7bGVmdDowO3RvcDowO3dpZHRoOjEwMCU7aGVpZ2h0OjEwMCV9I3F0aXAtb3ZlcmxheS5ibHVyc3tjdXJzb3I6cG9pbnRlcn0jcXRpcC1vdmVybGF5IGRpdntwb3NpdGlvbjphYnNvbHV0ZTtsZWZ0OjA7dG9wOjA7d2lkdGg6MTAwJTtoZWlnaHQ6MTAwJTtiYWNrZ3JvdW5kLWNvbG9yOiMwMDA7b3BhY2l0eTouNztmaWx0ZXI6YWxwaGEob3BhY2l0eT03MCk7LW1zLWZpbHRlcjpcImFscGhhKE9wYWNpdHk9NzApXCJ9LnF0aXBtb2RhbC1pZTZmaXh7cG9zaXRpb246YWJzb2x1dGUhaW1wb3J0YW50fSJdfQ== */
1
+ /* qTip2 v2.2.1 | Plugins: tips viewport imagemap svg modal ie6 | Styles: core basic css3 | qtip2.com | Licensed MIT | Sat Sep 06 2014 18:25:07 */
2
+ .qtip{position:absolute;left:-28000px;top:-28000px;display:none;max-width:280px;min-width:50px;font-size:10.5px;line-height:12px;direction:ltr;box-shadow:none;padding:0}.qtip-content{position:relative;padding:5px 9px;overflow:hidden;text-align:left;word-wrap:break-word}.qtip-titlebar{position:relative;padding:5px 35px 5px 10px;overflow:hidden;border-width:0 0 1px;font-weight:700}.qtip-titlebar+.qtip-content{border-top-width:0!important}.qtip-close{position:absolute;right:-9px;top:-9px;z-index:11;cursor:pointer;outline:medium none;border:1px solid transparent}.qtip-titlebar .qtip-close{right:4px;top:50%;margin-top:-9px}* html .qtip-titlebar .qtip-close{top:16px}.qtip-titlebar .ui-icon,.qtip-icon .ui-icon{display:block;text-indent:-1000em;direction:ltr}.qtip-icon,.qtip-icon .ui-icon{border-radius:3px;text-decoration:none}.qtip-icon .ui-icon{width:18px;height:14px;line-height:14px;text-align:center;text-indent:0;font:400 bold 10px/13px Tahoma,sans-serif;color:inherit;background:transparent none no-repeat -100em -100em}.qtip-focus{}.qtip-hover{}.qtip-default{border:1px solid #F1D031;background-color:#FFFFA3;color:#555}.qtip-default .qtip-titlebar{background-color:#FFEF93}.qtip-default .qtip-icon{border-color:#CCC;background:#F1F1F1;color:#777}.qtip-default .qtip-titlebar .qtip-close{border-color:#AAA;color:#111} .qtip-light{background-color:#fff;border-color:#E2E2E2;color:#454545}.qtip-light .qtip-titlebar{background-color:#f1f1f1} .qtip-dark{background-color:#505050;border-color:#303030;color:#f3f3f3}.qtip-dark .qtip-titlebar{background-color:#404040}.qtip-dark .qtip-icon{border-color:#444}.qtip-dark .qtip-titlebar .ui-state-hover{border-color:#303030} .qtip-cream{background-color:#FBF7AA;border-color:#F9E98E;color:#A27D35}.qtip-cream .qtip-titlebar{background-color:#F0DE7D}.qtip-cream .qtip-close .qtip-icon{background-position:-82px 0} .qtip-red{background-color:#F78B83;border-color:#D95252;color:#912323}.qtip-red .qtip-titlebar{background-color:#F06D65}.qtip-red .qtip-close .qtip-icon{background-position:-102px 0}.qtip-red .qtip-icon{border-color:#D95252}.qtip-red .qtip-titlebar .ui-state-hover{border-color:#D95252} .qtip-green{background-color:#CAED9E;border-color:#90D93F;color:#3F6219}.qtip-green .qtip-titlebar{background-color:#B0DE78}.qtip-green .qtip-close .qtip-icon{background-position:-42px 0} .qtip-blue{background-color:#E5F6FE;border-color:#ADD9ED;color:#5E99BD}.qtip-blue .qtip-titlebar{background-color:#D0E9F5}.qtip-blue .qtip-close .qtip-icon{background-position:-2px 0}.qtip-shadow{box-shadow:1px 1px 3px 1px rgba(0,0,0,.15)}.qtip-rounded,.qtip-tipsy,.qtip-bootstrap{border-radius:5px}.qtip-rounded .qtip-titlebar{border-radius:4px 4px 0 0}.qtip-youtube{border-radius:2px;box-shadow:0 0 3px #333;color:#fff;border:0 solid transparent;background:#4A4A4A;background-image:-o-linear-gradient(top,#4A4A4A 0,#000 100%)}.qtip-youtube .qtip-titlebar{background-color:#4A4A4A;background-color:rgba(0,0,0,0)}.qtip-youtube .qtip-content{padding:.75em;font:12px arial,sans-serif;filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=#4a4a4a, EndColorStr=#000000);-ms-filter:"progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=#4a4a4a, EndColorStr=#000000);"}.qtip-youtube .qtip-icon{border-color:#222}.qtip-youtube .qtip-titlebar .ui-state-hover{border-color:#303030}.qtip-jtools{background:#232323;background:rgba(0,0,0,.7);background-image:-o-linear-gradient(top,#717171,#232323);border:2px solid #ddd;border:2px solid rgba(241,241,241,1);border-radius:2px;box-shadow:0 0 12px #333}.qtip-jtools .qtip-titlebar{background-color:transparent;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#717171, endColorstr=#4A4A4A);-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#717171, endColorstr=#4A4A4A)"}.qtip-jtools .qtip-content{filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4A4A4A, endColorstr=#232323);-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#4A4A4A, endColorstr=#232323)"}.qtip-jtools .qtip-titlebar,.qtip-jtools .qtip-content{background:transparent;color:#fff;border:0 dashed transparent}.qtip-jtools .qtip-icon{border-color:#555}.qtip-jtools .qtip-titlebar .ui-state-hover{border-color:#333}.qtip-cluetip{box-shadow:4px 4px 5px rgba(0,0,0,.4);background-color:#D9D9C2;color:#111;border:0 dashed transparent}.qtip-cluetip .qtip-titlebar{background-color:#87876A;color:#fff;border:0 dashed transparent}.qtip-cluetip .qtip-icon{border-color:#808064}.qtip-cluetip .qtip-titlebar .ui-state-hover{border-color:#696952;color:#696952}.qtip-tipsy{background:#000;background:rgba(0,0,0,.87);color:#fff;border:0 solid transparent;font-size:11px;font-family:'Lucida Grande',sans-serif;font-weight:700;line-height:16px;text-shadow:0 1px #000}.qtip-tipsy .qtip-titlebar{padding:6px 35px 0 10px;background-color:transparent}.qtip-tipsy .qtip-content{padding:6px 10px}.qtip-tipsy .qtip-icon{border-color:#222;text-shadow:none}.qtip-tipsy .qtip-titlebar .ui-state-hover{border-color:#303030}.qtip-tipped{border:3px solid #959FA9;border-radius:3px;background-color:#F9F9F9;color:#454545;font-weight:400;font-family:serif}.qtip-tipped .qtip-titlebar{border-bottom-width:0;color:#fff;background:#3A79B8;background-image:-o-linear-gradient(top,#3A79B8,#2E629D);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#3A79B8, endColorstr=#2E629D);-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#3A79B8, endColorstr=#2E629D)"}.qtip-tipped .qtip-icon{border:2px solid #285589;background:#285589}.qtip-tipped .qtip-icon .ui-icon{background-color:#FBFBFB;color:#555}.qtip-bootstrap{font-size:14px;line-height:20px;color:#333;padding:1px;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;box-shadow:0 5px 10px rgba(0,0,0,.2);background-clip:padding-box}.qtip-bootstrap .qtip-titlebar{padding:8px 14px;margin:0;font-size:14px;font-weight:400;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.qtip-bootstrap .qtip-titlebar .qtip-close{right:11px;top:45%;border-style:none}.qtip-bootstrap .qtip-content{padding:9px 14px}.qtip-bootstrap .qtip-icon{background:transparent}.qtip-bootstrap .qtip-icon .ui-icon{width:auto;height:auto;float:right;font-size:20px;font-weight:700;line-height:18px;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.qtip-bootstrap .qtip-icon .ui-icon:hover{color:#000;text-decoration:none;cursor:pointer;opacity:.4;filter:alpha(opacity=40)}.qtip:not(.ie9haxors) div.qtip-content,.qtip:not(.ie9haxors) div.qtip-titlebar{filter:none;-ms-filter:none}.qtip .qtip-tip{margin:0 auto;overflow:hidden;z-index:10}x:-o-prefocus,.qtip .qtip-tip{visibility:hidden}.qtip .qtip-tip,.qtip .qtip-tip .qtip-vml,.qtip .qtip-tip canvas{position:absolute;color:#123456;background:transparent;border:0 dashed transparent}.qtip .qtip-tip canvas{top:0;left:0}.qtip .qtip-tip .qtip-vml{behavior:url(#default#VML);display:inline-block;visibility:visible}#qtip-overlay{position:fixed;left:0;top:0;width:100%;height:100%}#qtip-overlay.blurs{cursor:pointer}#qtip-overlay div{position:absolute;left:0;top:0;width:100%;height:100%;background-color:#000;opacity:.7;filter:alpha(opacity=70);-ms-filter:"alpha(Opacity=70)"}.qtipmodal-ie6fix{position:absolute!important}
3
  /*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImpxdWVyeS5xdGlwLm1pbi5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsa0pBQWtKO0FBQ2xKLE1BQU0sa0JBQWtCLGNBQWMsYUFBYSxhQUFhLGdCQUFnQixlQUFlLGlCQUFpQixpQkFBaUIsY0FBYyxnQkFBZ0IsU0FBUyxDQUFDLGNBQWMsa0JBQWtCLGdCQUFnQixnQkFBZ0IsZ0JBQWdCLG9CQUFvQixDQUFDLGVBQWUsa0JBQWtCLDBCQUEwQixnQkFBZ0IscUJBQXFCLGVBQWUsQ0FBQyw2QkFBNkIsNEJBQTRCLENBQUMsWUFBWSxrQkFBa0IsV0FBVyxTQUFTLFdBQVcsZUFBZSxvQkFBb0IsNEJBQTRCLENBQUMsMkJBQTJCLFVBQVUsUUFBUSxlQUFlLENBQUMsa0NBQWtDLFFBQVEsQ0FBQyw0Q0FBNEMsY0FBYyxvQkFBb0IsYUFBYSxDQUFDLCtCQUFnRixrQkFBa0Isb0JBQW9CLENBQUMsb0JBQW9CLFdBQVcsWUFBWSxpQkFBaUIsa0JBQWtCLGNBQWMsMENBQTBDLGNBQWMsbURBQW1ELENBQUMsYUFBYSxhQUFhLGNBQWMseUJBQXlCLHlCQUF5QixVQUFVLENBQUMsNkJBQTZCLHdCQUF3QixDQUFDLHlCQU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JdfQ== */
admin/css/yikes-inc-easy-mailchimp-extender-addons.min.css CHANGED
@@ -1,2 +1,2 @@
1
- .type-download{float:left;margin:0 1em 1em 0!important;padding:0;vertical-align:top;width:280px;text-decoration:none;color:inherit;border:1px solid #ddd;display:block;min-height:365px;overflow:hidden;background:#f5f5f5;box-shadow:inset 0 1px 0 rgba(255,255,255,.2),inset 0 -1px 0 rgba(0,0,0,.1);transition-property:border,background,color;transition-duration:.05s;transition-timing-function:ease-in-out;position:relative}.type-download:hover{border:1px solid #d1d1d1}.type-download>.featured-img{background-color:#866894;height:120px}.type-download>.featured-img a{display:inline-block;width:100%;height:100%}.type-download>.featured-img img{display:block;height:auto!important;margin:0 auto;max-height:70%;position:relative;top:50%;transform:translateY(-50%);width:auto!important}.type-download .addon-content{padding:15px 20px}.type-download .addon-content:after,.type-download .addon-content:before{content:" ";display:table}.type-download .addon-content:after{clear:both}.type-download .addon-content .addon-heading{margin:0 0 10px}.type-download .addon-content .addon-heading a{outline:0;text-decoration:none}.type-download .addon-footer-wrap{border-top:1px solid #ddd;position:absolute;bottom:2px;left:0;width:100%;background-color:#FFF;padding:15px 20px}.give-view-addons-all span.dashicons,.type-download span.dashicons{width:16px;height:16px;font-size:14px;margin:6px 0 0}.give-view-addons-all span.dashicons{margin-left:3px}
2
  /*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInlpa2VzLWluYy1lYXN5LW1haWxjaGltcC1leHRlbmRlci1hZGRvbnMubWluLmNzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxlQUFlLFdBQVcsNkJBQTZCLFVBQVUsbUJBQW1CLFlBQVkscUJBQXFCLGNBQWMsc0JBQXNCLGNBQWMsaUJBQWlCLGdCQUFnQixtQkFBbUIsNEVBQTRFLDRDQUE0Qyx5QkFBeUIsdUNBQXVDLGlCQUFpQixDQUFDLHFCQUFxQix3QkFBd0IsQ0FBQyw2QkFBNkIseUJBQXlCLFlBQ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NpdGlvbjphYnNvbHV0ZTtib3R0b206MnB4O2xlZnQ6MDt3aWR0aDoxMDAlO2JhY2tncm91bmQtY29sb3I6I0ZGRjtwYWRkaW5nOjE1cHggMjBweH0uZ2l2ZS12aWV3LWFkZG9ucy1hbGwgc3Bhbi5kYXNoaWNvbnMsLnR5cGUtZG93bmxvYWQgc3Bhbi5kYXNoaWNvbnN7d2lkdGg6MTZweDtoZWlnaHQ6MTZweDtmb250LXNpemU6MTRweDttYXJnaW46NnB4IDAgMH0uZ2l2ZS12aWV3LWFkZG9ucy1hbGwgc3Bhbi5kYXNoaWNvbnN7bWFyZ2luLWxlZnQ6M3B4fSJdfQ== */
1
+ .type-download{float:left;margin:0 1em 1em 0!important;padding:0;vertical-align:top;width:280px;text-decoration:none;color:inherit;border:1px solid #ddd;display:block;min-height:365px;overflow:hidden;background:#f5f5f5;box-shadow:inset 0 1px 0 rgba(255,255,255,.2),inset 0 -1px 0 rgba(0,0,0,.1);transition-property:border,background,color;transition-duration:.05s;transition-timing-function:ease-in-out;position:relative}.type-download:hover{border:1px solid #d1d1d1}.type-download>.featured-img{background-color:#866894;height:120px}.type-download>.featured-img a{display:inline-block;width:100%;height:100%}.type-download>.featured-img img{display:block;height:auto!important;margin:0 auto;max-height:70%;position:relative;top:50%;transform:translateY(-50%);width:auto!important}.type-download .addon-content{padding:15px 20px}.type-download .addon-content:after,.type-download .addon-content:before{content:" ";display:table}.type-download .addon-content:after{clear:both}.type-download .addon-content .addon-heading{margin:0 0 10px}.type-download .addon-content .addon-heading a{outline:0;text-decoration:none}.type-download .addon-footer-wrap{border-top:1px solid #ddd;position:absolute;bottom:2px;left:0;width:100%;background-color:#FFF;padding:15px 20px}.give-view-addons-all span.dashicons,.type-download span.dashicons{width:16px;height:16px;font-size:14px;margin:6px 0 0}.give-view-addons-all span.dashicons{margin-left:3px}
2
  /*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInlpa2VzLWluYy1lYX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ubG9hZCAuYWRkb24tY29udGVudDphZnRlcntjbGVhcjpib3RofS50eXBlLWRvd25sb2FkIC5hZGRvbi1jb250ZW50IC5hZGRvbi1oZWFkaW5ne21hcmdpbjowIDAgMTBweH0udHlwZS1kb3dubG9hZCAuYWRkb24tY29udGVudCAuYWRkb24taGVhZGluZyBhe291dGxpbmU6MDt0ZXh0LWRlY29yYXRpb246bm9uZX0udHlwZS1kb3dubG9hZCAuYWRkb24tZm9vdGVyLXdyYXB7Ym9yZGVyLXRvcDoxcHggc29saWQgI2RkZDtwb3NpdGlvbjphYnNvbHV0ZTtib3R0b206MnB4O2xlZnQ6MDt3aWR0aDoxMDAlO2JhY2tncm91bmQtY29sb3I6I0ZGRjtwYWRkaW5nOjE1cHggMjBweH0uZ2l2ZS12aWV3LWFkZG9ucy1hbGwgc3Bhbi5kYXNoaWNvbnMsLnR5cGUtZG93bmxvYWQgc3Bhbi5kYXNoaWNvbnN7d2lkdGg6MTZweDtoZWlnaHQ6MTZweDtmb250LXNpemU6MTRweDttYXJnaW46NnB4IDAgMH0uZ2l2ZS12aWV3LWFkZG9ucy1hbGwgc3Bhbi5kYXNoaWNvbnN7bWFyZ2luLWxlZnQ6M3B4fSJdfQ== */
admin/css/yikes-inc-easy-mailchimp-extender-admin.css CHANGED
@@ -418,6 +418,11 @@ ul.support-option-list {
418
  font-weight: 800;
419
  color: #ffffff;
420
  }
 
 
 
 
 
421
  .yikes-easy-mc-postbox h3.bg-transparent {
422
  color: #333;
423
  font-weight: 400;
418
  font-weight: 800;
419
  color: #ffffff;
420
  }
421
+
422
+ .yikes-easy-mc-postbox h3.error {
423
+ background: #dc3232;
424
+ font-weight: 700;
425
+ }
426
  .yikes-easy-mc-postbox h3.bg-transparent {
427
  color: #333;
428
  font-weight: 400;
admin/css/yikes-inc-easy-mailchimp-extender-admin.min.css CHANGED
@@ -1 +1 @@
1
- .yikes-easy-mc-hidden{display:none}.shortcode-input-field{color:#333;background:rgba(216,216,216,.35)!important}.edit-form-field-container-span{display:block;margin:.5em 0}.no-forms-widget{margin:2em 0}.view-ad-link{display:block;margin:0 auto}.no-forms-found-icon{font-size:14px;line-height:1.4;width:14px;color:#e07d7d}.coming-soon-button{position:absolute}.coming-soon-button .dashicons{font-size:14px;line-height:1.8}.add-ons-about-text{margin-top:0}#add-ons{margin:3em 0}.addon-image{display:block;text-align:center}.no-mailchimp-lists-found{padding:25px 0 25px 25px}.add-new-subscriber-button{display:block;margin-top:2em}.add-new-subscriber-form-container{display:none;padding-top:1em}.add-new-subscriber-form-container h4{margin-top:0}#migration-buttons{display:inline-block;margin-bottom:.5em}#migration-buttons form:first-child{margin-right:10px}#migration-buttons form{float:left}#yikes_easy_mc_list_stats_widget h3 span{background:url( '../../includes/images/Mailchimp_Assets/Freddie_original.png' ) no-repeat scroll 8px 4px/25px auto;background-size:25px;display:block;height:30px;padding-left:3em;padding-top:5px}#yikes_easy_mc_list_stats_widget h3{padding:0;line-height:1.6em}#yikes-easy-mc-dashboard-widget-stats h3{text-align:center}#yikes_easy_mc_list_stats_widget .inside{padding:0}.yikes-easy-mc-stats-table{margin-top:1em}.yikes-easy-mc-stats-table,.yikes-easy-mc-stats-table .yikes-easy-mc-table-stats-tr,.yikes-easy-mc-stats-table tbody{display:block;width:100%}.yikes-easy-mc-table-stats-tr td{display:inline-block;width:48%;text-align:center}.yikes-easy-mc-table-stats-tr td:hover{cursor:pointer}.yikes-easy-mc-table-stats-tr td:first-of-type{border-right:1px solid #ececec}.yikes-easy-mc-stats-table .yikes-easy-mc-table-stats-tr-first{border-bottom:1px solid #ececec;border-top:1px solid #ececec}#yikes-easy-mc-widget-stat-holder{margin-top:1em}.yikes-easy-mc-stats-table p.yikes-easy-mc-dashboard-stat{color:#00a0d2;font-weight:800;font-size:20px;margin-bottom:2px;margin-top:15px;line-height:1.2;max-height:80px}.yikes-easy-mc-stats-table p.yikes-easy-mc-stat-list-label{font-size:13px;margin-top:0;margin-bottom:15px;font-family:"Open Sans"}#pre-defined-tag-interior-container{background:url(../../includes/images/tinyMCE/yikes-mailchimp-combo-faded.png) bottom right no-repeat #fff;background-size:40%}.qtip-default{background-color:transparent!important;border:transparent!important;z-index:9999999!important}.qtip-bootstrap{padding:10px!important;z-index:9999999!important;font-size:12px}.search-interest-group-preloader{display:block;margin:8px 0 0 55px;width:12px}.no-interest-groupings-enabled-message{display:block;margin-top:12px!important;width:100%}.tooltip-integration-banner{max-width:100%;margin:0 0 .25em 0}.tooltiptext.qtip-bootstrap{font-size:12px}.tooltip-title{margin:0}.dashicons-editor-help:hover{cursor:pointer}body.easy-forms_page_yikes-inc-easy-mailchimp-settings .interest-group-section{display:block;width:100%;margin:0 0 1.5em 0}body.easy-forms_page_yikes-inc-easy-mailchimp-settings .interest-group-section .interest-group-section-title{display:block;width:100%;margin:.5em 0 0}body.easy-forms_page_yikes-inc-easy-mailchimp-settings .interest-group-section input{margin-right:0}body.easy-forms_page_yikes-inc-easy-mailchimp-settings .interest-group-section label{margin-right:10px}i.mce-ico.mce-i-yks_mc_tinymce_button_key{background:url( '../../includes/images/tinyMCE/Freddie_wink.png');background-size:18px;background-position-y:1px;background-repeat:no-repeat}#yikes_mailchimp_tinyMCE_modal-title{padding-left:42px;background:transparent url(../../includes/images/Mailchimp_Assets/Freddie_original.png);background-repeat:no-repeat;background-size:25px;background-position:left;background-position-x:10px}#yikes_mailchimp_tinyMCE_modal .mce-foot{border-top:none!important}#yikes_mailchimp_tinyMCE_modal{background:#fff url(../../includes/images/tinyMCE/yikes-mailchimp-combo-faded.png);background-position:bottom left;background-size:40%;background-position-x:10px;background-position-y:95%;background-repeat:no-repeat}#yikes_mailchimp_tinyMCE_modal .mce-foot{background:0 0}[id*="_yikes_easy_mc_widget"]>div.widget-top>div.widget-title>h4{background:#fafafa url(../../includes/images/Mailchimp_Assets/Freddie_original.png) no-repeat scroll 2% 50%/25px auto;padding-left:40px}#review-yikes-easy-mailchimp-notice #yikes-mailchimp-logo{background:url(../../includes/images/Mailchimp_Assets/yikes-mailchimp-welcome-logo.png) no-repeat;background-size:60px;float:left;font-size:14px;height:80px;text-align:center;width:80px}.need-support-icon{line-height:1.5}ul.support-option-list{display:inline-block;width:100%}.support-option{float:left}.support-option-second{margin-left:10px}#yikes-mailchimp-logo.support-page{float:left;width:80pt}#yikes-mailchimp-logo{height:132px;width:132px;font-size:14px;text-align:center;background:url(../../includes/images/Mailchimp_Assets/yikes-mailchimp-welcome-logo.png) no-repeat}.yikes-easy-mc-feature-image.yikes-easy-mc-feature-v3-image{border:0;margin-left:100px!important;margin-right:100px;max-height:340px;width:auto}body.admin_page_yikes-mailchimp-edit-form div.show-some-love-container img,div.show-some-love-container img.customizer-upsell-banner{max-width:100%}body.admin_page_yikes-mailchimp-edit-form div.show-some-love-container p:first-child{font-style:italic}body.admin_page_yikes-mailchimp-edit-form div.show-some-love-container hr{margin:1em 0}body.admin_page_yikes-mailchimp-welcome .nav-tab-wrapper .nav-tab .dashicons{font-size:17px;line-height:1.5}#review-yikes-easy-mailchimp-notice .button-container{display:block;width:100%;margin:.75em 0 1.5em 0}#review-yikes-easy-mailchimp-notice .button-container .dashicons{font-size:14px;line-height:1.9;margin-left:-4px}#review-yikes-easy-mailchimp-notice .button-container .dashicons-star-filled{color:#e6b800}#review-yikes-easy-mailchimp-notice .button-container .dashicons-upload{color:#6e8841}#review-yikes-easy-mailchimp-notice .button-container .dashicons-no-alt{color:#dc3a3a;line-height:2}body.easy-mailchimp_page_yikes-inc-easy-mailchimp-settings .dashicons-no-alt{color:#dc3a3a}#review-yikes-easy-mailchimp-notice .button-container a{margin-right:10px}#review-yikes-easy-mailchimp-notice{border-left:4px solid #00a0d2;background:#fefefe;padding:1px 12px;padding-top:10px;box-shadow:0 1px 1px 0 rgba(0,0,0,.1);-webkit-box-shadow:0 1px 1px 0 rgba(0,0,0,.1);margin:15px 25px 20px 5px}input.readonly,input[readonly],textarea.readonly,textarea[readonly]{background:#d8d8d8}.dashicons.yikes-love{color:pink}.field-description-input{resize:vertical;max-height:100px}.yikes-easy-mc-postbox h3{background:#00a0d2;font-weight:800;color:#fff}.yikes-easy-mc-postbox h3.bg-transparent{color:#333;font-weight:400;background:0 0}.yikes-mc-warning-message{padding-left:15px;margin-top:0;padding-top:10px;color:#da6e6e}.error-message-container label[for=yikes-easy-mc-general-error-message],.error-message-container label[for=yikes-easy-mc-success-message],.error-message-container label[for=yikes-easy-mc-success-single-optin-message],.error-message-container label[for=yikes-easy-mc-update-email-failure],.error-message-container label[for=yikes-easy-mc-update-email-successful],.error-message-container label[for=yikes-easy-mc-user-email-body],.error-message-container label[for=yikes-easy-mc-user-email-subject],.error-message-container label[for=yikes-easy-mc-user-resubscribed-success-message],.error-message-container label[for=yikes-easy-mc-user-subscribed-message],.error-message-container label[for=yikes-easy-mc-user-subscribed-update-link]{padding:.5em 1em;background:rgba(241,241,241,.75);box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;margin:0}body.admin_page_yikes-mailchimp-edit-form #error-container{padding:2px 1em;background:rgba(241,241,241,.75);box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;margin:0;color:#f56060}.error-message-container label:last-child{padding-bottom:1em;margin-bottom:.5em}.error-message-container label,.form-settings-container label{display:block;margin:1em 0}.yikes-easy-forms-sidebar .yikes-mc-settings-expansion-section{padding:.5em .75em;-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.yikes-mc-settings-expansion-section{display:none;background:rgba(241,241,241,.75)}.yikes-mc-settings-expansion-section .form-table td{padding:10px 10px;vertical-align:top}.yikes-mc-settings-expansion-section .form-table td p.description{line-height:1}.expansion-section-title{background:#fff}.expansion-section-title.settings-sidebar,.form-builder-section-title{text-decoration:none;display:block;border:1px solid rgba(177,177,177,.71);color:#333;padding:5px;margin:.5em 0 0 0}.expansion-section-title.settings-sidebar .dashicons,.form-builder-section-title .dashicons{content:"\f132";font-family:dashicons;font-size:15px;line-height:1.5}span.easy-mailchimp-add-on-valid-license-container{color:#44ba44;display:block;margin-top:1em}.easy-mailchimp-add-on-invalid-license-container{color:rgba(227,107,107,.86);display:block;margin-top:1em}.options-sidebar .yikes-easy-mc-postbox{overflow:visible}.options-sidebar .inside{padding:0 20px 12px}.yikes-easy-mc-about-text{margin-top:0}.add-on-settings-divider{margin:1em 0!important}#yks-mailchimp-double-optin-message,#yks-mailchimp-single-optin-message,.settings-page-input{width:50%}#yks-mailchimp-double-optin-message,#yks-mailchimp-single-optin-message{min-height:75px;max-height:200px;resize:vertical}#addon-settings-nav li a,#settings-nav li a{color:#333;text-decoration:none!important;transition:color .15s ease-out;-moz-transition:color .15s ease-out;-webkit-transition:color .15s ease-out;-o-transition:color .15s ease-out}#addon-settings-nav li a:hover,#settings-nav li a:hover{color:#00a0d2!important}#addon-settings-nav{margin-bottom:0;margin-top:5px}.option-menu-selected-arrow{width:0;height:0;border-top:10px solid transparent;border-bottom:10px solid transparent;border-left:10px solid #a0a5aa;position:absolute;left:-.1em}.option-menu-selected-arrow+a{color:#00a0d2!important}label[for=yikes-mailchimp-debug-status]{display:inline-block;margin-bottom:1em;line-height:2.25}#yikes-mailchimp-debug-status{float:left;margin-top:.5em}label[for=yikes-mc-recaptcha-api-key],label[for=yikes-mc-recaptcha-setting]{display:block;margin-bottom:1em}input.recaptcha-setting-checkbox{display:inline-block;margin-top:.5em;vertical-align:bottom}.recaptcha-preview-link{display:block;margin-top:.5em}.recaptcha-preview-container{display:block;width:100%;display:none;margin:1em 0}.wrap #col-left,.wrap #col-right{width:49%}@media (max-width:800px){.wrap #col-left,.wrap #col-right{width:100%}}.support-page-logo{width:100%;opacity:.7;max-width:100%;display:block}.support-page-button{display:block;width:100%;min-height:40px;font-weight:700;text-align:center;line-height:3!important;margin-top:1em!important}.support-page-wordpress-font{font-size:1.3em;margin-right:13px}h2.premium-support-title{margin:1em 0 .5em 0}#premium-support-form{display:block;width:100%}#premium-support-form input[type=email],#premium-support-form input[type=submit],#premium-support-form input[type=text],#premium-support-form select{display:block;width:100%;min-width:200px;margin:.5em 0}#premium-support-form label{font-weight:800}#premium-support-form label input,#premium-support-form label select{font-weight:500}#premium-support-form p{font-weight:300;display:block;margin-bottom:1em}#wp-support-content-wrap{min-height:150px;width:100%}.support-form-hidden{display:none!important}#yikes-mailchimp-error-log .row-title{font-weight:400}.create-error-log-help:hover{cursor:pointer}.error-log-tr td{display:table;margin-bottom:1em;margin-top:.5em}p.error-log-missing-file em,p.to-start-logging-errors-notice em{margin:10px 0}.export-custom-forms-list{display:none;margin:1em 0 2em 0}.export-custom-forms-list p{margin-top:0}.list-rating-star{color:#e6b800}#import-list-to-site{margin-top:10px}#import-list-to-site .input-field{display:block;width:100%;margin-top:5px;margin-bottom:5px}#import-list-to-site .form-description{resize:vertical;max-height:65px}#import-list-to-site .description{margin-top:5px}input.clear-mailchimp-api-cache{float:right;margin-top:-33px!important}.yikes-list-refreshed-notice{border-left:4px solid #46b450;margin:5px 0}.yikes-list-refreshed-notice p{margin:1em 0 .5em 0;padding:6px 12px;background:rgba(241,241,241,.5);font-size:13px;line-height:1.5}.star-container{margin-top:5px;margin-bottom:1.5em}.star-container a{text-decoration:none}.star-container .dashicons-star-filled{font-size:1.75em}.sidebar-container{margin-top:5px;margin-bottom:1.5em}.sidebar-footer-text{margin:15px 0!important;text-align:center}.sidebar-twitter-icon{text-decoration:none;color:#55acee}.field-doesnt-exist-notice{position:absolute;margin-left:5px;width:18px}.field-type-text{display:inline-block;float:right;margin-right:.1em}.type-container{margin-top:0;margin:0}.form-field-container{margin-top:0;margin-bottom:0}.field-no-longer-exists-warning{position:absolute;margin-left:5px;width:18px}.form-field-container tr.yikes-checkbox-container input[type=checkbox]{float:left;margin-right:5px;margin-top:2px}.form-field-container tr.yikes-checkbox-container-first td{padding-top:12px!important}.form-field-container td input[type=checkbox]:first-child,.form-field-container td input[type=radio]:first-child{margin-left:0!important}.merge-tag-text{background:0 0;box-shadow:none;border:none}.pre-defined-tag-link{display:block;font-size:11px;margin-top:-2px}.toggle-container{font-size:small;float:right}#pre-defined-tag-container{display:none}#pre-defined-tag-container h3{margin-bottom:0}#pre-defined-tag-container .tooltop-tag .dashicons-editor-help{font-size:13px;line-height:1.5}.no-fields-assigned-notice{margin:4em 0 2.25em 0;padding-bottom:6em;width:100%;text-align:center;background:url( '../../includes/images/no-form-fields-assigned-arrow.jpg' ) no-repeat;background-position:bottom center;background-size:105px}.yikes-easy-mc-widget-preloader{position:absolute;left:48%;margin-top:-96px}.yikes-dashboard-widget-section{padding:0 12px 12px}.select-list-title{padding-left:0}.yikes-dashboard-widget-section .description{margin:.5em 0 0 0}. error-descripion{padding-top:.5em}.yikes-mc-freddie-logo{float:left;margin-right:10px}.mv_ig_list{width:100%;margin-bottom:8px!important;border:none!important;background:0 0!important}.mv_ig_list .list-container{position:absolute}.mv_ig_list a{width:40%;padding:5px 0!important;text-align:center;margin:0;float:left}.mv_ig_list a:first-child{width:32%}.mv_ig_list a:last-child{width:25%}.mv_ig_list{margin-bottom:.5em}.mv_ig_list .nav-tab{border:1px solid #ccc}.mv_ig_list .nav-tab-active{color:#fff;font-weight:700;background:#00a0d2}.mv_ig_list .arrow-down{position:absolute;margin-top:21px;width:0;height:0;border-left:12px solid transparent;border-right:12px solid transparent;border-top:12px solid #00a0d2}#nav-tab-merge-variables .arrow-down{left:16%}#nav-tab-interest-groups .arrow-down{left:49%}#nav-tab-tags .arrow-down{left:79%}#container-container{display:inline-block;width:1000px}#container-container .list-container{width:254px;position:relative;display:inline-block;margin-left:2em;vertical-align:top}#container-container .list-container:first-child{margin-left:0}#yikes_easy_mc_toolbar{margin-top:-.75em}#yikes_easy_mc_toolbar_links{display:inline-block;width:100%;margin:0;padding:10px 0}#yikes_easy_mc_toolbar_links li{float:left;margin:0 .5em}#yikes_easy_mc_toolbar_links li a{text-decoration:none;display:inline-block}#yikes_easy_mc_toolbar_links li a:focus{box-shadow:none}#yikes_easy_mc_toolbar_links li a.selected_hidden_setting{color:#333;margin-bottom:3px}#yikes_easy_mc_toolbar_links li .selected_setting_triangle{width:0;height:0;border-left:13px solid transparent;border-right:13px solid transparent;border-top:13px solid rgba(206,206,206,1);margin:0 auto}#yikes_easy_mc_toolbar_links li a.form-builder:before{content:"\f116";font-family:dashicons}#yikes_easy_mc_toolbar_links li a.form-customizer:before{content:"\f100";font-family:dashicons}#yikes_easy_mc_toolbar_links li a.error-messages:before{content:"\f117";font-family:dashicons}#yikes_easy_mc_toolbar_links li a.form-settings:before{content:"\f111";font-family:dashicons}.integreation-checkbox-interest-groups-header{display:inline}.integration-checkbox-interest-groups-hr{margin-top:10px;margin-bottom:10px}#checkbox-settings-form .dashicons-editor-help{font-size:15px;line-height:1.6}.checkbox-settings-list-dropdown{display:block;width:250px}.no-lists-setup-notice{padding:.5em 0 .5em 0}.optin-checkbox-label-input{display:block;width:250px}.integration-checkbox-interest-groups{margin-bottom:10px}.integration-checkbox-interest-groups p,.integration-checkbox-interest-groups section{padding-left:25px}.yikes-mailchimp-checkbox-integration-list{color:#006799;display:inline-block;font-weight:600;margin-bottom:5px;padding:0 16px 8px 2px;vertical-align:top}.yikes-mailchimp-checkbox-integration-item{font-size:14px;font-weight:600;margin-bottom:10px}.yikes-mailchimp-checkbox-integration-list input[type=checkbox]{margin-right:0}label.optin-checkbox-label{display:block;margin:4px 0}label.optin-checkbox-label input.optin-checkbox-label-input,label.optin-checkbox-label select{display:inline-block}label.optin-checkbox-label select{margin-left:17px;width:auto}.yikes-form-id-number{width:55px}span[title="Conversion Rate"]:hover,span[title=Impressions]:hover,span[title=Submissions]:hover{display:block;cursor:pointer}.form-id-container{padding:1px 8px;border-radius:5px;background:#49a9ec;font-weight:700;color:#fff}.manage-form-admin-notice{margin-top:1.75em!important}.remove-notification,.yikes-mc-settings-expansion-section a.remove-field,a.yikes-delete-mailchimp-form,a.yikes-delete-subscriber{color:#d96060!important}.yikes-delete-mailchimp-form{margin-top:6px}#postbox-container-1 .yikes-delete-mailchimp-form{float:right}.form-buttons-container{display:block;padding:11px 10px}.forms-buttons-container input[type=submit]{margin:0 0 .5em 0}.update-form-spinner{position:absolute;left:0;right:0;margin:0 auto;bottom:13px}.yikes-mc-shortcode-input{text-align:center;width:100%;color:#333}.hidden-class{display:none!important}.stat-container{width:10%;max-width:75px}.no-current-subscriber-notice em,.no-mailchimp-forms-found em{padding:25px 0 25px 25px}.column-columnname span.stats{display:block;width:100%;text-align:center}.column-columnname span.stats span{display:inline-block;width:20%}.column-columnname span.stats span:hover{cursor:pointer}#available-fields li,#available-interest-groups li,#available-tags li{text-decoration:none;display:block;border:1px solid rgba(177,177,177,.71);color:#333;padding:5px;margin:.5em 0}#available-fields li.not-available,#available-interest-groups li.not-available,#available-tags li.not-available{opacity:.6!important}#available-fields li.add-to-form,#available-interest-groups li.add-to-form,#available-tags li.add-to-form{background:rgba(46,162,204,.25)}.add-field-to-editor .add-to-form-builder-arrow,.button-secondary .add-to-form-builder-arrow{width:15px;font-size:15px;line-height:1.8}.tags-title-text{margin-left:1em;position:absolute;top:60px}.tags-title-container{margin-right:2em;margin-left:4em}.tags-title{padding-top:1em;padding-bottom:.75em;cursor:default;font-weight:500}.tags-title-container>span.mailchimp-tag{font-size:.875em;margin-right:1em;padding:.25em .4em 0;border:2px solid #00a0d2;border-radius:10px;cursor:default;vertical-align:middle;display:inline-block;margin-top:1em}.tags-title-container span.dashicons{line-height:.8;font-size:1.5em;padding-bottom:0;cursor:pointer;margin-bottom:-4px}.tags-title-container .tag-divider{border:1px solid #00a0d2;padding-bottom:2px;margin-left:3px}.clear-form-fields{background:#e14d43;border-color:#d02c21;color:#fff;box-shadow:inset 0 1px 0 #ec8b85,0 1px 0 rgba(0,0,0,.15);text-decoration:none;display:inline-block;height:28px;padding:0 10px 1px;border-width:1px;-webkit-appearance:none;border-radius:3px;white-space:nowrap;font-size:13px;line-height:26px;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;float:right;margin:0 11px 10px 0}.clear-form-fields:active,.clear-form-fields:focus,.clear-form-fields:hover{background:#dd382d;border-color:#ba281e;color:#fff;box-shadow:inset 0 1px 0 #e8776f}.yikes-mc-view-list-breadcrumbs{padding:.8em;border:1px solid #d8d8d8;background:#ececec;margin:1.5em 0 .8em 0}.yikes-mc-member-rating-star{color:#daa520}#yikes-mc-subscriber-card-wrapper{background:#fefefe;min-height:200px;display:inline-block;box-shadow:0 1px 1px rgba(0,0,0,.04);webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);border:1px solid #e5e5e5;padding:15px 20px;width:500px;float:left}#yikes-mc-subscriber-card-wrapper .subscriber-optin-ip{display:inline-block;margin:1em 0 0 0;font-style:italic}.view-user-data-wrap #customer-tab-wrapper-list{float:left;background:#fefefe;margin-top:0;padding:12px;margin-left:-1px;border-right:1px solid #e5e5e5;border-top:1px solid #e5e5e5;border-bottom:1px solid #e5e5e5}.view-user-data-wrap #customer-tab-wrapper-list .dashicons{font-size:23px;height:23px;width:23px;margin:3px 0}.view-user-data-wrap #customer-tab-wrapper-list li.inactive{color:rgba(51,51,51,.31);transition:color ease-out .1s}.view-user-data-wrap #customer-tab-wrapper-list li.active,.view-user-data-wrap #customer-tab-wrapper-list li.inactive:hover{color:rgba(51,51,51,1)}#yikes-mc-subscriber-card-wrapper .yikes-mc-card-top .member-star-rating-container,#yikes-mc-subscriber-card-wrapper .yikes-mc-card-top h2,#yikes-mc-subscriber-card-wrapper .yikes-mc-card-top img{float:left}#yikes-mc-subscriber-card-wrapper #delete-mailchimp-subscriber{display:block;margin:0 auto}#yikes-mc-subscriber-card-wrapper .yikes-mc-card-top img{border-radius:3px}#yikes-mc-subscriber-card-wrapper .merge-variable-section li{display:inline-block;list-style:none;float:left;width:50%;min-height:65px;border-bottom:1px dotted #ddd}#yikes-mc-subscriber-card-wrapper .merge-variable-section li p{margin:0 0 1em 0}#yikes-mc-subscriber-card-wrapper .yikes-mc-card-top h2{max-width:370px;width:75%;padding:0}#yikes-mc-subscriber-card-wrapper .member-star-rating-container{display:block;margin:.5em 0;margin-left:10px}#yikes-mc-subscriber-card-wrapper h2{margin-left:10px;margin-top:0;padding-top:0}#yikes-mc-subscriber-card-wrapper .yikes-mc-card-top{display:inline-block;width:100%}#yikes-mc-subscriber-card-wrapper .yikes-mc-card-body{display:inline-block;width:100%}#yikes-mc-subscriber-card-wrapper .yikes-mc-card-body h4{margin-top:0;margin-left:5px}.yikes-mc-subscriber-hr{margin:1.5em 0}.member-subscription-date{display:block;width:70%;max-width:370px;margin:.5em 0;margin-left:10px;float:left}.member-location-data{display:block;width:70%;max-width:370px;margin:.25em 0;margin-left:10px;float:left}.addon-required-link{color:#333;opacity:.5}.view-list-sidebar-input{color:#333}.interest-group-ul,.merge-variable-ul,.segment-ul{padding-left:15px;font-size:14px}.interest-group-ul li .dashicons,.merge-variable-ul li .dashicons{line-height:1.8;font-size:9px}a.button-primary.edit-fields-button{margin:0 0 10px 15px}.interest-group-count,.merge-variable-count,.segment-group-count{text-decoration:underline;margin-bottom:.75em;padding-left:7px}.interest-group-title{padding-left:5px}.edit-segments-button{margin:0 0 10px 15px}.edit-segment-description{padding:0 0 10px 15px}.list-page-mailchimp-logo{width:100%;display:block;margin:0 auto}.list-page-sidebar h2.account-status{text-align:center}.mailchimp-avatar{display:block;margin:0 auto;box-shadow:3px 3px 10px 0 rgba(214,214,214,.75)}.yikes-easy-mailchimp-custom-content-icon{font-size:15px;line-height:1}.custom-field-section{display:block;margin:1em 0}#associated-list{width:100%;margin-top:5px}#redirect-user-to-selection{width:100%}#edit-yikes-mc-form label h3{margin-left:0;padding-left:0}#available-fields .field-required{color:#d96060!important}body.admin_page_yikes-mailchimp-edit-form #poststuff h2{padding:8px 12px;margin-top:0}.edit-form-form-description{width:100%;resize:vertical;min-height:65px;max-height:100px}.edit-form-title{padding-left:12px!important}#edit-form-description{padding:0 12px;margin:1em 0}.yikes-easy-mc-postbox{overflow:hidden}.no-interest-groups-found-message{opacity:.35}#interest-groups-container .description,#merge-variables-container .description{padding-top:.5em}.inside-section-1{margin-top:0;margin-bottom:1.5em}.inside-section-2{margin-top:0;margin-bottom:2em}.form-field-container-span{display:block;margin:.5em 0}#style-list ul li{display:block;width:100%;margin:1em 0}.form-style-adjustment,.wp-picker-container{display:block!important;width:100%;margin:.5em 0}.dynamic-email-tag{display:inline-block;margin-right:5px}.dynamic-tag-description td{padding-top:0}#create-new-notification-button{margin-top:1em}.file-container{display:none}.yikes-mailchimp-file-field input[name*="custom-field[incentive-attachment]"]{margin-bottom:.5em}.yikes-mailchimp-file-field input[name*="custom-field[incentive-attachment]"]+.button-secondary{margin-left:4px}input#upload-btn[data-attr-position="1"]{margin-left:0}.remove-file-button{background:url(../partials/helpers/fields/img/icon-delete.png);height:16px;position:absolute;text-indent:-99999px;width:16px}a.add-new-incentive-attachment{display:block;width:40px;margin-right:100%!important;margin-top:.5em!important}a.add-new-incentive-attachment .dashicons{font-size:15px;line-height:1.8}.form-builder-placeholder{background:rgba(206,206,206,.2);height:30px}.admin_page_yikes-mailchimp-edit-form #form-settings .section-title{font-size:1em;border-bottom:1px solid rgba(187,187,187,.29);display:block;width:100%;padding-bottom:6px;margin-bottom:.5em;margin-top:1.5em}.admin_page_yikes-mailchimp-edit-form #form-settings .section-title.first{margin-top:0}.admin_page_yikes-mailchimp-edit-form #form-settings .section-interior{display:inline-block;width:100%;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;background:rgba(241,241,241,.75);padding:1em}.admin_page_yikes-mailchimp-edit-form #form-settings .section-interior label{margin-top:0}label.login-restriction-center{display:block;width:100%}.admin_page_yikes-mailchimp-edit-form #form-settings .section-interior .date-restriction-section{display:inline-block}.admin_page_yikes-mailchimp-edit-form #form-settings .section-interior .date-restriction-section p.description.error{color:#f56060}.admin_page_yikes-mailchimp-edit-form #form-settings .section-interior .date-restriction-section label{float:left;margin-right:.5em;margin-top:0;margin-bottom:0;display:inline-block}.admin_page_yikes-mailchimp-edit-form #form-settings .section-interior .nested-child .yikes-easy-mc-form-restriction-expired-message,.admin_page_yikes-mailchimp-edit-form #form-settings .section-interior .nested-child .yikes-easy-mc-form-restriction-login-message,.admin_page_yikes-mailchimp-edit-form #form-settings .section-interior .nested-child .yikes-easy-mc-form-restriction-pending-message{display:block;width:100%;min-height:50px}.admin_page_yikes-mailchimp-edit-form #form-settings .section-interior .nested-child{float:left;padding-left:2%;width:98%;border-left:1px dashed #bdbdbd;border-spacing:2px;margin:.5em 0 1em 0}.admin_page_yikes-mailchimp-edit-form #form-settings .section-interior .nested-child .yikes-easy-mc-submit-button-text{margin:0}.admin_page_yikes-mailchimp-edit-form #form-settings .section-interior .date-restriction-section{margin-bottom:0}.admin_page_yikes-mailchimp-edit-form #form-settings .section-interior .date-restriction-section.last{margin-bottom:.75em}.admin_page_yikes-mailchimp-edit-form #form-settings .section-interior .nested-child.hidden{display:none}.admin_page_yikes-mailchimp-edit-form #form-settings .section-interior .description+label{margin-top:1em;float:left;width:100%}.admin_page_yikes-mailchimp-edit-form #form-settings .section-interior label.inline-form-label{margin-bottom:0;margin-top:0}.admin_page_yikes-mailchimp-edit-form #form-settings .section-interior .description{display:block;width:100%;float:left}.admin_page_yikes-mailchimp-edit-form #form-settings .nested-child strong:first-child,.admin_page_yikes-mailchimp-edit-form #form-settings .section-interior strong:first-child{display:block;width:100%}.admin_page_yikes-mailchimp-edit-form #form-settings .inline-form-label{float:left;margin-right:10px}body.admin_page_yikes-mailchimp-edit-form .ui-timepicker-wrapper{overflow-y:auto;height:150px;width:170px;background:#fff;border:1px solid #ddd;box-shadow:0 5px 10px rgba(0,0,0,.2);outline:0;z-index:10001;margin:0}body.admin_page_yikes-mailchimp-edit-form .ui-timepicker-wrapper.ui-timepicker-with-duration{width:13em}body.admin_page_yikes-mailchimp-edit-form .ui-timepicker-wrapper.ui-timepicker-with-duration.ui-timepicker-step-30,body.admin_page_yikes-mailchimp-edit-form .ui-timepicker-wrapper.ui-timepicker-with-duration.ui-timepicker-step-60{width:11em}body.admin_page_yikes-mailchimp-edit-form .ui-timepicker-list{margin:0;padding:0;list-style:none}body.admin_page_yikes-mailchimp-edit-form .ui-timepicker-duration{margin-left:5px;color:#888}body.admin_page_yikes-mailchimp-edit-form .ui-timepicker-list:hover .ui-timepicker-duration{color:#888}body.admin_page_yikes-mailchimp-edit-form .ui-timepicker-list li{padding:3px 0 3px 5px;cursor:pointer;white-space:nowrap;color:#000;list-style:none;margin:0}body.admin_page_yikes-mailchimp-edit-form .ui-timepicker-list:hover .ui-timepicker-selected{background:#fff;color:#000}body.admin_page_yikes-mailchimp-edit-form .ui-timepicker-list .ui-timepicker-selected:hover,body.admin_page_yikes-mailchimp-edit-form .ui-timepicker-list li:hover,body.admin_page_yikes-mailchimp-edit-form li.ui-timepicker-selected{background:#1980ec;color:#fff}body.admin_page_yikes-mailchimp-edit-form .ui-timepicker-list li:hover .ui-timepicker-duration,body.admin_page_yikes-mailchimp-edit-form li.ui-timepicker-selected .ui-timepicker-duration{color:#ccc}body.admin_page_yikes-mailchimp-edit-form .ui-timepicker-list li.ui-timepicker-disabled,body.admin_page_yikes-mailchimp-edit-form .ui-timepicker-list li.ui-timepicker-disabled:hover,body.admin_page_yikes-mailchimp-edit-form .ui-timepicker-list li.ui-timepicker-selected.ui-timepicker-disabled{color:#888;cursor:default}body.admin_page_yikes-mailchimp-edit-form .ui-timepicker-list li.ui-timepicker-disabled:hover,body.admin_page_yikes-mailchimp-edit-form .ui-timepicker-list li.ui-timepicker-selected.ui-timepicker-disabled{background:#f2f2f2}body.admin_page_yikes-mailchimp-edit-form .ui-datepicker{background-color:#fff;border:1px solid #66afe9;border-radius:4px;box-shadow:0 0 8px rgba(102,175,233,.6);display:none;margin-top:4px;padding:10px;width:240px}body.admin_page_yikes-mailchimp-edit-form .ui-datepicker a,body.admin_page_yikes-mailchimp-edit-form .ui-datepicker a:hover{text-decoration:none}body.admin_page_yikes-mailchimp-edit-form .ui-datepicker a:hover,body.admin_page_yikes-mailchimp-edit-form .ui-datepicker td:hover a{color:#2a6496;transition:color .1s ease-in-out}body.admin_page_yikes-mailchimp-edit-form .ui-datepicker .ui-datepicker-header{margin-bottom:4px;text-align:center}body.admin_page_yikes-mailchimp-edit-form .ui-datepicker .ui-datepicker-title{font-weight:700}body.admin_page_yikes-mailchimp-edit-form .ui-datepicker .ui-datepicker-next,body.admin_page_yikes-mailchimp-edit-form .ui-datepicker .ui-datepicker-prev{cursor:default;font-family:'Glyphicons Halflings';-webkit-font-smoothing:antialiased;font-style:normal;font-weight:400;height:20px;line-height:1;margin-top:2px;width:30px}body.admin_page_yikes-mailchimp-edit-form .ui-datepicker .ui-datepicker-prev{float:left;text-align:left}body.admin_page_yikes-mailchimp-edit-form .ui-datepicker .ui-datepicker-next{float:right;text-align:right}body.admin_page_yikes-mailchimp-edit-form .ui-datepicker .ui-datepicker-prev:before{content:"\f141";font-family:dashicons}body.admin_page_yikes-mailchimp-edit-form .ui-datepicker .ui-datepicker-next:before{content:"\f139";font-family:dashicons}body.admin_page_yikes-mailchimp-edit-form .ui-datepicker-next:hover,body.admin_page_yikes-mailchimp-edit-form .ui-datepicker-prev:hover{cursor:pointer!important}body.admin_page_yikes-mailchimp-edit-form .ui-datepicker-close{display:none}body.admin_page_yikes-mailchimp-edit-form .ui-datepicker-current{color:#555!important;border-color:#ccc!important;background:#f7f7f7!important;box-shadow:0 1px 0 #ccc!important;vertical-align:top!important;display:inline-block;text-decoration:none;font-size:13px;line-height:26px;height:28px;padding:0 10px 1px;cursor:pointer;border-width:1px;border-style:solid;-webkit-appearance:none;border-radius:3px;white-space:nowrap;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;margin-top:10px}body.admin_page_yikes-mailchimp-edit-form .ui-datepicker .ui-icon{display:none}body.admin_page_yikes-mailchimp-edit-form .ui-datepicker .ui-datepicker-calendar{table-layout:fixed;width:100%}body.admin_page_yikes-mailchimp-edit-form .ui-datepicker .ui-datepicker-calendar td,body.admin_page_yikes-mailchimp-edit-form .ui-datepicker .ui-datepicker-calendar th{text-align:center;padding:4px 0}body.admin_page_yikes-mailchimp-edit-form .ui-datepicker .ui-datepicker-calendar td{border-radius:4px;transition:background-color .1s ease-in-out,color .1s ease-in-out}body.admin_page_yikes-mailchimp-edit-form .ui-datepicker .ui-datepicker-calendar td:hover{background-color:#ebebeb;cursor:pointer}body.admin_page_yikes-mailchimp-edit-form .ui-datepicker .ui-datepicker-calendar td a{text-decoration:none}body.admin_page_yikes-mailchimp-edit-form .ui-datepicker .ui-datepicker-today{background-color:rgba(66,137,204,.65)}body.admin_page_yikes-mailchimp-edit-form .ui-datepicker .ui-datepicker-today a{color:#fff}body.admin_page_yikes-mailchimp-edit-form .ui-datepicker .ui-datepicker-current-day{background-color:#4289cc}body.admin_page_yikes-mailchimp-edit-form .ui-datepicker .ui-datepicker-current-day a{color:#fff}body.admin_page_yikes-mailchimp-edit-form .ui-datepicker .ui-datepicker-calendar .ui-datepicker-unselectable:hover{background-color:#fff;cursor:default}.custom-radio-holder{display:inline-block;width:100%;margin:.5em 0}.custom-radio-label{display:block;float:left;margin:0 5px}.custom-radio-label:first-child{margin-left:0!important}.custom-radio-label input[type=radio]{margin-right:0!important}.custom-select-field{display:block;width:100%;margin:.5em 0}#available-widgets [class*=yikes_easy] .widget-title:before{content:""!important;background:url(../../includes/images/Mailchimp_Assets/Freddie_original.png) no-repeat #fafafa;background-size:contain}body.wp-customizer #available-widgets [id*="_yikes_easy_mc_widget"]>div.widget-top>div.widget-title>h4{background:0 0!important}#connection-container{float:right;color:#fff;padding:.25em .75em .25em .25em;margin-top:-4px}#connection-container.api-connected{background:#44ba44}#connection-container.api-not-connected{background:#b5b5b5}.yikes-mc-api-connected,.yikes-mc-api-not-connected{line-height:1}.show-some-love-container{transition:max-height .75s}#review-yikes-easy-mc{text-align:center}#review-yikes-easy-mc .dashicons-star-filled{color:#e6b800}.meta-box-sortables hr{margin:1.75em 0 0 0}#about-yikes-inc{display:none}#about-yikes-inc .about-sidebar-yikes-logo{float:left;width:95px;margin:5px 7px 0 0}#about-yikes-inc p{margin-top:0}.yikes-easy-mc-updated{display:block;border-left:4px solid #4eaef0;margin:0 20px 2px 0;margin-top:1em;margin-bottom:1em;padding:2px 10px;background:#fff;background-size:120px;background-position:right bottom;background-repeat:no-repeat;background-position-y:29px}#edit-yikes-mc-form #post-body.columns-2 #postbox-container-1{width:280px}@media screen and (max-width:1200px){.yikes-easy-mc-postbox #post-body.columns-2 #postbox-container-1{float:none}}@media screen and (max-width:850px){.option-menu-selected-arrow{display:none!important}}@media screen and (max-width:782px){#chimp-chatter .chimp-chatter-container{float:none;height:auto;width:100%}}.recaptcha-demo-gif{width:275px}.pro-version-only-notice{color:#d96060}.upgrading-ellipse-one{-moz-opacity:0;-khtml-opacity:0;opacity:0;-webkit-animation:dot 1.3s infinite;-webkit-animation-delay:0ms;animation:dot 1.3s infinite;animation-delay:0ms}.upgrading-ellipse-two{-moz-opacity:0;-khtml-opacity:0;opacity:0;-webkit-animation:dot 1.3s infinite;-webkit-animation-delay:.2s;animation:dot 1.3s infinite;animation-delay:.2s}.upgrading-ellipse-three{-moz-opacity:0;-khtml-opacity:0;opacity:0;-webkit-animation:dot 1.3s infinite;-webkit-animation-delay:.3s;animation:dot 1.3s infinite;animation-delay:.3s}.yikes-mc-edit-field-label-icon{display:inline}.yikes-mc-edit-field-label-input{display:none;width:80%;border-radius:5px}.yikes-mc-save-field-label-edits-icon{display:none}.yikes-mc-edit-field-label-message{display:none;color:#f56060;margin-left:26px}@keyframes dot{0%{opacity:0}50%{opacity:0}100%{opacity:1}}
1
+ .yikes-easy-mc-hidden{display:none}.shortcode-input-field{color:#333;background:rgba(216,216,216,.35)!important}.edit-form-field-container-span{display:block;margin:.5em 0}.no-forms-widget{margin:2em 0}.view-ad-link{display:block;margin:0 auto}.no-forms-found-icon{font-size:14px;line-height:1.4;width:14px;color:#e07d7d}.coming-soon-button{position:absolute}.coming-soon-button .dashicons{font-size:14px;line-height:1.8}.add-ons-about-text{margin-top:0}#add-ons{margin:3em 0}.addon-image{display:block;text-align:center}.no-mailchimp-lists-found{padding:25px 0 25px 25px}.add-new-subscriber-button{display:block;margin-top:2em}.add-new-subscriber-form-container{display:none;padding-top:1em}.add-new-subscriber-form-container h4{margin-top:0}#migration-buttons{display:inline-block;margin-bottom:.5em}#migration-buttons form:first-child{margin-right:10px}#migration-buttons form{float:left}#yikes_easy_mc_list_stats_widget h3 span{background:url( '../../includes/images/Mailchimp_Assets/Freddie_original.png' ) no-repeat scroll 8px 4px/25px auto;background-size:25px;display:block;height:30px;padding-left:3em;padding-top:5px}#yikes_easy_mc_list_stats_widget h3{padding:0;line-height:1.6em}#yikes-easy-mc-dashboard-widget-stats h3{text-align:center}#yikes_easy_mc_list_stats_widget .inside{padding:0}.yikes-easy-mc-stats-table{margin-top:1em}.yikes-easy-mc-stats-table,.yikes-easy-mc-stats-table .yikes-easy-mc-table-stats-tr,.yikes-easy-mc-stats-table tbody{display:block;width:100%}.yikes-easy-mc-table-stats-tr td{display:inline-block;width:48%;text-align:center}.yikes-easy-mc-table-stats-tr td:hover{cursor:pointer}.yikes-easy-mc-table-stats-tr td:first-of-type{border-right:1px solid #ececec}.yikes-easy-mc-stats-table .yikes-easy-mc-table-stats-tr-first{border-bottom:1px solid #ececec;border-top:1px solid #ececec}#yikes-easy-mc-widget-stat-holder{margin-top:1em}.yikes-easy-mc-stats-table p.yikes-easy-mc-dashboard-stat{color:#00a0d2;font-weight:800;font-size:20px;margin-bottom:2px;margin-top:15px;line-height:1.2;max-height:80px}.yikes-easy-mc-stats-table p.yikes-easy-mc-stat-list-label{font-size:13px;margin-top:0;margin-bottom:15px;font-family:"Open Sans"}#pre-defined-tag-interior-container{background:url(../../includes/images/tinyMCE/yikes-mailchimp-combo-faded.png) bottom right no-repeat #fff;background-size:40%}.qtip-default{background-color:transparent!important;border:transparent!important;z-index:9999999!important}.qtip-bootstrap{padding:10px!important;z-index:9999999!important;font-size:12px}.search-interest-group-preloader{display:block;margin:8px 0 0 55px;width:12px}.no-interest-groupings-enabled-message{display:block;margin-top:12px!important;width:100%}.tooltip-integration-banner{max-width:100%;margin:0 0 .25em 0}.tooltiptext.qtip-bootstrap{font-size:12px}.tooltip-title{margin:0}.dashicons-editor-help:hover{cursor:pointer}body.easy-forms_page_yikes-inc-easy-mailchimp-settings .interest-group-section{display:block;width:100%;margin:0 0 1.5em 0}body.easy-forms_page_yikes-inc-easy-mailchimp-settings .interest-group-section .interest-group-section-title{display:block;width:100%;margin:.5em 0 0}body.easy-forms_page_yikes-inc-easy-mailchimp-settings .interest-group-section input{margin-right:0}body.easy-forms_page_yikes-inc-easy-mailchimp-settings .interest-group-section label{margin-right:10px}i.mce-ico.mce-i-yks_mc_tinymce_button_key{background:url( '../../includes/images/tinyMCE/Freddie_wink.png');background-size:18px;background-position-y:1px;background-repeat:no-repeat}#yikes_mailchimp_tinyMCE_modal-title{padding-left:42px;background:transparent url(../../includes/images/Mailchimp_Assets/Freddie_original.png);background-repeat:no-repeat;background-size:25px;background-position:left;background-position-x:10px}#yikes_mailchimp_tinyMCE_modal .mce-foot{border-top:none!important}#yikes_mailchimp_tinyMCE_modal{background:#fff url(../../includes/images/tinyMCE/yikes-mailchimp-combo-faded.png);background-position:bottom left;background-size:40%;background-position-x:10px;background-position-y:95%;background-repeat:no-repeat}#yikes_mailchimp_tinyMCE_modal .mce-foot{background:0 0}[id*="_yikes_easy_mc_widget"]>div.widget-top>div.widget-title>h4{background:#fafafa url(../../includes/images/Mailchimp_Assets/Freddie_original.png) no-repeat scroll 2% 50%/25px auto;padding-left:40px}#review-yikes-easy-mailchimp-notice #yikes-mailchimp-logo{background:url(../../includes/images/Mailchimp_Assets/yikes-mailchimp-welcome-logo.png) no-repeat;background-size:60px;float:left;font-size:14px;height:80px;text-align:center;width:80px}.need-support-icon{line-height:1.5}ul.support-option-list{display:inline-block;width:100%}.support-option{float:left}.support-option-second{margin-left:10px}#yikes-mailchimp-logo.support-page{float:left;width:80pt}#yikes-mailchimp-logo{height:132px;width:132px;font-size:14px;text-align:center;background:url(../../includes/images/Mailchimp_Assets/yikes-mailchimp-welcome-logo.png) no-repeat}.yikes-easy-mc-feature-image.yikes-easy-mc-feature-v3-image{border:0;margin-left:100px!important;margin-right:100px;max-height:340px;width:auto}body.admin_page_yikes-mailchimp-edit-form div.show-some-love-container img,div.show-some-love-container img.customizer-upsell-banner{max-width:100%}body.admin_page_yikes-mailchimp-edit-form div.show-some-love-container p:first-child{font-style:italic}body.admin_page_yikes-mailchimp-edit-form div.show-some-love-container hr{margin:1em 0}body.admin_page_yikes-mailchimp-welcome .nav-tab-wrapper .nav-tab .dashicons{font-size:17px;line-height:1.5}#review-yikes-easy-mailchimp-notice .button-container{display:block;width:100%;margin:.75em 0 1.5em 0}#review-yikes-easy-mailchimp-notice .button-container .dashicons{font-size:14px;line-height:1.9;margin-left:-4px}#review-yikes-easy-mailchimp-notice .button-container .dashicons-star-filled{color:#e6b800}#review-yikes-easy-mailchimp-notice .button-container .dashicons-upload{color:#6e8841}#review-yikes-easy-mailchimp-notice .button-container .dashicons-no-alt{color:#dc3a3a;line-height:2}body.easy-mailchimp_page_yikes-inc-easy-mailchimp-settings .dashicons-no-alt{color:#dc3a3a}#review-yikes-easy-mailchimp-notice .button-container a{margin-right:10px}#review-yikes-easy-mailchimp-notice{border-left:4px solid #00a0d2;background:#fefefe;padding:1px 12px;padding-top:10px;box-shadow:0 1px 1px 0 rgba(0,0,0,.1);-webkit-box-shadow:0 1px 1px 0 rgba(0,0,0,.1);margin:15px 25px 20px 5px}input.readonly,input[readonly],textarea.readonly,textarea[readonly]{background:#d8d8d8}.dashicons.yikes-love{color:pink}.field-description-input{resize:vertical;max-height:100px}.yikes-easy-mc-postbox h3{background:#00a0d2;font-weight:800;color:#fff}.yikes-easy-mc-postbox h3.error{background:#dc3232;font-weight:700}.yikes-easy-mc-postbox h3.bg-transparent{color:#333;font-weight:400;background:0 0}.yikes-mc-warning-message{padding-left:15px;margin-top:0;padding-top:10px;color:#da6e6e}.error-message-container label[for=yikes-easy-mc-general-error-message],.error-message-container label[for=yikes-easy-mc-success-message],.error-message-container label[for=yikes-easy-mc-success-single-optin-message],.error-message-container label[for=yikes-easy-mc-update-email-failure],.error-message-container label[for=yikes-easy-mc-update-email-successful],.error-message-container label[for=yikes-easy-mc-user-email-body],.error-message-container label[for=yikes-easy-mc-user-email-subject],.error-message-container label[for=yikes-easy-mc-user-resubscribed-success-message],.error-message-container label[for=yikes-easy-mc-user-subscribed-message],.error-message-container label[for=yikes-easy-mc-user-subscribed-update-link]{padding:.5em 1em;background:rgba(241,241,241,.75);box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;margin:0}body.admin_page_yikes-mailchimp-edit-form #error-container{padding:2px 1em;background:rgba(241,241,241,.75);box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;margin:0;color:#f56060}.error-message-container label:last-child{padding-bottom:1em;margin-bottom:.5em}.error-message-container label,.form-settings-container label{display:block;margin:1em 0}.yikes-easy-forms-sidebar .yikes-mc-settings-expansion-section{padding:.5em .75em;-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.yikes-mc-settings-expansion-section{display:none;background:rgba(241,241,241,.75)}.yikes-mc-settings-expansion-section .form-table td{padding:10px 10px;vertical-align:top}.yikes-mc-settings-expansion-section .form-table td p.description{line-height:1}.expansion-section-title{background:#fff}.expansion-section-title.settings-sidebar,.form-builder-section-title{text-decoration:none;display:block;border:1px solid rgba(177,177,177,.71);color:#333;padding:5px;margin:.5em 0 0 0}.expansion-section-title.settings-sidebar .dashicons,.form-builder-section-title .dashicons{content:"\f132";font-family:dashicons;font-size:15px;line-height:1.5}span.easy-mailchimp-add-on-valid-license-container{color:#44ba44;display:block;margin-top:1em}.easy-mailchimp-add-on-invalid-license-container{color:rgba(227,107,107,.86);display:block;margin-top:1em}.options-sidebar .yikes-easy-mc-postbox{overflow:visible}.options-sidebar .inside{padding:0 20px 12px}.yikes-easy-mc-about-text{margin-top:0}.add-on-settings-divider{margin:1em 0!important}#yks-mailchimp-double-optin-message,#yks-mailchimp-single-optin-message,.settings-page-input{width:50%}#yks-mailchimp-double-optin-message,#yks-mailchimp-single-optin-message{min-height:75px;max-height:200px;resize:vertical}#addon-settings-nav li a,#settings-nav li a{color:#333;text-decoration:none!important;transition:color .15s ease-out;-moz-transition:color .15s ease-out;-webkit-transition:color .15s ease-out;-o-transition:color .15s ease-out}#addon-settings-nav li a:hover,#settings-nav li a:hover{color:#00a0d2!important}#addon-settings-nav{margin-bottom:0;margin-top:5px}.option-menu-selected-arrow{width:0;height:0;border-top:10px solid transparent;border-bottom:10px solid transparent;border-left:10px solid #a0a5aa;position:absolute;left:-.1em}.option-menu-selected-arrow+a{color:#00a0d2!important}label[for=yikes-mailchimp-debug-status]{display:inline-block;margin-bottom:1em;line-height:2.25}#yikes-mailchimp-debug-status{float:left;margin-top:.5em}label[for=yikes-mc-recaptcha-api-key],label[for=yikes-mc-recaptcha-setting]{display:block;margin-bottom:1em}input.recaptcha-setting-checkbox{display:inline-block;margin-top:.5em;vertical-align:bottom}.recaptcha-preview-link{display:block;margin-top:.5em}.recaptcha-preview-container{display:block;width:100%;display:none;margin:1em 0}.wrap #col-left,.wrap #col-right{width:49%}@media (max-width:800px){.wrap #col-left,.wrap #col-right{width:100%}}.support-page-logo{width:100%;opacity:.7;max-width:100%;display:block}.support-page-button{display:block;width:100%;min-height:40px;font-weight:700;text-align:center;line-height:3!important;margin-top:1em!important}.support-page-wordpress-font{font-size:1.3em;margin-right:13px}h2.premium-support-title{margin:1em 0 .5em 0}#premium-support-form{display:block;width:100%}#premium-support-form input[type=email],#premium-support-form input[type=submit],#premium-support-form input[type=text],#premium-support-form select{display:block;width:100%;min-width:200px;margin:.5em 0}#premium-support-form label{font-weight:800}#premium-support-form label input,#premium-support-form label select{font-weight:500}#premium-support-form p{font-weight:300;display:block;margin-bottom:1em}#wp-support-content-wrap{min-height:150px;width:100%}.support-form-hidden{display:none!important}#yikes-mailchimp-error-log .row-title{font-weight:400}.create-error-log-help:hover{cursor:pointer}.error-log-tr td{display:table;margin-bottom:1em;margin-top:.5em}p.error-log-missing-file em,p.to-start-logging-errors-notice em{margin:10px 0}.export-custom-forms-list{display:none;margin:1em 0 2em 0}.export-custom-forms-list p{margin-top:0}.list-rating-star{color:#e6b800}#import-list-to-site{margin-top:10px}#import-list-to-site .input-field{display:block;width:100%;margin-top:5px;margin-bottom:5px}#import-list-to-site .form-description{resize:vertical;max-height:65px}#import-list-to-site .description{margin-top:5px}input.clear-mailchimp-api-cache{float:right;margin-top:-33px!important}.yikes-list-refreshed-notice{border-left:4px solid #46b450;margin:5px 0}.yikes-list-refreshed-notice p{margin:1em 0 .5em 0;padding:6px 12px;background:rgba(241,241,241,.5);font-size:13px;line-height:1.5}.star-container{margin-top:5px;margin-bottom:1.5em}.star-container a{text-decoration:none}.star-container .dashicons-star-filled{font-size:1.75em}.sidebar-container{margin-top:5px;margin-bottom:1.5em}.sidebar-footer-text{margin:15px 0!important;text-align:center}.sidebar-twitter-icon{text-decoration:none;color:#55acee}.field-doesnt-exist-notice{position:absolute;margin-left:5px;width:18px}.field-type-text{display:inline-block;float:right;margin-right:.1em}.type-container{margin-top:0;margin:0}.form-field-container{margin-top:0;margin-bottom:0}.field-no-longer-exists-warning{position:absolute;margin-left:5px;width:18px}.form-field-container tr.yikes-checkbox-container input[type=checkbox]{float:left;margin-right:5px;margin-top:2px}.form-field-container tr.yikes-checkbox-container-first td{padding-top:12px!important}.form-field-container td input[type=checkbox]:first-child,.form-field-container td input[type=radio]:first-child{margin-left:0!important}.merge-tag-text{background:0 0;box-shadow:none;border:none}.pre-defined-tag-link{display:block;font-size:11px;margin-top:-2px}.toggle-container{font-size:small;float:right}#pre-defined-tag-container{display:none}#pre-defined-tag-container h3{margin-bottom:0}#pre-defined-tag-container .tooltop-tag .dashicons-editor-help{font-size:13px;line-height:1.5}.no-fields-assigned-notice{margin:4em 0 2.25em 0;padding-bottom:6em;width:100%;text-align:center;background:url( '../../includes/images/no-form-fields-assigned-arrow.jpg' ) no-repeat;background-position:bottom center;background-size:105px}.yikes-easy-mc-widget-preloader{position:absolute;left:48%;margin-top:-96px}.yikes-dashboard-widget-section{padding:0 12px 12px}.select-list-title{padding-left:0}.yikes-dashboard-widget-section .description{margin:.5em 0 0 0}. error-descripion{padding-top:.5em}.yikes-mc-freddie-logo{float:left;margin-right:10px}.mv_ig_list{width:100%;margin-bottom:8px!important;border:none!important;background:0 0!important}.mv_ig_list .list-container{position:absolute}.mv_ig_list a{width:40%;padding:5px 0!important;text-align:center;margin:0;float:left}.mv_ig_list a:first-child{width:32%}.mv_ig_list a:last-child{width:25%}.mv_ig_list{margin-bottom:.5em}.mv_ig_list .nav-tab{border:1px solid #ccc}.mv_ig_list .nav-tab-active{color:#fff;font-weight:700;background:#00a0d2}.mv_ig_list .arrow-down{position:absolute;margin-top:21px;width:0;height:0;border-left:12px solid transparent;border-right:12px solid transparent;border-top:12px solid #00a0d2}#nav-tab-merge-variables .arrow-down{left:16%}#nav-tab-interest-groups .arrow-down{left:49%}#nav-tab-tags .arrow-down{left:79%}#container-container{display:inline-block;width:1000px}#container-container .list-container{width:254px;position:relative;display:inline-block;margin-left:2em;vertical-align:top}#container-container .list-container:first-child{margin-left:0}#yikes_easy_mc_toolbar{margin-top:-.75em}#yikes_easy_mc_toolbar_links{display:inline-block;width:100%;margin:0;padding:10px 0}#yikes_easy_mc_toolbar_links li{float:left;margin:0 .5em}#yikes_easy_mc_toolbar_links li a{text-decoration:none;display:inline-block}#yikes_easy_mc_toolbar_links li a:focus{box-shadow:none}#yikes_easy_mc_toolbar_links li a.selected_hidden_setting{color:#333;margin-bottom:3px}#yikes_easy_mc_toolbar_links li .selected_setting_triangle{width:0;height:0;border-left:13px solid transparent;border-right:13px solid transparent;border-top:13px solid rgba(206,206,206,1);margin:0 auto}#yikes_easy_mc_toolbar_links li a.form-builder:before{content:"\f116";font-family:dashicons}#yikes_easy_mc_toolbar_links li a.form-customizer:before{content:"\f100";font-family:dashicons}#yikes_easy_mc_toolbar_links li a.error-messages:before{content:"\f117";font-family:dashicons}#yikes_easy_mc_toolbar_links li a.form-settings:before{content:"\f111";font-family:dashicons}.integreation-checkbox-interest-groups-header{display:inline}.integration-checkbox-interest-groups-hr{margin-top:10px;margin-bottom:10px}#checkbox-settings-form .dashicons-editor-help{font-size:15px;line-height:1.6}.checkbox-settings-list-dropdown{display:block;width:250px}.no-lists-setup-notice{padding:.5em 0 .5em 0}.optin-checkbox-label-input{display:block;width:250px}.integration-checkbox-interest-groups{margin-bottom:10px}.integration-checkbox-interest-groups p,.integration-checkbox-interest-groups section{padding-left:25px}.yikes-mailchimp-checkbox-integration-list{color:#006799;display:inline-block;font-weight:600;margin-bottom:5px;padding:0 16px 8px 2px;vertical-align:top}.yikes-mailchimp-checkbox-integration-item{font-size:14px;font-weight:600;margin-bottom:10px}.yikes-mailchimp-checkbox-integration-list input[type=checkbox]{margin-right:0}label.optin-checkbox-label{display:block;margin:4px 0}label.optin-checkbox-label input.optin-checkbox-label-input,label.optin-checkbox-label select{display:inline-block}label.optin-checkbox-label select{margin-left:17px;width:auto}.yikes-form-id-number{width:55px}span[title="Conversion Rate"]:hover,span[title=Impressions]:hover,span[title=Submissions]:hover{display:block;cursor:pointer}.form-id-container{padding:1px 8px;border-radius:5px;background:#49a9ec;font-weight:700;color:#fff}.manage-form-admin-notice{margin-top:1.75em!important}.remove-notification,.yikes-mc-settings-expansion-section a.remove-field,a.yikes-delete-mailchimp-form,a.yikes-delete-subscriber{color:#d96060!important}.yikes-delete-mailchimp-form{margin-top:6px}#postbox-container-1 .yikes-delete-mailchimp-form{float:right}.form-buttons-container{display:block;padding:11px 10px}.forms-buttons-container input[type=submit]{margin:0 0 .5em 0}.update-form-spinner{position:absolute;left:0;right:0;margin:0 auto;bottom:13px}.yikes-mc-shortcode-input{text-align:center;width:100%;color:#333}.hidden-class{display:none!important}.stat-container{width:10%;max-width:75px}.no-current-subscriber-notice em,.no-mailchimp-forms-found em{padding:25px 0 25px 25px}.column-columnname span.stats{display:block;width:100%;text-align:center}.column-columnname span.stats span{display:inline-block;width:20%}.column-columnname span.stats span:hover{cursor:pointer}#available-fields li,#available-interest-groups li,#available-tags li{text-decoration:none;display:block;border:1px solid rgba(177,177,177,.71);color:#333;padding:5px;margin:.5em 0}#available-fields li.not-available,#available-interest-groups li.not-available,#available-tags li.not-available{opacity:.6!important}#available-fields li.add-to-form,#available-interest-groups li.add-to-form,#available-tags li.add-to-form{background:rgba(46,162,204,.25)}.add-field-to-editor .add-to-form-builder-arrow,.button-secondary .add-to-form-builder-arrow{width:15px;font-size:15px;line-height:1.8}.tags-title-text{margin-left:1em;position:absolute;top:60px}.tags-title-container{margin-right:2em;margin-left:4em}.tags-title{padding-top:1em;padding-bottom:.75em;cursor:default;font-weight:500}.tags-title-container>span.mailchimp-tag{font-size:.875em;margin-right:1em;padding:.25em .4em 0;border:2px solid #00a0d2;border-radius:10px;cursor:default;vertical-align:middle;display:inline-block;margin-top:1em}.tags-title-container span.dashicons{line-height:.8;font-size:1.5em;padding-bottom:0;cursor:pointer;margin-bottom:-4px}.tags-title-container .tag-divider{border:1px solid #00a0d2;padding-bottom:2px;margin-left:3px}.clear-form-fields{background:#e14d43;border-color:#d02c21;color:#fff;box-shadow:inset 0 1px 0 #ec8b85,0 1px 0 rgba(0,0,0,.15);text-decoration:none;display:inline-block;height:28px;padding:0 10px 1px;border-width:1px;-webkit-appearance:none;border-radius:3px;white-space:nowrap;font-size:13px;line-height:26px;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;float:right;margin:0 11px 10px 0}.clear-form-fields:active,.clear-form-fields:focus,.clear-form-fields:hover{background:#dd382d;border-color:#ba281e;color:#fff;box-shadow:inset 0 1px 0 #e8776f}.yikes-mc-view-list-breadcrumbs{padding:.8em;border:1px solid #d8d8d8;background:#ececec;margin:1.5em 0 .8em 0}.yikes-mc-member-rating-star{color:#daa520}#yikes-mc-subscriber-card-wrapper{background:#fefefe;min-height:200px;display:inline-block;box-shadow:0 1px 1px rgba(0,0,0,.04);webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);border:1px solid #e5e5e5;padding:15px 20px;width:500px;float:left}#yikes-mc-subscriber-card-wrapper .subscriber-optin-ip{display:inline-block;margin:1em 0 0 0;font-style:italic}.view-user-data-wrap #customer-tab-wrapper-list{float:left;background:#fefefe;margin-top:0;padding:12px;margin-left:-1px;border-right:1px solid #e5e5e5;border-top:1px solid #e5e5e5;border-bottom:1px solid #e5e5e5}.view-user-data-wrap #customer-tab-wrapper-list .dashicons{font-size:23px;height:23px;width:23px;margin:3px 0}.view-user-data-wrap #customer-tab-wrapper-list li.inactive{color:rgba(51,51,51,.31);transition:color ease-out .1s}.view-user-data-wrap #customer-tab-wrapper-list li.active,.view-user-data-wrap #customer-tab-wrapper-list li.inactive:hover{color:rgba(51,51,51,1)}#yikes-mc-subscriber-card-wrapper .yikes-mc-card-top .member-star-rating-container,#yikes-mc-subscriber-card-wrapper .yikes-mc-card-top h2,#yikes-mc-subscriber-card-wrapper .yikes-mc-card-top img{float:left}#yikes-mc-subscriber-card-wrapper #delete-mailchimp-subscriber{display:block;margin:0 auto}#yikes-mc-subscriber-card-wrapper .yikes-mc-card-top img{border-radius:3px}#yikes-mc-subscriber-card-wrapper .merge-variable-section li{display:inline-block;list-style:none;float:left;width:50%;min-height:65px;border-bottom:1px dotted #ddd}#yikes-mc-subscriber-card-wrapper .merge-variable-section li p{margin:0 0 1em 0}#yikes-mc-subscriber-card-wrapper .yikes-mc-card-top h2{max-width:370px;width:75%;padding:0}#yikes-mc-subscriber-card-wrapper .member-star-rating-container{display:block;margin:.5em 0;margin-left:10px}#yikes-mc-subscriber-card-wrapper h2{margin-left:10px;margin-top:0;padding-top:0}#yikes-mc-subscriber-card-wrapper .yikes-mc-card-top{display:inline-block;width:100%}#yikes-mc-subscriber-card-wrapper .yikes-mc-card-body{display:inline-block;width:100%}#yikes-mc-subscriber-card-wrapper .yikes-mc-card-body h4{margin-top:0;margin-left:5px}.yikes-mc-subscriber-hr{margin:1.5em 0}.member-subscription-date{display:block;width:70%;max-width:370px;margin:.5em 0;margin-left:10px;float:left}.member-location-data{display:block;width:70%;max-width:370px;margin:.25em 0;margin-left:10px;float:left}.addon-required-link{color:#333;opacity:.5}.view-list-sidebar-input{color:#333}.interest-group-ul,.merge-variable-ul,.segment-ul{padding-left:15px;font-size:14px}.interest-group-ul li .dashicons,.merge-variable-ul li .dashicons{line-height:1.8;font-size:9px}a.button-primary.edit-fields-button{margin:0 0 10px 15px}.interest-group-count,.merge-variable-count,.segment-group-count{text-decoration:underline;margin-bottom:.75em;padding-left:7px}.interest-group-title{padding-left:5px}.edit-segments-button{margin:0 0 10px 15px}.edit-segment-description{padding:0 0 10px 15px}.list-page-mailchimp-logo{width:100%;display:block;margin:0 auto}.list-page-sidebar h2.account-status{text-align:center}.mailchimp-avatar{display:block;margin:0 auto;box-shadow:3px 3px 10px 0 rgba(214,214,214,.75)}.yikes-easy-mailchimp-custom-content-icon{font-size:15px;line-height:1}.custom-field-section{display:block;margin:1em 0}#associated-list{width:100%;margin-top:5px}#redirect-user-to-selection{width:100%}#edit-yikes-mc-form label h3{margin-left:0;padding-left:0}#available-fields .field-required{color:#d96060!important}body.admin_page_yikes-mailchimp-edit-form #poststuff h2{padding:8px 12px;margin-top:0}.edit-form-form-description{width:100%;resize:vertical;min-height:65px;max-height:100px}.edit-form-title{padding-left:12px!important}#edit-form-description{padding:0 12px;margin:1em 0}.yikes-easy-mc-postbox{overflow:hidden}.no-interest-groups-found-message{opacity:.35}#interest-groups-container .description,#merge-variables-container .description{padding-top:.5em}.inside-section-1{margin-top:0;margin-bottom:1.5em}.inside-section-2{margin-top:0;margin-bottom:2em}.form-field-container-span{display:block;margin:.5em 0}#style-list ul li{display:block;width:100%;margin:1em 0}.form-style-adjustment,.wp-picker-container{display:block!important;width:100%;margin:.5em 0}.dynamic-email-tag{display:inline-block;margin-right:5px}.dynamic-tag-description td{padding-top:0}#create-new-notification-button{margin-top:1em}.file-container{display:none}.yikes-mailchimp-file-field input[name*="custom-field[incentive-attachment]"]{margin-bottom:.5em}.yikes-mailchimp-file-field input[name*="custom-field[incentive-attachment]"]+.button-secondary{margin-left:4px}input#upload-btn[data-attr-position="1"]{margin-left:0}.remove-file-button{background:url(../partials/helpers/fields/img/icon-delete.png);height:16px;position:absolute;text-indent:-99999px;width:16px}a.add-new-incentive-attachment{display:block;width:40px;margin-right:100%!important;margin-top:.5em!important}a.add-new-incentive-attachment .dashicons{font-size:15px;line-height:1.8}.form-builder-placeholder{background:rgba(206,206,206,.2);height:30px}.admin_page_yikes-mailchimp-edit-form #form-settings .section-title{font-size:1em;border-bottom:1px solid rgba(187,187,187,.29);display:block;width:100%;padding-bottom:6px;margin-bottom:.5em;margin-top:1.5em}.admin_page_yikes-mailchimp-edit-form #form-settings .section-title.first{margin-top:0}.admin_page_yikes-mailchimp-edit-form #form-settings .section-interior{display:inline-block;width:100%;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;background:rgba(241,241,241,.75);padding:1em}.admin_page_yikes-mailchimp-edit-form #form-settings .section-interior label{margin-top:0}label.login-restriction-center{display:block;width:100%}.admin_page_yikes-mailchimp-edit-form #form-settings .section-interior .date-restriction-section{display:inline-block}.admin_page_yikes-mailchimp-edit-form #form-settings .section-interior .date-restriction-section p.description.error{color:#f56060}.admin_page_yikes-mailchimp-edit-form #form-settings .section-interior .date-restriction-section label{float:left;margin-right:.5em;margin-top:0;margin-bottom:0;display:inline-block}.admin_page_yikes-mailchimp-edit-form #form-settings .section-interior .nested-child .yikes-easy-mc-form-restriction-expired-message,.admin_page_yikes-mailchimp-edit-form #form-settings .section-interior .nested-child .yikes-easy-mc-form-restriction-login-message,.admin_page_yikes-mailchimp-edit-form #form-settings .section-interior .nested-child .yikes-easy-mc-form-restriction-pending-message{display:block;width:100%;min-height:50px}.admin_page_yikes-mailchimp-edit-form #form-settings .section-interior .nested-child{float:left;padding-left:2%;width:98%;border-left:1px dashed #bdbdbd;border-spacing:2px;margin:.5em 0 1em 0}.admin_page_yikes-mailchimp-edit-form #form-settings .section-interior .nested-child .yikes-easy-mc-submit-button-text{margin:0}.admin_page_yikes-mailchimp-edit-form #form-settings .section-interior .date-restriction-section{margin-bottom:0}.admin_page_yikes-mailchimp-edit-form #form-settings .section-interior .date-restriction-section.last{margin-bottom:.75em}.admin_page_yikes-mailchimp-edit-form #form-settings .section-interior .nested-child.hidden{display:none}.admin_page_yikes-mailchimp-edit-form #form-settings .section-interior .description+label{margin-top:1em;float:left;width:100%}.admin_page_yikes-mailchimp-edit-form #form-settings .section-interior label.inline-form-label{margin-bottom:0;margin-top:0}.admin_page_yikes-mailchimp-edit-form #form-settings .section-interior .description{display:block;width:100%;float:left}.admin_page_yikes-mailchimp-edit-form #form-settings .nested-child strong:first-child,.admin_page_yikes-mailchimp-edit-form #form-settings .section-interior strong:first-child{display:block;width:100%}.admin_page_yikes-mailchimp-edit-form #form-settings .inline-form-label{float:left;margin-right:10px}body.admin_page_yikes-mailchimp-edit-form .ui-timepicker-wrapper{overflow-y:auto;height:150px;width:170px;background:#fff;border:1px solid #ddd;box-shadow:0 5px 10px rgba(0,0,0,.2);outline:0;z-index:10001;margin:0}body.admin_page_yikes-mailchimp-edit-form .ui-timepicker-wrapper.ui-timepicker-with-duration{width:13em}body.admin_page_yikes-mailchimp-edit-form .ui-timepicker-wrapper.ui-timepicker-with-duration.ui-timepicker-step-30,body.admin_page_yikes-mailchimp-edit-form .ui-timepicker-wrapper.ui-timepicker-with-duration.ui-timepicker-step-60{width:11em}body.admin_page_yikes-mailchimp-edit-form .ui-timepicker-list{margin:0;padding:0;list-style:none}body.admin_page_yikes-mailchimp-edit-form .ui-timepicker-duration{margin-left:5px;color:#888}body.admin_page_yikes-mailchimp-edit-form .ui-timepicker-list:hover .ui-timepicker-duration{color:#888}body.admin_page_yikes-mailchimp-edit-form .ui-timepicker-list li{padding:3px 0 3px 5px;cursor:pointer;white-space:nowrap;color:#000;list-style:none;margin:0}body.admin_page_yikes-mailchimp-edit-form .ui-timepicker-list:hover .ui-timepicker-selected{background:#fff;color:#000}body.admin_page_yikes-mailchimp-edit-form .ui-timepicker-list .ui-timepicker-selected:hover,body.admin_page_yikes-mailchimp-edit-form .ui-timepicker-list li:hover,body.admin_page_yikes-mailchimp-edit-form li.ui-timepicker-selected{background:#1980ec;color:#fff}body.admin_page_yikes-mailchimp-edit-form .ui-timepicker-list li:hover .ui-timepicker-duration,body.admin_page_yikes-mailchimp-edit-form li.ui-timepicker-selected .ui-timepicker-duration{color:#ccc}body.admin_page_yikes-mailchimp-edit-form .ui-timepicker-list li.ui-timepicker-disabled,body.admin_page_yikes-mailchimp-edit-form .ui-timepicker-list li.ui-timepicker-disabled:hover,body.admin_page_yikes-mailchimp-edit-form .ui-timepicker-list li.ui-timepicker-selected.ui-timepicker-disabled{color:#888;cursor:default}body.admin_page_yikes-mailchimp-edit-form .ui-timepicker-list li.ui-timepicker-disabled:hover,body.admin_page_yikes-mailchimp-edit-form .ui-timepicker-list li.ui-timepicker-selected.ui-timepicker-disabled{background:#f2f2f2}body.admin_page_yikes-mailchimp-edit-form .ui-datepicker{background-color:#fff;border:1px solid #66afe9;border-radius:4px;box-shadow:0 0 8px rgba(102,175,233,.6);display:none;margin-top:4px;padding:10px;width:240px}body.admin_page_yikes-mailchimp-edit-form .ui-datepicker a,body.admin_page_yikes-mailchimp-edit-form .ui-datepicker a:hover{text-decoration:none}body.admin_page_yikes-mailchimp-edit-form .ui-datepicker a:hover,body.admin_page_yikes-mailchimp-edit-form .ui-datepicker td:hover a{color:#2a6496;transition:color .1s ease-in-out}body.admin_page_yikes-mailchimp-edit-form .ui-datepicker .ui-datepicker-header{margin-bottom:4px;text-align:center}body.admin_page_yikes-mailchimp-edit-form .ui-datepicker .ui-datepicker-title{font-weight:700}body.admin_page_yikes-mailchimp-edit-form .ui-datepicker .ui-datepicker-next,body.admin_page_yikes-mailchimp-edit-form .ui-datepicker .ui-datepicker-prev{cursor:default;font-family:'Glyphicons Halflings';-webkit-font-smoothing:antialiased;font-style:normal;font-weight:400;height:20px;line-height:1;margin-top:2px;width:30px}body.admin_page_yikes-mailchimp-edit-form .ui-datepicker .ui-datepicker-prev{float:left;text-align:left}body.admin_page_yikes-mailchimp-edit-form .ui-datepicker .ui-datepicker-next{float:right;text-align:right}body.admin_page_yikes-mailchimp-edit-form .ui-datepicker .ui-datepicker-prev:before{content:"\f141";font-family:dashicons}body.admin_page_yikes-mailchimp-edit-form .ui-datepicker .ui-datepicker-next:before{content:"\f139";font-family:dashicons}body.admin_page_yikes-mailchimp-edit-form .ui-datepicker-next:hover,body.admin_page_yikes-mailchimp-edit-form .ui-datepicker-prev:hover{cursor:pointer!important}body.admin_page_yikes-mailchimp-edit-form .ui-datepicker-close{display:none}body.admin_page_yikes-mailchimp-edit-form .ui-datepicker-current{color:#555!important;border-color:#ccc!important;background:#f7f7f7!important;box-shadow:0 1px 0 #ccc!important;vertical-align:top!important;display:inline-block;text-decoration:none;font-size:13px;line-height:26px;height:28px;padding:0 10px 1px;cursor:pointer;border-width:1px;border-style:solid;-webkit-appearance:none;border-radius:3px;white-space:nowrap;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;margin-top:10px}body.admin_page_yikes-mailchimp-edit-form .ui-datepicker .ui-icon{display:none}body.admin_page_yikes-mailchimp-edit-form .ui-datepicker .ui-datepicker-calendar{table-layout:fixed;width:100%}body.admin_page_yikes-mailchimp-edit-form .ui-datepicker .ui-datepicker-calendar td,body.admin_page_yikes-mailchimp-edit-form .ui-datepicker .ui-datepicker-calendar th{text-align:center;padding:4px 0}body.admin_page_yikes-mailchimp-edit-form .ui-datepicker .ui-datepicker-calendar td{border-radius:4px;transition:background-color .1s ease-in-out,color .1s ease-in-out}body.admin_page_yikes-mailchimp-edit-form .ui-datepicker .ui-datepicker-calendar td:hover{background-color:#ebebeb;cursor:pointer}body.admin_page_yikes-mailchimp-edit-form .ui-datepicker .ui-datepicker-calendar td a{text-decoration:none}body.admin_page_yikes-mailchimp-edit-form .ui-datepicker .ui-datepicker-today{background-color:rgba(66,137,204,.65)}body.admin_page_yikes-mailchimp-edit-form .ui-datepicker .ui-datepicker-today a{color:#fff}body.admin_page_yikes-mailchimp-edit-form .ui-datepicker .ui-datepicker-current-day{background-color:#4289cc}body.admin_page_yikes-mailchimp-edit-form .ui-datepicker .ui-datepicker-current-day a{color:#fff}body.admin_page_yikes-mailchimp-edit-form .ui-datepicker .ui-datepicker-calendar .ui-datepicker-unselectable:hover{background-color:#fff;cursor:default}.custom-radio-holder{display:inline-block;width:100%;margin:.5em 0}.custom-radio-label{display:block;float:left;margin:0 5px}.custom-radio-label:first-child{margin-left:0!important}.custom-radio-label input[type=radio]{margin-right:0!important}.custom-select-field{display:block;width:100%;margin:.5em 0}#available-widgets [class*=yikes_easy] .widget-title:before{content:""!important;background:url(../../includes/images/Mailchimp_Assets/Freddie_original.png) no-repeat #fafafa;background-size:contain}body.wp-customizer #available-widgets [id*="_yikes_easy_mc_widget"]>div.widget-top>div.widget-title>h4{background:0 0!important}#connection-container{float:right;color:#fff;padding:.25em .75em .25em .25em;margin-top:-4px}#connection-container.api-connected{background:#44ba44}#connection-container.api-not-connected{background:#b5b5b5}.yikes-mc-api-connected,.yikes-mc-api-not-connected{line-height:1}.show-some-love-container{transition:max-height .75s}#review-yikes-easy-mc{text-align:center}#review-yikes-easy-mc .dashicons-star-filled{color:#e6b800}.meta-box-sortables hr{margin:1.75em 0 0 0}#about-yikes-inc{display:none}#about-yikes-inc .about-sidebar-yikes-logo{float:left;width:95px;margin:5px 7px 0 0}#about-yikes-inc p{margin-top:0}.yikes-easy-mc-updated{display:block;border-left:4px solid #4eaef0;margin:0 20px 2px 0;margin-top:1em;margin-bottom:1em;padding:2px 10px;background:#fff;background-size:120px;background-position:right bottom;background-repeat:no-repeat;background-position-y:29px}#edit-yikes-mc-form #post-body.columns-2 #postbox-container-1{width:280px}@media screen and (max-width:1200px){.yikes-easy-mc-postbox #post-body.columns-2 #postbox-container-1{float:none}}@media screen and (max-width:850px){.option-menu-selected-arrow{display:none!important}}@media screen and (max-width:782px){#chimp-chatter .chimp-chatter-container{float:none;height:auto;width:100%}}.recaptcha-demo-gif{width:275px}.pro-version-only-notice{color:#d96060}.upgrading-ellipse-one{-moz-opacity:0;-khtml-opacity:0;opacity:0;-webkit-animation:dot 1.3s infinite;-webkit-animation-delay:0ms;animation:dot 1.3s infinite;animation-delay:0ms}.upgrading-ellipse-two{-moz-opacity:0;-khtml-opacity:0;opacity:0;-webkit-animation:dot 1.3s infinite;-webkit-animation-delay:.2s;animation:dot 1.3s infinite;animation-delay:.2s}.upgrading-ellipse-three{-moz-opacity:0;-khtml-opacity:0;opacity:0;-webkit-animation:dot 1.3s infinite;-webkit-animation-delay:.3s;animation:dot 1.3s infinite;animation-delay:.3s}.yikes-mc-edit-field-label-icon{display:inline}.yikes-mc-edit-field-label-input{display:none;width:80%;border-radius:5px}.yikes-mc-save-field-label-edits-icon{display:none}.yikes-mc-edit-field-label-message{display:none;color:#f56060;margin-left:26px}@keyframes dot{0%{opacity:0}50%{opacity:0}100%{opacity:1}}
admin/js/jquery.timepicker.min.js CHANGED
@@ -1,7 +1,7 @@
1
- /*!
2
- * jquery-timepicker v1.8.9 - A jQuery timepicker plugin inspired by Google Calendar. It supports both mouse and keyboard navigation.
3
- * Copyright (c) 2016 Jon Thornton - http://jonthornton.github.com/jquery-timepicker/
4
- * License: MIT
5
- */
6
-
7
  !function(a){"object"==typeof exports&&exports&&"object"==typeof module&&module&&module.exports===exports?a(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){function b(a){var b=a[0];return b.offsetWidth>0&&b.offsetHeight>0}function c(b){if(b.minTime&&(b.minTime=t(b.minTime)),b.maxTime&&(b.maxTime=t(b.maxTime)),b.durationTime&&"function"!=typeof b.durationTime&&(b.durationTime=t(b.durationTime)),"now"==b.scrollDefault)b.scrollDefault=function(){return b.roundingFunction(t(new Date),b)};else if(b.scrollDefault&&"function"!=typeof b.scrollDefault){var c=b.scrollDefault;b.scrollDefault=function(){return b.roundingFunction(t(c),b)}}else b.minTime&&(b.scrollDefault=function(){return b.roundingFunction(b.minTime,b)});if("string"===a.type(b.timeFormat)&&b.timeFormat.match(/[gh]/)&&(b._twelveHourTime=!0),b.showOnFocus===!1&&-1!=b.showOn.indexOf("focus")&&b.showOn.splice(b.showOn.indexOf("focus"),1),b.disableTimeRanges.length>0){for(var d in b.disableTimeRanges)b.disableTimeRanges[d]=[t(b.disableTimeRanges[d][0]),t(b.disableTimeRanges[d][1])];b.disableTimeRanges=b.disableTimeRanges.sort(function(a,b){return a[0]-b[0]});for(var d=b.disableTimeRanges.length-1;d>0;d--)b.disableTimeRanges[d][0]<=b.disableTimeRanges[d-1][1]&&(b.disableTimeRanges[d-1]=[Math.min(b.disableTimeRanges[d][0],b.disableTimeRanges[d-1][0]),Math.max(b.disableTimeRanges[d][1],b.disableTimeRanges[d-1][1])],b.disableTimeRanges.splice(d,1))}return b}function d(b){var c=b.data("timepicker-settings"),d=b.data("timepicker-list");if(d&&d.length&&(d.remove(),b.data("timepicker-list",!1)),c.useSelect){d=a("<select />",{"class":"ui-timepicker-select"});var g=d}else{d=a("<ul />",{"class":"ui-timepicker-list"});var g=a("<div />",{"class":"ui-timepicker-wrapper",tabindex:-1});g.css({display:"none",position:"absolute"}).append(d)}if(c.noneOption)if(c.noneOption===!0&&(c.noneOption=c.useSelect?"Time...":"None"),a.isArray(c.noneOption)){for(var h in c.noneOption)if(parseInt(h,10)==h){var j=e(c.noneOption[h],c.useSelect);d.append(j)}}else{var j=e(c.noneOption,c.useSelect);d.append(j)}if(c.className&&g.addClass(c.className),(null!==c.minTime||null!==c.durationTime)&&c.showDuration){"function"==typeof c.step?"function":c.step;g.addClass("ui-timepicker-with-duration"),g.addClass("ui-timepicker-step-"+c.step)}var l=c.minTime;"function"==typeof c.durationTime?l=t(c.durationTime()):null!==c.durationTime&&(l=c.durationTime);var m=null!==c.minTime?c.minTime:0,o=null!==c.maxTime?c.maxTime:m+v-1;m>o&&(o+=v),o===v-1&&"string"===a.type(c.timeFormat)&&c.show2400&&(o=v);var p=c.disableTimeRanges,u=0,w=p.length,y=c.step;"function"!=typeof y&&(y=function(){return c.step});for(var h=m,z=0;o>=h;z++,h+=60*y(z)){var A=h,B=s(A,c);if(c.useSelect){var C=a("<option />",{value:B});C.text(B)}else{var C=a("<li />");C.addClass(43200>A%86400?"ui-timepicker-am":"ui-timepicker-pm"),C.data("time",86400>=A?A:A%86400),C.text(B)}if((null!==c.minTime||null!==c.durationTime)&&c.showDuration){var D=r(h-l,c.step);if(c.useSelect)C.text(C.text()+" ("+D+")");else{var E=a("<span />",{"class":"ui-timepicker-duration"});E.text(" ("+D+")"),C.append(E)}}w>u&&(A>=p[u][1]&&(u+=1),p[u]&&A>=p[u][0]&&A<p[u][1]&&(c.useSelect?C.prop("disabled",!0):C.addClass("ui-timepicker-disabled"))),d.append(C)}if(g.data("timepicker-input",b),b.data("timepicker-list",g),c.useSelect)b.val()&&d.val(f(t(b.val()),c)),d.on("focus",function(){a(this).data("timepicker-input").trigger("showTimepicker")}),d.on("blur",function(){a(this).data("timepicker-input").trigger("hideTimepicker")}),d.on("change",function(){n(b,a(this).val(),"select")}),n(b,d.val(),"initial"),b.hide().after(d);else{var F=c.appendTo;"string"==typeof F?F=a(F):"function"==typeof F&&(F=F(b)),F.append(g),k(b,d),d.on("mousedown","li",function(c){b.off("focus.timepicker"),b.on("focus.timepicker-ie-hack",function(){b.off("focus.timepicker-ie-hack"),b.on("focus.timepicker",x.show)}),i(b)||b[0].focus(),d.find("li").removeClass("ui-timepicker-selected"),a(this).addClass("ui-timepicker-selected"),q(b)&&(b.trigger("hideTimepicker"),d.on("mouseup.timepicker","li",function(a){d.off("mouseup.timepicker"),g.hide()}))})}}function e(b,c){var d,e,f;return"object"==typeof b?(d=b.label,e=b.className,f=b.value):"string"==typeof b?d=b:a.error("Invalid noneOption value"),c?a("<option />",{value:f,"class":e,text:d}):a("<li />",{"class":e,text:d}).data("time",f)}function f(a,b){return a=b.roundingFunction(a,b),null!==a?s(a,b):void 0}function g(){return new Date(1970,0,1,0,0,0)}function h(b){var c=a(b.target),d=c.closest(".ui-timepicker-input");0===d.length&&0===c.closest(".ui-timepicker-wrapper").length&&(x.hide(),a(document).unbind(".ui-timepicker"),a(window).unbind(".ui-timepicker"))}function i(a){var b=a.data("timepicker-settings");return(window.navigator.msMaxTouchPoints||"ontouchstart"in document)&&b.disableTouchKeyboard}function j(b,c,d){if(!d&&0!==d)return!1;var e=b.data("timepicker-settings"),f=!1,d=e.roundingFunction(d,e);return c.find("li").each(function(b,c){var e=a(c);if("number"==typeof e.data("time"))return e.data("time")==d?(f=e,!1):void 0}),f}function k(a,b){b.find("li").removeClass("ui-timepicker-selected");var c=t(m(a),a.data("timepicker-settings"));if(null!==c){var d=j(a,b,c);if(d){var e=d.offset().top-b.offset().top;(e+d.outerHeight()>b.outerHeight()||0>e)&&b.scrollTop(b.scrollTop()+d.position().top-d.outerHeight()),d.addClass("ui-timepicker-selected")}}}function l(b,c){if(""!==this.value&&"timepicker"!=c){var d=a(this);if(!d.is(":focus")||b&&"change"==b.type){var e=d.data("timepicker-settings"),f=t(this.value,e);if(null===f)return void d.trigger("timeFormatError");var g=!1;null!==e.minTime&&f<e.minTime?g=!0:null!==e.maxTime&&f>e.maxTime&&(g=!0),a.each(e.disableTimeRanges,function(){return f>=this[0]&&f<this[1]?(g=!0,!1):void 0}),e.forceRoundTime&&(f=e.roundingFunction(f,e));var h=s(f,e);g?n(d,h,"error")&&d.trigger("timeRangeError"):n(d,h)}}}function m(a){return a.is("input")?a.val():a.data("ui-timepicker-value")}function n(a,b,c){if(a.is("input")){a.val(b);var d=a.data("timepicker-settings");d.useSelect&&"select"!=c&&"initial"!=c&&a.data("timepicker-list").val(f(t(b),d))}return a.data("ui-timepicker-value")!=b?(a.data("ui-timepicker-value",b),"select"==c?a.trigger("selectTime").trigger("changeTime").trigger("change","timepicker"):"error"!=c&&a.trigger("changeTime"),!0):(a.trigger("selectTime"),!1)}function o(c){var d=a(this),e=d.data("timepicker-list");if(!e||!b(e)){if(40!=c.keyCode)return!0;x.show.call(d.get(0)),e=d.data("timepicker-list"),i(d)||d.focus()}switch(c.keyCode){case 13:return q(d)&&x.hide.apply(this),c.preventDefault(),!1;case 38:var f=e.find(".ui-timepicker-selected");return f.length?f.is(":first-child")||(f.removeClass("ui-timepicker-selected"),f.prev().addClass("ui-timepicker-selected"),f.prev().position().top<f.outerHeight()&&e.scrollTop(e.scrollTop()-f.outerHeight())):(e.find("li").each(function(b,c){return a(c).position().top>0?(f=a(c),!1):void 0}),f.addClass("ui-timepicker-selected")),!1;case 40:return f=e.find(".ui-timepicker-selected"),0===f.length?(e.find("li").each(function(b,c){return a(c).position().top>0?(f=a(c),!1):void 0}),f.addClass("ui-timepicker-selected")):f.is(":last-child")||(f.removeClass("ui-timepicker-selected"),f.next().addClass("ui-timepicker-selected"),f.next().position().top+2*f.outerHeight()>e.outerHeight()&&e.scrollTop(e.scrollTop()+f.outerHeight())),!1;case 27:e.find("li").removeClass("ui-timepicker-selected"),x.hide();break;case 9:x.hide();break;default:return!0}}function p(c){var d=a(this),e=d.data("timepicker-list"),f=d.data("timepicker-settings");if(!e||!b(e)||f.disableTextInput)return!0;switch(c.keyCode){case 96:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 65:case 77:case 80:case 186:case 8:case 46:f.typeaheadHighlight?k(d,e):e.hide()}}function q(a){var b=a.data("timepicker-settings"),c=a.data("timepicker-list"),d=null,e=c.find(".ui-timepicker-selected");return e.hasClass("ui-timepicker-disabled")?!1:(e.length&&(d=e.data("time")),null!==d&&("string"!=typeof d&&(d=s(d,b)),n(a,d,"select")),!0)}function r(a,b){a=Math.abs(a);var c,d,e=Math.round(a/60),f=[];return 60>e?f=[e,w.mins]:(c=Math.floor(e/60),d=e%60,30==b&&30==d&&(c+=w.decimal+5),f.push(c),f.push(1==c?w.hr:w.hrs),30!=b&&d&&(f.push(d),f.push(w.mins))),f.join(" ")}function s(b,c){if(null===b)return null;var d=new Date(u.valueOf()+1e3*b);if(isNaN(d.getTime()))return null;if("function"===a.type(c.timeFormat))return c.timeFormat(d);for(var e,f,g="",h=0;h<c.timeFormat.length;h++)switch(f=c.timeFormat.charAt(h)){case"a":g+=d.getHours()>11?w.pm:w.am;break;case"A":g+=d.getHours()>11?w.PM:w.AM;break;case"g":e=d.getHours()%12,g+=0===e?"12":e;break;case"G":e=d.getHours(),b===v&&(e=24),g+=e;break;case"h":e=d.getHours()%12,0!==e&&10>e&&(e="0"+e),g+=0===e?"12":e;break;case"H":e=d.getHours(),b===v&&(e=c.show2400?24:0),g+=e>9?e:"0"+e;break;case"i":var i=d.getMinutes();g+=i>9?i:"0"+i;break;case"s":b=d.getSeconds(),g+=b>9?b:"0"+b;break;case"\\":h++,g+=c.timeFormat.charAt(h);break;default:g+=f}return g}function t(a,b){if(""===a)return null;if(!a||a+0==a)return a;if("object"==typeof a)return 3600*a.getHours()+60*a.getMinutes()+a.getSeconds();a=a.toLowerCase().replace(/[\s\.]/g,""),("a"==a.slice(-1)||"p"==a.slice(-1))&&(a+="m");var c="("+w.am.replace(".","")+"|"+w.pm.replace(".","")+"|"+w.AM.replace(".","")+"|"+w.PM.replace(".","")+")?",d=new RegExp("^"+c+"([0-9]?[0-9])\\W?([0-5][0-9])?\\W?([0-5][0-9])?"+c+"$"),e=a.match(d);if(!e)return null;var f=parseInt(1*e[2],10),g=f>24?f%24:f,h=e[1]||e[5],i=g;if(12>=g&&h){var j=h==w.pm||h==w.PM;i=12==g?j?12:0:g+(j?12:0)}var k=1*e[3]||0,l=1*e[4]||0,m=3600*i+60*k+l;if(12>g&&!h&&b&&b._twelveHourTime&&b.scrollDefault){var n=m-b.scrollDefault();0>n&&n>=v/-2&&(m=(m+v/2)%v)}return m}var u=g(),v=86400,w={am:"am",pm:"pm",AM:"AM",PM:"PM",decimal:".",mins:"mins",hr:"hr",hrs:"hrs"},x={init:function(b){return this.each(function(){var e=a(this),f=[];for(var g in a.fn.timepicker.defaults)e.data(g)&&(f[g]=e.data(g));var h=a.extend({},a.fn.timepicker.defaults,f,b);if(h.lang&&(w=a.extend(w,h.lang)),h=c(h),e.data("timepicker-settings",h),e.addClass("ui-timepicker-input"),h.useSelect)d(e);else{if(e.prop("autocomplete","off"),h.showOn)for(var i in h.showOn)e.on(h.showOn[i]+".timepicker",x.show);e.on("change.timepicker",l),e.on("keydown.timepicker",o),e.on("keyup.timepicker",p),h.disableTextInput&&e.on("keydown.timepicker",function(a){a.preventDefault()}),l.call(e.get(0))}})},show:function(c){var e=a(this),f=e.data("timepicker-settings");if(c&&c.preventDefault(),f.useSelect)return void e.data("timepicker-list").focus();i(e)&&e.blur();var g=e.data("timepicker-list");if(!e.prop("readonly")&&(g&&0!==g.length&&"function"!=typeof f.durationTime||(d(e),g=e.data("timepicker-list")),!b(g))){e.data("ui-timepicker-value",e.val()),k(e,g),x.hide(),g.show();var l={};f.orientation.match(/r/)?l.left=e.offset().left+e.outerWidth()-g.outerWidth()+parseInt(g.css("marginLeft").replace("px",""),10):l.left=e.offset().left+parseInt(g.css("marginLeft").replace("px",""),10);var n;n=f.orientation.match(/t/)?"t":f.orientation.match(/b/)?"b":e.offset().top+e.outerHeight(!0)+g.outerHeight()>a(window).height()+a(window).scrollTop()?"t":"b","t"==n?(g.addClass("ui-timepicker-positioned-top"),l.top=e.offset().top-g.outerHeight()+parseInt(g.css("marginTop").replace("px",""),10)):(g.removeClass("ui-timepicker-positioned-top"),l.top=e.offset().top+e.outerHeight()+parseInt(g.css("marginTop").replace("px",""),10)),g.offset(l);var o=g.find(".ui-timepicker-selected");if(!o.length){var p=t(m(e));null!==p?o=j(e,g,p):f.scrollDefault&&(o=j(e,g,f.scrollDefault()))}if(o&&o.length){var q=g.scrollTop()+o.position().top-o.outerHeight();g.scrollTop(q)}else g.scrollTop(0);return f.stopScrollPropagation&&a(document).on("wheel.ui-timepicker",".ui-timepicker-wrapper",function(b){b.preventDefault();var c=a(this).scrollTop();a(this).scrollTop(c+b.originalEvent.deltaY)}),a(document).on("touchstart.ui-timepicker mousedown.ui-timepicker",h),a(window).on("resize.ui-timepicker",h),f.closeOnWindowScroll&&a(document).on("scroll.ui-timepicker",h),e.trigger("showTimepicker"),this}},hide:function(c){var d=a(this),e=d.data("timepicker-settings");return e&&e.useSelect&&d.blur(),a(".ui-timepicker-wrapper").each(function(){var c=a(this);if(b(c)){var d=c.data("timepicker-input"),e=d.data("timepicker-settings");e&&e.selectOnBlur&&q(d),c.hide(),d.trigger("hideTimepicker")}}),this},option:function(b,e){return this.each(function(){var f=a(this),g=f.data("timepicker-settings"),h=f.data("timepicker-list");if("object"==typeof b)g=a.extend(g,b);else if("string"==typeof b&&"undefined"!=typeof e)g[b]=e;else if("string"==typeof b)return g[b];g=c(g),f.data("timepicker-settings",g),h&&(h.remove(),f.data("timepicker-list",!1)),g.useSelect&&d(f)})},getSecondsFromMidnight:function(){return t(m(this))},getTime:function(a){var b=this,c=m(b);if(!c)return null;var d=t(c);if(null===d)return null;a||(a=u);var e=new Date(a);return e.setHours(d/3600),e.setMinutes(d%3600/60),e.setSeconds(d%60),e.setMilliseconds(0),e},setTime:function(a){var b=this,c=b.data("timepicker-settings");if(c.forceRoundTime)var d=f(t(a),c);else var d=s(t(a),c);return a&&null===d&&c.noneOption&&(d=a),n(b,d),b.data("timepicker-list")&&k(b,b.data("timepicker-list")),this},remove:function(){var a=this;if(a.hasClass("ui-timepicker-input")){var b=a.data("timepicker-settings");return a.removeAttr("autocomplete","off"),a.removeClass("ui-timepicker-input"),a.removeData("timepicker-settings"),a.off(".timepicker"),a.data("timepicker-list")&&a.data("timepicker-list").remove(),b.useSelect&&a.show(),a.removeData("timepicker-list"),this}}};a.fn.timepicker=function(b){return this.length?x[b]?this.hasClass("ui-timepicker-input")?x[b].apply(this,Array.prototype.slice.call(arguments,1)):this:"object"!=typeof b&&b?void a.error("Method "+b+" does not exist on jQuery.timepicker"):x.init.apply(this,arguments):this},a.fn.timepicker.defaults={appendTo:"body",className:null,closeOnWindowScroll:!1,disableTextInput:!1,disableTimeRanges:[],disableTouchKeyboard:!1,durationTime:null,forceRoundTime:!1,maxTime:null,minTime:null,noneOption:!1,orientation:"l",roundingFunction:function(a,b){if(null===a)return null;if("number"!=typeof b.step)return a;var c=a%(60*b.step);return c>=30*b.step?a+=60*b.step-c:a-=c,a},scrollDefault:null,selectOnBlur:!1,show2400:!1,showDuration:!1,showOn:["click","focus"],showOnFocus:!0,step:30,stopScrollPropagation:!1,timeFormat:"g:ia",typeaheadHighlight:!0,useSelect:!1}});
1
+ /*!
2
+ * jquery-timepicker v1.8.9 - A jQuery timepicker plugin inspired by Google Calendar. It supports both mouse and keyboard navigation.
3
+ * Copyright (c) 2016 Jon Thornton - http://jonthornton.github.com/jquery-timepicker/
4
+ * License: MIT
5
+ */
6
+
7
  !function(a){"object"==typeof exports&&exports&&"object"==typeof module&&module&&module.exports===exports?a(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){function b(a){var b=a[0];return b.offsetWidth>0&&b.offsetHeight>0}function c(b){if(b.minTime&&(b.minTime=t(b.minTime)),b.maxTime&&(b.maxTime=t(b.maxTime)),b.durationTime&&"function"!=typeof b.durationTime&&(b.durationTime=t(b.durationTime)),"now"==b.scrollDefault)b.scrollDefault=function(){return b.roundingFunction(t(new Date),b)};else if(b.scrollDefault&&"function"!=typeof b.scrollDefault){var c=b.scrollDefault;b.scrollDefault=function(){return b.roundingFunction(t(c),b)}}else b.minTime&&(b.scrollDefault=function(){return b.roundingFunction(b.minTime,b)});if("string"===a.type(b.timeFormat)&&b.timeFormat.match(/[gh]/)&&(b._twelveHourTime=!0),b.showOnFocus===!1&&-1!=b.showOn.indexOf("focus")&&b.showOn.splice(b.showOn.indexOf("focus"),1),b.disableTimeRanges.length>0){for(var d in b.disableTimeRanges)b.disableTimeRanges[d]=[t(b.disableTimeRanges[d][0]),t(b.disableTimeRanges[d][1])];b.disableTimeRanges=b.disableTimeRanges.sort(function(a,b){return a[0]-b[0]});for(var d=b.disableTimeRanges.length-1;d>0;d--)b.disableTimeRanges[d][0]<=b.disableTimeRanges[d-1][1]&&(b.disableTimeRanges[d-1]=[Math.min(b.disableTimeRanges[d][0],b.disableTimeRanges[d-1][0]),Math.max(b.disableTimeRanges[d][1],b.disableTimeRanges[d-1][1])],b.disableTimeRanges.splice(d,1))}return b}function d(b){var c=b.data("timepicker-settings"),d=b.data("timepicker-list");if(d&&d.length&&(d.remove(),b.data("timepicker-list",!1)),c.useSelect){d=a("<select />",{"class":"ui-timepicker-select"});var g=d}else{d=a("<ul />",{"class":"ui-timepicker-list"});var g=a("<div />",{"class":"ui-timepicker-wrapper",tabindex:-1});g.css({display:"none",position:"absolute"}).append(d)}if(c.noneOption)if(c.noneOption===!0&&(c.noneOption=c.useSelect?"Time...":"None"),a.isArray(c.noneOption)){for(var h in c.noneOption)if(parseInt(h,10)==h){var j=e(c.noneOption[h],c.useSelect);d.append(j)}}else{var j=e(c.noneOption,c.useSelect);d.append(j)}if(c.className&&g.addClass(c.className),(null!==c.minTime||null!==c.durationTime)&&c.showDuration){"function"==typeof c.step?"function":c.step;g.addClass("ui-timepicker-with-duration"),g.addClass("ui-timepicker-step-"+c.step)}var l=c.minTime;"function"==typeof c.durationTime?l=t(c.durationTime()):null!==c.durationTime&&(l=c.durationTime);var m=null!==c.minTime?c.minTime:0,o=null!==c.maxTime?c.maxTime:m+v-1;m>o&&(o+=v),o===v-1&&"string"===a.type(c.timeFormat)&&c.show2400&&(o=v);var p=c.disableTimeRanges,u=0,w=p.length,y=c.step;"function"!=typeof y&&(y=function(){return c.step});for(var h=m,z=0;o>=h;z++,h+=60*y(z)){var A=h,B=s(A,c);if(c.useSelect){var C=a("<option />",{value:B});C.text(B)}else{var C=a("<li />");C.addClass(43200>A%86400?"ui-timepicker-am":"ui-timepicker-pm"),C.data("time",86400>=A?A:A%86400),C.text(B)}if((null!==c.minTime||null!==c.durationTime)&&c.showDuration){var D=r(h-l,c.step);if(c.useSelect)C.text(C.text()+" ("+D+")");else{var E=a("<span />",{"class":"ui-timepicker-duration"});E.text(" ("+D+")"),C.append(E)}}w>u&&(A>=p[u][1]&&(u+=1),p[u]&&A>=p[u][0]&&A<p[u][1]&&(c.useSelect?C.prop("disabled",!0):C.addClass("ui-timepicker-disabled"))),d.append(C)}if(g.data("timepicker-input",b),b.data("timepicker-list",g),c.useSelect)b.val()&&d.val(f(t(b.val()),c)),d.on("focus",function(){a(this).data("timepicker-input").trigger("showTimepicker")}),d.on("blur",function(){a(this).data("timepicker-input").trigger("hideTimepicker")}),d.on("change",function(){n(b,a(this).val(),"select")}),n(b,d.val(),"initial"),b.hide().after(d);else{var F=c.appendTo;"string"==typeof F?F=a(F):"function"==typeof F&&(F=F(b)),F.append(g),k(b,d),d.on("mousedown","li",function(c){b.off("focus.timepicker"),b.on("focus.timepicker-ie-hack",function(){b.off("focus.timepicker-ie-hack"),b.on("focus.timepicker",x.show)}),i(b)||b[0].focus(),d.find("li").removeClass("ui-timepicker-selected"),a(this).addClass("ui-timepicker-selected"),q(b)&&(b.trigger("hideTimepicker"),d.on("mouseup.timepicker","li",function(a){d.off("mouseup.timepicker"),g.hide()}))})}}function e(b,c){var d,e,f;return"object"==typeof b?(d=b.label,e=b.className,f=b.value):"string"==typeof b?d=b:a.error("Invalid noneOption value"),c?a("<option />",{value:f,"class":e,text:d}):a("<li />",{"class":e,text:d}).data("time",f)}function f(a,b){return a=b.roundingFunction(a,b),null!==a?s(a,b):void 0}function g(){return new Date(1970,0,1,0,0,0)}function h(b){var c=a(b.target),d=c.closest(".ui-timepicker-input");0===d.length&&0===c.closest(".ui-timepicker-wrapper").length&&(x.hide(),a(document).unbind(".ui-timepicker"),a(window).unbind(".ui-timepicker"))}function i(a){var b=a.data("timepicker-settings");return(window.navigator.msMaxTouchPoints||"ontouchstart"in document)&&b.disableTouchKeyboard}function j(b,c,d){if(!d&&0!==d)return!1;var e=b.data("timepicker-settings"),f=!1,d=e.roundingFunction(d,e);return c.find("li").each(function(b,c){var e=a(c);if("number"==typeof e.data("time"))return e.data("time")==d?(f=e,!1):void 0}),f}function k(a,b){b.find("li").removeClass("ui-timepicker-selected");var c=t(m(a),a.data("timepicker-settings"));if(null!==c){var d=j(a,b,c);if(d){var e=d.offset().top-b.offset().top;(e+d.outerHeight()>b.outerHeight()||0>e)&&b.scrollTop(b.scrollTop()+d.position().top-d.outerHeight()),d.addClass("ui-timepicker-selected")}}}function l(b,c){if(""!==this.value&&"timepicker"!=c){var d=a(this);if(!d.is(":focus")||b&&"change"==b.type){var e=d.data("timepicker-settings"),f=t(this.value,e);if(null===f)return void d.trigger("timeFormatError");var g=!1;null!==e.minTime&&f<e.minTime?g=!0:null!==e.maxTime&&f>e.maxTime&&(g=!0),a.each(e.disableTimeRanges,function(){return f>=this[0]&&f<this[1]?(g=!0,!1):void 0}),e.forceRoundTime&&(f=e.roundingFunction(f,e));var h=s(f,e);g?n(d,h,"error")&&d.trigger("timeRangeError"):n(d,h)}}}function m(a){return a.is("input")?a.val():a.data("ui-timepicker-value")}function n(a,b,c){if(a.is("input")){a.val(b);var d=a.data("timepicker-settings");d.useSelect&&"select"!=c&&"initial"!=c&&a.data("timepicker-list").val(f(t(b),d))}return a.data("ui-timepicker-value")!=b?(a.data("ui-timepicker-value",b),"select"==c?a.trigger("selectTime").trigger("changeTime").trigger("change","timepicker"):"error"!=c&&a.trigger("changeTime"),!0):(a.trigger("selectTime"),!1)}function o(c){var d=a(this),e=d.data("timepicker-list");if(!e||!b(e)){if(40!=c.keyCode)return!0;x.show.call(d.get(0)),e=d.data("timepicker-list"),i(d)||d.focus()}switch(c.keyCode){case 13:return q(d)&&x.hide.apply(this),c.preventDefault(),!1;case 38:var f=e.find(".ui-timepicker-selected");return f.length?f.is(":first-child")||(f.removeClass("ui-timepicker-selected"),f.prev().addClass("ui-timepicker-selected"),f.prev().position().top<f.outerHeight()&&e.scrollTop(e.scrollTop()-f.outerHeight())):(e.find("li").each(function(b,c){return a(c).position().top>0?(f=a(c),!1):void 0}),f.addClass("ui-timepicker-selected")),!1;case 40:return f=e.find(".ui-timepicker-selected"),0===f.length?(e.find("li").each(function(b,c){return a(c).position().top>0?(f=a(c),!1):void 0}),f.addClass("ui-timepicker-selected")):f.is(":last-child")||(f.removeClass("ui-timepicker-selected"),f.next().addClass("ui-timepicker-selected"),f.next().position().top+2*f.outerHeight()>e.outerHeight()&&e.scrollTop(e.scrollTop()+f.outerHeight())),!1;case 27:e.find("li").removeClass("ui-timepicker-selected"),x.hide();break;case 9:x.hide();break;default:return!0}}function p(c){var d=a(this),e=d.data("timepicker-list"),f=d.data("timepicker-settings");if(!e||!b(e)||f.disableTextInput)return!0;switch(c.keyCode){case 96:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 65:case 77:case 80:case 186:case 8:case 46:f.typeaheadHighlight?k(d,e):e.hide()}}function q(a){var b=a.data("timepicker-settings"),c=a.data("timepicker-list"),d=null,e=c.find(".ui-timepicker-selected");return e.hasClass("ui-timepicker-disabled")?!1:(e.length&&(d=e.data("time")),null!==d&&("string"!=typeof d&&(d=s(d,b)),n(a,d,"select")),!0)}function r(a,b){a=Math.abs(a);var c,d,e=Math.round(a/60),f=[];return 60>e?f=[e,w.mins]:(c=Math.floor(e/60),d=e%60,30==b&&30==d&&(c+=w.decimal+5),f.push(c),f.push(1==c?w.hr:w.hrs),30!=b&&d&&(f.push(d),f.push(w.mins))),f.join(" ")}function s(b,c){if(null===b)return null;var d=new Date(u.valueOf()+1e3*b);if(isNaN(d.getTime()))return null;if("function"===a.type(c.timeFormat))return c.timeFormat(d);for(var e,f,g="",h=0;h<c.timeFormat.length;h++)switch(f=c.timeFormat.charAt(h)){case"a":g+=d.getHours()>11?w.pm:w.am;break;case"A":g+=d.getHours()>11?w.PM:w.AM;break;case"g":e=d.getHours()%12,g+=0===e?"12":e;break;case"G":e=d.getHours(),b===v&&(e=24),g+=e;break;case"h":e=d.getHours()%12,0!==e&&10>e&&(e="0"+e),g+=0===e?"12":e;break;case"H":e=d.getHours(),b===v&&(e=c.show2400?24:0),g+=e>9?e:"0"+e;break;case"i":var i=d.getMinutes();g+=i>9?i:"0"+i;break;case"s":b=d.getSeconds(),g+=b>9?b:"0"+b;break;case"\\":h++,g+=c.timeFormat.charAt(h);break;default:g+=f}return g}function t(a,b){if(""===a)return null;if(!a||a+0==a)return a;if("object"==typeof a)return 3600*a.getHours()+60*a.getMinutes()+a.getSeconds();a=a.toLowerCase().replace(/[\s\.]/g,""),("a"==a.slice(-1)||"p"==a.slice(-1))&&(a+="m");var c="("+w.am.replace(".","")+"|"+w.pm.replace(".","")+"|"+w.AM.replace(".","")+"|"+w.PM.replace(".","")+")?",d=new RegExp("^"+c+"([0-9]?[0-9])\\W?([0-5][0-9])?\\W?([0-5][0-9])?"+c+"$"),e=a.match(d);if(!e)return null;var f=parseInt(1*e[2],10),g=f>24?f%24:f,h=e[1]||e[5],i=g;if(12>=g&&h){var j=h==w.pm||h==w.PM;i=12==g?j?12:0:g+(j?12:0)}var k=1*e[3]||0,l=1*e[4]||0,m=3600*i+60*k+l;if(12>g&&!h&&b&&b._twelveHourTime&&b.scrollDefault){var n=m-b.scrollDefault();0>n&&n>=v/-2&&(m=(m+v/2)%v)}return m}var u=g(),v=86400,w={am:"am",pm:"pm",AM:"AM",PM:"PM",decimal:".",mins:"mins",hr:"hr",hrs:"hrs"},x={init:function(b){return this.each(function(){var e=a(this),f=[];for(var g in a.fn.timepicker.defaults)e.data(g)&&(f[g]=e.data(g));var h=a.extend({},a.fn.timepicker.defaults,f,b);if(h.lang&&(w=a.extend(w,h.lang)),h=c(h),e.data("timepicker-settings",h),e.addClass("ui-timepicker-input"),h.useSelect)d(e);else{if(e.prop("autocomplete","off"),h.showOn)for(var i in h.showOn)e.on(h.showOn[i]+".timepicker",x.show);e.on("change.timepicker",l),e.on("keydown.timepicker",o),e.on("keyup.timepicker",p),h.disableTextInput&&e.on("keydown.timepicker",function(a){a.preventDefault()}),l.call(e.get(0))}})},show:function(c){var e=a(this),f=e.data("timepicker-settings");if(c&&c.preventDefault(),f.useSelect)return void e.data("timepicker-list").focus();i(e)&&e.blur();var g=e.data("timepicker-list");if(!e.prop("readonly")&&(g&&0!==g.length&&"function"!=typeof f.durationTime||(d(e),g=e.data("timepicker-list")),!b(g))){e.data("ui-timepicker-value",e.val()),k(e,g),x.hide(),g.show();var l={};f.orientation.match(/r/)?l.left=e.offset().left+e.outerWidth()-g.outerWidth()+parseInt(g.css("marginLeft").replace("px",""),10):l.left=e.offset().left+parseInt(g.css("marginLeft").replace("px",""),10);var n;n=f.orientation.match(/t/)?"t":f.orientation.match(/b/)?"b":e.offset().top+e.outerHeight(!0)+g.outerHeight()>a(window).height()+a(window).scrollTop()?"t":"b","t"==n?(g.addClass("ui-timepicker-positioned-top"),l.top=e.offset().top-g.outerHeight()+parseInt(g.css("marginTop").replace("px",""),10)):(g.removeClass("ui-timepicker-positioned-top"),l.top=e.offset().top+e.outerHeight()+parseInt(g.css("marginTop").replace("px",""),10)),g.offset(l);var o=g.find(".ui-timepicker-selected");if(!o.length){var p=t(m(e));null!==p?o=j(e,g,p):f.scrollDefault&&(o=j(e,g,f.scrollDefault()))}if(o&&o.length){var q=g.scrollTop()+o.position().top-o.outerHeight();g.scrollTop(q)}else g.scrollTop(0);return f.stopScrollPropagation&&a(document).on("wheel.ui-timepicker",".ui-timepicker-wrapper",function(b){b.preventDefault();var c=a(this).scrollTop();a(this).scrollTop(c+b.originalEvent.deltaY)}),a(document).on("touchstart.ui-timepicker mousedown.ui-timepicker",h),a(window).on("resize.ui-timepicker",h),f.closeOnWindowScroll&&a(document).on("scroll.ui-timepicker",h),e.trigger("showTimepicker"),this}},hide:function(c){var d=a(this),e=d.data("timepicker-settings");return e&&e.useSelect&&d.blur(),a(".ui-timepicker-wrapper").each(function(){var c=a(this);if(b(c)){var d=c.data("timepicker-input"),e=d.data("timepicker-settings");e&&e.selectOnBlur&&q(d),c.hide(),d.trigger("hideTimepicker")}}),this},option:function(b,e){return this.each(function(){var f=a(this),g=f.data("timepicker-settings"),h=f.data("timepicker-list");if("object"==typeof b)g=a.extend(g,b);else if("string"==typeof b&&"undefined"!=typeof e)g[b]=e;else if("string"==typeof b)return g[b];g=c(g),f.data("timepicker-settings",g),h&&(h.remove(),f.data("timepicker-list",!1)),g.useSelect&&d(f)})},getSecondsFromMidnight:function(){return t(m(this))},getTime:function(a){var b=this,c=m(b);if(!c)return null;var d=t(c);if(null===d)return null;a||(a=u);var e=new Date(a);return e.setHours(d/3600),e.setMinutes(d%3600/60),e.setSeconds(d%60),e.setMilliseconds(0),e},setTime:function(a){var b=this,c=b.data("timepicker-settings");if(c.forceRoundTime)var d=f(t(a),c);else var d=s(t(a),c);return a&&null===d&&c.noneOption&&(d=a),n(b,d),b.data("timepicker-list")&&k(b,b.data("timepicker-list")),this},remove:function(){var a=this;if(a.hasClass("ui-timepicker-input")){var b=a.data("timepicker-settings");return a.removeAttr("autocomplete","off"),a.removeClass("ui-timepicker-input"),a.removeData("timepicker-settings"),a.off(".timepicker"),a.data("timepicker-list")&&a.data("timepicker-list").remove(),b.useSelect&&a.show(),a.removeData("timepicker-list"),this}}};a.fn.timepicker=function(b){return this.length?x[b]?this.hasClass("ui-timepicker-input")?x[b].apply(this,Array.prototype.slice.call(arguments,1)):this:"object"!=typeof b&&b?void a.error("Method "+b+" does not exist on jQuery.timepicker"):x.init.apply(this,arguments):this},a.fn.timepicker.defaults={appendTo:"body",className:null,closeOnWindowScroll:!1,disableTextInput:!1,disableTimeRanges:[],disableTouchKeyboard:!1,durationTime:null,forceRoundTime:!1,maxTime:null,minTime:null,noneOption:!1,orientation:"l",roundingFunction:function(a,b){if(null===a)return null;if("number"!=typeof b.step)return a;var c=a%(60*b.step);return c>=30*b.step?a+=60*b.step-c:a-=c,a},scrollDefault:null,selectOnBlur:!1,show2400:!1,showDuration:!1,showOn:["click","focus"],showOnFocus:!0,step:30,stopScrollPropagation:!1,timeFormat:"g:ia",typeaheadHighlight:!0,useSelect:!1}});
admin/js/min/jquery.qtip.min.js CHANGED
@@ -1,14 +1,14 @@
1
- /*
2
- * qTip2 - Pretty powerful tooltips - v2.2.1
3
- * http://qtip2.com
4
- *
5
- * Copyright (c) 2014
6
- * Released under the MIT licenses
7
- * http://jquery.org/license
8
- *
9
- * Date: Sat Sep 6 2014 06:25 EDT-0400
10
- * Plugins: tips viewport imagemap svg modal ie6
11
- * Styles: core basic css3
12
- */
13
- !function(t,e,i){!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):jQuery&&!jQuery.fn.qtip&&t(jQuery)}(function(s){"use strict";function o(t,e,i,o){this.id=i,this.target=t,this.tooltip=k,this.elements={target:t},this._id=R+"-"+i,this.timers={img:{}},this.options=e,this.plugins={},this.cache={event:{},target:s(),disabled:I,attr:o,onTooltip:I,lastClass:""},this.rendered=this.destroyed=this.disabled=this.waiting=this.hiddenDuringWait=this.positioning=this.triggering=I}function n(t){return t===k||"object"!==s.type(t)}function r(t){return!(s.isFunction(t)||t&&t.attr||t.length||"object"===s.type(t)&&(t.jquery||t.then))}function a(t){var e,i,o,a;return n(t)?I:(n(t.metadata)&&(t.metadata={type:t.metadata}),"content"in t&&(e=t.content,n(e)||e.jquery||e.done?e=t.content={text:i=r(e)?I:e}:i=e.text,"ajax"in e&&(o=e.ajax,a=o&&o.once!==I,delete e.ajax,e.text=function(t,e){var n=i||s(this).attr(e.options.content.attr)||"Loading...",r=s.ajax(s.extend({},o,{context:e})).then(o.success,k,o.error).then(function(t){return t&&a&&e.set("content.text",t),t},function(t,i,s){e.destroyed||0===t.status||e.set("content.text",i+": "+s)});return a?n:(e.set("content.text",n),r)}),"title"in e&&(s.isPlainObject(e.title)&&(e.button=e.title.button,e.title=e.title.text),r(e.title||I)&&(e.title=I))),"position"in t&&n(t.position)&&(t.position={my:t.position,at:t.position}),"show"in t&&n(t.show)&&(t.show=t.show.jquery?{target:t.show}:t.show===W?{ready:W}:{event:t.show}),"hide"in t&&n(t.hide)&&(t.hide=t.hide.jquery?{target:t.hide}:{event:t.hide}),"style"in t&&n(t.style)&&(t.style={classes:t.style}),s.each(V,function(){this.sanitize&&this.sanitize(t)}),t)}function h(t,e){for(var i,s=0,o=t,n=e.split(".");o=o[n[s++]];)s<n.length&&(i=o);return[i||t,n.pop()]}function l(t,e){var i,s,o;for(i in this.checks)for(s in this.checks[i])(o=new RegExp(s,"i").exec(t))&&(e.push(o),("builtin"===i||this.plugins[i])&&this.checks[i][s].apply(this.plugins[i]||this,e))}function c(t){return Y.concat("").join(t?"-"+t+" ":" ")}function d(t,e){return e>0?setTimeout(s.proxy(t,this),e):void t.call(this)}function p(t){this.tooltip.hasClass(te)||(clearTimeout(this.timers.show),clearTimeout(this.timers.hide),this.timers.show=d.call(this,function(){this.toggle(W,t)},this.options.show.delay))}function u(t){if(!this.tooltip.hasClass(te)&&!this.destroyed){var e=s(t.relatedTarget),i=e.closest(G)[0]===this.tooltip[0],o=e[0]===this.options.show.target[0];if(clearTimeout(this.timers.show),clearTimeout(this.timers.hide),this!==e[0]&&"mouse"===this.options.position.target&&i||this.options.hide.fixed&&/mouse(out|leave|move)/.test(t.type)&&(i||o))try{t.preventDefault(),t.stopImmediatePropagation()}catch(n){}else this.timers.hide=d.call(this,function(){this.toggle(I,t)},this.options.hide.delay,this)}}function f(t){!this.tooltip.hasClass(te)&&this.options.hide.inactive&&(clearTimeout(this.timers.inactive),this.timers.inactive=d.call(this,function(){this.hide(t)},this.options.hide.inactive))}function g(t){this.rendered&&this.tooltip[0].offsetWidth>0&&this.reposition(t)}function m(t,i,o){s(e.body).delegate(t,(i.split?i:i.join("."+R+" "))+"."+R,function(){var t=q.api[s.attr(this,X)];t&&!t.disabled&&o.apply(t,arguments)})}function v(t,i,n){var r,h,l,c,d,p=s(e.body),u=t[0]===e?p:t,f=t.metadata?t.metadata(n.metadata):k,g="html5"===n.metadata.type&&f?f[n.metadata.name]:k,m=t.data(n.metadata.name||"qtipopts");try{m="string"==typeof m?s.parseJSON(m):m}catch(v){}if(c=s.extend(W,{},q.defaults,n,"object"==typeof m?a(m):k,a(g||f)),h=c.position,c.id=i,"boolean"==typeof c.content.text){if(l=t.attr(c.content.attr),c.content.attr===I||!l)return I;c.content.text=l}if(h.container.length||(h.container=p),h.target===I&&(h.target=u),c.show.target===I&&(c.show.target=u),c.show.solo===W&&(c.show.solo=h.container.closest("body")),c.hide.target===I&&(c.hide.target=u),c.position.viewport===W&&(c.position.viewport=h.container),h.container=h.container.eq(0),h.at=new j(h.at,W),h.my=new j(h.my),t.data(R))if(c.overwrite)t.qtip("destroy",!0);else if(c.overwrite===I)return I;return t.attr(H,i),c.suppress&&(d=t.attr("title"))&&t.removeAttr("title").attr(ie,d).attr("title",""),r=new o(t,c,i,!!l),t.data(R,r),r}function y(t){return t.charAt(0).toUpperCase()+t.slice(1)}function b(t,e){var s,o,n=e.charAt(0).toUpperCase()+e.slice(1),r=(e+" "+ve.join(n+" ")+n).split(" "),a=0;if(me[e])return t.css(me[e]);for(;s=r[a++];)if((o=t.css(s))!==i)return me[e]=s,o}function w(t,e){return Math.ceil(parseFloat(b(t,e)))}function _(t,e){this._ns="tip",this.options=e,this.offset=e.offset,this.size=[e.width,e.height],this.init(this.qtip=t)}function x(t,e){this.options=e,this._ns="-modal",this.init(this.qtip=t)}function C(t){this._ns="ie6",this.init(this.qtip=t)}var q,T,j,z,M,W=!0,I=!1,k=null,E="x",S="y",A="width",L="height",P="top",D="left",B="bottom",F="right",O="center",N="flipinvert",$="shift",V={},R="qtip",H="data-hasqtip",X="data-qtip-id",Y=["ui-widget","ui-tooltip"],G="."+R,U="click dblclick mousedown mouseup mousemove mouseleave mouseenter".split(" "),Q=R+"-fixed",J=R+"-default",K=R+"-focus",Z=R+"-hover",te=R+"-disabled",ee="_replacedByqTip",ie="oldtitle",se={ie:function(){for(var t=4,i=e.createElement("div");(i.innerHTML="<!--[if gt IE "+t+"]><i></i><![endif]-->")&&i.getElementsByTagName("i")[0];t+=1);return t>4?t:0/0}(),iOS:parseFloat((""+(/CPU.*OS ([0-9_]{1,5})|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_",".").replace("_",""))||I};T=o.prototype,T._when=function(t){return s.when.apply(s,t)},T.render=function(t){if(this.rendered||this.destroyed)return this;var e,i=this,o=this.options,n=this.cache,r=this.elements,a=o.content.text,h=o.content.title,l=o.content.button,c=o.position,d=("."+this._id+" ",[]);return s.attr(this.target[0],"aria-describedby",this._id),n.posClass=this._createPosClass((this.position={my:c.my,at:c.at}).my),this.tooltip=r.tooltip=e=s("<div/>",{id:this._id,"class":[R,J,o.style.classes,n.posClass].join(" "),width:o.style.width||"",height:o.style.height||"",tracking:"mouse"===c.target&&c.adjust.mouse,role:"alert","aria-live":"polite","aria-atomic":I,"aria-describedby":this._id+"-content","aria-hidden":W}).toggleClass(te,this.disabled).attr(X,this.id).data(R,this).appendTo(c.container).append(r.content=s("<div />",{"class":R+"-content",id:this._id+"-content","aria-atomic":W})),this.rendered=-1,this.positioning=W,h&&(this._createTitle(),s.isFunction(h)||d.push(this._updateTitle(h,I))),l&&this._createButton(),s.isFunction(a)||d.push(this._updateContent(a,I)),this.rendered=W,this._setWidget(),s.each(V,function(t){var e;"render"===this.initialize&&(e=this(i))&&(i.plugins[t]=e)}),this._unassignEvents(),this._assignEvents(),this._when(d).then(function(){i._trigger("render"),i.positioning=I,i.hiddenDuringWait||!o.show.ready&&!t||i.toggle(W,n.event,I),i.hiddenDuringWait=I}),q.api[this.id]=this,this},T.destroy=function(t){function e(){if(!this.destroyed){this.destroyed=W;var t,e=this.target,i=e.attr(ie);this.rendered&&this.tooltip.stop(1,0).find("*").remove().end().remove(),s.each(this.plugins,function(){this.destroy&&this.destroy()});for(t in this.timers)clearTimeout(this.timers[t]);e.removeData(R).removeAttr(X).removeAttr(H).removeAttr("aria-describedby"),this.options.suppress&&i&&e.attr("title",i).removeAttr(ie),this._unassignEvents(),this.options=this.elements=this.cache=this.timers=this.plugins=this.mouse=k,delete q.api[this.id]}}return this.destroyed?this.target:(t===W&&"hide"!==this.triggering||!this.rendered?e.call(this):(this.tooltip.one("tooltiphidden",s.proxy(e,this)),!this.triggering&&this.hide()),this.target)},z=T.checks={builtin:{"^id$":function(t,e,i,o){var n=i===W?q.nextid:i,r=R+"-"+n;n!==I&&n.length>0&&!s("#"+r).length?(this._id=r,this.rendered&&(this.tooltip[0].id=this._id,this.elements.content[0].id=this._id+"-content",this.elements.title[0].id=this._id+"-title")):t[e]=o},"^prerender":function(t,e,i){i&&!this.rendered&&this.render(this.options.show.ready)},"^content.text$":function(t,e,i){this._updateContent(i)},"^content.attr$":function(t,e,i,s){this.options.content.text===this.target.attr(s)&&this._updateContent(this.target.attr(i))},"^content.title$":function(t,e,i){return i?(i&&!this.elements.title&&this._createTitle(),void this._updateTitle(i)):this._removeTitle()},"^content.button$":function(t,e,i){this._updateButton(i)},"^content.title.(text|button)$":function(t,e,i){this.set("content."+e,i)},"^position.(my|at)$":function(t,e,i){"string"==typeof i&&(this.position[e]=t[e]=new j(i,"at"===e))},"^position.container$":function(t,e,i){this.rendered&&this.tooltip.appendTo(i)},"^show.ready$":function(t,e,i){i&&(!this.rendered&&this.render(W)||this.toggle(W))},"^style.classes$":function(t,e,i,s){this.rendered&&this.tooltip.removeClass(s).addClass(i)},"^style.(width|height)":function(t,e,i){this.rendered&&this.tooltip.css(e,i)},"^style.widget|content.title":function(){this.rendered&&this._setWidget()},"^style.def":function(t,e,i){this.rendered&&this.tooltip.toggleClass(J,!!i)},"^events.(render|show|move|hide|focus|blur)$":function(t,e,i){this.rendered&&this.tooltip[(s.isFunction(i)?"":"un")+"bind"]("tooltip"+e,i)},"^(show|hide|position).(event|target|fixed|inactive|leave|distance|viewport|adjust)":function(){if(this.rendered){var t=this.options.position;this.tooltip.attr("tracking","mouse"===t.target&&t.adjust.mouse),this._unassignEvents(),this._assignEvents()}}}},T.get=function(t){if(this.destroyed)return this;var e=h(this.options,t.toLowerCase()),i=e[0][e[1]];return i.precedance?i.string():i};var oe=/^position\.(my|at|adjust|target|container|viewport)|style|content|show\.ready/i,ne=/^prerender|show\.ready/i;T.set=function(t,e){if(this.destroyed)return this;{var i,o=this.rendered,n=I,r=this.options;this.checks}return"string"==typeof t?(i=t,t={},t[i]=e):t=s.extend({},t),s.each(t,function(e,i){if(o&&ne.test(e))return void delete t[e];var a,l=h(r,e.toLowerCase());a=l[0][l[1]],l[0][l[1]]=i&&i.nodeType?s(i):i,n=oe.test(e)||n,t[e]=[l[0],l[1],i,a]}),a(r),this.positioning=W,s.each(t,s.proxy(l,this)),this.positioning=I,this.rendered&&this.tooltip[0].offsetWidth>0&&n&&this.reposition("mouse"===r.position.target?k:this.cache.event),this},T._update=function(t,e){var i=this,o=this.cache;return this.rendered&&t?(s.isFunction(t)&&(t=t.call(this.elements.target,o.event,this)||""),s.isFunction(t.then)?(o.waiting=W,t.then(function(t){return o.waiting=I,i._update(t,e)},k,function(t){return i._update(t,e)})):t===I||!t&&""!==t?I:(t.jquery&&t.length>0?e.empty().append(t.css({display:"block",visibility:"visible"})):e.html(t),this._waitForContent(e).then(function(t){i.rendered&&i.tooltip[0].offsetWidth>0&&i.reposition(o.event,!t.length)}))):I},T._waitForContent=function(t){var e=this.cache;return e.waiting=W,(s.fn.imagesLoaded?t.imagesLoaded():s.Deferred().resolve([])).done(function(){e.waiting=I}).promise()},T._updateContent=function(t,e){this._update(t,this.elements.content,e)},T._updateTitle=function(t,e){this._update(t,this.elements.title,e)===I&&this._removeTitle(I)},T._createTitle=function(){var t=this.elements,e=this._id+"-title";t.titlebar&&this._removeTitle(),t.titlebar=s("<div />",{"class":R+"-titlebar "+(this.options.style.widget?c("header"):"")}).append(t.title=s("<div />",{id:e,"class":R+"-title","aria-atomic":W})).insertBefore(t.content).delegate(".qtip-close","mousedown keydown mouseup keyup mouseout",function(t){s(this).toggleClass("ui-state-active ui-state-focus","down"===t.type.substr(-4))}).delegate(".qtip-close","mouseover mouseout",function(t){s(this).toggleClass("ui-state-hover","mouseover"===t.type)}),this.options.content.button&&this._createButton()},T._removeTitle=function(t){var e=this.elements;e.title&&(e.titlebar.remove(),e.titlebar=e.title=e.button=k,t!==I&&this.reposition())},T._createPosClass=function(t){return R+"-pos-"+(t||this.options.position.my).abbrev()},T.reposition=function(i,o){if(!this.rendered||this.positioning||this.destroyed)return this;this.positioning=W;var n,r,a,h,l=this.cache,c=this.tooltip,d=this.options.position,p=d.target,u=d.my,f=d.at,g=d.viewport,m=d.container,v=d.adjust,y=v.method.split(" "),b=c.outerWidth(I),w=c.outerHeight(I),_=0,x=0,C=c.css("position"),q={left:0,top:0},T=c[0].offsetWidth>0,j=i&&"scroll"===i.type,z=s(t),M=m[0].ownerDocument,k=this.mouse;if(s.isArray(p)&&2===p.length)f={x:D,y:P},q={left:p[0],top:p[1]};else if("mouse"===p)f={x:D,y:P},(!v.mouse||this.options.hide.distance)&&l.origin&&l.origin.pageX?i=l.origin:!i||i&&("resize"===i.type||"scroll"===i.type)?i=l.event:k&&k.pageX&&(i=k),"static"!==C&&(q=m.offset()),M.body.offsetWidth!==(t.innerWidth||M.documentElement.clientWidth)&&(r=s(e.body).offset()),q={left:i.pageX-q.left+(r&&r.left||0),top:i.pageY-q.top+(r&&r.top||0)},v.mouse&&j&&k&&(q.left-=(k.scrollX||0)-z.scrollLeft(),q.top-=(k.scrollY||0)-z.scrollTop());else{if("event"===p?i&&i.target&&"scroll"!==i.type&&"resize"!==i.type?l.target=s(i.target):i.target||(l.target=this.elements.target):"event"!==p&&(l.target=s(p.jquery?p:this.elements.target)),p=l.target,p=s(p).eq(0),0===p.length)return this;p[0]===e||p[0]===t?(_=se.iOS?t.innerWidth:p.width(),x=se.iOS?t.innerHeight:p.height(),p[0]===t&&(q={top:(g||p).scrollTop(),left:(g||p).scrollLeft()})):V.imagemap&&p.is("area")?n=V.imagemap(this,p,f,V.viewport?y:I):V.svg&&p&&p[0].ownerSVGElement?n=V.svg(this,p,f,V.viewport?y:I):(_=p.outerWidth(I),x=p.outerHeight(I),q=p.offset()),n&&(_=n.width,x=n.height,r=n.offset,q=n.position),q=this.reposition.offset(p,q,m),(se.iOS>3.1&&se.iOS<4.1||se.iOS>=4.3&&se.iOS<4.33||!se.iOS&&"fixed"===C)&&(q.left-=z.scrollLeft(),q.top-=z.scrollTop()),(!n||n&&n.adjustable!==I)&&(q.left+=f.x===F?_:f.x===O?_/2:0,q.top+=f.y===B?x:f.y===O?x/2:0)}return q.left+=v.x+(u.x===F?-b:u.x===O?-b/2:0),q.top+=v.y+(u.y===B?-w:u.y===O?-w/2:0),V.viewport?(a=q.adjusted=V.viewport(this,q,d,_,x,b,w),r&&a.left&&(q.left+=r.left),r&&a.top&&(q.top+=r.top),a.my&&(this.position.my=a.my)):q.adjusted={left:0,top:0},l.posClass!==(h=this._createPosClass(this.position.my))&&c.removeClass(l.posClass).addClass(l.posClass=h),this._trigger("move",[q,g.elem||g],i)?(delete q.adjusted,o===I||!T||isNaN(q.left)||isNaN(q.top)||"mouse"===p||!s.isFunction(d.effect)?c.css(q):s.isFunction(d.effect)&&(d.effect.call(c,this,s.extend({},q)),c.queue(function(t){s(this).css({opacity:"",height:""}),se.ie&&this.style.removeAttribute("filter"),t()})),this.positioning=I,this):this},T.reposition.offset=function(t,i,o){function n(t,e){i.left+=e*t.scrollLeft(),i.top+=e*t.scrollTop()}if(!o[0])return i;var r,a,h,l,c=s(t[0].ownerDocument),d=!!se.ie&&"CSS1Compat"!==e.compatMode,p=o[0];do"static"!==(a=s.css(p,"position"))&&("fixed"===a?(h=p.getBoundingClientRect(),n(c,-1)):(h=s(p).position(),h.left+=parseFloat(s.css(p,"borderLeftWidth"))||0,h.top+=parseFloat(s.css(p,"borderTopWidth"))||0),i.left-=h.left+(parseFloat(s.css(p,"marginLeft"))||0),i.top-=h.top+(parseFloat(s.css(p,"marginTop"))||0),r||"hidden"===(l=s.css(p,"overflow"))||"visible"===l||(r=s(p)));while(p=p.offsetParent);return r&&(r[0]!==c[0]||d)&&n(r,1),i};var re=(j=T.reposition.Corner=function(t,e){t=(""+t).replace(/([A-Z])/," $1").replace(/middle/gi,O).toLowerCase(),this.x=(t.match(/left|right/i)||t.match(/center/)||["inherit"])[0].toLowerCase(),this.y=(t.match(/top|bottom|center/i)||["inherit"])[0].toLowerCase(),this.forceY=!!e;var i=t.charAt(0);this.precedance="t"===i||"b"===i?S:E}).prototype;re.invert=function(t,e){this[t]=this[t]===D?F:this[t]===F?D:e||this[t]},re.string=function(t){var e=this.x,i=this.y,s=e!==i?"center"===e||"center"!==i&&(this.precedance===S||this.forceY)?[i,e]:[e,i]:[e];return t!==!1?s.join(" "):s},re.abbrev=function(){var t=this.string(!1);return t[0].charAt(0)+(t[1]&&t[1].charAt(0)||"")},re.clone=function(){return new j(this.string(),this.forceY)},T.toggle=function(t,i){var o=this.cache,n=this.options,r=this.tooltip;if(i){if(/over|enter/.test(i.type)&&o.event&&/out|leave/.test(o.event.type)&&n.show.target.add(i.target).length===n.show.target.length&&r.has(i.relatedTarget).length)return this;o.event=s.event.fix(i)}if(this.waiting&&!t&&(this.hiddenDuringWait=W),!this.rendered)return t?this.render(1):this;if(this.destroyed||this.disabled)return this;var a,h,l,c=t?"show":"hide",d=this.options[c],p=(this.options[t?"hide":"show"],this.options.position),u=this.options.content,f=this.tooltip.css("width"),g=this.tooltip.is(":visible"),m=t||1===d.target.length,v=!i||d.target.length<2||o.target[0]===i.target;return(typeof t).search("boolean|number")&&(t=!g),a=!r.is(":animated")&&g===t&&v,h=a?k:!!this._trigger(c,[90]),this.destroyed?this:(h!==I&&t&&this.focus(i),!h||a?this:(s.attr(r[0],"aria-hidden",!t),t?(this.mouse&&(o.origin=s.event.fix(this.mouse)),s.isFunction(u.text)&&this._updateContent(u.text,I),s.isFunction(u.title)&&this._updateTitle(u.title,I),!M&&"mouse"===p.target&&p.adjust.mouse&&(s(e).bind("mousemove."+R,this._storeMouse),M=W),f||r.css("width",r.outerWidth(I)),this.reposition(i,arguments[2]),f||r.css("width",""),d.solo&&("string"==typeof d.solo?s(d.solo):s(G,d.solo)).not(r).not(d.target).qtip("hide",s.Event("tooltipsolo"))):(clearTimeout(this.timers.show),delete o.origin,M&&!s(G+'[tracking="true"]:visible',d.solo).not(r).length&&(s(e).unbind("mousemove."+R),M=I),this.blur(i)),l=s.proxy(function(){t?(se.ie&&r[0].style.removeAttribute("filter"),r.css("overflow",""),"string"==typeof d.autofocus&&s(this.options.show.autofocus,r).focus(),this.options.show.target.trigger("qtip-"+this.id+"-inactive")):r.css({display:"",visibility:"",opacity:"",left:"",top:""}),this._trigger(t?"visible":"hidden")},this),d.effect===I||m===I?(r[c](),l()):s.isFunction(d.effect)?(r.stop(1,1),d.effect.call(r,this),r.queue("fx",function(t){l(),t()})):r.fadeTo(90,t?1:0,l),t&&d.target.trigger("qtip-"+this.id+"-inactive"),this))},T.show=function(t){return this.toggle(W,t)},T.hide=function(t){return this.toggle(I,t)},T.focus=function(t){if(!this.rendered||this.destroyed)return this;var e=s(G),i=this.tooltip,o=parseInt(i[0].style.zIndex,10),n=q.zindex+e.length;return i.hasClass(K)||this._trigger("focus",[n],t)&&(o!==n&&(e.each(function(){this.style.zIndex>o&&(this.style.zIndex=this.style.zIndex-1)}),e.filter("."+K).qtip("blur",t)),i.addClass(K)[0].style.zIndex=n),this},T.blur=function(t){return!this.rendered||this.destroyed?this:(this.tooltip.removeClass(K),this._trigger("blur",[this.tooltip.css("zIndex")],t),this)},T.disable=function(t){return this.destroyed?this:("toggle"===t?t=!(this.rendered?this.tooltip.hasClass(te):this.disabled):"boolean"!=typeof t&&(t=W),this.rendered&&this.tooltip.toggleClass(te,t).attr("aria-disabled",t),this.disabled=!!t,this)},T.enable=function(){return this.disable(I)},T._createButton=function(){var t=this,e=this.elements,i=e.tooltip,o=this.options.content.button,n="string"==typeof o,r=n?o:"Close tooltip";e.button&&e.button.remove(),e.button=o.jquery?o:s("<a />",{"class":"qtip-close "+(this.options.style.widget?"":R+"-icon"),title:r,"aria-label":r}).prepend(s("<span />",{"class":"ui-icon ui-icon-close",html:"&times;"})),e.button.appendTo(e.titlebar||i).attr("role","button").click(function(e){return i.hasClass(te)||t.hide(e),I})},T._updateButton=function(t){if(!this.rendered)return I;var e=this.elements.button;t?this._createButton():e.remove()},T._setWidget=function(){var t=this.options.style.widget,e=this.elements,i=e.tooltip,s=i.hasClass(te);i.removeClass(te),te=t?"ui-state-disabled":"qtip-disabled",i.toggleClass(te,s),i.toggleClass("ui-helper-reset "+c(),t).toggleClass(J,this.options.style.def&&!t),e.content&&e.content.toggleClass(c("content"),t),e.titlebar&&e.titlebar.toggleClass(c("header"),t),e.button&&e.button.toggleClass(R+"-icon",!t)},T._storeMouse=function(t){return(this.mouse=s.event.fix(t)).type="mousemove",this},T._bind=function(t,e,i,o,n){if(t&&i&&e.length){var r="."+this._id+(o?"-"+o:"");return s(t).bind((e.split?e:e.join(r+" "))+r,s.proxy(i,n||this)),this}},T._unbind=function(t,e){return t&&s(t).unbind("."+this._id+(e?"-"+e:"")),this},T._trigger=function(t,e,i){var o=s.Event("tooltip"+t);return o.originalEvent=i&&s.extend({},i)||this.cache.event||k,this.triggering=t,this.tooltip.trigger(o,[this].concat(e||[])),this.triggering=I,!o.isDefaultPrevented()},T._bindEvents=function(t,e,i,o,n,r){var a=i.filter(o).add(o.filter(i)),h=[];a.length&&(s.each(e,function(e,i){var o=s.inArray(i,t);o>-1&&h.push(t.splice(o,1)[0])}),h.length&&(this._bind(a,h,function(t){var e=this.rendered?this.tooltip[0].offsetWidth>0:!1;(e?r:n).call(this,t)}),i=i.not(a),o=o.not(a))),this._bind(i,t,n),this._bind(o,e,r)},T._assignInitialEvents=function(t){function e(t){return this.disabled||this.destroyed?I:(this.cache.event=t&&s.event.fix(t),this.cache.target=t&&s(t.target),clearTimeout(this.timers.show),void(this.timers.show=d.call(this,function(){this.render("object"==typeof t||i.show.ready)},i.prerender?0:i.show.delay)))}var i=this.options,o=i.show.target,n=i.hide.target,r=i.show.event?s.trim(""+i.show.event).split(" "):[],a=i.hide.event?s.trim(""+i.hide.event).split(" "):[];this._bind(this.elements.target,["remove","removeqtip"],function(){this.destroy(!0)},"destroy"),/mouse(over|enter)/i.test(i.show.event)&&!/mouse(out|leave)/i.test(i.hide.event)&&a.push("mouseleave"),this._bind(o,"mousemove",function(t){this._storeMouse(t),this.cache.onTarget=W}),this._bindEvents(r,a,o,n,e,function(){return this.timers?void clearTimeout(this.timers.show):I}),(i.show.ready||i.prerender)&&e.call(this,t)},T._assignEvents=function(){var i=this,o=this.options,n=o.position,r=this.tooltip,a=o.show.target,h=o.hide.target,l=n.container,c=n.viewport,d=s(e),m=(s(e.body),s(t)),v=o.show.event?s.trim(""+o.show.event).split(" "):[],y=o.hide.event?s.trim(""+o.hide.event).split(" "):[];s.each(o.events,function(t,e){i._bind(r,"toggle"===t?["tooltipshow","tooltiphide"]:["tooltip"+t],e,null,r)}),/mouse(out|leave)/i.test(o.hide.event)&&"window"===o.hide.leave&&this._bind(d,["mouseout","blur"],function(t){/select|option/.test(t.target.nodeName)||t.relatedTarget||this.hide(t)}),o.hide.fixed?h=h.add(r.addClass(Q)):/mouse(over|enter)/i.test(o.show.event)&&this._bind(h,"mouseleave",function(){clearTimeout(this.timers.show)}),(""+o.hide.event).indexOf("unfocus")>-1&&this._bind(l.closest("html"),["mousedown","touchstart"],function(t){var e=s(t.target),i=this.rendered&&!this.tooltip.hasClass(te)&&this.tooltip[0].offsetWidth>0,o=e.parents(G).filter(this.tooltip[0]).length>0;e[0]===this.target[0]||e[0]===this.tooltip[0]||o||this.target.has(e[0]).length||!i||this.hide(t)}),"number"==typeof o.hide.inactive&&(this._bind(a,"qtip-"+this.id+"-inactive",f,"inactive"),this._bind(h.add(r),q.inactiveEvents,f)),this._bindEvents(v,y,a,h,p,u),this._bind(a.add(r),"mousemove",function(t){if("number"==typeof o.hide.distance){var e=this.cache.origin||{},i=this.options.hide.distance,s=Math.abs;(s(t.pageX-e.pageX)>=i||s(t.pageY-e.pageY)>=i)&&this.hide(t)}this._storeMouse(t)}),"mouse"===n.target&&n.adjust.mouse&&(o.hide.event&&this._bind(a,["mouseenter","mouseleave"],function(t){return this.cache?void(this.cache.onTarget="mouseenter"===t.type):I}),this._bind(d,"mousemove",function(t){this.rendered&&this.cache.onTarget&&!this.tooltip.hasClass(te)&&this.tooltip[0].offsetWidth>0&&this.reposition(t)})),(n.adjust.resize||c.length)&&this._bind(s.event.special.resize?c:m,"resize",g),n.adjust.scroll&&this._bind(m.add(n.container),"scroll",g)},T._unassignEvents=function(){var i=this.options,o=i.show.target,n=i.hide.target,r=s.grep([this.elements.target[0],this.rendered&&this.tooltip[0],i.position.container[0],i.position.viewport[0],i.position.container.closest("html")[0],t,e],function(t){return"object"==typeof t});o&&o.toArray&&(r=r.concat(o.toArray())),n&&n.toArray&&(r=r.concat(n.toArray())),this._unbind(r)._unbind(r,"destroy")._unbind(r,"inactive")},s(function(){m(G,["mouseenter","mouseleave"],function(t){var e="mouseenter"===t.type,i=s(t.currentTarget),o=s(t.relatedTarget||t.target),n=this.options;e?(this.focus(t),i.hasClass(Q)&&!i.hasClass(te)&&clearTimeout(this.timers.hide)):"mouse"===n.position.target&&n.position.adjust.mouse&&n.hide.event&&n.show.target&&!o.closest(n.show.target[0]).length&&this.hide(t),i.toggleClass(Z,e)}),m("["+X+"]",U,f)}),q=s.fn.qtip=function(t,e,o){var n=(""+t).toLowerCase(),r=k,h=s.makeArray(arguments).slice(1),l=h[h.length-1],c=this[0]?s.data(this[0],R):k;return!arguments.length&&c||"api"===n?c:"string"==typeof t?(this.each(function(){var t=s.data(this,R);if(!t)return W;if(l&&l.timeStamp&&(t.cache.event=l),!e||"option"!==n&&"options"!==n)t[n]&&t[n].apply(t,h);else{if(o===i&&!s.isPlainObject(e))return r=t.get(e),I;t.set(e,o)}}),r!==k?r:this):"object"!=typeof t&&arguments.length?void 0:(c=a(s.extend(W,{},t)),this.each(function(t){var e,i;return i=s.isArray(c.id)?c.id[t]:c.id,i=!i||i===I||i.length<1||q.api[i]?q.nextid++:i,e=v(s(this),i,c),e===I?W:(q.api[i]=e,s.each(V,function(){"initialize"===this.initialize&&this(e)}),void e._assignInitialEvents(l))}))},s.qtip=o,q.api={},s.each({attr:function(t,e){if(this.length){var i=this[0],o="title",n=s.data(i,"qtip");if(t===o&&n&&"object"==typeof n&&n.options.suppress)return arguments.length<2?s.attr(i,ie):(n&&n.options.content.attr===o&&n.cache.attr&&n.set("content.text",e),this.attr(ie,e))}return s.fn["attr"+ee].apply(this,arguments)},clone:function(t){var e=(s([]),s.fn["clone"+ee].apply(this,arguments));return t||e.filter("["+ie+"]").attr("title",function(){return s.attr(this,ie)}).removeAttr(ie),e}},function(t,e){if(!e||s.fn[t+ee])return W;var i=s.fn[t+ee]=s.fn[t];s.fn[t]=function(){return e.apply(this,arguments)||i.apply(this,arguments)}}),s.ui||(s["cleanData"+ee]=s.cleanData,s.cleanData=function(t){for(var e,i=0;(e=s(t[i])).length;i++)if(e.attr(H))try{e.triggerHandler("removeqtip")}catch(o){}s["cleanData"+ee].apply(this,arguments)}),q.version="2.2.1",q.nextid=0,q.inactiveEvents=U,q.zindex=15e3,q.defaults={prerender:I,id:I,overwrite:W,suppress:W,content:{text:W,attr:"title",title:I,button:I},position:{my:"top left",at:"bottom right",target:I,container:I,viewport:I,adjust:{x:0,y:0,mouse:W,scroll:W,resize:W,method:"flipinvert flipinvert"},effect:function(t,e){s(this).animate(e,{duration:200,queue:I})}},show:{target:I,event:"mouseenter",effect:W,delay:90,solo:I,ready:I,autofocus:I},hide:{target:I,event:"mouseleave",effect:W,delay:0,fixed:I,inactive:I,leave:"window",distance:I},style:{classes:"",widget:I,width:I,height:I,def:W},events:{render:k,move:k,show:k,hide:k,toggle:k,visible:k,hidden:k,focus:k,blur:k}};var ae,he="margin",le="border",ce="color",de="background-color",pe="transparent",ue=" !important",fe=!!e.createElement("canvas").getContext,ge=/rgba?\(0, 0, 0(, 0)?\)|transparent|#123456/i,me={},ve=["Webkit","O","Moz","ms"];if(fe)var ye=t.devicePixelRatio||1,be=function(){var t=e.createElement("canvas").getContext("2d");return t.backingStorePixelRatio||t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||1}(),we=ye/be;else var _e=function(t,e,i){return"<qtipvml:"+t+' xmlns="urn:schemas-microsoft.com:vml" class="qtip-vml" '+(e||"")+' style="behavior: url(#default#VML); '+(i||"")+'" />'};s.extend(_.prototype,{init:function(t){var e,i;i=this.element=t.elements.tip=s("<div />",{"class":R+"-tip"}).prependTo(t.tooltip),fe?(e=s("<canvas />").appendTo(this.element)[0].getContext("2d"),e.lineJoin="miter",e.miterLimit=1e5,e.save()):(e=_e("shape",'coordorigin="0,0"',"position:absolute;"),this.element.html(e+e),t._bind(s("*",i).add(i),["click","mousedown"],function(t){t.stopPropagation()},this._ns)),t._bind(t.tooltip,"tooltipmove",this.reposition,this._ns,this),this.create()},_swapDimensions:function(){this.size[0]=this.options.height,this.size[1]=this.options.width},_resetDimensions:function(){this.size[0]=this.options.width,this.size[1]=this.options.height},_useTitle:function(t){var e=this.qtip.elements.titlebar;return e&&(t.y===P||t.y===O&&this.element.position().top+this.size[1]/2+this.options.offset<e.outerHeight(W))},_parseCorner:function(t){var e=this.qtip.options.position.my;return t===I||e===I?t=I:t===W?t=new j(e.string()):t.string||(t=new j(t),t.fixed=W),t},_parseWidth:function(t,e,i){var s=this.qtip.elements,o=le+y(e)+"Width";return(i?w(i,o):w(s.content,o)||w(this._useTitle(t)&&s.titlebar||s.content,o)||w(s.tooltip,o))||0},_parseRadius:function(t){var e=this.qtip.elements,i=le+y(t.y)+y(t.x)+"Radius";return se.ie<9?0:w(this._useTitle(t)&&e.titlebar||e.content,i)||w(e.tooltip,i)||0},_invalidColour:function(t,e,i){var s=t.css(e);return!s||i&&s===t.css(i)||ge.test(s)?I:s},_parseColours:function(t){var e=this.qtip.elements,i=this.element.css("cssText",""),o=le+y(t[t.precedance])+y(ce),n=this._useTitle(t)&&e.titlebar||e.content,r=this._invalidColour,a=[];return a[0]=r(i,de)||r(n,de)||r(e.content,de)||r(e.tooltip,de)||i.css(de),a[1]=r(i,o,ce)||r(n,o,ce)||r(e.content,o,ce)||r(e.tooltip,o,ce)||e.tooltip.css(o),s("*",i).add(i).css("cssText",de+":"+pe+ue+";"+le+":0"+ue+";"),a},_calculateSize:function(t){var e,i,s,o=t.precedance===S,n=this.options.width,r=this.options.height,a="c"===t.abbrev(),h=(o?n:r)*(a?.5:1),l=Math.pow,c=Math.round,d=Math.sqrt(l(h,2)+l(r,2)),p=[this.border/h*d,this.border/r*d];return p[2]=Math.sqrt(l(p[0],2)-l(this.border,2)),p[3]=Math.sqrt(l(p[1],2)-l(this.border,2)),e=d+p[2]+p[3]+(a?0:p[0]),i=e/d,s=[c(i*n),c(i*r)],o?s:s.reverse()},_calculateTip:function(t,e,i){i=i||1,e=e||this.size;var s=e[0]*i,o=e[1]*i,n=Math.ceil(s/2),r=Math.ceil(o/2),a={br:[0,0,s,o,s,0],bl:[0,0,s,0,0,o],tr:[0,o,s,0,s,o],tl:[0,0,0,o,s,o],tc:[0,o,n,0,s,o],bc:[0,0,s,0,n,o],rc:[0,0,s,r,0,o],lc:[s,0,s,o,0,r]};return a.lt=a.br,a.rt=a.bl,a.lb=a.tr,a.rb=a.tl,a[t.abbrev()]},_drawCoords:function(t,e){t.beginPath(),t.moveTo(e[0],e[1]),t.lineTo(e[2],e[3]),t.lineTo(e[4],e[5]),t.closePath()},create:function(){var t=this.corner=(fe||se.ie)&&this._parseCorner(this.options.corner);return(this.enabled=!!this.corner&&"c"!==this.corner.abbrev())&&(this.qtip.cache.corner=t.clone(),this.update()),this.element.toggle(this.enabled),this.corner},update:function(e,i){if(!this.enabled)return this;var o,n,r,a,h,l,c,d,p=this.qtip.elements,u=this.element,f=u.children(),g=this.options,m=this.size,v=g.mimic,y=Math.round;e||(e=this.qtip.cache.corner||this.corner),v===I?v=e:(v=new j(v),v.precedance=e.precedance,"inherit"===v.x?v.x=e.x:"inherit"===v.y?v.y=e.y:v.x===v.y&&(v[e.precedance]=e[e.precedance])),n=v.precedance,e.precedance===E?this._swapDimensions():this._resetDimensions(),o=this.color=this._parseColours(e),o[1]!==pe?(d=this.border=this._parseWidth(e,e[e.precedance]),g.border&&1>d&&!ge.test(o[1])&&(o[0]=o[1]),this.border=d=g.border!==W?g.border:d):this.border=d=0,c=this.size=this._calculateSize(e),u.css({width:c[0],height:c[1],lineHeight:c[1]+"px"}),l=e.precedance===S?[y(v.x===D?d:v.x===F?c[0]-m[0]-d:(c[0]-m[0])/2),y(v.y===P?c[1]-m[1]:0)]:[y(v.x===D?c[0]-m[0]:0),y(v.y===P?d:v.y===B?c[1]-m[1]-d:(c[1]-m[1])/2)],fe?(r=f[0].getContext("2d"),r.restore(),r.save(),r.clearRect(0,0,6e3,6e3),a=this._calculateTip(v,m,we),h=this._calculateTip(v,this.size,we),f.attr(A,c[0]*we).attr(L,c[1]*we),f.css(A,c[0]).css(L,c[1]),this._drawCoords(r,h),r.fillStyle=o[1],r.fill(),r.translate(l[0]*we,l[1]*we),this._drawCoords(r,a),r.fillStyle=o[0],r.fill()):(a=this._calculateTip(v),a="m"+a[0]+","+a[1]+" l"+a[2]+","+a[3]+" "+a[4]+","+a[5]+" xe",l[2]=d&&/^(r|b)/i.test(e.string())?8===se.ie?2:1:0,f.css({coordsize:c[0]+d+" "+(c[1]+d),antialias:""+(v.string().indexOf(O)>-1),left:l[0]-l[2]*Number(n===E),top:l[1]-l[2]*Number(n===S),width:c[0]+d,height:c[1]+d}).each(function(t){var e=s(this);e[e.prop?"prop":"attr"]({coordsize:c[0]+d+" "+(c[1]+d),path:a,fillcolor:o[0],filled:!!t,stroked:!t}).toggle(!(!d&&!t)),!t&&e.html(_e("stroke",'weight="'+2*d+'px" color="'+o[1]+'" miterlimit="1000" joinstyle="miter"'))})),t.opera&&setTimeout(function(){p.tip.css({display:"inline-block",visibility:"visible"})},1),i!==I&&this.calculate(e,c)},calculate:function(t,e){if(!this.enabled)return I;var i,o,n=this,r=this.qtip.elements,a=this.element,h=this.options.offset,l=(r.tooltip.hasClass("ui-widget"),{});return t=t||this.corner,i=t.precedance,e=e||this._calculateSize(t),o=[t.x,t.y],i===E&&o.reverse(),s.each(o,function(s,o){var a,c,d;
14
  o===O?(a=i===S?D:P,l[a]="50%",l[he+"-"+a]=-Math.round(e[i===S?0:1]/2)+h):(a=n._parseWidth(t,o,r.tooltip),c=n._parseWidth(t,o,r.content),d=n._parseRadius(t),l[o]=Math.max(-n.border,s?c:h+(d>a?d:-a)))}),l[t[i]]-=e[i===E?0:1],a.css({margin:"",top:"",bottom:"",left:"",right:""}).css(l),l},reposition:function(t,e,s){function o(t,e,i,s,o){t===$&&l.precedance===e&&c[s]&&l[i]!==O?l.precedance=l.precedance===E?S:E:t!==$&&c[s]&&(l[e]=l[e]===O?c[s]>0?s:o:l[e]===s?o:s)}function n(t,e,o){l[t]===O?g[he+"-"+e]=f[t]=r[he+"-"+e]-c[e]:(a=r[o]!==i?[c[e],-r[e]]:[-c[e],r[e]],(f[t]=Math.max(a[0],a[1]))>a[0]&&(s[e]-=c[e],f[e]=I),g[r[o]!==i?o:e]=f[t])}if(this.enabled){var r,a,h=e.cache,l=this.corner.clone(),c=s.adjusted,d=e.options.position.adjust.method.split(" "),p=d[0],u=d[1]||d[0],f={left:I,top:I,x:0,y:0},g={};this.corner.fixed!==W&&(o(p,E,S,D,F),o(u,S,E,P,B),(l.string()!==h.corner.string()||h.cornerTop!==c.top||h.cornerLeft!==c.left)&&this.update(l,I)),r=this.calculate(l),r.right!==i&&(r.left=-r.right),r.bottom!==i&&(r.top=-r.bottom),r.user=this.offset,(f.left=p===$&&!!c.left)&&n(E,D,F),(f.top=u===$&&!!c.top)&&n(S,P,B),this.element.css(g).toggle(!(f.x&&f.y||l.x===O&&f.y||l.y===O&&f.x)),s.left-=r.left.charAt?r.user:p!==$||f.top||!f.left&&!f.top?r.left+this.border:0,s.top-=r.top.charAt?r.user:u!==$||f.left||!f.left&&!f.top?r.top+this.border:0,h.cornerLeft=c.left,h.cornerTop=c.top,h.corner=l.clone()}},destroy:function(){this.qtip._unbind(this.qtip.tooltip,this._ns),this.qtip.elements.tip&&this.qtip.elements.tip.find("*").remove().end().remove()}}),ae=V.tip=function(t){return new _(t,t.options.style.tip)},ae.initialize="render",ae.sanitize=function(t){if(t.style&&"tip"in t.style){var e=t.style.tip;"object"!=typeof e&&(e=t.style.tip={corner:e}),/string|boolean/i.test(typeof e.corner)||(e.corner=W)}},z.tip={"^position.my|style.tip.(corner|mimic|border)$":function(){this.create(),this.qtip.reposition()},"^style.tip.(height|width)$":function(t){this.size=[t.width,t.height],this.update(),this.qtip.reposition()},"^content.title|style.(classes|widget)$":function(){this.update()}},s.extend(W,q.defaults,{style:{tip:{corner:W,mimic:I,width:6,height:6,border:W,offset:0}}}),V.viewport=function(i,s,o,n,r,a,h){function l(t,e,i,o,n,r,a,h,l){var c=s[n],y=w[t],b=_[t],x=i===$,C=y===n?l:y===r?-l:-l/2,q=b===n?h:b===r?-h:-h/2,T=m[n]+v[n]-(u?0:p[n]),j=T-c,z=c+l-(a===A?f:g)-T,M=C-(w.precedance===t||y===w[e]?q:0)-(b===O?h/2:0);return x?(M=(y===n?1:-1)*C,s[n]+=j>0?j:z>0?-z:0,s[n]=Math.max(-p[n]+v[n],c-M,Math.min(Math.max(-p[n]+v[n]+(a===A?f:g),c+M),s[n],"center"===y?c-C:1e9))):(o*=i===N?2:0,j>0&&(y!==n||z>0)?(s[n]-=M+o,d.invert(t,n)):z>0&&(y!==r||j>0)&&(s[n]-=(y===O?-M:M)+o,d.invert(t,r)),s[n]<m&&-s[n]>z&&(s[n]=c,d=w.clone())),s[n]-c}var c,d,p,u,f,g,m,v,y=o.target,b=i.elements.tooltip,w=o.my,_=o.at,x=o.adjust,C=x.method.split(" "),q=C[0],T=C[1]||C[0],j=o.viewport,z=o.container,M=(i.cache,{left:0,top:0});return j.jquery&&y[0]!==t&&y[0]!==e.body&&"none"!==x.method?(p=z.offset()||M,u="static"===z.css("position"),c="fixed"===b.css("position"),f=j[0]===t?j.width():j.outerWidth(I),g=j[0]===t?j.height():j.outerHeight(I),m={left:c?0:j.scrollLeft(),top:c?0:j.scrollTop()},v=j.offset()||M,("shift"!==q||"shift"!==T)&&(d=w.clone()),M={left:"none"!==q?l(E,S,q,x.x,D,F,A,n,a):0,top:"none"!==T?l(S,E,T,x.y,P,B,L,r,h):0,my:d}):M},V.polys={polygon:function(t,e){var i,s,o,n={width:0,height:0,position:{top:1e10,right:0,bottom:0,left:1e10},adjustable:I},r=0,a=[],h=1,l=1,c=0,d=0;for(r=t.length;r--;)i=[parseInt(t[--r],10),parseInt(t[r+1],10)],i[0]>n.position.right&&(n.position.right=i[0]),i[0]<n.position.left&&(n.position.left=i[0]),i[1]>n.position.bottom&&(n.position.bottom=i[1]),i[1]<n.position.top&&(n.position.top=i[1]),a.push(i);if(s=n.width=Math.abs(n.position.right-n.position.left),o=n.height=Math.abs(n.position.bottom-n.position.top),"c"===e.abbrev())n.position={left:n.position.left+n.width/2,top:n.position.top+n.height/2};else{for(;s>0&&o>0&&h>0&&l>0;)for(s=Math.floor(s/2),o=Math.floor(o/2),e.x===D?h=s:e.x===F?h=n.width-s:h+=Math.floor(s/2),e.y===P?l=o:e.y===B?l=n.height-o:l+=Math.floor(o/2),r=a.length;r--&&!(a.length<2);)c=a[r][0]-n.position.left,d=a[r][1]-n.position.top,(e.x===D&&c>=h||e.x===F&&h>=c||e.x===O&&(h>c||c>n.width-h)||e.y===P&&d>=l||e.y===B&&l>=d||e.y===O&&(l>d||d>n.height-l))&&a.splice(r,1);n.position={left:a[0][0],top:a[0][1]}}return n},rect:function(t,e,i,s){return{width:Math.abs(i-t),height:Math.abs(s-e),position:{left:Math.min(t,i),top:Math.min(e,s)}}},_angles:{tc:1.5,tr:7/4,tl:5/4,bc:.5,br:.25,bl:.75,rc:2,lc:1,c:0},ellipse:function(t,e,i,s,o){var n=V.polys._angles[o.abbrev()],r=0===n?0:i*Math.cos(n*Math.PI),a=s*Math.sin(n*Math.PI);return{width:2*i-Math.abs(r),height:2*s-Math.abs(a),position:{left:t+r,top:e+a},adjustable:I}},circle:function(t,e,i,s){return V.polys.ellipse(t,e,i,i,s)}},V.imagemap=function(t,e,i){e.jquery||(e=s(e));var o,n,r,a,h,l=(e.attr("shape")||"rect").toLowerCase().replace("poly","polygon"),c=s('img[usemap="#'+e.parent("map").attr("name")+'"]'),d=s.trim(e.attr("coords")),p=d.replace(/,$/,"").split(",");if(!c.length)return I;if("polygon"===l)a=V.polys.polygon(p,i);else{if(!V.polys[l])return I;for(r=-1,h=p.length,n=[];++r<h;)n.push(parseInt(p[r],10));a=V.polys[l].apply(this,n.concat(i))}return o=c.offset(),o.left+=Math.ceil((c.outerWidth(I)-c.width())/2),o.top+=Math.ceil((c.outerHeight(I)-c.height())/2),a.position.left+=o.left,a.position.top+=o.top,a},V.svg=function(t,i,o){for(var n,r,a,h,l,c,d,p,u,f=(s(e),i[0]),g=s(f.ownerSVGElement),m=f.ownerDocument,v=(parseInt(i.css("stroke-width"),10)||0)/2;!f.getBBox;)f=f.parentNode;if(!f.getBBox||!f.parentNode)return I;switch(f.nodeName){case"ellipse":case"circle":p=V.polys.ellipse(f.cx.baseVal.value,f.cy.baseVal.value,(f.rx||f.r).baseVal.value+v,(f.ry||f.r).baseVal.value+v,o);break;case"line":case"polygon":case"polyline":for(d=f.points||[{x:f.x1.baseVal.value,y:f.y1.baseVal.value},{x:f.x2.baseVal.value,y:f.y2.baseVal.value}],p=[],c=-1,h=d.numberOfItems||d.length;++c<h;)l=d.getItem?d.getItem(c):d[c],p.push.apply(p,[l.x,l.y]);p=V.polys.polygon(p,o);break;default:p=f.getBBox(),p={width:p.width,height:p.height,position:{left:p.x,top:p.y}}}return u=p.position,g=g[0],g.createSVGPoint&&(r=f.getScreenCTM(),d=g.createSVGPoint(),d.x=u.left,d.y=u.top,a=d.matrixTransform(r),u.left=a.x,u.top=a.y),m!==e&&"mouse"!==t.position.target&&(n=s((m.defaultView||m.parentWindow).frameElement).offset(),n&&(u.left+=n.left,u.top+=n.top)),m=s(m),u.left+=m.scrollLeft(),u.top+=m.scrollTop(),p};var xe,Ce,qe="qtip-modal",Te="."+qe;Ce=function(){function t(t){if(s.expr[":"].focusable)return s.expr[":"].focusable;var e,i,o,n=!isNaN(s.attr(t,"tabindex")),r=t.nodeName&&t.nodeName.toLowerCase();return"area"===r?(e=t.parentNode,i=e.name,t.href&&i&&"map"===e.nodeName.toLowerCase()?(o=s("img[usemap=#"+i+"]")[0],!!o&&o.is(":visible")):!1):/input|select|textarea|button|object/.test(r)?!t.disabled:"a"===r?t.href||n:n}function i(t){c.length<1&&t.length?t.not("body").blur():c.first().focus()}function o(t){if(h.is(":visible")){var e,o=s(t.target),a=n.tooltip,l=o.closest(G);e=l.length<1?I:parseInt(l[0].style.zIndex,10)>parseInt(a[0].style.zIndex,10),e||o.closest(G)[0]===a[0]||i(o),r=t.target===c[c.length-1]}}var n,r,a,h,l=this,c={};s.extend(l,{init:function(){return h=l.elem=s("<div />",{id:"qtip-overlay",html:"<div></div>",mousedown:function(){return I}}).hide(),s(e.body).bind("focusin"+Te,o),s(e).bind("keydown"+Te,function(t){n&&n.options.show.modal.escape&&27===t.keyCode&&n.hide(t)}),h.bind("click"+Te,function(t){n&&n.options.show.modal.blur&&n.hide(t)}),l},update:function(e){n=e,c=e.options.show.modal.stealfocus!==I?e.tooltip.find("*").filter(function(){return t(this)}):[]},toggle:function(t,o,r){var c=(s(e.body),t.tooltip),d=t.options.show.modal,p=d.effect,u=o?"show":"hide",f=h.is(":visible"),g=s(Te).filter(":visible:not(:animated)").not(c);return l.update(t),o&&d.stealfocus!==I&&i(s(":focus")),h.toggleClass("blurs",d.blur),o&&h.appendTo(e.body),h.is(":animated")&&f===o&&a!==I||!o&&g.length?l:(h.stop(W,I),s.isFunction(p)?p.call(h,o):p===I?h[u]():h.fadeTo(parseInt(r,10)||90,o?1:0,function(){o||h.hide()}),o||h.queue(function(t){h.css({left:"",top:""}),s(Te).length||h.detach(),t()}),a=o,n.destroyed&&(n=k),l)}}),l.init()},Ce=new Ce,s.extend(x.prototype,{init:function(t){var e=t.tooltip;return this.options.on?(t.elements.overlay=Ce.elem,e.addClass(qe).css("z-index",q.modal_zindex+s(Te).length),t._bind(e,["tooltipshow","tooltiphide"],function(t,i,o){var n=t.originalEvent;if(t.target===e[0])if(n&&"tooltiphide"===t.type&&/mouse(leave|enter)/.test(n.type)&&s(n.relatedTarget).closest(Ce.elem[0]).length)try{t.preventDefault()}catch(r){}else(!n||n&&"tooltipsolo"!==n.type)&&this.toggle(t,"tooltipshow"===t.type,o)},this._ns,this),t._bind(e,"tooltipfocus",function(t,i){if(!t.isDefaultPrevented()&&t.target===e[0]){var o=s(Te),n=q.modal_zindex+o.length,r=parseInt(e[0].style.zIndex,10);Ce.elem[0].style.zIndex=n-1,o.each(function(){this.style.zIndex>r&&(this.style.zIndex-=1)}),o.filter("."+K).qtip("blur",t.originalEvent),e.addClass(K)[0].style.zIndex=n,Ce.update(i);try{t.preventDefault()}catch(a){}}},this._ns,this),void t._bind(e,"tooltiphide",function(t){t.target===e[0]&&s(Te).filter(":visible").not(e).last().qtip("focus",t)},this._ns,this)):this},toggle:function(t,e,i){return t&&t.isDefaultPrevented()?this:void Ce.toggle(this.qtip,!!e,i)},destroy:function(){this.qtip.tooltip.removeClass(qe),this.qtip._unbind(this.qtip.tooltip,this._ns),Ce.toggle(this.qtip,I),delete this.qtip.elements.overlay}}),xe=V.modal=function(t){return new x(t,t.options.show.modal)},xe.sanitize=function(t){t.show&&("object"!=typeof t.show.modal?t.show.modal={on:!!t.show.modal}:"undefined"==typeof t.show.modal.on&&(t.show.modal.on=W))},q.modal_zindex=q.zindex-200,xe.initialize="render",z.modal={"^show.modal.(on|blur)$":function(){this.destroy(),this.init(),this.qtip.elems.overlay.toggle(this.qtip.tooltip[0].offsetWidth>0)}},s.extend(W,q.defaults,{show:{modal:{on:I,effect:W,blur:W,stealfocus:W,escape:W}}});var je,ze='<iframe class="qtip-bgiframe" frameborder="0" tabindex="-1" src="javascript:\'\';" style="display:block; position:absolute; z-index:-1; filter:alpha(opacity=0); -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";"></iframe>';s.extend(C.prototype,{_scroll:function(){var e=this.qtip.elements.overlay;e&&(e[0].style.top=s(t).scrollTop()+"px")},init:function(i){var o=i.tooltip;s("select, object").length<1&&(this.bgiframe=i.elements.bgiframe=s(ze).appendTo(o),i._bind(o,"tooltipmove",this.adjustBGIFrame,this._ns,this)),this.redrawContainer=s("<div/>",{id:R+"-rcontainer"}).appendTo(e.body),i.elements.overlay&&i.elements.overlay.addClass("qtipmodal-ie6fix")&&(i._bind(t,["scroll","resize"],this._scroll,this._ns,this),i._bind(o,["tooltipshow"],this._scroll,this._ns,this)),this.redraw()},adjustBGIFrame:function(){var t,e,i=this.qtip.tooltip,s={height:i.outerHeight(I),width:i.outerWidth(I)},o=this.qtip.plugins.tip,n=this.qtip.elements.tip;e=parseInt(i.css("borderLeftWidth"),10)||0,e={left:-e,top:-e},o&&n&&(t="x"===o.corner.precedance?[A,D]:[L,P],e[t[1]]-=n[t[0]]()),this.bgiframe.css(e).css(s)},redraw:function(){if(this.qtip.rendered<1||this.drawing)return this;var t,e,i,s,o=this.qtip.tooltip,n=this.qtip.options.style,r=this.qtip.options.position.container;return this.qtip.drawing=1,n.height&&o.css(L,n.height),n.width?o.css(A,n.width):(o.css(A,"").appendTo(this.redrawContainer),e=o.width(),1>e%2&&(e+=1),i=o.css("maxWidth")||"",s=o.css("minWidth")||"",t=(i+s).indexOf("%")>-1?r.width()/100:0,i=(i.indexOf("%")>-1?t:1)*parseInt(i,10)||e,s=(s.indexOf("%")>-1?t:1)*parseInt(s,10)||0,e=i+s?Math.min(Math.max(e,s),i):e,o.css(A,Math.round(e)).appendTo(r)),this.drawing=0,this},destroy:function(){this.bgiframe&&this.bgiframe.remove(),this.qtip._unbind([t,this.qtip.tooltip],this._ns)}}),je=V.ie6=function(t){return 6===se.ie?new C(t):I},je.initialize="render",z.ie6={"^content|style$":function(){this.redraw()}}})}(window,document);
1
+ /*
2
+ * qTip2 - Pretty powerful tooltips - v2.2.1
3
+ * http://qtip2.com
4
+ *
5
+ * Copyright (c) 2014
6
+ * Released under the MIT licenses
7
+ * http://jquery.org/license
8
+ *
9
+ * Date: Sat Sep 6 2014 06:25 EDT-0400
10
+ * Plugins: tips viewport imagemap svg modal ie6
11
+ * Styles: core basic css3
12
+ */
13
+ !function(t,e,i){!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):jQuery&&!jQuery.fn.qtip&&t(jQuery)}(function(s){"use strict";function o(t,e,i,o){this.id=i,this.target=t,this.tooltip=k,this.elements={target:t},this._id=R+"-"+i,this.timers={img:{}},this.options=e,this.plugins={},this.cache={event:{},target:s(),disabled:I,attr:o,onTooltip:I,lastClass:""},this.rendered=this.destroyed=this.disabled=this.waiting=this.hiddenDuringWait=this.positioning=this.triggering=I}function n(t){return t===k||"object"!==s.type(t)}function r(t){return!(s.isFunction(t)||t&&t.attr||t.length||"object"===s.type(t)&&(t.jquery||t.then))}function a(t){var e,i,o,a;return n(t)?I:(n(t.metadata)&&(t.metadata={type:t.metadata}),"content"in t&&(e=t.content,n(e)||e.jquery||e.done?e=t.content={text:i=r(e)?I:e}:i=e.text,"ajax"in e&&(o=e.ajax,a=o&&o.once!==I,delete e.ajax,e.text=function(t,e){var n=i||s(this).attr(e.options.content.attr)||"Loading...",r=s.ajax(s.extend({},o,{context:e})).then(o.success,k,o.error).then(function(t){return t&&a&&e.set("content.text",t),t},function(t,i,s){e.destroyed||0===t.status||e.set("content.text",i+": "+s)});return a?n:(e.set("content.text",n),r)}),"title"in e&&(s.isPlainObject(e.title)&&(e.button=e.title.button,e.title=e.title.text),r(e.title||I)&&(e.title=I))),"position"in t&&n(t.position)&&(t.position={my:t.position,at:t.position}),"show"in t&&n(t.show)&&(t.show=t.show.jquery?{target:t.show}:t.show===W?{ready:W}:{event:t.show}),"hide"in t&&n(t.hide)&&(t.hide=t.hide.jquery?{target:t.hide}:{event:t.hide}),"style"in t&&n(t.style)&&(t.style={classes:t.style}),s.each(V,function(){this.sanitize&&this.sanitize(t)}),t)}function h(t,e){for(var i,s=0,o=t,n=e.split(".");o=o[n[s++]];)s<n.length&&(i=o);return[i||t,n.pop()]}function l(t,e){var i,s,o;for(i in this.checks)for(s in this.checks[i])(o=new RegExp(s,"i").exec(t))&&(e.push(o),("builtin"===i||this.plugins[i])&&this.checks[i][s].apply(this.plugins[i]||this,e))}function c(t){return Y.concat("").join(t?"-"+t+" ":" ")}function d(t,e){return e>0?setTimeout(s.proxy(t,this),e):void t.call(this)}function p(t){this.tooltip.hasClass(te)||(clearTimeout(this.timers.show),clearTimeout(this.timers.hide),this.timers.show=d.call(this,function(){this.toggle(W,t)},this.options.show.delay))}function u(t){if(!this.tooltip.hasClass(te)&&!this.destroyed){var e=s(t.relatedTarget),i=e.closest(G)[0]===this.tooltip[0],o=e[0]===this.options.show.target[0];if(clearTimeout(this.timers.show),clearTimeout(this.timers.hide),this!==e[0]&&"mouse"===this.options.position.target&&i||this.options.hide.fixed&&/mouse(out|leave|move)/.test(t.type)&&(i||o))try{t.preventDefault(),t.stopImmediatePropagation()}catch(n){}else this.timers.hide=d.call(this,function(){this.toggle(I,t)},this.options.hide.delay,this)}}function f(t){!this.tooltip.hasClass(te)&&this.options.hide.inactive&&(clearTimeout(this.timers.inactive),this.timers.inactive=d.call(this,function(){this.hide(t)},this.options.hide.inactive))}function g(t){this.rendered&&this.tooltip[0].offsetWidth>0&&this.reposition(t)}function m(t,i,o){s(e.body).delegate(t,(i.split?i:i.join("."+R+" "))+"."+R,function(){var t=q.api[s.attr(this,X)];t&&!t.disabled&&o.apply(t,arguments)})}function v(t,i,n){var r,h,l,c,d,p=s(e.body),u=t[0]===e?p:t,f=t.metadata?t.metadata(n.metadata):k,g="html5"===n.metadata.type&&f?f[n.metadata.name]:k,m=t.data(n.metadata.name||"qtipopts");try{m="string"==typeof m?s.parseJSON(m):m}catch(v){}if(c=s.extend(W,{},q.defaults,n,"object"==typeof m?a(m):k,a(g||f)),h=c.position,c.id=i,"boolean"==typeof c.content.text){if(l=t.attr(c.content.attr),c.content.attr===I||!l)return I;c.content.text=l}if(h.container.length||(h.container=p),h.target===I&&(h.target=u),c.show.target===I&&(c.show.target=u),c.show.solo===W&&(c.show.solo=h.container.closest("body")),c.hide.target===I&&(c.hide.target=u),c.position.viewport===W&&(c.position.viewport=h.container),h.container=h.container.eq(0),h.at=new j(h.at,W),h.my=new j(h.my),t.data(R))if(c.overwrite)t.qtip("destroy",!0);else if(c.overwrite===I)return I;return t.attr(H,i),c.suppress&&(d=t.attr("title"))&&t.removeAttr("title").attr(ie,d).attr("title",""),r=new o(t,c,i,!!l),t.data(R,r),r}function y(t){return t.charAt(0).toUpperCase()+t.slice(1)}function b(t,e){var s,o,n=e.charAt(0).toUpperCase()+e.slice(1),r=(e+" "+ve.join(n+" ")+n).split(" "),a=0;if(me[e])return t.css(me[e]);for(;s=r[a++];)if((o=t.css(s))!==i)return me[e]=s,o}function w(t,e){return Math.ceil(parseFloat(b(t,e)))}function _(t,e){this._ns="tip",this.options=e,this.offset=e.offset,this.size=[e.width,e.height],this.init(this.qtip=t)}function x(t,e){this.options=e,this._ns="-modal",this.init(this.qtip=t)}function C(t){this._ns="ie6",this.init(this.qtip=t)}var q,T,j,z,M,W=!0,I=!1,k=null,E="x",S="y",A="width",L="height",P="top",D="left",B="bottom",F="right",O="center",N="flipinvert",$="shift",V={},R="qtip",H="data-hasqtip",X="data-qtip-id",Y=["ui-widget","ui-tooltip"],G="."+R,U="click dblclick mousedown mouseup mousemove mouseleave mouseenter".split(" "),Q=R+"-fixed",J=R+"-default",K=R+"-focus",Z=R+"-hover",te=R+"-disabled",ee="_replacedByqTip",ie="oldtitle",se={ie:function(){for(var t=4,i=e.createElement("div");(i.innerHTML="<!--[if gt IE "+t+"]><i></i><![endif]-->")&&i.getElementsByTagName("i")[0];t+=1);return t>4?t:0/0}(),iOS:parseFloat((""+(/CPU.*OS ([0-9_]{1,5})|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_",".").replace("_",""))||I};T=o.prototype,T._when=function(t){return s.when.apply(s,t)},T.render=function(t){if(this.rendered||this.destroyed)return this;var e,i=this,o=this.options,n=this.cache,r=this.elements,a=o.content.text,h=o.content.title,l=o.content.button,c=o.position,d=("."+this._id+" ",[]);return s.attr(this.target[0],"aria-describedby",this._id),n.posClass=this._createPosClass((this.position={my:c.my,at:c.at}).my),this.tooltip=r.tooltip=e=s("<div/>",{id:this._id,"class":[R,J,o.style.classes,n.posClass].join(" "),width:o.style.width||"",height:o.style.height||"",tracking:"mouse"===c.target&&c.adjust.mouse,role:"alert","aria-live":"polite","aria-atomic":I,"aria-describedby":this._id+"-content","aria-hidden":W}).toggleClass(te,this.disabled).attr(X,this.id).data(R,this).appendTo(c.container).append(r.content=s("<div />",{"class":R+"-content",id:this._id+"-content","aria-atomic":W})),this.rendered=-1,this.positioning=W,h&&(this._createTitle(),s.isFunction(h)||d.push(this._updateTitle(h,I))),l&&this._createButton(),s.isFunction(a)||d.push(this._updateContent(a,I)),this.rendered=W,this._setWidget(),s.each(V,function(t){var e;"render"===this.initialize&&(e=this(i))&&(i.plugins[t]=e)}),this._unassignEvents(),this._assignEvents(),this._when(d).then(function(){i._trigger("render"),i.positioning=I,i.hiddenDuringWait||!o.show.ready&&!t||i.toggle(W,n.event,I),i.hiddenDuringWait=I}),q.api[this.id]=this,this},T.destroy=function(t){function e(){if(!this.destroyed){this.destroyed=W;var t,e=this.target,i=e.attr(ie);this.rendered&&this.tooltip.stop(1,0).find("*").remove().end().remove(),s.each(this.plugins,function(){this.destroy&&this.destroy()});for(t in this.timers)clearTimeout(this.timers[t]);e.removeData(R).removeAttr(X).removeAttr(H).removeAttr("aria-describedby"),this.options.suppress&&i&&e.attr("title",i).removeAttr(ie),this._unassignEvents(),this.options=this.elements=this.cache=this.timers=this.plugins=this.mouse=k,delete q.api[this.id]}}return this.destroyed?this.target:(t===W&&"hide"!==this.triggering||!this.rendered?e.call(this):(this.tooltip.one("tooltiphidden",s.proxy(e,this)),!this.triggering&&this.hide()),this.target)},z=T.checks={builtin:{"^id$":function(t,e,i,o){var n=i===W?q.nextid:i,r=R+"-"+n;n!==I&&n.length>0&&!s("#"+r).length?(this._id=r,this.rendered&&(this.tooltip[0].id=this._id,this.elements.content[0].id=this._id+"-content",this.elements.title[0].id=this._id+"-title")):t[e]=o},"^prerender":function(t,e,i){i&&!this.rendered&&this.render(this.options.show.ready)},"^content.text$":function(t,e,i){this._updateContent(i)},"^content.attr$":function(t,e,i,s){this.options.content.text===this.target.attr(s)&&this._updateContent(this.target.attr(i))},"^content.title$":function(t,e,i){return i?(i&&!this.elements.title&&this._createTitle(),void this._updateTitle(i)):this._removeTitle()},"^content.button$":function(t,e,i){this._updateButton(i)},"^content.title.(text|button)$":function(t,e,i){this.set("content."+e,i)},"^position.(my|at)$":function(t,e,i){"string"==typeof i&&(this.position[e]=t[e]=new j(i,"at"===e))},"^position.container$":function(t,e,i){this.rendered&&this.tooltip.appendTo(i)},"^show.ready$":function(t,e,i){i&&(!this.rendered&&this.render(W)||this.toggle(W))},"^style.classes$":function(t,e,i,s){this.rendered&&this.tooltip.removeClass(s).addClass(i)},"^style.(width|height)":function(t,e,i){this.rendered&&this.tooltip.css(e,i)},"^style.widget|content.title":function(){this.rendered&&this._setWidget()},"^style.def":function(t,e,i){this.rendered&&this.tooltip.toggleClass(J,!!i)},"^events.(render|show|move|hide|focus|blur)$":function(t,e,i){this.rendered&&this.tooltip[(s.isFunction(i)?"":"un")+"bind"]("tooltip"+e,i)},"^(show|hide|position).(event|target|fixed|inactive|leave|distance|viewport|adjust)":function(){if(this.rendered){var t=this.options.position;this.tooltip.attr("tracking","mouse"===t.target&&t.adjust.mouse),this._unassignEvents(),this._assignEvents()}}}},T.get=function(t){if(this.destroyed)return this;var e=h(this.options,t.toLowerCase()),i=e[0][e[1]];return i.precedance?i.string():i};var oe=/^position\.(my|at|adjust|target|container|viewport)|style|content|show\.ready/i,ne=/^prerender|show\.ready/i;T.set=function(t,e){if(this.destroyed)return this;{var i,o=this.rendered,n=I,r=this.options;this.checks}return"string"==typeof t?(i=t,t={},t[i]=e):t=s.extend({},t),s.each(t,function(e,i){if(o&&ne.test(e))return void delete t[e];var a,l=h(r,e.toLowerCase());a=l[0][l[1]],l[0][l[1]]=i&&i.nodeType?s(i):i,n=oe.test(e)||n,t[e]=[l[0],l[1],i,a]}),a(r),this.positioning=W,s.each(t,s.proxy(l,this)),this.positioning=I,this.rendered&&this.tooltip[0].offsetWidth>0&&n&&this.reposition("mouse"===r.position.target?k:this.cache.event),this},T._update=function(t,e){var i=this,o=this.cache;return this.rendered&&t?(s.isFunction(t)&&(t=t.call(this.elements.target,o.event,this)||""),s.isFunction(t.then)?(o.waiting=W,t.then(function(t){return o.waiting=I,i._update(t,e)},k,function(t){return i._update(t,e)})):t===I||!t&&""!==t?I:(t.jquery&&t.length>0?e.empty().append(t.css({display:"block",visibility:"visible"})):e.html(t),this._waitForContent(e).then(function(t){i.rendered&&i.tooltip[0].offsetWidth>0&&i.reposition(o.event,!t.length)}))):I},T._waitForContent=function(t){var e=this.cache;return e.waiting=W,(s.fn.imagesLoaded?t.imagesLoaded():s.Deferred().resolve([])).done(function(){e.waiting=I}).promise()},T._updateContent=function(t,e){this._update(t,this.elements.content,e)},T._updateTitle=function(t,e){this._update(t,this.elements.title,e)===I&&this._removeTitle(I)},T._createTitle=function(){var t=this.elements,e=this._id+"-title";t.titlebar&&this._removeTitle(),t.titlebar=s("<div />",{"class":R+"-titlebar "+(this.options.style.widget?c("header"):"")}).append(t.title=s("<div />",{id:e,"class":R+"-title","aria-atomic":W})).insertBefore(t.content).delegate(".qtip-close","mousedown keydown mouseup keyup mouseout",function(t){s(this).toggleClass("ui-state-active ui-state-focus","down"===t.type.substr(-4))}).delegate(".qtip-close","mouseover mouseout",function(t){s(this).toggleClass("ui-state-hover","mouseover"===t.type)}),this.options.content.button&&this._createButton()},T._removeTitle=function(t){var e=this.elements;e.title&&(e.titlebar.remove(),e.titlebar=e.title=e.button=k,t!==I&&this.reposition())},T._createPosClass=function(t){return R+"-pos-"+(t||this.options.position.my).abbrev()},T.reposition=function(i,o){if(!this.rendered||this.positioning||this.destroyed)return this;this.positioning=W;var n,r,a,h,l=this.cache,c=this.tooltip,d=this.options.position,p=d.target,u=d.my,f=d.at,g=d.viewport,m=d.container,v=d.adjust,y=v.method.split(" "),b=c.outerWidth(I),w=c.outerHeight(I),_=0,x=0,C=c.css("position"),q={left:0,top:0},T=c[0].offsetWidth>0,j=i&&"scroll"===i.type,z=s(t),M=m[0].ownerDocument,k=this.mouse;if(s.isArray(p)&&2===p.length)f={x:D,y:P},q={left:p[0],top:p[1]};else if("mouse"===p)f={x:D,y:P},(!v.mouse||this.options.hide.distance)&&l.origin&&l.origin.pageX?i=l.origin:!i||i&&("resize"===i.type||"scroll"===i.type)?i=l.event:k&&k.pageX&&(i=k),"static"!==C&&(q=m.offset()),M.body.offsetWidth!==(t.innerWidth||M.documentElement.clientWidth)&&(r=s(e.body).offset()),q={left:i.pageX-q.left+(r&&r.left||0),top:i.pageY-q.top+(r&&r.top||0)},v.mouse&&j&&k&&(q.left-=(k.scrollX||0)-z.scrollLeft(),q.top-=(k.scrollY||0)-z.scrollTop());else{if("event"===p?i&&i.target&&"scroll"!==i.type&&"resize"!==i.type?l.target=s(i.target):i.target||(l.target=this.elements.target):"event"!==p&&(l.target=s(p.jquery?p:this.elements.target)),p=l.target,p=s(p).eq(0),0===p.length)return this;p[0]===e||p[0]===t?(_=se.iOS?t.innerWidth:p.width(),x=se.iOS?t.innerHeight:p.height(),p[0]===t&&(q={top:(g||p).scrollTop(),left:(g||p).scrollLeft()})):V.imagemap&&p.is("area")?n=V.imagemap(this,p,f,V.viewport?y:I):V.svg&&p&&p[0].ownerSVGElement?n=V.svg(this,p,f,V.viewport?y:I):(_=p.outerWidth(I),x=p.outerHeight(I),q=p.offset()),n&&(_=n.width,x=n.height,r=n.offset,q=n.position),q=this.reposition.offset(p,q,m),(se.iOS>3.1&&se.iOS<4.1||se.iOS>=4.3&&se.iOS<4.33||!se.iOS&&"fixed"===C)&&(q.left-=z.scrollLeft(),q.top-=z.scrollTop()),(!n||n&&n.adjustable!==I)&&(q.left+=f.x===F?_:f.x===O?_/2:0,q.top+=f.y===B?x:f.y===O?x/2:0)}return q.left+=v.x+(u.x===F?-b:u.x===O?-b/2:0),q.top+=v.y+(u.y===B?-w:u.y===O?-w/2:0),V.viewport?(a=q.adjusted=V.viewport(this,q,d,_,x,b,w),r&&a.left&&(q.left+=r.left),r&&a.top&&(q.top+=r.top),a.my&&(this.position.my=a.my)):q.adjusted={left:0,top:0},l.posClass!==(h=this._createPosClass(this.position.my))&&c.removeClass(l.posClass).addClass(l.posClass=h),this._trigger("move",[q,g.elem||g],i)?(delete q.adjusted,o===I||!T||isNaN(q.left)||isNaN(q.top)||"mouse"===p||!s.isFunction(d.effect)?c.css(q):s.isFunction(d.effect)&&(d.effect.call(c,this,s.extend({},q)),c.queue(function(t){s(this).css({opacity:"",height:""}),se.ie&&this.style.removeAttribute("filter"),t()})),this.positioning=I,this):this},T.reposition.offset=function(t,i,o){function n(t,e){i.left+=e*t.scrollLeft(),i.top+=e*t.scrollTop()}if(!o[0])return i;var r,a,h,l,c=s(t[0].ownerDocument),d=!!se.ie&&"CSS1Compat"!==e.compatMode,p=o[0];do"static"!==(a=s.css(p,"position"))&&("fixed"===a?(h=p.getBoundingClientRect(),n(c,-1)):(h=s(p).position(),h.left+=parseFloat(s.css(p,"borderLeftWidth"))||0,h.top+=parseFloat(s.css(p,"borderTopWidth"))||0),i.left-=h.left+(parseFloat(s.css(p,"marginLeft"))||0),i.top-=h.top+(parseFloat(s.css(p,"marginTop"))||0),r||"hidden"===(l=s.css(p,"overflow"))||"visible"===l||(r=s(p)));while(p=p.offsetParent);return r&&(r[0]!==c[0]||d)&&n(r,1),i};var re=(j=T.reposition.Corner=function(t,e){t=(""+t).replace(/([A-Z])/," $1").replace(/middle/gi,O).toLowerCase(),this.x=(t.match(/left|right/i)||t.match(/center/)||["inherit"])[0].toLowerCase(),this.y=(t.match(/top|bottom|center/i)||["inherit"])[0].toLowerCase(),this.forceY=!!e;var i=t.charAt(0);this.precedance="t"===i||"b"===i?S:E}).prototype;re.invert=function(t,e){this[t]=this[t]===D?F:this[t]===F?D:e||this[t]},re.string=function(t){var e=this.x,i=this.y,s=e!==i?"center"===e||"center"!==i&&(this.precedance===S||this.forceY)?[i,e]:[e,i]:[e];return t!==!1?s.join(" "):s},re.abbrev=function(){var t=this.string(!1);return t[0].charAt(0)+(t[1]&&t[1].charAt(0)||"")},re.clone=function(){return new j(this.string(),this.forceY)},T.toggle=function(t,i){var o=this.cache,n=this.options,r=this.tooltip;if(i){if(/over|enter/.test(i.type)&&o.event&&/out|leave/.test(o.event.type)&&n.show.target.add(i.target).length===n.show.target.length&&r.has(i.relatedTarget).length)return this;o.event=s.event.fix(i)}if(this.waiting&&!t&&(this.hiddenDuringWait=W),!this.rendered)return t?this.render(1):this;if(this.destroyed||this.disabled)return this;var a,h,l,c=t?"show":"hide",d=this.options[c],p=(this.options[t?"hide":"show"],this.options.position),u=this.options.content,f=this.tooltip.css("width"),g=this.tooltip.is(":visible"),m=t||1===d.target.length,v=!i||d.target.length<2||o.target[0]===i.target;return(typeof t).search("boolean|number")&&(t=!g),a=!r.is(":animated")&&g===t&&v,h=a?k:!!this._trigger(c,[90]),this.destroyed?this:(h!==I&&t&&this.focus(i),!h||a?this:(s.attr(r[0],"aria-hidden",!t),t?(this.mouse&&(o.origin=s.event.fix(this.mouse)),s.isFunction(u.text)&&this._updateContent(u.text,I),s.isFunction(u.title)&&this._updateTitle(u.title,I),!M&&"mouse"===p.target&&p.adjust.mouse&&(s(e).bind("mousemove."+R,this._storeMouse),M=W),f||r.css("width",r.outerWidth(I)),this.reposition(i,arguments[2]),f||r.css("width",""),d.solo&&("string"==typeof d.solo?s(d.solo):s(G,d.solo)).not(r).not(d.target).qtip("hide",s.Event("tooltipsolo"))):(clearTimeout(this.timers.show),delete o.origin,M&&!s(G+'[tracking="true"]:visible',d.solo).not(r).length&&(s(e).unbind("mousemove."+R),M=I),this.blur(i)),l=s.proxy(function(){t?(se.ie&&r[0].style.removeAttribute("filter"),r.css("overflow",""),"string"==typeof d.autofocus&&s(this.options.show.autofocus,r).focus(),this.options.show.target.trigger("qtip-"+this.id+"-inactive")):r.css({display:"",visibility:"",opacity:"",left:"",top:""}),this._trigger(t?"visible":"hidden")},this),d.effect===I||m===I?(r[c](),l()):s.isFunction(d.effect)?(r.stop(1,1),d.effect.call(r,this),r.queue("fx",function(t){l(),t()})):r.fadeTo(90,t?1:0,l),t&&d.target.trigger("qtip-"+this.id+"-inactive"),this))},T.show=function(t){return this.toggle(W,t)},T.hide=function(t){return this.toggle(I,t)},T.focus=function(t){if(!this.rendered||this.destroyed)return this;var e=s(G),i=this.tooltip,o=parseInt(i[0].style.zIndex,10),n=q.zindex+e.length;return i.hasClass(K)||this._trigger("focus",[n],t)&&(o!==n&&(e.each(function(){this.style.zIndex>o&&(this.style.zIndex=this.style.zIndex-1)}),e.filter("."+K).qtip("blur",t)),i.addClass(K)[0].style.zIndex=n),this},T.blur=function(t){return!this.rendered||this.destroyed?this:(this.tooltip.removeClass(K),this._trigger("blur",[this.tooltip.css("zIndex")],t),this)},T.disable=function(t){return this.destroyed?this:("toggle"===t?t=!(this.rendered?this.tooltip.hasClass(te):this.disabled):"boolean"!=typeof t&&(t=W),this.rendered&&this.tooltip.toggleClass(te,t).attr("aria-disabled",t),this.disabled=!!t,this)},T.enable=function(){return this.disable(I)},T._createButton=function(){var t=this,e=this.elements,i=e.tooltip,o=this.options.content.button,n="string"==typeof o,r=n?o:"Close tooltip";e.button&&e.button.remove(),e.button=o.jquery?o:s("<a />",{"class":"qtip-close "+(this.options.style.widget?"":R+"-icon"),title:r,"aria-label":r}).prepend(s("<span />",{"class":"ui-icon ui-icon-close",html:"&times;"})),e.button.appendTo(e.titlebar||i).attr("role","button").click(function(e){return i.hasClass(te)||t.hide(e),I})},T._updateButton=function(t){if(!this.rendered)return I;var e=this.elements.button;t?this._createButton():e.remove()},T._setWidget=function(){var t=this.options.style.widget,e=this.elements,i=e.tooltip,s=i.hasClass(te);i.removeClass(te),te=t?"ui-state-disabled":"qtip-disabled",i.toggleClass(te,s),i.toggleClass("ui-helper-reset "+c(),t).toggleClass(J,this.options.style.def&&!t),e.content&&e.content.toggleClass(c("content"),t),e.titlebar&&e.titlebar.toggleClass(c("header"),t),e.button&&e.button.toggleClass(R+"-icon",!t)},T._storeMouse=function(t){return(this.mouse=s.event.fix(t)).type="mousemove",this},T._bind=function(t,e,i,o,n){if(t&&i&&e.length){var r="."+this._id+(o?"-"+o:"");return s(t).bind((e.split?e:e.join(r+" "))+r,s.proxy(i,n||this)),this}},T._unbind=function(t,e){return t&&s(t).unbind("."+this._id+(e?"-"+e:"")),this},T._trigger=function(t,e,i){var o=s.Event("tooltip"+t);return o.originalEvent=i&&s.extend({},i)||this.cache.event||k,this.triggering=t,this.tooltip.trigger(o,[this].concat(e||[])),this.triggering=I,!o.isDefaultPrevented()},T._bindEvents=function(t,e,i,o,n,r){var a=i.filter(o).add(o.filter(i)),h=[];a.length&&(s.each(e,function(e,i){var o=s.inArray(i,t);o>-1&&h.push(t.splice(o,1)[0])}),h.length&&(this._bind(a,h,function(t){var e=this.rendered?this.tooltip[0].offsetWidth>0:!1;(e?r:n).call(this,t)}),i=i.not(a),o=o.not(a))),this._bind(i,t,n),this._bind(o,e,r)},T._assignInitialEvents=function(t){function e(t){return this.disabled||this.destroyed?I:(this.cache.event=t&&s.event.fix(t),this.cache.target=t&&s(t.target),clearTimeout(this.timers.show),void(this.timers.show=d.call(this,function(){this.render("object"==typeof t||i.show.ready)},i.prerender?0:i.show.delay)))}var i=this.options,o=i.show.target,n=i.hide.target,r=i.show.event?s.trim(""+i.show.event).split(" "):[],a=i.hide.event?s.trim(""+i.hide.event).split(" "):[];this._bind(this.elements.target,["remove","removeqtip"],function(){this.destroy(!0)},"destroy"),/mouse(over|enter)/i.test(i.show.event)&&!/mouse(out|leave)/i.test(i.hide.event)&&a.push("mouseleave"),this._bind(o,"mousemove",function(t){this._storeMouse(t),this.cache.onTarget=W}),this._bindEvents(r,a,o,n,e,function(){return this.timers?void clearTimeout(this.timers.show):I}),(i.show.ready||i.prerender)&&e.call(this,t)},T._assignEvents=function(){var i=this,o=this.options,n=o.position,r=this.tooltip,a=o.show.target,h=o.hide.target,l=n.container,c=n.viewport,d=s(e),m=(s(e.body),s(t)),v=o.show.event?s.trim(""+o.show.event).split(" "):[],y=o.hide.event?s.trim(""+o.hide.event).split(" "):[];s.each(o.events,function(t,e){i._bind(r,"toggle"===t?["tooltipshow","tooltiphide"]:["tooltip"+t],e,null,r)}),/mouse(out|leave)/i.test(o.hide.event)&&"window"===o.hide.leave&&this._bind(d,["mouseout","blur"],function(t){/select|option/.test(t.target.nodeName)||t.relatedTarget||this.hide(t)}),o.hide.fixed?h=h.add(r.addClass(Q)):/mouse(over|enter)/i.test(o.show.event)&&this._bind(h,"mouseleave",function(){clearTimeout(this.timers.show)}),(""+o.hide.event).indexOf("unfocus")>-1&&this._bind(l.closest("html"),["mousedown","touchstart"],function(t){var e=s(t.target),i=this.rendered&&!this.tooltip.hasClass(te)&&this.tooltip[0].offsetWidth>0,o=e.parents(G).filter(this.tooltip[0]).length>0;e[0]===this.target[0]||e[0]===this.tooltip[0]||o||this.target.has(e[0]).length||!i||this.hide(t)}),"number"==typeof o.hide.inactive&&(this._bind(a,"qtip-"+this.id+"-inactive",f,"inactive"),this._bind(h.add(r),q.inactiveEvents,f)),this._bindEvents(v,y,a,h,p,u),this._bind(a.add(r),"mousemove",function(t){if("number"==typeof o.hide.distance){var e=this.cache.origin||{},i=this.options.hide.distance,s=Math.abs;(s(t.pageX-e.pageX)>=i||s(t.pageY-e.pageY)>=i)&&this.hide(t)}this._storeMouse(t)}),"mouse"===n.target&&n.adjust.mouse&&(o.hide.event&&this._bind(a,["mouseenter","mouseleave"],function(t){return this.cache?void(this.cache.onTarget="mouseenter"===t.type):I}),this._bind(d,"mousemove",function(t){this.rendered&&this.cache.onTarget&&!this.tooltip.hasClass(te)&&this.tooltip[0].offsetWidth>0&&this.reposition(t)})),(n.adjust.resize||c.length)&&this._bind(s.event.special.resize?c:m,"resize",g),n.adjust.scroll&&this._bind(m.add(n.container),"scroll",g)},T._unassignEvents=function(){var i=this.options,o=i.show.target,n=i.hide.target,r=s.grep([this.elements.target[0],this.rendered&&this.tooltip[0],i.position.container[0],i.position.viewport[0],i.position.container.closest("html")[0],t,e],function(t){return"object"==typeof t});o&&o.toArray&&(r=r.concat(o.toArray())),n&&n.toArray&&(r=r.concat(n.toArray())),this._unbind(r)._unbind(r,"destroy")._unbind(r,"inactive")},s(function(){m(G,["mouseenter","mouseleave"],function(t){var e="mouseenter"===t.type,i=s(t.currentTarget),o=s(t.relatedTarget||t.target),n=this.options;e?(this.focus(t),i.hasClass(Q)&&!i.hasClass(te)&&clearTimeout(this.timers.hide)):"mouse"===n.position.target&&n.position.adjust.mouse&&n.hide.event&&n.show.target&&!o.closest(n.show.target[0]).length&&this.hide(t),i.toggleClass(Z,e)}),m("["+X+"]",U,f)}),q=s.fn.qtip=function(t,e,o){var n=(""+t).toLowerCase(),r=k,h=s.makeArray(arguments).slice(1),l=h[h.length-1],c=this[0]?s.data(this[0],R):k;return!arguments.length&&c||"api"===n?c:"string"==typeof t?(this.each(function(){var t=s.data(this,R);if(!t)return W;if(l&&l.timeStamp&&(t.cache.event=l),!e||"option"!==n&&"options"!==n)t[n]&&t[n].apply(t,h);else{if(o===i&&!s.isPlainObject(e))return r=t.get(e),I;t.set(e,o)}}),r!==k?r:this):"object"!=typeof t&&arguments.length?void 0:(c=a(s.extend(W,{},t)),this.each(function(t){var e,i;return i=s.isArray(c.id)?c.id[t]:c.id,i=!i||i===I||i.length<1||q.api[i]?q.nextid++:i,e=v(s(this),i,c),e===I?W:(q.api[i]=e,s.each(V,function(){"initialize"===this.initialize&&this(e)}),void e._assignInitialEvents(l))}))},s.qtip=o,q.api={},s.each({attr:function(t,e){if(this.length){var i=this[0],o="title",n=s.data(i,"qtip");if(t===o&&n&&"object"==typeof n&&n.options.suppress)return arguments.length<2?s.attr(i,ie):(n&&n.options.content.attr===o&&n.cache.attr&&n.set("content.text",e),this.attr(ie,e))}return s.fn["attr"+ee].apply(this,arguments)},clone:function(t){var e=(s([]),s.fn["clone"+ee].apply(this,arguments));return t||e.filter("["+ie+"]").attr("title",function(){return s.attr(this,ie)}).removeAttr(ie),e}},function(t,e){if(!e||s.fn[t+ee])return W;var i=s.fn[t+ee]=s.fn[t];s.fn[t]=function(){return e.apply(this,arguments)||i.apply(this,arguments)}}),s.ui||(s["cleanData"+ee]=s.cleanData,s.cleanData=function(t){for(var e,i=0;(e=s(t[i])).length;i++)if(e.attr(H))try{e.triggerHandler("removeqtip")}catch(o){}s["cleanData"+ee].apply(this,arguments)}),q.version="2.2.1",q.nextid=0,q.inactiveEvents=U,q.zindex=15e3,q.defaults={prerender:I,id:I,overwrite:W,suppress:W,content:{text:W,attr:"title",title:I,button:I},position:{my:"top left",at:"bottom right",target:I,container:I,viewport:I,adjust:{x:0,y:0,mouse:W,scroll:W,resize:W,method:"flipinvert flipinvert"},effect:function(t,e){s(this).animate(e,{duration:200,queue:I})}},show:{target:I,event:"mouseenter",effect:W,delay:90,solo:I,ready:I,autofocus:I},hide:{target:I,event:"mouseleave",effect:W,delay:0,fixed:I,inactive:I,leave:"window",distance:I},style:{classes:"",widget:I,width:I,height:I,def:W},events:{render:k,move:k,show:k,hide:k,toggle:k,visible:k,hidden:k,focus:k,blur:k}};var ae,he="margin",le="border",ce="color",de="background-color",pe="transparent",ue=" !important",fe=!!e.createElement("canvas").getContext,ge=/rgba?\(0, 0, 0(, 0)?\)|transparent|#123456/i,me={},ve=["Webkit","O","Moz","ms"];if(fe)var ye=t.devicePixelRatio||1,be=function(){var t=e.createElement("canvas").getContext("2d");return t.backingStorePixelRatio||t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||1}(),we=ye/be;else var _e=function(t,e,i){return"<qtipvml:"+t+' xmlns="urn:schemas-microsoft.com:vml" class="qtip-vml" '+(e||"")+' style="behavior: url(#default#VML); '+(i||"")+'" />'};s.extend(_.prototype,{init:function(t){var e,i;i=this.element=t.elements.tip=s("<div />",{"class":R+"-tip"}).prependTo(t.tooltip),fe?(e=s("<canvas />").appendTo(this.element)[0].getContext("2d"),e.lineJoin="miter",e.miterLimit=1e5,e.save()):(e=_e("shape",'coordorigin="0,0"',"position:absolute;"),this.element.html(e+e),t._bind(s("*",i).add(i),["click","mousedown"],function(t){t.stopPropagation()},this._ns)),t._bind(t.tooltip,"tooltipmove",this.reposition,this._ns,this),this.create()},_swapDimensions:function(){this.size[0]=this.options.height,this.size[1]=this.options.width},_resetDimensions:function(){this.size[0]=this.options.width,this.size[1]=this.options.height},_useTitle:function(t){var e=this.qtip.elements.titlebar;return e&&(t.y===P||t.y===O&&this.element.position().top+this.size[1]/2+this.options.offset<e.outerHeight(W))},_parseCorner:function(t){var e=this.qtip.options.position.my;return t===I||e===I?t=I:t===W?t=new j(e.string()):t.string||(t=new j(t),t.fixed=W),t},_parseWidth:function(t,e,i){var s=this.qtip.elements,o=le+y(e)+"Width";return(i?w(i,o):w(s.content,o)||w(this._useTitle(t)&&s.titlebar||s.content,o)||w(s.tooltip,o))||0},_parseRadius:function(t){var e=this.qtip.elements,i=le+y(t.y)+y(t.x)+"Radius";return se.ie<9?0:w(this._useTitle(t)&&e.titlebar||e.content,i)||w(e.tooltip,i)||0},_invalidColour:function(t,e,i){var s=t.css(e);return!s||i&&s===t.css(i)||ge.test(s)?I:s},_parseColours:function(t){var e=this.qtip.elements,i=this.element.css("cssText",""),o=le+y(t[t.precedance])+y(ce),n=this._useTitle(t)&&e.titlebar||e.content,r=this._invalidColour,a=[];return a[0]=r(i,de)||r(n,de)||r(e.content,de)||r(e.tooltip,de)||i.css(de),a[1]=r(i,o,ce)||r(n,o,ce)||r(e.content,o,ce)||r(e.tooltip,o,ce)||e.tooltip.css(o),s("*",i).add(i).css("cssText",de+":"+pe+ue+";"+le+":0"+ue+";"),a},_calculateSize:function(t){var e,i,s,o=t.precedance===S,n=this.options.width,r=this.options.height,a="c"===t.abbrev(),h=(o?n:r)*(a?.5:1),l=Math.pow,c=Math.round,d=Math.sqrt(l(h,2)+l(r,2)),p=[this.border/h*d,this.border/r*d];return p[2]=Math.sqrt(l(p[0],2)-l(this.border,2)),p[3]=Math.sqrt(l(p[1],2)-l(this.border,2)),e=d+p[2]+p[3]+(a?0:p[0]),i=e/d,s=[c(i*n),c(i*r)],o?s:s.reverse()},_calculateTip:function(t,e,i){i=i||1,e=e||this.size;var s=e[0]*i,o=e[1]*i,n=Math.ceil(s/2),r=Math.ceil(o/2),a={br:[0,0,s,o,s,0],bl:[0,0,s,0,0,o],tr:[0,o,s,0,s,o],tl:[0,0,0,o,s,o],tc:[0,o,n,0,s,o],bc:[0,0,s,0,n,o],rc:[0,0,s,r,0,o],lc:[s,0,s,o,0,r]};return a.lt=a.br,a.rt=a.bl,a.lb=a.tr,a.rb=a.tl,a[t.abbrev()]},_drawCoords:function(t,e){t.beginPath(),t.moveTo(e[0],e[1]),t.lineTo(e[2],e[3]),t.lineTo(e[4],e[5]),t.closePath()},create:function(){var t=this.corner=(fe||se.ie)&&this._parseCorner(this.options.corner);return(this.enabled=!!this.corner&&"c"!==this.corner.abbrev())&&(this.qtip.cache.corner=t.clone(),this.update()),this.element.toggle(this.enabled),this.corner},update:function(e,i){if(!this.enabled)return this;var o,n,r,a,h,l,c,d,p=this.qtip.elements,u=this.element,f=u.children(),g=this.options,m=this.size,v=g.mimic,y=Math.round;e||(e=this.qtip.cache.corner||this.corner),v===I?v=e:(v=new j(v),v.precedance=e.precedance,"inherit"===v.x?v.x=e.x:"inherit"===v.y?v.y=e.y:v.x===v.y&&(v[e.precedance]=e[e.precedance])),n=v.precedance,e.precedance===E?this._swapDimensions():this._resetDimensions(),o=this.color=this._parseColours(e),o[1]!==pe?(d=this.border=this._parseWidth(e,e[e.precedance]),g.border&&1>d&&!ge.test(o[1])&&(o[0]=o[1]),this.border=d=g.border!==W?g.border:d):this.border=d=0,c=this.size=this._calculateSize(e),u.css({width:c[0],height:c[1],lineHeight:c[1]+"px"}),l=e.precedance===S?[y(v.x===D?d:v.x===F?c[0]-m[0]-d:(c[0]-m[0])/2),y(v.y===P?c[1]-m[1]:0)]:[y(v.x===D?c[0]-m[0]:0),y(v.y===P?d:v.y===B?c[1]-m[1]-d:(c[1]-m[1])/2)],fe?(r=f[0].getContext("2d"),r.restore(),r.save(),r.clearRect(0,0,6e3,6e3),a=this._calculateTip(v,m,we),h=this._calculateTip(v,this.size,we),f.attr(A,c[0]*we).attr(L,c[1]*we),f.css(A,c[0]).css(L,c[1]),this._drawCoords(r,h),r.fillStyle=o[1],r.fill(),r.translate(l[0]*we,l[1]*we),this._drawCoords(r,a),r.fillStyle=o[0],r.fill()):(a=this._calculateTip(v),a="m"+a[0]+","+a[1]+" l"+a[2]+","+a[3]+" "+a[4]+","+a[5]+" xe",l[2]=d&&/^(r|b)/i.test(e.string())?8===se.ie?2:1:0,f.css({coordsize:c[0]+d+" "+(c[1]+d),antialias:""+(v.string().indexOf(O)>-1),left:l[0]-l[2]*Number(n===E),top:l[1]-l[2]*Number(n===S),width:c[0]+d,height:c[1]+d}).each(function(t){var e=s(this);e[e.prop?"prop":"attr"]({coordsize:c[0]+d+" "+(c[1]+d),path:a,fillcolor:o[0],filled:!!t,stroked:!t}).toggle(!(!d&&!t)),!t&&e.html(_e("stroke",'weight="'+2*d+'px" color="'+o[1]+'" miterlimit="1000" joinstyle="miter"'))})),t.opera&&setTimeout(function(){p.tip.css({display:"inline-block",visibility:"visible"})},1),i!==I&&this.calculate(e,c)},calculate:function(t,e){if(!this.enabled)return I;var i,o,n=this,r=this.qtip.elements,a=this.element,h=this.options.offset,l=(r.tooltip.hasClass("ui-widget"),{});return t=t||this.corner,i=t.precedance,e=e||this._calculateSize(t),o=[t.x,t.y],i===E&&o.reverse(),s.each(o,function(s,o){var a,c,d;
14
  o===O?(a=i===S?D:P,l[a]="50%",l[he+"-"+a]=-Math.round(e[i===S?0:1]/2)+h):(a=n._parseWidth(t,o,r.tooltip),c=n._parseWidth(t,o,r.content),d=n._parseRadius(t),l[o]=Math.max(-n.border,s?c:h+(d>a?d:-a)))}),l[t[i]]-=e[i===E?0:1],a.css({margin:"",top:"",bottom:"",left:"",right:""}).css(l),l},reposition:function(t,e,s){function o(t,e,i,s,o){t===$&&l.precedance===e&&c[s]&&l[i]!==O?l.precedance=l.precedance===E?S:E:t!==$&&c[s]&&(l[e]=l[e]===O?c[s]>0?s:o:l[e]===s?o:s)}function n(t,e,o){l[t]===O?g[he+"-"+e]=f[t]=r[he+"-"+e]-c[e]:(a=r[o]!==i?[c[e],-r[e]]:[-c[e],r[e]],(f[t]=Math.max(a[0],a[1]))>a[0]&&(s[e]-=c[e],f[e]=I),g[r[o]!==i?o:e]=f[t])}if(this.enabled){var r,a,h=e.cache,l=this.corner.clone(),c=s.adjusted,d=e.options.position.adjust.method.split(" "),p=d[0],u=d[1]||d[0],f={left:I,top:I,x:0,y:0},g={};this.corner.fixed!==W&&(o(p,E,S,D,F),o(u,S,E,P,B),(l.string()!==h.corner.string()||h.cornerTop!==c.top||h.cornerLeft!==c.left)&&this.update(l,I)),r=this.calculate(l),r.right!==i&&(r.left=-r.right),r.bottom!==i&&(r.top=-r.bottom),r.user=this.offset,(f.left=p===$&&!!c.left)&&n(E,D,F),(f.top=u===$&&!!c.top)&&n(S,P,B),this.element.css(g).toggle(!(f.x&&f.y||l.x===O&&f.y||l.y===O&&f.x)),s.left-=r.left.charAt?r.user:p!==$||f.top||!f.left&&!f.top?r.left+this.border:0,s.top-=r.top.charAt?r.user:u!==$||f.left||!f.left&&!f.top?r.top+this.border:0,h.cornerLeft=c.left,h.cornerTop=c.top,h.corner=l.clone()}},destroy:function(){this.qtip._unbind(this.qtip.tooltip,this._ns),this.qtip.elements.tip&&this.qtip.elements.tip.find("*").remove().end().remove()}}),ae=V.tip=function(t){return new _(t,t.options.style.tip)},ae.initialize="render",ae.sanitize=function(t){if(t.style&&"tip"in t.style){var e=t.style.tip;"object"!=typeof e&&(e=t.style.tip={corner:e}),/string|boolean/i.test(typeof e.corner)||(e.corner=W)}},z.tip={"^position.my|style.tip.(corner|mimic|border)$":function(){this.create(),this.qtip.reposition()},"^style.tip.(height|width)$":function(t){this.size=[t.width,t.height],this.update(),this.qtip.reposition()},"^content.title|style.(classes|widget)$":function(){this.update()}},s.extend(W,q.defaults,{style:{tip:{corner:W,mimic:I,width:6,height:6,border:W,offset:0}}}),V.viewport=function(i,s,o,n,r,a,h){function l(t,e,i,o,n,r,a,h,l){var c=s[n],y=w[t],b=_[t],x=i===$,C=y===n?l:y===r?-l:-l/2,q=b===n?h:b===r?-h:-h/2,T=m[n]+v[n]-(u?0:p[n]),j=T-c,z=c+l-(a===A?f:g)-T,M=C-(w.precedance===t||y===w[e]?q:0)-(b===O?h/2:0);return x?(M=(y===n?1:-1)*C,s[n]+=j>0?j:z>0?-z:0,s[n]=Math.max(-p[n]+v[n],c-M,Math.min(Math.max(-p[n]+v[n]+(a===A?f:g),c+M),s[n],"center"===y?c-C:1e9))):(o*=i===N?2:0,j>0&&(y!==n||z>0)?(s[n]-=M+o,d.invert(t,n)):z>0&&(y!==r||j>0)&&(s[n]-=(y===O?-M:M)+o,d.invert(t,r)),s[n]<m&&-s[n]>z&&(s[n]=c,d=w.clone())),s[n]-c}var c,d,p,u,f,g,m,v,y=o.target,b=i.elements.tooltip,w=o.my,_=o.at,x=o.adjust,C=x.method.split(" "),q=C[0],T=C[1]||C[0],j=o.viewport,z=o.container,M=(i.cache,{left:0,top:0});return j.jquery&&y[0]!==t&&y[0]!==e.body&&"none"!==x.method?(p=z.offset()||M,u="static"===z.css("position"),c="fixed"===b.css("position"),f=j[0]===t?j.width():j.outerWidth(I),g=j[0]===t?j.height():j.outerHeight(I),m={left:c?0:j.scrollLeft(),top:c?0:j.scrollTop()},v=j.offset()||M,("shift"!==q||"shift"!==T)&&(d=w.clone()),M={left:"none"!==q?l(E,S,q,x.x,D,F,A,n,a):0,top:"none"!==T?l(S,E,T,x.y,P,B,L,r,h):0,my:d}):M},V.polys={polygon:function(t,e){var i,s,o,n={width:0,height:0,position:{top:1e10,right:0,bottom:0,left:1e10},adjustable:I},r=0,a=[],h=1,l=1,c=0,d=0;for(r=t.length;r--;)i=[parseInt(t[--r],10),parseInt(t[r+1],10)],i[0]>n.position.right&&(n.position.right=i[0]),i[0]<n.position.left&&(n.position.left=i[0]),i[1]>n.position.bottom&&(n.position.bottom=i[1]),i[1]<n.position.top&&(n.position.top=i[1]),a.push(i);if(s=n.width=Math.abs(n.position.right-n.position.left),o=n.height=Math.abs(n.position.bottom-n.position.top),"c"===e.abbrev())n.position={left:n.position.left+n.width/2,top:n.position.top+n.height/2};else{for(;s>0&&o>0&&h>0&&l>0;)for(s=Math.floor(s/2),o=Math.floor(o/2),e.x===D?h=s:e.x===F?h=n.width-s:h+=Math.floor(s/2),e.y===P?l=o:e.y===B?l=n.height-o:l+=Math.floor(o/2),r=a.length;r--&&!(a.length<2);)c=a[r][0]-n.position.left,d=a[r][1]-n.position.top,(e.x===D&&c>=h||e.x===F&&h>=c||e.x===O&&(h>c||c>n.width-h)||e.y===P&&d>=l||e.y===B&&l>=d||e.y===O&&(l>d||d>n.height-l))&&a.splice(r,1);n.position={left:a[0][0],top:a[0][1]}}return n},rect:function(t,e,i,s){return{width:Math.abs(i-t),height:Math.abs(s-e),position:{left:Math.min(t,i),top:Math.min(e,s)}}},_angles:{tc:1.5,tr:7/4,tl:5/4,bc:.5,br:.25,bl:.75,rc:2,lc:1,c:0},ellipse:function(t,e,i,s,o){var n=V.polys._angles[o.abbrev()],r=0===n?0:i*Math.cos(n*Math.PI),a=s*Math.sin(n*Math.PI);return{width:2*i-Math.abs(r),height:2*s-Math.abs(a),position:{left:t+r,top:e+a},adjustable:I}},circle:function(t,e,i,s){return V.polys.ellipse(t,e,i,i,s)}},V.imagemap=function(t,e,i){e.jquery||(e=s(e));var o,n,r,a,h,l=(e.attr("shape")||"rect").toLowerCase().replace("poly","polygon"),c=s('img[usemap="#'+e.parent("map").attr("name")+'"]'),d=s.trim(e.attr("coords")),p=d.replace(/,$/,"").split(",");if(!c.length)return I;if("polygon"===l)a=V.polys.polygon(p,i);else{if(!V.polys[l])return I;for(r=-1,h=p.length,n=[];++r<h;)n.push(parseInt(p[r],10));a=V.polys[l].apply(this,n.concat(i))}return o=c.offset(),o.left+=Math.ceil((c.outerWidth(I)-c.width())/2),o.top+=Math.ceil((c.outerHeight(I)-c.height())/2),a.position.left+=o.left,a.position.top+=o.top,a},V.svg=function(t,i,o){for(var n,r,a,h,l,c,d,p,u,f=(s(e),i[0]),g=s(f.ownerSVGElement),m=f.ownerDocument,v=(parseInt(i.css("stroke-width"),10)||0)/2;!f.getBBox;)f=f.parentNode;if(!f.getBBox||!f.parentNode)return I;switch(f.nodeName){case"ellipse":case"circle":p=V.polys.ellipse(f.cx.baseVal.value,f.cy.baseVal.value,(f.rx||f.r).baseVal.value+v,(f.ry||f.r).baseVal.value+v,o);break;case"line":case"polygon":case"polyline":for(d=f.points||[{x:f.x1.baseVal.value,y:f.y1.baseVal.value},{x:f.x2.baseVal.value,y:f.y2.baseVal.value}],p=[],c=-1,h=d.numberOfItems||d.length;++c<h;)l=d.getItem?d.getItem(c):d[c],p.push.apply(p,[l.x,l.y]);p=V.polys.polygon(p,o);break;default:p=f.getBBox(),p={width:p.width,height:p.height,position:{left:p.x,top:p.y}}}return u=p.position,g=g[0],g.createSVGPoint&&(r=f.getScreenCTM(),d=g.createSVGPoint(),d.x=u.left,d.y=u.top,a=d.matrixTransform(r),u.left=a.x,u.top=a.y),m!==e&&"mouse"!==t.position.target&&(n=s((m.defaultView||m.parentWindow).frameElement).offset(),n&&(u.left+=n.left,u.top+=n.top)),m=s(m),u.left+=m.scrollLeft(),u.top+=m.scrollTop(),p};var xe,Ce,qe="qtip-modal",Te="."+qe;Ce=function(){function t(t){if(s.expr[":"].focusable)return s.expr[":"].focusable;var e,i,o,n=!isNaN(s.attr(t,"tabindex")),r=t.nodeName&&t.nodeName.toLowerCase();return"area"===r?(e=t.parentNode,i=e.name,t.href&&i&&"map"===e.nodeName.toLowerCase()?(o=s("img[usemap=#"+i+"]")[0],!!o&&o.is(":visible")):!1):/input|select|textarea|button|object/.test(r)?!t.disabled:"a"===r?t.href||n:n}function i(t){c.length<1&&t.length?t.not("body").blur():c.first().focus()}function o(t){if(h.is(":visible")){var e,o=s(t.target),a=n.tooltip,l=o.closest(G);e=l.length<1?I:parseInt(l[0].style.zIndex,10)>parseInt(a[0].style.zIndex,10),e||o.closest(G)[0]===a[0]||i(o),r=t.target===c[c.length-1]}}var n,r,a,h,l=this,c={};s.extend(l,{init:function(){return h=l.elem=s("<div />",{id:"qtip-overlay",html:"<div></div>",mousedown:function(){return I}}).hide(),s(e.body).bind("focusin"+Te,o),s(e).bind("keydown"+Te,function(t){n&&n.options.show.modal.escape&&27===t.keyCode&&n.hide(t)}),h.bind("click"+Te,function(t){n&&n.options.show.modal.blur&&n.hide(t)}),l},update:function(e){n=e,c=e.options.show.modal.stealfocus!==I?e.tooltip.find("*").filter(function(){return t(this)}):[]},toggle:function(t,o,r){var c=(s(e.body),t.tooltip),d=t.options.show.modal,p=d.effect,u=o?"show":"hide",f=h.is(":visible"),g=s(Te).filter(":visible:not(:animated)").not(c);return l.update(t),o&&d.stealfocus!==I&&i(s(":focus")),h.toggleClass("blurs",d.blur),o&&h.appendTo(e.body),h.is(":animated")&&f===o&&a!==I||!o&&g.length?l:(h.stop(W,I),s.isFunction(p)?p.call(h,o):p===I?h[u]():h.fadeTo(parseInt(r,10)||90,o?1:0,function(){o||h.hide()}),o||h.queue(function(t){h.css({left:"",top:""}),s(Te).length||h.detach(),t()}),a=o,n.destroyed&&(n=k),l)}}),l.init()},Ce=new Ce,s.extend(x.prototype,{init:function(t){var e=t.tooltip;return this.options.on?(t.elements.overlay=Ce.elem,e.addClass(qe).css("z-index",q.modal_zindex+s(Te).length),t._bind(e,["tooltipshow","tooltiphide"],function(t,i,o){var n=t.originalEvent;if(t.target===e[0])if(n&&"tooltiphide"===t.type&&/mouse(leave|enter)/.test(n.type)&&s(n.relatedTarget).closest(Ce.elem[0]).length)try{t.preventDefault()}catch(r){}else(!n||n&&"tooltipsolo"!==n.type)&&this.toggle(t,"tooltipshow"===t.type,o)},this._ns,this),t._bind(e,"tooltipfocus",function(t,i){if(!t.isDefaultPrevented()&&t.target===e[0]){var o=s(Te),n=q.modal_zindex+o.length,r=parseInt(e[0].style.zIndex,10);Ce.elem[0].style.zIndex=n-1,o.each(function(){this.style.zIndex>r&&(this.style.zIndex-=1)}),o.filter("."+K).qtip("blur",t.originalEvent),e.addClass(K)[0].style.zIndex=n,Ce.update(i);try{t.preventDefault()}catch(a){}}},this._ns,this),void t._bind(e,"tooltiphide",function(t){t.target===e[0]&&s(Te).filter(":visible").not(e).last().qtip("focus",t)},this._ns,this)):this},toggle:function(t,e,i){return t&&t.isDefaultPrevented()?this:void Ce.toggle(this.qtip,!!e,i)},destroy:function(){this.qtip.tooltip.removeClass(qe),this.qtip._unbind(this.qtip.tooltip,this._ns),Ce.toggle(this.qtip,I),delete this.qtip.elements.overlay}}),xe=V.modal=function(t){return new x(t,t.options.show.modal)},xe.sanitize=function(t){t.show&&("object"!=typeof t.show.modal?t.show.modal={on:!!t.show.modal}:"undefined"==typeof t.show.modal.on&&(t.show.modal.on=W))},q.modal_zindex=q.zindex-200,xe.initialize="render",z.modal={"^show.modal.(on|blur)$":function(){this.destroy(),this.init(),this.qtip.elems.overlay.toggle(this.qtip.tooltip[0].offsetWidth>0)}},s.extend(W,q.defaults,{show:{modal:{on:I,effect:W,blur:W,stealfocus:W,escape:W}}});var je,ze='<iframe class="qtip-bgiframe" frameborder="0" tabindex="-1" src="javascript:\'\';" style="display:block; position:absolute; z-index:-1; filter:alpha(opacity=0); -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";"></iframe>';s.extend(C.prototype,{_scroll:function(){var e=this.qtip.elements.overlay;e&&(e[0].style.top=s(t).scrollTop()+"px")},init:function(i){var o=i.tooltip;s("select, object").length<1&&(this.bgiframe=i.elements.bgiframe=s(ze).appendTo(o),i._bind(o,"tooltipmove",this.adjustBGIFrame,this._ns,this)),this.redrawContainer=s("<div/>",{id:R+"-rcontainer"}).appendTo(e.body),i.elements.overlay&&i.elements.overlay.addClass("qtipmodal-ie6fix")&&(i._bind(t,["scroll","resize"],this._scroll,this._ns,this),i._bind(o,["tooltipshow"],this._scroll,this._ns,this)),this.redraw()},adjustBGIFrame:function(){var t,e,i=this.qtip.tooltip,s={height:i.outerHeight(I),width:i.outerWidth(I)},o=this.qtip.plugins.tip,n=this.qtip.elements.tip;e=parseInt(i.css("borderLeftWidth"),10)||0,e={left:-e,top:-e},o&&n&&(t="x"===o.corner.precedance?[A,D]:[L,P],e[t[1]]-=n[t[0]]()),this.bgiframe.css(e).css(s)},redraw:function(){if(this.qtip.rendered<1||this.drawing)return this;var t,e,i,s,o=this.qtip.tooltip,n=this.qtip.options.style,r=this.qtip.options.position.container;return this.qtip.drawing=1,n.height&&o.css(L,n.height),n.width?o.css(A,n.width):(o.css(A,"").appendTo(this.redrawContainer),e=o.width(),1>e%2&&(e+=1),i=o.css("maxWidth")||"",s=o.css("minWidth")||"",t=(i+s).indexOf("%")>-1?r.width()/100:0,i=(i.indexOf("%")>-1?t:1)*parseInt(i,10)||e,s=(s.indexOf("%")>-1?t:1)*parseInt(s,10)||0,e=i+s?Math.min(Math.max(e,s),i):e,o.css(A,Math.round(e)).appendTo(r)),this.drawing=0,this},destroy:function(){this.bgiframe&&this.bgiframe.remove(),this.qtip._unbind([t,this.qtip.tooltip],this._ns)}}),je=V.ie6=function(t){return 6===se.ie?new C(t):I},je.initialize="render",z.ie6={"^content|style$":function(){this.redraw()}}})}(window,document);
admin/js/support.js CHANGED
@@ -1,12 +1,12 @@
1
- jQuery( document ).ready( function() {
2
-
3
- yikes_mc_populate_plugin_name_and_slug_fields();
4
-
5
- jQuery( '#license-key' ).change( yikes_mc_populate_plugin_name_and_slug_fields );
6
-
7
- });
8
-
9
- function yikes_mc_populate_plugin_name_and_slug_fields() {
10
- jQuery( '#plugin-slug' ).val( jQuery( '#license-key > option:selected' ).data( 'plugin-slug' ) );
11
- jQuery( '#plugin-name' ).val( jQuery( '#license-key > option:selected' ).data( 'plugin-name' ) );
12
  }
1
+ jQuery( document ).ready( function() {
2
+
3
+ yikes_mc_populate_plugin_name_and_slug_fields();
4
+
5
+ jQuery( '#license-key' ).change( yikes_mc_populate_plugin_name_and_slug_fields );
6
+
7
+ });
8
+
9
+ function yikes_mc_populate_plugin_name_and_slug_fields() {
10
+ jQuery( '#plugin-slug' ).val( jQuery( '#license-key > option:selected' ).data( 'plugin-slug' ) );
11
+ jQuery( '#plugin-name' ).val( jQuery( '#license-key > option:selected' ).data( 'plugin-name' ) );
12
  }
admin/js/yikes-inc-easy-mailchimp-tinymce-button.js CHANGED
@@ -1,124 +1,124 @@
1
- ( function() {
2
-
3
- var forms = JSON.parse( localized_data.forms );
4
-
5
- /* loop over the stored options and decode them for display back to the user */
6
- /* used to escape quotes and add appropriate spaces */
7
- var array_length = parseInt( forms.length - 1 );
8
-
9
- var i = 0;
10
- while( i <= array_length ) {
11
- forms[i].text = decodeURI(forms[i].text.replace( /\+/g , ' ' ) );
12
- i++;
13
- }
14
-
15
- tinymce.PluginManager.add( 'yks_mc_tinymce_button', function( editor ) {
16
-
17
- /* Add a button that opens a window */
18
- editor.addButton( 'yks_mc_tinymce_button_key', {
19
-
20
- image: forms.tinymce_icon,
21
-
22
- title: localized_data.button_title,
23
-
24
- onclick: function() {
25
-
26
- /* Open window */
27
- editor.windowManager.open( {
28
-
29
- title: localized_data.popup_title,
30
-
31
- body: [
32
- {
33
- type: 'listbox',
34
- name: 'list_id',
35
- label: localized_data.list_id_label,
36
- values: forms
37
- },
38
- {
39
- type: 'checkbox',
40
- name: 'show_title',
41
- label: localized_data.show_title_label
42
- },
43
- {
44
- type: 'checkbox',
45
- name: 'show_description',
46
- label: localized_data.show_description_label
47
- },
48
- {
49
- type: 'textbox',
50
- name: 'submit_button_text',
51
- label: localized_data.submit_button_text_label
52
- },
53
- {
54
- type: 'container',
55
- name: 'submit_button_message',
56
- html: localized_data.submit_button_message
57
- }
58
- ],
59
-
60
- id: 'yikes_mailchimp_tinyMCE_modal', /* and an ID to the modal, to target it easier */
61
-
62
- onsubmit: function( e ) {
63
-
64
- /* Insert content when the window form is submitted */
65
- /* store the mailchimp list ID */
66
- var mailChimp_form_id = e.data.list_id;
67
-
68
- /* store the submit button text */
69
- var submit_button_text = e.data.submit_button_text;
70
-
71
- /* store if we should show the description */
72
- var show_title = e.data.show_title;
73
-
74
- /* store if we should show the description */
75
- var show_description = e.data.show_description;
76
-
77
- if ( mailChimp_form_id == '-' ) {
78
-
79
- jQuery( '#yikes_mailchimp_tinyMCE_modal' ).find( '.mce-foot' ).find( '.mce-widget' ).hide();
80
-
81
- jQuery( '#yikes_mailchimp_tinyMCE_modal-absend' ).next().prepend( '<div class="error"><p>' + localized_data.alert_translated + '</p></div>' );
82
-
83
- return false;
84
-
85
- } else {
86
-
87
- var shortcode_atts = [];
88
-
89
- shortcode_atts.push( 'form="'+mailChimp_form_id+'"' );
90
-
91
- if( true === show_title ) {
92
-
93
- shortcode_atts.push( 'title="1"' );
94
-
95
- }
96
-
97
- if( true === show_description ) {
98
-
99
- shortcode_atts.push( 'description="1"' );
100
-
101
- }
102
-
103
- // If they didn't enter something for submit, don't add it to the shortcode.
104
- if ( '' !== submit_button_text ) {
105
-
106
- shortcode_atts.push('submit="' + submit_button_text + '"');
107
-
108
- }
109
-
110
- editor.insertContent( '[yikes-mailchimp '+shortcode_atts.join( ' ' )+']' );
111
-
112
- }
113
-
114
- }
115
-
116
- } );
117
-
118
- }
119
-
120
- } );
121
-
122
- } );
123
-
124
- } )();
1
+ ( function() {
2
+
3
+ var forms = JSON.parse( localized_data.forms );
4
+
5
+ /* loop over the stored options and decode them for display back to the user */
6
+ /* used to escape quotes and add appropriate spaces */
7
+ var array_length = parseInt( forms.length - 1 );
8
+
9
+ var i = 0;
10
+ while( i <= array_length ) {
11
+ forms[i].text = decodeURI(forms[i].text.replace( /\+/g , ' ' ) );
12
+ i++;
13
+ }
14
+
15
+ tinymce.PluginManager.add( 'yks_mc_tinymce_button', function( editor ) {
16
+
17
+ /* Add a button that opens a window */
18
+ editor.addButton( 'yks_mc_tinymce_button_key', {
19
+
20
+ image: forms.tinymce_icon,
21
+
22
+ title: localized_data.button_title,
23
+
24
+ onclick: function() {
25
+
26
+ /* Open window */
27
+ editor.windowManager.open( {
28
+
29
+ title: localized_data.popup_title,
30
+
31
+ body: [
32
+ {
33
+ type: 'listbox',
34
+ name: 'list_id',
35
+ label: localized_data.list_id_label,
36
+ values: forms
37
+ },
38
+ {
39
+ type: 'checkbox',
40
+ name: 'show_title',
41
+ label: localized_data.show_title_label
42
+ },
43
+ {
44
+ type: 'checkbox',
45
+ name: 'show_description',
46
+ label: localized_data.show_description_label
47
+ },
48
+ {
49
+ type: 'textbox',
50
+ name: 'submit_button_text',
51
+ label: localized_data.submit_button_text_label
52
+ },
53
+ {
54
+ type: 'container',
55
+ name: 'submit_button_message',
56
+ html: localized_data.submit_button_message
57
+ }
58
+ ],
59
+
60
+ id: 'yikes_mailchimp_tinyMCE_modal', /* and an ID to the modal, to target it easier */
61
+
62
+ onsubmit: function( e ) {
63
+
64
+ /* Insert content when the window form is submitted */
65
+ /* store the mailchimp list ID */
66
+ var mailChimp_form_id = e.data.list_id;
67
+
68
+ /* store the submit button text */
69
+ var submit_button_text = e.data.submit_button_text;
70
+
71
+ /* store if we should show the description */
72
+ var show_title = e.data.show_title;
73
+
74
+ /* store if we should show the description */
75
+ var show_description = e.data.show_description;
76
+
77
+ if ( mailChimp_form_id == '-' ) {
78
+
79
+ jQuery( '#yikes_mailchimp_tinyMCE_modal' ).find( '.mce-foot' ).find( '.mce-widget' ).hide();
80
+
81
+ jQuery( '#yikes_mailchimp_tinyMCE_modal-absend' ).next().prepend( '<div class="error"><p>' + localized_data.alert_translated + '</p></div>' );
82
+
83
+ return false;
84
+
85
+ } else {
86
+
87
+ var shortcode_atts = [];
88
+
89
+ shortcode_atts.push( 'form="'+mailChimp_form_id+'"' );
90
+
91
+ if( true === show_title ) {
92
+
93
+ shortcode_atts.push( 'title="1"' );
94
+
95
+ }
96
+
97
+ if( true === show_description ) {
98
+
99
+ shortcode_atts.push( 'description="1"' );
100
+
101
+ }
102
+
103
+ // If they didn't enter something for submit, don't add it to the shortcode.
104
+ if ( '' !== submit_button_text ) {
105
+
106
+ shortcode_atts.push('submit="' + submit_button_text + '"');
107
+
108
+ }
109
+
110
+ editor.insertContent( '[yikes-mailchimp '+shortcode_atts.join( ' ' )+']' );
111
+
112
+ }
113
+
114
+ }
115
+
116
+ } );
117
+
118
+ }
119
+
120
+ } );
121
+
122
+ } );
123
+
124
+ } )();
admin/partials/ajax/add_field_to_form.php CHANGED
@@ -1,377 +1,377 @@
1
- <?php
2
- $form_data = array(
3
- 'field_name' => $_POST['field_name'],
4
- 'merge_tag' => $_POST['merge_tag'],
5
- 'field_type' => $_POST['field_type'],
6
- 'list_id' => $_POST['list_id'],
7
- );
8
-
9
- // Grab our list handler.
10
- $list_handler = yikes_get_mc_api_manager()->get_list_handler();
11
-
12
- $available_merge_variables = $list_handler->get_merge_fields( $form_data['list_id'] );
13
- if ( is_wp_error( $available_merge_variables ) ) {
14
- $error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
15
- $error_logging->maybe_write_to_log(
16
- $available_merge_variables->get_error_code(),
17
- __( "Get Merge Variables", 'yikes-inc-easy-mailchimp-extender' ),
18
- __( "Add Field to Form", 'yikes-inc-easy-mailchimp-extender' )
19
- );
20
- ?>
21
- <section class="draggable" id="error-container">
22
- <p>
23
- <span class="dashicons dashicons-no-alt"></span> <?php printf( __( 'Error: %s', 'yikes-inc-easy-mailchimp-extender' ), $available_merge_variables->get_error_code() ); ?>
24
- </p>
25
- </section>
26
- <?php
27
- return;
28
- }
29
-
30
- // find and return the location of this merge field in the array
31
- $index = $this->findMCListIndex( $form_data['merge_tag'], $available_merge_variables['merge_fields'], 'tag' );
32
-
33
- // store it and use it to pre-populate field data (only on initial add to form)
34
- $merge_field_data = $available_merge_variables['merge_fields'][ $index ];
35
- ?>
36
- <section class="draggable" id="<?php echo $form_data['field_name']; ?>">
37
- <!-- top -->
38
- <a href="#" class="expansion-section-title settings-sidebar">
39
- <span class="dashicons dashicons-plus yikes-mc-expansion-toggle" title="<?php _e( 'Expand Field' , 'yikes-inc-easy-mailchimp-extender' ); ?>"></span>
40
- <?php echo stripslashes( $form_data['field_name'] ); ?>
41
- <span class="field-type-text"><small><?php echo __( 'type' , 'yikes-inc-easy-mailchimp-extender' ) . ' : ' . $form_data['field_type']; ?></small></span>
42
- </a>
43
- <!-- expansion section -->
44
- <div class="yikes-mc-settings-expansion-section">
45
-
46
- <!-- Single or Double Opt-in -->
47
- <p class="type-container form-field-container"><!-- necessary to prevent skipping on slideToggle(); -->
48
- <!-- store the label -->
49
- <input type="hidden" name="field[<?php echo $merge_field_data['tag']; ?>][label]" value="<?php echo htmlspecialchars( $form_data['field_name'] ); ?>" />
50
- <input type="hidden" name="field[<?php echo $merge_field_data['tag']; ?>][type]" value="<?php echo $form_data['field_type']; ?>" />
51
- <input type="hidden" name="field[<?php echo $merge_field_data['tag']; ?>][merge]" value="<?php echo $merge_field_data['tag']; ?>" />
52
- <input type="hidden" class="field-<?php echo $merge_field_data['tag']; ?>-position position-input" name="field[<?php echo $merge_field_data['tag']; ?>][position]" value="" />
53
-
54
- <?php if ( $form_data['field_type'] == 'radio' || $form_data['field_type'] == 'dropdown' ) { ?>
55
- <?php $choices = ( isset( $merge_field_data['options']['choices'] ) ) ? esc_attr( json_encode( $merge_field_data['options']['choices'] ) ) : ''; ?>
56
- <input type="hidden" name="field[<?php echo $merge_field_data['tag']; ?>][choices]" value='<?php echo $choices; ?>' />
57
- <?php } ?>
58
-
59
- <table class="form-table form-field-container">
60
-
61
- <!-- Merge Tag -->
62
- <tr valign="top">
63
- <td scope="row">
64
- <label for="merge-tag">
65
- <?php _e( 'Merge Tag' , 'yikes-inc-easy-mailchimp-extender' ); ?>
66
- </label>
67
- </td>
68
- <td>
69
- <input class="widefat merge-tag-text" type="text" readonly value="<?php echo $merge_field_data['tag']; ?>">
70
- </td>
71
- </tr>
72
-
73
- <?php switch( $form_data['field_type'] ) {
74
-
75
- default:
76
- break;
77
-
78
- case 'text':
79
- case 'number':
80
- case 'url':
81
- case 'email':
82
- case 'phone':
83
- case 'birthday':
84
- case 'zip':
85
- ?>
86
- <!-- Placeholder -->
87
- <tr valign="top">
88
- <td scope="row">
89
- <label for="placeholder">
90
- <?php _e( 'Placeholder' , 'yikes-inc-easy-mailchimp-extender' ); ?>
91
- </label>
92
- </td>
93
- <td>
94
- <input type="text" class="widefat" name="field[<?php echo $merge_field_data['tag']; ?>][placeholder]" value="<?php echo isset( $merge_field_data['placeholder'] ) ? stripslashes( wp_strip_all_tags( $merge_field_data['placeholder'] ) ): '' ; ?>" />
95
- <p class="description"><small><?php _e( "Assign a placeholder value to this field.", 'yikes-inc-easy-mailchimp-extender' );?></small></p>
96
- </td>
97
- </tr>
98
-
99
- <?php
100
- /*
101
- * Loop over field types and store necessary formats
102
- * ( date, birthday - dateformat ; phone - phoneformat )
103
- */
104
- switch( $form_data['field_type'] ) {
105
-
106
- /* Store the date format, for properly rendering dates on the front end */
107
- case 'date':
108
- $date_format = isset( $merge_field_data['options']['dateformat'] ) ? $merge_field_data['options']['dateformat'] : 'MM/DD/YYYY';
109
- ?>
110
- <input type="hidden" name="field[<?php echo $merge_field_data['tag']; ?>][date_format]" value="<?php echo strtolower( $date_format ); ?>" />
111
- <?php
112
- break;
113
-
114
- case 'birthday':
115
- $date_format = isset( $merge_field_data['options']['dateformat'] ) ? $merge_field_data['options']['dateformat'] : 'MM/DD';
116
- ?>
117
- <input type="hidden" name="field[<?php echo $merge_field_data['tag']; ?>][date_format]" value="<?php echo strtolower( $date_format ); ?>" />
118
- <?php
119
- break;
120
-
121
- /* Store the phone format, for properly regex pattern */
122
- case 'phone':
123
- ?>
124
- <input type="hidden" name="field[<?php echo $merge_field_data['tag']; ?>][phone_format]" value="<?php echo $merge_field_data['options']['phone_format']; ?>" />
125
- <?php
126
- break;
127
- }
128
-
129
- break;
130
-
131
- case 'address':
132
- ?>
133
- <tr valign="top">
134
- <td scope="row">
135
- <label for="placeholder_<?php echo esc_attr( $field['merge'] ); ?>">
136
- <?php _e( 'Placeholder' , 'yikes-inc-easy-mailchimp-extender' ); ?>
137
- </label>
138
- </td>
139
- <td>
140
- <input type="checkbox" class="widefat" name="field[<?php echo $merge_field_data['tag']; ?>][placeholder]" value="1" />
141
- <span class="description"><small><?php _e( "Use placeholders for this field (these will be automatically filled in with field names).", 'yikes-inc-easy-mailchimp-extender' );?></small></span>
142
- </td>
143
- </tr>
144
- <?php
145
- break;
146
-
147
- }
148
- ?>
149
-
150
- <!-- Default Value -->
151
- <?php switch( $form_data['field_type'] ) {
152
-
153
- default:
154
- case 'text':
155
- ?>
156
- <tr valign="top">
157
- <td scope="row">
158
- <label for="placeholder">
159
- <?php _e( 'Default Value' , 'yikes-inc-easy-mailchimp-extender' ); ?>
160
- </label>
161
- </td>
162
- <td>
163
- <input type="text" class="widefat" name="field[<?php echo $merge_field_data['tag']; ?>][default]" <?php if( $form_data['field_type'] != 'url' ) { ?> value="<?php echo isset( $merge_field_data['default_value'] ) ? stripslashes( wp_strip_all_tags( $merge_field_data['default_value'] ) ) : ''; ?>" <?php } else { ?> value="<?php echo isset( $merge_field_data['default_value'] ) ? stripslashes( wp_strip_all_tags( esc_url_raw( $merge_field_data['default_value'] ) ) ) : ''; } ?>" />
164
- <p class="description"><small><?php _e( "Assign a default value to populate this field with on initial page load.", 'yikes-inc-easy-mailchimp-extender' );?></small></p>
165
- <?php
166
- switch ( $form_data['field_type'] ) {
167
- case 'text':
168
- ?>
169
- <p><small class="pre-defined-tag-link"><a href="#TB_inline?width=600&height=550&inlineId=pre-defined-tag-container" class="thickbox" onclick="storeGlobalClicked( jQuery( this ) );"><?php _e( 'View Pre-Defined Tags' , 'yikes-inc-easy-mailchimp-extender' ); ?></a></small></p>
170
- <?php
171
- break;
172
- } ?>
173
- </td>
174
- </tr>
175
- <?php
176
- break;
177
-
178
- case 'radio':
179
- ?>
180
- <tr valign="top">
181
- <td scope="row">
182
- <label for="placeholder">
183
- <?php _e( 'Default Selection' , 'yikes-inc-easy-mailchimp-extender' ); ?>
184
- </label>
185
- </td>
186
- <td>
187
- <?php $pre_selected = ! empty( $merge_field_data['default_choice'] ) ? $merge_field_data['default_choice'] : 'no-default'; ?>
188
- <label for="<?php echo $merge_field_data['tag'] . '-no-default'; ?>">
189
- <input id="<?php echo $merge_field_data['tag'] . '-no-default'; ?>"
190
- type="radio"
191
- name="field[<?php echo $merge_field_data['tag']; ?>][default_choice]"
192
- value="no-default" <?php checked( $pre_selected, 'no-default' ); ?>
193
- >
194
- No Default&nbsp;
195
- </label>
196
- <?php
197
- $x = 0;
198
- foreach ( $merge_field_data['options']['choices'] as $choice => $value ) { ?>
199
- <label>
200
- <input type="radio" name="field[<?php echo $merge_field_data['tag']; ?>][default_choice]" value="<?php echo $x; ?>" <?php checked( $pre_selected, $choice ); ?>><?php echo $value; ?>
201
- </label>
202
- <?php $x++;
203
- } ?>
204
- <p class="description"><small><?php _e( "Select the option that should be selected by default.", 'yikes-inc-easy-mailchimp-extender' );?></small></p>
205
- </td>
206
- </tr>
207
-
208
- <?php
209
- break;
210
-
211
- case 'dropdown':
212
- ?>
213
- <tr valign="top">
214
- <td scope="row">
215
- <label for="placeholder">
216
- <?php _e( 'Default Selection' , 'yikes-inc-easy-mailchimp-extender' ); ?>
217
- </label>
218
- </td>
219
- <td>
220
- <select type="default" name="field[<?php echo $merge_field_data['tag']; ?>][default_choice]">
221
- <?php $pre_selected = ! empty( $merge_field_data['default_choice'] ) ? $merge_field_data['default_choice'] : 'no-default'; ?>
222
- <option value="no-default" <?php selected( $pre_selected, $choice ); ?>>No Default</option>
223
- <?php foreach ( $merge_field_data['options']['choices'] as $choice => $value ) { ?>
224
- <option value="<?php echo $choice; ?>" <?php selected( $pre_selected, $choice ); ?>><?php echo stripslashes( $value ); ?></option>
225
- <?php } ?>
226
- </select>
227
- <p class="description"><small><?php _e( "Which option should be selected by default?", 'yikes-inc-easy-mailchimp-extender' );?></small></p>
228
- </td>
229
- </tr>
230
-
231
- <?php
232
- break;
233
-
234
- } // end switch field type ?>
235
-
236
- <!-- Field Description -->
237
- <tr valign="top">
238
- <td scope="row">
239
- <label for="placeholder">
240
- <?php _e( 'Description' , 'yikes-inc-easy-mailchimp-extender' ); ?>
241
- </label>
242
- </td>
243
- <td>
244
- <textarea class="widefat field-description-input" name="field[<?php echo $merge_field_data['tag']; ?>][description]"></textarea>
245
- <p class="description"><small><?php _e( "Enter the description for the form field. This will be displayed to the user and provide some direction on how the field should be filled out or selected.", 'yikes-inc-easy-mailchimp-extender' );?></small></p>
246
- </td>
247
- </tr>
248
- <!-- Description Above Field -->
249
- <tr valign="top" class="yikes-checkbox-container">
250
- <td scope="row">
251
- <label for="description_above_<?php echo esc_attr( $merge_field_data['tag'] ); ?>">
252
- <?php _e( 'Description Above Field' , 'yikes-inc-easy-mailchimp-extender' ); ?>
253
- </label>
254
- </td>
255
- <td>
256
- <input type="checkbox" id="description_above_<?php echo esc_attr( $merge_field_data['tag'] ); ?>" class="widefat field-description-input" name="field[<?php echo $merge_field_data['tag']; ?>][description_above]" value="1" />
257
- <p class="description"><small><?php _e( "By default the description will appear undearneath the field. Check this box if you'd like the description to appear above the field.", 'yikes-inc-easy-mailchimp-extender' );?></small></p>
258
- </td>
259
- </tr>
260
- <!-- Additional Classes -->
261
- <tr valign="top">
262
- <td scope="row">
263
- <label for="placeholder">
264
- <?php _e( 'Additional Classes' , 'yikes-inc-easy-mailchimp-extender' ); ?>
265
- </label>
266
- </td>
267
- <td>
268
- <input type="text" class="widefat" name="field[<?php echo $merge_field_data['tag']; ?>][additional-classes]" value="<?php echo isset( $form_data['classes'] ) ? stripslashes( wp_strip_all_tags( $form_data['classes'] ) ) : '' ; ?>" />
269
- <p class="description"><small><?php printf( __( "Assign additional classes to this field. %s.", 'yikes-inc-easy-mailchimp-extender' ), '<a target="_blank" href="' . esc_url( 'https://yikesplugins.com/support/knowledge-base/bundled-css-classes/' ) . '">' . __( 'View bundled classes', 'yikes-inc-easy-mailchimp-extender' ) . '</a>' );?></small></p>
270
- </td>
271
- </tr>
272
- <!-- Required Toggle -->
273
- <tr valign="top" class="yikes-checkbox-container">
274
- <td scope="row">
275
- <label for="field-required">
276
- <?php _e( 'Field Required?' , 'yikes-inc-easy-mailchimp-extender' ); ?>
277
- </label>
278
- </td>
279
- <td>
280
- <input type="checkbox" class="widefat" value="1" name="field[<?php echo $merge_field_data['tag']; ?>][require]" <?php checked( $merge_field_data['required'], 1 ); ?> <?php if( $merge_field_data['tag'] == 'EMAIL' ) { ?> disabled="disabled" checked="checked" title="<?php echo __( 'Email is a required field.' , 'yikes-inc-easy-mailchimp-extender' ); } ?>">
281
- <p class="description"><small><?php _e( "Require this field to be filled in before the form can be submitted.", 'yikes-inc-easy-mailchimp-extender' );?></small></p>
282
- </td>
283
- </tr>
284
- <!-- Visible Toggle -->
285
- <tr valign="top" class="yikes-checkbox-container">
286
- <td scope="row">
287
- <label for="hide-field">
288
- <?php _e( 'Hide Field' , 'yikes-inc-easy-mailchimp-extender' ); ?>
289
- </label>
290
- </td>
291
- <td>
292
- <input type="checkbox" class="widefat" value="1" name="field[<?php echo $merge_field_data['tag']; ?>][hide]" <?php checked( $merge_field_data['public'], '' ); ?> <?php if( $merge_field_data['tag'] == 'EMAIL' ) { ?> disabled="disabled" title="<?php echo __( 'Cannot toggle email field visibility.' , 'yikes-inc-easy-mailchimp-extender' ); } ?>">
293
- <p class="description"><small><?php _e( "Hide this field from being displayed on the front end.", 'yikes-inc-easy-mailchimp-extender' );?></small></p>
294
- </td>
295
- </tr>
296
- <!-- Toggle Field Label Visibility -->
297
- <tr valign="top" class="yikes-checkbox-container">
298
- <td scope="row">
299
- <label for="placeholder">
300
- <?php _e( 'Hide Label' , 'yikes-inc-easy-mailchimp-extender' ); ?>
301
- </label>
302
- </td>
303
- <td>
304
- <input type="checkbox" name="field[<?php echo $merge_field_data['tag']; ?>][hide-label]" value="1" />
305
- <p class="description"><small><?php _e( "Toggle field label visibility.", 'yikes-inc-easy-mailchimp-extender' );?></small></p>
306
- </td>
307
- </tr>
308
- <!-- Display Phone/Date Formats back to the user -->
309
- <?php
310
- switch( $form_data['field_type'] ) {
311
-
312
- /* Store the phone format, for properly regex pattern */
313
- case 'phone':
314
- case 'birthday':
315
- case 'date':
316
- ?>
317
- <tr valign="top">
318
- <td scope="row">
319
- <label for="placeholder">
320
- <?php
321
- switch( $form_data['field_type'] ) {
322
- default:
323
- case 'birthday':
324
- $type = __( 'Date Format' , 'yikes-inc-easy-mailchimp-extender' );
325
- $format = $merge_field_data['options']['date_format'];
326
- $format_name = 'date_format';
327
- break;
328
-
329
- case 'date':
330
- $type = __( 'Date Format' , 'yikes-inc-easy-mailchimp-extender' );
331
- $format = $merge_field_data['options']['date_format'];
332
- $format_name = 'date_format';
333
- break;
334
-
335
- case 'phone':
336
- $type = __( 'Phone Format' , 'yikes-inc-easy-mailchimp-extender' );
337
- $format = ( ( $merge_field_data['options']['phone_format'] == 'none' ) ? __( 'International', 'yikes-inc-easy-mailchimp-extender' ) : $merge_field_data['options']['phone_format'] );
338
- $format_name = 'phone_format';
339
- break;
340
- }
341
- echo $type;
342
- ?>
343
- </label>
344
- </td>
345
- <td>
346
- <strong><?php echo $format; ?></strong>
347
- <input type="hidden" name="field[<?php echo $merge_field_data['tag']; ?>][<?php echo $format_name; ?>]" value="<?php echo $format; ?>" />
348
- <p class="description"><small>
349
- <?php printf( __( 'To change the %s please head over to <a href="%s" title="Mailchimp" target="_blank">Mailchimp</a>. If you alter the format, you should re-import this field.', 'yikes-inc-easy-mailchimp-extender' ), strtolower( $type ), esc_url( 'http://www.mailchimp.com' ) ); ?>
350
- </small></p>
351
- </td>
352
- </tr>
353
- <?php
354
- break;
355
- // others..
356
- default:
357
- break;
358
- }
359
- ?>
360
- <!-- End Date/Phone Formats -->
361
- <!-- Toggle Buttons -->
362
- <tr valign="top">
363
- <td scope="row">
364
- &nbsp;
365
- </td>
366
- <td>
367
- <span class="toggle-container">
368
- <a href="#" class="hide-field"><?php _e( "Close" , 'yikes-inc-easy-mailchimp-extender' ); ?></a> |
369
- <a href="#" class="remove-field" alt="<?php echo $merge_field_data['tag']; ?>"><?php _e( "Remove Field" , 'yikes-inc-easy-mailchimp-extender' ); ?></a>
370
- </span>
371
- </td>
372
- </tr>
373
- </table>
374
- </p>
375
-
376
- </div>
377
- </section>
1
+ <?php
2
+ $form_data = array(
3
+ 'field_name' => $_POST['field_name'],
4
+ 'merge_tag' => $_POST['merge_tag'],
5
+ 'field_type' => $_POST['field_type'],
6
+ 'list_id' => $_POST['list_id'],
7
+ );
8
+
9
+ // Grab our list handler.
10
+ $list_handler = yikes_get_mc_api_manager()->get_list_handler();
11
+
12
+ $available_merge_variables = $list_handler->get_merge_fields( $form_data['list_id'] );
13
+ if ( is_wp_error( $available_merge_variables ) ) {
14
+ $error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
15
+ $error_logging->maybe_write_to_log(
16
+ $available_merge_variables->get_error_code(),
17
+ __( "Get Merge Variables", 'yikes-inc-easy-mailchimp-extender' ),
18
+ __( "Add Field to Form", 'yikes-inc-easy-mailchimp-extender' )
19
+ );
20
+ ?>
21
+ <section class="draggable" id="error-container">
22
+ <p>
23
+ <span class="dashicons dashicons-no-alt"></span> <?php printf( __( 'Error: %s', 'yikes-inc-easy-mailchimp-extender' ), $available_merge_variables->get_error_code() ); ?>
24
+ </p>
25
+ </section>
26
+ <?php
27
+ return;
28
+ }
29
+
30
+ // find and return the location of this merge field in the array
31
+ $index = $this->findMCListIndex( $form_data['merge_tag'], $available_merge_variables['merge_fields'], 'tag' );
32
+
33
+ // store it and use it to pre-populate field data (only on initial add to form)
34
+ $merge_field_data = $available_merge_variables['merge_fields'][ $index ];
35
+ ?>
36
+ <section class="draggable" id="<?php echo $form_data['field_name']; ?>">
37
+ <!-- top -->
38
+ <a href="#" class="expansion-section-title settings-sidebar">
39
+ <span class="dashicons dashicons-plus yikes-mc-expansion-toggle" title="<?php _e( 'Expand Field' , 'yikes-inc-easy-mailchimp-extender' ); ?>"></span>
40
+ <?php echo stripslashes( $form_data['field_name'] ); ?>
41
+ <span class="field-type-text"><small><?php echo __( 'type' , 'yikes-inc-easy-mailchimp-extender' ) . ' : ' . $form_data['field_type']; ?></small></span>
42
+ </a>
43
+ <!-- expansion section -->
44
+ <div class="yikes-mc-settings-expansion-section">
45
+
46
+ <!-- Single or Double Opt-in -->
47
+ <p class="type-container form-field-container"><!-- necessary to prevent skipping on slideToggle(); -->
48
+ <!-- store the label -->
49
+ <input type="hidden" name="field[<?php echo $merge_field_data['tag']; ?>][label]" value="<?php echo htmlspecialchars( $form_data['field_name'] ); ?>" />
50
+ <input type="hidden" name="field[<?php echo $merge_field_data['tag']; ?>][type]" value="<?php echo $form_data['field_type']; ?>" />
51
+ <input type="hidden" name="field[<?php echo $merge_field_data['tag']; ?>][merge]" value="<?php echo $merge_field_data['tag']; ?>" />
52
+ <input type="hidden" class="field-<?php echo $merge_field_data['tag']; ?>-position position-input" name="field[<?php echo $merge_field_data['tag']; ?>][position]" value="" />
53
+
54
+ <?php if ( $form_data['field_type'] == 'radio' || $form_data['field_type'] == 'dropdown' ) { ?>
55
+ <?php $choices = ( isset( $merge_field_data['options']['choices'] ) ) ? esc_attr( json_encode( $merge_field_data['options']['choices'] ) ) : ''; ?>
56
+ <input type="hidden" name="field[<?php echo $merge_field_data['tag']; ?>][choices]" value='<?php echo $choices; ?>' />
57
+ <?php } ?>
58
+
59
+ <table class="form-table form-field-container">
60
+
61
+ <!-- Merge Tag -->
62
+ <tr valign="top">
63
+ <td scope="row">
64
+ <label for="merge-tag">
65
+ <?php _e( 'Merge Tag' , 'yikes-inc-easy-mailchimp-extender' ); ?>
66
+ </label>
67
+ </td>
68
+ <td>
69
+ <input class="widefat merge-tag-text" type="text" readonly value="<?php echo $merge_field_data['tag']; ?>">
70
+ </td>
71
+ </tr>
72
+
73
+ <?php switch( $form_data['field_type'] ) {
74
+
75
+ default:
76
+ break;
77
+
78
+ case 'text':
79
+ case 'number':
80
+ case 'url':
81
+ case 'email':
82
+ case 'phone':
83
+ case 'birthday':
84
+ case 'zip':
85
+ ?>
86
+ <!-- Placeholder -->
87
+ <tr valign="top">
88
+ <td scope="row">
89
+ <label for="placeholder">
90
+ <?php _e( 'Placeholder' , 'yikes-inc-easy-mailchimp-extender' ); ?>
91
+ </label>
92
+ </td>
93
+ <td>
94
+ <input type="text" class="widefat" name="field[<?php echo $merge_field_data['tag']; ?>][placeholder]" value="<?php echo isset( $merge_field_data['placeholder'] ) ? stripslashes( wp_strip_all_tags( $merge_field_data['placeholder'] ) ): '' ; ?>" />
95
+ <p class="description"><small><?php _e( "Assign a placeholder value to this field.", 'yikes-inc-easy-mailchimp-extender' );?></small></p>
96
+ </td>
97
+ </tr>
98
+
99
+ <?php
100
+ /*
101
+ * Loop over field types and store necessary formats
102
+ * ( date, birthday - dateformat ; phone - phoneformat )
103
+ */
104
+ switch( $form_data['field_type'] ) {
105
+
106
+ /* Store the date format, for properly rendering dates on the front end */
107
+ case 'date':
108
+ $date_format = isset( $merge_field_data['options']['dateformat'] ) ? $merge_field_data['options']['dateformat'] : 'MM/DD/YYYY';
109
+ ?>
110
+ <input type="hidden" name="field[<?php echo $merge_field_data['tag']; ?>][date_format]" value="<?php echo strtolower( $date_format ); ?>" />
111
+ <?php
112
+ break;
113
+
114
+ case 'birthday':
115
+ $date_format = isset( $merge_field_data['options']['dateformat'] ) ? $merge_field_data['options']['dateformat'] : 'MM/DD';
116
+ ?>
117
+ <input type="hidden" name="field[<?php echo $merge_field_data['tag']; ?>][date_format]" value="<?php echo strtolower( $date_format ); ?>" />
118
+ <?php
119
+ break;
120
+
121
+ /* Store the phone format, for properly regex pattern */
122
+ case 'phone':
123
+ ?>
124
+ <input type="hidden" name="field[<?php echo $merge_field_data['tag']; ?>][phone_format]" value="<?php echo $merge_field_data['options']['phone_format']; ?>" />
125
+ <?php
126
+ break;
127
+ }
128
+
129
+ break;
130
+
131
+ case 'address':
132
+ ?>
133
+ <tr valign="top">
134
+ <td scope="row">
135
+ <label for="placeholder_<?php echo esc_attr( $field['merge'] ); ?>">
136
+ <?php _e( 'Placeholder' , 'yikes-inc-easy-mailchimp-extender' ); ?>
137
+ </label>
138
+ </td>
139
+ <td>
140
+ <input type="checkbox" class="widefat" name="field[<?php echo $merge_field_data['tag']; ?>][placeholder]" value="1" />
141
+ <span class="description"><small><?php _e( "Use placeholders for this field (these will be automatically filled in with field names).", 'yikes-inc-easy-mailchimp-extender' );?></small></span>
142
+ </td>
143
+ </tr>
144
+ <?php
145
+ break;
146
+
147
+ }
148
+ ?>
149
+
150
+ <!-- Default Value -->
151
+ <?php switch( $form_data['field_type'] ) {
152
+
153
+ default:
154
+ case 'text':
155
+ ?>
156
+ <tr valign="top">
157
+ <td scope="row">
158
+ <label for="placeholder">
159
+ <?php _e( 'Default Value' , 'yikes-inc-easy-mailchimp-extender' ); ?>
160
+ </label>
161
+ </td>
162
+ <td>
163
+ <input type="text" class="widefat" name="field[<?php echo $merge_field_data['tag']; ?>][default]" <?php if( $form_data['field_type'] != 'url' ) { ?> value="<?php echo isset( $merge_field_data['default_value'] ) ? stripslashes( wp_strip_all_tags( $merge_field_data['default_value'] ) ) : ''; ?>" <?php } else { ?> value="<?php echo isset( $merge_field_data['default_value'] ) ? stripslashes( wp_strip_all_tags( esc_url_raw( $merge_field_data['default_value'] ) ) ) : ''; } ?>" />
164
+ <p class="description"><small><?php _e( "Assign a default value to populate this field with on initial page load.", 'yikes-inc-easy-mailchimp-extender' );?></small></p>
165
+ <?php
166
+ switch ( $form_data['field_type'] ) {
167
+ case 'text':
168
+ ?>
169
+ <p><small class="pre-defined-tag-link"><a href="#TB_inline?width=600&height=550&inlineId=pre-defined-tag-container" class="thickbox" onclick="storeGlobalClicked( jQuery( this ) );"><?php _e( 'View Pre-Defined Tags' , 'yikes-inc-easy-mailchimp-extender' ); ?></a></small></p>
170
+ <?php
171
+ break;
172
+ } ?>
173
+ </td>
174
+ </tr>
175
+ <?php
176
+ break;
177
+
178
+ case 'radio':
179
+ ?>
180
+ <tr valign="top">
181
+ <td scope="row">
182
+ <label for="placeholder">
183
+ <?php _e( 'Default Selection' , 'yikes-inc-easy-mailchimp-extender' ); ?>
184
+ </label>
185
+ </td>
186
+ <td>
187
+ <?php $pre_selected = ! empty( $merge_field_data['default_choice'] ) ? $merge_field_data['default_choice'] : 'no-default'; ?>
188
+ <label for="<?php echo $merge_field_data['tag'] . '-no-default'; ?>">
189
+ <input id="<?php echo $merge_field_data['tag'] . '-no-default'; ?>"
190
+ type="radio"
191
+ name="field[<?php echo $merge_field_data['tag']; ?>][default_choice]"
192
+ value="no-default" <?php checked( $pre_selected, 'no-default' ); ?>
193
+ >
194
+ No Default&nbsp;
195
+ </label>
196
+ <?php
197
+ $x = 0;
198
+ foreach ( $merge_field_data['options']['choices'] as $choice => $value ) { ?>
199
+ <label>
200
+ <input type="radio" name="field[<?php echo $merge_field_data['tag']; ?>][default_choice]" value="<?php echo $x; ?>" <?php checked( $pre_selected, $choice ); ?>><?php echo $value; ?>
201
+ </label>
202
+ <?php $x++;
203
+ } ?>
204
+ <p class="description"><small><?php _e( "Select the option that should be selected by default.", 'yikes-inc-easy-mailchimp-extender' );?></small></p>
205
+ </td>
206
+ </tr>
207
+
208
+ <?php
209
+ break;
210
+
211
+ case 'dropdown':
212
+ ?>
213
+ <tr valign="top">
214
+ <td scope="row">
215
+ <label for="placeholder">
216
+ <?php _e( 'Default Selection' , 'yikes-inc-easy-mailchimp-extender' ); ?>
217
+ </label>
218
+ </td>
219
+ <td>
220
+ <select type="default" name="field[<?php echo $merge_field_data['tag']; ?>][default_choice]">
221
+ <?php $pre_selected = ! empty( $merge_field_data['default_choice'] ) ? $merge_field_data['default_choice'] : 'no-default'; ?>
222
+ <option value="no-default" <?php selected( $pre_selected, $choice ); ?>>No Default</option>
223
+ <?php foreach ( $merge_field_data['options']['choices'] as $choice => $value ) { ?>
224
+ <option value="<?php echo $choice; ?>" <?php selected( $pre_selected, $choice ); ?>><?php echo stripslashes( $value ); ?></option>
225
+ <?php } ?>
226
+ </select>
227
+ <p class="description"><small><?php _e( "Which option should be selected by default?", 'yikes-inc-easy-mailchimp-extender' );?></small></p>
228
+ </td>
229
+ </tr>
230
+
231
+ <?php
232
+ break;
233
+
234
+ } // end switch field type ?>
235
+
236
+ <!-- Field Description -->
237
+ <tr valign="top">
238
+ <td scope="row">
239
+ <label for="placeholder">
240
+ <?php _e( 'Description' , 'yikes-inc-easy-mailchimp-extender' ); ?>
241
+ </label>
242
+ </td>
243
+ <td>
244
+ <textarea class="widefat field-description-input" name="field[<?php echo $merge_field_data['tag']; ?>][description]"></textarea>
245
+ <p class="description"><small><?php _e( "Enter the description for the form field. This will be displayed to the user and provide some direction on how the field should be filled out or selected.", 'yikes-inc-easy-mailchimp-extender' );?></small></p>
246
+ </td>
247
+ </tr>
248
+ <!-- Description Above Field -->
249
+ <tr valign="top" class="yikes-checkbox-container">
250
+ <td scope="row">
251
+ <label for="description_above_<?php echo esc_attr( $merge_field_data['tag'] ); ?>">
252
+ <?php _e( 'Description Above Field' , 'yikes-inc-easy-mailchimp-extender' ); ?>
253
+ </label>
254
+ </td>
255
+ <td>
256
+ <input type="checkbox" id="description_above_<?php echo esc_attr( $merge_field_data['tag'] ); ?>" class="widefat field-description-input" name="field[<?php echo $merge_field_data['tag']; ?>][description_above]" value="1" />
257
+ <p class="description"><small><?php _e( "By default the description will appear undearneath the field. Check this box if you'd like the description to appear above the field.", 'yikes-inc-easy-mailchimp-extender' );?></small></p>
258
+ </td>
259
+ </tr>
260
+ <!-- Additional Classes -->
261
+ <tr valign="top">
262
+ <td scope="row">
263
+ <label for="placeholder">
264
+ <?php _e( 'Additional Classes' , 'yikes-inc-easy-mailchimp-extender' ); ?>
265
+ </label>
266
+ </td>
267
+ <td>
268
+ <input type="text" class="widefat" name="field[<?php echo $merge_field_data['tag']; ?>][additional-classes]" value="<?php echo isset( $form_data['classes'] ) ? stripslashes( wp_strip_all_tags( $form_data['classes'] ) ) : '' ; ?>" />
269
+ <p class="description"><small><?php printf( __( "Assign additional classes to this field. %s.", 'yikes-inc-easy-mailchimp-extender' ), '<a target="_blank" href="' . esc_url( 'https://yikesplugins.com/support/knowledge-base/bundled-css-classes/' ) . '">' . __( 'View bundled classes', 'yikes-inc-easy-mailchimp-extender' ) . '</a>' );?></small></p>
270
+ </td>
271
+ </tr>
272
+ <!-- Required Toggle -->
273
+ <tr valign="top" class="yikes-checkbox-container">
274
+ <td scope="row">
275
+ <label for="field-required">
276
+ <?php _e( 'Field Required?' , 'yikes-inc-easy-mailchimp-extender' ); ?>
277
+ </label>
278
+ </td>
279
+ <td>
280
+ <input type="checkbox" class="widefat" value="1" name="field[<?php echo $merge_field_data['tag']; ?>][require]" <?php checked( $merge_field_data['required'], 1 ); ?> <?php if( $merge_field_data['tag'] == 'EMAIL' ) { ?> disabled="disabled" checked="checked" title="<?php echo __( 'Email is a required field.' , 'yikes-inc-easy-mailchimp-extender' ); } ?>">
281
+ <p class="description"><small><?php _e( "Require this field to be filled in before the form can be submitted.", 'yikes-inc-easy-mailchimp-extender' );?></small></p>
282
+ </td>
283
+ </tr>
284
+ <!-- Visible Toggle -->
285
+ <tr valign="top" class="yikes-checkbox-container">
286
+ <td scope="row">
287
+ <label for="hide-field">
288
+ <?php _e( 'Hide Field' , 'yikes-inc-easy-mailchimp-extender' ); ?>
289
+ </label>
290
+ </td>
291
+ <td>
292
+ <input type="checkbox" class="widefat" value="1" name="field[<?php echo $merge_field_data['tag']; ?>][hide]" <?php checked( $merge_field_data['public'], '' ); ?> <?php if( $merge_field_data['tag'] == 'EMAIL' ) { ?> disabled="disabled" title="<?php echo __( 'Cannot toggle email field visibility.' , 'yikes-inc-easy-mailchimp-extender' ); } ?>">
293
+ <p class="description"><small><?php _e( "Hide this field from being displayed on the front end.", 'yikes-inc-easy-mailchimp-extender' );?></small></p>
294
+ </td>
295
+ </tr>
296
+ <!-- Toggle Field Label Visibility -->
297
+ <tr valign="top" class="yikes-checkbox-container">
298
+ <td scope="row">
299
+ <label for="placeholder">
300
+ <?php _e( 'Hide Label' , 'yikes-inc-easy-mailchimp-extender' ); ?>
301
+ </label>
302
+ </td>
303
+ <td>
304
+ <input type="checkbox" name="field[<?php echo $merge_field_data['tag']; ?>][hide-label]" value="1" />
305
+ <p class="description"><small><?php _e( "Toggle field label visibility.", 'yikes-inc-easy-mailchimp-extender' );?></small></p>
306
+ </td>
307
+ </tr>
308
+ <!-- Display Phone/Date Formats back to the user -->
309
+ <?php
310
+ switch( $form_data['field_type'] ) {
311
+
312
+ /* Store the phone format, for properly regex pattern */
313
+ case 'phone':
314
+ case 'birthday':
315
+ case 'date':
316
+ ?>
317
+ <tr valign="top">
318
+ <td scope="row">
319
+ <label for="placeholder">
320
+ <?php
321
+ switch( $form_data['field_type'] ) {
322
+ default:
323
+ case 'birthday':
324
+ $type = __( 'Date Format' , 'yikes-inc-easy-mailchimp-extender' );
325
+ $format = $merge_field_data['options']['date_format'];
326
+ $format_name = 'date_format';
327
+ break;
328
+
329
+ case 'date':
330
+ $type = __( 'Date Format' , 'yikes-inc-easy-mailchimp-extender' );
331
+ $format = $merge_field_data['options']['date_format'];
332
+ $format_name = 'date_format';
333
+ break;
334
+
335
+ case 'phone':
336
+ $type = __( 'Phone Format' , 'yikes-inc-easy-mailchimp-extender' );
337
+ $format = ( ( $merge_field_data['options']['phone_format'] == 'none' ) ? __( 'International', 'yikes-inc-easy-mailchimp-extender' ) : $merge_field_data['options']['phone_format'] );
338
+ $format_name = 'phone_format';
339
+ break;
340
+ }
341
+ echo $type;
342
+ ?>
343
+ </label>
344
+ </td>
345
+ <td>
346
+ <strong><?php echo $format; ?></strong>
347
+ <input type="hidden" name="field[<?php echo $merge_field_data['tag']; ?>][<?php echo $format_name; ?>]" value="<?php echo $format; ?>" />
348
+ <p class="description"><small>
349
+ <?php printf( __( 'To change the %s please head over to <a href="%s" title="Mailchimp" target="_blank">Mailchimp</a>. If you alter the format, you should re-import this field.', 'yikes-inc-easy-mailchimp-extender' ), strtolower( $type ), esc_url( 'http://www.mailchimp.com' ) ); ?>
350
+ </small></p>
351
+ </td>
352
+ </tr>
353
+ <?php
354
+ break;
355
+ // others..
356
+ default:
357
+ break;
358
+ }
359
+ ?>
360
+ <!-- End Date/Phone Formats -->
361
+ <!-- Toggle Buttons -->
362
+ <tr valign="top">
363
+ <td scope="row">
364
+ &nbsp;
365
+ </td>
366
+ <td>
367
+ <span class="toggle-container">
368
+ <a href="#" class="hide-field"><?php _e( "Close" , 'yikes-inc-easy-mailchimp-extender' ); ?></a> |
369
+ <a href="#" class="remove-field" alt="<?php echo $merge_field_data['tag']; ?>"><?php _e( "Remove Field" , 'yikes-inc-easy-mailchimp-extender' ); ?></a>
370
+ </span>
371
+ </td>
372
+ </tr>
373
+ </table>
374
+ </p>
375
+
376
+ </div>
377
+ </section>
admin/partials/ajax/add_interest_group_to_form.php CHANGED
@@ -1,251 +1,251 @@
1
- <?php
2
-
3
- // Set up our default $error values
4
- $error_messages = '';
5
- $error = 0;
6
-
7
- // Get our $_POST variables
8
- $list_id = isset( $_POST['list_id'] ) ? $_POST['list_id'] : '';
9
- $interest_groups = isset( $_POST['interest_groups'] ) ? $_POST['interest_groups'] : array();
10
-
11
- // Make sure our $_POST variables aren't empty
12
- if ( empty( $list_id ) ) {
13
- $error = 1;
14
- $error_messages .= __( 'Could not find the list id. ', 'yikes-inc-easy-mailchimp-extender' );
15
- }
16
- if ( empty( $interest_groups ) ) {
17
- $error = 1;
18
- $error_messages .= __( 'Could not find interest group data. ', 'yikes-inc-easy-mailchimp-extender' );
19
- }
20
-
21
- // Get the list, interest groups
22
- $list_helper = yikes_get_mc_api_manager()->get_list_handler();
23
- $interest_groupings = $list_helper->get_interest_categories( $list_id );
24
-
25
- // Make sure the interest groups aren't empty
26
- if ( is_wp_error( $interest_groupings ) ) {
27
- $error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
28
- $error_logging->maybe_write_to_log(
29
- $interest_groupings->get_error_code(),
30
- __( "Get Interest Groups", 'yikes-inc-easy-mailchimp-extender' ),
31
- __( "Add Interest Group to Form", 'yikes-inc-easy-mailchimp-extender' )
32
- );
33
- $error = 1;
34
- $error_messages .= $interest_groupings->get_error_code();
35
- }
36
-
37
- // If we hit an error above at some point, then display the error(s) and return
38
- if ( $error === 1 ) {
39
- $error_messages .= __( ' Please refresh and try again.', 'yikes-inc-easy-mailchimp-extender' );
40
- ?>
41
- <section class="draggable" id="error-container">
42
- <p>
43
- <span class="dashicons dashicons-no-alt"></span> <?php printf( __( 'Error: %s', 'yikes-inc-easy-mailchimp-extender' ), $error_messages ); ?>
44
- </p>
45
- </section>
46
- <?php
47
- return;
48
- }
49
-
50
-
51
- // Loop through the interest groups data (group_id, field_name, field_type) and add the fields to the form
52
- foreach( $interest_groups as $group ) {
53
-
54
- // find and return the location of this merge field in the array
55
- $index = $this->findMCListIndex( $group['group_id'], $interest_groupings, 'id' );
56
- $field_data = $interest_groupings[ $index ];
57
- $groups = wp_list_pluck( $field_data['items'], 'name' );
58
-
59
- ?>
60
- <section class="draggable" id="<?php echo $group['group_id']; ?>">
61
- <!-- top -->
62
- <a href="#" class="expansion-section-title settings-sidebar">
63
- <span class="dashicons dashicons-plus yikes-mc-expansion-toggle" title="<?php _e( 'Expand Field' , 'yikes-inc-easy-mailchimp-extender' ); ?>"></span>
64
- <?php echo stripslashes( $group['field_name'] ); ?>
65
- <span class="field-type-text"><small><?php echo __( 'type' , 'yikes-inc-easy-mailchimp-extender' ) . ' : ' . $group['field_type']; ?></small></span>
66
- </a>
67
- <!-- expansion section -->
68
- <div class="yikes-mc-settings-expansion-section">
69
-
70
- <!-- Single or Double Opt-in -->
71
- <p class="type-container"><!-- necessary to prevent skipping on slideToggle(); -->
72
- <!-- store the label -->
73
- <input type="hidden" name="field[<?php echo $group['group_id']; ?>][label]" value="<?php echo htmlspecialchars( $group['field_name'] ); ?>" />
74
- <input type="hidden" name="field[<?php echo $group['group_id']; ?>][type]" value="<?php echo $group['field_type']; ?>" />
75
- <input type="hidden" name="field[<?php echo $group['group_id']; ?>][group_id]" value="<?php echo $group['group_id']; ?>" />
76
- <input type="hidden" name="field[<?php echo $group['group_id']; ?>][groups]" value='<?php echo esc_attr( json_encode( $groups, true ) ); ?>' />
77
-
78
-
79
- <table class="form-table form-field-container">
80
-
81
- <!-- Default Value -->
82
- <?php switch( $group['field_type'] ) {
83
-
84
- case 'radio':
85
- ?>
86
- <tr valign="top">
87
- <td scope="row">
88
- <label for="placeholder">
89
- <?php _e( 'Default Selection' , 'yikes-inc-easy-mailchimp-extender' ); ?>
90
- </label>
91
- </td>
92
- <td>
93
-
94
- <?php $pre_selected = ! empty( $field_data['default_choice'] ) ? $field_data['default_choice'] : 'no-default'; ?>
95
-
96
- <!-- No Default option for radio buttons -->
97
- <input type="radio" name="field[<?php echo $group['group_id']; ?>][default_choice][]" value="no-default" <?php checked( $pre_selected, 'no-default' ); ?>>No Default
98
-
99
- <?php foreach ( $field_data['items'] as $id => $interest_group ) { ?>
100
- <input type="radio" name="field[<?php echo $group['group_id']; ?>][default_choice][]" value="<?php echo esc_attr( $id ); ?>" <?php checked( $pre_selected, $id ); ?>><?php echo stripslashes( $interest_group['name'] );
101
- } ?>
102
-
103
- <p class="description"><small><?php _e( "Select the option that should be selected by default.", 'yikes-inc-easy-mailchimp-extender' );?></small></p>
104
- </td>
105
- </tr>
106
-
107
- <?php
108
- break;
109
-
110
- case 'default':
111
- case 'hidden':
112
- case 'checkboxes':
113
- ?>
114
- <tr valign="top" class="yikes-checkbox-container">
115
- <td scope="row">
116
- <label for="placeholder">
117
- <?php _e( 'Default Selection' , 'yikes-inc-easy-mailchimp-extender' ); ?>
118
- </label>
119
- </td>
120
- <td>
121
- <?php
122
- foreach ( $field_data['items'] as $id => $interest_group ) {
123
- $pre_selected = ! empty( $field_data['default_choice'] ) ? $field_data['default_choice'] : '0';
124
- ?>
125
- <input type="checkbox" name="field[<?php echo $group['group_id']; ?>][default_choice][]" value="<?php echo $id; ?>" <?php checked( $pre_selected, $id ); ?>><?php echo stripslashes( $interest_group['name'] ); ?>
126
- <?php
127
- }
128
- ?>
129
- <p class="description"><small><?php _e( "Select the option that should be selected by default.", 'yikes-inc-easy-mailchimp-extender' );?></small></p>
130
- </td>
131
- </tr>
132
-
133
- <?php
134
- break;
135
-
136
- case 'dropdown':
137
- ?>
138
- <tr valign="top">
139
- <td scope="row">
140
- <label for="placeholder">
141
- <?php _e( 'Default Selection' , 'yikes-inc-easy-mailchimp-extender' ); ?>
142
- </label>
143
- </td>
144
- <td>
145
- <select type="default" name="field[<?php echo $group['group_id']; ?>][default_choice]">
146
- <?php $pre_selected = ! empty( $field_data['default_choice'] ) ? $field_data['default_choice'] : 'no-default'; ?>
147
- <option value="no-default">No Default</option>
148
- <?php foreach ( $field_data['items'] as $id => $interest_group ) { ?>
149
- <option value="<?php echo $id; ?>" <?php selected( $pre_selected, $id ); ?>><?php echo $interest_group['name']; ?></option>
150
- <?php } ?>
151
- </select>
152
- <p class="description"><small><?php _e( "Which option should be selected by default?", 'yikes-inc-easy-mailchimp-extender' );?></small></p>
153
- </td>
154
- </tr>
155
-
156
- <?php
157
- break;
158
- } ?>
159
-
160
- <!-- Field Description -->
161
- <tr valign="top">
162
- <td scope="row">
163
- <label for="placeholder">
164
- <?php _e( 'Description' , 'yikes-inc-easy-mailchimp-extender' ); ?>
165
- </label>
166
- </td>
167
- <td>
168
- <textarea class="widefat field-description-input" name="field[<?php echo $group['group_id']; ?>][description]"></textarea>
169
- <p class="description"><small><?php _e( "Enter the description for the form field. This will be displayed to the user and provide some direction on how the field should be filled out or selected.", 'yikes-inc-easy-mailchimp-extender' );?></small></p>
170
- </td>
171
- </tr>
172
-
173
- <!-- Description Above Field -->
174
- <tr valign="top" class="yikes-checkbox-container">
175
- <td scope="row">
176
- <label for="description_above_<?php echo esc_attr( $group['group_id'] ); ?>">
177
- <?php _e( 'Description Above Field' , 'yikes-inc-easy-mailchimp-extender' ); ?>
178
- </label>
179
- </td>
180
- <td>
181
- <input type="checkbox" id="description_above_<?php echo esc_attr( $group['group_id'] ); ?>" class="widefat field-description-input" name="field[<?php echo $group['group_id']; ?>][description_above]" value="1" />
182
- <p class="description"><small><?php _e( "By default the description will appear undearneath the field. Check this box if you'd like the description to appear above the field.", 'yikes-inc-easy-mailchimp-extender' );?></small></p>
183
- </td>
184
- </tr>
185
-
186
- <!-- Additional Classes -->
187
- <tr valign="top">
188
- <td scope="row">
189
- <label for="placeholder">
190
- <?php _e( 'Additional Classes' , 'yikes-inc-easy-mailchimp-extender' ); ?>
191
- </label>
192
- </td>
193
- <td>
194
- <input type="text" class="widefat" name="field[<?php echo $group['group_id']; ?>][additional-classes]" value="<?php echo isset( $group['classes'] ) ? stripslashes( wp_strip_all_tags( $group['classes'] ) ) : '' ; ?>" />
195
- <p class="description"><small><?php printf( __( "Assign additional classes to this field. %s.", 'yikes-inc-easy-mailchimp-extender' ), '<a target="_blank" href="' . esc_url( 'https://yikesplugins.com/support/knowledge-base/bundled-css-classes/' ) . '">' . __( 'View bundled classes', 'yikes-inc-easy-mailchimp-extender' ) . '</a>' );?></small></p>
196
- </td>
197
- </tr>
198
- <!-- Required Toggle -->
199
- <tr valign="top" class="yikes-checkbox-container">
200
- <td scope="row">
201
- <label for="field-required">
202
- <?php _e( 'Field Required?' , 'yikes-inc-easy-mailchimp-extender' ); ?>
203
- </label>
204
- </td>
205
- <td>
206
- <input type="checkbox" class="widefat" value="1" name="field[<?php echo $group['group_id']; ?>][require]">
207
- <p class="description"><small><?php _e( "Require this field to be filled in before the form can be submitted.", 'yikes-inc-easy-mailchimp-extender' );?></small></p>
208
- </td>
209
- </tr>
210
- <!-- Visible Toggle -->
211
- <tr valign="top" class="yikes-checkbox-container">
212
- <td scope="row">
213
- <label for="hide-field">
214
- <?php _e( 'Hide Field' , 'yikes-inc-easy-mailchimp-extender' ); ?>
215
- </label>
216
- </td>
217
- <td>
218
- <input type="checkbox" class="widefat" value="1" name="field[<?php echo $group['group_id']; ?>][hide]">
219
- <p class="description"><small><?php _e( "Hide this field from being displayed on the front end.", 'yikes-inc-easy-mailchimp-extender' );?></small></p>
220
- </td>
221
- </tr>
222
- <!-- Toggle Field Label Visibility -->
223
- <tr valign="top" class="yikes-checkbox-container">
224
- <td scope="row">
225
- <label for="placeholder">
226
- <?php _e( 'Hide Label' , 'yikes-inc-easy-mailchimp-extender' ); ?>
227
- </label>
228
- </td>
229
- <td>
230
- <input type="checkbox" name="field[<?php echo $group['group_id']; ?>][hide-label]" value="1" />
231
- <p class="description"><small><?php _e( "Toggle field label visibility.", 'yikes-inc-easy-mailchimp-extender' );?></small></p>
232
- </td>
233
- </tr>
234
- <!-- Toggle Buttons -->
235
- <tr valign="top">
236
- <td scope="row">
237
- &nbsp;
238
- </td>
239
- <td>
240
- <span class="toggle-container">
241
- <a href="#" class="hide-field"><?php _e( "Close" , 'yikes-inc-easy-mailchimp-extender' ); ?></a> |
242
- <a href="#" class="remove-field" alt="<?php echo $group['group_id']; ?>"><?php _e( "Remove Field" , 'yikes-inc-easy-mailchimp-extender' ); ?></a>
243
- </span>
244
- </td>
245
- </tr>
246
- </table>
247
- </p>
248
-
249
- </div>
250
- </section>
251
  <?php } // End our loop of interest group data ?>
1
+ <?php
2
+
3
+ // Set up our default $error values
4
+ $error_messages = '';
5
+ $error = 0;
6
+
7
+ // Get our $_POST variables
8
+ $list_id = isset( $_POST['list_id'] ) ? $_POST['list_id'] : '';
9
+ $interest_groups = isset( $_POST['interest_groups'] ) ? $_POST['interest_groups'] : array();
10
+
11
+ // Make sure our $_POST variables aren't empty
12
+ if ( empty( $list_id ) ) {
13
+ $error = 1;
14
+ $error_messages .= __( 'Could not find the list id. ', 'yikes-inc-easy-mailchimp-extender' );
15
+ }
16
+ if ( empty( $interest_groups ) ) {
17
+ $error = 1;
18
+ $error_messages .= __( 'Could not find interest group data. ', 'yikes-inc-easy-mailchimp-extender' );
19
+ }
20
+
21
+ // Get the list, interest groups
22
+ $list_helper = yikes_get_mc_api_manager()->get_list_handler();
23
+ $interest_groupings = $list_helper->get_interest_categories( $list_id );
24
+
25
+ // Make sure the interest groups aren't empty
26
+ if ( is_wp_error( $interest_groupings ) ) {
27
+ $error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
28
+ $error_logging->maybe_write_to_log(
29
+ $interest_groupings->get_error_code(),
30
+ __( "Get Interest Groups", 'yikes-inc-easy-mailchimp-extender' ),
31
+ __( "Add Interest Group to Form", 'yikes-inc-easy-mailchimp-extender' )
32
+ );
33
+ $error = 1;
34
+ $error_messages .= $interest_groupings->get_error_code();
35
+ }
36
+
37
+ // If we hit an error above at some point, then display the error(s) and return
38
+ if ( $error === 1 ) {
39
+ $error_messages .= __( ' Please refresh and try again.', 'yikes-inc-easy-mailchimp-extender' );
40
+ ?>
41
+ <section class="draggable" id="error-container">
42
+ <p>
43
+ <span class="dashicons dashicons-no-alt"></span> <?php printf( __( 'Error: %s', 'yikes-inc-easy-mailchimp-extender' ), $error_messages ); ?>
44
+ </p>
45
+ </section>
46
+ <?php
47
+ return;
48
+ }
49
+
50
+
51
+ // Loop through the interest groups data (group_id, field_name, field_type) and add the fields to the form
52
+ foreach( $interest_groups as $group ) {
53
+
54
+ // find and return the location of this merge field in the array
55
+ $index = $this->findMCListIndex( $group['group_id'], $interest_groupings, 'id' );
56
+ $field_data = $interest_groupings[ $index ];
57
+ $groups = wp_list_pluck( $field_data['items'], 'name' );
58
+
59
+ ?>
60
+ <section class="draggable" id="<?php echo $group['group_id']; ?>">
61
+ <!-- top -->
62
+ <a href="#" class="expansion-section-title settings-sidebar">
63
+ <span class="dashicons dashicons-plus yikes-mc-expansion-toggle" title="<?php _e( 'Expand Field' , 'yikes-inc-easy-mailchimp-extender' ); ?>"></span>
64
+ <?php echo stripslashes( $group['field_name'] ); ?>
65
+ <span class="field-type-text"><small><?php echo __( 'type' , 'yikes-inc-easy-mailchimp-extender' ) . ' : ' . $group['field_type']; ?></small></span>
66
+ </a>
67
+ <!-- expansion section -->
68
+ <div class="yikes-mc-settings-expansion-section">
69
+
70
+ <!-- Single or Double Opt-in -->
71
+ <p class="type-container"><!-- necessary to prevent skipping on slideToggle(); -->
72
+ <!-- store the label -->
73
+ <input type="hidden" name="field[<?php echo $group['group_id']; ?>][label]" value="<?php echo htmlspecialchars( $group['field_name'] ); ?>" />
74
+ <input type="hidden" name="field[<?php echo $group['group_id']; ?>][type]" value="<?php echo $group['field_type']; ?>" />
75
+ <input type="hidden" name="field[<?php echo $group['group_id']; ?>][group_id]" value="<?php echo $group['group_id']; ?>" />
76
+ <input type="hidden" name="field[<?php echo $group['group_id']; ?>][groups]" value='<?php echo esc_attr( json_encode( $groups, true ) ); ?>' />
77
+
78
+
79
+ <table class="form-table form-field-container">
80
+
81
+ <!-- Default Value -->
82
+ <?php switch( $group['field_type'] ) {
83
+
84
+ case 'radio':
85
+ ?>
86
+ <tr valign="top">
87
+ <td scope="row">
88
+ <label for="placeholder">
89
+ <?php _e( 'Default Selection' , 'yikes-inc-easy-mailchimp-extender' ); ?>
90
+ </label>
91
+ </td>
92
+ <td>
93
+
94
+ <?php $pre_selected = ! empty( $field_data['default_choice'] ) ? $field_data['default_choice'] : 'no-default'; ?>
95
+
96
+ <!-- No Default option for radio buttons -->
97
+ <input type="radio" name="field[<?php echo $group['group_id']; ?>][default_choice][]" value="no-default" <?php checked( $pre_selected, 'no-default' ); ?>>No Default
98
+
99
+ <?php foreach ( $field_data['items'] as $id => $interest_group ) { ?>
100
+ <input type="radio" name="field[<?php echo $group['group_id']; ?>][default_choice][]" value="<?php echo esc_attr( $id ); ?>" <?php checked( $pre_selected, $id ); ?>><?php echo stripslashes( $interest_group['name'] );
101
+ } ?>
102
+
103
+ <p class="description"><small><?php _e( "Select the option that should be selected by default.", 'yikes-inc-easy-mailchimp-extender' );?></small></p>
104
+ </td>
105
+ </tr>
106
+
107
+ <?php
108
+ break;
109
+
110
+ case 'default':
111
+ case 'hidden':
112
+ case 'checkboxes':
113
+ ?>
114
+ <tr valign="top" class="yikes-checkbox-container">
115
+ <td scope="row">
116
+ <label for="placeholder">
117
+ <?php _e( 'Default Selection' , 'yikes-inc-easy-mailchimp-extender' ); ?>
118
+ </label>
119
+ </td>
120
+ <td>
121
+ <?php
122
+ foreach ( $field_data['items'] as $id => $interest_group ) {
123
+ $pre_selected = ! empty( $field_data['default_choice'] ) ? $field_data['default_choice'] : '0';
124
+ ?>
125
+ <input type="checkbox" name="field[<?php echo $group['group_id']; ?>][default_choice][]" value="<?php echo $id; ?>" <?php checked( $pre_selected, $id ); ?>><?php echo stripslashes( $interest_group['name'] ); ?>
126
+ <?php
127
+ }
128
+ ?>
129
+ <p class="description"><small><?php _e( "Select the option that should be selected by default.", 'yikes-inc-easy-mailchimp-extender' );?></small></p>
130
+ </td>
131
+ </tr>
132
+
133
+ <?php
134
+ break;
135
+
136
+ case 'dropdown':
137
+ ?>
138
+ <tr valign="top">
139
+ <td scope="row">
140
+ <label for="placeholder">
141
+ <?php _e( 'Default Selection' , 'yikes-inc-easy-mailchimp-extender' ); ?>
142
+ </label>
143
+ </td>
144
+ <td>
145
+ <select type="default" name="field[<?php echo $group['group_id']; ?>][default_choice]">
146
+ <?php $pre_selected = ! empty( $field_data['default_choice'] ) ? $field_data['default_choice'] : 'no-default'; ?>
147
+ <option value="no-default">No Default</option>
148
+ <?php foreach ( $field_data['items'] as $id => $interest_group ) { ?>
149
+ <option value="<?php echo $id; ?>" <?php selected( $pre_selected, $id ); ?>><?php echo $interest_group['name']; ?></option>
150
+ <?php } ?>
151
+ </select>
152
+ <p class="description"><small><?php _e( "Which option should be selected by default?", 'yikes-inc-easy-mailchimp-extender' );?></small></p>
153
+ </td>
154
+ </tr>
155
+
156
+ <?php
157
+ break;
158
+ } ?>
159
+
160
+ <!-- Field Description -->
161
+ <tr valign="top">
162
+ <td scope="row">
163
+ <label for="placeholder">
164
+ <?php _e( 'Description' , 'yikes-inc-easy-mailchimp-extender' ); ?>
165
+ </label>
166
+ </td>
167
+ <td>
168
+ <textarea class="widefat field-description-input" name="field[<?php echo $group['group_id']; ?>][description]"></textarea>
169
+ <p class="description"><small><?php _e( "Enter the description for the form field. This will be displayed to the user and provide some direction on how the field should be filled out or selected.", 'yikes-inc-easy-mailchimp-extender' );?></small></p>
170
+ </td>
171
+ </tr>
172
+
173
+ <!-- Description Above Field -->
174
+ <tr valign="top" class="yikes-checkbox-container">
175
+ <td scope="row">
176
+ <label for="description_above_<?php echo esc_attr( $group['group_id'] ); ?>">
177
+ <?php _e( 'Description Above Field' , 'yikes-inc-easy-mailchimp-extender' ); ?>
178
+ </label>
179
+ </td>
180
+ <td>
181
+ <input type="checkbox" id="description_above_<?php echo esc_attr( $group['group_id'] ); ?>" class="widefat field-description-input" name="field[<?php echo $group['group_id']; ?>][description_above]" value="1" />
182
+ <p class="description"><small><?php _e( "By default the description will appear undearneath the field. Check this box if you'd like the description to appear above the field.", 'yikes-inc-easy-mailchimp-extender' );?></small></p>
183
+ </td>
184
+ </tr>
185
+
186
+ <!-- Additional Classes -->
187
+ <tr valign="top">
188
+ <td scope="row">
189
+ <label for="placeholder">
190
+ <?php _e( 'Additional Classes' , 'yikes-inc-easy-mailchimp-extender' ); ?>
191
+ </label>
192
+ </td>
193
+ <td>
194
+ <input type="text" class="widefat" name="field[<?php echo $group['group_id']; ?>][additional-classes]" value="<?php echo isset( $group['classes'] ) ? stripslashes( wp_strip_all_tags( $group['classes'] ) ) : '' ; ?>" />
195
+ <p class="description"><small><?php printf( __( "Assign additional classes to this field. %s.", 'yikes-inc-easy-mailchimp-extender' ), '<a target="_blank" href="' . esc_url( 'https://yikesplugins.com/support/knowledge-base/bundled-css-classes/' ) . '">' . __( 'View bundled classes', 'yikes-inc-easy-mailchimp-extender' ) . '</a>' );?></small></p>
196
+ </td>
197
+ </tr>
198
+ <!-- Required Toggle -->
199
+ <tr valign="top" class="yikes-checkbox-container">
200
+ <td scope="row">
201
+ <label for="field-required">
202
+ <?php _e( 'Field Required?' , 'yikes-inc-easy-mailchimp-extender' ); ?>
203
+ </label>
204
+ </td>
205
+ <td>
206
+ <input type="checkbox" class="widefat" value="1" name="field[<?php echo $group['group_id']; ?>][require]">
207
+ <p class="description"><small><?php _e( "Require this field to be filled in before the form can be submitted.", 'yikes-inc-easy-mailchimp-extender' );?></small></p>
208
+ </td>
209
+ </tr>
210
+ <!-- Visible Toggle -->
211
+ <tr valign="top" class="yikes-checkbox-container">
212
+ <td scope="row">
213
+ <label for="hide-field">
214
+ <?php _e( 'Hide Field' , 'yikes-inc-easy-mailchimp-extender' ); ?>
215
+ </label>
216
+ </td>
217
+ <td>
218
+ <input type="checkbox" class="widefat" value="1" name="field[<?php echo $group['group_id']; ?>][hide]">
219
+ <p class="description"><small><?php _e( "Hide this field from being displayed on the front end.", 'yikes-inc-easy-mailchimp-extender' );?></small></p>
220
+ </td>
221
+ </tr>
222
+ <!-- Toggle Field Label Visibility -->
223
+ <tr valign="top" class="yikes-checkbox-container">
224
+ <td scope="row">
225
+ <label for="placeholder">
226
+ <?php _e( 'Hide Label' , 'yikes-inc-easy-mailchimp-extender' ); ?>
227
+ </label>
228
+ </td>
229
+ <td>
230
+ <input type="checkbox" name="field[<?php echo $group['group_id']; ?>][hide-label]" value="1" />
231
+ <p class="description"><small><?php _e( "Toggle field label visibility.", 'yikes-inc-easy-mailchimp-extender' );?></small></p>
232
+ </td>
233
+ </tr>
234
+ <!-- Toggle Buttons -->
235
+ <tr valign="top">
236
+ <td scope="row">
237
+ &nbsp;
238
+ </td>
239
+ <td>
240
+ <span class="toggle-container">
241
+ <a href="#" class="hide-field"><?php _e( "Close" , 'yikes-inc-easy-mailchimp-extender' ); ?></a> |
242
+ <a href="#" class="remove-field" alt="<?php echo $group['group_id']; ?>"><?php _e( "Remove Field" , 'yikes-inc-easy-mailchimp-extender' ); ?></a>
243
+ </span>
244
+ </td>
245
+ </tr>
246
+ </table>
247
+ </p>
248
+
249
+ </div>
250
+ </section>
251
  <?php } // End our loop of interest group data ?>
admin/partials/ajax/class.ajax.php CHANGED
@@ -1,227 +1,227 @@
1
- <?php
2
- /*
3
- * Main Ajax handler
4
- *
5
- * Handles many of the ajax functionality on the admin side (ie. Adding new field to form, updating fields, grabbing list data etc.)
6
- *
7
- * @since 6.0.0
8
- * Author: Yikes Inc. | https://www.yikesinc.com
9
- */
10
- class YIKES_Inc_Easy_Mailchimp_Process_Ajax {
11
-
12
- public function __construct() {
13
-
14
- // Ajax send merge variable to form builder.
15
- add_action( 'wp_ajax_add_field_to_form', array( $this , 'send_field_to_form' ), 10 );
16
-
17
- // Ajax send interest group to form builder.
18
- add_action( 'wp_ajax_add_interest_group_to_form', array( $this, 'send_interest_group_to_form' ), 10 );
19
-
20
- // Ajax add a tag to the form.
21
- add_action( 'wp_ajax_add_tag_to_form', array( $this, 'add_tags_to_form' ), 10 );
22
-
23
- // Ajax remove tag from form.
24
- add_action( 'wp_ajax_remove_tag_from_form', array( $this, 'remove_tag_from_form' ), 10 );
25
-
26
- // Return new list data + activity (for dashboard widget).
27
- add_action( 'wp_ajax_get_new_list_data', array( $this, 'get_new_list_data' ), 10 );
28
-
29
- // Return new list data + activity (for dashboard widget).
30
- add_action( 'wp_ajax_check_list_for_interest_groups', array( $this, 'check_list_for_interest_groups' ), 10 );
31
-
32
- // Add a new notification to a form.
33
- add_action( 'wp_ajax_add_notification_to_form', array( $this, 'add_notification_to_form' ), 10, 1 );
34
-
35
- // Save field label edits.
36
- add_action( 'wp_ajax_save_field_label_edits', array( $this, 'save_field_label_edits' ), 10, 1 );
37
- }
38
-
39
- /*
40
- * Assign a new notification to the form
41
- * - return a single container
42
- */
43
- public function add_notification_to_form() {
44
- if ( isset( $_POST['notification_name'] ) ) {
45
- include_once YIKES_MC_PATH . 'admin/partials/ajax/add_notification_to_form.php';
46
- }
47
- exit();
48
- }
49
-
50
- // Process our AJAX request,
51
- // when the user wants to switch which form data
52
- // is displayed on the dashboard
53
- public function get_new_list_data() {
54
- $list_id = $_POST['list_id'];
55
- $list_data = yikes_get_mc_api_manager()->get_list_handler()->get_list( $list_id );
56
- if ( is_wp_error( $list_data ) ) {
57
- $error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
58
- $error_logging->maybe_write_to_log(
59
- $list_data->get_error_code(),
60
- __( "Get Account Lists", 'yikes-inc-easy-mailchimp-extender' ),
61
- __( "Mailchimp Widget", 'yikes-inc-easy-mailchimp-extender' )
62
- );
63
- exit();
64
- }
65
-
66
- include_once( YIKES_MC_PATH . 'admin/partials/dashboard-widgets/templates/stats-list-template.php' );
67
- exit();
68
- }
69
-
70
- // Process our AJAX request,
71
- // when the user switches lists in the integration settings page
72
- // we want to return the interest groups associated with this list,
73
- // to allow users to pre-check anything they want to assign users appropriately
74
- /* note: this function is called statically from the integration settings page */
75
- public static function check_list_for_interest_groups( $list_id = '', $integration_type = '', $load = false ) {
76
- if ( ! $list_id ) {
77
- $list_id = $_POST['list_id'];
78
- }
79
- if ( ! $integration_type ) {
80
- $integration_type = $_POST['integration'];
81
- }
82
-
83
-
84
- $interest_groupings = yikes_get_mc_api_manager()->get_list_handler()->get_interest_categories( $list_id );
85
- if ( is_wp_error( $interest_groupings ) ) {
86
- $error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
87
- $error_logging->maybe_write_to_log(
88
- $interest_groupings->get_error_code(),
89
- __( "Get Interest Groups", 'yikes-inc-easy-mailchimp-extender' ),
90
- "class.ajax.php"
91
- );
92
- $interest_groupings = array();
93
- }
94
-
95
- if ( ! empty( $interest_groupings ) ) {
96
- require( YIKES_MC_PATH . 'admin/partials/menu/options-sections/templates/integration-interest-groups.php' );
97
- }
98
- // do not kill off execution on load, only on an ajax request
99
- if ( ! $load ) {
100
- exit();
101
- }
102
- }
103
-
104
- // Process our Ajax Request
105
- // send a field to our form
106
- public function send_field_to_form() {
107
- include YIKES_MC_PATH . 'admin/partials/ajax/add_field_to_form.php';
108
- exit();
109
- }
110
-
111
- // send interest group to our form
112
- public function send_interest_group_to_form() {
113
- include YIKES_MC_PATH . 'admin/partials/ajax/add_interest_group_to_form.php';
114
- exit();
115
- }
116
-
117
- /**
118
- * Add a tag to the form.
119
- */
120
- public function add_tags_to_form() {
121
- // Verify Nonce.
122
- if ( ! check_ajax_referer( 'add-tag', 'nonce', false ) ) {
123
- wp_send_json_error( '1' );
124
- }
125
- $tags = isset( $_POST['tags'] ) ? wp_unslash( $_POST['tags'] ) : array();
126
- $list_id = isset( $_POST['list_id'] ) ? filter_var( wp_unslash( $_POST['list_id'] ), FILTER_SANITIZE_STRING ) : '';
127
- $form_id = isset( $_POST['form_id'] ) ? filter_var( wp_unslash( $_POST['form_id'] ), FILTER_SANITIZE_NUMBER_INT ) : 0;
128
-
129
- if ( empty( $tags ) || empty( $list_id ) || empty( $form_id ) ) {
130
- wp_send_json_error( '2' );
131
- }
132
-
133
- $form_interface = yikes_easy_mailchimp_extender_get_form_interface();
134
- $form = $form_interface->get_form( $form_id );
135
- $form_tags = array();
136
-
137
- // This data came from $_POST so sanitize it.
138
- foreach ( $tags as $tag ) {
139
- $form_tags[ filter_var( $tag['tag_id'], FILTER_SANITIZE_NUMBER_INT ) ] = array(
140
- 'name' => filter_var( $tag['tag_name'], FILTER_SANITIZE_STRING ),
141
- 'id' => filter_var( $tag['tag_id'], FILTER_SANITIZE_NUMBER_INT ),
142
- );
143
- }
144
-
145
- $form['tags'] = $form_tags + ( isset( $form['tags'] ) ? $form['tags'] : array() );
146
- $form_interface->update_form( $form_id, $form );
147
- wp_send_json_success( array( 'tags' => $form_tags ) );
148
- }
149
-
150
- /**
151
- * Remove a tag from a form.
152
- */
153
- public function remove_tag_from_form() {
154
- // Verify Nonce.
155
- if ( ! check_ajax_referer( 'remove-tag', 'nonce', false ) ) {
156
- wp_send_json_error( '1' );
157
- }
158
- $tag = isset( $_POST['tag'] ) ? filter_var( wp_unslash( $_POST['tag'] ), FILTER_SANITIZE_NUMBER_INT ) : array();
159
- $list_id = isset( $_POST['list_id'] ) ? filter_var( wp_unslash( $_POST['list_id'] ), FILTER_SANITIZE_STRING ) : '';
160
- $form_id = isset( $_POST['form_id'] ) ? filter_var( wp_unslash( $_POST['form_id'] ), FILTER_SANITIZE_NUMBER_INT ) : 0;
161
-
162
- if ( empty( $tag ) || empty( $list_id ) || empty( $form_id ) ) {
163
- wp_send_json_error( '2' );
164
- }
165
-
166
- $form_interface = yikes_easy_mailchimp_extender_get_form_interface();
167
- $form = $form_interface->get_form( $form_id );
168
- if ( isset( $form['tags'] ) && isset( $form['tags'][ $tag ] ) ) {
169
- unset( $form['tags'][ $tag ] );
170
- }
171
- $form_interface->update_form( $form_id, $form );
172
- wp_send_json_success();
173
- }
174
-
175
- /*
176
- * Search through multi dimensional array
177
- * and return the index ( used to find the list name assigned to a form )
178
- * - http://stackoverflow.com/questions/6661530/php-multi-dimensional-array-search
179
- */
180
- public function findMCListIndex( $id, $array, $tag ) {
181
- $mapping = array_flip( wp_list_pluck( $array, $tag ) );
182
- $index = isset( $mapping[ $id ] ) ? $mapping[ $id ] : null;
183
-
184
- return $index;
185
- }
186
-
187
- /**
188
- * Save changes to a field's label
189
- */
190
- public function save_field_label_edits() {
191
-
192
- // Capture our $_POST variables
193
- $list_id = isset( $_POST['list_id'] ) ? $_POST['list_id'] : '';
194
- $field_data = isset( $_POST['field_data'] ) ? $_POST['field_data'] : array();
195
- $field_name = isset( $field_data['field_name'] ) ? $field_data['field_name'] : '';
196
- $field_id = isset( $field_data['field_id'] ) ? $field_data['field_id'] : '';
197
-
198
- // Make sure we have our required variables before continuing
199
- if ( $list_id === '' || $field_name === '' || $field_id === '' ) {
200
- wp_send_json_error( array(
201
- 'message' => __( 'Could not update the field label: missing required field.', 'yikes-inc-easy-mailchimp-extender' ),
202
- 'developer-info' => "One of the following variables was empty: list_id: $list_id, field_name: $field_name, field_id: $field_id."
203
- )
204
- );
205
- }
206
-
207
- // Update the field!
208
- $merge_field = yikes_get_mc_api_manager()->get_list_handler()->update_merge_field( $list_id, $field_id, array( 'name' => $field_name ), true );
209
-
210
- // Check for an error. If error, log it and return error
211
- if ( is_wp_error( $merge_field ) ) {
212
- $error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
213
- $error_logging->maybe_write_to_log(
214
- $merge_field->get_error_code(),
215
- __( "Updating merge field", 'yikes-inc-easy-mailchimp-extender' ),
216
- "class.ajax.php"
217
- );
218
- wp_send_json_error( array(
219
- 'message' => __( 'Could not update the field label: API request failed.', 'yikes-inc-easy-mailchimp-extender' ),
220
- 'developer-info' => $error
221
- )
222
- );
223
- }
224
-
225
- wp_send_json_success();
226
- }
227
- }
1
+ <?php
2
+ /*
3
+ * Main Ajax handler
4
+ *
5
+ * Handles many of the ajax functionality on the admin side (ie. Adding new field to form, updating fields, grabbing list data etc.)
6
+ *
7
+ * @since 6.0.0
8
+ * Author: Yikes Inc. | https://www.yikesinc.com
9
+ */
10
+ class YIKES_Inc_Easy_Mailchimp_Process_Ajax {
11
+
12
+ public function __construct() {
13
+
14
+ // Ajax send merge variable to form builder.
15
+ add_action( 'wp_ajax_add_field_to_form', array( $this , 'send_field_to_form' ), 10 );
16
+
17
+ // Ajax send interest group to form builder.
18
+ add_action( 'wp_ajax_add_interest_group_to_form', array( $this, 'send_interest_group_to_form' ), 10 );
19
+
20
+ // Ajax add a tag to the form.
21
+ add_action( 'wp_ajax_add_tag_to_form', array( $this, 'add_tags_to_form' ), 10 );
22
+
23
+ // Ajax remove tag from form.
24
+ add_action( 'wp_ajax_remove_tag_from_form', array( $this, 'remove_tag_from_form' ), 10 );
25
+
26
+ // Return new list data + activity (for dashboard widget).
27
+ add_action( 'wp_ajax_get_new_list_data', array( $this, 'get_new_list_data' ), 10 );
28
+
29
+ // Return new list data + activity (for dashboard widget).
30
+ add_action( 'wp_ajax_check_list_for_interest_groups', array( $this, 'check_list_for_interest_groups' ), 10 );
31
+
32
+ // Add a new notification to a form.
33
+ add_action( 'wp_ajax_add_notification_to_form', array( $this, 'add_notification_to_form' ), 10, 1 );
34
+
35
+ // Save field label edits.
36
+ add_action( 'wp_ajax_save_field_label_edits', array( $this, 'save_field_label_edits' ), 10, 1 );
37
+ }
38
+
39
+ /*
40
+ * Assign a new notification to the form
41
+ * - return a single container
42
+ */
43
+ public function add_notification_to_form() {
44
+ if ( isset( $_POST['notification_name'] ) ) {
45
+ include_once YIKES_MC_PATH . 'admin/partials/ajax/add_notification_to_form.php';
46
+ }
47
+ exit();
48
+ }
49
+
50
+ // Process our AJAX request,
51
+ // when the user wants to switch which form data
52
+ // is displayed on the dashboard
53
+ public function get_new_list_data() {
54
+ $list_id = $_POST['list_id'];
55
+ $list_data = yikes_get_mc_api_manager()->get_list_handler()->get_list( $list_id );
56
+ if ( is_wp_error( $list_data ) ) {
57
+ $error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
58
+ $error_logging->maybe_write_to_log(
59
+ $list_data->get_error_code(),
60
+ __( "Get Account Lists", 'yikes-inc-easy-mailchimp-extender' ),
61
+ __( "Mailchimp Widget", 'yikes-inc-easy-mailchimp-extender' )
62
+ );
63
+ exit();
64
+ }
65
+
66
+ include_once( YIKES_MC_PATH . 'admin/partials/dashboard-widgets/templates/stats-list-template.php' );
67
+ exit();
68
+ }
69
+
70
+ // Process our AJAX request,
71
+ // when the user switches lists in the integration settings page
72
+ // we want to return the interest groups associated with this list,
73
+ // to allow users to pre-check anything they want to assign users appropriately
74
+ /* note: this function is called statically from the integration settings page */
75
+ public static function check_list_for_interest_groups( $list_id = '', $integration_type = '', $load = false ) {
76
+ if ( ! $list_id ) {
77
+ $list_id = $_POST['list_id'];
78
+ }
79
+ if ( ! $integration_type ) {
80
+ $integration_type = $_POST['integration'];
81
+ }
82
+
83
+
84
+ $interest_groupings = yikes_get_mc_api_manager()->get_list_handler()->get_interest_categories( $list_id );
85
+ if ( is_wp_error( $interest_groupings ) ) {
86
+ $error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
87
+ $error_logging->maybe_write_to_log(
88
+ $interest_groupings->get_error_code(),
89
+ __( "Get Interest Groups", 'yikes-inc-easy-mailchimp-extender' ),
90
+ "class.ajax.php"
91
+ );
92
+ $interest_groupings = array();
93
+ }
94
+
95
+ if ( ! empty( $interest_groupings ) ) {
96
+ require( YIKES_MC_PATH . 'admin/partials/menu/options-sections/templates/integration-interest-groups.php' );
97
+ }
98
+ // do not kill off execution on load, only on an ajax request
99
+ if ( ! $load ) {
100
+ exit();
101
+ }
102
+ }
103
+
104
+ // Process our Ajax Request
105
+ // send a field to our form
106
+ public function send_field_to_form() {
107
+ include YIKES_MC_PATH . 'admin/partials/ajax/add_field_to_form.php';
108
+ exit();
109
+ }
110
+
111
+ // send interest group to our form
112
+ public function send_interest_group_to_form() {
113
+ include YIKES_MC_PATH . 'admin/partials/ajax/add_interest_group_to_form.php';
114
+ exit();
115
+ }
116
+
117
+ /**
118
+ * Add a tag to the form.
119
+ */
120
+ public function add_tags_to_form() {
121
+ // Verify Nonce.
122
+ if ( ! check_ajax_referer( 'add-tag', 'nonce', false ) ) {
123
+ wp_send_json_error( '1' );
124
+ }
125
+ $tags = isset( $_POST['tags'] ) ? wp_unslash( $_POST['tags'] ) : array();
126
+ $list_id = isset( $_POST['list_id'] ) ? filter_var( wp_unslash( $_POST['list_id'] ), FILTER_SANITIZE_STRING ) : '';
127
+ $form_id = isset( $_POST['form_id'] ) ? filter_var( wp_unslash( $_POST['form_id'] ), FILTER_SANITIZE_NUMBER_INT ) : 0;
128
+
129
+ if ( empty( $tags ) || empty( $list_id ) || empty( $form_id ) ) {
130
+ wp_send_json_error( '2' );
131
+ }
132
+
133
+ $form_interface = yikes_easy_mailchimp_extender_get_form_interface();
134
+ $form = $form_interface->get_form( $form_id );
135
+ $form_tags = array();
136
+
137
+ // This data came from $_POST so sanitize it.
138
+ foreach ( $tags as $tag ) {
139
+ $form_tags[ filter_var( $tag['tag_id'], FILTER_SANITIZE_NUMBER_INT ) ] = array(
140
+ 'name' => filter_var( $tag['tag_name'], FILTER_SANITIZE_STRING ),
141
+ 'id' => filter_var( $tag['tag_id'], FILTER_SANITIZE_NUMBER_INT ),
142
+ );
143
+ }
144
+
145
+ $form['tags'] = $form_tags + ( isset( $form['tags'] ) ? $form['tags'] : array() );
146
+ $form_interface->update_form( $form_id, $form );
147
+ wp_send_json_success( array( 'tags' => $form_tags ) );
148
+ }
149
+
150
+ /**
151
+ * Remove a tag from a form.
152
+ */
153
+ public function remove_tag_from_form() {
154
+ // Verify Nonce.
155
+ if ( ! check_ajax_referer( 'remove-tag', 'nonce', false ) ) {
156
+ wp_send_json_error( '1' );
157
+ }
158
+ $tag = isset( $_POST['tag'] ) ? filter_var( wp_unslash( $_POST['tag'] ), FILTER_SANITIZE_NUMBER_INT ) : array();
159
+ $list_id = isset( $_POST['list_id'] ) ? filter_var( wp_unslash( $_POST['list_id'] ), FILTER_SANITIZE_STRING ) : '';
160
+ $form_id = isset( $_POST['form_id'] ) ? filter_var( wp_unslash( $_POST['form_id'] ), FILTER_SANITIZE_NUMBER_INT ) : 0;
161
+
162
+ if ( empty( $tag ) || empty( $list_id ) || empty( $form_id ) ) {
163
+ wp_send_json_error( '2' );
164
+ }
165
+
166
+ $form_interface = yikes_easy_mailchimp_extender_get_form_interface();
167
+ $form = $form_interface->get_form( $form_id );
168
+ if ( isset( $form['tags'] ) && isset( $form['tags'][ $tag ] ) ) {
169
+ unset( $form['tags'][ $tag ] );
170
+ }
171
+ $form_interface->update_form( $form_id, $form );
172
+ wp_send_json_success();
173
+ }
174
+
175
+ /*
176
+ * Search through multi dimensional array
177
+ * and return the index ( used to find the list name assigned to a form )
178
+ * - http://stackoverflow.com/questions/6661530/php-multi-dimensional-array-search
179
+ */
180
+ public function findMCListIndex( $id, $array, $tag ) {
181
+ $mapping = array_flip( wp_list_pluck( $array, $tag ) );
182
+ $index = isset( $mapping[ $id ] ) ? $mapping[ $id ] : null;
183
+
184
+ return $index;
185
+ }
186
+
187
+ /**
188
+ * Save changes to a field's label
189
+ */
190
+ public function save_field_label_edits() {
191
+
192
+ // Capture our $_POST variables
193
+ $list_id = isset( $_POST['list_id'] ) ? $_POST['list_id'] : '';
194
+ $field_data = isset( $_POST['field_data'] ) ? $_POST['field_data'] : array();
195
+ $field_name = isset( $field_data['field_name'] ) ? $field_data['field_name'] : '';
196
+ $field_id = isset( $field_data['field_id'] ) ? $field_data['field_id'] : '';
197
+
198
+ // Make sure we have our required variables before continuing
199
+ if ( $list_id === '' || $field_name === '' || $field_id === '' ) {
200
+ wp_send_json_error( array(
201
+ 'message' => __( 'Could not update the field label: missing required field.', 'yikes-inc-easy-mailchimp-extender' ),
202
+ 'developer-info' => "One of the following variables was empty: list_id: $list_id, field_name: $field_name, field_id: $field_id."
203
+ )
204
+ );
205
+ }
206
+
207
+ // Update the field!
208
+ $merge_field = yikes_get_mc_api_manager()->get_list_handler()->update_merge_field( $list_id, $field_id, array( 'name' => $field_name ), true );
209
+
210
+ // Check for an error. If error, log it and return error
211
+ if ( is_wp_error( $merge_field ) ) {
212
+ $error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
213
+ $error_logging->maybe_write_to_log(
214
+ $merge_field->get_error_code(),
215
+ __( "Updating merge field", 'yikes-inc-easy-mailchimp-extender' ),
216
+ "class.ajax.php"
217
+ );
218
+ wp_send_json_error( array(
219
+ 'message' => __( 'Could not update the field label: API request failed.', 'yikes-inc-easy-mailchimp-extender' ),
220
+ 'developer-info' => $error
221
+ )
222
+ );
223
+ }
224
+
225
+ wp_send_json_success();
226
+ }
227
+ }
admin/partials/dashboard-widgets/class.list-activity-widget.php CHANGED
@@ -1,107 +1,107 @@
1
- <?php
2
-
3
- /*
4
- * Our ajax is processed inside of class.ajax.php
5
- */
6
-
7
- class YIKES_Inc_Easy_Mailchimp_Dashboard_Widgets {
8
-
9
- // Construction
10
- public function __construct() {
11
-
12
- if ( apply_filters( 'yikes-mailchimp-dashboard-widgets-enabled', true ) === true && yikes_get_mc_api_key() != '' && get_option( 'yikes-mc-api-validation', 'invalid_api_key' ) == 'valid_api_key' ) {
13
-
14
- // hook in and display our list stats dashboard widget
15
- add_action( 'wp_dashboard_setup', array( $this, 'yks_mc_add_dashboard_widget' ), 10 );
16
-
17
- add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_dashboard_widget_script' ) );
18
- }
19
-
20
- }
21
-
22
- /**
23
- * Enqueue our JS file on the main dashboard page.
24
- *
25
- * @param string $hook
26
- */
27
- function enqueue_dashboard_widget_script( $hook ) {
28
- if ( 'index.php' !== $hook ) {
29
- return;
30
- }
31
-
32
- wp_register_script( 'yikes-easy-mc-dashboard-widget-script', YIKES_MC_URL . 'admin/js/min/yikes-inc-easy-mailchimp-dashboard-widget.min.js', array( 'jquery' ), 'all', false );
33
- $data_array = array(
34
- 'ajax_url' => esc_url_raw( admin_url( 'admin-ajax.php' ) ),
35
- 'preloader' => '<img src="' . esc_url_raw( admin_url( 'images/wpspin_light.gif' ) ) . '" title="' . __( 'Preloader', 'yikes-inc-easy-mailchimp-extender' ) . '" alt="' . __( 'Preloader', 'yikes-inc-easy-mailchimp-extender' ) . '" class="yikes-easy-mc-widget-preloader">',
36
- );
37
- // localize our data, to pass along to JS file
38
- wp_localize_script( 'yikes-easy-mc-dashboard-widget-script', 'yikes_mailchimp_dsahboard_widget', $data_array );
39
- wp_enqueue_script( 'yikes-easy-mc-dashboard-widget-script' );
40
- }
41
-
42
- /*******************************************************
43
- * Custom Dashboard Mailchimp Account Activity Widget
44
- ********************************************************/
45
- /**
46
- * Add a widget to the dashboard.
47
- *
48
- * This function is hooked into the 'wp_dashboard_setup' action below.
49
- */
50
- function yks_mc_add_dashboard_widget() {
51
-
52
- // If the current user is not an admin, abort
53
- if ( current_user_can( apply_filters( 'yikes-mailchimp-admin-widget-capability', apply_filters( 'yikes-mailchimp-user-role-access', 'manage_options' ) ) ) ) {
54
-
55
- /* List Stats Dashboard Widget */
56
- wp_add_dashboard_widget(
57
- 'yikes_easy_mc_list_stats_widget', // Widget slug.
58
- __( 'Mailchimp List Stats', 'yikes-inc-easy-mailchimp-extender' ), // Title.
59
- array( $this, 'list_stats_dashboard_widget' ) // Display function.
60
- );
61
- }
62
- }
63
-
64
- /**
65
- * Create the function to output our list stats dashboard widget
66
- */
67
- function list_stats_dashboard_widget() {
68
- // Get our list data!
69
- $list_data = yikes_get_mc_api_manager()->get_list_handler()->get_lists();
70
-
71
- if ( is_wp_error( $list_data ) ) {
72
- $error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
73
- $error_logging->maybe_write_to_log( $list_data->get_error_code(), __( "Get Account Lists", 'yikes-inc-easy-mailchimp-extender' ), "Dashboard Activity Widget" );
74
- ?>
75
- <p class="yikes-dashboard-widget-section"><?php _e( "There was an error fetching your list data.", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
76
- <?php
77
- return;
78
- }
79
-
80
- ?>
81
- <!-- Dropdown to Change the list -->
82
- <?php if ( ! empty( $list_data ) ) {
83
- ?>
84
- <section class="inside-widget yikes-dashboard-widget-section">
85
- <strong class="select-list-title"><?php _e( 'Select a list', 'yikes-inc-easy-mailchimp-extender' ) ?>:</strong>
86
- <select id="yikes-easy-mc-dashboard-change-list" class="widefat">
87
- <?php
88
- foreach ( $list_data as $list ) {
89
- ?>
90
- <option value="<?php echo $list['id']; ?>"><?php echo $list['name']; ?></option>
91
- <?php
92
- }
93
- ?>
94
- </select>
95
- <p class="description"><?php _e( 'Select a list from the dropdown above. View statistics related to this list below.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
96
- </section>
97
- <!-- display stats here! -->
98
- <section id="yikes-easy-mc-dashboard-widget-stats">
99
- <?php include_once( YIKES_MC_PATH . 'admin/partials/dashboard-widgets/templates/stats-list-template.php' ); ?>
100
- </section>
101
- <?php } else { ?>
102
- <section id="yikes-easy-mc-dashboard-widget-stats">
103
- <p class="no-lists-error"><?php _e( "Whoops, you don't have any lists set up. Head over to Mailchimp to set up lists.", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
104
- </section>
105
- <?php }
106
- }
107
- }
1
+ <?php
2
+
3
+ /*
4
+ * Our ajax is processed inside of class.ajax.php
5
+ */
6
+
7
+ class YIKES_Inc_Easy_Mailchimp_Dashboard_Widgets {
8
+
9
+ // Construction
10
+ public function __construct() {
11
+
12
+ if ( apply_filters( 'yikes-mailchimp-dashboard-widgets-enabled', true ) === true && yikes_get_mc_api_key() != '' && get_option( 'yikes-mc-api-validation', 'invalid_api_key' ) == 'valid_api_key' ) {
13
+
14
+ // hook in and display our list stats dashboard widget
15
+ add_action( 'wp_dashboard_setup', array( $this, 'yks_mc_add_dashboard_widget' ), 10 );
16
+
17
+ add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_dashboard_widget_script' ) );
18
+ }
19
+
20
+ }
21
+
22
+ /**
23
+ * Enqueue our JS file on the main dashboard page.
24
+ *
25
+ * @param string $hook
26
+ */
27
+ function enqueue_dashboard_widget_script( $hook ) {
28
+ if ( 'index.php' !== $hook ) {
29
+ return;
30
+ }
31
+
32
+ wp_register_script( 'yikes-easy-mc-dashboard-widget-script', YIKES_MC_URL . 'admin/js/min/yikes-inc-easy-mailchimp-dashboard-widget.min.js', array( 'jquery' ), 'all', false );
33
+ $data_array = array(
34
+ 'ajax_url' => esc_url_raw( admin_url( 'admin-ajax.php' ) ),
35
+ 'preloader' => '<img src="' . esc_url_raw( admin_url( 'images/wpspin_light.gif' ) ) . '" title="' . __( 'Preloader', 'yikes-inc-easy-mailchimp-extender' ) . '" alt="' . __( 'Preloader', 'yikes-inc-easy-mailchimp-extender' ) . '" class="yikes-easy-mc-widget-preloader">',
36
+ );
37
+ // localize our data, to pass along to JS file
38
+ wp_localize_script( 'yikes-easy-mc-dashboard-widget-script', 'yikes_mailchimp_dsahboard_widget', $data_array );
39
+ wp_enqueue_script( 'yikes-easy-mc-dashboard-widget-script' );
40
+ }
41
+
42
+ /*******************************************************
43
+ * Custom Dashboard Mailchimp Account Activity Widget
44
+ ********************************************************/
45
+ /**
46
+ * Add a widget to the dashboard.
47
+ *
48
+ * This function is hooked into the 'wp_dashboard_setup' action below.
49
+ */
50
+ function yks_mc_add_dashboard_widget() {
51
+
52
+ // If the current user is not an admin, abort
53
+ if ( current_user_can( apply_filters( 'yikes-mailchimp-admin-widget-capability', apply_filters( 'yikes-mailchimp-user-role-access', 'manage_options' ) ) ) ) {
54
+
55
+ /* List Stats Dashboard Widget */
56
+ wp_add_dashboard_widget(
57
+ 'yikes_easy_mc_list_stats_widget', // Widget slug.
58
+ __( 'Mailchimp List Stats', 'yikes-inc-easy-mailchimp-extender' ), // Title.
59
+ array( $this, 'list_stats_dashboard_widget' ) // Display function.
60
+ );
61
+ }
62
+ }
63
+
64
+ /**
65
+ * Create the function to output our list stats dashboard widget
66
+ */
67
+ function list_stats_dashboard_widget() {
68
+ // Get our list data!
69
+ $list_data = yikes_get_mc_api_manager()->get_list_handler()->get_lists();
70
+
71
+ if ( is_wp_error( $list_data ) ) {
72
+ $error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
73
+ $error_logging->maybe_write_to_log( $list_data->get_error_code(), __( "Get Account Lists", 'yikes-inc-easy-mailchimp-extender' ), "Dashboard Activity Widget" );
74
+ ?>
75
+ <p class="yikes-dashboard-widget-section"><?php _e( "There was an error fetching your list data.", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
76
+ <?php
77
+ return;
78
+ }
79
+
80
+ ?>
81
+ <!-- Dropdown to Change the list -->
82
+ <?php if ( ! empty( $list_data ) ) {
83
+ ?>
84
+ <section class="inside-widget yikes-dashboard-widget-section">
85
+ <strong class="select-list-title"><?php _e( 'Select a list', 'yikes-inc-easy-mailchimp-extender' ) ?>:</strong>
86
+ <select id="yikes-easy-mc-dashboard-change-list" class="widefat">
87
+ <?php
88
+ foreach ( $list_data as $list ) {
89
+ ?>
90
+ <option value="<?php echo $list['id']; ?>"><?php echo $list['name']; ?></option>
91
+ <?php
92
+ }
93
+ ?>
94
+ </select>
95
+ <p class="description"><?php _e( 'Select a list from the dropdown above. View statistics related to this list below.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
96
+ </section>
97
+ <!-- display stats here! -->
98
+ <section id="yikes-easy-mc-dashboard-widget-stats">
99
+ <?php include_once( YIKES_MC_PATH . 'admin/partials/dashboard-widgets/templates/stats-list-template.php' ); ?>
100
+ </section>
101
+ <?php } else { ?>
102
+ <section id="yikes-easy-mc-dashboard-widget-stats">
103
+ <p class="no-lists-error"><?php _e( "Whoops, you don't have any lists set up. Head over to Mailchimp to set up lists.", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
104
+ </section>
105
+ <?php }
106
+ }
107
+ }
admin/partials/dashboard-widgets/templates/stats-list-template.php CHANGED
@@ -1,68 +1,68 @@
1
- <?php
2
- /* The template file for displaying our stats in the Admin dashboard widget */
3
-
4
- if ( isset( $list_data ) ) {
5
- if ( isset( $list_data['id'] ) ) {
6
-
7
- // When a user selects a list from the dropdown, capture the array value here
8
- $list = $list_data;
9
- } else {
10
-
11
- // On initial page load, we grab all of the lists and we need to default to the first item in the list
12
-
13
- // Get the list IDs, capture the first list ID
14
- $first_list_id = '';
15
- $list_ids = array_keys( $list_data );
16
- if ( is_array( $list_ids ) && isset( $list_ids[0] ) ) {
17
- $first_list_id = $list_ids[0];
18
- }
19
-
20
- // Set our $list value to the first list in the list_data array
21
- if ( isset( $list_data[ $first_list_id ] ) && is_array( $list_data[ $first_list_id ] ) && isset( $list_data[ $first_list_id ]['id'] ) ) {
22
- $list = $list_data[ $first_list_id ];
23
- }
24
- }
25
- }
26
-
27
- // Make sure we have our variables before continuing
28
- if ( empty( $list_data ) || empty( $list ) ) {
29
- return;
30
- }
31
-
32
- ?>
33
- <section id="yikes-easy-mc-widget-stat-holder">
34
- <h3><?php echo $list['name']; ?> <small><a href="<?php echo esc_url_raw( admin_url( 'admin.php?page=yikes-mailchimp-view-list&list-id=' . $list['id'] . '' ) ); ?>" title="<?php _e( 'view List' , 'yikes-inc-easy-mailchimp-extender' ); ?>"><?php _e( 'view list' , 'yikes-inc-easy-mailchimp-extender' ); ?></a></small></h3>
35
-
36
- <table class="yikes-easy-mc-stats-table">
37
- <thead class="yikes-easy-mc-hidden">
38
- <tr>
39
- <th><?php _e( 'Subscribers' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
40
- <th><?php _e( 'Unsubscribed' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
41
- <th><?php _e( 'New Since Send' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
42
- <th><?php _e( 'Avg. Sub. Rate' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
43
- </tr>
44
- </thead>
45
- <tbody>
46
- <tr class="yikes-easy-mc-table-stats-tr yikes-easy-mc-table-stats-tr-first">
47
- <td title="<?php _e( 'Number of active subscribers.' , 'yikes-inc-easy-mailchimp-extender' ); ?>">
48
- <p class="yikes-easy-mc-dashboard-stat"><?php echo $list['stats']['member_count']; ?></p>
49
- <p class="yikes-easy-mc-stat-list-label"><?php _e( 'subscribers' , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
50
- </td>
51
- <td title="<?php _e( 'Number of users who have unsusbscribed.' , 'yikes-inc-easy-mailchimp-extender' ); ?>">
52
- <p class="yikes-easy-mc-dashboard-stat"><?php echo $list['stats']['unsubscribe_count']; ?></p>
53
- <p class="yikes-easy-mc-stat-list-label"><?php _e( 'unsubscribed' , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
54
- </td>
55
- </tr>
56
- <tr class="yikes-easy-mc-table-stats-tr yikes-easy-mc-table-stats-tr-second">
57
- <td title="<?php _e( 'Number of new subscribers since the last campaign was sent.' , 'yikes-inc-easy-mailchimp-extender' ); ?>">
58
- <p class="yikes-easy-mc-dashboard-stat"><?php echo $list['stats']['member_count_since_send']; ?></p>
59
- <p class="yikes-easy-mc-stat-list-label"><?php _e( 'new since send' , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
60
- </td>
61
- <td title="<?php _e( 'Average number of subscribers per month.' , 'yikes-inc-easy-mailchimp-extender' ); ?>">
62
- <p class="yikes-easy-mc-dashboard-stat"><?php echo $list['stats']['avg_sub_rate']; ?></p>
63
- <p class="yikes-easy-mc-stat-list-label"><?php _e( 'avg. sub. rate' , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
64
- </td>
65
- </tr>
66
- </tbody>
67
- </table>
68
  </section>
1
+ <?php
2
+ /* The template file for displaying our stats in the Admin dashboard widget */
3
+
4
+ if ( isset( $list_data ) ) {
5
+ if ( isset( $list_data['id'] ) ) {
6
+
7
+ // When a user selects a list from the dropdown, capture the array value here
8
+ $list = $list_data;
9
+ } else {
10
+
11
+ // On initial page load, we grab all of the lists and we need to default to the first item in the list
12
+
13
+ // Get the list IDs, capture the first list ID
14
+ $first_list_id = '';
15
+ $list_ids = array_keys( $list_data );
16
+ if ( is_array( $list_ids ) && isset( $list_ids[0] ) ) {
17
+ $first_list_id = $list_ids[0];
18
+ }
19
+
20
+ // Set our $list value to the first list in the list_data array
21
+ if ( isset( $list_data[ $first_list_id ] ) && is_array( $list_data[ $first_list_id ] ) && isset( $list_data[ $first_list_id ]['id'] ) ) {
22
+ $list = $list_data[ $first_list_id ];
23
+ }
24
+ }
25
+ }
26
+
27
+ // Make sure we have our variables before continuing
28
+ if ( empty( $list_data ) || empty( $list ) ) {
29
+ return;
30
+ }
31
+
32
+ ?>
33
+ <section id="yikes-easy-mc-widget-stat-holder">
34
+ <h3><?php echo $list['name']; ?> <small><a href="<?php echo esc_url_raw( admin_url( 'admin.php?page=yikes-mailchimp-view-list&list-id=' . $list['id'] . '' ) ); ?>" title="<?php _e( 'view List' , 'yikes-inc-easy-mailchimp-extender' ); ?>"><?php _e( 'view list' , 'yikes-inc-easy-mailchimp-extender' ); ?></a></small></h3>
35
+
36
+ <table class="yikes-easy-mc-stats-table">
37
+ <thead class="yikes-easy-mc-hidden">
38
+ <tr>
39
+ <th><?php _e( 'Subscribers' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
40
+ <th><?php _e( 'Unsubscribed' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
41
+ <th><?php _e( 'New Since Send' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
42
+ <th><?php _e( 'Avg. Sub. Rate' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
43
+ </tr>
44
+ </thead>
45
+ <tbody>
46
+ <tr class="yikes-easy-mc-table-stats-tr yikes-easy-mc-table-stats-tr-first">
47
+ <td title="<?php _e( 'Number of active subscribers.' , 'yikes-inc-easy-mailchimp-extender' ); ?>">
48
+ <p class="yikes-easy-mc-dashboard-stat"><?php echo $list['stats']['member_count']; ?></p>
49
+ <p class="yikes-easy-mc-stat-list-label"><?php _e( 'subscribers' , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
50
+ </td>
51
+ <td title="<?php _e( 'Number of users who have unsusbscribed.' , 'yikes-inc-easy-mailchimp-extender' ); ?>">
52
+ <p class="yikes-easy-mc-dashboard-stat"><?php echo $list['stats']['unsubscribe_count']; ?></p>
53
+ <p class="yikes-easy-mc-stat-list-label"><?php _e( 'unsubscribed' , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
54
+ </td>
55
+ </tr>
56
+ <tr class="yikes-easy-mc-table-stats-tr yikes-easy-mc-table-stats-tr-second">
57
+ <td title="<?php _e( 'Number of new subscribers since the last campaign was sent.' , 'yikes-inc-easy-mailchimp-extender' ); ?>">
58
+ <p class="yikes-easy-mc-dashboard-stat"><?php echo $list['stats']['member_count_since_send']; ?></p>
59
+ <p class="yikes-easy-mc-stat-list-label"><?php _e( 'new since send' , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
60
+ </td>
61
+ <td title="<?php _e( 'Average number of subscribers per month.' , 'yikes-inc-easy-mailchimp-extender' ); ?>">
62
+ <p class="yikes-easy-mc-dashboard-stat"><?php echo $list['stats']['avg_sub_rate']; ?></p>
63
+ <p class="yikes-easy-mc-stat-list-label"><?php _e( 'avg. sub. rate' , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
64
+ </td>
65
+ </tr>
66
+ </tbody>
67
+ </table>
68
  </section>
admin/partials/edit-form.php CHANGED
@@ -1,1019 +1,1019 @@
1
- <div class="wrap">
2
- <?php
3
-
4
- // If an error was returned.
5
- if ( isset( $_GET['sql_error'] ) ) {
6
-
7
- if ( get_option( 'yikes-mailchimp-debug-status', '' ) === '1' ) {
8
- wp_die( '<strong>' . __( 'Error Creating Form', 'yikes-inc-easy-mailchimp-extender' ) . '</strong> <p>' . stripslashes( urldecode( $_GET['sql_error'] ) ) . '</p>' . __( 'Error Creating Form', 'yikes-inc-easy-mailchimp-extender' ) );
9
- } else {
10
- wp_die( '<strong>' . __( 'Error Creating Form', 'yikes-inc-easy-mailchimp-extender' ) . '</strong><p>' . __( "Please try again. If the error persists please get in contact with the YIKES Inc. support team.", 'yikes-inc-easy-mailchimp-extender' ) . '</p>' );
11
- }
12
- }
13
-
14
- // Get The Form ID.
15
- if ( ! isset( $_GET['id'] ) ) {
16
- wp_die( esc_html_e( 'Oh No!', 'yikes-inc-easy-mailchimp-extender' ), esc_html_e( 'Error', 'yikes-inc-easy-mailchimp-extender' ) );
17
- }
18
- $form_id = (int) filter_var( wp_unslash( $_GET['id'] ), FILTER_SANITIZE_NUMBER_INT );
19
-
20
- // Get our form interface.
21
- $form_interface = yikes_easy_mailchimp_extender_get_form_interface();
22
- $form = $form_interface->get_form( $form_id );
23
- $all_forms = $form_interface->get_all_forms();
24
-
25
- // If the form was not found return an error.
26
- if ( empty( $form ) ) {
27
- wp_die(
28
- printf(
29
- /* translators: the placeholder is a link to the debug settings page. */
30
- __( "Whoops! It looks like this form doesn't exist. If this error persists you may want to toggle on debugging on the $1%1s", 'yikes-inc-easy-mailchimp-extender' ),
31
- '<a href="' . esc_url_raw( admin_url( 'admin.php?page=yikes-inc-easy-mailchimp-settings&section=debug-settings' ) ) . '">' . esc_html__( 'debug settings page', 'yikes-inc-easy-mailchimp-extender' ) . '</a>'
32
- ),
33
- esc_html__( 'Error', 'yikes-inc-easy-mailchimp-extender' )
34
- );
35
- }
36
-
37
- // Set global form data, mainly for use in custom form field declarations or add-ons.
38
- $GLOBALS['form_data'] = $form;
39
- $custom_styles = $form['custom_styles'];
40
- $optin_settings = $form['optin_settings'];
41
- $submission_settings = $form['submission_settings'];
42
- $error_messages = $form['error_messages'];
43
-
44
- if ( isset( $form['form_settings'] ) ) {
45
- $form_settings = $form['form_settings'];
46
- }
47
-
48
- // Get defaults if none are saved in the database yet.
49
- if ( empty( $form_settings ) ) {
50
- $form_settings = array(
51
- 'yikes-easy-mc-form-class-names' => '',
52
- 'yikes-easy-mc-inline-form' => '0',
53
- 'yikes-easy-mc-submit-button-type' => 'text',
54
- 'yikes-easy-mc-submit-button-text' => __( 'Submit', 'yikes-inc-easy-mailchimp-extender' ),
55
- 'yikes-easy-mc-submit-button-image' => '',
56
- 'yikes-easy-mc-submit-button-classes' => '',
57
- 'yikes-easy-mc-form-schedule' => '0',
58
- 'yikes-easy-mc-form-restriction-start' => strtotime( current_time( 'm/d/Y g:iA' ) ),
59
- 'yikes-easy-mc-form-restriction-end' => strtotime( current_time( 'm/d/Y g:iA' ) ) + ( 3600 * 24 ),
60
- /* translators: the placeholder is a datetime string */
61
- 'yikes-easy-mc-form-restriction-pending-message' => sprintf( __( 'Signup is not yet open, and will be available on %s. Please come back then to signup.', 'yikes-inc-easy-mailchimp-extender' ), current_time( str_replace( '-', '/', get_option( 'date_format' ) ) ) . ' ' . __( 'at', 'yikes-inc-easy-mailchimp-extender' ) . ' ' . current_time( 'g:iA' ) ),
62
- /* translators: the placeholder is a datetime string */
63
- 'yikes-easy-mc-form-restriction-expired-message' => sprintf( __( 'The signup period for this form ended on %s.', 'yikes-inc-easy-mailchimp-extender' ), date( str_replace( '-', '/', get_option( 'date_format' ) ), strtotime( current_time( str_replace( '-', '/', get_option( 'date_format' ) ) ) ) + ( 3600 * 24 ) ) . ' ' . __( 'at', 'yikes-inc-easy-mailchimp-extender' ) . ' ' . date( 'g:iA', strtotime( current_time( 'g:iA' ) ) + ( 3600 * 24 ) ) ),
64
- 'yikes-easy-mc-form-login-required' => '0',
65
- 'yikes-easy-mc-form-restriction-login-message' => __( 'You need to be logged in to sign up for this mailing list.', 'yikes-inc-easy-mailchimp-extender' ),
66
- );
67
- }
68
-
69
- // Set up our list_handler object.
70
- $list_handler = yikes_get_mc_api_manager()->get_list_handler();
71
- $list_data = $list_handler->get_lists();
72
- if ( is_wp_error( $list_data ) ) {
73
- $error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
74
- $error_logging->maybe_write_to_log(
75
- $list_data->get_error_code(),
76
- __( 'Get Account Lists', 'yikes-inc-easy-mailchimp-extender' ),
77
- 'Edit Form Page'
78
- );
79
- $list_data = array();
80
- }
81
-
82
- // Get the merge fields.
83
- $available_merge_variables = $list_handler->get_merge_fields( $form['list_id'] );
84
- if ( is_wp_error( $available_merge_variables ) ) {
85
- $error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
86
- $error_logging->maybe_write_to_log(
87
- $available_merge_variables->get_error_code(),
88
- __( 'Get Merge Variables', 'yikes-inc-easy-mailchimp-extender' ),
89
- 'Edit Form Page'
90
- );
91
- $available_merge_variables = array();
92
- }
93
-
94
- // Get the interest groups.
95
- $interest_groupings = $list_handler->get_interest_categories( $form['list_id'] );
96
- if ( is_wp_error( $interest_groupings ) ) {
97
- $error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
98
- $error_logging->maybe_write_to_log(
99
- $interest_groupings->get_error_code(),
100
- __( 'Get Interest Groups', 'yikes-inc-easy-mailchimp-extender' ),
101
- 'Edit Form Page'
102
- );
103
- $interest_groupings = array();
104
- }
105
-
106
- // Get the tags.
107
- $tags = $list_handler->get_segments( $form['list_id'], 'static' );
108
- if ( is_wp_error( $tags ) ) {
109
- $error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
110
- $error_logging->maybe_write_to_log(
111
- $tags->get_error_code(),
112
- __( 'Get Tags', 'yikes-inc-easy-mailchimp-extender' ),
113
- 'Edit Form Page'
114
- );
115
- $tags = array();
116
- }
117
-
118
- // Update Form URL.
119
- $url = add_query_arg(
120
- array(
121
- 'action' => 'yikes-easy-mc-update-form',
122
- 'nonce' => wp_create_nonce( 'update-mailchimp-form-' . $form['id'] ),
123
- )
124
- );
125
- ?>
126
- <!-- Freddie Logo -->
127
- <img src="<?php echo esc_url( YIKES_MC_URL . 'includes/images/Mailchimp_Assets/Freddie_60px.png' ); ?>" alt="<?php esc_attr_e( 'Freddie - Mailchimp Mascot', 'yikes-inc-easy-mailchimp-extender' ); ?>" class="yikes-mc-freddie-logo" />
128
-
129
- <?php /* translators: the placeholder is the form's name */ ?>
130
- <h1>YIKES Easy Forms for Mailchimp | <?php echo sprintf( esc_html__( 'Edit %1s', 'yikes-inc-easy-mailchimp-extender' ), esc_html( $form['form_name'] ) ); ?></h1>
131
-
132
- <!-- Settings Page Description -->
133
- <p class="yikes-easy-mc-about-text about-text"><?php esc_html_e( 'Update this Mailchimp form\'s fields, styles and settings below.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
134
-
135
- <?php
136
- if ( isset( $_REQUEST['updated-form'] ) && filter_var( $_REQUEST['updated-form'], FILTER_SANITIZE_STRING ) === 'true' ) {
137
- ?>
138
- <div class="updated manage-form-admin-notice">
139
- <p><?php esc_html_e( 'Opt-in form successfully updated.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
140
- </div>
141
- <?php
142
- }
143
-
144
- // Hooks to allow extensions to display notices.
145
- do_action( 'yikes-mailchimp-edit-form-notice' );
146
- ?>
147
-
148
- <div id="poststuff">
149
- <form id="edit-yikes-mc-form" method="POST" action="<?php echo esc_url( $url ); ?>">
150
- <div id="post-body" class="metabox-holder columns-2">
151
- <div id="post-body-content">
152
- <div class="meta-box-sortables ui-sortable">
153
- <div class="postbox yikes-easy-mc-postbox">
154
- <div class="inside">
155
-
156
- <label for="form-name">
157
- <h3 class="bg-transparent"><?php esc_html_e( 'Form Name', 'yikes-inc-easy-mailchimp-extender' ); ?></h3>
158
- <input autocomplete="disabled" id="form-name" name="form-name" type="text" value="<?php echo esc_html( stripslashes( $form['form_name'] ) ); ?>" class="widefat" />
159
- <p class="description"><?php esc_html_e( 'The title of this signup form.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
160
- </label>
161
-
162
- <label for="form-description">
163
- <h3 class="bg-transparent"><?php esc_html_e( 'Form Description', 'yikes-inc-easy-mailchimp-extender' ); ?></h3>
164
- <textarea name="form-description" id="form-description" class="large-text edit-form-form-description"><?php echo isset( $form['form_description'] ) ? esc_textarea( stripslashes( $form['form_description'] ) ) : ''; ?></textarea>
165
- <p class="description"><?php esc_html_e( 'Descriptions are optional and you may choose to display it to visitors to your site.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
166
- <p class="description"><?php printf( esc_html_e( 'To display the number of subscribers for the list associated with this form, use %s in the form description field above.', 'yikes-inc-easy-mailchimp-extender' ), '<code>[yikes-mailchimp-subscriber-count]</code>' ); ?><p>
167
- </label>
168
-
169
- </div>
170
- <!-- .inside -->
171
- </div>
172
- <!-- .postbox -->
173
- </div>
174
- <!-- .meta-box-sortables .ui-sortable -->
175
-
176
- <!-- TOOLBAR -->
177
- <div id="yikes_easy_mc_toolbar">
178
-
179
- <ul id="yikes_easy_mc_toolbar_links">
180
- <li class="hidden_setting_list">
181
- <a class="hidden_setting form-builder selected_hidden_setting" data-attr-container="form-builder" onclick="return false;" title="<?php esc_attr_e( 'Customize Form Fields', 'yikes-inc-easy-mailchimp-extender' ); ?>" href="#"> <?php _e( 'Form Builder', 'yikes-inc-easy-mailchimp-extender' ); ?></a>
182
- <div class="selected_setting_triangle"></div>
183
- </li>
184
- <li class="hidden_setting_list">
185
- <a class="hidden_setting form-settings" onclick="return false;" data-attr-container="form-settings" title="<?php esc_attr_e( 'Form Settings', 'yikes-inc-easy-mailchimp-extender' ); ?>" href="#"> <?php _e( 'Form Settings', 'yikes-inc-easy-mailchimp-extender' ); ?></a>
186
- </li>
187
- <li class="hidden_setting_list">
188
- <a class="hidden_setting error-messages" onclick="return false;" data-attr-container="error-messages" title="<?php esc_attr_e( 'Customize Form Messages', 'yikes-inc-easy-mailchimp-extender' ); ?>" href="#"> <?php _e( 'Custom Messages', 'yikes-inc-easy-mailchimp-extender' ); ?></a>
189
- </li>
190
- <?php do_action( 'yikes-mailchimp-edit-form-section-links', $form ); ?>
191
- </ul>
192
-
193
- </div>
194
- <!-- END TOOLBAR -->
195
-
196
- <div class="meta-box-sortables ui-sortable" id="hidden-option-data-container">
197
- <div class="postbox yikes-easy-mc-postbox">
198
-
199
- <div class="inside">
200
-
201
- <!-- Form Builder Label -->
202
- <label for="form" class="hidden-setting-label" id="form-builder">
203
-
204
- <div id="poststuff">
205
- <div id="post-body" class="metabox-holder columns-2">
206
- <!-- main content -->
207
- <div id="post-body-content">
208
- <div class="meta-box-sortables ui-sortable">
209
- <div class="postbox yikes-easy-mc-postbox">
210
- <!-- container title -->
211
- <h3 class="edit-form-title" id="form-builder-div" data-form-id="<?php echo esc_attr( $form['id'] ); ?>" data-list-id="<?php echo esc_attr( $form['list_id'] ); ?>" ><?php _e( 'Form Builder', 'yikes-inc-easy-mailchimp-extender' ); ?></h3>
212
- <div class="tags-title" style="display: none;">
213
- <span class="tags-title-text">Tags</span>
214
- <div class="tags-title-container"></div>
215
- </div>
216
- <p id="edit-form-description" class="description edit-form-description-form-builder"><?php _e( 'Click a field to show its advanced options or drag fields to re-arrange them. Click <span class="dashicons dashicons-edit"></span> to edit a field label. Make sure you hit "Update Form" to save all of your changes.', 'yikes-inc-easy-mailchimp-extender' );?></p>
217
- <div id="form-builder-container" class="inside">
218
- <!-- #poststuff -->
219
- <?php echo $this->generate_form_editor( $form['fields'], $form['list_id'], $available_merge_variables, isset( $interest_groupings ) ? $interest_groupings : array() ); ?>
220
- </div>
221
-
222
- <!-- Bulk Delete Form Fields -->
223
- <a href="#" class="clear-form-fields" <?php if( isset( $form['fields'] ) && count( $form['fields'] ) <= 0 ) { ?> style="display:none;" <?php } ?>><?php _e( 'Clear Form Fields', 'yikes-inc-easy-mailchimp-extender' ); ?></a>
224
-
225
- <?php
226
- $display_none = ( isset( $form['fields'] ) && count( $form['fields'] ) <= 0 ) ? 'display:none;' : '';
227
- ?>
228
-
229
- <!-- Save Fields Button -->
230
- <?php submit_button( __( 'Update Form' ), 'primary', '', false, array( 'onclick' => '', 'style' => 'float:right;margin-right:12px;'.$display_none ) ); ?>
231
-
232
- <!-- .inside -->
233
- </div>
234
- <!-- .postbox -->
235
- </div>
236
- <!-- .meta-box-sortables .ui-sortable -->
237
- </div>
238
- <!-- post-body-content -->
239
- <!-- sidebar -->
240
- <div id="postbox-container-1" class="postbox-container">
241
- <div class="meta-box-sortables">
242
- <div class="postbox yikes-easy-mc-postbox">
243
- <h3 class="edit-form-title"><span><?php esc_html_e( "Form Fields, Interest Groups, & Tags", 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
244
- <div class="inside">
245
-
246
- <h3 class="nav-tab-wrapper mv_ig_list">
247
- <a href="#" class="nav-tab nav-tab-active" id="nav-tab-merge-variables" alt="<?php esc_attr_e( 'Merge Variables', 'yikes-inc-easy-mailchimp-extender' ); ?>">
248
- <div class="arrow-down"></div><?php esc_html_e( 'Form Fields', 'yikes-inc-easy-mailchimp-extender' ); ?>
249
- </a>
250
- <?php if ( ! isset( $merge_variable_error ) ) { ?>
251
- <a href="#" class="nav-tab" id="nav-tab-interest-groups"><?php esc_html_e( 'Interest Groups', 'yikes-inc-easy-mailchimp-extender' ); ?></a>
252
- <?php } else { ?>
253
- <a href="#" class="nav-tab no-interest-groups-found-message" id="nav-tab-interest-groups" disabled="disabled" title="<?php esc_attr_e( "No Interest Groups Exist", 'yikes-inc-easy-mailchimp-extender' ); ?>"><?php esc_html_e( 'Interest Groups', 'yikes-inc-easy-mailchimp-extender' ); ?></a>
254
- <?php } ?>
255
- <a href="#" class="nav-tab" id="nav-tab-tags" alt="<?php esc_attr_e( 'Tags', 'yikes-inc-easy-mailchimp-extender' ); ?>"><?php esc_html_e( 'Tags', 'yikes-inc-easy-mailchimp-extender' ); ?></a>
256
- </h3>
257
-
258
- <div id="container-container">
259
-
260
- <div id="merge-variables-container" class="list-container">
261
- <?php
262
- if ( ! isset( $merge_variable_error ) ) {
263
- echo '<p class="description">' . __( "Select the fields below to add to the form builder.", 'yikes-inc-easy-mailchimp-extender' ) . '</p>';
264
- $this->build_available_merge_vars( $form['fields'], $available_merge_variables );
265
- } else {
266
- echo $merge_variable_error;
267
- }
268
- ?>
269
- </div>
270
-
271
- <div id="interest-groups-container" class="list-container">
272
- <?php
273
- if ( isset( $interest_groupings ) && ! isset( $interest_groupings['error'] ) ) {
274
- echo '<p class="description">' . __( "Select an interest group below to add to the form builder.", 'yikes-inc-easy-mailchimp-extender' ) . '</p>';
275
- $this->build_available_interest_groups( $form['fields'], $interest_groupings, $form['list_id'] );
276
- } else {
277
- echo '<p class="description">' . $interest_groupings['error'] . '</p>';
278
- }
279
- ?>
280
- </div>
281
-
282
- <div id="tags-container" class="list-container">
283
- <?php
284
- if ( isset( $tags ) && ! isset( $tags['error'] ) ) {
285
- echo '<p class="description">' . __( "Select a tag to add to the form builder. Selected tags will be added to all subscribers of this form.", 'yikes-inc-easy-mailchimp-extender' ) . '</p>';
286
- echo '<p id="yikes-tags-error-message" class="hidden"><strong>' . __( 'Warning: due to limitations in Mailchimp\'s API, tags are not currently supported for double opt-in signups.', 'yikes-inc-easy-mailchimp-extender' ) . '</strong></p>';
287
- $this->build_available_tags( isset( $form['tags'] ) ? $form['tags'] : array(), $tags, $form['list_id'] );
288
- } else {
289
- echo '<p class="description">' . $interest_groupings['error'] . '</p>';
290
- }
291
- ?>
292
- </div>
293
-
294
- </div>
295
-
296
- </div>
297
- <!-- .inside -->
298
- </div>
299
-
300
- <!-- .postbox -->
301
- </div>
302
- <!-- .meta-box-sortables -->
303
- </div>
304
- <!-- #postbox-container-1 .postbox-container -->
305
- </div>
306
- <!-- #post-body .metabox-holder .columns-2 -->
307
- <br class="clear">
308
- </div>
309
-
310
- </label>
311
- <!-- End Form Builder Label -->
312
-
313
- <!-- Form Settings Customizations -->
314
- <label class="hidden-setting-label yikes-easy-mc-hidden" for="form" id="form-settings">
315
-
316
- <div id="poststuff">
317
- <div id="post-body" class="metabox-holder columns-2">
318
- <!-- main content -->
319
- <div id="post-body-content">
320
- <div class="meta-box-sortables ui-sortable">
321
- <div class="postbox yikes-easy-mc-postbox">
322
- <h3 class="edit-form-title"><span><?php _e( "Additional Form Settings", 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
323
-
324
- <div class="inside form-settings-container">
325
-
326
- <p class="edit-form-description"><?php _e( "Adjust some additional form settings below.", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
327
-
328
- <!-- begin form classes section -->
329
- <strong class="section-title first"><?php _e( 'Overall Form Classes', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
330
- <section class="section-interior">
331
-
332
- <!-- form classes -->
333
- <label for="yikes-easy-mc-form-class-names"><strong><?php _e( 'Form Classes', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
334
- <input type="text" class="widefat" name="yikes-easy-mc-form-class-names" id="yikes-easy-mc-form-class-names" value="<?php echo $form_settings['yikes-easy-mc-form-class-names']; ?>" placeholder="<?php _e( 'Add additional classes to this opt-in form.', 'yikes-inc-easy-mailchimp-extender' ); ?>" >
335
- <p class="description"><?php printf( __( 'Add additional class names to the %s element.', 'yikes-inc-easy-mailchimp-extender' ), '<code>' . htmlentities( '<form>' ) . '</code>' ); ?></p>
336
- </label>
337
-
338
- </section>
339
- <!-- end form classes section -->
340
-
341
- <!-- begin form layout section -->
342
- <strong class="section-title"><?php _e( 'Form Layout', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
343
- <section class="section-interior">
344
-
345
- <!-- setup the checked state here -->
346
- <!-- inline form -->
347
- <strong><?php _e( 'Inline Form', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
348
- <label class="inline-form-label">
349
- <input type="radio" name="yikes-easy-mc-inline-form[]" value="1" <?php checked( $form_settings['yikes-easy-mc-inline-form'], '1' ); ?>/><?php _e( 'Enable', 'yikes-inc-easy-mailchimp-extender' ); ?>
350
- </label>
351
- <label class="inline-form-label">
352
- <input type="radio" name="yikes-easy-mc-inline-form[]" value="0" <?php checked( $form_settings['yikes-easy-mc-inline-form'], '0' ); ?> /><?php _e( 'Disable', 'yikes-inc-easy-mailchimp-extender' ); ?>
353
- </label>
354
- <p class="description"><?php _e( 'Programatically setup this form so that all fields are on the same line.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
355
- <p class="description"><?php printf( __( 'If you are having issues with your theme not displaying the inline form properly, please see the following %s.', 'yikes-inc-easy-mailchimp-extender' ), '<a href="https://yikesplugins.com/support/knowledge-base/my-form-fields-are-not-fully-inline-after-enabling-the-inline-form-option-how-come/" target="_blank">' . __( 'knowledge base article', 'yikes-inc-easy-mailchimp-extender' ) . '</a>' ); ?></p>
356
-
357
- </section>
358
- <!-- end form layout section -->
359
-
360
- <!-- begin submit button section -->
361
- <strong class="section-title"><?php _e( 'Submit Button', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
362
- <section class="section-interior">
363
-
364
- <!-- Submit button type -->
365
- <strong><?php _e( 'Submit Button Type', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
366
- <label class="inline-form-label">
367
- <input type="radio" onclick="toggle_nested_section( jQuery(this) );" name="yikes-easy-mc-submit-button-type[]" value="text" <?php checked( $form_settings['yikes-easy-mc-submit-button-type'], 'text' ); ?> /><?php _e( 'Text', 'yikes-inc-easy-mailchimp-extender' ); ?>
368
- </label>
369
- <label class="inline-form-label">
370
- <input type="radio" onclick="toggle_nested_section( jQuery(this) );" name="yikes-easy-mc-submit-button-type[]" value="image" <?php checked( $form_settings['yikes-easy-mc-submit-button-type'], 'image' ); ?> /><?php _e( 'Image', 'yikes-inc-easy-mailchimp-extender' ); ?>
371
- </label>
372
- <p class="description"><?php _e( 'Select the submit button type for this form.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
373
- <!-- end submit button type -->
374
-
375
- <!-- Text submit button type -->
376
- <section class="submit-button-type-text nested-child<?php if( $form_settings['yikes-easy-mc-submit-button-type'] == 'image' ) { echo ' hidden'; } ?>">
377
- <!-- submit button text -->
378
- <label for="yikes-easy-mc-submit-button-text"><strong><?php _e( 'Submit Button Text', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
379
- <input type="text" class="widefat" name="yikes-easy-mc-submit-button-text" id="yikes-easy-mc-submit-button-text" value="<?php echo $form_settings['yikes-easy-mc-submit-button-text']; ?>" placeholder="<?php _e( 'Submit', 'yikes-inc-easy-mailchimp-extender' ); ?>">
380
- <p class="description"><?php printf( __( 'Set the submit button text. Leaving this blank will default to %s.', 'yikes-inc-easy-mailchimp-extender' ), '"' . __( 'Submit', 'yikes-inc-easy-mailchimp-extender' ) . '"' ); ?></p>
381
-
382
- <p class="description"><?php _e( 'The submit button text set above, can be overwritten on a per-form basis using shortcodes.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
383
- </label>
384
- </section>
385
- <!-- end text submit button type -->
386
-
387
- <!-- Image submit button type -->
388
- <section class="submit-button-type-image nested-child<?php if( $form_settings['yikes-easy-mc-submit-button-type'] == 'text' ) { echo ' hidden'; } ?>">
389
- <label for="yikes-easy-mc-submit-button-image"><strong><?php _e( 'Submit Button URL', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
390
- <input type="text" class="widefat" name="yikes-easy-mc-submit-button-image" id="yikes-easy-mc-submit-button-image" value="<?php echo $form_settings['yikes-easy-mc-submit-button-image']; ?>" placeholder="<?php _e( 'http://', 'yikes-inc-easy-mailchimp-extender' ); ?>">
391
- <p class="description"><?php _e( 'Enter the URL of an image you would like to use as the submit button for this form.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
392
- </label>
393
- </section>
394
- <!-- end image submit button type -->
395
-
396
-
397
- <!-- submit button classes -->
398
- <label for="yikes-easy-mc-form-submit-button-classes"><strong style="float:left;"><?php _e( 'Submit Button Classes', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
399
- <input type="text" class="widefat" name="yikes-easy-mc-submit-button-classes" id="yikes-easy-mc-submit-button-classes" value="<?php echo $form_settings['yikes-easy-mc-submit-button-classes']; ?>" placeholder="<?php _e( 'Add additional classes to this submit button.', 'yikes-inc-easy-mailchimp-extender' ); ?>" >
400
- <p class="description"><?php _e( 'Add custom classes to the submit button.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
401
- </label>
402
- <!-- end submit button classes -->
403
-
404
- </section>
405
- <!-- end submit button section -->
406
-
407
- <!-- begin restrictions section -->
408
- <strong class="section-title"><?php _e( 'Form Restrictions', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
409
- <section class="section-interior">
410
- <!-- Schedule form -->
411
- <label class="inline-form-label">
412
- <input type="checkbox" onclick="toggle_nested_section( jQuery(this) );" name="yikes-easy-mc-form-schedule" value="1" <?php checked( $form_settings['yikes-easy-mc-form-schedule'], '1' ); ?>/><?php _e( 'Schedule Form', 'yikes-inc-easy-mailchimp-extender' ); ?>
413
- </label>
414
- <p class="description" style="margin-bottom:0;"><?php _e( 'Set a time period that this form should be active on your site. (mm/dd/yyyy)', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
415
- <p class="description" style="margin: 0 0 .5em 0;"><?php _e( 'Once the end date & time have passed, users will no longer be able to signup for your mailing list.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
416
- <!-- Start Date Limitation Nested -->
417
- <section class="date-restriction-section nested-child<?php if( $form_settings['yikes-easy-mc-form-schedule'] == '0' ) { echo ' hidden'; } ?>">
418
- <!-- Start Date -->
419
- <label for="yikes-easy-mc-form-restriction-start-date"><strong><?php _e( 'Start Date', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
420
- <input type="text" class="date-picker" name="yikes-easy-mc-form-restriction-start-date" id="yikes-easy-mc-form-restriction-start-date" value="<?php echo ! empty($form_settings['yikes-easy-mc-form-restriction-start'] ) ? date( $this->yikes_jQuery_datepicker_date_format( get_option( 'date_format' ) ), $form_settings['yikes-easy-mc-form-restriction-start'] ) : ''; ?>" >
421
- <?php _e( 'at', 'yikes-inc-easy-mailchimp-extender' ); ?>
422
- </label>
423
-
424
- <!-- Start Time -->
425
- <label for="yikes-easy-mc-form-restriction-start-time"><strong><?php _e( 'Start Time', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
426
- <input type="text" class="time-picker" name="yikes-easy-mc-form-restriction-start-time" id="yikes-easy-mc-form-restriction-start-time" value="<?php echo ! empty( $form_settings['yikes-easy-mc-form-restriction-start'] ) ? date( 'g:iA', $form_settings['yikes-easy-mc-form-restriction-start'] ) : ''; ?>" >
427
- </label>
428
- <p class="description"><?php _e( 'Set the dates that this form should display on your site.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
429
- </section>
430
- <!-- end Start Date Limitation Nested -->
431
-
432
- <!-- End Date Limitation Nested -->
433
- <section class="date-restriction-section nested-child<?php if( $form_settings['yikes-easy-mc-form-schedule'] == '0' ) { echo ' hidden'; } ?> last">
434
- <!-- End Date -->
435
- <label for="yikes-easy-mc-form-restriction-end-date"><strong><?php _e( 'End Date', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
436
- <input type="text" class="date-picker" name="yikes-easy-mc-form-restriction-end-date" id="yikes-easy-mc-form-restriction-end-date" value="<?php echo ! empty( $form_settings['yikes-easy-mc-form-restriction-end'] ) ? date( $this->yikes_jQuery_datepicker_date_format( get_option( 'date_format' ) ), $form_settings['yikes-easy-mc-form-restriction-end'] ) : ''; ?>" >
437
- <?php _e( 'at', 'yikes-inc-easy-mailchimp-extender' ); ?>
438
- </label>
439
-
440
- <!-- End Time -->
441
- <label for="yikes-easy-mc-form-restriction-end-time"><strong><?php _e( 'End Time', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
442
- <input type="text" class="time-picker" name="yikes-easy-mc-form-restriction-end-time" id="yikes-easy-mc-form-restriction-end-time" value="<?php echo ! empty( $form_settings['yikes-easy-mc-form-restriction-end'] ) ? date( 'g:iA', $form_settings['yikes-easy-mc-form-restriction-end'] ) : ''; ?>" >
443
- </label>
444
- <p class="description"><?php _e( 'Set the dates that this form should no longer display on your site.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
445
-
446
- <!-- Form pending message -->
447
- <label for="yikes-easy-mc-form-restriction-pending-message"><strong><?php _e( 'Pending Message', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
448
- <?php
449
- wp_editor(
450
- $form_settings['yikes-easy-mc-form-restriction-pending-message'],
451
- 'yikes-easy-mc-form-restriction-pending-message',
452
- array(
453
- 'editor_class' => 'yikes-easy-mc-form-restriction-pending-message',
454
- 'editor_css' => '<style>.yikes-easy-mc-form-restriction-pending-message{ max-height: 150px; }</style>'
455
- )
456
- );
457
- ?>
458
- </label>
459
- <p class="description"><?php _e( 'Set the message that should display prior to the form being active.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
460
-
461
- <!-- form expired message -->
462
- <label for="yikes-easy-mc-form-restriction-expired-message"><strong><?php _e( 'Expired Message', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
463
- <?php
464
- wp_editor(
465
- $form_settings['yikes-easy-mc-form-restriction-expired-message'],
466
- 'yikes-easy-mc-form-restriction-expired-message',
467
- array(
468
- 'editor_class' => 'yikes-easy-mc-form-restriction-expired-message',
469
- 'editor_css' => '<style>.yikes-easy-mc-form-restriction-expired-message{ max-height: 150px; }</style>'
470
- )
471
- );
472
- ?>
473
- </label>
474
- <p class="description"><?php _e( 'Set the message that should display once the end date has passed for this form.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
475
- </section>
476
- <!-- end End Date Limitation Nested -->
477
-
478
- <!-- Require Users to be Logged In -->
479
- <label class="inline-form-label">
480
- <input type="checkbox" onclick="toggle_nested_section( jQuery(this) );" name="yikes-easy-mc-form-login-required" value="1" <?php checked( $form_settings['yikes-easy-mc-form-login-required'], '1' ); ?> /><?php _e( 'Require Login', 'yikes-inc-easy-mailchimp-extender' ); ?>
481
- </label>
482
- <p class="description"><?php _e( 'Require users to be logged in before they can view and submit this opt-in form.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
483
-
484
- <!-- Require Login Message -->
485
- <section class="login-restriction-section nested-child<?php if( $form_settings['yikes-easy-mc-form-login-required'] == '0' ) { echo ' hidden'; } ?>">
486
- <label for="yikes-easy-mc-form-restriction-login-message"><strong><?php _e( 'Required Login Message', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
487
- <?php
488
- wp_editor(
489
- $form_settings['yikes-easy-mc-form-restriction-login-message'],
490
- 'yikes-easy-mc-form-restriction-login-message',
491
- array(
492
- 'editor_class' => 'yikes-easy-mc-form-restriction-login-message',
493
- 'editor_css' => '<style>.yikes-easy-mc-form-restriction-login-message{ max-height: 150px; }</style>'
494
- )
495
- );
496
- ?>
497
- </label>
498
- <p class="description"><?php _e( 'Set the message that non-logged in users should see when viewing this form.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
499
- <p class="description"><?php printf( __( 'To display a login form, use %s', 'yikes-inc-easy-mailchimp-extender' ), '<code>[login-form]</code>' ); ?></p>
500
- </section>
501
-
502
- </section>
503
- <!-- end restrictions section -->
504
-
505
- </div>
506
-
507
- <!-- .inside -->
508
- </div>
509
- <!-- .postbox -->
510
- </div>
511
- <!-- .meta-box-sortables .ui-sortable -->
512
- </div>
513
- <!-- post-body-content -->
514
- <!-- sidebar -->
515
- <div id="postbox-container-1" class="postbox-container">
516
- <div class="meta-box-sortables">
517
- <div class="postbox yikes-easy-mc-postbox">
518
- <h3 class="edit-form-title"><span><?php _e( "Form Settings Explained", 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
519
- <div class="inside">
520
-
521
- <ul>
522
- <li><strong><?php _e( 'Classes', 'yikes-inc-easy-mailchimp-extender' ); ?></strong> : <?php _e( 'Add additional classes to this form, allowing you to target it more easily for customization via CSS.', 'yikes-inc-easy-mailchimp-extender' ); ?></li>
523
- <li><strong><?php _e( 'Form Layout', 'yikes-inc-easy-mailchimp-extender' ); ?></strong> : <?php _e( 'Toggle the layout of this form between single column and an inline layout. The inline layout places all of your form fields and the submit button on a single line.', 'yikes-inc-easy-mailchimp-extender' ); ?></li>
524
- <li><strong><?php _e( 'Submit Button', 'yikes-inc-easy-mailchimp-extender' ); ?></strong> : <?php _e( 'Adjust setting specific to the submit button. Change the submit button text, or set it to a specified image. Use the "Submit Button Classes" to assign additional classes to your submit button - ensuring it fits better into your theme.', 'yikes-inc-easy-mailchimp-extender' ); ?></li>
525
- <li><strong><?php _e( 'Form Restrictions', 'yikes-inc-easy-mailchimp-extender' ); ?></strong> : <?php _e( 'Adjust the restrictions for this form. Limit form visibility to a given time period, require users to be logged in to sign up or combine the two!', 'yikes-inc-easy-mailchimp-extender' ); ?></li>
526
- </ul>
527
-
528
- </div>
529
- <!-- .inside -->
530
- </div>
531
- <!-- .postbox -->
532
- </div>
533
- <!-- .meta-box-sortables -->
534
- </div>
535
- <!-- #postbox-container-1 .postbox-container -->
536
- </div>
537
- <!-- #post-body .metabox-holder .columns-2 -->
538
- <br class="clear">
539
- </div>
540
-
541
- </label>
542
- <!-- End Form Settings Customizations -->
543
-
544
- <!-- Error Messages -->
545
- <label class="hidden-setting-label yikes-easy-mc-hidden" for="form" id="error-messages">
546
-
547
- <div id="poststuff">
548
- <div id="post-body" class="metabox-holder columns-2">
549
- <!-- main content -->
550
- <div id="post-body-content">
551
- <div class="meta-box-sortables ui-sortable">
552
- <div class="postbox yikes-easy-mc-postbox">
553
- <h3 class="edit-form-title"><span><?php _e( "Custom Messages", 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
554
-
555
- <div class="inside error-message-container">
556
- <?php
557
- // build our default options
558
- $error_message_array = array(
559
- 'success' => __( 'Thank You for subscribing! Check your email for the confirmation message.', 'yikes-inc-easy-mailchimp-extender' ),
560
- 'success-single-optin' => __( 'Thank you for subscribing!', 'yikes-inc-easy-mailchimp-extender' ),
561
- 'success-resubscribed' => __( 'Thank you for already being a subscriber! Your profile info has been updated.', 'yikes-inc-easy-mailchimp-extender' ),
562
- 'general-error' => __( "Whoops! It looks like something went wrong. Please try again.", 'yikes-inc-easy-mailchimp-extender' ),
563
- 'email-exists-error' => __( "The email you entered is already a subscriber to this list.", 'yikes-inc-easy-mailchimp-extender' ),
564
- 'update-link' => __( "You're already subscribed. To update your Mailchimp profile, please [link]click to send yourself an update link[/link].", 'yikes-inc-easy-mailchimp-extender' ),
565
- 'email-subject' => __( 'Mailchimp Profile Update', 'yikes-inc-easy-mailchimp-extender' ),
566
- 'update-email-success' => sprintf( __( '%s Update email successfully sent. Please check your inbox for the message.', 'yikes-inc-easy-mailchimp-extender' ), '&#10004;' ),
567
- 'update-email-failure' => sprintf( __( '%s Email failed to send. Please contact the site administrator.', 'yikes-inc-easy-mailchimp-extender' ), '&#10005;' ),
568
-
569
- );
570
- $global_error_messages = get_option( 'yikes-easy-mc-global-error-messages', $error_message_array );
571
- ?>
572
- <p class="edit-form-description"><?php _e( "Customize the response messages for this form. Leave the field blank to use the default message. The messages shown below depend on the Opt-in Settings chosen.", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
573
-
574
- <!-- Success Message (refactored @ 6.3.0 for double optin) -->
575
- <label for="yikes-easy-mc-success-message"><strong><?php _e( 'Success: Double opt-in', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
576
- <input type="text" class="widefat" name="yikes-easy-mc-success-message" id="yikes-easy-mc-success-message" value="<?php echo isset( $error_messages['success'] ) ? stripslashes( esc_html( $error_messages['success'] ) ) : ''; ?>" placeholder="<?php echo $global_error_messages['success']; ?>" >
577
- </label>
578
- <!-- Success Message (for single optin) -->
579
- <label for="yikes-easy-mc-success-single-optin-message"><strong><?php _e( 'Success: Single opt-in', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
580
- <input type="text" class="widefat" name="yikes-easy-mc-success-single-optin-message" id="yikes-easy-mc-success-single-optin-message" value="<?php echo isset( $error_messages['success-single-optin'] ) ? stripslashes( esc_html( $error_messages['success-single-optin'] ) ) : ''; ?>" placeholder="<?php echo $global_error_messages['success-single-optin']; ?>" >
581
- </label>
582
- <!-- Resubscribing users when updating your profile via the form is allowed -->
583
- <label for="yikes-easy-mc-user-resubscribed-success-message"><strong><?php _e( 'Success: Re-subscriber', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
584
- <input type="text" class="widefat" name="yikes-easy-mc-user-resubscribed-success-message" id="yikes-easy-mc-user-resubscribed-success-message" value="<?php echo isset( $error_messages['success-resubscribed'] ) ? stripslashes( esc_html( $error_messages['success-resubscribed'] ) ) : ''; ?>" placeholder="<?php echo $global_error_messages['success-resubscribed']; ?>">
585
- </label>
586
-
587
- <!-- Click the link to update user profile etc. etc. -->
588
- <label for="yikes-easy-mc-user-subscribed-update-link"><strong><?php _e( 'Success: Re-subscriber with link to email profile update message', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
589
- <input type="text" class="widefat" name="yikes-easy-mc-user-update-link" id="yikes-easy-mc-user-update-link" value="<?php echo isset( $error_messages['update-link'] ) ? stripslashes( esc_html( $error_messages['update-link'] ) ) : ''; ?>" placeholder="<?php echo $global_error_messages['update-link']; ?>">
590
- </label>
591
-
592
- <!-- Email Address is already subscribed -->
593
- <label for="yikes-easy-mc-user-subscribed-message"><strong><?php _e( 'Error: Re-subscribers not permitted', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
594
- <input type="text" class="widefat" name="yikes-easy-mc-user-subscribed-message" id="yikes-easy-mc-user-subscribed-message" value="<?php echo isset( $error_messages['already-subscribed'] ) ? stripslashes( esc_html( $error_messages['already-subscribed'] ) ) : ''; ?>" placeholder="<?php echo $global_error_messages['email-exists-error']; ?>">
595
- </label>
596
-
597
- <!-- Update email successfully sent -->
598
- <label for="yikes-easy-mc-update-email-successful"><strong><?php _e( 'Success: Update email successfully sent', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
599
- <input type="text" class="widefat" name="yikes-easy-mc-update-email-successful" id="yikes-easy-mc-update-email-successful" value="<?php echo isset( $error_messages['update-email-success'] ) ? stripslashes( esc_attr( $error_messages['update-email-success'] ) ) : ''; ?>" placeholder="<?php echo $global_error_messages['update-email-success']; ?>" >
600
- </label>
601
-
602
- <!-- Update email failed to send -->
603
- <label for="yikes-easy-mc-update-email-failure"><strong><?php _e( 'Error: Update email failed to send', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
604
- <input type="text" class="widefat" name="yikes-easy-mc-update-email-failure" id="yikes-easy-mc-update-email-failure" value="<?php echo isset( $error_messages['update-email-failure'] ) ? stripslashes( esc_attr( $error_messages['update-email-failure'] ) ) : ''; ?>" placeholder="<?php echo $global_error_messages['update-email-failure']; ?>" >
605
- </label>
606
-
607
- <!-- General Error Message -->
608
- <label for="yikes-easy-mc-general-error-message"><strong><?php _e( 'Error: General', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
609
- <input type="text" class="widefat" name="yikes-easy-mc-general-error-message" id="yikes-easy-mc-general-error-message" value="<?php echo isset( $error_messages['general-error'] ) ? stripslashes( esc_html( $error_messages['general-error'] ) ) : ''; ?>" placeholder="<?php echo $global_error_messages['general-error']; ?>" >
610
- </label>
611
-
612
- <!-- Email Section -->
613
-
614
- <hr>
615
- <div class="yikes-easy-mc-custom-messages-email-section">
616
- <p class="edit-form-description"><?php _e( 'Customize the profile verification email sent to re-subscribers. Leave the text unedited to use the default message.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
617
- <!-- Email Subject -->
618
- <label for="yikes-easy-mc-user-email-subject"><strong><?php _e( 'Email Subject', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
619
- <input type="text" class="widefat" name="yikes-easy-mc-user-email-subject" id="yikes-easy-mc-user-email-subject" value="<?php echo isset( $error_messages['email-subject'] ) ? stripslashes( esc_html( $error_messages['email-subject'] ) ) : ''; ?>" placeholder="<?php echo $global_error_messages['email-subject']; ?>">
620
- </label>
621
- <!-- Email Body -->
622
- <label for="yikes-easy-mc-user-email-body"><strong><?php _e( 'Email Body', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
623
- <?php
624
- $editor_content = ( isset( $error_messages['email-body'] ) && ! empty( $error_messages['email-body'] ) ) ? $error_messages['email-body'] : Yikes_Inc_Easy_Mailchimp_Forms_Admin::generate_default_email_body();
625
- wp_editor( $editor_content, 'yikes-easy-mc-user-email-body', array( 'textarea_id' => 'yikes-easy-mc-user-email-body' ) );
626
- ?>
627
- </label>
628
- </div>
629
- </div>
630
-
631
- <!-- .inside -->
632
- </div>
633
- <!-- .postbox -->
634
- </div>
635
- <!-- .meta-box-sortables .ui-sortable -->
636
- </div>
637
- <!-- post-body-content -->
638
- <!-- sidebar -->
639
- <div id="postbox-container-1" class="postbox-container yikes-easy-mc-custom-messages-section-help">
640
- <div class="meta-box-sortables">
641
- <div class="postbox yikes-easy-mc-postbox">
642
- <h3 class="edit-form-title"><span><?php esc_html_e( "Custom Message Help", 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
643
- <div class="inside">
644
- <ul>
645
- <li class="yikes-easy-mc-success-message-help">
646
- <strong><?php esc_html_e( 'Success: Double opt-in', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
647
- <?php
648
- esc_html_e( 'The message displayed after a double opt-in form has been submitted.', 'yikes-inc-easy-mailchimp-extender' );
649
- ?>
650
- </li>
651
- <li class="yikes-easy-mc-success-single-optin-message-help">
652
- <strong><?php esc_html_e( 'Success Message: Single opt-in', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
653
- <?php
654
- esc_html_e( 'The message displayed after a single opt-in form has been submitted.', 'yikes-inc-easy-mailchimp-extender' );
655
- ?>
656
- </li>
657
- <li class="yikes-easy-mc-user-resubscribed-success-message-help">
658
- <strong><?php esc_html_e( 'Success: Re-subscriber', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
659
- <?php
660
- esc_html_e( 'The message displayed after a subscriber submits a form for a list they are already subscribed to.', 'yikes-inc-easy-mailchimp-extender' );
661
- ?>
662
- </li>
663
- <li class="yikes-easy-mc-user-subscribed-update-link-help">
664
- <strong><?php esc_html_e( 'Success: Re-subscriber with link to email profile update message', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
665
- <?php
666
- /* translators: HTML <code> tags */
667
- echo sprintf( esc_html__( 'The message displayed after a subscriber submits a form for a list they are already subscribed to. Wrap the text you want to be the link in %1$1s[link][/link]%2$2s tags.', 'yikes-inc-easy-mailchimp-extender' ), '<code>', '</code>' );
668
- ?>
669
- </li>
670
- <li class="yikes-easy-mc-update-email-successful-help">
671
- <strong><?php esc_html_e( 'Success: Update email successfully sent', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
672
- <?php
673
- esc_html_e( 'The message displayed after an update profile email is successfully sent.', 'yikes-inc-easy-mailchimp-extender' );
674
- ?>
675
- </li>
676
- <li class="yikes-easy-mc-update-email-failure-help">
677
- <strong><?php esc_html_e( 'Error: Update email failed to send', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
678
- <?php
679
- esc_html_e( 'The message displayed after an update profile email failed to send.', 'yikes-inc-easy-mailchimp-extender' );
680
- ?>
681
- </li>
682
- <li class="yikes-easy-mc-user-subscribed-message-help">
683
- <strong><?php esc_html_e( 'Error: Re-subscribers not permitted', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
684
- <?php
685
- /* translators: HTML <code> tags */
686
- echo sprintf( esc_html__( 'The message displayed after a subscriber tries to join a list they are already subscribed to. You can display the user\'s email in the message using an %1$1s[email]%2$2s tag.', 'yikes-inc-easy-mailchimp-extender' ), '<code>', '</code>' );
687
- ?>
688
- </li>
689
- <li class="yikes-easy-mc-general-error-message-help"><strong><?php esc_html_e( 'Error: General', 'yikes-inc-easy-mailchimp-extender' ); ?></strong> <?php esc_html_e( 'The message displayed if a form error has occurred.', 'yikes-inc-easy-mailchimp-extender' ); ?></li>
690
- </ul>
691
-
692
- </div>
693
- <!-- .inside -->
694
- </div>
695
-
696
- <div class="postbox yikes-easy-mc-postbox yikes-easy-mc-custom-messages-email-section-help">
697
- <h3 class="edit-form-title"><span><?php esc_html_e( "Email Message Help", 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
698
- <div class="inside">
699
-
700
- <ul>
701
- <li class="yikes-easy-mc-user-email-subject-help"><strong><?php esc_html_e( 'Email Subject', 'yikes-inc-easy-mailchimp-extender' ); ?></strong> <?php esc_html_e( 'The subject of the email sent to the user.', 'yikes-inc-easy-mailchimp-extender' ); ?></li>
702
- <li class="yikes-easy-mc-user-email-body-help">
703
- <strong><?php esc_html_e( 'Email Body', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
704
- <?php
705
- /* translators: HTML <code> tags */
706
- echo sprintf( esc_html__( 'The text in the profile update verification email sent to the subscriber. Wrap the text you want to be the link in %1$1s[link][/link]%2$2s tags. The link is required in the email, please don\'t leave these tags out.', 'yikes-inc-easy-mailchimp-extender' ), '<code>', '</code>' );
707
- ?>
708
- </li>
709
- <li class="yikes-easy-mc-user-email-body-help">
710
- <strong><?php esc_html_e( 'Tags', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
711
- <?php esc_html_e( 'You can also use these tags in your email:', 'yikes-inc-easy-mailchimp-extender' ); ?>
712
- <ul>
713
- <li>
714
- <?php
715
- /* translators: First two placeholders are HTML <code> tags, third one is the website's home URL */
716
- echo sprintf( esc_html__( '%1$1s[url]%2$2s displays your website\'s URL (i.e. %3$3s).', 'yikes-inc-easy-mailchimp-extender' ), '<code>', '</code>', esc_url( get_home_url() ) );
717
- ?>
718
- </li>
719
- <li>
720
- <?php
721
- /* translators: HTML <code> tags */
722
- echo sprintf( esc_html__( '%1$1s[email]%2$2s displays the subscriber\'s email address.', 'yikes-inc-easy-mailchimp-extender' ), '<code>', '</code>' );
723
- ?>
724
- </li>
725
- <li>
726
- <?php
727
- /* translators: HTML <code> tags */
728
- echo sprintf( esc_html__( '%1$1s[subscriber_id]%2$2s displays the subscriber\'s unique email ID.', 'yikes-inc-easy-mailchimp-extender' ), '<code>', '</code>' );
729
- ?>
730
- </li>
731
- <li>
732
- <?php
733
- /* translators: First two placeholders are HTML <code> tags, third one is the form's name */
734
- echo sprintf( esc_html__( '%1$1s[form_name]%2$2s displays your form\'s name (i.e. %3$3s).', 'yikes-inc-easy-mailchimp-extender' ), '<code>', '</code>', esc_html( $form['form_name'] ) );
735
- ?>
736
- </li>
737
- <li>
738
- <?php
739
- /* translators: HTML <code> tags */
740
- echo sprintf( esc_html__( '%1$1s[fname]/[lname]%2$2s displays your subscriber\'s first name/last name.', 'yikes-inc-easy-mailchimp-extender' ), '<code>', '</code>' );
741
- ?>
742
- </li>
743
- </ul>
744
- </li>
745
- </ul>
746
-
747
- </div>
748
- <!-- .inside -->
749
- </div>
750
-
751
-
752
-
753
-
754
-
755
- <!-- .postbox -->
756
- </div>
757
- <!-- .meta-box-sortables -->
758
- </div>
759
- <!-- #postbox-container-1 .postbox-container -->
760
- </div>
761
- <!-- #post-body .metabox-holder .columns-2 -->
762
- <br class="clear">
763
- </div>
764
-
765
- </label>
766
- <!-- End Error Messages -->
767
-
768
- <?php do_action( 'yikes-mailchimp-edit-form-sections', $form ); ?>
769
-
770
- </div>
771
- <!-- .inside -->
772
- </div>
773
- <!-- .postbox -->
774
- </div>
775
- <!-- .meta-box-sortables .ui-sortable -->
776
- </div>
777
- <!-- post-body-content -->
778
-
779
- <!-- sidebar -->
780
- <div id="postbox-container-1" class="postbox-container yikes-easy-forms-sidebar">
781
- <div class="meta-box-sortables">
782
- <div class="postbox yikes-easy-mc-postbox">
783
- <h3><span><?php esc_html_e( 'Form Settings', 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
784
-
785
- <div class="inside">
786
- <p class="inside-section-1">
787
- <label for="shortcode"><?php esc_html_e( 'Edit Another Form', 'yikes-inc-easy-mailchimp-extender' ); ?><br />
788
- <select class="widefat" name="form_switcher" id="form_switcher" onchange="YIKES_Easy_MC_SwitchForm(jQuery(this).val());">
789
- <?php foreach ( $all_forms as $single_form ) { ?>
790
- <option <?php selected( $form_id, $single_form['id'] ); ?> value="<?php echo esc_attr( $single_form['id'] ); ?>"><?php echo esc_html( $single_form['form_name'] ); ?></option>
791
- <?php } ?>
792
- </select>
793
- </label>
794
- </p>
795
-
796
- <p class="inside-section-2">
797
- <label for="shortcode"><?php esc_html_e( 'Shortcode', 'yikes-inc-easy-mailchimp-extender' ); ?><br />
798
- <input type="text" onclick="this.setSelectionRange(0, this.value.length)" class="widefat shortcode-input-field" readonly value='[yikes-mailchimp form="<?php echo esc_attr( $form['id'] ); ?>"]' />
799
- </label>
800
- </p>
801
-
802
-
803
- <a href="#" class="expansion-section-title settings-sidebar">
804
- <span class="dashicons dashicons-plus yikes-mc-expansion-toggle"></span><?php esc_html_e( 'Associated List Settings', 'yikes-inc-easy-mailchimp-extender' ); ?>
805
- </a>
806
- <div class="yikes-mc-settings-expansion-section">
807
- <!-- Associated List -->
808
- <p class="form-field-container">
809
- <!-- necessary to prevent skipping on slideToggle(); -->
810
- <label for="associated-list"><strong><?php esc_html_e( 'Associated List', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
811
- <select name="associated-list" id="associated-list" <?php if ( empty( $list_data ) ) { echo 'disabled="disabled"'; } ?> onchange="jQuery('.view-list-link').attr( 'href', '<?php echo esc_url( admin_url( 'admin.php?page=yikes-mailchimp-view-list&list-id=' ) ); ?>' + jQuery( this ).val() );">
812
- <?php
813
- if ( ! empty( $list_data ) ) {
814
- foreach( $list_data as $mailing_list ) {
815
- ?>
816
- <option <?php selected( $form['list_id'], $mailing_list['id'] ); ?> value="<?php echo $mailing_list['id']; ?>"><?php echo stripslashes( $mailing_list['name'] ) . ' (' . $mailing_list['stats']['member_count'] . ') '; ?></option>
817
- <?php
818
- }
819
- } else {
820
- ?>
821
- <option value="no-forms"><?php esc_html_e( 'No Lists Found', 'yikes-inc-easy-mailchimp-extender' ); ?></option>
822
- <?php
823
- }
824
- ?>
825
- </select>
826
- <?php if( ! empty( $form['list_id'] ) ) { ?>
827
- <p class="description view-list">
828
- <a href="<?php echo esc_url( admin_url( 'admin.php?page=yikes-mailchimp-view-list&list-id=' . $form['list_id'] ) ); ?>" class="view-list-link"><?php _e( 'View List', 'yikes-inc-easy-mailchimp-extender' ); ?></a>
829
- </p>
830
- <p class="description">
831
- <?php _e( "Users who sign up via this form will be added to the list selected above.", 'yikes-inc-easy-mailchimp-extender' ); ?>
832
- </p>
833
- <?php } else { ?>
834
- <p class="description">
835
- <?php _e( "It looks like you first need to create a list to assign this form to. Head over to", 'yikes-inc-easy-mailchimp-extender' ); ?> <a href="http://www.Mailchimp.com" title="<?php _e( 'Create a new list', 'yikes-inc-easy-mailchimp-extender' ); ?>">Mailchimp</a> <?php _e( 'to create your first list', 'yikes-inc-easy-mailchimp-extender' ); ?>.
836
- </p>
837
- <?php } ?>
838
-
839
- <!-- Display our Clear API Cache button -->
840
- <?php if ( false === get_transient( 'yikes-easy-mailchimp-list-data' ) && false === get_transient( 'yikes-easy-mailchimp-profile-data' ) && false === get_transient( 'yikes-easy-mailchimp-account-data' ) && false === get_transient( 'yikesinc_eme_list_ids' ) && false === get_transient( 'yikes_eme_lists' ) ) { ?>
841
- <p><a href="#" class="button-secondary" disabled="disabled" title="<?php _e( 'No Mailchimp data found in temporary cache storage.', 'yikes-inc-easy-mailchimp-extender' ); ?>"><?php _e( 'Clear Mailchimp API Cache', 'yikes-inc-easy-mailchimp-extender' ); ?></a></p>
842
- <?php } else { ?>
843
- <p><a href="<?php echo esc_url_raw( add_query_arg( array( 'action' => 'yikes-easy-mc-clear-transient-data', 'nonce' => wp_create_nonce( 'clear-mc-transient-data' ) ) ) ); ?>" class="button-primary"><?php _e( 'Clear Mailchimp API Cache', 'yikes-inc-easy-mailchimp-extender' ); ?></a></p>
844
- <?php } ?>
845
- </label>
846
- </p>
847
- </div>
848
-
849
- <a href="#" class="expansion-section-title settings-sidebar">
850
- <span class="dashicons dashicons-plus yikes-mc-expansion-toggle"></span><?php _e( 'Opt-in Settings', 'yikes-inc-easy-mailchimp-extender' ); ?>
851
- </a>
852
- <div class="yikes-mc-settings-expansion-section">
853
-
854
- <!-- Single or Double Opt-in -->
855
- <?php
856
- if( !isset( $optin_settings['optin'] ) ) {
857
- $optin_settings['optin'] = '1';
858
- }
859
- ?>
860
- <p class="form-field-container"><!-- necessary to prevent skipping on slideToggle(); --><label for="single-double-optin"><strong><?php _e( 'Single or Double Opt-in', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
861
- <span class="edit-form-field-container-span">
862
- <label for="single"><input id="single" type="radio" name="single-double-optin" value="0" <?php checked( $optin_settings['optin'], '0' ); ?>><?php _e( 'Single', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
863
- &nbsp;<label for="double"><input id="double" type="radio" name="single-double-optin" value="1" <?php checked( $optin_settings['optin'], '1' ); ?>><?php _e( 'Double', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
864
- </span>
865
- <p class="description"><?php _e( "Double opt-in requires users to confirm their email address before being added to a list (recommended)", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
866
- </label></p>
867
-
868
- <!-- Update Existing Users -->
869
- <?php
870
- if( !isset( $optin_settings['update_existing_user'] ) ) {
871
- $optin_settings['update_existing_user'] = '1';
872
- }
873
- ?>
874
- <p class="form-field-container"><!-- necessary to prevent skipping on slideToggle(); --><label for="update-existing-user"><strong><?php _e( 'Update Existing Subscriber', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
875
- <span class="form-field-container-span">
876
- <label for="update-user"><input type="radio" id="update-user" onchange="toggleUpdateEmailContainer(this);return false;" name="update-existing-user" value="1" <?php checked( $optin_settings['update_existing_user'], '1' ); ?>><?php _e( 'Yes', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
877
- &nbsp;<label for="do-not-update-user"><input type="radio" onchange="toggleUpdateEmailContainer(this);return false;" id="do-not-update-user" name="update-existing-user" value="0" <?php checked( $optin_settings['update_existing_user'], '0' ); ?>><?php _e( 'No', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
878
- </span>
879
- <p class="description"><?php printf( __( "Update an existing subscriber's profile information instead of displaying a %s message.", "yikes-inc-easy-mailchimp-extender" ), __( '"user already subscribed"', 'yikes-inc-easy-mailchimp-extender' ) ); ?></p>
880
- </label></p>
881
-
882
- <!--
883
- Send Update Profile Email
884
- - Yes = send an update email
885
- - No = Just update the user profile without an email
886
- -->
887
- <?php
888
- $send_update_email = ( isset( $optin_settings['send_update_email'] ) && '' !== $optin_settings['send_update_email'] ) ? $optin_settings['send_update_email'] : 0;
889
- ?>
890
- <p class="form-field-container send-update-email" <?php if ( 1 !== absint( $optin_settings['update_existing_user'] ) ) { ?>style="display:none;"<?php } ?>><!-- necessary to prevent skipping on slideToggle(); --><label for="update-existing-user"><strong><?php _e( 'Send Update Email', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
891
- <span class="form-field-container-span">
892
- <label for="update-email"><input type="radio" id="update-email" name="update-existing-email" value="1" <?php checked( $send_update_email, '1' ); ?>><?php _e( 'Yes', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
893
- &nbsp;<label for="do-not-update-email"><input type="radio" id="do-not-update-email" name="update-existing-email" value="0" <?php checked( $send_update_email, '0' ); ?>><?php _e( 'No', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
894
- </span>
895
- <em><?php printf( __( "Send an email to the user granting their permission to update their profile information. Otherwise, an existing subscriber filling out this form, will have their profile information updated without any further interaction.", "yikes-inc-easy-mailchimp-extender" ), __( '"user already subscribed"', 'yikes-inc-easy-mailchimp-extender' ) ); ?></em>
896
- </label></p>
897
-
898
- </div>
899
-
900
- <a href="#" class="expansion-section-title settings-sidebar">
901
- <span class="dashicons dashicons-plus yikes-mc-expansion-toggle"></span><?php _e( 'Submission Settings', 'yikes-inc-easy-mailchimp-extender' ); ?>
902
- </a>
903
- <div class="yikes-mc-settings-expansion-section">
904
- <!-- AJAX form Submission -->
905
- <?php
906
- if( !isset( $submission_settings['ajax'] ) ) {
907
- $submission_settings['ajax'] = '1';
908
- }
909
- ?>
910
- <p class="form-field-container"><!-- necessary to prevent skipping on slideToggle(); --><label for="form-ajax-submission"><strong><?php _e( 'Enable AJAX Submission', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
911
- <span class="form-field-container-span">
912
- <label for="enable-ajax"><input type="radio" id="enable-ajax" name="form-ajax-submission" class="yikes-enable-disable-ajax" value="1" <?php checked( $submission_settings['ajax'], '1' ); ?>><?php _e( 'Yes', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
913
- &nbsp;<label for="disable-ajax"><input type="radio" id="disable-ajax" name="form-ajax-submission" class="yikes-enable-disable-ajax" value="0" <?php checked( $submission_settings['ajax'], '0' ); ?>><?php _e( 'No', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
914
- </span>
915
- <p class="description"><?php _e( "AJAX form submissions transmit data without requiring the page to refresh.", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
916
- </label></p>
917
-
918
- <!-- Redirect User On Submission -->
919
- <?php
920
- if( !isset( $submission_settings['redirect_on_submission'] ) ) {
921
- $submission_settings['redirect_on_submission'] = '0';
922
- $submission_settings['redirect_page'] = '';
923
- }
924
- ?>
925
- <p><label for="redirect-user-on-submission"><strong><?php _e( 'Redirect On Submission', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
926
- <span class="form-field-container-span">
927
- <label for="redirect-user"><input type="radio" id="redirect-user" onclick="togglePageRedirection( this );" name="redirect-user-on-submission" value="1" <?php checked( $submission_settings['redirect_on_submission'], '1' ); ?>><?php _e( 'Yes', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
928
- &nbsp;<label for="do-not-redirect-user"><input type="radio" id="do-not-redirect-user" onclick="togglePageRedirection( this );" name="redirect-user-on-submission" value="0" <?php checked( $submission_settings['redirect_on_submission'], '0' ); ?>><?php _e( 'No', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
929
- </span>
930
- <?php $this->generate_page_redirect_dropdown( $submission_settings['redirect_on_submission'], $submission_settings['redirect_page'], ( isset( $submission_settings['custom_redirect_url'] ) ) ? esc_url( $submission_settings['custom_redirect_url'] ) : '' ); ?>
931
- <p class="description"><?php _e( "When the user signs up would you like to redirect them to another page?", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
932
- </label></p>
933
-
934
- <?php
935
- if ( ! isset( $submission_settings['redirect_new_window'] ) ) {
936
- $submission_settings['redirect_new_window'] = '0';
937
- }
938
- ?>
939
-
940
- <!-- Option to open the redirect URL in a new window -->
941
- <div class="redirect-new-window-div" <?php if ( ( ! isset( $submission_settings['redirect_on_submission'] ) || $submission_settings['redirect_on_submission'] === '0' ) || ( ! isset( $submission_settings['ajax'] ) || $submission_settings['ajax'] !== '1' ) ) { echo 'style="display:none;"'; } ?>>
942
- <p><strong><?php _e( "Open Redirect URL in a New Window", 'yikes-inc-easy-mailchimp-extender' ); ?></strong></p>
943
- <label for="redirect-new-window-yes">
944
- <input type="radio" class="widefat custom-redirect-new-window" id="redirect-new-window-yes" name="redirect_new_window" value="1" <?php checked( $submission_settings['redirect_new_window'], '1' ); ?>/><?php _e( 'Yes', 'yikes-inc-easy-mailchimp-extender' ); ?>
945
- </label>
946
- &nbsp;
947
- <label for="redirect-new-window-no">
948
- <input type="radio" class="widefat redirect-new-window" id="redirect-new-window-no" name="redirect_new_window" value="0" <?php checked( $submission_settings['redirect_new_window'], '0' ); ?>/><?php _e( 'No', 'yikes-inc-easy-mailchimp-extender' ); ?>
949
- </label>
950
- <p class="description"><?php _e( "Should the redirect URL open in a new window/tab?", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
951
- </div>
952
-
953
- <!-- Hide Form On Submission -->
954
- <?php
955
- if( !isset( $submission_settings['hide_form_post_signup'] ) ) {
956
- $submission_settings['hide_form_post_signup'] = '0';
957
- }
958
- ?>
959
- <p><label for="hide-form-post-signup"><strong><?php _e( 'Hide Form After Sign Up', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
960
- <span class="form-field-container-span">
961
- <label for="hide-form"><input type="radio" id="hide-form" name="hide-form-post-signup" value="1" <?php checked( $submission_settings['hide_form_post_signup'], '1' ); ?> checked><?php _e( 'Yes', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
962
- &nbsp;<label for="do-not-hide-form"><input type="radio" id="do-not-hide-form" name="hide-form-post-signup" value="0" <?php checked( $submission_settings['hide_form_post_signup'], '0' ); ?>><?php _e( 'No', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
963
- </span>
964
- <p class="description"><?php _e( "Should the form be hidden after the user successfully signs up?", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
965
- </label></p>
966
-
967
- <!-- Append or Replace Interest Groups -->
968
- <?php
969
- if( !isset( $submission_settings['replace_interests'] ) ) {
970
- $submission_settings['replace_interests'] = '1'; // defaults to true
971
- }
972
- ?>
973
- <p><label for="replace-interest-groups"><strong><?php _e( 'Existing Interest Groups', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
974
- <span class="form-field-container-span">
975
- <label for="replace-interest-groups"><input type="radio" id="replace-interest-groups" name="replace-interest-groups" value="1" <?php checked( $submission_settings['replace_interests'], '1' ); ?> checked><?php _e( 'Replace', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
976
- &nbsp;<label for="update-interest-groups"><input type="radio" id="update-interest-groups" name="replace-interest-groups" value="0" <?php checked( $submission_settings['replace_interests'], '0' ); ?>><?php _e( 'Update', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
977
- </span>
978
-
979
- <p class="description"><small><?php _e( "<strong>Replace</strong>: Replace all interest groups with the new ones submitted.", 'yikes-inc-easy-mailchimp-extender' ); ?></small></p>
980
-
981
-
982
- <p class="description"><small><?php _e( "<strong>Update</strong>: Update <em>only</em> the ones submitted. Leave existing interest groups as is.", 'yikes-inc-easy-mailchimp-extender' ); ?></small></p>
983
-
984
- </label></p>
985
-
986
- </div>
987
-
988
- </div>
989
- <!-- .inside -->
990
-
991
- <span class="spinner update-form-spinner"></span>
992
-
993
- <span class="form-buttons-container" id="major-publishing-actions">
994
- <?php
995
- echo submit_button( __( 'Update Form' ), 'primary', '', false, array( 'onclick' => 'jQuery(this).parent().prev().css({"display":"block","visibility":"inherit"});' ) );
996
- $url = esc_url_raw( add_query_arg( array( 'action' => 'yikes-easy-mc-delete-form', 'mailchimp-form' => $form['id'], 'nonce' => wp_create_nonce( 'delete-mailchimp-form-'.$form['id'] ) ), admin_url( 'admin.php?page=yikes-inc-easy-mailchimp' ) ) );
997
- echo '<a href="' . $url . '" class="yikes-delete-mailchimp-form" onclick="return confirm(\'' . __( "Are you sure you want to delete this form? This cannot be undone.", 'yikes-inc-easy-mailchimp-extender' ) . '\');">' . __( "Delete Form", 'yikes-inc-easy-mailchimp-extender' ) . '</a>';
998
- ?>
999
- </span>
1000
-
1001
- </div>
1002
- <!-- .postbox -->
1003
- <?php
1004
- // display info about Yikes
1005
- echo $this->generate_show_some_love_container();
1006
- ?>
1007
-
1008
- </div>
1009
- <!-- .meta-box-sortables -->
1010
- </div>
1011
- <!-- #postbox-container-1 .postbox-container -->
1012
- </div>
1013
- <!-- #post-body .metabox-holder .columns-2 -->
1014
- <br class="clear">
1015
- </form> <!-- END UPDATE FORM -->
1016
- </div>
1017
- <!-- #poststuff -->
1018
-
1019
- </div>
1
+ <div class="wrap">
2
+ <?php
3
+
4
+ // If an error was returned.
5
+ if ( isset( $_GET['sql_error'] ) ) {
6
+
7
+ if ( get_option( 'yikes-mailchimp-debug-status', '' ) === '1' ) {
8
+ wp_die( '<strong>' . __( 'Error Creating Form', 'yikes-inc-easy-mailchimp-extender' ) . '</strong> <p>' . stripslashes( urldecode( $_GET['sql_error'] ) ) . '</p>' . __( 'Error Creating Form', 'yikes-inc-easy-mailchimp-extender' ) );
9
+ } else {
10
+ wp_die( '<strong>' . __( 'Error Creating Form', 'yikes-inc-easy-mailchimp-extender' ) . '</strong><p>' . __( "Please try again. If the error persists please get in contact with the YIKES Inc. support team.", 'yikes-inc-easy-mailchimp-extender' ) . '</p>' );
11
+ }
12
+ }
13
+
14
+ // Get The Form ID.
15
+ if ( ! isset( $_GET['id'] ) ) {
16
+ wp_die( esc_html_e( 'Oh No!', 'yikes-inc-easy-mailchimp-extender' ), esc_html_e( 'Error', 'yikes-inc-easy-mailchimp-extender' ) );
17
+ }
18
+ $form_id = (int) filter_var( wp_unslash( $_GET['id'] ), FILTER_SANITIZE_NUMBER_INT );
19
+
20
+ // Get our form interface.
21
+ $form_interface = yikes_easy_mailchimp_extender_get_form_interface();
22
+ $form = $form_interface->get_form( $form_id );
23
+ $all_forms = $form_interface->get_all_forms();
24
+
25
+ // If the form was not found return an error.
26
+ if ( empty( $form ) ) {
27
+ wp_die(
28
+ printf(
29
+ /* translators: the placeholder is a link to the debug settings page. */
30
+ __( "Whoops! It looks like this form doesn't exist. If this error persists you may want to toggle on debugging on the $1%1s", 'yikes-inc-easy-mailchimp-extender' ),
31
+ '<a href="' . esc_url_raw( admin_url( 'admin.php?page=yikes-inc-easy-mailchimp-settings&section=debug-settings' ) ) . '">' . esc_html__( 'debug settings page', 'yikes-inc-easy-mailchimp-extender' ) . '</a>'
32
+ ),
33
+ esc_html__( 'Error', 'yikes-inc-easy-mailchimp-extender' )
34
+ );
35
+ }
36
+
37
+ // Set global form data, mainly for use in custom form field declarations or add-ons.
38
+ $GLOBALS['form_data'] = $form;
39
+ $custom_styles = $form['custom_styles'];
40
+ $optin_settings = $form['optin_settings'];
41
+ $submission_settings = $form['submission_settings'];
42
+ $error_messages = $form['error_messages'];
43
+
44
+ if ( isset( $form['form_settings'] ) ) {
45
+ $form_settings = $form['form_settings'];
46
+ }
47
+
48
+ // Get defaults if none are saved in the database yet.
49
+ if ( empty( $form_settings ) ) {
50
+ $form_settings = array(
51
+ 'yikes-easy-mc-form-class-names' => '',
52
+ 'yikes-easy-mc-inline-form' => '0',
53
+ 'yikes-easy-mc-submit-button-type' => 'text',
54
+ 'yikes-easy-mc-submit-button-text' => __( 'Submit', 'yikes-inc-easy-mailchimp-extender' ),
55
+ 'yikes-easy-mc-submit-button-image' => '',
56
+ 'yikes-easy-mc-submit-button-classes' => '',
57
+ 'yikes-easy-mc-form-schedule' => '0',
58
+ 'yikes-easy-mc-form-restriction-start' => strtotime( current_time( 'm/d/Y g:iA' ) ),
59
+ 'yikes-easy-mc-form-restriction-end' => strtotime( current_time( 'm/d/Y g:iA' ) ) + ( 3600 * 24 ),
60
+ /* translators: the placeholder is a datetime string */
61
+ 'yikes-easy-mc-form-restriction-pending-message' => sprintf( __( 'Signup is not yet open, and will be available on %s. Please come back then to signup.', 'yikes-inc-easy-mailchimp-extender' ), current_time( str_replace( '-', '/', get_option( 'date_format' ) ) ) . ' ' . __( 'at', 'yikes-inc-easy-mailchimp-extender' ) . ' ' . current_time( 'g:iA' ) ),
62
+ /* translators: the placeholder is a datetime string */
63
+ 'yikes-easy-mc-form-restriction-expired-message' => sprintf( __( 'The signup period for this form ended on %s.', 'yikes-inc-easy-mailchimp-extender' ), date( str_replace( '-', '/', get_option( 'date_format' ) ), strtotime( current_time( str_replace( '-', '/', get_option( 'date_format' ) ) ) ) + ( 3600 * 24 ) ) . ' ' . __( 'at', 'yikes-inc-easy-mailchimp-extender' ) . ' ' . date( 'g:iA', strtotime( current_time( 'g:iA' ) ) + ( 3600 * 24 ) ) ),
64
+ 'yikes-easy-mc-form-login-required' => '0',
65
+ 'yikes-easy-mc-form-restriction-login-message' => __( 'You need to be logged in to sign up for this mailing list.', 'yikes-inc-easy-mailchimp-extender' ),
66
+ );
67
+ }
68
+
69
+ // Set up our list_handler object.
70
+ $list_handler = yikes_get_mc_api_manager()->get_list_handler();
71
+ $list_data = $list_handler->get_lists();
72
+ if ( is_wp_error( $list_data ) ) {
73
+ $error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
74
+ $error_logging->maybe_write_to_log(
75
+ $list_data->get_error_code(),
76
+ __( 'Get Account Lists', 'yikes-inc-easy-mailchimp-extender' ),
77
+ 'Edit Form Page'
78
+ );
79
+ $list_data = array();
80
+ }
81
+
82
+ // Get the merge fields.
83
+ $available_merge_variables = $list_handler->get_merge_fields( $form['list_id'] );
84
+ if ( is_wp_error( $available_merge_variables ) ) {
85
+ $error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
86
+ $error_logging->maybe_write_to_log(
87
+ $available_merge_variables->get_error_code(),
88
+ __( 'Get Merge Variables', 'yikes-inc-easy-mailchimp-extender' ),
89
+ 'Edit Form Page'
90
+ );
91
+ $available_merge_variables = array();
92
+ }
93
+
94
+ // Get the interest groups.
95
+ $interest_groupings = $list_handler->get_interest_categories( $form['list_id'] );
96
+ if ( is_wp_error( $interest_groupings ) ) {
97
+ $error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
98
+ $error_logging->maybe_write_to_log(
99
+ $interest_groupings->get_error_code(),
100
+ __( 'Get Interest Groups', 'yikes-inc-easy-mailchimp-extender' ),
101
+ 'Edit Form Page'
102
+ );
103
+ $interest_groupings = array();
104
+ }
105
+
106
+ // Get the tags.
107
+ $tags = $list_handler->get_segments( $form['list_id'], 'static' );
108
+ if ( is_wp_error( $tags ) ) {
109
+ $error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
110
+ $error_logging->maybe_write_to_log(
111
+ $tags->get_error_code(),
112
+ __( 'Get Tags', 'yikes-inc-easy-mailchimp-extender' ),
113
+ 'Edit Form Page'
114
+ );
115
+ $tags = array();
116
+ }
117
+
118
+ // Update Form URL.
119
+ $url = add_query_arg(
120
+ array(
121
+ 'action' => 'yikes-easy-mc-update-form',
122
+ 'nonce' => wp_create_nonce( 'update-mailchimp-form-' . $form['id'] ),
123
+ )
124
+ );
125
+ ?>
126
+ <!-- Freddie Logo -->
127
+ <img src="<?php echo esc_url( YIKES_MC_URL . 'includes/images/Mailchimp_Assets/Freddie_60px.png' ); ?>" alt="<?php esc_attr_e( 'Freddie - Mailchimp Mascot', 'yikes-inc-easy-mailchimp-extender' ); ?>" class="yikes-mc-freddie-logo" />
128
+
129
+ <?php /* translators: the placeholder is the form's name */ ?>
130
+ <h1>YIKES Easy Forms for Mailchimp | <?php echo sprintf( esc_html__( 'Edit %1s', 'yikes-inc-easy-mailchimp-extender' ), esc_html( $form['form_name'] ) ); ?></h1>
131
+
132
+ <!-- Settings Page Description -->
133
+ <p class="yikes-easy-mc-about-text about-text"><?php esc_html_e( 'Update this Mailchimp form\'s fields, styles and settings below.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
134
+
135
+ <?php
136
+ if ( isset( $_REQUEST['updated-form'] ) && filter_var( $_REQUEST['updated-form'], FILTER_SANITIZE_STRING ) === 'true' ) {
137
+ ?>
138
+ <div class="updated manage-form-admin-notice">
139
+ <p><?php esc_html_e( 'Opt-in form successfully updated.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
140
+ </div>
141
+ <?php
142
+ }
143
+
144
+ // Hooks to allow extensions to display notices.
145
+ do_action( 'yikes-mailchimp-edit-form-notice' );
146
+ ?>
147
+
148
+ <div id="poststuff">
149
+ <form id="edit-yikes-mc-form" method="POST" action="<?php echo esc_url( $url ); ?>">
150
+ <div id="post-body" class="metabox-holder columns-2">
151
+ <div id="post-body-content">
152
+ <div class="meta-box-sortables ui-sortable">
153
+ <div class="postbox yikes-easy-mc-postbox">
154
+ <div class="inside">
155
+
156
+ <label for="form-name">
157
+ <h3 class="bg-transparent"><?php esc_html_e( 'Form Name', 'yikes-inc-easy-mailchimp-extender' ); ?></h3>
158
+ <input autocomplete="disabled" id="form-name" name="form-name" type="text" value="<?php echo esc_html( stripslashes( $form['form_name'] ) ); ?>" class="widefat" />
159
+ <p class="description"><?php esc_html_e( 'The title of this signup form.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
160
+ </label>
161
+
162
+ <label for="form-description">
163
+ <h3 class="bg-transparent"><?php esc_html_e( 'Form Description', 'yikes-inc-easy-mailchimp-extender' ); ?></h3>
164
+ <textarea name="form-description" id="form-description" class="large-text edit-form-form-description"><?php echo isset( $form['form_description'] ) ? esc_textarea( stripslashes( $form['form_description'] ) ) : ''; ?></textarea>
165
+ <p class="description"><?php esc_html_e( 'Descriptions are optional and you may choose to display it to visitors to your site.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
166
+ <p class="description"><?php printf( esc_html_e( 'To display the number of subscribers for the list associated with this form, use %s in the form description field above.', 'yikes-inc-easy-mailchimp-extender' ), '<code>[yikes-mailchimp-subscriber-count]</code>' ); ?><p>
167
+ </label>
168
+
169
+ </div>
170
+ <!-- .inside -->
171
+ </div>
172
+ <!-- .postbox -->
173
+ </div>
174
+ <!-- .meta-box-sortables .ui-sortable -->
175
+
176
+ <!-- TOOLBAR -->
177
+ <div id="yikes_easy_mc_toolbar">
178
+
179
+ <ul id="yikes_easy_mc_toolbar_links">
180
+ <li class="hidden_setting_list">
181
+ <a class="hidden_setting form-builder selected_hidden_setting" data-attr-container="form-builder" onclick="return false;" title="<?php esc_attr_e( 'Customize Form Fields', 'yikes-inc-easy-mailchimp-extender' ); ?>" href="#"> <?php _e( 'Form Builder', 'yikes-inc-easy-mailchimp-extender' ); ?></a>
182
+ <div class="selected_setting_triangle"></div>
183
+ </li>
184
+ <li class="hidden_setting_list">
185
+ <a class="hidden_setting form-settings" onclick="return false;" data-attr-container="form-settings" title="<?php esc_attr_e( 'Form Settings', 'yikes-inc-easy-mailchimp-extender' ); ?>" href="#"> <?php _e( 'Form Settings', 'yikes-inc-easy-mailchimp-extender' ); ?></a>
186
+ </li>
187
+ <li class="hidden_setting_list">
188
+ <a class="hidden_setting error-messages" onclick="return false;" data-attr-container="error-messages" title="<?php esc_attr_e( 'Customize Form Messages', 'yikes-inc-easy-mailchimp-extender' ); ?>" href="#"> <?php _e( 'Custom Messages', 'yikes-inc-easy-mailchimp-extender' ); ?></a>
189
+ </li>
190
+ <?php do_action( 'yikes-mailchimp-edit-form-section-links', $form ); ?>
191
+ </ul>
192
+
193
+ </div>
194
+ <!-- END TOOLBAR -->
195
+
196
+ <div class="meta-box-sortables ui-sortable" id="hidden-option-data-container">
197
+ <div class="postbox yikes-easy-mc-postbox">
198
+
199
+ <div class="inside">
200
+
201
+ <!-- Form Builder Label -->
202
+ <label for="form" class="hidden-setting-label" id="form-builder">
203
+
204
+ <div id="poststuff">
205
+ <div id="post-body" class="metabox-holder columns-2">
206
+ <!-- main content -->
207
+ <div id="post-body-content">
208
+ <div class="meta-box-sortables ui-sortable">
209
+ <div class="postbox yikes-easy-mc-postbox">
210
+ <!-- container title -->
211
+ <h3 class="edit-form-title" id="form-builder-div" data-form-id="<?php echo esc_attr( $form['id'] ); ?>" data-list-id="<?php echo esc_attr( $form['list_id'] ); ?>" ><?php _e( 'Form Builder', 'yikes-inc-easy-mailchimp-extender' ); ?></h3>
212
+ <div class="tags-title" style="display: none;">
213
+ <span class="tags-title-text">Tags</span>
214
+ <div class="tags-title-container"></div>
215
+ </div>
216
+ <p id="edit-form-description" class="description edit-form-description-form-builder"><?php _e( 'Click a field to show its advanced options or drag fields to re-arrange them. Click <span class="dashicons dashicons-edit"></span> to edit a field label. Make sure you hit "Update Form" to save all of your changes.', 'yikes-inc-easy-mailchimp-extender' );?></p>
217
+ <div id="form-builder-container" class="inside">
218
+ <!-- #poststuff -->
219
+ <?php echo $this->generate_form_editor( $form['fields'], $form['list_id'], $available_merge_variables, isset( $interest_groupings ) ? $interest_groupings : array() ); ?>
220
+ </div>
221
+
222
+ <!-- Bulk Delete Form Fields -->
223
+ <a href="#" class="clear-form-fields" <?php if( isset( $form['fields'] ) && count( $form['fields'] ) <= 0 ) { ?> style="display:none;" <?php } ?>><?php _e( 'Clear Form Fields', 'yikes-inc-easy-mailchimp-extender' ); ?></a>
224
+
225
+ <?php
226
+ $display_none = ( isset( $form['fields'] ) && count( $form['fields'] ) <= 0 ) ? 'display:none;' : '';
227
+ ?>
228
+
229
+ <!-- Save Fields Button -->
230
+ <?php submit_button( __( 'Update Form' ), 'primary', '', false, array( 'onclick' => '', 'style' => 'float:right;margin-right:12px;'.$display_none ) ); ?>
231
+
232
+ <!-- .inside -->
233
+ </div>
234
+ <!-- .postbox -->
235
+ </div>
236
+ <!-- .meta-box-sortables .ui-sortable -->
237
+ </div>
238
+ <!-- post-body-content -->
239
+ <!-- sidebar -->
240
+ <div id="postbox-container-1" class="postbox-container">
241
+ <div class="meta-box-sortables">
242
+ <div class="postbox yikes-easy-mc-postbox">
243
+ <h3 class="edit-form-title"><span><?php esc_html_e( "Form Fields, Interest Groups, & Tags", 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
244
+ <div class="inside">
245
+
246
+ <h3 class="nav-tab-wrapper mv_ig_list">
247
+ <a href="#" class="nav-tab nav-tab-active" id="nav-tab-merge-variables" alt="<?php esc_attr_e( 'Merge Variables', 'yikes-inc-easy-mailchimp-extender' ); ?>">
248
+ <div class="arrow-down"></div><?php esc_html_e( 'Form Fields', 'yikes-inc-easy-mailchimp-extender' ); ?>
249
+ </a>
250
+ <?php if ( ! isset( $merge_variable_error ) ) { ?>
251
+ <a href="#" class="nav-tab" id="nav-tab-interest-groups"><?php esc_html_e( 'Interest Groups', 'yikes-inc-easy-mailchimp-extender' ); ?></a>
252
+ <?php } else { ?>
253
+ <a href="#" class="nav-tab no-interest-groups-found-message" id="nav-tab-interest-groups" disabled="disabled" title="<?php esc_attr_e( "No Interest Groups Exist", 'yikes-inc-easy-mailchimp-extender' ); ?>"><?php esc_html_e( 'Interest Groups', 'yikes-inc-easy-mailchimp-extender' ); ?></a>
254
+ <?php } ?>
255
+ <a href="#" class="nav-tab" id="nav-tab-tags" alt="<?php esc_attr_e( 'Tags', 'yikes-inc-easy-mailchimp-extender' ); ?>"><?php esc_html_e( 'Tags', 'yikes-inc-easy-mailchimp-extender' ); ?></a>
256
+ </h3>
257
+
258
+ <div id="container-container">
259
+
260
+ <div id="merge-variables-container" class="list-container">
261
+ <?php
262
+ if ( ! isset( $merge_variable_error ) ) {
263
+ echo '<p class="description">' . __( "Select the fields below to add to the form builder.", 'yikes-inc-easy-mailchimp-extender' ) . '</p>';
264
+ $this->build_available_merge_vars( $form['fields'], $available_merge_variables );
265
+ } else {
266
+ echo $merge_variable_error;
267
+ }
268
+ ?>
269
+ </div>
270
+
271
+ <div id="interest-groups-container" class="list-container">
272
+ <?php
273
+ if ( isset( $interest_groupings ) && ! isset( $interest_groupings['error'] ) ) {
274
+ echo '<p class="description">' . __( "Select an interest group below to add to the form builder.", 'yikes-inc-easy-mailchimp-extender' ) . '</p>';
275
+ $this->build_available_interest_groups( $form['fields'], $interest_groupings, $form['list_id'] );
276
+ } else {
277
+ echo '<p class="description">' . $interest_groupings['error'] . '</p>';
278
+ }
279
+ ?>
280
+ </div>
281
+
282
+ <div id="tags-container" class="list-container">
283
+ <?php
284
+ if ( isset( $tags ) && ! isset( $tags['error'] ) ) {
285
+ echo '<p class="description">' . __( "Select a tag to add to the form builder. Selected tags will be added to all subscribers of this form.", 'yikes-inc-easy-mailchimp-extender' ) . '</p>';
286
+ echo '<p id="yikes-tags-error-message" class="hidden"><strong>' . __( 'Warning: due to limitations in Mailchimp\'s API, tags are not currently supported for double opt-in signups.', 'yikes-inc-easy-mailchimp-extender' ) . '</strong></p>';
287
+ $this->build_available_tags( isset( $form['tags'] ) ? $form['tags'] : array(), $tags, $form['list_id'] );
288
+ } else {
289
+ echo '<p class="description">' . $interest_groupings['error'] . '</p>';
290
+ }
291
+ ?>
292
+ </div>
293
+
294
+ </div>
295
+
296
+ </div>
297
+ <!-- .inside -->
298
+ </div>
299
+
300
+ <!-- .postbox -->
301
+ </div>
302
+ <!-- .meta-box-sortables -->
303
+ </div>
304
+ <!-- #postbox-container-1 .postbox-container -->
305
+ </div>
306
+ <!-- #post-body .metabox-holder .columns-2 -->
307
+ <br class="clear">
308
+ </div>
309
+
310
+ </label>
311
+ <!-- End Form Builder Label -->
312
+
313
+ <!-- Form Settings Customizations -->
314
+ <label class="hidden-setting-label yikes-easy-mc-hidden" for="form" id="form-settings">
315
+
316
+ <div id="poststuff">
317
+ <div id="post-body" class="metabox-holder columns-2">
318
+ <!-- main content -->
319
+ <div id="post-body-content">
320
+ <div class="meta-box-sortables ui-sortable">
321
+ <div class="postbox yikes-easy-mc-postbox">
322
+ <h3 class="edit-form-title"><span><?php _e( "Additional Form Settings", 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
323
+
324
+ <div class="inside form-settings-container">
325
+
326
+ <p class="edit-form-description"><?php _e( "Adjust some additional form settings below.", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
327
+
328
+ <!-- begin form classes section -->
329
+ <strong class="section-title first"><?php _e( 'Overall Form Classes', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
330
+ <section class="section-interior">
331
+
332
+ <!-- form classes -->
333
+ <label for="yikes-easy-mc-form-class-names"><strong><?php _e( 'Form Classes', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
334
+ <input type="text" class="widefat" name="yikes-easy-mc-form-class-names" id="yikes-easy-mc-form-class-names" value="<?php echo $form_settings['yikes-easy-mc-form-class-names']; ?>" placeholder="<?php _e( 'Add additional classes to this opt-in form.', 'yikes-inc-easy-mailchimp-extender' ); ?>" >
335
+ <p class="description"><?php printf( __( 'Add additional class names to the %s element.', 'yikes-inc-easy-mailchimp-extender' ), '<code>' . htmlentities( '<form>' ) . '</code>' ); ?></p>
336
+ </label>
337
+
338
+ </section>
339
+ <!-- end form classes section -->
340
+
341
+ <!-- begin form layout section -->
342
+ <strong class="section-title"><?php _e( 'Form Layout', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
343
+ <section class="section-interior">
344
+
345
+ <!-- setup the checked state here -->
346
+ <!-- inline form -->
347
+ <strong><?php _e( 'Inline Form', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
348
+ <label class="inline-form-label">
349
+ <input type="radio" name="yikes-easy-mc-inline-form[]" value="1" <?php checked( $form_settings['yikes-easy-mc-inline-form'], '1' ); ?>/><?php _e( 'Enable', 'yikes-inc-easy-mailchimp-extender' ); ?>
350
+ </label>
351
+ <label class="inline-form-label">
352
+ <input type="radio" name="yikes-easy-mc-inline-form[]" value="0" <?php checked( $form_settings['yikes-easy-mc-inline-form'], '0' ); ?> /><?php _e( 'Disable', 'yikes-inc-easy-mailchimp-extender' ); ?>
353
+ </label>
354
+ <p class="description"><?php _e( 'Programatically setup this form so that all fields are on the same line.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
355
+ <p class="description"><?php printf( __( 'If you are having issues with your theme not displaying the inline form properly, please see the following %s.', 'yikes-inc-easy-mailchimp-extender' ), '<a href="https://yikesplugins.com/support/knowledge-base/my-form-fields-are-not-fully-inline-after-enabling-the-inline-form-option-how-come/" target="_blank">' . __( 'knowledge base article', 'yikes-inc-easy-mailchimp-extender' ) . '</a>' ); ?></p>
356
+
357
+ </section>
358
+ <!-- end form layout section -->
359
+
360
+ <!-- begin submit button section -->
361
+ <strong class="section-title"><?php _e( 'Submit Button', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
362
+ <section class="section-interior">
363
+
364
+ <!-- Submit button type -->
365
+ <strong><?php _e( 'Submit Button Type', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
366
+ <label class="inline-form-label">
367
+ <input type="radio" onclick="toggle_nested_section( jQuery(this) );" name="yikes-easy-mc-submit-button-type[]" value="text" <?php checked( $form_settings['yikes-easy-mc-submit-button-type'], 'text' ); ?> /><?php _e( 'Text', 'yikes-inc-easy-mailchimp-extender' ); ?>
368
+ </label>
369
+ <label class="inline-form-label">
370
+ <input type="radio" onclick="toggle_nested_section( jQuery(this) );" name="yikes-easy-mc-submit-button-type[]" value="image" <?php checked( $form_settings['yikes-easy-mc-submit-button-type'], 'image' ); ?> /><?php _e( 'Image', 'yikes-inc-easy-mailchimp-extender' ); ?>
371
+ </label>
372
+ <p class="description"><?php _e( 'Select the submit button type for this form.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
373
+ <!-- end submit button type -->
374
+
375
+ <!-- Text submit button type -->
376
+ <section class="submit-button-type-text nested-child<?php if( $form_settings['yikes-easy-mc-submit-button-type'] == 'image' ) { echo ' hidden'; } ?>">
377
+ <!-- submit button text -->
378
+ <label for="yikes-easy-mc-submit-button-text"><strong><?php _e( 'Submit Button Text', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
379
+ <input type="text" class="widefat" name="yikes-easy-mc-submit-button-text" id="yikes-easy-mc-submit-button-text" value="<?php echo $form_settings['yikes-easy-mc-submit-button-text']; ?>" placeholder="<?php _e( 'Submit', 'yikes-inc-easy-mailchimp-extender' ); ?>">
380
+ <p class="description"><?php printf( __( 'Set the submit button text. Leaving this blank will default to %s.', 'yikes-inc-easy-mailchimp-extender' ), '"' . __( 'Submit', 'yikes-inc-easy-mailchimp-extender' ) . '"' ); ?></p>
381
+
382
+ <p class="description"><?php _e( 'The submit button text set above, can be overwritten on a per-form basis using shortcodes.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
383
+ </label>
384
+ </section>
385
+ <!-- end text submit button type -->
386
+
387
+ <!-- Image submit button type -->
388
+ <section class="submit-button-type-image nested-child<?php if( $form_settings['yikes-easy-mc-submit-button-type'] == 'text' ) { echo ' hidden'; } ?>">
389
+ <label for="yikes-easy-mc-submit-button-image"><strong><?php _e( 'Submit Button URL', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
390
+ <input type="text" class="widefat" name="yikes-easy-mc-submit-button-image" id="yikes-easy-mc-submit-button-image" value="<?php echo $form_settings['yikes-easy-mc-submit-button-image']; ?>" placeholder="<?php _e( 'http://', 'yikes-inc-easy-mailchimp-extender' ); ?>">
391
+ <p class="description"><?php _e( 'Enter the URL of an image you would like to use as the submit button for this form.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
392
+ </label>
393
+ </section>
394
+ <!-- end image submit button type -->
395
+
396
+
397
+ <!-- submit button classes -->
398
+ <label for="yikes-easy-mc-form-submit-button-classes"><strong style="float:left;"><?php _e( 'Submit Button Classes', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
399
+ <input type="text" class="widefat" name="yikes-easy-mc-submit-button-classes" id="yikes-easy-mc-submit-button-classes" value="<?php echo $form_settings['yikes-easy-mc-submit-button-classes']; ?>" placeholder="<?php _e( 'Add additional classes to this submit button.', 'yikes-inc-easy-mailchimp-extender' ); ?>" >
400
+ <p class="description"><?php _e( 'Add custom classes to the submit button.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
401
+ </label>
402
+ <!-- end submit button classes -->
403
+
404
+ </section>
405
+ <!-- end submit button section -->
406
+
407
+ <!-- begin restrictions section -->
408
+ <strong class="section-title"><?php _e( 'Form Restrictions', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
409
+ <section class="section-interior">
410
+ <!-- Schedule form -->
411
+ <label class="inline-form-label">
412
+ <input type="checkbox" onclick="toggle_nested_section( jQuery(this) );" name="yikes-easy-mc-form-schedule" value="1" <?php checked( $form_settings['yikes-easy-mc-form-schedule'], '1' ); ?>/><?php _e( 'Schedule Form', 'yikes-inc-easy-mailchimp-extender' ); ?>
413
+ </label>
414
+ <p class="description" style="margin-bottom:0;"><?php _e( 'Set a time period that this form should be active on your site. (mm/dd/yyyy)', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
415
+ <p class="description" style="margin: 0 0 .5em 0;"><?php _e( 'Once the end date & time have passed, users will no longer be able to signup for your mailing list.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
416
+ <!-- Start Date Limitation Nested -->
417
+ <section class="date-restriction-section nested-child<?php if( $form_settings['yikes-easy-mc-form-schedule'] == '0' ) { echo ' hidden'; } ?>">
418
+ <!-- Start Date -->
419
+ <label for="yikes-easy-mc-form-restriction-start-date"><strong><?php _e( 'Start Date', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
420
+ <input type="text" class="date-picker" name="yikes-easy-mc-form-restriction-start-date" id="yikes-easy-mc-form-restriction-start-date" value="<?php echo ! empty($form_settings['yikes-easy-mc-form-restriction-start'] ) ? date( $this->yikes_jQuery_datepicker_date_format( get_option( 'date_format' ) ), $form_settings['yikes-easy-mc-form-restriction-start'] ) : ''; ?>" >
421
+ <?php _e( 'at', 'yikes-inc-easy-mailchimp-extender' ); ?>
422
+ </label>
423
+
424
+ <!-- Start Time -->
425
+ <label for="yikes-easy-mc-form-restriction-start-time"><strong><?php _e( 'Start Time', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
426
+ <input type="text" class="time-picker" name="yikes-easy-mc-form-restriction-start-time" id="yikes-easy-mc-form-restriction-start-time" value="<?php echo ! empty( $form_settings['yikes-easy-mc-form-restriction-start'] ) ? date( 'g:iA', $form_settings['yikes-easy-mc-form-restriction-start'] ) : ''; ?>" >
427
+ </label>
428
+ <p class="description"><?php _e( 'Set the dates that this form should display on your site.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
429
+ </section>
430
+ <!-- end Start Date Limitation Nested -->
431
+
432
+ <!-- End Date Limitation Nested -->
433
+ <section class="date-restriction-section nested-child<?php if( $form_settings['yikes-easy-mc-form-schedule'] == '0' ) { echo ' hidden'; } ?> last">
434
+ <!-- End Date -->
435
+ <label for="yikes-easy-mc-form-restriction-end-date"><strong><?php _e( 'End Date', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
436
+ <input type="text" class="date-picker" name="yikes-easy-mc-form-restriction-end-date" id="yikes-easy-mc-form-restriction-end-date" value="<?php echo ! empty( $form_settings['yikes-easy-mc-form-restriction-end'] ) ? date( $this->yikes_jQuery_datepicker_date_format( get_option( 'date_format' ) ), $form_settings['yikes-easy-mc-form-restriction-end'] ) : ''; ?>" >
437
+ <?php _e( 'at', 'yikes-inc-easy-mailchimp-extender' ); ?>
438
+ </label>
439
+
440
+ <!-- End Time -->
441
+ <label for="yikes-easy-mc-form-restriction-end-time"><strong><?php _e( 'End Time', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
442
+ <input type="text" class="time-picker" name="yikes-easy-mc-form-restriction-end-time" id="yikes-easy-mc-form-restriction-end-time" value="<?php echo ! empty( $form_settings['yikes-easy-mc-form-restriction-end'] ) ? date( 'g:iA', $form_settings['yikes-easy-mc-form-restriction-end'] ) : ''; ?>" >
443
+ </label>
444
+ <p class="description"><?php _e( 'Set the dates that this form should no longer display on your site.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
445
+
446
+ <!-- Form pending message -->
447
+ <label for="yikes-easy-mc-form-restriction-pending-message"><strong><?php _e( 'Pending Message', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
448
+ <?php
449
+ wp_editor(
450
+ $form_settings['yikes-easy-mc-form-restriction-pending-message'],
451
+ 'yikes-easy-mc-form-restriction-pending-message',
452
+ array(
453
+ 'editor_class' => 'yikes-easy-mc-form-restriction-pending-message',
454
+ 'editor_css' => '<style>.yikes-easy-mc-form-restriction-pending-message{ max-height: 150px; }</style>'
455
+ )
456
+ );
457
+ ?>
458
+ </label>
459
+ <p class="description"><?php _e( 'Set the message that should display prior to the form being active.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
460
+
461
+ <!-- form expired message -->
462
+ <label for="yikes-easy-mc-form-restriction-expired-message"><strong><?php _e( 'Expired Message', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
463
+ <?php
464
+ wp_editor(
465
+ $form_settings['yikes-easy-mc-form-restriction-expired-message'],
466
+ 'yikes-easy-mc-form-restriction-expired-message',
467
+ array(
468
+ 'editor_class' => 'yikes-easy-mc-form-restriction-expired-message',
469
+ 'editor_css' => '<style>.yikes-easy-mc-form-restriction-expired-message{ max-height: 150px; }</style>'
470
+ )
471
+ );
472
+ ?>
473
+ </label>
474
+ <p class="description"><?php _e( 'Set the message that should display once the end date has passed for this form.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
475
+ </section>
476
+ <!-- end End Date Limitation Nested -->
477
+
478
+ <!-- Require Users to be Logged In -->
479
+ <label class="inline-form-label">
480
+ <input type="checkbox" onclick="toggle_nested_section( jQuery(this) );" name="yikes-easy-mc-form-login-required" value="1" <?php checked( $form_settings['yikes-easy-mc-form-login-required'], '1' ); ?> /><?php _e( 'Require Login', 'yikes-inc-easy-mailchimp-extender' ); ?>
481
+ </label>
482
+ <p class="description"><?php _e( 'Require users to be logged in before they can view and submit this opt-in form.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
483
+
484
+ <!-- Require Login Message -->
485
+ <section class="login-restriction-section nested-child<?php if( $form_settings['yikes-easy-mc-form-login-required'] == '0' ) { echo ' hidden'; } ?>">
486
+ <label for="yikes-easy-mc-form-restriction-login-message"><strong><?php _e( 'Required Login Message', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
487
+ <?php
488
+ wp_editor(
489
+ $form_settings['yikes-easy-mc-form-restriction-login-message'],
490
+ 'yikes-easy-mc-form-restriction-login-message',
491
+ array(
492
+ 'editor_class' => 'yikes-easy-mc-form-restriction-login-message',
493
+ 'editor_css' => '<style>.yikes-easy-mc-form-restriction-login-message{ max-height: 150px; }</style>'
494
+ )
495
+ );
496
+ ?>
497
+ </label>
498
+ <p class="description"><?php _e( 'Set the message that non-logged in users should see when viewing this form.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
499
+ <p class="description"><?php printf( __( 'To display a login form, use %s', 'yikes-inc-easy-mailchimp-extender' ), '<code>[login-form]</code>' ); ?></p>
500
+ </section>
501
+
502
+ </section>
503
+ <!-- end restrictions section -->
504
+
505
+ </div>
506
+
507
+ <!-- .inside -->
508
+ </div>
509
+ <!-- .postbox -->
510
+ </div>
511
+ <!-- .meta-box-sortables .ui-sortable -->
512
+ </div>
513
+ <!-- post-body-content -->
514
+ <!-- sidebar -->
515
+ <div id="postbox-container-1" class="postbox-container">
516
+ <div class="meta-box-sortables">
517
+ <div class="postbox yikes-easy-mc-postbox">
518
+ <h3 class="edit-form-title"><span><?php _e( "Form Settings Explained", 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
519
+ <div class="inside">
520
+
521
+ <ul>
522
+ <li><strong><?php _e( 'Classes', 'yikes-inc-easy-mailchimp-extender' ); ?></strong> : <?php _e( 'Add additional classes to this form, allowing you to target it more easily for customization via CSS.', 'yikes-inc-easy-mailchimp-extender' ); ?></li>
523
+ <li><strong><?php _e( 'Form Layout', 'yikes-inc-easy-mailchimp-extender' ); ?></strong> : <?php _e( 'Toggle the layout of this form between single column and an inline layout. The inline layout places all of your form fields and the submit button on a single line.', 'yikes-inc-easy-mailchimp-extender' ); ?></li>
524
+ <li><strong><?php _e( 'Submit Button', 'yikes-inc-easy-mailchimp-extender' ); ?></strong> : <?php _e( 'Adjust setting specific to the submit button. Change the submit button text, or set it to a specified image. Use the "Submit Button Classes" to assign additional classes to your submit button - ensuring it fits better into your theme.', 'yikes-inc-easy-mailchimp-extender' ); ?></li>
525
+ <li><strong><?php _e( 'Form Restrictions', 'yikes-inc-easy-mailchimp-extender' ); ?></strong> : <?php _e( 'Adjust the restrictions for this form. Limit form visibility to a given time period, require users to be logged in to sign up or combine the two!', 'yikes-inc-easy-mailchimp-extender' ); ?></li>
526
+ </ul>
527
+
528
+ </div>
529
+ <!-- .inside -->
530
+ </div>
531
+ <!-- .postbox -->
532
+ </div>
533
+ <!-- .meta-box-sortables -->
534
+ </div>
535
+ <!-- #postbox-container-1 .postbox-container -->
536
+ </div>
537
+ <!-- #post-body .metabox-holder .columns-2 -->
538
+ <br class="clear">
539
+ </div>
540
+
541
+ </label>
542
+ <!-- End Form Settings Customizations -->
543
+
544
+ <!-- Error Messages -->
545
+ <label class="hidden-setting-label yikes-easy-mc-hidden" for="form" id="error-messages">
546
+
547
+ <div id="poststuff">
548
+ <div id="post-body" class="metabox-holder columns-2">
549
+ <!-- main content -->
550
+ <div id="post-body-content">
551
+ <div class="meta-box-sortables ui-sortable">
552
+ <div class="postbox yikes-easy-mc-postbox">
553
+ <h3 class="edit-form-title"><span><?php _e( "Custom Messages", 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
554
+
555
+ <div class="inside error-message-container">
556
+ <?php
557
+ // build our default options
558
+ $error_message_array = array(
559
+ 'success' => __( 'Thank You for subscribing! Check your email for the confirmation message.', 'yikes-inc-easy-mailchimp-extender' ),
560
+ 'success-single-optin' => __( 'Thank you for subscribing!', 'yikes-inc-easy-mailchimp-extender' ),
561
+ 'success-resubscribed' => __( 'Thank you for already being a subscriber! Your profile info has been updated.', 'yikes-inc-easy-mailchimp-extender' ),
562
+ 'general-error' => __( "Whoops! It looks like something went wrong. Please try again.", 'yikes-inc-easy-mailchimp-extender' ),
563
+ 'email-exists-error' => __( "The email you entered is already a subscriber to this list.", 'yikes-inc-easy-mailchimp-extender' ),
564
+ 'update-link' => __( "You're already subscribed. To update your Mailchimp profile, please [link]click to send yourself an update link[/link].", 'yikes-inc-easy-mailchimp-extender' ),
565
+ 'email-subject' => __( 'Mailchimp Profile Update', 'yikes-inc-easy-mailchimp-extender' ),
566
+ 'update-email-success' => sprintf( __( '%s Update email successfully sent. Please check your inbox for the message.', 'yikes-inc-easy-mailchimp-extender' ), '&#10004;' ),
567
+ 'update-email-failure' => sprintf( __( '%s Email failed to send. Please contact the site administrator.', 'yikes-inc-easy-mailchimp-extender' ), '&#10005;' ),
568
+
569
+ );
570
+ $global_error_messages = get_option( 'yikes-easy-mc-global-error-messages', $error_message_array );
571
+ ?>
572
+ <p class="edit-form-description"><?php _e( "Customize the response messages for this form. Leave the field blank to use the default message. The messages shown below depend on the Opt-in Settings chosen.", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
573
+
574
+ <!-- Success Message (refactored @ 6.3.0 for double optin) -->
575
+ <label for="yikes-easy-mc-success-message"><strong><?php _e( 'Success: Double opt-in', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
576
+ <input type="text" class="widefat" name="yikes-easy-mc-success-message" id="yikes-easy-mc-success-message" value="<?php echo isset( $error_messages['success'] ) ? stripslashes( esc_html( $error_messages['success'] ) ) : ''; ?>" placeholder="<?php echo $global_error_messages['success']; ?>" >
577
+ </label>
578
+ <!-- Success Message (for single optin) -->
579
+ <label for="yikes-easy-mc-success-single-optin-message"><strong><?php _e( 'Success: Single opt-in', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
580
+ <input type="text" class="widefat" name="yikes-easy-mc-success-single-optin-message" id="yikes-easy-mc-success-single-optin-message" value="<?php echo isset( $error_messages['success-single-optin'] ) ? stripslashes( esc_html( $error_messages['success-single-optin'] ) ) : ''; ?>" placeholder="<?php echo $global_error_messages['success-single-optin']; ?>" >
581
+ </label>
582
+ <!-- Resubscribing users when updating your profile via the form is allowed -->
583
+ <label for="yikes-easy-mc-user-resubscribed-success-message"><strong><?php _e( 'Success: Re-subscriber', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
584
+ <input type="text" class="widefat" name="yikes-easy-mc-user-resubscribed-success-message" id="yikes-easy-mc-user-resubscribed-success-message" value="<?php echo isset( $error_messages['success-resubscribed'] ) ? stripslashes( esc_html( $error_messages['success-resubscribed'] ) ) : ''; ?>" placeholder="<?php echo $global_error_messages['success-resubscribed']; ?>">
585
+ </label>
586
+
587
+ <!-- Click the link to update user profile etc. etc. -->
588
+ <label for="yikes-easy-mc-user-subscribed-update-link"><strong><?php _e( 'Success: Re-subscriber with link to email profile update message', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
589
+ <input type="text" class="widefat" name="yikes-easy-mc-user-update-link" id="yikes-easy-mc-user-update-link" value="<?php echo isset( $error_messages['update-link'] ) ? stripslashes( esc_html( $error_messages['update-link'] ) ) : ''; ?>" placeholder="<?php echo $global_error_messages['update-link']; ?>">
590
+ </label>
591
+
592
+ <!-- Email Address is already subscribed -->
593
+ <label for="yikes-easy-mc-user-subscribed-message"><strong><?php _e( 'Error: Re-subscribers not permitted', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
594
+ <input type="text" class="widefat" name="yikes-easy-mc-user-subscribed-message" id="yikes-easy-mc-user-subscribed-message" value="<?php echo isset( $error_messages['already-subscribed'] ) ? stripslashes( esc_html( $error_messages['already-subscribed'] ) ) : ''; ?>" placeholder="<?php echo $global_error_messages['email-exists-error']; ?>">
595
+ </label>
596
+
597
+ <!-- Update email successfully sent -->
598
+ <label for="yikes-easy-mc-update-email-successful"><strong><?php _e( 'Success: Update email successfully sent', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
599
+ <input type="text" class="widefat" name="yikes-easy-mc-update-email-successful" id="yikes-easy-mc-update-email-successful" value="<?php echo isset( $error_messages['update-email-success'] ) ? stripslashes( esc_attr( $error_messages['update-email-success'] ) ) : ''; ?>" placeholder="<?php echo $global_error_messages['update-email-success']; ?>" >
600
+ </label>
601
+
602
+ <!-- Update email failed to send -->
603
+ <label for="yikes-easy-mc-update-email-failure"><strong><?php _e( 'Error: Update email failed to send', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
604
+ <input type="text" class="widefat" name="yikes-easy-mc-update-email-failure" id="yikes-easy-mc-update-email-failure" value="<?php echo isset( $error_messages['update-email-failure'] ) ? stripslashes( esc_attr( $error_messages['update-email-failure'] ) ) : ''; ?>" placeholder="<?php echo $global_error_messages['update-email-failure']; ?>" >
605
+ </label>
606
+
607
+ <!-- General Error Message -->
608
+ <label for="yikes-easy-mc-general-error-message"><strong><?php _e( 'Error: General', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
609
+ <input type="text" class="widefat" name="yikes-easy-mc-general-error-message" id="yikes-easy-mc-general-error-message" value="<?php echo isset( $error_messages['general-error'] ) ? stripslashes( esc_html( $error_messages['general-error'] ) ) : ''; ?>" placeholder="<?php echo $global_error_messages['general-error']; ?>" >
610
+ </label>
611
+
612
+ <!-- Email Section -->
613
+
614
+ <hr>
615
+ <div class="yikes-easy-mc-custom-messages-email-section">
616
+ <p class="edit-form-description"><?php _e( 'Customize the profile verification email sent to re-subscribers. Leave the text unedited to use the default message.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
617
+ <!-- Email Subject -->
618
+ <label for="yikes-easy-mc-user-email-subject"><strong><?php _e( 'Email Subject', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
619
+ <input type="text" class="widefat" name="yikes-easy-mc-user-email-subject" id="yikes-easy-mc-user-email-subject" value="<?php echo isset( $error_messages['email-subject'] ) ? stripslashes( esc_html( $error_messages['email-subject'] ) ) : ''; ?>" placeholder="<?php echo $global_error_messages['email-subject']; ?>">
620
+ </label>
621
+ <!-- Email Body -->
622
+ <label for="yikes-easy-mc-user-email-body"><strong><?php _e( 'Email Body', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
623
+ <?php
624
+ $editor_content = ( isset( $error_messages['email-body'] ) && ! empty( $error_messages['email-body'] ) ) ? $error_messages['email-body'] : Yikes_Inc_Easy_Mailchimp_Forms_Admin::generate_default_email_body();
625
+ wp_editor( $editor_content, 'yikes-easy-mc-user-email-body', array( 'textarea_id' => 'yikes-easy-mc-user-email-body' ) );
626
+ ?>
627
+ </label>
628
+ </div>
629
+ </div>
630
+
631
+ <!-- .inside -->
632
+ </div>
633
+ <!-- .postbox -->
634
+ </div>
635
+ <!-- .meta-box-sortables .ui-sortable -->
636
+ </div>
637
+ <!-- post-body-content -->
638
+ <!-- sidebar -->
639
+ <div id="postbox-container-1" class="postbox-container yikes-easy-mc-custom-messages-section-help">
640
+ <div class="meta-box-sortables">
641
+ <div class="postbox yikes-easy-mc-postbox">
642
+ <h3 class="edit-form-title"><span><?php esc_html_e( "Custom Message Help", 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
643
+ <div class="inside">
644
+ <ul>
645
+ <li class="yikes-easy-mc-success-message-help">
646
+ <strong><?php esc_html_e( 'Success: Double opt-in', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
647
+ <?php
648
+ esc_html_e( 'The message displayed after a double opt-in form has been submitted.', 'yikes-inc-easy-mailchimp-extender' );
649
+ ?>
650
+ </li>
651
+ <li class="yikes-easy-mc-success-single-optin-message-help">
652
+ <strong><?php esc_html_e( 'Success Message: Single opt-in', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
653
+ <?php
654
+ esc_html_e( 'The message displayed after a single opt-in form has been submitted.', 'yikes-inc-easy-mailchimp-extender' );
655
+ ?>
656
+ </li>
657
+ <li class="yikes-easy-mc-user-resubscribed-success-message-help">
658
+ <strong><?php esc_html_e( 'Success: Re-subscriber', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
659
+ <?php
660
+ esc_html_e( 'The message displayed after a subscriber submits a form for a list they are already subscribed to.', 'yikes-inc-easy-mailchimp-extender' );
661
+ ?>
662
+ </li>
663
+ <li class="yikes-easy-mc-user-subscribed-update-link-help">
664
+ <strong><?php esc_html_e( 'Success: Re-subscriber with link to email profile update message', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
665
+ <?php
666
+ /* translators: HTML <code> tags */
667
+ echo sprintf( esc_html__( 'The message displayed after a subscriber submits a form for a list they are already subscribed to. Wrap the text you want to be the link in %1$1s[link][/link]%2$2s tags.', 'yikes-inc-easy-mailchimp-extender' ), '<code>', '</code>' );
668
+ ?>
669
+ </li>
670
+ <li class="yikes-easy-mc-update-email-successful-help">
671
+ <strong><?php esc_html_e( 'Success: Update email successfully sent', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
672
+ <?php
673
+ esc_html_e( 'The message displayed after an update profile email is successfully sent.', 'yikes-inc-easy-mailchimp-extender' );
674
+ ?>
675
+ </li>
676
+ <li class="yikes-easy-mc-update-email-failure-help">
677
+ <strong><?php esc_html_e( 'Error: Update email failed to send', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
678
+ <?php
679
+ esc_html_e( 'The message displayed after an update profile email failed to send.', 'yikes-inc-easy-mailchimp-extender' );
680
+ ?>
681
+ </li>
682
+ <li class="yikes-easy-mc-user-subscribed-message-help">
683
+ <strong><?php esc_html_e( 'Error: Re-subscribers not permitted', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
684
+ <?php
685
+ /* translators: HTML <code> tags */
686
+ echo sprintf( esc_html__( 'The message displayed after a subscriber tries to join a list they are already subscribed to. You can display the user\'s email in the message using an %1$1s[email]%2$2s tag.', 'yikes-inc-easy-mailchimp-extender' ), '<code>', '</code>' );
687
+ ?>
688
+ </li>
689
+ <li class="yikes-easy-mc-general-error-message-help"><strong><?php esc_html_e( 'Error: General', 'yikes-inc-easy-mailchimp-extender' ); ?></strong> <?php esc_html_e( 'The message displayed if a form error has occurred.', 'yikes-inc-easy-mailchimp-extender' ); ?></li>
690
+ </ul>
691
+
692
+ </div>
693
+ <!-- .inside -->
694
+ </div>
695
+
696
+ <div class="postbox yikes-easy-mc-postbox yikes-easy-mc-custom-messages-email-section-help">
697
+ <h3 class="edit-form-title"><span><?php esc_html_e( "Email Message Help", 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
698
+ <div class="inside">
699
+
700
+ <ul>
701
+ <li class="yikes-easy-mc-user-email-subject-help"><strong><?php esc_html_e( 'Email Subject', 'yikes-inc-easy-mailchimp-extender' ); ?></strong> <?php esc_html_e( 'The subject of the email sent to the user.', 'yikes-inc-easy-mailchimp-extender' ); ?></li>
702
+ <li class="yikes-easy-mc-user-email-body-help">
703
+ <strong><?php esc_html_e( 'Email Body', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
704
+ <?php
705
+ /* translators: HTML <code> tags */
706
+ echo sprintf( esc_html__( 'The text in the profile update verification email sent to the subscriber. Wrap the text you want to be the link in %1$1s[link][/link]%2$2s tags. The link is required in the email, please don\'t leave these tags out.', 'yikes-inc-easy-mailchimp-extender' ), '<code>', '</code>' );
707
+ ?>
708
+ </li>
709
+ <li class="yikes-easy-mc-user-email-body-help">
710
+ <strong><?php esc_html_e( 'Tags', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
711
+ <?php esc_html_e( 'You can also use these tags in your email:', 'yikes-inc-easy-mailchimp-extender' ); ?>
712
+ <ul>
713
+ <li>
714
+ <?php
715
+ /* translators: First two placeholders are HTML <code> tags, third one is the website's home URL */
716
+ echo sprintf( esc_html__( '%1$1s[url]%2$2s displays your website\'s URL (i.e. %3$3s).', 'yikes-inc-easy-mailchimp-extender' ), '<code>', '</code>', esc_url( get_home_url() ) );
717
+ ?>
718
+ </li>
719
+ <li>
720
+ <?php
721
+ /* translators: HTML <code> tags */
722
+ echo sprintf( esc_html__( '%1$1s[email]%2$2s displays the subscriber\'s email address.', 'yikes-inc-easy-mailchimp-extender' ), '<code>', '</code>' );
723
+ ?>
724
+ </li>
725
+ <li>
726
+ <?php
727
+ /* translators: HTML <code> tags */
728
+ echo sprintf( esc_html__( '%1$1s[subscriber_id]%2$2s displays the subscriber\'s unique email ID.', 'yikes-inc-easy-mailchimp-extender' ), '<code>', '</code>' );
729
+ ?>
730
+ </li>
731
+ <li>
732
+ <?php
733
+ /* translators: First two placeholders are HTML <code> tags, third one is the form's name */
734
+ echo sprintf( esc_html__( '%1$1s[form_name]%2$2s displays your form\'s name (i.e. %3$3s).', 'yikes-inc-easy-mailchimp-extender' ), '<code>', '</code>', esc_html( $form['form_name'] ) );
735
+ ?>
736
+ </li>
737
+ <li>
738
+ <?php
739
+ /* translators: HTML <code> tags */
740
+ echo sprintf( esc_html__( '%1$1s[fname]/[lname]%2$2s displays your subscriber\'s first name/last name.', 'yikes-inc-easy-mailchimp-extender' ), '<code>', '</code>' );
741
+ ?>
742
+ </li>
743
+ </ul>
744
+ </li>
745
+ </ul>
746
+
747
+ </div>
748
+ <!-- .inside -->
749
+ </div>
750
+
751
+
752
+
753
+
754
+
755
+ <!-- .postbox -->
756
+ </div>
757
+ <!-- .meta-box-sortables -->
758
+ </div>
759
+ <!-- #postbox-container-1 .postbox-container -->
760
+ </div>
761
+ <!-- #post-body .metabox-holder .columns-2 -->
762
+ <br class="clear">
763
+ </div>
764
+
765
+ </label>
766
+ <!-- End Error Messages -->
767
+
768
+ <?php do_action( 'yikes-mailchimp-edit-form-sections', $form ); ?>
769
+
770
+ </div>
771
+ <!-- .inside -->
772
+ </div>
773
+ <!-- .postbox -->
774
+ </div>
775
+ <!-- .meta-box-sortables .ui-sortable -->
776
+ </div>
777
+ <!-- post-body-content -->
778
+
779
+ <!-- sidebar -->
780
+ <div id="postbox-container-1" class="postbox-container yikes-easy-forms-sidebar">
781
+ <div class="meta-box-sortables">
782
+ <div class="postbox yikes-easy-mc-postbox">
783
+ <h3><span><?php esc_html_e( 'Form Settings', 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
784
+
785
+ <div class="inside">
786
+ <p class="inside-section-1">
787
+ <label for="shortcode"><?php esc_html_e( 'Edit Another Form', 'yikes-inc-easy-mailchimp-extender' ); ?><br />
788
+ <select class="widefat" name="form_switcher" id="form_switcher" onchange="YIKES_Easy_MC_SwitchForm(jQuery(this).val());">
789
+ <?php foreach ( $all_forms as $single_form ) { ?>
790
+ <option <?php selected( $form_id, $single_form['id'] ); ?> value="<?php echo esc_attr( $single_form['id'] ); ?>"><?php echo esc_html( $single_form['form_name'] ); ?></option>
791
+ <?php } ?>
792
+ </select>
793
+ </label>
794
+ </p>
795
+
796
+ <p class="inside-section-2">
797
+ <label for="shortcode"><?php esc_html_e( 'Shortcode', 'yikes-inc-easy-mailchimp-extender' ); ?><br />
798
+ <input type="text" onclick="this.setSelectionRange(0, this.value.length)" class="widefat shortcode-input-field" readonly value='[yikes-mailchimp form="<?php echo esc_attr( $form['id'] ); ?>"]' />
799
+ </label>
800
+ </p>
801
+
802
+
803
+ <a href="#" class="expansion-section-title settings-sidebar">
804
+ <span class="dashicons dashicons-plus yikes-mc-expansion-toggle"></span><?php esc_html_e( 'Associated List Settings', 'yikes-inc-easy-mailchimp-extender' ); ?>
805
+ </a>
806
+ <div class="yikes-mc-settings-expansion-section">
807
+ <!-- Associated List -->
808
+ <p class="form-field-container">
809
+ <!-- necessary to prevent skipping on slideToggle(); -->
810
+ <label for="associated-list"><strong><?php esc_html_e( 'Associated List', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
811
+ <select name="associated-list" id="associated-list" <?php if ( empty( $list_data ) ) { echo 'disabled="disabled"'; } ?> onchange="jQuery('.view-list-link').attr( 'href', '<?php echo esc_url( admin_url( 'admin.php?page=yikes-mailchimp-view-list&list-id=' ) ); ?>' + jQuery( this ).val() );">
812
+ <?php
813
+ if ( ! empty( $list_data ) ) {
814
+ foreach( $list_data as $mailing_list ) {
815
+ ?>
816
+ <option <?php selected( $form['list_id'], $mailing_list['id'] ); ?> value="<?php echo $mailing_list['id']; ?>"><?php echo stripslashes( $mailing_list['name'] ) . ' (' . $mailing_list['stats']['member_count'] . ') '; ?></option>
817
+ <?php
818
+ }
819
+ } else {
820
+ ?>
821
+ <option value="no-forms"><?php esc_html_e( 'No Lists Found', 'yikes-inc-easy-mailchimp-extender' ); ?></option>
822
+ <?php
823
+ }
824
+ ?>
825
+ </select>
826
+ <?php if( ! empty( $form['list_id'] ) ) { ?>
827
+ <p class="description view-list">
828
+ <a href="<?php echo esc_url( admin_url( 'admin.php?page=yikes-mailchimp-view-list&list-id=' . $form['list_id'] ) ); ?>" class="view-list-link"><?php _e( 'View List', 'yikes-inc-easy-mailchimp-extender' ); ?></a>
829
+ </p>
830
+ <p class="description">
831
+ <?php _e( "Users who sign up via this form will be added to the list selected above.", 'yikes-inc-easy-mailchimp-extender' ); ?>
832
+ </p>
833
+ <?php } else { ?>
834
+ <p class="description">
835
+ <?php _e( "It looks like you first need to create a list to assign this form to. Head over to", 'yikes-inc-easy-mailchimp-extender' ); ?> <a href="http://www.Mailchimp.com" title="<?php _e( 'Create a new list', 'yikes-inc-easy-mailchimp-extender' ); ?>">Mailchimp</a> <?php _e( 'to create your first list', 'yikes-inc-easy-mailchimp-extender' ); ?>.
836
+ </p>
837
+ <?php } ?>
838
+
839
+ <!-- Display our Clear API Cache button -->
840
+ <?php if ( false === get_transient( 'yikes-easy-mailchimp-list-data' ) && false === get_transient( 'yikes-easy-mailchimp-profile-data' ) && false === get_transient( 'yikes-easy-mailchimp-account-data' ) && false === get_transient( 'yikesinc_eme_list_ids' ) && false === get_transient( 'yikes_eme_lists' ) ) { ?>
841
+ <p><a href="#" class="button-secondary" disabled="disabled" title="<?php _e( 'No Mailchimp data found in temporary cache storage.', 'yikes-inc-easy-mailchimp-extender' ); ?>"><?php _e( 'Clear Mailchimp API Cache', 'yikes-inc-easy-mailchimp-extender' ); ?></a></p>
842
+ <?php } else { ?>
843
+ <p><a href="<?php echo esc_url_raw( add_query_arg( array( 'action' => 'yikes-easy-mc-clear-transient-data', 'nonce' => wp_create_nonce( 'clear-mc-transient-data' ) ) ) ); ?>" class="button-primary"><?php _e( 'Clear Mailchimp API Cache', 'yikes-inc-easy-mailchimp-extender' ); ?></a></p>
844
+ <?php } ?>
845
+ </label>
846
+ </p>
847
+ </div>
848
+
849
+ <a href="#" class="expansion-section-title settings-sidebar">
850
+ <span class="dashicons dashicons-plus yikes-mc-expansion-toggle"></span><?php _e( 'Opt-in Settings', 'yikes-inc-easy-mailchimp-extender' ); ?>
851
+ </a>
852
+ <div class="yikes-mc-settings-expansion-section">
853
+
854
+ <!-- Single or Double Opt-in -->
855
+ <?php
856
+ if( !isset( $optin_settings['optin'] ) ) {
857
+ $optin_settings['optin'] = '1';
858
+ }
859
+ ?>
860
+ <p class="form-field-container"><!-- necessary to prevent skipping on slideToggle(); --><label for="single-double-optin"><strong><?php _e( 'Single or Double Opt-in', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
861
+ <span class="edit-form-field-container-span">
862
+ <label for="single"><input id="single" type="radio" name="single-double-optin" value="0" <?php checked( $optin_settings['optin'], '0' ); ?>><?php _e( 'Single', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
863
+ &nbsp;<label for="double"><input id="double" type="radio" name="single-double-optin" value="1" <?php checked( $optin_settings['optin'], '1' ); ?>><?php _e( 'Double', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
864
+ </span>
865
+ <p class="description"><?php _e( "Double opt-in requires users to confirm their email address before being added to a list (recommended)", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
866
+ </label></p>
867
+
868
+ <!-- Update Existing Users -->
869
+ <?php
870
+ if( !isset( $optin_settings['update_existing_user'] ) ) {
871
+ $optin_settings['update_existing_user'] = '1';
872
+ }
873
+ ?>
874
+ <p class="form-field-container"><!-- necessary to prevent skipping on slideToggle(); --><label for="update-existing-user"><strong><?php _e( 'Update Existing Subscriber', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
875
+ <span class="form-field-container-span">
876
+ <label for="update-user"><input type="radio" id="update-user" onchange="toggleUpdateEmailContainer(this);return false;" name="update-existing-user" value="1" <?php checked( $optin_settings['update_existing_user'], '1' ); ?>><?php _e( 'Yes', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
877
+ &nbsp;<label for="do-not-update-user"><input type="radio" onchange="toggleUpdateEmailContainer(this);return false;" id="do-not-update-user" name="update-existing-user" value="0" <?php checked( $optin_settings['update_existing_user'], '0' ); ?>><?php _e( 'No', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
878
+ </span>
879
+ <p class="description"><?php printf( __( "Update an existing subscriber's profile information instead of displaying a %s message.", "yikes-inc-easy-mailchimp-extender" ), __( '"user already subscribed"', 'yikes-inc-easy-mailchimp-extender' ) ); ?></p>
880
+ </label></p>
881
+
882
+ <!--
883
+ Send Update Profile Email
884
+ - Yes = send an update email
885
+ - No = Just update the user profile without an email
886
+ -->
887
+ <?php
888
+ $send_update_email = ( isset( $optin_settings['send_update_email'] ) && '' !== $optin_settings['send_update_email'] ) ? $optin_settings['send_update_email'] : 0;
889
+ ?>
890
+ <p class="form-field-container send-update-email" <?php if ( 1 !== absint( $optin_settings['update_existing_user'] ) ) { ?>style="display:none;"<?php } ?>><!-- necessary to prevent skipping on slideToggle(); --><label for="update-existing-user"><strong><?php _e( 'Send Update Email', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
891
+ <span class="form-field-container-span">
892
+ <label for="update-email"><input type="radio" id="update-email" name="update-existing-email" value="1" <?php checked( $send_update_email, '1' ); ?>><?php _e( 'Yes', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
893
+ &nbsp;<label for="do-not-update-email"><input type="radio" id="do-not-update-email" name="update-existing-email" value="0" <?php checked( $send_update_email, '0' ); ?>><?php _e( 'No', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
894
+ </span>
895
+ <em><?php printf( __( "Send an email to the user granting their permission to update their profile information. Otherwise, an existing subscriber filling out this form, will have their profile information updated without any further interaction.", "yikes-inc-easy-mailchimp-extender" ), __( '"user already subscribed"', 'yikes-inc-easy-mailchimp-extender' ) ); ?></em>
896
+ </label></p>
897
+
898
+ </div>
899
+
900
+ <a href="#" class="expansion-section-title settings-sidebar">
901
+ <span class="dashicons dashicons-plus yikes-mc-expansion-toggle"></span><?php _e( 'Submission Settings', 'yikes-inc-easy-mailchimp-extender' ); ?>
902
+ </a>
903
+ <div class="yikes-mc-settings-expansion-section">
904
+ <!-- AJAX form Submission -->
905
+ <?php
906
+ if( !isset( $submission_settings['ajax'] ) ) {
907
+ $submission_settings['ajax'] = '1';
908
+ }
909
+ ?>
910
+ <p class="form-field-container"><!-- necessary to prevent skipping on slideToggle(); --><label for="form-ajax-submission"><strong><?php _e( 'Enable AJAX Submission', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
911
+ <span class="form-field-container-span">
912
+ <label for="enable-ajax"><input type="radio" id="enable-ajax" name="form-ajax-submission" class="yikes-enable-disable-ajax" value="1" <?php checked( $submission_settings['ajax'], '1' ); ?>><?php _e( 'Yes', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
913
+ &nbsp;<label for="disable-ajax"><input type="radio" id="disable-ajax" name="form-ajax-submission" class="yikes-enable-disable-ajax" value="0" <?php checked( $submission_settings['ajax'], '0' ); ?>><?php _e( 'No', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
914
+ </span>
915
+ <p class="description"><?php _e( "AJAX form submissions transmit data without requiring the page to refresh.", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
916
+ </label></p>
917
+
918
+ <!-- Redirect User On Submission -->
919
+ <?php
920
+ if( !isset( $submission_settings['redirect_on_submission'] ) ) {
921
+ $submission_settings['redirect_on_submission'] = '0';
922
+ $submission_settings['redirect_page'] = '';
923
+ }
924
+ ?>
925
+ <p><label for="redirect-user-on-submission"><strong><?php _e( 'Redirect On Submission', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
926
+ <span class="form-field-container-span">
927
+ <label for="redirect-user"><input type="radio" id="redirect-user" onclick="togglePageRedirection( this );" name="redirect-user-on-submission" value="1" <?php checked( $submission_settings['redirect_on_submission'], '1' ); ?>><?php _e( 'Yes', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
928
+ &nbsp;<label for="do-not-redirect-user"><input type="radio" id="do-not-redirect-user" onclick="togglePageRedirection( this );" name="redirect-user-on-submission" value="0" <?php checked( $submission_settings['redirect_on_submission'], '0' ); ?>><?php _e( 'No', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
929
+ </span>
930
+ <?php $this->generate_page_redirect_dropdown( $submission_settings['redirect_on_submission'], $submission_settings['redirect_page'], ( isset( $submission_settings['custom_redirect_url'] ) ) ? esc_url( $submission_settings['custom_redirect_url'] ) : '' ); ?>
931
+ <p class="description"><?php _e( "When the user signs up would you like to redirect them to another page?", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
932
+ </label></p>
933
+
934
+ <?php
935
+ if ( ! isset( $submission_settings['redirect_new_window'] ) ) {
936
+ $submission_settings['redirect_new_window'] = '0';
937
+ }
938
+ ?>
939
+
940
+ <!-- Option to open the redirect URL in a new window -->
941
+ <div class="redirect-new-window-div" <?php if ( ( ! isset( $submission_settings['redirect_on_submission'] ) || $submission_settings['redirect_on_submission'] === '0' ) || ( ! isset( $submission_settings['ajax'] ) || $submission_settings['ajax'] !== '1' ) ) { echo 'style="display:none;"'; } ?>>
942
+ <p><strong><?php _e( "Open Redirect URL in a New Window", 'yikes-inc-easy-mailchimp-extender' ); ?></strong></p>
943
+ <label for="redirect-new-window-yes">
944
+ <input type="radio" class="widefat custom-redirect-new-window" id="redirect-new-window-yes" name="redirect_new_window" value="1" <?php checked( $submission_settings['redirect_new_window'], '1' ); ?>/><?php _e( 'Yes', 'yikes-inc-easy-mailchimp-extender' ); ?>
945
+ </label>
946
+ &nbsp;
947
+ <label for="redirect-new-window-no">
948
+ <input type="radio" class="widefat redirect-new-window" id="redirect-new-window-no" name="redirect_new_window" value="0" <?php checked( $submission_settings['redirect_new_window'], '0' ); ?>/><?php _e( 'No', 'yikes-inc-easy-mailchimp-extender' ); ?>
949
+ </label>
950
+ <p class="description"><?php _e( "Should the redirect URL open in a new window/tab?", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
951
+ </div>
952
+
953
+ <!-- Hide Form On Submission -->
954
+ <?php
955
+ if( !isset( $submission_settings['hide_form_post_signup'] ) ) {
956
+ $submission_settings['hide_form_post_signup'] = '0';
957
+ }
958
+ ?>
959
+ <p><label for="hide-form-post-signup"><strong><?php _e( 'Hide Form After Sign Up', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
960
+ <span class="form-field-container-span">
961
+ <label for="hide-form"><input type="radio" id="hide-form" name="hide-form-post-signup" value="1" <?php checked( $submission_settings['hide_form_post_signup'], '1' ); ?> checked><?php _e( 'Yes', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
962
+ &nbsp;<label for="do-not-hide-form"><input type="radio" id="do-not-hide-form" name="hide-form-post-signup" value="0" <?php checked( $submission_settings['hide_form_post_signup'], '0' ); ?>><?php _e( 'No', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
963
+ </span>
964
+ <p class="description"><?php _e( "Should the form be hidden after the user successfully signs up?", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
965
+ </label></p>
966
+
967
+ <!-- Append or Replace Interest Groups -->
968
+ <?php
969
+ if( !isset( $submission_settings['replace_interests'] ) ) {
970
+ $submission_settings['replace_interests'] = '1'; // defaults to true
971
+ }
972
+ ?>
973
+ <p><label for="replace-interest-groups"><strong><?php _e( 'Existing Interest Groups', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
974
+ <span class="form-field-container-span">
975
+ <label for="replace-interest-groups"><input type="radio" id="replace-interest-groups" name="replace-interest-groups" value="1" <?php checked( $submission_settings['replace_interests'], '1' ); ?> checked><?php _e( 'Replace', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
976
+ &nbsp;<label for="update-interest-groups"><input type="radio" id="update-interest-groups" name="replace-interest-groups" value="0" <?php checked( $submission_settings['replace_interests'], '0' ); ?>><?php _e( 'Update', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
977
+ </span>
978
+
979
+ <p class="description"><small><?php _e( "<strong>Replace</strong>: Replace all interest groups with the new ones submitted.", 'yikes-inc-easy-mailchimp-extender' ); ?></small></p>
980
+
981
+
982
+ <p class="description"><small><?php _e( "<strong>Update</strong>: Update <em>only</em> the ones submitted. Leave existing interest groups as is.", 'yikes-inc-easy-mailchimp-extender' ); ?></small></p>
983
+
984
+ </label></p>
985
+
986
+ </div>
987
+
988
+ </div>
989
+ <!-- .inside -->
990
+
991
+ <span class="spinner update-form-spinner"></span>
992
+
993
+ <span class="form-buttons-container" id="major-publishing-actions">
994
+ <?php
995
+ echo submit_button( __( 'Update Form' ), 'primary', '', false, array( 'onclick' => 'jQuery(this).parent().prev().css({"display":"block","visibility":"inherit"});' ) );
996
+ $url = esc_url_raw( add_query_arg( array( 'action' => 'yikes-easy-mc-delete-form', 'mailchimp-form' => $form['id'], 'nonce' => wp_create_nonce( 'delete-mailchimp-form-'.$form['id'] ) ), admin_url( 'admin.php?page=yikes-inc-easy-mailchimp' ) ) );
997
+ echo '<a href="' . $url . '" class="yikes-delete-mailchimp-form" onclick="return confirm(\'' . __( "Are you sure you want to delete this form? This cannot be undone.", 'yikes-inc-easy-mailchimp-extender' ) . '\');">' . __( "Delete Form", 'yikes-inc-easy-mailchimp-extender' ) . '</a>';
998
+ ?>
999
+ </span>
1000
+
1001
+ </div>
1002
+ <!-- .postbox -->
1003
+ <?php
1004
+ // display info about Yikes
1005
+ echo $this->generate_show_some_love_container();
1006
+ ?>
1007
+
1008
+ </div>
1009
+ <!-- .meta-box-sortables -->
1010
+ </div>
1011
+ <!-- #postbox-container-1 .postbox-container -->
1012
+ </div>
1013
+ <!-- #post-body .metabox-holder .columns-2 -->
1014
+ <br class="clear">
1015
+ </form> <!-- END UPDATE FORM -->
1016
+ </div>
1017
+ <!-- #poststuff -->
1018
+
1019
+ </div>
admin/partials/front-end-widgets/front-end-widget-form.php CHANGED
@@ -1,163 +1,163 @@
1
- <?php
2
- /*
3
- * Front facing Mailchimp widget in sidebars
4
- * @since 6.0.0
5
- * By: Yikes Inc. | https://www.yikesinc.com
6
- */
7
- class Yikes_Inc_Easy_Mailchimp_Extender_Widget extends WP_Widget {
8
-
9
- /**
10
- * Our form interface.
11
- *
12
- * @var Yikes_Inc_Easy_Mailchimp_Extender_Form_Interface
13
- */
14
- protected $form_interface;
15
-
16
- /**
17
- * Yikes_Inc_Easy_Mailchimp_Extender_Widget constructor.
18
- */
19
- public function __construct() {
20
- $this->form_interface = yikes_easy_mailchimp_extender_get_form_interface();
21
-
22
- parent::__construct(
23
- // Base ID of your widget
24
- 'yikes_easy_mc_widget',
25
- // Widget name will appear in UI
26
- __( 'Easy Mailchimp Forms', 'yikes-inc-easy-mailchimp-extender' ),
27
- // Widget description
28
- array( 'description' => __( 'Mailchimp opt-in widget for your sidebar.', 'yikes-inc-easy-mailchimp-extender' ), )
29
- );
30
- }
31
-
32
- /**
33
- * Display the widget on the front-end.
34
- *
35
- * @param array $args
36
- * @param array $instance
37
- */
38
- public function widget( $args, $instance ) {
39
- // Get all form IDs so we can use the first one as a default.
40
- $form_ids = $this->form_interface->get_form_ids();
41
-
42
- $title = isset( $instance['title'] ) ? apply_filters( 'widget_title', $instance['title'] ) : __( 'Mailchimp Signup Form', 'yikes-inc-easy-mailchimp-extender' );
43
- $form_id = isset( $instance['form_id'] ) ? $instance['form_id'] : $form_ids[0];
44
- $form_description = isset( $instance['form_description'] ) ? $instance['form_description'] : '';
45
- $submit_button_text = isset( $instance['submit_text'] ) ? $instance['submit_text'] : __( 'Submit', 'yikes-inc-easy-mailchimp-extender' );
46
-
47
- // Build our array based on settings chosen
48
- $shortcode_attributes = array(
49
- 'form' => $form_id,
50
- 'submit' => $submit_button_text,
51
- 'description' => ( ! empty( $form_description ) ) ? '1' : '',
52
- );
53
-
54
- $shortcode_attributes = apply_filters( 'yikes_mailchimp_widget_shortcode_attributes', $shortcode_attributes, $instance );
55
-
56
- // before and after widget arguments are defined by themes
57
- echo $args['before_widget'];
58
-
59
- if ( ! empty( $title ) ) {
60
- echo $args['before_title'] . $title . $args['after_title'];
61
- }
62
-
63
- // Custom action hooks to place content in the widget before the form
64
- // See FAQ for examples on usage
65
- do_action( 'yikes-mailchimp-before-form-' . $form_id );
66
- do_action( 'yikes-mailchimp-before-form' );
67
-
68
- // This is where you run the code and display the output
69
- echo process_mailchimp_shortcode( $shortcode_attributes );
70
-
71
- // Custom action hooks to place content in the widget after the form
72
- // See FAQ for examples on usage
73
- do_action( 'yikes-mailchimp-after-form-' . $form_id );
74
- do_action( 'yikes-mailchimp-after-form' );
75
-
76
- echo $args['after_widget'];
77
- }
78
-
79
- // Widget Backend
80
- public function form( $instance ) {
81
- $all_forms = $this->form_interface->get_all_forms();
82
-
83
- if ( empty( $all_forms ) ) {
84
- ?>
85
- <section class="no-forms-widget">
86
- <strong><span class="dashicons dashicons-no-alt no-forms-found-icon"></span><?php echo sprintf( __( 'No forms found. It looks like you need to <a href="%s" title="%s">%s</a>.', 'yikes-inc-easy-mailchimp-extender' ), esc_url_raw( admin_url( 'admin.php?page=yikes-inc-easy-mailchimp' ) ), __( 'Create a form' , 'yikes-inc-easy-mailchimp-extender' ), __( 'create a form' , 'yikes-inc-easy-mailchimp-extender' ) ); ?></strong>
87
- </section>
88
- <?php
89
- return;
90
- }
91
-
92
- // Title
93
- if ( isset( $instance[ 'title' ] ) ) {
94
- $title = $instance[ 'title' ];
95
- } else {
96
- $title = __( 'Mailchimp Signup Form', 'yikes-inc-easy-mailchimp-extender' );
97
- }
98
-
99
- // Selected Form
100
- if ( isset( $instance[ 'form_id' ] ) ) {
101
- $selected_form = $instance[ 'form_id' ];
102
- } else {
103
- $selected_form = '';
104
- }
105
-
106
- // Submit Button Text
107
- if ( isset( $instance[ 'submit_text' ] ) ) {
108
- $submit_text = $instance[ 'submit_text' ];
109
- } else {
110
- $submit_text = __( 'Submit', 'yikes-inc-easy-mailchimp-extender' );
111
- }
112
-
113
- if( get_option( 'yikes-mc-api-validation' , 'invalid_api_key' ) == 'invalid_api_key' ) {
114
- ?>
115
- <p class="enter-valid-api-error-widget"><strong><?php _e( 'Please enter a valid Mailchimp API key to connect your site to Mailchimp.' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong></p>
116
- <?php
117
- return;
118
- }
119
-
120
- // Widget admin form
121
- ?>
122
- <p>
123
- <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:' ); ?></label>
124
- <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" />
125
- </p>
126
-
127
- <p>
128
- <label for="<?php echo $this->get_field_id( 'form_id' ); ?>"><?php _e( 'Form:' ); ?></label>
129
- <select id="<?php echo $this->get_field_id( 'form_id' ); ?>" name="<?php echo $this->get_field_name( 'form_id' ); ?>" class="widefat">
130
- <?php
131
- // build our array
132
- foreach( $all_forms as $id => $form ) {
133
- ?>
134
- <option <?php selected( $selected_form , $id ); ?> name="<?php echo $this->get_field_name( 'form_id' ); ?>" value="<?php echo $id; ?>"><?php echo stripslashes( $form['form_name'] ); ?></option>
135
- <?php
136
- }
137
- ?>
138
- </select>
139
- </p>
140
-
141
- <p>
142
- <label for="<?php echo $this->get_field_id( 'form_description' ); ?>"><?php _e( 'Display Form Description:' ); ?></label>
143
- <input class="widefat" id="<?php echo $this->get_field_id( 'form_description' ); ?>" name="<?php echo $this->get_field_name( 'form_description' ); ?>" type="checkbox" value="1" <?php if( isset( $instance['form_description'] ) ) { checked( $instance['form_description'] , 1 ); } ?> />
144
- </p>
145
-
146
- <p>
147
- <label for="<?php echo $this->get_field_id( 'submit_button_text' ); ?>"><?php _e( 'Submit Button Text:' ); ?></label>
148
- <input class="widefat" id="<?php echo $this->get_field_id( 'submit_text' ); ?>" name="<?php echo $this->get_field_name( 'submit_text' ); ?>" type="text" value="<?php echo esc_attr( $submit_text ); ?>" />
149
- </p>
150
- <?php
151
- }
152
-
153
- // Updating widget replacing old instances with new
154
- public function update( $new_instance, $old_instance ) {
155
- $instance = array();
156
- $instance['title'] = ( ! empty( $new_instance['title'] ) ) ? strip_tags( $new_instance['title'] ) : '';
157
- $instance['form_id'] = $new_instance['form_id'];
158
- $instance['form_description'] = isset( $new_instance['form_description'] ) ? '1' : '';
159
- $instance['submit_text'] = ( ! empty( $new_instance['submit_text'] ) ) ? strip_tags( $new_instance['submit_text'] ) : 'Submit';
160
- return $instance;
161
- }
162
-
163
- }
1
+ <?php
2
+ /*
3
+ * Front facing Mailchimp widget in sidebars
4
+ * @since 6.0.0
5
+ * By: Yikes Inc. | https://www.yikesinc.com
6
+ */
7
+ class Yikes_Inc_Easy_Mailchimp_Extender_Widget extends WP_Widget {
8
+
9
+ /**
10
+ * Our form interface.
11
+ *
12
+ * @var Yikes_Inc_Easy_Mailchimp_Extender_Form_Interface
13
+ */
14
+ protected $form_interface;
15
+
16
+ /**
17
+ * Yikes_Inc_Easy_Mailchimp_Extender_Widget constructor.
18
+ */
19
+ public function __construct() {
20
+ $this->form_interface = yikes_easy_mailchimp_extender_get_form_interface();
21
+
22
+ parent::__construct(
23
+ // Base ID of your widget
24
+ 'yikes_easy_mc_widget',
25
+ // Widget name will appear in UI
26
+ __( 'Easy Mailchimp Forms', 'yikes-inc-easy-mailchimp-extender' ),
27
+ // Widget description
28
+ array( 'description' => __( 'Mailchimp opt-in widget for your sidebar.', 'yikes-inc-easy-mailchimp-extender' ), )
29
+ );
30
+ }
31
+
32
+ /**
33
+ * Display the widget on the front-end.
34
+ *
35
+ * @param array $args
36
+ * @param array $instance
37
+ */
38
+ public function widget( $args, $instance ) {
39
+ // Get all form IDs so we can use the first one as a default.
40
+ $form_ids = $this->form_interface->get_form_ids();
41
+
42
+ $title = isset( $instance['title'] ) ? apply_filters( 'widget_title', $instance['title'] ) : __( 'Mailchimp Signup Form', 'yikes-inc-easy-mailchimp-extender' );
43
+ $form_id = isset( $instance['form_id'] ) ? $instance['form_id'] : $form_ids[0];
44
+ $form_description = isset( $instance['form_description'] ) ? $instance['form_description'] : '';
45
+ $submit_button_text = isset( $instance['submit_text'] ) ? $instance['submit_text'] : __( 'Submit', 'yikes-inc-easy-mailchimp-extender' );
46
+
47
+ // Build our array based on settings chosen
48
+ $shortcode_attributes = array(
49
+ 'form' => $form_id,
50
+ 'submit' => $submit_button_text,
51
+ 'description' => ( ! empty( $form_description ) ) ? '1' : '',
52
+ );
53
+
54
+ $shortcode_attributes = apply_filters( 'yikes_mailchimp_widget_shortcode_attributes', $shortcode_attributes, $instance );
55
+
56
+ // before and after widget arguments are defined by themes
57
+ echo $args['before_widget'];
58
+
59
+ if ( ! empty( $title ) ) {
60
+ echo $args['before_title'] . $title . $args['after_title'];
61
+ }
62
+
63
+ // Custom action hooks to place content in the widget before the form
64
+ // See FAQ for examples on usage
65
+ do_action( 'yikes-mailchimp-before-form-' . $form_id );
66
+ do_action( 'yikes-mailchimp-before-form' );
67
+
68
+ // This is where you run the code and display the output
69
+ echo process_mailchimp_shortcode( $shortcode_attributes );
70
+
71
+ // Custom action hooks to place content in the widget after the form
72
+ // See FAQ for examples on usage
73
+ do_action( 'yikes-mailchimp-after-form-' . $form_id );
74
+ do_action( 'yikes-mailchimp-after-form' );
75
+
76
+ echo $args['after_widget'];
77
+ }
78
+
79
+ // Widget Backend
80
+ public function form( $instance ) {
81
+ $all_forms = $this->form_interface->get_all_forms();
82
+
83
+ if ( empty( $all_forms ) ) {
84
+ ?>
85
+ <section class="no-forms-widget">
86
+ <strong><span class="dashicons dashicons-no-alt no-forms-found-icon"></span><?php echo sprintf( __( 'No forms found. It looks like you need to <a href="%s" title="%s">%s</a>.', 'yikes-inc-easy-mailchimp-extender' ), esc_url_raw( admin_url( 'admin.php?page=yikes-inc-easy-mailchimp' ) ), __( 'Create a form' , 'yikes-inc-easy-mailchimp-extender' ), __( 'create a form' , 'yikes-inc-easy-mailchimp-extender' ) ); ?></strong>
87
+ </section>
88
+ <?php
89
+ return;
90
+ }
91
+
92
+ // Title
93
+ if ( isset( $instance[ 'title' ] ) ) {
94
+ $title = $instance[ 'title' ];
95
+ } else {
96
+ $title = __( 'Mailchimp Signup Form', 'yikes-inc-easy-mailchimp-extender' );
97
+ }
98
+
99
+ // Selected Form
100
+ if ( isset( $instance[ 'form_id' ] ) ) {
101
+ $selected_form = $instance[ 'form_id' ];
102
+ } else {
103
+ $selected_form = '';
104
+ }
105
+
106
+ // Submit Button Text
107
+ if ( isset( $instance[ 'submit_text' ] ) ) {
108
+ $submit_text = $instance[ 'submit_text' ];
109
+ } else {
110
+ $submit_text = __( 'Submit', 'yikes-inc-easy-mailchimp-extender' );
111
+ }
112
+
113
+ if( get_option( 'yikes-mc-api-validation' , 'invalid_api_key' ) == 'invalid_api_key' ) {
114
+ ?>
115
+ <p class="enter-valid-api-error-widget"><strong><?php _e( 'Please enter a valid Mailchimp API key to connect your site to Mailchimp.' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong></p>
116
+ <?php
117
+ return;
118
+ }
119
+
120
+ // Widget admin form
121
+ ?>
122
+ <p>
123
+ <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:' ); ?></label>
124
+ <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" />
125
+ </p>
126
+
127
+ <p>
128
+ <label for="<?php echo $this->get_field_id( 'form_id' ); ?>"><?php _e( 'Form:' ); ?></label>
129
+ <select id="<?php echo $this->get_field_id( 'form_id' ); ?>" name="<?php echo $this->get_field_name( 'form_id' ); ?>" class="widefat">
130
+ <?php
131
+ // build our array
132
+ foreach( $all_forms as $id => $form ) {
133
+ ?>
134
+ <option <?php selected( $selected_form , $id ); ?> name="<?php echo $this->get_field_name( 'form_id' ); ?>" value="<?php echo $id; ?>"><?php echo stripslashes( $form['form_name'] ); ?></option>
135
+ <?php
136
+ }
137
+ ?>
138
+ </select>
139
+ </p>
140
+
141
+ <p>
142
+ <label for="<?php echo $this->get_field_id( 'form_description' ); ?>"><?php _e( 'Display Form Description:' ); ?></label>
143
+ <input class="widefat" id="<?php echo $this->get_field_id( 'form_description' ); ?>" name="<?php echo $this->get_field_name( 'form_description' ); ?>" type="checkbox" value="1" <?php if( isset( $instance['form_description'] ) ) { checked( $instance['form_description'] , 1 ); } ?> />
144
+ </p>
145
+
146
+ <p>
147
+ <label for="<?php echo $this->get_field_id( 'submit_button_text' ); ?>"><?php _e( 'Submit Button Text:' ); ?></label>
148
+ <input class="widefat" id="<?php echo $this->get_field_id( 'submit_text' ); ?>" name="<?php echo $this->get_field_name( 'submit_text' ); ?>" type="text" value="<?php echo esc_attr( $submit_text ); ?>" />
149
+ </p>
150
+ <?php
151
+ }
152
+
153
+ // Updating widget replacing old instances with new
154
+ public function update( $new_instance, $old_instance ) {
155
+ $instance = array();
156
+ $instance['title'] = ( ! empty( $new_instance['title'] ) ) ? strip_tags( $new_instance['title'] ) : '';
157
+ $instance['form_id'] = $new_instance['form_id'];
158
+ $instance['form_description'] = isset( $new_instance['form_description'] ) ? '1' : '';
159
+ $instance['submit_text'] = ( ! empty( $new_instance['submit_text'] ) ) ? strip_tags( $new_instance['submit_text'] ) : 'Submit';
160
+ return $instance;
161
+ }
162
+
163
+ }
admin/partials/helpers/edit-form-hidden-section-template.php CHANGED
@@ -1,76 +1,76 @@
1
- <?php
2
- /*
3
- * Main template used to render/generate custom sections on the edit-form.php
4
- * @since 6.0.0
5
- * For assistance on usage, please see our developer documentation
6
- * By: Yikes Inc. | https://www.yikesinc.com
7
- */
8
- // grab our global form_data;
9
- global $form_data;
10
- ?>
11
- <label class="hidden-setting-label yikes-easy-mc-hidden" for="form" id=<?php esc_attr_e( $section_data['id'] ); ?>>
12
- <div id="poststuff">
13
- <div id="post-body" class="metabox-holder <?php if( self::is_custom_section_two_column( $section_data ) ) { ?> columns-2 <?php } else { ?> columns-1 <?php } ?>">
14
- <div id="post-body-content">
15
- <div class="meta-box-sortables ui-sortable">
16
- <div class="postbox yikes-easy-mc-postbox">
17
- <h3 class="edit-form-title"><span><?php echo $section_data['main_title']; ?></span></h3>
18
- <div class="inside <?php esc_attr_e( $section_data['id'] ); ?>-container">
19
- <?php
20
- if( isset( $section_data['main_description'] ) && $section_data['main_description'] != '' ) {
21
- ?>
22
- <p><?php echo $section_data['main_description']; ?></p>
23
- <?php
24
- }
25
- $main_field_data = $section_data['main_fields'];
26
- foreach( $main_field_data as $field ) {
27
- if( $field['type'] == 'custom' ) {
28
- // execute the custom callback
29
- $field['callback']();
30
- } else {
31
- // include our field files
32
- include( YIKES_MC_PATH . 'admin/partials/helpers/fields/yikes-mailchimp-' . $field['type'] . '-field.php' );
33
- }
34
- }
35
- ?>
36
- </div>
37
- </div>
38
- </div>
39
- </div>
40
-
41
- <!-- check for single/double box -->
42
- <?php if( self::is_custom_section_two_column( $section_data ) ) { ?>
43
- <!-- begin sidebar -->
44
- <div id="postbox-container-1" class="postbox-container">
45
- <div class="meta-box-sortables">
46
- <div class="postbox yikes-easy-mc-postbox">
47
- <h3 class="edit-form-title"><span><?php echo $section_data['sidebar_title']; ?></span></h3>
48
- <div class="inside <?php esc_attr_e( $section_data['id'] ); ?>-sidebar-container">
49
- <?php
50
- if( isset( $section_data['sidebar_description'] ) && $section_data['sidebar_description'] != '' ) {
51
- ?>
52
- <p><?php echo $section_data['sidebar_description']; ?></p>
53
- <?php
54
- }
55
- $sidebar_field_data = $section_data['sidebar_fields'];
56
- foreach( $sidebar_field_data as $field ) {
57
- if( $field['type'] == 'custom' ) {
58
- // execute the custom callback
59
- $field['callback']();
60
- } else {
61
- // include our field files
62
- include( YIKES_MC_PATH . 'admin/partials/helpers/fields/yikes-mailchimp-' . $field['type'] . '-field.php' );
63
- }
64
- }
65
- ?>
66
- </div>
67
- </div>
68
- </div>
69
- </div>
70
- <?php } ?>
71
- <!-- end single/double column check -->
72
- </div>
73
-
74
- <br class="clear">
75
- </div>
76
  </label>
1
+ <?php
2
+ /*
3
+ * Main template used to render/generate custom sections on the edit-form.php
4
+ * @since 6.0.0
5
+ * For assistance on usage, please see our developer documentation
6
+ * By: Yikes Inc. | https://www.yikesinc.com
7
+ */
8
+ // grab our global form_data;
9
+ global $form_data;
10
+ ?>
11
+ <label class="hidden-setting-label yikes-easy-mc-hidden" for="form" id=<?php esc_attr_e( $section_data['id'] ); ?>>
12
+ <div id="poststuff">
13
+ <div id="post-body" class="metabox-holder <?php if( self::is_custom_section_two_column( $section_data ) ) { ?> columns-2 <?php } else { ?> columns-1 <?php } ?>">
14
+ <div id="post-body-content">
15
+ <div class="meta-box-sortables ui-sortable">
16
+ <div class="postbox yikes-easy-mc-postbox">
17
+ <h3 class="edit-form-title"><span><?php echo $section_data['main_title']; ?></span></h3>
18
+ <div class="inside <?php esc_attr_e( $section_data['id'] ); ?>-container">
19
+ <?php
20
+ if( isset( $section_data['main_description'] ) && $section_data['main_description'] != '' ) {
21
+ ?>
22
+ <p><?php echo $section_data['main_description']; ?></p>
23
+ <?php
24
+ }
25
+ $main_field_data = $section_data['main_fields'];
26
+ foreach( $main_field_data as $field ) {
27
+ if( $field['type'] == 'custom' ) {
28
+ // execute the custom callback
29
+ $field['callback']();
30
+ } else {
31
+ // include our field files
32
+ include( YIKES_MC_PATH . 'admin/partials/helpers/fields/yikes-mailchimp-' . $field['type'] . '-field.php' );
33
+ }
34
+ }
35
+ ?>
36
+ </div>
37
+ </div>
38
+ </div>
39
+ </div>
40
+
41
+ <!-- check for single/double box -->
42
+ <?php if( self::is_custom_section_two_column( $section_data ) ) { ?>
43
+ <!-- begin sidebar -->
44
+ <div id="postbox-container-1" class="postbox-container">
45
+ <div class="meta-box-sortables">
46
+ <div class="postbox yikes-easy-mc-postbox">
47
+ <h3 class="edit-form-title"><span><?php echo $section_data['sidebar_title']; ?></span></h3>
48
+ <div class="inside <?php esc_attr_e( $section_data['id'] ); ?>-sidebar-container">
49
+ <?php
50
+ if( isset( $section_data['sidebar_description'] ) && $section_data['sidebar_description'] != '' ) {
51
+ ?>
52
+ <p><?php echo $section_data['sidebar_description']; ?></p>
53
+ <?php
54
+ }
55
+ $sidebar_field_data = $section_data['sidebar_fields'];
56
+ foreach( $sidebar_field_data as $field ) {
57
+ if( $field['type'] == 'custom' ) {
58
+ // execute the custom callback
59
+ $field['callback']();
60
+ } else {
61
+ // include our field files
62
+ include( YIKES_MC_PATH . 'admin/partials/helpers/fields/yikes-mailchimp-' . $field['type'] . '-field.php' );
63
+ }
64
+ }
65
+ ?>
66
+ </div>
67
+ </div>
68
+ </div>
69
+ </div>
70
+ <?php } ?>
71
+ <!-- end single/double column check -->
72
+ </div>
73
+
74
+ <br class="clear">
75
+ </div>
76
  </label>
admin/partials/helpers/fields/js/yikes-mc-file-upload.js CHANGED
@@ -1,72 +1,72 @@
1
- jQuery(document).ready(function($){
2
- $('body').on('click','#upload-btn',function(e) {
3
- var clicked_incentive = parseInt( $( this ).attr( 'data-attr-position' ) );
4
- e.preventDefault();
5
- var image = wp.media({
6
- title: 'Upload Image',
7
- // mutiple: true if you want to upload multiple files at once
8
- multiple: false
9
- }).open()
10
- .on('select', function(e){
11
- // This will return the selected image from the Media Uploader, the result is an object
12
- var uploaded_image = image.state().get('selection').first();
13
- // We convert uploaded_image to a JSON object to make accessing it easier
14
- // Output to the console uploaded_image
15
- var image_url = uploaded_image.toJSON().url;
16
- if( uploaded_image.toJSON().hasOwnProperty( 'sizes' ) ) {
17
- if( uploaded_image.toJSON().sizes.medium ) {
18
- var size = uploaded_image.toJSON().sizes.medium.width;
19
- } else if( uploaded_image.toJSON().sizes.full ) {
20
- var size = uploaded_image.toJSON().sizes.full.width;
21
- } else {
22
- var size = '';
23
- }
24
- }
25
- // Let's assign the url value to the input field
26
- $( 'input[data-attr-position="'+clicked_incentive+'"]' ).prev().val( image_url );
27
- populate_file_container( image_url, clicked_incentive );
28
- // adjust file container size
29
- $( 'a[data-attr-position="'+clicked_incentive+'"]' ).next().attr( 'width' , size+'px' ).css({ 'max-width' : size+'px', 'width' : '100%' });
30
- $( 'a[data-attr-position="'+clicked_incentive+'"]' ).parents( '.file-container' ).show()
31
- });
32
- });
33
- });
34
-
35
-
36
- function populate_file_container( image_url, clicked_incentive ) {
37
- var extension = image_url.substr( ( image_url.lastIndexOf('.') +1) );
38
- switch(extension) {
39
- case 'jpg':
40
- case 'png':
41
- case 'gif':
42
- var file_container = '<img src="'+image_url+'" class="incentive-image-preview">'; // There's was a typo in the example where
43
- break; // the alert ended with pdf instead of gif.
44
- case 'zip':
45
- case 'rar':
46
- var file_container = '<img src="'+localized_data.wp_includes_url+'/archive.png" class="incentive-image-preview archive-image">'; // There's was a typo in the example where
47
- break;
48
- case 'pdf':
49
- var file_container = '<img src="'+localized_data.wp_includes_url+'/document.png" class="incentive-image-preview pdf-image">'; // There's was a typo in the example where
50
- break;
51
- case 'mp3':
52
- case 'wav':
53
- case 'wma':
54
- var file_container = '<img src="'+localized_data.wp_includes_url+'/audio.png" class="incentive-image-preview audio-image">'; // There's was a typo in the example where
55
- break;
56
- case 'mp4':
57
- case 'avi':
58
- case 'mpg':
59
- case 'mov':
60
- case 'qt':
61
- case 'mpeg':
62
- case '3gp':
63
- case 'ogm':
64
- case 'ogg':
65
- var file_container = '<img src="'+localized_data.wp_includes_url+'/video.png" class="incentive-image-preview video-image">'; // There's was a typo in the example where
66
- break;
67
- default:
68
- alert('who knows');
69
- }
70
- jQuery( 'a[data-attr-position="'+clicked_incentive+'"]' ).parent( '.file-remove-wrapper' ).find( 'img.incentive-image-preview' ).remove()
71
- jQuery( 'a[data-attr-position="'+clicked_incentive+'"]' ).parent( '.file-remove-wrapper' ).append( file_container ).find( 'a' );
72
  }
1
+ jQuery(document).ready(function($){
2
+ $('body').on('click','#upload-btn',function(e) {
3
+ var clicked_incentive = parseInt( $( this ).attr( 'data-attr-position' ) );
4
+ e.preventDefault();
5
+ var image = wp.media({
6
+ title: 'Upload Image',
7
+ // mutiple: true if you want to upload multiple files at once
8
+ multiple: false
9
+ }).open()
10
+ .on('select', function(e){
11
+ // This will return the selected image from the Media Uploader, the result is an object
12
+ var uploaded_image = image.state().get('selection').first();
13
+ // We convert uploaded_image to a JSON object to make accessing it easier
14
+ // Output to the console uploaded_image
15
+ var image_url = uploaded_image.toJSON().url;
16
+ if( uploaded_image.toJSON().hasOwnProperty( 'sizes' ) ) {
17
+ if( uploaded_image.toJSON().sizes.medium ) {
18
+ var size = uploaded_image.toJSON().sizes.medium.width;
19
+ } else if( uploaded_image.toJSON().sizes.full ) {
20
+ var size = uploaded_image.toJSON().sizes.full.width;
21
+ } else {
22
+ var size = '';
23
+ }
24
+ }
25
+ // Let's assign the url value to the input field
26
+ $( 'input[data-attr-position="'+clicked_incentive+'"]' ).prev().val( image_url );
27
+ populate_file_container( image_url, clicked_incentive );
28
+ // adjust file container size
29
+ $( 'a[data-attr-position="'+clicked_incentive+'"]' ).next().attr( 'width' , size+'px' ).css({ 'max-width' : size+'px', 'width' : '100%' });
30
+ $( 'a[data-attr-position="'+clicked_incentive+'"]' ).parents( '.file-container' ).show()
31
+ });
32
+ });
33
+ });
34
+
35
+
36
+ function populate_file_container( image_url, clicked_incentive ) {
37
+ var extension = image_url.substr( ( image_url.lastIndexOf('.') +1) );
38
+ switch(extension) {
39
+ case 'jpg':
40
+ case 'png':
41
+ case 'gif':
42
+ var file_container = '<img src="'+image_url+'" class="incentive-image-preview">'; // There's was a typo in the example where
43
+ break; // the alert ended with pdf instead of gif.
44
+ case 'zip':
45
+ case 'rar':
46
+ var file_container = '<img src="'+localized_data.wp_includes_url+'/archive.png" class="incentive-image-preview archive-image">'; // There's was a typo in the example where
47
+ break;
48
+ case 'pdf':
49
+ var file_container = '<img src="'+localized_data.wp_includes_url+'/document.png" class="incentive-image-preview pdf-image">'; // There's was a typo in the example where
50
+ break;
51
+ case 'mp3':
52
+ case 'wav':
53
+ case 'wma':
54
+ var file_container = '<img src="'+localized_data.wp_includes_url+'/audio.png" class="incentive-image-preview audio-image">'; // There's was a typo in the example where
55
+ break;
56
+ case 'mp4':
57
+ case 'avi':
58
+ case 'mpg':
59
+ case 'mov':
60
+ case 'qt':
61
+ case 'mpeg':
62
+ case '3gp':
63
+ case 'ogm':
64
+ case 'ogg':
65
+ var file_container = '<img src="'+localized_data.wp_includes_url+'/video.png" class="incentive-image-preview video-image">'; // There's was a typo in the example where
66
+ break;
67
+ default:
68
+ alert('who knows');
69
+ }
70
+ jQuery( 'a[data-attr-position="'+clicked_incentive+'"]' ).parent( '.file-remove-wrapper' ).find( 'img.incentive-image-preview' ).remove()
71
+ jQuery( 'a[data-attr-position="'+clicked_incentive+'"]' ).parent( '.file-remove-wrapper' ).append( file_container ).find( 'a' );
72
  }
admin/partials/helpers/fields/yikes-mailchimp-checkbox-field.php CHANGED
@@ -1,20 +1,20 @@
1
- <?php
2
- /*
3
- * Standard Checkbox Input Field
4
- *
5
- * For help on using, see our documentation [https://yikesplugins.com/support/knowledge-base/product/easy-forms-for-mailchimp/]
6
- * @since 6.0
7
- */
8
- if ( is_string( $form_data['custom_fields'] ) ) {
9
- $field_data = json_decode( $form_data['custom_fields'] , true );
10
- } elseif ( is_array( $form_data['custom_fields'] ) ) {
11
- $field_data = $form_data['custom_fields'];
12
- }
13
- ?>
14
- <label class="custom-field-section">
15
- <strong><?php echo $field['label']; ?></strong>
16
- <input type="checkbox" class="widefat" name="custom-field[<?php echo $field['id']; ?>]" id="custom-field" value="1" <?php checked( isset( $field_data[$field['id']] ) ? $field_data[$field['id']] : 0, 1, true ); ?>>
17
- <?php if( isset( $field['description'] ) && $field['description'] != '' ) { ?>
18
- <p class="description"><?php echo $field['description']; ?></p>
19
- <?php } ?>
20
- </label>
1
+ <?php
2
+ /*
3
+ * Standard Checkbox Input Field
4
+ *
5
+ * For help on using, see our documentation [https://yikesplugins.com/support/knowledge-base/product/easy-forms-for-mailchimp/]
6
+ * @since 6.0
7
+ */
8
+ if ( is_string( $form_data['custom_fields'] ) ) {
9
+ $field_data = json_decode( $form_data['custom_fields'] , true );
10
+ } elseif ( is_array( $form_data['custom_fields'] ) ) {
11
+ $field_data = $form_data['custom_fields'];
12
+ }
13
+ ?>
14
+ <label class="custom-field-section">
15
+ <strong><?php echo $field['label']; ?></strong>
16
+ <input type="checkbox" class="widefat" name="custom-field[<?php echo $field['id']; ?>]" id="custom-field" value="1" <?php checked( isset( $field_data[$field['id']] ) ? $field_data[$field['id']] : 0, 1, true ); ?>>
17
+ <?php if( isset( $field['description'] ) && $field['description'] != '' ) { ?>
18
+ <p class="description"><?php echo $field['description']; ?></p>
19
+ <?php } ?>
20
+ </label>
admin/partials/helpers/fields/yikes-mailchimp-file-field.php CHANGED
@@ -1,42 +1,42 @@
1
- <?php
2
- /*
3
- * Upload File Input Field
4
- *
5
- * For help on using, see our documentation [https://yikesplugins.com/support/knowledge-base/product/easy-forms-for-mailchimp/]
6
- * @since 6.0
7
- */
8
- if ( is_string( $form_data['custom_fields'] ) ) {
9
- $field_data = json_decode( $form_data['custom_fields'] , true );
10
- } elseif ( is_array( $form_data['custom_fields'] ) ) {
11
- $field_data = $form_data['custom_fields'];
12
- }
13
-
14
- // This will enqueue the Media Uploader script
15
- wp_enqueue_media();
16
- // And let's not forget the script we wrote earlier
17
- wp_enqueue_script( 'yikes-mailchimp-file-field-script', plugin_dir_url( __FILE__ ) . 'js/yikes-mc-file-upload.js', array( 'jquery' ), '1.0', false );
18
- // print_r( $field_data );
19
- wp_localize_script( 'yikes-mailchimp-file-field-script' , 'additional_data' , array(
20
- 'wp_includes_image_url' => includes_url() . 'images/media/'
21
- ) );
22
- $i = 1;
23
- // create an single item array when nothing is stored yet, loop for one field
24
- $field_data['incentive-attachment'] = ( isset( $field_data['incentive-attachment'] ) && !empty( $field_data['incentive-attachment'] ) ) ? $field_data['incentive-attachment'] : array( '' );
25
- ?>
26
-
27
- <div class="yikes-mailchimp-file-field">
28
- <label for="image_url" class="widefat"><strong><?php echo $field['label']; ?></strong></label>
29
- <?php foreach( $field_data['incentive-attachment'] as $attachment ) { ?>
30
- <input type="text" name="custom-field[<?php echo $field['id']; ?>][<?php echo $i; ?>]" id="custom-field[<?php echo $field['id']; ?>][<?php echo $i; ?>]" class="file-attachment" value="<?php echo isset( $field_data[$field['id']][$i] ) ? $field_data[$field['id']][$i] : ''; ?>">
31
- <input type="button" name="upload-btn" id="upload-btn" class="button-secondary" data-attr-position="<?php echo $i; ?>" value="<?php _e( 'Upload File' , 'yikes-inc-easy-mailchimp-extender' ); ?>">
32
- <div class="file-container">
33
- <p class="file-remove-wrapper">
34
- <a href="#" class="remove-file-button" data-attr-position="<?php echo $i; ?>"><?php _e( 'Remove File' , 'yikes-inc-easy-mailchimp-extender' ); ?></a>
35
- </p>
36
- </div>
37
- <?php $i++; } ?>
38
- <?php if( isset( $field['repeat'] ) ) { ?>
39
- <a href="#" class="button-secondary add-new-incentive-attachment" data-attr-position="<?php echo $i; ?>"><span class="dashicons dashicons-plus"></span></a>
40
- <?php } ?>
41
- <p class="description"><?php echo $field['description']; ?></p>
42
  </div>
1
+ <?php
2
+ /*
3
+ * Upload File Input Field
4
+ *
5
+ * For help on using, see our documentation [https://yikesplugins.com/support/knowledge-base/product/easy-forms-for-mailchimp/]
6
+ * @since 6.0
7
+ */
8
+ if ( is_string( $form_data['custom_fields'] ) ) {
9
+ $field_data = json_decode( $form_data['custom_fields'] , true );
10
+ } elseif ( is_array( $form_data['custom_fields'] ) ) {
11
+ $field_data = $form_data['custom_fields'];
12
+ }
13
+
14
+ // This will enqueue the Media Uploader script
15
+ wp_enqueue_media();
16
+ // And let's not forget the script we wrote earlier
17
+ wp_enqueue_script( 'yikes-mailchimp-file-field-script', plugin_dir_url( __FILE__ ) . 'js/yikes-mc-file-upload.js', array( 'jquery' ), '1.0', false );
18
+ // print_r( $field_data );
19
+ wp_localize_script( 'yikes-mailchimp-file-field-script' , 'additional_data' , array(
20
+ 'wp_includes_image_url' => includes_url() . 'images/media/'
21
+ ) );
22
+ $i = 1;
23
+ // create an single item array when nothing is stored yet, loop for one field
24
+ $field_data['incentive-attachment'] = ( isset( $field_data['incentive-attachment'] ) && !empty( $field_data['incentive-attachment'] ) ) ? $field_data['incentive-attachment'] : array( '' );
25
+ ?>
26
+
27
+ <div class="yikes-mailchimp-file-field">
28
+ <label for="image_url" class="widefat"><strong><?php echo $field['label']; ?></strong></label>
29
+ <?php foreach( $field_data['incentive-attachment'] as $attachment ) { ?>
30
+ <input type="text" name="custom-field[<?php echo $field['id']; ?>][<?php echo $i; ?>]" id="custom-field[<?php echo $field['id']; ?>][<?php echo $i; ?>]" class="file-attachment" value="<?php echo isset( $field_data[$field['id']][$i] ) ? $field_data[$field['id']][$i] : ''; ?>">
31
+ <input type="button" name="upload-btn" id="upload-btn" class="button-secondary" data-attr-position="<?php echo $i; ?>" value="<?php _e( 'Upload File' , 'yikes-inc-easy-mailchimp-extender' ); ?>">
32
+ <div class="file-container">
33
+ <p class="file-remove-wrapper">
34
+ <a href="#" class="remove-file-button" data-attr-position="<?php echo $i; ?>"><?php _e( 'Remove File' , 'yikes-inc-easy-mailchimp-extender' ); ?></a>
35
+ </p>
36
+ </div>
37
+ <?php $i++; } ?>
38
+ <?php if( isset( $field['repeat'] ) ) { ?>
39
+ <a href="#" class="button-secondary add-new-incentive-attachment" data-attr-position="<?php echo $i; ?>"><span class="dashicons dashicons-plus"></span></a>
40
+ <?php } ?>
41
+ <p class="description"><?php echo $field['description']; ?></p>
42
  </div>
admin/partials/helpers/fields/yikes-mailchimp-radio-field.php CHANGED
@@ -1,30 +1,30 @@
1
- <?php
2
- /*
3
- * Standard Radio Input Field
4
- *
5
- * For help on using, see our documentation [https://yikesplugins.com/support/knowledge-base/product/easy-forms-for-mailchimp/]
6
- * @since 6.0
7
- */
8
- if ( is_string( $form_data['custom_fields'] ) ) {
9
- $field_data = json_decode( $form_data['custom_fields'] , true );
10
- } elseif ( is_array( $form_data['custom_fields'] ) ) {
11
- $field_data = $form_data['custom_fields'];
12
- }
13
- ?>
14
- <div class="custom-field-section">
15
- <!-- title -->
16
- <strong><?php echo $field['label']; ?></strong>
17
- <!-- radio buttons -->
18
- <section class="custom-radio-holder">
19
- <?php foreach( $field['options'] as $value => $label ) { ?>
20
- <label class="custom-radio-label">
21
- <input type="radio" name="custom-field[<?php echo $field['id']; ?>][]" id="custom-field" value="<?php echo $value; ?>" <?php if( isset( $field_data[$field['id']] ) ) { checked( $field_data[$field['id']] , $value ); } ?>>
22
- <?php echo $label; ?>
23
- </label>
24
- <?php } ?>
25
- </section>
26
- <!-- description -->
27
- <?php if( isset( $field['description'] ) && $field['description'] != '' ) { ?>
28
- <p class="description"><?php echo $field['description']; ?></p>
29
- <?php } ?>
30
  </div>
1
+ <?php
2
+ /*
3
+ * Standard Radio Input Field
4
+ *
5
+ * For help on using, see our documentation [https://yikesplugins.com/support/knowledge-base/product/easy-forms-for-mailchimp/]
6
+ * @since 6.0
7
+ */
8
+ if ( is_string( $form_data['custom_fields'] ) ) {
9
+ $field_data = json_decode( $form_data['custom_fields'] , true );
10
+ } elseif ( is_array( $form_data['custom_fields'] ) ) {
11
+ $field_data = $form_data['custom_fields'];
12
+ }
13
+ ?>
14
+ <div class="custom-field-section">
15
+ <!-- title -->
16
+ <strong><?php echo $field['label']; ?></strong>
17
+ <!-- radio buttons -->
18
+ <section class="custom-radio-holder">
19
+ <?php foreach( $field['options'] as $value => $label ) { ?>
20
+ <label class="custom-radio-label">
21
+ <input type="radio" name="custom-field[<?php echo $field['id']; ?>][]" id="custom-field" value="<?php echo $value; ?>" <?php if( isset( $field_data[$field['id']] ) ) { checked( $field_data[$field['id']] , $value ); } ?>>
22
+ <?php echo $label; ?>
23
+ </label>
24
+ <?php } ?>
25
+ </section>
26
+ <!-- description -->
27
+ <?php if( isset( $field['description'] ) && $field['description'] != '' ) { ?>
28
+ <p class="description"><?php echo $field['description']; ?></p>
29
+ <?php } ?>
30
  </div>
admin/partials/helpers/fields/yikes-mailchimp-select-field.php CHANGED
@@ -1,29 +1,29 @@
1
- <?php
2
- /*
3
- * Standard Dropdown (select) Field
4
- *
5
- * For help on using, see our documentation [https://yikesplugins.com/support/knowledge-base/product/easy-forms-for-mailchimp/]
6
- * @since 6.0
7
- */
8
- if ( is_string( $form_data['custom_fields'] ) ) {
9
- $field_data = json_decode( $form_data['custom_fields'] , true );
10
- } elseif ( is_array( $form_data['custom_fields'] ) ) {
11
- $field_data = $form_data['custom_fields'];
12
- }
13
- ?>
14
- <div class="custom-field-section">
15
- <!-- title -->
16
- <strong><?php echo $field['label']; ?></strong>
17
-
18
- <!-- Dropdown -->
19
- <select class="custom-select-field" name="custom-field[<?php echo $field['id']; ?>]">
20
- <?php foreach( $field['options'] as $value => $label ) { ?>
21
- <option value="<?php echo $value; ?>" <?php if( isset( $field_data[$field['id']] ) ) { selected( $field_data[$field['id']] , $value ); } ?>><?php echo $label; ?></option>
22
- <?php } ?>
23
- </select>
24
-
25
- <!-- description -->
26
- <?php if( isset( $field['description'] ) && $field['description'] != '' ) { ?>
27
- <p class="description"><?php echo $field['description']; ?></p>
28
- <?php } ?>
29
  </div>
1
+ <?php
2
+ /*
3
+ * Standard Dropdown (select) Field
4
+ *
5
+ * For help on using, see our documentation [https://yikesplugins.com/support/knowledge-base/product/easy-forms-for-mailchimp/]
6
+ * @since 6.0
7
+ */
8
+ if ( is_string( $form_data['custom_fields'] ) ) {
9
+ $field_data = json_decode( $form_data['custom_fields'] , true );
10
+ } elseif ( is_array( $form_data['custom_fields'] ) ) {
11
+ $field_data = $form_data['custom_fields'];
12
+ }
13
+ ?>
14
+ <div class="custom-field-section">
15
+ <!-- title -->
16
+ <strong><?php echo $field['label']; ?></strong>
17
+
18
+ <!-- Dropdown -->
19
+ <select class="custom-select-field" name="custom-field[<?php echo $field['id']; ?>]">
20
+ <?php foreach( $field['options'] as $value => $label ) { ?>
21
+ <option value="<?php echo $value; ?>" <?php if( isset( $field_data[$field['id']] ) ) { selected( $field_data[$field['id']] , $value ); } ?>><?php echo $label; ?></option>
22
+ <?php } ?>
23
+ </select>
24
+
25
+ <!-- description -->
26
+ <?php if( isset( $field['description'] ) && $field['description'] != '' ) { ?>
27
+ <p class="description"><?php echo $field['description']; ?></p>
28
+ <?php } ?>
29
  </div>
admin/partials/helpers/fields/yikes-mailchimp-text-field.php CHANGED
@@ -1,20 +1,20 @@
1
- <?php
2
- /*
3
- * Standard Text Input Field
4
- *
5
- * For help on using, see our documentation [https://yikesplugins.com/support/knowledge-base/product/easy-forms-for-mailchimp/]
6
- * @since 6.0
7
- */
8
- if ( is_string( $form_data['custom_fields'] ) ) {
9
- $field_data = json_decode( $form_data['custom_fields'] , true );
10
- } elseif ( is_array( $form_data['custom_fields'] ) ) {
11
- $field_data = $form_data['custom_fields'];
12
- }
13
- ?>
14
- <label class="custom-field-section">
15
- <strong><?php echo $field['label']; ?></strong>
16
- <input type="text" class="widefat" name="custom-field[<?php echo $field['id']; ?>]" id="custom-field" value="<?php echo isset( $field_data[$field['id']] ) ? $field_data[$field['id']] : ''; ?>" placeholder="<?php echo isset( $field['placeholder'] ) ? $field['placeholder'] : ''; ?>">
17
- <?php if( isset( $field['description'] ) && $field['description'] != '' ) { ?>
18
- <p class="description"><?php echo $field['description']; ?></p>
19
- <?php } ?>
20
  </label>
1
+ <?php
2
+ /*
3
+ * Standard Text Input Field
4
+ *
5
+ * For help on using, see our documentation [https://yikesplugins.com/support/knowledge-base/product/easy-forms-for-mailchimp/]
6
+ * @since 6.0
7
+ */
8
+ if ( is_string( $form_data['custom_fields'] ) ) {
9
+ $field_data = json_decode( $form_data['custom_fields'] , true );
10
+ } elseif ( is_array( $form_data['custom_fields'] ) ) {
11
+ $field_data = $form_data['custom_fields'];
12
+ }
13
+ ?>
14
+ <label class="custom-field-section">
15
+ <strong><?php echo $field['label']; ?></strong>
16
+ <input type="text" class="widefat" name="custom-field[<?php echo $field['id']; ?>]" id="custom-field" value="<?php echo isset( $field_data[$field['id']] ) ? $field_data[$field['id']] : ''; ?>" placeholder="<?php echo isset( $field['placeholder'] ) ? $field['placeholder'] : ''; ?>">
17
+ <?php if( isset( $field['description'] ) && $field['description'] != '' ) { ?>
18
+ <p class="description"><?php echo $field['description']; ?></p>
19
+ <?php } ?>
20
  </label>
admin/partials/helpers/fields/yikes-mailchimp-wysiwyg-field.php CHANGED
@@ -1,23 +1,23 @@
1
- <?php
2
- /*
3
- * WYSIWYG Input Field
4
- * Used to extend the base functionality of the plugin
5
- *
6
- * For help on using, see our documentation [https://yikesplugins.com/support/knowledge-base/product/easy-forms-for-mailchimp/]
7
- * @since 6.0
8
- */
9
- if ( is_string( $form_data['custom_fields'] ) ) {
10
- $field_data = json_decode( $form_data['custom_fields'] , true );
11
- } elseif ( is_array( $form_data['custom_fields'] ) ) {
12
- $field_data = $form_data['custom_fields'];
13
- }
14
-
15
- $content = ( isset( $field_data[$field['id']] ) ) ? $field_data[$field['id']] : ( isset( $field['default'] ) ? $field['default'] : '' );
16
- $wysiwyg_id = 'custom-field['.$field['id'].']';
17
- ?>
18
-
19
- <div class="yikes-mailchimp-wysiwyg-field">
20
- <label for="image_url" class="widefat"><strong><?php echo $field['label']; ?></strong></label>
21
- <?php wp_editor( $content, $field['id'], array( 'textarea_name' => $wysiwyg_id ) ); ?>
22
- <p class="description"><?php echo $field['description']; ?></p>
23
- </div>
1
+ <?php
2
+ /*
3
+ * WYSIWYG Input Field
4
+ * Used to extend the base functionality of the plugin
5
+ *
6
+ * For help on using, see our documentation [https://yikesplugins.com/support/knowledge-base/product/easy-forms-for-mailchimp/]
7
+ * @since 6.0
8
+ */
9
+ if ( is_string( $form_data['custom_fields'] ) ) {
10
+ $field_data = json_decode( $form_data['custom_fields'] , true );
11
+ } elseif ( is_array( $form_data['custom_fields'] ) ) {
12
+ $field_data = $form_data['custom_fields'];
13
+ }
14
+
15
+ $content = ( isset( $field_data[$field['id']] ) ) ? $field_data[$field['id']] : ( isset( $field['default'] ) ? $field['default'] : '' );
16
+ $wysiwyg_id = 'custom-field['.$field['id'].']';
17
+ ?>
18
+
19
+ <div class="yikes-mailchimp-wysiwyg-field">
20
+ <label for="image_url" class="widefat"><strong><?php echo $field['label']; ?></strong></label>
21
+ <?php wp_editor( $content, $field['id'], array( 'textarea_name' => $wysiwyg_id ) ); ?>
22
+ <p class="description"><?php echo $field['description']; ?></p>
23
+ </div>
admin/partials/helpers/free-support.php CHANGED
@@ -1,70 +1,70 @@
1
-
2
- <!-- WordPress.org Support Container -->
3
- <div id="col-container" class="free-support-container">
4
-
5
- <div id="col-left">
6
-
7
- <div class="col-wrap">
8
- <h1><span class="dashicons dashicons-wordpress-alt support-page-wordpress-font"></span>&nbsp;<?php _e( 'WordPress.org Plugin Directory' , 'yikes-inc-easy-mailchimp-extender' ); ?></h1>
9
- <div class="inside">
10
- <p><?php _e( 'Use your WordPress.org username to submit support requests on the WordPress Directory support forum.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
11
- <img class="support-page-logo" src="<?php echo YIKES_MC_URL; ?>includes/images/Support_Page/wordpress-issue-screenshot.png" title="<?php esc_attr_e( 'WordPress.org Issue Tracker Screenshot' , 'yikes-inc-easy-mailchimp-extender' ); ?>" >
12
- <a href="https://wordpress.org/support/plugin/yikes-inc-easy-mailchimp-extender" target="_blank" class="button-secondary support-page-button"><?php _e( 'Submit a New WordPress.org Support Request', 'yikes-inc-easy-mailchimp-extender' ); ?></a>
13
- </div>
14
- </div>
15
- <!-- /col-wrap -->
16
-
17
- </div>
18
- <!-- /col-left -->
19
-
20
- </div>
21
-
22
-
23
- <?php
24
-
25
- /**
26
- * List of Links to our Knowledge Base Articles
27
- */
28
- $knowledge_base_links = array(
29
- array(
30
- 'title' => esc_attr__( 'How do I change the submit button text?', 'yikes-inc-easy-mailchimp-extender' ),
31
- 'href' => 'https://yikesplugins.com/support/knowledge-base/how-do-i-change-the-submit-button-text/',
32
- ),
33
- array(
34
- 'title' => esc_attr__( 'How do I change the field labels?', 'yikes-inc-easy-mailchimp-extender' ),
35
- 'href' => 'https://yikesplugins.com/support/knowledge-base/how-do-i-change-the-field-labels/',
36
- ),
37
- array(
38
- 'title' => esc_attr__( "I don't see all of my Mailchimp lists in the dropdown when I go to make a new form. Why?", 'yikes-inc-easy-mailchimp-extender' ),
39
- 'href' => 'https://yikesplugins.com/support/knowledge-base/im-not-seeing-all-my-lists-on-the-drop-down-menu-when-i-go-to-make-a-new-form/',
40
- ),
41
- array(
42
- 'title' => esc_attr__( 'How do I add new fields to my opt-in form?', 'yikes-inc-easy-mailchimp-extender' ),
43
- 'href' => 'https://yikesplugins.com/support/knowledge-base/how-do-i-add-new-fields-to-my-form/',
44
- ),
45
- array(
46
- 'title' => esc_attr__( 'How do I place all of my form fields on one line?', 'yikes-inc-easy-mailchimp-extender' ),
47
- 'href' => 'https://yikesplugins.com/support/knowledge-base/how-do-i-place-all-of-my-form-fields-on-one-line/',
48
- ),
49
- );
50
-
51
- ?>
52
- <!-- support container -->
53
- <div id="col-container">
54
- <div id="col-left">
55
- <div class="col-wrap">
56
- <?php
57
-
58
- // Loop and display the knowledge base article links
59
- if ( $knowledge_base_links && ! empty( $knowledge_base_links ) ) {
60
- printf( '<h2>' . esc_attr__( 'Popular Knowledge Base Articles', 'yikes-inc-easy-mailchimp-extender' ) . '</h2>' );
61
- printf( '<ol>' );
62
- foreach ( $knowledge_base_links as $kb_link ) {
63
- echo wp_kses_post( '<li><a href="' . esc_url( $kb_link['href'] ) . '" title="' . esc_attr( $kb_link['title'] ) . '" target="_blank">' . esc_attr( $kb_link['title'] ) . '</a></li>' );
64
- }
65
- printf( '</ol>' );
66
- }
67
- ?>
68
- </div>
69
- </div>
70
  </div>
1
+
2
+ <!-- WordPress.org Support Container -->
3
+ <div id="col-container" class="free-support-container">
4
+
5
+ <div id="col-left">
6
+
7
+ <div class="col-wrap">
8
+ <h1><span class="dashicons dashicons-wordpress-alt support-page-wordpress-font"></span>&nbsp;<?php _e( 'WordPress.org Plugin Directory' , 'yikes-inc-easy-mailchimp-extender' ); ?></h1>
9
+ <div class="inside">
10
+ <p><?php _e( 'Use your WordPress.org username to submit support requests on the WordPress Directory support forum.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
11
+ <img class="support-page-logo" src="<?php echo YIKES_MC_URL; ?>includes/images/Support_Page/wordpress-issue-screenshot.png" title="<?php esc_attr_e( 'WordPress.org Issue Tracker Screenshot' , 'yikes-inc-easy-mailchimp-extender' ); ?>" >
12
+ <a href="https://wordpress.org/support/plugin/yikes-inc-easy-mailchimp-extender" target="_blank" class="button-secondary support-page-button"><?php _e( 'Submit a New WordPress.org Support Request', 'yikes-inc-easy-mailchimp-extender' ); ?></a>
13
+ </div>
14
+ </div>
15
+ <!-- /col-wrap -->
16
+
17
+ </div>
18
+ <!-- /col-left -->
19
+
20
+ </div>
21
+
22
+
23
+ <?php
24
+
25
+ /**
26
+ * List of Links to our Knowledge Base Articles
27
+ */
28
+ $knowledge_base_links = array(
29
+ array(
30
+ 'title' => esc_attr__( 'How do I change the submit button text?', 'yikes-inc-easy-mailchimp-extender' ),
31
+ 'href' => 'https://yikesplugins.com/support/knowledge-base/how-do-i-change-the-submit-button-text/',
32
+ ),
33
+ array(
34
+ 'title' => esc_attr__( 'How do I change the field labels?', 'yikes-inc-easy-mailchimp-extender' ),
35
+ 'href' => 'https://yikesplugins.com/support/knowledge-base/how-do-i-change-the-field-labels/',
36
+ ),
37
+ array(
38
+ 'title' => esc_attr__( "I don't see all of my Mailchimp lists in the dropdown when I go to make a new form. Why?", 'yikes-inc-easy-mailchimp-extender' ),
39
+ 'href' => 'https://yikesplugins.com/support/knowledge-base/im-not-seeing-all-my-lists-on-the-drop-down-menu-when-i-go-to-make-a-new-form/',
40
+ ),
41
+ array(
42
+ 'title' => esc_attr__( 'How do I add new fields to my opt-in form?', 'yikes-inc-easy-mailchimp-extender' ),
43
+ 'href' => 'https://yikesplugins.com/support/knowledge-base/how-do-i-add-new-fields-to-my-form/',
44
+ ),
45
+ array(
46
+ 'title' => esc_attr__( 'How do I place all of my form fields on one line?', 'yikes-inc-easy-mailchimp-extender' ),
47
+ 'href' => 'https://yikesplugins.com/support/knowledge-base/how-do-i-place-all-of-my-form-fields-on-one-line/',
48
+ ),
49
+ );
50
+
51
+ ?>
52
+ <!-- support container -->
53
+ <div id="col-container">
54
+ <div id="col-left">
55
+ <div class="col-wrap">
56
+ <?php
57
+
58
+ // Loop and display the knowledge base article links
59
+ if ( $knowledge_base_links && ! empty( $knowledge_base_links ) ) {
60
+ printf( '<h2>' . esc_attr__( 'Popular Knowledge Base Articles', 'yikes-inc-easy-mailchimp-extender' ) . '</h2>' );
61
+ printf( '<ol>' );
62
+ foreach ( $knowledge_base_links as $kb_link ) {
63
+ echo wp_kses_post( '<li><a href="' . esc_url( $kb_link['href'] ) . '" title="' . esc_attr( $kb_link['title'] ) . '" target="_blank">' . esc_attr( $kb_link['title'] ) . '</a></li>' );
64
+ }
65
+ printf( '</ol>' );
66
+ }
67
+ ?>
68
+ </div>
69
+ </div>
70
  </div>
admin/partials/helpers/init.php CHANGED
@@ -1,76 +1,76 @@
1
- <?php
2
- /*
3
- * Main class file that houses many of our
4
- * Helper functions (adding custom sections to edit form page etc.)
5
- * @since 6.0
6
- */
7
- class Yikes_Inc_Easy_Mailchimp_Extender_Helper {
8
-
9
- /**
10
- * Helper functions to help out with extensions (still fleshing out)
11
- * @since 6.0
12
- * @ Parameters (array of data)
13
- * - Section ID - id of the section, should be a slug style text ie: 'custom-section'
14
- * - Link Text - Visible text for this link ie: 'Custom Section'
15
- * - Dashicon - class of the icon you would like to use for this link
16
- **/
17
- public static function add_edit_form_section_link( $link_array=array() ) {
18
- if( !empty( $link_array ) ) {
19
- $link_data = wp_parse_args( array() , $link_array );
20
- if( !empty( $link_data['text'] ) && !empty( $link_data['id'] ) ) {
21
- if( !empty( $link_data['icon'] ) ) {
22
- if( !isset( $link_data['icon_family'] ) || $link_data['icon_family'] == 'dashicons' || $link_data['icon_family'] == 'dashicon' ) {
23
- $icon = '<span class="dashicons dashicons-' . esc_attr__( $link_data['icon'] ) . ' yikes-easy-mailchimp-custom-content-icon"></span>';
24
- } else {
25
- $icon = '<span class="' . esc_attr__( $link_data['icon'] ) . ' yikes-easy-mailchimp-custom-content-icon"></span>';
26
- }
27
- } else {
28
- $icon = '';
29
- }
30
- $link = '<li class="hidden_setting_list">';
31
- $link .= '<a class="hidden_setting ' . esc_attr__( $link_data['id'] ) . '" data-attr-container="' . esc_attr__( $link_data['id'] ) . '" onclick="return false;" title="' . esc_attr__( $link_data['text'] ) . '" href="#">' . $icon . esc_attr__( $link_data['text'] ) . '</a>';
32
- $link .= '</li>';
33
- echo $link;
34
- }
35
- }
36
- }
37
-
38
- /**
39
- * Helper functions to help out with extensions (still fleshing out)
40
- * @since 6.0
41
- * @ Parameters:
42
- * - Section ID - id of the section, should be a slug style text ie: 'custom-section'
43
- * - Class - class file to call function from?
44
- * - Main Callback - call back for main section
45
- * - Main Section Title - main section title
46
- * - Sidebar Callback - callback for the sidebar section
47
- * - Sidebar Title - title of the sidebar section
48
- * - Class - class to reference funtions out of (optiona, if left blank functions should be defined in functions.php (or outside of a class))
49
- **/
50
- public static function add_edit_form_section( $section_array=array() ) {
51
- if( !empty( $section_array ) ) {
52
- $section_data = wp_parse_args( array() , $section_array );
53
- ob_start();
54
- include ( YIKES_MC_PATH . 'admin/partials/helpers/edit-form-hidden-section-template.php' );
55
- $section = ob_get_contents();
56
- ob_end_clean();
57
- echo $section;
58
- }
59
- }
60
-
61
- /**
62
- * Check if the custom section is single or two columns (with sidebar)
63
- * @since 6.0
64
- * @Parameters:
65
- * - Section Data - the array of data associated with the custom field you've set up
66
- */
67
- public static function is_custom_section_two_column( $custom_section_data ) {
68
- // print_r( $custom_section_data );
69
- $value = ( isset( $custom_section_data['sidebar_title'] ) && isset( $custom_section_data['sidebar_fields'] ) && !empty( $custom_section_data['sidebar_fields'] ) ) ? true : false;
70
- return $value;
71
- }
72
-
73
- }
74
- new Yikes_Inc_Easy_Mailchimp_Extender_Helper;
75
-
76
  ?>
1
+ <?php
2
+ /*
3
+ * Main class file that houses many of our
4
+ * Helper functions (adding custom sections to edit form page etc.)
5
+ * @since 6.0
6
+ */
7
+ class Yikes_Inc_Easy_Mailchimp_Extender_Helper {
8
+
9
+ /**
10
+ * Helper functions to help out with extensions (still fleshing out)
11
+ * @since 6.0
12
+ * @ Parameters (array of data)
13
+ * - Section ID - id of the section, should be a slug style text ie: 'custom-section'
14
+ * - Link Text - Visible text for this link ie: 'Custom Section'
15
+ * - Dashicon - class of the icon you would like to use for this link
16
+ **/
17
+ public static function add_edit_form_section_link( $link_array=array() ) {
18
+ if( !empty( $link_array ) ) {
19
+ $link_data = wp_parse_args( array() , $link_array );
20
+ if( !empty( $link_data['text'] ) && !empty( $link_data['id'] ) ) {
21
+ if( !empty( $link_data['icon'] ) ) {
22
+ if( !isset( $link_data['icon_family'] ) || $link_data['icon_family'] == 'dashicons' || $link_data['icon_family'] == 'dashicon' ) {
23
+ $icon = '<span class="dashicons dashicons-' . esc_attr__( $link_data['icon'] ) . ' yikes-easy-mailchimp-custom-content-icon"></span>';
24
+ } else {
25
+ $icon = '<span class="' . esc_attr__( $link_data['icon'] ) . ' yikes-easy-mailchimp-custom-content-icon"></span>';
26
+ }
27
+ } else {
28
+ $icon = '';
29
+ }
30
+ $link = '<li class="hidden_setting_list">';
31
+ $link .= '<a class="hidden_setting ' . esc_attr__( $link_data['id'] ) . '" data-attr-container="' . esc_attr__( $link_data['id'] ) . '" onclick="return false;" title="' . esc_attr__( $link_data['text'] ) . '" href="#">' . $icon . esc_attr__( $link_data['text'] ) . '</a>';
32
+ $link .= '</li>';
33
+ echo $link;
34
+ }
35
+ }
36
+ }
37
+
38
+ /**
39
+ * Helper functions to help out with extensions (still fleshing out)
40
+ * @since 6.0
41
+ * @ Parameters:
42
+ * - Section ID - id of the section, should be a slug style text ie: 'custom-section'
43
+ * - Class - class file to call function from?
44
+ * - Main Callback - call back for main section
45
+ * - Main Section Title - main section title
46
+ * - Sidebar Callback - callback for the sidebar section
47
+ * - Sidebar Title - title of the sidebar section
48
+ * - Class - class to reference funtions out of (optiona, if left blank functions should be defined in functions.php (or outside of a class))
49
+ **/
50
+ public static function add_edit_form_section( $section_array=array() ) {
51
+ if( !empty( $section_array ) ) {
52
+ $section_data = wp_parse_args( array() , $section_array );
53
+ ob_start();
54
+ include ( YIKES_MC_PATH . 'admin/partials/helpers/edit-form-hidden-section-template.php' );
55
+ $section = ob_get_contents();
56
+ ob_end_clean();
57
+ echo $section;
58
+ }
59
+ }
60
+
61
+ /**
62
+ * Check if the custom section is single or two columns (with sidebar)
63
+ * @since 6.0
64
+ * @Parameters:
65
+ * - Section Data - the array of data associated with the custom field you've set up
66
+ */
67
+ public static function is_custom_section_two_column( $custom_section_data ) {
68
+ // print_r( $custom_section_data );
69
+ $value = ( isset( $custom_section_data['sidebar_title'] ) && isset( $custom_section_data['sidebar_fields'] ) && !empty( $custom_section_data['sidebar_fields'] ) ) ? true : false;
70
+ return $value;
71
+ }
72
+
73
+ }
74
+ new Yikes_Inc_Easy_Mailchimp_Extender_Helper;
75
+
76
  ?>
admin/partials/helpers/premium-support.php CHANGED
@@ -1,75 +1,75 @@
1
-
2
-
3
- <div id="col-container">
4
- <div id="col-left">
5
- <div class="col-wrap">
6
- <h2 class="premium-support-title"><?php _e( 'Priority & Add-on Support', 'yikes-inc-easy-mailchimp-extender' ); ?></h2>
7
-
8
- <?php
9
- if ( isset( $_POST['submit-premium-support-request'] ) ) {
10
- ?>
11
- <h4><?php _e( 'Success!', 'yikes-inc-easy-mailchimp-extender' ); ?></h2>
12
- <p><?php _e( 'We have received your support request and will get in touch shortly regarding your issue.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
13
- <?php
14
- }
15
- ?>
16
-
17
- <!-- Premium Support Form -->
18
- <form id="premium-support-form" method="post" action="<?php echo esc_url( admin_url( 'admin.php?page=yikes-inc-easy-mailchimp-support#premium-support-form' ) ); ?>" <?php echo (isset($_POST['submit-premium-support-request'])) ? 'class="support-form-hidden"' : ''; ?>>
19
-
20
- <label><?php _e( 'Add-On:', 'yikes-inc-easy-mailchimp-extender' ); ?>
21
- <select name="license_key" id="license-key">
22
- <?php
23
- foreach ( $addons as $extension ) {
24
-
25
- // get the license for the respective extension
26
- $options = get_option( 'yikes-mailchimp-' . $extension . '-settings', array() );
27
-
28
- if ( isset( $options['license'] ) && $options['status'] == 'valid' ) {
29
- echo '<option data-plugin-slug="' . esc_attr( $extension ) . '" data-plugin-name="' . esc_attr( ucwords( str_replace( '-', ' ', $extension ) ) ) . '" value="' . esc_attr( trim( $options['license'] ) ) . '">' . ucwords( str_replace( '-', ' ', $extension ) ) . ' ' . '</option>';
30
- }
31
- }
32
- ?>
33
- </select>
34
- <p class="description"><?php _e( 'Select the add-on that you are looking for help with.' , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
35
-
36
- <input type="hidden" name="plugin-slug" id="plugin-slug" value="">
37
- <input type="hidden" name="plugin-name" id="plugin-name" value="">
38
- </label>
39
-
40
- <label><?php _e( 'Name:', 'yikes-inc-easy-mailchimp-extender' ); ?>
41
- <input type="text" name="user-name" required>
42
- <p class="description"><?php _e( 'Enter your name.' , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
43
- </label>
44
-
45
- <label><?php _e( 'Contact Email:', 'yikes-inc-easy-mailchimp-extender' ); ?>
46
- <input type="email" name="user-email" required>
47
- <p class="description"><?php _e( 'Enter the email address you would prefer to be contact at.' , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
48
- </label>
49
-
50
- <label><?php _e( 'Topic:', 'yikes-inc-easy-mailchimp-extender' ); ?>
51
- <input type="text" name="support-topic" required>
52
- <p class="description"><?php _e( 'Pleae enter the topic of your support request.' , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
53
- </label>
54
-
55
- <label><?php _e( 'Priority:', 'yikes-inc-easy-mailchimp-extender' ); ?>
56
- <select name="support-priority">
57
- <option value="1"><?php _e( 'Low' , 'yikes-inc-easy-mailchimp-extender' ); ?></option>
58
- <option value="2"><?php _e( 'Medium' , 'yikes-inc-easy-mailchimp-extender' ); ?></option>
59
- <option value="3"><?php _e( 'High' , 'yikes-inc-easy-mailchimp-extender' ); ?></option>
60
- <option value="4"><?php _e( 'Urgent' , 'yikes-inc-easy-mailchimp-extender' ); ?></option>
61
- </select>
62
- <p class="description"><?php _e( 'Select the priority of this ticket.' , 'yikes-inc-easy-mailchimp-extender' ); ?><em><?php _e( 'Note: Please do not abuse "urgent".' , 'yikes-inc-easy-mailchimp-extender' ); ?></em></p>
63
- </label>
64
- <label><?php _e( 'Issue:', 'yikes-inc-easy-mailchimp-extender' ); ?>
65
- <?php wp_editor( '', 'support-content', array( 'textarea_name' => 'support-content', 'media_buttons' => false ) ); ?>
66
- <p class="description"><?php _e( 'Enter as much detail about the issue you are encontering as possible. After we make initial contact you can attach any screenshots necessary.' , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
67
- </label>
68
-
69
- <input type="hidden" name="action" value="yikes-support-request">
70
- <?php echo submit_button( 'Request Support', 'primary', 'submit-premium-support-request' ); ?>
71
- <p class="description"></p>
72
- </form>
73
- </div>
74
- </div>
75
  </div>
1
+
2
+
3
+ <div id="col-container">
4
+ <div id="col-left">
5
+ <div class="col-wrap">
6
+ <h2 class="premium-support-title"><?php _e( 'Priority & Add-on Support', 'yikes-inc-easy-mailchimp-extender' ); ?></h2>
7
+
8
+ <?php
9
+ if ( isset( $_POST['submit-premium-support-request'] ) ) {
10
+ ?>
11
+ <h4><?php _e( 'Success!', 'yikes-inc-easy-mailchimp-extender' ); ?></h2>
12
+ <p><?php _e( 'We have received your support request and will get in touch shortly regarding your issue.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
13
+ <?php
14
+ }
15
+ ?>
16
+
17
+ <!-- Premium Support Form -->
18
+ <form id="premium-support-form" method="post" action="<?php echo esc_url( admin_url( 'admin.php?page=yikes-inc-easy-mailchimp-support#premium-support-form' ) ); ?>" <?php echo (isset($_POST['submit-premium-support-request'])) ? 'class="support-form-hidden"' : ''; ?>>
19
+
20
+ <label><?php _e( 'Add-On:', 'yikes-inc-easy-mailchimp-extender' ); ?>
21
+ <select name="license_key" id="license-key">
22
+ <?php
23
+ foreach ( $addons as $extension ) {
24
+
25
+ // get the license for the respective extension
26
+ $options = get_option( 'yikes-mailchimp-' . $extension . '-settings', array() );
27
+
28
+ if ( isset( $options['license'] ) && $options['status'] == 'valid' ) {
29
+ echo '<option data-plugin-slug="' . esc_attr( $extension ) . '" data-plugin-name="' . esc_attr( ucwords( str_replace( '-', ' ', $extension ) ) ) . '" value="' . esc_attr( trim( $options['license'] ) ) . '">' . ucwords( str_replace( '-', ' ', $extension ) ) . ' ' . '</option>';
30
+ }
31
+ }
32
+ ?>
33
+ </select>
34
+ <p class="description"><?php _e( 'Select the add-on that you are looking for help with.' , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
35
+
36
+ <input type="hidden" name="plugin-slug" id="plugin-slug" value="">
37
+ <input type="hidden" name="plugin-name" id="plugin-name" value="">
38
+ </label>
39
+
40
+ <label><?php _e( 'Name:', 'yikes-inc-easy-mailchimp-extender' ); ?>
41
+ <input type="text" name="user-name" required>
42
+ <p class="description"><?php _e( 'Enter your name.' , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
43
+ </label>
44
+
45
+ <label><?php _e( 'Contact Email:', 'yikes-inc-easy-mailchimp-extender' ); ?>
46
+ <input type="email" name="user-email" required>
47
+ <p class="description"><?php _e( 'Enter the email address you would prefer to be contact at.' , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
48
+ </label>
49
+
50
+ <label><?php _e( 'Topic:', 'yikes-inc-easy-mailchimp-extender' ); ?>
51
+ <input type="text" name="support-topic" required>
52
+ <p class="description"><?php _e( 'Pleae enter the topic of your support request.' , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
53
+ </label>
54
+
55
+ <label><?php _e( 'Priority:', 'yikes-inc-easy-mailchimp-extender' ); ?>
56
+ <select name="support-priority">
57
+ <option value="1"><?php _e( 'Low' , 'yikes-inc-easy-mailchimp-extender' ); ?></option>
58
+ <option value="2"><?php _e( 'Medium' , 'yikes-inc-easy-mailchimp-extender' ); ?></option>
59
+ <option value="3"><?php _e( 'High' , 'yikes-inc-easy-mailchimp-extender' ); ?></option>
60
+ <option value="4"><?php _e( 'Urgent' , 'yikes-inc-easy-mailchimp-extender' ); ?></option>
61
+ </select>
62
+ <p class="description"><?php _e( 'Select the priority of this ticket.' , 'yikes-inc-easy-mailchimp-extender' ); ?><em><?php _e( 'Note: Please do not abuse "urgent".' , 'yikes-inc-easy-mailchimp-extender' ); ?></em></p>
63
+ </label>
64
+ <label><?php _e( 'Issue:', 'yikes-inc-easy-mailchimp-extender' ); ?>
65
+ <?php wp_editor( '', 'support-content', array( 'textarea_name' => 'support-content', 'media_buttons' => false ) ); ?>
66
+ <p class="description"><?php _e( 'Enter as much detail about the issue you are encontering as possible. After we make initial contact you can attach any screenshots necessary.' , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
67
+ </label>
68
+
69
+ <input type="hidden" name="action" value="yikes-support-request">
70
+ <?php echo submit_button( 'Request Support', 'primary', 'submit-premium-support-request' ); ?>
71
+ <p class="description"></p>
72
+ </form>
73
+ </div>
74
+ </div>
75
  </div>
admin/partials/menu/add-ons.php CHANGED
@@ -1,35 +1,35 @@
1
- <?php
2
- /**
3
- * Main page to list our current add-ons
4
- * @since 6.0.0
5
- */
6
- ?>
7
- <div class="wrap">
8
-
9
- <!-- Freddie Logo -->
10
- <img src="<?php echo esc_url( YIKES_MC_URL . 'includes/images/Mailchimp_Assets/Freddie_60px.png' ); ?>" alt="<?php esc_attr_e( 'Freddie - Mailchimp Mascot' , 'yikes-inc-easy-mailchimp-extender' ); ?>" class="yikes-mc-freddie-logo" />
11
-
12
- <h1>Easy Forms for Mailchimp | <?php echo esc_attr__( 'Add-Ons' , 'yikes-inc-easy-mailchimp-extender' ); ?> &nbsp; <a href="https://yikesplugins.com/plugins/?plugins=Mailchimp" target="_blank" class="button-primary coming-soon-button" title="<?php esc_attr_e( 'View All Add-Ons' , 'yikes-inc-easy-mailchimp-extender' ); ?>"><?php esc_attr_e( 'View All Add-Ons' , 'yikes-inc-easy-mailchimp-extender' ); ?> <span class="dashicons dashicons-external"></span></a></h1>
13
-
14
- <!-- Addons Page Description -->
15
- <p class="yikes-easy-mc-about-text about-text"><?php esc_attr_e( "Below you'll find all free and paid add-ons available for Easy Forms for Mailchimp. Each add-on extends the functionality of the free plugin." , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
16
-
17
- <!-- Add-On Container -->
18
- <section id="add-ons">
19
-
20
- <?php
21
- $add_ons = glob( YIKES_MC_PATH . 'includes/add_ons/*.php' );
22
- if ( $add_ons && ! empty( $add_ons ) ) {
23
- ob_start();
24
- foreach ( $add_ons as $add_on_path ) {
25
- include_once( $add_on_path );
26
- }
27
- $add_on_content = ob_get_contents();
28
- ob_get_clean();
29
- }
30
- echo wp_kses_post( $add_on_content );
31
- ?>
32
-
33
- </section>
34
-
35
- </div>
1
+ <?php
2
+ /**
3
+ * Main page to list our current add-ons
4
+ * @since 6.0.0
5
+ */
6
+ ?>
7
+ <div class="wrap">
8
+
9
+ <!-- Freddie Logo -->
10
+ <img src="<?php echo esc_url( YIKES_MC_URL . 'includes/images/Mailchimp_Assets/Freddie_60px.png' ); ?>" alt="<?php esc_attr_e( 'Freddie - Mailchimp Mascot' , 'yikes-inc-easy-mailchimp-extender' ); ?>" class="yikes-mc-freddie-logo" />
11
+
12
+ <h1>Easy Forms for Mailchimp | <?php echo esc_attr__( 'Add-Ons' , 'yikes-inc-easy-mailchimp-extender' ); ?> &nbsp; <a href="https://yikesplugins.com/plugins/?plugins=Mailchimp" target="_blank" class="button-primary coming-soon-button" title="<?php esc_attr_e( 'View All Add-Ons' , 'yikes-inc-easy-mailchimp-extender' ); ?>"><?php esc_attr_e( 'View All Add-Ons' , 'yikes-inc-easy-mailchimp-extender' ); ?> <span class="dashicons dashicons-external"></span></a></h1>
13
+
14
+ <!-- Addons Page Description -->
15
+ <p class="yikes-easy-mc-about-text about-text"><?php esc_attr_e( "Below you'll find all free and paid add-ons available for Easy Forms for Mailchimp. Each add-on extends the functionality of the free plugin." , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
16
+
17
+ <!-- Add-On Container -->
18
+ <section id="add-ons">
19
+
20
+ <?php
21
+ $add_ons = glob( YIKES_MC_PATH . 'includes/add_ons/*.php' );
22
+ if ( $add_ons && ! empty( $add_ons ) ) {
23
+ ob_start();
24
+ foreach ( $add_ons as $add_on_path ) {
25
+ include_once( $add_on_path );
26
+ }
27
+ $add_on_content = ob_get_contents();
28
+ ob_get_clean();
29
+ }
30
+ echo wp_kses_post( $add_on_content );
31
+ ?>
32
+
33
+ </section>
34
+
35
+ </div>
admin/partials/menu/manage-forms.php CHANGED
@@ -1,254 +1,254 @@
1
- <?php
2
-
3
- // Get all of our forms
4
- $form_interface = yikes_easy_mailchimp_extender_get_form_interface();
5
-
6
- $all_forms = $form_interface->get_all_forms();
7
-
8
- /* Store Data if User is Authorized */
9
- if( $this->is_user_mc_api_valid_form( false ) == 'valid' ) {
10
- $list_data = yikes_get_mc_api_manager()->get_list_handler()->get_lists();
11
- if ( is_wp_error( $list_data ) ) {
12
- $error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
13
- $error_logging->maybe_write_to_log(
14
- $list_data->get_error_code(),
15
- __( "Get Account Lists" , 'yikes-inc-easy-mailchimp-extender' ),
16
- "Manage Forms Page"
17
- );
18
- $list_data = array();
19
- }
20
- } else {
21
- $list_data = array();
22
- }
23
- ?>
24
- <div class="wrap">
25
- <!-- Freddie Logo -->
26
- <img src="<?php echo YIKES_MC_URL . 'includes/images/Mailchimp_Assets/Freddie_60px.png'; ?>" alt="<?php _e( 'Freddie - Mailchimp Mascot' , 'yikes-inc-easy-mailchimp-extender' ); ?>" class="yikes-mc-freddie-logo" />
27
-
28
- <h1>Easy Forms for Mailchimp | <?php _e( 'Manage Forms' , 'yikes-inc-easy-mailchimp-extender' ) ?></h1>
29
-
30
- <!-- Settings Page Description -->
31
- <p class="yikes-easy-mc-about-text about-text"><?php _e( 'Create and manage your Mailchimp forms.' , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
32
-
33
- <!-- Action Notices -->
34
- <?php
35
-
36
- /* If the user hasn't authenticated yet, lets kill off */
37
- if( get_option( 'yikes-mc-api-validation' , 'invalid_api_key' ) != 'valid_api_key' ) {
38
- wp_die( '<div class="error"><p>' . sprintf( __( 'You need to connect to Mailchimp before you can start creating forms. Head over to the <a href="%s" title="Settings Page">Settings Page</a> and enter your API key.' , 'yikes-inc-easy-mailchimp-extender' ), esc_url_raw( admin_url( 'admin.php?page=yikes-inc-easy-mailchimp-settings' ) ) ) . '</p></div>' , 500 );
39
- }
40
-
41
- /* Display our admin notices here */
42
- // delete form success
43
- if( isset( $_REQUEST['deleted-form'] ) && $_REQUEST['deleted-form'] == 'true' ) {
44
- ?>
45
- <div class="updated manage-form-admin-notice">
46
- <p><?php _e( 'Opt-in form successfully deleted.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
47
- </div>
48
- <?php
49
- }
50
- // duplicate form success
51
- if( isset( $_REQUEST['duplicated-form'] ) && $_REQUEST['duplicated-form'] == 'true' ) {
52
- ?>
53
- <div class="updated manage-form-admin-notice">
54
- <p><?php _e( 'Mailchimp Form successfully cloned.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
55
- </div>
56
- <?php
57
- }
58
- // duplicate form error
59
- if( isset( $_REQUEST['duplicated-form'] ) && $_REQUEST['duplicated-form'] == 'false' ) {
60
- ?>
61
- <div class="error manage-form-admin-notice">
62
- <p><?php _e( 'There was an error trying to clone your form. Please try again. If this error persists, please contact the YIKES Inc. support team.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
63
- </div>
64
- <?php
65
- }
66
- // reset form submission stats success
67
- if( isset( $_REQUEST['reset-stats'] ) && $_REQUEST['reset-stats'] == 'true' ) {
68
- ?>
69
- <div class="updated manage-form-admin-notice">
70
- <p><?php _e( 'Form submission stats/rates successfully reset.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
71
- </div>
72
- <?php
73
- }
74
- // reset form submission stats error
75
- if( isset( $_REQUEST['reset-stats'] ) && $_REQUEST['reset-stats'] == 'false' ) {
76
- ?>
77
- <div class="error manage-form-admin-notice">
78
- <p><?php _e( 'There was an error trying to reset the form submission stats/rates. Please try again. If this error persists, please contact the YIKES Inc. support team.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
79
- </div>
80
- <?php
81
- }
82
- ?>
83
-
84
- <!-- entire body content -->
85
- <div id="poststuff">
86
-
87
- <div id="post-body" class="metabox-holder columns-2">
88
-
89
- <!-- main content -->
90
- <div id="post-body-content">
91
-
92
- <div class="meta-box-sortables ui-sortable">
93
-
94
- <div class="postbox yikes-easy-mc-postbox">
95
-
96
- <table class="wp-list-table widefat fixed posts" cellspacing="0" id="yikes-easy-mc-manage-forms-table">
97
-
98
- <!-- TABLE HEAD -->
99
- <thead>
100
- <tr>
101
- <th id="cb" class="manage-column column-cb check-column num" scope="col"><input type="checkbox" /></th>
102
- <th id="columnname" class="manage-column column-columnname num yikes-form-id-number" scope="col"><?php _e( 'ID' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
103
- <th id="columnname" class="manage-column column-columnname" scope="col"><?php _e( 'Form Name' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
104
- <th id="columnname" class="manage-column column-columnname" scope="col"><?php _e( 'Form Description' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
105
- <th id="columnname" class="manage-column column-columnname" scope="col"><?php _e( 'List' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
106
- <th id="columnname" class="manage-column column-columnname num" scope="col"><?php _e( 'Impressions' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
107
- <th id="columnname" class="manage-column column-columnname num" scope="col" ><?php _e( 'Submissions' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
108
- <th id="columnname" class="manage-column column-columnname num" scope="col"><?php _e( 'Conversion Rate' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
109
- </tr>
110
- </thead>
111
- <!-- end header -->
112
-
113
- <!-- FOOTER -->
114
- <tfoot>
115
- <tr>
116
- <th class="manage-column column-cb check-column num" scope="col"><input type="checkbox" /></th>
117
- <th id="columnname" class="manage-column column-columnname num yikes-form-id-number" scope="col"><?php _e( 'ID' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
118
- <th id="columnname" class="manage-column column-columnname" scope="col"><?php _e( 'Form Name' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
119
- <th id="columnname" class="manage-column column-columnname" scope="col"><?php _e( 'Form Description' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
120
- <th class="manage-column column-columnname" scope="col"><?php _e( 'List' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
121
- <th id="columnname" class="manage-column column-columnname num" scope="col"><?php _e( 'Impressions' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
122
- <th id="columnname" class="manage-column column-columnname num" scope="col"><?php _e( 'Submissions' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
123
- <th id="columnname" class="manage-column column-columnname num" scope="col"><?php _e( 'Conversion Rate' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
124
- </tr>
125
- </tfoot>
126
- <!-- end footer -->
127
-
128
- <!-- TABLE BODY -->
129
- <tbody>
130
- <?php
131
- if ( count( $all_forms ) > 0 ) {
132
- $i = 1;
133
- foreach( $all_forms as $id => $form ) {
134
- ?>
135
- <tr class="<?php if( $i % 2 == 0 ) { echo 'alternate'; } ?>">
136
- <th class="check-column num" scope="row"><input type="checkbox" /></th>
137
- <td class="column-columnname num"><span class="form-id-container"><?php echo intval( $id ); ?></span></td>
138
- <td class="column-columnname">
139
- <!-- row title/link -->
140
- <a href="<?php echo esc_url_raw( add_query_arg( array( 'id' => $id ) , admin_url( 'admin.php?page=yikes-mailchimp-edit-form' ) ) ); ?>" class="row-title">
141
- <?php echo stripslashes( $form['form_name'] ); ?>
142
- </a>
143
- <div class="row-actions">
144
- <span><a href="<?php echo esc_url_raw( add_query_arg( array( 'id' => $id ) , admin_url( 'admin.php?page=yikes-mailchimp-edit-form' ) ) ); ?>"><?php _e( "Edit" , 'yikes-inc-easy-mailchimp-extender' ); ?></a> |</span>
145
- <span><a href="<?php echo esc_url_raw( add_query_arg( array( 'action' => 'yikes-easy-mc-duplicate-form', 'mailchimp-form' => $id , 'nonce' => wp_create_nonce( 'duplicate-mailchimp-form-'.$id ) ) , admin_url( 'admin.php?page=yikes-inc-easy-mailchimp' ) ) ); ?>"><?php _e( "Duplicate" , 'yikes-inc-easy-mailchimp-extender' ); ?></a> |</span>
146
- <span><a href="<?php echo esc_url_raw( add_query_arg( array( 'action' => 'yikes-easy-mc-reset-stats', 'mailchimp-form' => $id , 'nonce' => wp_create_nonce( 'reset-stats-mailchimp-form-'.$id ) ) , admin_url( 'admin.php?page=yikes-inc-easy-mailchimp' ) ) ); ?>"><?php _e( "Reset Stats" , 'yikes-inc-easy-mailchimp-extender' ); ?></a> |</span>
147
- <span><a href="#" class="view-yikes-mc-form-shortcode" data-alt-text="<?php _e( 'Stats' , 'yikes-inc-easy-mailchimp-extender' ); ?>"><?php _e( "Shortcode" , 'yikes-inc-easy-mailchimp-extender' ); ?></a> |</span>
148
- <?php
149
- /*
150
- * Custom action to allow users to add additional action links
151
- * to each form. We use this in our add-ons.
152
- * - Delete should remain last
153
- */
154
- do_action( 'yikes-mailchimp-custom-form-actions' , $id );
155
- ?>
156
- <span><a href="<?php echo esc_url_raw( add_query_arg( array( 'action' => 'yikes-easy-mc-delete-form', 'mailchimp-form' => $id , 'nonce' => wp_create_nonce( 'delete-mailchimp-form-'.$id ) ) , admin_url( 'admin.php?page=yikes-inc-easy-mailchimp' ) ) ); ?>" class="yikes-delete-mailchimp-form" onclick="return confirm('<?php printf( __( 'Are you sure you want to delete the %s form? This cannot be undone.' , 'yikes-inc-easy-mailchimp-extender' ), stripslashes( $form['form_name'] ) ); ?>');"><?php _e( "Delete" , 'yikes-inc-easy-mailchimp-extender' ); ?></a></span>
157
- </div>
158
- </td>
159
-
160
- <td class="column-columnname"><?php echo isset( $form['form_description'] ) ? str_replace( '[yikes-mailchimp-subscriber-count]', do_shortcode( '[yikes-mailchimp-subscriber-count form="' . $id . '"]' ), $form['form_description'] ) : ''; ?></td>
161
- <td class="column-columnname">
162
- <?php
163
- if ( $list_data && count( $list_data ) > 0 ) {
164
- $parsed = wp_list_pluck( $list_data, 'name', 'id' );
165
- if ( isset( $parsed[ $form['list_id'] ] ) ) {
166
- echo esc_textarea( $parsed[ $form['list_id'] ] );
167
- } else {
168
- echo '<strong>' . __( 'List Not Found', 'yikes-inc-easy-mailchimp-extender' ) . '</strong>';
169
- }
170
- } ?>
171
- </td>
172
-
173
- <td class="column-columnname num stat-container">
174
- <?php
175
- $impressions = number_format( $form['impressions'] );
176
- echo '<span title="' . __( 'Impressions' , 'yikes-inc-easy-mailchimp-extender' ) . '">' . $impressions . '</span>';
177
- ?>
178
- </td>
179
- <td class="column-columnname num stat-container">
180
- <?php
181
- $submissions = number_format( $form['submissions'] );
182
- echo '<span title="' . __( 'Submissions' , 'yikes-inc-easy-mailchimp-extender' ) . '">' . $submissions . '</span>';
183
- ?>
184
- </td>
185
- <td class="column-columnname num stat-container">
186
- <?php
187
- if( $impressions != 0 ) {
188
- $conversion_rate = ( round( 100 * $form['submissions'] / $form['impressions'] , 3 ) );
189
- if( $conversion_rate >= '15' ) {
190
- $conversion_color = '#00cc00'; // green (unicorn!)
191
- } else if( $conversion_rate < '15' && $conversion_rate >= '10' ) {
192
- $conversion_color = '#0080FF'; // light blue (good)
193
- } else if( $conversion_rate < '10' && $conversion_rate >= '5' ) {
194
- $conversion_color = '#FFFF32'; // yellow (ok)
195
- } else {
196
- $conversion_color = '#FF0000'; // red (no bueno)
197
- }
198
- } else {
199
- $conversion_rate = '0';
200
- $conversion_color = '#333333';
201
- }
202
- echo '<span style="color:' . esc_attr( $conversion_color ) . ';" title="' . esc_attr__( 'Conversion Rate' , 'yikes-inc-easy-mailchimp-extender' ) . '">' . $conversion_rate . '%</span>';
203
- ?>
204
- </td>
205
- <!-- shortcode -->
206
- <td class="column-columnname shortcode hidden-class" colspan="3">
207
- <input type="text" class="yikes-mc-shortcode-input yikes-mc-shortcode-input-<?php echo $id; ?>" onclick="this.setSelectionRange(0, this.value.length)" readonly value='[yikes-mailchimp form="<?php echo $id; ?>"]' />
208
- </td>
209
- </tr>
210
- <?php
211
- $i++;
212
- }
213
- } else { ?>
214
- <tr class="no-items">
215
- <td class="colspanchange no-mailchimp-forms-found" colspan="8"><em><?php _e( 'No Mailchimp forms found. Use the form to the right to create a new one.' , 'yikes-inc-easy-mailchimp-extender' ); ?></em></td>
216
- </tr>
217
- <?php } ?>
218
- </tbody>
219
- </table>
220
- <!-- end table -->
221
-
222
- </div> <!-- .postbox -->
223
-
224
- </div> <!-- .meta-box-sortables .ui-sortable -->
225
-
226
- </div> <!-- post-body-content -->
227
-
228
- <!-- sidebar -->
229
- <div id="postbox-container-1" class="postbox-container">
230
-
231
- <div class="meta-box-sortables">
232
-
233
- <div class="postbox yikes-easy-mc-postbox">
234
-
235
- <?php
236
- $this->generate_manage_forms_sidebar( $list_data );
237
- ?>
238
-
239
- </div> <!-- .postbox -->
240
-
241
- <?php
242
- // display, show some love container
243
- $this->generate_show_some_love_container();
244
- ?>
245
-
246
- </div> <!-- .meta-box-sortables -->
247
-
248
- </div> <!-- #postbox-container-1 .postbox-container -->
249
-
250
- </div> <!-- #post-body .metabox-holder .columns-2 -->
251
-
252
- <br class="clear">
253
- </div> <!-- #poststuff -->
254
- </div>
1
+ <?php
2
+
3
+ // Get all of our forms
4
+ $form_interface = yikes_easy_mailchimp_extender_get_form_interface();
5
+
6
+ $all_forms = $form_interface->get_all_forms();
7
+
8
+ /* Store Data if User is Authorized */
9
+ if( $this->is_user_mc_api_valid_form( false ) == 'valid' ) {
10
+ $list_data = yikes_get_mc_api_manager()->get_list_handler()->get_lists();
11
+ if ( is_wp_error( $list_data ) ) {
12
+ $error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
13
+ $error_logging->maybe_write_to_log(
14
+ $list_data->get_error_code(),
15
+ __( "Get Account Lists" , 'yikes-inc-easy-mailchimp-extender' ),
16
+ "Manage Forms Page"
17
+ );
18
+ $list_data = array();
19
+ }
20
+ } else {
21
+ $list_data = array();
22
+ }
23
+ ?>
24
+ <div class="wrap">
25
+ <!-- Freddie Logo -->
26
+ <img src="<?php echo YIKES_MC_URL . 'includes/images/Mailchimp_Assets/Freddie_60px.png'; ?>" alt="<?php _e( 'Freddie - Mailchimp Mascot' , 'yikes-inc-easy-mailchimp-extender' ); ?>" class="yikes-mc-freddie-logo" />
27
+
28
+ <h1>Easy Forms for Mailchimp | <?php _e( 'Manage Forms' , 'yikes-inc-easy-mailchimp-extender' ) ?></h1>
29
+
30
+ <!-- Settings Page Description -->
31
+ <p class="yikes-easy-mc-about-text about-text"><?php _e( 'Create and manage your Mailchimp forms.' , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
32
+
33
+ <!-- Action Notices -->
34
+ <?php
35
+
36
+ /* If the user hasn't authenticated yet, lets kill off */
37
+ if( get_option( 'yikes-mc-api-validation' , 'invalid_api_key' ) != 'valid_api_key' ) {
38
+ wp_die( '<div class="error"><p>' . sprintf( __( 'You need to connect to Mailchimp before you can start creating forms. Head over to the <a href="%s" title="Settings Page">Settings Page</a> and enter your API key.' , 'yikes-inc-easy-mailchimp-extender' ), esc_url_raw( admin_url( 'admin.php?page=yikes-inc-easy-mailchimp-settings' ) ) ) . '</p></div>' , 500 );
39
+ }
40
+
41
+ /* Display our admin notices here */
42
+ // delete form success
43
+ if( isset( $_REQUEST['deleted-form'] ) && $_REQUEST['deleted-form'] == 'true' ) {
44
+ ?>
45
+ <div class="updated manage-form-admin-notice">
46
+ <p><?php _e( 'Opt-in form successfully deleted.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
47
+ </div>
48
+ <?php
49
+ }
50
+ // duplicate form success
51
+ if( isset( $_REQUEST['duplicated-form'] ) && $_REQUEST['duplicated-form'] == 'true' ) {
52
+ ?>
53
+ <div class="updated manage-form-admin-notice">
54
+ <p><?php _e( 'Mailchimp Form successfully cloned.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
55
+ </div>
56
+ <?php
57
+ }
58
+ // duplicate form error
59
+ if( isset( $_REQUEST['duplicated-form'] ) && $_REQUEST['duplicated-form'] == 'false' ) {
60
+ ?>
61
+ <div class="error manage-form-admin-notice">
62
+ <p><?php _e( 'There was an error trying to clone your form. Please try again. If this error persists, please contact the YIKES Inc. support team.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
63
+ </div>
64
+ <?php
65
+ }
66
+ // reset form submission stats success
67
+ if( isset( $_REQUEST['reset-stats'] ) && $_REQUEST['reset-stats'] == 'true' ) {
68
+ ?>
69
+ <div class="updated manage-form-admin-notice">
70
+ <p><?php _e( 'Form submission stats/rates successfully reset.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
71
+ </div>
72
+ <?php
73
+ }
74
+ // reset form submission stats error
75
+ if( isset( $_REQUEST['reset-stats'] ) && $_REQUEST['reset-stats'] == 'false' ) {
76
+ ?>
77
+ <div class="error manage-form-admin-notice">
78
+ <p><?php _e( 'There was an error trying to reset the form submission stats/rates. Please try again. If this error persists, please contact the YIKES Inc. support team.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
79
+ </div>
80
+ <?php
81
+ }
82
+ ?>
83
+
84
+ <!-- entire body content -->
85
+ <div id="poststuff">
86
+
87
+ <div id="post-body" class="metabox-holder columns-2">
88
+
89
+ <!-- main content -->
90
+ <div id="post-body-content">
91
+
92
+ <div class="meta-box-sortables ui-sortable">
93
+
94
+ <div class="postbox yikes-easy-mc-postbox">
95
+
96
+ <table class="wp-list-table widefat fixed posts" cellspacing="0" id="yikes-easy-mc-manage-forms-table">
97
+
98
+ <!-- TABLE HEAD -->
99
+ <thead>
100
+ <tr>
101
+ <th id="cb" class="manage-column column-cb check-column num" scope="col"><input type="checkbox" /></th>
102
+ <th id="columnname" class="manage-column column-columnname num yikes-form-id-number" scope="col"><?php _e( 'ID' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
103
+ <th id="columnname" class="manage-column column-columnname" scope="col"><?php _e( 'Form Name' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
104
+ <th id="columnname" class="manage-column column-columnname" scope="col"><?php _e( 'Form Description' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
105
+ <th id="columnname" class="manage-column column-columnname" scope="col"><?php _e( 'List' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
106
+ <th id="columnname" class="manage-column column-columnname num" scope="col"><?php _e( 'Impressions' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
107
+ <th id="columnname" class="manage-column column-columnname num" scope="col" ><?php _e( 'Submissions' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
108
+ <th id="columnname" class="manage-column column-columnname num" scope="col"><?php _e( 'Conversion Rate' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
109
+ </tr>
110
+ </thead>
111
+ <!-- end header -->
112
+
113
+ <!-- FOOTER -->
114
+ <tfoot>
115
+ <tr>
116
+ <th class="manage-column column-cb check-column num" scope="col"><input type="checkbox" /></th>
117
+ <th id="columnname" class="manage-column column-columnname num yikes-form-id-number" scope="col"><?php _e( 'ID' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
118
+ <th id="columnname" class="manage-column column-columnname" scope="col"><?php _e( 'Form Name' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
119
+ <th id="columnname" class="manage-column column-columnname" scope="col"><?php _e( 'Form Description' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
120
+ <th class="manage-column column-columnname" scope="col"><?php _e( 'List' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
121
+ <th id="columnname" class="manage-column column-columnname num" scope="col"><?php _e( 'Impressions' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
122
+ <th id="columnname" class="manage-column column-columnname num" scope="col"><?php _e( 'Submissions' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
123
+ <th id="columnname" class="manage-column column-columnname num" scope="col"><?php _e( 'Conversion Rate' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
124
+ </tr>
125
+ </tfoot>
126
+ <!-- end footer -->
127
+
128
+ <!-- TABLE BODY -->
129
+ <tbody>
130
+ <?php
131
+ if ( count( $all_forms ) > 0 ) {
132
+ $i = 1;
133
+ foreach( $all_forms as $id => $form ) {
134
+ ?>
135
+ <tr class="<?php if( $i % 2 == 0 ) { echo 'alternate'; } ?>">
136
+ <th class="check-column num" scope="row"><input type="checkbox" /></th>
137
+ <td class="column-columnname num"><span class="form-id-container"><?php echo intval( $id ); ?></span></td>
138
+ <td class="column-columnname">
139
+ <!-- row title/link -->
140
+ <a href="<?php echo esc_url_raw( add_query_arg( array( 'id' => $id ) , admin_url( 'admin.php?page=yikes-mailchimp-edit-form' ) ) ); ?>" class="row-title">
141
+ <?php echo stripslashes( $form['form_name'] ); ?>
142
+ </a>
143
+ <div class="row-actions">
144
+ <span><a href="<?php echo esc_url_raw( add_query_arg( array( 'id' => $id ) , admin_url( 'admin.php?page=yikes-mailchimp-edit-form' ) ) ); ?>"><?php _e( "Edit" , 'yikes-inc-easy-mailchimp-extender' ); ?></a> |</span>
145
+ <span><a href="<?php echo esc_url_raw( add_query_arg( array( 'action' => 'yikes-easy-mc-duplicate-form', 'mailchimp-form' => $id , 'nonce' => wp_create_nonce( 'duplicate-mailchimp-form-'.$id ) ) , admin_url( 'admin.php?page=yikes-inc-easy-mailchimp' ) ) ); ?>"><?php _e( "Duplicate" , 'yikes-inc-easy-mailchimp-extender' ); ?></a> |</span>
146
+ <span><a href="<?php echo esc_url_raw( add_query_arg( array( 'action' => 'yikes-easy-mc-reset-stats', 'mailchimp-form' => $id , 'nonce' => wp_create_nonce( 'reset-stats-mailchimp-form-'.$id ) ) , admin_url( 'admin.php?page=yikes-inc-easy-mailchimp' ) ) ); ?>"><?php _e( "Reset Stats" , 'yikes-inc-easy-mailchimp-extender' ); ?></a> |</span>
147
+ <span><a href="#" class="view-yikes-mc-form-shortcode" data-alt-text="<?php _e( 'Stats' , 'yikes-inc-easy-mailchimp-extender' ); ?>"><?php _e( "Shortcode" , 'yikes-inc-easy-mailchimp-extender' ); ?></a> |</span>
148
+ <?php
149
+ /*
150
+ * Custom action to allow users to add additional action links
151
+ * to each form. We use this in our add-ons.
152
+ * - Delete should remain last
153
+ */
154
+ do_action( 'yikes-mailchimp-custom-form-actions' , $id );
155
+ ?>
156
+ <span><a href="<?php echo esc_url_raw( add_query_arg( array( 'action' => 'yikes-easy-mc-delete-form', 'mailchimp-form' => $id , 'nonce' => wp_create_nonce( 'delete-mailchimp-form-'.$id ) ) , admin_url( 'admin.php?page=yikes-inc-easy-mailchimp' ) ) ); ?>" class="yikes-delete-mailchimp-form" onclick="return confirm('<?php printf( __( 'Are you sure you want to delete the %s form? This cannot be undone.' , 'yikes-inc-easy-mailchimp-extender' ), stripslashes( $form['form_name'] ) ); ?>');"><?php _e( "Delete" , 'yikes-inc-easy-mailchimp-extender' ); ?></a></span>
157
+ </div>
158
+ </td>
159
+
160
+ <td class="column-columnname"><?php echo isset( $form['form_description'] ) ? str_replace( '[yikes-mailchimp-subscriber-count]', do_shortcode( '[yikes-mailchimp-subscriber-count form="' . $id . '"]' ), $form['form_description'] ) : ''; ?></td>
161
+ <td class="column-columnname">
162
+ <?php
163
+ if ( $list_data && count( $list_data ) > 0 ) {
164
+ $parsed = wp_list_pluck( $list_data, 'name', 'id' );
165
+ if ( isset( $parsed[ $form['list_id'] ] ) ) {
166
+ echo esc_textarea( $parsed[ $form['list_id'] ] );
167
+ } else {
168
+ echo '<strong>' . __( 'List Not Found', 'yikes-inc-easy-mailchimp-extender' ) . '</strong>';
169
+ }
170
+ } ?>
171
+ </td>
172
+
173
+ <td class="column-columnname num stat-container">
174
+ <?php
175
+ $impressions = number_format( $form['impressions'] );
176
+ echo '<span title="' . __( 'Impressions' , 'yikes-inc-easy-mailchimp-extender' ) . '">' . $impressions . '</span>';
177
+ ?>
178
+ </td>
179
+ <td class="column-columnname num stat-container">
180
+ <?php
181
+ $submissions = number_format( $form['submissions'] );
182
+ echo '<span title="' . __( 'Submissions' , 'yikes-inc-easy-mailchimp-extender' ) . '">' . $submissions . '</span>';
183
+ ?>
184
+ </td>
185
+ <td class="column-columnname num stat-container">
186
+ <?php
187
+ if( $impressions != 0 ) {
188
+ $conversion_rate = ( round( 100 * $form['submissions'] / $form['impressions'] , 3 ) );
189
+ if( $conversion_rate >= '15' ) {
190
+ $conversion_color = '#00cc00'; // green (unicorn!)
191
+ } else if( $conversion_rate < '15' && $conversion_rate >= '10' ) {
192
+ $conversion_color = '#0080FF'; // light blue (good)
193
+ } else if( $conversion_rate < '10' && $conversion_rate >= '5' ) {
194
+ $conversion_color = '#FFFF32'; // yellow (ok)
195
+ } else {
196
+ $conversion_color = '#FF0000'; // red (no bueno)
197
+ }
198
+ } else {
199
+ $conversion_rate = '0';
200
+ $conversion_color = '#333333';
201
+ }
202
+ echo '<span style="color:' . esc_attr( $conversion_color ) . ';" title="' . esc_attr__( 'Conversion Rate' , 'yikes-inc-easy-mailchimp-extender' ) . '">' . $conversion_rate . '%</span>';
203
+ ?>
204
+ </td>
205
+ <!-- shortcode -->
206
+ <td class="column-columnname shortcode hidden-class" colspan="3">
207
+ <input type="text" class="yikes-mc-shortcode-input yikes-mc-shortcode-input-<?php echo $id; ?>" onclick="this.setSelectionRange(0, this.value.length)" readonly value='[yikes-mailchimp form="<?php echo $id; ?>"]' />
208
+ </td>
209
+ </tr>
210
+ <?php
211
+ $i++;
212
+ }
213
+ } else { ?>
214
+ <tr class="no-items">
215
+ <td class="colspanchange no-mailchimp-forms-found" colspan="8"><em><?php _e( 'No Mailchimp forms found. Use the form to the right to create a new one.' , 'yikes-inc-easy-mailchimp-extender' ); ?></em></td>
216
+ </tr>
217
+ <?php } ?>
218
+ </tbody>
219
+ </table>
220
+ <!-- end table -->
221
+
222
+ </div> <!-- .postbox -->
223
+
224
+ </div> <!-- .meta-box-sortables .ui-sortable -->
225
+
226
+ </div> <!-- post-body-content -->
227
+
228
+ <!-- sidebar -->
229
+ <div id="postbox-container-1" class="postbox-container">
230
+
231
+ <div class="meta-box-sortables">
232
+
233
+ <div class="postbox yikes-easy-mc-postbox">
234
+
235
+ <?php
236
+ $this->generate_manage_forms_sidebar( $list_data );
237
+ ?>
238
+
239
+ </div> <!-- .postbox -->
240
+
241
+ <?php
242
+ // display, show some love container
243
+ $this->generate_show_some_love_container();
244
+ ?>
245
+
246
+ </div> <!-- .meta-box-sortables -->
247
+
248
+ </div> <!-- #postbox-container-1 .postbox-container -->
249
+
250
+ </div> <!-- #post-body .metabox-holder .columns-2 -->
251
+
252
+ <br class="clear">
253
+ </div> <!-- #poststuff -->
254
+ </div>
admin/partials/menu/manage-lists.php CHANGED
@@ -1,207 +1,216 @@
1
- <?php
2
-
3
- // Let's confirm the user has a valid API key stored
4
- if ( ! $this->is_user_mc_api_valid_form( false ) ) {
5
- wp_die( __( 'It looks like you need to re-validate your Mailchimp API key before you can continue.', 'yikes-inc-easy-mailchimp-extender' ), 500 );
6
- }
7
-
8
- $manager = yikes_get_mc_api_manager();
9
-
10
- // Mailchimp Account/Profile info
11
- $account_details = $manager->get_account_handler()->get_account();
12
-
13
- // List data
14
- $list_data = $manager->get_list_handler()->get_lists();
15
- if ( is_wp_error( $list_data ) ) {
16
- $error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
17
- $error_logging->maybe_write_to_log(
18
- $list_data->get_error_code(),
19
- __( "Get Account Lists", 'yikes-inc-easy-mailchimp-extender' ),
20
- "Manage Lists Page"
21
- );
22
- $list_data = array();
23
- }
24
-
25
-
26
-
27
- ?>
28
- <div class="wrap">
29
- <!-- Freddie Logo -->
30
- <img src="<?php echo YIKES_MC_URL . 'includes/images/Mailchimp_Assets/Freddie_60px.png'; ?>" alt="<?php __( 'Freddie - Mailchimp Mascot' , 'yikes-inc-easy-mailchimp-extender' ); ?>" class="yikes-mc-freddie-logo" />
31
-
32
- <h1>Easy Forms for Mailchimp | <?php _e( 'Manage Mailing Lists' , 'yikes-inc-easy-mailchimp-extender' ); ?></h1>
33
-
34
- <!-- Settings Page Description -->
35
- <p class="yikes-easy-mc-about-text about-text"><?php _e( 'Make edits to your Mailchimp lists.' , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
36
-
37
- <?php
38
- /* If the user hasn't authenticated yet, lets kill off */
39
- if( get_option( 'yikes-mc-api-validation' , 'invalid_api_key' ) != 'valid_api_key' ) {
40
-
41
- $error_string = sprintf(
42
- esc_html__( 'You need to connect to Mailchimp before you can start creating forms. Head over to the %s and enter your API key.', 'yikes-inc-easy-mailchimp-extender' ),
43
- sprintf(
44
- '<a href="%s" title="Settings Page">' . esc_html__( 'Settings Page', 'yikes-inc-easy-mailchimp-extender' ) . '</a>',
45
- admin_url( 'admin.php?page=yikes-inc-easy-mailchimp-settings' )
46
- )
47
- );
48
-
49
- echo wp_kses_post(
50
- '<div class="error"><p>' . $error_string . '</p></div>'
51
- );
52
-
53
- exit;
54
-
55
- }
56
- ?>
57
-
58
- <!-- entire body content -->
59
- <div id="poststuff">
60
-
61
- <div id="post-body" class="metabox-holder columns-2">
62
-
63
- <!-- main content -->
64
- <div id="post-body-content">
65
-
66
- <div class="meta-box-sortables ui-sortable">
67
-
68
- <div class="postbox yikes-easy-mc-postbox">
69
-
70
- <table class="wp-list-table widefat fixed posts" cellspacing="0" id="yikes-easy-mc-manage-forms-table">
71
-
72
- <!-- TABLE HEAD -->
73
- <thead>
74
- <tr>
75
- <th id="columnname" class="manage-column column-columnname" scope="col"><?php _e( 'List Name' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
76
- <th id="columnname" class="manage-column column-columnname num" scope="col"><?php _e( 'Subscriber Count' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
77
- </tr>
78
- </thead>
79
- <!-- end header -->
80
-
81
- <!-- FOOTER -->
82
- <tfoot>
83
- <tr>
84
- <th class="manage-column column-columnname" scope="col"><?php _e( 'List Name' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
85
- <th class="manage-column column-columnname num" scope="col"><?php _e( 'Subscriber Count' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
86
- </tr>
87
- </tfoot>
88
- <!-- end footer -->
89
-
90
- <!-- TABLE BODY -->
91
- <tbody>
92
- <?php if( count( $list_data ) > 0 ) {
93
- $i = 1;
94
- foreach( $list_data as $list ) {
95
- ?>
96
- <tr class="<?php if( $i % 2 == 0 ) { echo 'alternate'; } ?>">
97
- <td class="column-columnname">
98
- <a href="<?php echo esc_url_raw( add_query_arg( array( 'list-id' => $list['id'] ) , admin_url( 'admin.php?page=yikes-mailchimp-view-list' ) ) ); ?>" class="row-title">
99
- <?php echo stripslashes( $list['name'] ); ?>
100
- </a>
101
- <div class="row-actions">
102
- <span><a href="<?php echo esc_url_raw( add_query_arg( array( 'list-id' => $list['id'] ) , admin_url( 'admin.php?page=yikes-mailchimp-view-list' ) ) ); ?>"><?php _e( "View" , 'yikes-inc-easy-mailchimp-extender' ); ?></a></span>
103
- <?php
104
- /*
105
- * Custom action to allow users to add additional action links
106
- * to each list. We use this in our add-ons.
107
- */
108
- do_action( 'yikes-mailchimp-manage-lists-actions', $list );
109
- ?>
110
- </div>
111
- </td>
112
- <td class="column-columnname num"><?php echo $list['stats']['member_count']; ?></td>
113
- </tr>
114
- <?php
115
- $i++;
116
- }
117
- } else {
118
- ?>
119
- <tr class="no-items">
120
- <td class="colspanchange no-mailchimp-lists-found" colspan="3"><em><?php printf( __( 'No Mailchimp lists found. Head over to <a href="%s" title="Mailchimp.com">Mailchimp.com</a> to setup your first mailing list. Once thats done you can head back here to customize it!' , 'yikes-inc-easy-mailchimp-extender' ), esc_url( 'http://mailchimp.com/' ) ); ?></em></td>
121
- </tr>
122
- <?php } ?>
123
- </tbody>
124
- </table>
125
- <!-- end table -->
126
-
127
- </div> <!-- .postbox -->
128
-
129
- </div> <!-- .meta-box-sortables .ui-sortable -->
130
-
131
- </div> <!-- post-body-content -->
132
-
133
- <!-- sidebar -->
134
- <div id="postbox-container-1" class="postbox-container">
135
- <div class="meta-box-sortables">
136
-
137
- <div class="postbox yikes-easy-mc-postbox">
138
- <div class="inside">
139
-
140
- <a href="https://us3.admin.mailchimp.com/" title="<?php _e( 'Mailchimp Site' , 'yikes-inc-easy-mailchimp-extender' ); ?>" target="_blank">
141
- <img src="<?php echo YIKES_MC_URL . 'includes/images/Mailchimp_Assets/mailchimp-logo.png'; ?>" title="<?php _e( 'Mailchimp Site' , 'yikes-inc-easy-mailchimp-extender' ); ?>" class="list-page-mailchimp-logo">
142
- </a>
143
-
144
- </div>
145
- <!-- .inside -->
146
- </div>
147
-
148
- <div class="postbox yikes-easy-mc-postbox list-page-sidebar">
149
- <div class="inside">
150
-
151
- <h2 class="account-status"><?php echo $account_details['username']; ?> <small>(<?php echo $account_details['role']; ?>)</small></h2>
152
-
153
- <img class="mailchimp-avatar" src="<?php echo esc_url_raw( $account_details['avatar_url'] ); ?>" title="<?php echo $account_details['username'] . ' ' . __( "Mailchimp avatar" , 'yikes-inc-easy-mailchimp-extender' ); ?>">
154
-
155
- <table class="form-table" id="account-details-table">
156
- <tr valign="top">
157
- <td scope="row">
158
- <label for="tablecell">
159
- <strong><?php _e( 'Company' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
160
- </label>
161
- </td>
162
- <td><?php echo $account_details['contact']['company']; ?><br /><?php echo $account_details['contact']['city'] . ', ' . $account_details['contact']['state']; ?></td>
163
- </tr>
164
- <tr valign="top">
165
- <td scope="row">
166
- <label for="tablecell">
167
- <strong><?php _e( 'Industry' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
168
- </label>
169
- </td>
170
- <td><?php echo $account_details['account_industry']; ?></td>
171
- </tr>
172
- <tr valign="top">
173
- <td scope="row">
174
- <label for="tablecell">
175
- <strong><?php _e( 'Member Since' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
176
- </label>
177
- </td>
178
- <td><?php echo date( get_option('date_format') , strtotime( $account_details['member_since'] ) ); ?></td>
179
- </tr>
180
- <tr valign="top">
181
- <td scope="row">
182
- <label for="tablecell">
183
- <strong><?php _e( 'Plan Type' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
184
- </label>
185
- </td>
186
- <td><?php echo ucwords( $account_details['pricing_plan_type'] ); ?></td>
187
- </tr>
188
- </table>
189
-
190
- </div>
191
- <!-- .inside -->
192
- </div>
193
- <!-- .postbox -->
194
- <?php
195
- // Generate Show Some Love!
196
- $this->generate_show_some_love_container();
197
- ?>
198
-
199
- </div>
200
- <!-- .meta-box-sortables -->
201
- </div> <!-- #postbox-container-1 .postbox-container -->
202
-
203
- </div> <!-- #post-body .metabox-holder .columns-2 -->
204
-
205
- <br class="clear">
206
- </div> <!-- #poststuff -->
207
- </div>
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // Let's confirm the user has a valid API key stored
4
+ if ( ! $this->is_user_mc_api_valid_form( false ) ) {
5
+ wp_die( __( 'It looks like you need to re-validate your Mailchimp API key before you can continue.', 'yikes-inc-easy-mailchimp-extender' ), 500 );
6
+ }
7
+
8
+ $manager = yikes_get_mc_api_manager();
9
+
10
+ // Mailchimp Account/Profile info
11
+ $account_details = $manager->get_account_handler()->get_account();
12
+ if ( is_wp_error( $account_details ) ) {
13
+ $error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
14
+ $error_logging->maybe_write_to_log(
15
+ $list_data->get_error_code(),
16
+ __( "Get Account", 'yikes-inc-easy-mailchimp-extender' ),
17
+ "Manage Lists Page"
18
+ );
19
+ $account_details = array();
20
+ }
21
+
22
+ // List data
23
+ $list_data = $manager->get_list_handler()->get_lists();
24
+ if ( is_wp_error( $list_data ) ) {
25
+ $error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
26
+ $error_logging->maybe_write_to_log(
27
+ $list_data->get_error_code(),
28
+ __( "Get Account Lists", 'yikes-inc-easy-mailchimp-extender' ),
29
+ "Manage Lists Page"
30
+ );
31
+ $list_data = array();
32
+ }
33
+
34
+
35
+
36
+ ?>
37
+ <div class="wrap">
38
+ <!-- Freddie Logo -->
39
+ <img src="<?php echo YIKES_MC_URL . 'includes/images/Mailchimp_Assets/Freddie_60px.png'; ?>" alt="<?php __( 'Freddie - Mailchimp Mascot' , 'yikes-inc-easy-mailchimp-extender' ); ?>" class="yikes-mc-freddie-logo" />
40
+
41
+ <h1>Easy Forms for Mailchimp | <?php _e( 'Manage Mailing Lists' , 'yikes-inc-easy-mailchimp-extender' ); ?></h1>
42
+
43
+ <!-- Settings Page Description -->
44
+ <p class="yikes-easy-mc-about-text about-text"><?php _e( 'Make edits to your Mailchimp lists.' , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
45
+
46
+ <?php
47
+ /* If the user hasn't authenticated yet, lets kill off */
48
+ if( get_option( 'yikes-mc-api-validation' , 'invalid_api_key' ) != 'valid_api_key' ) {
49
+
50
+ $error_string = sprintf(
51
+ esc_html__( 'You need to connect to Mailchimp before you can start creating forms. Head over to the %s and enter your API key.', 'yikes-inc-easy-mailchimp-extender' ),
52
+ sprintf(
53
+ '<a href="%s" title="Settings Page">' . esc_html__( 'Settings Page', 'yikes-inc-easy-mailchimp-extender' ) . '</a>',
54
+ admin_url( 'admin.php?page=yikes-inc-easy-mailchimp-settings' )
55
+ )
56
+ );
57
+
58
+ echo wp_kses_post(
59
+ '<div class="error"><p>' . $error_string . '</p></div>'
60
+ );
61
+
62
+ exit;
63
+
64
+ }
65
+ ?>
66
+
67
+ <!-- entire body content -->
68
+ <div id="poststuff">
69
+
70
+ <div id="post-body" class="metabox-holder columns-2">
71
+
72
+ <!-- main content -->
73
+ <div id="post-body-content">
74
+
75
+ <div class="meta-box-sortables ui-sortable">
76
+
77
+ <div class="postbox yikes-easy-mc-postbox">
78
+
79
+ <table class="wp-list-table widefat fixed posts" cellspacing="0" id="yikes-easy-mc-manage-forms-table">
80
+
81
+ <!-- TABLE HEAD -->
82
+ <thead>
83
+ <tr>
84
+ <th id="columnname" class="manage-column column-columnname" scope="col"><?php _e( 'List Name' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
85
+ <th id="columnname" class="manage-column column-columnname num" scope="col"><?php _e( 'Subscriber Count' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
86
+ </tr>
87
+ </thead>
88
+ <!-- end header -->
89
+
90
+ <!-- FOOTER -->
91
+ <tfoot>
92
+ <tr>
93
+ <th class="manage-column column-columnname" scope="col"><?php _e( 'List Name' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
94
+ <th class="manage-column column-columnname num" scope="col"><?php _e( 'Subscriber Count' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
95
+ </tr>
96
+ </tfoot>
97
+ <!-- end footer -->
98
+
99
+ <!-- TABLE BODY -->
100
+ <tbody>
101
+ <?php if( count( $list_data ) > 0 ) {
102
+ $i = 1;
103
+ foreach( $list_data as $list ) {
104
+ ?>
105
+ <tr class="<?php if( $i % 2 == 0 ) { echo 'alternate'; } ?>">
106
+ <td class="column-columnname">
107
+ <a href="<?php echo esc_url_raw( add_query_arg( array( 'list-id' => $list['id'] ) , admin_url( 'admin.php?page=yikes-mailchimp-view-list' ) ) ); ?>" class="row-title">
108
+ <?php echo stripslashes( $list['name'] ); ?>
109
+ </a>
110
+ <div class="row-actions">
111
+ <span><a href="<?php echo esc_url_raw( add_query_arg( array( 'list-id' => $list['id'] ) , admin_url( 'admin.php?page=yikes-mailchimp-view-list' ) ) ); ?>"><?php _e( "View" , 'yikes-inc-easy-mailchimp-extender' ); ?></a></span>
112
+ <?php
113
+ /*
114
+ * Custom action to allow users to add additional action links
115
+ * to each list. We use this in our add-ons.
116
+ */
117
+ do_action( 'yikes-mailchimp-manage-lists-actions', $list );
118
+ ?>
119
+ </div>
120
+ </td>
121
+ <td class="column-columnname num"><?php echo $list['stats']['member_count']; ?></td>
122
+ </tr>
123
+ <?php
124
+ $i++;
125
+ }
126
+ } else {
127
+ ?>
128
+ <tr class="no-items">
129
+ <td class="colspanchange no-mailchimp-lists-found" colspan="3"><em><?php printf( __( 'No Mailchimp lists found. Head over to <a href="%s" title="Mailchimp.com">Mailchimp.com</a> to setup your first mailing list. Once thats done you can head back here to customize it!' , 'yikes-inc-easy-mailchimp-extender' ), esc_url( 'http://mailchimp.com/' ) ); ?></em></td>
130
+ </tr>
131
+ <?php } ?>
132
+ </tbody>
133
+ </table>
134
+ <!-- end table -->
135
+
136
+ </div> <!-- .postbox -->
137
+
138
+ </div> <!-- .meta-box-sortables .ui-sortable -->
139
+
140
+ </div> <!-- post-body-content -->
141
+
142
+ <!-- sidebar -->
143
+ <div id="postbox-container-1" class="postbox-container">
144
+ <div class="meta-box-sortables">
145
+
146
+ <div class="postbox yikes-easy-mc-postbox">
147
+ <div class="inside">
148
+
149
+ <a href="https://us3.admin.mailchimp.com/" title="<?php _e( 'Mailchimp Site' , 'yikes-inc-easy-mailchimp-extender' ); ?>" target="_blank">
150
+ <img src="<?php echo YIKES_MC_URL . 'includes/images/Mailchimp_Assets/mailchimp-logo.png'; ?>" title="<?php _e( 'Mailchimp Site' , 'yikes-inc-easy-mailchimp-extender' ); ?>" class="list-page-mailchimp-logo">
151
+ </a>
152
+
153
+ </div>
154
+ <!-- .inside -->
155
+ </div>
156
+
157
+ <div class="postbox yikes-easy-mc-postbox list-page-sidebar">
158
+ <div class="inside">
159
+
160
+ <h2 class="account-status"><?php echo $account_details['username']; ?> <small>(<?php echo $account_details['role']; ?>)</small></h2>
161
+
162
+ <img class="mailchimp-avatar" src="<?php echo esc_url_raw( $account_details['avatar_url'] ); ?>" title="<?php echo $account_details['username'] . ' ' . __( "Mailchimp avatar" , 'yikes-inc-easy-mailchimp-extender' ); ?>">
163
+
164
+ <table class="form-table" id="account-details-table">
165
+ <tr valign="top">
166
+ <td scope="row">
167
+ <label for="tablecell">
168
+ <strong><?php _e( 'Company' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
169
+ </label>
170
+ </td>
171
+ <td><?php echo $account_details['contact']['company']; ?><br /><?php echo $account_details['contact']['city'] . ', ' . $account_details['contact']['state']; ?></td>
172
+ </tr>
173
+ <tr valign="top">
174
+ <td scope="row">
175
+ <label for="tablecell">
176
+ <strong><?php _e( 'Industry' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
177
+ </label>
178
+ </td>
179
+ <td><?php echo $account_details['account_industry']; ?></td>
180
+ </tr>
181
+ <tr valign="top">
182
+ <td scope="row">
183
+ <label for="tablecell">
184
+ <strong><?php _e( 'Member Since' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
185
+ </label>
186
+ </td>
187
+ <td><?php echo date( get_option('date_format') , strtotime( $account_details['member_since'] ) ); ?></td>
188
+ </tr>
189
+ <tr valign="top">
190
+ <td scope="row">
191
+ <label for="tablecell">
192
+ <strong><?php _e( 'Plan Type' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
193
+ </label>
194
+ </td>
195
+ <td><?php echo ucwords( $account_details['pricing_plan_type'] ); ?></td>
196
+ </tr>
197
+ </table>
198
+
199
+ </div>
200
+ <!-- .inside -->
201
+ </div>
202
+ <!-- .postbox -->
203
+ <?php
204
+ // Generate Show Some Love!
205
+ $this->generate_show_some_love_container();
206
+ ?>
207
+
208
+ </div>
209
+ <!-- .meta-box-sortables -->
210
+ </div> <!-- #postbox-container-1 .postbox-container -->
211
+
212
+ </div> <!-- #post-body .metabox-holder .columns-2 -->
213
+
214
+ <br class="clear">
215
+ </div> <!-- #poststuff -->
216
+ </div>
admin/partials/menu/options-sections/api-cache-settings.php CHANGED
@@ -1,21 +1,21 @@
1
- <!--
2
- Mailchimp API Clear Stored Cache Template
3
- - Clear Mailchimp transient data such as forms, form fields, list data, subscribers etc.
4
- * transient cache is stored for 60 minutes.
5
- -->
6
- <h3><span><?php _e( 'API Cache Settings' , 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
7
- <div class="inside">
8
-
9
- <!-- Settings Form -->
10
- <form action="<?php echo esc_url_raw( add_query_arg( array( 'action' => 'yikes-easy-mc-clear-transient-data' , 'nonce' => wp_create_nonce( 'clear-mc-transient-data' ) ) ) ); ?>" method="post">
11
-
12
- <p><?php _e( "Delete all Mailchimp data stored in your sites cache. Most data is stored in the cache for 1 hour." , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
13
- <!-- check if any of our transients contain data -->
14
- <?php if ( false === get_transient( 'yikes-easy-mailchimp-list-data' ) && false === get_transient( 'yikes-easy-mailchimp-profile-data' ) && false === get_transient( 'yikes-easy-mailchimp-account-data' ) && false === get_transient( 'yikesinc_eme_list_ids' ) && false === get_transient( 'yikes_eme_lists' ) ) { ?>
15
- <p><a href="#" class="button-secondary" disabled="disabled" title="<?php _e( 'No Mailchimp data found in temporary cache storage.' , 'yikes-inc-easy-mailchimp-extender' ); ?>"><?php _e( 'Clear Mailchimp API Cache' , 'yikes-inc-easy-mailchimp-extender' ); ?></a></p>
16
- <?php } else { ?>
17
- <p><input type="submit" class="button-primary" value="<?php _e( 'Clear Mailchimp API Cache' , 'yikes-inc-easy-mailchimp-extender' ); ?>" /></p>
18
- <?php } ?>
19
-
20
- </form>
21
- </div> <!-- .inside -->
1
+ <!--
2
+ Mailchimp API Clear Stored Cache Template
3
+ - Clear Mailchimp transient data such as forms, form fields, list data, subscribers etc.
4
+ * transient cache is stored for 60 minutes.
5
+ -->
6
+ <h3><span><?php _e( 'API Cache Settings' , 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
7
+ <div class="inside">
8
+
9
+ <!-- Settings Form -->
10
+ <form action="<?php echo esc_url_raw( add_query_arg( array( 'action' => 'yikes-easy-mc-clear-transient-data' , 'nonce' => wp_create_nonce( 'clear-mc-transient-data' ) ) ) ); ?>" method="post">
11
+
12
+ <p><?php _e( "Delete all Mailchimp data stored in your sites cache. Most data is stored in the cache for 1 hour." , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
13
+ <!-- check if any of our transients contain data -->
14
+ <?php if ( false === get_transient( 'yikes-easy-mailchimp-list-data' ) && false === get_transient( 'yikes-easy-mailchimp-profile-data' ) && false === get_transient( 'yikes-easy-mailchimp-account-data' ) && false === get_transient( 'yikesinc_eme_list_ids' ) && false === get_transient( 'yikes_eme_lists' ) ) { ?>
15
+ <p><a href="#" class="button-secondary" disabled="disabled" title="<?php _e( 'No Mailchimp data found in temporary cache storage.' , 'yikes-inc-easy-mailchimp-extender' ); ?>"><?php _e( 'Clear Mailchimp API Cache' , 'yikes-inc-easy-mailchimp-extender' ); ?></a></p>
16
+ <?php } else { ?>
17
+ <p><input type="submit" class="button-primary" value="<?php _e( 'Clear Mailchimp API Cache' , 'yikes-inc-easy-mailchimp-extender' ); ?>" /></p>
18
+ <?php } ?>
19
+
20
+ </form>
21
+ </div> <!-- .inside -->
admin/partials/menu/options-sections/debug-settings.php CHANGED
@@ -1,61 +1,60 @@
1
- <!--
2
- Mailchimp API Debug Settings / Debug Log Table
3
- - display installation stuff here
4
- - php version, wp version, plugin version and debug log
5
- -->
6
-
7
- <h3><span><?php _e( 'Debug Settings' , 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
8
-
9
- <div class="inside">
10
-
11
- <!-- Settings Form -->
12
- <form action='options.php' method='post'>
13
-
14
- <?php settings_fields( 'yikes_inc_easy_mc_debug_settings_page' ); ?>
15
-
16
- <label for="yikes-mailchimp-debug-status"><strong><?php _e( 'Enable Debugging' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
17
- <input type="checkbox" name="yikes-mailchimp-debug-status" id="yikes-mailchimp-debug-status" value="1" <?php checked( get_option( 'yikes-mailchimp-debug-status' , '' ) , '1' ); ?>>
18
- </label>
19
- <p class="description"><?php _e( "If you encounter an issue with Easy Forms for Mailchimp you can toggle on debugging to display advanced error messages and start logging errors." , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
20
-
21
- <?php submit_button(); ?>
22
-
23
- </form>
24
-
25
- <!-- debug log -->
26
- <section id="yikes-easy-mailchimp-debug-log">
27
-
28
- <?php
29
- $url = esc_url_raw(
30
- add_query_arg(
31
- array(
32
- 'action' => 'yikes-easy-mc-clear-error-log',
33
- 'nonce' => wp_create_nonce( 'clear-yikes-mailchimp-error-log' )
34
- )
35
- )
36
- );
37
- ?>
38
- <h2><?php _e( "Debug Log" , 'yikes-inc-easy-mailchimp-extender' ); ?> &nbsp; <a href="<?php echo $url; ?>" class="button-secondary"><?php _e( 'Clear Log', 'yikes-inc-easy-mailchimp-extender' ); ?></a></h2>
39
-
40
- <table class="widefat" id="yikes-mailchimp-error-log">
41
- <!-- table header -->
42
- <tr>
43
- <th class="row-title"><strong><?php _e( 'Error Message', 'yikes-inc-easy-mailchimp-extender' ); ?></strong></th>
44
- <th><strong><?php _e( 'Error Details', 'yikes-inc-easy-mailchimp-extender' ); ?></strong></th>
45
- </tr>
46
-
47
- <?php
48
- /* Generate oure error logging table */
49
- require_once YIKES_MC_PATH . '/includes/error_log/class-yikes-inc-easy-mailchimp-error-logging.php';
50
- $error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
51
- $error_logging->yikes_easy_mailchimp_generate_error_log_table();
52
- ?>
53
-
54
- <!-- end table body -->
55
-
56
- </table>
57
- <!-- end debug table -->
58
-
59
- </section>
60
-
61
  </div> <!-- .inside -->
1
+ <!--
2
+ Mailchimp API Debug Settings / Debug Log Table
3
+ - display installation stuff here
4
+ - php version, wp version, plugin version and debug log
5
+ -->
6
+ <h3><span><?php _e( 'Debug Settings' , 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
7
+
8
+ <div class="inside">
9
+
10
+ <!-- Settings Form -->
11
+ <form action='options.php' method='post'>
12
+
13
+ <?php settings_fields( 'yikes_inc_easy_mc_debug_settings_page' ); ?>
14
+
15
+ <label for="yikes-mailchimp-debug-status"><strong><?php _e( 'Enable Debugging' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
16
+ <input type="checkbox" name="yikes-mailchimp-debug-status" id="yikes-mailchimp-debug-status" value="1" <?php checked( get_option( 'yikes-mailchimp-debug-status' , '' ) , '1' ); ?>>
17
+ </label>
18
+ <p class="description"><?php _e( "If you encounter an issue with Easy Forms for Mailchimp you can toggle on debugging to display advanced error messages and start logging errors." , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
19
+
20
+ <?php submit_button(); ?>
21
+
22
+ </form>
23
+
24
+ <!-- debug log -->
25
+ <section id="yikes-easy-mailchimp-debug-log">
26
+
27
+ <?php
28
+ $url = esc_url_raw(
29
+ add_query_arg(
30
+ array(
31
+ 'action' => 'yikes-easy-mc-clear-error-log',
32
+ 'nonce' => wp_create_nonce( 'clear-yikes-mailchimp-error-log' )
33
+ )
34
+ )
35
+ );
36
+ ?>
37
+ <h2><?php _e( "Debug Log" , 'yikes-inc-easy-mailchimp-extender' ); ?> &nbsp; <a href="<?php echo $url; ?>" class="button-secondary"><?php _e( 'Clear Log', 'yikes-inc-easy-mailchimp-extender' ); ?></a></h2>
38
+
39
+ <table class="widefat" id="yikes-mailchimp-error-log">
40
+ <!-- table header -->
41
+ <tr>
42
+ <th class="row-title"><strong><?php _e( 'Error Message', 'yikes-inc-easy-mailchimp-extender' ); ?></strong></th>
43
+ <th><strong><?php _e( 'Error Details', 'yikes-inc-easy-mailchimp-extender' ); ?></strong></th>
44
+ </tr>
45
+
46
+ <?php
47
+ /* Generate oure error logging table */
48
+ require_once YIKES_MC_PATH . '/includes/error_log/class-yikes-inc-easy-mailchimp-error-logging.php';
49
+ $error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
50
+ $error_logging->yikes_easy_mailchimp_generate_error_log_table();
51
+ ?>
52
+
53
+ <!-- end table body -->
54
+
55
+ </table>
56
+ <!-- end debug table -->
57
+
58
+ </section>
59
+
 
60
  </div> <!-- .inside -->
admin/partials/menu/options-sections/general-settings.php CHANGED
@@ -1,58 +1,76 @@
1
- <?php
2
- /**
3
- * Generaal Options Page Template
4
- * @since 1.0
5
- */
6
-
7
- // Check if an API Constant is set.
8
- $yikes_mc_api_constant = defined( 'YIKES_MC_API_KEY' );
9
- ?>
10
-
11
- <h3><span><?php _e( 'General Settings' , 'yikes-inc-easy-mailchimp-extender' ); ?></span><?php echo $api_connection; ?></h3>
12
- <div class="inside">
13
-
14
- <!-- Settings Form -->
15
- <form action='options.php' method='post'>
16
-
17
- <?php settings_fields( 'yikes_inc_easy_mc_general_settings_page' ); ?>
18
-
19
- <!-- Start Option Inputs -->
20
-
21
- <!-- Mailchimp API Input Field -->
22
- <label for="yks-mailchimp-api-key">
23
-
24
- <p><?php _e( 'Enter your API key in the field below to connect your site to your Mailchimp account.' , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
25
-
26
- <p><strong><?php _e( 'Mailchimp API Key' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong></p>
27
-
28
- <input autocomplete="off" <?php if ( $yikes_mc_api_constant ) { echo 'readonly="readonly"'; } if( strlen( yikes_get_mc_api_key() ) > 0 ) { ?> type="password" <?php } else { ?> type="text" <?php } ?> value="<?php echo yikes_get_mc_api_key(); ?>" placeholder="<?php _e( 'Mailchimp API Key' , 'yikes-inc-easy-mailchimp-extender' ); ?>" name="yikes-mc-api-key" id="yikes-mc-api-key" class="settings-page-input" />
29
-
30
- <?php if ( $yikes_mc_api_constant ) { ?>
31
- <p class="description"><?php printf( __( "Your Mailchimp API key has been defined using the %s constant, in a PHP file.", "yikes-inc-easy-mailchimp-extender" ), '<code>YIKES_MC_API_KEY</code>' ); ?></p>
32
- <?php } ?>
33
-
34
- <?php echo $api_error_response; ?>
35
-
36
- <?php if ( ! $yikes_mc_api_constant ) { ?>
37
- <p class="description"><small><a href="https://admin.mailchimp.com/account/api" target="_blank" title="<?php _e( 'Get your API key here' , 'yikes-inc-easy-mailchimp-extender' ); ?>"><?php _e( 'Get your API key here' , 'yikes-inc-easy-mailchimp-extender' ); ?></a></small></p>
38
- <?php } ?>
39
-
40
- <p class="description">Warning: changing your API key will break your current forms.</p>
41
- </label>
42
-
43
- <!-- Use Nonce Validation Field -->
44
- <p><strong><?php _e( 'Enable nonce validation on this site?' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong></p>
45
- <label for="yikes-mailchimp-use-nonce-yes">
46
- Yes
47
- <input type="radio" name="yikes-mailchimp-use-nonce" id="yikes-mailchimp-use-nonce-yes" class="settings-page-input" value="1" <?php checked( get_option( 'yikes-mailchimp-use-nonce', '1' ) , '1' ); ?> />
48
- </label>
49
- <label for="yikes-mailchimp-use-nonce-no">
50
- No
51
- <input type="radio" name="yikes-mailchimp-use-nonce" id="yikes-mailchimp-use-nonce-no" class="settings-page-input" value="0" <?php checked( get_option( 'yikes-mailchimp-use-nonce', '1' ) , '0' ); ?> />
52
- </label>
53
-
54
- <?php submit_button(); ?>
55
-
56
- </form>
57
-
58
- </div> <!-- .inside -->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Generaal Options Page Template
4
+ * @since 1.0
5
+ */
6
+
7
+ // Check if an API Constant is set.
8
+ $yikes_mc_api_constant = defined( 'YIKES_MC_API_KEY' );
9
+ $is_akamai_error = false;
10
+
11
+ if ( get_option( 'yikes-mc-api-validation', 'invalid_api_key' ) === 'valid_api_key' ) {
12
+ $list_handler = yikes_get_mc_api_manager()->get_list_handler();
13
+ $connection_test = $list_handler->get_lists( array(), false );
14
+ $is_akamai_error = is_wp_error( $connection_test ) && 503 === (int) $connection_test->get_error_code();
15
+ }
16
+
17
+ if ( $is_akamai_error ) : ?>
18
+ <h3 class="error">
19
+ <span>
20
+ <?php
21
+ /* translators: placeholder is a reference number. */
22
+ echo sprintf( esc_html__( 'ERROR: Connectivity with Mailchimp is blocked by Akamai. Sign up forms will not function properly. %s', 'yikes-inc-easy-mailchimp-extender' ), esc_html( $connection_test->get_error_message( $connection_test->get_error_code() ) ) );
23
+ ?>
24
+ </span>
25
+ </h3>
26
+ <?php else : ?>
27
+ <h3><span><?php _e( 'General Settings' , 'yikes-inc-easy-mailchimp-extender' ); ?></span><?php echo $api_connection; ?></h3>
28
+ <?php endif; ?>
29
+
30
+ <div class="inside">
31
+
32
+ <!-- Settings Form -->
33
+ <form action='options.php' method='post'>
34
+
35
+ <?php settings_fields( 'yikes_inc_easy_mc_general_settings_page' ); ?>
36
+
37
+ <!-- Start Option Inputs -->
38
+
39
+ <!-- Mailchimp API Input Field -->
40
+ <label for="yks-mailchimp-api-key">
41
+
42
+ <p><?php _e( 'Enter your API key in the field below to connect your site to your Mailchimp account.' , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
43
+
44
+ <p><strong><?php _e( 'Mailchimp API Key' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong></p>
45
+
46
+ <input autocomplete="off" <?php if ( $yikes_mc_api_constant ) { echo 'readonly="readonly"'; } if( strlen( yikes_get_mc_api_key() ) > 0 ) { ?> type="password" <?php } else { ?> type="text" <?php } ?> value="<?php echo esc_attr( yikes_get_mc_api_key() ); ?>" placeholder="<?php _e( 'Mailchimp API Key' , 'yikes-inc-easy-mailchimp-extender' ); ?>" name="yikes-mc-api-key" id="yikes-mc-api-key" class="settings-page-input" />
47
+
48
+ <?php if ( $yikes_mc_api_constant ) { ?>
49
+ <p class="description"><?php printf( __( "Your Mailchimp API key has been defined using the %s constant, in a PHP file.", "yikes-inc-easy-mailchimp-extender" ), '<code>YIKES_MC_API_KEY</code>' ); ?></p>
50
+ <?php } ?>
51
+
52
+ <?php echo $api_error_response; ?>
53
+
54
+ <?php if ( ! $yikes_mc_api_constant ) { ?>
55
+ <p class="description"><small><a href="https://admin.mailchimp.com/account/api" target="_blank" title="<?php _e( 'Get your API key here' , 'yikes-inc-easy-mailchimp-extender' ); ?>"><?php _e( 'Get your API key here' , 'yikes-inc-easy-mailchimp-extender' ); ?></a></small></p>
56
+ <?php } ?>
57
+
58
+ <p class="description"><?php esc_html_e( 'Warning: changing your API key may break your current forms.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
59
+ </label>
60
+
61
+ <!-- Use Nonce Validation Field -->
62
+ <p><strong><?php _e( 'Enable nonce validation on this site?' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong></p>
63
+ <label for="yikes-mailchimp-use-nonce-yes">
64
+ Yes
65
+ <input type="radio" name="yikes-mailchimp-use-nonce" id="yikes-mailchimp-use-nonce-yes" class="settings-page-input" value="1" <?php checked( get_option( 'yikes-mailchimp-use-nonce', '1' ) , '1' ); ?> />
66
+ </label>
67
+ <label for="yikes-mailchimp-use-nonce-no">
68
+ No
69
+ <input type="radio" name="yikes-mailchimp-use-nonce" id="yikes-mailchimp-use-nonce-no" class="settings-page-input" value="0" <?php checked( get_option( 'yikes-mailchimp-use-nonce', '1' ) , '0' ); ?> />
70
+ </label>
71
+
72
+ <?php submit_button(); ?>
73
+
74
+ </form>
75
+
76
+ </div> <!-- .inside -->
admin/partials/menu/options-sections/import-export-forms.php CHANGED
@@ -1,63 +1,63 @@
1
- <?php
2
- // Get all of our forms.
3
- $form_interface = yikes_easy_mailchimp_extender_get_form_interface();
4
- $all_forms = $form_interface->get_all_forms();
5
- ?>
6
- <h3><span><?php _e( 'Import/Export Forms & Settings' , 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
7
-
8
- <div class="inside">
9
-
10
- <!-- Export Form -->
11
- <form action="<?php echo esc_url_raw( add_query_arg( array( 'action' => 'yikes-easy-mc-export-forms' , 'nonce' => wp_create_nonce( 'export-forms' ) ) ) ); ?>" method="post">
12
- <p><strong><?php _e( "Export Forms" , 'yikes-inc-easy-mailchimp-extender' ); ?></strong></p>
13
- <p class="description">
14
- <?php _e( "Select the forms you would like to export. When you click the download button below, Easy Forms for Mailchimp will create a CSV file for you to save to your computer. Once you've saved the download file, you can use the Import tool to import the forms to this or any other site." , "yikes-inc-easy-mailchimp-extender" ); ?>
15
- </p>
16
-
17
- <?php if ( empty( $all_forms ) ) { ?>
18
- <p>
19
- <em><?php _e( "It looks like you haven't created any forms yet.", 'yikes-inc-easy-mailchimp-extender' ); ?></em>
20
- </p>
21
- <?php } else { ?>
22
- <!-- custom list so users can export specific forms -->
23
- <a class="toggle-custom-lists button-secondary" onclick="jQuery(this).next().slideToggle();return false;"><?php _e( 'Select Forms' , 'yikes-inc-easy-mailchimp-extender' ); ?></a>
24
- <ul class="export-custom-forms-list">
25
- <p class="description"><?php _e( 'Select which forms to export. Leave all checkboxes unchecked to export all of your forms.' , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
26
- <?php foreach( $all_forms as $id => $form ) { ?>
27
- <li><label><input type="checkbox" name="yikes_export_forms[]" value="<?php echo (int) $id; ?>"><?php echo esc_html( $form['form_name'] ); ?></label></li>
28
- <?php } ?>
29
- </ul>
30
- <?php } ?>
31
- <!-- check if any of our transients contain data -->
32
- <p><input type="submit" class="button-primary" value="<?php _e( 'Export Opt-in Forms' , 'yikes-inc-easy-mailchimp-extender' ); ?>" /></p>
33
- </form>
34
-
35
- <hr />
36
-
37
- <!-- Export Form -->
38
- <form action="<?php echo esc_url_raw( add_query_arg( array( 'action' => 'yikes-easy-mc-export-settings' , 'nonce' => wp_create_nonce( 'export-settings' ) ) ) ); ?>" method="post">
39
- <p><strong><?php _e( "Export Settings" , 'yikes-inc-easy-mailchimp-extender' ); ?></strong></p>
40
- <p class="description">
41
- <?php _e( "Export YIKES Easy Forms for Mailchimp plugin settings." , 'yikes-inc-easy-mailchimp-extender' ); ?>
42
- </p>
43
-
44
- <!-- check if any of our transients contain data -->
45
- <p><input type="submit" class="button-primary" value="<?php _e( 'Export Plugin Settings' , 'yikes-inc-easy-mailchimp-extender' ); ?>" /></p>
46
- </form>
47
-
48
- <hr />
49
-
50
- <!-- Import Form -->
51
- <form action="<?php echo esc_url_raw( add_query_arg( array( 'action' => 'yikes-easy-mc-import-forms' , 'nonce' => wp_create_nonce( 'import-forms' ) ) ) ); ?>" method="post" enctype="multipart/form-data">
52
- <p><strong><?php _e( "Import" , 'yikes-inc-easy-mailchimp-extender' ); ?></strong></p>
53
- <p class="description">
54
- <?php _e( "Select the Easy Forms for Mailchimp export file you would like to import. You can use this field to import your opt-in forms or settings. " , 'yikes-inc-easy-mailchimp-extender' ); ?>
55
- </p>
56
- <label>
57
- <input type="file" name="csv" id="forms_to_import">
58
- </label>
59
- <!-- check if any of our transients contain data -->
60
- <p><input type="submit" class="button-primary" value="<?php _e( 'Import' , 'yikes-inc-easy-mailchimp-extender' ); ?>" /></p>
61
- </form>
62
-
63
- </div> <!-- .inside -->
1
+ <?php
2
+ // Get all of our forms.
3
+ $form_interface = yikes_easy_mailchimp_extender_get_form_interface();
4
+ $all_forms = $form_interface->get_all_forms();
5
+ ?>
6
+ <h3><span><?php _e( 'Import/Export Forms & Settings' , 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
7
+
8
+ <div class="inside">
9
+
10
+ <!-- Export Form -->
11
+ <form action="<?php echo esc_url_raw( add_query_arg( array( 'action' => 'yikes-easy-mc-export-forms' , 'nonce' => wp_create_nonce( 'export-forms' ) ) ) ); ?>" method="post">
12
+ <p><strong><?php _e( "Export Forms" , 'yikes-inc-easy-mailchimp-extender' ); ?></strong></p>
13
+ <p class="description">
14
+ <?php _e( "Select the forms you would like to export. When you click the download button below, Easy Forms for Mailchimp will create a CSV file for you to save to your computer. Once you've saved the download file, you can use the Import tool to import the forms to this or any other site." , "yikes-inc-easy-mailchimp-extender" ); ?>
15
+ </p>
16
+
17
+ <?php if ( empty( $all_forms ) ) { ?>
18
+ <p>
19
+ <em><?php _e( "It looks like you haven't created any forms yet.", 'yikes-inc-easy-mailchimp-extender' ); ?></em>
20
+ </p>
21
+ <?php } else { ?>
22
+ <!-- custom list so users can export specific forms -->
23
+ <a class="toggle-custom-lists button-secondary" onclick="jQuery(this).next().slideToggle();return false;"><?php _e( 'Select Forms' , 'yikes-inc-easy-mailchimp-extender' ); ?></a>
24
+ <ul class="export-custom-forms-list">
25
+ <p class="description"><?php _e( 'Select which forms to export. Leave all checkboxes unchecked to export all of your forms.' , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
26
+ <?php foreach( $all_forms as $id => $form ) { ?>
27
+ <li><label><input type="checkbox" name="yikes_export_forms[]" value="<?php echo (int) $id; ?>"><?php echo esc_html( $form['form_name'] ); ?></label></li>
28
+ <?php } ?>
29
+ </ul>
30
+ <?php } ?>
31
+ <!-- check if any of our transients contain data -->
32
+ <p><input type="submit" class="button-primary" value="<?php _e( 'Export Opt-in Forms' , 'yikes-inc-easy-mailchimp-extender' ); ?>" /></p>
33
+ </form>
34
+
35
+ <hr />
36
+
37
+ <!-- Export Form -->
38
+ <form action="<?php echo esc_url_raw( add_query_arg( array( 'action' => 'yikes-easy-mc-export-settings' , 'nonce' => wp_create_nonce( 'export-settings' ) ) ) ); ?>" method="post">
39
+ <p><strong><?php _e( "Export Settings" , 'yikes-inc-easy-mailchimp-extender' ); ?></strong></p>
40
+ <p class="description">
41
+ <?php _e( "Export YIKES Easy Forms for Mailchimp plugin settings." , 'yikes-inc-easy-mailchimp-extender' ); ?>
42
+ </p>
43
+
44
+ <!-- check if any of our transients contain data -->
45
+ <p><input type="submit" class="button-primary" value="<?php _e( 'Export Plugin Settings' , 'yikes-inc-easy-mailchimp-extender' ); ?>" /></p>
46
+ </form>
47
+
48
+ <hr />
49
+
50
+ <!-- Import Form -->
51
+ <form action="<?php echo esc_url_raw( add_query_arg( array( 'action' => 'yikes-easy-mc-import-forms' , 'nonce' => wp_create_nonce( 'import-forms' ) ) ) ); ?>" method="post" enctype="multipart/form-data">
52
+ <p><strong><?php _e( "Import" , 'yikes-inc-easy-mailchimp-extender' ); ?></strong></p>
53
+ <p class="description">
54
+ <?php _e( "Select the Easy Forms for Mailchimp export file you would like to import. You can use this field to import your opt-in forms or settings. " , 'yikes-inc-easy-mailchimp-extender' ); ?>
55
+ </p>
56
+ <label>
57
+ <input type="file" name="csv" id="forms_to_import">
58
+ </label>
59
+ <!-- check if any of our transients contain data -->
60
+ <p><input type="submit" class="button-primary" value="<?php _e( 'Import' , 'yikes-inc-easy-mailchimp-extender' ); ?>" /></p>
61
+ </form>
62
+
63
+ </div> <!-- .inside -->
admin/partials/menu/options-sections/recaptcha-settings.php CHANGED
@@ -1,53 +1,53 @@
1
- <?php
2
- /**
3
- * Options page for storing our reCAPTCHA options
4
- *
5
- * Page template that houses our reCAPTCHA API keys.
6
- *
7
- * @since 6.0.0
8
- *
9
- * @package WordPress
10
- * @subpackage Component
11
- */
12
-
13
- ?>
14
-
15
- <h3><span><?php _e( 'reCAPTCHA Settings', 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
16
-
17
- <div class="inside">
18
- <p>
19
- <?php _e( 'reCAPTCHA is a free CAPTCHA service, from Google, that helps protect your site against spam, malicious registrations and other forms of attacks where computers try to disguise themselves as a human. reCAPTCHA will help prevent spammers and bots from submitting data through your Mailchimp forms.', 'yikes-inc-easy-mailchimp-extender' ); ?>
20
- </p>
21
-
22
- <p>
23
- <?php echo '<a href="https://www.google.com/recaptcha/admin" target="_blank" title="' . __( 'Get your reCAPTCHA API Key', 'yikes-inc-easy-mailchimp-extender' ) . '">' . __( 'Get Your reCAPTCHA API Key', 'yikes-inc-easy-mailchimp-extender' ) . '</a>'; ?>
24
- </p>
25
-
26
- <!-- Settings Form -->
27
- <form action='options.php' method='post'>
28
-
29
- <?php settings_fields( 'yikes_inc_easy_mc_recaptcha_settings_page' ); ?>
30
-
31
- <label for="yikes-mc-recaptcha-setting">
32
- <input type="checkbox" id="yikes-mc-recaptcha-setting" name="yikes-mc-recaptcha-status" class="recaptcha-setting-checkbox" value="1" <?php checked( get_option( 'yikes-mc-recaptcha-status', '' ) , '1' ); ?>>
33
- <strong><?php _e( 'Enable reCAPTCHA Protection', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
34
- </label>
35
-
36
- <label for="yikes-mc-recaptcha-api-key"><strong><?php _e( 'reCAPTCHA Site Key', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
37
- <input type="text" class="widefat recaptcha-setting-checkbox" name="yikes-mc-recaptcha-site-key" value="<?php echo esc_attr( get_option( 'yikes-mc-recaptcha-site-key', '' ) ); ?>">
38
- </label>
39
-
40
- <label for="yikes-mc-recaptcha-private-api-key"><strong><?php _e( 'reCAPTCHA Secret Key', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
41
- <input type="text" class="widefat recaptcha-setting-checkbox" name="yikes-mc-recaptcha-secret-key" id="" value="<?php echo esc_attr( get_option( 'yikes-mc-recaptcha-secret-key', '' ) ); ?>">
42
- </label>
43
-
44
- <a href="#" onclick="jQuery(this).next().slideToggle();return false;" class="recaptcha-preview-link"><?php _e( 'View reCAPTCHA Preview', 'yikes-inc-easy-mailchimp-extender' ); ?></a>
45
- <span class="recaptcha-preview-container">
46
- <img src="<?php echo YIKES_MC_URL . 'includes/images/recaptcha/recaptcha-demo.gif'; ?>" alt="<?php _e( 'reCAPTCHA Preview', 'yikes-inc-easy-mailchimp-extender' ); ?>" class="recaptcha-demo-gif">
47
- </span>
48
-
49
- <?php submit_button(); ?>
50
-
51
- </form>
52
-
53
- </div> <!-- .inside -->
1
+ <?php
2
+ /**
3
+ * Options page for storing our reCAPTCHA options
4
+ *
5
+ * Page template that houses our reCAPTCHA API keys.
6
+ *
7
+ * @since 6.0.0
8
+ *
9
+ * @package WordPress
10
+ * @subpackage Component
11
+ */
12
+
13
+ ?>
14
+
15
+ <h3><span><?php _e( 'reCAPTCHA Settings', 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
16
+
17
+ <div class="inside">
18
+ <p>
19
+ <?php _e( 'reCAPTCHA is a free CAPTCHA service, from Google, that helps protect your site against spam, malicious registrations and other forms of attacks where computers try to disguise themselves as a human. reCAPTCHA will help prevent spammers and bots from submitting data through your Mailchimp forms.', 'yikes-inc-easy-mailchimp-extender' ); ?>
20
+ </p>
21
+
22
+ <p>
23
+ <?php echo '<a href="https://www.google.com/recaptcha/admin" target="_blank" title="' . __( 'Get your reCAPTCHA API Key', 'yikes-inc-easy-mailchimp-extender' ) . '">' . __( 'Get Your reCAPTCHA API Key', 'yikes-inc-easy-mailchimp-extender' ) . '</a>'; ?>
24
+ </p>
25
+
26
+ <!-- Settings Form -->
27
+ <form action='options.php' method='post'>
28
+
29
+ <?php settings_fields( 'yikes_inc_easy_mc_recaptcha_settings_page' ); ?>
30
+
31
+ <label for="yikes-mc-recaptcha-setting">
32
+ <input type="checkbox" id="yikes-mc-recaptcha-setting" name="yikes-mc-recaptcha-status" class="recaptcha-setting-checkbox" value="1" <?php checked( get_option( 'yikes-mc-recaptcha-status', '' ) , '1' ); ?>>
33
+ <strong><?php _e( 'Enable reCAPTCHA Protection', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
34
+ </label>
35
+
36
+ <label for="yikes-mc-recaptcha-api-key"><strong><?php _e( 'reCAPTCHA Site Key', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
37
+ <input type="text" class="widefat recaptcha-setting-checkbox" name="yikes-mc-recaptcha-site-key" value="<?php echo esc_attr( get_option( 'yikes-mc-recaptcha-site-key', '' ) ); ?>">
38
+ </label>
39
+
40
+ <label for="yikes-mc-recaptcha-private-api-key"><strong><?php _e( 'reCAPTCHA Secret Key', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
41
+ <input type="text" class="widefat recaptcha-setting-checkbox" name="yikes-mc-recaptcha-secret-key" id="" value="<?php echo esc_attr( get_option( 'yikes-mc-recaptcha-secret-key', '' ) ); ?>">
42
+ </label>
43
+
44
+ <a href="#" onclick="jQuery(this).next().slideToggle();return false;" class="recaptcha-preview-link"><?php _e( 'View reCAPTCHA Preview', 'yikes-inc-easy-mailchimp-extender' ); ?></a>
45
+ <span class="recaptcha-preview-container">
46
+ <img src="<?php echo YIKES_MC_URL . 'includes/images/recaptcha/recaptcha-demo.gif'; ?>" alt="<?php _e( 'reCAPTCHA Preview', 'yikes-inc-easy-mailchimp-extender' ); ?>" class="recaptcha-demo-gif">
47
+ </span>
48
+
49
+ <?php submit_button(); ?>
50
+
51
+ </form>
52
+
53
+ </div> <!-- .inside -->
admin/partials/menu/options-sections/templates/integration-interest-groups.php CHANGED
@@ -1,108 +1,108 @@
1
- <?php
2
- /**
3
- * Template for rendering interest groups
4
- *
5
- * Page template that houses all of the interest groups for checkbox settings.
6
- *
7
- * @since 6.0.0
8
- *
9
- * @package WordPress
10
- * @subpackage Component
11
- */
12
-
13
- $integration_options = get_option( 'optin-checkbox-init', '' );
14
- ?>
15
-
16
- <div class="integration-checkbox-interest-groups">
17
- <span class="dashicons dashicons-arrow-down-alt2 yikes-mailchimp-toggle-ig"></span>
18
- <h4 class="integreation-checkbox-interest-groups-header">Interest Groups</h4>
19
- <br />
20
-
21
- <div class="integration-checkbox-interest-groups-interior">
22
- <p class="description"><?php _e( 'Select the interest groups users will be automatically added to. These will not be displayed on the form.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
23
- <?php
24
-
25
- /*
26
- * Loop over interest groups
27
- */
28
- foreach ( $interest_groupings as $id => $interest_group ) {
29
-
30
- $interest_group_type = isset( $interest_group['type'] ) ? $interest_group['type'] : '';
31
- $interest_groups_fields = isset( $interest_group['items'] ) ? $interest_group['items'] : array();
32
- $selected_interest_groups = isset( $integration_options[ $integration_type ]['interest-groups'] ) ? $integration_options[ $integration_type ]['interest-groups'] : array();
33
- $selected_interest_groups = isset( $selected_interest_groups[$list_id] ) ? $selected_interest_groups[$list_id] : $selected_interest_groups;
34
- ?>
35
- <section class="interest-group-section">
36
- <strong class="interest-group-section-title"><?php echo ucwords( $interest_group['title'] ); ?></strong>
37
- <?php
38
-
39
- /*
40
- * Loop over the interest group types, and return the appropriate type
41
- */
42
-
43
- $checked = $selected = '';
44
- switch ( $interest_group_type ) {
45
-
46
- default:
47
- case 'hidden':
48
- case 'checkboxes':
49
- foreach ( $interest_groups_fields as $field_id => $field ) {
50
- if ( isset( $selected_interest_groups[ $id ] ) ) {
51
- $checked = checked( true, in_array( $field_id, $selected_interest_groups[ $id ] ), false );
52
- }
53
- ?>
54
- <label>
55
- <input type="checkbox"
56
- name="optin-checkbox-init[<?php echo $integration_type; ?>][interest-groups][<?php echo $list_id; ?>][<?php echo $id; ?>][]"
57
- value="<?php echo $field_id; ?>" <?php echo $checked; ?>>
58
- <?php echo $field['name']; ?>
59
- </label>
60
- <?php
61
- }
62
- break;
63
-
64
- case 'radio':
65
- foreach ( $interest_groups_fields as $field_id => $field ) {
66
- if ( isset( $selected_interest_groups[ $id ] ) ) {
67
- $checked = checked( true, in_array( $field_id, $selected_interest_groups[ $id ] ), false );
68
- }
69
- ?>
70
- <label>
71
- <input type="radio"
72
- name="optin-checkbox-init[<?php echo $integration_type; ?>][interest-groups][<?php echo $list_id; ?>][<?php echo $id; ?>][]"
73
- value="<?php echo $field_id; ?>" <?php echo $checked; ?>>
74
- <?php echo $field['name']; ?>
75
- </label>
76
- <?php
77
- }
78
-
79
- break;
80
-
81
- case 'dropdown':
82
- if ( ! empty( $interest_groups_fields ) ) {
83
- ?>
84
- <select name="optin-checkbox-init[<?php echo $integration_type; ?>][interest-groups][<?php echo $list_id; ?>][<?php echo $id; ?>][]">
85
- <?php
86
- foreach ( $interest_groups_fields as $field_id => $field ) {
87
- if ( isset( $selected_interest_groups[ $id ] ) ) {
88
- $selected = selected( true, in_array( $field_id, $selected_interest_groups[ $id ] ), false );
89
- }
90
- ?>
91
- <option value="<?php echo $field_id; ?>" <?php echo $selected; ?>>
92
- <?php echo $field['name']; ?>
93
- </option>
94
- <?php
95
- }
96
- ?>
97
- </select>
98
- <?php
99
- }
100
- break;
101
- }
102
- ?>
103
- </section>
104
- <?php
105
- }
106
- ?>
107
- </div>
108
- </div>
1
+ <?php
2
+ /**
3
+ * Template for rendering interest groups
4
+ *
5
+ * Page template that houses all of the interest groups for checkbox settings.
6
+ *
7
+ * @since 6.0.0
8
+ *
9
+ * @package WordPress
10
+ * @subpackage Component
11
+ */
12
+
13
+ $integration_options = get_option( 'optin-checkbox-init', '' );
14
+ ?>
15
+
16
+ <div class="integration-checkbox-interest-groups">
17
+ <span class="dashicons dashicons-arrow-down-alt2 yikes-mailchimp-toggle-ig"></span>
18
+ <h4 class="integreation-checkbox-interest-groups-header">Interest Groups</h4>
19
+ <br />
20
+
21
+ <div class="integration-checkbox-interest-groups-interior">
22
+ <p class="description"><?php _e( 'Select the interest groups users will be automatically added to. These will not be displayed on the form.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
23
+ <?php
24
+
25
+ /*
26
+ * Loop over interest groups
27
+ */
28
+ foreach ( $interest_groupings as $id => $interest_group ) {
29
+
30
+ $interest_group_type = isset( $interest_group['type'] ) ? $interest_group['type'] : '';
31
+ $interest_groups_fields = isset( $interest_group['items'] ) ? $interest_group['items'] : array();
32
+ $selected_interest_groups = isset( $integration_options[ $integration_type ]['interest-groups'] ) ? $integration_options[ $integration_type ]['interest-groups'] : array();
33
+ $selected_interest_groups = isset( $selected_interest_groups[$list_id] ) ? $selected_interest_groups[$list_id] : $selected_interest_groups;
34
+ ?>
35
+ <section class="interest-group-section">
36
+ <strong class="interest-group-section-title"><?php echo ucwords( $interest_group['title'] ); ?></strong>
37
+ <?php
38
+
39
+ /*
40
+ * Loop over the interest group types, and return the appropriate type
41
+ */
42
+
43
+ $checked = $selected = '';
44
+ switch ( $interest_group_type ) {
45
+
46
+ default:
47
+ case 'hidden':
48
+ case 'checkboxes':
49
+ foreach ( $interest_groups_fields as $field_id => $field ) {
50
+ if ( isset( $selected_interest_groups[ $id ] ) ) {
51
+ $checked = checked( true, in_array( $field_id, $selected_interest_groups[ $id ] ), false );
52
+ }
53
+ ?>
54
+ <label>
55
+ <input type="checkbox"
56
+ name="optin-checkbox-init[<?php echo $integration_type; ?>][interest-groups][<?php echo $list_id; ?>][<?php echo $id; ?>][]"
57
+ value="<?php echo $field_id; ?>" <?php echo $checked; ?>>
58
+ <?php echo $field['name']; ?>
59
+ </label>
60
+ <?php
61
+ }
62
+ break;
63
+
64
+ case 'radio':
65
+ foreach ( $interest_groups_fields as $field_id => $field ) {
66
+ if ( isset( $selected_interest_groups[ $id ] ) ) {
67
+ $checked = checked( true, in_array( $field_id, $selected_interest_groups[ $id ] ), false );
68
+ }
69
+ ?>
70
+ <label>
71
+ <input type="radio"
72
+ name="optin-checkbox-init[<?php echo $integration_type; ?>][interest-groups][<?php echo $list_id; ?>][<?php echo $id; ?>][]"
73
+ value="<?php echo $field_id; ?>" <?php echo $checked; ?>>
74
+ <?php echo $field['name']; ?>
75
+ </label>
76
+ <?php
77
+ }
78
+
79
+ break;
80
+
81
+ case 'dropdown':
82
+ if ( ! empty( $interest_groups_fields ) ) {
83
+ ?>
84
+ <select name="optin-checkbox-init[<?php echo $integration_type; ?>][interest-groups][<?php echo $list_id; ?>][<?php echo $id; ?>][]">
85
+ <?php
86
+ foreach ( $interest_groups_fields as $field_id => $field ) {
87
+ if ( isset( $selected_interest_groups[ $id ] ) ) {
88
+ $selected = selected( true, in_array( $field_id, $selected_interest_groups[ $id ] ), false );
89
+ }
90
+ ?>
91
+ <option value="<?php echo $field_id; ?>" <?php echo $selected; ?>>
92
+ <?php echo $field['name']; ?>
93
+ </option>
94
+ <?php
95
+ }
96
+ ?>
97
+ </select>
98
+ <?php
99
+ }
100
+ break;
101
+ }
102
+ ?>
103
+ </section>
104
+ <?php
105
+ }
106
+ ?>
107
+ </div>
108
+ </div>
admin/partials/menu/options.php CHANGED
@@ -1,176 +1,176 @@
1
- <?php
2
- /*
3
- * Options Page
4
- * @since 6.0
5
- */
6
-
7
- /* Get and Store Option Values */
8
- if( get_option( 'yikes-mc-api-validation' , 'invalid_api_key' ) === 'valid_api_key' ) {
9
- $api_connection = '<span id="connection-container" class="api-connected" title="' . __( "Your site is currently connected to the Mailchimp API" , "yikes-inc-easy-mailchimp-extender" ) . '"><span class="dashicons dashicons-yes yikes-mc-api-connected"></span> ' . __( "Connected" , 'yikes-inc-easy-mailchimp-extender' ) . '</span>';
10
- $api_error_response = '';
11
- } else {
12
- $api_connection = '<span id="connection-container" class="api-not-connected"><span class="dashicons dashicons-no-alt yikes-mc-api-not-connected"></span> ' . __( "Not Connected" , 'yikes-inc-easy-mailchimp-extender' ) . '</span>';
13
- if( get_option( 'yikes-mc-api-invalid-key-response' , '' ) != '' ) {
14
- $api_error_response = '<p><small><i class="dashicons dashicons-no-alt"></i> ' . get_option( 'yikes-mc-api-invalid-key-response' , '' ) . '</small></p>';
15
- } else {
16
- $api_error_response = '';
17
- }
18
- }
19
-
20
- /*
21
- * Properly Sanatize $_REQUEST['section'] variable
22
- *
23
- * @since 6.2.2
24
- *
25
- */
26
- if ( isset( $_REQUEST['section'] ) ) {
27
- $_REQUEST['section'] = preg_replace('/[^\w-]/', '', strip_tags ( $_REQUEST['section'] ) );
28
- }
29
- ?>
30
- <!-- Actual Settings Form -->
31
- <div class="wrap">
32
-
33
- <!-- Freddie Logo -->
34
- <img src="<?php echo YIKES_MC_URL . 'includes/images/Mailchimp_Assets/Freddie_60px.png'; ?>" alt="<?php _e( 'Freddie - Mailchimp Mascot' , 'yikes-inc-easy-mailchimp-extender' ); ?>" class="yikes-mc-freddie-logo" />
35
-
36
- <h1>Easy Forms for Mailchimp | <?php if ( isset( $_REQUEST['section'] ) ) { echo ucwords( str_replace( '-', ' ', $_REQUEST['section'] ) ); } else { echo __( 'General Settings' , 'yikes-inc-easy-mailchimp-extender' ); } ?></h1>
37
-
38
- <!-- Settings Page Description -->
39
- <p class="yikes-easy-mc-about-text about-text"><?php _e( 'Manage the overall settings for Easy forms for Mailchimp.' , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
40
- <?php
41
- /* Success Messages on Options Updated */
42
- if( isset( $_REQUEST['settings-updated'] ) && $_REQUEST['settings-updated'] == 'true' ) {
43
- ?>
44
- <div class="updated manage-form-admin-notice">
45
- <p><?php _e( 'Settings successfully updated.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
46
- </div>
47
- <?php
48
- }
49
- /* Mailchimp API Cleared Successfully message */
50
- if( isset( $_REQUEST['transient-cleared'] ) && $_REQUEST['transient-cleared'] == 'true' ) {
51
- ?>
52
- <div class="updated manage-form-admin-notice">
53
- <p><?php _e( 'Mailchimp API Cache successfully cleared.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
54
- </div>
55
- <?php
56
- }
57
- /* Error Log Clear Messages */
58
- /* Success Messages on Options Updated */
59
- if( isset( $_REQUEST['error-log-cleared'] ) && $_REQUEST['error-log-cleared'] == 'true' ) {
60
- ?>
61
- <div class="updated manage-form-admin-notice">
62
- <p><?php _e( 'Error log successfully cleared.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
63
- </div>
64
- <?php
65
- }
66
- /* Mailchimp API Cleared Successfully message */
67
- if( isset( $_REQUEST['error-log-cleared'] ) && $_REQUEST['error-log-cleared'] == 'false' ) {
68
- ?>
69
- <div class="error manage-form-admin-notice">
70
- <p><?php _e( "Whoops! We've encountered an error while trying to clear the error log. Please refresh the page and try again. If the error persists please get in touch with the YIKES Inc. support team.", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
71
- </div>
72
- <?php
73
- }
74
-
75
- /* Display a success message if our error log was sucessfully created, or display an error if not */
76
- if( isset( $_GET['error_log_created'] ) && $_GET['error_log_created'] == 'true' ) {
77
- ?>
78
- <div class="updated">
79
- <p><?php _e( 'Error log successfully created. You may now start logging errors.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
80
- </div>
81
- <?php
82
- } else if( isset( $_GET['error_log_created'] ) && $_GET['error_log_created'] == 'false' ) {
83
- ?>
84
- <div class="error">
85
- <p><?php echo esc_attr( urldecode( $_GET['error_message'] ) , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
86
- </div>
87
- <?php
88
- }
89
-
90
- /* Display a success message if the user successfully imported some forms */
91
- if( isset( $_GET['section'] ) && $_GET['section'] == 'import-export-forms' && isset( $_GET['import-forms'] ) && $_GET['import-forms'] == 'true' ) {
92
- ?>
93
- <div class="updated">
94
- <p><?php printf( __( 'Opt-in forms successfully imported. <a href="%s" title="View Forms">View Forms</a>', 'yikes-inc-easy-mailchimp-extender' ), esc_url_raw( admin_url( 'admin.php?page=yikes-inc-easy-mailchimp' ) ) ); ?></p>
95
- </div>
96
- <?php
97
- } elseif( isset( $_GET['section'] ) && $_GET['section'] == 'import-export-forms' && isset( $_GET['import-settings'] ) && $_GET['import-settings'] == 'true' ) {
98
- ?>
99
- <div class="updated">
100
- <p><?php printf( __( 'YIKES Easy Forms for Mailchimp settings successfully imported.', 'yikes-inc-easy-mailchimp-extender' ), esc_url_raw( admin_url( 'admin.php?page=yikes-inc-easy-mailchimp' ) ) ); ?></p>
101
- </div>
102
- <?php
103
- }
104
- ?>
105
-
106
- <!-- entire body content -->
107
- <div id="poststuff">
108
-
109
- <div id="post-body" class="metabox-holder columns-2">
110
-
111
- <!-- main content -->
112
- <div id="post-body-content">
113
-
114
- <div class="meta-box-sortables ui-sortable">
115
-
116
- <div class="postbox yikes-easy-mc-postbox">
117
-
118
- <?php if( !isset( $_REQUEST['section'] ) || $_REQUEST['section'] == '' ) {
119
- include YIKES_MC_PATH . 'admin/partials/menu/options-sections/general-settings.php';
120
- } else {
121
- if( isset( $_REQUEST['addon'] ) && $_REQUEST['addon'] == 'true' ) {
122
- include apply_filters( 'yikes-mailchimp-'.$_REQUEST['section'].'-options-path' , '' );
123
- } else {
124
- // White list a set of files that are allowed to be included here
125
- $file_base = 'admin/partials/menu/options-sections/';
126
- $acceptable_files = array(
127
- $file_base . 'api-cache-settings.php',
128
- $file_base . 'debug-settings.php',
129
- $file_base . 'general-settings.php',
130
- $file_base . 'import-export-forms.php',
131
- $file_base . 'integration-settings.php',
132
- $file_base . 'recaptcha-settings.php',
133
- );
134
- // Ensure the included file is allowed and whitelisted above, before including it
135
- if ( 0 === validate_file( 'admin/partials/menu/options-sections/' . $_REQUEST['section'] . '.php', $acceptable_files ) ) {
136
- include YIKES_MC_PATH . 'admin/partials/menu/options-sections/' . $_REQUEST['section'] . '.php';
137
- } else {
138
- wp_die( esc_attr__( 'Invalid file. If this error persists, please contact support.', 'yikes-inc-easy-mailchimp' ) );
139
- }
140
- }
141
- }
142
- ?>
143
-
144
- </div> <!-- .postbox -->
145
-
146
- </div> <!-- .meta-box-sortables .ui-sortable -->
147
-
148
- </div> <!-- post-body-content -->
149
-
150
- <!-- sidebar -->
151
- <div id="postbox-container-1" class="postbox-container options-sidebar">
152
-
153
- <div class="meta-box-sortables">
154
-
155
- <div class="postbox yikes-easy-mc-postbox">
156
-
157
- <?php
158
- // Render our sidebar menu
159
- // inside class-yikes-inc-easy-mailchimp-extender-admin.php
160
- $this->generate_options_pages_sidebar_menu();
161
- ?>
162
-
163
- </div> <!-- .postbox -->
164
-
165
- <?php $this->generate_show_some_love_container(); ?>
166
-
167
- </div> <!-- .meta-box-sortables -->
168
-
169
- </div> <!-- #postbox-container-1 .postbox-container -->
170
-
171
- </div> <!-- #post-body .metabox-holder .columns-2 -->
172
-
173
- <br class="clear">
174
- </div> <!-- #poststuff -->
175
-
176
- </div> <!-- .wrap -->
1
+ <?php
2
+ /*
3
+ * Options Page
4
+ * @since 6.0
5
+ */
6
+
7
+ /* Get and Store Option Values */
8
+ if( get_option( 'yikes-mc-api-validation' , 'invalid_api_key' ) === 'valid_api_key' ) {
9
+ $api_connection = '<span id="connection-container" class="api-connected" title="' . __( "Your site is currently connected to the Mailchimp API" , "yikes-inc-easy-mailchimp-extender" ) . '"><span class="dashicons dashicons-yes yikes-mc-api-connected"></span> ' . __( "Connected" , 'yikes-inc-easy-mailchimp-extender' ) . '</span>';
10
+ $api_error_response = '';
11
+ } else {
12
+ $api_connection = '<span id="connection-container" class="api-not-connected"><span class="dashicons dashicons-no-alt yikes-mc-api-not-connected"></span> ' . __( "Not Connected" , 'yikes-inc-easy-mailchimp-extender' ) . '</span>';
13
+ if( get_option( 'yikes-mc-api-invalid-key-response' , '' ) != '' ) {
14
+ $api_error_response = '<p><small><i class="dashicons dashicons-no-alt"></i> ' . get_option( 'yikes-mc-api-invalid-key-response' , '' ) . '</small></p>';
15
+ } else {
16
+ $api_error_response = '';
17
+ }
18
+ }
19
+
20
+ /*
21
+ * Properly Sanatize $_REQUEST['section'] variable
22
+ *
23
+ * @since 6.2.2
24
+ *
25
+ */
26
+ if ( isset( $_REQUEST['section'] ) ) {
27
+ $_REQUEST['section'] = preg_replace('/[^\w-]/', '', strip_tags ( $_REQUEST['section'] ) );
28
+ }
29
+ ?>
30
+ <!-- Actual Settings Form -->
31
+ <div class="wrap">
32
+
33
+ <!-- Freddie Logo -->
34
+ <img src="<?php echo YIKES_MC_URL . 'includes/images/Mailchimp_Assets/Freddie_60px.png'; ?>" alt="<?php _e( 'Freddie - Mailchimp Mascot' , 'yikes-inc-easy-mailchimp-extender' ); ?>" class="yikes-mc-freddie-logo" />
35
+
36
+ <h1>Easy Forms for Mailchimp | <?php if ( isset( $_REQUEST['section'] ) ) { echo ucwords( str_replace( '-', ' ', $_REQUEST['section'] ) ); } else { echo __( 'General Settings' , 'yikes-inc-easy-mailchimp-extender' ); } ?></h1>
37
+
38
+ <!-- Settings Page Description -->
39
+ <p class="yikes-easy-mc-about-text about-text"><?php _e( 'Manage the overall settings for Easy forms for Mailchimp.' , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
40
+ <?php
41
+ /* Success Messages on Options Updated */
42
+ if( isset( $_REQUEST['settings-updated'] ) && $_REQUEST['settings-updated'] == 'true' ) {
43
+ ?>
44
+ <div class="updated manage-form-admin-notice">
45
+ <p><?php _e( 'Settings successfully updated.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
46
+ </div>
47
+ <?php
48
+ }
49
+ /* Mailchimp API Cleared Successfully message */
50
+ if( isset( $_REQUEST['transient-cleared'] ) && $_REQUEST['transient-cleared'] == 'true' ) {
51
+ ?>
52
+ <div class="updated manage-form-admin-notice">
53
+ <p><?php _e( 'Mailchimp API Cache successfully cleared.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
54
+ </div>
55
+ <?php
56
+ }
57
+ /* Error Log Clear Messages */
58
+ /* Success Messages on Options Updated */
59
+ if( isset( $_REQUEST['error-log-cleared'] ) && $_REQUEST['error-log-cleared'] == 'true' ) {
60
+ ?>
61
+ <div class="updated manage-form-admin-notice">
62
+ <p><?php _e( 'Error log successfully cleared.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
63
+ </div>
64
+ <?php
65
+ }
66
+ /* Mailchimp API Cleared Successfully message */
67
+ if( isset( $_REQUEST['error-log-cleared'] ) && $_REQUEST['error-log-cleared'] == 'false' ) {
68
+ ?>
69
+ <div class="error manage-form-admin-notice">
70
+ <p><?php _e( "Whoops! We've encountered an error while trying to clear the error log. Please refresh the page and try again. If the error persists please get in touch with the YIKES Inc. support team.", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
71
+ </div>
72
+ <?php
73
+ }
74
+
75
+ /* Display a success message if our error log was sucessfully created, or display an error if not */
76
+ if( isset( $_GET['error_log_created'] ) && $_GET['error_log_created'] == 'true' ) {
77
+ ?>
78
+ <div class="updated">
79
+ <p><?php _e( 'Error log successfully created. You may now start logging errors.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
80
+ </div>
81
+ <?php
82
+ } else if( isset( $_GET['error_log_created'] ) && $_GET['error_log_created'] == 'false' ) {
83
+ ?>
84
+ <div class="error">
85
+ <p><?php echo esc_attr( urldecode( $_GET['error_message'] ) , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
86
+ </div>
87
+ <?php
88
+ }
89
+
90
+ /* Display a success message if the user successfully imported some forms */
91
+ if( isset( $_GET['section'] ) && $_GET['section'] == 'import-export-forms' && isset( $_GET['import-forms'] ) && $_GET['import-forms'] == 'true' ) {
92
+ ?>
93
+ <div class="updated">
94
+ <p><?php printf( __( 'Opt-in forms successfully imported. <a href="%s" title="View Forms">View Forms</a>', 'yikes-inc-easy-mailchimp-extender' ), esc_url_raw( admin_url( 'admin.php?page=yikes-inc-easy-mailchimp' ) ) ); ?></p>
95
+ </div>
96
+ <?php
97
+ } elseif( isset( $_GET['section'] ) && $_GET['section'] == 'import-export-forms' && isset( $_GET['import-settings'] ) && $_GET['import-settings'] == 'true' ) {
98
+ ?>
99
+ <div class="updated">
100
+ <p><?php printf( __( 'YIKES Easy Forms for Mailchimp settings successfully imported.', 'yikes-inc-easy-mailchimp-extender' ), esc_url_raw( admin_url( 'admin.php?page=yikes-inc-easy-mailchimp' ) ) ); ?></p>
101
+ </div>
102
+ <?php
103
+ }
104
+ ?>
105
+
106
+ <!-- entire body content -->
107
+ <div id="poststuff">
108
+
109
+ <div id="post-body" class="metabox-holder columns-2">
110
+
111
+ <!-- main content -->
112
+ <div id="post-body-content">
113
+
114
+ <div class="meta-box-sortables ui-sortable">
115
+
116
+ <div class="postbox yikes-easy-mc-postbox">
117
+
118
+ <?php if( !isset( $_REQUEST['section'] ) || $_REQUEST['section'] == '' ) {
119
+ include YIKES_MC_PATH . 'admin/partials/menu/options-sections/general-settings.php';
120
+ } else {
121
+ if( isset( $_REQUEST['addon'] ) && $_REQUEST['addon'] == 'true' ) {
122
+ include apply_filters( 'yikes-mailchimp-'.$_REQUEST['section'].'-options-path' , '' );
123
+ } else {
124
+ // White list a set of files that are allowed to be included here
125
+ $file_base = 'admin/partials/menu/options-sections/';
126
+ $acceptable_files = array(
127
+ $file_base . 'api-cache-settings.php',
128
+ $file_base . 'debug-settings.php',
129
+ $file_base . 'general-settings.php',
130
+ $file_base . 'import-export-forms.php',
131
+ $file_base . 'integration-settings.php',
132
+ $file_base . 'recaptcha-settings.php',
133
+ );
134
+ // Ensure the included file is allowed and whitelisted above, before including it
135
+ if ( 0 === validate_file( 'admin/partials/menu/options-sections/' . $_REQUEST['section'] . '.php', $acceptable_files ) ) {
136
+ include YIKES_MC_PATH . 'admin/partials/menu/options-sections/' . $_REQUEST['section'] . '.php';
137
+ } else {
138
+ wp_die( esc_attr__( 'Invalid file. If this error persists, please contact support.', 'yikes-inc-easy-mailchimp' ) );
139
+ }
140
+ }
141
+ }
142
+ ?>
143
+
144
+ </div> <!-- .postbox -->
145
+
146
+ </div> <!-- .meta-box-sortables .ui-sortable -->
147
+
148
+ </div> <!-- post-body-content -->
149
+
150
+ <!-- sidebar -->
151
+ <div id="postbox-container-1" class="postbox-container options-sidebar">
152
+
153
+ <div class="meta-box-sortables">
154
+
155
+ <div class="postbox yikes-easy-mc-postbox">
156
+
157
+ <?php
158
+ // Render our sidebar menu
159
+ // inside class-yikes-inc-easy-mailchimp-extender-admin.php
160
+ $this->generate_options_pages_sidebar_menu();
161
+ ?>
162
+
163
+ </div> <!-- .postbox -->
164
+
165
+ <?php $this->generate_show_some_love_container(); ?>
166
+
167
+ </div> <!-- .meta-box-sortables -->
168
+
169
+ </div> <!-- #postbox-container-1 .postbox-container -->
170
+
171
+ </div> <!-- #post-body .metabox-holder .columns-2 -->
172
+
173
+ <br class="clear">
174
+ </div> <!-- #poststuff -->
175
+
176
+ </div> <!-- .wrap -->
admin/partials/menu/support.php CHANGED
@@ -1,34 +1,34 @@
1
- <?php
2
- /*
3
- * Main Support page
4
- *
5
- * @since 6.0.0
6
- * By: Yikes Inc. | https://www.yikesinc.com
7
- */
8
- ?>
9
- <div class="wrap yikes-easy-mc-support-wrap">
10
-
11
- <!-- Freddie Logo -->
12
- <img src="<?php echo YIKES_MC_URL . 'includes/images/Mailchimp_Assets/Freddie_60px.png'; ?>" alt="<?php _e( 'Freddie - Mailchimp Mascot' , 'yikes-inc-easy-mailchimp-extender' ); ?>" class="yikes-mc-freddie-logo" />
13
-
14
- <h1>Easy Forms for Mailchimp | <?php _e( 'Support' , 'yikes-inc-easy-mailchimp-extender' ); ?></h1>
15
- <!-- Support Page Description -->
16
- <p class="yikes-easy-mc-about-text about-text"><?php _e( 'If you have questions, we have answers!' , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
17
-
18
- <?php if( get_option( 'yikes-easy-mc-active-addons' , array() ) == array() ) { ?>
19
- <p><?php _e( 'Users of the free version of Easy Forms for Mailchimp can post questions to our support forum on the WordPress Plugin Directory. We aim to respond to support requests for the free version of the plugin within a week.' , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
20
- <p><?php printf( __( 'Purchasers of our paid add-ons qualify for premium support. <a href="%s" target="_blank" title="' . __( 'Check out our paid add-ons', 'yikes-inc-easy-mailchimp-extender' ) . '">' . __( 'Check out our paid add-ons', 'yikes-inc-easy-mailchimp-extender' ) . '</a>!' , 'yikes-inc-easy-mailchimp-extender' ), esc_url( 'https://yikesplugins.com/' ) ); ?></p>
21
- <?php } else { ?>
22
- <p><?php _e( "It looks like you are one of our premium users! Fill out the form below to submit a priority support request." , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
23
- <p><?php _e( "If you have any problems with the form, send an email to <a href='mailto:support@yikesinc.com'>support@yikesinc.com</a> and a ticket will be created." , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
24
- <?php } ?>
25
-
26
- <p><?php printf( __( 'Before submitting a support request, please visit our %s.' , 'yikes-inc-easy-mailchimp-extender' ), '<a target="_blank" href="' . esc_url( 'https://yikesplugins.com/support/knowledge-base/product/easy-forms-for-mailchimp/' ) . '" title="' . __( 'Knowledge Base', 'yikes-inc-easy-mailchimp-extender' ) . '">' . __( 'knowledge base', 'yikes-inc-easy-mailchimp-extender' ) . '</a> where we have step-by-step guides and troubleshooting help' ); ?></p>
27
-
28
- <hr />
29
-
30
-
31
-
32
- <?php do_action( 'yikes-mailchimp-support-page' ); ?>
33
-
34
  </div> <!-- .wrap -->
1
+ <?php
2
+ /*
3
+ * Main Support page
4
+ *
5
+ * @since 6.0.0
6
+ * By: Yikes Inc. | https://www.yikesinc.com
7
+ */
8
+ ?>
9
+ <div class="wrap yikes-easy-mc-support-wrap">
10
+
11
+ <!-- Freddie Logo -->
12
+ <img src="<?php echo YIKES_MC_URL . 'includes/images/Mailchimp_Assets/Freddie_60px.png'; ?>" alt="<?php _e( 'Freddie - Mailchimp Mascot' , 'yikes-inc-easy-mailchimp-extender' ); ?>" class="yikes-mc-freddie-logo" />
13
+
14
+ <h1>Easy Forms for Mailchimp | <?php _e( 'Support' , 'yikes-inc-easy-mailchimp-extender' ); ?></h1>
15
+ <!-- Support Page Description -->
16
+ <p class="yikes-easy-mc-about-text about-text"><?php _e( 'If you have questions, we have answers!' , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
17
+
18
+ <?php if( get_option( 'yikes-easy-mc-active-addons' , array() ) == array() ) { ?>
19
+ <p><?php _e( 'Users of the free version of Easy Forms for Mailchimp can post questions to our support forum on the WordPress Plugin Directory. We aim to respond to support requests for the free version of the plugin within a week.' , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
20
+ <p><?php printf( __( 'Purchasers of our paid add-ons qualify for premium support. <a href="%s" target="_blank" title="' . __( 'Check out our paid add-ons', 'yikes-inc-easy-mailchimp-extender' ) . '">' . __( 'Check out our paid add-ons', 'yikes-inc-easy-mailchimp-extender' ) . '</a>!' , 'yikes-inc-easy-mailchimp-extender' ), esc_url( 'https://yikesplugins.com/' ) ); ?></p>
21
+ <?php } else { ?>
22
+ <p><?php _e( "It looks like you are one of our premium users! Fill out the form below to submit a priority support request." , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
23
+ <p><?php _e( "If you have any problems with the form, send an email to <a href='mailto:support@yikesinc.com'>support@yikesinc.com</a> and a ticket will be created." , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
24
+ <?php } ?>
25
+
26
+ <p><?php printf( __( 'Before submitting a support request, please visit our %s.' , 'yikes-inc-easy-mailchimp-extender' ), '<a target="_blank" href="' . esc_url( 'https://yikesplugins.com/support/knowledge-base/product/easy-forms-for-mailchimp/' ) . '" title="' . __( 'Knowledge Base', 'yikes-inc-easy-mailchimp-extender' ) . '">' . __( 'knowledge base', 'yikes-inc-easy-mailchimp-extender' ) . '</a> where we have step-by-step guides and troubleshooting help' ); ?></p>
27
+
28
+ <hr />
29
+
30
+
31
+
32
+ <?php do_action( 'yikes-mailchimp-support-page' ); ?>
33
+
34
  </div> <!-- .wrap -->
admin/partials/view-list.php CHANGED
@@ -1,401 +1,401 @@
1
- <?php
2
- if ( ! isset( $_REQUEST['list-id'] ) ) {
3
- wp_die( __( 'Oops, we can\'t determine what List to view. Please go back and try again.' ) );
4
- }
5
-
6
- $list_id = sanitize_key( $_REQUEST['list-id'] );
7
- $list_helper = yikes_get_mc_api_manager()->get_list_handler();
8
- $api_key = yikes_get_mc_api_key();
9
- $dash_position = strpos( $api_key, '-' );
10
-
11
-
12
- $list_data = $list_helper->get_list( $list_id );
13
- if ( is_wp_error( $list_data ) ) {
14
- $error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
15
- $error_logging->maybe_write_to_log(
16
- $list_data->get_error_code(),
17
- __( "Get Account Lists", 'yikes-inc-easy-mailchimp-extender' ),
18
- "View Lists Page"
19
- );
20
- $list_data = array();
21
- }
22
-
23
- $merge_fields = $list_helper->get_merge_fields( $list_id );
24
- if ( is_wp_error( $merge_fields ) ) {
25
- $error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
26
- $error_logging->maybe_write_to_log(
27
- $merge_fields->get_error_code(),
28
- __( "Get Merge Variables", 'yikes-inc-easy-mailchimp-extender' ),
29
- "View Lists Page"
30
- );
31
- $merge_fields = array();
32
- }
33
-
34
- // get the interest group data
35
- $interest_groupings = $list_helper->get_interest_categories( $list_id );
36
- if ( is_wp_error( $interest_groupings ) ) {
37
- $error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
38
- $error_logging->maybe_write_to_log(
39
- $interest_groupings->get_error_code(),
40
- __( "Get Interest Groups", 'yikes-inc-easy-mailchimp-extender' ),
41
- "View Lists Page"
42
- );
43
- $interest_groupings = array();
44
- }
45
-
46
- $no_interest_groupings = '<p class="description">' . __( 'Interest groups are not enabled for this list.', 'yikes-inc-easy-mailchimp-extender' ) . '</p>';
47
- $no_segments = __( 'No segments set up for this list.', 'yikes-inc-easy-mailchimp-extender' );
48
- $segments = $list_helper->get_segments( $list_id );
49
-
50
- // Get the full list of members.
51
- $members = $list_helper->get_members( $list_id );
52
- if ( is_wp_error( $members ) ) {
53
- $error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
54
- $error_logging->maybe_write_to_log(
55
- $members->get_error_code(),
56
- __( "Get Subscriber Count", 'yikes-inc-easy-mailchimp-extender' ),
57
- "View Lists Page"
58
- );
59
- $members = array();
60
- }
61
-
62
- // setup pagination variables
63
- $paged = isset( $_REQUEST['paged'] ) ? filter_var( $_REQUEST['paged'], FILTER_SANITIZE_NUMBER_INT ) : 0;
64
- $limit = apply_filters( 'yikes_admin_list_subscriber_limit', 20 );
65
- $page_offset = (int) $paged * (int) $limit;
66
- $sort_dir = isset( $_REQUEST['sort'] ) ? $_REQUEST['sort'] : 'DESC';
67
-
68
- if ( $sort_dir === 'DESC' ) {
69
- $opposite_sort_dir = 'ASC';
70
- $icon = '<span class="dashicons dashicons-arrow-down"></span>';
71
- $sort_function = 'krsort';
72
- } else {
73
- $opposite_sort_dir = 'DESC';
74
- $icon = '<span class="dashicons dashicons-arrow-up"></span>';
75
- $sort_function = 'ksort';
76
- }
77
-
78
- // Sort the array based on the sort direction.
79
- $sort_function( $members );
80
-
81
- // Maybe split the array into pages
82
- $total_pages = ceil( count( $members ) / $limit );
83
- if ( (int) $total_pages === 0 ) {
84
- $total_pages = '1';
85
- }
86
-
87
- // Segment the members based on the page and limit
88
- $subscribers_list = array_slice( $members, $page_offset, $limit );
89
-
90
- ?>
91
- <div class="wrap">
92
- <!-- Freddie Logo -->
93
- <img src="<?php echo YIKES_MC_URL . 'includes/images/Mailchimp_Assets/Freddie_60px.png'; ?>" alt="<?php __( 'Freddie - Mailchimp Mascot' , 'yikes-inc-easy-mailchimp-extender' ); ?>" class="yikes-mc-freddie-logo" />
94
-
95
- <h1>YIKES Easy Forms for Mailchimp | <?php echo $list_data['name']; ?></h1>
96
-
97
- <!-- Settings Page Description -->
98
- <p class="yikes-easy-mc-about-text about-text"><?php _e( 'View all subscribers below. View additional subscriber info, or add additional fields to this list.' , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
99
- <!-- <p class="add-new-subscriber-button"><a href="#" onclick="jQuery(this).parent().next().slideToggle();" class="add-new-h2"><?php _e( 'New Subscriber' , 'yikes-inc-easy-mailchimp-extender' ); ?></a></p> -->
100
-
101
- <?php
102
- /* Display our admin notices here */
103
- // Unsubscribe user confirmation message
104
- if( isset( $_REQUEST['user-unsubscribed'] ) && $_REQUEST['user-unsubscribed'] == 'true' ) {
105
- ?>
106
- <div class="updated manage-form-admin-notice">
107
- <p><?php _e( 'User successfully unsubscribed.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
108
- </div>
109
- <?php
110
- }
111
- if( isset( $_REQUEST['user-unsubscribed'] ) && $_REQUEST['user-unsubscribed'] == 'false' ) {
112
- ?>
113
- <div class="error manage-form-admin-notice">
114
- <p><?php _e( "We've encountered an error trying to remove the subscriber. Please try again. If the error persists please get in contact with the YIKES Inc. support staff.", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
115
- </div>
116
- <?php
117
- }
118
- ?>
119
-
120
- <section class="add-new-subscriber-form-container">
121
- <h4><?php _e( 'Add New Subscriber' , 'yikes-inc-easy-mailchimp-extender' ); ?></h4>
122
- <form id="add-new-subcscriber">
123
- <input type="text" class="regular-text" placeholder="<?php _e( 'User Email Address' , 'yikes-inc-easy-mailchimp-extender' ); ?>" /></p>
124
- <p><?php submit_button( 'Add Subscriber' ); ?></p>
125
- </form>
126
- </section>
127
-
128
- <!-- entire body content -->
129
- <div id="poststuff">
130
-
131
- <div id="post-body" class="metabox-holder columns-2">
132
-
133
- <!-- main content -->
134
- <div id="post-body-content">
135
-
136
- <div class="meta-box-sortables ui-sortable">
137
-
138
- <div class="postbox yikes-easy-mc-postbox">
139
-
140
- <table class="wp-list-table widefat fixed posts" cellspacing="0" id="yikes-easy-mc-manage-forms-table">
141
-
142
- <!-- TABLE HEAD -->
143
- <thead>
144
- <tr>
145
- <th id="user-email columnname" class="manage-column column-columnname" scope="col"><a id="user-email-sort" href="<?php echo esc_url_raw( add_query_arg( array( 'column' => 'email' , 'sort' => $opposite_sort_dir ) ) ); ?>"><?php _e( 'User Email' , 'yikes-inc-easy-mailchimp-extender' ); echo $icon;?></a></th>
146
- <th id="columnname" class="manage-column column-columnname num" scope="col"><?php _e( 'Email Client' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
147
- </tr>
148
- </thead>
149
- <!-- end header -->
150
-
151
- <!-- FOOTER -->
152
- <tfoot>
153
- <tr>
154
- <th class="manage-column column-columnname" scope="col"><?php _e( 'User Email' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
155
- <th class="manage-column column-columnname num" scope="col"><?php _e( 'Email Client' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
156
- </tr>
157
- </tfoot>
158
- <!-- end footer -->
159
-
160
- <!-- TABLE BODY -->
161
- <tbody>
162
- <?php if ( count( $subscribers_list ) > 0 ) {
163
- $i = 1;
164
- foreach ( $subscribers_list as $subscriber ) {
165
- $user_id = $subscriber['id'];
166
- $path = YIKES_MC_URL . "includes/images/na.png";
167
- $email_client_icon = "<img width='35' src='" . $path . "' alt='" . __( 'not set', 'yikes-inc-easy-mailchimp-extender' ) . "' title='" . __( 'not set', 'yikes-inc-easy-mailchimp-extender' ) . "'>";
168
-
169
- ?>
170
- <tr class="<?php if ( $i % 2 == 0 ) { echo 'alternate'; } ?>">
171
- <td class="column-columnname">
172
- <a class="user-email row-title" href="mailto:<?php echo sanitize_email( $subscriber['email_address'] ); ?>">
173
- <?php echo sanitize_email( $subscriber['email_address'] ); ?>
174
- </a>
175
- <div class="row-actions">
176
- <?php $view_user_info_url = esc_url_raw( add_query_arg( array(
177
- 'mailchimp-list' => $list_id,
178
- 'email-id' => $user_id,
179
- ), admin_url() . 'admin.php?page=yikes-mailchimp-view-user' ) ); ?>
180
- <span><a href="<?php echo $view_user_info_url; ?>"><?php _e( 'View Info', 'yikes-inc-easy-mailchimp-extender' ); ?></a> |</span>
181
- <?php $url = esc_url_raw( add_query_arg( array(
182
- 'action' => 'yikes-easy-mc-unsubscribe-user',
183
- 'mailchimp-list' => $list_id,
184
- 'nonce' => wp_create_nonce( 'unsubscribe-user-' . $user_id ),
185
- 'email_id' => $user_id,
186
- ) ) ); ?>
187
- <span><a href="<?php echo $url; ?>" onclick="return confirm('<?php printf( __( "Are you sure you want to unsubscribe %s from this mailing list?", 'yikes-inc-easy-mailchimp-extender' ), sanitize_email( $subscriber['email_address'] ) ); ?>');" class="yikes-delete-subscriber"><?php _e( "Unsubscribe", 'yikes-inc-easy-mailchimp-extender' ); ?></a>
188
- </div>
189
- </td>
190
- <td class="column-columnname num"><?php echo $email_client_icon; ?></td>
191
- </tr>
192
- <?php
193
- $i ++;
194
- }
195
- } else { ?>
196
- <tr class="no-items">
197
- <td class="colspanchange no-current-subscriber-notice" colspan="2"><em><?php _e( 'No one is currently subscribed to this list.' , 'yikes-inc-easy-mailchimp-extender' ); ?></em></td>
198
- </tr>
199
- <?php } ?>
200
- </tbody>
201
- </table>
202
- <!-- end table -->
203
-
204
- </div> <!-- .postbox -->
205
-
206
- <!-- pagination -->
207
- <div class="tablenav">
208
- <div class="tablenav-pages">
209
- <a class='first-page <?php if( $paged == 0 ) { echo 'disabled'; } ?>' title='<?php _e( "Go to the first page" , 'yikes-inc-easy-mailchimp-extender' ); ?>' href='<?php echo esc_url_raw( add_query_arg( array( "paged" => 0 ) ) ); ?>'>&laquo;</a>
210
- <a class='prev-page <?php if( $paged == 0 ) { echo 'disabled'; } ?>' title='<?php _e( "Go to the previous page" , 'yikes-inc-easy-mailchimp-extender' ); ?>' href='<?php echo esc_url_raw( add_query_arg( array( "paged" => intval( $paged - 1 ) ) ) ); ?>'>&lsaquo;</a>
211
- <span class="paging-input"><input class='current-page' title='<?php _e( "Current page" , 'yikes-inc-easy-mailchimp-extender' ); ?>' type='text' name='paged' value='<?php if( $paged == 0 ) { echo '1'; } else { echo intval( $paged + 1 ); } ?>' size='1' /> <?php _e( 'of', 'yikes-inc-easy-mailchimp-extender' ); ?> <span class='total-pages'><?php echo $total_pages; ?></span></span>
212
- <a class='next-page <?php if( $paged == intval( $total_pages - 1 ) ) { echo 'disabled'; } ?>' title='<?php _e( "Go to the next page" , 'yikes-inc-easy-mailchimp-extender' ); ?>' href='<?php echo esc_url_raw( add_query_arg( array( "paged" => intval( $paged + 1 ) ) ) ); ?>'>&rsaquo;</a>
213
- <a class='last-page <?php if( $paged == intval( $total_pages - 1 ) ) { echo 'disabled'; } ?>' title='<?php _e( "Go to the last page" , 'yikes-inc-easy-mailchimp-extender' ); ?>' href='<?php echo esc_url_raw( add_query_arg( array( "paged" => intval( $total_pages - 1 ) ) ) ); ?>'>&raquo;</a>
214
- </div>
215
- </div>
216
-
217
- </div> <!-- .meta-box-sortables .ui-sortable -->
218
-
219
- </div> <!-- post-body-content -->
220
-
221
- <!-- sidebar -->
222
- <div id="postbox-container-1" class="postbox-container">
223
-
224
- <div class="meta-box-sortables">
225
-
226
- <div class="postbox yikes-easy-mc-postbox">
227
-
228
- <h3><?php _e( 'List Overview' , 'yikes-inc-easy-mailchimp-extender' ); ?></h3>
229
-
230
- <?php
231
- // store list rating
232
- $list_rating = $list_data['list_rating'];
233
- if( $list_rating > 0 ) {
234
- $list_rating_explosion = explode( '.' , $list_rating );
235
- $star_array = array();
236
- $x = 1;
237
- while( $list_rating_explosion[0] >= $x ) {
238
- $star_array[] = '<span class="dashicons dashicons-star-filled list-rating-star"></span>';
239
- $x++;
240
- }
241
- if( $list_rating_explosion[1] == '5' ) {
242
- $star_array[] = '<span class="dashicons dashicons-star-half list-rating-star"></span>';
243
- }
244
- } else {
245
- $star_array = array( 'n/a' );
246
- }
247
- ?>
248
- <table class="form-table">
249
- <tr valign="top">
250
- <td scope="row"><label for="tablecell"><strong><?php _e( 'List Rating' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong></label></td>
251
- <td><?php echo implode( ' ' , $star_array ); ?></td>
252
- </tr>
253
- <tr valign="top">
254
- <td scope="row"><label for="tablecell"><strong><?php _e( 'Average Subscribers' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong></label></td>
255
- <td><?php echo $list_data['stats']['avg_sub_rate']; ?><small> / <?php _e( 'month' , 'yikes-inc-easy-mailchimp-extender' ); ?></small></td>
256
- </tr>
257
- <tr valign="top">
258
- <td scope="row"><label for="tablecell"><strong><?php _e( 'Subscriber Count' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong></label></td>
259
- <td><?php echo intval( $list_data['stats']['member_count'] ); ?></td>
260
- </tr>
261
- <tr valign="top">
262
- <td scope="row"><label for="tablecell"><strong><?php _e( 'New Since Last Campaign' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong></label></td>
263
- <td><?php echo intval( $list_data['stats']['member_count_since_send'] ); ?></td>
264
- </tr>
265
- <tr valign="top">
266
- <td scope="row"><label for="tablecell"><strong><?php _e( 'Created' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong></label></td>
267
- <td><?php echo date( get_option('date_format') , strtotime( $list_data['date_created'] ) ); ?></td>
268
- </tr>
269
- <tr valign="top">
270
- <td scope="row"><label for="tablecell"><strong><?php _e( 'List Fields' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong></label></td>
271
- <td><?php echo intval( $list_data['stats']['merge_field_count'] + 1 ); // add 1 for our email field.. ?></td>
272
- </tr>
273
- <tr valign="top">
274
- <td scope="row"><label for="tablecell"><strong><?php _e( 'Short Signup URL' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong></label></td>
275
- <td><input type="text" class="widefat view-list-sidebar-input" value="<?php echo esc_url_raw( $list_data['subscribe_url_short'] ); ?>" readonly onclick="jQuery(this).select();"></td>
276
- </tr>
277
- <tr valign="top">
278
- <td scope="row"><label for="tablecell"><strong><?php _e( 'Default From Email' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong></label></td>
279
- <td><input type="text" class="widefat view-list-sidebar-input" value="<?php echo sanitize_email( $list_data['campaign_defaults']['from_email'] ); ?>" readonly onclick="jQuery(this).select();"></td>
280
- </tr>
281
- <tr valign="top">
282
- <td scope="row"><label for="tablecell"><strong><?php _e( 'Default From Name' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong></label></td>
283
- <td><?php echo $list_data['campaign_defaults']['from_name']; ?></td>
284
- </tr>
285
- </table>
286
-
287
- </div> <!-- .postbox -->
288
-
289
-
290
- <!-- Merge Field Info -->
291
- <div class="postbox yikes-easy-mc-postbox">
292
-
293
- <h3><?php _e( 'Form Fields' , 'yikes-inc-easy-mailchimp-extender' ); ?></h3>
294
- <?php
295
- if( count( $merge_fields['merge_fields'] ) >= 1 ) {
296
- ?><ul class="merge-variable-ul"><?php
297
- echo '<li class="interest-group-count">' . sprintf( _n( '%d Field', '%d Fields', intval( count( $merge_fields['merge_fields'] ) ), 'yikes-inc-easy-mailchimp-extender' ), intval( count( $merge_fields['merge_fields'] ) ) ) . '</li>';
298
- foreach( $merge_fields['merge_fields'] as $merge_field ) {
299
- // new action hook @since 6.0.3.8
300
- echo '<li class="' . $merge_field['tag'] . '"><span class="dashicons dashicons-marker"></span>' . $merge_field['name'] . ' ' . do_action( 'yikes-mailchimp-list-field', $merge_field ) . '</li>';
301
- }
302
- ?></ul><?php
303
- }
304
- /**
305
- * Custom action hook for our add-ons to hook into
306
- * @since 6.0.3.8
307
- */
308
- do_action( 'yikes-mailchimp-list-form-fields-metabox' );
309
- ?>
310
-
311
- </div>
312
-
313
- <!-- Interest Group Field Info -->
314
- <div class="postbox yikes-easy-mc-postbox">
315
-
316
-
317
- <h3><?php _e( 'Interest Groups Overview' , 'yikes-inc-easy-mailchimp-extender' ); ?></h3>
318
- <?php
319
- if ( ! empty( $interest_groupings ) ) {
320
- ?>
321
- <ul class="interest-group-ul"><?php
322
- echo '<li class="interest-group-count">' . sprintf( _n( '%d Interest Group', '%d Interest Groups', intval( count( $interest_groupings ) ), 'yikes-inc-easy-mailchimp-extender' ), intval( count( $interest_groupings ) ) ) . '</li>';
323
- foreach ( $interest_groupings as $interest_group ) {
324
- // Build up the total subscribers
325
- $count = array_sum( wp_list_pluck( $interest_group['items'], 'subscriber_count' ) );
326
- echo '<li><span class="dashicons dashicons-marker"></span>' . $interest_group['title'] . '<span class="interest-group-title"></span><small title="' . $count . ' ' . __( "subscribers assigned to this group", 'yikes-inc-easy-mailchimp-extender' ) . '">(' . $count . ')</small></li>';
327
- }
328
- ?></ul><?php
329
- } else {
330
- ?>
331
- <ul class="interest-group-ul">
332
- <li><?php echo $no_interest_groupings; ?></li>
333
- </ul>
334
- <?php
335
- }
336
- /**
337
- * Custom action hook for our add-ons to hook into
338
- *
339
- * @since 6.0.3.8
340
- */
341
- do_action( 'yikes-mailchimp-list-interest-groups-metabox' );
342
- ?>
343
-
344
- </div>
345
-
346
- <!-- Segments Info -->
347
- <div class="postbox yikes-easy-mc-postbox">
348
-
349
-
350
- <h3><?php _e( 'Segments Overview' , 'yikes-inc-easy-mailchimp-extender' ); ?></h3>
351
- <?php
352
- if( isset( $segments['saved'] ) && count( $segments['saved'] ) >= 1 ) {
353
- $i = 1;
354
- ?><ul class="segment-ul"><?php
355
- echo '<li class="segment-group-count">' . sprintf( _n( '%d Segment', '%d Segments', intval( count( $segments['saved'] ) ), 'yikes-inc-easy-mailchimp-extender' ), intval( count( $segments['saved'] ) ) ) . '</li>';
356
- foreach( $segments['saved'] as $segment ) {
357
- echo '<li><span class="dashicons dashicons-arrow-right"></span>' . $segment['name'] . ' <small><a href="#" onclick="jQuery(this).parent().parent().next().slideToggle();jQuery(this).toggleText();return false;" data-alt-text="' . __( 'hide conditions' , 'yikes-inc-easy-mailchimp-extender' ) . '">' . __( "view conditions" , 'yikes-inc-easy-mailchimp-extender' ) . '</a></small></li>';
358
- ?><div class="conditionals yikes-easy-mc-hidden"><?php
359
- foreach( $segment['segment_opts']['conditions'] as $condition ) {
360
- echo '<li><small>' . sprintf( __( 'condition #%s : If %s %s %s', 'yikes-inc-easy-mailchimp-extender' ), intval( $i ), $condition['field'], $condition['op'], $condition['value'] ) . '</small></li>';
361
- $i++;
362
- }
363
- ?></div><?php
364
- }
365
- ?></ul><?php
366
- } else {
367
- ?>
368
- <ul class="segment-ul">
369
- <li><?php echo $no_segments; ?></li>
370
- </ul>
371
- <?php
372
- }
373
- ?>
374
- <!--
375
- <a class="edit-segments-button" href="#" onclick="return false;" class="button-primary"><?php _e( 'Edit Segments' , 'yikes-inc-easy-mailchimp-extender' ); ?></a>
376
- -->
377
- <p class="description edit-segment-description"><?php _e( 'To edit this lists segments, head over to' , 'yikes-inc-easy-mailchimp-extender' ); ?> <a href="http://www.Mailchimp.com" target="_blank">Mailchimp</a></p>
378
-
379
- </div>
380
-
381
-
382
- </div> <!-- .meta-box-sortables -->
383
-
384
- </div> <!-- #postbox-container-1 .postbox-container -->
385
-
386
- </div> <!-- #post-body .metabox-holder .columns-2 -->
387
-
388
- <br class="clear">
389
- </div> <!-- #poststuff -->
390
- </div>
391
- <!-- JS -->
392
- <script type="text/javascript">
393
- /* Toggle Text - Stats/Shortcode (manage-forms.php)*/
394
- jQuery.fn.toggleText = function() {
395
- var altText = this.data("alt-text");
396
- if (altText) {
397
- this.data("alt-text", this.html());
398
- this.html('<small>'+altText+'</small>');
399
- }
400
- };
401
- </script>
1
+ <?php
2
+ if ( ! isset( $_REQUEST['list-id'] ) ) {
3
+ wp_die( __( 'Oops, we can\'t determine what List to view. Please go back and try again.' ) );
4
+ }
5
+
6
+ $list_id = sanitize_key( $_REQUEST['list-id'] );
7
+ $list_helper = yikes_get_mc_api_manager()->get_list_handler();
8
+ $api_key = yikes_get_mc_api_key();
9
+ $dash_position = strpos( $api_key, '-' );
10
+
11
+
12
+ $list_data = $list_helper->get_list( $list_id );
13
+ if ( is_wp_error( $list_data ) ) {
14
+ $error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
15
+ $error_logging->maybe_write_to_log(
16
+ $list_data->get_error_code(),
17
+ __( "Get Account Lists", 'yikes-inc-easy-mailchimp-extender' ),
18
+ "View Lists Page"
19
+ );
20
+ $list_data = array();
21
+ }
22
+
23
+ $merge_fields = $list_helper->get_merge_fields( $list_id );
24
+ if ( is_wp_error( $merge_fields ) ) {
25
+ $error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
26
+ $error_logging->maybe_write_to_log(
27
+ $merge_fields->get_error_code(),
28
+ __( "Get Merge Variables", 'yikes-inc-easy-mailchimp-extender' ),
29
+ "View Lists Page"
30
+ );
31
+ $merge_fields = array();
32
+ }
33
+
34
+ // get the interest group data
35
+ $interest_groupings = $list_helper->get_interest_categories( $list_id );
36
+ if ( is_wp_error( $interest_groupings ) ) {
37
+ $error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
38
+ $error_logging->maybe_write_to_log(
39
+ $interest_groupings->get_error_code(),
40
+ __( "Get Interest Groups", 'yikes-inc-easy-mailchimp-extender' ),
41
+ "View Lists Page"
42
+ );
43
+ $interest_groupings = array();
44
+ }
45
+
46
+ $no_interest_groupings = '<p class="description">' . __( 'Interest groups are not enabled for this list.', 'yikes-inc-easy-mailchimp-extender' ) . '</p>';
47
+ $no_segments = __( 'No segments set up for this list.', 'yikes-inc-easy-mailchimp-extender' );
48
+ $segments = $list_helper->get_segments( $list_id );
49
+
50
+ // Get the full list of members.
51
+ $members = $list_helper->get_members( $list_id );
52
+ if ( is_wp_error( $members ) ) {
53
+ $error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
54
+ $error_logging->maybe_write_to_log(
55
+ $members->get_error_code(),
56
+ __( "Get Subscriber Count", 'yikes-inc-easy-mailchimp-extender' ),
57
+ "View Lists Page"
58
+ );
59
+ $members = array();
60
+ }
61
+
62
+ // setup pagination variables
63
+ $paged = isset( $_REQUEST['paged'] ) ? filter_var( $_REQUEST['paged'], FILTER_SANITIZE_NUMBER_INT ) : 0;
64
+ $limit = apply_filters( 'yikes_admin_list_subscriber_limit', 20 );
65
+ $page_offset = (int) $paged * (int) $limit;
66
+ $sort_dir = isset( $_REQUEST['sort'] ) ? $_REQUEST['sort'] : 'DESC';
67
+
68
+ if ( $sort_dir === 'DESC' ) {
69
+ $opposite_sort_dir = 'ASC';
70
+ $icon = '<span class="dashicons dashicons-arrow-down"></span>';
71
+ $sort_function = 'krsort';
72
+ } else {
73
+ $opposite_sort_dir = 'DESC';
74
+ $icon = '<span class="dashicons dashicons-arrow-up"></span>';
75
+ $sort_function = 'ksort';
76
+ }
77
+
78
+ // Sort the array based on the sort direction.
79
+ $sort_function( $members );
80
+
81
+ // Maybe split the array into pages
82
+ $total_pages = ceil( count( $members ) / $limit );
83
+ if ( (int) $total_pages === 0 ) {
84
+ $total_pages = '1';
85
+ }
86
+
87
+ // Segment the members based on the page and limit
88
+ $subscribers_list = array_slice( $members, $page_offset, $limit );
89
+
90
+ ?>
91
+ <div class="wrap">
92
+ <!-- Freddie Logo -->
93
+ <img src="<?php echo YIKES_MC_URL . 'includes/images/Mailchimp_Assets/Freddie_60px.png'; ?>" alt="<?php __( 'Freddie - Mailchimp Mascot' , 'yikes-inc-easy-mailchimp-extender' ); ?>" class="yikes-mc-freddie-logo" />
94
+
95
+ <h1>YIKES Easy Forms for Mailchimp | <?php echo $list_data['name']; ?></h1>
96
+
97
+ <!-- Settings Page Description -->
98
+ <p class="yikes-easy-mc-about-text about-text"><?php _e( 'View all subscribers below. View additional subscriber info, or add additional fields to this list.' , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
99
+ <!-- <p class="add-new-subscriber-button"><a href="#" onclick="jQuery(this).parent().next().slideToggle();" class="add-new-h2"><?php _e( 'New Subscriber' , 'yikes-inc-easy-mailchimp-extender' ); ?></a></p> -->
100
+
101
+ <?php
102
+ /* Display our admin notices here */
103
+ // Unsubscribe user confirmation message
104
+ if( isset( $_REQUEST['user-unsubscribed'] ) && $_REQUEST['user-unsubscribed'] == 'true' ) {
105
+ ?>
106
+ <div class="updated manage-form-admin-notice">
107
+ <p><?php _e( 'User successfully unsubscribed.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
108
+ </div>
109
+ <?php
110
+ }
111
+ if( isset( $_REQUEST['user-unsubscribed'] ) && $_REQUEST['user-unsubscribed'] == 'false' ) {
112
+ ?>
113
+ <div class="error manage-form-admin-notice">
114
+ <p><?php _e( "We've encountered an error trying to remove the subscriber. Please try again. If the error persists please get in contact with the YIKES Inc. support staff.", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
115
+ </div>
116
+ <?php
117
+ }
118
+ ?>
119
+
120
+ <section class="add-new-subscriber-form-container">
121
+ <h4><?php _e( 'Add New Subscriber' , 'yikes-inc-easy-mailchimp-extender' ); ?></h4>
122
+ <form id="add-new-subcscriber">
123
+ <input type="text" class="regular-text" placeholder="<?php _e( 'User Email Address' , 'yikes-inc-easy-mailchimp-extender' ); ?>" /></p>
124
+ <p><?php submit_button( 'Add Subscriber' ); ?></p>
125
+ </form>
126
+ </section>
127
+
128
+ <!-- entire body content -->
129
+ <div id="poststuff">
130
+
131
+ <div id="post-body" class="metabox-holder columns-2">
132
+
133
+ <!-- main content -->
134
+ <div id="post-body-content">
135
+
136
+ <div class="meta-box-sortables ui-sortable">
137
+
138
+ <div class="postbox yikes-easy-mc-postbox">
139
+
140
+ <table class="wp-list-table widefat fixed posts" cellspacing="0" id="yikes-easy-mc-manage-forms-table">
141
+
142
+ <!-- TABLE HEAD -->
143
+ <thead>
144
+ <tr>
145
+ <th id="user-email columnname" class="manage-column column-columnname" scope="col"><a id="user-email-sort" href="<?php echo esc_url_raw( add_query_arg( array( 'column' => 'email' , 'sort' => $opposite_sort_dir ) ) ); ?>"><?php _e( 'User Email' , 'yikes-inc-easy-mailchimp-extender' ); echo $icon;?></a></th>
146
+ <th id="columnname" class="manage-column column-columnname num" scope="col"><?php _e( 'Email Client' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
147
+ </tr>
148
+ </thead>
149
+ <!-- end header -->
150
+
151
+ <!-- FOOTER -->
152
+ <tfoot>
153
+ <tr>
154
+ <th class="manage-column column-columnname" scope="col"><?php _e( 'User Email' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
155
+ <th class="manage-column column-columnname num" scope="col"><?php _e( 'Email Client' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
156
+ </tr>
157
+ </tfoot>
158
+ <!-- end footer -->
159
+
160
+ <!-- TABLE BODY -->
161
+ <tbody>
162
+ <?php if ( count( $subscribers_list ) > 0 ) {
163
+ $i = 1;
164
+ foreach ( $subscribers_list as $subscriber ) {
165
+ $user_id = $subscriber['id'];
166
+ $path = YIKES_MC_URL . "includes/images/na.png";
167
+ $email_client_icon = "<img width='35' src='" . $path . "' alt='" . __( 'not set', 'yikes-inc-easy-mailchimp-extender' ) . "' title='" . __( 'not set', 'yikes-inc-easy-mailchimp-extender' ) . "'>";
168
+
169
+ ?>
170
+ <tr class="<?php if ( $i % 2 == 0 ) { echo 'alternate'; } ?>">
171
+ <td class="column-columnname">
172
+ <a class="user-email row-title" href="mailto:<?php echo sanitize_email( $subscriber['email_address'] ); ?>">
173
+ <?php echo sanitize_email( $subscriber['email_address'] ); ?>
174
+ </a>
175
+ <div class="row-actions">
176
+ <?php $view_user_info_url = esc_url_raw( add_query_arg( array(
177
+ 'mailchimp-list' => $list_id,
178
+ 'email-id' => $user_id,
179
+ ), admin_url() . 'admin.php?page=yikes-mailchimp-view-user' ) ); ?>
180
+ <span><a href="<?php echo $view_user_info_url; ?>"><?php _e( 'View Info', 'yikes-inc-easy-mailchimp-extender' ); ?></a> |</span>
181
+ <?php $url = esc_url_raw( add_query_arg( array(
182
+ 'action' => 'yikes-easy-mc-unsubscribe-user',
183
+ 'mailchimp-list' => $list_id,
184
+ 'nonce' => wp_create_nonce( 'unsubscribe-user-' . $user_id ),
185
+ 'email_id' => $user_id,
186
+ ) ) ); ?>
187
+ <span><a href="<?php echo $url; ?>" onclick="return confirm('<?php printf( __( "Are you sure you want to unsubscribe %s from this mailing list?", 'yikes-inc-easy-mailchimp-extender' ), sanitize_email( $subscriber['email_address'] ) ); ?>');" class="yikes-delete-subscriber"><?php _e( "Unsubscribe", 'yikes-inc-easy-mailchimp-extender' ); ?></a>
188
+ </div>
189
+ </td>
190
+ <td class="column-columnname num"><?php echo $email_client_icon; ?></td>
191
+ </tr>
192
+ <?php
193
+ $i ++;
194
+ }
195
+ } else { ?>
196
+ <tr class="no-items">
197
+ <td class="colspanchange no-current-subscriber-notice" colspan="2"><em><?php _e( 'No one is currently subscribed to this list.' , 'yikes-inc-easy-mailchimp-extender' ); ?></em></td>
198
+ </tr>
199
+ <?php } ?>
200
+ </tbody>
201
+ </table>
202
+ <!-- end table -->
203
+
204
+ </div> <!-- .postbox -->
205
+
206
+ <!-- pagination -->
207
+ <div class="tablenav">
208
+ <div class="tablenav-pages">
209
+ <a class='first-page <?php if( $paged == 0 ) { echo 'disabled'; } ?>' title='<?php _e( "Go to the first page" , 'yikes-inc-easy-mailchimp-extender' ); ?>' href='<?php echo esc_url_raw( add_query_arg( array( "paged" => 0 ) ) ); ?>'>&laquo;</a>
210
+ <a class='prev-page <?php if( $paged == 0 ) { echo 'disabled'; } ?>' title='<?php _e( "Go to the previous page" , 'yikes-inc-easy-mailchimp-extender' ); ?>' href='<?php echo esc_url_raw( add_query_arg( array( "paged" => intval( $paged - 1 ) ) ) ); ?>'>&lsaquo;</a>
211
+ <span class="paging-input"><input class='current-page' title='<?php _e( "Current page" , 'yikes-inc-easy-mailchimp-extender' ); ?>' type='text' name='paged' value='<?php if( $paged == 0 ) { echo '1'; } else { echo intval( $paged + 1 ); } ?>' size='1' /> <?php _e( 'of', 'yikes-inc-easy-mailchimp-extender' ); ?> <span class='total-pages'><?php echo $total_pages; ?></span></span>
212
+ <a class='next-page <?php if( $paged == intval( $total_pages - 1 ) ) { echo 'disabled'; } ?>' title='<?php _e( "Go to the next page" , 'yikes-inc-easy-mailchimp-extender' ); ?>' href='<?php echo esc_url_raw( add_query_arg( array( "paged" => intval( $paged + 1 ) ) ) ); ?>'>&rsaquo;</a>
213
+ <a class='last-page <?php if( $paged == intval( $total_pages - 1 ) ) { echo 'disabled'; } ?>' title='<?php _e( "Go to the last page" , 'yikes-inc-easy-mailchimp-extender' ); ?>' href='<?php echo esc_url_raw( add_query_arg( array( "paged" => intval( $total_pages - 1 ) ) ) ); ?>'>&raquo;</a>
214
+ </div>
215
+ </div>
216
+
217
+ </div> <!-- .meta-box-sortables .ui-sortable -->
218
+
219
+ </div> <!-- post-body-content -->
220
+
221
+ <!-- sidebar -->
222
+ <div id="postbox-container-1" class="postbox-container">
223
+
224
+ <div class="meta-box-sortables">
225
+
226
+ <div class="postbox yikes-easy-mc-postbox">
227
+
228
+ <h3><?php _e( 'List Overview' , 'yikes-inc-easy-mailchimp-extender' ); ?></h3>
229
+
230
+ <?php
231
+ // store list rating
232
+ $list_rating = $list_data['list_rating'];
233
+ if( $list_rating > 0 ) {
234
+ $list_rating_explosion = explode( '.' , $list_rating );
235
+ $star_array = array();
236
+ $x = 1;
237
+ while( $list_rating_explosion[0] >= $x ) {
238
+ $star_array[] = '<span class="dashicons dashicons-star-filled list-rating-star"></span>';
239
+ $x++;
240
+ }
241
+ if( $list_rating_explosion[1] == '5' ) {
242
+ $star_array[] = '<span class="dashicons dashicons-star-half list-rating-star"></span>';
243
+ }
244
+ } else {
245
+ $star_array = array( 'n/a' );
246
+ }
247
+ ?>
248
+ <table class="form-table">
249
+ <tr valign="top">
250
+ <td scope="row"><label for="tablecell"><strong><?php _e( 'List Rating' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong></label></td>
251
+ <td><?php echo implode( ' ' , $star_array ); ?></td>
252
+ </tr>
253
+ <tr valign="top">
254
+ <td scope="row"><label for="tablecell"><strong><?php _e( 'Average Subscribers' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong></label></td>
255
+ <td><?php echo $list_data['stats']['avg_sub_rate']; ?><small> / <?php _e( 'month' , 'yikes-inc-easy-mailchimp-extender' ); ?></small></td>
256
+ </tr>
257
+ <tr valign="top">
258
+ <td scope="row"><label for="tablecell"><strong><?php _e( 'Subscriber Count' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong></label></td>
259
+ <td><?php echo intval( $list_data['stats']['member_count'] ); ?></td>
260
+ </tr>
261
+ <tr valign="top">
262
+ <td scope="row"><label for="tablecell"><strong><?php _e( 'New Since Last Campaign' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong></label></td>
263
+ <td><?php echo intval( $list_data['stats']['member_count_since_send'] ); ?></td>
264
+ </tr>
265
+ <tr valign="top">
266
+ <td scope="row"><label for="tablecell"><strong><?php _e( 'Created' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong></label></td>
267
+ <td><?php echo date( get_option('date_format') , strtotime( $list_data['date_created'] ) ); ?></td>
268
+ </tr>
269
+ <tr valign="top">
270
+ <td scope="row"><label for="tablecell"><strong><?php _e( 'List Fields' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong></label></td>
271
+ <td><?php echo intval( $list_data['stats']['merge_field_count'] + 1 ); // add 1 for our email field.. ?></td>
272
+ </tr>
273
+ <tr valign="top">
274
+ <td scope="row"><label for="tablecell"><strong><?php _e( 'Short Signup URL' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong></label></td>
275
+ <td><input type="text" class="widefat view-list-sidebar-input" value="<?php echo esc_url_raw( $list_data['subscribe_url_short'] ); ?>" readonly onclick="jQuery(this).select();"></td>
276
+ </tr>
277
+ <tr valign="top">
278
+ <td scope="row"><label for="tablecell"><strong><?php _e( 'Default From Email' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong></label></td>
279
+ <td><input type="text" class="widefat view-list-sidebar-input" value="<?php echo sanitize_email( $list_data['campaign_defaults']['from_email'] ); ?>" readonly onclick="jQuery(this).select();"></td>
280
+ </tr>
281
+ <tr valign="top">
282
+ <td scope="row"><label for="tablecell"><strong><?php _e( 'Default From Name' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong></label></td>
283
+ <td><?php echo $list_data['campaign_defaults']['from_name']; ?></td>
284
+ </tr>
285
+ </table>
286
+
287
+ </div> <!-- .postbox -->
288
+
289
+
290
+ <!-- Merge Field Info -->
291
+ <div class="postbox yikes-easy-mc-postbox">
292
+
293
+ <h3><?php _e( 'Form Fields' , 'yikes-inc-easy-mailchimp-extender' ); ?></h3>
294
+ <?php
295
+ if( count( $merge_fields['merge_fields'] ) >= 1 ) {
296
+ ?><ul class="merge-variable-ul"><?php
297
+ echo '<li class="interest-group-count">' . sprintf( _n( '%d Field', '%d Fields', intval( count( $merge_fields['merge_fields'] ) ), 'yikes-inc-easy-mailchimp-extender' ), intval( count( $merge_fields['merge_fields'] ) ) ) . '</li>';
298
+ foreach( $merge_fields['merge_fields'] as $merge_field ) {
299
+ // new action hook @since 6.0.3.8
300
+ echo '<li class="' . $merge_field['tag'] . '"><span class="dashicons dashicons-marker"></span>' . $merge_field['name'] . ' ' . do_action( 'yikes-mailchimp-list-field', $merge_field ) . '</li>';
301
+ }
302
+ ?></ul><?php
303
+ }
304
+ /**
305
+ * Custom action hook for our add-ons to hook into
306
+ * @since 6.0.3.8
307
+ */
308
+ do_action( 'yikes-mailchimp-list-form-fields-metabox' );
309
+ ?>
310
+
311
+ </div>
312
+
313
+ <!-- Interest Group Field Info -->
314
+ <div class="postbox yikes-easy-mc-postbox">
315
+
316
+
317
+ <h3><?php _e( 'Interest Groups Overview' , 'yikes-inc-easy-mailchimp-extender' ); ?></h3>
318
+ <?php
319
+ if ( ! empty( $interest_groupings ) ) {
320
+ ?>
321
+ <ul class="interest-group-ul"><?php
322
+ echo '<li class="interest-group-count">' . sprintf( _n( '%d Interest Group', '%d Interest Groups', intval( count( $interest_groupings ) ), 'yikes-inc-easy-mailchimp-extender' ), intval( count( $interest_groupings ) ) ) . '</li>';
323
+ foreach ( $interest_groupings as $interest_group ) {
324
+ // Build up the total subscribers
325
+ $count = array_sum( wp_list_pluck( $interest_group['items'], 'subscriber_count' ) );
326
+ echo '<li><span class="dashicons dashicons-marker"></span>' . $interest_group['title'] . '<span class="interest-group-title"></span><small title="' . $count . ' ' . __( "subscribers assigned to this group", 'yikes-inc-easy-mailchimp-extender' ) . '">(' . $count . ')</small></li>';
327
+ }
328
+ ?></ul><?php
329
+ } else {
330
+ ?>
331
+ <ul class="interest-group-ul">
332
+ <li><?php echo $no_interest_groupings; ?></li>
333
+ </ul>
334
+ <?php
335
+ }
336
+ /**
337
+ * Custom action hook for our add-ons to hook into
338
+ *
339
+ * @since 6.0.3.8
340
+ */
341
+ do_action( 'yikes-mailchimp-list-interest-groups-metabox' );
342
+ ?>
343
+
344
+ </div>
345
+
346
+ <!-- Segments Info -->
347
+ <div class="postbox yikes-easy-mc-postbox">
348
+
349
+
350
+ <h3><?php _e( 'Segments Overview' , 'yikes-inc-easy-mailchimp-extender' ); ?></h3>
351
+ <?php
352
+ if( isset( $segments['saved'] ) && count( $segments['saved'] ) >= 1 ) {
353
+ $i = 1;
354
+ ?><ul class="segment-ul"><?php
355
+ echo '<li class="segment-group-count">' . sprintf( _n( '%d Segment', '%d Segments', intval( count( $segments['saved'] ) ), 'yikes-inc-easy-mailchimp-extender' ), intval( count( $segments['saved'] ) ) ) . '</li>';
356
+ foreach( $segments['saved'] as $segment ) {
357
+ echo '<li><span class="dashicons dashicons-arrow-right"></span>' . $segment['name'] . ' <small><a href="#" onclick="jQuery(this).parent().parent().next().slideToggle();jQuery(this).toggleText();return false;" data-alt-text="' . __( 'hide conditions' , 'yikes-inc-easy-mailchimp-extender' ) . '">' . __( "view conditions" , 'yikes-inc-easy-mailchimp-extender' ) . '</a></small></li>';
358
+ ?><div class="conditionals yikes-easy-mc-hidden"><?php
359
+ foreach( $segment['segment_opts']['conditions'] as $condition ) {
360
+ echo '<li><small>' . sprintf( __( 'condition #%s : If %s %s %s', 'yikes-inc-easy-mailchimp-extender' ), intval( $i ), $condition['field'], $condition['op'], $condition['value'] ) . '</small></li>';
361
+ $i++;
362
+ }
363
+ ?></div><?php
364
+ }
365
+ ?></ul><?php
366
+ } else {
367
+ ?>
368
+ <ul class="segment-ul">
369
+ <li><?php echo $no_segments; ?></li>
370
+ </ul>
371
+ <?php
372
+ }
373
+ ?>
374
+ <!--
375
+ <a class="edit-segments-button" href="#" onclick="return false;" class="button-primary"><?php _e( 'Edit Segments' , 'yikes-inc-easy-mailchimp-extender' ); ?></a>
376
+ -->
377
+ <p class="description edit-segment-description"><?php _e( 'To edit this lists segments, head over to' , 'yikes-inc-easy-mailchimp-extender' ); ?> <a href="http://www.Mailchimp.com" target="_blank">Mailchimp</a></p>
378
+
379
+ </div>
380
+
381
+
382
+ </div> <!-- .meta-box-sortables -->
383
+
384
+ </div> <!-- #postbox-container-1 .postbox-container -->
385
+
386
+ </div> <!-- #post-body .metabox-holder .columns-2 -->
387
+
388
+ <br class="clear">
389
+ </div> <!-- #poststuff -->
390
+ </div>
391
+ <!-- JS -->
392
+ <script type="text/javascript">
393
+ /* Toggle Text - Stats/Shortcode (manage-forms.php)*/
394
+ jQuery.fn.toggleText = function() {
395
+ var altText = this.data("alt-text");
396
+ if (altText) {
397
+ this.data("alt-text", this.html());
398
+ this.html('<small>'+altText+'</small>');
399
+ }
400
+ };
401
+ </script>
admin/partials/view-user.php CHANGED
@@ -1,316 +1,316 @@
1
- <?php
2
- /*
3
- * Get and store our variables
4
- * @since 6.0
5
- */
6
- $list_id = $_GET['mailchimp-list'];
7
- $email_id = esc_attr( $_GET['email-id'] );
8
- $list_helper = yikes_get_mc_api_manager()->get_list_handler();
9
-
10
- /*
11
- * Confirm that our data is set
12
- * or abort...
13
- */
14
- if ( ! isset( $list_id ) || ! isset( $email_id ) ) {
15
- wp_die( "We've encountered an error. Please go back and try again", 'yikes-inc-easy-mailchimp-extender' );
16
- exit;
17
- }
18
-
19
- $user_data = $list_helper->get_member( $list_id, $email_id );
20
- if ( is_wp_error( $user_data ) ) {
21
- $error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
22
- $error_logging->maybe_write_to_log(
23
- $user_data->get_error_code(),
24
- __( 'Get Member Info', 'yikes-inc-easy-mailchimp-extender' ),
25
- 'View User Page'
26
- );
27
-
28
- echo '<h4>Error</h4>';
29
- echo $user_data->get_error_code() . '.';
30
-
31
- return;
32
- }
33
-
34
- if ( empty( $user_data ) ) {
35
- return;
36
- }
37
-
38
- $other_lists = $list_helper->get_members_lists( $email_id );
39
- $merge_data_array = $user_data['merge_fields'];
40
-
41
- $additional_lists = array();
42
- $merge_variable_fields = array();
43
-
44
- /* Build the array of mailing lists the user is subscribed to */
45
- foreach ( $other_lists as $id => $value ) {
46
- if ( 'subscribed' !== $value['status'] ) {
47
- continue;
48
- }
49
-
50
- $list_data = $list_helper->get_list( $id );
51
- if ( is_wp_error( $list_data ) ) {
52
- $error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
53
- $error_logging->maybe_write_to_log(
54
- $list_data->get_error_code(),
55
- __( "Get Account Lists", 'yikes-inc-easy-mailchimp-extender' ),
56
- "View User Page"
57
- );
58
- continue;
59
- }
60
-
61
- $additional_lists[ $list_data['id'] ] = $list_data['name'];
62
- }
63
-
64
- /* Build the array of merge variables => value */
65
- $merge_variables = $list_helper->get_merge_fields( $list_id );
66
- if ( is_wp_error( $merge_variables ) ) {
67
- $error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
68
- $error_logging->maybe_write_to_log(
69
- $merge_variables->get_error_code(),
70
- __( "Get Merge Variables", 'yikes-inc-easy-mailchimp-extender' ),
71
- "View User Page"
72
- );
73
- $merge_variables = array();
74
- }
75
- // loop and display
76
- if ( $merge_variables ) {
77
- foreach ( $merge_variables['merge_fields'] as $merge_variable ) {
78
- if ( $merge_variable['tag'] != 'EMAIL' ) {
79
- $merge_variable_fields[ $merge_variable['name'] ] = ( isset( $merge_data_array[ $merge_variable['tag'] ] ) ) ? $merge_data_array[ $merge_variable['tag'] ] : '';
80
- }
81
- }
82
- }
83
-
84
-
85
- // store usable data
86
- $user_email = sanitize_email( $user_data['email_address'] );
87
- // prepend our email address to the beginning
88
- $merge_variable_fields = array( 'Email Address' => $user_email ) + $merge_variable_fields;
89
- $gravatar_image = get_avatar( $user_email, 120 );
90
- $email_type = $user_data['email_type'];
91
- $member_rating = ( ! empty( $user_data['member_rating'] ) ) ? (int) $user_data['member_rating'] : 0;
92
- $member_rating_stars = '';
93
-
94
- // Create member rating stars
95
- for ( $i = 1; $i <= 5; $i++ ) {
96
- if ( $i <= $member_rating ) {
97
- $member_rating_stars .= '<span class="yikes-mc-member-rating-star dashicons dashicons-star-filled"></span>';
98
- } else {
99
- $member_rating_stars .= '<span class="yikes-mc-member-rating-star dashicons dashicons-star-empty"></span>';
100
- }
101
- }
102
-
103
- $last_changed = strtotime( $user_data['last_changed'] );
104
- $user_language = ( ! empty( $user_data['language'] ) ) ? $user_data['language'] : '';
105
- $list_name = $additional_lists[ $list_id ];
106
-
107
- // Generate our display page
108
- ?>
109
- <div class="wrap view-user-data-wrap">
110
- <!-- Freddie Logo -->
111
- <img src="<?php echo YIKES_MC_URL . 'includes/images/Mailchimp_Assets/Freddie_60px.png'; ?>" alt="<?php __( 'Freddie - Mailchimp Mascot', 'yikes-inc-easy-mailchimp-extender' ); ?>" class="yikes-mc-freddie-logo" />
112
-
113
- <h1>YIKES Easy Forms for Mailchimp | <?php _e( 'Subscriber Details', 'yikes-inc-easy-mailchimp-extender' ); ?></h1>
114
-
115
- <!-- Settings Page Description -->
116
- <p class="yikes-easy-mc-about-text about-text"><?php printf( __( 'View %s subscriber details below.', 'yikes-inc-easy-mailchimp-extender' ), $user_email ); ?></p>
117
-
118
- <section class="yikes-mc-view-list-breadcrumbs">
119
- <a href="<?php echo esc_url( admin_url( 'admin.php?page=yikes-inc-easy-mailchimp-lists' ) ); ?>" title="<?php _e( 'View List', 'yikes-inc-easy-mailchimp-extender' ); ?>">
120
- <?php _e( 'Optin Forms', 'yikes-inc-easy-mailchimp-extender' ); ?>
121
- </a>
122
- &nbsp;&#187;&nbsp;
123
- <a href="<?php echo esc_url( admin_url( 'admin.php?page=yikes-mailchimp-view-list&list-id=' . $list_id ) ); ?>" title="<?php echo $list_name; ?>">
124
- <?php echo $list_name; ?>
125
- </a>
126
- &nbsp;&#187;&nbsp;
127
- <span title="<?php echo $user_email; ?>">
128
- <?php echo esc_html( $user_email ); ?>
129
- </span>
130
- </section>
131
-
132
- <!-- Customer Container -->
133
- <div id="yikes-mc-subscriber-card-wrapper">
134
- <section class="yikes-mc-card-top">
135
- <?php echo $gravatar_image; ?>
136
- <h2><?php echo esc_html( $user_email ); ?></h2>
137
- <?php /* translators: the placeholder is a number between 1-5 */ ?>
138
- <span class="member-star-rating-container" title="<?php echo esc_html( sprintf( _n( 'Member Rating: %s star', 'Member Rating: %s stars', esc_attr( $member_rating ), 'yikes-inc-easy-mailchimp-extender' ), esc_attr( $member_rating ) ) ); ?>">
139
- <?php echo $member_rating_stars; ?>
140
- </span>
141
- <span class="member-subscription-date">
142
- <?php
143
- /* translators: the placeholder is a datetime string. */
144
- echo sprintf( esc_html__( 'Subscribed: %1$1s', 'yikes-inc-easy-mailchimp-extender' ), esc_html( gmdate( 'F jS, Y h:i a', $last_changed ) ) );
145
- ?>
146
- </span>
147
- <?php if ( isset( $user_data['location'] ) && isset( $user_data['location']['timezone'] ) && ! empty( $user_data['location']['timezone'] ) && isset( $user_data['location']['country_code'] ) && ! empty( $user_data['location']['country_code'] ) ) { ?>
148
- <span class="member-location-data">
149
- <?php
150
- /* translators: the placeholders are a timezone and a country code */
151
- echo sprintf( esc_html__( 'Location: %1$1s, %2$2s', 'yikes-inc-easy-mailchimp-extender' ), esc_html( $user_data['location']['timezone'] ), esc_html( $user_data['location']['country_code'] ) );
152
- ?>
153
- </span>
154
- <?php } ?>
155
- </section>
156
-
157
- <hr class="yikes-mc-subscriber-hr" />
158
-
159
- <?php
160
- if ( ! isset( $_GET['section'] ) || ( isset( $_GET['section'] ) && filter_var( wp_unslash( $_GET['section'] ), FILTER_SANITIZE_STRING ) === 'subscriber-data' ) ) {
161
- ?>
162
- <section class="yikes-mc-card-body merge-variable-section">
163
- <h3><?php esc_html_e( 'Fields:', 'yikes-inc-easy-mailchimp-extender' ); ?></h3>
164
- <?php
165
- if ( ! empty( $merge_variable_fields ) ) {
166
- ?>
167
- <?php foreach ( $merge_variable_fields as $field_name => $value ) { ?>
168
- <li>
169
- <label>
170
- <strong class="section-label"><?php echo esc_html( $field_name ); ?></strong>
171
- <p class="section-value"><em><?php echo esc_html( $value ); ?></em></p>
172
- </label>
173
- </li>
174
- <?php }
175
- } else {
176
- ?>
177
- <strong><?php esc_html_e( 'No Subscriber Data Found', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
178
- <?php
179
- }
180
- if ( isset( $user_data['ip_signup'] ) && ! empty( $user_data['ip_signup'] ) ) {
181
- ?>
182
- <li>
183
- <label>
184
- <strong class="section-label"><?php esc_html_e( 'Signup IP', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
185
- <p class="section-value"><em><?php esc_html_e( $user_data['ip_signup'] ); ?></em></p>
186
- </label>
187
- </li>
188
- <?php
189
- }
190
- }
191
- ?>
192
- </section>
193
- <?php
194
-
195
-
196
- if ( isset( $_GET['section'] ) && $_GET['section'] == 'additional-subscriptions' ) {
197
- ?>
198
- <section class="yikes-mc-card-body">
199
- <?php
200
- if ( ! empty( $additional_lists ) ) {
201
- // remove this list from the additional lists list
202
- unset( $additional_lists[ $list_id ] );
203
- if ( ! empty( $additional_lists ) ) {
204
- ?>
205
- <h3><?php _e( 'Additional Subscriptions:', 'yikes-inc-easy-mailchimp-extender' ); ?></h3>
206
- <?php foreach ( $additional_lists as $listid => $name ) { ?>
207
- <?php
208
- $user_redirect_url = esc_url_raw( admin_url( 'admin.php?page=yikes-mailchimp-view-list&list-id=' . $listid ) );
209
- ?>
210
- <li><a href="<?php echo $user_redirect_url; ?>"><?php echo $name; ?></a></li>
211
- <?php }
212
- }
213
- } else {
214
- ?>
215
- <strong><?php _e( 'No Other Subscriptions Found.', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
216
- <?php
217
- }
218
- ?>
219
- </section>
220
- <?php
221
- }
222
- ?>
223
-
224
- <?php
225
- if ( isset( $_GET['section'] ) && $_GET['section'] == 'delete-subscriber' ) {
226
- $unsubscribe_subscriber_url = esc_url_raw( add_query_arg( array(
227
- 'action' => 'yikes-easy-mc-unsubscribe-user',
228
- 'mailchimp-list' => $list_id,
229
- 'nonce' => wp_create_nonce( 'unsubscribe-user-' . $email_id ),
230
- 'email_id' => $email_id,
231
- ) ) );
232
- ?>
233
- <form id="delete_subscriber" method="POST" action="<?php echo $unsubscribe_subscriber_url; ?>">
234
- <p class="description">
235
- <?php printf( __( 'Deleting this subscriber will completely remove %s from the "%s" Mailchimp list.', 'yikes-inc-easy-mailchimp-extender' ), '<strong>' . $user_email . '</strong>', '<strong>' . $list_name . '</strong>' ); ?>
236
- </p>
237
- <br />
238
- <label>
239
- <input type="checkbox" name="confirm_delete_subscriber" value="1" onclick="toggleDeleteSubscriberButton(jQuery(this));">
240
- <?php printf( __( 'Are you sure you want to delete "%s" from "%s?"', 'yikes-inc-easy-mailchimp-extender' ), '<strong>' . $user_email . '</strong>', '<strong>' . $list_name . '</strong>' ); ?>
241
- </label>
242
- <?php submit_button( __( 'Delete Subscriber', 'yikes-inc-easy-mailchimp-extender' ), 'primary', 'delete-mailchimp-subscriber', true, array( 'disabled' => 'disabled' ) ); ?>
243
- </form>
244
- <?php
245
- }
246
- ?>
247
-
248
- </div>
249
-
250
- <?php
251
- // setup the redirect url for our additional subscriptions
252
- $subscriber_details = esc_url_raw(
253
- add_query_arg(
254
- array(
255
- 'section' => 'subscriber-data',
256
- )
257
- )
258
- );
259
- // setup the redirect url for our additional subscriptions
260
- $additional_subscription_url = esc_url_raw(
261
- add_query_arg(
262
- array(
263
- 'section' => 'additional-subscriptions',
264
- )
265
- )
266
- );
267
- // setup the redirect url for our delete subscriber
268
- $delete_subscriber_url = esc_url_raw(
269
- add_query_arg(
270
- array(
271
- 'section' => 'delete-subscriber',
272
- )
273
- )
274
- );
275
- ?>
276
- <!-- Tabs -->
277
- <div id="customer-tab-wrapper">
278
- <ul id="customer-tab-wrapper-list">
279
-
280
- <?php if ( isset( $_GET['section'] ) && $_GET['section'] != 'subscriber-data' ) { ?>
281
- <a title="<?php _e( 'Subscriber Details', 'yikes-inc-easy-mailchimp-extender' ); ?>" aria-label="<?php _e( 'Subscriber Details', 'yikes-inc-easy-mailchimp-extender' ); ?>" href="<?php echo $subscriber_details; ?>">
282
- <?php } ?>
283
-
284
- <li <?php if ( ! isset( $_GET['section'] ) || ( isset( $_GET['section'] ) && $_GET['section'] == 'subscriber-data' ) ) { ?>class="active" <?php } else { ?>class="inactive"<?php } ?>>
285
- <span class="dashicons dashicons-id"></span></li>
286
-
287
- <?php if ( isset( $_GET['section'] ) && $_GET['section'] != 'subscriber-data' ) { ?>
288
- </a>
289
- <?php } ?>
290
-
291
- <?php if ( ! isset( $_GET['section'] ) || ( isset( $_GET['section'] ) && $_GET['section'] != 'additional-subscriptions' ) ) { ?>
292
- <a title="<?php _e( 'Additional Subscriptions', 'yikes-inc-easy-mailchimp-extender' ); ?>" aria-label="<?php _e( 'Additional Subscriptions', 'yikes-inc-easy-mailchimp-extender' ); ?>" href="<?php echo $additional_subscription_url; ?>">
293
- <?php } ?>
294
-
295
- <li <?php if ( isset( $_GET['section'] ) && $_GET['section'] == 'additional-subscriptions' ) { ?>class="active" <?php } else { ?>class="inactive"<?php } ?>>
296
- <span class="dashicons dashicons-portfolio"></span></li>
297
-
298
- <?php if ( ! isset( $_GET['section'] ) || ( isset( $_GET['section'] ) && $_GET['section'] == 'additional-subscriptions' ) ) { ?>
299
- </a>
300
- <?php } ?>
301
-
302
- <?php if ( ! isset( $_GET['section'] ) || isset( $_GET['section'] ) && $_GET['section'] != 'delete-subscriber' ) { ?>
303
- <a title="<?php _e( 'Delete Subscriber', 'yikes-inc-easy-mailchimp-extender' ); ?>" aria-label="<?php _e( 'Delete Subscriber', 'yikes-inc-easy-mailchimp-extender' ); ?>" href="<?php echo $delete_subscriber_url; ?>">
304
- <?php } ?>
305
-
306
- <li <?php if ( isset( $_GET['section'] ) && $_GET['section'] == 'delete-subscriber' ) { ?>class="active" <?php } else { ?>class="inactive"<?php } ?>>
307
- <span class="dashicons dashicons-trash"></span></li>
308
-
309
- <?php if ( ! isset( $_GET['section'] ) || ( isset( $_GET['section'] ) && $_GET['section'] == 'delete-subscriber' ) ) { ?>
310
- </a>
311
- <?php } ?>
312
-
313
- </ul>
314
- </div>
315
-
316
- </div>
1
+ <?php
2
+ /*
3
+ * Get and store our variables
4
+ * @since 6.0
5
+ */
6
+ $list_id = $_GET['mailchimp-list'];
7
+ $email_id = esc_attr( $_GET['email-id'] );
8
+ $list_helper = yikes_get_mc_api_manager()->get_list_handler();
9
+
10
+ /*
11
+ * Confirm that our data is set
12
+ * or abort...
13
+ */
14
+ if ( ! isset( $list_id ) || ! isset( $email_id ) ) {
15
+ wp_die( "We've encountered an error. Please go back and try again", 'yikes-inc-easy-mailchimp-extender' );
16
+ exit;
17
+ }
18
+
19
+ $user_data = $list_helper->get_member( $list_id, $email_id );
20
+ if ( is_wp_error( $user_data ) ) {
21
+ $error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
22
+ $error_logging->maybe_write_to_log(
23
+ $user_data->get_error_code(),
24
+ __( 'Get Member Info', 'yikes-inc-easy-mailchimp-extender' ),
25
+ 'View User Page'
26
+ );
27
+
28
+ echo '<h4>Error</h4>';
29
+ echo $user_data->get_error_code() . '.';
30
+
31
+ return;
32
+ }
33
+
34
+ if ( empty( $user_data ) ) {
35
+ return;
36
+ }
37
+
38
+ $other_lists = $list_helper->get_members_lists( $email_id );
39
+ $merge_data_array = $user_data['merge_fields'];
40
+
41
+ $additional_lists = array();
42
+ $merge_variable_fields = array();
43
+
44
+ /* Build the array of mailing lists the user is subscribed to */
45
+ foreach ( $other_lists as $id => $value ) {
46
+ if ( 'subscribed' !== $value['status'] ) {
47
+ continue;
48
+ }
49
+
50
+ $list_data = $list_helper->get_list( $id );
51
+ if ( is_wp_error( $list_data ) ) {
52
+ $error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
53
+ $error_logging->maybe_write_to_log(
54
+ $list_data->get_error_code(),
55
+ __( "Get Account Lists", 'yikes-inc-easy-mailchimp-extender' ),
56
+ "View User Page"
57
+ );
58
+ continue;
59
+ }
60
+
61
+ $additional_lists[ $list_data['id'] ] = $list_data['name'];
62
+ }
63
+
64
+ /* Build the array of merge variables => value */
65
+ $merge_variables = $list_helper->get_merge_fields( $list_id );
66
+ if ( is_wp_error( $merge_variables ) ) {
67
+ $error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
68
+ $error_logging->maybe_write_to_log(
69
+ $merge_variables->get_error_code(),
70
+ __( "Get Merge Variables", 'yikes-inc-easy-mailchimp-extender' ),
71
+ "View User Page"
72
+ );
73
+ $merge_variables = array();
74
+ }
75
+ // loop and display
76
+ if ( $merge_variables ) {
77
+ foreach ( $merge_variables['merge_fields'] as $merge_variable ) {
78
+ if ( $merge_variable['tag'] != 'EMAIL' ) {
79
+ $merge_variable_fields[ $merge_variable['name'] ] = ( isset( $merge_data_array[ $merge_variable['tag'] ] ) ) ? $merge_data_array[ $merge_variable['tag'] ] : '';
80
+ }
81
+ }
82
+ }
83
+
84
+
85
+ // store usable data
86
+ $user_email = sanitize_email( $user_data['email_address'] );
87
+ // prepend our email address to the beginning
88
+ $merge_variable_fields = array( 'Email Address' => $user_email ) + $merge_variable_fields;
89
+ $gravatar_image = get_avatar( $user_email, 120 );
90
+ $email_type = $user_data['email_type'];
91
+ $member_rating = ( ! empty( $user_data['member_rating'] ) ) ? (int) $user_data['member_rating'] : 0;
92
+ $member_rating_stars = '';
93
+
94
+ // Create member rating stars
95
+ for ( $i = 1; $i <= 5; $i++ ) {
96
+ if ( $i <= $member_rating ) {
97
+ $member_rating_stars .= '<span class="yikes-mc-member-rating-star dashicons dashicons-star-filled"></span>';
98
+ } else {
99
+ $member_rating_stars .= '<span class="yikes-mc-member-rating-star dashicons dashicons-star-empty"></span>';
100
+ }
101
+ }
102
+
103
+ $last_changed = strtotime( $user_data['last_changed'] );
104
+ $user_language = ( ! empty( $user_data['language'] ) ) ? $user_data['language'] : '';
105
+ $list_name = $additional_lists[ $list_id ];
106
+
107
+ // Generate our display page
108
+ ?>
109
+ <div class="wrap view-user-data-wrap">
110
+ <!-- Freddie Logo -->
111
+ <img src="<?php echo YIKES_MC_URL . 'includes/images/Mailchimp_Assets/Freddie_60px.png'; ?>" alt="<?php __( 'Freddie - Mailchimp Mascot', 'yikes-inc-easy-mailchimp-extender' ); ?>" class="yikes-mc-freddie-logo" />
112
+
113
+ <h1>YIKES Easy Forms for Mailchimp | <?php _e( 'Subscriber Details', 'yikes-inc-easy-mailchimp-extender' ); ?></h1>
114
+
115
+ <!-- Settings Page Description -->
116
+ <p class="yikes-easy-mc-about-text about-text"><?php printf( __( 'View %s subscriber details below.', 'yikes-inc-easy-mailchimp-extender' ), $user_email ); ?></p>
117
+
118
+ <section class="yikes-mc-view-list-breadcrumbs">
119
+ <a href="<?php echo esc_url( admin_url( 'admin.php?page=yikes-inc-easy-mailchimp-lists' ) ); ?>" title="<?php _e( 'View List', 'yikes-inc-easy-mailchimp-extender' ); ?>">
120
+ <?php _e( 'Optin Forms', 'yikes-inc-easy-mailchimp-extender' ); ?>
121
+ </a>
122
+ &nbsp;&#187;&nbsp;
123
+ <a href="<?php echo esc_url( admin_url( 'admin.php?page=yikes-mailchimp-view-list&list-id=' . $list_id ) ); ?>" title="<?php echo $list_name; ?>">
124
+ <?php echo $list_name; ?>
125
+ </a>
126
+ &nbsp;&#187;&nbsp;
127
+ <span title="<?php echo $user_email; ?>">
128
+ <?php echo esc_html( $user_email ); ?>
129
+ </span>
130
+ </section>
131
+
132
+ <!-- Customer Container -->
133
+ <div id="yikes-mc-subscriber-card-wrapper">
134
+ <section class="yikes-mc-card-top">
135
+ <?php echo $gravatar_image; ?>
136
+ <h2><?php echo esc_html( $user_email ); ?></h2>
137
+ <?php /* translators: the placeholder is a number between 1-5 */ ?>
138
+ <span class="member-star-rating-container" title="<?php echo esc_html( sprintf( _n( 'Member Rating: %s star', 'Member Rating: %s stars', esc_attr( $member_rating ), 'yikes-inc-easy-mailchimp-extender' ), esc_attr( $member_rating ) ) ); ?>">
139
+ <?php echo $member_rating_stars; ?>
140
+ </span>
141
+ <span class="member-subscription-date">
142
+ <?php
143
+ /* translators: the placeholder is a datetime string. */
144
+ echo sprintf( esc_html__( 'Subscribed: %1$1s', 'yikes-inc-easy-mailchimp-extender' ), esc_html( gmdate( 'F jS, Y h:i a', $last_changed ) ) );
145
+ ?>
146
+ </span>
147
+ <?php if ( isset( $user_data['location'] ) && isset( $user_data['location']['timezone'] ) && ! empty( $user_data['location']['timezone'] ) && isset( $user_data['location']['country_code'] ) && ! empty( $user_data['location']['country_code'] ) ) { ?>
148
+ <span class="member-location-data">
149
+ <?php
150
+ /* translators: the placeholders are a timezone and a country code */
151
+ echo sprintf( esc_html__( 'Location: %1$1s, %2$2s', 'yikes-inc-easy-mailchimp-extender' ), esc_html( $user_data['location']['timezone'] ), esc_html( $user_data['location']['country_code'] ) );
152
+ ?>
153
+ </span>
154
+ <?php } ?>
155
+ </section>
156
+
157
+ <hr class="yikes-mc-subscriber-hr" />
158
+
159
+ <?php
160
+ if ( ! isset( $_GET['section'] ) || ( isset( $_GET['section'] ) && filter_var( wp_unslash( $_GET['section'] ), FILTER_SANITIZE_STRING ) === 'subscriber-data' ) ) {
161
+ ?>
162
+ <section class="yikes-mc-card-body merge-variable-section">
163
+ <h3><?php esc_html_e( 'Fields:', 'yikes-inc-easy-mailchimp-extender' ); ?></h3>
164
+ <?php
165
+ if ( ! empty( $merge_variable_fields ) ) {
166
+ ?>
167
+ <?php foreach ( $merge_variable_fields as $field_name => $value ) { ?>
168
+ <li>
169
+ <label>
170
+ <strong class="section-label"><?php echo esc_html( $field_name ); ?></strong>
171
+ <p class="section-value"><em><?php echo esc_html( $value ); ?></em></p>
172
+ </label>
173
+ </li>
174
+ <?php }
175
+ } else {
176
+ ?>
177
+ <strong><?php esc_html_e( 'No Subscriber Data Found', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
178
+ <?php
179
+ }
180
+ if ( isset( $user_data['ip_signup'] ) && ! empty( $user_data['ip_signup'] ) ) {
181
+ ?>
182
+ <li>
183
+ <label>
184
+ <strong class="section-label"><?php esc_html_e( 'Signup IP', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
185
+ <p class="section-value"><em><?php esc_html_e( $user_data['ip_signup'] ); ?></em></p>
186
+ </label>
187
+ </li>
188
+ <?php
189
+ }
190
+ }
191
+ ?>
192
+ </section>
193
+ <?php
194
+
195
+
196
+ if ( isset( $_GET['section'] ) && $_GET['section'] == 'additional-subscriptions' ) {
197
+ ?>
198
+ <section class="yikes-mc-card-body">
199
+ <?php
200
+ if ( ! empty( $additional_lists ) ) {
201
+ // remove this list from the additional lists list
202
+ unset( $additional_lists[ $list_id ] );
203
+ if ( ! empty( $additional_lists ) ) {
204
+ ?>
205
+ <h3><?php _e( 'Additional Subscriptions:', 'yikes-inc-easy-mailchimp-extender' ); ?></h3>
206
+ <?php foreach ( $additional_lists as $listid => $name ) { ?>
207
+ <?php
208
+ $user_redirect_url = esc_url_raw( admin_url( 'admin.php?page=yikes-mailchimp-view-list&list-id=' . $listid ) );
209
+ ?>
210
+ <li><a href="<?php echo $user_redirect_url; ?>"><?php echo $name; ?></a></li>
211
+ <?php }
212
+ }
213
+ } else {
214
+ ?>
215
+ <strong><?php _e( 'No Other Subscriptions Found.', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
216
+ <?php
217
+ }
218
+ ?>
219
+ </section>
220
+ <?php
221
+ }
222
+ ?>
223
+
224
+ <?php
225
+ if ( isset( $_GET['section'] ) && $_GET['section'] == 'delete-subscriber' ) {
226
+ $unsubscribe_subscriber_url = esc_url_raw( add_query_arg( array(
227
+ 'action' => 'yikes-easy-mc-unsubscribe-user',
228
+ 'mailchimp-list' => $list_id,
229
+ 'nonce' => wp_create_nonce( 'unsubscribe-user-' . $email_id ),
230
+ 'email_id' => $email_id,
231
+ ) ) );
232
+ ?>
233
+ <form id="delete_subscriber" method="POST" action="<?php echo $unsubscribe_subscriber_url; ?>">
234
+ <p class="description">
235
+ <?php printf( __( 'Deleting this subscriber will completely remove %s from the "%s" Mailchimp list.', 'yikes-inc-easy-mailchimp-extender' ), '<strong>' . $user_email . '</strong>', '<strong>' . $list_name . '</strong>' ); ?>
236
+ </p>
237
+ <br />
238
+ <label>
239
+ <input type="checkbox" name="confirm_delete_subscriber" value="1" onclick="toggleDeleteSubscriberButton(jQuery(this));">
240
+ <?php printf( __( 'Are you sure you want to delete "%s" from "%s?"', 'yikes-inc-easy-mailchimp-extender' ), '<strong>' . $user_email . '</strong>', '<strong>' . $list_name . '</strong>' ); ?>
241
+ </label>
242
+ <?php submit_button( __( 'Delete Subscriber', 'yikes-inc-easy-mailchimp-extender' ), 'primary', 'delete-mailchimp-subscriber', true, array( 'disabled' => 'disabled' ) ); ?>
243
+ </form>
244
+ <?php
245
+ }
246
+ ?>
247
+
248
+ </div>
249
+
250
+ <?php
251
+ // setup the redirect url for our additional subscriptions
252
+ $subscriber_details = esc_url_raw(
253
+ add_query_arg(
254
+ array(
255
+ 'section' => 'subscriber-data',
256
+ )
257
+ )
258
+ );
259
+ // setup the redirect url for our additional subscriptions
260
+ $additional_subscription_url = esc_url_raw(
261
+ add_query_arg(
262
+ array(
263
+ 'section' => 'additional-subscriptions',
264
+ )
265
+ )
266
+ );
267
+ // setup the redirect url for our delete subscriber
268
+ $delete_subscriber_url = esc_url_raw(
269
+ add_query_arg(
270
+ array(
271
+ 'section' => 'delete-subscriber',
272
+ )
273
+ )
274
+ );
275
+ ?>
276
+ <!-- Tabs -->
277
+ <div id="customer-tab-wrapper">
278
+ <ul id="customer-tab-wrapper-list">
279
+
280
+ <?php if ( isset( $_GET['section'] ) && $_GET['section'] != 'subscriber-data' ) { ?>
281
+ <a title="<?php _e( 'Subscriber Details', 'yikes-inc-easy-mailchimp-extender' ); ?>" aria-label="<?php _e( 'Subscriber Details', 'yikes-inc-easy-mailchimp-extender' ); ?>" href="<?php echo $subscriber_details; ?>">
282
+ <?php } ?>
283
+
284
+ <li <?php if ( ! isset( $_GET['section'] ) || ( isset( $_GET['section'] ) && $_GET['section'] == 'subscriber-data' ) ) { ?>class="active" <?php } else { ?>class="inactive"<?php } ?>>
285
+ <span class="dashicons dashicons-id"></span></li>
286
+
287
+ <?php if ( isset( $_GET['section'] ) && $_GET['section'] != 'subscriber-data' ) { ?>
288
+ </a>
289
+ <?php } ?>
290
+
291
+ <?php if ( ! isset( $_GET['section'] ) || ( isset( $_GET['section'] ) && $_GET['section'] != 'additional-subscriptions' ) ) { ?>
292
+ <a title="<?php _e( 'Additional Subscriptions', 'yikes-inc-easy-mailchimp-extender' ); ?>" aria-label="<?php _e( 'Additional Subscriptions', 'yikes-inc-easy-mailchimp-extender' ); ?>" href="<?php echo $additional_subscription_url; ?>">
293
+ <?php } ?>
294
+
295
+ <li <?php if ( isset( $_GET['section'] ) && $_GET['section'] == 'additional-subscriptions' ) { ?>class="active" <?php } else { ?>class="inactive"<?php } ?>>
296
+ <span class="dashicons dashicons-portfolio"></span></li>
297
+
298
+ <?php if ( ! isset( $_GET['section'] ) || ( isset( $_GET['section'] ) && $_GET['section'] == 'additional-subscriptions' ) ) { ?>
299
+ </a>
300
+ <?php } ?>
301
+
302
+ <?php if ( ! isset( $_GET['section'] ) || isset( $_GET['section'] ) && $_GET['section'] != 'delete-subscriber' ) { ?>
303
+ <a title="<?php _e( 'Delete Subscriber', 'yikes-inc-easy-mailchimp-extender' ); ?>" aria-label="<?php _e( 'Delete Subscriber', 'yikes-inc-easy-mailchimp-extender' ); ?>" href="<?php echo $delete_subscriber_url; ?>">
304
+ <?php } ?>
305
+
306
+ <li <?php if ( isset( $_GET['section'] ) && $_GET['section'] == 'delete-subscriber' ) { ?>class="active" <?php } else { ?>class="inactive"<?php } ?>>
307
+ <span class="dashicons dashicons-trash"></span></li>
308
+
309
+ <?php if ( ! isset( $_GET['section'] ) || ( isset( $_GET['section'] ) && $_GET['section'] == 'delete-subscriber' ) ) { ?>
310
+ </a>
311
+ <?php } ?>
312
+
313
+ </ul>
314
+ </div>
315
+
316
+ </div>
blocks/api/api.php CHANGED
@@ -1,108 +1,108 @@
1
- <?php
2
- /**
3
- * Class YIKES_Easy_Forms_Blocks_API.
4
- */
5
- class YIKES_Easy_Forms_Blocks_API {
6
-
7
- /**
8
- * Register our hooks.
9
- */
10
- public function __construct() {
11
- add_action( 'wp_ajax_yikes_get_forms', array( $this, 'get_forms' ) );
12
- add_action( 'wp_ajax_yikes_get_form', array( $this, 'get_form' ) );
13
- add_action( 'wp_ajax_yikes_get_recaptcha', array( $this, 'get_recaptcha' ) );
14
- add_action( 'wp_ajax_yikes_get_api_key_status', array( $this, 'get_api_key_status' ) );
15
- }
16
-
17
- /**
18
- * Verify API Key.
19
- */
20
- public function get_api_key_status() {
21
-
22
- // Verify Nonce.
23
- if ( ! check_ajax_referer( 'get_api_key_status', 'nonce', false ) ) {
24
- wp_send_json_error( '1' );
25
- }
26
-
27
- // Get our API key's status.
28
- $status = get_option( 'yikes-mc-api-validation', false );
29
- $status = empty( $status ) ? 'empty' : ( 'invalid_api_key' === $status ? 'invalid' : 'valid' );
30
-
31
- wp_send_json_success( $status );
32
- }
33
-
34
- /**
35
- * Get all of our forms.
36
- */
37
- public function get_forms() {
38
-
39
- // Verify Nonce.
40
- if ( ! check_ajax_referer( 'fetch_forms_nonce', 'nonce', false ) ) {
41
- wp_send_json_error( '1' );
42
- }
43
-
44
- // Get all of our forms.
45
- $form_interface = yikes_easy_mailchimp_extender_get_form_interface();
46
- $all_forms = $form_interface->get_all_forms();
47
-
48
- wp_send_json_success( array_values( $all_forms ) );
49
- }
50
-
51
- /**
52
- * Get a form's data.
53
- */
54
- public function get_form() {
55
-
56
- // Verify Nonce.
57
- if ( ! check_ajax_referer( 'fetch_form_nonce', 'nonce', false ) ) {
58
- wp_send_json_error( '1' );
59
- }
60
-
61
- $form_id = isset( $_POST['form_id'] ) ? filter_var( wp_unslash( $_POST['form_id'] ), FILTER_SANITIZE_NUMBER_INT ) : '';
62
-
63
- if ( empty( $form_id ) ) {
64
- wp_send_json_error( '1' );
65
- }
66
-
67
- $form_interface = yikes_easy_mailchimp_extender_get_form_interface();
68
-
69
- $form = $form_interface->get_form( $form_id );
70
-
71
- wp_send_json_success( $form );
72
- }
73
-
74
- /**
75
- * Get the reCAPTCHA variables.
76
- */
77
- public function get_recaptcha() {
78
-
79
- // Verify Nonce.
80
- if ( ! check_ajax_referer( 'fetch_recaptcha_nonce', 'nonce', false ) ) {
81
- wp_send_json_error( '1' );
82
- }
83
-
84
- if ( get_option( 'yikes-mc-recaptcha-status', '' ) === '1' ) {
85
-
86
- $site_key = get_option( 'yikes-mc-recaptcha-site-key', '' );
87
- $secret_key = get_option( 'yikes-mc-recaptcha-secret-key', '' );
88
-
89
- // If either of the Private the Secret key is left blank, we should display an error back to the user.
90
- if ( empty( $site_key ) || empty( $secret_key ) ) {
91
- wp_send_json_error();
92
- }
93
-
94
- $locale = get_locale();
95
- $locale_a = explode( '_', $locale );
96
- $locale = isset( $locale_a[0] ) ? $locale_a[0] : $locale;
97
- $return = apply_filters( 'yikes_mailchimp_recaptcha_data', array(
98
- 'site_key' => $site_key,
99
- 'secret_key' => $secret_key,
100
- 'locale' => $locale,
101
- ));
102
-
103
- wp_send_json_success( $return );
104
- }
105
-
106
- wp_send_json_error();
107
- }
108
- }
1
+ <?php
2
+ /**
3
+ * Class YIKES_Easy_Forms_Blocks_API.
4
+ */
5
+ class YIKES_Easy_Forms_Blocks_API {
6
+
7
+ /**
8
+ * Register our hooks.
9
+ */
10
+ public function __construct() {
11
+ add_action( 'wp_ajax_yikes_get_forms', array( $this, 'get_forms' ) );
12
+ add_action( 'wp_ajax_yikes_get_form', array( $this, 'get_form' ) );
13
+ add_action( 'wp_ajax_yikes_get_recaptcha', array( $this, 'get_recaptcha' ) );
14
+ add_action( 'wp_ajax_yikes_get_api_key_status', array( $this, 'get_api_key_status' ) );
15
+ }
16
+
17
+ /**
18
+ * Verify API Key.
19
+ */
20
+ public function get_api_key_status() {
21
+
22
+ // Verify Nonce.
23
+ if ( ! check_ajax_referer( 'get_api_key_status', 'nonce', false ) ) {
24
+ wp_send_json_error( '1' );
25
+ }
26
+
27
+ // Get our API key's status.
28
+ $status = get_option( 'yikes-mc-api-validation', false );
29
+ $status = empty( $status ) ? 'empty' : ( 'invalid_api_key' === $status ? 'invalid' : 'valid' );
30
+
31
+ wp_send_json_success( $status );
32
+ }
33
+
34
+ /**
35
+ * Get all of our forms.
36
+ */
37
+ public function get_forms() {
38
+
39
+ // Verify Nonce.
40
+ if ( ! check_ajax_referer( 'fetch_forms_nonce', 'nonce', false ) ) {
41
+ wp_send_json_error( '1' );
42
+ }
43
+
44
+ // Get all of our forms.
45
+ $form_interface = yikes_easy_mailchimp_extender_get_form_interface();
46
+ $all_forms = $form_interface->get_all_forms();
47
+
48
+ wp_send_json_success( array_values( $all_forms ) );
49
+ }
50
+
51
+ /**
52
+ * Get a form's data.
53
+ */
54
+ public function get_form() {
55
+
56
+ // Verify Nonce.
57
+ if ( ! check_ajax_referer( 'fetch_form_nonce', 'nonce', false ) ) {
58
+ wp_send_json_error( '1' );
59
+ }
60
+
61
+ $form_id = isset( $_POST['form_id'] ) ? filter_var( wp_unslash( $_POST['form_id'] ), FILTER_SANITIZE_NUMBER_INT ) : '';
62
+
63
+ if ( empty( $form_id ) ) {
64
+ wp_send_json_error( '1' );
65
+ }
66
+
67
+ $form_interface = yikes_easy_mailchimp_extender_get_form_interface();
68
+
69
+ $form = $form_interface->get_form( $form_id );
70
+
71
+ wp_send_json_success( $form );
72
+ }
73
+
74
+ /**
75
+ * Get the reCAPTCHA variables.
76
+ */
77
+ public function get_recaptcha() {
78
+
79
+ // Verify Nonce.
80
+ if ( ! check_ajax_referer( 'fetch_recaptcha_nonce', 'nonce', false ) ) {
81
+ wp_send_json_error( '1' );
82
+ }
83
+
84
+ if ( get_option( 'yikes-mc-recaptcha-status', '' ) === '1' ) {
85
+
86
+ $site_key = get_option( 'yikes-mc-recaptcha-site-key', '' );
87
+ $secret_key = get_option( 'yikes-mc-recaptcha-secret-key', '' );
88
+
89
+ // If either of the Private the Secret key is left blank, we should display an error back to the user.
90
+ if ( empty( $site_key ) || empty( $secret_key ) ) {
91
+ wp_send_json_error();
92
+ }
93
+
94
+ $locale = get_locale();
95
+ $locale_a = explode( '_', $locale );
96
+ $locale = isset( $locale_a[0] ) ? $locale_a[0] : $locale;
97
+ $return = apply_filters( 'yikes_mailchimp_recaptcha_data', array(
98
+ 'site_key' => $site_key,
99
+ 'secret_key' => $secret_key,
100
+ 'locale' => $locale,
101
+ ));
102
+
103
+ wp_send_json_success( $return );
104
+ }
105
+
106
+ wp_send_json_error();
107
+ }
108
+ }
blocks/blocks.php CHANGED
@@ -1,42 +1,42 @@
1
- <?php
2
- /**
3
- * Class YIKES_Easy_Forms_Blocks.
4
- */
5
- abstract class YIKES_Easy_Forms_Blocks {
6
-
7
- const BLOCK_NAMESPACE = 'yikes-inc-easy-forms/';
8
-
9
- /**
10
- * Register our hooks.
11
- */
12
- public function __construct() {
13
- add_action( 'enqueue_block_editor_assets', array( $this, 'editor_scripts' ) );
14
- add_action( 'init', array( $this, 'register_blocks' ), 11 );
15
- }
16
-
17
- /**
18
- * Enqueue our scripts.
19
- */
20
- abstract public function editor_scripts();
21
-
22
- /**
23
- * Register our Easy Forms block callback.
24
- */
25
- public function register_blocks() {
26
- register_block_type(
27
- static::BLOCK_NAMESPACE . static::BLOCK,
28
- array(
29
- 'render_callback' => array( $this, 'render_block' ),
30
- )
31
- );
32
- }
33
-
34
- /**
35
- * Take the shortcode parameters from the Gutenberg block and render our shortcode.
36
- *
37
- * @param array $attributes Block attributes.
38
- * @param string $content Block content.
39
- * @return string Block output.
40
- */
41
- abstract public function render_block( $attributes, $content );
42
- }
1
+ <?php
2
+ /**
3
+ * Class YIKES_Easy_Forms_Blocks.
4
+ */
5
+ abstract class YIKES_Easy_Forms_Blocks {
6
+
7
+ const BLOCK_NAMESPACE = 'yikes-inc-easy-forms/';
8
+
9
+ /**
10
+ * Register our hooks.
11
+ */
12
+ public function __construct() {
13
+ add_action( 'enqueue_block_editor_assets', array( $this, 'editor_scripts' ) );
14
+ add_action( 'init', array( $this, 'register_blocks' ), 11 );
15
+ }
16
+
17
+ /**
18
+ * Enqueue our scripts.
19
+ */
20
+ abstract public function editor_scripts();
21
+
22
+ /**
23
+ * Register our Easy Forms block callback.
24
+ */
25
+ public function register_blocks() {
26
+ register_block_type(
27
+ static::BLOCK_NAMESPACE . static::BLOCK,
28
+ array(
29
+ 'render_callback' => array( $this, 'render_block' ),
30
+ )
31
+ );
32
+ }
33
+
34
+ /**
35
+ * Take the shortcode parameters from the Gutenberg block and render our shortcode.
36
+ *
37
+ * @param array $attributes Block attributes.
38
+ * @param string $content Block content.
39
+ * @return string Block output.
40
+ */
41
+ abstract public function render_block( $attributes, $content );
42
+ }
blocks/components/api.js CHANGED
@@ -1,51 +1,51 @@
1
- export default class EasyFormsAPI {
2
-
3
- constructor() {
4
- this.ajaxurl = window.ajaxurl;
5
- }
6
-
7
- get_api_key_status() {
8
- let data = {
9
- action: 'yikes_get_api_key_status',
10
- nonce: ez_forms_gb_data.get_api_key_status,
11
- }
12
-
13
- let status = $.post( this.ajaxurl, data );
14
-
15
- return status;
16
- }
17
-
18
- get_recaptcha() {
19
- let data = {
20
- action: 'yikes_get_recaptcha',
21
- nonce: ez_forms_gb_data.fetch_recaptcha_nonce
22
- }
23
-
24
- let recaptcha_data = $.post( this.ajaxurl, data );
25
-
26
- return recaptcha_data;
27
- }
28
-
29
- get_forms() {
30
- let data = {
31
- action: 'yikes_get_forms',
32
- nonce: ez_forms_gb_data.fetch_forms_nonce,
33
- }
34
-
35
- let forms = $.post( this.ajaxurl, data );
36
-
37
- return forms;
38
- }
39
-
40
- get_form( form_id ) {
41
- let data = {
42
- action: 'yikes_get_form',
43
- form_id: form_id,
44
- nonce: ez_forms_gb_data.fetch_form_nonce
45
- }
46
-
47
- let form = $.post( this.ajaxurl, data );
48
-
49
- return form;
50
- }
51
- }
1
+ export default class EasyFormsAPI {
2
+
3
+ constructor() {
4
+ this.ajaxurl = window.ajaxurl;
5
+ }
6
+
7
+ get_api_key_status() {
8
+ let data = {
9
+ action: 'yikes_get_api_key_status',
10
+ nonce: ez_forms_gb_data.get_api_key_status,
11
+ }
12
+
13
+ let status = $.post( this.ajaxurl, data );
14
+
15
+ return status;
16
+ }
17
+
18
+ get_recaptcha() {
19
+ let data = {
20
+ action: 'yikes_get_recaptcha',
21
+ nonce: ez_forms_gb_data.fetch_recaptcha_nonce
22
+ }
23
+
24
+ let recaptcha_data = $.post( this.ajaxurl, data );
25
+
26
+ return recaptcha_data;
27
+ }
28
+
29
+ get_forms() {
30
+ let data = {
31
+ action: 'yikes_get_forms',
32
+ nonce: ez_forms_gb_data.fetch_forms_nonce,
33
+ }
34
+
35
+ let forms = $.post( this.ajaxurl, data );
36
+
37
+ return forms;
38
+ }
39
+
40
+ get_form( form_id ) {
41
+ let data = {
42
+ action: 'yikes_get_form',
43
+ form_id: form_id,
44
+ nonce: ez_forms_gb_data.fetch_form_nonce
45
+ }
46
+
47
+ let form = $.post( this.ajaxurl, data );
48
+
49
+ return form;
50
+ }
51
+ }
blocks/components/class.MailChimpForms.js CHANGED
@@ -1,871 +1,871 @@
1
- // Import dependencies
2
- import slugify from './slugify.js';
3
- import constants from './constants.js';
4
- import EasyFormsAPI from './api.js';
5
-
6
- // Get functions / blocks / components
7
- const Recaptcha = require( 'react-recaptcha' );
8
- const { __ } = wp.i18n;
9
- const { registerBlockType } = wp.blocks;
10
- const { RichText, InspectorControls, PlainText } = wp.editor;
11
- const { Spinner, TextControl, PanelBody, PanelRow, FormToggle, SelectControl } = wp.components;
12
- const { Component } = wp.element;
13
-
14
- export default class MailchimpForms extends Component {
15
- constructor( props ) {
16
- super( ...arguments );
17
- this.state = {
18
- api_key_status: 'valid',
19
- forms : [],
20
- recaptcha_data: {
21
- data : {},
22
- success: false
23
- },
24
- 'forms_loaded': false
25
- }
26
-
27
- this.api = new EasyFormsAPI();
28
-
29
- this.address_fields = {
30
- 'addr1' : 'Address 1',
31
- 'addr2' : 'Address 2',
32
- 'city' : 'City',
33
- 'state' : 'State',
34
- 'zip' : 'Zip',
35
- 'country': 'Country'
36
- }
37
- }
38
-
39
- /**
40
- * Run our API calls after the component has mounted. You can't use setState before a component is mounted.
41
- */
42
- componentDidMount() {
43
- this.api.get_api_key_status().then( status => {
44
- this.setState( { api_key_status: status.data } );
45
- });
46
-
47
- this.api.get_forms().then( forms => {
48
- this.setState( { forms: forms.data, forms_loaded: true } );
49
- });
50
-
51
- this.api.get_recaptcha().then( recaptcha_data => {
52
- this.setState( { recaptcha_data: recaptcha_data } );
53
- this.props.toggleRecaptchaAbstract( this.state.recaptcha_data.success );
54
- });
55
- }
56
-
57
- handleFormFieldChanges( event ) {
58
- // console.log( event );
59
-
60
- // console.log( value );
61
- // console.log( this );
62
- // console.log( typeof this.setState );
63
-
64
- // const target = event.target;
65
- // const value = target.type === 'checkbox' ? target.checked : target.value;
66
- // const name = target.name;
67
-
68
- // return this.setState( { [name]: value } );
69
- }
70
-
71
- inspector_controls() {
72
-
73
- const inline = (
74
- <PanelRow>
75
- <label
76
- htmlFor="inline-form-toggle"
77
- className="blocks-base-control__label"
78
- >
79
- { __( 'Inline' ) }
80
- </label>
81
- <FormToggle
82
- id="inline-form-toggle"
83
- label={ __( 'Inline' ) }
84
- checked={ !! this.props.inline }
85
- onChange={ this.props.toggleInline }
86
- />
87
- </PanelRow>
88
- )
89
-
90
- const show_form_title = (
91
- <PanelRow>
92
- <label
93
- htmlFor="show-title-form-toggle"
94
- className="blocks-base-control__label"
95
- >
96
- { __( 'Show Form Title' ) }
97
- </label>
98
- <FormToggle
99
- id="show-title-form-toggle"
100
- label={ __( 'Show Form Title' ) }
101
- checked={ !! this.props.showTitle }
102
- onChange={ this.props.toggleShowTitle }
103
- />
104
- </PanelRow>
105
- )
106
-
107
- const show_form_description = (
108
- <PanelRow>
109
- <label
110
- htmlFor="show-description-form-toggle"
111
- className="blocks-base-control__label"
112
- >
113
- { __( 'Show Form Description' ) }
114
- </label>
115
- <FormToggle
116
- id="show-description-form-toggle"
117
- label={ __( 'Show Form Description' ) }
118
- checked={ !! this.props.showDescription }
119
- onChange={ this.props.toggleShowDescription }
120
- />
121
- </PanelRow>
122
- )
123
-
124
- const is_ajax = (
125
- <PanelRow>
126
- <label
127
- htmlFor="is-ajax-form-toggle"
128
- className="blocks-base-control__label"
129
- >
130
- { __( 'AJAX Submissions' ) }
131
- </label>
132
- <FormToggle
133
- id="is-ajax-form-toggle"
134
- label={ __( 'AJAX' ) }
135
- checked={ !! this.props.isAjax }
136
- onChange={ this.props.toggleIsAjax }
137
- />
138
- </PanelRow>
139
- )
140
-
141
- const recaptcha = (
142
- <PanelRow>
143
- <label
144
- htmlFor="recaptcha-form-toggle"
145
- className="blocks-base-control__label"
146
- >
147
- { __( 'reCAPTCHA' ) }
148
- </label>
149
- <FormToggle
150
- id="recaptcha-form-toggle"
151
- label={ __( 'reCAPTCHA' ) }
152
- checked={ !! this.props.recaptcha }
153
- onChange={ this.props.toggleRecaptcha }
154
- />
155
- </PanelRow>
156
- )
157
-
158
- const recaptcha_type = !! this.props.recaptcha ?
159
- (
160
- <PanelRow>
161
- <label
162
- htmlFor="recaptcha-type-form-toggle"
163
- className="blocks-base-control__label"
164
- >
165
- { __( 'reCAPTCHA Type' ) }
166
- </label>
167
- <SelectControl
168
- value={ this.props.recaptchaType }
169
- options={ [ { value: 'image', label: 'Image' }, { value: 'audio', 'label': 'Audio' } ] }
170
- onChange={ this.props.toggleRecaptchaType }
171
- />
172
- </PanelRow>
173
- )
174
- : '';
175
-
176
- const recaptcha_theme = !! this.props.recaptcha ?
177
- (
178
- <PanelRow>
179
- <label
180
- htmlFor="recaptcha-theme-form-toggle"
181
- className="blocks-base-control__label"
182
- >
183
- { __( 'reCAPTCHA Theme' ) }
184
- </label>
185
- <SelectControl
186
- value={ this.props.recaptchaTheme }
187
- options={ [ { value: 'light', label: 'Light' }, {value: 'dark', 'label': 'Dark' } ] }
188
- onChange={ this.props.toggleRecaptchaTheme }
189
- />
190
- </PanelRow>
191
- )
192
- : '';
193
-
194
- const recaptcha_lang = !! this.props.recaptcha ?
195
- (
196
- <PanelRow>
197
- <label
198
- htmlFor="recaptcha-language-form-toggle"
199
- className="blocks-base-control__label"
200
- title={ this.state.recaptcha_data.data ? 'The default language for your locale is ' + constants.locales[ this.state.recaptcha_data.data.locale ] : '' }
201
- >
202
- { __( 'reCAPTCHA Language' ) }
203
- </label>
204
- <SelectControl
205
- id="recaptcha-language-form-toggle"
206
- value={ this.props.recaptchaLang.length > 0 ? this.props.recaptchaLang : ( this.state.recaptcha_data.data ? this.state.recaptcha_data.data.locale : '' ) }
207
- onChange={ this.props.toggleRecaptchaLang }
208
- title={ this.state.recaptcha_data.data ? 'The default language for your locale is ' + constants.locales[ this.state.recaptcha_data.data.locale ] : '' }
209
- options={ Object.keys( constants.locales ).map( ( key ) => { return { value: key, label: constants.locales[key] } }) }
210
- />
211
- </PanelRow>
212
- )
213
- : '';
214
-
215
- const recaptcha_size = !! this.props.recaptcha ?
216
- (
217
- <PanelRow>
218
- <label
219
- htmlFor="recaptcha-size-form-toggle"
220
- className="blocks-base-control__label"
221
- >
222
- { __( 'reCAPTCHA Size' ) }
223
- </label>
224
- <SelectControl
225
- id="recaptcha-size-form-toggle"
226
- value={ this.props.recaptchaSize }
227
- onChange={ this.props.toggleRecaptchaSize }
228
- options={ [ { value: 'normal', label: 'Normal' }, { value: 'compact', label: 'Compact' } ] }
229
- />
230
- </PanelRow>
231
- )
232
- : '';
233
-
234
- const recaptcha_verify_callback = !! this.props.recaptcha ?
235
- (
236
- <TextControl
237
- id="recaptcha-verify-callback-form-toggle"
238
- label={ __( 'reCAPTCHA Verify Callback' ) }
239
- value={ this.props.recaptchaVerifyCallback }
240
- onChange={ this.props.toggleRecaptchaVerifyCallback }
241
- />
242
- )
243
- : '';
244
-
245
- const recaptcha_expired_callback = !! this.props.recaptcha ?
246
- (
247
- <TextControl
248
- id="recaptcha-expired-callback-form-toggle"
249
- label={ __( 'reCAPTCHA Expired Callback' ) }
250
- value={ this.props.recaptchaExpiredCallback }
251
- onChange={ this.props.toggleRecaptchaExpiredCallback }
252
- />
253
- )
254
- : '';
255
-
256
- const inspector_controls =
257
- <InspectorControls key="easy-forms-inspector">
258
-
259
- <PanelBody title={ __( 'Settings' ) } >
260
- {inline}
261
- {show_form_title}
262
- {show_form_description}
263
- {is_ajax}
264
- {recaptcha}
265
- {recaptcha_type}
266
- {recaptcha_theme}
267
- {recaptcha_lang}
268
- {recaptcha_size}
269
- {recaptcha_verify_callback}
270
- {recaptcha_expired_callback}
271
- </PanelBody>
272
-
273
- </InspectorControls>
274
-
275
- return inspector_controls;
276
- }
277
-
278
- forms_dropdown() {
279
- return this.state.forms.length > 0 ?
280
- <select
281
- value={ this.props.formID }
282
- onChange={ this.props.onChangeForm }
283
- className="yikes-mailchimp-forms-dropdown"
284
- key="yikes-mailchimp-forms-dropdown"
285
- >
286
- <option key="select" value="">Select Mailchimp Form...</option>
287
- { this.state.forms.map( ( form ) => {
288
- return <option key={ 'yikes-select-form-' + form.id } value={ form.id }>{ form.form_name }</option>
289
- })}
290
- </select>
291
- : '';
292
- }
293
-
294
- form_title() {
295
- return this.props.showTitle === true ?
296
- ( this.props.focus ?
297
- <h3
298
- className={ "yikes-mailchimp-form-title yikes-mailchimp-form-title-" + this.props.formID }
299
- key="yikes-mailchimp-form-title-wrapper"
300
- >
301
- <PlainText
302
- placeholder={ this.props.formTitle }
303
- key="yikes-mailchimp-form-title-editable"
304
- value={ this.props.formTitle }
305
- onChange={ this.props.toggleFormTitle }
306
- />
307
- </h3>
308
- :
309
- <h3 className={ "yikes-mailchimp-form-title yikes-mailchimp-form-title-" + this.props.formID } key="yikes-mailchimp-form-title">
310
- { this.props.formTitle }
311
- </h3>
312
- ) : '';
313
- }
314
-
315
- form_description() {
316
- return this.props.showDescription === true ?
317
- <section className={ "yikes-mailchimp-form-description yikes-mailchimp-form-description-" + this.props.formID } key="yikes-mailchimp-form-description">
318
- <PlainText
319
- className="mailchimpDescription"
320
- placeholder={ __( 'Enter your form\'s description here.' ) /*( this.props.formData && this.props.formData.form_description && this.props.formData.form_description.length > 0 || this.props.descriptionValue && this.props.descriptionValue.length > 0 ) ? '' : __( 'Enter your form\'s description here.' )*/ }
321
- value={ this.props.descriptionValue.length > 0 ? this.props.descriptionValue : ( this.props.formData && this.props.formData.form_description ? this.props.formData.form_description : '' ) }
322
- onChange={ this.props.onChangeDescription }
323
- key="mailchimpDescription"
324
- />
325
- </section>
326
- : '';
327
- }
328
-
329
- get_address_field( addr_field, field ) {
330
- switch( addr_field ) {
331
-
332
- case 'addr1':
333
- case 'addr2':
334
- case 'city':
335
- case 'zip':
336
- return (
337
- <TextControl
338
- id={ "yikes-easy-mc-form-" + this.props.formID + "-" + field.merge + '-' + addr_field }
339
- onChange={ this.handleFormFieldChanges }
340
- type="text"
341
- name={ field.merge + '[' + addr_field + ']' }
342
- className={ 'yikes-easy-mc-' + field.type + ' ' + field['additional-classes'] }
343
- key= { 'yikes-mailchimp-field-' + field.merge + '-' + addr_field }
344
- required={ field.merge === 'EMAIL' || field.require === '1' ? 'required' : false }
345
- placeholder={ field.placeholder === '1' ? this.address_fields[ addr_field ] : '' }
346
- />
347
- )
348
- break;
349
-
350
- case 'state':
351
- return (
352
- <select
353
- id={ "yikes-easy-mc-form-" + this.props.formID + "-" + field.merge + '-' + addr_field }
354
- name={ field.merge + '[' + addr_field + ']' }
355
- className={ 'yikes-easy-mc-' + field.type + ' ' + field['additional-classes'] }
356
- onChange={ this.handleFormFieldChanges }
357
- key= { 'yikes-mailchimp-field-' + field.merge + '-' + addr_field }
358
- value=''
359
- required={ field.merge === 'EMAIL' || field.require === '1' ? 'required' : false }
360
- >
361
- { Object.keys( constants.states ).map( ( key ) => {
362
- var choice = constants.states[ key ];
363
- return <option key={ 'state-' + key } value={ key }>{ choice }</option>
364
- })}
365
-
366
- </select>
367
- )
368
- break;
369
-
370
- case 'country':
371
- return (
372
- <select
373
- id={ "yikes-easy-mc-form-" + this.props.formID + "-" + field.merge + '-' + addr_field }
374
- name={ field.merge + '[' + addr_field + ']' }
375
- className={ 'yikes-easy-mc-' + field.type + ' ' + field['additional-classes'] }
376
- onChange={ this.handleFormFieldChanges }
377
- key= { 'yikes-mailchimp-field-' + field.merge + '-' + addr_field }
378
- value=''
379
- required={ field.merge === 'EMAIL' || field.require === '1' ? 'required' : false }
380
- >
381
- { Object.keys( constants.countries ).map( ( key ) => {
382
- var choice = constants.countries[ key ];
383
- return <option key={ 'country-' + key } value={ key }>{ choice }</option>
384
- })}
385
-
386
- </select>
387
- )
388
- break;
389
- }
390
- }
391
-
392
- get_dropdown_field( field ) {
393
- return (
394
- <select
395
- id={ "yikes-easy-mc-form-" + this.props.formID + "-" + field.merge }
396
- name={ field.merge }
397
- className={ 'yikes-easy-mc-' + field.type + ' ' + field['additional-classes'] }
398
- onChange={ this.handleFormFieldChanges }
399
- key= { 'yikes-mailchimp-field-' + field.merge }
400
- value={ JSON.parse( field.choices )[ field.default_choice ] }
401
- required={ field.merge === 'EMAIL' || field.require === '1' ? 'required' : false }
402
- >
403
- { Object.keys( JSON.parse( field.choices ) ).map( ( key ) => {
404
- var choice = JSON.parse( field.choices )[ key ];
405
- return <option key={ slugify( choice ) } value={ choice }>{ choice }</option>
406
- })}
407
- </select>
408
- )
409
- }
410
-
411
- get_radio_field( field ) {
412
- var ii = 0;
413
-
414
- return (
415
- JSON.parse( field.choices ).map( ( key ) => {
416
- ii++;
417
- return (
418
- <label
419
- htmlFor={ field.merge + '-' + ii }
420
- className="yikes-easy-mc-checkbox-label"
421
- key={ field.merge + '-label-radio-key-' + ii }
422
- >
423
- <input
424
- type="radio"
425
- name={ field.merge }
426
- id={ field.merge + '-' + ii }
427
- key={ field.merge + '-' + ii + '-input-key' }
428
- value={ key }
429
- onChange={ this.handleFormFieldChanges }
430
- checked={ parseInt( field.default_choice ) === ( ii - 1 ) }
431
- />
432
- <span key={ field.merge + '-span-radio-key-' + ii } className={ field.merge + '-label' }>{ key }</span>
433
- </label>
434
- )
435
- })
436
- )
437
- }
438
-
439
- get_url_field( field ) {
440
- return (
441
- <TextControl
442
- id={ "yikes-easy-mc-form-" + this.props.formID + "-" + field.merge }
443
- placeholder={ field.placeholder }
444
- onChange={ this.handleFormFieldChanges }
445
- type='url'
446
- value={ field.default }
447
- name={ field.merge }
448
- className={ 'yikes-easy-mc-' + field.type + ' ' + field['additional-classes'] }
449
- key= { 'yikes-mailchimp-field-' + field.merge }
450
- required={ field.merge === 'EMAIL' || field.require === '1' ? 'required' : false }
451
- title={ field.type === 'url' ? __( 'Please enter a valid URL to the website.' ) : __( 'Please enter a valid URL to the image.' ) }
452
- />
453
- )
454
- }
455
-
456
- get_default_field( field ) {
457
-
458
- var type = field.type === 'zip' || field.type === 'phone' ? 'text' : field.type;
459
-
460
- return (
461
- <TextControl
462
- id={ "yikes-easy-mc-form-" + this.props.formID + "-" + field.merge }
463
- placeholder={ field.placeholder }
464
- onChange={ this.handleFormFieldChanges }
465
- type={ type }
466
- value={ field.default }
467
- name={ field.merge }
468
- className={ 'yikes-easy-mc-' + field.type + ' ' + field['additional-classes'] }
469
- key= { 'yikes-mailchimp-field-' + field.merge }
470
- required={ field.merge === 'EMAIL' || field.require === '1' ? 'required' : false }
471
- />
472
- )
473
- }
474
-
475
- get_date_field( field ) {
476
- return (
477
- <TextControl
478
- id={ "yikes-easy-mc-form-" + this.props.formID + "-" + field.merge }
479
- placeholder={ field.placeholder }
480
- onChange={ this.handleFormFieldChanges }
481
- type='text'
482
- value={ field.default }
483
- name={ field.merge }
484
- className={ 'yikes-easy-mc-' + field.type + ' ' + field['additional-classes'] }
485
- key= { 'yikes-mailchimp-field-' + field.merge }
486
- required={ field.merge === 'EMAIL' || field.require === '1' ? 'required' : false }
487
- data-attr-type={ field.type }
488
- data-date-format={ field.date_format.toLowerCase() }
489
- />
490
- )
491
- }
492
-
493
- get_radio_interest_group( field ) {
494
- var ii = -1;
495
- var cn = "yikes-easy-mc-checkbox-label " + field['additional-classes'];
496
-
497
- return (
498
- Object.keys( JSON.parse( field.groups ) ).map( ( key ) => {
499
- var choice = JSON.parse( field.groups )[ key ];
500
- ii++;
501
- return (
502
- <label
503
- htmlFor={ field.group_id + '-' + ii }
504
- className={ { [cn]: true, 'field-no-label': field['hide-label'] === '1' } }
505
- key={ field.group_id + '-' + ii + '-label-key' }
506
- >
507
- <input
508
- type="radio"
509
- name={"group-" + field.group_id + '[]' }
510
- id={ field.group_id + '-' + ii }
511
- key={ field.group_id + '-' + ii + '-input-key' }
512
- value={ key }
513
- onChange={ this.handleFormFieldChanges }
514
- checked={ key === field.default_choice }
515
- className={ { 'yikes-interest-group-required': field.require === '1' } }
516
- />
517
- { choice }
518
- </label>
519
- )
520
- })
521
- )
522
- }
523
-
524
- get_hidden_interest_group( field ) {
525
- var ii = -1;
526
-
527
- return (
528
- Object.keys( JSON.parse( field.groups ) ).map( ( key ) => {
529
- var choice = JSON.parse( field.groups )[ key ];
530
- ii++;
531
- return (
532
- <label
533
- htmlFor={ field.group_id + '-' + ii }
534
- className={ 'yikes-easy-mc-checkbox-label ' + field['additional-classes'] }
535
- key={ field.group_id + '-' + ii + '-label-key' }
536
- >
537
- <input
538
- type="checkbox"
539
- name={"group-" + field.group_id + '[]' }
540
- id={ field.group_id + '-' + ii }
541
- key={ field.group_id + '-' + ii + '-input-key' }
542
- value={ key }
543
- onChange={ this.handleFormFieldChanges }
544
- checked={ field.default_choice.indexOf( key ) !== -1 }
545
- />
546
- { choice }
547
- </label>
548
- )
549
- })
550
- )
551
- }
552
-
553
- get_checkboxes_interest_group( field ) {
554
- var ii = -1;
555
- var cn = 'yikes-easy-mc-checkbox-label ' + field['additional-classes'];
556
-
557
- return (
558
- Object.keys( JSON.parse( field.groups ) ).map( ( key ) => {
559
- var choice = JSON.parse( field.groups )[ key ];
560
- ii++;
561
- return (
562
- <label
563
- htmlFor={ field.group_id + '-' + ii }
564
- className={ { [cn]: true, 'field-no-label': field['hide-label'] === '1' } }
565
- key={ field.group_id + '-' + ii + '-label-key' }
566
- >
567
- <input
568
- className={ { 'yikes-interest-group-required': field.require === '1' } }
569
- type="checkbox"
570
- name={ 'group-' + field.group_id + '[]' }
571
- id={ field.group_id + '-' + ii }
572
- key={ field.group_id + '-' + ii + '-input-key' }
573
- value={ key }
574
- onChange={ this.handleFormFieldChanges }
575
- checked={ typeof field.default_choice !== 'undefined' && field.default_choice.indexOf( key ) !== -1 }
576
- required={ field.require === '1' ? 'required' : false }
577
- />
578
- { choice }
579
- </label>
580
- )
581
- })
582
- )
583
- }
584
-
585
- get_dropdown_interest_group( field ) {
586
- var ii = -1;
587
-
588
- return (
589
- <select
590
- id={ "yikes-easy-mc-form-" + this.props.formID + "-" + field.group_id }
591
- name={ "group-" + field.group_id }
592
- className={ "yikes-easy-mc-dropdown " + field['additional-classes'] }
593
- value={ field.default_choice }
594
- onChange={ this.handleFormFieldChanges }
595
- required={ field.require === '1' ? 'required' : false }
596
- >
597
-
598
- { Object.keys( JSON.parse( field.groups ) ).map( ( key ) => {
599
- var choice = JSON.parse( field.groups )[ key ];
600
- ii++;
601
- return (
602
- <option key={ field.group_id + '-' + ii + '-input-key' } value={ key }>{ choice }</option>
603
- )
604
- })}
605
- </select>
606
- )
607
- }
608
-
609
- form_fields() {
610
-
611
- return this.props.formData && this.props.formData.fields ?
612
- Object.keys( this.props.formData.fields ).map( ( key ) => {
613
-
614
- var field = this.props.formData.fields[ key ];
615
-
616
- // Form Fields (aka merge variables)
617
- if ( typeof field.merge !== 'undefined' ) {
618
-
619
- var desc = field.description.length > 0 ?
620
- <p className="form-field-description" id={ "form-field-description-" + field.merge } key={ "form-field-description-" + field.merge }>{ field.description }</p>
621
- : '';
622
-
623
- var label = field['hide-label'] !== '1' ? <span className={ field.merge + '-label' } key={ field.merge + '-label-span-key' }>{ field.label }</span> : '';
624
-
625
- var classes = {'yikes-mailchimp-field-required' : field.merge === 'EMAIL' || field.require === '1' }
626
- classes[ field.merge + '-label'] = true;
627
-
628
- if ( field.type === 'address' ) {
629
-
630
- return ([
631
- field.description_above === '1' && field.description.length > 0 && desc,
632
- Object.keys( this.address_fields ).map( ( addr_field ) => {
633
- label = field['hide-label'] !== '1' ? <span className={ field.merge + '-label' } key={ field.merge + '-label-span-key-' + addr_field }>{ this.address_fields[ addr_field ] }</span> : '';
634
-
635
- return (
636
- <label
637
- htmlFor={ "yikes-easy-mc-form-" + this.props.formID + "-" + field.merge + '-' + addr_field }
638
- className={ classes }
639
- key={ field.merge + '-label-key-' + addr_field }
640
- style={ field.hide === '1' ? { 'display': 'none' } : {} }
641
- >
642
- { label }
643
- { this.get_address_field( addr_field, field ) }
644
- </label>
645
- )
646
- }),
647
- field.description_above !== '1' && field.description.length > 0 && desc
648
- ])
649
- } else {
650
- return (
651
- <label
652
- htmlFor={ "yikes-easy-mc-form-" + this.props.formID + "-" + field.merge }
653
- className={ classes }
654
- key={ field.merge + '-label-key' }
655
- style={ field.hide === '1' ? { 'display': 'none' } : {} }
656
- >
657
- { label }
658
-
659
- { field.description_above === '1' && field.description.length > 0 && desc }
660
-
661
- {
662
- ( field.type === 'dropdown' ? this.get_dropdown_field( field ) :
663
- ( field.type === 'radio' ? this.get_radio_field( field ) :
664
- ( field.type === 'url' || field.type === 'imageurl' ? this.get_url_field( field ) :
665
- ( field.type === 'date' || field.type === 'birthday' ? this.get_date_field( field ) :
666
- this.get_default_field( field ) ) ) ) )
667
- }
668
-
669
- { field.description_above !== '1' && field.description.length > 0 && desc }
670
-
671
- </label>
672
- )
673
- }
674
- } else {
675
-
676
- var desc = field.description.length > 0 ?
677
- <p className="form-field-description" id={ "form-field-description-" + field.group_id } key={ "form-field-description-" + field.group_id }>{ field.description }</p>
678
- : '';
679
-
680
- var label = field['hide-label'] !== '1' ?
681
- <span key={ field.group_id + "-label-span-key" } className={ field.group_id + "-label checkbox-parent-label" }>{ field.label }</span>
682
- : '';
683
-
684
- var classes = { 'yikes-mailchimp-field-required' : field.require === '1' }
685
- classes[ field.group_id + '-label'] = true;
686
-
687
- return (
688
- <label
689
- htmlFor={ field.group_id }
690
- className= { classes }
691
- key={ field.group_id + "-label-span-key" }
692
- style={ field.type === 'hidden' || field.hide === '1' ? { 'display': 'none' } : {} }
693
- >
694
-
695
- { label }
696
-
697
- { field.description_above === '1' && field.description.length > 0 && desc }
698
-
699
- {
700
- ( field.type === 'radio' ? this.get_radio_interest_group( field ) :
701
- ( field.type === 'hidden' ? this.get_hidden_interest_group( field ) :
702
- ( field.type === 'checkboxes' ? this.get_checkboxes_interest_group( field ) :
703
- ( field.type === 'dropdown' ? this.get_dropdown_interest_group( field ) : '' ) ) ) )
704
- }
705
-
706
- { field.description_above !== '1' && field.description.length > 0 && desc }
707
-
708
- </label>
709
- )
710
- }
711
- })
712
- : '';
713
- }
714
-
715
- form_recaptcha() {
716
-
717
- return this.state.recaptcha_data.success === true && this.state.recaptcha_data.data.site_key && this.props.recaptcha === true ?
718
- <Recaptcha
719
- sitekey={ this.state.recaptcha_data.data.site_key }
720
- key={ 'easy-forms-recaptcha-1' }
721
- elementID={ 'google-recaptcha-id-' + Math.random().toString(36).slice(-8) } // Need to use a unique ID for multiple reCAPTCHAs to work on the same page.
722
- theme={ this.props.recaptchaTheme }
723
- hl={ this.props.recaptchaLang.length > 0 ? this.props.recaptchaLang : this.state.recaptcha_data.data.locale }
724
- type={ this.props.recaptchaType }
725
- size={ this.props.recaptchaSize }
726
- verifyCallback=''
727
- expiredCallback=''
728
- />
729
- : '';
730
- }
731
-
732
- submit_button() {
733
- return this.props.formData && this.props.formData.fields ?
734
- ( this.props.focus && this.props.formData.form_settings['yikes-easy-mc-submit-button-type'] === 'text' ?
735
- <button
736
- type="submit"
737
- key="mailchimpSubmitButton"
738
- className={ "yikes-easy-mc-submit-button yikes-easy-mc-submit-button-" + this.props.formID + " btn btn-primary" + " " + this.props.formData.form_settings['yikes-easy-mc-submit-button-classes'] }
739
- >
740
- <PlainText
741
- className="yikes-mailchimp-submit-button-span-text"
742
- key="yikes-mailchimp-submit-button-span-text"
743
- value={ this.props.submitButtonText ? this.props.submitButtonText : '' }
744
- onChange={ this.props.toggleSubmitButtonText }
745
- />
746
- </button>
747
- :
748
- ( this.props.formData.form_settings['yikes-easy-mc-submit-button-type'] === 'text' ?
749
- <button
750
- type="submit"
751
- key="mailchimpSubmitButton"
752
- className={ "yikes-easy-mc-submit-button yikes-easy-mc-submit-button-" + this.props.formID + " btn btn-primary" + " " + this.props.formData.form_settings['yikes-easy-mc-submit-button-classes'] }
753
- >
754
- <span className="yikes-mailchimp-submit-button-span-text" key="yikes-mailchimp-submit-button-span-text">{ this.props.submitButtonText }</span>
755
- </button>
756
- :
757
- <input
758
- type="image"
759
- alt={ this.props.submitButtonText }
760
- src={ this.props.formData.form_settings['yikes-easy-mc-submit-button-image'] }
761
- className={ "yikes-easy-mc-submit-button yikes-easy-mc-submit-button-image yikes-easy-mc-submit-button-" + this.props.formID + " btn btn-primary" + " " + this.props.formData.form_settings['yikes-easy-mc-submit-button-classes'] }
762
- />
763
- )
764
- )
765
- : '';
766
- }
767
-
768
- get_form_section() {
769
- return (
770
- <section
771
- id={ "yikes-mailchimp-container-" + this.props.formID }
772
- className={ "yikes-mailchimp-container yikes-mailchimp-container-" + this.props.formID }
773
- key="yikes-mailchimp-container-section"
774
- >
775
- {[
776
-
777
- // Form title
778
- [this.form_title()],
779
-
780
- // Form Description
781
- [this.form_description()],
782
-
783
- // Get the form
784
- [this.get_form()]
785
- ]}
786
- </section>
787
- );
788
- }
789
-
790
- get_form() {
791
- return (
792
- // Form Wrapper
793
- <form
794
- id={ slugify( this.props.formTitle ) + '-' + this.props.formID }
795
- className={ "yikes-easy-mc-form yikes-easy-mc-form-" + this.props.formID + " " + this.props.formData.form_settings['yikes-easy-mc-form-class-names'] }
796
- key="yikes-mailchimp-container-form"
797
- >
798
- {[
799
-
800
- // Form fields
801
- [this.form_fields()],
802
-
803
- // Recaptcha
804
- [this.form_recaptcha()],
805
-
806
- // Submit button
807
- [this.submit_button()]
808
- ]}
809
- </form>
810
- );
811
- }
812
-
813
- render() {
814
-
815
- if ( this.state.forms.length > 0 && this.props.formData && Object.keys( this.props.formData ).length > 0 ) {
816
-
817
- return (
818
-
819
- <div className={ this.props.className }>
820
-
821
- {// Show inspector controls when focused
822
- this.props.focus && this.inspector_controls()}
823
-
824
- {// Show the forms dropdown
825
- this.forms_dropdown()}
826
-
827
- <hr key="easy-forms-dropdown-divider"/>
828
-
829
- {// Show the form
830
- this.get_form_section()}
831
- </div>
832
-
833
- );
834
-
835
- } else if ( this.state.forms.length > 0 ) {
836
-
837
- // If we don't have form data, show the forms dropdown
838
- return (
839
- <div className={ this.props.className }>
840
- {this.forms_dropdown()}
841
- </div>
842
- );
843
-
844
- } else if ( this.state.api_key_status !== 'valid' ) {
845
-
846
- // If the API key is invalid, show a message.
847
- return (
848
- <p className="yikes-mailchimp-api-key-warning" key="yikes-mailchimp-api-key-warning">
849
- <em>{ this.state.api_key_status === 'empty' ? <a href={ constants.settings_url }> { __( 'To use this block, please enter an API key on the Easy Forms\' settings page.' ) } </a> : __( 'Your API key is invalid.' ) }</em>
850
- </p>
851
- );
852
- } else if ( this.state.forms_loaded === true && this.state.forms.length === 0 ) {
853
-
854
- // No forms.
855
- return (
856
- <p key="no-forms-found" className={ this.props.className }>
857
- <em>{ __( 'No forms were found.' ) }</em>
858
- </p>
859
- );
860
- } else {
861
-
862
- // Show loading... & spinner.
863
- return (
864
- <p key="loading-easy-forms" className={ this.props.className }>
865
- <span key="yikes-easy-forms-loading-text">{ __( 'Loading...' ) }</span>
866
- <Spinner key="yikes-easy-forms-loading-spinner" />
867
- </p>
868
- );
869
- }
870
- }
871
  }
1
+ // Import dependencies
2
+ import slugify from './slugify.js';
3
+ import constants from './constants.js';
4
+ import EasyFormsAPI from './api.js';
5
+
6
+ // Get functions / blocks / components
7
+ const Recaptcha = require( 'react-recaptcha' );
8
+ const { __ } = wp.i18n;
9
+ const { registerBlockType } = wp.blocks;
10
+ const { RichText, InspectorControls, PlainText } = wp.editor;
11
+ const { Spinner, TextControl, PanelBody, PanelRow, FormToggle, SelectControl } = wp.components;
12
+ const { Component } = wp.element;
13
+
14
+ export default class MailchimpForms extends Component {
15
+ constructor( props ) {
16
+ super( ...arguments );
17
+ this.state = {
18
+ api_key_status: 'valid',
19
+ forms : [],
20
+ recaptcha_data: {
21
+ data : {},
22
+ success: false
23
+ },
24
+ 'forms_loaded': false
25
+ }
26
+
27
+ this.api = new EasyFormsAPI();
28
+
29
+ this.address_fields = {
30
+ 'addr1' : 'Address 1',
31
+ 'addr2' : 'Address 2',
32
+ 'city' : 'City',
33
+ 'state' : 'State',
34
+ 'zip' : 'Zip',
35
+ 'country': 'Country'
36
+ }
37
+ }
38
+
39
+ /**
40
+ * Run our API calls after the component has mounted. You can't use setState before a component is mounted.
41
+ */
42
+ componentDidMount() {
43
+ this.api.get_api_key_status().then( status => {
44
+ this.setState( { api_key_status: status.data } );
45
+ });
46
+
47
+ this.api.get_forms().then( forms => {
48
+ this.setState( { forms: forms.data, forms_loaded: true } );
49
+ });
50
+
51
+ this.api.get_recaptcha().then( recaptcha_data => {
52
+ this.setState( { recaptcha_data: recaptcha_data } );
53
+ this.props.toggleRecaptchaAbstract( this.state.recaptcha_data.success );
54
+ });
55
+ }
56
+
57
+ handleFormFieldChanges( event ) {
58
+ // console.log( event );
59
+
60
+ // console.log( value );
61
+ // console.log( this );
62
+ // console.log( typeof this.setState );
63
+
64
+ // const target = event.target;
65
+ // const value = target.type === 'checkbox' ? target.checked : target.value;
66
+ // const name = target.name;
67
+
68
+ // return this.setState( { [name]: value } );
69
+ }
70
+
71
+ inspector_controls() {
72
+
73
+ const inline = (
74
+ <PanelRow>
75
+ <label
76
+ htmlFor="inline-form-toggle"
77
+ className="blocks-base-control__label"
78
+ >
79
+ { __( 'Inline' ) }
80
+ </label>
81
+ <FormToggle
82
+ id="inline-form-toggle"
83
+ label={ __( 'Inline' ) }
84
+ checked={ !! this.props.inline }
85
+ onChange={ this.props.toggleInline }
86
+ />
87
+ </PanelRow>
88
+ )
89
+
90
+ const show_form_title = (
91
+ <PanelRow>
92
+ <label
93
+ htmlFor="show-title-form-toggle"
94
+ className="blocks-base-control__label"
95
+ >
96
+ { __( 'Show Form Title' ) }
97
+ </label>
98
+ <FormToggle
99
+ id="show-title-form-toggle"
100
+ label={ __( 'Show Form Title' ) }
101
+ checked={ !! this.props.showTitle }
102
+ onChange={ this.props.toggleShowTitle }
103
+ />
104
+ </PanelRow>
105
+ )
106
+
107
+ const show_form_description = (
108
+ <PanelRow>
109
+ <label
110
+ htmlFor="show-description-form-toggle"
111
+ className="blocks-base-control__label"
112
+ >
113
+ { __( 'Show Form Description' ) }
114
+ </label>
115
+ <FormToggle
116
+ id="show-description-form-toggle"
117
+ label={ __( 'Show Form Description' ) }
118
+ checked={ !! this.props.showDescription }
119
+ onChange={ this.props.toggleShowDescription }
120
+ />
121
+ </PanelRow>
122
+ )
123
+
124
+ const is_ajax = (
125
+ <PanelRow>
126
+ <label
127
+ htmlFor="is-ajax-form-toggle"
128
+ className="blocks-base-control__label"
129
+ >
130
+ { __( 'AJAX Submissions' ) }
131
+ </label>
132
+ <FormToggle
133
+ id="is-ajax-form-toggle"
134
+ label={ __( 'AJAX' ) }
135
+ checked={ !! this.props.isAjax }
136
+ onChange={ this.props.toggleIsAjax }
137
+ />
138
+ </PanelRow>
139
+ )
140
+
141
+ const recaptcha = (
142
+ <PanelRow>
143
+ <label
144
+ htmlFor="recaptcha-form-toggle"
145
+ className="blocks-base-control__label"
146
+ >
147
+ { __( 'reCAPTCHA' ) }
148
+ </label>
149
+ <FormToggle
150
+ id="recaptcha-form-toggle"
151
+ label={ __( 'reCAPTCHA' ) }
152
+ checked={ !! this.props.recaptcha }
153
+ onChange={ this.props.toggleRecaptcha }
154
+ />
155
+ </PanelRow>
156
+ )
157
+
158
+ const recaptcha_type = !! this.props.recaptcha ?
159
+ (
160
+ <PanelRow>
161
+ <label
162
+ htmlFor="recaptcha-type-form-toggle"
163
+ className="blocks-base-control__label"
164
+ >
165
+ { __( 'reCAPTCHA Type' ) }
166
+ </label>
167
+ <SelectControl
168
+ value={ this.props.recaptchaType }
169
+ options={ [ { value: 'image', label: 'Image' }, { value: 'audio', 'label': 'Audio' } ] }
170
+ onChange={ this.props.toggleRecaptchaType }
171
+ />
172
+ </PanelRow>
173
+ )
174
+ : '';
175
+
176
+ const recaptcha_theme = !! this.props.recaptcha ?
177
+ (
178
+ <PanelRow>
179
+ <label
180
+ htmlFor="recaptcha-theme-form-toggle"
181
+ className="blocks-base-control__label"
182
+ >
183
+ { __( 'reCAPTCHA Theme' ) }
184
+ </label>
185
+ <SelectControl
186
+ value={ this.props.recaptchaTheme }
187
+ options={ [ { value: 'light', label: 'Light' }, {value: 'dark', 'label': 'Dark' } ] }
188
+ onChange={ this.props.toggleRecaptchaTheme }
189
+ />
190
+ </PanelRow>
191
+ )
192
+ : '';
193
+
194
+ const recaptcha_lang = !! this.props.recaptcha ?
195
+ (
196
+ <PanelRow>
197
+ <label
198
+ htmlFor="recaptcha-language-form-toggle"
199
+ className="blocks-base-control__label"
200
+ title={ this.state.recaptcha_data.data ? 'The default language for your locale is ' + constants.locales[ this.state.recaptcha_data.data.locale ] : '' }
201
+ >
202
+ { __( 'reCAPTCHA Language' ) }
203
+ </label>
204
+ <SelectControl
205
+ id="recaptcha-language-form-toggle"
206
+ value={ this.props.recaptchaLang.length > 0 ? this.props.recaptchaLang : ( this.state.recaptcha_data.data ? this.state.recaptcha_data.data.locale : '' ) }
207
+ onChange={ this.props.toggleRecaptchaLang }
208
+ title={ this.state.recaptcha_data.data ? 'The default language for your locale is ' + constants.locales[ this.state.recaptcha_data.data.locale ] : '' }
209
+ options={ Object.keys( constants.locales ).map( ( key ) => { return { value: key, label: constants.locales[key] } }) }
210
+ />
211
+ </PanelRow>
212
+ )
213
+ : '';
214
+
215
+ const recaptcha_size = !! this.props.recaptcha ?
216
+ (
217
+ <PanelRow>
218
+ <label
219
+ htmlFor="recaptcha-size-form-toggle"
220
+ className="blocks-base-control__label"
221
+ >
222
+ { __( 'reCAPTCHA Size' ) }
223
+ </label>
224
+ <SelectControl
225
+ id="recaptcha-size-form-toggle"
226
+ value={ this.props.recaptchaSize }
227
+ onChange={ this.props.toggleRecaptchaSize }
228
+ options={ [ { value: 'normal', label: 'Normal' }, { value: 'compact', label: 'Compact' } ] }
229
+ />
230
+ </PanelRow>
231
+ )
232
+ : '';
233
+
234
+ const recaptcha_verify_callback = !! this.props.recaptcha ?
235
+ (
236
+ <TextControl
237
+ id="recaptcha-verify-callback-form-toggle"
238
+ label={ __( 'reCAPTCHA Verify Callback' ) }
239
+ value={ this.props.recaptchaVerifyCallback }
240
+ onChange={ this.props.toggleRecaptchaVerifyCallback }
241
+ />
242
+ )
243
+ : '';
244
+
245
+ const recaptcha_expired_callback = !! this.props.recaptcha ?
246
+ (
247
+ <TextControl
248
+ id="recaptcha-expired-callback-form-toggle"
249
+ label={ __( 'reCAPTCHA Expired Callback' ) }
250
+ value={ this.props.recaptchaExpiredCallback }
251
+ onChange={ this.props.toggleRecaptchaExpiredCallback }
252
+ />
253
+ )
254
+ : '';
255
+
256
+ const inspector_controls =
257
+ <InspectorControls key="easy-forms-inspector">
258
+
259
+ <PanelBody title={ __( 'Settings' ) } >
260
+ {inline}
261
+ {show_form_title}
262
+ {show_form_description}
263
+ {is_ajax}
264
+ {recaptcha}
265
+ {recaptcha_type}
266
+ {recaptcha_theme}
267
+ {recaptcha_lang}
268
+ {recaptcha_size}
269
+ {recaptcha_verify_callback}
270
+ {recaptcha_expired_callback}
271
+ </PanelBody>
272
+
273
+ </InspectorControls>
274
+
275
+ return inspector_controls;
276
+ }
277
+
278
+ forms_dropdown() {
279
+ return this.state.forms.length > 0 ?
280
+ <select
281
+ value={ this.props.formID }
282
+ onChange={ this.props.onChangeForm }
283
+ className="yikes-mailchimp-forms-dropdown"
284
+ key="yikes-mailchimp-forms-dropdown"
285
+ >
286
+ <option key="select" value="">Select Mailchimp Form...</option>
287
+ { this.state.forms.map( ( form ) => {
288
+ return <option key={ 'yikes-select-form-' + form.id } value={ form.id }>{ form.form_name }</option>
289
+ })}
290
+ </select>
291
+ : '';
292
+ }
293
+
294
+ form_title() {
295
+ return this.props.showTitle === true ?
296
+ ( this.props.focus ?
297
+ <h3
298
+ className={ "yikes-mailchimp-form-title yikes-mailchimp-form-title-" + this.props.formID }
299
+ key="yikes-mailchimp-form-title-wrapper"
300
+ >
301
+ <PlainText
302
+ placeholder={ this.props.formTitle }
303
+ key="yikes-mailchimp-form-title-editable"
304
+ value={ this.props.formTitle }
305
+ onChange={ this.props.toggleFormTitle }
306
+ />
307
+ </h3>
308
+ :
309
+ <h3 className={ "yikes-mailchimp-form-title yikes-mailchimp-form-title-" + this.props.formID } key="yikes-mailchimp-form-title">
310
+ { this.props.formTitle }
311
+ </h3>
312
+ ) : '';
313
+ }
314
+
315
+ form_description() {
316
+ return this.props.showDescription === true ?
317
+ <section className={ "yikes-mailchimp-form-description yikes-mailchimp-form-description-" + this.props.formID } key="yikes-mailchimp-form-description">
318
+ <PlainText
319
+ className="mailchimpDescription"
320
+ placeholder={ __( 'Enter your form\'s description here.' ) /*( this.props.formData && this.props.formData.form_description && this.props.formData.form_description.length > 0 || this.props.descriptionValue && this.props.descriptionValue.length > 0 ) ? '' : __( 'Enter your form\'s description here.' )*/ }
321
+ value={ this.props.descriptionValue.length > 0 ? this.props.descriptionValue : ( this.props.formData && this.props.formData.form_description ? this.props.formData.form_description : '' ) }
322
+ onChange={ this.props.onChangeDescription }
323
+ key="mailchimpDescription"
324
+ />
325
+ </section>
326
+ : '';
327
+ }
328
+
329
+ get_address_field( addr_field, field ) {
330
+ switch( addr_field ) {
331
+
332
+ case 'addr1':
333
+ case 'addr2':
334
+ case 'city':
335
+ case 'zip':
336
+ return (
337
+ <TextControl
338
+ id={ "yikes-easy-mc-form-" + this.props.formID + "-" + field.merge + '-' + addr_field }
339
+ onChange={ this.handleFormFieldChanges }
340
+ type="text"
341
+ name={ field.merge + '[' + addr_field + ']' }
342
+ className={ 'yikes-easy-mc-' + field.type + ' ' + field['additional-classes'] }
343
+ key= { 'yikes-mailchimp-field-' + field.merge + '-' + addr_field }
344
+ required={ field.merge === 'EMAIL' || field.require === '1' ? 'required' : false }
345
+ placeholder={ field.placeholder === '1' ? this.address_fields[ addr_field ] : '' }
346
+ />
347
+ )
348
+ break;
349
+
350
+ case 'state':
351
+ return (
352
+ <select
353
+ id={ "yikes-easy-mc-form-" + this.props.formID + "-" + field.merge + '-' + addr_field }
354
+ name={ field.merge + '[' + addr_field + ']' }
355
+ className={ 'yikes-easy-mc-' + field.type + ' ' + field['additional-classes'] }
356
+ onChange={ this.handleFormFieldChanges }
357
+ key= { 'yikes-mailchimp-field-' + field.merge + '-' + addr_field }
358
+ value=''
359
+ required={ field.merge === 'EMAIL' || field.require === '1' ? 'required' : false }
360
+ >
361
+ { Object.keys( constants.states ).map( ( key ) => {
362
+ var choice = constants.states[ key ];
363
+ return <option key={ 'state-' + key } value={ key }>{ choice }</option>
364
+ })}
365
+
366
+ </select>
367
+ )
368
+ break;
369
+
370
+ case 'country':
371
+ return (
372
+ <select
373
+ id={ "yikes-easy-mc-form-" + this.props.formID + "-" + field.merge + '-' + addr_field }
374
+ name={ field.merge + '[' + addr_field + ']' }
375
+ className={ 'yikes-easy-mc-' + field.type + ' ' + field['additional-classes'] }
376
+ onChange={ this.handleFormFieldChanges }
377
+ key= { 'yikes-mailchimp-field-' + field.merge + '-' + addr_field }
378
+ value=''
379
+ required={ field.merge === 'EMAIL' || field.require === '1' ? 'required' : false }
380
+ >
381
+ { Object.keys( constants.countries ).map( ( key ) => {
382
+ var choice = constants.countries[ key ];
383
+ return <option key={ 'country-' + key } value={ key }>{ choice }</option>
384
+ })}
385
+
386
+ </select>
387
+ )
388
+ break;
389
+ }
390
+ }
391
+
392
+ get_dropdown_field( field ) {
393
+ return (
394
+ <select
395
+ id={ "yikes-easy-mc-form-" + this.props.formID + "-" + field.merge }
396
+ name={ field.merge }
397
+ className={ 'yikes-easy-mc-' + field.type + ' ' + field['additional-classes'] }
398
+ onChange={ this.handleFormFieldChanges }
399
+ key= { 'yikes-mailchimp-field-' + field.merge }
400
+ value={ JSON.parse( field.choices )[ field.default_choice ] }
401
+ required={ field.merge === 'EMAIL' || field.require === '1' ? 'required' : false }
402
+ >
403
+ { Object.keys( JSON.parse( field.choices ) ).map( ( key ) => {
404
+ var choice = JSON.parse( field.choices )[ key ];
405
+ return <option key={ slugify( choice ) } value={ choice }>{ choice }</option>
406
+ })}
407
+ </select>
408
+ )
409
+ }
410
+
411
+ get_radio_field( field ) {
412
+ var ii = 0;
413
+
414
+ return (
415
+ JSON.parse( field.choices ).map( ( key ) => {
416
+ ii++;
417
+ return (
418
+ <label
419
+ htmlFor={ field.merge + '-' + ii }
420
+ className="yikes-easy-mc-checkbox-label"
421
+ key={ field.merge + '-label-radio-key-' + ii }
422
+ >
423
+ <input
424
+ type="radio"
425
+ name={ field.merge }
426
+ id={ field.merge + '-' + ii }
427
+ key={ field.merge + '-' + ii + '-input-key' }
428
+ value={ key }
429
+ onChange={ this.handleFormFieldChanges }
430
+ checked={ parseInt( field.default_choice ) === ( ii - 1 ) }
431
+ />
432
+ <span key={ field.merge + '-span-radio-key-' + ii } className={ field.merge + '-label' }>{ key }</span>
433
+ </label>
434
+ )
435
+ })
436
+ )
437
+ }
438
+
439
+ get_url_field( field ) {
440
+ return (
441
+ <TextControl
442
+ id={ "yikes-easy-mc-form-" + this.props.formID + "-" + field.merge }
443
+ placeholder={ field.placeholder }
444
+ onChange={ this.handleFormFieldChanges }
445
+ type='url'
446
+ value={ field.default }
447
+ name={ field.merge }
448
+ className={ 'yikes-easy-mc-' + field.type + ' ' + field['additional-classes'] }
449
+ key= { 'yikes-mailchimp-field-' + field.merge }
450
+ required={ field.merge === 'EMAIL' || field.require === '1' ? 'required' : false }
451
+ title={ field.type === 'url' ? __( 'Please enter a valid URL to the website.' ) : __( 'Please enter a valid URL to the image.' ) }
452
+ />
453
+ )
454
+ }
455
+
456
+ get_default_field( field ) {
457
+
458
+ var type = field.type === 'zip' || field.type === 'phone' ? 'text' : field.type;
459
+
460
+ return (
461
+ <TextControl
462
+ id={ "yikes-easy-mc-form-" + this.props.formID + "-" + field.merge }
463
+ placeholder={ field.placeholder }
464
+ onChange={ this.handleFormFieldChanges }
465
+ type={ type }
466
+ value={ field.default }
467
+ name={ field.merge }
468
+ className={ 'yikes-easy-mc-' + field.type + ' ' + field['additional-classes'] }
469
+ key= { 'yikes-mailchimp-field-' + field.merge }
470
+ required={ field.merge === 'EMAIL' || field.require === '1' ? 'required' : false }
471
+ />
472
+ )
473
+ }
474
+
475
+ get_date_field( field ) {
476
+ return (
477
+ <TextControl
478
+ id={ "yikes-easy-mc-form-" + this.props.formID + "-" + field.merge }
479
+ placeholder={ field.placeholder }
480
+ onChange={ this.handleFormFieldChanges }
481
+ type='text'
482
+ value={ field.default }
483
+ name={ field.merge }
484
+ className={ 'yikes-easy-mc-' + field.type + ' ' + field['additional-classes'] }
485
+ key= { 'yikes-mailchimp-field-' + field.merge }
486
+ required={ field.merge === 'EMAIL' || field.require === '1' ? 'required' : false }
487
+ data-attr-type={ field.type }
488
+ data-date-format={ field.date_format.toLowerCase() }
489
+ />
490
+ )
491
+ }
492
+
493
+ get_radio_interest_group( field ) {
494
+ var ii = -1;
495
+ var cn = "yikes-easy-mc-checkbox-label " + field['additional-classes'];
496
+
497
+ return (
498
+ Object.keys( JSON.parse( field.groups ) ).map( ( key ) => {
499
+ var choice = JSON.parse( field.groups )[ key ];
500
+ ii++;
501
+ return (
502
+ <label
503
+ htmlFor={ field.group_id + '-' + ii }
504
+ className={ { [cn]: true, 'field-no-label': field['hide-label'] === '1' } }
505
+ key={ field.group_id + '-' + ii + '-label-key' }
506
+ >
507
+ <input
508
+ type="radio"
509
+ name={"group-" + field.group_id + '[]' }
510
+ id={ field.group_id + '-' + ii }
511
+ key={ field.group_id + '-' + ii + '-input-key' }
512
+ value={ key }
513
+ onChange={ this.handleFormFieldChanges }
514
+ checked={ key === field.default_choice }
515
+ className={ { 'yikes-interest-group-required': field.require === '1' } }
516
+ />
517
+ { choice }
518
+ </label>
519
+ )
520
+ })
521
+ )
522
+ }
523
+
524
+ get_hidden_interest_group( field ) {
525
+ var ii = -1;
526
+
527
+ return (
528
+ Object.keys( JSON.parse( field.groups ) ).map( ( key ) => {
529
+ var choice = JSON.parse( field.groups )[ key ];
530
+ ii++;
531
+ return (
532
+ <label
533
+ htmlFor={ field.group_id + '-' + ii }
534
+ className={ 'yikes-easy-mc-checkbox-label ' + field['additional-classes'] }
535
+ key={ field.group_id + '-' + ii + '-label-key' }
536
+ >
537
+ <input
538
+ type="checkbox"
539
+ name={"group-" + field.group_id + '[]' }
540
+ id={ field.group_id + '-' + ii }
541
+ key={ field.group_id + '-' + ii + '-input-key' }
542
+ value={ key }
543
+ onChange={ this.handleFormFieldChanges }
544
+ checked={ field.default_choice && field.default_choice.indexOf( key ) !== -1 }
545
+ />
546
+ { choice }
547
+ </label>
548
+ )
549
+ })
550
+ )
551
+ }
552
+
553
+ get_checkboxes_interest_group( field ) {
554
+ var ii = -1;
555
+ var cn = 'yikes-easy-mc-checkbox-label ' + field['additional-classes'];
556
+
557
+ return (
558
+ Object.keys( JSON.parse( field.groups ) ).map( ( key ) => {
559
+ var choice = JSON.parse( field.groups )[ key ];
560
+ ii++;
561
+ return (
562
+ <label
563
+ htmlFor={ field.group_id + '-' + ii }
564
+ className={ { [cn]: true, 'field-no-label': field['hide-label'] === '1' } }
565
+ key={ field.group_id + '-' + ii + '-label-key' }
566
+ >
567
+ <input
568
+ className={ { 'yikes-interest-group-required': field.require === '1' } }
569
+ type="checkbox"
570
+ name={ 'group-' + field.group_id + '[]' }
571
+ id={ field.group_id + '-' + ii }
572
+ key={ field.group_id + '-' + ii + '-input-key' }
573
+ value={ key }
574
+ onChange={ this.handleFormFieldChanges }
575
+ checked={ typeof field.default_choice !== 'undefined' && field.default_choice.indexOf( key ) !== -1 }
576
+ required={ field.require === '1' ? 'required' : false }
577
+ />
578
+ { choice }
579
+ </label>
580
+ )
581
+ })
582
+ )
583
+ }
584
+
585
+ get_dropdown_interest_group( field ) {
586
+ var ii = -1;
587
+
588
+ return (
589
+ <select
590
+ id={ "yikes-easy-mc-form-" + this.props.formID + "-" + field.group_id }
591
+ name={ "group-" + field.group_id }
592
+ className={ "yikes-easy-mc-dropdown " + field['additional-classes'] }
593
+ value={ field.default_choice }
594
+ onChange={ this.handleFormFieldChanges }
595
+ required={ field.require === '1' ? 'required' : false }
596
+ >
597
+
598
+ { Object.keys( JSON.parse( field.groups ) ).map( ( key ) => {
599
+ var choice = JSON.parse( field.groups )[ key ];
600
+ ii++;
601
+ return (
602
+ <option key={ field.group_id + '-' + ii + '-input-key' } value={ key }>{ choice }</option>
603
+ )
604
+ })}
605
+ </select>
606
+ )
607
+ }
608
+
609
+ form_fields() {
610
+
611
+ return this.props.formData && this.props.formData.fields ?
612
+ Object.keys( this.props.formData.fields ).map( ( key ) => {
613
+
614
+ var field = this.props.formData.fields[ key ];
615
+
616
+ // Form Fields (aka merge variables)
617
+ if ( typeof field.merge !== 'undefined' ) {
618
+
619
+ var desc = field.description.length > 0 ?
620
+ <p className="form-field-description" id={ "form-field-description-" + field.merge } key={ "form-field-description-" + field.merge }>{ field.description }</p>
621
+ : '';
622
+
623
+ var label = field['hide-label'] !== '1' ? <span className={ field.merge + '-label' } key={ field.merge + '-label-span-key' }>{ field.label }</span> : '';
624
+
625
+ var classes = {'yikes-mailchimp-field-required' : field.merge === 'EMAIL' || field.require === '1' }
626
+ classes[ field.merge + '-label'] = true;
627
+
628
+ if ( field.type === 'address' ) {
629
+
630
+ return ([
631
+ field.description_above === '1' && field.description.length > 0 && desc,
632
+ Object.keys( this.address_fields ).map( ( addr_field ) => {
633
+ label = field['hide-label'] !== '1' ? <span className={ field.merge + '-label' } key={ field.merge + '-label-span-key-' + addr_field }>{ this.address_fields[ addr_field ] }</span> : '';
634
+
635
+ return (
636
+ <label
637
+ htmlFor={ "yikes-easy-mc-form-" + this.props.formID + "-" + field.merge + '-' + addr_field }
638
+ className={ classes }
639
+ key={ field.merge + '-label-key-' + addr_field }
640
+ style={ field.hide === '1' ? { 'display': 'none' } : {} }
641
+ >
642
+ { label }
643
+ { this.get_address_field( addr_field, field ) }
644
+ </label>
645
+ )
646
+ }),
647
+ field.description_above !== '1' && field.description.length > 0 && desc
648
+ ])
649
+ } else {
650
+ return (
651
+ <label
652
+ htmlFor={ "yikes-easy-mc-form-" + this.props.formID + "-" + field.merge }
653
+ className={ classes }
654
+ key={ field.merge + '-label-key' }
655
+ style={ field.hide === '1' ? { 'display': 'none' } : {} }
656
+ >
657
+ { label }
658
+
659
+ { field.description_above === '1' && field.description.length > 0 && desc }
660
+
661
+ {
662
+ ( field.type === 'dropdown' ? this.get_dropdown_field( field ) :
663
+ ( field.type === 'radio' ? this.get_radio_field( field ) :
664
+ ( field.type === 'url' || field.type === 'imageurl' ? this.get_url_field( field ) :
665
+ ( field.type === 'date' || field.type === 'birthday' ? this.get_date_field( field ) :
666
+ this.get_default_field( field ) ) ) ) )
667
+ }
668
+
669
+ { field.description_above !== '1' && field.description.length > 0 && desc }
670
+
671
+ </label>
672
+ )
673
+ }
674
+ } else {
675
+
676
+ var desc = field.description.length > 0 ?
677
+ <p className="form-field-description" id={ "form-field-description-" + field.group_id } key={ "form-field-description-" + field.group_id }>{ field.description }</p>
678
+ : '';
679
+
680
+ var label = field['hide-label'] !== '1' ?
681
+ <span key={ field.group_id + "-label-span-key" } className={ field.group_id + "-label checkbox-parent-label" }>{ field.label }</span>
682
+ : '';
683
+
684
+ var classes = { 'yikes-mailchimp-field-required' : field.require === '1' }
685
+ classes[ field.group_id + '-label'] = true;
686
+
687
+ return (
688
+ <label
689
+ htmlFor={ field.group_id }
690
+ className= { classes }
691
+ key={ field.group_id + "-label-span-key" }
692
+ style={ field.type === 'hidden' || field.hide === '1' ? { 'display': 'none' } : {} }
693
+ >
694
+
695
+ { label }
696
+
697
+ { field.description_above === '1' && field.description.length > 0 && desc }
698
+
699
+ {
700
+ ( field.type === 'radio' ? this.get_radio_interest_group( field ) :
701
+ ( field.type === 'hidden' ? this.get_hidden_interest_group( field ) :
702
+ ( field.type === 'checkboxes' ? this.get_checkboxes_interest_group( field ) :
703
+ ( field.type === 'dropdown' ? this.get_dropdown_interest_group( field ) : '' ) ) ) )
704
+ }
705
+
706
+ { field.description_above !== '1' && field.description.length > 0 && desc }
707
+
708
+ </label>
709
+ )
710
+ }
711
+ })
712
+ : '';
713
+ }
714
+
715
+ form_recaptcha() {
716
+
717
+ return this.state.recaptcha_data.success === true && this.state.recaptcha_data.data.site_key && this.props.recaptcha === true ?
718
+ <Recaptcha
719
+ sitekey={ this.state.recaptcha_data.data.site_key }
720
+ key={ 'easy-forms-recaptcha-1' }
721
+ elementID={ 'google-recaptcha-id-' + Math.random().toString(36).slice(-8) } // Need to use a unique ID for multiple reCAPTCHAs to work on the same page.
722
+ theme={ this.props.recaptchaTheme }
723
+ hl={ this.props.recaptchaLang.length > 0 ? this.props.recaptchaLang : this.state.recaptcha_data.data.locale }
724
+ type={ this.props.recaptchaType }
725
+ size={ this.props.recaptchaSize }
726
+ verifyCallback=''
727
+ expiredCallback=''
728
+ />
729
+ : '';
730
+ }
731
+
732
+ submit_button() {
733
+ return this.props.formData && this.props.formData.fields ?
734
+ ( this.props.focus && this.props.formData.form_settings['yikes-easy-mc-submit-button-type'] === 'text' ?
735
+ <button
736
+ type="submit"
737
+ key="mailchimpSubmitButton"
738
+ className={ "yikes-easy-mc-submit-button yikes-easy-mc-submit-button-" + this.props.formID + " btn btn-primary" + " " + this.props.formData.form_settings['yikes-easy-mc-submit-button-classes'] }
739
+ >
740
+ <PlainText
741
+ className="yikes-mailchimp-submit-button-span-text"
742
+ key="yikes-mailchimp-submit-button-span-text"
743
+ value={ this.props.submitButtonText ? this.props.submitButtonText : '' }
744
+ onChange={ this.props.toggleSubmitButtonText }
745
+ />
746
+ </button>
747
+ :
748
+ ( this.props.formData.form_settings['yikes-easy-mc-submit-button-type'] === 'text' ?
749
+ <button
750
+ type="submit"
751
+ key="mailchimpSubmitButton"
752
+ className={ "yikes-easy-mc-submit-button yikes-easy-mc-submit-button-" + this.props.formID + " btn btn-primary" + " " + this.props.formData.form_settings['yikes-easy-mc-submit-button-classes'] }
753
+ >
754
+ <span className="yikes-mailchimp-submit-button-span-text" key="yikes-mailchimp-submit-button-span-text">{ this.props.submitButtonText }</span>
755
+ </button>
756
+ :
757
+ <input
758
+ type="image"
759
+ alt={ this.props.submitButtonText }
760
+ src={ this.props.formData.form_settings['yikes-easy-mc-submit-button-image'] }
761
+ className={ "yikes-easy-mc-submit-button yikes-easy-mc-submit-button-image yikes-easy-mc-submit-button-" + this.props.formID + " btn btn-primary" + " " + this.props.formData.form_settings['yikes-easy-mc-submit-button-classes'] }
762
+ />
763
+ )
764
+ )
765
+ : '';
766
+ }
767
+
768
+ get_form_section() {
769
+ return (
770
+ <section
771
+ id={ "yikes-mailchimp-container-" + this.props.formID }
772
+ className={ "yikes-mailchimp-container yikes-mailchimp-container-" + this.props.formID }
773
+ key="yikes-mailchimp-container-section"
774
+ >
775
+ {[
776
+
777
+ // Form title
778
+ [this.form_title()],
779
+
780
+ // Form Description
781
+ [this.form_description()],
782
+
783
+ // Get the form
784
+ [this.get_form()]
785
+ ]}
786
+ </section>
787
+ );
788
+ }
789
+
790
+ get_form() {
791
+ return (
792
+ // Form Wrapper
793
+ <form
794
+ id={ slugify( this.props.formTitle ) + '-' + this.props.formID }
795
+ className={ "yikes-easy-mc-form yikes-easy-mc-form-" + this.props.formID + " " + this.props.formData.form_settings['yikes-easy-mc-form-class-names'] }
796
+ key="yikes-mailchimp-container-form"
797
+ >
798
+ {[
799
+
800
+ // Form fields
801
+ [this.form_fields()],
802
+
803
+ // Recaptcha
804
+ [this.form_recaptcha()],
805
+
806
+ // Submit button
807
+ [this.submit_button()]
808
+ ]}
809
+ </form>
810
+ );
811
+ }
812
+
813
+ render() {
814
+
815
+ if ( this.state.forms.length > 0 && this.props.formData && Object.keys( this.props.formData ).length > 0 ) {
816
+
817
+ return (
818
+
819
+ <div className={ this.props.className }>
820
+
821
+ {// Show inspector controls when focused
822
+ this.props.focus && this.inspector_controls()}
823
+
824
+ {// Show the forms dropdown
825
+ this.forms_dropdown()}
826
+
827
+ <hr key="easy-forms-dropdown-divider"/>
828
+
829
+ {// Show the form
830
+ this.get_form_section()}
831
+ </div>
832
+
833
+ );
834
+
835
+ } else if ( this.state.forms.length > 0 ) {
836
+
837
+ // If we don't have form data, show the forms dropdown
838
+ return (
839
+ <div className={ this.props.className }>
840
+ {this.forms_dropdown()}
841
+ </div>
842
+ );
843
+
844
+ } else if ( this.state.api_key_status !== 'valid' ) {
845
+
846
+ // If the API key is invalid, show a message.
847
+ return (
848
+ <p className="yikes-mailchimp-api-key-warning" key="yikes-mailchimp-api-key-warning">
849
+ <em>{ this.state.api_key_status === 'empty' ? <a href={ constants.settings_url }> { __( 'To use this block, please enter an API key on the Easy Forms\' settings page.' ) } </a> : __( 'Your API key is invalid.' ) }</em>
850
+ </p>
851
+ );
852
+ } else if ( this.state.forms_loaded === true && this.state.forms.length === 0 ) {
853
+
854
+ // No forms.
855
+ return (
856
+ <p key="no-forms-found" className={ this.props.className }>
857
+ <em>{ __( 'No forms were found.' ) }</em>
858
+ </p>
859
+ );
860
+ } else {
861
+
862
+ // Show loading... & spinner.
863
+ return (
864
+ <p key="loading-easy-forms" className={ this.props.className }>
865
+ <span key="yikes-easy-forms-loading-text">{ __( 'Loading...' ) }</span>
866
+ <Spinner key="yikes-easy-forms-loading-spinner" />
867
+ </p>
868
+ );
869
+ }
870
+ }
871
  }
blocks/components/constants.js CHANGED
@@ -1,390 +1,390 @@
1
- const constants = {
2
- states: {
3
- '': '—',
4
- 'AL': 'Alabama',
5
- 'AK': 'Alaska',
6
- 'AZ': 'Arizona',
7
- 'AR': 'Arkansas',
8
- 'CA': 'California',
9
- 'CO': 'Colorado',
10
- 'CT': 'Connecticut',
11
- 'DE': 'Delaware',
12
- 'DC': 'District Of Columbia',
13
- 'FL': 'Florida',
14
- 'GA': 'Georgia',
15
- 'HI': 'Hawaii',
16
- 'ID': 'Idaho',
17
- 'IL': 'Illinois',
18
- 'IN': 'Indiana',
19
- 'IA': 'Iowa',
20
- 'KS': 'Kansas',
21
- 'KY': 'Kentucky',
22
- 'LA': 'Louisiana',
23
- 'ME': 'Maine',
24
- 'MD': 'Maryland',
25
- 'MA': 'Massachusetts',
26
- 'MI': 'Michigan',
27
- 'MN': 'Minnesota',
28
- 'MS': 'Mississippi',
29
- 'MO': 'Missouri',
30
- 'MT': 'Montana',
31
- 'NE': 'Nebraska',
32
- 'NV': 'Nevada',
33
- 'NH': 'New Hampshire',
34
- 'NJ': 'New Jersey',
35
- 'NM': 'New Mexico',
36
- 'NY': 'New York',
37
- 'NC': 'North Carolina',
38
- 'ND': 'North Dakota',
39
- 'OH': 'Ohio',
40
- 'OK': 'Oklahoma',
41
- 'OR': 'Oregon',
42
- 'PA': 'Pennsylvania',
43
- 'RI': 'Rhode Island',
44
- 'SC': 'South Carolina',
45
- 'SD': 'South Dakota',
46
- 'TN': 'Tennessee',
47
- 'TX': 'Texas',
48
- 'UT': 'Utah',
49
- 'VT': 'Vermont',
50
- 'VA': 'Virginia',
51
- 'WA': 'Washington',
52
- 'WV': 'West Virginia',
53
- 'WI': 'Wisconsin',
54
- 'WY': 'Wyoming',
55
- 'AB': 'Alberta',
56
- 'BC': 'British Columbia',
57
- 'MB': 'Manitoba',
58
- 'NB': 'New Brunswick',
59
- 'NL': 'Newfoundland and Labrador',
60
- 'NS': 'Nova Scotia',
61
- 'ON': 'Ontario',
62
- 'PE': 'Prince Edward Island',
63
- 'QC': 'Quebec',
64
- 'SK': 'Saskatchewan',
65
- 'NT': 'Northwest Territories',
66
- 'NU': 'Nunavut',
67
- 'YT': 'Yukon',
68
- },
69
- countries: {
70
- 'US': 'United States',
71
- 'GB': 'United Kingdom',
72
- 'AF': 'Afghanistan',
73
- 'AX': 'Aland Islands',
74
- 'AL': 'Albania',
75
- 'DZ': 'Algeria',
76
- 'AS': 'American Samoa',
77
- 'AD': 'Andorra',
78
- 'AO': 'Angola',
79
- 'AI': 'Anguilla',
80
- 'AQ': 'Antarctica',
81
- 'AG': 'Antigua and Barbuda',
82
- 'AR': 'Argentina',
83
- 'AM': 'Armenia',
84
- 'AW': 'Aruba',
85
- 'AU': 'Australia',
86
- 'AT': 'Austria',
87
- 'AZ': 'Azerbaijan',
88
- 'BS': 'Bahamas',
89
- 'BH': 'Bahrain',
90
- 'BD': 'Bangladesh',
91
- 'BB': 'Barbados',
92
- 'BY': 'Belarus',
93
- 'BE': 'Belgium',
94
- 'BZ': 'Belize',
95
- 'BJ': 'Benin',
96
- 'BM': 'Bermuda',
97
- 'BT': 'Bhutan',
98
- 'BO': 'Bolivia',
99
- 'BA': 'Bosnia and Herzegovina',
100
- 'BW': 'Botswana',
101
- 'BV': 'Bouvet Island',
102
- 'BR': 'Brazil',
103
- 'IO': 'British Indian Ocean Territory',
104
- 'BN': 'Brunei Darussalam',
105
- 'BG': 'Bulgaria',
106
- 'BF': 'Burkina Faso',
107
- 'BI': 'Burundi',
108
- 'KH': 'Cambodia',
109
- 'CM': 'Cameroon',
110
- 'CA': 'Canada',
111
- 'CV': 'Cape Verde',
112
- 'KY': 'Cayman Islands',
113
- 'CF': 'Central African Republic',
114
- 'TD': 'Chad',
115
- 'CL': 'Chile',
116
- 'CN': 'China',
117
- 'CX': 'Christmas Island',
118
- 'CC': 'Cocos (Keeling) Islands',
119
- 'CO': 'Colombia',
120
- 'KM': 'Comoros',
121
- 'CG': 'Congo',
122
- 'CD': 'Congo, The Democratic Republic of The',
123
- 'CK': 'Cook Islands',
124
- 'CR': 'Costa Rica',
125
- 'CI': 'Cote D’ivoire',
126
- 'HR': 'Croatia',
127
- 'CU': 'Cuba',
128
- 'CY': 'Cyprus',
129
- 'CZ': 'Czech Republic',
130
- 'DK': 'Denmark',
131
- 'DJ': 'Djibouti',
132
- 'DM': 'Dominica',
133
- 'DO': 'Dominican Republic',
134
- 'EC': 'Ecuador',
135
- 'EG': 'Egypt',
136
- 'SV': 'El Salvador',
137
- 'GQ': 'Equatorial Guinea',
138
- 'ER': 'Eritrea',
139
- 'EE': 'Estonia',
140
- 'ET': 'Ethiopia',
141
- 'FK': 'Falkland Islands (Malvinas)',
142
- 'FO': 'Faroe Islands',
143
- 'FJ': 'Fiji',
144
- 'FI': 'Finland',
145
- 'FR': 'France',
146
- 'GF': 'French Guiana',
147
- 'PF': 'French Polynesia',
148
- 'TF': 'French Southern Territories',
149
- 'GA': 'Gabon',
150
- 'GM': 'Gambia',
151
- 'GE': 'Georgia',
152
- 'DE': 'Germany',
153
- 'GH': 'Ghana',
154
- 'GI': 'Gibraltar',
155
- 'GR': 'Greece',
156
- 'GL': 'Greenland',
157
- 'GD': 'Grenada',
158
- 'GP': 'Guadeloupe',
159
- 'GU': 'Guam',
160
- 'GT': 'Guatemala',
161
- 'GG': 'Guernsey',
162
- 'GN': 'Guinea',
163
- 'GW': 'Guinea-bissau',
164
- 'GY': 'Guyana',
165
- 'HT': 'Haiti',
166
- 'HM': 'Heard Island and Mcdonald Islands',
167
- 'VA': 'Holy See (Vatican City State)',
168
- 'HN': 'Honduras',
169
- 'HK': 'Hong Kong',
170
- 'HU': 'Hungary',
171
- 'IS': 'Iceland',
172
- 'IN': 'India',
173
- 'ID': 'Indonesia',
174
- 'IR': 'Iran, Islamic Republic of',
175
- 'IQ': 'Iraq',
176
- 'IE': 'Ireland',
177
- 'IM': 'Isle of Man',
178
- 'IL': 'Israel',
179
- 'IT': 'Italy',
180
- 'JM': 'Jamaica',
181
- 'JP': 'Japan',
182
- 'JE': 'Jersey',
183
- 'JO': 'Jordan',
184
- 'KZ': 'Kazakhstan',
185
- 'KE': 'Kenya',
186
- 'KI': 'Kiribati',
187
- 'KP': 'Korea, Democratic People’s Republic of',
188
- 'KR': 'Korea, Republic of',
189
- 'KW': 'Kuwait',
190
- 'KG': 'Kyrgyzstan',
191
- 'LA': 'Lao People’s Democratic Republic',
192
- 'LV': 'Latvia',
193
- 'LB': 'Lebanon',
194
- 'LS': 'Lesotho',
195
- 'LR': 'Liberia',
196
- 'LY': 'Libyan Arab Jamahiriya',
197
- 'LI': 'Liechtenstein',
198
- 'LT': 'Lithuania',
199
- 'LU': 'Luxembourg',
200
- 'MO': 'Macao',
201
- 'MK': 'Macedonia, The Former Yugoslav Republic of',
202
- 'MG': 'Madagascar',
203
- 'MW': 'Malawi',
204
- 'MY': 'Malaysia',
205
- 'MV': 'Maldives',
206
- 'ML': 'Mali',
207
- 'MT': 'Malta',
208
- 'MH': 'Marshall Islands',
209
- 'MQ': 'Martinique',
210
- 'MR': 'Mauritania',
211
- 'MU': 'Mauritius',
212
- 'YT': 'Mayotte',
213
- 'MX': 'Mexico',
214
- 'FM': 'Micronesia, Federated States of',
215
- 'MD': 'Moldova, Republic of',
216
- 'MC': 'Monaco',
217
- 'MN': 'Mongolia',
218
- 'ME': 'Montenegro',
219
- 'MS': 'Montserrat',
220
- 'MA': 'Morocco',
221
- 'MZ': 'Mozambique',
222
- 'MM': 'Myanmar',
223
- 'NA': 'Namibia',
224
- 'NR': 'Nauru',
225
- 'NP': 'Nepal',
226
- 'NL': 'Netherlands',
227
- 'AN': 'Netherlands Antilles',
228
- 'NC': 'New Caledonia',
229
- 'NZ': 'New Zealand',
230
- 'NI': 'Nicaragua',
231
- 'NE': 'Niger',
232
- 'NG': 'Nigeria',
233
- 'NU': 'Niue',
234
- 'NF': 'Norfolk Island',
235
- 'MP': 'Northern Mariana Islands',
236
- 'NO': 'Norway',
237
- 'OM': 'Oman',
238
- 'PK': 'Pakistan',
239
- 'PW': 'Palau',
240
- 'PS': 'Palestinian Territory, Occupied',
241
- 'PA': 'Panama',
242
- 'PG': 'Papua New Guinea',
243
- 'PY': 'Paraguay',
244
- 'PE': 'Peru',
245
- 'PH': 'Philippines',
246
- 'PN': 'Pitcairn',
247
- 'PL': 'Poland',
248
- 'PT': 'Portugal',
249
- 'PR': 'Puerto Rico',
250
- 'QA': 'Qatar',
251
- 'RE': 'Reunion',
252
- 'RO': 'Romania',
253
- 'RU': 'Russian Federation',
254
- 'RW': 'Rwanda',
255
- 'SH': 'Saint Helena',
256
- 'KN': 'Saint Kitts and Nevis',
257
- 'LC': 'Saint Lucia',
258
- 'PM': 'Saint Pierre and Miquelon',
259
- 'VC': 'Saint Vincent and The Grenadines',
260
- 'WS': 'Samoa',
261
- 'SM': 'San Marino',
262
- 'ST': 'Sao Tome and Principe',
263
- 'SA': 'Saudi Arabia',
264
- 'SN': 'Senegal',
265
- 'RS': 'Serbia',
266
- 'SC': 'Seychelles',
267
- 'SL': 'Sierra Leone',
268
- 'SG': 'Singapore',
269
- 'SK': 'Slovakia',
270
- 'SI': 'Slovenia',
271
- 'SB': 'Solomon Islands',
272
- 'SO': 'Somalia',
273
- 'ZA': 'South Africa',
274
- 'GS': 'South Georgia and The South Sandwich Islands',
275
- 'ES': 'Spain',
276
- 'LK': 'Sri Lanka',
277
- 'SD': 'Sudan',
278
- 'SR': 'Suriname',
279
- 'SJ': 'Svalbard and Jan Mayen',
280
- 'SZ': 'Swaziland',
281
- 'SE': 'Sweden',
282
- 'CH': 'Switzerland',
283
- 'SY': 'Syrian Arab Republic',
284
- 'TW': 'Taiwan, Province of China',
285
- 'TJ': 'Tajikistan',
286
- 'TZ': 'Tanzania, United Republic of',
287
- 'TH': 'Thailand',
288
- 'TL': 'Timor-leste',
289
- 'TG': 'Togo',
290
- 'TK': 'Tokelau',
291
- 'TO': 'Tonga',
292
- 'TT': 'Trinidad and Tobago',
293
- 'TN': 'Tunisia',
294
- 'TR': 'Turkey',
295
- 'TM': 'Turkmenistan',
296
- 'TC': 'Turks and Caicos Islands',
297
- 'TV': 'Tuvalu',
298
- 'UG': 'Uganda',
299
- 'UA': 'Ukraine',
300
- 'AE': 'United Arab Emirates',
301
- 'UM': 'United States Minor Outlying Islands',
302
- 'UY': 'Uruguay',
303
- 'UZ': 'Uzbekistan',
304
- 'VU': 'Vanuatu',
305
- 'VE': 'Venezuela',
306
- 'VN': 'Viet Nam',
307
- 'VG': 'Virgin Islands, British',
308
- 'VI': 'Virgin Islands, U.S.',
309
- 'WF': 'Wallis and Futuna',
310
- 'EH': 'Western Sahara',
311
- 'YE': 'Yemen',
312
- 'ZM': 'Zambia',
313
- 'ZW': 'Zimbabwe',
314
- },
315
- locales: {
316
- "ar" : "Arabic",
317
- "af" : "Afrikaans",
318
- "am" : "Amharic",
319
- "hy" : "Armenian",
320
- "az" : "Azerbaijani",
321
- "eu" : "Basque",
322
- "bn" : "Bengali",
323
- "bg" : "Bulgarian",
324
- "ca" : "Catalan",
325
- "zh-HK" : "Chinese (Hong Kong)",
326
- "zh-CN" : "Chinese (Simplified)",
327
- "zh-TW" : "Chinese (Traditional)",
328
- "hr" : "Croatian",
329
- "cs" : "Czech",
330
- "da" : "Danish",
331
- "nl" : "Dutch",
332
- "en-GB" : "English (UK)",
333
- "en" : "English (US)",
334
- "et" : "Estonian",
335
- "fil" : "Filipino",
336
- "fi" : "Finnish",
337
- "fr" : "French",
338
- "fr-CA" : "French (Canadian)",
339
- "gl" : "Galician",
340
- "ka" : "Georgian",
341
- "de" : "German",
342
- "de-AT" : "German (Austria)",
343
- "de-CH" : "German (Switzerland)",
344
- "el" : "Greek",
345
- "gu" : "Gujarati",
346
- "iw" : "Hebrew",
347
- "hi" : "Hindi",
348
- "hu" : "Hungarain",
349
- "is" : "Icelandic",
350
- "id" : "Indonesian",
351
- "it" : "Italian",
352
- "ja" : "Japanese",
353
- "kn" : "Kannada",
354
- "ko" : "Korean",
355
- "lo" : "Laothian",
356
- "lv" : "Latvian",
357
- "lt" : "Lithuanian",
358
- "ms" : "Malay",
359
- "ml" : "Malayalam",
360
- "mr" : "Marathi",
361
- "mn" : "Mongolian",
362
- "no" : "Norwegian",
363
- "fa" : "Persian",
364
- "pl" : "Polish",
365
- "pt" : "Portuguese",
366
- "pt-BR" : "Portuguese (Brazil)",
367
- "pt-PT" : "Portuguese (Portugal)",
368
- "ro" : "Romanian",
369
- "ru" : "Russian",
370
- "sr" : "Serbian",
371
- "si" : "Sinhalese",
372
- "sk" : "Slovak",
373
- "sl" : "Slovenian",
374
- "es" : "Spanish",
375
- "es-419" : "Spanish (Latin America)",
376
- "sw" : "Swahili",
377
- "sv" : "Swedish",
378
- "ta" : "Tamil",
379
- "te" : "Telugu",
380
- "th" : "Thai",
381
- "tr" : "Turkish",
382
- "uk" : "Ukrainian",
383
- "ur" : "Urdu",
384
- "vi" : "Vietnamese",
385
- "zu" : "Zulu"
386
- },
387
- settings_url: 'wp-admin/admin.php?page=yikes-inc-easy-mailchimp-settings'
388
- }
389
-
390
- export default constants;
1
+ const constants = {
2
+ states: {
3
+ '': '—',
4
+ 'AL': 'Alabama',
5
+ 'AK': 'Alaska',
6
+ 'AZ': 'Arizona',
7
+ 'AR': 'Arkansas',
8
+ 'CA': 'California',
9
+ 'CO': 'Colorado',
10
+ 'CT': 'Connecticut',
11
+ 'DE': 'Delaware',
12
+ 'DC': 'District Of Columbia',
13
+ 'FL': 'Florida',
14
+ 'GA': 'Georgia',
15
+ 'HI': 'Hawaii',
16
+ 'ID': 'Idaho',
17
+ 'IL': 'Illinois',
18
+ 'IN': 'Indiana',
19
+ 'IA': 'Iowa',
20
+ 'KS': 'Kansas',
21
+ 'KY': 'Kentucky',
22
+ 'LA': 'Louisiana',
23
+ 'ME': 'Maine',
24
+ 'MD': 'Maryland',
25
+ 'MA': 'Massachusetts',
26
+ 'MI': 'Michigan',
27
+ 'MN': 'Minnesota',
28
+ 'MS': 'Mississippi',
29
+ 'MO': 'Missouri',
30
+ 'MT': 'Montana',
31
+ 'NE': 'Nebraska',
32
+ 'NV': 'Nevada',
33
+ 'NH': 'New Hampshire',
34
+ 'NJ': 'New Jersey',
35
+ 'NM': 'New Mexico',
36
+ 'NY': 'New York',
37
+ 'NC': 'North Carolina',
38
+ 'ND': 'North Dakota',
39
+ 'OH': 'Ohio',
40
+ 'OK': 'Oklahoma',
41
+ 'OR': 'Oregon',
42
+ 'PA': 'Pennsylvania',
43
+ 'RI': 'Rhode Island',
44
+ 'SC': 'South Carolina',
45
+ 'SD': 'South Dakota',
46
+ 'TN': 'Tennessee',
47
+ 'TX': 'Texas',
48
+ 'UT': 'Utah',
49
+ 'VT': 'Vermont',
50
+ 'VA': 'Virginia',
51
+ 'WA': 'Washington',
52
+ 'WV': 'West Virginia',
53
+ 'WI': 'Wisconsin',
54
+ 'WY': 'Wyoming',
55
+ 'AB': 'Alberta',
56
+ 'BC': 'British Columbia',
57
+ 'MB': 'Manitoba',
58
+ 'NB': 'New Brunswick',
59
+ 'NL': 'Newfoundland and Labrador',
60
+ 'NS': 'Nova Scotia',
61
+ 'ON': 'Ontario',
62
+ 'PE': 'Prince Edward Island',
63
+ 'QC': 'Quebec',
64
+ 'SK': 'Saskatchewan',
65
+ 'NT': 'Northwest Territories',
66
+ 'NU': 'Nunavut',
67
+ 'YT': 'Yukon',
68
+ },
69
+ countries: {
70
+ 'US': 'United States',
71
+ 'GB': 'United Kingdom',
72
+ 'AF': 'Afghanistan',
73
+ 'AX': 'Aland Islands',
74
+ 'AL': 'Albania',
75
+ 'DZ': 'Algeria',
76
+ 'AS': 'American Samoa',
77
+ 'AD': 'Andorra',
78
+ 'AO': 'Angola',
79
+ 'AI': 'Anguilla',
80
+ 'AQ': 'Antarctica',
81
+ 'AG': 'Antigua and Barbuda',
82
+ 'AR': 'Argentina',
83
+ 'AM': 'Armenia',
84
+ 'AW': 'Aruba',
85
+ 'AU': 'Australia',
86
+ 'AT': 'Austria',
87
+ 'AZ': 'Azerbaijan',
88
+ 'BS': 'Bahamas',
89
+ 'BH': 'Bahrain',
90
+ 'BD': 'Bangladesh',
91
+ 'BB': 'Barbados',
92
+ 'BY': 'Belarus',
93
+ 'BE': 'Belgium',
94
+ 'BZ': 'Belize',
95
+ 'BJ': 'Benin',
96
+ 'BM': 'Bermuda',
97
+ 'BT': 'Bhutan',
98
+ 'BO': 'Bolivia',
99
+ 'BA': 'Bosnia and Herzegovina',
100
+ 'BW': 'Botswana',
101
+ 'BV': 'Bouvet Island',
102
+ 'BR': 'Brazil',
103
+ 'IO': 'British Indian Ocean Territory',
104
+ 'BN': 'Brunei Darussalam',
105
+ 'BG': 'Bulgaria',
106
+ 'BF': 'Burkina Faso',
107
+ 'BI': 'Burundi',
108
+ 'KH': 'Cambodia',
109
+ 'CM': 'Cameroon',
110
+ 'CA': 'Canada',
111
+ 'CV': 'Cape Verde',
112
+ 'KY': 'Cayman Islands',
113
+ 'CF': 'Central African Republic',
114
+ 'TD': 'Chad',
115
+ 'CL': 'Chile',
116
+ 'CN': 'China',
117
+ 'CX': 'Christmas Island',
118
+ 'CC': 'Cocos (Keeling) Islands',
119
+ 'CO': 'Colombia',
120
+ 'KM': 'Comoros',
121
+ 'CG': 'Congo',
122
+ 'CD': 'Congo, The Democratic Republic of The',
123
+ 'CK': 'Cook Islands',
124
+ 'CR': 'Costa Rica',
125
+ 'CI': 'Cote D’ivoire',
126
+ 'HR': 'Croatia',
127
+ 'CU': 'Cuba',
128
+ 'CY': 'Cyprus',
129
+ 'CZ': 'Czech Republic',
130
+ 'DK': 'Denmark',
131
+ 'DJ': 'Djibouti',
132
+ 'DM': 'Dominica',
133
+ 'DO': 'Dominican Republic',
134
+ 'EC': 'Ecuador',
135
+ 'EG': 'Egypt',
136
+ 'SV': 'El Salvador',
137
+ 'GQ': 'Equatorial Guinea',
138
+ 'ER': 'Eritrea',
139
+ 'EE': 'Estonia',
140
+ 'ET': 'Ethiopia',
141
+ 'FK': 'Falkland Islands (Malvinas)',
142
+ 'FO': 'Faroe Islands',
143
+ 'FJ': 'Fiji',
144
+ 'FI': 'Finland',
145
+ 'FR': 'France',
146
+ 'GF': 'French Guiana',
147
+ 'PF': 'French Polynesia',
148
+ 'TF': 'French Southern Territories',
149
+ 'GA': 'Gabon',
150
+ 'GM': 'Gambia',
151
+ 'GE': 'Georgia',
152
+ 'DE': 'Germany',
153
+ 'GH': 'Ghana',
154
+ 'GI': 'Gibraltar',
155
+ 'GR': 'Greece',
156
+ 'GL': 'Greenland',
157
+ 'GD': 'Grenada',
158
+ 'GP': 'Guadeloupe',
159
+ 'GU': 'Guam',
160
+ 'GT': 'Guatemala',
161
+ 'GG': 'Guernsey',
162
+ 'GN': 'Guinea',
163
+ 'GW': 'Guinea-bissau',
164
+ 'GY': 'Guyana',
165
+ 'HT': 'Haiti',
166
+ 'HM': 'Heard Island and Mcdonald Islands',
167
+ 'VA': 'Holy See (Vatican City State)',
168
+ 'HN': 'Honduras',
169
+ 'HK': 'Hong Kong',
170
+ 'HU': 'Hungary',
171
+ 'IS': 'Iceland',
172
+ 'IN': 'India',
173
+ 'ID': 'Indonesia',
174
+ 'IR': 'Iran, Islamic Republic of',
175
+ 'IQ': 'Iraq',
176
+ 'IE': 'Ireland',
177
+ 'IM': 'Isle of Man',
178
+ 'IL': 'Israel',
179
+ 'IT': 'Italy',
180
+ 'JM': 'Jamaica',
181
+ 'JP': 'Japan',
182
+ 'JE': 'Jersey',
183
+ 'JO': 'Jordan',
184
+ 'KZ': 'Kazakhstan',
185
+ 'KE': 'Kenya',
186
+ 'KI': 'Kiribati',
187
+ 'KP': 'Korea, Democratic People’s Republic of',
188
+ 'KR': 'Korea, Republic of',
189
+ 'KW': 'Kuwait',
190
+ 'KG': 'Kyrgyzstan',
191
+ 'LA': 'Lao People’s Democratic Republic',
192
+ 'LV': 'Latvia',
193
+ 'LB': 'Lebanon',
194
+ 'LS': 'Lesotho',
195
+ 'LR': 'Liberia',
196
+ 'LY': 'Libyan Arab Jamahiriya',
197
+ 'LI': 'Liechtenstein',
198
+ 'LT': 'Lithuania',
199
+ 'LU': 'Luxembourg',
200
+ 'MO': 'Macao',
201
+ 'MK': 'Macedonia, The Former Yugoslav Republic of',
202
+ 'MG': 'Madagascar',
203
+ 'MW': 'Malawi',
204
+ 'MY': 'Malaysia',
205
+ 'MV': 'Maldives',
206
+ 'ML': 'Mali',
207
+ 'MT': 'Malta',
208
+ 'MH': 'Marshall Islands',
209
+ 'MQ': 'Martinique',
210
+ 'MR': 'Mauritania',
211
+ 'MU': 'Mauritius',
212
+ 'YT': 'Mayotte',
213
+ 'MX': 'Mexico',
214
+ 'FM': 'Micronesia, Federated States of',
215
+ 'MD': 'Moldova, Republic of',
216
+ 'MC': 'Monaco',
217
+ 'MN': 'Mongolia',
218
+ 'ME': 'Montenegro',
219
+ 'MS': 'Montserrat',
220
+ 'MA': 'Morocco',
221
+ 'MZ': 'Mozambique',
222
+ 'MM': 'Myanmar',
223
+ 'NA': 'Namibia',
224
+ 'NR': 'Nauru',
225
+ 'NP': 'Nepal',
226
+ 'NL': 'Netherlands',
227
+ 'AN': 'Netherlands Antilles',
228
+ 'NC': 'New Caledonia',
229
+ 'NZ': 'New Zealand',
230
+ 'NI': 'Nicaragua',
231
+ 'NE': 'Niger',
232
+ 'NG': 'Nigeria',
233
+ 'NU': 'Niue',
234
+ 'NF': 'Norfolk Island',
235
+ 'MP': 'Northern Mariana Islands',
236
+ 'NO': 'Norway',
237
+ 'OM': 'Oman',
238
+ 'PK': 'Pakistan',
239
+ 'PW': 'Palau',
240
+ 'PS': 'Palestinian Territory, Occupied',
241
+ 'PA': 'Panama',
242
+ 'PG': 'Papua New Guinea',
243
+ 'PY': 'Paraguay',
244
+ 'PE': 'Peru',
245
+ 'PH': 'Philippines',
246
+ 'PN': 'Pitcairn',
247
+ 'PL': 'Poland',
248
+ 'PT': 'Portugal',
249
+ 'PR': 'Puerto Rico',
250
+ 'QA': 'Qatar',
251
+ 'RE': 'Reunion',
252
+ 'RO': 'Romania',
253
+ 'RU': 'Russian Federation',
254
+ 'RW': 'Rwanda',
255
+ 'SH': 'Saint Helena',
256
+ 'KN': 'Saint Kitts and Nevis',
257
+ 'LC': 'Saint Lucia',
258
+ 'PM': 'Saint Pierre and Miquelon',
259
+ 'VC': 'Saint Vincent and The Grenadines',
260
+ 'WS': 'Samoa',
261
+ 'SM': 'San Marino',
262
+ 'ST': 'Sao Tome and Principe',
263
+ 'SA': 'Saudi Arabia',
264
+ 'SN': 'Senegal',
265
+ 'RS': 'Serbia',
266
+ 'SC': 'Seychelles',
267
+ 'SL': 'Sierra Leone',
268
+ 'SG': 'Singapore',
269
+ 'SK': 'Slovakia',
270
+ 'SI': 'Slovenia',
271
+ 'SB': 'Solomon Islands',
272
+ 'SO': 'Somalia',
273
+ 'ZA': 'South Africa',
274
+ 'GS': 'South Georgia and The South Sandwich Islands',
275
+ 'ES': 'Spain',
276
+ 'LK': 'Sri Lanka',
277
+ 'SD': 'Sudan',
278
+ 'SR': 'Suriname',
279
+ 'SJ': 'Svalbard and Jan Mayen',
280
+ 'SZ': 'Swaziland',
281
+ 'SE': 'Sweden',
282
+ 'CH': 'Switzerland',
283
+ 'SY': 'Syrian Arab Republic',
284
+ 'TW': 'Taiwan, Province of China',
285
+ 'TJ': 'Tajikistan',
286
+ 'TZ': 'Tanzania, United Republic of',
287
+ 'TH': 'Thailand',
288
+ 'TL': 'Timor-leste',
289
+ 'TG': 'Togo',
290
+ 'TK': 'Tokelau',
291
+ 'TO': 'Tonga',
292
+ 'TT': 'Trinidad and Tobago',
293
+ 'TN': 'Tunisia',
294
+ 'TR': 'Turkey',
295
+ 'TM': 'Turkmenistan',
296
+ 'TC': 'Turks and Caicos Islands',
297
+ 'TV': 'Tuvalu',
298
+ 'UG': 'Uganda',
299
+ 'UA': 'Ukraine',
300
+ 'AE': 'United Arab Emirates',
301
+ 'UM': 'United States Minor Outlying Islands',
302
+ 'UY': 'Uruguay',
303
+ 'UZ': 'Uzbekistan',
304
+ 'VU': 'Vanuatu',
305
+ 'VE': 'Venezuela',
306
+ 'VN': 'Viet Nam',
307
+ 'VG': 'Virgin Islands, British',
308
+ 'VI': 'Virgin Islands, U.S.',
309
+ 'WF': 'Wallis and Futuna',
310
+ 'EH': 'Western Sahara',
311
+ 'YE': 'Yemen',
312
+ 'ZM': 'Zambia',
313
+ 'ZW': 'Zimbabwe',
314
+ },
315
+ locales: {
316
+ "ar" : "Arabic",
317
+ "af" : "Afrikaans",
318
+ "am" : "Amharic",
319
+ "hy" : "Armenian",
320
+ "az" : "Azerbaijani",
321
+ "eu" : "Basque",
322
+ "bn" : "Bengali",
323
+ "bg" : "Bulgarian",
324
+ "ca" : "Catalan",
325
+ "zh-HK" : "Chinese (Hong Kong)",
326
+ "zh-CN" : "Chinese (Simplified)",
327
+ "zh-TW" : "Chinese (Traditional)",
328
+ "hr" : "Croatian",
329
+ "cs" : "Czech",
330
+ "da" : "Danish",
331
+ "nl" : "Dutch",
332
+ "en-GB" : "English (UK)",
333
+ "en" : "English (US)",
334
+ "et" : "Estonian",
335
+ "fil" : "Filipino",
336
+ "fi" : "Finnish",
337
+ "fr" : "French",
338
+ "fr-CA" : "French (Canadian)",
339
+ "gl" : "Galician",
340
+ "ka" : "Georgian",
341
+ "de" : "German",
342
+ "de-AT" : "German (Austria)",
343
+ "de-CH" : "German (Switzerland)",
344
+ "el" : "Greek",
345
+ "gu" : "Gujarati",
346
+ "iw" : "Hebrew",
347
+ "hi" : "Hindi",
348
+ "hu" : "Hungarain",
349
+ "is" : "Icelandic",
350
+ "id" : "Indonesian",
351
+ "it" : "Italian",
352
+ "ja" : "Japanese",
353
+ "kn" : "Kannada",
354
+ "ko" : "Korean",
355
+ "lo" : "Laothian",
356
+ "lv" : "Latvian",
357
+ "lt" : "Lithuanian",
358
+ "ms" : "Malay",
359
+ "ml" : "Malayalam",
360
+ "mr" : "Marathi",
361
+ "mn" : "Mongolian",
362
+ "no" : "Norwegian",
363
+ "fa" : "Persian",
364
+ "pl" : "Polish",
365
+ "pt" : "Portuguese",
366
+ "pt-BR" : "Portuguese (Brazil)",
367
+ "pt-PT" : "Portuguese (Portugal)",
368
+ "ro" : "Romanian",
369
+ "ru" : "Russian",
370
+ "sr" : "Serbian",
371
+ "si" : "Sinhalese",
372
+ "sk" : "Slovak",
373
+ "sl" : "Slovenian",
374
+ "es" : "Spanish",
375
+ "es-419" : "Spanish (Latin America)",
376
+ "sw" : "Swahili",
377
+ "sv" : "Swedish",
378
+ "ta" : "Tamil",
379
+ "te" : "Telugu",
380
+ "th" : "Thai",
381
+ "tr" : "Turkish",
382
+ "uk" : "Ukrainian",
383
+ "ur" : "Urdu",
384
+ "vi" : "Vietnamese",
385
+ "zu" : "Zulu"
386
+ },
387
+ settings_url: 'wp-admin/admin.php?page=yikes-inc-easy-mailchimp-settings'
388
+ }
389
+
390
+ export default constants;
blocks/components/enable-submit-button-editing.js CHANGED
@@ -1,17 +1,17 @@
1
- ( function( $ ) {
2
-
3
- $( document ).ready( function() {
4
-
5
- $( 'body' ).on( 'click', '.yikes-easy-mc-submit-button', function( event ) {
6
- event.preventDefault();
7
- event.stopPropagation();
8
- $( '.yikes-mailchimp-submit-button-span-text' ).focus();
9
- });
10
-
11
- $( 'body' ).on( 'click', '.yikes-mailchimp-submit-button-span-text', function( event ) {
12
- event.preventDefault();
13
- event.stopPropagation();
14
- });
15
- });
16
-
17
  })( jQuery );
1
+ ( function( $ ) {
2
+
3
+ $( document ).ready( function() {
4
+
5
+ $( 'body' ).on( 'click', '.yikes-easy-mc-submit-button', function( event ) {
6
+ event.preventDefault();
7
+ event.stopPropagation();
8
+ $( '.yikes-mailchimp-submit-button-span-text' ).focus();
9
+ });
10
+
11
+ $( 'body' ).on( 'click', '.yikes-mailchimp-submit-button-span-text', function( event ) {
12
+ event.preventDefault();
13
+ event.stopPropagation();
14
+ });
15
+ });
16
+
17
  })( jQuery );
blocks/components/slugify.js CHANGED
@@ -1,19 +1,19 @@
1
- /*
2
- * This should have the same effect as WP/PHP's `sanitize_title()` function
3
- *
4
- * Source: https://gist.github.com/mathewbyrne/1280286
5
- */
6
- export default function slugify( text ) {
7
-
8
- // Use hash map for special characters
9
- let specialChars = {"à":'a',"ä":'a',"á":'a',"â":'a',"æ":'a',"å":'a',"ë":'e',"è":'e',"é":'e', "ê":'e',"î":'i',"ï":'i',"ì":'i',"í":'i',"ò":'o',"ó":'o',"ö":'o',"ô":'o',"ø":'o',"ù":'o',"ú":'u',"ü":'u',"û":'u',"ñ":'n',"ç":'c',"ß":'s',"ÿ":'y',"œ":'o',"ŕ":'r',"ś":'s',"ń":'n',"ṕ":'p',"ẃ":'w',"ǵ":'g',"ǹ":'n',"ḿ":'m',"ǘ":'u',"ẍ":'x',"ź":'z',"ḧ":'h',"·":'-',"/":'-',"_":'-',",":'-',":":'-',";":'-'};
10
-
11
- return text.toString().toLowerCase()
12
- .replace(/\s+/g, '-') // Replace spaces with -
13
- .replace(/./g,(target, index, str) => specialChars[target] || target) // Replace special characters using the hash map
14
- .replace(/&/g, '-and-') // Replace & with 'and'
15
- .replace(/[^\w\-]+/g, '') // Remove all non-word chars
16
- .replace(/\-\-+/g, '-') // Replace multiple - with single -
17
- .replace(/^-+/, '') // Trim - from start of text
18
- .replace(/-+$/, ''); // Trim - from end of text
19
- };
1
+ /*
2
+ * This should have the same effect as WP/PHP's `sanitize_title()` function
3
+ *
4
+ * Source: https://gist.github.com/mathewbyrne/1280286
5
+ */
6
+ export default function slugify( text ) {
7
+
8
+ // Use hash map for special characters
9
+ let specialChars = {"à":'a',"ä":'a',"á":'a',"â":'a',"æ":'a',"å":'a',"ë":'e',"è":'e',"é":'e', "ê":'e',"î":'i',"ï":'i',"ì":'i',"í":'i',"ò":'o',"ó":'o',"ö":'o',"ô":'o',"ø":'o',"ù":'o',"ú":'u',"ü":'u',"û":'u',"ñ":'n',"ç":'c',"ß":'s',"ÿ":'y',"œ":'o',"ŕ":'r',"ś":'s',"ń":'n',"ṕ":'p',"ẃ":'w',"ǵ":'g',"ǹ":'n',"ḿ":'m',"ǘ":'u',"ẍ":'x',"ź":'z',"ḧ":'h',"·":'-',"/":'-',"_":'-',",":'-',":":'-',";":'-'};
10
+
11
+ return text.toString().toLowerCase()
12
+ .replace(/\s+/g, '-') // Replace spaces with -
13
+ .replace(/./g,(target, index, str) => specialChars[target] || target) // Replace special characters using the hash map
14
+ .replace(/&/g, '-and-') // Replace & with 'and'
15
+ .replace(/[^\w\-]+/g, '') // Remove all non-word chars
16
+ .replace(/\-\-+/g, '-') // Replace multiple - with single -
17
+ .replace(/^-+/, '') // Trim - from start of text
18
+ .replace(/-+$/, ''); // Trim - from end of text
19
+ };
blocks/easy-forms-block/dev-easy-forms-block.js CHANGED
@@ -1,219 +1,219 @@
1
- import EasyFormsAPI from '../components/api.js'
2
-
3
- import MailchimpForms from '../components/class.MailchimpForms.js';
4
-
5
- import './easy-forms-block.scss'
6
-
7
- require( '../components/enable-submit-button-editing.js' );
8
-
9
- // Get just the __() localization function from wp.i18n
10
- const { __ } = wp.i18n;
11
-
12
- // Get registerBlockType and other methods from wp.blocks
13
- const { registerBlockType } = wp.blocks;
14
-
15
- const edit_easy_form = function( props ) {
16
-
17
- const onChangeForm = ( event ) => {
18
- props.setAttributes( { form_id: event.target.value } );
19
-
20
- if ( event.target.value.length > 0 ) {
21
- const api = new EasyFormsAPI();
22
- api.get_form( event.target.value ).then( function( form ) {
23
- props.setAttributes( { form: form.data } );
24
- props.setAttributes( { form_description: form.data.form_description } );
25
- props.setAttributes( { form_title: form.data.form_name } );
26
- props.setAttributes( { is_ajax: form.data.submission_settings.ajax === '1' } );
27
- props.setAttributes( { submit_button_text: form.data.form_settings['yikes-easy-mc-submit-button-text'] } );
28
- });
29
- }
30
- };
31
-
32
- const onChangeDescription = ( value ) => {
33
- props.setAttributes( { form_description: value } );
34
- };
35
-
36
- const toggleShowDescription = ( event ) => {
37
- props.setAttributes( { show_description: !! event.target.checked } );
38
- }
39
-
40
- const toggleInline = ( event ) => {
41
- props.setAttributes( { inline: !! event.target.checked } );
42
- }
43
-
44
- const toggleShowTitle = ( event ) => {
45
- props.setAttributes( { show_title: !! event.target.checked } );
46
- }
47
-
48
- const toggleFormTitle = ( value ) => {
49
- props.setAttributes( { form_title: value } );
50
- }
51
-
52
- const toggleIsAjax = ( event ) => {
53
- props.setAttributes( { is_ajax: !! event.target.checked } );
54
- }
55
-
56
- /* Allow this function to be called via a checkbox handler or directly by passing in a boolean */
57
- const toggleRecaptchaAbstract = ( checked ) => {
58
- props.setAttributes( { recaptcha: checked } );
59
- }
60
-
61
- const toggleRecaptcha = ( event ) => {
62
- toggleRecaptchaAbstract( !! event.target.checked )
63
- }
64
-
65
- const toggleRecaptchaTheme = ( value ) => {
66
- props.setAttributes( { recaptcha_theme: value } );
67
- }
68
-
69
- const toggleRecaptchaLang = ( value ) => {
70
- props.setAttributes( { recaptcha_lang: value } );
71
- }
72
-
73
- const toggleRecaptchaType = ( value ) => {
74
- props.setAttributes( { recaptcha_type: value } );
75
- }
76
-
77
- const toggleRecaptchaSize = ( value ) => {
78
- props.setAttributes( { recaptcha_size: value } );
79
- }
80
-
81
- const toggleRecaptchaVerifyCallback = ( value ) => {
82
- props.setAttributes( { recaptcha_verify_callback: value } );
83
- }
84
-
85
- const toggleRecaptchaExpiredCallback = ( value ) => {
86
- props.setAttributes( { recaptcha_expired_callback: value } );
87
- }
88
-
89
- const toggleSubmitButtonText = ( value ) => {
90
- props.setAttributes( { submit_button_text: value })
91
- }
92
-
93
- return (
94
- <MailchimpForms
95
- className={ props.className }
96
- onChangeForm={ onChangeForm }
97
- formID={ props.attributes.form_id }
98
- formData={ props.attributes.form }
99
- onChangeDescription={ onChangeDescription }
100
- descriptionValue={ props.attributes.form_description }
101
- showDescription={ props.attributes.show_description }
102
- toggleShowDescription={ toggleShowDescription }
103
- focus={ !! props.isSelected }
104
- inline={ props.attributes.inline }
105
- toggleInline={ toggleInline }
106
- formTitle={ props.attributes.form_title }
107
- toggleFormTitle={ toggleFormTitle }
108
- showTitle={ props.attributes.show_title }
109
- toggleShowTitle={ toggleShowTitle }
110
- isAjax={ props.attributes.is_ajax }
111
- toggleIsAjax={ toggleIsAjax }
112
- toggleRecaptchaAbstract={ toggleRecaptchaAbstract }
113
- recaptcha={ props.attributes.recaptcha }
114
- toggleRecaptcha={ toggleRecaptcha }
115
- recaptchaTheme={ props.attributes.recaptcha_theme }
116
- toggleRecaptchaTheme={ toggleRecaptchaTheme }
117
- recaptchaLang={ props.attributes.recaptcha_lang }
118
- toggleRecaptchaLang={ toggleRecaptchaLang }
119
- recaptchaType={ props.attributes.recaptcha_type }
120
- toggleRecaptchaType={ toggleRecaptchaType }
121
- recaptchaSize={ props.attributes.recaptcha_size }
122
- toggleRecaptchaSize={ toggleRecaptchaSize }
123
- recaptchaVerifyCallback={ props.attributes.recaptcha_verify_callback }
124
- toggleRecaptchaVerifyCallback={ toggleRecaptchaVerifyCallback }
125
- recaptchaExpiredCallback={ props.attributes.recaptcha_expired_callback }
126
- toggleRecaptchaExpiredCallback={ toggleRecaptchaExpiredCallback }
127
- submitButtonText={ props.attributes.submit_button_text }
128
- toggleSubmitButtonText={ toggleSubmitButtonText }
129
- />
130
- );
131
-
132
- }
133
-
134
- const save_easy_form = function( props ) {
135
- return null;
136
- }
137
-
138
- const settings = {
139
- title : __( 'Easy Forms for Mailchimp' ),
140
- category : 'common', // Options include "common", "formatting", "layout", "widgets" and "embed."
141
- icon : 'email-alt',
142
- keywords : ['mailchimp', 'easy forms for mailchimp', 'yikes'],
143
- attributes: {
144
- form_id: {
145
- type: 'string',
146
- default: ''
147
- },
148
- form: {
149
- type: 'object'
150
- },
151
- form_description: {
152
- type: 'string',
153
- default: ''
154
- },
155
- show_description: {
156
- type: 'boolean',
157
- default: false
158
- },
159
- inline: {
160
- type: 'boolean',
161
- default: false
162
- },
163
- show_title: {
164
- type: 'boolean',
165
- default: false
166
- },
167
- form_title: {
168
- type: 'string',
169
- default: ''
170
- },
171
- is_ajax: {
172
- type: 'boolean',
173
- default: true,
174
- },
175
- recaptcha: {
176
- type: 'boolean',
177
- default: false,
178
- },
179
- recaptcha_theme: {
180
- type: 'string',
181
- default: 'light'
182
- },
183
- recaptcha_lang: {
184
- type: 'string',
185
- default: ''
186
- },
187
- recaptcha_type: {
188
- type: 'string',
189
- default: 'image'
190
- },
191
- recaptcha_size: {
192
- type: 'string',
193
- default: 'normal'
194
- },
195
- recaptcha_verify_callback: {
196
- type: 'string',
197
- default: ''
198
- },
199
- recaptcha_expired_callback: {
200
- type: 'string',
201
- default: ''
202
- },
203
- submit_button_text: {
204
- type: 'string',
205
- default: ''
206
- }
207
- },
208
- edit: edit_easy_form,
209
- save: save_easy_form,
210
- }
211
-
212
- const EasyFormsBlock = registerBlockType(
213
-
214
- // Name
215
- ez_forms_gb_data.block_namespace + ez_forms_gb_data.block_name,
216
-
217
- // Settings
218
- settings
219
  );
1
+ import EasyFormsAPI from '../components/api.js'
2
+
3
+ import MailchimpForms from '../components/class.MailchimpForms.js';
4
+
5
+ import './easy-forms-block.scss'
6
+
7
+ require( '../components/enable-submit-button-editing.js' );
8
+
9
+ // Get just the __() localization function from wp.i18n
10
+ const { __ } = wp.i18n;
11
+
12
+ // Get registerBlockType and other methods from wp.blocks
13
+ const { registerBlockType } = wp.blocks;
14
+
15
+ const edit_easy_form = function( props ) {
16
+
17
+ const onChangeForm = ( event ) => {
18
+ props.setAttributes( { form_id: event.target.value } );
19
+
20
+ if ( event.target.value.length > 0 ) {
21
+ const api = new EasyFormsAPI();
22
+ api.get_form( event.target.value ).then( function( form ) {
23
+ props.setAttributes( { form: form.data } );
24
+ props.setAttributes( { form_description: form.data.form_description } );
25
+ props.setAttributes( { form_title: form.data.form_name } );
26
+ props.setAttributes( { is_ajax: form.data.submission_settings.ajax === '1' } );
27
+ props.setAttributes( { submit_button_text: form.data.form_settings['yikes-easy-mc-submit-button-text'] } );
28
+ });
29
+ }
30
+ };
31
+
32
+ const onChangeDescription = ( value ) => {
33
+ props.setAttributes( { form_description: value } );
34
+ };
35
+
36
+ const toggleShowDescription = ( event ) => {
37
+ props.setAttributes( { show_description: !! event.target.checked } );
38
+ }
39
+
40
+ const toggleInline = ( event ) => {
41
+ props.setAttributes( { inline: !! event.target.checked } );
42
+ }
43
+
44
+ const toggleShowTitle = ( event ) => {
45
+ props.setAttributes( { show_title: !! event.target.checked } );
46
+ }
47
+
48
+ const toggleFormTitle = ( value ) => {
49
+ props.setAttributes( { form_title: value } );
50
+ }
51
+
52
+ const toggleIsAjax = ( event ) => {
53
+ props.setAttributes( { is_ajax: !! event.target.checked } );
54
+ }
55
+
56
+ /* Allow this function to be called via a checkbox handler or directly by passing in a boolean */
57
+ const toggleRecaptchaAbstract = ( checked ) => {
58
+ props.setAttributes( { recaptcha: checked } );
59
+ }
60
+
61
+ const toggleRecaptcha = ( event ) => {
62
+ toggleRecaptchaAbstract( !! event.target.checked )
63
+ }
64
+
65
+ const toggleRecaptchaTheme = ( value ) => {
66
+ props.setAttributes( { recaptcha_theme: value } );
67
+ }
68
+
69
+ const toggleRecaptchaLang = ( value ) => {
70
+ props.setAttributes( { recaptcha_lang: value } );
71
+ }
72
+
73
+ const toggleRecaptchaType = ( value ) => {
74
+ props.setAttributes( { recaptcha_type: value } );
75
+ }
76
+
77
+ const toggleRecaptchaSize = ( value ) => {
78
+ props.setAttributes( { recaptcha_size: value } );
79
+ }
80
+
81
+ const toggleRecaptchaVerifyCallback = ( value ) => {
82
+ props.setAttributes( { recaptcha_verify_callback: value } );
83
+ }
84
+
85
+ const toggleRecaptchaExpiredCallback = ( value ) => {
86
+ props.setAttributes( { recaptcha_expired_callback: value } );
87
+ }
88
+
89
+ const toggleSubmitButtonText = ( value ) => {
90
+ props.setAttributes( { submit_button_text: value })
91
+ }
92
+
93
+ return (
94
+ <MailchimpForms
95
+ className={ props.className }
96
+ onChangeForm={ onChangeForm }
97
+ formID={ props.attributes.form_id }
98
+ formData={ props.attributes.form }
99
+ onChangeDescription={ onChangeDescription }
100
+ descriptionValue={ props.attributes.form_description }
101
+ showDescription={ props.attributes.show_description }
102
+ toggleShowDescription={ toggleShowDescription }
103
+ focus={ !! props.isSelected }
104
+ inline={ props.attributes.inline }
105
+ toggleInline={ toggleInline }
106
+ formTitle={ props.attributes.form_title }
107
+ toggleFormTitle={ toggleFormTitle }
108
+ showTitle={ props.attributes.show_title }
109
+ toggleShowTitle={ toggleShowTitle }
110
+ isAjax={ props.attributes.is_ajax }
111
+ toggleIsAjax={ toggleIsAjax }
112
+ toggleRecaptchaAbstract={ toggleRecaptchaAbstract }
113
+ recaptcha={ props.attributes.recaptcha }
114
+ toggleRecaptcha={ toggleRecaptcha }
115
+ recaptchaTheme={ props.attributes.recaptcha_theme }
116
+ toggleRecaptchaTheme={ toggleRecaptchaTheme }
117
+ recaptchaLang={ props.attributes.recaptcha_lang }
118
+ toggleRecaptchaLang={ toggleRecaptchaLang }
119
+ recaptchaType={ props.attributes.recaptcha_type }
120
+ toggleRecaptchaType={ toggleRecaptchaType }
121
+ recaptchaSize={ props.attributes.recaptcha_size }
122
+ toggleRecaptchaSize={ toggleRecaptchaSize }
123
+ recaptchaVerifyCallback={ props.attributes.recaptcha_verify_callback }
124
+ toggleRecaptchaVerifyCallback={ toggleRecaptchaVerifyCallback }
125
+ recaptchaExpiredCallback={ props.attributes.recaptcha_expired_callback }
126
+ toggleRecaptchaExpiredCallback={ toggleRecaptchaExpiredCallback }
127
+ submitButtonText={ props.attributes.submit_button_text }
128
+ toggleSubmitButtonText={ toggleSubmitButtonText }
129
+ />
130
+ );
131
+
132
+ }
133
+
134
+ const save_easy_form = function( props ) {
135
+ return null;
136
+ }
137
+
138
+ const settings = {
139
+ title : __( 'Easy Forms for Mailchimp' ),
140
+ category : 'common', // Options include "common", "formatting", "layout", "widgets" and "embed."
141
+ icon : 'email-alt',
142
+ keywords : ['mailchimp', 'easy forms for mailchimp', 'yikes'],
143
+ attributes: {
144
+ form_id: {
145
+ type: 'string',
146
+ default: ''
147
+ },
148
+ form: {
149
+ type: 'object'
150
+ },
151
+ form_description: {
152
+ type: 'string',
153
+ default: ''
154
+ },
155
+ show_description: {
156
+ type: 'boolean',
157
+ default: false
158
+ },
159
+ inline: {
160
+ type: 'boolean',
161
+ default: false
162
+ },
163
+ show_title: {
164
+ type: 'boolean',
165
+ default: false
166
+ },
167
+ form_title: {
168
+ type: 'string',
169
+ default: ''
170
+ },
171
+ is_ajax: {
172
+ type: 'boolean',
173
+ default: true,
174
+ },
175
+ recaptcha: {
176
+ type: 'boolean',
177
+ default: false,
178
+ },
179
+ recaptcha_theme: {
180
+ type: 'string',
181
+ default: 'light'
182
+ },
183
+ recaptcha_lang: {
184
+ type: 'string',
185
+ default: ''
186
+ },
187
+ recaptcha_type: {
188
+ type: 'string',
189
+ default: 'image'
190
+ },
191
+ recaptcha_size: {
192
+ type: 'string',
193
+ default: 'normal'
194
+ },
195
+ recaptcha_verify_callback: {
196
+ type: 'string',
197
+ default: ''
198
+ },
199
+ recaptcha_expired_callback: {
200
+ type: 'string',
201
+ default: ''
202
+ },
203
+ submit_button_text: {
204
+ type: 'string',
205
+ default: ''
206
+ }
207
+ },
208
+ edit: edit_easy_form,
209
+ save: save_easy_form,
210
+ }
211
+
212
+ const EasyFormsBlock = registerBlockType(
213
+
214
+ // Name
215
+ ez_forms_gb_data.block_namespace + ez_forms_gb_data.block_name,
216
+
217
+ // Settings
218
+ settings
219
  );
blocks/easy-forms-block/easy-forms-block.js CHANGED
@@ -260,8 +260,8 @@ var MailchimpForms = function (_Component) {
260
  return _this;
261
  }
262
 
263
- /**
264
- * Run our API calls after the component has mounted. You can't use setState before a component is mounted.
265
  */
266
 
267
 
@@ -806,7 +806,7 @@ var MailchimpForms = function (_Component) {
806
  key: field.group_id + '-' + ii + '-input-key',
807
  value: key,
808
  onChange: _this5.handleFormFieldChanges,
809
- checked: field.default_choice.indexOf(key) !== -1
810
  }),
811
  choice
812
  );
@@ -1595,10 +1595,10 @@ Object.defineProperty(exports, "__esModule", {
1595
  value: true
1596
  });
1597
  exports.default = slugify;
1598
- /*
1599
- * This should have the same effect as WP/PHP's `sanitize_title()` function
1600
- *
1601
- * Source: https://gist.github.com/mathewbyrne/1280286
1602
  */
1603
  function slugify(text) {
1604
 
260
  return _this;
261
  }
262
 
263
+ /**
264
+ * Run our API calls after the component has mounted. You can't use setState before a component is mounted.
265
  */
266
 
267
 
806
  key: field.group_id + '-' + ii + '-input-key',
807
  value: key,
808
  onChange: _this5.handleFormFieldChanges,
809
+ checked: field.default_choice && field.default_choice.indexOf(key) !== -1
810
  }),
811
  choice
812
  );
1595
  value: true
1596
  });
1597
  exports.default = slugify;
1598
+ /*
1599
+ * This should have the same effect as WP/PHP's `sanitize_title()` function
1600
+ *
1601
+ * Source: https://gist.github.com/mathewbyrne/1280286
1602
  */
1603
  function slugify(text) {
1604
 
blocks/easy-forms-block/easy-forms-block.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./blocks/components/api.js","webpack:///./blocks/components/class.MailchimpForms.js","webpack:///./blocks/components/constants.js","webpack:///./blocks/components/enable-submit-button-editing.js","webpack:///./blocks/components/slugify.js","webpack:///./blocks/easy-forms-block/dev-easy-forms-block.js","webpack:///./blocks/easy-forms-block/easy-forms-block.scss?e701","webpack:///./blocks/index.js","webpack:///./node_modules/classnames/index.js","webpack:///./blocks/easy-forms-block/easy-forms-block.scss","webpack:///./node_modules/css-loader/lib/css-base.js","webpack:///./node_modules/object-assign/index.js","webpack:///./node_modules/prop-types/checkPropTypes.js","webpack:///./node_modules/prop-types/lib/ReactPropTypesSecret.js","webpack:///./node_modules/react-recaptcha/dist/react-recaptcha.js","webpack:///./node_modules/react/cjs/react.development.js","webpack:///./node_modules/react/index.js","webpack:///./node_modules/style-loader/lib/addStyles.js","webpack:///./node_modules/style-loader/lib/urls.js","webpack:///(webpack)/buildin/amd-options.js","webpack:///(webpack)/buildin/module.js"],"names":["EasyFormsAPI","ajaxurl","window","data","action","nonce","ez_forms_gb_data","get_api_key_status","status","$","post","fetch_recaptcha_nonce","recaptcha_data","fetch_forms_nonce","forms","form_id","fetch_form_nonce","form","Recaptcha","require","__","wp","i18n","registerBlockType","blocks","editor","RichText","InspectorControls","PlainText","components","Spinner","TextControl","PanelBody","PanelRow","FormToggle","SelectControl","Component","element","MailchimpForms","props","arguments","state","api_key_status","success","api","address_fields","then","setState","get_forms","forms_loaded","get_recaptcha","toggleRecaptchaAbstract","event","inline","toggleInline","show_form_title","showTitle","toggleShowTitle","show_form_description","showDescription","toggleShowDescription","is_ajax","isAjax","toggleIsAjax","recaptcha","toggleRecaptcha","recaptcha_type","recaptchaType","value","label","toggleRecaptchaType","recaptcha_theme","recaptchaTheme","toggleRecaptchaTheme","recaptcha_lang","locales","locale","recaptchaLang","length","toggleRecaptchaLang","Object","keys","map","key","recaptcha_size","recaptchaSize","toggleRecaptchaSize","recaptcha_verify_callback","recaptchaVerifyCallback","toggleRecaptchaVerifyCallback","recaptcha_expired_callback","recaptchaExpiredCallback","toggleRecaptchaExpiredCallback","inspector_controls","formID","onChangeForm","id","form_name","focus","formTitle","toggleFormTitle","descriptionValue","formData","form_description","onChangeDescription","addr_field","field","merge","handleFormFieldChanges","type","placeholder","states","choice","countries","JSON","parse","choices","default_choice","ii","parseInt","default","date_format","toLowerCase","cn","groups","group_id","indexOf","fields","desc","description","classes","description_above","hide","get_address_field","get_dropdown_field","get_radio_field","get_url_field","get_date_field","get_default_field","get_radio_interest_group","get_hidden_interest_group","get_checkboxes_interest_group","get_dropdown_interest_group","site_key","Math","random","toString","slice","form_settings","submitButtonText","toggleSubmitButtonText","form_title","get_form","form_fields","form_recaptcha","submit_button","className","forms_dropdown","get_form_section","settings_url","constants","document","ready","on","preventDefault","stopPropagation","jQuery","slugify","text","specialChars","replace","target","index","str","edit_easy_form","setAttributes","submission_settings","ajax","submit_button_text","show_description","checked","show_title","attributes","isSelected","save_easy_form","settings","title","category","icon","keywords","edit","save","EasyFormsBlock","block_namespace","block_name","hasOwn","hasOwnProperty","classNames","i","arg","argType","push","Array","isArray","inner","apply","call","join","module","exports","define","useSourceMap","list","item","content","cssWithMappingToString","modules","mediaQuery","alreadyImportedModules","cssMapping","btoa","sourceMapping","toComment","sourceURLs","sources","source","sourceRoot","concat","sourceMap","base64","unescape","encodeURIComponent","stringify","getOwnPropertySymbols","prototype","propIsEnumerable","propertyIsEnumerable","toObject","val","undefined","TypeError","shouldUseNative","assign","test1","String","getOwnPropertyNames","test2","fromCharCode","order2","n","test3","split","forEach","letter","err","from","to","symbols","s","printWarning","process","ReactPropTypesSecret","loggedTypeFailures","message","console","error","Error","x","checkPropTypes","typeSpecs","values","location","componentName","getStack","typeSpecName","name","ex","stack","e","t","r","a","loaded","m","c","p","__esModule","o","ReferenceError","create","constructor","enumerable","writable","configurable","setPrototypeOf","__proto__","defineProperty","l","u","d","string","onloadCallbackName","elementID","onloadCallback","func","verifyCallback","expiredCallback","render","oneOf","sitekey","theme","verifyCallbackName","expiredCallbackName","size","tabindex","hl","badge","f","h","grecaptcha","y","b","getPrototypeOf","_renderGrecaptcha","bind","reset","widget","setInterval","_updateReadyState","clearInterval","execute","callback","createElement","propTypes","defaultProps","thatReturns","thatReturnsFalse","thatReturnsTrue","thatReturnsNull","thatReturnsThis","thatReturnsArgument","framesToPop","isRequired","array","bool","number","object","symbol","any","arrayOf","instanceOf","node","objectOf","oneOfType","shape","PropTypes","_assign","ReactVersion","hasSymbol","Symbol","for","REACT_ELEMENT_TYPE","REACT_PORTAL_TYPE","REACT_FRAGMENT_TYPE","REACT_STRICT_MODE_TYPE","REACT_PROFILER_TYPE","REACT_PROVIDER_TYPE","REACT_CONTEXT_TYPE","REACT_CONCURRENT_MODE_TYPE","REACT_FORWARD_REF_TYPE","REACT_SUSPENSE_TYPE","REACT_MEMO_TYPE","REACT_LAZY_TYPE","MAYBE_ITERATOR_SYMBOL","iterator","FAUX_ITERATOR_SYMBOL","getIteratorFn","maybeIterable","maybeIterator","validateFormat","format","invariant","condition","args","argIndex","lowPriorityWarning","_len","_key","warn","_len2","_key2","lowPriorityWarning$1","warningWithoutStack","_args$map","g","_message","warningWithoutStack$1","didWarnStateUpdateForUnmountedComponent","warnNoop","publicInstance","callerName","_constructor","displayName","warningKey","ReactNoopUpdateQueue","isMounted","enqueueForceUpdate","enqueueReplaceState","completeState","enqueueSetState","partialState","emptyObject","freeze","context","updater","refs","isReactComponent","forceUpdate","deprecatedAPIs","replaceState","defineDeprecationWarning","methodName","info","get","fnName","ComponentDummy","PureComponent","pureComponentPrototype","isPureReactComponent","createRef","refObject","current","seal","ReactCurrentOwner","currentDispatcher","BEFORE_SLASH_RE","describeComponentFrame","ownerName","sourceInfo","path","fileName","test","match","pathBeforeSlash","folderName","lineNumber","Resolved","refineResolvedLazyComponent","lazyComponent","_status","_result","getWrappedName","outerType","innerType","wrapperName","functionName","getComponentName","tag","$$typeof","thenable","resolvedThenable","ReactDebugCurrentFrame","currentlyValidatingElement","setCurrentlyValidatingElement","getCurrentStack","getStackAddendum","owner","_owner","_source","impl","ReactSharedInternals","ReactComponentTreeHook","warning","warning$1","RESERVED_PROPS","ref","__self","__source","specialPropKeyWarningShown","specialPropRefWarningShown","hasValidRef","config","getter","getOwnPropertyDescriptor","isReactWarning","hasValidKey","defineKeyPropWarningGetter","warnAboutAccessingKey","defineRefPropWarningGetter","warnAboutAccessingRef","ReactElement","self","_store","children","propName","childrenLength","childArray","cloneAndReplaceKey","oldElement","newKey","newElement","_self","cloneElement","isValidElement","SEPARATOR","SUBSEPARATOR","escape","escapeRegex","escaperLookup","escapedString","didWarnAboutMaps","userProvidedKeyEscapeRegex","escapeUserProvidedKey","POOL_SIZE","traverseContextPool","getPooledTraverseContext","mapResult","keyPrefix","mapFunction","mapContext","traverseContext","pop","result","count","releaseTraverseContext","traverseAllChildrenImpl","nameSoFar","invokeCallback","getComponentKey","child","nextName","subtreeCount","nextNamePrefix","iteratorFn","entries","step","next","done","addendum","childrenString","traverseAllChildren","component","forEachSingleChild","bookKeeping","forEachChildren","forEachFunc","forEachContext","mapSingleChildIntoContext","childKey","mappedChild","mapIntoWithKeyPrefixInternal","prefix","escapedPrefix","mapChildren","countChildren","toArray","onlyChild","createContext","defaultValue","calculateChangedBits","_calculateChangedBits","_currentValue","_currentValue2","Provider","Consumer","_context","hasWarnedAboutUsingNestedContextConsumers","hasWarnedAboutUsingConsumerProvider","defineProperties","set","_Provider","_currentRenderer","_currentRenderer2","lazy","ctor","_ctor","forwardRef","isValidElementType","memo","compare","propTypesMisspellWarningShown","getDeclarationErrorAddendum","getSourceInfoErrorAddendum","elementProps","ownerHasKeyUseWarning","getCurrentComponentErrorInfo","parentType","parentName","validateExplicitKey","validated","currentComponentErrorInfo","childOwner","validateChildKeys","validatePropTypes","getDefaultProps","isReactClassApproved","validateFragmentProps","fragment","createElementWithValidation","validType","typeString","createFactoryWithValidation","validatedFactory","cloneElementWithValidation","React","Children","only","Fragment","StrictMode","unstable_ConcurrentMode","Suspense","unstable_Profiler","createFactory","version","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","React$2","React$3","react","css","baseUrl","protocol","host","currentDir","pathname","fixedCss","fullMatch","origUrl","unquotedOrigUrl","trim","$1","newUrl","webpackPolyfill","deprecate","paths"],"mappings":";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;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;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA,EAAE;AACF;AACA,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;;AAEA;AACA;AACA,EAAE;AACF;AACA;;AAEA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,EAAE;AACF;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uDAAuD;AACvD;;AAEA,6BAA6B,mBAAmB;;AAEhD;;AAEA;;AAEA;AACA;;;;;;;;;;;;;;;ACtXA;;;;;;;;;;;;;AAaA6L,OAAOC,OAAP,GAAiB,UAAUyZ,GAAV,EAAe;AAC9B;AACA,KAAI3V,WAAW,OAAO7Q,MAAP,KAAkB,WAAlB,IAAiCA,OAAO6Q,QAAvD;;AAEA,KAAI,CAACA,QAAL,EAAe;AACb,QAAM,IAAIL,KAAJ,CAAU,kCAAV,C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AP;AACA,CA1ED,C;;;;;;;;;;;ACdA;AACA;;;;;;;;;;;;;;;;ACDAha,OAAOC,OAAP,GAAiB,UAASD,MAAT,EAAiB;AACjC,KAAI,CAACA,OAAOua,eAAZ,EAA6B;AAC5Bva,SAAOwa,SAAP,GAAmB,YAAW,CAAE,CAAhC;AACAxa,SAAOya,KAAP,GAAe,EAAf;AACA;AACA,MAAI,CAACza,OAAO6R,QAAZ,EAAsB7R,OAAO6R,QAAP,GAAkB,EAAlB;AACtB7Z,SAAOwN,cAAP,CAAsBxF,MAAtB,EAA8B,QAA9B,EAAwC;AACvCmF,eAAY,IAD2B;AAEvCoI,QAAK,eAAW;AACf,WAAOvN,OAAOyF,CAAd;AACA;AAJsC,GAAxC;AAMAzN,SAAOwN,cAAP,CAAsBxF,MAAtB,EAA8B,IAA9B,EAAoC;AACnCmF,eAAY,IADuB;AAEnCoI,QAAK,eAAW;AACf,WAAOvN,OAAOV,CAAd;AACA;AAJkC,GAApC;AAMAU,SAAOua,eAAP,GAAyB,CAAzB;AACA;AACD,QAAOva,MAAP;AACA,CArBD,C","file":"easy-forms-block.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./blocks/index.js\");\n","export default class EasyFormsAPI {\r\n\r\n\tconstructor() {\r\n\t\tthis.ajaxurl = window.ajaxurl;\r\n\t}\r\n\r\n\tget_api_key_status() {\r\n\t\tlet data = {\r\n\t\t\taction: 'yikes_get_api_key_status',\r\n\t\t\tnonce: ez_forms_gb_data.get_api_key_status,\r\n\t\t}\r\n\r\n\t\tlet status = $.post( this.ajaxurl, data );\r\n\r\n\t\treturn status;\r\n\t}\r\n\r\n\tget_recaptcha() {\r\n\t\tlet data = {\r\n\t\t\taction: 'yikes_get_recaptcha',\r\n\t\t\tnonce: ez_forms_gb_data.fetch_recaptcha_nonce\r\n\t\t}\r\n\r\n\t\tlet recaptcha_data = $.post( this.ajaxurl, data );\r\n\r\n\t\treturn recaptcha_data;\r\n\t}\r\n\r\n\tget_forms() {\r\n\t\tlet data = {\r\n\t\t\taction: 'yikes_get_forms',\r\n\t\t\tnonce: ez_forms_gb_data.fetch_forms_nonce,\r\n\t\t}\r\n\r\n\t\tlet forms = $.post( this.ajaxurl, data );\r\n\r\n\t\treturn forms;\r\n\t}\r\n\r\n\tget_form( form_id ) {\r\n\t\tlet data = {\r\n\t\t\taction: 'yikes_get_form',\r\n\t\t\tform_id: form_id,\r\n\t\t\tnonce: ez_forms_gb_data.fetch_form_nonce\r\n\t\t}\r\n\r\n\t\tlet form = $.post( this.ajaxurl, data );\r\n\r\n\t\treturn form;\r\n\t}\r\n}\r\n","// Import dependencies\r\nimport slugify from './slugify.js';\r\nimport constants from './constants.js';\r\nimport EasyFormsAPI from './api.js';\r\n\r\n// Get functions / blocks / components\r\nconst Recaptcha = require( 'react-recaptcha' );\r\nconst { __ } = wp.i18n;\r\nconst { registerBlockType } = wp.blocks;\r\nconst { RichText, InspectorControls, PlainText } = wp.editor;\r\nconst { Spinner, TextControl, PanelBody, PanelRow, FormToggle, SelectControl } = wp.components;\r\nconst { Component } = wp.element;\r\n\r\nexport default class MailchimpForms extends Component {\r\n constructor( props ) {\r\n super( ...arguments );\r\n this.state = {\r\n api_key_status: 'valid',\r\n forms : [],\r\n recaptcha_data: {\r\n data : {},\r\n success: false\r\n },\r\n 'forms_loaded': false\r\n }\r\n \r\n this.api = new EasyFormsAPI();\r\n\r\n this.address_fields = {\r\n 'addr1' : 'Address 1', \r\n 'addr2' : 'Address 2', \r\n 'city' : 'City', \r\n 'state' : 'State', \r\n 'zip' : 'Zip',\r\n 'country': 'Country'\r\n }\r\n }\r\n\r\n /**\r\n * Run our API calls after the component has mounted. You can't use setState before a component is mounted.\r\n */\r\n componentDidMount() {\r\n this.api.get_api_key_status().then( status => {\r\n this.setState( { api_key_status: status.data } );\r\n });\r\n\r\n this.api.get_forms().then( forms => {\r\n this.setState( { forms: forms.data, forms_loaded: true } );\r\n });\r\n\r\n this.api.get_recaptcha().then( recaptcha_data => {\r\n this.setState( { recaptcha_data: recaptcha_data } );\r\n this.props.toggleRecaptchaAbstract( this.state.recaptcha_data.success );\r\n });\r\n }\r\n\r\n handleFormFieldChanges( event ) {\r\n \t// console.log( event );\r\n \t\r\n \t// console.log( value );\r\n \t// console.log( this );\r\n \t// console.log( typeof this.setState );\r\n\r\n \t// const target = event.target;\r\n // const value = target.type === 'checkbox' ? target.checked : target.value;\r\n // const name = target.name;\r\n\r\n // return this.setState( { [name]: value } );\r\n }\r\n\r\n inspector_controls() {\r\n\r\n const inline = (\r\n <PanelRow>\r\n <label\r\n htmlFor=\"inline-form-toggle\"\r\n className=\"blocks-base-control__label\"\r\n >\r\n { __( 'Inline' ) }\r\n </label>\r\n <FormToggle\r\n id=\"inline-form-toggle\"\r\n label={ __( 'Inline' ) }\r\n checked={ !! this.props.inline }\r\n onChange={ this.props.toggleInline }\r\n />\r\n </PanelRow>\r\n )\r\n\r\n const show_form_title = (\r\n <PanelRow>\r\n <label\r\n htmlFor=\"show-title-form-toggle\"\r\n className=\"blocks-base-control__label\"\r\n >\r\n { __( 'Show Form Title' ) }\r\n </label>\r\n <FormToggle\r\n id=\"show-title-form-toggle\"\r\n label={ __( 'Show Form Title' ) }\r\n checked={ !! this.props.showTitle }\r\n onChange={ this.props.toggleShowTitle }\r\n />\r\n </PanelRow>\r\n )\r\n\r\n const show_form_description = (\r\n <PanelRow>\r\n <label\r\n htmlFor=\"show-description-form-toggle\"\r\n className=\"blocks-base-control__label\"\r\n >\r\n { __( 'Show Form Description' ) }\r\n </label>\r\n <FormToggle\r\n id=\"show-description-form-toggle\"\r\n label={ __( 'Show Form Description' ) }\r\n checked={ !! this.props.showDescription }\r\n onChange={ this.props.toggleShowDescription }\r\n />\r\n </PanelRow>\r\n )\r\n\r\n const is_ajax = (\r\n <PanelRow>\r\n <label\r\n htmlFor=\"is-ajax-form-toggle\"\r\n className=\"blocks-base-control__label\"\r\n >\r\n { __( 'AJAX Submissions' ) }\r\n </label>\r\n <FormToggle\r\n id=\"is-ajax-form-toggle\"\r\n label={ __( 'AJAX' ) }\r\n checked={ !! this.props.isAjax }\r\n onChange={ this.props.toggleIsAjax }\r\n />\r\n </PanelRow>\r\n )\r\n\r\n const recaptcha = (\r\n <PanelRow>\r\n <label\r\n htmlFor=\"recaptcha-form-toggle\"\r\n className=\"blocks-base-control__label\"\r\n >\r\n { __( 'reCAPTCHA' ) }\r\n </label>\r\n <FormToggle\r\n id=\"recaptcha-form-toggle\"\r\n label={ __( 'reCAPTCHA' ) }\r\n checked={ !! this.props.recaptcha }\r\n onChange={ this.props.toggleRecaptcha }\r\n />\r\n </PanelRow>\r\n )\r\n\r\n const recaptcha_type = !! this.props.recaptcha ?\r\n (\r\n <PanelRow>\r\n <label\r\n htmlFor=\"recaptcha-type-form-toggle\"\r\n className=\"blocks-base-control__label\"\r\n >\r\n { __( 'reCAPTCHA Type' ) }\r\n </label>\r\n <SelectControl\r\n value={ this.props.recaptchaType }\r\n options={ [ { value: 'image', label: 'Image' }, { value: 'audio', 'label': 'Audio' } ] }\r\n onChange={ this.props.toggleRecaptchaType }\r\n />\r\n </PanelRow>\r\n )\r\n : '';\r\n\r\n const recaptcha_theme = !! this.props.recaptcha ?\r\n (\r\n <PanelRow>\r\n <label\r\n htmlFor=\"recaptcha-theme-form-toggle\"\r\n className=\"blocks-base-control__label\"\r\n >\r\n { __( 'reCAPTCHA Theme' ) }\r\n </label>\r\n <SelectControl\r\n value={ this.props.recaptchaTheme }\r\n options={ [ { value: 'light', label: 'Light' }, {value: 'dark', 'label': 'Dark' } ] }\r\n onChange={ this.props.toggleRecaptchaTheme }\r\n />\r\n </PanelRow>\r\n )\r\n : '';\r\n\r\n const recaptcha_lang = !! this.props.recaptcha ?\r\n (\r\n <PanelRow>\r\n <label\r\n htmlFor=\"recaptcha-language-form-toggle\"\r\n className=\"blocks-base-control__label\"\r\n title={ this.state.recaptcha_data.data ? 'The default language for your locale is ' + constants.locales[ this.state.recaptcha_data.data.locale ] : '' }\r\n >\r\n { __( 'reCAPTCHA Language' ) }\r\n </label>\r\n <SelectControl\r\n id=\"recaptcha-language-form-toggle\"\r\n value={ this.props.recaptchaLang.length > 0 ? this.props.recaptchaLang : ( this.state.recaptcha_data.data ? this.state.recaptcha_data.data.locale : '' ) }\r\n onChange={ this.props.toggleRecaptchaLang }\r\n title={ this.state.recaptcha_data.data ? 'The default language for your locale is ' + constants.locales[ this.state.recaptcha_data.data.locale ] : '' }\r\n options={ Object.keys( constants.locales ).map( ( key ) => { return { value: key, label: constants.locales[key] } }) }\r\n />\r\n </PanelRow>\r\n )\r\n : '';\r\n\r\n const recaptcha_size = !! this.props.recaptcha ?\r\n (\r\n <PanelRow>\r\n <label\r\n htmlFor=\"recaptcha-size-form-toggle\"\r\n className=\"blocks-base-control__label\"\r\n >\r\n { __( 'reCAPTCHA Size' ) }\r\n </label>\r\n <SelectControl\r\n id=\"recaptcha-size-form-toggle\"\r\n value={ this.props.recaptchaSize }\r\n onChange={ this.props.toggleRecaptchaSize }\r\n options={ [ { value: 'normal', label: 'Normal' }, { value: 'compact', label: 'Compact' } ] }\r\n />\r\n </PanelRow>\r\n )\r\n : '';\r\n\r\n const recaptcha_verify_callback = !! this.props.recaptcha ?\r\n (\r\n <TextControl\r\n id=\"recaptcha-verify-callback-form-toggle\"\r\n label={ __( 'reCAPTCHA Verify Callback' ) }\r\n value={ this.props.recaptchaVerifyCallback }\r\n onChange={ this.props.toggleRecaptchaVerifyCallback }\r\n />\r\n )\r\n : '';\r\n\r\n const recaptcha_expired_callback = !! this.props.recaptcha ?\r\n (\r\n <TextControl\r\n id=\"recaptcha-expired-callback-form-toggle\"\r\n label={ __( 'reCAPTCHA Expired Callback' ) }\r\n value={ this.props.recaptchaExpiredCallback }\r\n onChange={ this.props.toggleRecaptchaExpiredCallback }\r\n />\r\n )\r\n : '';\r\n\r\n const inspector_controls = \r\n <InspectorControls key=\"easy-forms-inspector\">\r\n\r\n <PanelBody title={ __( 'Settings' ) } >\r\n {inline}\r\n {show_form_title}\r\n {show_form_description}\r\n {is_ajax}\r\n {recaptcha}\r\n {recaptcha_type}\r\n {recaptcha_theme}\r\n {recaptcha_lang}\r\n {recaptcha_size}\r\n {recaptcha_verify_callback}\r\n {recaptcha_expired_callback}\r\n </PanelBody>\r\n\r\n </InspectorControls>\r\n\r\n return inspector_controls;\r\n }\r\n\r\n forms_dropdown() {\r\n return this.state.forms.length > 0 ? \r\n <select \r\n value={ this.props.formID } \r\n onChange={ this.props.onChangeForm } \r\n className=\"yikes-mailchimp-forms-dropdown\"\r\n key=\"yikes-mailchimp-forms-dropdown\"\r\n >\r\n <option key=\"select\" value=\"\">Select Mailchimp Form...</option>\r\n { this.state.forms.map( ( form ) => {\r\n return <option key={ 'yikes-select-form-' + form.id } value={ form.id }>{ form.form_name }</option>\r\n })}\r\n </select> \r\n : '';\r\n }\r\n\r\n form_title() {\r\n return this.props.showTitle === true ?\r\n ( this.props.focus ? \r\n <h3 \r\n className={ \"yikes-mailchimp-form-title yikes-mailchimp-form-title-\" + this.props.formID }\r\n key=\"yikes-mailchimp-form-title-wrapper\"\r\n >\r\n <PlainText\r\n placeholder={ this.props.formTitle }\r\n key=\"yikes-mailchimp-form-title-editable\"\r\n value={ this.props.formTitle }\r\n onChange={ this.props.toggleFormTitle }\r\n />\r\n </h3>\r\n :\r\n <h3 className={ \"yikes-mailchimp-form-title yikes-mailchimp-form-title-\" + this.props.formID } key=\"yikes-mailchimp-form-title\">\r\n { this.props.formTitle }\r\n </h3> \r\n ) : ''; \r\n }\r\n\r\n form_description() {\r\n return this.props.showDescription === true ?\r\n <section className={ \"yikes-mailchimp-form-description yikes-mailchimp-form-description-\" + this.props.formID } key=\"yikes-mailchimp-form-description\">\r\n <PlainText\r\n className=\"mailchimpDescription\"\r\n placeholder={ __( 'Enter your form\\'s description here.' ) /*( this.props.formData && this.props.formData.form_description && this.props.formData.form_description.length > 0 || this.props.descriptionValue && this.props.descriptionValue.length > 0 ) ? '' : __( 'Enter your form\\'s description here.' )*/ }\r\n value={ this.props.descriptionValue.length > 0 ? this.props.descriptionValue : ( this.props.formData && this.props.formData.form_description ? this.props.formData.form_description : '' ) }\r\n onChange={ this.props.onChangeDescription }\r\n key=\"mailchimpDescription\"\r\n />\r\n </section> \r\n : ''; \r\n }\r\n\r\n get_address_field( addr_field, field ) {\r\n switch( addr_field ) {\r\n\r\n case 'addr1':\r\n case 'addr2':\r\n case 'city':\r\n case 'zip':\r\n return (\r\n <TextControl\r\n id={ \"yikes-easy-mc-form-\" + this.props.formID + \"-\" + field.merge + '-' + addr_field }\r\n onChange={ this.handleFormFieldChanges }\r\n type=\"text\"\r\n name={ field.merge + '[' + addr_field + ']' }\r\n className={ 'yikes-easy-mc-' + field.type + ' ' + field['additional-classes'] }\r\n key= { 'yikes-mailchimp-field-' + field.merge + '-' + addr_field }\r\n required={ field.merge === 'EMAIL' || field.require === '1' ? 'required' : false }\r\n placeholder={ field.placeholder === '1' ? this.address_fields[ addr_field ] : '' }\r\n />\r\n )\r\n break;\r\n\r\n case 'state':\r\n return (\r\n <select \r\n id={ \"yikes-easy-mc-form-\" + this.props.formID + \"-\" + field.merge + '-' + addr_field } \r\n name={ field.merge + '[' + addr_field + ']' }\r\n className={ 'yikes-easy-mc-' + field.type + ' ' + field['additional-classes'] }\r\n onChange={ this.handleFormFieldChanges }\r\n key= { 'yikes-mailchimp-field-' + field.merge + '-' + addr_field }\r\n value=''\r\n required={ field.merge === 'EMAIL' || field.require === '1' ? 'required' : false }\r\n >\r\n { Object.keys( constants.states ).map( ( key ) => {\r\n var choice = constants.states[ key ];\r\n return <option key={ 'state-' + key } value={ key }>{ choice }</option>\r\n })}\r\n \r\n </select>\r\n )\r\n break;\r\n\r\n case 'country':\r\n return (\r\n <select \r\n id={ \"yikes-easy-mc-form-\" + this.props.formID + \"-\" + field.merge + '-' + addr_field } \r\n name={ field.merge + '[' + addr_field + ']' }\r\n className={ 'yikes-easy-mc-' + field.type + ' ' + field['additional-classes'] }\r\n onChange={ this.handleFormFieldChanges }\r\n key= { 'yikes-mailchimp-field-' + field.merge + '-' + addr_field }\r\n value=''\r\n required={ field.merge === 'EMAIL' || field.require === '1' ? 'required' : false }\r\n >\r\n { Object.keys( constants.countries ).map( ( key ) => {\r\n var choice = constants.countries[ key ];\r\n return <option key={ 'country-' + key } value={ key }>{ choice }</option>\r\n })}\r\n \r\n </select>\r\n )\r\n break;\r\n }\r\n }\r\n\r\n get_dropdown_field( field ) {\r\n return (\r\n <select \r\n id={ \"yikes-easy-mc-form-\" + this.props.formID + \"-\" + field.merge }\r\n name={ field.merge }\r\n className={ 'yikes-easy-mc-' + field.type + ' ' + field['additional-classes'] }\r\n onChange={ this.handleFormFieldChanges }\r\n key= { 'yikes-mailchimp-field-' + field.merge }\r\n value={ JSON.parse( field.choices )[ field.default_choice ] }\r\n required={ field.merge === 'EMAIL' || field.require === '1' ? 'required' : false }\r\n >\r\n { Object.keys( JSON.parse( field.choices ) ).map( ( key ) => {\r\n var choice = JSON.parse( field.choices )[ key ];\r\n return <option key={ slugify( choice ) } value={ choice }>{ choice }</option>\r\n })}\r\n </select>\r\n )\r\n }\r\n\r\n get_radio_field( field ) {\r\n var ii = 0;\r\n\r\n return (\r\n JSON.parse( field.choices ).map( ( key ) => {\r\n ii++;\r\n return (\r\n <label \r\n htmlFor={ field.merge + '-' + ii }\r\n className=\"yikes-easy-mc-checkbox-label\"\r\n key={ field.merge + '-label-radio-key-' + ii }\r\n >\r\n <input\r\n type=\"radio\"\r\n name={ field.merge }\r\n id={ field.merge + '-' + ii }\r\n key={ field.merge + '-' + ii + '-input-key' }\r\n value={ key }\r\n onChange={ this.handleFormFieldChanges }\r\n checked={ parseInt( field.default_choice ) === ( ii - 1 ) }\r\n />\r\n <span key={ field.merge + '-span-radio-key-' + ii } className={ field.merge + '-label' }>{ key }</span>\r\n </label>\r\n )\r\n })\r\n )\r\n }\r\n\r\n get_url_field( field ) {\r\n return (\r\n <TextControl\r\n id={ \"yikes-easy-mc-form-\" + this.props.formID + \"-\" + field.merge }\r\n placeholder={ field.placeholder }\r\n onChange={ this.handleFormFieldChanges }\r\n type='url'\r\n value={ field.default }\r\n name={ field.merge }\r\n className={ 'yikes-easy-mc-' + field.type + ' ' + field['additional-classes'] }\r\n key= { 'yikes-mailchimp-field-' + field.merge }\r\n required={ field.merge === 'EMAIL' || field.require === '1' ? 'required' : false }\r\n title={ field.type === 'url' ? __( 'Please enter a valid URL to the website.' ) : __( 'Please enter a valid URL to the image.' ) }\r\n />\r\n )\r\n }\r\n\r\n get_default_field( field ) {\r\n\r\n var type = field.type === 'zip' || field.type === 'phone' ? 'text' : field.type;\r\n\r\n return (\r\n <TextControl\r\n id={ \"yikes-easy-mc-form-\" + this.props.formID + \"-\" + field.merge }\r\n placeholder={ field.placeholder }\r\n onChange={ this.handleFormFieldChanges }\r\n type={ type }\r\n value={ field.default }\r\n name={ field.merge }\r\n className={ 'yikes-easy-mc-' + field.type + ' ' + field['additional-classes'] }\r\n key= { 'yikes-mailchimp-field-' + field.merge }\r\n required={ field.merge === 'EMAIL' || field.require === '1' ? 'required' : false }\r\n />\r\n )\r\n }\r\n\r\n get_date_field( field ) {\r\n return (\r\n <TextControl\r\n id={ \"yikes-easy-mc-form-\" + this.props.formID + \"-\" + field.merge }\r\n placeholder={ field.placeholder }\r\n onChange={ this.handleFormFieldChanges }\r\n type='text'\r\n value={ field.default }\r\n name={ field.merge }\r\n className={ 'yikes-easy-mc-' + field.type + ' ' + field['additional-classes'] }\r\n key= { 'yikes-mailchimp-field-' + field.merge }\r\n required={ field.merge === 'EMAIL' || field.require === '1' ? 'required' : false }\r\n data-attr-type={ field.type }\r\n data-date-format={ field.date_format.toLowerCase() }\r\n />\r\n )\r\n }\r\n\r\n get_radio_interest_group( field ) {\r\n var ii = -1;\r\n var cn = \"yikes-easy-mc-checkbox-label \" + field['additional-classes'];\r\n\r\n return (\r\n Object.keys( JSON.parse( field.groups ) ).map( ( key ) => {\r\n var choice = JSON.parse( field.groups )[ key ];\r\n ii++;\r\n return (\r\n <label\r\n htmlFor={ field.group_id + '-' + ii }\r\n className={ { [cn]: true, 'field-no-label': field['hide-label'] === '1' } }\r\n key={ field.group_id + '-' + ii + '-label-key' }\r\n >\r\n <input\r\n type=\"radio\"\r\n name={\"group-\" + field.group_id + '[]' }\r\n id={ field.group_id + '-' + ii }\r\n key={ field.group_id + '-' + ii + '-input-key' }\r\n value={ key }\r\n onChange={ this.handleFormFieldChanges }\r\n checked={ key === field.default_choice }\r\n className={ { 'yikes-interest-group-required': field.require === '1' } }\r\n />\r\n { choice }\r\n </label>\r\n )\r\n })\r\n )\r\n }\r\n\r\n get_hidden_interest_group( field ) {\r\n var ii = -1;\r\n\r\n return (\r\n Object.keys( JSON.parse( field.groups ) ).map( ( key ) => {\r\n var choice = JSON.parse( field.groups )[ key ];\r\n ii++;\r\n return (\r\n <label\r\n htmlFor={ field.group_id + '-' + ii }\r\n className={ 'yikes-easy-mc-checkbox-label ' + field['additional-classes'] }\r\n key={ field.group_id + '-' + ii + '-label-key' }\r\n >\r\n <input\r\n type=\"checkbox\"\r\n name={\"group-\" + field.group_id + '[]' }\r\n id={ field.group_id + '-' + ii }\r\n key={ field.group_id + '-' + ii + '-input-key' }\r\n value={ key }\r\n onChange={ this.handleFormFieldChanges }\r\n checked={ field.default_choice.indexOf( key ) !== -1 }\r\n />\r\n { choice }\r\n </label>\r\n )\r\n })\r\n )\r\n }\r\n\r\n get_checkboxes_interest_group( field ) {\r\n var ii = -1;\r\n var cn = 'yikes-easy-mc-checkbox-label ' + field['additional-classes'];\r\n\r\n return (\r\n Object.keys( JSON.parse( field.groups ) ).map( ( key ) => {\r\n var choice = JSON.parse( field.groups )[ key ];\r\n ii++;\r\n return (\r\n <label\r\n htmlFor={ field.group_id + '-' + ii }\r\n className={ { [cn]: true, 'field-no-label': field['hide-label'] === '1' } }\r\n key={ field.group_id + '-' + ii + '-label-key' }\r\n >\r\n <input\r\n className={ { 'yikes-interest-group-required': field.require === '1' } }\r\n type=\"checkbox\"\r\n name={ 'group-' + field.group_id + '[]' }\r\n id={ field.group_id + '-' + ii }\r\n key={ field.group_id + '-' + ii + '-input-key' }\r\n value={ key }\r\n onChange={ this.handleFormFieldChanges }\r\n checked={ typeof field.default_choice !== 'undefined' && field.default_choice.indexOf( key ) !== -1 }\r\n required={ field.require === '1' ? 'required' : false }\r\n />\r\n { choice }\r\n </label>\r\n )\r\n })\r\n )\r\n }\r\n\r\n get_dropdown_interest_group( field ) {\r\n var ii = -1;\r\n\r\n return (\r\n <select \r\n id={ \"yikes-easy-mc-form-\" + this.props.formID + \"-\" + field.group_id } \r\n name={ \"group-\" + field.group_id }\r\n className={ \"yikes-easy-mc-dropdown \" + field['additional-classes'] }\r\n value={ field.default_choice }\r\n onChange={ this.handleFormFieldChanges }\r\n required={ field.require === '1' ? 'required' : false }\r\n >\r\n\r\n { Object.keys( JSON.parse( field.groups ) ).map( ( key ) => {\r\n var choice = JSON.parse( field.groups )[ key ];\r\n ii++;\r\n return (\r\n <option key={ field.group_id + '-' + ii + '-input-key' } value={ key }>{ choice }</option>\r\n )\r\n })}\r\n </select>\r\n )\r\n }\r\n\r\n form_fields() {\r\n\r\n return this.props.formData && this.props.formData.fields ?\r\n Object.keys( this.props.formData.fields ).map( ( key ) => {\r\n\r\n var field = this.props.formData.fields[ key ];\r\n\r\n // Form Fields (aka merge variables)\r\n if ( typeof field.merge !== 'undefined' ) {\r\n\r\n var desc = field.description.length > 0 ? \r\n <p className=\"form-field-description\" id={ \"form-field-description-\" + field.merge } key={ \"form-field-description-\" + field.merge }>{ field.description }</p>\r\n : '';\r\n\r\n var label = field['hide-label'] !== '1' ? <span className={ field.merge + '-label' } key={ field.merge + '-label-span-key' }>{ field.label }</span> : '';\r\n\r\n var classes = {'yikes-mailchimp-field-required' : field.merge === 'EMAIL' || field.require === '1' }\r\n classes[ field.merge + '-label'] = true;\r\n\r\n if ( field.type === 'address' ) {\r\n\r\n return ([\r\n field.description_above === '1' && field.description.length > 0 && desc,\r\n Object.keys( this.address_fields ).map( ( addr_field ) => {\r\n label = field['hide-label'] !== '1' ? <span className={ field.merge + '-label' } key={ field.merge + '-label-span-key-' + addr_field }>{ this.address_fields[ addr_field ] }</span> : '';\r\n\r\n return (\r\n <label \r\n htmlFor={ \"yikes-easy-mc-form-\" + this.props.formID + \"-\" + field.merge + '-' + addr_field } \r\n className={ classes } \r\n key={ field.merge + '-label-key-' + addr_field }\r\n style={ field.hide === '1' ? { 'display': 'none' } : {} }\r\n >\r\n { label }\r\n { this.get_address_field( addr_field, field ) }\r\n </label> \r\n )\r\n }),\r\n field.description_above !== '1' && field.description.length > 0 && desc\r\n ])\r\n } else {\r\n return (\r\n <label \r\n htmlFor={ \"yikes-easy-mc-form-\" + this.props.formID + \"-\" + field.merge } \r\n className={ classes } \r\n key={ field.merge + '-label-key' }\r\n style={ field.hide === '1' ? { 'display': 'none' } : {} }\r\n >\r\n { label }\r\n\r\n { field.description_above === '1' && field.description.length > 0 && desc }\r\n\r\n { \r\n ( field.type === 'dropdown' ? this.get_dropdown_field( field ) :\r\n ( field.type === 'radio' ? this.get_radio_field( field ) : \r\n ( field.type === 'url' || field.type === 'imageurl' ? this.get_url_field( field ) :\r\n ( field.type === 'date' || field.type === 'birthday' ? this.get_date_field( field ) :\r\n this.get_default_field( field ) ) ) ) )\r\n }\r\n\r\n { field.description_above !== '1' && field.description.length > 0 && desc }\r\n\r\n </label>\r\n )\r\n }\r\n } else {\r\n\r\n var desc = field.description.length > 0 ? \r\n <p className=\"form-field-description\" id={ \"form-field-description-\" + field.group_id } key={ \"form-field-description-\" + field.group_id }>{ field.description }</p>\r\n : '';\r\n\r\n var label = field['hide-label'] !== '1' ?\r\n <span key={ field.group_id + \"-label-span-key\" } className={ field.group_id + \"-label checkbox-parent-label\" }>{ field.label }</span> \r\n : '';\r\n\r\n var classes = { 'yikes-mailchimp-field-required' : field.require === '1' }\r\n classes[ field.group_id + '-label'] = true;\r\n\r\n return ( \r\n <label \r\n htmlFor={ field.group_id }\r\n className= { classes }\r\n key={ field.group_id + \"-label-span-key\" }\r\n style={ field.type === 'hidden' || field.hide === '1' ? { 'display': 'none' } : {} }\r\n >\r\n\r\n { label }\r\n\r\n { field.description_above === '1' && field.description.length > 0 && desc }\r\n\r\n {\r\n ( field.type === 'radio' ? this.get_radio_interest_group( field ) :\r\n ( field.type === 'hidden' ? this.get_hidden_interest_group( field ) : \r\n ( field.type === 'checkboxes' ? this.get_checkboxes_interest_group( field ) :\r\n ( field.type === 'dropdown' ? this.get_dropdown_interest_group( field ) : '' ) ) ) )\r\n }\r\n\r\n { field.description_above !== '1' && field.description.length > 0 && desc }\r\n\r\n </label>\r\n )\r\n }\r\n })\r\n : '';\r\n }\r\n\r\n form_recaptcha() {\r\n\r\n return this.state.recaptcha_data.success === true && this.state.recaptcha_data.data.site_key && this.props.recaptcha === true ? \r\n <Recaptcha\r\n sitekey={ this.state.recaptcha_data.data.site_key }\r\n key={ 'easy-forms-recaptcha-1' }\r\n elementID={ 'google-recaptcha-id-' + Math.random().toString(36).slice(-8) } // Need to use a unique ID for multiple reCAPTCHAs to work on the same page.\r\n theme={ this.props.recaptchaTheme }\r\n hl={ this.props.recaptchaLang.length > 0 ? this.props.recaptchaLang : this.state.recaptcha_data.data.locale }\r\n type={ this.props.recaptchaType }\r\n size={ this.props.recaptchaSize }\r\n verifyCallback=''\r\n expiredCallback=''\r\n />\r\n : ''; \r\n }\r\n\r\n submit_button() {\r\n return this.props.formData && this.props.formData.fields ?\r\n ( this.props.focus && this.props.formData.form_settings['yikes-easy-mc-submit-button-type'] === 'text' ?\r\n <button\r\n type=\"submit\"\r\n key=\"mailchimpSubmitButton\"\r\n className={ \"yikes-easy-mc-submit-button yikes-easy-mc-submit-button-\" + this.props.formID + \" btn btn-primary\" + \" \" + this.props.formData.form_settings['yikes-easy-mc-submit-button-classes'] }\r\n >\r\n <PlainText\r\n className=\"yikes-mailchimp-submit-button-span-text\"\r\n key=\"yikes-mailchimp-submit-button-span-text\"\r\n value={ this.props.submitButtonText ? this.props.submitButtonText : '' }\r\n onChange={ this.props.toggleSubmitButtonText }\r\n />\r\n </button>\r\n :\r\n ( this.props.formData.form_settings['yikes-easy-mc-submit-button-type'] === 'text' ? \r\n <button\r\n type=\"submit\"\r\n key=\"mailchimpSubmitButton\"\r\n className={ \"yikes-easy-mc-submit-button yikes-easy-mc-submit-button-\" + this.props.formID + \" btn btn-primary\" + \" \" + this.props.formData.form_settings['yikes-easy-mc-submit-button-classes'] }\r\n >\r\n <span className=\"yikes-mailchimp-submit-button-span-text\" key=\"yikes-mailchimp-submit-button-span-text\">{ this.props.submitButtonText }</span>\r\n </button>\r\n :\r\n <input\r\n type=\"image\"\r\n alt={ this.props.submitButtonText }\r\n src={ this.props.formData.form_settings['yikes-easy-mc-submit-button-image'] }\r\n className={ \"yikes-easy-mc-submit-button yikes-easy-mc-submit-button-image yikes-easy-mc-submit-button-\" + this.props.formID + \" btn btn-primary\" + \" \" + this.props.formData.form_settings['yikes-easy-mc-submit-button-classes'] }\r\n />\r\n )\r\n )\r\n : '';\r\n }\r\n\r\n get_form_section() {\r\n return (\r\n <section \r\n id={ \"yikes-mailchimp-container-\" + this.props.formID } \r\n className={ \"yikes-mailchimp-container yikes-mailchimp-container-\" + this.props.formID }\r\n key=\"yikes-mailchimp-container-section\"\r\n >\r\n {[\r\n\r\n // Form title\r\n [this.form_title()],\r\n\r\n // Form Description\r\n [this.form_description()],\r\n\r\n // Get the form\r\n [this.get_form()] \r\n ]}\r\n </section>\r\n );\r\n }\r\n\r\n get_form() {\r\n return (\r\n // Form Wrapper\r\n <form\r\n id={ slugify( this.props.formTitle ) + '-' + this.props.formID }\r\n className={ \"yikes-easy-mc-form yikes-easy-mc-form-\" + this.props.formID + \" \" + this.props.formData.form_settings['yikes-easy-mc-form-class-names'] }\r\n key=\"yikes-mailchimp-container-form\"\r\n >\r\n {[\r\n\r\n // Form fields\r\n [this.form_fields()],\r\n\r\n // Recaptcha\r\n [this.form_recaptcha()],\r\n\r\n // Submit button\r\n [this.submit_button()]\r\n ]}\r\n </form>\r\n );\r\n }\r\n\r\n render() {\r\n\r\n if ( this.state.forms.length > 0 && this.props.formData && Object.keys( this.props.formData ).length > 0 ) {\r\n\r\n \t return (\r\n\r\n <div className={ this.props.className }>\r\n\r\n {// Show inspector controls when focused\r\n this.props.focus && this.inspector_controls()}\r\n\r\n {// Show the forms dropdown\r\n this.forms_dropdown()}\r\n\r\n <hr key=\"easy-forms-dropdown-divider\"/>\r\n\r\n {// Show the form\r\n this.get_form_section()}\r\n </div>\r\n \r\n \t );\r\n\r\n \t} else if ( this.state.forms.length > 0 ) {\r\n\r\n // If we don't have form data, show the forms dropdown\r\n \t\treturn ( \r\n <div className={ this.props.className }>\r\n {this.forms_dropdown()}\r\n </div>\r\n );\r\n\r\n \t} else if ( this.state.api_key_status !== 'valid' ) {\r\n\r\n // If the API key is invalid, show a message.\r\n return ( \r\n <p className=\"yikes-mailchimp-api-key-warning\" key=\"yikes-mailchimp-api-key-warning\">\r\n <em>{ this.state.api_key_status === 'empty' ? <a href={ constants.settings_url }> { __( 'To use this block, please enter an API key on the Easy Forms\\' settings page.' ) } </a> : __( 'Your API key is invalid.' ) }</em>\r\n </p>\r\n );\r\n } else if ( this.state.forms_loaded === true && this.state.forms.length === 0 ) {\r\n\r\n // No forms.\r\n return (\r\n <p key=\"no-forms-found\" className={ this.props.className }>\r\n <em>{ __( 'No forms were found.' ) }</em>\r\n </p>\r\n );\r\n } else {\r\n\r\n // Show loading... & spinner.\r\n \t\treturn (\r\n <p key=\"loading-easy-forms\" className={ this.props.className }>\r\n <span key=\"yikes-easy-forms-loading-text\">{ __( 'Loading...' ) }</span>\r\n <Spinner key=\"yikes-easy-forms-loading-spinner\" />\r\n </p>\r\n );\r\n \t}\r\n }\r\n}","const constants = {\r\n\tstates: {\r\n\t\t'': '—',\r\n\t\t'AL': 'Alabama',\r\n\t\t'AK': 'Alaska',\r\n\t\t'AZ': 'Arizona',\r\n\t\t'AR': 'Arkansas',\r\n\t\t'CA': 'California',\r\n\t\t'CO': 'Colorado',\r\n\t\t'CT': 'Connecticut',\r\n\t\t'DE': 'Delaware',\r\n\t\t'DC': 'District Of Columbia',\r\n\t\t'FL': 'Florida',\r\n\t\t'GA': 'Georgia',\r\n\t\t'HI': 'Hawaii',\r\n\t\t'ID': 'Idaho',\r\n\t\t'IL': 'Illinois',\r\n\t\t'IN': 'Indiana',\r\n\t\t'IA': 'Iowa',\r\n\t\t'KS': 'Kansas',\r\n\t\t'KY': 'Kentucky',\r\n\t\t'LA': 'Louisiana',\r\n\t\t'ME': 'Maine',\r\n\t\t'MD': 'Maryland',\r\n\t\t'MA': 'Massachusetts',\r\n\t\t'MI': 'Michigan',\r\n\t\t'MN': 'Minnesota',\r\n\t\t'MS': 'Mississippi',\r\n\t\t'MO': 'Missouri',\r\n\t\t'MT': 'Montana',\r\n\t\t'NE': 'Nebraska',\r\n\t\t'NV': 'Nevada',\r\n\t\t'NH': 'New Hampshire',\r\n\t\t'NJ': 'New Jersey',\r\n\t\t'NM': 'New Mexico',\r\n\t\t'NY': 'New York',\r\n\t\t'NC': 'North Carolina',\r\n\t\t'ND': 'North Dakota',\r\n\t\t'OH': 'Ohio',\r\n\t\t'OK': 'Oklahoma',\r\n\t\t'OR': 'Oregon',\r\n\t\t'PA': 'Pennsylvania',\r\n\t\t'RI': 'Rhode Island',\r\n\t\t'SC': 'South Carolina',\r\n\t\t'SD': 'South Dakota',\r\n\t\t'TN': 'Tennessee',\r\n\t\t'TX': 'Texas',\r\n\t\t'UT': 'Utah',\r\n\t\t'VT': 'Vermont',\r\n\t\t'VA': 'Virginia',\r\n\t\t'WA': 'Washington',\r\n\t\t'WV': 'West Virginia',\r\n\t\t'WI': 'Wisconsin',\r\n\t\t'WY': 'Wyoming',\r\n\t\t'AB': 'Alberta',\r\n\t\t'BC': 'British Columbia',\r\n\t\t'MB': 'Manitoba',\r\n\t\t'NB': 'New Brunswick',\r\n\t\t'NL': 'Newfoundland and Labrador',\r\n\t\t'NS': 'Nova Scotia',\r\n\t\t'ON': 'Ontario',\r\n\t\t'PE': 'Prince Edward Island',\r\n\t\t'QC': 'Quebec',\r\n\t\t'SK': 'Saskatchewan',\r\n\t\t'NT': 'Northwest Territories',\r\n\t\t'NU': 'Nunavut',\r\n\t\t'YT': 'Yukon',\r\n\t},\r\n\tcountries: {\r\n\t\t'US': 'United States',\r\n\t\t'GB': 'United Kingdom',\r\n\t\t'AF': 'Afghanistan',\r\n\t\t'AX': 'Aland Islands',\r\n\t\t'AL': 'Albania',\r\n\t\t'DZ': 'Algeria',\r\n\t\t'AS': 'American Samoa',\r\n\t\t'AD': 'Andorra',\r\n\t\t'AO': 'Angola',\r\n\t\t'AI': 'Anguilla',\r\n\t\t'AQ': 'Antarctica',\r\n\t\t'AG': 'Antigua and Barbuda',\r\n\t\t'AR': 'Argentina',\r\n\t\t'AM': 'Armenia',\r\n\t\t'AW': 'Aruba',\r\n\t\t'AU': 'Australia',\r\n\t\t'AT': 'Austria',\r\n\t\t'AZ': 'Azerbaijan',\r\n\t\t'BS': 'Bahamas',\r\n\t\t'BH': 'Bahrain',\r\n\t\t'BD': 'Bangladesh',\r\n\t\t'BB': 'Barbados',\r\n\t\t'BY': 'Belarus',\r\n\t\t'BE': 'Belgium',\r\n\t\t'BZ': 'Belize',\r\n\t\t'BJ': 'Benin',\r\n\t\t'BM': 'Bermuda',\r\n\t\t'BT': 'Bhutan',\r\n\t\t'BO': 'Bolivia',\r\n\t\t'BA': 'Bosnia and Herzegovina',\r\n\t\t'BW': 'Botswana',\r\n\t\t'BV': 'Bouvet Island',\r\n\t\t'BR': 'Brazil',\r\n\t\t'IO': 'British Indian Ocean Territory',\r\n\t\t'BN': 'Brunei Darussalam',\r\n\t\t'BG': 'Bulgaria',\r\n\t\t'BF': 'Burkina Faso',\r\n\t\t'BI': 'Burundi',\r\n\t\t'KH': 'Cambodia',\r\n\t\t'CM': 'Cameroon',\r\n\t\t'CA': 'Canada',\r\n\t\t'CV': 'Cape Verde',\r\n\t\t'KY': 'Cayman Islands',\r\n\t\t'CF': 'Central African Republic',\r\n\t\t'TD': 'Chad',\r\n\t\t'CL': 'Chile',\r\n\t\t'CN': 'China',\r\n\t\t'CX': 'Christmas Island',\r\n\t\t'CC': 'Cocos (Keeling) Islands',\r\n\t\t'CO': 'Colombia',\r\n\t\t'KM': 'Comoros',\r\n\t\t'CG': 'Congo',\r\n\t\t'CD': 'Congo, The Democratic Republic of The',\r\n\t\t'CK': 'Cook Islands',\r\n\t\t'CR': 'Costa Rica',\r\n\t\t'CI': 'Cote D’ivoire',\r\n\t\t'HR': 'Croatia',\r\n\t\t'CU': 'Cuba',\r\n\t\t'CY': 'Cyprus',\r\n\t\t'CZ': 'Czech Republic',\r\n\t\t'DK': 'Denmark',\r\n\t\t'DJ': 'Djibouti',\r\n\t\t'DM': 'Dominica',\r\n\t\t'DO': 'Dominican Republic',\r\n\t\t'EC': 'Ecuador',\r\n\t\t'EG': 'Egypt',\r\n\t\t'SV': 'El Salvador',\r\n\t\t'GQ': 'Equatorial Guinea',\r\n\t\t'ER': 'Eritrea',\r\n\t\t'EE': 'Estonia',\r\n\t\t'ET': 'Ethiopia',\r\n\t\t'FK': 'Falkland Islands (Malvinas)',\r\n\t\t'FO': 'Faroe Islands',\r\n\t\t'FJ': 'Fiji',\r\n\t\t'FI': 'Finland',\r\n\t\t'FR': 'France',\r\n\t\t'GF': 'French Guiana',\r\n\t\t'PF': 'French Polynesia',\r\n\t\t'TF': 'French Southern Territories',\r\n\t\t'GA': 'Gabon',\r\n\t\t'GM': 'Gambia',\r\n\t\t'GE': 'Georgia',\r\n\t\t'DE': 'Germany',\r\n\t\t'GH': 'Ghana',\r\n\t\t'GI': 'Gibraltar',\r\n\t\t'GR': 'Greece',\r\n\t\t'GL': 'Greenland',\r\n\t\t'GD': 'Grenada',\r\n\t\t'GP': 'Guadeloupe',\r\n\t\t'GU': 'Guam',\r\n\t\t'GT': 'Guatemala',\r\n\t\t'GG': 'Guernsey',\r\n\t\t'GN': 'Guinea',\r\n\t\t'GW': 'Guinea-bissau',\r\n\t\t'GY': 'Guyana',\r\n\t\t'HT': 'Haiti',\r\n\t\t'HM': 'Heard Island and Mcdonald Islands',\r\n\t\t'VA': 'Holy See (Vatican City State)',\r\n\t\t'HN': 'Honduras',\r\n\t\t'HK': 'Hong Kong',\r\n\t\t'HU': 'Hungary',\r\n\t\t'IS': 'Iceland',\r\n\t\t'IN': 'India',\r\n\t\t'ID': 'Indonesia',\r\n\t\t'IR': 'Iran, Islamic Republic of',\r\n\t\t'IQ': 'Iraq',\r\n\t\t'IE': 'Ireland',\r\n\t\t'IM': 'Isle of Man',\r\n\t\t'IL': 'Israel',\r\n\t\t'IT': 'Italy',\r\n\t\t'JM': 'Jamaica',\r\n\t\t'JP': 'Japan',\r\n\t\t'JE': 'Jersey',\r\n\t\t'JO': 'Jordan',\r\n\t\t'KZ': 'Kazakhstan',\r\n\t\t'KE': 'Kenya',\r\n\t\t'KI': 'Kiribati',\r\n\t\t'KP': 'Korea, Democratic People’s Republic of',\r\n\t\t'KR': 'Korea, Republic of',\r\n\t\t'KW': 'Kuwait',\r\n\t\t'KG': 'Kyrgyzstan',\r\n\t\t'LA': 'Lao People’s Democratic Republic',\r\n\t\t'LV': 'Latvia',\r\n\t\t'LB': 'Lebanon',\r\n\t\t'LS': 'Lesotho',\r\n\t\t'LR': 'Liberia',\r\n\t\t'LY': 'Libyan Arab Jamahiriya',\r\n\t\t'LI': 'Liechtenstein',\r\n\t\t'LT': 'Lithuania',\r\n\t\t'LU': 'Luxembourg',\r\n\t\t'MO': 'Macao',\r\n\t\t'MK': 'Macedonia, The Former Yugoslav Republic of',\r\n\t\t'MG': 'Madagascar',\r\n\t\t'MW': 'Malawi',\r\n\t\t'MY': 'Malaysia',\r\n\t\t'MV': 'Maldives',\r\n\t\t'ML': 'Mali',\r\n\t\t'MT': 'Malta',\r\n\t\t'MH': 'Marshall Islands',\r\n\t\t'MQ': 'Martinique',\r\n\t\t'MR': 'Mauritania',\r\n\t\t'MU': 'Mauritius',\r\n\t\t'YT': 'Mayotte',\r\n\t\t'MX': 'Mexico',\r\n\t\t'FM': 'Micronesia, Federated States of',\r\n\t\t'MD': 'Moldova, Republic of',\r\n\t\t'MC': 'Monaco',\r\n\t\t'MN': 'Mongolia',\r\n\t\t'ME': 'Montenegro',\r\n\t\t'MS': 'Montserrat',\r\n\t\t'MA': 'Morocco',\r\n\t\t'MZ': 'Mozambique',\r\n\t\t'MM': 'Myanmar',\r\n\t\t'NA': 'Namibia',\r\n\t\t'NR': 'Nauru',\r\n\t\t'NP': 'Nepal',\r\n\t\t'NL': 'Netherlands',\r\n\t\t'AN': 'Netherlands Antilles',\r\n\t\t'NC': 'New Caledonia',\r\n\t\t'NZ': 'New Zealand',\r\n\t\t'NI': 'Nicaragua',\r\n\t\t'NE': 'Niger',\r\n\t\t'NG': 'Nigeria',\r\n\t\t'NU': 'Niue',\r\n\t\t'NF': 'Norfolk Island',\r\n\t\t'MP': 'Northern Mariana Islands',\r\n\t\t'NO': 'Norway',\r\n\t\t'OM': 'Oman',\r\n\t\t'PK': 'Pakistan',\r\n\t\t'PW': 'Palau',\r\n\t\t'PS': 'Palestinian Territory, Occupied',\r\n\t\t'PA': 'Panama',\r\n\t\t'PG': 'Papua New Guinea',\r\n\t\t'PY': 'Paraguay',\r\n\t\t'PE': 'Peru',\r\n\t\t'PH': 'Philippines',\r\n\t\t'PN': 'Pitcairn',\r\n\t\t'PL': 'Poland',\r\n\t\t'PT': 'Portugal',\r\n\t\t'PR': 'Puerto Rico',\r\n\t\t'QA': 'Qatar',\r\n\t\t'RE': 'Reunion',\r\n\t\t'RO': 'Romania',\r\n\t\t'RU': 'Russian Federation',\r\n\t\t'RW': 'Rwanda',\r\n\t\t'SH': 'Saint Helena',\r\n\t\t'KN': 'Saint Kitts and Nevis',\r\n\t\t'LC': 'Saint Lucia',\r\n\t\t'PM': 'Saint Pierre and Miquelon',\r\n\t\t'VC': 'Saint Vincent and The Grenadines',\r\n\t\t'WS': 'Samoa',\r\n\t\t'SM': 'San Marino',\r\n\t\t'ST': 'Sao Tome and Principe',\r\n\t\t'SA': 'Saudi Arabia',\r\n\t\t'SN': 'Senegal',\r\n\t\t'RS': 'Serbia',\r\n\t\t'SC': 'Seychelles',\r\n\t\t'SL': 'Sierra Leone',\r\n\t\t'SG': 'Singapore',\r\n\t\t'SK': 'Slovakia',\r\n\t\t'SI': 'Slovenia',\r\n\t\t'SB': 'Solomon Islands',\r\n\t\t'SO': 'Somalia',\r\n\t\t'ZA': 'South Africa',\r\n\t\t'GS': 'South Georgia and The South Sandwich Islands',\r\n\t\t'ES': 'Spain',\r\n\t\t'LK': 'Sri Lanka',\r\n\t\t'SD': 'Sudan',\r\n\t\t'SR': 'Suriname',\r\n\t\t'SJ': 'Svalbard and Jan Mayen',\r\n\t\t'SZ': 'Swaziland',\r\n\t\t'SE': 'Sweden',\r\n\t\t'CH': 'Switzerland',\r\n\t\t'SY': 'Syrian Arab Republic',\r\n\t\t'TW': 'Taiwan, Province of China',\r\n\t\t'TJ': 'Tajikistan',\r\n\t\t'TZ': 'Tanzania, United Republic of',\r\n\t\t'TH': 'Thailand',\r\n\t\t'TL': 'Timor-leste',\r\n\t\t'TG': 'Togo',\r\n\t\t'TK': 'Tokelau',\r\n\t\t'TO': 'Tonga',\r\n\t\t'TT': 'Trinidad and Tobago',\r\n\t\t'TN': 'Tunisia',\r\n\t\t'TR': 'Turkey',\r\n\t\t'TM': 'Turkmenistan',\r\n\t\t'TC': 'Turks and Caicos Islands',\r\n\t\t'TV': 'Tuvalu',\r\n\t\t'UG': 'Uganda',\r\n\t\t'UA': 'Ukraine',\r\n\t\t'AE': 'United Arab Emirates',\r\n\t\t'UM': 'United States Minor Outlying Islands',\r\n\t\t'UY': 'Uruguay',\r\n\t\t'UZ': 'Uzbekistan',\r\n\t\t'VU': 'Vanuatu',\r\n\t\t'VE': 'Venezuela',\r\n\t\t'VN': 'Viet Nam',\r\n\t\t'VG': 'Virgin Islands, British',\r\n\t\t'VI': 'Virgin Islands, U.S.',\r\n\t\t'WF': 'Wallis and Futuna',\r\n\t\t'EH': 'Western Sahara',\r\n\t\t'YE': 'Yemen',\r\n\t\t'ZM': 'Zambia',\r\n\t\t'ZW': 'Zimbabwe',\r\n\t},\r\n\tlocales: {\r\n\t\t\"ar\" : \"Arabic\",\r\n\t\t\"af\" : \"Afrikaans\",\r\n\t\t\"am\" : \"Amharic\",\r\n\t\t\"hy\" : \"Armenian\",\r\n\t\t\"az\" : \"Azerbaijani\",\r\n\t\t\"eu\" : \"Basque\",\r\n\t\t\"bn\" : \"Bengali\",\r\n\t\t\"bg\" : \"Bulgarian\",\r\n\t\t\"ca\" : \"Catalan\",\r\n\t\t\"zh-HK\" : \"Chinese (Hong Kong)\",\r\n\t\t\"zh-CN\" : \"Chinese (Simplified)\",\r\n\t\t\"zh-TW\" : \"Chinese (Traditional)\",\r\n\t\t\"hr\" : \"Croatian\",\r\n\t\t\"cs\" : \"Czech\",\r\n\t\t\"da\" : \"Danish\",\r\n\t\t\"nl\" : \"Dutch\",\r\n\t\t\"en-GB\" : \"English (UK)\",\r\n\t\t\"en\" : \"English (US)\",\r\n\t\t\"et\" : \"Estonian\",\r\n\t\t\"fil\" : \"Filipino\",\r\n\t\t\"fi\" : \"Finnish\",\r\n\t\t\"fr\" : \"French\",\r\n\t\t\"fr-CA\" : \"French (Canadian)\",\r\n\t\t\"gl\" : \"Galician\",\r\n\t\t\"ka\" : \"Georgian\",\r\n\t\t\"de\" : \"German\",\r\n\t\t\"de-AT\" : \"German (Austria)\",\r\n\t\t\"de-CH\" : \"German (Switzerland)\",\r\n\t\t\"el\" : \"Greek\",\r\n\t\t\"gu\" : \"Gujarati\",\r\n\t\t\"iw\" : \"Hebrew\",\r\n\t\t\"hi\" : \"Hindi\",\r\n\t\t\"hu\" : \"Hungarain\",\r\n\t\t\"is\" : \"Icelandic\",\r\n\t\t\"id\" : \"Indonesian\",\r\n\t\t\"it\" : \"Italian\",\r\n\t\t\"ja\" : \"Japanese\",\r\n\t\t\"kn\" : \"Kannada\",\r\n\t\t\"ko\" : \"Korean\",\r\n\t\t\"lo\" : \"Laothian\",\r\n\t\t\"lv\" : \"Latvian\",\r\n\t\t\"lt\" : \"Lithuanian\",\r\n\t\t\"ms\" : \"Malay\",\r\n\t\t\"ml\" : \"Malayalam\",\r\n\t\t\"mr\" : \"Marathi\",\r\n\t\t\"mn\" : \"Mongolian\",\r\n\t\t\"no\" : \"Norwegian\",\r\n\t\t\"fa\" : \"Persian\",\r\n\t\t\"pl\" : \"Polish\",\r\n\t\t\"pt\" : \"Portuguese\",\r\n\t\t\"pt-BR\" : \"Portuguese (Brazil)\",\r\n\t\t\"pt-PT\" : \"Portuguese (Portugal)\",\r\n\t\t\"ro\" : \"Romanian\",\r\n\t\t\"ru\" : \"Russian\",\r\n\t\t\"sr\" : \"Serbian\",\r\n\t\t\"si\" : \"Sinhalese\",\r\n\t\t\"sk\" : \"Slovak\",\r\n\t\t\"sl\" : \"Slovenian\",\r\n\t\t\"es\" : \"Spanish\",\r\n\t\t\"es-419\" : \"Spanish (Latin America)\",\r\n\t\t\"sw\" : \"Swahili\",\r\n\t\t\"sv\" : \"Swedish\",\r\n\t\t\"ta\" : \"Tamil\",\r\n\t\t\"te\" : \"Telugu\",\r\n\t\t\"th\" : \"Thai\",\r\n\t\t\"tr\" : \"Turkish\",\r\n\t\t\"uk\" : \"Ukrainian\",\r\n\t\t\"ur\" : \"Urdu\",\r\n\t\t\"vi\" : \"Vietnamese\",\r\n\t\t\"zu\" : \"Zulu\"\r\n\t},\r\n\tsettings_url: 'wp-admin/admin.php?page=yikes-inc-easy-mailchimp-settings'\r\n}\r\n\r\nexport default constants;\r\n","( function( $ ) {\r\n\r\n\t$( document ).ready( function() {\r\n\t\t\r\n\t\t$( 'body' ).on( 'click', '.yikes-easy-mc-submit-button', function( event ) { \r\n\t\t event.preventDefault();\r\n\t\t event.stopPropagation();\r\n\t\t $( '.yikes-mailchimp-submit-button-span-text' ).focus();\r\n\t\t}); \r\n\r\n\t\t$( 'body' ).on( 'click', '.yikes-mailchimp-submit-button-span-text', function( event ) {\r\n\t\t event.preventDefault();\r\n\t\t event.stopPropagation();\r\n\t\t});\r\n\t});\r\n\r\n})( jQuery );","/*\r\n* This should have the same effect as WP/PHP's `sanitize_title()` function\r\n*\r\n* Source: https://gist.github.com/mathewbyrne/1280286\r\n*/\r\nexport default function slugify( text ) {\r\n\r\n // Use hash map for special characters \r\n let specialChars = {\"à\":'a',\"ä\":'a',\"á\":'a',\"â\":'a',\"æ\":'a',\"å\":'a',\"ë\":'e',\"è\":'e',\"é\":'e', \"ê\":'e',\"î\":'i',\"ï\":'i',\"ì\":'i',\"í\":'i',\"ò\":'o',\"ó\":'o',\"ö\":'o',\"ô\":'o',\"ø\":'o',\"ù\":'o',\"ú\":'u',\"ü\":'u',\"û\":'u',\"ñ\":'n',\"ç\":'c',\"ß\":'s',\"ÿ\":'y',\"œ\":'o',\"ŕ\":'r',\"ś\":'s',\"ń\":'n',\"ṕ\":'p',\"ẃ\":'w',\"ǵ\":'g',\"ǹ\":'n',\"ḿ\":'m',\"ǘ\":'u',\"ẍ\":'x',\"ź\":'z',\"ḧ\":'h',\"·\":'-',\"/\":'-',\"_\":'-',\",\":'-',\":\":'-',\";\":'-'};\r\n\r\n return text.toString().toLowerCase()\r\n .replace(/\\s+/g, '-') // Replace spaces with -\r\n .replace(/./g,(target, index, str) => specialChars[target] || target) // Replace special characters using the hash map\r\n .replace(/&/g, '-and-') // Replace & with 'and'\r\n .replace(/[^\\w\\-]+/g, '') // Remove all non-word chars\r\n .replace(/\\-\\-+/g, '-') // Replace multiple - with single -\r\n .replace(/^-+/, '') // Trim - from start of text\r\n .replace(/-+$/, ''); // Trim - from end of text\r\n};\r\n","import EasyFormsAPI from '../components/api.js'\r\n\r\nimport MailchimpForms from '../components/class.MailchimpForms.js';\r\n\r\nimport './easy-forms-block.scss'\r\n\r\nrequire( '../components/enable-submit-button-editing.js' );\r\n\r\n// Get just the __() localization function from wp.i18n\r\nconst { __ } = wp.i18n;\r\n\r\n// Get registerBlockType and other methods from wp.blocks\r\nconst { registerBlockType } = wp.blocks;\r\n\r\nconst edit_easy_form = function( props ) {\r\n\r\n const onChangeForm = ( event ) => {\r\n props.setAttributes( { form_id: event.target.value } );\r\n\r\n if ( event.target.value.length > 0 ) {\r\n const api = new EasyFormsAPI();\r\n api.get_form( event.target.value ).then( function( form ) {\r\n props.setAttributes( { form: form.data } );\r\n props.setAttributes( { form_description: form.data.form_description } );\r\n props.setAttributes( { form_title: form.data.form_name } );\r\n props.setAttributes( { is_ajax: form.data.submission_settings.ajax === '1' } );\r\n props.setAttributes( { submit_button_text: form.data.form_settings['yikes-easy-mc-submit-button-text'] } );\r\n });\r\n }\r\n };\r\n\r\n const onChangeDescription = ( value ) => {\r\n props.setAttributes( { form_description: value } );\r\n };\r\n\r\n const toggleShowDescription = ( event ) => {\r\n props.setAttributes( { show_description: !! event.target.checked } );\r\n }\r\n\r\n const toggleInline = ( event ) => {\r\n props.setAttributes( { inline: !! event.target.checked } );\r\n }\r\n\r\n const toggleShowTitle = ( event ) => {\r\n props.setAttributes( { show_title: !! event.target.checked } );\r\n }\r\n\r\n const toggleFormTitle = ( value ) => {\r\n props.setAttributes( { form_title: value } );\r\n }\r\n\r\n const toggleIsAjax = ( event ) => {\r\n props.setAttributes( { is_ajax: !! event.target.checked } );\r\n }\r\n\r\n /* Allow this function to be called via a checkbox handler or directly by passing in a boolean */\r\n const toggleRecaptchaAbstract = ( checked ) => {\r\n props.setAttributes( { recaptcha: checked } );\r\n }\r\n\r\n const toggleRecaptcha = ( event ) => {\r\n toggleRecaptchaAbstract( !! event.target.checked )\r\n }\r\n\r\n const toggleRecaptchaTheme = ( value ) => {\r\n props.setAttributes( { recaptcha_theme: value } );\r\n }\r\n\r\n const toggleRecaptchaLang = ( value ) => {\r\n props.setAttributes( { recaptcha_lang: value } );\r\n }\r\n\r\n const toggleRecaptchaType = ( value ) => {\r\n props.setAttributes( { recaptcha_type: value } );\r\n }\r\n\r\n const toggleRecaptchaSize = ( value ) => {\r\n props.setAttributes( { recaptcha_size: value } );\r\n }\r\n\r\n const toggleRecaptchaVerifyCallback = ( value ) => {\r\n props.setAttributes( { recaptcha_verify_callback: value } );\r\n }\r\n\r\n const toggleRecaptchaExpiredCallback = ( value ) => {\r\n props.setAttributes( { recaptcha_expired_callback: value } );\r\n }\r\n\r\n const toggleSubmitButtonText = ( value ) => {\r\n props.setAttributes( { submit_button_text: value })\r\n }\r\n\r\n return (\r\n <MailchimpForms\r\n className={ props.className }\r\n onChangeForm={ onChangeForm }\r\n formID={ props.attributes.form_id }\r\n formData={ props.attributes.form }\r\n onChangeDescription={ onChangeDescription }\r\n descriptionValue={ props.attributes.form_description }\r\n showDescription={ props.attributes.show_description }\r\n toggleShowDescription={ toggleShowDescription }\r\n focus={ !! props.isSelected }\r\n inline={ props.attributes.inline }\r\n toggleInline={ toggleInline }\r\n formTitle={ props.attributes.form_title }\r\n toggleFormTitle={ toggleFormTitle }\r\n showTitle={ props.attributes.show_title }\r\n toggleShowTitle={ toggleShowTitle }\r\n isAjax={ props.attributes.is_ajax }\r\n toggleIsAjax={ toggleIsAjax }\r\n toggleRecaptchaAbstract={ toggleRecaptchaAbstract }\r\n recaptcha={ props.attributes.recaptcha }\r\n toggleRecaptcha={ toggleRecaptcha }\r\n recaptchaTheme={ props.attributes.recaptcha_theme }\r\n toggleRecaptchaTheme={ toggleRecaptchaTheme }\r\n recaptchaLang={ props.attributes.recaptcha_lang }\r\n toggleRecaptchaLang={ toggleRecaptchaLang }\r\n recaptchaType={ props.attributes.recaptcha_type }\r\n toggleRecaptchaType={ toggleRecaptchaType }\r\n recaptchaSize={ props.attributes.recaptcha_size }\r\n toggleRecaptchaSize={ toggleRecaptchaSize }\r\n recaptchaVerifyCallback={ props.attributes.recaptcha_verify_callback }\r\n toggleRecaptchaVerifyCallback={ toggleRecaptchaVerifyCallback }\r\n recaptchaExpiredCallback={ props.attributes.recaptcha_expired_callback }\r\n toggleRecaptchaExpiredCallback={ toggleRecaptchaExpiredCallback }\r\n submitButtonText={ props.attributes.submit_button_text }\r\n toggleSubmitButtonText={ toggleSubmitButtonText }\r\n />\r\n );\r\n\r\n}\r\n\r\nconst save_easy_form = function( props ) {\r\n return null;\r\n}\r\n\r\nconst settings = {\r\n title : __( 'Easy Forms for Mailchimp' ),\r\n category : 'common', // Options include \"common\", \"formatting\", \"layout\", \"widgets\" and \"embed.\"\r\n icon : 'email-alt',\r\n keywords : ['mailchimp', 'easy forms for mailchimp', 'yikes'],\r\n attributes: {\r\n form_id: {\r\n type: 'string',\r\n default: ''\r\n },\r\n form: {\r\n type: 'object'\r\n },\r\n form_description: {\r\n type: 'string',\r\n default: ''\r\n },\r\n show_description: {\r\n type: 'boolean',\r\n default: false\r\n },\r\n inline: {\r\n type: 'boolean',\r\n default: false\r\n },\r\n show_title: {\r\n type: 'boolean',\r\n default: false\r\n },\r\n form_title: {\r\n type: 'string',\r\n default: ''\r\n },\r\n is_ajax: {\r\n type: 'boolean',\r\n default: true,\r\n },\r\n recaptcha: {\r\n type: 'boolean',\r\n default: false,\r\n },\r\n recaptcha_theme: {\r\n type: 'string',\r\n default: 'light'\r\n },\r\n recaptcha_lang: {\r\n type: 'string',\r\n default: ''\r\n },\r\n recaptcha_type: {\r\n type: 'string',\r\n default: 'image'\r\n },\r\n recaptcha_size: {\r\n type: 'string',\r\n default: 'normal'\r\n },\r\n recaptcha_verify_callback: {\r\n type: 'string',\r\n default: ''\r\n },\r\n recaptcha_expired_callback: {\r\n type: 'string',\r\n default: ''\r\n },\r\n submit_button_text: {\r\n type: 'string',\r\n default: ''\r\n }\r\n },\r\n edit: edit_easy_form,\r\n save: save_easy_form,\r\n}\r\n\r\nconst EasyFormsBlock = registerBlockType(\r\n\r\n // Name\r\n ez_forms_gb_data.block_namespace + ez_forms_gb_data.block_name,\r\n\r\n // Settings\r\n settings\r\n);","\nvar content = require(\"!!../../node_modules/css-loader/index.js!../../node_modules/sass-loader/lib/loader.js!./easy-forms-block.scss\");\n\nif(typeof content === 'string') content = [[module.id, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = require(\"!../../node_modules/style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(module.hot) {\n\tmodule.hot.accept(\"!!../../node_modules/css-loader/index.js!../../node_modules/sass-loader/lib/loader.js!./easy-forms-block.scss\", function() {\n\t\tvar newContent = require(\"!!../../node_modules/css-loader/index.js!../../node_modules/sass-loader/lib/loader.js!./easy-forms-block.scss\");\n\n\t\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\n\n\t\tvar locals = (function(a, b) {\n\t\t\tvar key, idx = 0;\n\n\t\t\tfor(key in a) {\n\t\t\t\tif(!b || a[key] !== b[key]) return false;\n\t\t\t\tidx++;\n\t\t\t}\n\n\t\t\tfor(key in b) idx--;\n\n\t\t\treturn idx === 0;\n\t\t}(content.locals, newContent.locals));\n\n\t\tif(!locals) throw new Error('Aborting CSS HMR due to changed css-modules locals.');\n\n\t\tupdate(newContent);\n\t});\n\n\tmodule.hot.dispose(function() { update(); });\n}","import './easy-forms-block/dev-easy-forms-block.js';","/*!\n Copyright (c) 2017 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg) && arg.length) {\n\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\tif (inner) {\n\t\t\t\t\tclasses.push(inner);\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","exports = module.exports = require(\"../../node_modules/css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \".wp-block-yikes-inc-easy-forms-easy-forms-block textarea.yikes-mailchimp-submit-button-span-text {\\n background: none;\\n text-align: center; }\\n\\n.wp-block-yikes-inc-easy-forms-easy-forms-block select {\\n height: auto; }\\n\", \"\"]);\n\n// exports\n","/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\nmodule.exports = function(useSourceMap) {\n\tvar list = [];\n\n\t// return the list of modules as css string\n\tlist.toString = function toString() {\n\t\treturn this.map(function (item) {\n\t\t\tvar content = cssWithMappingToString(item, useSourceMap);\n\t\t\tif(item[2]) {\n\t\t\t\treturn \"@media \" + item[2] + \"{\" + content + \"}\";\n\t\t\t} else {\n\t\t\t\treturn content;\n\t\t\t}\n\t\t}).join(\"\");\n\t};\n\n\t// import a list of modules into the list\n\tlist.i = function(modules, mediaQuery) {\n\t\tif(typeof modules === \"string\")\n\t\t\tmodules = [[null, modules, \"\"]];\n\t\tvar alreadyImportedModules = {};\n\t\tfor(var i = 0; i < this.length; i++) {\n\t\t\tvar id = this[i][0];\n\t\t\tif(typeof id === \"number\")\n\t\t\t\talreadyImportedModules[id] = true;\n\t\t}\n\t\tfor(i = 0; i < modules.length; i++) {\n\t\t\tvar item = modules[i];\n\t\t\t// skip already imported module\n\t\t\t// this implementation is not 100% perfect for weird media query combinations\n\t\t\t// when a module is imported multiple times with different media queries.\n\t\t\t// I hope this will never occur (Hey this way we have smaller bundles)\n\t\t\tif(typeof item[0] !== \"number\" || !alreadyImportedModules[item[0]]) {\n\t\t\t\tif(mediaQuery && !item[2]) {\n\t\t\t\t\titem[2] = mediaQuery;\n\t\t\t\t} else if(mediaQuery) {\n\t\t\t\t\titem[2] = \"(\" + item[2] + \") and (\" + mediaQuery + \")\";\n\t\t\t\t}\n\t\t\t\tlist.push(item);\n\t\t\t}\n\t\t}\n\t};\n\treturn list;\n};\n\nfunction cssWithMappingToString(item, useSourceMap) {\n\tvar content = item[1] || '';\n\tvar cssMapping = item[3];\n\tif (!cssMapping) {\n\t\treturn content;\n\t}\n\n\tif (useSourceMap && typeof btoa === 'function') {\n\t\tvar sourceMapping = toComment(cssMapping);\n\t\tvar sourceURLs = cssMapping.sources.map(function (source) {\n\t\t\treturn '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */'\n\t\t});\n\n\t\treturn [content].concat(sourceURLs).concat([sourceMapping]).join('\\n');\n\t}\n\n\treturn [content].join('\\n');\n}\n\n// Adapted from convert-source-map (MIT)\nfunction toComment(sourceMap) {\n\t// eslint-disable-next-line no-undef\n\tvar base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));\n\tvar data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;\n\n\treturn '/*# ' + data + ' */';\n}\n","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar printWarning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n var loggedTypeFailures = {};\n\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n}\n\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n * @private\n */\nfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n if (process.env.NODE_ENV !== 'production') {\n for (var typeSpecName in typeSpecs) {\n if (typeSpecs.hasOwnProperty(typeSpecName)) {\n var error;\n // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n var err = Error(\n (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +\n 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.'\n );\n err.name = 'Invariant Violation';\n throw err;\n }\n error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n } catch (ex) {\n error = ex;\n }\n if (error && !(error instanceof Error)) {\n printWarning(\n (componentName || 'React class') + ': type specification of ' +\n location + ' `' + typeSpecName + '` is invalid; the type checker ' +\n 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +\n 'You may have forgotten to pass an argument to the type checker ' +\n 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +\n 'shape all require an argument).'\n )\n\n }\n if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error.message] = true;\n\n var stack = getStack ? getStack() : '';\n\n printWarning(\n 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')\n );\n }\n }\n }\n }\n}\n\nmodule.exports = checkPropTypes;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","!function(e,t){\"object\"==typeof exports&&\"object\"==typeof module?module.exports=t(require(\"react\")):\"function\"==typeof define&&define.amd?define([\"react\"],t):\"object\"==typeof exports?exports.ReactRecaptcha=t(require(\"react\")):e.ReactRecaptcha=t(e.React)}(this,function(e){return function(e){function t(r){if(a[r])return a[r].exports;var n=a[r]={exports:{},id:r,loaded:!1};return e[r].call(n.exports,n,n.exports,t),n.loaded=!0,n.exports}var a={};return t.m=e,t.c=a,t.p=\"\",t(0)}([function(e,t,a){\"use strict\";function r(e){return e&&e.__esModule?e:{default:e}}function n(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}function o(e,t){if(!e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!t||\"object\"!=typeof t&&\"function\"!=typeof t?e:t}function i(e,t){if(\"function\"!=typeof t&&null!==t)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,\"__esModule\",{value:!0});var l=function(){function e(e,t){for(var a=0;a<t.length;a++){var r=t[a];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,a,r){return a&&e(t.prototype,a),r&&e(t,r),t}}(),s=a(6),c=r(s),p=a(4),u=r(p),d={className:u.default.string,onloadCallbackName:u.default.string,elementID:u.default.string,onloadCallback:u.default.func,verifyCallback:u.default.func,expiredCallback:u.default.func,render:u.default.oneOf([\"onload\",\"explicit\"]),sitekey:u.default.string,theme:u.default.oneOf([\"light\",\"dark\"]),type:u.default.string,verifyCallbackName:u.default.string,expiredCallbackName:u.default.string,size:u.default.oneOf([\"invisible\",\"compact\",\"normal\"]),tabindex:u.default.string,hl:u.default.string,badge:u.default.oneOf([\"bottomright\",\"bottomleft\",\"inline\"])},f={elementID:\"g-recaptcha\",className:\"g-recaptcha\",onloadCallback:void 0,onloadCallbackName:\"onloadCallback\",verifyCallback:void 0,verifyCallbackName:\"verifyCallback\",expiredCallback:void 0,expiredCallbackName:\"expiredCallback\",render:\"onload\",theme:\"light\",type:\"image\",size:\"normal\",tabindex:\"0\",hl:\"en\",badge:\"bottomright\"},h=function(){return\"undefined\"!=typeof window&&\"undefined\"!=typeof window.grecaptcha&&\"function\"==typeof window.grecaptcha.render},y=void 0,b=function(e){function t(e){n(this,t);var a=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return a._renderGrecaptcha=a._renderGrecaptcha.bind(a),a.reset=a.reset.bind(a),a.state={ready:h(),widget:null},a.state.ready||\"undefined\"==typeof window||(y=setInterval(a._updateReadyState.bind(a),1e3)),a}return i(t,e),l(t,[{key:\"componentDidMount\",value:function(){this.state.ready&&this._renderGrecaptcha()}},{key:\"componentDidUpdate\",value:function(e,t){var a=this.props,r=a.render,n=a.onloadCallback;\"explicit\"===r&&n&&this.state.ready&&!t.ready&&this._renderGrecaptcha()}},{key:\"componentWillUnmount\",value:function(){clearInterval(y)}},{key:\"reset\",value:function(){var e=this.state,t=e.ready,a=e.widget;t&&null!==a&&grecaptcha.reset(a)}},{key:\"execute\",value:function(){var e=this.state,t=e.ready,a=e.widget;t&&null!==a&&grecaptcha.execute(a)}},{key:\"_updateReadyState\",value:function(){h()&&(this.setState({ready:!0}),clearInterval(y))}},{key:\"_renderGrecaptcha\",value:function(){this.state.widget=grecaptcha.render(this.props.elementID,{sitekey:this.props.sitekey,callback:this.props.verifyCallback?this.props.verifyCallback:void 0,theme:this.props.theme,type:this.props.type,size:this.props.size,tabindex:this.props.tabindex,hl:this.props.hl,badge:this.props.badge,\"expired-callback\":this.props.expiredCallback?this.props.expiredCallback:void 0}),this.props.onloadCallback&&this.props.onloadCallback()}},{key:\"render\",value:function(){return\"explicit\"===this.props.render&&this.props.onloadCallback?c.default.createElement(\"div\",{id:this.props.elementID,\"data-onloadcallbackname\":this.props.onloadCallbackName,\"data-verifycallbackname\":this.props.verifyCallbackName}):c.default.createElement(\"div\",{id:this.props.elementID,className:this.props.className,\"data-sitekey\":this.props.sitekey,\"data-theme\":this.props.theme,\"data-type\":this.props.type,\"data-size\":this.props.size,\"data-badge\":this.props.badge,\"data-tabindex\":this.props.tabindex})}}]),t}(s.Component);t.default=b,b.propTypes=d,b.defaultProps=f,e.exports=t.default},function(e,t){\"use strict\";function a(e){return function(){return e}}var r=function(){};r.thatReturns=a,r.thatReturnsFalse=a(!1),r.thatReturnsTrue=a(!0),r.thatReturnsNull=a(null),r.thatReturnsThis=function(){return this},r.thatReturnsArgument=function(e){return e},e.exports=r},function(e,t,a){\"use strict\";function r(e,t,a,r,o,i,l,s){if(n(t),!e){var c;if(void 0===t)c=new Error(\"Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.\");else{var p=[a,r,o,i,l,s],u=0;c=new Error(t.replace(/%s/g,function(){return p[u++]})),c.name=\"Invariant Violation\"}throw c.framesToPop=1,c}}var n=function(e){};e.exports=r},function(e,t,a){\"use strict\";var r=a(1),n=a(2),o=a(5);e.exports=function(){function e(e,t,a,r,i,l){l!==o&&n(!1,\"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types\")}function t(){return e}e.isRequired=e;var a={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t};return a.checkPropTypes=r,a.PropTypes=a,a}},function(e,t,a){e.exports=a(3)()},function(e,t){\"use strict\";var a=\"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED\";e.exports=a},function(t,a){t.exports=e}])});","/** @license React v16.6.0\n * react.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n'use strict';\n\nvar _assign = require('object-assign');\nvar checkPropTypes = require('prop-types/checkPropTypes');\n\n// TODO: this is special because it gets imported during build.\n\nvar ReactVersion = '16.6.0';\n\n// The Symbol used to tag the ReactElement-like types. If there is no native Symbol\n// nor polyfill, then a plain number is used for performance.\nvar hasSymbol = typeof Symbol === 'function' && Symbol.for;\n\nvar REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;\nvar REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;\nvar REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;\nvar REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;\nvar REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;\nvar REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;\nvar REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace;\nvar REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;\nvar REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;\nvar REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;\nvar REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;\nvar REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;\n\nvar MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\nvar FAUX_ITERATOR_SYMBOL = '@@iterator';\n\nfunction getIteratorFn(maybeIterable) {\n if (maybeIterable === null || typeof maybeIterable !== 'object') {\n return null;\n }\n var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];\n if (typeof maybeIterator === 'function') {\n return maybeIterator;\n }\n return null;\n}\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar validateFormat = function () {};\n\n{\n validateFormat = function (format) {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n };\n}\n\nfunction invariant(condition, format, a, b, c, d, e, f) {\n validateFormat(format);\n\n if (!condition) {\n var error = void 0;\n if (format === undefined) {\n error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(format.replace(/%s/g, function () {\n return args[argIndex++];\n }));\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n}\n\n// Relying on the `invariant()` implementation lets us\n// preserve the format and params in the www builds.\n\n/**\n * Forked from fbjs/warning:\n * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js\n *\n * Only change is we use console.warn instead of console.error,\n * and do nothing when 'console' is not supported.\n * This really simplifies the code.\n * ---\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar lowPriorityWarning = function () {};\n\n{\n var printWarning = function (format) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var argIndex = 0;\n var message = 'Warning: ' + format.replace(/%s/g, function () {\n return args[argIndex++];\n });\n if (typeof console !== 'undefined') {\n console.warn(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n\n lowPriorityWarning = function (condition, format) {\n if (format === undefined) {\n throw new Error('`lowPriorityWarning(condition, format, ...args)` requires a warning ' + 'message argument');\n }\n if (!condition) {\n for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {\n args[_key2 - 2] = arguments[_key2];\n }\n\n printWarning.apply(undefined, [format].concat(args));\n }\n };\n}\n\nvar lowPriorityWarning$1 = lowPriorityWarning;\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar warningWithoutStack = function () {};\n\n{\n warningWithoutStack = function (condition, format) {\n for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n args[_key - 2] = arguments[_key];\n }\n\n if (format === undefined) {\n throw new Error('`warningWithoutStack(condition, format, ...args)` requires a warning ' + 'message argument');\n }\n if (args.length > 8) {\n // Check before the condition to catch violations early.\n throw new Error('warningWithoutStack() currently supports at most 8 arguments.');\n }\n if (condition) {\n return;\n }\n if (typeof console !== 'undefined') {\n var _args$map = args.map(function (item) {\n return '' + item;\n }),\n a = _args$map[0],\n b = _args$map[1],\n c = _args$map[2],\n d = _args$map[3],\n e = _args$map[4],\n f = _args$map[5],\n g = _args$map[6],\n h = _args$map[7];\n\n var message = 'Warning: ' + format;\n\n // We intentionally don't use spread (or .apply) because it breaks IE9:\n // https://github.com/facebook/react/issues/13610\n switch (args.length) {\n case 0:\n console.error(message);\n break;\n case 1:\n console.error(message, a);\n break;\n case 2:\n console.error(message, a, b);\n break;\n case 3:\n console.error(message, a, b, c);\n break;\n case 4:\n console.error(message, a, b, c, d);\n break;\n case 5:\n console.error(message, a, b, c, d, e);\n break;\n case 6:\n console.error(message, a, b, c, d, e, f);\n break;\n case 7:\n console.error(message, a, b, c, d, e, f, g);\n break;\n case 8:\n console.error(message, a, b, c, d, e, f, g, h);\n break;\n default:\n throw new Error('warningWithoutStack() currently supports at most 8 arguments.');\n }\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n var argIndex = 0;\n var _message = 'Warning: ' + format.replace(/%s/g, function () {\n return args[argIndex++];\n });\n throw new Error(_message);\n } catch (x) {}\n };\n}\n\nvar warningWithoutStack$1 = warningWithoutStack;\n\nvar didWarnStateUpdateForUnmountedComponent = {};\n\nfunction warnNoop(publicInstance, callerName) {\n {\n var _constructor = publicInstance.constructor;\n var componentName = _constructor && (_constructor.displayName || _constructor.name) || 'ReactClass';\n var warningKey = componentName + '.' + callerName;\n if (didWarnStateUpdateForUnmountedComponent[warningKey]) {\n return;\n }\n warningWithoutStack$1(false, \"Can't call %s on a component that is not yet mounted. \" + 'This is a no-op, but it might indicate a bug in your application. ' + 'Instead, assign to `this.state` directly or define a `state = {};` ' + 'class property with the desired state in the %s component.', callerName, componentName);\n didWarnStateUpdateForUnmountedComponent[warningKey] = true;\n }\n}\n\n/**\n * This is the abstract API for an update queue.\n */\nvar ReactNoopUpdateQueue = {\n /**\n * Checks whether or not this composite component is mounted.\n * @param {ReactClass} publicInstance The instance we want to test.\n * @return {boolean} True if mounted, false otherwise.\n * @protected\n * @final\n */\n isMounted: function (publicInstance) {\n return false;\n },\n\n /**\n * Forces an update. This should only be invoked when it is known with\n * certainty that we are **not** in a DOM transaction.\n *\n * You may want to call this when you know that some deeper aspect of the\n * component's state has changed but `setState` was not called.\n *\n * This will not invoke `shouldComponentUpdate`, but it will invoke\n * `componentWillUpdate` and `componentDidUpdate`.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {?function} callback Called after component is updated.\n * @param {?string} callerName name of the calling function in the public API.\n * @internal\n */\n enqueueForceUpdate: function (publicInstance, callback, callerName) {\n warnNoop(publicInstance, 'forceUpdate');\n },\n\n /**\n * Replaces all of the state. Always use this or `setState` to mutate state.\n * You should treat `this.state` as immutable.\n *\n * There is no guarantee that `this.state` will be immediately updated, so\n * accessing `this.state` after calling this method may return the old value.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {object} completeState Next state.\n * @param {?function} callback Called after component is updated.\n * @param {?string} callerName name of the calling function in the public API.\n * @internal\n */\n enqueueReplaceState: function (publicInstance, completeState, callback, callerName) {\n warnNoop(publicInstance, 'replaceState');\n },\n\n /**\n * Sets a subset of the state. This only exists because _pendingState is\n * internal. This provides a merging strategy that is not available to deep\n * properties which is confusing. TODO: Expose pendingState or don't use it\n * during the merge.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {object} partialState Next partial state to be merged with state.\n * @param {?function} callback Called after component is updated.\n * @param {?string} Name of the calling function in the public API.\n * @internal\n */\n enqueueSetState: function (publicInstance, partialState, callback, callerName) {\n warnNoop(publicInstance, 'setState');\n }\n};\n\nvar emptyObject = {};\n{\n Object.freeze(emptyObject);\n}\n\n/**\n * Base class helpers for the updating state of a component.\n */\nfunction Component(props, context, updater) {\n this.props = props;\n this.context = context;\n // If a component has string refs, we will assign a different object later.\n this.refs = emptyObject;\n // We initialize the default updater but the real one gets injected by the\n // renderer.\n this.updater = updater || ReactNoopUpdateQueue;\n}\n\nComponent.prototype.isReactComponent = {};\n\n/**\n * Sets a subset of the state. Always use this to mutate\n * state. You should treat `this.state` as immutable.\n *\n * There is no guarantee that `this.state` will be immediately updated, so\n * accessing `this.state` after calling this method may return the old value.\n *\n * There is no guarantee that calls to `setState` will run synchronously,\n * as they may eventually be batched together. You can provide an optional\n * callback that will be executed when the call to setState is actually\n * completed.\n *\n * When a function is provided to setState, it will be called at some point in\n * the future (not synchronously). It will be called with the up to date\n * component arguments (state, props, context). These values can be different\n * from this.* because your function may be called after receiveProps but before\n * shouldComponentUpdate, and this new state, props, and context will not yet be\n * assigned to this.\n *\n * @param {object|function} partialState Next partial state or function to\n * produce next partial state to be merged with current state.\n * @param {?function} callback Called after state is updated.\n * @final\n * @protected\n */\nComponent.prototype.setState = function (partialState, callback) {\n !(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null) ? invariant(false, 'setState(...): takes an object of state variables to update or a function which returns an object of state variables.') : void 0;\n this.updater.enqueueSetState(this, partialState, callback, 'setState');\n};\n\n/**\n * Forces an update. This should only be invoked when it is known with\n * certainty that we are **not** in a DOM transaction.\n *\n * You may want to call this when you know that some deeper aspect of the\n * component's state has changed but `setState` was not called.\n *\n * This will not invoke `shouldComponentUpdate`, but it will invoke\n * `componentWillUpdate` and `componentDidUpdate`.\n *\n * @param {?function} callback Called after update is complete.\n * @final\n * @protected\n */\nComponent.prototype.forceUpdate = function (callback) {\n this.updater.enqueueForceUpdate(this, callback, 'forceUpdate');\n};\n\n/**\n * Deprecated APIs. These APIs used to exist on classic React classes but since\n * we would like to deprecate them, we're not going to move them over to this\n * modern base class. Instead, we define a getter that warns if it's accessed.\n */\n{\n var deprecatedAPIs = {\n isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],\n replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']\n };\n var defineDeprecationWarning = function (methodName, info) {\n Object.defineProperty(Component.prototype, methodName, {\n get: function () {\n lowPriorityWarning$1(false, '%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]);\n return undefined;\n }\n });\n };\n for (var fnName in deprecatedAPIs) {\n if (deprecatedAPIs.hasOwnProperty(fnName)) {\n defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);\n }\n }\n}\n\nfunction ComponentDummy() {}\nComponentDummy.prototype = Component.prototype;\n\n/**\n * Convenience component with default shallow equality check for sCU.\n */\nfunction PureComponent(props, context, updater) {\n this.props = props;\n this.context = context;\n // If a component has string refs, we will assign a different object later.\n this.refs = emptyObject;\n this.updater = updater || ReactNoopUpdateQueue;\n}\n\nvar pureComponentPrototype = PureComponent.prototype = new ComponentDummy();\npureComponentPrototype.constructor = PureComponent;\n// Avoid an extra prototype jump for these methods.\n_assign(pureComponentPrototype, Component.prototype);\npureComponentPrototype.isPureReactComponent = true;\n\n// an immutable object with a single mutable value\nfunction createRef() {\n var refObject = {\n current: null\n };\n {\n Object.seal(refObject);\n }\n return refObject;\n}\n\n/**\n * Keeps track of the current owner.\n *\n * The current owner is the component who should own any components that are\n * currently being constructed.\n */\nvar ReactCurrentOwner = {\n /**\n * @internal\n * @type {ReactComponent}\n */\n current: null,\n currentDispatcher: null\n};\n\nvar BEFORE_SLASH_RE = /^(.*)[\\\\\\/]/;\n\nvar describeComponentFrame = function (name, source, ownerName) {\n var sourceInfo = '';\n if (source) {\n var path = source.fileName;\n var fileName = path.replace(BEFORE_SLASH_RE, '');\n {\n // In DEV, include code for a common special case:\n // prefer \"folder/index.js\" instead of just \"index.js\".\n if (/^index\\./.test(fileName)) {\n var match = path.match(BEFORE_SLASH_RE);\n if (match) {\n var pathBeforeSlash = match[1];\n if (pathBeforeSlash) {\n var folderName = pathBeforeSlash.replace(BEFORE_SLASH_RE, '');\n fileName = folderName + '/' + fileName;\n }\n }\n }\n }\n sourceInfo = ' (at ' + fileName + ':' + source.lineNumber + ')';\n } else if (ownerName) {\n sourceInfo = ' (created by ' + ownerName + ')';\n }\n return '\\n in ' + (name || 'Unknown') + sourceInfo;\n};\n\nvar Resolved = 1;\n\n\nfunction refineResolvedLazyComponent(lazyComponent) {\n return lazyComponent._status === Resolved ? lazyComponent._result : null;\n}\n\nfunction getWrappedName(outerType, innerType, wrapperName) {\n var functionName = innerType.displayName || innerType.name || '';\n return outerType.displayName || (functionName !== '' ? wrapperName + '(' + functionName + ')' : wrapperName);\n}\n\nfunction getComponentName(type) {\n if (type == null) {\n // Host root, text node or just invalid type.\n return null;\n }\n {\n if (typeof type.tag === 'number') {\n warningWithoutStack$1(false, 'Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');\n }\n }\n if (typeof type === 'function') {\n return type.displayName || type.name || null;\n }\n if (typeof type === 'string') {\n return type;\n }\n switch (type) {\n case REACT_CONCURRENT_MODE_TYPE:\n return 'ConcurrentMode';\n case REACT_FRAGMENT_TYPE:\n return 'Fragment';\n case REACT_PORTAL_TYPE:\n return 'Portal';\n case REACT_PROFILER_TYPE:\n return 'Profiler';\n case REACT_STRICT_MODE_TYPE:\n return 'StrictMode';\n case REACT_SUSPENSE_TYPE:\n return 'Suspense';\n }\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_CONTEXT_TYPE:\n return 'Context.Consumer';\n case REACT_PROVIDER_TYPE:\n return 'Context.Provider';\n case REACT_FORWARD_REF_TYPE:\n return getWrappedName(type, type.render, 'ForwardRef');\n case REACT_MEMO_TYPE:\n return getComponentName(type.type);\n case REACT_LAZY_TYPE:\n {\n var thenable = type;\n var resolvedThenable = refineResolvedLazyComponent(thenable);\n if (resolvedThenable) {\n return getComponentName(resolvedThenable);\n }\n }\n }\n }\n return null;\n}\n\nvar ReactDebugCurrentFrame = {};\n\nvar currentlyValidatingElement = null;\n\nfunction setCurrentlyValidatingElement(element) {\n {\n currentlyValidatingElement = element;\n }\n}\n\n{\n // Stack implementation injected by the current renderer.\n ReactDebugCurrentFrame.getCurrentStack = null;\n\n ReactDebugCurrentFrame.getStackAddendum = function () {\n var stack = '';\n\n // Add an extra top frame while an element is being validated\n if (currentlyValidatingElement) {\n var name = getComponentName(currentlyValidatingElement.type);\n var owner = currentlyValidatingElement._owner;\n stack += describeComponentFrame(name, currentlyValidatingElement._source, owner && getComponentName(owner.type));\n }\n\n // Delegate to the injected renderer-specific implementation\n var impl = ReactDebugCurrentFrame.getCurrentStack;\n if (impl) {\n stack += impl() || '';\n }\n\n return stack;\n };\n}\n\nvar ReactSharedInternals = {\n ReactCurrentOwner: ReactCurrentOwner,\n // Used by renderers to avoid bundling object-assign twice in UMD bundles:\n assign: _assign\n};\n\n{\n _assign(ReactSharedInternals, {\n // These should not be included in production.\n ReactDebugCurrentFrame: ReactDebugCurrentFrame,\n // Shim for React DOM 16.0.0 which still destructured (but not used) this.\n // TODO: remove in React 17.0.\n ReactComponentTreeHook: {}\n });\n}\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar warning = warningWithoutStack$1;\n\n{\n warning = function (condition, format) {\n if (condition) {\n return;\n }\n var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n var stack = ReactDebugCurrentFrame.getStackAddendum();\n // eslint-disable-next-line react-internal/warning-and-invariant-args\n\n for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n args[_key - 2] = arguments[_key];\n }\n\n warningWithoutStack$1.apply(undefined, [false, format + '%s'].concat(args, [stack]));\n };\n}\n\nvar warning$1 = warning;\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar RESERVED_PROPS = {\n key: true,\n ref: true,\n __self: true,\n __source: true\n};\n\nvar specialPropKeyWarningShown = void 0;\nvar specialPropRefWarningShown = void 0;\n\nfunction hasValidRef(config) {\n {\n if (hasOwnProperty.call(config, 'ref')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n return config.ref !== undefined;\n}\n\nfunction hasValidKey(config) {\n {\n if (hasOwnProperty.call(config, 'key')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'key').get;\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n return config.key !== undefined;\n}\n\nfunction defineKeyPropWarningGetter(props, displayName) {\n var warnAboutAccessingKey = function () {\n if (!specialPropKeyWarningShown) {\n specialPropKeyWarningShown = true;\n warningWithoutStack$1(false, '%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName);\n }\n };\n warnAboutAccessingKey.isReactWarning = true;\n Object.defineProperty(props, 'key', {\n get: warnAboutAccessingKey,\n configurable: true\n });\n}\n\nfunction defineRefPropWarningGetter(props, displayName) {\n var warnAboutAccessingRef = function () {\n if (!specialPropRefWarningShown) {\n specialPropRefWarningShown = true;\n warningWithoutStack$1(false, '%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName);\n }\n };\n warnAboutAccessingRef.isReactWarning = true;\n Object.defineProperty(props, 'ref', {\n get: warnAboutAccessingRef,\n configurable: true\n });\n}\n\n/**\n * Factory method to create a new React element. This no longer adheres to\n * the class pattern, so do not use new to call it. Also, no instanceof check\n * will work. Instead test $$typeof field against Symbol.for('react.element') to check\n * if something is a React Element.\n *\n * @param {*} type\n * @param {*} key\n * @param {string|object} ref\n * @param {*} self A *temporary* helper to detect places where `this` is\n * different from the `owner` when React.createElement is called, so that we\n * can warn. We want to get rid of owner and replace string `ref`s with arrow\n * functions, and as long as `this` and owner are the same, there will be no\n * change in behavior.\n * @param {*} source An annotation object (added by a transpiler or otherwise)\n * indicating filename, line number, and/or other information.\n * @param {*} owner\n * @param {*} props\n * @internal\n */\nvar ReactElement = function (type, key, ref, self, source, owner, props) {\n var element = {\n // This tag allows us to uniquely identify this as a React Element\n $$typeof: REACT_ELEMENT_TYPE,\n\n // Built-in properties that belong on the element\n type: type,\n key: key,\n ref: ref,\n props: props,\n\n // Record the component responsible for creating this element.\n _owner: owner\n };\n\n {\n // The validation flag is currently mutative. We put it on\n // an external backing store so that we can freeze the whole object.\n // This can be replaced with a WeakMap once they are implemented in\n // commonly used development environments.\n element._store = {};\n\n // To make comparing ReactElements easier for testing purposes, we make\n // the validation flag non-enumerable (where possible, which should\n // include every environment we run tests in), so the test framework\n // ignores it.\n Object.defineProperty(element._store, 'validated', {\n configurable: false,\n enumerable: false,\n writable: true,\n value: false\n });\n // self and source are DEV only properties.\n Object.defineProperty(element, '_self', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: self\n });\n // Two elements created in two different places should be considered\n // equal for testing purposes and therefore we hide it from enumeration.\n Object.defineProperty(element, '_source', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: source\n });\n if (Object.freeze) {\n Object.freeze(element.props);\n Object.freeze(element);\n }\n }\n\n return element;\n};\n\n/**\n * Create and return a new ReactElement of the given type.\n * See https://reactjs.org/docs/react-api.html#createelement\n */\nfunction createElement(type, config, children) {\n var propName = void 0;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}\n\n/**\n * Return a function that produces ReactElements of a given type.\n * See https://reactjs.org/docs/react-api.html#createfactory\n */\n\n\nfunction cloneAndReplaceKey(oldElement, newKey) {\n var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);\n\n return newElement;\n}\n\n/**\n * Clone and return a new ReactElement using element as the starting point.\n * See https://reactjs.org/docs/react-api.html#cloneelement\n */\nfunction cloneElement(element, config, children) {\n !!(element === null || element === undefined) ? invariant(false, 'React.cloneElement(...): The argument must be a React element, but you passed %s.', element) : void 0;\n\n var propName = void 0;\n\n // Original props are copied\n var props = _assign({}, element.props);\n\n // Reserved names are extracted\n var key = element.key;\n var ref = element.ref;\n // Self is preserved since the owner is preserved.\n var self = element._self;\n // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n var source = element._source;\n\n // Owner will be preserved, unless ref is overridden\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n // Remaining properties override existing props\n var defaultProps = void 0;\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}\n\n/**\n * Verifies the object is a ReactElement.\n * See https://reactjs.org/docs/react-api.html#isvalidelement\n * @param {?object} object\n * @return {boolean} True if `object` is a ReactElement.\n * @final\n */\nfunction isValidElement(object) {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n}\n\nvar SEPARATOR = '.';\nvar SUBSEPARATOR = ':';\n\n/**\n * Escape and wrap key so it is safe to use as a reactid\n *\n * @param {string} key to be escaped.\n * @return {string} the escaped key.\n */\nfunction escape(key) {\n var escapeRegex = /[=:]/g;\n var escaperLookup = {\n '=': '=0',\n ':': '=2'\n };\n var escapedString = ('' + key).replace(escapeRegex, function (match) {\n return escaperLookup[match];\n });\n\n return '$' + escapedString;\n}\n\n/**\n * TODO: Test that a single child and an array with one item have the same key\n * pattern.\n */\n\nvar didWarnAboutMaps = false;\n\nvar userProvidedKeyEscapeRegex = /\\/+/g;\nfunction escapeUserProvidedKey(text) {\n return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/');\n}\n\nvar POOL_SIZE = 10;\nvar traverseContextPool = [];\nfunction getPooledTraverseContext(mapResult, keyPrefix, mapFunction, mapContext) {\n if (traverseContextPool.length) {\n var traverseContext = traverseContextPool.pop();\n traverseContext.result = mapResult;\n traverseContext.keyPrefix = keyPrefix;\n traverseContext.func = mapFunction;\n traverseContext.context = mapContext;\n traverseContext.count = 0;\n return traverseContext;\n } else {\n return {\n result: mapResult,\n keyPrefix: keyPrefix,\n func: mapFunction,\n context: mapContext,\n count: 0\n };\n }\n}\n\nfunction releaseTraverseContext(traverseContext) {\n traverseContext.result = null;\n traverseContext.keyPrefix = null;\n traverseContext.func = null;\n traverseContext.context = null;\n traverseContext.count = 0;\n if (traverseContextPool.length < POOL_SIZE) {\n traverseContextPool.push(traverseContext);\n }\n}\n\n/**\n * @param {?*} children Children tree container.\n * @param {!string} nameSoFar Name of the key path so far.\n * @param {!function} callback Callback to invoke with each child found.\n * @param {?*} traverseContext Used to pass information throughout the traversal\n * process.\n * @return {!number} The number of children in this subtree.\n */\nfunction traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) {\n var type = typeof children;\n\n if (type === 'undefined' || type === 'boolean') {\n // All of the above are perceived as null.\n children = null;\n }\n\n var invokeCallback = false;\n\n if (children === null) {\n invokeCallback = true;\n } else {\n switch (type) {\n case 'string':\n case 'number':\n invokeCallback = true;\n break;\n case 'object':\n switch (children.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n invokeCallback = true;\n }\n }\n }\n\n if (invokeCallback) {\n callback(traverseContext, children,\n // If it's the only child, treat the name as if it was wrapped in an array\n // so that it's consistent if the number of children grows.\n nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar);\n return 1;\n }\n\n var child = void 0;\n var nextName = void 0;\n var subtreeCount = 0; // Count of children found in the current subtree.\n var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;\n\n if (Array.isArray(children)) {\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n nextName = nextNamePrefix + getComponentKey(child, i);\n subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);\n }\n } else {\n var iteratorFn = getIteratorFn(children);\n if (typeof iteratorFn === 'function') {\n {\n // Warn about using Maps as children\n if (iteratorFn === children.entries) {\n !didWarnAboutMaps ? warning$1(false, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.') : void 0;\n didWarnAboutMaps = true;\n }\n }\n\n var iterator = iteratorFn.call(children);\n var step = void 0;\n var ii = 0;\n while (!(step = iterator.next()).done) {\n child = step.value;\n nextName = nextNamePrefix + getComponentKey(child, ii++);\n subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);\n }\n } else if (type === 'object') {\n var addendum = '';\n {\n addendum = ' If you meant to render a collection of children, use an array ' + 'instead.' + ReactDebugCurrentFrame.getStackAddendum();\n }\n var childrenString = '' + children;\n invariant(false, 'Objects are not valid as a React child (found: %s).%s', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum);\n }\n }\n\n return subtreeCount;\n}\n\n/**\n * Traverses children that are typically specified as `props.children`, but\n * might also be specified through attributes:\n *\n * - `traverseAllChildren(this.props.children, ...)`\n * - `traverseAllChildren(this.props.leftPanelChildren, ...)`\n *\n * The `traverseContext` is an optional argument that is passed through the\n * entire traversal. It can be used to store accumulations or anything else that\n * the callback might find relevant.\n *\n * @param {?*} children Children tree object.\n * @param {!function} callback To invoke upon traversing each child.\n * @param {?*} traverseContext Context for traversal.\n * @return {!number} The number of children in this subtree.\n */\nfunction traverseAllChildren(children, callback, traverseContext) {\n if (children == null) {\n return 0;\n }\n\n return traverseAllChildrenImpl(children, '', callback, traverseContext);\n}\n\n/**\n * Generate a key string that identifies a component within a set.\n *\n * @param {*} component A component that could contain a manual key.\n * @param {number} index Index that is used if a manual key is not provided.\n * @return {string}\n */\nfunction getComponentKey(component, index) {\n // Do some typechecking here since we call this blindly. We want to ensure\n // that we don't block potential future ES APIs.\n if (typeof component === 'object' && component !== null && component.key != null) {\n // Explicit key\n return escape(component.key);\n }\n // Implicit key determined by the index in the set\n return index.toString(36);\n}\n\nfunction forEachSingleChild(bookKeeping, child, name) {\n var func = bookKeeping.func,\n context = bookKeeping.context;\n\n func.call(context, child, bookKeeping.count++);\n}\n\n/**\n * Iterates through children that are typically specified as `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenforeach\n *\n * The provided forEachFunc(child, index) will be called for each\n * leaf child.\n *\n * @param {?*} children Children tree container.\n * @param {function(*, int)} forEachFunc\n * @param {*} forEachContext Context for forEachContext.\n */\nfunction forEachChildren(children, forEachFunc, forEachContext) {\n if (children == null) {\n return children;\n }\n var traverseContext = getPooledTraverseContext(null, null, forEachFunc, forEachContext);\n traverseAllChildren(children, forEachSingleChild, traverseContext);\n releaseTraverseContext(traverseContext);\n}\n\nfunction mapSingleChildIntoContext(bookKeeping, child, childKey) {\n var result = bookKeeping.result,\n keyPrefix = bookKeeping.keyPrefix,\n func = bookKeeping.func,\n context = bookKeeping.context;\n\n\n var mappedChild = func.call(context, child, bookKeeping.count++);\n if (Array.isArray(mappedChild)) {\n mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, function (c) {\n return c;\n });\n } else if (mappedChild != null) {\n if (isValidElement(mappedChild)) {\n mappedChild = cloneAndReplaceKey(mappedChild,\n // Keep both the (mapped) and old keys if they differ, just as\n // traverseAllChildren used to do for objects as children\n keyPrefix + (mappedChild.key && (!child || child.key !== mappedChild.key) ? escapeUserProvidedKey(mappedChild.key) + '/' : '') + childKey);\n }\n result.push(mappedChild);\n }\n}\n\nfunction mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) {\n var escapedPrefix = '';\n if (prefix != null) {\n escapedPrefix = escapeUserProvidedKey(prefix) + '/';\n }\n var traverseContext = getPooledTraverseContext(array, escapedPrefix, func, context);\n traverseAllChildren(children, mapSingleChildIntoContext, traverseContext);\n releaseTraverseContext(traverseContext);\n}\n\n/**\n * Maps children that are typically specified as `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenmap\n *\n * The provided mapFunction(child, key, index) will be called for each\n * leaf child.\n *\n * @param {?*} children Children tree container.\n * @param {function(*, int)} func The map function.\n * @param {*} context Context for mapFunction.\n * @return {object} Object containing the ordered map of results.\n */\nfunction mapChildren(children, func, context) {\n if (children == null) {\n return children;\n }\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, func, context);\n return result;\n}\n\n/**\n * Count the number of children that are typically specified as\n * `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrencount\n *\n * @param {?*} children Children tree container.\n * @return {number} The number of children.\n */\nfunction countChildren(children) {\n return traverseAllChildren(children, function () {\n return null;\n }, null);\n}\n\n/**\n * Flatten a children object (typically specified as `props.children`) and\n * return an array with appropriately re-keyed children.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrentoarray\n */\nfunction toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, function (child) {\n return child;\n });\n return result;\n}\n\n/**\n * Returns the first child in a collection of children and verifies that there\n * is only one child in the collection.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenonly\n *\n * The current implementation of this function assumes that a single child gets\n * passed without a wrapper, but the purpose of this helper function is to\n * abstract away the particular structure of children.\n *\n * @param {?object} children Child collection structure.\n * @return {ReactElement} The first and only `ReactElement` contained in the\n * structure.\n */\nfunction onlyChild(children) {\n !isValidElement(children) ? invariant(false, 'React.Children.only expected to receive a single React element child.') : void 0;\n return children;\n}\n\nfunction createContext(defaultValue, calculateChangedBits) {\n if (calculateChangedBits === undefined) {\n calculateChangedBits = null;\n } else {\n {\n !(calculateChangedBits === null || typeof calculateChangedBits === 'function') ? warningWithoutStack$1(false, 'createContext: Expected the optional second argument to be a ' + 'function. Instead received: %s', calculateChangedBits) : void 0;\n }\n }\n\n var context = {\n $$typeof: REACT_CONTEXT_TYPE,\n _calculateChangedBits: calculateChangedBits,\n // As a workaround to support multiple concurrent renderers, we categorize\n // some renderers as primary and others as secondary. We only expect\n // there to be two concurrent renderers at most: React Native (primary) and\n // Fabric (secondary); React DOM (primary) and React ART (secondary).\n // Secondary renderers store their context values on separate fields.\n _currentValue: defaultValue,\n _currentValue2: defaultValue,\n // These are circular\n Provider: null,\n Consumer: null\n };\n\n context.Provider = {\n $$typeof: REACT_PROVIDER_TYPE,\n _context: context\n };\n\n var hasWarnedAboutUsingNestedContextConsumers = false;\n var hasWarnedAboutUsingConsumerProvider = false;\n\n {\n // A separate object, but proxies back to the original context object for\n // backwards compatibility. It has a different $$typeof, so we can properly\n // warn for the incorrect usage of Context as a Consumer.\n var Consumer = {\n $$typeof: REACT_CONTEXT_TYPE,\n _context: context,\n _calculateChangedBits: context._calculateChangedBits\n };\n // $FlowFixMe: Flow complains about not setting a value, which is intentional here\n Object.defineProperties(Consumer, {\n Provider: {\n get: function () {\n if (!hasWarnedAboutUsingConsumerProvider) {\n hasWarnedAboutUsingConsumerProvider = true;\n warning$1(false, 'Rendering <Context.Consumer.Provider> is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Provider> instead?');\n }\n return context.Provider;\n },\n set: function (_Provider) {\n context.Provider = _Provider;\n }\n },\n _currentValue: {\n get: function () {\n return context._currentValue;\n },\n set: function (_currentValue) {\n context._currentValue = _currentValue;\n }\n },\n _currentValue2: {\n get: function () {\n return context._currentValue2;\n },\n set: function (_currentValue2) {\n context._currentValue2 = _currentValue2;\n }\n },\n Consumer: {\n get: function () {\n if (!hasWarnedAboutUsingNestedContextConsumers) {\n hasWarnedAboutUsingNestedContextConsumers = true;\n warning$1(false, 'Rendering <Context.Consumer.Consumer> is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Consumer> instead?');\n }\n return context.Consumer;\n }\n }\n });\n // $FlowFixMe: Flow complains about missing properties because it doesn't understand defineProperty\n context.Consumer = Consumer;\n }\n\n {\n context._currentRenderer = null;\n context._currentRenderer2 = null;\n }\n\n return context;\n}\n\nfunction lazy(ctor) {\n return {\n $$typeof: REACT_LAZY_TYPE,\n _ctor: ctor,\n // React uses these fields to store the result.\n _status: -1,\n _result: null\n };\n}\n\nfunction forwardRef(render) {\n {\n if (typeof render !== 'function') {\n warningWithoutStack$1(false, 'forwardRef requires a render function but was given %s.', render === null ? 'null' : typeof render);\n } else {\n !(\n // Do not warn for 0 arguments because it could be due to usage of the 'arguments' object\n render.length === 0 || render.length === 2) ? warningWithoutStack$1(false, 'forwardRef render functions accept exactly two parameters: props and ref. %s', render.length === 1 ? 'Did you forget to use the ref parameter?' : 'Any additional parameter will be undefined.') : void 0;\n }\n\n if (render != null) {\n !(render.defaultProps == null && render.propTypes == null) ? warningWithoutStack$1(false, 'forwardRef render functions do not support propTypes or defaultProps. ' + 'Did you accidentally pass a React component?') : void 0;\n }\n }\n\n return {\n $$typeof: REACT_FORWARD_REF_TYPE,\n render: render\n };\n}\n\nfunction isValidElementType(type) {\n return typeof type === 'string' || typeof type === 'function' ||\n // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.\n type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE);\n}\n\nfunction memo(type, compare) {\n {\n if (!isValidElementType(type)) {\n warningWithoutStack$1(false, 'memo: The first argument must be a component. Instead ' + 'received: %s', type === null ? 'null' : typeof type);\n }\n }\n return {\n $$typeof: REACT_MEMO_TYPE,\n type: type,\n compare: compare === undefined ? null : compare\n };\n}\n\n/**\n * ReactElementValidator provides a wrapper around a element factory\n * which validates the props passed to the element. This is intended to be\n * used only in DEV and could be replaced by a static type checker for languages\n * that support it.\n */\n\nvar propTypesMisspellWarningShown = void 0;\n\n{\n propTypesMisspellWarningShown = false;\n}\n\nfunction getDeclarationErrorAddendum() {\n if (ReactCurrentOwner.current) {\n var name = getComponentName(ReactCurrentOwner.current.type);\n if (name) {\n return '\\n\\nCheck the render method of `' + name + '`.';\n }\n }\n return '';\n}\n\nfunction getSourceInfoErrorAddendum(elementProps) {\n if (elementProps !== null && elementProps !== undefined && elementProps.__source !== undefined) {\n var source = elementProps.__source;\n var fileName = source.fileName.replace(/^.*[\\\\\\/]/, '');\n var lineNumber = source.lineNumber;\n return '\\n\\nCheck your code at ' + fileName + ':' + lineNumber + '.';\n }\n return '';\n}\n\n/**\n * Warn if there's no key explicitly set on dynamic arrays of children or\n * object keys are not valid. This allows us to keep track of children between\n * updates.\n */\nvar ownerHasKeyUseWarning = {};\n\nfunction getCurrentComponentErrorInfo(parentType) {\n var info = getDeclarationErrorAddendum();\n\n if (!info) {\n var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;\n if (parentName) {\n info = '\\n\\nCheck the top-level render call using <' + parentName + '>.';\n }\n }\n return info;\n}\n\n/**\n * Warn if the element doesn't have an explicit key assigned to it.\n * This element is in an array. The array could grow and shrink or be\n * reordered. All children that haven't already been validated are required to\n * have a \"key\" property assigned to it. Error statuses are cached so a warning\n * will only be shown once.\n *\n * @internal\n * @param {ReactElement} element Element that requires a key.\n * @param {*} parentType element's parent's type.\n */\nfunction validateExplicitKey(element, parentType) {\n if (!element._store || element._store.validated || element.key != null) {\n return;\n }\n element._store.validated = true;\n\n var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);\n if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {\n return;\n }\n ownerHasKeyUseWarning[currentComponentErrorInfo] = true;\n\n // Usually the current owner is the offender, but if it accepts children as a\n // property, it may be the creator of the child that's responsible for\n // assigning it a key.\n var childOwner = '';\n if (element && element._owner && element._owner !== ReactCurrentOwner.current) {\n // Give the component that originally created this child.\n childOwner = ' It was passed a child from ' + getComponentName(element._owner.type) + '.';\n }\n\n setCurrentlyValidatingElement(element);\n {\n warning$1(false, 'Each child in an array or iterator should have a unique \"key\" prop.' + '%s%s See https://fb.me/react-warning-keys for more information.', currentComponentErrorInfo, childOwner);\n }\n setCurrentlyValidatingElement(null);\n}\n\n/**\n * Ensure that every element either is passed in a static location, in an\n * array with an explicit keys property defined, or in an object literal\n * with valid key property.\n *\n * @internal\n * @param {ReactNode} node Statically passed child of any type.\n * @param {*} parentType node's parent's type.\n */\nfunction validateChildKeys(node, parentType) {\n if (typeof node !== 'object') {\n return;\n }\n if (Array.isArray(node)) {\n for (var i = 0; i < node.length; i++) {\n var child = node[i];\n if (isValidElement(child)) {\n validateExplicitKey(child, parentType);\n }\n }\n } else if (isValidElement(node)) {\n // This element was passed in a valid location.\n if (node._store) {\n node._store.validated = true;\n }\n } else if (node) {\n var iteratorFn = getIteratorFn(node);\n if (typeof iteratorFn === 'function') {\n // Entry iterators used to provide implicit keys,\n // but now we print a separate warning for them later.\n if (iteratorFn !== node.entries) {\n var iterator = iteratorFn.call(node);\n var step = void 0;\n while (!(step = iterator.next()).done) {\n if (isValidElement(step.value)) {\n validateExplicitKey(step.value, parentType);\n }\n }\n }\n }\n }\n}\n\n/**\n * Given an element, validate that its props follow the propTypes definition,\n * provided by the type.\n *\n * @param {ReactElement} element\n */\nfunction validatePropTypes(element) {\n var type = element.type;\n var name = void 0,\n propTypes = void 0;\n if (typeof type === 'function') {\n // Class or function component\n name = type.displayName || type.name;\n propTypes = type.propTypes;\n } else if (typeof type === 'object' && type !== null && type.$$typeof === REACT_FORWARD_REF_TYPE) {\n // ForwardRef\n var functionName = type.render.displayName || type.render.name || '';\n name = type.displayName || (functionName !== '' ? 'ForwardRef(' + functionName + ')' : 'ForwardRef');\n propTypes = type.propTypes;\n } else {\n return;\n }\n if (propTypes) {\n setCurrentlyValidatingElement(element);\n checkPropTypes(propTypes, element.props, 'prop', name, ReactDebugCurrentFrame.getStackAddendum);\n setCurrentlyValidatingElement(null);\n } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {\n propTypesMisspellWarningShown = true;\n warningWithoutStack$1(false, 'Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', name || 'Unknown');\n }\n if (typeof type.getDefaultProps === 'function') {\n !type.getDefaultProps.isReactClassApproved ? warningWithoutStack$1(false, 'getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.') : void 0;\n }\n}\n\n/**\n * Given a fragment, validate that it can only be provided with fragment props\n * @param {ReactElement} fragment\n */\nfunction validateFragmentProps(fragment) {\n setCurrentlyValidatingElement(fragment);\n\n var keys = Object.keys(fragment.props);\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n if (key !== 'children' && key !== 'key') {\n warning$1(false, 'Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);\n break;\n }\n }\n\n if (fragment.ref !== null) {\n warning$1(false, 'Invalid attribute `ref` supplied to `React.Fragment`.');\n }\n\n setCurrentlyValidatingElement(null);\n}\n\nfunction createElementWithValidation(type, props, children) {\n var validType = isValidElementType(type);\n\n // We warn in this case but don't throw. We expect the element creation to\n // succeed and there will likely be errors in render.\n if (!validType) {\n var info = '';\n if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {\n info += ' You likely forgot to export your component from the file ' + \"it's defined in, or you might have mixed up default and named imports.\";\n }\n\n var sourceInfo = getSourceInfoErrorAddendum(props);\n if (sourceInfo) {\n info += sourceInfo;\n } else {\n info += getDeclarationErrorAddendum();\n }\n\n var typeString = void 0;\n if (type === null) {\n typeString = 'null';\n } else if (Array.isArray(type)) {\n typeString = 'array';\n } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {\n typeString = '<' + (getComponentName(type.type) || 'Unknown') + ' />';\n info = ' Did you accidentally export a JSX literal instead of a component?';\n } else {\n typeString = typeof type;\n }\n\n warning$1(false, 'React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);\n }\n\n var element = createElement.apply(this, arguments);\n\n // The result can be nullish if a mock or a custom function is used.\n // TODO: Drop this when these are no longer allowed as the type argument.\n if (element == null) {\n return element;\n }\n\n // Skip key warning if the type isn't valid since our key validation logic\n // doesn't expect a non-string/function type and can throw confusing errors.\n // We don't want exception behavior to differ between dev and prod.\n // (Rendering will throw with a helpful message and as soon as the type is\n // fixed, the key warnings will appear.)\n if (validType) {\n for (var i = 2; i < arguments.length; i++) {\n validateChildKeys(arguments[i], type);\n }\n }\n\n if (type === REACT_FRAGMENT_TYPE) {\n validateFragmentProps(element);\n } else {\n validatePropTypes(element);\n }\n\n return element;\n}\n\nfunction createFactoryWithValidation(type) {\n var validatedFactory = createElementWithValidation.bind(null, type);\n validatedFactory.type = type;\n // Legacy hook: remove it\n {\n Object.defineProperty(validatedFactory, 'type', {\n enumerable: false,\n get: function () {\n lowPriorityWarning$1(false, 'Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.');\n Object.defineProperty(this, 'type', {\n value: type\n });\n return type;\n }\n });\n }\n\n return validatedFactory;\n}\n\nfunction cloneElementWithValidation(element, props, children) {\n var newElement = cloneElement.apply(this, arguments);\n for (var i = 2; i < arguments.length; i++) {\n validateChildKeys(arguments[i], newElement.type);\n }\n validatePropTypes(newElement);\n return newElement;\n}\n\nvar React = {\n Children: {\n map: mapChildren,\n forEach: forEachChildren,\n count: countChildren,\n toArray: toArray,\n only: onlyChild\n },\n\n createRef: createRef,\n Component: Component,\n PureComponent: PureComponent,\n\n createContext: createContext,\n forwardRef: forwardRef,\n lazy: lazy,\n memo: memo,\n\n Fragment: REACT_FRAGMENT_TYPE,\n StrictMode: REACT_STRICT_MODE_TYPE,\n unstable_ConcurrentMode: REACT_CONCURRENT_MODE_TYPE,\n Suspense: REACT_SUSPENSE_TYPE,\n unstable_Profiler: REACT_PROFILER_TYPE,\n\n createElement: createElementWithValidation,\n cloneElement: cloneElementWithValidation,\n createFactory: createFactoryWithValidation,\n isValidElement: isValidElement,\n\n version: ReactVersion,\n\n __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: ReactSharedInternals\n};\n\n\n\nvar React$2 = Object.freeze({\n\tdefault: React\n});\n\nvar React$3 = ( React$2 && React ) || React$2;\n\n// TODO: decide on the top-level export form.\n// This is hacky but makes it work with both Rollup and Jest.\nvar react = React$3.default || React$3;\n\nmodule.exports = react;\n })();\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react.production.min.js');\n} else {\n module.exports = require('./cjs/react.development.js');\n}\n","/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra\n*/\n\nvar stylesInDom = {};\n\nvar\tmemoize = function (fn) {\n\tvar memo;\n\n\treturn function () {\n\t\tif (typeof memo === \"undefined\") memo = fn.apply(this, arguments);\n\t\treturn memo;\n\t};\n};\n\nvar isOldIE = memoize(function () {\n\t// Test for IE <= 9 as proposed by Browserhacks\n\t// @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805\n\t// Tests for existence of standard globals is to allow style-loader\n\t// to operate correctly into non-standard environments\n\t// @see https://github.com/webpack-contrib/style-loader/issues/177\n\treturn window && document && document.all && !window.atob;\n});\n\nvar getTarget = function (target) {\n return document.querySelector(target);\n};\n\nvar getElement = (function (fn) {\n\tvar memo = {};\n\n\treturn function(target) {\n // If passing function in options, then use it for resolve \"head\" element.\n // Useful for Shadow Root style i.e\n // {\n // insertInto: function () { return document.querySelector(\"#foo\").shadowRoot }\n // }\n if (typeof target === 'function') {\n return target();\n }\n if (typeof memo[target] === \"undefined\") {\n\t\t\tvar styleTarget = getTarget.call(this, target);\n\t\t\t// Special case to return head of iframe instead of iframe itself\n\t\t\tif (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n\t\t\t\ttry {\n\t\t\t\t\t// This will throw an exception if access to iframe is blocked\n\t\t\t\t\t// due to cross-origin restrictions\n\t\t\t\t\tstyleTarget = styleTarget.contentDocument.head;\n\t\t\t\t} catch(e) {\n\t\t\t\t\tstyleTarget = null;\n\t\t\t\t}\n\t\t\t}\n\t\t\tmemo[target] = styleTarget;\n\t\t}\n\t\treturn memo[target]\n\t};\n})();\n\nvar singleton = null;\nvar\tsingletonCounter = 0;\nvar\tstylesInsertedAtTop = [];\n\nvar\tfixUrls = require(\"./urls\");\n\nmodule.exports = function(list, options) {\n\tif (typeof DEBUG !== \"undefined\" && DEBUG) {\n\t\tif (typeof document !== \"object\") throw new Error(\"The style-loader cannot be used in a non-browser environment\");\n\t}\n\n\toptions = options || {};\n\n\toptions.attrs = typeof options.attrs === \"object\" ? options.attrs : {};\n\n\t// Force single-tag solution on IE6-9, which has a hard limit on the # of <style>\n\t// tags it will allow on a page\n\tif (!options.singleton && typeof options.singleton !== \"boolean\") options.singleton = isOldIE();\n\n\t// By default, add <style> tags to the <head> element\n if (!options.insertInto) options.insertInto = \"head\";\n\n\t// By default, add <style> tags to the bottom of the target\n\tif (!options.insertAt) options.insertAt = \"bottom\";\n\n\tvar styles = listToStyles(list, options);\n\n\taddStylesToDom(styles, options);\n\n\treturn function update (newList) {\n\t\tvar mayRemove = [];\n\n\t\tfor (var i = 0; i < styles.length; i++) {\n\t\t\tvar item = styles[i];\n\t\t\tvar domStyle = stylesInDom[item.id];\n\n\t\t\tdomStyle.refs--;\n\t\t\tmayRemove.push(domStyle);\n\t\t}\n\n\t\tif(newList) {\n\t\t\tvar newStyles = listToStyles(newList, options);\n\t\t\taddStylesToDom(newStyles, options);\n\t\t}\n\n\t\tfor (var i = 0; i < mayRemove.length; i++) {\n\t\t\tvar domStyle = mayRemove[i];\n\n\t\t\tif(domStyle.refs === 0) {\n\t\t\t\tfor (var j = 0; j < domStyle.parts.length; j++) domStyle.parts[j]();\n\n\t\t\t\tdelete stylesInDom[domStyle.id];\n\t\t\t}\n\t\t}\n\t};\n};\n\nfunction addStylesToDom (styles, options) {\n\tfor (var i = 0; i < styles.length; i++) {\n\t\tvar item = styles[i];\n\t\tvar domStyle = stylesInDom[item.id];\n\n\t\tif(domStyle) {\n\t\t\tdomStyle.refs++;\n\n\t\t\tfor(var j = 0; j < domStyle.parts.length; j++) {\n\t\t\t\tdomStyle.parts[j](item.parts[j]);\n\t\t\t}\n\n\t\t\tfor(; j < item.parts.length; j++) {\n\t\t\t\tdomStyle.parts.push(addStyle(item.parts[j], options));\n\t\t\t}\n\t\t} else {\n\t\t\tvar parts = [];\n\n\t\t\tfor(var j = 0; j < item.parts.length; j++) {\n\t\t\t\tparts.push(addStyle(item.parts[j], options));\n\t\t\t}\n\n\t\t\tstylesInDom[item.id] = {id: item.id, refs: 1, parts: parts};\n\t\t}\n\t}\n}\n\nfunction listToStyles (list, options) {\n\tvar styles = [];\n\tvar newStyles = {};\n\n\tfor (var i = 0; i < list.length; i++) {\n\t\tvar item = list[i];\n\t\tvar id = options.base ? item[0] + options.base : item[0];\n\t\tvar css = item[1];\n\t\tvar media = item[2];\n\t\tvar sourceMap = item[3];\n\t\tvar part = {css: css, media: media, sourceMap: sourceMap};\n\n\t\tif(!newStyles[id]) styles.push(newStyles[id] = {id: id, parts: [part]});\n\t\telse newStyles[id].parts.push(part);\n\t}\n\n\treturn styles;\n}\n\nfunction insertStyleElement (options, style) {\n\tvar target = getElement(options.insertInto)\n\n\tif (!target) {\n\t\tthrow new Error(\"Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.\");\n\t}\n\n\tvar lastStyleElementInsertedAtTop = stylesInsertedAtTop[stylesInsertedAtTop.length - 1];\n\n\tif (options.insertAt === \"top\") {\n\t\tif (!lastStyleElementInsertedAtTop) {\n\t\t\ttarget.insertBefore(style, target.firstChild);\n\t\t} else if (lastStyleElementInsertedAtTop.nextSibling) {\n\t\t\ttarget.insertBefore(style, lastStyleElementInsertedAtTop.nextSibling);\n\t\t} else {\n\t\t\ttarget.appendChild(style);\n\t\t}\n\t\tstylesInsertedAtTop.push(style);\n\t} else if (options.insertAt === \"bottom\") {\n\t\ttarget.appendChild(style);\n\t} else if (typeof options.insertAt === \"object\" && options.insertAt.before) {\n\t\tvar nextSibling = getElement(options.insertInto + \" \" + options.insertAt.before);\n\t\ttarget.insertBefore(style, nextSibling);\n\t} else {\n\t\tthrow new Error(\"[Style Loader]\\n\\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\\n Must be 'top', 'bottom', or Object.\\n (https://github.com/webpack-contrib/style-loader#insertat)\\n\");\n\t}\n}\n\nfunction removeStyleElement (style) {\n\tif (style.parentNode === null) return false;\n\tstyle.parentNode.removeChild(style);\n\n\tvar idx = stylesInsertedAtTop.indexOf(style);\n\tif(idx >= 0) {\n\t\tstylesInsertedAtTop.splice(idx, 1);\n\t}\n}\n\nfunction createStyleElement (options) {\n\tvar style = document.createElement(\"style\");\n\n\toptions.attrs.type = \"text/css\";\n\n\taddAttrs(style, options.attrs);\n\tinsertStyleElement(options, style);\n\n\treturn style;\n}\n\nfunction createLinkElement (options) {\n\tvar link = document.createElement(\"link\");\n\n\toptions.attrs.type = \"text/css\";\n\toptions.attrs.rel = \"stylesheet\";\n\n\taddAttrs(link, options.attrs);\n\tinsertStyleElement(options, link);\n\n\treturn link;\n}\n\nfunction addAttrs (el, attrs) {\n\tObject.keys(attrs).forEach(function (key) {\n\t\tel.setAttribute(key, attrs[key]);\n\t});\n}\n\nfunction addStyle (obj, options) {\n\tvar style, update, remove, result;\n\n\t// If a transform function was defined, run it on the css\n\tif (options.transform && obj.css) {\n\t result = options.transform(obj.css);\n\n\t if (result) {\n\t \t// If transform returns a value, use that instead of the original css.\n\t \t// This allows running runtime transformations on the css.\n\t \tobj.css = result;\n\t } else {\n\t \t// If the transform function returns a falsy value, don't add this css.\n\t \t// This allows conditional loading of css\n\t \treturn function() {\n\t \t\t// noop\n\t \t};\n\t }\n\t}\n\n\tif (options.singleton) {\n\t\tvar styleIndex = singletonCounter++;\n\n\t\tstyle = singleton || (singleton = createStyleElement(options));\n\n\t\tupdate = applyToSingletonTag.bind(null, style, styleIndex, false);\n\t\tremove = applyToSingletonTag.bind(null, style, styleIndex, true);\n\n\t} else if (\n\t\tobj.sourceMap &&\n\t\ttypeof URL === \"function\" &&\n\t\ttypeof URL.createObjectURL === \"function\" &&\n\t\ttypeof URL.revokeObjectURL === \"function\" &&\n\t\ttypeof Blob === \"function\" &&\n\t\ttypeof btoa === \"function\"\n\t) {\n\t\tstyle = createLinkElement(options);\n\t\tupdate = updateLink.bind(null, style, options);\n\t\tremove = function () {\n\t\t\tremoveStyleElement(style);\n\n\t\t\tif(style.href) URL.revokeObjectURL(style.href);\n\t\t};\n\t} else {\n\t\tstyle = createStyleElement(options);\n\t\tupdate = applyToTag.bind(null, style);\n\t\tremove = function () {\n\t\t\tremoveStyleElement(style);\n\t\t};\n\t}\n\n\tupdate(obj);\n\n\treturn function updateStyle (newObj) {\n\t\tif (newObj) {\n\t\t\tif (\n\t\t\t\tnewObj.css === obj.css &&\n\t\t\t\tnewObj.media === obj.media &&\n\t\t\t\tnewObj.sourceMap === obj.sourceMap\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tupdate(obj = newObj);\n\t\t} else {\n\t\t\tremove();\n\t\t}\n\t};\n}\n\nvar replaceText = (function () {\n\tvar textStore = [];\n\n\treturn function (index, replacement) {\n\t\ttextStore[index] = replacement;\n\n\t\treturn textStore.filter(Boolean).join('\\n');\n\t};\n})();\n\nfunction applyToSingletonTag (style, index, remove, obj) {\n\tvar css = remove ? \"\" : obj.css;\n\n\tif (style.styleSheet) {\n\t\tstyle.styleSheet.cssText = replaceText(index, css);\n\t} else {\n\t\tvar cssNode = document.createTextNode(css);\n\t\tvar childNodes = style.childNodes;\n\n\t\tif (childNodes[index]) style.removeChild(childNodes[index]);\n\n\t\tif (childNodes.length) {\n\t\t\tstyle.insertBefore(cssNode, childNodes[index]);\n\t\t} else {\n\t\t\tstyle.appendChild(cssNode);\n\t\t}\n\t}\n}\n\nfunction applyToTag (style, obj) {\n\tvar css = obj.css;\n\tvar media = obj.media;\n\n\tif(media) {\n\t\tstyle.setAttribute(\"media\", media)\n\t}\n\n\tif(style.styleSheet) {\n\t\tstyle.styleSheet.cssText = css;\n\t} else {\n\t\twhile(style.firstChild) {\n\t\t\tstyle.removeChild(style.firstChild);\n\t\t}\n\n\t\tstyle.appendChild(document.createTextNode(css));\n\t}\n}\n\nfunction updateLink (link, options, obj) {\n\tvar css = obj.css;\n\tvar sourceMap = obj.sourceMap;\n\n\t/*\n\t\tIf convertToAbsoluteUrls isn't defined, but sourcemaps are enabled\n\t\tand there is no publicPath defined then lets turn convertToAbsoluteUrls\n\t\ton by default. Otherwise default to the convertToAbsoluteUrls option\n\t\tdirectly\n\t*/\n\tvar autoFixUrls = options.convertToAbsoluteUrls === undefined && sourceMap;\n\n\tif (options.convertToAbsoluteUrls || autoFixUrls) {\n\t\tcss = fixUrls(css);\n\t}\n\n\tif (sourceMap) {\n\t\t// http://stackoverflow.com/a/26603875\n\t\tcss += \"\\n/*# sourceMappingURL=data:application/json;base64,\" + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + \" */\";\n\t}\n\n\tvar blob = new Blob([css], { type: \"text/css\" });\n\n\tvar oldSrc = link.href;\n\n\tlink.href = URL.createObjectURL(blob);\n\n\tif(oldSrc) URL.revokeObjectURL(oldSrc);\n}\n","\n/**\n * When source maps are enabled, `style-loader` uses a link element with a data-uri to\n * embed the css on the page. This breaks all relative urls because now they are relative to a\n * bundle instead of the current page.\n *\n * One solution is to only use full urls, but that may be impossible.\n *\n * Instead, this function \"fixes\" the relative urls to be absolute according to the current page location.\n *\n * A rudimentary test suite is located at `test/fixUrls.js` and can be run via the `npm test` command.\n *\n */\n\nmodule.exports = function (css) {\n // get current location\n var location = typeof window !== \"undefined\" && window.location;\n\n if (!location) {\n throw new Error(\"fixUrls requires window.location\");\n }\n\n\t// blank or null?\n\tif (!css || typeof css !== \"string\") {\n\t return css;\n }\n\n var baseUrl = location.protocol + \"//\" + location.host;\n var currentDir = baseUrl + location.pathname.replace(/\\/[^\\/]*$/, \"/\");\n\n\t// convert each url(...)\n\t/*\n\tThis regular expression is just a way to recursively match brackets within\n\ta string.\n\n\t /url\\s*\\( = Match on the word \"url\" with any whitespace after it and then a parens\n\t ( = Start a capturing group\n\t (?: = Start a non-capturing group\n\t [^)(] = Match anything that isn't a parentheses\n\t | = OR\n\t \\( = Match a start parentheses\n\t (?: = Start another non-capturing groups\n\t [^)(]+ = Match anything that isn't a parentheses\n\t | = OR\n\t \\( = Match a start parentheses\n\t [^)(]* = Match anything that isn't a parentheses\n\t \\) = Match a end parentheses\n\t ) = End Group\n *\\) = Match anything and then a close parens\n ) = Close non-capturing group\n * = Match anything\n ) = Close capturing group\n\t \\) = Match a close parens\n\n\t /gi = Get all matches, not the first. Be case insensitive.\n\t *