Version Description
- Improved: Implemented recommendations for improved accessibility.
- Improved: Avoid duplicate ID attributes when more than one form is present on a page.
- Fixed: Submit button targeting for recaptcha v2.
Download this release
Release Info
Developer | constantcontact |
Plugin | Constant Contact Forms |
Version | 1.8.7 |
Comparing to | |
See all releases |
Code changes from version 1.8.6 to 1.8.7
- assets/css/style.css +12 -4
- assets/css/style.min.css +2 -2
- assets/images/check_circle.svg +0 -0
- assets/images/error.svg +0 -0
- assets/js/ctct-plugin-frontend.js +2 -2
- assets/js/ctct-plugin-frontend.min.js +1 -1
- assets/js/ctct-plugin-frontend.min.js.map +1 -1
- assets/js/ctct-plugin-frontend/util.js +3 -3
- assets/js/ctct-plugin-frontend/validation.js +22 -11
- assets/js/ctct-plugin-recaptcha-v2.js +3 -3
- assets/js/ctct-plugin-recaptcha-v2.min.js +1 -1
- assets/js/ctct-plugin-recaptcha-v2.min.js.map +1 -1
- assets/js/ctct-plugin-recaptcha-v2/recaptcha.js +24 -6
- assets/sass/_global.scss +8 -0
- assets/sass/_inputs.scss +3 -3
- constant-contact-forms.php +2 -2
- includes/class-api.php +5 -0
- includes/class-display.php +198 -172
- languages/constant-contact-forms.pot +31 -31
- readme.txt +6 -1
- vendor/autoload.php +1 -1
- vendor/composer/autoload_real.php +7 -7
- vendor/composer/autoload_static.php +5 -5
- vendor/constantcontact/constantcontact/.gitignore +25 -0
- vendor/defuse/php-encryption/.gitignore +11 -0
- vendor/google/recaptcha/.gitignore +7 -0
- vendor/guzzlehttp/ringphp/.gitignore +4 -0
- vendor/guzzlehttp/streams/.gitignore +6 -0
- vendor/psr/log/.gitignore +1 -0
- vendor/react/promise/.gitignore +5 -0
assets/css/style.css
CHANGED
@@ -19,6 +19,14 @@
|
|
19 |
color: #1b7926;
|
20 |
}
|
21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
.ctct-form-wrapper .ctct-form-field {
|
23 |
margin: 0 0 1rem;
|
24 |
}
|
@@ -89,7 +97,7 @@
|
|
89 |
top: -9999px !important;
|
90 |
}
|
91 |
|
92 |
-
.ctct-form-wrapper
|
93 |
border: 0 none;
|
94 |
clip: rect(0, 0, 0, 0);
|
95 |
height: 1px;
|
@@ -100,7 +108,7 @@
|
|
100 |
width: 1px;
|
101 |
}
|
102 |
|
103 |
-
.ctct-form-wrapper .no-recaptcha
|
104 |
background-image: url("../images/oval.min.svg");
|
105 |
background-position: center;
|
106 |
background-repeat: no-repeat;
|
@@ -109,7 +117,7 @@
|
|
109 |
opacity: 0.3;
|
110 |
}
|
111 |
|
112 |
-
.ctct-form-wrapper .has-recaptcha
|
113 |
cursor: not-allowed;
|
114 |
}
|
115 |
|
@@ -179,4 +187,4 @@
|
|
179 |
}
|
180 |
}
|
181 |
|
182 |
-
/*# sourceMappingURL=data:application/json;charset=utf8;base64,
|
19 |
color: #1b7926;
|
20 |
}
|
21 |
|
22 |
+
.ctct-form-wrapper .ctct-message .ctct-dismiss-ajax-notice {
|
23 |
+
border-radius: 50%;
|
24 |
+
float: right;
|
25 |
+
line-height: 1;
|
26 |
+
padding: 0.85rem 1rem;
|
27 |
+
text-decoration: none;
|
28 |
+
}
|
29 |
+
|
30 |
.ctct-form-wrapper .ctct-form-field {
|
31 |
margin: 0 0 1rem;
|
32 |
}
|
97 |
top: -9999px !important;
|
98 |
}
|
99 |
|
100 |
+
.ctct-form-wrapper .ctct_usage {
|
101 |
border: 0 none;
|
102 |
clip: rect(0, 0, 0, 0);
|
103 |
height: 1px;
|
108 |
width: 1px;
|
109 |
}
|
110 |
|
111 |
+
.ctct-form-wrapper .no-recaptcha .ctct-submitted:disabled {
|
112 |
background-image: url("../images/oval.min.svg");
|
113 |
background-position: center;
|
114 |
background-repeat: no-repeat;
|
117 |
opacity: 0.3;
|
118 |
}
|
119 |
|
120 |
+
.ctct-form-wrapper .has-recaptcha .ctct-submitted:disabled {
|
121 |
cursor: not-allowed;
|
122 |
}
|
123 |
|
187 |
}
|
188 |
}
|
189 |
|
190 |
+
/*# sourceMappingURL=data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wcGVyIC5jdGN0LWZpZWxkLWVycm9yIHtcbiAgY29sb3I6ICNmZjQxMzY7XG59XG5cbi5jdGN0LWZvcm0td3JhcHBlciAuY3RjdC1zdWJtaXQge1xuICBjdXJzb3I6IHBvaW50ZXI7XG59XG5cbi5jdGN0LXR3ZW50eWZvdXJ0ZWVuIC5jdGN0LWZvcm0tZmllbGQgaW5wdXQge1xuICB3aWR0aDogMTAwJTtcbn1cbiJdfQ== */
|
assets/css/style.min.css
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
.ctct-form-wrapper .ctct-button{font-size:.9rem}.ctct-form-wrapper .ctct-message{border:1px solid;padding:1em}.ctct-form-wrapper .ctct-message.ctct-error{background-color:rgba(255,65,54,.02);border-color:#ff4136;color:#cf0b00}.ctct-form-wrapper .ctct-message.ctct-success{background-color:rgba(46,204,64,.02);border-color:#2ecc40;color:#1b7926}.ctct-form-wrapper .ctct-form-field{margin:0 0 1rem}.ctct-form-wrapper .ctct-field-inline{display:inline-block}.ctct-form-wrapper input[type=email]:required:valid,.ctct-form-wrapper input[type=number]:required:valid,.ctct-form-wrapper input[type=password]:required:valid,.ctct-form-wrapper input[type=tel]:required:valid,.ctct-form-wrapper input[type=text]:required:valid{background-image:url(../images/check_circle.svg);background-position:8px 50%;background-repeat:no-repeat;background-size:18px;border-color:#2ecc40;padding-left:32px}.ctct-form-wrapper input[type=email].ctct-invalid,.ctct-form-wrapper input[type=email]:required.ctct-invalid,.ctct-form-wrapper input[type=number].ctct-invalid,.ctct-form-wrapper input[type=number]:required.ctct-invalid,.ctct-form-wrapper input[type=password].ctct-invalid,.ctct-form-wrapper input[type=password]:required.ctct-invalid,.ctct-form-wrapper input[type=tel].ctct-invalid,.ctct-form-wrapper input[type=tel]:required.ctct-invalid,.ctct-form-wrapper input[type=text].ctct-invalid,.ctct-form-wrapper input[type=text]:required.ctct-invalid{background:#fff url(../images/error.svg) no-repeat;background-color:rgba(255,65,54,.02);background-position:8px 50%;background-size:24px;border-color:#ff4136;padding-left:40px}.ctct-form-wrapper .ctct-field-error{font-size:.85rem;font-style:italic}.ctct-form-wrapper input.ctct-invalid{background:#fff url(../images/error.svg) no-repeat;background-color:rgba(255,65,54,.02);background-position:8px 50%;background-size:24px;border-color:#ff4136;padding-left:40px}.ctct-form-wrapper input.ctct-label-left,.ctct-form-wrapper textarea.ctct-label-left{display:inline-block;width:75%}.ctct-form-wrapper span.ctct-label-left{display:inline-block;margin-right:5%;width:20%}.ctct-form-wrapper input.ctct-label-right,.ctct-form-wrapper textarea.ctct-label-right{display:inline-block;margin-right:5%;width:75%}.ctct-form-wrapper span.ctct-label-right{display:inline-block;width:20%}.ctct-form-wrapper span.ctct-label-hidden{left:-9999px!important;position:absolute!important;top:-9999px!important}.ctct-form-wrapper
|
2 |
-
/*# sourceMappingURL=data:application/json;charset=utf8;base64,
|
1 |
+
.ctct-form-wrapper .ctct-button{font-size:.9rem}.ctct-form-wrapper .ctct-message{border:1px solid;padding:1em}.ctct-form-wrapper .ctct-message.ctct-error{background-color:rgba(255,65,54,.02);border-color:#ff4136;color:#cf0b00}.ctct-form-wrapper .ctct-message.ctct-success{background-color:rgba(46,204,64,.02);border-color:#2ecc40;color:#1b7926}.ctct-form-wrapper .ctct-message .ctct-dismiss-ajax-notice{border-radius:50%;float:right;line-height:1;padding:.85rem 1rem;text-decoration:none}.ctct-form-wrapper .ctct-form-field{margin:0 0 1rem}.ctct-form-wrapper .ctct-field-inline{display:inline-block}.ctct-form-wrapper input[type=email]:required:valid,.ctct-form-wrapper input[type=number]:required:valid,.ctct-form-wrapper input[type=password]:required:valid,.ctct-form-wrapper input[type=tel]:required:valid,.ctct-form-wrapper input[type=text]:required:valid{background-image:url(../images/check_circle.svg);background-position:8px 50%;background-repeat:no-repeat;background-size:18px;border-color:#2ecc40;padding-left:32px}.ctct-form-wrapper input[type=email].ctct-invalid,.ctct-form-wrapper input[type=email]:required.ctct-invalid,.ctct-form-wrapper input[type=number].ctct-invalid,.ctct-form-wrapper input[type=number]:required.ctct-invalid,.ctct-form-wrapper input[type=password].ctct-invalid,.ctct-form-wrapper input[type=password]:required.ctct-invalid,.ctct-form-wrapper input[type=tel].ctct-invalid,.ctct-form-wrapper input[type=tel]:required.ctct-invalid,.ctct-form-wrapper input[type=text].ctct-invalid,.ctct-form-wrapper input[type=text]:required.ctct-invalid{background:#fff url(../images/error.svg) no-repeat;background-color:rgba(255,65,54,.02);background-position:8px 50%;background-size:24px;border-color:#ff4136;padding-left:40px}.ctct-form-wrapper .ctct-field-error{font-size:.85rem;font-style:italic}.ctct-form-wrapper input.ctct-invalid{background:#fff url(../images/error.svg) no-repeat;background-color:rgba(255,65,54,.02);background-position:8px 50%;background-size:24px;border-color:#ff4136;padding-left:40px}.ctct-form-wrapper input.ctct-label-left,.ctct-form-wrapper textarea.ctct-label-left{display:inline-block;width:75%}.ctct-form-wrapper span.ctct-label-left{display:inline-block;margin-right:5%;width:20%}.ctct-form-wrapper input.ctct-label-right,.ctct-form-wrapper textarea.ctct-label-right{display:inline-block;margin-right:5%;width:75%}.ctct-form-wrapper span.ctct-label-right{display:inline-block;width:20%}.ctct-form-wrapper span.ctct-label-hidden{left:-9999px!important;position:absolute!important;top:-9999px!important}.ctct-form-wrapper .ctct_usage{border:0;clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ctct-form-wrapper .no-recaptcha .ctct-submitted:disabled{background-image:url(../images/oval.min.svg);background-position:50%;background-repeat:no-repeat;color:transparent;cursor:wait;opacity:.3}.ctct-form-wrapper .has-recaptcha .ctct-submitted:disabled{cursor:not-allowed}.ctct-form-wrapper .ctct-form:after{clear:both;content:"";display:table}.ctct-form-wrapper .ctct-form .ctct-label-bottom label,.ctct-form-wrapper .ctct-form .ctct-label-top label{display:block}.ctct-form-wrapper .ctct-form .ctct-label-left label,.ctct-form-wrapper .ctct-form .ctct-label-right label{display:inline-block}.ctct-form-wrapper .ctct-form abbr{border:none;color:#ff4136;font-size:.9rem}.ctct-form-wrapper .ctct-input-container label{color:#aaa;font-size:.8rem}.ctct-form-wrapper .ctct-field-error{color:#ff4136}.ctct-form-wrapper .ctct-submit{cursor:pointer}.ctct-twentyfourteen .ctct-form-field input{width:100%}@media (min-width:992px){.ctct-form-wrapper .ctct-field-half{float:left;margin-right:2%;width:48%}.ctct-form-wrapper .ctct-field-half:last-of-type{margin-right:0}.ctct-form-wrapper .ctct-field-third{float:left;margin-right:2%;width:32%}.ctct-form-wrapper .ctct-field-third:last-of-type{margin-right:0}.ctct-form-wrapper .ctct-field-fourth{float:left;margin-right:2%;width:24%}.ctct-form-wrapper .ctct-field-fourth:last-of-type{margin-right:0}}
|
2 |
+
/*# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlLmNzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxnQ0FDRSxlQUNGLENBRUEsaUNBQ0UsZ0JBQWlCLENBQ2pCLFdBQ0YsQ0FFQSw0Q0FDRSxvQ0FBeUMsQ0FDekMsb0JBQXFCLENBQ3JCLGFBQ0YsQ0FFQSw4Q0FDRSxvQ0FBeUMsQ0FDekMsb0JBQXFCLENBQ3JCLGFBQ0YsQ0FFQSwyREFDRSxpQkFBa0IsQ0FDbEIsV0FBWSxDQUNaLGFBQWMsQ0FDZCxtQkFBcUIsQ0FDckIsb0JBQ0YsQ0FFQSxvQ0FDRSxlQUNGLENBRUEsc0NBQ0Usb0JBQ0YsQ0FtQ0EscVFBQ0UsZ0RBQW1ELENBQ25ELDJCQUE0QixDQUM1QiwyQkFBNEIsQ0FDNUIsb0JBQXFCLENBQ3JCLG9CQUFxQixDQUNyQixpQkFDRixDQUVBLG1pQkFDRSxrREFBcUQsQ0FDckQsb0NBQXlDLENBQ3pDLDJCQUE0QixDQUM1QixvQkFBcUIsQ0FDckIsb0JBQXFCLENBQ3JCLGlCQUNGLENBRUEscUNBQ0UsZ0JBQWtCLENBQ2xCLGl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29udGFpbmVyIGxhYmVsIHtcbiAgY29sb3I6ICNhYWE7XG4gIGZvbnQtc2l6ZTogMC44cmVtO1xufVxuXG4uY3RjdC1mb3JtLXdyYXBwZXIgLmN0Y3QtZmllbGQtZXJyb3Ige1xuICBjb2xvcjogI2ZmNDEzNjtcbn1cblxuLmN0Y3QtZm9ybS13cmFwcGVyIC5jdGN0LXN1Ym1pdCB7XG4gIGN1cnNvcjogcG9pbnRlcjtcbn1cblxuLmN0Y3QtdHdlbnR5Zm91cnRlZW4gLmN0Y3QtZm9ybS1maWVsZCBpbnB1dCB7XG4gIHdpZHRoOiAxMDAlO1xufVxuIl19 */
|
assets/images/check_circle.svg
CHANGED
File without changes
|
assets/images/error.svg
CHANGED
File without changes
|
assets/js/ctct-plugin-frontend.js
CHANGED
@@ -105,7 +105,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _uti
|
|
105 |
/*! no static exports found */
|
106 |
/***/ (function(module, exports) {
|
107 |
|
108 |
-
eval("/**\n * General-purpose utility stuff for CC plugin.\n */\n(function (global, $) {\n /**\n * Temporarily prevent the submit button from being clicked.\n */\n $(document).ready(function () {\n $('
|
109 |
|
110 |
/***/ }),
|
111 |
|
@@ -116,7 +116,7 @@ eval("/**\n * General-purpose utility stuff for CC plugin.\n */\n(function (glob
|
|
116 |
/*! no static exports found */
|
117 |
/***/ (function(module, exports) {
|
118 |
|
119 |
-
eval("/**\n * Front-end form validation.\n *\n * @since 1.0.0\n */\nwindow.CTCTSupport = {};\n\n(function (window, $, app) {\n var _this = this;\n\n /**\n * @constructor\n *\n * @author Constant Contact\n * @since 1.0.0\n */\n app.init = function () {\n app.cache();\n app.bindEvents();\n app.removePlaceholder();\n };\n /**\n * Remove placeholder text values.\n *\n * @author Constant Contact\n * @since 1.0.0\n */\n\n\n app.removePlaceholder = function () {\n $('.ctct-form-field input, textarea').focus(function () {\n $(_this).data('placeholder', $(_this).attr('placeholder')).attr('placeholder', '');\n }).blur(function () {\n $(_this).attr('placeholder', $(_this).data('placeholder'));\n });\n };\n /**\n * Cache DOM elements.\n *\n * @author Constant Contact\n * @since 1.0.0\n */\n\n\n app.cache = function () {\n app.$c = {\n $forms: []\n }; // Cache each form on the page.\n\n $('.ctct-form-wrapper').each(function (i, formWrapper) {\n app.$c.$forms.push($(formWrapper).find('form'));\n }); // For each form, cache its common elements.\n\n $.each(app.$c.$forms, function (i, form) {\n var $form = $(form);\n app.$c.$forms[i].$honeypot = $form.find('#ctct_usage_field');\n app.$c.$forms[i].$submitButton = $form.find('input[type=submit]');\n app.$c.$forms[i].$recaptcha = $form.find('.g-recaptcha');\n });\n app.timeout = null;\n };\n /**\n * Remove the ctct-invalid class from elements that have it.\n *\n * @author Constant Contact\n * @since 1.0.0\n */\n\n\n app.setAllInputsValid = function () {\n $(app.$c.$form + ' .ctct-invalid').removeClass('ctct-invalid');\n };\n /**\n * Adds .ctct-invalid HTML class to inputs whose values are invalid.\n *\n * @author Constant Contact\n * @since 1.0.0\n *\n * @param {object} error AJAX response error object.\n */\n\n\n app.processError = function (error) {\n // If we have an id property set.\n if ('undefined' !== typeof error.id) {\n $('#' + error.id).addClass('ctct-invalid');\n }\n };\n /**\n * Check the value of the hidden honeypot field; disable form submission button if anything in it.\n *\n * @author Constant Contact\n * @since 1.0.0\n *\n * @param {object} e The change or keyup event triggering this callback.\n * @param {object} $honeyPot The jQuery object for the actual input field being checked.\n * @param {object} $submitButton The jQuery object for the submit button in the same form as the honeypot field.\n */\n\n\n app.checkHoneypot = function (e, $honeyPot, $submitButton) {\n // If there is text in the honeypot, disable the submit button\n if (0 < $honeyPot.val().length) {\n $submitButton.attr('disabled', 'disabled');\n } else {\n $submitButton.attr('disabled', false);\n }\n };\n /**\n * Ensures that we should use AJAX to process the specified form, and that all required fields are not empty.\n *\n * @author Constant Contact\n * @since 1.0.0\n *\n * @param {object} $form jQuery object for the form being validated.\n * @return {boolean} False if AJAX processing is disabled for this form or if a required field is empty.\n */\n\n\n app.validateSubmission = function ($form) {\n if ('on' !== $form.attr('data-doajax')) {\n return false;\n } // Ensure all required fields in this form are valid.\n\n\n $.each($form.find('[required]'), function (i, field) {\n if (false === field.checkValidity()) {\n return false;\n }\n });\n return true;\n };\n /**\n * Prepends form with a message that fades out in 5 seconds.\n *\n * @author Constant Contact\n * @since 1.0.0\n *\n * @param {object} $form jQuery object for the form a message is being displayed for.\n * @param {string} message The message content.\n * @param {string} classes Optional. HTML classes to add to the message wrapper.\n */\n\n\n app.showMessage = function ($form, message) {\n var classes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';\n var $p = $('<p />', {\n 'class': 'ctct-message ' + classes,\n 'text': message\n });\n $p.insertBefore($form).fadeIn(200).delay(5000).slideUp(200, function () {\n $p.remove();\n });\n };\n /**\n * Submits the actual form via AJAX.\n *\n * @author Constant Contact\n * @since 1.0.0\n *\n * @param {object} $form jQuery object for the form being submitted.\n */\n\n\n app.submitForm = function ($form) {\n $form.find('#ctct-submitted').prop('disabled', true);\n var ajaxData = {\n 'action': 'ctct_process_form',\n 'data': $form.serialize()\n };\n $.post(window.ajaxurl, ajaxData, function (response) {\n $form.find('#ctct-submitted').prop('disabled', false);\n\n if ('undefined' === typeof response.status) {\n return false;\n } // Here we'll want to disable the submit button and add some error classes.\n\n\n if ('success' !== response.status) {\n if ('undefined' !== typeof response.errors) {\n app.setAllInputsValid();\n response.errors.forEach(app.processError);\n } else {\n app.showMessage($form, response.message, 'ctct-error');\n }\n\n return false;\n } // If we're here, the submission was a success; show message and reset form fields.\n\n\n app.showMessage($form, response.message, 'ctct-success');\n $form[0].reset();\n });\n };\n /**\n * Handle the form submission.\n *\n * @author Constant Contact\n * @since 1.0.0\n *\n * @param {object} e The submit event.\n * @param {object} $form jQuery object for the current form being handled.\n * @return {boolean} False if unable to validate the form.\n */\n\n\n app.handleSubmission = function (e, $form) {\n if (!app.validateSubmission($form)) {\n return false;\n }\n\n e.preventDefault();\n clearTimeout(app.timeout);\n app.timeout = setTimeout(app.submitForm, 500, $form);\n };\n /**\n * Set up event bindings and callbacks.\n *\n * @author Constant Contact\n * @since 1.0.0\n */\n\n\n app.bindEvents = function () {\n // eslint-disable-next-line no-unused-vars\n $.each(app.$c.$forms, function (i, form) {\n // Attach submission handler to each form's Submit button.\n app.$c.$forms[i].on('click', 'input[type=submit]', function (e) {\n app.handleSubmission(e, app.$c.$forms[i]);\n }); // Ensure each form's honeypot is checked.\n\n app.$c.$forms[i].$honeypot.on('change keyup', function (e) {\n app.checkHoneypot(e, app.$c.$forms[i].$honeypot, app.$c.$forms[i].$submitButton);\n }); // Disable the submit button by default until the captcha is passed (if captcha exists).\n\n if (0 < app.$c.$forms[i].$recaptcha.length) {\n app.$c.$forms[i].$submitButton.attr('disabled', 'disabled');\n }\n });\n };\n\n $(app.init);\n})(window, jQuery, window.CTCTSupport);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9hc3NldHMvanMvY3RjdC1wbHVnaW4tZnJvbnRlbmQvdmFsaWRhdGlvbi5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL2Fzc2V0cy9qcy9jdGN0LXBsdWdpbi1mcm9udGVuZC92YWxpZGF0aW9uLmpzPzMzOTkiXSwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBGcm9udC1lbmQgZm9ybSB2YWxpZGF0aW9uLlxuICpcbiAqIEBzaW5jZSAxLjAuMFxuICovXG5cbiB3aW5kb3cuQ1RDVFN1cHBvcnQgPSB7fTtcblxuKCBmdW5jdGlvbiggd2luZG93LCAkLCBhcHAgKSB7XG5cblx0LyoqXG5cdCAqIEBjb25zdHJ1Y3RvclxuXHQgKlxuXHQgKiBAYXV0aG9yIENvbnN0YW50IENvbnRhY3Rcblx0ICogQHNpbmNlIDEuMC4wXG5cdCAqL1xuXHRhcHAuaW5pdCA9ICgpID0+IHtcblx0XHRhcHAuY2FjaGUoKTtcblx0XHRhcHAuYmluZEV2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0FBRUE7Ozs7Ozs7Ozs7O0FBU0E7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUVBO0FBQ0E7QUFFQTs7Ozs7Ozs7Ozs7O0FBVUE7QUFBQTtBQUVBO0FBQ0E7QUFDQTtBQUZBO0FBS0E7QUFDQTtBQUNBO0FBQ0E7QUFFQTs7Ozs7Ozs7OztBQVFBO0FBRUE7QUFFQTtBQUNBO0FBQ0E7QUFGQTtBQUtBO0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUVBOzs7Ozs7Ozs7Ozs7QUFVQTtBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFFQTtBQUVBO0FBQ0E7QUFFQTs7Ozs7Ozs7QUFNQTtBQUVBO0FBQ0E7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBRUE7QUFFQTtBQUtBO0FBQ0E7QUFFQTtBQUNBO0FBQ0E7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUVBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./assets/js/ctct-plugin-frontend/validation.js\n");
|
120 |
|
121 |
/***/ }),
|
122 |
|
105 |
/*! no static exports found */
|
106 |
/***/ (function(module, exports) {
|
107 |
|
108 |
+
eval("/**\n * General-purpose utility stuff for CC plugin.\n */\n(function (global, $) {\n /**\n * Temporarily prevent the submit button from being clicked.\n */\n $(document).ready(function () {\n $('.ctct-submitted').on('click', function () {\n setTimeout(function () {\n disableSendButton();\n setTimeout(enableSendButton, 3000);\n }, 100);\n });\n });\n /**\n * Disable form submit button.\n *\n * @author Constant Contact\n * @since 1.0.0\n *\n * @return {mixed} jQuery if attribute is set, undefined if not.\n */\n\n function disableSendButton() {\n return $('.ctct-submitted').attr('disabled', 'disabled');\n }\n /**\n * Re-enable form submit buttons.\n *\n * @author Constant Contact\n * @since 1.0.0\n *\n * @return {mixed} jQuery if attribute is set, undefined if not.\n */\n\n\n function enableSendButton() {\n return $('.ctct-submitted').attr('disabled', null);\n }\n})(window, jQuery);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9hc3NldHMvanMvY3RjdC1wbHVnaW4tZnJvbnRlbmQvdXRpbC5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL2Fzc2V0cy9qcy9jdGN0LXBsdWdpbi1mcm9udGVuZC91dGlsLmpzPzQ1NWIiXSwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBHZW5lcmFsLXB1cnBvc2UgdXRpbGl0eSBzdHVmZiBmb3IgQ0MgcGx1Z2luLlxuICovXG4oIGZ1bmN0aW9uKCBnbG9iYWwsICQgKSB7XG5cblx0LyoqXG5cdCAqIFRlbXBvcmFyaWx5IHByZXZlbnQgdGhlIHN1Ym1pdCBidXR0b24gZnJvbSBiZWluZyBjbGlja2VkLlxuXHQgKi9cblx0JCggZG9jdW1lbnQgKS5yZWFkeSggKCkgPT4ge1xuXG5cdFx0JCggJy5jdGN0LXN1Ym1pdHRlZCcgKS5vbiggJ2NsaWNrJywgKCkgPT4ge1xuXHRcdFx0c2V0VGltZW91dCggKCkgPT4ge1xuXHRcdFx0XHRkaXNhYmxlU2VuZEJ1dHRvbigpO1xuXHRcdFx0XHRzZXRUaW1lb3V0KCBlbmFibGVTZW5kQnV0dG9uLCAzMDAwICk7XG5cdFx0XHR9LCAxMDAgKTtcblx0XHR9ICk7XG5cdH0gKTtcblxuXHQvKipcblx0ICogRGlzYWJsZSBmb3JtIHN1Ym1pdCBidXR0b24uXG5cdCAqXG5cdCAqIEBhdXRob3IgQ29uc3RhbnQgQ29udGFjdFxuXHQgKiBAc2luY2UgMS4wLjBcblx0ICpcblx0ICogQHJldHVybiB7bWl4ZWR9IGpRdWVyeSBpZiBhdHRyaWJ1dGUgaXMgc2V0LCB1bmRlZmluZWQgaWYgbm90LlxuXHQgKi9cblx0ZnVuY3Rpb24gZGlzYWJsZVNlbmRCdXR0b24oKSB7XG5cdFx0cmV0dXJuICQoICcuY3RjdC1zdWJtaXR0ZWQnICkuYXR0ciggJ2Rpc2FibGVkJywgJ2Rpc2FibGVkJyApO1xuXHR9XG5cblx0LyoqXG5cdCAqIFJlLWVuYWJsZSBmb3JtIHN1Ym1pdCBidXR0b25zLlxuXHQgKlxuXHQgKiBAYXV0aG9yIENvbnN0YW50IENvbnRhY3Rcblx0ICogQHNpbmNlIDEuMC4wXG5cdCAqXG5cdCAqIEByZXR1cm4ge21peGVkfSBqUXVlcnkgaWYgYXR0cmlidXRlIGlzIHNldCwgdW5kZWZpbmVkIGlmIG5vdC5cblx0ICovXG5cdGZ1bmN0aW9uIGVuYWJsZVNlbmRCdXR0b24oKSB7XG5cdFx0cmV0dXJuICQoICcuY3RjdC1zdWJtaXR0ZWQnICkuYXR0ciggJ2Rpc2FibGVkJywgbnVsbCApO1xuXHR9XG5cbn0gKCB3aW5kb3csIGpRdWVyeSApICk7XG4iXSwibWFwcGluZ3MiOiJBQUFBOzs7QUFHQTtBQUVBOzs7QUFHQTtBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBRUE7Ozs7Ozs7OztBQVFBO0FBQ0E7QUFDQTtBQUVBOzs7Ozs7Ozs7O0FBUUE7QUFDQTtBQUNBO0FBRUEiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./assets/js/ctct-plugin-frontend/util.js\n");
|
109 |
|
110 |
/***/ }),
|
111 |
|
116 |
/*! no static exports found */
|
117 |
/***/ (function(module, exports) {
|
118 |
|
119 |
+
eval("/**\n * Front-end form validation.\n *\n * @since 1.0.0\n */\nwindow.CTCTSupport = {};\n\n(function (window, $, app) {\n var _this = this;\n\n /**\n * @constructor\n *\n * @author Constant Contact\n * @since 1.0.0\n */\n app.init = function () {\n app.cache();\n app.bindEvents();\n app.removePlaceholder();\n };\n /**\n * Remove placeholder text values.\n *\n * @author Constant Contact\n * @since 1.0.0\n */\n\n\n app.removePlaceholder = function () {\n $('.ctct-form-field input, textarea').focus(function () {\n $(_this).data('placeholder', $(_this).attr('placeholder')).attr('placeholder', '');\n }).blur(function () {\n $(_this).attr('placeholder', $(_this).data('placeholder'));\n });\n };\n /**\n * Cache DOM elements.\n *\n * @author Constant Contact\n * @since 1.0.0\n */\n\n\n app.cache = function () {\n app.$c = {\n $forms: []\n }; // Cache each form on the page.\n\n $('.ctct-form-wrapper').each(function (i, formWrapper) {\n app.$c.$forms.push($(formWrapper).find('form'));\n }); // For each form, cache its common elements.\n\n $.each(app.$c.$forms, function (i, form) {\n var $form = $(form);\n app.$c.$forms[i].$honeypot = $form.find('.ctct_usage_field');\n app.$c.$forms[i].$submitButton = $form.find('input[type=submit]');\n app.$c.$forms[i].$recaptcha = $form.find('.g-recaptcha');\n });\n app.timeout = null;\n };\n /**\n * Remove the ctct-invalid class from elements that have it.\n *\n * @author Constant Contact\n * @since 1.0.0\n */\n\n\n app.setAllInputsValid = function () {\n $(app.$c.$form + ' .ctct-invalid').removeClass('ctct-invalid');\n };\n /**\n * Adds .ctct-invalid HTML class to inputs whose values are invalid.\n *\n * @author Constant Contact\n * @since 1.0.0\n *\n * @param {object} error AJAX response error object.\n */\n\n\n app.processError = function (error) {\n // If we have an id property set.\n if ('undefined' !== typeof error.id) {\n $('#' + error.id).addClass('ctct-invalid');\n }\n };\n /**\n * Check the value of the hidden honeypot field; disable form submission button if anything in it.\n *\n * @author Constant Contact\n * @since 1.0.0\n *\n * @param {object} e The change or keyup event triggering this callback.\n * @param {object} $honeyPot The jQuery object for the actual input field being checked.\n * @param {object} $submitButton The jQuery object for the submit button in the same form as the honeypot field.\n */\n\n\n app.checkHoneypot = function (e, $honeyPot, $submitButton) {\n // If there is text in the honeypot, disable the submit button\n if (0 < $honeyPot.val().length) {\n $submitButton.attr('disabled', 'disabled');\n } else {\n $submitButton.attr('disabled', false);\n }\n };\n /**\n * Ensures that we should use AJAX to process the specified form, and that all required fields are not empty.\n *\n * @author Constant Contact\n * @since 1.0.0\n *\n * @param {object} $form jQuery object for the form being validated.\n * @return {boolean} False if AJAX processing is disabled for this form or if a required field is empty.\n */\n\n\n app.validateSubmission = function ($form) {\n if ('on' !== $form.attr('data-doajax')) {\n return false;\n } // Ensure all required fields in this form are valid.\n\n\n $.each($form.find('[required]'), function (i, field) {\n if (false === field.checkValidity()) {\n return false;\n }\n });\n return true;\n };\n /**\n * Prepends form with a message that fades out in 5 seconds.\n *\n * @author Constant Contact\n * @since 1.0.0\n *\n * @param {object} $form jQuery object for the form a message is being displayed for.\n * @param {string} message The message content.\n * @param {string} classes Optional. HTML classes to add to the message wrapper.\n */\n\n\n app.showMessage = function ($form, message) {\n var classes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';\n var role = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'log';\n var $wrapper = $form.parents('.ctct-form-wrapper');\n $wrapper.find('p.ctct-message').remove();\n var $p = $('<p />', {\n 'class': 'ctct-message ' + classes,\n 'text': message,\n 'role': role\n }).prepend($('<button />', {\n 'class': 'button button-secondary ctct-dismiss ctct-dismiss-ajax-notice',\n 'html': '✕',\n 'aria-label': 'Dismiss Notification'\n }));\n $p.insertBefore($form).fadeIn(200);\n $wrapper.find('.ctct-dismiss-ajax-notice').on('click', function () {\n $(this).parents('.ctct-message').remove();\n });\n };\n /**\n * Submits the actual form via AJAX.\n *\n * @author Constant Contact\n * @since 1.0.0\n *\n * @param {object} $form jQuery object for the form being submitted.\n */\n\n\n app.submitForm = function ($form) {\n $form.find('.ctct-submitted').prop('disabled', true);\n var ajaxData = {\n 'action': 'ctct_process_form',\n 'data': $form.serialize()\n };\n $.post(window.ajaxurl, ajaxData, function (response) {\n $form.find('.ctct-submitted').prop('disabled', false);\n\n if ('undefined' === typeof response.status) {\n return false;\n } // Here we'll want to disable the submit button and add some error classes.\n\n\n if ('success' !== response.status) {\n if ('undefined' !== typeof response.errors) {\n app.setAllInputsValid();\n response.errors.forEach(app.processError);\n } else {\n app.showMessage($form, response.message, 'ctct-error', 'alert');\n }\n\n return false;\n } // If we're here, the submission was a success; show message and reset form fields.\n\n\n app.showMessage($form, response.message, 'ctct-success', 'status');\n $form[0].reset();\n });\n };\n /**\n * Handle the form submission.\n *\n * @author Constant Contact\n * @since 1.0.0\n *\n * @param {object} e The submit event.\n * @param {object} $form jQuery object for the current form being handled.\n * @return {boolean} False if unable to validate the form.\n */\n\n\n app.handleSubmission = function (e, $form) {\n if (!app.validateSubmission($form)) {\n return false;\n }\n\n e.preventDefault();\n clearTimeout(app.timeout);\n app.timeout = setTimeout(app.submitForm, 500, $form);\n };\n /**\n * Set up event bindings and callbacks.\n *\n * @author Constant Contact\n * @since 1.0.0\n */\n\n\n app.bindEvents = function () {\n // eslint-disable-next-line no-unused-vars\n $.each(app.$c.$forms, function (i, form) {\n // Attach submission handler to each form's Submit button.\n app.$c.$forms[i].on('click', 'input[type=submit]', function (e) {\n app.handleSubmission(e, app.$c.$forms[i]);\n }); // Ensure each form's honeypot is checked.\n\n app.$c.$forms[i].$honeypot.on('change keyup', function (e) {\n app.checkHoneypot(e, app.$c.$forms[i].$honeypot, app.$c.$forms[i].$submitButton);\n }); // Disable the submit button by default until the captcha is passed (if captcha exists).\n\n if (0 < app.$c.$forms[i].$recaptcha.length) {\n app.$c.$forms[i].$submitButton.attr('disabled', 'disabled');\n }\n });\n };\n\n $(app.init);\n})(window, jQuery, window.CTCTSupport);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9hc3NldHMvanMvY3RjdC1wbHVnaW4tZnJvbnRlbmQvdmFsaWRhdGl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QTtBQUVBOzs7Ozs7Ozs7OztBQVNBO0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFFQTtBQUNBO0FBRUE7Ozs7Ozs7Ozs7OztBQVVBO0FBQUE7QUFBQTtBQUVBO0FBRUE7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUhBO0FBS0E7QUFDQTtBQUNBO0FBSEE7QUFNQTtBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBRUE7Ozs7Ozs7Ozs7QUFRQTtBQUVBO0FBRUE7QUFDQTtBQUNBO0FBRkE7QUFLQTtBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFFQTs7Ozs7Ozs7Ozs7O0FBVUE7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBRUE7QUFFQTtBQUNBO0FBRUE7Ozs7Ozs7O0FBTUE7QUFFQTtBQUNBO0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUVBO0FBRUE7QUFLQTtBQUNBO0FBRUE7QUFDQTtBQUNBO0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFFQSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./assets/js/ctct-plugin-frontend/validation.js\n");
|
120 |
|
121 |
/***/ }),
|
122 |
|
assets/js/ctct-plugin-frontend.min.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
!function(t){var e={};function n(o){if(e[o])return e[o].exports;var
|
2 |
//# sourceMappingURL=ctct-plugin-frontend.min.js.map
|
1 |
+
!function(t){var e={};function n(o){if(e[o])return e[o].exports;var c=e[o]={i:o,l:!1,exports:{}};return t[o].call(c.exports,c,c.exports,n),c.l=!0,c.exports}n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var c in t)n.d(o,c,function(e){return t[e]}.bind(null,c));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="https://testing.test/wp-content/plugins/constant-contact-forms/assets/js/",n(n.s=9)}([,,,,,,,,,function(t,e,n){t.exports=n(10)},function(t,e,n){"use strict";n.r(e);n(11),n(12)},function(t,e){!function(t,e){function n(){return e(".ctct-submitted").attr("disabled",null)}e(document).ready((function(){e(".ctct-submitted").on("click",(function(){setTimeout((function(){e(".ctct-submitted").attr("disabled","disabled"),setTimeout(n,3e3)}),100)}))}))}(window,jQuery)},function(t,e){window.CTCTSupport={},function(t,e,n){var o=this;n.init=function(){n.cache(),n.bindEvents(),n.removePlaceholder()},n.removePlaceholder=function(){e(".ctct-form-field input, textarea").focus((function(){e(o).data("placeholder",e(o).attr("placeholder")).attr("placeholder","")})).blur((function(){e(o).attr("placeholder",e(o).data("placeholder"))}))},n.cache=function(){n.$c={$forms:[]},e(".ctct-form-wrapper").each((function(t,o){n.$c.$forms.push(e(o).find("form"))})),e.each(n.$c.$forms,(function(t,o){var c=e(o);n.$c.$forms[t].$honeypot=c.find(".ctct_usage_field"),n.$c.$forms[t].$submitButton=c.find("input[type=submit]"),n.$c.$forms[t].$recaptcha=c.find(".g-recaptcha")})),n.timeout=null},n.setAllInputsValid=function(){e(n.$c.$form+" .ctct-invalid").removeClass("ctct-invalid")},n.processError=function(t){void 0!==t.id&&e("#"+t.id).addClass("ctct-invalid")},n.checkHoneypot=function(t,e,n){0<e.val().length?n.attr("disabled","disabled"):n.attr("disabled",!1)},n.validateSubmission=function(t){return"on"===t.attr("data-doajax")&&(e.each(t.find("[required]"),(function(t,e){if(!1===e.checkValidity())return!1})),!0)},n.showMessage=function(t,n){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"log",i=t.parents(".ctct-form-wrapper");i.find("p.ctct-message").remove();var r=e("<p />",{class:"ctct-message "+o,text:n,role:c}).prepend(e("<button />",{class:"button button-secondary ctct-dismiss ctct-dismiss-ajax-notice",html:"✕","aria-label":"Dismiss Notification"}));r.insertBefore(t).fadeIn(200),i.find(".ctct-dismiss-ajax-notice").on("click",(function(){e(this).parents(".ctct-message").remove()}))},n.submitForm=function(o){o.find(".ctct-submitted").prop("disabled",!0);var c={action:"ctct_process_form",data:o.serialize()};e.post(t.ajaxurl,c,(function(t){return o.find(".ctct-submitted").prop("disabled",!1),void 0!==t.status&&("success"!==t.status?(void 0!==t.errors?(n.setAllInputsValid(),t.errors.forEach(n.processError)):n.showMessage(o,t.message,"ctct-error","alert"),!1):(n.showMessage(o,t.message,"ctct-success","status"),void o[0].reset()))}))},n.handleSubmission=function(t,e){if(!n.validateSubmission(e))return!1;t.preventDefault(),clearTimeout(n.timeout),n.timeout=setTimeout(n.submitForm,500,e)},n.bindEvents=function(){e.each(n.$c.$forms,(function(t,e){n.$c.$forms[t].on("click","input[type=submit]",(function(e){n.handleSubmission(e,n.$c.$forms[t])})),n.$c.$forms[t].$honeypot.on("change keyup",(function(e){n.checkHoneypot(e,n.$c.$forms[t].$honeypot,n.$c.$forms[t].$submitButton)})),0<n.$c.$forms[t].$recaptcha.length&&n.$c.$forms[t].$submitButton.attr("disabled","disabled")}))},e(n.init)}(window,jQuery,window.CTCTSupport)}]);
|
2 |
//# sourceMappingURL=ctct-plugin-frontend.min.js.map
|
assets/js/ctct-plugin-frontend.min.js.map
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./assets/js/ctct-plugin-frontend/index.js","webpack:///./assets/js/ctct-plugin-frontend/util.js","webpack:///./assets/js/ctct-plugin-frontend/validation.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","global","$","enableSendButton","attr","document","ready","on","setTimeout","window","jQuery","CTCTSupport","app","init","cache","bindEvents","removePlaceholder","focus","data","blur","$c","$forms","each","formWrapper","push","find","form","$form","$honeypot","$submitButton","$recaptcha","timeout","setAllInputsValid","removeClass","processError","error","id","addClass","checkHoneypot","e","$honeyPot","val","length","validateSubmission","field","checkValidity","showMessage","message","classes","$p","insertBefore","fadeIn","delay","slideUp","remove","submitForm","prop","ajaxData","serialize","post","ajaxurl","response","status","errors","forEach","reset","handleSubmission","preventDefault","clearTimeout"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1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EAAIjB,EAAIQ,GAAGC,OAAQpD,GAAI6D,WAAWY,QACtC9B,EAAIQ,GAAGC,OAAQpD,GAAI4D,cAAczB,KAAM,WAAY,gBAMtDF,EAAGU,EAAIC,MA7PN,CA+PEJ,OAAQC,OAAQD,OAAOE","file":"ctct-plugin-frontend.min.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 = \"https://testing.test/wp-content/plugins/constant-contact-forms/assets/js/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 9);\n","import './util';\nimport './validation';\n","/**\n * General-purpose utility stuff for CC plugin.\n */\n( function( global, $ ) {\n\n\t/**\n\t * Temporarily prevent the submit button from being clicked.\n\t */\n\t$( document ).ready( () => {\n\n\t\t$( '#ctct-submitted' ).on( 'click', () => {\n\t\t\tsetTimeout( () => {\n\t\t\t\tdisableSendButton();\n\t\t\t\tsetTimeout( enableSendButton, 3000 );\n\t\t\t}, 100 );\n\t\t} );\n\t} );\n\n\t/**\n\t * Disable form submit button.\n\t *\n\t * @author Constant Contact\n\t * @since 1.0.0\n\t *\n\t * @return {mixed} jQuery if attribute is set, undefined if not.\n\t */\n\tfunction disableSendButton() {\n\t\treturn $( '#ctct-submitted' ).attr( 'disabled', 'disabled' );\n\t}\n\n\t/**\n\t * Re-enable form submit buttons.\n\t *\n\t * @author Constant Contact\n\t * @since 1.0.0\n\t *\n\t * @return {mixed} jQuery if attribute is set, undefined if not.\n\t */\n\tfunction enableSendButton() {\n\t\treturn $( '#ctct-submitted' ).attr( 'disabled', null );\n\t}\n\n} ( window, jQuery ) );\n","/**\n * Front-end form validation.\n *\n * @since 1.0.0\n */\n\n window.CTCTSupport = {};\n\n( function( window, $, app ) {\n\n\t/**\n\t * @constructor\n\t *\n\t * @author Constant Contact\n\t * @since 1.0.0\n\t */\n\tapp.init = () => {\n\t\tapp.cache();\n\t\tapp.bindEvents();\n\t\tapp.removePlaceholder();\n\t};\n\n\t/**\n\t * Remove placeholder text values.\n\t *\n\t * @author Constant Contact\n\t * @since 1.0.0\n\t */\n\tapp.removePlaceholder = () => {\n\t\t$( '.ctct-form-field input, textarea' ).focus( () => {\n\t\t\t$( this ).data( 'placeholder', $( this ).attr( 'placeholder' ) ).attr( 'placeholder', '' );\n\t\t} ).blur( () => {\n\t\t\t$( this ).attr( 'placeholder', $( this ).data( 'placeholder' ) );\n\t\t} );\n\t};\n\n\t/**\n\t * Cache DOM elements.\n\t *\n\t * @author Constant Contact\n\t * @since 1.0.0\n\t */\n\tapp.cache = () => {\n\n\t\tapp.$c = {\n\t\t\t$forms: []\n\t\t};\n\n\t\t// Cache each form on the page.\n\t\t$( '.ctct-form-wrapper' ).each( function( i, formWrapper ) {\n\t\t\tapp.$c.$forms.push( $( formWrapper ).find( 'form' ) );\n\t\t} );\n\n\t\t// For each form, cache its common elements.\n\t\t$.each( app.$c.$forms, function( i, form ) {\n\n\t\t\tvar $form = $( form );\n\n\t\t\tapp.$c.$forms[ i ].$honeypot = $form.find( '#ctct_usage_field' );\n\t\t\tapp.$c.$forms[ i ].$submitButton = $form.find( 'input[type=submit]' );\n\t\t\tapp.$c.$forms[ i ].$recaptcha = $form.find( '.g-recaptcha' );\n\t\t} );\n\n\t\tapp.timeout = null;\n\t};\n\n\t/**\n\t * Remove the ctct-invalid class from elements that have it.\n\t *\n\t * @author Constant Contact\n\t * @since 1.0.0\n\t */\n\tapp.setAllInputsValid = () => {\n\t\t$( app.$c.$form + ' .ctct-invalid' ).removeClass( 'ctct-invalid' );\n\t};\n\n\t/**\n\t * Adds .ctct-invalid HTML class to inputs whose values are invalid.\n\t *\n\t * @author Constant Contact\n\t * @since 1.0.0\n\t *\n\t * @param {object} error AJAX response error object.\n\t */\n\tapp.processError = ( error ) => {\n\n\t\t// If we have an id property set.\n\t\tif ( 'undefined' !== typeof( error.id ) ) {\n\t\t\t$( '#' + error.id ).addClass( 'ctct-invalid' );\n\t\t}\n\t};\n\n\t/**\n\t * Check the value of the hidden honeypot field; disable form submission button if anything in it.\n\t *\n\t * @author Constant Contact\n\t * @since 1.0.0\n\t *\n\t * @param {object} e The change or keyup event triggering this callback.\n\t * @param {object} $honeyPot The jQuery object for the actual input field being checked.\n\t * @param {object} $submitButton The jQuery object for the submit button in the same form as the honeypot field.\n\t */\n\tapp.checkHoneypot = ( e, $honeyPot, $submitButton ) => {\n\n\t\t// If there is text in the honeypot, disable the submit button\n\t\tif ( 0 < $honeyPot.val().length ) {\n\t\t\t$submitButton.attr( 'disabled', 'disabled' );\n\t\t} else {\n\t\t\t$submitButton.attr( 'disabled', false );\n\t\t}\n\t};\n\n\t/**\n\t * Ensures that we should use AJAX to process the specified form, and that all required fields are not empty.\n\t *\n\t * @author Constant Contact\n\t * @since 1.0.0\n\t *\n\t * @param {object} $form jQuery object for the form being validated.\n\t * @return {boolean} False if AJAX processing is disabled for this form or if a required field is empty.\n\t */\n\tapp.validateSubmission = ( $form ) => {\n\n\t\tif ( 'on' !== $form.attr( 'data-doajax' ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Ensure all required fields in this form are valid.\n\t\t$.each( $form.find( '[required]' ), function( i, field ) {\n\n\t\t\tif ( false === field.checkValidity() ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} );\n\n\t\treturn true;\n\t};\n\n\t/**\n\t * Prepends form with a message that fades out in 5 seconds.\n\t *\n\t * @author Constant Contact\n\t * @since 1.0.0\n\t *\n\t * @param {object} $form jQuery object for the form a message is being displayed for.\n\t * @param {string} message The message content.\n\t * @param {string} classes Optional. HTML classes to add to the message wrapper.\n\t */\n\tapp.showMessage = ( $form, message, classes = '' ) => {\n\n\t\tvar $p = $( '<p />', {\n\t\t\t'class': 'ctct-message ' + classes,\n\t\t\t'text': message\n\t\t} );\n\n\t\t$p.insertBefore( $form ).fadeIn( 200 ).delay( 5000 ).slideUp( 200, () => {\n\t\t\t$p.remove();\n\t\t} );\n\t};\n\n\t/**\n\t * Submits the actual form via AJAX.\n\t *\n\t * @author Constant Contact\n\t * @since 1.0.0\n\t *\n\t * @param {object} $form jQuery object for the form being submitted.\n\t */\n\tapp.submitForm = ( $form ) => {\n\n\t\t$form.find( '#ctct-submitted' ).prop( 'disabled', true );\n\n\t\tvar ajaxData = {\n\t\t\t'action': 'ctct_process_form',\n\t\t\t'data': $form.serialize()\n\t\t};\n\n\t\t$.post( window.ajaxurl, ajaxData, ( response ) => {\n\n\t\t\t$form.find( '#ctct-submitted' ).prop( 'disabled', false );\n\n\t\t\tif ( 'undefined' === typeof( response.status ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Here we'll want to disable the submit button and add some error classes.\n\t\t\tif ( 'success' !== response.status ) {\n\n\t\t\t\tif ( 'undefined' !== typeof( response.errors ) ) {\n\t\t\t\t\tapp.setAllInputsValid();\n\t\t\t\t\tresponse.errors.forEach( app.processError );\n\t\t\t\t} else {\n\t\t\t\t\tapp.showMessage( $form, response.message, 'ctct-error' );\n\t\t\t\t}\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// If we're here, the submission was a success; show message and reset form fields.\n\t\t\tapp.showMessage( $form, response.message, 'ctct-success' );\n\t\t\t$form[0].reset();\n\t\t} );\n\t};\n\n\t/**\n\t * Handle the form submission.\n\t *\n\t * @author Constant Contact\n\t * @since 1.0.0\n\t *\n\t * @param {object} e The submit event.\n\t * @param {object} $form jQuery object for the current form being handled.\n\t * @return {boolean} False if unable to validate the form.\n\t */\n\tapp.handleSubmission = ( e, $form ) => {\n\n\t\tif ( ! app.validateSubmission( $form ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\te.preventDefault();\n\n\t\tclearTimeout( app.timeout );\n\n\t\tapp.timeout = setTimeout( app.submitForm, 500, $form );\n\t};\n\n\t/**\n\t * Set up event bindings and callbacks.\n\t *\n\t * @author Constant Contact\n\t * @since 1.0.0\n\t */\n\tapp.bindEvents = () => {\n\n\t\t// eslint-disable-next-line no-unused-vars\n\t\t$.each( app.$c.$forms, function( i, form ) {\n\n\t\t\t// Attach submission handler to each form's Submit button.\n\t\t\tapp.$c.$forms[ i ].on( 'click', 'input[type=submit]', ( e ) => {\n\t\t\t\tapp.handleSubmission( e, app.$c.$forms[ i ] );\n\t\t\t} );\n\n\t\t\t// Ensure each form's honeypot is checked.\n\t\t\tapp.$c.$forms[ i ].$honeypot.on( 'change keyup', ( e ) => {\n\n\t\t\t\tapp.checkHoneypot(\n\t\t\t\t\te,\n\t\t\t\t\tapp.$c.$forms[ i ].$honeypot,\n\t\t\t\t\tapp.$c.$forms[ i ].$submitButton\n\t\t\t\t);\n\t\t\t} );\n\n\t\t\t// Disable the submit button by default until the captcha is passed (if captcha exists).\n\t\t\tif ( 0 < app.$c.$forms[ i ].$recaptcha.length ) {\n\t\t\t\tapp.$c.$forms[ i ].$submitButton.attr( 'disabled', 'disabled' );\n\t\t\t}\n\n\t\t} );\n\t};\n\n\t$( app.init );\n\n} ( window, jQuery, window.CTCTSupport ) );\n"],"sourceRoot":""}
|
1 |
+
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./assets/js/ctct-plugin-frontend/index.js","webpack:///./assets/js/ctct-plugin-frontend/util.js","webpack:///./assets/js/ctct-plugin-frontend/validation.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","global","$","enableSendButton","attr","document","ready","on","setTimeout","window","jQuery","CTCTSupport","app","init","cache","bindEvents","removePlaceholder","focus","data","blur","$c","$forms","each","formWrapper","push","find","form","$form","$honeypot","$submitButton","$recaptcha","timeout","setAllInputsValid","removeClass","processError","error","id","addClass","checkHoneypot","e","$honeyPot","val","length","validateSubmission","field","checkValidity","showMessage","message","classes","role","$wrapper","parents","remove","$p","prepend","insertBefore","fadeIn","this","submitForm","prop","ajaxData","serialize","post","ajaxurl","response","status","errors","forEach","reset","handleSubmission","preventDefault","clearTimeout"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,KAQvDrB,EAAoBsB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQrB,EAAoBqB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,iBAAVF,GAAsBA,GAASA,EAAMG,WAAY,OAAOH,EAChF,IAAII,EAAKX,OAAOY,OAAO,MAGvB,GAFA1B,EAAoBkB,EAAEO,GACtBX,OAAOC,eAAeU,EAAI,UAAW,CAAET,YAAY,EAAMK,MAAOA,IACtD,EAAPE,GAA4B,iBAATF,EAAmB,IAAI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\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 = \"https://testing.test/wp-content/plugins/constant-contact-forms/assets/js/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 9);\n","import './util';\nimport './validation';\n","/**\n * General-purpose utility stuff for CC plugin.\n */\n( function( global, $ ) {\n\n\t/**\n\t * Temporarily prevent the submit button from being clicked.\n\t */\n\t$( document ).ready( () => {\n\n\t\t$( '.ctct-submitted' ).on( 'click', () => {\n\t\t\tsetTimeout( () => {\n\t\t\t\tdisableSendButton();\n\t\t\t\tsetTimeout( enableSendButton, 3000 );\n\t\t\t}, 100 );\n\t\t} );\n\t} );\n\n\t/**\n\t * Disable form submit button.\n\t *\n\t * @author Constant Contact\n\t * @since 1.0.0\n\t *\n\t * @return {mixed} jQuery if attribute is set, undefined if not.\n\t */\n\tfunction disableSendButton() {\n\t\treturn $( '.ctct-submitted' ).attr( 'disabled', 'disabled' );\n\t}\n\n\t/**\n\t * Re-enable form submit buttons.\n\t *\n\t * @author Constant Contact\n\t * @since 1.0.0\n\t *\n\t * @return {mixed} jQuery if attribute is set, undefined if not.\n\t */\n\tfunction enableSendButton() {\n\t\treturn $( '.ctct-submitted' ).attr( 'disabled', null );\n\t}\n\n} ( window, jQuery ) );\n","/**\n * Front-end form validation.\n *\n * @since 1.0.0\n */\n\n window.CTCTSupport = {};\n\n( function( window, $, app ) {\n\n\t/**\n\t * @constructor\n\t *\n\t * @author Constant Contact\n\t * @since 1.0.0\n\t */\n\tapp.init = () => {\n\t\tapp.cache();\n\t\tapp.bindEvents();\n\t\tapp.removePlaceholder();\n\t};\n\n\t/**\n\t * Remove placeholder text values.\n\t *\n\t * @author Constant Contact\n\t * @since 1.0.0\n\t */\n\tapp.removePlaceholder = () => {\n\t\t$( '.ctct-form-field input, textarea' ).focus( () => {\n\t\t\t$( this ).data( 'placeholder', $( this ).attr( 'placeholder' ) ).attr( 'placeholder', '' );\n\t\t} ).blur( () => {\n\t\t\t$( this ).attr( 'placeholder', $( this ).data( 'placeholder' ) );\n\t\t} );\n\t};\n\n\t/**\n\t * Cache DOM elements.\n\t *\n\t * @author Constant Contact\n\t * @since 1.0.0\n\t */\n\tapp.cache = () => {\n\n\t\tapp.$c = {\n\t\t\t$forms: []\n\t\t};\n\n\t\t// Cache each form on the page.\n\t\t$( '.ctct-form-wrapper' ).each( function( i, formWrapper ) {\n\t\t\tapp.$c.$forms.push( $( formWrapper ).find( 'form' ) );\n\t\t} );\n\n\t\t// For each form, cache its common elements.\n\t\t$.each( app.$c.$forms, function( i, form ) {\n\n\t\t\tvar $form = $( form );\n\n\t\t\tapp.$c.$forms[ i ].$honeypot = $form.find( '.ctct_usage_field' );\n\t\t\tapp.$c.$forms[ i ].$submitButton = $form.find( 'input[type=submit]' );\n\t\t\tapp.$c.$forms[ i ].$recaptcha = $form.find( '.g-recaptcha' );\n\t\t} );\n\n\t\tapp.timeout = null;\n\t};\n\n\t/**\n\t * Remove the ctct-invalid class from elements that have it.\n\t *\n\t * @author Constant Contact\n\t * @since 1.0.0\n\t */\n\tapp.setAllInputsValid = () => {\n\t\t$( app.$c.$form + ' .ctct-invalid' ).removeClass( 'ctct-invalid' );\n\t};\n\n\t/**\n\t * Adds .ctct-invalid HTML class to inputs whose values are invalid.\n\t *\n\t * @author Constant Contact\n\t * @since 1.0.0\n\t *\n\t * @param {object} error AJAX response error object.\n\t */\n\tapp.processError = ( error ) => {\n\n\t\t// If we have an id property set.\n\t\tif ( 'undefined' !== typeof( error.id ) ) {\n\t\t\t$( '#' + error.id ).addClass( 'ctct-invalid' );\n\t\t}\n\t};\n\n\t/**\n\t * Check the value of the hidden honeypot field; disable form submission button if anything in it.\n\t *\n\t * @author Constant Contact\n\t * @since 1.0.0\n\t *\n\t * @param {object} e The change or keyup event triggering this callback.\n\t * @param {object} $honeyPot The jQuery object for the actual input field being checked.\n\t * @param {object} $submitButton The jQuery object for the submit button in the same form as the honeypot field.\n\t */\n\tapp.checkHoneypot = ( e, $honeyPot, $submitButton ) => {\n\n\t\t// If there is text in the honeypot, disable the submit button\n\t\tif ( 0 < $honeyPot.val().length ) {\n\t\t\t$submitButton.attr( 'disabled', 'disabled' );\n\t\t} else {\n\t\t\t$submitButton.attr( 'disabled', false );\n\t\t}\n\t};\n\n\t/**\n\t * Ensures that we should use AJAX to process the specified form, and that all required fields are not empty.\n\t *\n\t * @author Constant Contact\n\t * @since 1.0.0\n\t *\n\t * @param {object} $form jQuery object for the form being validated.\n\t * @return {boolean} False if AJAX processing is disabled for this form or if a required field is empty.\n\t */\n\tapp.validateSubmission = ( $form ) => {\n\n\t\tif ( 'on' !== $form.attr( 'data-doajax' ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Ensure all required fields in this form are valid.\n\t\t$.each( $form.find( '[required]' ), function( i, field ) {\n\n\t\t\tif ( false === field.checkValidity() ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} );\n\n\t\treturn true;\n\t};\n\n\t/**\n\t * Prepends form with a message that fades out in 5 seconds.\n\t *\n\t * @author Constant Contact\n\t * @since 1.0.0\n\t *\n\t * @param {object} $form jQuery object for the form a message is being displayed for.\n\t * @param {string} message The message content.\n\t * @param {string} classes Optional. HTML classes to add to the message wrapper.\n\t */\n\tapp.showMessage = ( $form, message, classes = '', role = 'log' ) => {\n\n\t\tconst $wrapper = $form.parents( '.ctct-form-wrapper' );\n\n\t\t$wrapper.find( 'p.ctct-message' ).remove();\n\n\t\tvar $p = $( '<p />', {\n\t\t\t'class': 'ctct-message ' + classes,\n\t\t\t'text': message,\n\t\t\t'role': role\n\t\t} ).prepend( $( '<button />', {\n\t\t\t'class': 'button button-secondary ctct-dismiss ctct-dismiss-ajax-notice',\n\t\t\t'html': '✕',\n\t\t\t'aria-label': 'Dismiss Notification'\n\t\t} ) );\n\n\t\t$p.insertBefore( $form ).fadeIn( 200 );\n\n\t\t$wrapper.find( '.ctct-dismiss-ajax-notice' ).on( 'click', function() {\n\t\t\t$( this ).parents( '.ctct-message' ).remove();\n\t\t} );\n\t};\n\n\t/**\n\t * Submits the actual form via AJAX.\n\t *\n\t * @author Constant Contact\n\t * @since 1.0.0\n\t *\n\t * @param {object} $form jQuery object for the form being submitted.\n\t */\n\tapp.submitForm = ( $form ) => {\n\n\t\t$form.find( '.ctct-submitted' ).prop( 'disabled', true );\n\n\t\tvar ajaxData = {\n\t\t\t'action': 'ctct_process_form',\n\t\t\t'data': $form.serialize()\n\t\t};\n\n\t\t$.post( window.ajaxurl, ajaxData, ( response ) => {\n\n\t\t\t$form.find( '.ctct-submitted' ).prop( 'disabled', false );\n\n\t\t\tif ( 'undefined' === typeof( response.status ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Here we'll want to disable the submit button and add some error classes.\n\t\t\tif ( 'success' !== response.status ) {\n\n\t\t\t\tif ( 'undefined' !== typeof( response.errors ) ) {\n\t\t\t\t\tapp.setAllInputsValid();\n\t\t\t\t\tresponse.errors.forEach( app.processError );\n\t\t\t\t} else {\n\t\t\t\t\tapp.showMessage( $form, response.message, 'ctct-error', 'alert' );\n\t\t\t\t}\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// If we're here, the submission was a success; show message and reset form fields.\n\t\t\tapp.showMessage( $form, response.message, 'ctct-success', 'status' );\n\t\t\t$form[0].reset();\n\t\t} );\n\t};\n\n\t/**\n\t * Handle the form submission.\n\t *\n\t * @author Constant Contact\n\t * @since 1.0.0\n\t *\n\t * @param {object} e The submit event.\n\t * @param {object} $form jQuery object for the current form being handled.\n\t * @return {boolean} False if unable to validate the form.\n\t */\n\tapp.handleSubmission = ( e, $form ) => {\n\n\t\tif ( ! app.validateSubmission( $form ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\te.preventDefault();\n\n\t\tclearTimeout( app.timeout );\n\n\t\tapp.timeout = setTimeout( app.submitForm, 500, $form );\n\t};\n\n\t/**\n\t * Set up event bindings and callbacks.\n\t *\n\t * @author Constant Contact\n\t * @since 1.0.0\n\t */\n\tapp.bindEvents = () => {\n\n\t\t// eslint-disable-next-line no-unused-vars\n\t\t$.each( app.$c.$forms, function( i, form ) {\n\n\t\t\t// Attach submission handler to each form's Submit button.\n\t\t\tapp.$c.$forms[ i ].on( 'click', 'input[type=submit]', ( e ) => {\n\t\t\t\tapp.handleSubmission( e, app.$c.$forms[ i ] );\n\t\t\t} );\n\n\t\t\t// Ensure each form's honeypot is checked.\n\t\t\tapp.$c.$forms[ i ].$honeypot.on( 'change keyup', ( e ) => {\n\n\t\t\t\tapp.checkHoneypot(\n\t\t\t\t\te,\n\t\t\t\t\tapp.$c.$forms[ i ].$honeypot,\n\t\t\t\t\tapp.$c.$forms[ i ].$submitButton\n\t\t\t\t);\n\t\t\t} );\n\n\t\t\t// Disable the submit button by default until the captcha is passed (if captcha exists).\n\t\t\tif ( 0 < app.$c.$forms[ i ].$recaptcha.length ) {\n\t\t\t\tapp.$c.$forms[ i ].$submitButton.attr( 'disabled', 'disabled' );\n\t\t\t}\n\n\t\t} );\n\t};\n\n\t$( app.init );\n\n} ( window, jQuery, window.CTCTSupport ) );\n"],"sourceRoot":""}
|
assets/js/ctct-plugin-frontend/util.js
CHANGED
@@ -8,7 +8,7 @@
|
|
8 |
*/
|
9 |
$( document ).ready( () => {
|
10 |
|
11 |
-
$( '
|
12 |
setTimeout( () => {
|
13 |
disableSendButton();
|
14 |
setTimeout( enableSendButton, 3000 );
|
@@ -25,7 +25,7 @@
|
|
25 |
* @return {mixed} jQuery if attribute is set, undefined if not.
|
26 |
*/
|
27 |
function disableSendButton() {
|
28 |
-
return $( '
|
29 |
}
|
30 |
|
31 |
/**
|
@@ -37,7 +37,7 @@
|
|
37 |
* @return {mixed} jQuery if attribute is set, undefined if not.
|
38 |
*/
|
39 |
function enableSendButton() {
|
40 |
-
return $( '
|
41 |
}
|
42 |
|
43 |
} ( window, jQuery ) );
|
8 |
*/
|
9 |
$( document ).ready( () => {
|
10 |
|
11 |
+
$( '.ctct-submitted' ).on( 'click', () => {
|
12 |
setTimeout( () => {
|
13 |
disableSendButton();
|
14 |
setTimeout( enableSendButton, 3000 );
|
25 |
* @return {mixed} jQuery if attribute is set, undefined if not.
|
26 |
*/
|
27 |
function disableSendButton() {
|
28 |
+
return $( '.ctct-submitted' ).attr( 'disabled', 'disabled' );
|
29 |
}
|
30 |
|
31 |
/**
|
37 |
* @return {mixed} jQuery if attribute is set, undefined if not.
|
38 |
*/
|
39 |
function enableSendButton() {
|
40 |
+
return $( '.ctct-submitted' ).attr( 'disabled', null );
|
41 |
}
|
42 |
|
43 |
} ( window, jQuery ) );
|
assets/js/ctct-plugin-frontend/validation.js
CHANGED
@@ -56,7 +56,7 @@
|
|
56 |
|
57 |
var $form = $( form );
|
58 |
|
59 |
-
app.$c.$forms[ i ].$honeypot = $form.find( '
|
60 |
app.$c.$forms[ i ].$submitButton = $form.find( 'input[type=submit]' );
|
61 |
app.$c.$forms[ i ].$recaptcha = $form.find( '.g-recaptcha' );
|
62 |
} );
|
@@ -146,15 +146,26 @@
|
|
146 |
* @param {string} message The message content.
|
147 |
* @param {string} classes Optional. HTML classes to add to the message wrapper.
|
148 |
*/
|
149 |
-
app.showMessage = ( $form, message, classes = '' ) => {
|
|
|
|
|
|
|
|
|
150 |
|
151 |
var $p = $( '<p />', {
|
152 |
'class': 'ctct-message ' + classes,
|
153 |
-
'text': message
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
158 |
} );
|
159 |
};
|
160 |
|
@@ -168,7 +179,7 @@
|
|
168 |
*/
|
169 |
app.submitForm = ( $form ) => {
|
170 |
|
171 |
-
$form.find( '
|
172 |
|
173 |
var ajaxData = {
|
174 |
'action': 'ctct_process_form',
|
@@ -177,7 +188,7 @@
|
|
177 |
|
178 |
$.post( window.ajaxurl, ajaxData, ( response ) => {
|
179 |
|
180 |
-
$form.find( '
|
181 |
|
182 |
if ( 'undefined' === typeof( response.status ) ) {
|
183 |
return false;
|
@@ -190,14 +201,14 @@
|
|
190 |
app.setAllInputsValid();
|
191 |
response.errors.forEach( app.processError );
|
192 |
} else {
|
193 |
-
app.showMessage( $form, response.message, 'ctct-error' );
|
194 |
}
|
195 |
|
196 |
return false;
|
197 |
}
|
198 |
|
199 |
// If we're here, the submission was a success; show message and reset form fields.
|
200 |
-
app.showMessage( $form, response.message, 'ctct-success' );
|
201 |
$form[0].reset();
|
202 |
} );
|
203 |
};
|
56 |
|
57 |
var $form = $( form );
|
58 |
|
59 |
+
app.$c.$forms[ i ].$honeypot = $form.find( '.ctct_usage_field' );
|
60 |
app.$c.$forms[ i ].$submitButton = $form.find( 'input[type=submit]' );
|
61 |
app.$c.$forms[ i ].$recaptcha = $form.find( '.g-recaptcha' );
|
62 |
} );
|
146 |
* @param {string} message The message content.
|
147 |
* @param {string} classes Optional. HTML classes to add to the message wrapper.
|
148 |
*/
|
149 |
+
app.showMessage = ( $form, message, classes = '', role = 'log' ) => {
|
150 |
+
|
151 |
+
const $wrapper = $form.parents( '.ctct-form-wrapper' );
|
152 |
+
|
153 |
+
$wrapper.find( 'p.ctct-message' ).remove();
|
154 |
|
155 |
var $p = $( '<p />', {
|
156 |
'class': 'ctct-message ' + classes,
|
157 |
+
'text': message,
|
158 |
+
'role': role
|
159 |
+
} ).prepend( $( '<button />', {
|
160 |
+
'class': 'button button-secondary ctct-dismiss ctct-dismiss-ajax-notice',
|
161 |
+
'html': '✕',
|
162 |
+
'aria-label': 'Dismiss Notification'
|
163 |
+
} ) );
|
164 |
+
|
165 |
+
$p.insertBefore( $form ).fadeIn( 200 );
|
166 |
+
|
167 |
+
$wrapper.find( '.ctct-dismiss-ajax-notice' ).on( 'click', function() {
|
168 |
+
$( this ).parents( '.ctct-message' ).remove();
|
169 |
} );
|
170 |
};
|
171 |
|
179 |
*/
|
180 |
app.submitForm = ( $form ) => {
|
181 |
|
182 |
+
$form.find( '.ctct-submitted' ).prop( 'disabled', true );
|
183 |
|
184 |
var ajaxData = {
|
185 |
'action': 'ctct_process_form',
|
188 |
|
189 |
$.post( window.ajaxurl, ajaxData, ( response ) => {
|
190 |
|
191 |
+
$form.find( '.ctct-submitted' ).prop( 'disabled', false );
|
192 |
|
193 |
if ( 'undefined' === typeof( response.status ) ) {
|
194 |
return false;
|
201 |
app.setAllInputsValid();
|
202 |
response.errors.forEach( app.processError );
|
203 |
} else {
|
204 |
+
app.showMessage( $form, response.message, 'ctct-error', 'alert' );
|
205 |
}
|
206 |
|
207 |
return false;
|
208 |
}
|
209 |
|
210 |
// If we're here, the submission was a success; show message and reset form fields.
|
211 |
+
app.showMessage( $form, response.message, 'ctct-success', 'status' );
|
212 |
$form[0].reset();
|
213 |
} );
|
214 |
};
|
assets/js/ctct-plugin-recaptcha-v2.js
CHANGED
@@ -81,7 +81,7 @@
|
|
81 |
/******/
|
82 |
/******/
|
83 |
/******/ // Load entry module and return exports
|
84 |
-
/******/ return __webpack_require__(__webpack_require__.s =
|
85 |
/******/ })
|
86 |
/************************************************************************/
|
87 |
/******/ ({
|
@@ -105,11 +105,11 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _rec
|
|
105 |
/*! no static exports found */
|
106 |
/***/ (function(module, exports) {
|
107 |
|
108 |
-
eval("
|
109 |
|
110 |
/***/ }),
|
111 |
|
112 |
-
/***/
|
113 |
/*!***********************************************************!*\
|
114 |
!*** multi ./assets/js/ctct-plugin-recaptcha-v2/index.js ***!
|
115 |
\***********************************************************/
|
81 |
/******/
|
82 |
/******/
|
83 |
/******/ // Load entry module and return exports
|
84 |
+
/******/ return __webpack_require__(__webpack_require__.s = 4);
|
85 |
/******/ })
|
86 |
/************************************************************************/
|
87 |
/******/ ({
|
105 |
/*! no static exports found */
|
106 |
/***/ (function(module, exports) {
|
107 |
|
108 |
+
eval("/**\n * Enable submit button.\n *\n * @author Rebekah Van Epps <rebekah.vanepps@webdevstudios.com>\n * @since 1.8.3\n *\n * @param {Object} submitBtn Submit DOM element.\n */\nvar ctctEnableBtn = function ctctEnableBtn(submitBtn) {\n jQuery(submitBtn).attr(\"disabled\", false);\n};\n\nwindow.ctctEnableBtn = ctctEnableBtn;\n/**\n * Disable submit button.\n *\n * @author Rebekah Van Epps <rebekah.vanepps@webdevstudios.com>\n * @since 1.8.3\n *\n * @param {Object} submitBtn Submit DOM element.\n */\n\nvar ctctDisableBtn = function ctctDisableBtn(submitBtn) {\n jQuery(submitBtn).attr(\"disabled\", \"disabled\");\n};\n\nwindow.ctctDisableBtn = ctctDisableBtn;\n\nvar renderReCaptcha = function renderReCaptcha() {\n jQuery('.g-recaptcha').each(function (index, el) {\n var submitBtn = jQuery(el).siblings('.ctct-form-field-submit').find('.ctct-submit');\n grecaptcha.render(el, {\n 'sitekey': jQuery(el).attr('data-sitekey'),\n 'size': jQuery(el).attr('data-size'),\n 'tabindex': jQuery(el).attr('data-tabindex'),\n 'callback': function callback() {\n window.ctctEnableBtn(submitBtn);\n },\n 'expired-callback': function expiredCallback() {\n window.ctctDisableBtn(submitBtn);\n },\n 'isolated': true\n });\n });\n};\n\nwindow.renderReCaptcha = renderReCaptcha;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9hc3NldHMvanMvY3RjdC1wbHVnaW4tcmVjYXB0Y2hhLXYyL3JlY2FwdGNoYS5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL2Fzc2V0cy9qcy9jdGN0LXBsdWdpbi1yZWNhcHRjaGEtdjIvcmVjYXB0Y2hhLmpzPzlhNDQiXSwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFbmFibGUgc3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/recaptcha.js\n");
|
109 |
|
110 |
/***/ }),
|
111 |
|
112 |
+
/***/ 4:
|
113 |
/*!***********************************************************!*\
|
114 |
!*** multi ./assets/js/ctct-plugin-recaptcha-v2/index.js ***!
|
115 |
\***********************************************************/
|
assets/js/ctct-plugin-recaptcha-v2.min.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
!function(t){var e={};function n(r){if(e[r])return e[r].exports;var
|
2 |
//# sourceMappingURL=ctct-plugin-recaptcha-v2.min.js.map
|
1 |
+
!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="https://testing.test/wp-content/plugins/constant-contact-forms/assets/js/",n(n.s=16)}({16:function(t,e,n){t.exports=n(17)},17:function(t,e,n){"use strict";n.r(e);n(18)},18:function(t,e){window.ctctEnableBtn=function(t){jQuery(t).attr("disabled",!1)};window.ctctDisableBtn=function(t){jQuery(t).attr("disabled","disabled")};window.renderReCaptcha=function(){jQuery(".g-recaptcha").each((function(t,e){var n=jQuery(e).siblings(".ctct-form-field-submit").find(".ctct-submit");grecaptcha.render(e,{sitekey:jQuery(e).attr("data-sitekey"),size:jQuery(e).attr("data-size"),tabindex:jQuery(e).attr("data-tabindex"),callback:function(){window.ctctEnableBtn(n)},"expired-callback":function(){window.ctctDisableBtn(n)},isolated:!0})}))}}});
|
2 |
//# sourceMappingURL=ctct-plugin-recaptcha-v2.min.js.map
|
assets/js/ctct-plugin-recaptcha-v2.min.js.map
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./assets/js/ctct-plugin-recaptcha-v2/index.js","webpack:///./assets/js/ctct-plugin-recaptcha-v2/recaptcha.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","window","ctctEnableBtn","
|
1 |
+
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./assets/js/ctct-plugin-recaptcha-v2/index.js","webpack:///./assets/js/ctct-plugin-recaptcha-v2/recaptcha.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","window","ctctEnableBtn","submitBtn","jQuery","attr","ctctDisableBtn","renderReCaptcha","each","index","el","siblings","find","grecaptcha","render"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,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,MAAM,SAAUC,EAAOC,GAC5C,IAAMP,EAAYC,OAAQM,GAAKC,SAAU,2BAA4BC,KAAM,gBAE3EC,WAAWC,OAAQJ,EAAI,CACnB,QAAWN,OAAQM,GAAKL,KAAM,gBAC9B,KAAQD,OAAQM,GAAKL,KAAM,aAC3B,SAAYD,OAAQM,GAAKL,KAAM,iBAC/B,SAAY,WACRJ,OAAOC,cAAeC,IAE1B,mBAAoB,WAChBF,OAAOK,eAAgBH,IAE3B,UAAY","file":"ctct-plugin-recaptcha-v2.min.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 = \"https://testing.test/wp-content/plugins/constant-contact-forms/assets/js/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 16);\n","// This is the entry point for reCAPTCHA v2 JS. Add JavaScript imports here.\nimport './recaptcha';\n","/**\n * Enable submit button.\n *\n * @author Rebekah Van Epps <rebekah.vanepps@webdevstudios.com>\n * @since 1.8.3\n *\n * @param {Object} submitBtn Submit DOM element.\n */\nvar ctctEnableBtn = function( submitBtn ) {\n jQuery( submitBtn ).attr( \"disabled\", false );\n}\nwindow.ctctEnableBtn = ctctEnableBtn;\n\n/**\n * Disable submit button.\n *\n * @author Rebekah Van Epps <rebekah.vanepps@webdevstudios.com>\n * @since 1.8.3\n *\n * @param {Object} submitBtn Submit DOM element.\n */\nvar ctctDisableBtn = function( submitBtn ) {\n jQuery( submitBtn ).attr( \"disabled\", \"disabled\" );\n}\nwindow.ctctDisableBtn = ctctDisableBtn;\n\nvar renderReCaptcha = function() {\n jQuery( '.g-recaptcha' ).each( function( index, el ) {\n const submitBtn = jQuery( el ).siblings( '.ctct-form-field-submit' ).find( '.ctct-submit' );\n\n grecaptcha.render( el, {\n 'sitekey': jQuery( el ).attr( 'data-sitekey' ),\n 'size': jQuery( el ).attr( 'data-size' ),\n 'tabindex': jQuery( el ).attr( 'data-tabindex' ),\n 'callback': function() {\n window.ctctEnableBtn( submitBtn );\n },\n 'expired-callback': function() {\n window.ctctDisableBtn( submitBtn );\n },\n 'isolated': true,\n } );\n } );\n};\nwindow.renderReCaptcha = renderReCaptcha;\n"],"sourceRoot":""}
|
assets/js/ctct-plugin-recaptcha-v2/recaptcha.js
CHANGED
@@ -1,24 +1,42 @@
|
|
1 |
-
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
}
|
4 |
window.ctctEnableBtn = ctctEnableBtn;
|
5 |
|
6 |
-
|
7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
}
|
9 |
window.ctctDisableBtn = ctctDisableBtn;
|
10 |
|
11 |
var renderReCaptcha = function() {
|
12 |
jQuery( '.g-recaptcha' ).each( function( index, el ) {
|
|
|
|
|
13 |
grecaptcha.render( el, {
|
14 |
'sitekey': jQuery( el ).attr( 'data-sitekey' ),
|
15 |
'size': jQuery( el ).attr( 'data-size' ),
|
16 |
'tabindex': jQuery( el ).attr( 'data-tabindex' ),
|
17 |
'callback': function() {
|
18 |
-
window.ctctEnableBtn(
|
19 |
},
|
20 |
'expired-callback': function() {
|
21 |
-
window.ctctDisableBtn(
|
22 |
},
|
23 |
'isolated': true,
|
24 |
} );
|
1 |
+
/**
|
2 |
+
* Enable submit button.
|
3 |
+
*
|
4 |
+
* @author Rebekah Van Epps <rebekah.vanepps@webdevstudios.com>
|
5 |
+
* @since 1.8.3
|
6 |
+
*
|
7 |
+
* @param {Object} submitBtn Submit DOM element.
|
8 |
+
*/
|
9 |
+
var ctctEnableBtn = function( submitBtn ) {
|
10 |
+
jQuery( submitBtn ).attr( "disabled", false );
|
11 |
}
|
12 |
window.ctctEnableBtn = ctctEnableBtn;
|
13 |
|
14 |
+
/**
|
15 |
+
* Disable submit button.
|
16 |
+
*
|
17 |
+
* @author Rebekah Van Epps <rebekah.vanepps@webdevstudios.com>
|
18 |
+
* @since 1.8.3
|
19 |
+
*
|
20 |
+
* @param {Object} submitBtn Submit DOM element.
|
21 |
+
*/
|
22 |
+
var ctctDisableBtn = function( submitBtn ) {
|
23 |
+
jQuery( submitBtn ).attr( "disabled", "disabled" );
|
24 |
}
|
25 |
window.ctctDisableBtn = ctctDisableBtn;
|
26 |
|
27 |
var renderReCaptcha = function() {
|
28 |
jQuery( '.g-recaptcha' ).each( function( index, el ) {
|
29 |
+
const submitBtn = jQuery( el ).siblings( '.ctct-form-field-submit' ).find( '.ctct-submit' );
|
30 |
+
|
31 |
grecaptcha.render( el, {
|
32 |
'sitekey': jQuery( el ).attr( 'data-sitekey' ),
|
33 |
'size': jQuery( el ).attr( 'data-size' ),
|
34 |
'tabindex': jQuery( el ).attr( 'data-tabindex' ),
|
35 |
'callback': function() {
|
36 |
+
window.ctctEnableBtn( submitBtn );
|
37 |
},
|
38 |
'expired-callback': function() {
|
39 |
+
window.ctctDisableBtn( submitBtn );
|
40 |
},
|
41 |
'isolated': true,
|
42 |
} );
|
assets/sass/_global.scss
CHANGED
@@ -23,5 +23,13 @@
|
|
23 |
border-color: $color-green;
|
24 |
color: darken( $color-success, 20% );
|
25 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
}
|
27 |
}
|
23 |
border-color: $color-green;
|
24 |
color: darken( $color-success, 20% );
|
25 |
}
|
26 |
+
|
27 |
+
.ctct-dismiss-ajax-notice {
|
28 |
+
border-radius: 50%;
|
29 |
+
float: right;
|
30 |
+
line-height: 1;
|
31 |
+
padding: 0.85rem 1rem;
|
32 |
+
text-decoration: none;
|
33 |
+
}
|
34 |
}
|
35 |
}
|
assets/sass/_inputs.scss
CHANGED
@@ -77,7 +77,7 @@
|
|
77 |
top: -9999px !important;
|
78 |
}
|
79 |
|
80 |
-
|
81 |
border: 0 none;
|
82 |
clip: rect( 0, 0, 0, 0 );
|
83 |
height: 1px;
|
@@ -88,7 +88,7 @@
|
|
88 |
width: 1px;
|
89 |
}
|
90 |
|
91 |
-
.no-recaptcha
|
92 |
background-image: url('../images/oval.min.svg');
|
93 |
background-position: center;
|
94 |
background-repeat: no-repeat;
|
@@ -97,7 +97,7 @@
|
|
97 |
opacity: 0.3;
|
98 |
}
|
99 |
|
100 |
-
.has-recaptcha
|
101 |
cursor: not-allowed;
|
102 |
}
|
103 |
}
|
77 |
top: -9999px !important;
|
78 |
}
|
79 |
|
80 |
+
.ctct_usage {
|
81 |
border: 0 none;
|
82 |
clip: rect( 0, 0, 0, 0 );
|
83 |
height: 1px;
|
88 |
width: 1px;
|
89 |
}
|
90 |
|
91 |
+
.no-recaptcha .ctct-submitted:disabled {
|
92 |
background-image: url('../images/oval.min.svg');
|
93 |
background-position: center;
|
94 |
background-repeat: no-repeat;
|
97 |
opacity: 0.3;
|
98 |
}
|
99 |
|
100 |
+
.has-recaptcha .ctct-submitted:disabled {
|
101 |
cursor: not-allowed;
|
102 |
}
|
103 |
}
|
constant-contact-forms.php
CHANGED
@@ -12,7 +12,7 @@
|
|
12 |
* Plugin Name: Constant Contact Forms for WordPress
|
13 |
* Plugin URI: https://www.constantcontact.com
|
14 |
* Description: Be a better marketer. All it takes is Constant Contact email marketing.
|
15 |
-
* Version: 1.8.
|
16 |
* Author: Constant Contact
|
17 |
* Author URI: https://www.constantcontact.com/index?pn=miwordpress
|
18 |
* License: GPLv3
|
@@ -72,7 +72,7 @@ class Constant_Contact {
|
|
72 |
* @since 1.0.0
|
73 |
* @var string
|
74 |
*/
|
75 |
-
const VERSION = '1.8.
|
76 |
|
77 |
/**
|
78 |
* URL of plugin directory.
|
12 |
* Plugin Name: Constant Contact Forms for WordPress
|
13 |
* Plugin URI: https://www.constantcontact.com
|
14 |
* Description: Be a better marketer. All it takes is Constant Contact email marketing.
|
15 |
+
* Version: 1.8.7
|
16 |
* Author: Constant Contact
|
17 |
* Author URI: https://www.constantcontact.com/index?pn=miwordpress
|
18 |
* License: GPLv3
|
72 |
* @since 1.0.0
|
73 |
* @var string
|
74 |
*/
|
75 |
+
const VERSION = '1.8.7';
|
76 |
|
77 |
/**
|
78 |
* URL of plugin directory.
|
includes/class-api.php
CHANGED
@@ -509,6 +509,11 @@ class ConstantContact_API {
|
|
509 |
try {
|
510 |
$response = $this->cc()->contactService->getContacts( $api_token, [ 'email' => $email ] );
|
511 |
|
|
|
|
|
|
|
|
|
|
|
512 |
if ( isset( $response->results ) && ! empty( $response->results ) ) {
|
513 |
constant_contact_maybe_log_it( 'API', 'Contact set to be updated', [ 'form' => get_the_title( $form_id ) ] );
|
514 |
$return_contact = $this->update_contact( $response, $api_token, $list, $new_contact, $form_id );
|
509 |
try {
|
510 |
$response = $this->cc()->contactService->getContacts( $api_token, [ 'email' => $email ] );
|
511 |
|
512 |
+
// Remove ctct-instance if present to avoid errors.
|
513 |
+
if ( array_key_exists( 'ctct-instance', $new_contact ) ) {
|
514 |
+
unset( $new_contact['ctct-instance'] );
|
515 |
+
}
|
516 |
+
|
517 |
if ( isset( $response->results ) && ! empty( $response->results ) ) {
|
518 |
constant_contact_maybe_log_it( 'API', 'Contact set to be updated', [ 'form' => get_the_title( $form_id ) ] );
|
519 |
$return_contact = $this->update_contact( $response, $api_token, $list, $new_contact, $form_id );
|
includes/class-display.php
CHANGED
@@ -281,7 +281,7 @@ class ConstantContact_Display {
|
|
281 |
if ( $response && isset( $response['message'] ) && isset( $response['status'] ) ) {
|
282 |
|
283 |
if ( 'success' === $response['status'] ) {
|
284 |
-
return $this->message( 'success', $response['message'] );
|
285 |
} else {
|
286 |
|
287 |
// If we didn't get a success message, then we want to error.
|
@@ -294,7 +294,7 @@ class ConstantContact_Display {
|
|
294 |
|
295 |
if ( 'error' === $status || $error_message ) {
|
296 |
if ( ! empty( $error_message ) ) {
|
297 |
-
$form_err_display = $this->message( 'error', $error_message );
|
298 |
}
|
299 |
}
|
300 |
|
@@ -346,7 +346,7 @@ class ConstantContact_Display {
|
|
346 |
|
347 |
$return .= $form_err_display;
|
348 |
|
349 |
-
$return .= $this->build_form_fields( $form_data, $old_values, $req_errors );
|
350 |
|
351 |
if ( ! $disable_recaptcha && ConstantContact_reCAPTCHA::has_recaptcha_keys() ) {
|
352 |
$recaptcha_version = ctct_get_settings_option( '_ctct_recaptcha_version', '' );
|
@@ -459,12 +459,13 @@ class ConstantContact_Display {
|
|
459 |
*
|
460 |
* @since 1.0.0
|
461 |
*
|
462 |
-
* @param
|
463 |
-
* @param
|
464 |
-
* @param
|
|
|
465 |
* @return string
|
466 |
*/
|
467 |
-
public function build_form_fields( $form_data, $old_values, $req_errors ) {
|
468 |
$return = '';
|
469 |
$form_id = absint( $form_data['options']['form_id'] );
|
470 |
|
@@ -482,12 +483,12 @@ class ConstantContact_Display {
|
|
482 |
|
483 |
if ( isset( $form_data['fields'] ) && is_array( $form_data['fields'] ) ) {
|
484 |
foreach ( $form_data['fields'] as $key => $value ) {
|
485 |
-
$return .= $this->field( $value, $old_values, $req_errors, $form_id, $label_placement );
|
486 |
}
|
487 |
}
|
488 |
|
489 |
if ( isset( $form_data['options'] ) ) {
|
490 |
-
$return .= $this->opt_in( $form_data['options'] );
|
491 |
}
|
492 |
|
493 |
return $return;
|
@@ -502,7 +503,7 @@ class ConstantContact_Display {
|
|
502 |
*/
|
503 |
public function build_honeypot_field() {
|
504 |
return sprintf(
|
505 |
-
'<div
|
506 |
esc_html__( 'Constant Contact Use.', 'constant-contact-forms' )
|
507 |
);
|
508 |
}
|
@@ -607,14 +608,15 @@ class ConstantContact_Display {
|
|
607 |
* @since 1.0.0
|
608 |
* @since 1.4.0 Added label placement parameter.
|
609 |
*
|
610 |
-
* @param
|
611 |
-
* @param
|
612 |
-
* @param
|
613 |
-
* @param
|
614 |
-
* @param
|
615 |
-
* @
|
|
|
616 |
*/
|
617 |
-
public function field( $field, $old_values = [], $req_errors = [], $form_id = 0, $label_placement = 'top' ) {
|
618 |
if ( ! isset( $field['name'] ) || ! isset( $field['map_to'] ) ) {
|
619 |
return '';
|
620 |
}
|
@@ -670,31 +672,33 @@ class ConstantContact_Display {
|
|
670 |
$value = $this->get_submitted_value( $value, $map, $field, $old_values );
|
671 |
|
672 |
switch ( $type ) {
|
|
|
|
|
|
|
|
|
673 |
case 'custom':
|
674 |
case 'first_name':
|
675 |
case 'last_name':
|
676 |
-
case 'phone_number':
|
677 |
case 'job_title':
|
678 |
case 'company':
|
679 |
-
case 'website':
|
680 |
case 'text_field':
|
681 |
-
return $this->input( 'text', $name, $map, $value, $desc, $req, false, $field_error, $form_id, $label_placement );
|
682 |
case 'custom_text_area':
|
683 |
-
return $this->textarea( $name, $map, $value, $desc, $req, $field_error, 'maxlength="500"', $label_placement );
|
684 |
case 'email':
|
685 |
-
return $this->input( 'email', $name, $map, $value, $desc, $req, false, $field_error, $form_id, $label_placement );
|
686 |
case 'hidden':
|
687 |
return $this->input( 'hidden', $name, $map, $value, $desc, $req );
|
688 |
case 'checkbox':
|
689 |
-
return $this->checkbox( $name, $map, $value, $desc );
|
690 |
case 'submit':
|
691 |
return $this->input( 'submit', $name, $map, $value, $desc, $req, false, $field_error );
|
692 |
case 'address':
|
693 |
-
return $this->address( $name, $map, $value, $desc, $req, $field_error, $label_placement );
|
694 |
case 'anniversery':
|
695 |
case 'birthday':
|
696 |
// Need this to be month / day / year.
|
697 |
-
return $this->dates( $name, $map, $value, $desc, $req, $field_error );
|
698 |
default:
|
699 |
return $this->input( 'text', $name, $map, $value, $desc, $req, false, $field_error );
|
700 |
}
|
@@ -761,17 +765,17 @@ class ConstantContact_Display {
|
|
761 |
*
|
762 |
* @since 1.0.0
|
763 |
*
|
764 |
-
* @param
|
765 |
-
* @param
|
766 |
-
* @
|
|
|
767 |
*/
|
768 |
-
public function message( $type, $message ) {
|
769 |
-
$role = ( 'error' === $type ) ? ' role="alert"' : '';
|
770 |
-
|
771 |
return sprintf(
|
772 |
-
'<p class="ctct-message %s"%s>%s</p>',
|
773 |
esc_attr( $type ),
|
774 |
-
$
|
|
|
775 |
esc_html( $message )
|
776 |
);
|
777 |
}
|
@@ -937,21 +941,23 @@ class ConstantContact_Display {
|
|
937 |
*
|
938 |
* @since 1.0.0
|
939 |
*
|
940 |
-
* @param
|
941 |
-
* @param
|
942 |
-
* @param
|
943 |
-
* @param
|
944 |
-
* @param
|
945 |
-
* @param
|
946 |
-
* @param
|
947 |
-
* @param
|
948 |
-
* @param
|
949 |
-
* @param
|
950 |
-
* @
|
|
|
951 |
*/
|
952 |
-
public function input( $type = 'text', $name = '', $id = '', $value = '', $label = '', $req = false, $f_only = false, $field_error = false, $form_id = 0, $label_placement = '' ) {
|
953 |
$name = sanitize_text_field( $name );
|
954 |
-
$
|
|
|
955 |
$input_inline_styles = '';
|
956 |
$label_placement_class = 'ctct-label-' . $label_placement;
|
957 |
$specific_form_styles = $this->specific_form_styles;
|
@@ -966,7 +972,7 @@ class ConstantContact_Display {
|
|
966 |
$label = sanitize_text_field( $label );
|
967 |
$req_text = $req ? 'required' : '';
|
968 |
|
969 |
-
$markup = $this->field_top( $type, $name, $
|
970 |
|
971 |
$req_label = '';
|
972 |
|
@@ -979,7 +985,7 @@ class ConstantContact_Display {
|
|
979 |
} else {
|
980 |
$markup .= '<span class="' . $label_placement_class . '">';
|
981 |
}
|
982 |
-
$markup .= $this->get_label( $
|
983 |
$markup .= '</span>';
|
984 |
}
|
985 |
|
@@ -994,13 +1000,13 @@ class ConstantContact_Display {
|
|
994 |
* Filter to add classes for the rendering input.
|
995 |
*
|
996 |
* @since 1.2.0
|
997 |
-
* @param array $classes
|
998 |
-
* @param string $type
|
999 |
-
* @param int $form_id
|
1000 |
-
* @param int $
|
1001 |
* @return array
|
1002 |
*/
|
1003 |
-
$classes = apply_filters( 'constant_contact_input_classes', $classes, $type, $form_id, $
|
1004 |
|
1005 |
/**
|
1006 |
* Filters whether or not to remove characters from potential maxlength attribute value.
|
@@ -1019,24 +1025,27 @@ class ConstantContact_Display {
|
|
1019 |
$classes[] = 'ctct-invalid';
|
1020 |
}
|
1021 |
|
|
|
1022 |
$class_attr = '';
|
1023 |
|
1024 |
if ( count( $classes ) ) {
|
1025 |
$class_attr = 'class="' . implode( ' ', $classes ) . '"';
|
1026 |
}
|
1027 |
|
1028 |
-
|
|
|
1029 |
$markup .= sprintf(
|
1030 |
$field,
|
1031 |
$req_text,
|
1032 |
$type,
|
1033 |
-
$
|
1034 |
-
$f_id,
|
1035 |
$input_inline_styles,
|
1036 |
$value,
|
1037 |
$max_length,
|
1038 |
-
$label,
|
1039 |
-
$class_attr
|
|
|
|
|
1040 |
);
|
1041 |
|
1042 |
// Reassign because if we want "field only", like for hidden inputs, we need to still pass a value that went through sprintf().
|
@@ -1044,12 +1053,12 @@ class ConstantContact_Display {
|
|
1044 |
|
1045 |
if ( ( 'bottom' === $label_placement || 'right' === $label_placement ) && ( 'submit' !== $type ) && ( 'hidden' !== $type ) ) {
|
1046 |
$markup .= '<span class="' . $label_placement_class . '">';
|
1047 |
-
$markup .= $this->get_label( $
|
1048 |
$markup .= '</span>';
|
1049 |
}
|
1050 |
|
1051 |
if ( $field_error ) {
|
1052 |
-
$markup .= $this->field_bottom( $
|
1053 |
} else {
|
1054 |
$markup .= $this->field_bottom();
|
1055 |
}
|
@@ -1066,20 +1075,21 @@ class ConstantContact_Display {
|
|
1066 |
*
|
1067 |
* @since 1.0.0
|
1068 |
*
|
1069 |
-
* @param
|
1070 |
-
* @param
|
1071 |
-
* @param
|
1072 |
-
* @param
|
1073 |
-
* @
|
|
|
1074 |
*/
|
1075 |
-
public function checkbox( $name = '', $f_id = '', $value = '', $label = '' ) {
|
1076 |
-
$name
|
1077 |
-
$
|
1078 |
-
$
|
1079 |
-
$
|
1080 |
-
$
|
1081 |
-
|
1082 |
-
$classes
|
1083 |
|
1084 |
/**
|
1085 |
* Filter to add classes for the rendering input.
|
@@ -1089,10 +1099,10 @@ class ConstantContact_Display {
|
|
1089 |
* @param string $type The field type being rendered.
|
1090 |
* @return array
|
1091 |
*/
|
1092 |
-
$classes = apply_filters( 'constant_contact_input_classes', $classes, $type ); // @todo if/when we start using the checkbox field type, pass in a $form_id and $
|
1093 |
|
1094 |
-
$markup = $this->field_top( $type, $name, $
|
1095 |
-
$markup .= '<input type="' . $type . '" name="' . $
|
1096 |
$markup .= $this->field_bottom( $name, ' ' . $label );
|
1097 |
|
1098 |
return $markup;
|
@@ -1135,10 +1145,11 @@ class ConstantContact_Display {
|
|
1135 |
*
|
1136 |
* @since 1.0.0
|
1137 |
*
|
1138 |
-
* @param
|
1139 |
-
* @
|
|
|
1140 |
*/
|
1141 |
-
public function opt_in( $form_data ) {
|
1142 |
|
1143 |
if ( ! isset( $form_data['optin'] ) ) {
|
1144 |
return '';
|
@@ -1151,7 +1162,7 @@ class ConstantContact_Display {
|
|
1151 |
] );
|
1152 |
|
1153 |
if ( isset( $optin['list'] ) && $optin['list'] ) {
|
1154 |
-
return $this->optin_display( $optin );
|
1155 |
}
|
1156 |
|
1157 |
return '';
|
@@ -1162,10 +1173,11 @@ class ConstantContact_Display {
|
|
1162 |
*
|
1163 |
* @since 1.0.0
|
1164 |
*
|
1165 |
-
* @param
|
1166 |
-
* @
|
|
|
1167 |
*/
|
1168 |
-
public function optin_display( $optin ) {
|
1169 |
|
1170 |
$label = sanitize_text_field( isset( $optin['instructions'] ) ? $optin['instructions'] : '' );
|
1171 |
$value = sanitize_text_field( isset( $optin['list'] ) ? $optin['list'] : '' );
|
@@ -1181,7 +1193,7 @@ class ConstantContact_Display {
|
|
1181 |
$markup = '<div class="ctct-optin-hide" style="display:none;">';
|
1182 |
}
|
1183 |
|
1184 |
-
$markup .= $this->get_optin_markup( $label, $value, $show );
|
1185 |
|
1186 |
if ( ! $show ) {
|
1187 |
$markup .= '</div><!--.ctct-optin-hide -->';
|
@@ -1195,17 +1207,20 @@ class ConstantContact_Display {
|
|
1195 |
*
|
1196 |
* @since 1.0.0
|
1197 |
*
|
1198 |
-
* @param
|
1199 |
-
* @param
|
1200 |
-
* @param
|
1201 |
-
* @
|
|
|
1202 |
*/
|
1203 |
-
public function get_optin_markup( $label, $value, $show ) {
|
1204 |
-
$checked
|
|
|
|
|
1205 |
|
1206 |
-
$markup = $this->field_top( 'checkbox',
|
1207 |
-
$markup .= '<input type="checkbox" ' . $checked . ' name="
|
1208 |
-
$markup .= $this->field_bottom(
|
1209 |
|
1210 |
return $markup;
|
1211 |
}
|
@@ -1215,21 +1230,23 @@ class ConstantContact_Display {
|
|
1215 |
*
|
1216 |
* @since 1.0.0
|
1217 |
*
|
1218 |
-
* @param
|
1219 |
-
* @param
|
1220 |
-
* @param
|
1221 |
-
* @param
|
1222 |
-
* @param
|
1223 |
-
* @param
|
1224 |
-
* @param
|
1225 |
-
* @
|
|
|
1226 |
*/
|
1227 |
-
public function address( $name = '', $
|
1228 |
-
$
|
1229 |
-
$
|
1230 |
-
$
|
1231 |
-
$
|
1232 |
-
$
|
|
|
1233 |
|
1234 |
$v_street = isset( $value['street_address'] ) ? $value['street_address'] : '';
|
1235 |
$v_line_2 = isset( $value['line_2_address'] ) ? $value['line_2_address'] : '';
|
@@ -1246,17 +1263,18 @@ class ConstantContact_Display {
|
|
1246 |
$label_street1 = sprintf(
|
1247 |
'<span class="%1$s"><label for="street_%2$s" style="%3$s">%4$s</label></span>',
|
1248 |
esc_attr( $label_placement_class ),
|
1249 |
-
esc_attr( $
|
1250 |
esc_attr( $inline_font_styles ),
|
1251 |
esc_attr( $street ) . $req_label
|
1252 |
);
|
1253 |
$input_street1 = sprintf(
|
1254 |
-
'<input %1$stype="text" class="ctct-text ctct-address-street %2$s
|
1255 |
$req,
|
1256 |
esc_attr( $label_placement_class ),
|
1257 |
-
esc_attr( $
|
1258 |
-
esc_attr( $
|
1259 |
-
esc_attr( $v_street )
|
|
|
1260 |
);
|
1261 |
|
1262 |
$input_street1_whole = '';
|
@@ -1270,17 +1288,18 @@ class ConstantContact_Display {
|
|
1270 |
$label_street2 = sprintf(
|
1271 |
'<span class="%1$s"><label for="line_2_%2$s" style="%3$s">%4$s</label></span>',
|
1272 |
$label_placement_class,
|
1273 |
-
esc_attr( $
|
1274 |
esc_attr( $inline_font_styles ),
|
1275 |
esc_attr( $line_2 )
|
1276 |
);
|
1277 |
|
1278 |
$input_street2 = sprintf(
|
1279 |
-
'<input type="text" class="ctct-text ctct-address-line-2 %1$s
|
1280 |
esc_attr( $label_placement_class ),
|
1281 |
-
esc_attr( $
|
1282 |
-
esc_attr( $
|
1283 |
-
esc_attr( $v_line_2 )
|
|
|
1284 |
);
|
1285 |
|
1286 |
$input_street2_whole = '';
|
@@ -1296,18 +1315,19 @@ class ConstantContact_Display {
|
|
1296 |
$label_city = sprintf(
|
1297 |
'<span class="%1$s"><label for="city_%2$s" style="%3$s">%4$s</label></span>',
|
1298 |
$label_placement_class,
|
1299 |
-
esc_attr( $
|
1300 |
esc_attr( $inline_font_styles ),
|
1301 |
esc_attr( $city ) . $req_label
|
1302 |
);
|
1303 |
|
1304 |
$input_city = sprintf(
|
1305 |
-
'<input %1$stype="text" class="ctct-text ctct-address-city %2$s
|
1306 |
$req,
|
1307 |
esc_attr( $label_placement_class ),
|
1308 |
-
esc_attr( $
|
1309 |
-
esc_attr( $
|
1310 |
-
esc_attr( $v_city )
|
|
|
1311 |
);
|
1312 |
|
1313 |
$input_city_whole = '';
|
@@ -1323,18 +1343,19 @@ class ConstantContact_Display {
|
|
1323 |
$label_state = sprintf(
|
1324 |
'<span class="%1$s"><label for="state_%2$s" style="%3$s">%4$s</label></span>',
|
1325 |
$label_placement_class,
|
1326 |
-
esc_attr( $
|
1327 |
esc_attr( $inline_font_styles ),
|
1328 |
esc_attr( $state ) . $req_label
|
1329 |
);
|
1330 |
|
1331 |
$input_state = sprintf(
|
1332 |
-
'<input %1$stype="text" class="ctct-text ctct-address-state %2$s
|
1333 |
$req,
|
1334 |
esc_attr( $label_placement_class ),
|
1335 |
-
esc_attr( $
|
1336 |
-
esc_attr( $
|
1337 |
-
esc_attr( $v_state )
|
|
|
1338 |
);
|
1339 |
|
1340 |
$input_state_whole = '';
|
@@ -1350,18 +1371,19 @@ class ConstantContact_Display {
|
|
1350 |
$label_zip = sprintf(
|
1351 |
'<span class="%1$s"><label for="zip_%2$s" style="%3$s">%4$s</label></span>',
|
1352 |
$label_placement_class,
|
1353 |
-
esc_attr( $
|
1354 |
esc_attr( $inline_font_styles ),
|
1355 |
esc_attr( $zip ) . $req_label
|
1356 |
);
|
1357 |
|
1358 |
$input_zip = sprintf(
|
1359 |
-
'<input %1$stype="text" class="ctct-text ctct-address-zip %2$s
|
1360 |
$req,
|
1361 |
esc_attr( $label_placement_class ),
|
1362 |
-
esc_attr( $
|
1363 |
-
esc_attr( $
|
1364 |
-
esc_attr( $v_zip )
|
|
|
1365 |
);
|
1366 |
|
1367 |
$input_zip_whole = '';
|
@@ -1376,10 +1398,10 @@ class ConstantContact_Display {
|
|
1376 |
|
1377 |
$return = '<fieldset class="ctct-address"><legend style="%s">%s</legend>';
|
1378 |
$return .= '<div class="ctct-form-field ctct-field-full address-line-1%s">%s</div>';
|
1379 |
-
$return .= '<div class="ctct-form-field ctct-field-full address-line-2%s
|
1380 |
-
$return .= '<div class="ctct-form-field ctct-field-third address-city%s
|
1381 |
-
$return .= '<div class="ctct-form-field ctct-field-third address-state%s
|
1382 |
-
$return .= '<div class="ctct-form-field ctct-field-third address-zip%s
|
1383 |
$return .= '</fieldset>';
|
1384 |
|
1385 |
return sprintf(
|
@@ -1404,15 +1426,16 @@ class ConstantContact_Display {
|
|
1404 |
*
|
1405 |
* @since 1.0.0
|
1406 |
*
|
1407 |
-
* @param
|
1408 |
-
* @param
|
1409 |
-
* @param
|
1410 |
-
* @param
|
1411 |
-
* @param
|
1412 |
-
* @param
|
1413 |
-
* @
|
|
|
1414 |
*/
|
1415 |
-
public function dates( $name = '', $f_id = '', $value = [], $desc = '', $req = false, $field_error = '' ) {
|
1416 |
$month = esc_html__( 'Month', 'constant-contact-forms' );
|
1417 |
$day = esc_html__( 'Day', 'constant-contact-forms' );
|
1418 |
$year = esc_html__( 'Year', 'constant-contact-forms' );
|
@@ -1426,13 +1449,13 @@ class ConstantContact_Display {
|
|
1426 |
$return = '<p class="ctct-date"><fieldset>';
|
1427 |
$return .= ' <legend>' . esc_attr( $name ) . '</legend>';
|
1428 |
$return .= ' <div class="ctct-form-field ctct-field-inline month' . $req_class . '">';
|
1429 |
-
$return .= $this->get_date_dropdown( $month, $f_id, 'month', $v_month, $req );
|
1430 |
$return .= ' </div>';
|
1431 |
$return .= ' <div class="ctct-form-field ctct-field-inline day' . $req_class . '">';
|
1432 |
-
$return .= $this->get_date_dropdown( $day, $f_id, 'day', $v_day, $req );
|
1433 |
$return .= ' </div>';
|
1434 |
$return .= ' <div class="ctct-form-field ctct-field-inline year' . $req_class . '">';
|
1435 |
-
$return .= $this->get_date_dropdown( $year, $f_id, 'year', $v_year, $req );
|
1436 |
$return .= ' </div>';
|
1437 |
|
1438 |
$return .= '</fieldset></p>';
|
@@ -1445,18 +1468,20 @@ class ConstantContact_Display {
|
|
1445 |
*
|
1446 |
* @since 1.0.0
|
1447 |
*
|
1448 |
-
* @param
|
1449 |
-
* @param
|
1450 |
-
* @param
|
1451 |
-
* @param
|
1452 |
-
* @param
|
1453 |
-
* @
|
|
|
1454 |
*/
|
1455 |
-
public function get_date_dropdown( $text = '', $
|
1456 |
-
$
|
1457 |
-
$
|
|
|
1458 |
|
1459 |
-
$return = '<select name="' . esc_attr( $
|
1460 |
|
1461 |
if ( $req ) {
|
1462 |
$return = str_replace( '">', '" required>', $return );
|
@@ -1600,22 +1625,23 @@ class ConstantContact_Display {
|
|
1600 |
*
|
1601 |
* @since 1.0.0
|
1602 |
*
|
1603 |
-
* @param
|
1604 |
-
* @param
|
1605 |
-
* @param
|
1606 |
-
* @param
|
1607 |
-
* @param
|
1608 |
-
* @param
|
1609 |
-
* @param
|
1610 |
-
* @param
|
1611 |
-
* @
|
|
|
1612 |
*/
|
1613 |
-
public function textarea( $name = '', $map = '', $value = '', $desc = '', $req = false, $field_error = '', $extra_attrs = '', $label_placement = 'top' ) {
|
1614 |
|
1615 |
$classes = [ 'ctct-form-field' ];
|
1616 |
$textarea_classes = [ 'ctct-textarea' ];
|
1617 |
-
|
1618 |
-
$req_text
|
1619 |
|
1620 |
if ( $req ) {
|
1621 |
$classes[] = 'ctct-form-field-required';
|
@@ -1631,8 +1657,8 @@ class ConstantContact_Display {
|
|
1631 |
}
|
1632 |
|
1633 |
$return = '<p class="' . implode( ' ', $classes ) . '">';
|
1634 |
-
$label = '<span class="' . $label_placement_class . '"><label for="' . esc_attr( $
|
1635 |
-
$textarea = '<textarea class="' . esc_attr( implode( ' ', $textarea_classes ) ) . '" ' . $req_text . ' name="' . esc_attr( $map ) . '" placeholder="' . esc_attr( $desc ) . '" ' . $extra_attrs . '>' . esc_html( $value ) . '</textarea>';
|
1636 |
|
1637 |
if ( 'top' === $label_placement || 'left' === $label_placement || 'hidden' === $label_placement ) {
|
1638 |
$return .= $label . $textarea;
|
@@ -1643,7 +1669,7 @@ class ConstantContact_Display {
|
|
1643 |
}
|
1644 |
|
1645 |
if ( $field_error ) {
|
1646 |
-
$return .= '<span class="ctct-field-error"><label for="' . esc_attr( $
|
1647 |
}
|
1648 |
|
1649 |
return $return . '</p>';
|
281 |
if ( $response && isset( $response['message'] ) && isset( $response['status'] ) ) {
|
282 |
|
283 |
if ( 'success' === $response['status'] ) {
|
284 |
+
return $this->message( 'success', $response['message'], 'status' );
|
285 |
} else {
|
286 |
|
287 |
// If we didn't get a success message, then we want to error.
|
294 |
|
295 |
if ( 'error' === $status || $error_message ) {
|
296 |
if ( ! empty( $error_message ) ) {
|
297 |
+
$form_err_display = $this->message( 'error', $error_message, 'alert' );
|
298 |
}
|
299 |
}
|
300 |
|
346 |
|
347 |
$return .= $form_err_display;
|
348 |
|
349 |
+
$return .= $this->build_form_fields( $form_data, $old_values, $req_errors, $instance );
|
350 |
|
351 |
if ( ! $disable_recaptcha && ConstantContact_reCAPTCHA::has_recaptcha_keys() ) {
|
352 |
$recaptcha_version = ctct_get_settings_option( '_ctct_recaptcha_version', '' );
|
459 |
*
|
460 |
* @since 1.0.0
|
461 |
*
|
462 |
+
* @param array $form_data Formulated cmb2 data for form.
|
463 |
+
* @param array $old_values Original values.
|
464 |
+
* @param array $req_errors Errors.
|
465 |
+
* @param int $instance Current form instance.
|
466 |
* @return string
|
467 |
*/
|
468 |
+
public function build_form_fields( $form_data, $old_values, $req_errors, $instance ) {
|
469 |
$return = '';
|
470 |
$form_id = absint( $form_data['options']['form_id'] );
|
471 |
|
483 |
|
484 |
if ( isset( $form_data['fields'] ) && is_array( $form_data['fields'] ) ) {
|
485 |
foreach ( $form_data['fields'] as $key => $value ) {
|
486 |
+
$return .= $this->field( $value, $old_values, $req_errors, $form_id, $label_placement, $instance );
|
487 |
}
|
488 |
}
|
489 |
|
490 |
if ( isset( $form_data['options'] ) ) {
|
491 |
+
$return .= $this->opt_in( $form_data['options'], $instance );
|
492 |
}
|
493 |
|
494 |
return $return;
|
503 |
*/
|
504 |
public function build_honeypot_field() {
|
505 |
return sprintf(
|
506 |
+
'<div class="ctct_usage"><label for="ctct_usage_field">%s</label><input type="text" value="" name="ctct_usage_field" class="ctct_usage_field" tabindex="-1" /></div>',
|
507 |
esc_html__( 'Constant Contact Use.', 'constant-contact-forms' )
|
508 |
);
|
509 |
}
|
608 |
* @since 1.0.0
|
609 |
* @since 1.4.0 Added label placement parameter.
|
610 |
*
|
611 |
+
* @param array $field Field data.
|
612 |
+
* @param array $old_values Original values.
|
613 |
+
* @param array $req_errors Errors.
|
614 |
+
* @param int $form_id Current form ID.
|
615 |
+
* @param string $label_placement Label placement location.
|
616 |
+
* @param int $instance Current form instance.
|
617 |
+
* @return string HTML markup
|
618 |
*/
|
619 |
+
public function field( $field, $old_values = [], $req_errors = [], $form_id = 0, $label_placement = 'top', $instance = 0 ) {
|
620 |
if ( ! isset( $field['name'] ) || ! isset( $field['map_to'] ) ) {
|
621 |
return '';
|
622 |
}
|
672 |
$value = $this->get_submitted_value( $value, $map, $field, $old_values );
|
673 |
|
674 |
switch ( $type ) {
|
675 |
+
case 'phone_number':
|
676 |
+
return $this->input( 'tel', $name, $map, $value, $desc, $req, false, $field_error, $form_id, $label_placement, $instance );
|
677 |
+
case 'website':
|
678 |
+
return $this->input( 'url', $name, $map, $value, $desc, $req, false, $field_error, $form_id, $label_placement, $instance );
|
679 |
case 'custom':
|
680 |
case 'first_name':
|
681 |
case 'last_name':
|
|
|
682 |
case 'job_title':
|
683 |
case 'company':
|
|
|
684 |
case 'text_field':
|
685 |
+
return $this->input( 'text', $name, $map, $value, $desc, $req, false, $field_error, $form_id, $label_placement, $instance );
|
686 |
case 'custom_text_area':
|
687 |
+
return $this->textarea( $name, $map, $value, $desc, $req, $field_error, 'maxlength="500"', $label_placement, $instance );
|
688 |
case 'email':
|
689 |
+
return $this->input( 'email', $name, $map, $value, $desc, $req, false, $field_error, $form_id, $label_placement, $instance );
|
690 |
case 'hidden':
|
691 |
return $this->input( 'hidden', $name, $map, $value, $desc, $req );
|
692 |
case 'checkbox':
|
693 |
+
return $this->checkbox( $name, $map, $value, $desc, $instance );
|
694 |
case 'submit':
|
695 |
return $this->input( 'submit', $name, $map, $value, $desc, $req, false, $field_error );
|
696 |
case 'address':
|
697 |
+
return $this->address( $name, $map, $value, $desc, $req, $field_error, $label_placement, $instance );
|
698 |
case 'anniversery':
|
699 |
case 'birthday':
|
700 |
// Need this to be month / day / year.
|
701 |
+
return $this->dates( $name, $map, $value, $desc, $req, $field_error, $instance );
|
702 |
default:
|
703 |
return $this->input( 'text', $name, $map, $value, $desc, $req, false, $field_error );
|
704 |
}
|
765 |
*
|
766 |
* @since 1.0.0
|
767 |
*
|
768 |
+
* @param string $type Success/error/etc for class.
|
769 |
+
* @param string $message Message to display to user.
|
770 |
+
* @param string $role Message role.
|
771 |
+
* @return string HTML markup.
|
772 |
*/
|
773 |
+
public function message( $type, $message, $role = 'log' ) {
|
|
|
|
|
774 |
return sprintf(
|
775 |
+
'<p class="ctct-message %s ctct-%s" role="%s">%s</p>',
|
776 |
esc_attr( $type ),
|
777 |
+
esc_attr( $type ),
|
778 |
+
esc_attr( $role ),
|
779 |
esc_html( $message )
|
780 |
);
|
781 |
}
|
941 |
*
|
942 |
* @since 1.0.0
|
943 |
*
|
944 |
+
* @param string $type Type of form field.
|
945 |
+
* @param string $name ID of form field.
|
946 |
+
* @param string $id ID attribute value.
|
947 |
+
* @param string $value pre-filled value.
|
948 |
+
* @param string $label label text for input.
|
949 |
+
* @param boolean $req If field required.
|
950 |
+
* @param boolean $f_only If we only return the field itself, with no label.
|
951 |
+
* @param boolean $field_error Field error.
|
952 |
+
* @param int $form_id Current form ID.
|
953 |
+
* @param string $label_placement Where to place the label.
|
954 |
+
* @param int $instance Current form instance.
|
955 |
+
* @return string HTML markup for field.
|
956 |
*/
|
957 |
+
public function input( $type = 'text', $name = '', $id = '', $value = '', $label = '', $req = false, $f_only = false, $field_error = false, $form_id = 0, $label_placement = '', $instance = 0 ) {
|
958 |
$name = sanitize_text_field( $name );
|
959 |
+
$field_key = sanitize_title( $id );
|
960 |
+
$field_id = "{$field_key}_$instance";
|
961 |
$input_inline_styles = '';
|
962 |
$label_placement_class = 'ctct-label-' . $label_placement;
|
963 |
$specific_form_styles = $this->specific_form_styles;
|
972 |
$label = sanitize_text_field( $label );
|
973 |
$req_text = $req ? 'required' : '';
|
974 |
|
975 |
+
$markup = $this->field_top( $type, $name, $field_key, $label, $req );
|
976 |
|
977 |
$req_label = '';
|
978 |
|
985 |
} else {
|
986 |
$markup .= '<span class="' . $label_placement_class . '">';
|
987 |
}
|
988 |
+
$markup .= $this->get_label( $field_id, $name . ' ' . $req_label );
|
989 |
$markup .= '</span>';
|
990 |
}
|
991 |
|
1000 |
* Filter to add classes for the rendering input.
|
1001 |
*
|
1002 |
* @since 1.2.0
|
1003 |
+
* @param array $classes Array of classes to apply to the field.
|
1004 |
+
* @param string $type The field type being rendered.
|
1005 |
+
* @param int $form_id Form ID.
|
1006 |
+
* @param int $field_key Field ID.
|
1007 |
* @return array
|
1008 |
*/
|
1009 |
+
$classes = apply_filters( 'constant_contact_input_classes', $classes, $type, $form_id, $field_key );
|
1010 |
|
1011 |
/**
|
1012 |
* Filters whether or not to remove characters from potential maxlength attribute value.
|
1025 |
$classes[] = 'ctct-invalid';
|
1026 |
}
|
1027 |
|
1028 |
+
$classes[] = $field_key;
|
1029 |
$class_attr = '';
|
1030 |
|
1031 |
if ( count( $classes ) ) {
|
1032 |
$class_attr = 'class="' . implode( ' ', $classes ) . '"';
|
1033 |
}
|
1034 |
|
1035 |
+
/* translators: 1: Required text, 2: Field type, 3: Field name, 4: Inline styles, 5: Field value, 6: Max length, 7: Placeholder (non-hidden fields only), 8: Field class(es), 9: Field ID (non-hidden fields only), 10: Tabindex (hidden fields only). */
|
1036 |
+
$field = '<input %1$s type="%2$s" name="%3$s" %4$s value="%5$s" %6$s %7$s %8$s %9$s %10$s />';
|
1037 |
$markup .= sprintf(
|
1038 |
$field,
|
1039 |
$req_text,
|
1040 |
$type,
|
1041 |
+
$field_key,
|
|
|
1042 |
$input_inline_styles,
|
1043 |
$value,
|
1044 |
$max_length,
|
1045 |
+
'hidden' !== $type ? "placeholder=\"{$label}\"" : '',
|
1046 |
+
$class_attr,
|
1047 |
+
'hidden' !== $type ? "id=\"{$field_id}\"" : '',
|
1048 |
+
'hidden' === $type ? 'tabindex="-1"' : ''
|
1049 |
);
|
1050 |
|
1051 |
// Reassign because if we want "field only", like for hidden inputs, we need to still pass a value that went through sprintf().
|
1053 |
|
1054 |
if ( ( 'bottom' === $label_placement || 'right' === $label_placement ) && ( 'submit' !== $type ) && ( 'hidden' !== $type ) ) {
|
1055 |
$markup .= '<span class="' . $label_placement_class . '">';
|
1056 |
+
$markup .= $this->get_label( $field_id, $name . ' ' . $req_label );
|
1057 |
$markup .= '</span>';
|
1058 |
}
|
1059 |
|
1060 |
if ( $field_error ) {
|
1061 |
+
$markup .= $this->field_bottom( $field_id, $field_error );
|
1062 |
} else {
|
1063 |
$markup .= $this->field_bottom();
|
1064 |
}
|
1075 |
*
|
1076 |
* @since 1.0.0
|
1077 |
*
|
1078 |
+
* @param string $name Name/it of field.
|
1079 |
+
* @param string $f_id Field ID.
|
1080 |
+
* @param string $value Value of field.
|
1081 |
+
* @param string $label Label / desc text.
|
1082 |
+
* @param int $instance Current form instance.
|
1083 |
+
* @return string HTML markup for checkbox.
|
1084 |
*/
|
1085 |
+
public function checkbox( $name = '', $f_id = '', $value = '', $label = '', $instance = 0 ) {
|
1086 |
+
$name = sanitize_text_field( $name );
|
1087 |
+
$field_key = sanitize_title( $field_key );
|
1088 |
+
$field_id = "{$field_key}_{$instance}";
|
1089 |
+
$value = sanitize_text_field( $value );
|
1090 |
+
$label = esc_attr( $label );
|
1091 |
+
$type = 'checkbox';
|
1092 |
+
$classes = [ 'ctct-' . esc_attr( $type ) ];
|
1093 |
|
1094 |
/**
|
1095 |
* Filter to add classes for the rendering input.
|
1099 |
* @param string $type The field type being rendered.
|
1100 |
* @return array
|
1101 |
*/
|
1102 |
+
$classes = apply_filters( 'constant_contact_input_classes', $classes, $type ); // @todo if/when we start using the checkbox field type, pass in a $form_id and $field_key value.
|
1103 |
|
1104 |
+
$markup = $this->field_top( $type, $name, $field_id, $label, false, false );
|
1105 |
+
$markup .= '<input type="' . $type . '" name="' . $field_key . '" id="' . $field_id . '" value="' . $value . '" class="' . implode( ' ', $classes ) . '" />';
|
1106 |
$markup .= $this->field_bottom( $name, ' ' . $label );
|
1107 |
|
1108 |
return $markup;
|
1145 |
*
|
1146 |
* @since 1.0.0
|
1147 |
*
|
1148 |
+
* @param array $form_data Form data structure.
|
1149 |
+
* @param int $instance Current form instance.
|
1150 |
+
* @return string Markup of optin form.
|
1151 |
*/
|
1152 |
+
public function opt_in( $form_data, $instance = 0 ) {
|
1153 |
|
1154 |
if ( ! isset( $form_data['optin'] ) ) {
|
1155 |
return '';
|
1162 |
] );
|
1163 |
|
1164 |
if ( isset( $optin['list'] ) && $optin['list'] ) {
|
1165 |
+
return $this->optin_display( $optin, $instance );
|
1166 |
}
|
1167 |
|
1168 |
return '';
|
1173 |
*
|
1174 |
* @since 1.0.0
|
1175 |
*
|
1176 |
+
* @param array $optin Optin data.
|
1177 |
+
* @param int $instance Current form instance.
|
1178 |
+
* @return string HTML markup.
|
1179 |
*/
|
1180 |
+
public function optin_display( $optin, $instance = 0 ) {
|
1181 |
|
1182 |
$label = sanitize_text_field( isset( $optin['instructions'] ) ? $optin['instructions'] : '' );
|
1183 |
$value = sanitize_text_field( isset( $optin['list'] ) ? $optin['list'] : '' );
|
1193 |
$markup = '<div class="ctct-optin-hide" style="display:none;">';
|
1194 |
}
|
1195 |
|
1196 |
+
$markup .= $this->get_optin_markup( $label, $value, $show, $instance );
|
1197 |
|
1198 |
if ( ! $show ) {
|
1199 |
$markup .= '</div><!--.ctct-optin-hide -->';
|
1207 |
*
|
1208 |
* @since 1.0.0
|
1209 |
*
|
1210 |
+
* @param string $label Label for field.
|
1211 |
+
* @param string $value Value of opt in field.
|
1212 |
+
* @param string $show Whether or not we are showing the field.
|
1213 |
+
* @param int $instance Current form instance.
|
1214 |
+
* @return string HTML markup
|
1215 |
*/
|
1216 |
+
public function get_optin_markup( $label, $value, $show, $instance = 0 ) {
|
1217 |
+
$checked = $show ? '' : 'checked';
|
1218 |
+
$field_key = 'ctct-opt-in';
|
1219 |
+
$field_id = "{$field_key}_{$instance}";
|
1220 |
|
1221 |
+
$markup = $this->field_top( 'checkbox', $field_key, $field_key, $label, false, false );
|
1222 |
+
$markup .= '<input type="checkbox" ' . $checked . ' name="' . esc_attr( $field_key ) . '" class="ctct-checkbox ' . esc_attr( $field_key ) . '" value="' . esc_attr( $value ) . '" id="' . esc_attr( $field_id ) . '" />';
|
1223 |
+
$markup .= $this->field_bottom( $field_id, ' ' . wp_kses_post( $label ), false );
|
1224 |
|
1225 |
return $markup;
|
1226 |
}
|
1230 |
*
|
1231 |
* @since 1.0.0
|
1232 |
*
|
1233 |
+
* @param string $name Name of fields.
|
1234 |
+
* @param string $field_key Form ID name.
|
1235 |
+
* @param array $value Values of each field.
|
1236 |
+
* @param string $desc Label of field.
|
1237 |
+
* @param boolean $req Whether or not required.
|
1238 |
+
* @param string $field_error Field error value.
|
1239 |
+
* @param string $label_placement Where to put the label.
|
1240 |
+
* @param int $instance Current form instance.
|
1241 |
+
* @return string HTML markup.
|
1242 |
*/
|
1243 |
+
public function address( $name = '', $field_key = '', $value = [], $desc = '', $req = false, $field_error = '', $label_placement = 'top', $instance = 0 ) {
|
1244 |
+
$field_id = "{$field_key}_{$instance}";
|
1245 |
+
$street = esc_html__( 'Street Address', 'constant-contact-forms' );
|
1246 |
+
$line_2 = esc_html__( 'Address Line 2', 'constant-contact-forms' );
|
1247 |
+
$city = esc_html__( 'City', 'constant-contact-forms' );
|
1248 |
+
$state = esc_html__( 'State', 'constant-contact-forms' );
|
1249 |
+
$zip = esc_html__( 'ZIP Code', 'constant-contact-forms' );
|
1250 |
|
1251 |
$v_street = isset( $value['street_address'] ) ? $value['street_address'] : '';
|
1252 |
$v_line_2 = isset( $value['line_2_address'] ) ? $value['line_2_address'] : '';
|
1263 |
$label_street1 = sprintf(
|
1264 |
'<span class="%1$s"><label for="street_%2$s" style="%3$s">%4$s</label></span>',
|
1265 |
esc_attr( $label_placement_class ),
|
1266 |
+
esc_attr( $field_id ),
|
1267 |
esc_attr( $inline_font_styles ),
|
1268 |
esc_attr( $street ) . $req_label
|
1269 |
);
|
1270 |
$input_street1 = sprintf(
|
1271 |
+
'<input %1$stype="text" class="ctct-text ctct-address-street %2$s street_%3$s" name="street_%4$s" value="%5$s" id="street_%6$s">',
|
1272 |
$req,
|
1273 |
esc_attr( $label_placement_class ),
|
1274 |
+
esc_attr( $field_key ),
|
1275 |
+
esc_attr( $field_key ),
|
1276 |
+
esc_attr( $v_street ),
|
1277 |
+
esc_attr( $field_id )
|
1278 |
);
|
1279 |
|
1280 |
$input_street1_whole = '';
|
1288 |
$label_street2 = sprintf(
|
1289 |
'<span class="%1$s"><label for="line_2_%2$s" style="%3$s">%4$s</label></span>',
|
1290 |
$label_placement_class,
|
1291 |
+
esc_attr( $field_id ),
|
1292 |
esc_attr( $inline_font_styles ),
|
1293 |
esc_attr( $line_2 )
|
1294 |
);
|
1295 |
|
1296 |
$input_street2 = sprintf(
|
1297 |
+
'<input type="text" class="ctct-text ctct-address-line-2 %1$s line_2_%2$s" name="line_2_%3$s" value="%4$s" id="line_2_%5$s">',
|
1298 |
esc_attr( $label_placement_class ),
|
1299 |
+
esc_attr( $field_key ),
|
1300 |
+
esc_attr( $field_key ),
|
1301 |
+
esc_attr( $v_line_2 ),
|
1302 |
+
esc_attr( $field_id )
|
1303 |
);
|
1304 |
|
1305 |
$input_street2_whole = '';
|
1315 |
$label_city = sprintf(
|
1316 |
'<span class="%1$s"><label for="city_%2$s" style="%3$s">%4$s</label></span>',
|
1317 |
$label_placement_class,
|
1318 |
+
esc_attr( $field_id ),
|
1319 |
esc_attr( $inline_font_styles ),
|
1320 |
esc_attr( $city ) . $req_label
|
1321 |
);
|
1322 |
|
1323 |
$input_city = sprintf(
|
1324 |
+
'<input %1$stype="text" class="ctct-text ctct-address-city %2$s city_%3$s" name="city_%4$s" value="%5$s" id="city_%6$s">',
|
1325 |
$req,
|
1326 |
esc_attr( $label_placement_class ),
|
1327 |
+
esc_attr( $field_key ),
|
1328 |
+
esc_attr( $field_key ),
|
1329 |
+
esc_attr( $v_city ),
|
1330 |
+
esc_attr( $field_id )
|
1331 |
);
|
1332 |
|
1333 |
$input_city_whole = '';
|
1343 |
$label_state = sprintf(
|
1344 |
'<span class="%1$s"><label for="state_%2$s" style="%3$s">%4$s</label></span>',
|
1345 |
$label_placement_class,
|
1346 |
+
esc_attr( $field_id ),
|
1347 |
esc_attr( $inline_font_styles ),
|
1348 |
esc_attr( $state ) . $req_label
|
1349 |
);
|
1350 |
|
1351 |
$input_state = sprintf(
|
1352 |
+
'<input %1$stype="text" class="ctct-text ctct-address-state %2$s state_%3$s" name="state_%4$s" value="%5$s" id="state_%6$s">',
|
1353 |
$req,
|
1354 |
esc_attr( $label_placement_class ),
|
1355 |
+
esc_attr( $field_key ),
|
1356 |
+
esc_attr( $field_key ),
|
1357 |
+
esc_attr( $v_state ),
|
1358 |
+
esc_attr( $field_id )
|
1359 |
);
|
1360 |
|
1361 |
$input_state_whole = '';
|
1371 |
$label_zip = sprintf(
|
1372 |
'<span class="%1$s"><label for="zip_%2$s" style="%3$s">%4$s</label></span>',
|
1373 |
$label_placement_class,
|
1374 |
+
esc_attr( $field_id ),
|
1375 |
esc_attr( $inline_font_styles ),
|
1376 |
esc_attr( $zip ) . $req_label
|
1377 |
);
|
1378 |
|
1379 |
$input_zip = sprintf(
|
1380 |
+
'<input %1$stype="text" class="ctct-text ctct-address-zip %2$s zip_%3$s" name="zip_%4$s" value="%5$s" id="zip_%6$s">',
|
1381 |
$req,
|
1382 |
esc_attr( $label_placement_class ),
|
1383 |
+
esc_attr( $field_key ),
|
1384 |
+
esc_attr( $field_key ),
|
1385 |
+
esc_attr( $v_zip ),
|
1386 |
+
esc_attr( $field_id )
|
1387 |
);
|
1388 |
|
1389 |
$input_zip_whole = '';
|
1398 |
|
1399 |
$return = '<fieldset class="ctct-address"><legend style="%s">%s</legend>';
|
1400 |
$return .= '<div class="ctct-form-field ctct-field-full address-line-1%s">%s</div>';
|
1401 |
+
$return .= '<div class="ctct-form-field ctct-field-full address-line-2%s input_2_1_2_container">%s</div>';
|
1402 |
+
$return .= '<div class="ctct-form-field ctct-field-third address-city%s input_2_1_3_container">%s</div>';
|
1403 |
+
$return .= '<div class="ctct-form-field ctct-field-third address-state%s input_2_1_4_container">%s</div>';
|
1404 |
+
$return .= '<div class="ctct-form-field ctct-field-third address-zip%s input_2_1_5_container">%s</div>';
|
1405 |
$return .= '</fieldset>';
|
1406 |
|
1407 |
return sprintf(
|
1426 |
*
|
1427 |
* @since 1.0.0
|
1428 |
*
|
1429 |
+
* @param string $name Name of field.
|
1430 |
+
* @param string $f_id Field ID.
|
1431 |
+
* @param array $value Values to pre-fill.
|
1432 |
+
* @param string $desc Description of fields.
|
1433 |
+
* @param boolean $req If is required.
|
1434 |
+
* @param string $field_error Field error text.
|
1435 |
+
* @param int $instance Current form instance.
|
1436 |
+
* @return string Fields HTML markup.
|
1437 |
*/
|
1438 |
+
public function dates( $name = '', $f_id = '', $value = [], $desc = '', $req = false, $field_error = '', $instance = 0 ) {
|
1439 |
$month = esc_html__( 'Month', 'constant-contact-forms' );
|
1440 |
$day = esc_html__( 'Day', 'constant-contact-forms' );
|
1441 |
$year = esc_html__( 'Year', 'constant-contact-forms' );
|
1449 |
$return = '<p class="ctct-date"><fieldset>';
|
1450 |
$return .= ' <legend>' . esc_attr( $name ) . '</legend>';
|
1451 |
$return .= ' <div class="ctct-form-field ctct-field-inline month' . $req_class . '">';
|
1452 |
+
$return .= $this->get_date_dropdown( $month, $f_id, 'month', $v_month, $req, $instance );
|
1453 |
$return .= ' </div>';
|
1454 |
$return .= ' <div class="ctct-form-field ctct-field-inline day' . $req_class . '">';
|
1455 |
+
$return .= $this->get_date_dropdown( $day, $f_id, 'day', $v_day, $req, $instance );
|
1456 |
$return .= ' </div>';
|
1457 |
$return .= ' <div class="ctct-form-field ctct-field-inline year' . $req_class . '">';
|
1458 |
+
$return .= $this->get_date_dropdown( $year, $f_id, 'year', $v_year, $req, $instance );
|
1459 |
$return .= ' </div>';
|
1460 |
|
1461 |
$return .= '</fieldset></p>';
|
1468 |
*
|
1469 |
* @since 1.0.0
|
1470 |
*
|
1471 |
+
* @param string $text Text for default option.
|
1472 |
+
* @param string $field_key Field ID.
|
1473 |
+
* @param string $type Type of dropdown (day, month, year).
|
1474 |
+
* @param string $selected_value Previous value.
|
1475 |
+
* @param boolean $req If is require.
|
1476 |
+
* @param int $instance Current form instance.
|
1477 |
+
* @return string Field markup.
|
1478 |
*/
|
1479 |
+
public function get_date_dropdown( $text = '', $field_key = '', $type = '', $selected_value = '', $req = false, $instance = 0 ) {
|
1480 |
+
$field_key = str_replace( 'birthday', 'birthday_' . $type, $field_key );
|
1481 |
+
$field_key = str_replace( 'anniversary', 'anniversary_' . $type, $field_key );
|
1482 |
+
$field_id = "{$field_key}_{$instance}";
|
1483 |
|
1484 |
+
$return = '<select name="' . esc_attr( $field_key ) . '" class="ctct-date-select ctct-date-select-' . esc_attr( $type ) . '" id="' . $field_id . '">';
|
1485 |
|
1486 |
if ( $req ) {
|
1487 |
$return = str_replace( '">', '" required>', $return );
|
1625 |
*
|
1626 |
* @since 1.0.0
|
1627 |
*
|
1628 |
+
* @param string $name Name of field.
|
1629 |
+
* @param string $map ID of field.
|
1630 |
+
* @param string $value Previous value of field.
|
1631 |
+
* @param string $desc Description/label of field.
|
1632 |
+
* @param boolean $req If is required.
|
1633 |
+
* @param string $field_error Error from field.
|
1634 |
+
* @param string $extra_attrs Extra attributes to append.
|
1635 |
+
* @param string $label_placement Where to place the label.
|
1636 |
+
* @param int $instance Current form instance.
|
1637 |
+
* @return string HTML markup.
|
1638 |
*/
|
1639 |
+
public function textarea( $name = '', $map = '', $value = '', $desc = '', $req = false, $field_error = '', $extra_attrs = '', $label_placement = 'top', $instance = 0 ) {
|
1640 |
|
1641 |
$classes = [ 'ctct-form-field' ];
|
1642 |
$textarea_classes = [ 'ctct-textarea' ];
|
1643 |
+
$field_id = "{$map}_{$instance}";
|
1644 |
+
$req_text = $req ? 'required' : '';
|
1645 |
|
1646 |
if ( $req ) {
|
1647 |
$classes[] = 'ctct-form-field-required';
|
1657 |
}
|
1658 |
|
1659 |
$return = '<p class="' . implode( ' ', $classes ) . '">';
|
1660 |
+
$label = '<span class="' . $label_placement_class . '"><label for="' . esc_attr( $field_id ) . '">' . esc_attr( $name ) . ' ' . $req_label . '</label></span>';
|
1661 |
+
$textarea = '<textarea class="' . esc_attr( implode( ' ', $textarea_classes ) ) . '" ' . $req_text . ' name="' . esc_attr( $map ) . '" id="' . esc_attr( $field_id ) . '" placeholder="' . esc_attr( $desc ) . '" ' . $extra_attrs . '>' . esc_html( $value ) . '</textarea>';
|
1662 |
|
1663 |
if ( 'top' === $label_placement || 'left' === $label_placement || 'hidden' === $label_placement ) {
|
1664 |
$return .= $label . $textarea;
|
1669 |
}
|
1670 |
|
1671 |
if ( $field_error ) {
|
1672 |
+
$return .= '<span class="ctct-field-error"><label for="' . esc_attr( $field_id ) . '">' . esc_attr( __( 'Error: Please correct your entry.', 'constant-contact-forms' ) ) . '</label></span>';
|
1673 |
}
|
1674 |
|
1675 |
return $return . '</p>';
|
languages/constant-contact-forms.pot
CHANGED
@@ -262,11 +262,11 @@ msgstr ""
|
|
262 |
msgid "move down"
|
263 |
msgstr ""
|
264 |
|
265 |
-
#: includes/class-api.php:
|
266 |
msgid "Not a valid contact to set properties to."
|
267 |
msgstr ""
|
268 |
|
269 |
-
#: includes/class-api.php:
|
270 |
msgid "Your API access token is invalid. Reconnect to Constant Contact to receive a new token."
|
271 |
msgstr ""
|
272 |
|
@@ -849,7 +849,7 @@ msgstr ""
|
|
849 |
msgid "New Form"
|
850 |
msgstr ""
|
851 |
|
852 |
-
#: includes/class-cpts.php:72, includes/class-display.php:
|
853 |
msgid "Edit Form"
|
854 |
msgstr ""
|
855 |
|
@@ -1060,100 +1060,100 @@ msgstr ""
|
|
1060 |
msgid "%1$s (last modified %2$s ago)"
|
1061 |
msgstr ""
|
1062 |
|
1063 |
-
#: includes/class-display.php:
|
1064 |
msgid "Constant Contact Use."
|
1065 |
msgstr ""
|
1066 |
|
1067 |
-
#: includes/class-display.php:
|
1068 |
msgid "Error: Please correct your entry."
|
1069 |
msgstr ""
|
1070 |
|
1071 |
-
#: includes/class-display.php:
|
1072 |
msgid "Street Address"
|
1073 |
msgstr ""
|
1074 |
|
1075 |
-
#: includes/class-display.php:
|
1076 |
msgid "Address Line 2"
|
1077 |
msgstr ""
|
1078 |
|
1079 |
-
#: includes/class-display.php:
|
1080 |
msgid "City"
|
1081 |
msgstr ""
|
1082 |
|
1083 |
-
#: includes/class-display.php:
|
1084 |
msgid "State"
|
1085 |
msgstr ""
|
1086 |
|
1087 |
-
#: includes/class-display.php:
|
1088 |
msgid "ZIP Code"
|
1089 |
msgstr ""
|
1090 |
|
1091 |
-
#: includes/class-display.php:
|
1092 |
msgid "Month"
|
1093 |
msgstr ""
|
1094 |
|
1095 |
-
#: includes/class-display.php:
|
1096 |
msgid "Day"
|
1097 |
msgstr ""
|
1098 |
|
1099 |
-
#: includes/class-display.php:
|
1100 |
msgid "Year"
|
1101 |
msgstr ""
|
1102 |
|
1103 |
-
#: includes/class-display.php:
|
1104 |
msgid "January"
|
1105 |
msgstr ""
|
1106 |
|
1107 |
-
#: includes/class-display.php:
|
1108 |
msgid "February"
|
1109 |
msgstr ""
|
1110 |
|
1111 |
-
#: includes/class-display.php:
|
1112 |
msgid "March"
|
1113 |
msgstr ""
|
1114 |
|
1115 |
-
#: includes/class-display.php:
|
1116 |
msgid "April"
|
1117 |
msgstr ""
|
1118 |
|
1119 |
-
#: includes/class-display.php:
|
1120 |
msgid "May"
|
1121 |
msgstr ""
|
1122 |
|
1123 |
-
#: includes/class-display.php:
|
1124 |
msgid "June"
|
1125 |
msgstr ""
|
1126 |
|
1127 |
-
#: includes/class-display.php:
|
1128 |
msgid "July "
|
1129 |
msgstr ""
|
1130 |
|
1131 |
-
#: includes/class-display.php:
|
1132 |
msgid "August"
|
1133 |
msgstr ""
|
1134 |
|
1135 |
-
#: includes/class-display.php:
|
1136 |
msgid "September"
|
1137 |
msgstr ""
|
1138 |
|
1139 |
-
#: includes/class-display.php:
|
1140 |
msgid "October"
|
1141 |
msgstr ""
|
1142 |
|
1143 |
-
#: includes/class-display.php:
|
1144 |
msgid "November"
|
1145 |
msgstr ""
|
1146 |
|
1147 |
-
#: includes/class-display.php:
|
1148 |
msgid "December"
|
1149 |
msgstr ""
|
1150 |
|
1151 |
#. translators: placeholder will hold company info for site owner.
|
1152 |
-
#: includes/class-display.php:
|
1153 |
msgid "By submitting this form, you are consenting to receive marketing emails from: %1$s. You can revoke your consent to receive emails at any time by using the SafeUnsubscribe® link, found at the bottom of every email. %2$s"
|
1154 |
msgstr ""
|
1155 |
|
1156 |
-
#: includes/class-display.php:
|
1157 |
msgid "Emails are serviced by Constant Contact"
|
1158 |
msgstr ""
|
1159 |
|
@@ -1324,15 +1324,15 @@ msgstr ""
|
|
1324 |
msgid "Disagree"
|
1325 |
msgstr ""
|
1326 |
|
1327 |
-
#: includes/class-process-form.php:104, includes/class-process-form.php:
|
1328 |
msgid "There was an error sending your form."
|
1329 |
msgstr ""
|
1330 |
|
1331 |
-
#: includes/class-process-form.php:115, includes/class-process-form.php:
|
1332 |
msgid "Your information has been submitted."
|
1333 |
msgstr ""
|
1334 |
|
1335 |
-
#: includes/class-process-form.php:130, includes/class-process-form.php:
|
1336 |
msgid "We had trouble processing your submission. Please review your entries and try again."
|
1337 |
msgstr ""
|
1338 |
|
@@ -1360,7 +1360,7 @@ msgstr ""
|
|
1360 |
msgid "We had trouble processing your submission. Make sure you haven't changed the required Form ID and try again."
|
1361 |
msgstr ""
|
1362 |
|
1363 |
-
#: includes/class-process-form.php:
|
1364 |
msgid "We do no think you are human"
|
1365 |
msgstr ""
|
1366 |
|
262 |
msgid "move down"
|
263 |
msgstr ""
|
264 |
|
265 |
+
#: includes/class-api.php:711
|
266 |
msgid "Not a valid contact to set properties to."
|
267 |
msgstr ""
|
268 |
|
269 |
+
#: includes/class-api.php:891
|
270 |
msgid "Your API access token is invalid. Reconnect to Constant Contact to receive a new token."
|
271 |
msgstr ""
|
272 |
|
849 |
msgid "New Form"
|
850 |
msgstr ""
|
851 |
|
852 |
+
#: includes/class-cpts.php:72, includes/class-display.php:830
|
853 |
msgid "Edit Form"
|
854 |
msgstr ""
|
855 |
|
1060 |
msgid "%1$s (last modified %2$s ago)"
|
1061 |
msgstr ""
|
1062 |
|
1063 |
+
#: includes/class-display.php:507
|
1064 |
msgid "Constant Contact Use."
|
1065 |
msgstr ""
|
1066 |
|
1067 |
+
#: includes/class-display.php:661, includes/class-display.php:1672
|
1068 |
msgid "Error: Please correct your entry."
|
1069 |
msgstr ""
|
1070 |
|
1071 |
+
#: includes/class-display.php:1245
|
1072 |
msgid "Street Address"
|
1073 |
msgstr ""
|
1074 |
|
1075 |
+
#: includes/class-display.php:1246
|
1076 |
msgid "Address Line 2"
|
1077 |
msgstr ""
|
1078 |
|
1079 |
+
#: includes/class-display.php:1247
|
1080 |
msgid "City"
|
1081 |
msgstr ""
|
1082 |
|
1083 |
+
#: includes/class-display.php:1248
|
1084 |
msgid "State"
|
1085 |
msgstr ""
|
1086 |
|
1087 |
+
#: includes/class-display.php:1249
|
1088 |
msgid "ZIP Code"
|
1089 |
msgstr ""
|
1090 |
|
1091 |
+
#: includes/class-display.php:1439
|
1092 |
msgid "Month"
|
1093 |
msgstr ""
|
1094 |
|
1095 |
+
#: includes/class-display.php:1440
|
1096 |
msgid "Day"
|
1097 |
msgstr ""
|
1098 |
|
1099 |
+
#: includes/class-display.php:1441
|
1100 |
msgid "Year"
|
1101 |
msgstr ""
|
1102 |
|
1103 |
+
#: includes/class-display.php:1557
|
1104 |
msgid "January"
|
1105 |
msgstr ""
|
1106 |
|
1107 |
+
#: includes/class-display.php:1558
|
1108 |
msgid "February"
|
1109 |
msgstr ""
|
1110 |
|
1111 |
+
#: includes/class-display.php:1559
|
1112 |
msgid "March"
|
1113 |
msgstr ""
|
1114 |
|
1115 |
+
#: includes/class-display.php:1560
|
1116 |
msgid "April"
|
1117 |
msgstr ""
|
1118 |
|
1119 |
+
#: includes/class-display.php:1561
|
1120 |
msgid "May"
|
1121 |
msgstr ""
|
1122 |
|
1123 |
+
#: includes/class-display.php:1562
|
1124 |
msgid "June"
|
1125 |
msgstr ""
|
1126 |
|
1127 |
+
#: includes/class-display.php:1563
|
1128 |
msgid "July "
|
1129 |
msgstr ""
|
1130 |
|
1131 |
+
#: includes/class-display.php:1564
|
1132 |
msgid "August"
|
1133 |
msgstr ""
|
1134 |
|
1135 |
+
#: includes/class-display.php:1565
|
1136 |
msgid "September"
|
1137 |
msgstr ""
|
1138 |
|
1139 |
+
#: includes/class-display.php:1566
|
1140 |
msgid "October"
|
1141 |
msgstr ""
|
1142 |
|
1143 |
+
#: includes/class-display.php:1567
|
1144 |
msgid "November"
|
1145 |
msgstr ""
|
1146 |
|
1147 |
+
#: includes/class-display.php:1568
|
1148 |
msgid "December"
|
1149 |
msgstr ""
|
1150 |
|
1151 |
#. translators: placeholder will hold company info for site owner.
|
1152 |
+
#: includes/class-display.php:1743
|
1153 |
msgid "By submitting this form, you are consenting to receive marketing emails from: %1$s. You can revoke your consent to receive emails at any time by using the SafeUnsubscribe® link, found at the bottom of every email. %2$s"
|
1154 |
msgstr ""
|
1155 |
|
1156 |
+
#: includes/class-display.php:1750
|
1157 |
msgid "Emails are serviced by Constant Contact"
|
1158 |
msgstr ""
|
1159 |
|
1324 |
msgid "Disagree"
|
1325 |
msgstr ""
|
1326 |
|
1327 |
+
#: includes/class-process-form.php:104, includes/class-process-form.php:638
|
1328 |
msgid "There was an error sending your form."
|
1329 |
msgstr ""
|
1330 |
|
1331 |
+
#: includes/class-process-form.php:115, includes/class-process-form.php:656
|
1332 |
msgid "Your information has been submitted."
|
1333 |
msgstr ""
|
1334 |
|
1335 |
+
#: includes/class-process-form.php:130, includes/class-process-form.php:670
|
1336 |
msgid "We had trouble processing your submission. Please review your entries and try again."
|
1337 |
msgstr ""
|
1338 |
|
1360 |
msgid "We had trouble processing your submission. Make sure you haven't changed the required Form ID and try again."
|
1361 |
msgstr ""
|
1362 |
|
1363 |
+
#: includes/class-process-form.php:735
|
1364 |
msgid "We do no think you are human"
|
1365 |
msgstr ""
|
1366 |
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: constantcontact, webdevstudios, tw2113, znowebdev, ggwicz, ra
|
|
3 |
Tags: capture, contacts, constant contact, constant contact form, constant contact newsletter, constant contact official, contact forms, email, form, forms, marketing, mobile, newsletter, opt-in, plugin, signup, subscribe, subscription, widget
|
4 |
Requires at least: 5.2.0
|
5 |
Tested up to: 5.4.1
|
6 |
-
Stable tag: 1.8.
|
7 |
License: GPLv3
|
8 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
9 |
Requires PHP: 5.6
|
@@ -35,6 +35,11 @@ BONUS: If you have a Constant Contact account, all new email addresses that you
|
|
35 |
|
36 |
== Changelog ==
|
37 |
|
|
|
|
|
|
|
|
|
|
|
38 |
= 1.8.6 =
|
39 |
* Fixed: Removed invalid property being sent to the API, causing rejected requests.
|
40 |
* Fixed: Failure to log API errors for support purposes.
|
3 |
Tags: capture, contacts, constant contact, constant contact form, constant contact newsletter, constant contact official, contact forms, email, form, forms, marketing, mobile, newsletter, opt-in, plugin, signup, subscribe, subscription, widget
|
4 |
Requires at least: 5.2.0
|
5 |
Tested up to: 5.4.1
|
6 |
+
Stable tag: 1.8.7
|
7 |
License: GPLv3
|
8 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
9 |
Requires PHP: 5.6
|
35 |
|
36 |
== Changelog ==
|
37 |
|
38 |
+
= 1.8.7 =
|
39 |
+
* Improved: Implemented recommendations for improved accessibility.
|
40 |
+
* Improved: Avoid duplicate ID attributes when more than one form is present on a page.
|
41 |
+
* Fixed: Submit button targeting for recaptcha v2.
|
42 |
+
|
43 |
= 1.8.6 =
|
44 |
* Fixed: Removed invalid property being sent to the API, causing rejected requests.
|
45 |
* Fixed: Failure to log API errors for support purposes.
|
vendor/autoload.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInit9be5d623c7332ab70e31d2aad7bcd258::getLoader();
|
vendor/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -19,15 +19,15 @@ class ComposerAutoloaderInitb6eb9765b6ca2bd55b4483dd58709ee0
|
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
-
spl_autoload_register(array('
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
-
spl_autoload_unregister(array('
|
25 |
|
26 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
27 |
if ($useStaticLoader) {
|
28 |
require_once __DIR__ . '/autoload_static.php';
|
29 |
|
30 |
-
call_user_func(\Composer\Autoload\
|
31 |
} else {
|
32 |
$classMap = require __DIR__ . '/autoload_classmap.php';
|
33 |
if ($classMap) {
|
@@ -39,19 +39,19 @@ class ComposerAutoloaderInitb6eb9765b6ca2bd55b4483dd58709ee0
|
|
39 |
$loader->register(true);
|
40 |
|
41 |
if ($useStaticLoader) {
|
42 |
-
$includeFiles = Composer\Autoload\
|
43 |
} else {
|
44 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
45 |
}
|
46 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
47 |
-
|
48 |
}
|
49 |
|
50 |
return $loader;
|
51 |
}
|
52 |
}
|
53 |
|
54 |
-
function
|
55 |
{
|
56 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
57 |
require $file;
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInit9be5d623c7332ab70e31d2aad7bcd258
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInit9be5d623c7332ab70e31d2aad7bcd258', 'loadClassLoader'), true, true);
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit9be5d623c7332ab70e31d2aad7bcd258', 'loadClassLoader'));
|
25 |
|
26 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
27 |
if ($useStaticLoader) {
|
28 |
require_once __DIR__ . '/autoload_static.php';
|
29 |
|
30 |
+
call_user_func(\Composer\Autoload\ComposerStaticInit9be5d623c7332ab70e31d2aad7bcd258::getInitializer($loader));
|
31 |
} else {
|
32 |
$classMap = require __DIR__ . '/autoload_classmap.php';
|
33 |
if ($classMap) {
|
39 |
$loader->register(true);
|
40 |
|
41 |
if ($useStaticLoader) {
|
42 |
+
$includeFiles = Composer\Autoload\ComposerStaticInit9be5d623c7332ab70e31d2aad7bcd258::$files;
|
43 |
} else {
|
44 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
45 |
}
|
46 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
47 |
+
composerRequire9be5d623c7332ab70e31d2aad7bcd258($fileIdentifier, $file);
|
48 |
}
|
49 |
|
50 |
return $loader;
|
51 |
}
|
52 |
}
|
53 |
|
54 |
+
function composerRequire9be5d623c7332ab70e31d2aad7bcd258($fileIdentifier, $file)
|
55 |
{
|
56 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
57 |
require $file;
|
vendor/composer/autoload_static.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
-
class
|
8 |
{
|
9 |
public static $files = array (
|
10 |
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
|
@@ -390,10 +390,10 @@ class ComposerStaticInitb6eb9765b6ca2bd55b4483dd58709ee0
|
|
390 |
public static function getInitializer(ClassLoader $loader)
|
391 |
{
|
392 |
return \Closure::bind(function () use ($loader) {
|
393 |
-
$loader->prefixLengthsPsr4 =
|
394 |
-
$loader->prefixDirsPsr4 =
|
395 |
-
$loader->prefixesPsr0 =
|
396 |
-
$loader->classMap =
|
397 |
|
398 |
}, null, ClassLoader::class);
|
399 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInit9be5d623c7332ab70e31d2aad7bcd258
|
8 |
{
|
9 |
public static $files = array (
|
10 |
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
|
390 |
public static function getInitializer(ClassLoader $loader)
|
391 |
{
|
392 |
return \Closure::bind(function () use ($loader) {
|
393 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInit9be5d623c7332ab70e31d2aad7bcd258::$prefixLengthsPsr4;
|
394 |
+
$loader->prefixDirsPsr4 = ComposerStaticInit9be5d623c7332ab70e31d2aad7bcd258::$prefixDirsPsr4;
|
395 |
+
$loader->prefixesPsr0 = ComposerStaticInit9be5d623c7332ab70e31d2aad7bcd258::$prefixesPsr0;
|
396 |
+
$loader->classMap = ComposerStaticInit9be5d623c7332ab70e31d2aad7bcd258::$classMap;
|
397 |
|
398 |
}, null, ClassLoader::class);
|
399 |
}
|
vendor/constantcontact/constantcontact/.gitignore
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Created by .gitignore support plugin (hsz.mobi)
|
2 |
+
|
3 |
+
## Directory-based project format
|
4 |
+
.idea/
|
5 |
+
/*.iml
|
6 |
+
|
7 |
+
## File-based project format
|
8 |
+
*.ipr
|
9 |
+
*.iws
|
10 |
+
|
11 |
+
## Additional for IntelliJ
|
12 |
+
out/
|
13 |
+
|
14 |
+
# generated by mpeltonen/sbt-idea plugin
|
15 |
+
.idea_modules/
|
16 |
+
|
17 |
+
# generated by JIRA plugin
|
18 |
+
atlassian-ide-plugin.xml
|
19 |
+
|
20 |
+
### Composer template
|
21 |
+
composer.lock
|
22 |
+
composer.phar
|
23 |
+
vendor/
|
24 |
+
|
25 |
+
devFile.php
|
vendor/defuse/php-encryption/.gitignore
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
*~
|
2 |
+
/test/unit/File/big-generated-file
|
3 |
+
/composer.lock
|
4 |
+
/vendor
|
5 |
+
defuse-crypto.phar
|
6 |
+
defuse-crypto.phar.sig
|
7 |
+
composer.phar
|
8 |
+
box.phar
|
9 |
+
phpunit.phar
|
10 |
+
phpunit.phar.asc
|
11 |
+
test/unit/File/tmp
|
vendor/google/recaptcha/.gitignore
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/.php_cs.cache
|
2 |
+
/.phpunit.result.cache
|
3 |
+
/build
|
4 |
+
/composer.lock
|
5 |
+
/examples/config.php
|
6 |
+
/nbproject/private/
|
7 |
+
/vendor/
|
vendor/guzzlehttp/ringphp/.gitignore
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
vendor
|
2 |
+
build/artifacts/
|
3 |
+
composer.lock
|
4 |
+
docs/_build/
|
vendor/guzzlehttp/streams/.gitignore
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.idea
|
2 |
+
.DS_STORE
|
3 |
+
coverage
|
4 |
+
phpunit.xml
|
5 |
+
composer.lock
|
6 |
+
vendor/
|
vendor/psr/log/.gitignore
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
vendor
|
vendor/react/promise/.gitignore
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
composer.lock
|
2 |
+
composer.phar
|
3 |
+
phpunit.xml
|
4 |
+
build/
|
5 |
+
vendor/
|