Constant Contact Forms - Version 1.2.0

Version Description

  • Added: Reveal shortcode for newly published form in admin notice and popup for non-connected accounts.
  • Added: Classes for individual form inputs and textareas on rendered form.
  • Added: Request to opt into some anonymous data tracking for Constant Contact's information usage.
  • Added: Note about no forms being available in modal popup, if none available.
  • Added: Ability to disable emails if Constant Contact account is connected and "disable email" option checked.
  • Added: Necessary disclosure text to output on comment form and login/registration form when able to do advanced opt-in for list enrollment.
  • Fixed: Possible issues with PHP 5.2 compatibility from the widget.
  • Fixed: Prevent status message from displaying multiple times if multiple forms present on the page.
  • Fixed: Ability to remove description values from various available form inputs.
  • Updated: Changed field order in admin UI for creating Constant Contact form.
  • Updated: Better compatibility with TwentyFourteen.
Download this release

Release Info

Developer constantcontact
Plugin Icon 128x128 Constant Contact Forms
Version 1.2.0
Comparing to
See all releases

Code changes from version 1.1.1 to 1.2.0

Files changed (50) hide show
  1. assets/css/admin-forms.css +62 -1
  2. assets/css/admin-global-no-connection.css +69 -2
  3. assets/css/admin-notices.css +26 -0
  4. assets/css/admin-pages.css +23 -3
  5. assets/css/oath.css +4 -0
  6. assets/css/style.css +5 -1
  7. assets/css/style.min.css +1 -1
  8. assets/images/ctct-admin-notice-logo.png +0 -0
  9. assets/js/ctct-plugin-admin.js +153 -3
  10. assets/js/ctct-plugin-admin.min.js +1 -1
  11. assets/js/ctct-plugin-admin/ajax.js +73 -0
  12. assets/js/ctct-plugin-admin/builder.js +16 -3
  13. assets/js/ctct-plugin-admin/newsletter.js +62 -0
  14. assets/sass/_compatibility.scss +5 -0
  15. assets/sass/_modal.scss +61 -2
  16. assets/sass/admin-forms.scss +6 -0
  17. assets/sass/admin-global-no-connection.scss +58 -2
  18. assets/sass/admin-notices.scss +20 -0
  19. assets/sass/admin-pages.scss +26 -3
  20. assets/sass/oath.scss +4 -0
  21. assets/sass/style.scss +3 -1
  22. assets/wporg/banner-1544x500.jpg +0 -0
  23. assets/wporg/banner-772x250.jpg +0 -0
  24. assets/wporg/icon-128x128.png +0 -0
  25. assets/wporg/icon-256x256.png +0 -0
  26. assets/wporg/screenshot-1.png +0 -0
  27. assets/wporg/screenshot-2.png +0 -0
  28. assets/wporg/screenshot-3.png +0 -0
  29. assets/wporg/screenshot-4.png +0 -0
  30. constant-contact-forms.php +51 -6
  31. includes/class-admin-pages.php +78 -49
  32. includes/class-admin.php +33 -1
  33. includes/class-api.php +1 -1
  34. includes/class-builder-fields.php +103 -34
  35. includes/class-builder.php +19 -10
  36. includes/class-check.php +1 -1
  37. includes/class-connect.php +50 -36
  38. includes/class-cpts.php +8 -2
  39. includes/class-display.php +45 -12
  40. includes/class-mail.php +10 -3
  41. includes/class-notification-content.php +82 -5
  42. includes/class-optin.php +151 -0
  43. includes/class-process-form.php +5 -0
  44. includes/class-settings.php +232 -110
  45. includes/class-shortcode-admin.php +12 -2
  46. includes/helper-functions.php +97 -11
  47. includes/widgets/contact-form-select.php +1 -1
  48. languages/constant-contact-forms.pot +337 -163
  49. readme.txt +15 -2
  50. vendor/constantcontact/constantcontact/constantcontact/src/Ctct/autoload.php +1 -1
assets/css/admin-forms.css CHANGED
@@ -89,11 +89,19 @@
89
  }
90
 
91
  .ctct-modal .ctct-modal-content .ctct-modal-header p {
92
- color: #333333;
93
  font-size: 16px;
94
  margin-bottom: 0;
95
  }
96
 
 
 
 
 
 
 
 
 
97
  .ctct-modal .ctct-modal-content .ctct-modal-header .ctct-modal-close {
98
  color: #ffffff;
99
  cursor: pointer;
@@ -136,6 +144,46 @@
136
  text-decoration: underline;
137
  }
138
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
139
  .ctct-modal .ctct-modal-content .ctct-modal-body {
140
  padding: 15px;
141
  position: relative;
@@ -147,6 +195,11 @@
147
  display: table;
148
  }
149
 
 
 
 
 
 
150
  .ctct-modal .ctct-modal-content .ctct-modal-body .ctct-modal-left,
151
  .ctct-modal .ctct-modal-content .ctct-modal-body .ctct-modal-right {
152
  float: left;
@@ -190,6 +243,10 @@
190
  font-style: italic;
191
  }
192
 
 
 
 
 
193
  .ctct-modal .ctct-modal-content .ctct-modal-body .ctct-modal-left {
194
  border-right: 1px solid #EFEFEE;
195
  }
@@ -371,3 +428,7 @@ body.post-type-ctct_forms #titlediv #title {
371
  #ctct_1_optin_metabox .cmb-th + .cmb-td {
372
  width: 70%;
373
  }
 
 
 
 
89
  }
90
 
91
  .ctct-modal .ctct-modal-content .ctct-modal-header p {
92
+ color: #fff;
93
  font-size: 16px;
94
  margin-bottom: 0;
95
  }
96
 
97
+ .ctct-modal .ctct-modal-content .ctct-modal-header p .displayed-shortcode {
98
+ color: #333333;
99
+ }
100
+
101
+ .ctct-modal .ctct-modal-content .ctct-modal-header .ctct-logo img {
102
+ max-width: 75%;
103
+ }
104
+
105
  .ctct-modal .ctct-modal-content .ctct-modal-header .ctct-modal-close {
106
  color: #ffffff;
107
  cursor: pointer;
144
  text-decoration: underline;
145
  }
146
 
147
+ .ctct-modal .ctct-modal-content .ctct-modal-footer.ctct-modal-footer-privacy a {
148
+ text-decoration: none;
149
+ }
150
+
151
+ .ctct-modal .ctct-modal-content .ctct-modal-footer .button {
152
+ border-radius: 4px;
153
+ color: #fff;
154
+ font-size: 16px;
155
+ font-weight: 600;
156
+ height: auto;
157
+ line-height: 1;
158
+ margin-bottom: 10px;
159
+ min-width: 180px;
160
+ padding: 14px 30px;
161
+ }
162
+
163
+ .ctct-modal .ctct-modal-content .ctct-modal-footer .button.no-bg {
164
+ border: none;
165
+ box-shadow: none;
166
+ color: #0078C3;
167
+ }
168
+
169
+ .ctct-modal .ctct-modal-content .ctct-modal-footer .button.button-orange {
170
+ background-color: #FFA901;
171
+ border: 1px solid #cd8800;
172
+ }
173
+
174
+ .ctct-modal .ctct-modal-content .ctct-modal-footer .button.button-orange:hover, .ctct-modal .ctct-modal-content .ctct-modal-footer .button.button-orange:focus {
175
+ background-color: #cd8800;
176
+ }
177
+
178
+ .ctct-modal .ctct-modal-content .ctct-modal-footer .button.button-blue {
179
+ background-color: #0078C3;
180
+ border: 1px solid #005990;
181
+ }
182
+
183
+ .ctct-modal .ctct-modal-content .ctct-modal-footer .button.button-blue:hover, .ctct-modal .ctct-modal-content .ctct-modal-footer .button.button-blue:focus {
184
+ background-color: #005990;
185
+ }
186
+
187
  .ctct-modal .ctct-modal-content .ctct-modal-body {
188
  padding: 15px;
189
  position: relative;
195
  display: table;
196
  }
197
 
198
+ .ctct-modal .ctct-modal-content .ctct-modal-body.ctct-privacy-modal-body {
199
+ overflow: scroll;
200
+ height: 350px;
201
+ }
202
+
203
  .ctct-modal .ctct-modal-content .ctct-modal-body .ctct-modal-left,
204
  .ctct-modal .ctct-modal-content .ctct-modal-body .ctct-modal-right {
205
  float: left;
243
  font-style: italic;
244
  }
245
 
246
+ .ctct-modal .ctct-modal-content .ctct-modal-body .now-what {
247
+ text-align: center;
248
+ }
249
+
250
  .ctct-modal .ctct-modal-content .ctct-modal-body .ctct-modal-left {
251
  border-right: 1px solid #EFEFEE;
252
  }
428
  #ctct_1_optin_metabox .cmb-th + .cmb-td {
429
  width: 70%;
430
  }
431
+
432
+ #ctct_option_metabox_settings span.cmb2-metabox-description {
433
+ color: #444444;
434
+ }
assets/css/admin-global-no-connection.css CHANGED
@@ -9,6 +9,10 @@
9
  width: 100%;
10
  }
11
 
 
 
 
 
12
  @media screen and (max-width: 782px) {
13
  .ctct_options_connect {
14
  padding: 30px 30px 0;
@@ -16,6 +20,54 @@
16
  }
17
  }
18
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  .ctct_options_connect img {
20
  width: 100%;
21
  max-width: 400px;
@@ -33,11 +85,12 @@
33
  .ctct_options_connect p {
34
  color: #606d78;
35
  font-size: 14.7px;
 
36
  }
37
 
38
  .ctct_options_connect p.ctct-description {
39
  font-size: 16px;
40
- margin-bottom: 15px;
41
  margin-top: 5px;
42
  }
43
 
@@ -45,7 +98,6 @@
45
  color: #747e88;
46
  font-size: 13.3px;
47
  margin: 15px auto 0;
48
- max-width: 60%;
49
  }
50
 
51
  @media screen and (max-width: 782px) {
@@ -67,6 +119,21 @@
67
  display: table;
68
  }
69
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
70
  .ctct_options_connect .ctct-body .clear {
71
  width: 100%;
72
  clear: both;
9
  width: 100%;
10
  }
11
 
12
+ .ctct_options_connect hr {
13
+ margin-bottom: 45px;
14
+ }
15
+
16
  @media screen and (max-width: 782px) {
17
  .ctct_options_connect {
18
  padding: 30px 30px 0;
20
  }
21
  }
22
 
23
+ .ctct_options_connect .ctct-call-to-action {
24
+ margin-bottom: 45px;
25
+ overflow: hidden;
26
+ text-align: left;
27
+ width: 100%;
28
+ }
29
+
30
+ .ctct_options_connect .ctct-call-to-action p {
31
+ float: left;
32
+ margin: 0;
33
+ }
34
+
35
+ .ctct_options_connect .ctct-call-to-action a {
36
+ float: right;
37
+ text-align: center;
38
+ }
39
+
40
+ @media screen and (max-width: 782px) {
41
+ .ctct_options_connect .ctct-call-to-action a {
42
+ float: none;
43
+ }
44
+ }
45
+
46
+ .ctct_options_connect .ctct-call-to-action .ctct-call-to-action-text a {
47
+ float: none;
48
+ }
49
+
50
+ .ctct_options_connect .ctct-call-to-action .ctct-call-to-action-text small {
51
+ line-height: 1.2px;
52
+ }
53
+
54
+ .ctct_options_connect .ctct-call-to-action #subbox {
55
+ height: 40px;
56
+ margin: 15px 0;
57
+ width: 50%;
58
+ }
59
+
60
+ .ctct_options_connect .ctct-call-to-action #subbutton {
61
+ color: #0078C3;
62
+ float: right;
63
+ }
64
+
65
+ @media screen and (max-width: 782px) {
66
+ .ctct_options_connect .ctct-call-to-action #subbutton {
67
+ float: none;
68
+ }
69
+ }
70
+
71
  .ctct_options_connect img {
72
  width: 100%;
73
  max-width: 400px;
85
  .ctct_options_connect p {
86
  color: #606d78;
87
  font-size: 14.7px;
88
+ margin: 0;
89
  }
90
 
91
  .ctct_options_connect p.ctct-description {
92
  font-size: 16px;
93
+ margin-bottom: 50px;
94
  margin-top: 5px;
95
  }
96
 
98
  color: #747e88;
99
  font-size: 13.3px;
100
  margin: 15px auto 0;
 
101
  }
102
 
103
  @media screen and (max-width: 782px) {
119
  display: table;
120
  }
121
 
122
+ .ctct_options_connect .ctct-body .ctct-call-to-action-text {
123
+ float: left;
124
+ width: 75%;
125
+ }
126
+
127
+ @media screen and (max-width: 782px) {
128
+ .ctct_options_connect .ctct-body .ctct-call-to-action-text {
129
+ width: 100%;
130
+ }
131
+ }
132
+
133
+ .ctct_options_connect .ctct-body .ctct-call-to-action-text h3 {
134
+ margin-top: 0;
135
+ }
136
+
137
  .ctct_options_connect .ctct-body .clear {
138
  width: 100%;
139
  clear: both;
assets/css/admin-notices.css CHANGED
@@ -22,3 +22,29 @@ a.ctct-notice-dismiss {
22
  vertical-align: middle;
23
  margin: .5em;
24
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
  vertical-align: middle;
23
  margin: .5em;
24
  }
25
+
26
+ .ctct-admin-notice {
27
+ overflow: hidden;
28
+ }
29
+
30
+ .ctct-admin-notice.updated {
31
+ border-left-color: #1a5285;
32
+ }
33
+
34
+ .ctct-admin-notice > div {
35
+ float: left;
36
+ }
37
+
38
+ .ctct-admin-notice .admin-notice-message {
39
+ margin-left: 15px;
40
+ width: 80%;
41
+ }
42
+
43
+ .ctct-admin-notice .admin-notice-message h4 {
44
+ color: #1a5285;
45
+ margin: 0 0 10px;
46
+ }
47
+
48
+ .ctct-admin-notice .admin-notice-message > div {
49
+ float: left;
50
+ }
assets/css/admin-pages.css CHANGED
@@ -8,6 +8,10 @@
8
  }
9
  }
10
 
 
 
 
 
11
  .constant-contact-about h1.about-header {
12
  color: #1a5285;
13
  font-size: 26px;
@@ -192,11 +196,10 @@
192
  }
193
 
194
  .constant-contact-about .plugin-badge {
195
- position: absolute;
196
- top: 10px;
197
- right: 0;
198
  max-height: 180px;
199
  max-width: 160px;
 
200
  }
201
 
202
  @media screen and (max-width: 482px) {
@@ -313,3 +316,20 @@
313
  font-weight: 300;
314
  color: #2b5e8c;
315
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  }
9
  }
10
 
11
+ .constant-contact-about .ctct-section {
12
+ margin-bottom: 50px;
13
+ }
14
+
15
  .constant-contact-about h1.about-header {
16
  color: #1a5285;
17
  font-size: 26px;
196
  }
197
 
198
  .constant-contact-about .plugin-badge {
199
+ float: right;
 
 
200
  max-height: 180px;
201
  max-width: 160px;
202
+ margin-left: 40px;
203
  }
204
 
205
  @media screen and (max-width: 482px) {
316
  font-weight: 300;
317
  color: #2b5e8c;
318
  }
319
+
320
+ .section-try-us .ctct-bonus-points {
321
+ margin-bottom: 50px;
322
+ }
323
+
324
+ .section-try-us a.button {
325
+ margin-right: 40px;
326
+ }
327
+
328
+ .section-try-us a.ctct-connect {
329
+ font-weight: bold;
330
+ }
331
+
332
+ .section-marketing-tips #subbox {
333
+ height: 40px;
334
+ width: 50%;
335
+ }
assets/css/oath.css CHANGED
@@ -27,6 +27,10 @@
27
  font-size: 16px;
28
  }
29
 
 
 
 
 
30
  .ctct_options_connect .ctct-body {
31
  margin: 0 auto;
32
  max-width: 75%;
27
  font-size: 16px;
28
  }
29
 
30
+ .ctct_options_connect .ctct-description {
31
+ text-align: left;
32
+ }
33
+
34
  .ctct_options_connect .ctct-body {
35
  margin: 0 auto;
36
  max-width: 75%;
assets/css/style.css CHANGED
@@ -79,6 +79,10 @@
79
  color: #FF4136;
80
  }
81
 
 
 
 
 
82
  @media (min-width: 992px) {
83
 
84
  .ctct-form-wrapper .ctct-field-half {
@@ -112,4 +116,4 @@
112
  }
113
  }
114
 
115
- /*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlLmNzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNFLGlCQUFpQjtDQUNsQjs7QUFFRDtFQUNFLGtCQUFrQjtFQUNsQixhQUFhO0NBQ2Q7O0FBRUQ7RUFDRSwwQ0FBMEM7RUFDMUMsc0JBQXNCO0VBQ3RCLGVBQWU7Q0FDaEI7O0FBRUQ7RUFDRSwwQ0FBMEM7RUFDMUMsc0JBQXNCO0VBQ3RCLGVBQWU7Q0FDaEI7O0FBRUQ7RUFDRSxnQkFBZ0I7Q0FDakI7O0FBRUQ7RUFDRSxzQkFBc0I7Q0FDdkI7O0FBbUNEO0VBQ0Usd0RBQXdEO0VBQ3hELDZCQUE2QjtFQUM3QixzQkFBc0I7RUFDdEIsc0JBQXNCO0VBQ3RCLG1CQUFtQjtDQUNwQjs7QUFFRDtFQUNFLGlEQUFpRDtFQUNqRCwwQ0FBMEM7RUFDMUMsNkJBQTZCO0VBQzdCLHNCQUFzQjtFQUN0QixzQkFBc0I7RUFDdEIsbUJBQW1CO0NBQ3BCOztBQUVEO0VBQ0Usa0JBQWtCO0VBQ2xCLG1CQUFtQjtDQUNwQjs7QUFFRDtFQUNFLGlEQUFpRDtFQUNqRCwwQ0FBMEM7RUFDMUMsNkJBQTZCO0VBQzdCLHNCQUFzQjtFQUN0QixzQkFBc0I7RUFDdEIsbUJBQW1CO0NBQ3BCOztBQUVEO0VBQ0UsWUFBWTtFQUNaLFlBQVk7RUFDWixlQUFlO0NBQ2hCOztBQUVEO0VBQ0UsYUFBYTtFQUNiLGVBQWU7RUFDZixpQkFBaUI7Q0FDbEI7O0FBRUQ7RUFDRSxZQUFZO0VBQ1osaUJBQWlCO0NBQ2xCOztBQUVEO0VBQ0UsZUFBZTtDQUNoQjs7QUFuRkQ7O0VBQ0U7SUFDRSxZQUFZO0lBQ1osaUJBQWlCO0lBQ2pCLFdBQVc7R0FDWjs7RUFDRDtJQUNFLGdCQUFnQjtHQUNqQjs7RUFJRDtJQUNFLFlBQVk7SUFDWixpQkFBaUI7SUFDakIsV0FBVztHQUNaOztFQUNEO0lBQ0UsZ0JBQWdCO0dBQ2pCOztFQUlEO0lBQ0UsWUFBWTtJQUNaLGlCQUFpQjtJQUNqQixXQUFXO0dBQ1o7O0VBQ0Q7SUFDRSxnQkFBZ0I7R0FDakI7Q0FyQkYiLCJmaWxlIjoic3R5bGUuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmN0Y3QtZm9ybS13cmFwcGVyIC5jdGN0LWJ1dHRvbiB7XG4gIGZvbnQtc2l6ZTogMC45ZW07XG59XG5cbi5jdGN0LWZvcm0td3JhcHBlciAuY3RjdC1tZXNzYWdlIHtcbiAgYm9yZGVyOiAxcHggc29saWQ7XG4gIHBhZGRpbmc6IDFlbTtcbn1cblxuLmN0Y3QtZm9ybS13cmFwcGVyIC5lcnJvciB7XG4gIGJhY2tncm91bmQtY29sb3I6IHJnYmEoMjU1LCA2NSwgNTQsIDAuMDIpO1xuICBib3JkZXItY29sb3I6ICNGRjQxMzY7XG4gIGNvbG9yOiAjY2YwYjAwO1xufVxuXG4uY3RjdC1mb3JtLXdyYXBwZXIgLnN1Y2Nlc3Mge1xuICBiYWNrZ3JvdW5kLWNvbG9yOiByZ2JhKDQ2LCAyMDQsIDY0LCAwLjAyKTtcbiAgYm9yZGVyLWNvbG9yOiAjMkVDQzQwO1xuICBjb2xvcjogIzFiNzkyNjtcbn1cblxuLmN0Y3QtZm9ybS13cmFwcGVyIC5jdGN0LWZvcm0tZmllbGQge1xuICBtYXJnaW46IDAgMCAxZW07XG59XG5cbi5jdGN0LWZvcm0td3JhcHBlciAuY3RjdC1maWVsZC1pbmxpbmUge1xuICBkaXNwbGF5OiBpbmxpbmUtYmxvY2s7XG59XG5cbkBtZWRpYSAobWluLXdpZHRoOiA5OTJweCkge1xuICAuY3RjdC1mb3JtLXdyYXBwZXIgLmN0Y3QtZmllbGQtaGFsZiB7XG4gICAgZmxvYXQ6IGxlZnQ7XG4gICAgbWFyZ2luLXJpZ2h0OiAyJTtcbiAgICB3aWR0aDogNDglO1xuICB9XG4gIC5jdGN0LWZvcm0td3JhcHBlciAuY3RjdC1maWVsZC1oYWxmOmxhc3Qtb2YtdHlwZSB7XG4gICAgbWFyZ2luLXJpZ2h0OiAwO1xuICB9XG59XG5cbkBtZWRpYSAobWluLXdpZHRoOiA5OTJweCkge1xuICAuY3RjdC1mb3JtLXdyYXBwZXIgLmN0Y3QtZmllbGQtdGhpcmQge1xuICAgIGZsb2F0OiBsZWZ0O1xuICAgIG1hcmdpbi1yaWdodDogMiU7XG4gICAgd2lkdGg6IDMyJTtcbiAgfVxuICAuY3RjdC1mb3JtLXdyYXBwZXIgLmN0Y3QtZmllbGQtdGhpcmQ6bGFzdC1vZi10eXBlIHtcbiAgICBtYXJnaW4tcmlnaHQ6IDA7XG4gIH1cbn1cblxuQG1lZGlhIChtaW4td2lkdGg6IDk5MnB4KSB7XG4gIC5jdGN0LWZvcm0td3JhcHBlciAuY3RjdC1maWVsZC1mb3VydGgge1xuICAgIGZsb2F0OiBsZWZ0O1xuICAgIG1hcmdpbi1yaWdodDogMiU7XG4gICAgd2lkdGg6IDI0JTtcbiAgfVxuICAuY3RjdC1mb3JtLXdyYXBwZXIgLmN0Y3QtZmllbGQtZm91cnRoOmxhc3Qtb2YtdHlwZSB7XG4gICAgbWFyZ2luLXJpZ2h0OiAwO1xuICB9XG59XG5cbi5jdGN0LWZvcm0td3JhcHBlciBpbnB1dFt0eXBlPVwidGV4dFwiXTpyZXF1aXJlZDp2YWxpZCwgLmN0Y3QtZm9ybS13cmFwcGVyIGlucHV0W3R5cGU9XCJlbWFpbFwiXTpyZXF1aXJlZDp2YWxpZCwgLmN0Y3QtZm9ybS13cmFwcGVyIGlucHV0W3R5cGU9XCJwYXNzd29yZFwiXTpyZXF1aXJlZDp2YWxpZCwgLmN0Y3QtZm9ybS13cmFwcGVyIGlucHV0W3R5cGU9XCJ0ZWxcIl06cmVxdWlyZWQ6dmFsaWQsIC5jdGN0LWZvcm0td3JhcHBlciBpbnB1dFt0eXBlPVwibnVtYmVyXCJdOnJlcXVpcmVkOnZhbGlkIHtcbiAgYmFja2dyb3VuZDogdXJsKFwiLi4vaW1hZ2VzL2NoZWNrX2NpcmNsZS5zdmdcIikgbm8tcmVwZWF0O1xuICBiYWNrZ3JvdW5kLXBvc2l0aW9uOiA4cHggNTAlO1xuICBiYWNrZ3JvdW5kLXNpemU6IDI0cHg7XG4gIGJvcmRlci1jb2xvcjogIzJFQ0M0MDtcbiAgcGFkZGluZy1sZWZ0OiA0MHB4O1xufVxuXG4uY3RjdC1mb3JtLXdyYXBwZXIgaW5wdXRbdHlwZT1cInRleHRcIl06cmVxdWlyZWQuY3RjdC1pbnZhbGlkLCAuY3RjdC1mb3JtLXdyYXBwZXIgaW5wdXRbdHlwZT1cInRleHRcIl0uY3RjdC1pbnZhbGlkLCAuY3RjdC1mb3JtLXdyYXBwZXIgaW5wdXRbdHlwZT1cImVtYWlsXCJdOnJlcXVpcmVkLmN0Y3QtaW52YWxpZCwgLmN0Y3QtZm9ybS13cmFwcGVyIGlucHV0W3R5cGU9XCJlbWFpbFwiXS5jdGN0LWludmFsaWQsIC5jdGN0LWZvcm0td3JhcHBlciBpbnB1dFt0eXBlPVwicGFzc3dvcmRcIl06cmVxdWlyZWQuY3RjdC1pbnZhbGlkLCAuY3RjdC1mb3JtLXdyYXBwZXIgaW5wdXRbdHlwZT1cInBhc3N3b3JkXCJdLmN0Y3QtaW52YWxpZCwgLmN0Y3QtZm9ybS13cmFwcGVyIGlucHV0W3R5cGU9XCJ0ZWxcIl06cmVxdWlyZWQuY3RjdC1pbnZhbGlkLCAuY3RjdC1mb3JtLXdyYXBwZXIgaW5wdXRbdHlwZT1cInRlbFwiXS5jdGN0LWludmFsaWQsIC5jdGN0LWZvcm0td3JhcHBlciBpbnB1dFt0eXBlPVwibnVtYmVyXCJdOnJlcXVpcmVkLmN0Y3QtaW52YWxpZCwgLmN0Y3QtZm9ybS13cmFwcGVyIGlucHV0W3R5cGU9XCJudW1iZXJcIl0uY3RjdC1pbnZhbGlkIHtcbiAgYmFja2dyb3VuZDogdXJsKFwiLi4vaW1hZ2VzL2Vycm9yLnN2Z1wiKSBuby1yZXBlYXQ7XG4gIGJhY2tncm91bmQtY29sb3I6IHJnYmEoMjU1LCA2NSwgNTQsIDAuMDIpO1xuICBiYWNrZ3JvdW5kLXBvc2l0aW9uOiA4cHggNTAlO1xuICBiYWNrZ3JvdW5kLXNpemU6IDI0cHg7XG4gIGJvcmRlci1jb2xvcjogI0ZGNDEzNjtcbiAgcGFkZGluZy1sZWZ0OiA0MHB4O1xufVxuXG4uY3RjdC1mb3JtLXdyYXBwZXIgLmN0Y3QtZmllbGQtZXJyb3Ige1xuICBmb250LXNpemU6IDAuODVlbTtcbiAgZm9udC1zdHlsZTogaXRhbGljO1xufVxuXG4uY3RjdC1mb3JtLXdyYXBwZXIgaW5wdXQuY3RjdC1pbnZhbGlkIHtcbiAgYmFja2dyb3VuZDogdXJsKFwiLi4vaW1hZ2VzL2Vycm9yLnN2Z1wiKSBuby1yZXBlYXQ7XG4gIGJhY2tncm91bmQtY29sb3I6IHJnYmEoMjU1LCA2NSwgNTQsIDAuMDIpO1xuICBiYWNrZ3JvdW5kLXBvc2l0aW9uOiA4cHggNTAlO1xuICBiYWNrZ3JvdW5kLXNpemU6IDI0cHg7XG4gIGJvcmRlci1jb2xvcjogI0ZGNDEzNjtcbiAgcGFkZGluZy1sZWZ0OiA0MHB4O1xufVxuXG4uY3RjdC1mb3JtLXdyYXBwZXIgLmN0Y3QtZm9ybTphZnRlciB7XG4gIGNsZWFyOiBib3RoO1xuICBjb250ZW50OiBcIlwiO1xuICBkaXNwbGF5OiB0YWJsZTtcbn1cblxuLmN0Y3QtZm9ybS13cmFwcGVyIC5jdGN0LWZvcm0gYWJiciB7XG4gIGJvcmRlcjogbm9uZTtcbiAgY29sb3I6ICNGRjQxMzY7XG4gIGZvbnQtc2l6ZTogMC45ZW07XG59XG5cbi5jdGN0LWZvcm0td3JhcHBlciAuY3RjdC1pbnB1dC1jb250YWluZXIgbGFiZWwge1xuICBjb2xvcjogI2FhYTtcbiAgZm9udC1zaXplOiAwLjhlbTtcbn1cblxuLmN0Y3QtZm9ybS13cmFwcGVyIC5jdGN0LWZpZWxkLWVycm9yIHtcbiAgY29sb3I6ICNGRjQxMzY7XG59XG4iXSwic291cmNlUm9vdCI6Ii9zb3VyY2UvIn0= */
79
  color: #FF4136;
80
  }
81
 
82
+ .ctct-twentyfourteen .ctct-form-field input {
83
+ width: 100%;
84
+ }
85
+
86
  @media (min-width: 992px) {
87
 
88
  .ctct-form-wrapper .ctct-field-half {
116
  }
117
  }
118
 
119
+ /*# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlLmNzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNFLGlCQUFpQjtDQUNsQjs7QUFFRDtFQUNFLGtCQUFrQjtFQUNsQixhQUFhO0NBQ2Q7O0FBRUQ7RUFDRSwwQ0FBMEM7RUFDMUMsc0JBQXNCO0VBQ3RCLGVBQWU7Q0FDaEI7O0FBRUQ7RUFDRSwwQ0FBMEM7RUFDMUMsc0JBQXNCO0VBQ3RCLGVBQWU7Q0FDaEI7O0FBRUQ7RUFDRSxnQkFBZ0I7Q0FDakI7O0FBRUQ7RUFDRSxzQkFBc0I7Q0FDdkI7O0FBbUNEO0VBQ0Usd0RBQXdEO0VBQ3hELDZCQUE2QjtFQUM3QixzQkFBc0I7RUFDdEIsc0JBQXNCO0VBQ3RCLG1CQUFtQjtDQUNwQjs7QUFFRDtFQUNFLGlEQUFpRDtFQUNqRCwwQ0FBMEM7RUFDMUMsNkJBQTZCO0VBQzdCLHNCQUFzQjtFQUN0QixzQkFBc0I7RUFDdEIsbUJBQW1CO0NBQ3BCOztBQUVEO0VBQ0Usa0JBQWtCO0VBQ2xCLG1CQUFtQjtDQUNwQjs7QUFFRDtFQUNFLGlEQUFpRDtFQUNqRCwwQ0FBMEM7RUFDMUMsNkJBQTZCO0VBQzdCLHNCQUFzQjtFQUN0QixzQkFBc0I7RUFDdEIsbUJBQW1CO0NBQ3BCOztBQUVEO0VBQ0UsWUFBWTtFQUNaLFlBQVk7RUFDWixlQUFlO0NBQ2hCOztBQUVEO0VBQ0UsYUFBYTtFQUNiLGVBQWU7RUFDZixpQkFBaUI7Q0FDbEI7O0FBRUQ7RUFDRSxZQUFZO0VBQ1osaUJBQWlCO0NBQ2xCOztBQUVEO0VBQ0UsZUFBZTtDQUNoQjs7QUFFRDtFQUNFLFlBQVk7Q0FDYjs7QUF2RkQ7O0VBQ0U7SUFDRSxZQUFZO0lBQ1osaUJBQWlCO0lBQ2pCLFdBQVc7R0FDWjs7RUFDRDtJQUNFLGdCQUFnQjtHQUNqQjs7RUFJRDtJQUNFLFlBQVk7SUFDWixpQkFBaUI7SUFDakIsV0FBVztHQUNaOztFQUNEO0lBQ0UsZ0JBQWdCO0dBQ2pCOztFQUlEO0lBQ0UsWUFBWTtJQUNaLGlCQUFpQjtJQUNqQixXQUFXO0dBQ1o7O0VBQ0Q7SUFDRSxnQkFBZ0I7R0FDakI7Q0FyQkYiLCJmaWxlIjoic3R5bGUuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmN0Y3QtZm9ybS13cmFwcGVyIC5jdGN0LWJ1dHRvbiB7XG4gIGZvbnQtc2l6ZTogMC45ZW07XG59XG5cbi5jdGN0LWZvcm0td3JhcHBlciAuY3RjdC1tZXNzYWdlIHtcbiAgYm9yZGVyOiAxcHggc29saWQ7XG4gIHBhZGRpbmc6IDFlbTtcbn1cblxuLmN0Y3QtZm9ybS13cmFwcGVyIC5lcnJvciB7XG4gIGJhY2tncm91bmQtY29sb3I6IHJnYmEoMjU1LCA2NSwgNTQsIDAuMDIpO1xuICBib3JkZXItY29sb3I6ICNGRjQxMzY7XG4gIGNvbG9yOiAjY2YwYjAwO1xufVxuXG4uY3RjdC1mb3JtLXdyYXBwZXIgLnN1Y2Nlc3Mge1xuICBiYWNrZ3JvdW5kLWNvbG9yOiByZ2JhKDQ2LCAyMDQsIDY0LCAwLjAyKTtcbiAgYm9yZGVyLWNvbG9yOiAjMkVDQzQwO1xuICBjb2xvcjogIzFiNzkyNjtcbn1cblxuLmN0Y3QtZm9ybS13cmFwcGVyIC5jdGN0LWZvcm0tZmllbGQge1xuICBtYXJnaW46IDAgMCAxZW07XG59XG5cbi5jdGN0LWZvcm0td3JhcHBlciAuY3RjdC1maWVsZC1pbmxpbmUge1xuICBkaXNwbGF5OiBpbmxpbmUtYmxvY2s7XG59XG5cbkBtZWRpYSAobWluLXdpZHRoOiA5OTJweCkge1xuICAuY3RjdC1mb3JtLXdyYXBwZXIgLmN0Y3QtZmllbGQtaGFsZiB7XG4gICAgZmxvYXQ6IGxlZnQ7XG4gICAgbWFyZ2luLXJpZ2h0OiAyJTtcbiAgICB3aWR0aDogNDglO1xuICB9XG4gIC5jdGN0LWZvcm0td3JhcHBlciAuY3RjdC1maWVsZC1oYWxmOmxhc3Qtb2YtdHlwZSB7XG4gICAgbWFyZ2luLXJpZ2h0OiAwO1xuICB9XG59XG5cbkBtZWRpYSAobWluLXdpZHRoOiA5OTJweCkge1xuICAuY3RjdC1mb3JtLXdyYXBwZXIgLmN0Y3QtZmllbGQtdGhpcmQge1xuICAgIGZsb2F0OiBsZWZ0O1xuICAgIG1hcmdpbi1yaWdodDogMiU7XG4gICAgd2lkdGg6IDMyJTtcbiAgfVxuICAuY3RjdC1mb3JtLXdyYXBwZXIgLmN0Y3QtZmllbGQtdGhpcmQ6bGFzdC1vZi10eXBlIHtcbiAgICBtYXJnaW4tcmlnaHQ6IDA7XG4gIH1cbn1cblxuQG1lZGlhIChtaW4td2lkdGg6IDk5MnB4KSB7XG4gIC5jdGN0LWZvcm0td3JhcHBlciAuY3RjdC1maWVsZC1mb3VydGgge1xuICAgIGZsb2F0OiBsZWZ0O1xuICAgIG1hcmdpbi1yaWdodDogMiU7XG4gICAgd2lkdGg6IDI0JTtcbiAgfVxuICAuY3RjdC1mb3JtLXdyYXBwZXIgLmN0Y3QtZmllbGQtZm91cnRoOmxhc3Qtb2YtdHlwZSB7XG4gICAgbWFyZ2luLXJpZ2h0OiAwO1xuICB9XG59XG5cbi5jdGN0LWZvcm0td3JhcHBlciBpbnB1dFt0eXBlPVwidGV4dFwiXTpyZXF1aXJlZDp2YWxpZCwgLmN0Y3QtZm9ybS13cmFwcGVyIGlucHV0W3R5cGU9XCJlbWFpbFwiXTpyZXF1aXJlZDp2YWxpZCwgLmN0Y3QtZm9ybS13cmFwcGVyIGlucHV0W3R5cGU9XCJwYXNzd29yZFwiXTpyZXF1aXJlZDp2YWxpZCwgLmN0Y3QtZm9ybS13cmFwcGVyIGlucHV0W3R5cGU9XCJ0ZWxcIl06cmVxdWlyZWQ6dmFsaWQsIC5jdGN0LWZvcm0td3JhcHBlciBpbnB1dFt0eXBlPVwibnVtYmVyXCJdOnJlcXVpcmVkOnZhbGlkIHtcbiAgYmFja2dyb3VuZDogdXJsKFwiLi4vaW1hZ2VzL2NoZWNrX2NpcmNsZS5zdmdcIikgbm8tcmVwZWF0O1xuICBiYWNrZ3JvdW5kLXBvc2l0aW9uOiA4cHggNTAlO1xuICBiYWNrZ3JvdW5kLXNpemU6IDI0cHg7XG4gIGJvcmRlci1jb2xvcjogIzJFQ0M0MDtcbiAgcGFkZGluZy1sZWZ0OiA0MHB4O1xufVxuXG4uY3RjdC1mb3JtLXdyYXBwZXIgaW5wdXRbdHlwZT1cInRleHRcIl06cmVxdWlyZWQuY3RjdC1pbnZhbGlkLCAuY3RjdC1mb3JtLXdyYXBwZXIgaW5wdXRbdHlwZT1cInRleHRcIl0uY3RjdC1pbnZhbGlkLCAuY3RjdC1mb3JtLXdyYXBwZXIgaW5wdXRbdHlwZT1cImVtYWlsXCJdOnJlcXVpcmVkLmN0Y3QtaW52YWxpZCwgLmN0Y3QtZm9ybS13cmFwcGVyIGlucHV0W3R5cGU9XCJlbWFpbFwiXS5jdGN0LWludmFsaWQsIC5jdGN0LWZvcm0td3JhcHBlciBpbnB1dFt0eXBlPVwicGFzc3dvcmRcIl06cmVxdWlyZWQuY3RjdC1pbnZhbGlkLCAuY3RjdC1mb3JtLXdyYXBwZXIgaW5wdXRbdHlwZT1cInBhc3N3b3JkXCJdLmN0Y3QtaW52YWxpZCwgLmN0Y3QtZm9ybS13cmFwcGVyIGlucHV0W3R5cGU9XCJ0ZWxcIl06cmVxdWlyZWQuY3RjdC1pbnZhbGlkLCAuY3RjdC1mb3JtLXdyYXBwZXIgaW5wdXRbdHlwZT1cInRlbFwiXS5jdGN0LWludmFsaWQsIC5jdGN0LWZvcm0td3JhcHBlciBpbnB1dFt0eXBlPVwibnVtYmVyXCJdOnJlcXVpcmVkLmN0Y3QtaW52YWxpZCwgLmN0Y3QtZm9ybS13cmFwcGVyIGlucHV0W3R5cGU9XCJudW1iZXJcIl0uY3RjdC1pbnZhbGlkIHtcbiAgYmFja2dyb3VuZDogdXJsKFwiLi4vaW1hZ2VzL2Vycm9yLnN2Z1wiKSBuby1yZXBlYXQ7XG4gIGJhY2tncm91bmQtY29sb3I6IHJnYmEoMjU1LCA2NSwgNTQsIDAuMDIpO1xuICBiYWNrZ3JvdW5kLXBvc2l0aW9uOiA4cHggNTAlO1xuICBiYWNrZ3JvdW5kLXNpemU6IDI0cHg7XG4gIGJvcmRlci1jb2xvcjogI0ZGNDEzNjtcbiAgcGFkZGluZy1sZWZ0OiA0MHB4O1xufVxuXG4uY3RjdC1mb3JtLXdyYXBwZXIgLmN0Y3QtZmllbGQtZXJyb3Ige1xuICBmb250LXNpemU6IDAuODVlbTtcbiAgZm9udC1zdHlsZTogaXRhbGljO1xufVxuXG4uY3RjdC1mb3JtLXdyYXBwZXIgaW5wdXQuY3RjdC1pbnZhbGlkIHtcbiAgYmFja2dyb3VuZDogdXJsKFwiLi4vaW1hZ2VzL2Vycm9yLnN2Z1wiKSBuby1yZXBlYXQ7XG4gIGJhY2tncm91bmQtY29sb3I6IHJnYmEoMjU1LCA2NSwgNTQsIDAuMDIpO1xuICBiYWNrZ3JvdW5kLXBvc2l0aW9uOiA4cHggNTAlO1xuICBiYWNrZ3JvdW5kLXNpemU6IDI0cHg7XG4gIGJvcmRlci1jb2xvcjogI0ZGNDEzNjtcbiAgcGFkZGluZy1sZWZ0OiA0MHB4O1xufVxuXG4uY3RjdC1mb3JtLXdyYXBwZXIgLmN0Y3QtZm9ybTphZnRlciB7XG4gIGNsZWFyOiBib3RoO1xuICBjb250ZW50OiBcIlwiO1xuICBkaXNwbGF5OiB0YWJsZTtcbn1cblxuLmN0Y3QtZm9ybS13cmFwcGVyIC5jdGN0LWZvcm0gYWJiciB7XG4gIGJvcmRlcjogbm9uZTtcbiAgY29sb3I6ICNGRjQxMzY7XG4gIGZvbnQtc2l6ZTogMC45ZW07XG59XG5cbi5jdGN0LWZvcm0td3JhcHBlciAuY3RjdC1pbnB1dC1jb250YWluZXIgbGFiZWwge1xuICBjb2xvcjogI2FhYTtcbiAgZm9udC1zaXplOiAwLjhlbTtcbn1cblxuLmN0Y3QtZm9ybS13cmFwcGVyIC5jdGN0LWZpZWxkLWVycm9yIHtcbiAgY29sb3I6ICNGRjQxMzY7XG59XG5cbi5jdGN0LXR3ZW50eWZvdXJ0ZWVuIC5jdGN0LWZvcm0tZmllbGQgaW5wdXQge1xuICB3aWR0aDogMTAwJTtcbn1cbiJdfQ== */
assets/css/style.min.css CHANGED
@@ -1 +1 @@
1
- .ctct-form-wrapper .ctct-button{font-size:.9em}.ctct-form-wrapper .ctct-message{border:1px solid;padding:1em}.ctct-form-wrapper .error{background-color:rgba(255,65,54,.02);border-color:#ff4136;color:#cf0b00}.ctct-form-wrapper .success{background-color:rgba(46,204,64,.02);border-color:#2ecc40;color:#1b7926}.ctct-form-wrapper .ctct-form-field{margin:0 0 1em}.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:url(../images/check_circle.svg) no-repeat;background-position:8px 50%;background-size:24px;border-color:#2ecc40;padding-left:40px}.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: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:.85em;font-style:italic}.ctct-form-wrapper input.ctct-invalid{background: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-form:after{clear:both;content:"";display:table}.ctct-form-wrapper .ctct-form abbr{border:none;color:#ff4136;font-size:.9em}.ctct-form-wrapper .ctct-input-container label{color:#aaa;font-size:.8em}.ctct-form-wrapper .ctct-field-error{color:#ff4136}@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}}
1
+ .ctct-form-wrapper .ctct-button{font-size:.9em}.ctct-form-wrapper .ctct-message{border:1px solid;padding:1em}.ctct-form-wrapper .error{background-color:rgba(255,65,54,.02);border-color:#ff4136;color:#cf0b00}.ctct-form-wrapper .success{background-color:rgba(46,204,64,.02);border-color:#2ecc40;color:#1b7926}.ctct-form-wrapper .ctct-form-field{margin:0 0 1em}.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:url(../images/check_circle.svg) no-repeat;background-position:8px 50%;background-size:24px;border-color:#2ecc40;padding-left:40px}.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: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:.85em;font-style:italic}.ctct-form-wrapper input.ctct-invalid{background: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-form:after{clear:both;content:"";display:table}.ctct-form-wrapper .ctct-form abbr{border:none;color:#ff4136;font-size:.9em}.ctct-form-wrapper .ctct-input-container label{color:#aaa;font-size:.8em}.ctct-form-wrapper .ctct-field-error{color:#ff4136}.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}}
assets/images/ctct-admin-notice-logo.png ADDED
Binary file
assets/js/ctct-plugin-admin.js CHANGED
@@ -1,3 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  window.CTCTBuilder = {};
2
  ( function( window, $, that ) {
3
 
@@ -97,7 +171,7 @@ window.CTCTBuilder = {};
97
  $( document ).on( 'cmb2_add_row', function( newRow ) {
98
 
99
  // Automatically set new rows to be 'custom' field type
100
- $( '#custom_fields_group_repeat .postbox' ).last().find( '.map select' ).val( 'custom' );
101
 
102
  // Trigger bind events again for our selects, as well as our field changes
103
  that.modifyFields();
@@ -143,7 +217,8 @@ window.CTCTBuilder = {};
143
  var $map = $( $field_parent ).find( '.map select option:selected' );
144
  var $mapName = $map.text();
145
  var $fieldTitle = $( this ).find( 'h3' );
146
- var $labelField = $( this ).find( "input[name*='_ctct_field_label']" )
 
147
 
148
  // Set our field row to be the name of the selected option
149
  $fieldTitle.text( $mapName );
@@ -182,8 +257,20 @@ window.CTCTBuilder = {};
182
  // and the remove button
183
  $button.show();
184
  }
 
 
 
 
 
 
 
 
 
 
 
 
185
  });
186
- }
187
 
188
  // Go through all dropdowns, and remove used options
189
  that.removeDuplicateMappings = function() {
@@ -291,6 +378,69 @@ window.CTCTModal = {};
291
 
292
  })( window, jQuery, window.CTCTModal );
293
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
294
  window.CTCT_OptIns = {};
295
  ( function( window, $, app ) {
296
 
1
+ window.CTCTAJAX = {};
2
+ ( function( window, $, that ) {
3
+
4
+ // Constructor.
5
+ that.init = function() {
6
+ // Trigger any field modifications we need to do
7
+ that.handleOptinAJAX();
8
+ }
9
+
10
+ // We need to manipulate our form builder a bit. We do this here.
11
+ that.handleOptinAJAX = function() {
12
+ $('#ctct_admin_notice_tracking_optin').on('click',function(e){
13
+ var ctct_optin_ajax = {
14
+ 'action': 'constant_contact_optin_ajax_handler',
15
+ 'optin': ($(this).is(':checked')) ? 'on' : 'off'
16
+ }
17
+
18
+ $.ajax({
19
+ url : ajaxurl,
20
+ data : ctct_optin_ajax,
21
+ dataType: 'json',
22
+ success : function (response) {},
23
+ error: function(x, t, m){
24
+ if (window.console) {
25
+ console.log([t, m]);
26
+ }
27
+ }
28
+ });
29
+ $('#ctct-privacy-modal').toggleClass('ctct-modal-open');
30
+ });
31
+
32
+ $('#_ctct_data_tracking').on('click', function(e) {
33
+ $('#ctct-privacy-modal').toggleClass('ctct-modal-open');
34
+ });
35
+
36
+ $('.ctct-modal-close').on('click', function(e){
37
+ if( $('#_ctct_data_tracking').is(':checked')){
38
+ $('#_ctct_data_tracking').attr('checked', false);
39
+ }
40
+ });
41
+
42
+ $('#ctct-modal-footer-privacy a').on('click',function(e){
43
+ var ctct_privacy_ajax = {
44
+ 'action': 'constant_contact_privacy_ajax_handler',
45
+ 'privacy_agree' : $(this).attr('data-agree')
46
+ }
47
+
48
+ $.ajax({
49
+ url : ajaxurl,
50
+ data : ctct_privacy_ajax,
51
+ dataType: 'json',
52
+ success : function (response) {
53
+ $('#ctct-privacy-modal').toggleClass('ctct-modal-open');
54
+ if( 'false' === ctct_privacy_ajax.privacy_agree ) {
55
+ if ($('#_ctct_data_tracking').is(':checked')) {
56
+ $('#_ctct_data_tracking').attr('checked', false);
57
+ }
58
+ }
59
+ },
60
+ error : function (x, t, m) {
61
+ if (window.console) {
62
+ console.log([t, m]);
63
+ }
64
+ }
65
+ });
66
+ });
67
+
68
+ };
69
+
70
+ // Engage!
71
+ $( that.init );
72
+
73
+ })( window, jQuery, window.CTCTAJAX );
74
+
75
  window.CTCTBuilder = {};
76
  ( function( window, $, that ) {
77
 
171
  $( document ).on( 'cmb2_add_row', function( newRow ) {
172
 
173
  // Automatically set new rows to be 'custom' field type
174
+ $( '#custom_fields_group_repeat .postbox' ).last().find( '.map select' ).val( 'none' );
175
 
176
  // Trigger bind events again for our selects, as well as our field changes
177
  that.modifyFields();
217
  var $map = $( $field_parent ).find( '.map select option:selected' );
218
  var $mapName = $map.text();
219
  var $fieldTitle = $( this ).find( 'h3' );
220
+ var $labelField = $( this ).find( "input[name*='_ctct_field_label']" );
221
+ var $descField = $( this ).find( "input[name*='_ctct_field_desc']" );
222
 
223
  // Set our field row to be the name of the selected option
224
  $fieldTitle.text( $mapName );
257
  // and the remove button
258
  $button.show();
259
  }
260
+
261
+ // Set the placeholder text if there's something to set.
262
+ if ( window.ctct_admin_placeholders ) {
263
+ var placeholder = window.ctct_admin_placeholders[ $( value ).find( 'select' ).val() ];
264
+
265
+ // If we have a valid placeholder, display it or try the fallback.
266
+ if ( placeholder && placeholder.length && $descField.length ) {
267
+ $descField.attr( 'placeholder', 'Example: ' + placeholder );
268
+ } else if( window.ctct_admin_placeholders.default ) {
269
+ $descField.attr( 'placeholder', window.ctct_admin_placeholders.default );
270
+ }
271
+ }
272
  });
273
+ };
274
 
275
  // Go through all dropdowns, and remove used options
276
  that.removeDuplicateMappings = function() {
378
 
379
  })( window, jQuery, window.CTCTModal );
380
 
381
+ window.CTCTNewsletter = {};
382
+ (function (window, $, app) {
383
+
384
+ // Constructor
385
+ app.init = function () {
386
+ app.submitNewsletter();
387
+ };
388
+
389
+ // Engage
390
+ $(app.init);
391
+
392
+ app.submitNewsletter = function() {
393
+ // Connect page.
394
+ $('.ctct-body #subscribe').on('submit', function (event) {
395
+ event.preventDefault();
396
+ console.log('connect');
397
+ var $ctctNewsWrapper = $("#subscribe .ctct-call-to-action"),
398
+ ctctNewsForm = $(".ctct-body #subscribe")[0];
399
+
400
+ var ctctEmailField = $(".ctct-call-to-action input[type='text']")[0],
401
+ aprimoEndpoint = event.target.action;
402
+
403
+ if (ctctEmailField.validity.valid === true) {
404
+ $("<iframe>", {
405
+ "src" : aprimoEndpoint + "?" + $(ctctNewsForm).serialize(),
406
+ "height": 0,
407
+ "width" : 0,
408
+ "style" : "display: none;"
409
+ }).appendTo($ctctNewsWrapper);
410
+
411
+ $('#subbutton').val('Thanks for signing up').css({'background-color':'rgb(1, 128, 0)','color':'rgb(255,255,255)'});
412
+ $('#subscribe .ctct-call-to-action-text').css({'width':'70%'});
413
+ } else {
414
+ $('#subbutton').val('Error occurred');
415
+ }
416
+ });
417
+
418
+ // About page.
419
+ $('.ctct-section #subscribe').on('submit', function (event) {
420
+ event.preventDefault();
421
+
422
+ var $ctctNewsWrapper = $(".section-marketing-tips"),
423
+ ctctNewsForm = $(".ctct-section #subscribe")[0];
424
+
425
+ var ctctEmailField = $(".ctct-section #subscribe input[type='text']")[0],
426
+ aprimoEndpoint = event.target.action;
427
+
428
+ if (ctctEmailField.validity.valid === true) {
429
+ $("<iframe>", {
430
+ "src" : aprimoEndpoint + "?" + $(ctctNewsForm).serialize(),
431
+ "height": 0,
432
+ "width" : 0,
433
+ "style" : "display: none;"
434
+ }).appendTo($ctctNewsWrapper);
435
+ $('#subbutton').val('Thanks for signing up').css({'background-color':'rgb(1, 128, 0)'});
436
+ } else {
437
+ $('#subbutton').val('Error occurred');
438
+ }
439
+ });
440
+ }
441
+
442
+ })(window, jQuery, window.CTCTNewsletter);
443
+
444
  window.CTCT_OptIns = {};
445
  ( function( window, $, app ) {
446
 
assets/js/ctct-plugin-admin.min.js CHANGED
@@ -1 +1 @@
1
- window.CTCTBuilder={},function(t,n,e){e.init=function(){n("#cmb2-metabox-ctct_2_fields_metabox option[value='email']:selected").length&&n("#ctct-no-email-error").remove(),e.cache(),e.bindEvents(),e.selectBinds(),e.modifyFields(),n("#ctct_0_description_metabox h2.hndle").removeClass("ui-sortable-handle, hndle"),n("head").append('<style> #cmb2-metabox-ctct_2_fields_metabox a.move-up::after { content: "'+ctct_texts.move_up+'" } #cmb2-metabox-ctct_2_fields_metabox a.move-down::after { content: "'+ctct_texts.move_down+'" }</style>')},e.cache=function(){e.$c={window:n(t),body:n("body")},e.isLeaveWarningBound=!1},e.bindLeaveWarning=function(){e.isLeaveWarningBound||(n(t).bind("beforeunload",function(){return ctct_texts.leavewarning}),e.isLeaveWarningBound=!0)},e.unbindLeaveWarning=function(){n(t).unbind("beforeunload")},e.bindEvents=function(){n("#post").submit(function(){n(".ctct-email-disabled").removeClass("disabled").prop("disabled",!1),e.unbindLeaveWarning()}),n(".cmb2-wrap input, .cmb2-wrap textarea").on("input",function(){e.bindLeaveWarning()}),n(document).on("cmb2_shift_rows_complete",function(){e.modifyFields(),e.bindLeaveWarning(),e.removeDuplicateMappings()}),n(document).on("cmb2_add_row",function(t){n("#custom_fields_group_repeat .postbox").last().find(".map select").val("custom"),e.modifyFields(),e.selectBinds(),e.removeDuplicateMappings()}),e.removeDuplicateMappings()},e.selectBinds=function(){n("#cmb2-metabox-ctct_2_fields_metabox .cmb2_select").change(function(){e.modifyFields(),e.removeDuplicateMappings(),e.bindLeaveWarning()})},e.modifyFields=function(){var t=!1;n("#cmb2-metabox-ctct_2_fields_metabox #custom_fields_group_repeat .cmb-repeatable-grouping").each(function(e,i){var c=n(this).find(".cmb-field-list"),o=n(c).find(".cmb-remove-group-row"),d=n(c).find(".required input[type=checkbox]"),a=d.closest(".cmb-row"),s=n(c).find(".map select option:selected"),l=s.text(),m=n(this).find("h3"),u=n(this).find("input[name*='_ctct_field_label']");m.text(l),(0===u.val().length||u.hasClass("ctct-label-filled"))&&u.val(l).addClass("ctct-label-filled"),t||"email"!==n(s).val()?(n(i).find("select").removeClass("disabled ctct-email-disabled").prop("disabled",!1),a.show(),o.show()):(t=!0,d.prop("checked",!0),n(i).find("select").addClass("disabled ctct-email-disabled").prop("disabled",!0),a.hide(),o.hide())})},e.removeDuplicateMappings=function(){var t=[],e="#cmb2-metabox-ctct_2_fields_metabox #custom_fields_group_repeat .cmb-repeatable-grouping select",i=n(e);i.each(function(e,i){t.push(n(i).val())}),i.children().show(),t.forEach(function(t){"custom_text_area"!=t&&"custom"!=t&&n(e+" option[value="+t+"]:not( :selected )").hide()})},n(e.init)}(window,jQuery,window.CTCTBuilder),window.CTCTForms={},function(t,n,e){e.init=function(){e.cache(),e.bindEvents()},e.cache=function(){e.$c={window:n(t),body:n("body"),disconnect:".ctct-disconnect"}},e.bindEvents=function(){n(e.$c.disconnect).on("click",function(t){confirm(ctct_texts.disconnectconfirm)})},n(e.init)}(window,jQuery,window.CTCTForms),window.CTCTModal={},function(t,n,e){e.init=function(){e.cache(),e.bindEvents()},e.cache=function(){e.$c={window:n(t),modalSelector:n(".ctct-modal"),modalClose:n(".ctct-modal-close")}},e.bindEvents=function(){e.$c.modalClose.click(function(){e.$c.modalSelector.removeClass("ctct-modal-open"),jQuery.ajax({type:"post",dataType:"json",url:ajaxurl,data:{action:"ctct_dismiss_first_modal",ctct_is_dismissed:"true"}})})},n(e.init)}(window,jQuery,window.CTCTModal),window.CTCT_OptIns={},function(t,n,e){e.init=function(){e.cache(),e.bindEvents()},e.cache=function(){e.$c={optin_no_conn:n("#cmb2-metabox-ctct_1_optin_metabox #_ctct_opt_in_not_connected"),list:n("#cmb2-metabox-ctct_1_optin_metabox #_ctct_list"),optin:n("#cmb2-metabox-ctct_1_optin_metabox .cmb2-id--ctct-opt-in"),instruct:n("#cmb2-metabox-ctct_1_optin_metabox .cmb2-id--ctct-opt-in-instructions")}},e.bindEvents=function(){e.$c.optin_no_conn.length&&(e.toggleNoConnectionFields(),e.$c.optin_no_conn.change(function(){e.toggleNoConnectionFields()})),e.$c.list.length&&(e.toggleConnectionFields(),e.$c.list.change(function(){e.toggleConnectionFields()}))},e.toggleNoConnectionFields=function(){e.$c.optin_no_conn.prop("checked")?e.$c.instruct.slideDown():e.$c.instruct.slideUp()},e.toggleConnectionFields=function(){""!=e.$c.list.val()?(e.$c.optin.slideDown(),e.$c.instruct.slideDown()):(e.$c.optin.slideUp(),e.$c.instruct.slideUp())},n(e.init)}(window,jQuery,window.CTCT_OptIns);
1
+ window.CTCTAJAX={},function(t,n,c){c.init=function(){c.handleOptinAJAX()},c.handleOptinAJAX=function(){n("#ctct_admin_notice_tracking_optin").on("click",function(c){var e={action:"constant_contact_optin_ajax_handler",optin:n(this).is(":checked")?"on":"off"};n.ajax({url:ajaxurl,data:e,dataType:"json",success:function(t){},error:function(n,c,e){t.console&&console.log([c,e])}}),n("#ctct-privacy-modal").toggleClass("ctct-modal-open")}),n("#_ctct_data_tracking").on("click",function(t){n("#ctct-privacy-modal").toggleClass("ctct-modal-open")}),n(".ctct-modal-close").on("click",function(t){n("#_ctct_data_tracking").is(":checked")&&n("#_ctct_data_tracking").attr("checked",!1)}),n("#ctct-modal-footer-privacy a").on("click",function(c){var e={action:"constant_contact_privacy_ajax_handler",privacy_agree:n(this).attr("data-agree")};n.ajax({url:ajaxurl,data:e,dataType:"json",success:function(t){n("#ctct-privacy-modal").toggleClass("ctct-modal-open"),"false"===e.privacy_agree&&n("#_ctct_data_tracking").is(":checked")&&n("#_ctct_data_tracking").attr("checked",!1)},error:function(n,c,e){t.console&&console.log([c,e])}})})},n(c.init)}(window,jQuery,window.CTCTAJAX),window.CTCTBuilder={},function(t,n,c){c.init=function(){n("#cmb2-metabox-ctct_2_fields_metabox option[value='email']:selected").length&&n("#ctct-no-email-error").remove(),c.cache(),c.bindEvents(),c.selectBinds(),c.modifyFields(),n("#ctct_0_description_metabox h2.hndle").removeClass("ui-sortable-handle, hndle"),n("head").append('<style> #cmb2-metabox-ctct_2_fields_metabox a.move-up::after { content: "'+ctct_texts.move_up+'" } #cmb2-metabox-ctct_2_fields_metabox a.move-down::after { content: "'+ctct_texts.move_down+'" }</style>')},c.cache=function(){c.$c={window:n(t),body:n("body")},c.isLeaveWarningBound=!1},c.bindLeaveWarning=function(){c.isLeaveWarningBound||(n(t).bind("beforeunload",function(){return ctct_texts.leavewarning}),c.isLeaveWarningBound=!0)},c.unbindLeaveWarning=function(){n(t).unbind("beforeunload")},c.bindEvents=function(){n("#post").submit(function(){n(".ctct-email-disabled").removeClass("disabled").prop("disabled",!1),c.unbindLeaveWarning()}),n(".cmb2-wrap input, .cmb2-wrap textarea").on("input",function(){c.bindLeaveWarning()}),n(document).on("cmb2_shift_rows_complete",function(){c.modifyFields(),c.bindLeaveWarning(),c.removeDuplicateMappings()}),n(document).on("cmb2_add_row",function(t){n("#custom_fields_group_repeat .postbox").last().find(".map select").val("none"),c.modifyFields(),c.selectBinds(),c.removeDuplicateMappings()}),c.removeDuplicateMappings()},c.selectBinds=function(){n("#cmb2-metabox-ctct_2_fields_metabox .cmb2_select").change(function(){c.modifyFields(),c.removeDuplicateMappings(),c.bindLeaveWarning()})},c.modifyFields=function(){var c=!1;n("#cmb2-metabox-ctct_2_fields_metabox #custom_fields_group_repeat .cmb-repeatable-grouping").each(function(e,i){var o=n(this).find(".cmb-field-list"),a=n(o).find(".cmb-remove-group-row"),s=n(o).find(".required input[type=checkbox]"),d=s.closest(".cmb-row"),l=n(o).find(".map select option:selected"),r=l.text(),u=n(this).find("h3"),_=n(this).find("input[name*='_ctct_field_label']"),p=n(this).find("input[name*='_ctct_field_desc']");if(u.text(r),(0===_.val().length||_.hasClass("ctct-label-filled"))&&_.val(r).addClass("ctct-label-filled"),c||"email"!==n(l).val()?(n(i).find("select").removeClass("disabled ctct-email-disabled").prop("disabled",!1),d.show(),a.show()):(c=!0,s.prop("checked",!0),n(i).find("select").addClass("disabled ctct-email-disabled").prop("disabled",!0),d.hide(),a.hide()),t.ctct_admin_placeholders){var m=t.ctct_admin_placeholders[n(i).find("select").val()];m&&m.length&&p.length?p.attr("placeholder","Example: "+m):t.ctct_admin_placeholders["default"]&&p.attr("placeholder",t.ctct_admin_placeholders["default"])}})},c.removeDuplicateMappings=function(){var t=[],c="#cmb2-metabox-ctct_2_fields_metabox #custom_fields_group_repeat .cmb-repeatable-grouping select",e=n(c);e.each(function(c,e){t.push(n(e).val())}),e.children().show(),t.forEach(function(t){"custom_text_area"!=t&&"custom"!=t&&n(c+" option[value="+t+"]:not( :selected )").hide()})},n(c.init)}(window,jQuery,window.CTCTBuilder),window.CTCTForms={},function(t,n,c){c.init=function(){c.cache(),c.bindEvents()},c.cache=function(){c.$c={window:n(t),body:n("body"),disconnect:".ctct-disconnect"}},c.bindEvents=function(){n(c.$c.disconnect).on("click",function(t){confirm(ctct_texts.disconnectconfirm)})},n(c.init)}(window,jQuery,window.CTCTForms),window.CTCTModal={},function(t,n,c){c.init=function(){c.cache(),c.bindEvents()},c.cache=function(){c.$c={window:n(t),modalSelector:n(".ctct-modal"),modalClose:n(".ctct-modal-close")}},c.bindEvents=function(){c.$c.modalClose.click(function(){c.$c.modalSelector.removeClass("ctct-modal-open"),jQuery.ajax({type:"post",dataType:"json",url:ajaxurl,data:{action:"ctct_dismiss_first_modal",ctct_is_dismissed:"true"}})})},n(c.init)}(window,jQuery,window.CTCTModal),window.CTCTNewsletter={},function(t,n,c){c.init=function(){c.submitNewsletter()},n(c.init),c.submitNewsletter=function(){n(".ctct-body #subscribe").on("submit",function(t){t.preventDefault(),console.log("connect");var c=n("#subscribe .ctct-call-to-action"),e=n(".ctct-body #subscribe")[0],i=n(".ctct-call-to-action input[type='text']")[0],o=t.target.action;i.validity.valid===!0?(n("<iframe>",{src:o+"?"+n(e).serialize(),height:0,width:0,style:"display: none;"}).appendTo(c),n("#subbutton").val("Thanks for signing up").css({"background-color":"rgb(1, 128, 0)",color:"rgb(255,255,255)"}),n("#subscribe .ctct-call-to-action-text").css({width:"70%"})):n("#subbutton").val("Error occurred")}),n(".ctct-section #subscribe").on("submit",function(t){t.preventDefault();var c=n(".section-marketing-tips"),e=n(".ctct-section #subscribe")[0],i=n(".ctct-section #subscribe input[type='text']")[0],o=t.target.action;i.validity.valid===!0?(n("<iframe>",{src:o+"?"+n(e).serialize(),height:0,width:0,style:"display: none;"}).appendTo(c),n("#subbutton").val("Thanks for signing up").css({"background-color":"rgb(1, 128, 0)"})):n("#subbutton").val("Error occurred")})}}(window,jQuery,window.CTCTNewsletter),window.CTCT_OptIns={},function(t,n,c){c.init=function(){c.cache(),c.bindEvents()},c.cache=function(){c.$c={optin_no_conn:n("#cmb2-metabox-ctct_1_optin_metabox #_ctct_opt_in_not_connected"),list:n("#cmb2-metabox-ctct_1_optin_metabox #_ctct_list"),optin:n("#cmb2-metabox-ctct_1_optin_metabox .cmb2-id--ctct-opt-in"),instruct:n("#cmb2-metabox-ctct_1_optin_metabox .cmb2-id--ctct-opt-in-instructions")}},c.bindEvents=function(){c.$c.optin_no_conn.length&&(c.toggleNoConnectionFields(),c.$c.optin_no_conn.change(function(){c.toggleNoConnectionFields()})),c.$c.list.length&&(c.toggleConnectionFields(),c.$c.list.change(function(){c.toggleConnectionFields()}))},c.toggleNoConnectionFields=function(){c.$c.optin_no_conn.prop("checked")?c.$c.instruct.slideDown():c.$c.instruct.slideUp()},c.toggleConnectionFields=function(){""!=c.$c.list.val()?(c.$c.optin.slideDown(),c.$c.instruct.slideDown()):(c.$c.optin.slideUp(),c.$c.instruct.slideUp())},n(c.init)}(window,jQuery,window.CTCT_OptIns);
assets/js/ctct-plugin-admin/ajax.js ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ window.CTCTAJAX = {};
2
+ ( function( window, $, that ) {
3
+
4
+ // Constructor.
5
+ that.init = function() {
6
+ // Trigger any field modifications we need to do
7
+ that.handleOptinAJAX();
8
+ }
9
+
10
+ // We need to manipulate our form builder a bit. We do this here.
11
+ that.handleOptinAJAX = function() {
12
+ $('#ctct_admin_notice_tracking_optin').on('click',function(e){
13
+ var ctct_optin_ajax = {
14
+ 'action': 'constant_contact_optin_ajax_handler',
15
+ 'optin': ($(this).is(':checked')) ? 'on' : 'off'
16
+ }
17
+
18
+ $.ajax({
19
+ url : ajaxurl,
20
+ data : ctct_optin_ajax,
21
+ dataType: 'json',
22
+ success : function (response) {},
23
+ error: function(x, t, m){
24
+ if (window.console) {
25
+ console.log([t, m]);
26
+ }
27
+ }
28
+ });
29
+ $('#ctct-privacy-modal').toggleClass('ctct-modal-open');
30
+ });
31
+
32
+ $('#_ctct_data_tracking').on('click', function(e) {
33
+ $('#ctct-privacy-modal').toggleClass('ctct-modal-open');
34
+ });
35
+
36
+ $('.ctct-modal-close').on('click', function(e){
37
+ if( $('#_ctct_data_tracking').is(':checked')){
38
+ $('#_ctct_data_tracking').attr('checked', false);
39
+ }
40
+ });
41
+
42
+ $('#ctct-modal-footer-privacy a').on('click',function(e){
43
+ var ctct_privacy_ajax = {
44
+ 'action': 'constant_contact_privacy_ajax_handler',
45
+ 'privacy_agree' : $(this).attr('data-agree')
46
+ }
47
+
48
+ $.ajax({
49
+ url : ajaxurl,
50
+ data : ctct_privacy_ajax,
51
+ dataType: 'json',
52
+ success : function (response) {
53
+ $('#ctct-privacy-modal').toggleClass('ctct-modal-open');
54
+ if( 'false' === ctct_privacy_ajax.privacy_agree ) {
55
+ if ($('#_ctct_data_tracking').is(':checked')) {
56
+ $('#_ctct_data_tracking').attr('checked', false);
57
+ }
58
+ }
59
+ },
60
+ error : function (x, t, m) {
61
+ if (window.console) {
62
+ console.log([t, m]);
63
+ }
64
+ }
65
+ });
66
+ });
67
+
68
+ };
69
+
70
+ // Engage!
71
+ $( that.init );
72
+
73
+ })( window, jQuery, window.CTCTAJAX );
assets/js/ctct-plugin-admin/builder.js CHANGED
@@ -97,7 +97,7 @@ window.CTCTBuilder = {};
97
  $( document ).on( 'cmb2_add_row', function( newRow ) {
98
 
99
  // Automatically set new rows to be 'custom' field type
100
- $( '#custom_fields_group_repeat .postbox' ).last().find( '.map select' ).val( 'custom' );
101
 
102
  // Trigger bind events again for our selects, as well as our field changes
103
  that.modifyFields();
@@ -143,7 +143,8 @@ window.CTCTBuilder = {};
143
  var $map = $( $field_parent ).find( '.map select option:selected' );
144
  var $mapName = $map.text();
145
  var $fieldTitle = $( this ).find( 'h3' );
146
- var $labelField = $( this ).find( "input[name*='_ctct_field_label']" )
 
147
 
148
  // Set our field row to be the name of the selected option
149
  $fieldTitle.text( $mapName );
@@ -182,8 +183,20 @@ window.CTCTBuilder = {};
182
  // and the remove button
183
  $button.show();
184
  }
 
 
 
 
 
 
 
 
 
 
 
 
185
  });
186
- }
187
 
188
  // Go through all dropdowns, and remove used options
189
  that.removeDuplicateMappings = function() {
97
  $( document ).on( 'cmb2_add_row', function( newRow ) {
98
 
99
  // Automatically set new rows to be 'custom' field type
100
+ $( '#custom_fields_group_repeat .postbox' ).last().find( '.map select' ).val( 'none' );
101
 
102
  // Trigger bind events again for our selects, as well as our field changes
103
  that.modifyFields();
143
  var $map = $( $field_parent ).find( '.map select option:selected' );
144
  var $mapName = $map.text();
145
  var $fieldTitle = $( this ).find( 'h3' );
146
+ var $labelField = $( this ).find( "input[name*='_ctct_field_label']" );
147
+ var $descField = $( this ).find( "input[name*='_ctct_field_desc']" );
148
 
149
  // Set our field row to be the name of the selected option
150
  $fieldTitle.text( $mapName );
183
  // and the remove button
184
  $button.show();
185
  }
186
+
187
+ // Set the placeholder text if there's something to set.
188
+ if ( window.ctct_admin_placeholders ) {
189
+ var placeholder = window.ctct_admin_placeholders[ $( value ).find( 'select' ).val() ];
190
+
191
+ // If we have a valid placeholder, display it or try the fallback.
192
+ if ( placeholder && placeholder.length && $descField.length ) {
193
+ $descField.attr( 'placeholder', 'Example: ' + placeholder );
194
+ } else if( window.ctct_admin_placeholders.default ) {
195
+ $descField.attr( 'placeholder', window.ctct_admin_placeholders.default );
196
+ }
197
+ }
198
  });
199
+ };
200
 
201
  // Go through all dropdowns, and remove used options
202
  that.removeDuplicateMappings = function() {
assets/js/ctct-plugin-admin/newsletter.js ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ window.CTCTNewsletter = {};
2
+ (function (window, $, app) {
3
+
4
+ // Constructor
5
+ app.init = function () {
6
+ app.submitNewsletter();
7
+ };
8
+
9
+ // Engage
10
+ $(app.init);
11
+
12
+ app.submitNewsletter = function() {
13
+ // Connect page.
14
+ $('.ctct-body #subscribe').on('submit', function (event) {
15
+ event.preventDefault();
16
+ console.log('connect');
17
+ var $ctctNewsWrapper = $("#subscribe .ctct-call-to-action"),
18
+ ctctNewsForm = $(".ctct-body #subscribe")[0];
19
+
20
+ var ctctEmailField = $(".ctct-call-to-action input[type='text']")[0],
21
+ aprimoEndpoint = event.target.action;
22
+
23
+ if (ctctEmailField.validity.valid === true) {
24
+ $("<iframe>", {
25
+ "src" : aprimoEndpoint + "?" + $(ctctNewsForm).serialize(),
26
+ "height": 0,
27
+ "width" : 0,
28
+ "style" : "display: none;"
29
+ }).appendTo($ctctNewsWrapper);
30
+
31
+ $('#subbutton').val('Thanks for signing up').css({'background-color':'rgb(1, 128, 0)','color':'rgb(255,255,255)'});
32
+ $('#subscribe .ctct-call-to-action-text').css({'width':'70%'});
33
+ } else {
34
+ $('#subbutton').val('Error occurred');
35
+ }
36
+ });
37
+
38
+ // About page.
39
+ $('.ctct-section #subscribe').on('submit', function (event) {
40
+ event.preventDefault();
41
+
42
+ var $ctctNewsWrapper = $(".section-marketing-tips"),
43
+ ctctNewsForm = $(".ctct-section #subscribe")[0];
44
+
45
+ var ctctEmailField = $(".ctct-section #subscribe input[type='text']")[0],
46
+ aprimoEndpoint = event.target.action;
47
+
48
+ if (ctctEmailField.validity.valid === true) {
49
+ $("<iframe>", {
50
+ "src" : aprimoEndpoint + "?" + $(ctctNewsForm).serialize(),
51
+ "height": 0,
52
+ "width" : 0,
53
+ "style" : "display: none;"
54
+ }).appendTo($ctctNewsWrapper);
55
+ $('#subbutton').val('Thanks for signing up').css({'background-color':'rgb(1, 128, 0)'});
56
+ } else {
57
+ $('#subbutton').val('Error occurred');
58
+ }
59
+ });
60
+ }
61
+
62
+ })(window, jQuery, window.CTCTNewsletter);
assets/sass/_compatibility.scss ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ .ctct-twentyfourteen {
2
+ .ctct-form-field input {
3
+ width: 100%;
4
+ }
5
+ }
assets/sass/_modal.scss CHANGED
@@ -87,11 +87,21 @@
87
  text-align: center;
88
 
89
  p {
90
- color: $color-modal-header;
91
  font-size: 16px;
92
  margin-bottom: 0;
 
 
 
 
93
  } // p
94
 
 
 
 
 
 
 
95
  // Close "X" button.
96
  .ctct-modal-close {
97
  @include clearfix;
@@ -131,6 +141,49 @@
131
  color: $color-prussian-blue;
132
  text-decoration: underline;
133
  } // a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
134
  } // modal no thanks
135
 
136
  // The modal body container.
@@ -139,6 +192,10 @@
139
  padding: 15px;
140
  position: relative;
141
 
 
 
 
 
142
  .ctct-modal-left,
143
  .ctct-modal-right {
144
  float:left;
@@ -176,7 +233,9 @@
176
  font-style: italic;
177
  } // small
178
  } // left/right
179
-
 
 
180
  .ctct-modal-left {
181
  border-right: 1px solid $color-alt-silver;
182
 
87
  text-align: center;
88
 
89
  p {
90
+ color: $color-white;
91
  font-size: 16px;
92
  margin-bottom: 0;
93
+
94
+ .displayed-shortcode {
95
+ color: $color-modal-header;
96
+ }
97
  } // p
98
 
99
+ .ctct-logo {
100
+ img {
101
+ max-width: 75%;
102
+ }
103
+ }
104
+
105
  // Close "X" button.
106
  .ctct-modal-close {
107
  @include clearfix;
141
  color: $color-prussian-blue;
142
  text-decoration: underline;
143
  } // a
144
+ &.ctct-modal-footer-privacy a {
145
+ text-decoration: none;
146
+ }
147
+ .button {
148
+ border-radius: 4px;
149
+ color: $color-white;
150
+ font-size: 16px;
151
+ font-weight: 600;
152
+ height: auto;
153
+ line-height: 1;
154
+ margin-bottom: 10px;
155
+ min-width: 180px;
156
+ padding: 14px 30px;
157
+
158
+ &.no-bg {
159
+ border: none;
160
+ box-shadow: none;
161
+ color: $color-prussian-blue;
162
+ }
163
+
164
+ &.button-orange {
165
+ background-color: $color-chrome-yellow;
166
+ border: 1px solid darken($color-chrome-yellow, 10%);
167
+
168
+ &:hover,
169
+ &:focus {
170
+ background-color: darken($color-chrome-yellow, 10%);
171
+ }
172
+ }
173
+ // button orange
174
+
175
+ &.button-blue {
176
+ background-color: $color-prussian-blue;
177
+ border: 1px solid darken($color-prussian-blue, 10%);
178
+
179
+ &:hover,
180
+ &:focus {
181
+ background-color: darken($color-prussian-blue, 10%);
182
+ }
183
+ }
184
+ // button blue
185
+ }
186
+ // button
187
  } // modal no thanks
188
 
189
  // The modal body container.
192
  padding: 15px;
193
  position: relative;
194
 
195
+ &.ctct-privacy-modal-body {
196
+ overflow: scroll;
197
+ height: 350px;
198
+ }
199
  .ctct-modal-left,
200
  .ctct-modal-right {
201
  float:left;
233
  font-style: italic;
234
  } // small
235
  } // left/right
236
+ .now-what {
237
+ text-align: center;
238
+ }
239
  .ctct-modal-left {
240
  border-right: 1px solid $color-alt-silver;
241
 
assets/sass/admin-forms.scss CHANGED
@@ -115,3 +115,9 @@ body.post-type-ctct_forms #titlediv #title {
115
  width: 70%;
116
  }
117
  }
 
 
 
 
 
 
115
  width: 70%;
116
  }
117
  }
118
+
119
+ #ctct_option_metabox_settings {
120
+ span.cmb2-metabox-description {
121
+ color: rgb(68, 68, 68);
122
+ }
123
+ }
assets/sass/admin-global-no-connection.scss CHANGED
@@ -16,11 +16,55 @@
16
  text-align: center;
17
  width: 100%;
18
 
 
 
 
 
19
  @media screen and (max-width: 782px) {
20
  padding: 30px 30px 0;
21
  margin-left: -10px;
22
  }
23
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
  img {
25
  width: 100%;
26
  max-width: 400px;
@@ -38,10 +82,11 @@
38
  p {
39
  color: $color-modal-alt-text;
40
  font-size: 14.7px;
 
41
 
42
  &.ctct-description {
43
  font-size: 16px;
44
- margin-bottom: 15px;
45
  margin-top: 5px;
46
  } // ctct-description
47
 
@@ -49,7 +94,6 @@
49
  color: $color-light-silver;
50
  font-size: 13.3px;
51
  margin: 15px auto 0;
52
- max-width: 60%;
53
 
54
  @media screen and (max-width: 782px) {
55
  max-width: 100%;
@@ -60,6 +104,18 @@
60
  .ctct-body {
61
  @include clearfix;
62
 
 
 
 
 
 
 
 
 
 
 
 
 
63
  margin: 0 auto;
64
  max-width: 75%;
65
  overflow-y: hidden;
16
  text-align: center;
17
  width: 100%;
18
 
19
+ hr {
20
+ margin-bottom: 45px;
21
+ }
22
+
23
  @media screen and (max-width: 782px) {
24
  padding: 30px 30px 0;
25
  margin-left: -10px;
26
  }
27
 
28
+ .ctct-call-to-action {
29
+ margin-bottom: 45px;
30
+ overflow: hidden;
31
+ text-align: left;
32
+ width: 100%;
33
+ p {
34
+ float: left;
35
+ margin: 0;
36
+ }
37
+ a {
38
+ float: right;
39
+ text-align: center;
40
+ @media screen and (max-width: 782px) {
41
+ float: none;
42
+ }
43
+ }
44
+ .ctct-call-to-action-text {
45
+ a {
46
+ float: none;
47
+ }
48
+ small {
49
+ line-height: 1.2px;
50
+ }
51
+ }
52
+
53
+ #subbox {
54
+ height: 40px;
55
+ margin: 15px 0;
56
+ width: 50%;
57
+ }
58
+ #subbutton {
59
+ color: $color-prussian-blue;
60
+ float: right;
61
+
62
+ @media screen and (max-width: 782px) {
63
+ float: none;
64
+ }
65
+ }
66
+ }
67
+
68
  img {
69
  width: 100%;
70
  max-width: 400px;
82
  p {
83
  color: $color-modal-alt-text;
84
  font-size: 14.7px;
85
+ margin: 0;
86
 
87
  &.ctct-description {
88
  font-size: 16px;
89
+ margin-bottom: 50px;
90
  margin-top: 5px;
91
  } // ctct-description
92
 
94
  color: $color-light-silver;
95
  font-size: 13.3px;
96
  margin: 15px auto 0;
 
97
 
98
  @media screen and (max-width: 782px) {
99
  max-width: 100%;
104
  .ctct-body {
105
  @include clearfix;
106
 
107
+ .ctct-call-to-action-text {
108
+ float: left;
109
+ width: 75%;
110
+
111
+ @media screen and (max-width: 782px) {
112
+ width: 100%;
113
+ }
114
+
115
+ h3 {
116
+ margin-top: 0;
117
+ }
118
+ }
119
  margin: 0 auto;
120
  max-width: 75%;
121
  overflow-y: hidden;
assets/sass/admin-notices.scss CHANGED
@@ -23,3 +23,23 @@ a.ctct-notice-dismiss {
23
  margin: .5em;
24
  }
25
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
  margin: .5em;
24
  }
25
  }
26
+ .ctct-admin-notice {
27
+ &.updated {
28
+ border-left-color: rgb(26, 82, 133);
29
+ }
30
+ overflow: hidden;
31
+ > div {
32
+ float: left;
33
+ }
34
+ .admin-notice-message {
35
+ margin-left: 15px;
36
+ width: 80%;
37
+ h4 {
38
+ color: rgb(26, 82, 133);
39
+ margin: 0 0 10px;
40
+ }
41
+ > div {
42
+ float: left;
43
+ }
44
+ }
45
+ }
assets/sass/admin-pages.scss CHANGED
@@ -12,6 +12,10 @@
12
  padding: 0;
13
  }
14
 
 
 
 
 
15
  h1.about-header {
16
  color: $color-cc-blue;
17
  font-size: 26px;
@@ -188,11 +192,10 @@
188
  } // left side
189
 
190
  .plugin-badge {
191
- position: absolute;
192
- top: 10px;
193
- right: 0;
194
  max-height: 180px;
195
  max-width: 160px;
 
196
 
197
  @media screen and (max-width: 482px) {
198
  display: none;
@@ -289,3 +292,23 @@
289
 
290
  }
291
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  padding: 0;
13
  }
14
 
15
+ .ctct-section {
16
+ margin-bottom: 50px;
17
+ }
18
+
19
  h1.about-header {
20
  color: $color-cc-blue;
21
  font-size: 26px;
192
  } // left side
193
 
194
  .plugin-badge {
195
+ float: right;
 
 
196
  max-height: 180px;
197
  max-width: 160px;
198
+ margin-left: 40px;
199
 
200
  @media screen and (max-width: 482px) {
201
  display: none;
292
 
293
  }
294
  }
295
+ .section-try-us {
296
+ .ctct-bonus-points {
297
+ margin-bottom: 50px;
298
+ }
299
+ a {
300
+ &.button {
301
+ margin-right: 40px;
302
+ }
303
+ &.ctct-connect {
304
+ font-weight: bold;
305
+ }
306
+ }
307
+ }
308
+
309
+ .section-marketing-tips {
310
+ #subbox {
311
+ height: 40px;
312
+ width: 50%;
313
+ }
314
+ }
assets/sass/oath.scss CHANGED
@@ -31,6 +31,10 @@
31
  font-size: 16px;
32
  } // p
33
 
 
 
 
 
34
  .ctct-body {
35
  @include clearfix;
36
 
31
  font-size: 16px;
32
  } // p
33
 
34
+ .ctct-description {
35
+ text-align: left;
36
+ }
37
+
38
  .ctct-body {
39
  @include clearfix;
40
 
assets/sass/style.scss CHANGED
@@ -9,4 +9,6 @@
9
  @import "layout";
10
 
11
  @import "inputs";
12
- @import "forms";
 
 
9
  @import "layout";
10
 
11
  @import "inputs";
12
+ @import "forms";
13
+
14
+ @import "compatibility";
assets/wporg/banner-1544x500.jpg DELETED
Binary file
assets/wporg/banner-772x250.jpg DELETED
Binary file
assets/wporg/icon-128x128.png DELETED
Binary file
assets/wporg/icon-256x256.png DELETED
Binary file
assets/wporg/screenshot-1.png DELETED
Binary file
assets/wporg/screenshot-2.png DELETED
Binary file
assets/wporg/screenshot-3.png DELETED
Binary file
assets/wporg/screenshot-4.png DELETED
Binary file
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.1.1
16
  * Author: Constant Contact
17
  * Author URI: https://www.constantcontact.com
18
  * License: GPLv3
@@ -77,7 +77,7 @@ class Constant_Contact {
77
  * @var string
78
  * @since 1.0.0
79
  */
80
- const VERSION = '1.1.1';
81
 
82
  /**
83
  * URL of plugin directory
@@ -202,10 +202,10 @@ class Constant_Contact {
202
 
203
  // Set up some helper properties.
204
  $this->basename = plugin_basename( __FILE__ );
205
- $this->url = plugin_dir_url( __FILE__ );
206
- $this->path = plugin_dir_path( __FILE__ );
207
 
208
- if ( version_compare( PHP_VERSION, '5.4.0', '<' ) ) {
209
  add_action( 'admin_notices', array( $this, 'minimum_version' ) );
210
  return;
211
  }
@@ -229,7 +229,7 @@ class Constant_Contact {
229
  * @since 1.0.1
230
  */
231
  public function minimum_version() {
232
- echo '<div id="message" class="notice is-dismissible error"><p>' . esc_html__( 'This plugin requires PHP 5.4 or higher. Your hosting provider or website administrator should be able to assist in updating your PHP version.', 'constant-contact-forms' ) . '</p></div>';
233
  }
234
 
235
  /**
@@ -256,6 +256,7 @@ class Constant_Contact {
256
  $this->notification_content = new ConstantContact_Notification_Content( $this );
257
  $this->authserver = new ConstantContact_Middleware( $this );
258
  $this->updates = new ConstantContact_Updates( $this );
 
259
  }
260
 
261
  /**
@@ -277,10 +278,15 @@ class Constant_Contact {
277
  */
278
  public function hooks() {
279
 
 
 
 
 
280
  // Hook in our older includes and our init method.
281
  add_action( 'init', array( $this, 'init' ) );
282
  add_action( 'init', array( $this, 'includes' ), 5 );
283
  add_action( 'widgets_init', array( $this, 'widgets' ) );
 
284
 
285
  // Our vendor files will do a check for ISSSL, so we want to set it to be that.
286
  // See Guzzle for more info and usage of this.
@@ -322,6 +328,17 @@ class Constant_Contact {
322
 
323
  }
324
 
 
 
 
 
 
 
 
 
 
 
 
325
  /**
326
  * Init hooks
327
  *
@@ -566,6 +583,34 @@ class Constant_Contact {
566
 
567
  return false;
568
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
569
  }
570
  add_action( 'plugins_loaded', array( constant_contact(), 'hooks' ) );
571
 
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.2.0
16
  * Author: Constant Contact
17
  * Author URI: https://www.constantcontact.com
18
  * License: GPLv3
77
  * @var string
78
  * @since 1.0.0
79
  */
80
+ const VERSION = '1.2.0';
81
 
82
  /**
83
  * URL of plugin directory
202
 
203
  // Set up some helper properties.
204
  $this->basename = plugin_basename( __FILE__ );
205
+ $this->url = plugin_dir_url( __FILE__ );
206
+ $this->path = plugin_dir_path( __FILE__ );
207
 
208
+ if ( ! $this->meets_php_requirements() ) {
209
  add_action( 'admin_notices', array( $this, 'minimum_version' ) );
210
  return;
211
  }
229
  * @since 1.0.1
230
  */
231
  public function minimum_version() {
232
+ echo '<div id="message" class="notice is-dismissible error"><p>' . esc_html__( 'Constant Contact Forms requires PHP 5.4 or higher. Your hosting provider or website administrator should be able to assist in updating your PHP version.', 'constant-contact-forms' ) . '</p></div>';
233
  }
234
 
235
  /**
256
  $this->notification_content = new ConstantContact_Notification_Content( $this );
257
  $this->authserver = new ConstantContact_Middleware( $this );
258
  $this->updates = new ConstantContact_Updates( $this );
259
+ $this->optin = new ConstantContact_Optin( $this );
260
  }
261
 
262
  /**
278
  */
279
  public function hooks() {
280
 
281
+ if ( ! $this->meets_php_requirements() ) {
282
+ add_action( 'admin_notices', array( $this, 'minimum_version' ) );
283
+ return;
284
+ }
285
  // Hook in our older includes and our init method.
286
  add_action( 'init', array( $this, 'init' ) );
287
  add_action( 'init', array( $this, 'includes' ), 5 );
288
  add_action( 'widgets_init', array( $this, 'widgets' ) );
289
+ add_filter( 'body_class', array( $this, 'body_classes' ) );
290
 
291
  // Our vendor files will do a check for ISSSL, so we want to set it to be that.
292
  // See Guzzle for more info and usage of this.
328
 
329
  }
330
 
331
+ /**
332
+ * Whether or not we meet our minimal PHP requirements.
333
+ *
334
+ * @since 1.2.0
335
+ *
336
+ * @return mixed
337
+ */
338
+ public function meets_php_requirements() {
339
+ return ( version_compare( PHP_VERSION, '5.4.0', '>=' ) );
340
+ }
341
+
342
  /**
343
  * Init hooks
344
  *
583
 
584
  return false;
585
  }
586
+
587
+ public function body_classes( $classes = array() ) {
588
+ $theme = wp_get_theme()->template;
589
+ $classes[] = "ctct-{$theme}"; //Prefixing for user knowledge of source
590
+
591
+ return $classes;
592
+ }
593
+
594
+ public function is_constant_contact() {
595
+ if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
596
+ return false;
597
+ }
598
+ if ( ! is_admin() || empty( $_GET ) ) {
599
+ return false;
600
+ }
601
+
602
+ if (
603
+ isset( $_GET['post_type'] ) &&
604
+ in_array(
605
+ $_GET['post_type'],
606
+ array( 'ctct_forms', 'ctct_lists' )
607
+ )
608
+ ) {
609
+ return true;
610
+ }
611
+
612
+ return false;
613
+ }
614
  }
615
  add_action( 'plugins_loaded', array( constant_contact(), 'hooks' ) );
616
 
includes/class-admin-pages.php CHANGED
@@ -41,7 +41,7 @@ class ConstantContact_Admin_Pages {
41
  public function hooks() {
42
 
43
  // Add our styles to the site.
44
- add_action( 'admin_init', array( $this, 'styles' ) );
45
  }
46
 
47
  /**
@@ -51,19 +51,21 @@ class ConstantContact_Admin_Pages {
51
  */
52
  public function styles() {
53
 
54
- wp_register_style(
55
  'constant-contact-forms',
56
  constant_contact()->url() . 'assets/css/admin-forms.css',
57
  array(),
58
  constant_contact()->version
59
  );
60
 
61
- wp_register_style(
62
  'constant_contact_admin_pages',
63
  constant_contact()->url() . 'assets/css/admin-pages.css',
64
  array(),
65
  constant_contact()->version
66
  );
 
 
67
  }
68
 
69
  /**
@@ -128,9 +130,6 @@ class ConstantContact_Admin_Pages {
128
  */
129
  public function help_page() {
130
 
131
- wp_enqueue_script( 'ctct_form' );
132
- wp_enqueue_style( 'constant_contact_admin_pages' );
133
-
134
  ?>
135
  <h1>
136
  <?php esc_attr_e( 'Help / FAQ', 'constant-contact-forms' ); ?>
@@ -217,8 +216,6 @@ class ConstantContact_Admin_Pages {
217
  */
218
  public function about_page() {
219
 
220
- wp_enqueue_style( 'constant_contact_admin_pages' );
221
-
222
  $proof = $auth_link = $new_link = '';
223
 
224
  // @codingStandardsIgnoreStart
@@ -230,6 +227,9 @@ class ConstantContact_Admin_Pages {
230
  $auth_link = constant_contact()->authserver->do_connect_url( $proof );
231
  $new_link = constant_contact()->authserver->do_signup_url( $proof );
232
 
 
 
 
233
  // @codingStandardsIgnoreStart
234
  }
235
  // @codingStandardsIgnoreEnd
@@ -237,42 +237,73 @@ class ConstantContact_Admin_Pages {
237
  ?>
238
  <div class="wrap about-wrap constant-contact-about">
239
  <div class="hide-overflow">
240
- <div class="left-side">
 
 
 
241
  <h1 class="about-header"><?php esc_attr_e( 'Constant Contact Forms', 'constant-contact-forms' ); ?></h1>
242
- <div class="about-text">
243
- <p>
244
- <?php echo wp_kses_post( __( 'This plugin makes it fast and easy to capture all kinds of visitor information right from your WordPress site—even if you don’t have a Constant Contact account.', 'constant-contact-forms' ) ); ?>
245
- </p>
246
- <p>
247
- <?php esc_attr_e( 'Whether you’re looking to collect email addresses, contact info, event sign-ups, or visitor feedback, you can customize your forms with data fields that work best for you.', 'constant-contact-forms' ); ?>
248
- <ul class="ctct-bonus-points">
249
- <li> <?php esc_attr_e( 'Quickly create different types of forms that are clear, simple, and mobile-optimized.', 'constant-contact-forms' ); ?></li>
250
- <li> <?php esc_attr_e( 'Choose forms that automatically select the theme and style of your WordPress site.', 'constant-contact-forms' ); ?></li>
251
- <li> <?php esc_attr_e( 'Customize the form data fields, so you can tailor the type of information you collect.', 'constant-contact-forms' ); ?></li>
252
- </ul>
253
- </p>
254
- <p>
255
- <?php esc_attr_e( 'Using your sign-up forms to collect email addresses? Email marketing is a great way to stay connected with visitors after they’ve left your site. And with an active Constant Contact account, every new subscriber you capture will be automatically added to your selected email lists. ', 'constant-contact-forms' ); ?>
256
- </p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
257
  <?php if ( $new_link ) { // If we have a link, then display the connect button. ?>
258
- <a href="<?php echo esc_url_raw( $new_link ); ?>" target="_blank" class="button button-orange" title="<?php esc_attr_e( 'Try us Free', 'constant-contact-forms' ); ?>"><?php esc_attr_e( 'Try us Free', 'constant-contact-forms' ); ?></a>
259
  <?php } ?>
260
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
261
  </div>
262
- <span class="plugin-badge">
263
- <img src="<?php echo esc_url_raw( $this->plugin->url . 'assets/images/icon.jpg' ); ?>">
264
- </span>
265
  <div class="clear"></div>
266
- <hr>
267
- <?php if ( $auth_link ) { // If we have a link, then display the connect button. ?>
268
- <h2><?php esc_attr_e( 'Already have a Constant Contact account?', 'constant-contact-forms' ); ?></h2>
269
- <a href="<?php echo esc_url_raw( $auth_link ); ?>" class="button button-blue ctct-connect">
270
- <?php esc_html_e( 'Connect the plugin', 'constant-contact-forms' ); ?>
271
- </a>
272
- <?php } ?>
273
  </div>
274
  <div class="headline-feature">
275
- <h3></h3>
276
  <div class="featured-image">
277
  <img src="<?php echo esc_url_raw( $this->plugin->url . 'assets/images/coffee-hero.jpg' ); ?>">
278
  <p class="featured-title c-text">
@@ -283,23 +314,21 @@ class ConstantContact_Admin_Pages {
283
  </p>
284
  </div>
285
  <p class="introduction c-text">
286
- <?php esc_attr_e( 'Email marketing is good for your business. $44-back-for-every-$1-spent kind of good.* And with the Constant Contact Forms plugin, you can easily add sign-up forms to your site so you can stay connected with visitors long after theyve left.', 'constant-contact-forms' ); ?>
287
  </p>
288
  <?php
289
  // Include our license link if we have it.
290
- if ( $license_link = $this->plugin->admin->get_admin_link( __( 'GPLv3 license', 'constant-contact-forms' ), 'license' ) ) { ?>
291
  <p class="c-text">
 
 
 
 
292
  <?php
293
- echo wp_kses_post( sprintf( __( 'This software is released under a modified %s.', 'constant-contact-forms' ), $license_link ) );
294
- ?>
295
- </p>
296
- <?php
297
- }
298
- ?>
299
- <h5>
300
- <?php esc_attr_e( '*Direct Marketing Association 2013 Statistical Fact Book', 'constant-contact-forms' ); ?>
301
- </h5>
302
- </p>
303
  <div class="clear"></div>
304
  </div>
305
  <hr>
41
  public function hooks() {
42
 
43
  // Add our styles to the site.
44
+ add_action( 'admin_enqueue_scripts', array( $this, 'styles' ) );
45
  }
46
 
47
  /**
51
  */
52
  public function styles() {
53
 
54
+ wp_enqueue_style(
55
  'constant-contact-forms',
56
  constant_contact()->url() . 'assets/css/admin-forms.css',
57
  array(),
58
  constant_contact()->version
59
  );
60
 
61
+ wp_enqueue_style(
62
  'constant_contact_admin_pages',
63
  constant_contact()->url() . 'assets/css/admin-pages.css',
64
  array(),
65
  constant_contact()->version
66
  );
67
+
68
+ wp_enqueue_script( 'ctct_form' );
69
  }
70
 
71
  /**
130
  */
131
  public function help_page() {
132
 
 
 
 
133
  ?>
134
  <h1>
135
  <?php esc_attr_e( 'Help / FAQ', 'constant-contact-forms' ); ?>
216
  */
217
  public function about_page() {
218
 
 
 
219
  $proof = $auth_link = $new_link = '';
220
 
221
  // @codingStandardsIgnoreStart
227
  $auth_link = constant_contact()->authserver->do_connect_url( $proof );
228
  $new_link = constant_contact()->authserver->do_signup_url( $proof );
229
 
230
+ $new_link = add_query_arg( array( 'rmc' => 'wp_about_try' ), $new_link );
231
+ $auth_link = add_query_arg( array( 'rmc' => 'wp_about_connect' ), $auth_link );
232
+
233
  // @codingStandardsIgnoreStart
234
  }
235
  // @codingStandardsIgnoreEnd
237
  ?>
238
  <div class="wrap about-wrap constant-contact-about">
239
  <div class="hide-overflow">
240
+ <div class="ctct-section section-about">
241
+ <span class="plugin-badge">
242
+ <img src="<?php echo esc_url_raw( $this->plugin->url . 'assets/images/icon.jpg' ); ?>">
243
+ </span>
244
  <h1 class="about-header"><?php esc_attr_e( 'Constant Contact Forms', 'constant-contact-forms' ); ?></h1>
245
+ <p>
246
+ <?php echo wp_kses_post( __( "This plugin makes it fast and easy to capture all kinds of visitor information right from your WordPress site—even if you don't have a Constant Contact account.", 'constant-contact-forms' ) ); ?>
247
+ </p>
248
+ <p>
249
+ <?php esc_attr_e( "Whether you're looking to collect email addresses, contact info, event sign-ups, or visitor feedback, you can customize your forms with data fields that work best for you.", 'constant-contact-forms' ); ?>
250
+ </p>
251
+ <ul class="ctct-bonus-points">
252
+ <li> <?php esc_attr_e( 'Quickly create different types of forms that are clear, simple, and mobile-optimized.', 'constant-contact-forms' ); ?></li>
253
+ <li> <?php esc_attr_e( 'Choose forms that automatically select the theme and style of your WordPress site.', 'constant-contact-forms' ); ?></li>
254
+ <li> <?php esc_attr_e( 'Customize the form data fields, so you can tailor the type of information you collect.', 'constant-contact-forms' ); ?></li>
255
+ </ul>
256
+ </div>
257
+
258
+ <div class="ctct-section section-try-us">
259
+ <div style="float: right;" class="ctct-video"><?php echo wp_oembed_get( 'https://www.youtube.com/watch?v=MhxtAlpZzJw', array( 'width' => 400 ) ); ?></div>
260
+ <h1 class="about-header">
261
+ <?php esc_html_e( 'Collecting email addresses with the plugin?', 'constant-contact-forms' ); ?>
262
+ <br /><?php esc_html_e( 'Turn those contacts into customers.', 'constant-contact-forms' ); ?>
263
+ </h1>
264
+ <p>
265
+ <?php esc_html_e( "Nurture your new contacts with a Constant Contact email marketing account even after they've left your website. Sign up for a 60-day trial account* and you can:", 'constant-contact-forms' ); ?>
266
+ </p>
267
+ <ul class="ctct-bonus-points">
268
+ <li><?php esc_html_e( 'Seamlessly add new contacts to mailing lists.', 'constant-contact-forms' ); ?></li>
269
+ <li><?php esc_html_e( 'Create and send professional emails.', 'constant-contact-forms' ); ?></li>
270
+ <li><?php esc_html_e( 'Get expert marketing help and support.', 'constant-contact-forms' ); ?></li>
271
+ </ul>
272
+
273
+ <p>
274
  <?php if ( $new_link ) { // If we have a link, then display the connect button. ?>
275
+ <a href="<?php echo esc_url_raw( $new_link ); ?>" target="_blank" class="button button-orange" title="<?php esc_attr_e( 'Try us Free', 'constant-contact-forms' ); ?>"><?php esc_attr_e( 'Try us Free', 'constant-contact-forms' ); ?></a>
276
  <?php } ?>
277
+ <?php if ( $auth_link ) { // If we have a link, then display the connect button. ?>
278
+ <?php esc_attr_e( 'Already have a Constant Contact account?', 'constant-contact-forms' ); ?>
279
+ <a href="<?php echo esc_url_raw( $auth_link ); ?>" class="ctct-connect">
280
+ <?php esc_html_e( 'Connect the plugin.', 'constant-contact-forms' ); ?>
281
+ </a>
282
+ <?php } ?>
283
+ </p>
284
+ <p><?php esc_html_e( 'NOTE: You can use the Constant Contact Form plugin without a Constant Contact account. All information collected by the forms will be individually emailed to your site admin.', 'constant-contact-forms' ); ?></p>
285
+ <hr>
286
+ </div>
287
+
288
+ <div class="ctct-section section-marketing-tips">
289
+ <?php /* @todo Move to its own function/method. */ ?>
290
+ <form id="subscribe" accept-charset="utf-8" action="https://a.constantcontact.com/subscriptions/coi_verify/.ashx" method="get" target="_blank">
291
+ <input class="button button-blue right" id="subbutton" type="submit" value="<?php esc_attr_e( 'Sign Up', 'constant-contact-forms' ); ?>">
292
+ <h1 class="about-header"><?php esc_html_e( 'Email marketing tips delivered to your inbox.', 'constant-contact-forms' ); ?></h1>
293
+ <p><?php esc_html_e( 'Ready to grow with email marketing? Subscribe now for the latest tips and industry best practices to create great-looking emails that work.', 'constant-contact-forms' ); ?></p>
294
+ <p><input id="subbox" maxlength="255" name="email" type="text" placeholder="<?php esc_attr_e( 'Enter your email address', 'constant-contact-forms' ); ?>">
295
+ </p>
296
+ <input name="sub" type="hidden" value="3">
297
+ <input name="method" type="hidden" value="JMML_SUB3_wp_plugin">
298
+
299
+ </form>
300
+ <small><?php printf( __( 'By submitting this form, you agree to receive periodic product announcements and account notifications from Constant Contact. Cancel these communications at any time by clicking the unsubscribe link in the footer of the actual email. Constant Contact, Inc, 1601 Trapelo Road, Waltham, MA 02451, %s', 'constant-contact-forms' ), '<a href="https://www.constantcontact.com">www.constantcontact.com</a>' ); ?></small>
301
+ <hr>
302
  </div>
303
+
 
 
304
  <div class="clear"></div>
 
 
 
 
 
 
 
305
  </div>
306
  <div class="headline-feature">
 
307
  <div class="featured-image">
308
  <img src="<?php echo esc_url_raw( $this->plugin->url . 'assets/images/coffee-hero.jpg' ); ?>">
309
  <p class="featured-title c-text">
314
  </p>
315
  </div>
316
  <p class="introduction c-text">
317
+ <?php esc_attr_e( "Email marketing is good for your business. $44-back-for-every-$1-spent kind of good.* And with the Constant Contact for WordPress plugin, you can easily add sign-up forms to your site so you can stay connected with visitors long after they've left.", 'constant-contact-forms' ); ?>
318
  </p>
319
  <?php
320
  // Include our license link if we have it.
321
+ if ( $license_link = $this->plugin->admin->get_admin_link( __( 'GPLv3 license', 'constant-contact-forms' ), 'license' ) ) { ?>
322
  <p class="c-text">
323
+ <?php
324
+ echo wp_kses_post( sprintf( __( 'This software is released under a modified %s.', 'constant-contact-forms' ), $license_link ) );
325
+ ?>
326
+ </p>
327
  <?php
328
+ } ?>
329
+ <h5>
330
+ <?php esc_attr_e( '*Direct Marketing Association 2013 Statistical Fact Book', 'constant-contact-forms' ); ?>
331
+ </h5>
 
 
 
 
 
 
332
  <div class="clear"></div>
333
  </div>
334
  <hr>
includes/class-admin.php CHANGED
@@ -344,8 +344,10 @@ class ConstantContact_Admin {
344
  * Scripts.
345
  *
346
  * @since 1.0.0
 
 
347
  */
348
- public function scripts() {
349
 
350
  global $pagenow;
351
 
@@ -379,6 +381,36 @@ class ConstantContact_Admin {
379
  'move_down' => __( 'move down', 'constant-contact-forms' ),
380
  ) )
381
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
382
 
383
  /**
384
  * Filters the allowed pages to enqueue the ctct_form script on.
344
  * Scripts.
345
  *
346
  * @since 1.0.0
347
+ *
348
+ * @param array $extra_localizations An array of arrays of `array( $handle, $name, $data )` passed to wp_localize_script.
349
  */
350
+ public function scripts( $extra_localizations = array() ) {
351
 
352
  global $pagenow;
353
 
381
  'move_down' => __( 'move down', 'constant-contact-forms' ),
382
  ) )
383
  );
384
+ $privacy_settings = get_option( 'ctct_privacy_policy_status', '' );
385
+
386
+ wp_localize_script(
387
+ 'ctct_form',
388
+ 'ctct_settings',
389
+ array(
390
+ 'privacy_set' => ( empty( $privacy_settings ) ) ? 'no' : 'yes',
391
+ )
392
+ );
393
+
394
+ if ( constant_contact_maybe_display_optin_notification() || ( isset( $_GET['page'] ) && 'ctct_options_settings' == $_GET['page'] ) ) {
395
+ wp_enqueue_script( 'ctct_form' );
396
+ }
397
+
398
+ // Some admin_enqueue_scripts action calls pass the pagenow string value and not an array.
399
+ if ( ! is_array( $extra_localizations ) ) {
400
+ return;
401
+ }
402
+
403
+ // If we have extra localizations, iterate and call with `wp_localize_script`.
404
+ if ( ! empty( $extra_localizations ) ) {
405
+ // We only have a single array, put it in another array.
406
+ if ( ! is_array( $extra_localizations[0] ) ) {
407
+ $extra_localizations = array( $extra_localizations );
408
+ }
409
+
410
+ foreach ( $extra_localizations as $localization_set ) {
411
+ call_user_func_array( 'wp_localize_script', $localization_set );
412
+ }
413
+ }
414
 
415
  /**
416
  * Filters the allowed pages to enqueue the ctct_form script on.
includes/class-api.php CHANGED
@@ -582,7 +582,7 @@ class ConstantContact_API {
582
  case 'anniversary_year':
583
  case 'custom':
584
  // Dont overload custom fields.
585
- if ( 15 >= $count ) {
586
  break;
587
  }
588
 
582
  case 'anniversary_year':
583
  case 'custom':
584
  // Dont overload custom fields.
585
+ if ( $count > 15 ) {
586
  break;
587
  }
588
 
includes/class-builder-fields.php CHANGED
@@ -287,21 +287,70 @@ class ConstantContact_Builder_Fields {
287
  ),
288
  ) );
289
 
290
- // Add a field label.
291
- $fields_metabox->add_group_field( $custom_group, array(
292
- 'name' => __( 'Field Label', 'constant-contact-forms' ),
293
- 'id' => $this->prefix . 'field_label',
294
- 'type' => 'text',
295
- 'default' => __( 'Email', 'constant-contact-forms' ),
296
- ) );
297
 
298
- // Add our field description.
299
- $fields_metabox->add_group_field( $custom_group, array(
300
- 'name' => __( 'Field Description', 'constant-contact-forms' ),
301
- 'id' => $this->prefix . 'field_desc',
302
- 'type' => 'text',
303
- 'default' => 'Ex: Enter email address',
304
- ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
305
 
306
  /**
307
  * Filters the Constant Contact field types to display as an option.
@@ -310,24 +359,26 @@ class ConstantContact_Builder_Fields {
310
  *
311
  * @param array $value Array of field types.
312
  */
313
- $default_fields = apply_filters( 'constant_contact_field_types', array(
314
- 'email' => __( 'Email (required)', 'constant-contact-forms' ),
315
- 'first_name' => __( 'First Name', 'constant-contact-forms' ),
316
- 'last_name' => __( 'Last Name', 'constant-contact-forms' ),
317
- 'phone_number' => __( 'Phone Number', 'constant-contact-forms' ),
318
- 'address' => __( 'Address', 'constant-contact-forms' ),
319
- 'job_title' => __( 'Job Title', 'constant-contact-forms' ),
320
- 'company' => __( 'Company', 'constant-contact-forms' ),
321
- 'website' => __( 'Website', 'constant-contact-forms' ),
322
- /**
323
- * V2 of the CC API doesn't support these fields. Hopefully this will get sorted out.
324
- * 'birthday' => __( 'Birthday', 'constant-contact-forms' ),
325
- * 'anniversary' => __( 'Anniversary', 'constant-contact-forms' ),
326
- * @todo
327
- * @since 1.0.2
328
- */
329
- 'custom' => __( 'Custom Text Field', 'constant-contact-forms' ),
330
- 'custom_text_area' => __( 'Custom Text Area', 'constant-contact-forms' ),
 
 
331
  ) );
332
 
333
  // Choose which field.
@@ -338,7 +389,25 @@ class ConstantContact_Builder_Fields {
338
  'show_option_none' => false,
339
  'default' => 'email',
340
  'row_classes' => 'map',
341
- 'options' => $default_fields,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
342
  ) );
343
 
344
  // Allow toggling of required fields.
@@ -371,7 +440,7 @@ class ConstantContact_Builder_Fields {
371
  'id' => $this->prefix . 'generated_shortcode',
372
  'type' => 'text_medium',
373
  'desc' => __( 'Shortcode to embed - <em><small>You can copy and paste this in a post to display your form.</small></em>', 'constant-contact-forms' ),
374
- 'default' => '[ctct form="' . $generated->object_id . '"]',
375
  'attributes' => array(
376
  'readonly' => 'readonly',
377
  ),
287
  ),
288
  ) );
289
 
290
+ /**
291
+ * The default placeholder text to use for fields without a placeholder.
292
+ *
293
+ * @since 1.2.0
294
+ * @param string $default_placeholder The placeholder text.
295
+ */
296
+ $default_placeholder = apply_filters( 'constant_contact_default_placeholder', __( 'A brief description of this field (optional)', 'constant-contact-forms' ) );
297
 
298
+ // Define field configuration for options and placeholders.
299
+ $default_fields = array(
300
+ 'email' => array(
301
+ 'option' => __( 'Email (required)', 'constant-contact-forms' ),
302
+ 'placeholder' => __( 'c.contact@example.com', 'constant-contact-forms' ),
303
+ ),
304
+ 'first_name' => array(
305
+ 'option' => __( 'First Name', 'constant-contact-forms' ),
306
+ 'placeholder' => __( 'John', 'constant-contact-forms' ),
307
+ ),
308
+ 'last_name' => array(
309
+ 'option' => __( 'Last Name', 'constant-contact-forms' ),
310
+ 'placeholder' => __( 'Smith', 'constant-contact-forms' ),
311
+ ),
312
+ 'phone_number' => array(
313
+ 'option' => __( 'Phone Number', 'constant-contact-forms' ),
314
+ 'placeholder' => __( '(555) 272-3342', 'constant-contact-forms' ),
315
+ ),
316
+ 'address' => array(
317
+ 'option' => __( 'Address', 'constant-contact-forms' ),
318
+ 'placeholder' => __( '4115 S. Main Rd.', 'constant-contact-forms' ),
319
+ ),
320
+ 'job_title' => array(
321
+ 'option' => __( 'Job Title', 'constant-contact-forms' ),
322
+ 'placeholder' => __( 'Project Manager', 'constant-contact-forms' ),
323
+ ),
324
+ 'company' => array(
325
+ 'option' => __( 'Company', 'constant-contact-forms' ),
326
+ 'placeholder' => __( 'Acme Manufacturing', 'constant-contact-forms' ),
327
+ ),
328
+ 'website' => array(
329
+ 'option' => __( 'Website', 'constant-contact-forms' ),
330
+ 'placeholder' => __( 'http://www.example.com', 'constant-contact-form' ),
331
+ ),
332
+ /**
333
+ * V2 of the CC API doesn't support these fields. Hopefully this will get sorted out.
334
+ * 'birthday' => array(
335
+ * 'option' => __( 'Birthday', 'constant-contact-forms' ),
336
+ * 'placeholder' => 'M/D/Y',
337
+ * ),
338
+ * 'anniversary' => array(
339
+ * 'option' => __( 'Anniversary', 'constant-contact-forms' ),
340
+ * 'placeholder' => 'M/D/Y',
341
+ * ),
342
+ * @todo
343
+ * @since 1.0.2
344
+ */
345
+ 'custom' => array(
346
+ 'option' => __( 'Custom Text Field', 'constant-contact-forms' ),
347
+ 'placeholder' => __( 'A custom text field', 'constant-contact-forms' ),
348
+ ),
349
+ 'custom_text_area' => array(
350
+ 'option' => __( 'Custom Text Area', 'constant-contact-forms' ),
351
+ 'placeholder' => __( 'A large custom text field', 'constant-contact-forms' ),
352
+ ),
353
+ );
354
 
355
  /**
356
  * Filters the Constant Contact field types to display as an option.
359
  *
360
  * @param array $value Array of field types.
361
  */
362
+ $filtered_options = apply_filters( 'constant_contact_field_types', wp_list_pluck( $default_fields, 'option' ) );
363
+
364
+ /**
365
+ * Filter the field placeholders.
366
+ *
367
+ * @since 1.2.0
368
+ *
369
+ * @param array $default_fields The field placeholders to use for field description.
370
+ */
371
+ $filtered_placeholders = apply_filters(
372
+ 'constant_contact_field_placeholders',
373
+ wp_list_pluck( $default_fields, 'placeholder' )
374
+ );
375
+ $filtered_placeholders['default'] = $default_placeholder;
376
+
377
+ // Go ahead and enqueue with our placeholder text.
378
+ $this->plugin->admin->scripts( array(
379
+ 'ctct_form',
380
+ 'ctct_admin_placeholders',
381
+ $filtered_placeholders,
382
  ) );
383
 
384
  // Choose which field.
389
  'show_option_none' => false,
390
  'default' => 'email',
391
  'row_classes' => 'map',
392
+ 'options' => $filtered_options,
393
+ ) );
394
+
395
+ // Add a field label.
396
+ $fields_metabox->add_group_field( $custom_group, array(
397
+ 'name' => __( 'Field Label', 'constant-contact-forms' ),
398
+ 'id' => $this->prefix . 'field_label',
399
+ 'type' => 'text',
400
+ 'default' => __( 'Email', 'constant-contact-forms' ),
401
+ ) );
402
+
403
+ // Add our field description.
404
+ $fields_metabox->add_group_field( $custom_group, array(
405
+ 'name' => __( 'Field Description', 'constant-contact-forms' ),
406
+ 'id' => $this->prefix . 'field_desc',
407
+ 'type' => 'text',
408
+ 'attributes' => array(
409
+ 'placeholder' => __( 'Ex: Enter email address', 'constant-contact-forms' ),
410
+ ),
411
  ) );
412
 
413
  // Allow toggling of required fields.
440
  'id' => $this->prefix . 'generated_shortcode',
441
  'type' => 'text_medium',
442
  'desc' => __( 'Shortcode to embed - <em><small>You can copy and paste this in a post to display your form.</small></em>', 'constant-contact-forms' ),
443
+ 'default' => ( $generated->object_id > 0 ) ? '[ctct form="' . $generated->object_id . '"]' : '',
444
  'attributes' => array(
445
  'readonly' => 'readonly',
446
  ),
includes/class-builder.php CHANGED
@@ -206,7 +206,7 @@ class ConstantContact_Builder {
206
  if ( ! get_option( 'ctct_first_form_modal_dismissed', false ) ) {
207
 
208
  // Show our modal
209
- $this->output_not_connected_modal();
210
  }
211
  }
212
  }
@@ -271,14 +271,16 @@ class ConstantContact_Builder {
271
  }
272
 
273
  /**
274
- * Displays our not connected modal to the user
275
  *
276
- * @since 1.0.0
277
- * @return void
 
 
278
  */
279
- public function output_not_connected_modal() {
280
 
281
- // output markup of non connected modal here ?>
282
  <div class="ctct-modal ctct-modal-open">
283
 
284
  <?php // modal header ?>
@@ -286,12 +288,19 @@ class ConstantContact_Builder {
286
  <div class="ctct-modal-content">
287
  <div class="ctct-modal-header">
288
  <a href="#" class="ctct-modal-close" aria-hidden="true">&times;</a>
289
- <h2><?php esc_attr_e( 'Your first form is ready!', 'constant-contact-forms' ); ?></h2>
290
  <p>
291
- <?php esc_html_e( 'Now, how would you like to manage the information you collect?', 'constant-contact-forms' ); ?>
 
 
 
 
292
  </p>
293
  </div>
294
  <div class="ctct-modal-body">
 
 
 
295
  <div class="ctct-modal-left">
296
  <img
297
  class="ctct-modal-flare"
@@ -302,7 +311,7 @@ class ConstantContact_Builder {
302
  <p>
303
  <?php esc_attr_e( 'Import everything into Constant Contact so I can see what email marketing can do for me.', 'constant-contact-forms' ); ?>
304
  </p>
305
- <a href="<?php echo esc_url_raw( constant_contact()->api->get_signup_link() ); ?>" target="_blank" class="button button-orange" title="Try Us Free">Try Us Free</a><br/>
306
  <img
307
  class="flare"
308
  src="<?php echo esc_url_raw( $this->plugin->url . 'assets/images/cc-modal-logo.png' ); ?>"
@@ -319,7 +328,7 @@ class ConstantContact_Builder {
319
  <p>
320
  <?php esc_attr_e( 'Automatically add collected information to contacts in my Constant Contact account.', 'constant-contact-forms' ); ?>
321
  </p>
322
- <a href="<?php echo esc_url_raw( constant_contact()->api->get_connect_link() ); ?>" target="_blank" class="button button-blue" title="Connect Plugin">
323
  <?php esc_attr_e( 'Connect Plugin', 'constant-contact-forms' ); ?>
324
  </a><br/>
325
  <p class="small"><small><?php esc_attr_e( 'By connecting, you authorize this
206
  if ( ! get_option( 'ctct_first_form_modal_dismissed', false ) ) {
207
 
208
  // Show our modal
209
+ $this->output_not_connected_modal( $post->ID );
210
  }
211
  }
212
  }
271
  }
272
 
273
  /**
274
+ * Displays our not connected modal to the user.
275
  *
276
+ * @since 1.0.0
277
+ * @since 1.2.0 Added post_id parameter.
278
+ *
279
+ * @return void
280
  */
281
+ public function output_not_connected_modal( $post_id = 0 ) {
282
 
283
+ // Output markup of non connected modal here. ?>
284
  <div class="ctct-modal ctct-modal-open">
285
 
286
  <?php // modal header ?>
288
  <div class="ctct-modal-content">
289
  <div class="ctct-modal-header">
290
  <a href="#" class="ctct-modal-close" aria-hidden="true">&times;</a>
291
+ <h2><?php esc_html_e( 'Your first form is ready!', 'constant-contact-forms' ); ?></h2>
292
  <p>
293
+ <?php
294
+ printf(
295
+ esc_html__( 'Paste shortcode %s into a post or page editor.', 'constant-contact-forms' ),
296
+ '<span class="displayed-shortcode">' . constant_contact_display_shortcode( $post_id ) . '</span>'
297
+ ); ?>
298
  </p>
299
  </div>
300
  <div class="ctct-modal-body">
301
+ <p class="now-what">
302
+ <?php esc_html_e( 'Now, how would you like to manage the information you collect?', 'constant-contact-forms' ); ?>
303
+ </p>
304
  <div class="ctct-modal-left">
305
  <img
306
  class="ctct-modal-flare"
311
  <p>
312
  <?php esc_attr_e( 'Import everything into Constant Contact so I can see what email marketing can do for me.', 'constant-contact-forms' ); ?>
313
  </p>
314
+ <a href="<?php echo esc_url_raw( add_query_arg( array( 'rmc' => 'wp_fmodal_try' ), constant_contact()->api->get_signup_link() ) ); ?>" target="_blank" class="button button-orange" title="Try Us Free">Try Us Free</a><br/>
315
  <img
316
  class="flare"
317
  src="<?php echo esc_url_raw( $this->plugin->url . 'assets/images/cc-modal-logo.png' ); ?>"
328
  <p>
329
  <?php esc_attr_e( 'Automatically add collected information to contacts in my Constant Contact account.', 'constant-contact-forms' ); ?>
330
  </p>
331
+ <a href="<?php echo esc_url_raw( add_query_arg( array( 'rmc' => 'wp_fmodal_connect' ), constant_contact()->api->get_connect_link() ) ); ?>" target="_blank" class="button button-blue" title="Connect Plugin">
332
  <?php esc_attr_e( 'Connect Plugin', 'constant-contact-forms' ); ?>
333
  </a><br/>
334
  <p class="small"><small><?php esc_attr_e( 'By connecting, you authorize this
includes/class-check.php CHANGED
@@ -116,7 +116,7 @@ class ConstantContact_Check {
116
 
117
  // Check to see if we can load the encryption library.
118
  $crypto = $this->plugin->connect->check_crypto_class();
119
- echo '<tr><td>' . esc_attr_e( 'Encrpytion Library: ', 'constant-contact-forms' ) . '</td><td>' . esc_attr( $this->exists_text( $crypto ) ) . '</td></tr>';
120
 
121
  echo '</table>';
122
  }
116
 
117
  // Check to see if we can load the encryption library.
118
  $crypto = $this->plugin->connect->check_crypto_class();
119
+ echo '<tr><td>' . esc_attr__( 'Encrpytion Library: ', 'constant-contact-forms' ) . '</td><td>' . esc_attr( $this->exists_text( $crypto ) ) . '</td></tr>';
120
 
121
  echo '</table>';
122
  }
includes/class-connect.php CHANGED
@@ -203,50 +203,56 @@ class ConstantContact_Connect {
203
  }
204
  ?>
205
  <p class="ctct-description">
206
- <?php esc_html_e( 'To take full advantage of this plugin, we recommend having an active Constant Contact account.', 'constant-contact-forms' ); ?>
207
  </p>
208
 
209
- <!-- Start Columns Here -->
210
- <div class="left">
211
- <img
212
- class="flare"
213
- src="<?php echo esc_url_raw( $this->plugin->url . 'assets/images/question-mail-connect.png' ); ?>"
214
- alt="<?php echo esc_attr_x( '? mail', 'email marketing alt text', 'constant-contact-forms' ); ?>"
215
- />
216
- <h3><?php esc_attr_e( 'Need an account?', 'constant-contact-forms' ); ?></h3>
217
- <p>
218
- <?php esc_attr_e( 'Sign up for a free 60-day trial to connect with visitors beyond your website.', 'constant-contact-forms' ); ?>
219
- </p>
220
- <a class="button button-orange" href="<?php echo esc_url_raw( constant_contact()->api->get_signup_link() ); ?>"><?php esc_attr_e( 'Try us Free', 'constant-contact-forms' ); ?></a>
221
  </div>
222
- <div class="right">
223
- <img
224
- class="flare"
225
- src="<?php echo esc_url_raw( $this->plugin->url . 'assets/images/cc-login-connect.png' ); ?>"
226
- alt="<?php echo esc_attr_x( 'hand holding phone', 'connect alt text', 'constant-contact-forms' ); ?>"
227
- />
228
- <h3><?php esc_attr_e( 'Have an account?', 'constant-contact-forms' ); ?></h3>
229
- <p>
230
- <?php esc_attr_e( 'Connect the plugin to log in to your Constant Contact account', 'constant-contact-forms' ); ?>
231
- <em><?php esc_attr_e( '(by connecting, you authorize this plugin to access your account).', 'constant-contact-forms' ); ?></em>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
232
  </p>
233
- <?php
234
-
235
- // Get our middleware link.
236
- $proof = constant_contact()->authserver->set_verification_option();
237
- $auth_link = constant_contact()->authserver->do_connect_url( $proof );
238
-
239
- // If we have a link, then display the connect button.
240
- if ( $auth_link ) { ?>
241
- <a href="<?php echo esc_url_raw( $auth_link ); ?>" class="button button-blue ctct-connect">
242
- <?php esc_html_e( 'Connect Plugin', 'constant-contact-forms' ); ?>
243
- </a>
244
- <?php } ?>
245
  </div>
 
246
  </div>
 
247
 
248
  <p class="ctct-description small">
249
- <strong><?php esc_html_e( 'NOTE: ', 'constant-contact-forms' ); ?></strong><?php esc_html_e( 'It’s possible to use the plugin without connecting to a Constant Contact account. In this case, all information collected by the forms will be individually emailed to the Site Admin.', 'constant-contact-forms' ); ?>
250
  </p>
251
  <?php endif; ?>
252
  </div>
@@ -281,6 +287,14 @@ class ConstantContact_Connect {
281
  // Delete access token and delete our legacy token as well.
282
  delete_option( 'ctct_token' );
283
  delete_option( '_ctct_token' );
 
 
 
 
 
 
 
 
284
  }
285
  }
286
 
203
  }
204
  ?>
205
  <p class="ctct-description">
206
+ <?php esc_html_e( "Get the most out of this plugin &mdash; use it with an active Constant Contact account. By connecting to an account, you'll be able to engage visitors through email marketing and turn more of them into customers.", 'constant-contact-forms' ); ?>
207
  </p>
208
 
209
+ <div class="ctct-call-to-action">
210
+ <div class="ctct-call-to-action-text">
211
+ <h3><?php esc_html_e( 'Connect your Constant Contact account.', 'constant-contact-forms' ); ?></h3>
212
+ <p><?php esc_html_e( 'By connecting, you authorize this plugin to access your account.', 'constant-contact-forms' ); ?></p>
 
 
 
 
 
 
 
 
213
  </div>
214
+ <?php
215
+
216
+ // Get our middleware link.
217
+ $proof = constant_contact()->authserver->set_verification_option();
218
+ $auth_link = constant_contact()->authserver->do_connect_url( $proof );
219
+
220
+ $auth_link = add_query_arg( array( 'rmc' => 'wp_connect_connect' ), $auth_link );
221
+
222
+ // If we have a link, then display the connect button.
223
+ if ( $auth_link ) { ?>
224
+ <a href="<?php echo esc_url_raw( $auth_link ); ?>" class="button button-blue ctct-connect">
225
+ <?php esc_html_e( 'Connect Plugin', 'constant-contact-forms' ); ?>
226
+ </a>
227
+ <?php } ?>
228
+ </div>
229
+ <hr />
230
+ <div class="ctct-call-to-action">
231
+ <div class="ctct-call-to-action-text">
232
+ <h3><?php esc_html_e( 'No Constant Contact account? Try us out.', 'constant-contact-forms' ); ?></h3>
233
+ <p><?php esc_html_e( 'Create professional emails so you can nurture great relationships with new contacts even after they leave your website. Sign up for a free 60-day trial.', 'constant-contact-forms' ); ?></p>
234
+ </div>
235
+ <a class="button button-orange" href="<?php echo esc_url_raw( add_query_arg( array( 'rmc' => 'wp_connect_try' ), constant_contact()->api->get_signup_link() ) ); ?>"><?php esc_attr_e( 'Try us Free', 'constant-contact-forms' ); ?></a>
236
+ </div>
237
+
238
+ <form id="subscribe" accept-charset="utf-8" action="https://a.constantcontact.com/subscriptions/coi_verify/.ashx" method="get" target="_blank">
239
+ <div class="ctct-call-to-action">
240
+ <div class="ctct-call-to-action-text">
241
+ <h3><?php esc_html_e( 'Email marketing tips delivered to your inbox.', 'constant-contact-forms' ); ?></h3>
242
+ <p><?php esc_html_e( 'Ready to grow with email marketing? Subscribe now for the latest tips and industry best practices to create great-looking emails that work.', 'constant-contact-forms' ); ?></p>
243
+ <input id="subbox" maxlength="255" name="email" type="text" placeholder="<?php esc_attr_e( 'Enter your email address', 'constant-contact-forms' ); ?>">
244
+ <input name="sub" type="hidden" value="3">
245
+ <input name="method" type="hidden" value="JMML_SUB3_wp_plugin">
246
+
247
+ <p><small><?php printf( __( 'By submitting this form, you agree to receive periodic product announcements and account notifications from Constant Contact. Cancel these communications at any time by clicking the unsubscribe link in the footer of the actual email. Constant Contact, Inc, 1601 Trapelo Road, Waltham, MA 02451, %s', 'constant-contact-forms' ), '<a href="https://www.constantcontact.com">www.constantcontact.com</a>' ); ?></small>
248
  </p>
 
 
 
 
 
 
 
 
 
 
 
 
249
  </div>
250
+ <input class="button" id="subbutton" type="submit" value="<?php esc_attr_e( 'Sign Up', 'constant-contact-forms' ); ?>">
251
  </div>
252
+ </form>
253
 
254
  <p class="ctct-description small">
255
+ <strong><?php esc_html_e( 'NOTE: ', 'constant-contact-forms' ); ?></strong><?php esc_html_e( "It's possible to use the plugin without connecting to a Constant Contact account. In this case, all information collected by the forms will be individually emailed to the Site Admin.", 'constant-contact-forms' ); ?>
256
  </p>
257
  <?php endif; ?>
258
  </div>
287
  // Delete access token and delete our legacy token as well.
288
  delete_option( 'ctct_token' );
289
  delete_option( '_ctct_token' );
290
+
291
+ // Delete the disable email setting when disconnected.
292
+ $saved_options = get_option( 'ctct_options_settings' );
293
+ if ( isset( $saved_options['_ctct_disable_email_notifications'] ) ) {
294
+ unset( $saved_options['_ctct_disable_email_notifications'] );
295
+ update_option( 'ctct_options_settings', $saved_options );
296
+ }
297
+
298
  }
299
  }
300
 
includes/class-cpts.php CHANGED
@@ -208,7 +208,7 @@ class ConstantContact_CPTS {
208
  3 => __( 'Custom field deleted.', 'constant-contact-forms' ),
209
  4 => __( 'Form updated.', 'constant-contact-forms' ),
210
  5 => isset( $_GET['revision'] ) ? sprintf( __( 'Form restored to revision from %s', 'constant-contact-forms' ), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false, // Input var okay.
211
- 6 => __( 'Form published.', 'constant-contact-forms' ),
212
  7 => __( 'Form saved.', 'constant-contact-forms' ),
213
  8 => __( 'Form submitted.', 'constant-contact-forms' ),
214
  9 => __( 'Form scheduled for: <strong>%1$s</strong>.', 'constant-contact-forms' ), date_i18n( 'M j, Y @ G:i', strtotime( $post->post_date ) ),
@@ -251,10 +251,16 @@ class ConstantContact_CPTS {
251
  }
252
 
253
  /**
254
- * Returns array of form ids
 
 
 
255
  *
256
  * @since 1.0.0
257
  *
 
 
 
258
  * @return array
259
  */
260
  public function get_forms( $expanded_data = false, $bust_cache = false ) {
208
  3 => __( 'Custom field deleted.', 'constant-contact-forms' ),
209
  4 => __( 'Form updated.', 'constant-contact-forms' ),
210
  5 => isset( $_GET['revision'] ) ? sprintf( __( 'Form restored to revision from %s', 'constant-contact-forms' ), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false, // Input var okay.
211
+ 6 => sprintf( __( 'Success! Here\'s the shortcode: %s. Just paste it into a post or page editor to publish', 'constant-contact-forms' ), '<strong>' . constant_contact_display_shortcode( $post->ID ) . '</strong>' ),
212
  7 => __( 'Form saved.', 'constant-contact-forms' ),
213
  8 => __( 'Form submitted.', 'constant-contact-forms' ),
214
  9 => __( 'Form scheduled for: <strong>%1$s</strong>.', 'constant-contact-forms' ), date_i18n( 'M j, Y @ G:i', strtotime( $post->post_date ) ),
251
  }
252
 
253
  /**
254
+ * Returns array of form ids.
255
+ *
256
+ * Can return more information with `true` passed to the first parameter. Caches results, pass `true` to the second
257
+ * parameter to bust the cache.
258
  *
259
  * @since 1.0.0
260
  *
261
+ * @param bool $expanded_data Set `true` to process the retrieved posts.
262
+ * @param bool $bust_cache Set `true` to bust the cached forms.
263
+ *
264
  * @return array
265
  */
266
  public function get_forms( $expanded_data = false, $bust_cache = false ) {
includes/class-display.php CHANGED
@@ -201,7 +201,7 @@ class ConstantContact_Display {
201
 
202
  $curr_url = untrailingslashit( add_query_arg( '', '', home_url( $request ) ) );
203
 
204
- // If we're not using a custom permalink strucutre, theres a chance the above
205
  // will return the home_url. so we do another check to makesure we're going
206
  // to use the right thing. This check doesn't work on the homepage, but
207
  // that will just get caught with our fallback check correctly anyway.
@@ -593,8 +593,8 @@ class ConstantContact_Display {
593
  $markup = '';
594
  if ( ! empty( $name ) && ! empty( $field_label ) ) {
595
  $markup .= $this->get_label( $name, $field_label );
596
- ;
597
  }
 
598
  // Finish building our markup.
599
  return $markup . '</p>';
600
  }
@@ -640,14 +640,31 @@ class ConstantContact_Display {
640
  // Start our markup.
641
  $markup = $this->field_top( $type, $name, $f_id, $label, $req );
642
 
 
 
 
 
 
 
 
 
 
 
 
 
 
643
  // Set our field as as seprate var, because we allow for only returning that.
644
  $field = '<input ' . $req_text . ' type="' . $type . '" name="' . $f_id . '" id="' . $f_id . '" value="' . $value . '" placeholder="' . $label . '"';
645
 
646
  // If we have an error.
647
  if ( $field_error ) {
648
-
649
  // Tack that sucker on to the end of our input.
650
- $field .= 'class="ctct-invalid"';
 
 
 
 
 
651
  }
652
 
653
  // Finish the markup for our field itself.
@@ -690,6 +707,21 @@ class ConstantContact_Display {
690
  $label = esc_attr( $label );
691
  $type = 'checkbox';
692
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
693
  $markup = $this->field_top( $type, $name, $f_id, $label, false, false );
694
  $markup .= '<input type="' . $type . '" name="' . $f_id . '" id="' . $f_id . '" value="' . $value . '" />';
695
  $markup .= $this->field_bottom( $name, ' ' . $label );
@@ -809,7 +841,7 @@ class ConstantContact_Display {
809
  $checked = $show ? '' : 'checked';
810
 
811
  $markup = $this->field_top( 'checkbox', 'ctct-opt-in', 'ctct-opt-in', $label, false, false );
812
- $markup .= '<input type="checkbox" ' . $checked . ' name="ctct-opt-in" id="ctct-opt-in" value="' . $value . '" />';
813
  $markup .= $this->field_bottom( 'ctct-opt-in', ' ' . wp_kses_post( $label ) ) . '</div>';
814
 
815
  return $markup;
@@ -851,24 +883,24 @@ class ConstantContact_Display {
851
  $return .= ' <legend>' . esc_attr( $name ) . '</legend>';
852
  $return .= ' <div class="ctct-form-field ctct-field-full address-line-1">';
853
  $return .= ' <label for="street_' . esc_attr( $f_id ) . '">' . esc_attr( $street ) . '</label>';
854
- $return .= ' <input ' . $req . 'type="text" name="street_' . esc_attr( $f_id ) . '" id="street_' . esc_attr( $f_id ) . '" value="' . esc_attr( $v_street ) . '">';
855
  $return .= ' </div>';
856
  // Address Line 2 is not required, note the missing $req inclusion.
857
  $return .= ' <div class="ctct-form-field ctct-field-full address-line-2" id="input_2_1_2_container">';
858
  $return .= ' <label for="line_2_' . esc_attr( $f_id ) . '">' . esc_attr( $line_2 ) . '</label>';
859
- $return .= ' <input type="text" name="line_2_' . esc_attr( $f_id ) . '" id="line_2_' . esc_attr( $f_id ) . '" value="' . esc_attr( $v_line_2 ) . '">';
860
  $return .= ' </div>';
861
  $return .= ' <div class="ctct-form-field ctct-field-third address-city" id="input_2_1_3_container">';
862
  $return .= ' <label for="city_' . esc_attr( $f_id ) . '">' . esc_attr( $city ) . '</label>';
863
- $return .= ' <input ' . $req . 'type="text" name="city_' . esc_attr( $f_id ) . '" id="city_' . esc_attr( $f_id ) . '" value="' . esc_attr( $v_city ) . '">';
864
  $return .= ' </div>';
865
  $return .= ' <div class="ctct-form-field ctct-field-third address-state" id="input_2_1_4_container">';
866
  $return .= ' <label for="state_' . esc_attr( $f_id ) . '">' . esc_attr( $state ) . '</label>';
867
- $return .= ' <input ' . $req . 'type="text" name="state_' . esc_attr( $f_id ) . '" id="state_' . esc_attr( $f_id ) . '" value="' . esc_attr( $v_state ) . '">';
868
  $return .= ' </div>';
869
  $return .= ' <div class="ctct-form-field ctct-field-third address-zip" id="input_2_1_5_container">';
870
  $return .= ' <label for="zip_' . esc_attr( $f_id ) . '">' . esc_attr( $zip ) . '</label>';
871
- $return .= ' <input ' . $req . 'type="text" name="zip_' . esc_attr( $f_id ) . '" id="zip_' . esc_attr( $f_id ) . '" value="' . esc_attr( $v_zip ) . '">';
872
  $return .= ' </div>';
873
  $return .= '</fieldset></p>';
874
 
@@ -1113,7 +1145,8 @@ class ConstantContact_Display {
1113
  $req_label = apply_filters( 'constant_contact_required_label', '<abbr title="required">*</abbr>' );
1114
  }
1115
 
1116
- $return = '<p><label for="' . esc_attr( $map ) . '">' . esc_attr( $name ) . ' ' . $req_label . '</label><textarea ' . $req_text . ' name="' . esc_attr( $map ) . '" placeholder="' . esc_attr( $desc ) . '">' . esc_html( $value ) . '</textarea>';
 
1117
 
1118
  if ( $field_error ) {
1119
  $return .= '<span class="ctct-field-error"><label for="' . esc_attr( $map ) . '">' . esc_attr( __( 'Error: Please correct your entry.', 'constant-contact-forms' ) ) . '</label></span>';
@@ -1169,7 +1202,7 @@ class ConstantContact_Display {
1169
  *
1170
  * @param string $value HTML and disclose text.
1171
  */
1172
- return apply_filters( 'constant_contact_disclose', '<hr><sub>' . $this->get_inner_disclose_text() . '</sub>' );
1173
  }
1174
 
1175
  /**
201
 
202
  $curr_url = untrailingslashit( add_query_arg( '', '', home_url( $request ) ) );
203
 
204
+ // If we're not using a custom permalink structure, theres a chance the above
205
  // will return the home_url. so we do another check to makesure we're going
206
  // to use the right thing. This check doesn't work on the homepage, but
207
  // that will just get caught with our fallback check correctly anyway.
593
  $markup = '';
594
  if ( ! empty( $name ) && ! empty( $field_label ) ) {
595
  $markup .= $this->get_label( $name, $field_label );
 
596
  }
597
+
598
  // Finish building our markup.
599
  return $markup . '</p>';
600
  }
640
  // Start our markup.
641
  $markup = $this->field_top( $type, $name, $f_id, $label, $req );
642
 
643
+ // Provide some CSS class(es).
644
+ $classes = array( 'ctct-' . esc_attr( $type ) );
645
+
646
+ /**
647
+ * Filter to add classes for the rendering input.
648
+ *
649
+ * @since 1.2.0
650
+ * @param array $classes Array of classes to apply to the field.
651
+ * @param string $type The field type being rendered.
652
+ * @return arrray
653
+ */
654
+ $classes = apply_filters( 'constant_contact_input_classes', $classes, $type );
655
+
656
  // Set our field as as seprate var, because we allow for only returning that.
657
  $field = '<input ' . $req_text . ' type="' . $type . '" name="' . $f_id . '" id="' . $f_id . '" value="' . $value . '" placeholder="' . $label . '"';
658
 
659
  // If we have an error.
660
  if ( $field_error ) {
 
661
  // Tack that sucker on to the end of our input.
662
+ $classes[] = 'class="ctct-invalid"';
663
+ }
664
+
665
+ // Append classes to our field.
666
+ if ( count( $classes ) ) {
667
+ $field .= 'class="' . implode( ' ', $classes ) . '"';
668
  }
669
 
670
  // Finish the markup for our field itself.
707
  $label = esc_attr( $label );
708
  $type = 'checkbox';
709
 
710
+ // Provide some CSS class(es).
711
+ $classes = array( 'ctct-' . esc_attr( $type ) );
712
+
713
+ /**
714
+ * Filter to add classes for the rendering input.
715
+ *
716
+ * @since 1.2.0
717
+ * @todo Can we abstract this to use $this->input?
718
+ *
719
+ * @param array $classes Array of classes to apply to the field.
720
+ * @param string $type The field type being rendered.
721
+ * @return arrray
722
+ */
723
+ $classes = apply_filters( 'constant_contact_input_classes', $classes, $type );
724
+
725
  $markup = $this->field_top( $type, $name, $f_id, $label, false, false );
726
  $markup .= '<input type="' . $type . '" name="' . $f_id . '" id="' . $f_id . '" value="' . $value . '" />';
727
  $markup .= $this->field_bottom( $name, ' ' . $label );
841
  $checked = $show ? '' : 'checked';
842
 
843
  $markup = $this->field_top( 'checkbox', 'ctct-opt-in', 'ctct-opt-in', $label, false, false );
844
+ $markup .= '<input type="checkbox" ' . $checked . ' name="ctct-opt-in" id="ctct-opt-in" class="ctct-checkbox ctct-opt-in" value="' . $value . '" />';
845
  $markup .= $this->field_bottom( 'ctct-opt-in', ' ' . wp_kses_post( $label ) ) . '</div>';
846
 
847
  return $markup;
883
  $return .= ' <legend>' . esc_attr( $name ) . '</legend>';
884
  $return .= ' <div class="ctct-form-field ctct-field-full address-line-1">';
885
  $return .= ' <label for="street_' . esc_attr( $f_id ) . '">' . esc_attr( $street ) . '</label>';
886
+ $return .= ' <input ' . $req . 'type="text" class="ctct-text ctct-address-street" name="street_' . esc_attr( $f_id ) . '" id="street_' . esc_attr( $f_id ) . '" value="' . esc_attr( $v_street ) . '">';
887
  $return .= ' </div>';
888
  // Address Line 2 is not required, note the missing $req inclusion.
889
  $return .= ' <div class="ctct-form-field ctct-field-full address-line-2" id="input_2_1_2_container">';
890
  $return .= ' <label for="line_2_' . esc_attr( $f_id ) . '">' . esc_attr( $line_2 ) . '</label>';
891
+ $return .= ' <input type="text" class="ctct-text ctct-address-line-2" name="line_2_' . esc_attr( $f_id ) . '" id="line_2_' . esc_attr( $f_id ) . '" value="' . esc_attr( $v_line_2 ) . '">';
892
  $return .= ' </div>';
893
  $return .= ' <div class="ctct-form-field ctct-field-third address-city" id="input_2_1_3_container">';
894
  $return .= ' <label for="city_' . esc_attr( $f_id ) . '">' . esc_attr( $city ) . '</label>';
895
+ $return .= ' <input ' . $req . 'type="text" class="ctct-text ctct-address-city" name="city_' . esc_attr( $f_id ) . '" id="city_' . esc_attr( $f_id ) . '" value="' . esc_attr( $v_city ) . '">';
896
  $return .= ' </div>';
897
  $return .= ' <div class="ctct-form-field ctct-field-third address-state" id="input_2_1_4_container">';
898
  $return .= ' <label for="state_' . esc_attr( $f_id ) . '">' . esc_attr( $state ) . '</label>';
899
+ $return .= ' <input ' . $req . 'type="text" class="ctct-text ctct-address-state" name="state_' . esc_attr( $f_id ) . '" id="state_' . esc_attr( $f_id ) . '" value="' . esc_attr( $v_state ) . '">';
900
  $return .= ' </div>';
901
  $return .= ' <div class="ctct-form-field ctct-field-third address-zip" id="input_2_1_5_container">';
902
  $return .= ' <label for="zip_' . esc_attr( $f_id ) . '">' . esc_attr( $zip ) . '</label>';
903
+ $return .= ' <input ' . $req . 'type="text" class="ctct-text ctct-address-zip" name="zip_' . esc_attr( $f_id ) . '" id="zip_' . esc_attr( $f_id ) . '" value="' . esc_attr( $v_zip ) . '">';
904
  $return .= ' </div>';
905
  $return .= '</fieldset></p>';
906
 
1145
  $req_label = apply_filters( 'constant_contact_required_label', '<abbr title="required">*</abbr>' );
1146
  }
1147
 
1148
+ $return = '<p><label for="' . esc_attr( $map ) . '">' . esc_attr( $name ) . ' ' . $req_label . '</label>';
1149
+ $return .= '<textarea class="ctct-textarea" ' . $req_text . ' name="' . esc_attr( $map ) . '" placeholder="' . esc_attr( $desc ) . '">' . esc_html( $value ) . '</textarea>';
1150
 
1151
  if ( $field_error ) {
1152
  $return .= '<span class="ctct-field-error"><label for="' . esc_attr( $map ) . '">' . esc_attr( __( 'Error: Please correct your entry.', 'constant-contact-forms' ) ) . '</label></span>';
1202
  *
1203
  * @param string $value HTML and disclose text.
1204
  */
1205
+ return apply_filters( 'constant_contact_disclose', '<div class="ctct-disclosure"><hr><sub>' . $this->get_inner_disclose_text() . '</sub></div>' );
1206
  }
1207
 
1208
  /**
includes/class-mail.php CHANGED
@@ -43,8 +43,10 @@ class ConstantContact_Mail {
43
  /**
44
  * Process our form values
45
  *
46
- * @since 1.0.0
47
- * @param array $values submitted form values
 
 
48
  */
49
  public function submit_form_values( $values = array(), $add_to_opt_in = false ) {
50
 
@@ -76,6 +78,11 @@ class ConstantContact_Mail {
76
  // Format them.
77
  $email_values = $this->format_values_for_email( $values );
78
 
 
 
 
 
 
79
  // Send the mail.
80
  return $this->mail( $this->get_email(), $email_values );
81
  }
@@ -206,7 +213,7 @@ class ConstantContact_Mail {
206
 
207
  $content_before = __( 'Congratulations! Your Constant Contact Forms plugin has successfully captured new information:', 'constant-contact-forms' );
208
 
209
- $content_after = __( "Don't forget: Email marketing is a great way to stay connected and engage with visitors after theyve left your site. When you connect to a Constant Contact account, all new subscribers are automatically synced so you can keep the interaction going through emails and more. Sign up for a Free Trial on the Connect page in the Plugin console view.", 'constant-contact-forms' );
210
 
211
  $content = $content_before . $content . $content_after;
212
 
43
  /**
44
  * Process our form values
45
  *
46
+ * @since 1.0.0
47
+ * @param array $values submitted form values
48
+ *
49
+ * @return bool
50
  */
51
  public function submit_form_values( $values = array(), $add_to_opt_in = false ) {
52
 
78
  // Format them.
79
  $email_values = $this->format_values_for_email( $values );
80
 
81
+ // Skip sending e-mail if we're connected and the user has opted out of notification emails.
82
+ if ( constant_contact()->api->is_connected() && ( 'on' === ctct_get_settings_option( '_ctct_disable_email_notifications' ) ) ) {
83
+ return true;
84
+ }
85
+
86
  // Send the mail.
87
  return $this->mail( $this->get_email(), $email_values );
88
  }
213
 
214
  $content_before = __( 'Congratulations! Your Constant Contact Forms plugin has successfully captured new information:', 'constant-contact-forms' );
215
 
216
+ $content_after = __( "Don't forget: Email marketing is a great way to stay connected and engage with visitors after they've left your site. When you connect to a Constant Contact account, all new subscribers are automatically synced so you can keep the interaction going through emails and more. Sign up for a Free Trial on the Connect page in the Plugin console view.", 'constant-contact-forms' );
217
 
218
  $content = $content_before . $content . $content_after;
219
 
includes/class-notification-content.php CHANGED
@@ -36,6 +36,8 @@ class ConstantContact_Notification_Content {
36
  * @since 1.0.0
37
  */
38
  public static function activation() {
 
 
39
 
40
  ob_start();
41
 
@@ -43,18 +45,31 @@ class ConstantContact_Notification_Content {
43
  <p class="ctct-notice-intro">
44
  <?php
45
  printf(
46
- esc_attr__( 'To take full advantage of the %s plugin, we recommend having an active Constant Contact account.', 'constant-contact-forms' ),
47
  '<strong>' . esc_attr__( 'Constant Contact Forms' ) . '</strong>'
48
  );
49
  ?>
50
  </p>
51
  <p>
52
- <a href="<?php echo esc_url_raw( constant_contact()->api->get_connect_link() ); ?>" class="ctct-notice-button button-primary">
53
  <?php esc_attr_e( 'Connect your account', 'constant-contact-forms' ); ?>
54
  </a>
55
- <a href="<?php echo esc_url_raw( constant_contact()->api->get_signup_link() ); ?>" class="ctct-notice-button button-secondary">
56
  <?php esc_attr_e( 'Try Us Free', 'constant-contact-forms' ); ?>
57
  </a>
 
 
 
 
 
 
 
 
 
 
 
 
 
58
  </p>
59
  <?php
60
 
@@ -65,13 +80,44 @@ class ConstantContact_Notification_Content {
65
  /**
66
  * Notification content for our 'too many lists' error
67
  *
68
- * @since 1.0.0
69
- * @return string notification text
 
70
  */
71
  public static function too_many_lists() {
72
  return __( 'You currently have a large number of lists in your Constant Contact account. You may experience some issues with syncing them.', 'constant-contact-forms' );
73
  }
74
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
75
  /**
76
  * Sample update notification for updating to 1.0.1
77
  *
@@ -87,3 +133,34 @@ class ConstantContact_Notification_Content {
87
  }
88
  }
89
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
  * @since 1.0.0
37
  */
38
  public static function activation() {
39
+ $auth_url = add_query_arg( array( 'rmc' => 'wp_admin_connect' ), constant_contact()->api->get_connect_link() );
40
+ $try_url = add_query_arg( array( 'rmc' => 'wp_admin_try' ), constant_contact()->api->get_signup_link() );
41
 
42
  ob_start();
43
 
45
  <p class="ctct-notice-intro">
46
  <?php
47
  printf(
48
+ esc_attr__( 'Get the most out of the %s plugin &mdash; use it with an active Constant Contact account.', 'constant-contact-forms' ),
49
  '<strong>' . esc_attr__( 'Constant Contact Forms' ) . '</strong>'
50
  );
51
  ?>
52
  </p>
53
  <p>
54
+ <a href="<?php echo esc_url_raw( $auth_url ); ?>" class="ctct-notice-button button-primary">
55
  <?php esc_attr_e( 'Connect your account', 'constant-contact-forms' ); ?>
56
  </a>
57
+ <a href="<?php echo esc_url_raw( $try_url ); ?>" class="ctct-notice-button button-secondary">
58
  <?php esc_attr_e( 'Try Us Free', 'constant-contact-forms' ); ?>
59
  </a>
60
+
61
+ <?php
62
+ $link_start = sprintf(
63
+ '<a href="%s">',
64
+ admin_url( 'edit.php?post_type=ctct_forms&page=ctct_options_about' )
65
+ );
66
+ printf(
67
+ /* translators: placeholders around "Learn More" hold html `<a>` tag. */
68
+ __( '%sLearn More%s about the power of email marketing.', 'constant-contact-forms' ),
69
+ $link_start,
70
+ '</a>'
71
+ )
72
+ ?>
73
  </p>
74
  <?php
75
 
80
  /**
81
  * Notification content for our 'too many lists' error
82
  *
83
+ * @since 1.0.0
84
+ *
85
+ * @return string Notification text.
86
  */
87
  public static function too_many_lists() {
88
  return __( 'You currently have a large number of lists in your Constant Contact account. You may experience some issues with syncing them.', 'constant-contact-forms' );
89
  }
90
 
91
+ /**
92
+ * Notification content for opt-in notice.
93
+ *
94
+ * @since 1.2.0
95
+ *
96
+ * @return string Notification text.
97
+ */
98
+ public static function optin_admin_notice() {
99
+ add_filter( 'wp_kses_allowed_html', 'constant_contact_filter_html_tags_for_optin' );
100
+
101
+ ob_start();
102
+ ?>
103
+
104
+ <div class="admin-notice-logo">
105
+ <img src="<?php echo constant_contact()->url; ?>/assets/images/ctct-admin-notice-logo.png" alt="<?php esc_attr_e( 'Constant Contact logo', 'constant-contact-forms' ); ?>" />
106
+ </div>
107
+ <div class="admin-notice-message"><h4><?php esc_html_e( 'Constant Contact Forms for WordPress data tracking opt-in', 'constant-contact-forms' ); ?></h4>
108
+ <div><input type="checkbox" id="ctct_admin_notice_tracking_optin" name="ctct_admin_notice_tracking_optin" value="yes" />
109
+ </div>
110
+ <div>
111
+ <?php _e( "Allow Constant Contact to use Google Analytics&trade; to track your usage across the Constant Contact Forms plugin.<br/>You can change this opt - in within the plugin's settings page at any time.", 'constant-contact-forms' ); ?>
112
+ </div>
113
+ </div>
114
+ <?php
115
+ $output = ob_get_clean();
116
+ // Be a good citizen, clean up after ourselves.
117
+ #remove_filter( 'wp_kses_allowed_html', 'constant_contact_filter_html_tags_for_optin' );
118
+ return $output;
119
+ }
120
+
121
  /**
122
  * Sample update notification for updating to 1.0.1
123
  *
133
  }
134
  }
135
 
136
+ /**
137
+ * Filters in the input to our allowed tags for our admin notice.
138
+ *
139
+ * @since 1.2.0
140
+ *
141
+ * @param array $allowedtags Allowed HTML.
142
+ * @return array Allowed HTML.
143
+ */
144
+ function constant_contact_filter_html_tags_for_optin( $allowedtags = array() ){
145
+ $allowedtags['input'] = array( 'type' => true, 'id' => true, 'name' => true, 'value' => true );
146
+ return $allowedtags;
147
+ }
148
+
149
+ /**
150
+ * Adds our opt-in notification to the notification system.
151
+ *
152
+ * @since 1.2.0
153
+ *
154
+ * @param array $notifications Array of notifications pending to show.
155
+ * @return array Array of notifications to show.
156
+ */
157
+ function constant_contact_add_optin_notification( $notifications = array() ) {
158
+
159
+ $notifications[] = array(
160
+ 'ID' => 'optin_admin_notice',
161
+ 'callback' => array( 'ConstantContact_Notification_Content', 'optin_admin_notice' ),
162
+ 'require_cb' => 'constant_contact_maybe_display_optin_notification',
163
+ );
164
+ return $notifications;
165
+ }
166
+ add_filter( 'constant_contact_notifications', 'constant_contact_add_optin_notification' );
includes/class-optin.php ADDED
@@ -0,0 +1,151 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Opt-in.
4
+ *
5
+ * @package ConstantContact
6
+ * @subpackage Optin
7
+ * @author Constant Contact
8
+ * @since 1.2.0
9
+ */
10
+
11
+ // Exit if accessed directly
12
+ if ( ! defined( 'ABSPATH' ) ) {
13
+ exit;
14
+ }
15
+
16
+
17
+ /**
18
+ * Optin for usage tracking.
19
+ */
20
+ class ConstantContact_Optin {
21
+
22
+ /**
23
+ * Get things going.
24
+ *
25
+ * @since 1.2.0
26
+ */
27
+ public function __construct( $plugin ) {
28
+ $this->plugin = $plugin;
29
+ add_action( 'init', array( $this, 'hooks' ) );
30
+ }
31
+
32
+ /**
33
+ * Execute our hooks, if requirements met.
34
+ *
35
+ * @since 1.2.0
36
+ */
37
+ public function hooks() {
38
+ if ( $this->can_track() && constant_contact()->is_constant_contact() ) {
39
+ add_action( 'admin_footer', array( $this, 'anonymous_tracking' ) );
40
+ }
41
+ if ( ! $this->privacy_policy_status() ) {
42
+ add_action( 'admin_footer', array( $this, 'privacy_notice_markup' ) );
43
+ }
44
+ }
45
+
46
+ /**
47
+ * Outputs our Analytics tracking code to the admin footer.
48
+ *
49
+ * @since 1.2.0
50
+ */
51
+ public function anonymous_tracking() {
52
+ ?>
53
+ <!-- Google Analytics -->
54
+ <script>
55
+ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
56
+ ga('create', 'UA-89027837-1', 'auto');
57
+ ga('send', 'pageview');
58
+ </script>
59
+ <!-- End Google Analytics -->
60
+ <?php
61
+ }
62
+
63
+ /**
64
+ * Determines whether or not we have been granted permission to do some tracking.
65
+ *
66
+ * @since 1.2.0
67
+ *
68
+ * @return bool
69
+ */
70
+ public function can_track() {
71
+ $can_track = false;
72
+
73
+ $options = get_option( constant_contact()->settings->key );
74
+ $optin = ( isset( $options['_ctct_data_tracking'] ) ) ? $options['_ctct_data_tracking'] : '';
75
+ $privacy = get_option( 'ctct_privacy_policy_status', '' );
76
+
77
+ if ( 'on' === $optin && 'true' === $privacy ) {
78
+ $can_track = true;
79
+ }
80
+ return $can_track;
81
+ }
82
+
83
+ /**
84
+ * Returns the status of our privacy policy acceptance.
85
+ *
86
+ * @since 1.2.0
87
+ *
88
+ * @return bool
89
+ */
90
+ public function privacy_policy_status() {
91
+ $status = get_option( 'ctct_privacy_policy_status', '' );
92
+ if ( '' === $status || 'false' === $status ) {
93
+ return false;
94
+ }
95
+ return true;
96
+ }
97
+
98
+ /**
99
+ * Outputs the markup for the privacy policy modal popup.
100
+ *
101
+ * @since 1.2.0
102
+ */
103
+ public function privacy_notice_markup() {
104
+ if ( ! constant_contact_maybe_display_optin_notification() ) {
105
+ return;
106
+ }
107
+
108
+ if ( $this->privacy_policy_status() ) {
109
+ return;
110
+ }
111
+ ?>
112
+ <div id="ctct-privacy-modal" class="ctct-modal">
113
+ <div class="ctct-modal-dialog" role="document">
114
+ <div class="ctct-modal-content">
115
+ <div class="ctct-modal-header">
116
+ <a href="#" class="ctct-modal-close" aria-hidden="true">&times;</a>
117
+ <h2 class="ctct-logo"><img src="<?php echo constant_contact()->url . '/assets/images/constant-contact-logo.png' ?>" alt="<?php esc_attr_e( 'Constant Contact logo', 'constant-contact-forms' ); ?>" /></h2>
118
+ </div>
119
+ <div class="ctct-modal-body ctct-privacy-modal-body">
120
+ <?php
121
+ echo $this->privacy_notice_modal_content();
122
+ ?>
123
+ </div><!-- modal body -->
124
+ <div id="ctct-modal-footer-privacy" class="ctct-modal-footer ctct-modal-footer-privacy">
125
+ <a class="button button-blue ctct-connect" data-agree="true"><?php esc_html_e( 'Agree', 'constant-contact-forms' ); ?></a>
126
+ <a class="button no-bg" data-agree="false"><?php esc_html_e( 'Disagree', 'constant-contact-forms' ); ?></a>
127
+ </div>
128
+ </div><!-- .modal-content -->
129
+ </div><!-- .modal-dialog -->
130
+ </div>
131
+ <?php
132
+ }
133
+
134
+ /**
135
+ * Returns the remote privacy policy page content for Constant Contact.
136
+ *
137
+ * @since 1.2.0
138
+ *
139
+ * @return mixed
140
+ */
141
+ public function privacy_notice_modal_content() {
142
+ $policy_output = wp_remote_get( 'https://www.constantcontact.com/legal/privacy-statement' );
143
+ if ( ! is_wp_error( $policy_output ) && 200 === wp_remote_retrieve_response_code( $policy_output ) ) {
144
+ $content = wp_remote_retrieve_body( $policy_output );
145
+ preg_match( '/<body[^>]*>(.*?)<\/body>/si', $content, $match );
146
+ $output = preg_replace( '@<(script|style)[^>]*?>.*?</\\1>@si', '', $match[1] );
147
+ $output = preg_replace( '@<section class=header>.*?</section>@si', '', $output );
148
+ return $output;
149
+ }
150
+ }
151
+ }
includes/class-process-form.php CHANGED
@@ -448,6 +448,7 @@ class ConstantContact_Process_Form {
448
  isset( $value['orig']['required'] ) &&
449
  $value['orig']['required'] &&
450
  // Skip Address Line 2.
 
451
  'line_2' !== $value['orig']['_ctct_map_select']
452
  ) {
453
  // If it was required, check for a value.
@@ -526,6 +527,10 @@ class ConstantContact_Process_Form {
526
  */
527
  public function process_wrapper( $form_data = array(), $form_id = '' ) {
528
 
 
 
 
 
529
  // Process our data, and get our response.
530
  $processed = $this->process_form();
531
 
448
  isset( $value['orig']['required'] ) &&
449
  $value['orig']['required'] &&
450
  // Skip Address Line 2.
451
+ isset( $value['orig']['_ctct_map_select'] ) &&
452
  'line_2' !== $value['orig']['_ctct_map_select']
453
  ) {
454
  // If it was required, check for a value.
527
  */
528
  public function process_wrapper( $form_data = array(), $form_id = '' ) {
529
 
530
+ if ( isset( $_POST['ctct-id'] ) && $form_id != absint( $_POST['ctct-id'] ) ) {
531
+ return false;
532
+ }
533
+
534
  // Process our data, and get our response.
535
  $processed = $this->process_form();
536
 
includes/class-settings.php CHANGED
@@ -14,49 +14,50 @@
14
  class ConstantContact_Settings {
15
 
16
  /**
17
- * Option key, and option page slug
18
  *
19
  * @var string
20
- * @since 1.0.0
21
  */
22
  private $key = 'ctct_options_settings';
23
 
24
  /**
25
- * Settings page metabox id
26
  *
27
  * @var string
28
- * @since 1.0.0
29
  */
30
  private $metabox_id = 'ctct_option_metabox_settings';
31
 
32
  /**
33
- * Settings Page title
34
  *
35
  * @var string
36
- * @since 1.0.0
37
  */
38
  protected $title = '';
39
 
40
  /**
41
- * Settings Page hook
42
  *
43
  * @var string
44
- * @since 1.0.0
45
  */
46
  protected $options_page = '';
47
 
48
  /**
49
- * Parent plugin class
50
  *
51
- * @var class
52
- * @since 0.0.1
53
  */
54
  protected $plugin = null;
55
 
56
  /**
57
  * Constructor
58
  *
59
- * @since 1.0.0
 
60
  * @param object $plugin parent plugin instance.
61
  */
62
  public function __construct( $plugin ) {
@@ -65,7 +66,7 @@ class ConstantContact_Settings {
65
  }
66
 
67
  /**
68
- * Initiate our hooks
69
  *
70
  * @since 1.0.0
71
  */
@@ -93,9 +94,9 @@ class ConstantContact_Settings {
93
  }
94
 
95
  /**
96
- * Hook in all our form opt-in injects, decide to show or not when we are at the display point
97
  *
98
- * @since 1.0.0
99
  */
100
  public function inject_optin_form_hooks() {
101
 
@@ -103,15 +104,21 @@ class ConstantContact_Settings {
103
  add_action( 'login_form', array( $this, 'optin_form_field_login' ) );
104
 
105
  // Comment Form.
106
- add_action( 'comment_form_after_fields', array( $this, 'optin_form_field_comment' ) );
107
 
108
  // Registration form.
109
  add_action( 'register_form', array( $this, 'optin_form_field_registration' ) );
110
  add_action( 'signup_extra_fields', array( $this, 'optin_form_field_registration' ) );
 
 
 
 
 
 
111
  }
112
 
113
  /**
114
- * Register our setting to WP
115
  *
116
  * @since 1.0.0
117
  */
@@ -120,38 +127,58 @@ class ConstantContact_Settings {
120
  }
121
 
122
  /**
123
- * Add menu options page
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
124
  *
125
  * @since 1.0.0
126
  */
127
  public function add_options_page() {
128
 
129
- // Only show our settings page if we're connected to CC.
130
- if ( constant_contact()->api->is_connected() ) {
131
-
132
- $this->options_page = add_submenu_page(
133
- 'edit.php?post_type=ctct_forms',
134
- __( 'Advanced Opt-in', 'constant-contact-forms' ),
135
- __( 'Advanced Opt-in', 'constant-contact-forms' ),
136
- 'manage_options',
137
- $this->key,
138
- array( $this, 'admin_page_display' )
139
- );
140
 
141
- // Include CMB CSS in the head to avoid FOUC.
142
- add_action( "admin_print_styles-{$this->options_page}", array( 'CMB2_hookup', 'enqueue_cmb_css' ) );
143
- }
144
  }
145
 
146
  /**
147
- * Admin page markup. Mostly handled by CMB2
148
  *
149
  * @since 1.0.0
150
  */
151
  public function admin_page_display() {
152
  ?>
153
  <div class="wrap cmb2-options-page <?php echo esc_attr( $this->key ); ?>">
154
- <h2><?php esc_attr_e( 'Advanced Opt-in', 'constant-contact-forms' ); ?></h2>
155
  <?php
156
  if ( function_exists( 'cmb2_metabox_form' ) ) {
157
  cmb2_metabox_form( $this->metabox_id, $this->key );
@@ -167,8 +194,9 @@ class ConstantContact_Settings {
167
  /**
168
  * Are we on the settings page?
169
  *
170
- * @since 1.0.0
171
- * @return boolean if we are on the settings page or not
 
172
  */
173
  public function on_settings_page() {
174
 
@@ -180,9 +208,9 @@ class ConstantContact_Settings {
180
  }
181
 
182
  /**
183
- * Add the options metabox to the array of metaboxes
184
  *
185
- * @since 1.0.0
186
  */
187
  function add_options_page_metabox() {
188
 
@@ -194,10 +222,10 @@ class ConstantContact_Settings {
194
 
195
  // Start our new field.
196
  $cmb = new_cmb2_box( array(
197
- 'id' => $this->metabox_id,
198
- 'hookup' => false,
199
  'cmb_styles' => false,
200
- 'show_on' => array(
201
  'key' => 'options-page',
202
  'value' => array( $this->key ),
203
  ),
@@ -209,82 +237,110 @@ class ConstantContact_Settings {
209
  }
210
 
211
  /**
212
- * Helper to show our lists field for settings
 
 
213
  *
214
- * @since 1.0.0
215
  * @param object $cmb CMB fields object.
216
  */
217
  public function do_lists_field( $cmb ) {
218
 
219
- // Get our lists.
220
- $lists = constant_contact()->builder->get_lists();
 
 
 
 
221
 
222
- if ( $lists && is_array( $lists ) ) {
 
223
 
224
- // Set our CMB2 fields.
225
  $cmb->add_field( array(
226
- 'name' => __( 'Opt-in Location', 'constant-contact-forms' ),
227
- 'id' => '_ctct_optin_forms',
228
- 'type' => 'multicheck',
229
- 'options' => $this->get_optin_show_options(),
 
230
  ) );
231
 
232
- // Tack on 'select a list' to our lists array.
233
- $lists[0] = __( 'Select a list', 'constant-contact-forms' );
234
 
235
- $cmb->add_field( array(
236
- 'name' => __( 'Add subscribers to', 'constant-contact-forms' ),
237
- 'id' => '_ctct_optin_list',
238
- 'type' => 'select',
239
- 'show_option_none' => false,
240
- 'default' => __( 'Select a list', 'constant-contact-forms' ),
241
- 'options' => $lists,
242
- ) );
243
 
244
- // Get the business name and address.
245
- $business_name = get_bloginfo( 'name' ) ?: __( 'Business Name', 'constant-contact-forms' );
246
- $business_addr = '';
 
247
 
248
- // We might be able to get it from the API?
249
- $disclosure_info = $this->plugin->api->get_disclosure_info( true );
250
- if ( ! empty( $disclosure_info ) ) {
251
- // Make sure no one can edit.
252
- $business_name = $disclosure_info['name'] ?: $business_name;
253
- $business_addr = isset( $disclosure_info['address'] ) ?: '';
254
- }
 
255
 
256
- $cmb->add_field( array(
257
- 'name' => __( 'Opt-in Affirmation', 'constant-contact-forms' ),
258
- 'id' => '_ctct_optin_label',
259
- 'type' => 'text',
260
- 'default' => sprintf( __( 'Yes, I would like to receive emails from %s. Sign me up!', 'constant-contact-forms' ), $business_name ),
261
- ) );
262
 
263
- if ( empty( $disclosure_info ) ) {
264
  $cmb->add_field( array(
265
- 'name' => __( 'Disclosure Name', 'constant-contact-forms' ),
266
- 'id' => '_ctct_disclose_name',
267
- 'type' => 'text',
268
- 'default' => $business_name,
269
- 'attributes' => strlen( $business_name ) ? array( 'readonly' => 'readonly' ) : array(),
 
270
  ) );
271
 
 
 
 
 
 
 
 
 
 
 
 
 
272
  $cmb->add_field( array(
273
- 'name' => __( 'Disclosure Address', 'constant-contact-forms' ),
274
- 'id' => '_ctct_disclose_address',
275
- 'type' => 'text',
276
- 'default' => $business_addr,
277
- 'attributes' => strlen( $business_addr ) ? array( 'readonly' => 'readonly' ) : array(),
278
  ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
279
  }
280
  }
281
  }
282
 
283
  /**
284
- * Get array of options for our 'optin show' settings
285
  *
286
- * @since 1.0.0
287
- * @return array array of options
 
288
  */
289
  public function get_optin_show_options() {
290
 
@@ -307,9 +363,10 @@ class ConstantContact_Settings {
307
  * Based on a type of form we pass in, check if the saved option
308
  * for that form is checked or not in the admin
309
  *
310
- * @since 1.0.0
 
311
  * @param string $type Allowed values: 'login_form', 'comment_form', 'reg_form'.
312
- * @return boolean if should show or not
313
  */
314
  public function check_if_optin_should_show( $type ) {
315
 
@@ -331,8 +388,7 @@ class ConstantContact_Settings {
331
  * and determine whether or not they should have been hooked in when we get
332
  * to displaying them, rather than on potentially pages we dont care about.
333
  *
334
- * @since 1.0.0
335
- * @return void
336
  */
337
  public function optin_form_field_login() {
338
 
@@ -343,10 +399,9 @@ class ConstantContact_Settings {
343
  }
344
 
345
  /**
346
- * Potentially add our opt-in form to comment forms
347
  *
348
- * @since 1.0.0
349
- * @return void
350
  */
351
  public function optin_form_field_comment() {
352
 
@@ -357,10 +412,9 @@ class ConstantContact_Settings {
357
  }
358
 
359
  /**
360
- * Potentially add our opt-in form to the registration form
361
  *
362
- * @since 1.0.0
363
- * @return void
364
  */
365
  public function optin_form_field_registration() {
366
 
@@ -371,10 +425,9 @@ class ConstantContact_Settings {
371
  }
372
 
373
  /**
374
- * Opt in field checkbox
375
  *
376
  * @since 1.0.0
377
- * @return void
378
  */
379
  public function optin_form_field() {
380
 
@@ -395,17 +448,19 @@ class ConstantContact_Settings {
395
  <input type="checkbox" value="<?php echo esc_attr( $list ); ?>" class="checkbox" id="ctct_optin" name="ctct_optin_list" />
396
  <?php echo esc_attr( $label ); ?>
397
  </label>
 
398
  <?php wp_nonce_field( 'ct_ct_add_to_optin', 'ct_ct_optin', true, true ); ?>
399
  </p><?php
400
 
401
  }
402
 
403
  /**
404
- * Sends contact to CTCT if optin checked
405
  *
406
- * @since 1.0.0
407
- * @param array $comment_data comment form data.
408
- * @return array comment form data
 
409
  */
410
  public function process_optin_comment_form( $comment_data ) {
411
 
@@ -429,11 +484,12 @@ class ConstantContact_Settings {
429
  }
430
 
431
  /**
432
- * Process our comment data and send to CC
 
 
433
  *
434
- * @since 1.0.0
435
  * @param array $comment_data Array of comment data.
436
- * @return array passed in comment data
437
  */
438
  public function _process_comment_data_for_optin( $comment_data ) {
439
 
@@ -645,6 +701,72 @@ class ConstantContact_Settings {
645
 
646
  throw new Exception( 'Invalid property: ' . $field );
647
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
648
  }
649
 
650
  /**
14
  class ConstantContact_Settings {
15
 
16
  /**
17
+ * Option key, and option page slug.
18
  *
19
  * @var string
20
+ * @since 1.0.0
21
  */
22
  private $key = 'ctct_options_settings';
23
 
24
  /**
25
+ * Settings page metabox id.
26
  *
27
  * @var string
28
+ * @since 1.0.0
29
  */
30
  private $metabox_id = 'ctct_option_metabox_settings';
31
 
32
  /**
33
+ * Settings Page title.
34
  *
35
  * @var string
36
+ * @since 1.0.0
37
  */
38
  protected $title = '';
39
 
40
  /**
41
+ * Settings Page hook.
42
  *
43
  * @var string
44
+ * @since 1.0.0
45
  */
46
  protected $options_page = '';
47
 
48
  /**
49
+ * Parent plugin class.
50
  *
51
+ * @var class
52
+ * @since 1.0.0
53
  */
54
  protected $plugin = null;
55
 
56
  /**
57
  * Constructor
58
  *
59
+ * @since 1.0.0
60
+ *
61
  * @param object $plugin parent plugin instance.
62
  */
63
  public function __construct( $plugin ) {
66
  }
67
 
68
  /**
69
+ * Initiate our hooks.
70
  *
71
  * @since 1.0.0
72
  */
94
  }
95
 
96
  /**
97
+ * Hook in all our form opt-in injects, decide to show or not when we are at the display point.
98
  *
99
+ * @since 1.0.0
100
  */
101
  public function inject_optin_form_hooks() {
102
 
104
  add_action( 'login_form', array( $this, 'optin_form_field_login' ) );
105
 
106
  // Comment Form.
107
+ add_action( 'comment_form', array( $this, 'optin_form_field_comment' ) );
108
 
109
  // Registration form.
110
  add_action( 'register_form', array( $this, 'optin_form_field_registration' ) );
111
  add_action( 'signup_extra_fields', array( $this, 'optin_form_field_registration' ) );
112
+ add_action( 'login_head', array( $this, 'optin_form_field_login_css' ) );
113
+ add_action( 'admin_enqueue_scripts', array( $this, 'scripts' ) );
114
+
115
+ if ( ! $this->privacy_policy_status() ) {
116
+ add_action( 'admin_footer', array( $this, 'privacy_notice_markup' ) );
117
+ }
118
  }
119
 
120
  /**
121
+ * Register our setting to WP.
122
  *
123
  * @since 1.0.0
124
  */
127
  }
128
 
129
  /**
130
+ * Add some login page CSS.
131
+ *
132
+ * @since 1.2.0
133
+ */
134
+ public function optin_form_field_login_css() {
135
+ ?>
136
+ <style>
137
+ .login .ctct-disclosure {
138
+ margin: 0 0 15px;
139
+ }
140
+ </style>
141
+ <?php
142
+ }
143
+
144
+ /**
145
+ * Enqueue our styles.
146
+ *
147
+ * @since unknown.
148
+ */
149
+ public function scripts() {
150
+ wp_enqueue_style( 'constant-contact-forms' );
151
+ }
152
+
153
+ /**
154
+ * Add menu options page.
155
  *
156
  * @since 1.0.0
157
  */
158
  public function add_options_page() {
159
 
160
+ $this->options_page = add_submenu_page(
161
+ 'edit.php?post_type=ctct_forms',
162
+ __( 'Constant Contact Forms Settings', 'constant-contact-forms' ),
163
+ __( 'Settings', 'constant-contact-forms' ),
164
+ 'manage_options',
165
+ $this->key,
166
+ array( $this, 'admin_page_display' )
167
+ );
 
 
 
168
 
169
+ // Include CMB CSS in the head to avoid FOUC.
170
+ add_action( "admin_print_styles-{$this->options_page}", array( 'CMB2_hookup', 'enqueue_cmb_css' ) );
 
171
  }
172
 
173
  /**
174
+ * Admin page markup. Mostly handled by CMB2.
175
  *
176
  * @since 1.0.0
177
  */
178
  public function admin_page_display() {
179
  ?>
180
  <div class="wrap cmb2-options-page <?php echo esc_attr( $this->key ); ?>">
181
+ <h2><?php echo get_admin_page_title(); ?></h2>
182
  <?php
183
  if ( function_exists( 'cmb2_metabox_form' ) ) {
184
  cmb2_metabox_form( $this->metabox_id, $this->key );
194
  /**
195
  * Are we on the settings page?
196
  *
197
+ * @since 1.0.0
198
+ *
199
+ * @return boolean If we are on the settings page or not.
200
  */
201
  public function on_settings_page() {
202
 
208
  }
209
 
210
  /**
211
+ * Add the options metabox to the array of metaboxes.
212
  *
213
+ * @since 1.0.0
214
  */
215
  function add_options_page_metabox() {
216
 
222
 
223
  // Start our new field.
224
  $cmb = new_cmb2_box( array(
225
+ 'id' => $this->metabox_id,
226
+ 'hookup' => false,
227
  'cmb_styles' => false,
228
+ 'show_on' => array(
229
  'key' => 'options-page',
230
  'value' => array( $this->key ),
231
  ),
237
  }
238
 
239
  /**
240
+ * Helper to show our lists field for settings.
241
+ *
242
+ * @since 1.0.0
243
  *
 
244
  * @param object $cmb CMB fields object.
245
  */
246
  public function do_lists_field( $cmb ) {
247
 
248
+ $cmb->add_field( array(
249
+ 'name' => __( 'Google Analytics&trade; tracking opt-in.', 'constant-contact-forms' ),
250
+ 'id' => '_ctct_data_tracking',
251
+ 'type' => 'checkbox',
252
+ 'desc' => __( 'Allow Constant Contact to use Google Analytics&trade; to track your usage across the Constant Contact Forms plugin.<br/> NOTE &mdash; Your website and users will not be tracked. See our <a href="https://www.constantcontact.com/legal/privacy-statement"> Privacy Statement</a> information about what is and is not tracked.', 'constant-contact-forms' ),
253
+ ) );
254
 
255
+ // Only show our settings page if we're connected to CC.
256
+ if ( constant_contact()->api->is_connected() ) {
257
 
258
+ // Add field to disable e-mail notifications.
259
  $cmb->add_field( array(
260
+ 'name' => __( 'Disable E-mail Notifications', 'constant-contact-forms' ),
261
+ 'desc' => __( 'This option will disable e-mail notifications when someone submits a form and you have a connected Constant Contact account.', 'constant-contact-forms' ),
262
+ 'id' => '_ctct_disable_email_notifications',
263
+ 'type' => 'checkbox',
264
+ 'before_row' => '<hr/>',
265
  ) );
266
 
267
+ // Get our lists.
268
+ $lists = constant_contact()->builder->get_lists();
269
 
270
+ if ( $lists && is_array( $lists ) ) {
 
 
 
 
 
 
 
271
 
272
+ $before_optin = sprintf(
273
+ '<hr/><h2>%s</h2>',
274
+ esc_html__( 'Advanced Opt-in', 'constant-contact-forms' )
275
+ );
276
 
277
+ // Set our CMB2 fields.
278
+ $cmb->add_field( array(
279
+ 'name' => __( 'Opt-in Location', 'constant-contact-forms' ),
280
+ 'id' => '_ctct_optin_forms',
281
+ 'type' => 'multicheck',
282
+ 'options' => $this->get_optin_show_options(),
283
+ 'before_row' => $before_optin,
284
+ ) );
285
 
286
+ // Tack on 'select a list' to our lists array.
287
+ $lists[0] = __( 'Select a list', 'constant-contact-forms' );
 
 
 
 
288
 
 
289
  $cmb->add_field( array(
290
+ 'name' => __( 'Add subscribers to', 'constant-contact-forms' ),
291
+ 'id' => '_ctct_optin_list',
292
+ 'type' => 'select',
293
+ 'show_option_none' => false,
294
+ 'default' => __( 'Select a list', 'constant-contact-forms' ),
295
+ 'options' => $lists,
296
  ) );
297
 
298
+ // Get the business name and address.
299
+ $business_name = get_bloginfo( 'name' ) ?: __( 'Business Name', 'constant-contact-forms' );
300
+ $business_addr = '';
301
+
302
+ // We might be able to get it from the API?
303
+ $disclosure_info = $this->plugin->api->get_disclosure_info( true );
304
+ if ( ! empty( $disclosure_info ) ) {
305
+ // Make sure no one can edit.
306
+ $business_name = $disclosure_info['name'] ?: $business_name;
307
+ $business_addr = isset( $disclosure_info['address'] ) ?: '';
308
+ }
309
+
310
  $cmb->add_field( array(
311
+ 'name' => __( 'Opt-in Affirmation', 'constant-contact-forms' ),
312
+ 'id' => '_ctct_optin_label',
313
+ 'type' => 'text',
314
+ 'default' => sprintf( __( 'Yes, I would like to receive emails from %s. Sign me up!', 'constant-contact-forms' ), $business_name ),
 
315
  ) );
316
+
317
+ if ( empty( $disclosure_info ) ) {
318
+ $cmb->add_field( array(
319
+ 'name' => __( 'Disclosure Name', 'constant-contact-forms' ),
320
+ 'id' => '_ctct_disclose_name',
321
+ 'type' => 'text',
322
+ 'default' => $business_name,
323
+ 'attributes' => strlen( $business_name ) ? array( 'readonly' => 'readonly' ) : array(),
324
+ ) );
325
+
326
+ $cmb->add_field( array(
327
+ 'name' => __( 'Disclosure Address', 'constant-contact-forms' ),
328
+ 'id' => '_ctct_disclose_address',
329
+ 'type' => 'text',
330
+ 'default' => $business_addr,
331
+ 'attributes' => strlen( $business_addr ) ? array( 'readonly' => 'readonly' ) : array(),
332
+ ) );
333
+ }
334
  }
335
  }
336
  }
337
 
338
  /**
339
+ * Get array of options for our 'optin show' settings.
340
  *
341
+ * @since 1.0.0
342
+ *
343
+ * @return array Array of options.
344
  */
345
  public function get_optin_show_options() {
346
 
363
  * Based on a type of form we pass in, check if the saved option
364
  * for that form is checked or not in the admin
365
  *
366
+ * @since 1.0.0
367
+ *
368
  * @param string $type Allowed values: 'login_form', 'comment_form', 'reg_form'.
369
+ * @return boolean If should show or not.
370
  */
371
  public function check_if_optin_should_show( $type ) {
372
 
388
  * and determine whether or not they should have been hooked in when we get
389
  * to displaying them, rather than on potentially pages we dont care about.
390
  *
391
+ * @since 1.0.0
 
392
  */
393
  public function optin_form_field_login() {
394
 
399
  }
400
 
401
  /**
402
+ * Potentially add our opt-in form to comment forms.
403
  *
404
+ * @since 1.0.0
 
405
  */
406
  public function optin_form_field_comment() {
407
 
412
  }
413
 
414
  /**
415
+ * Potentially add our opt-in form to the registration form.
416
  *
417
+ * @since 1.0.0
 
418
  */
419
  public function optin_form_field_registration() {
420
 
425
  }
426
 
427
  /**
428
+ * Opt in field checkbox.
429
  *
430
  * @since 1.0.0
 
431
  */
432
  public function optin_form_field() {
433
 
448
  <input type="checkbox" value="<?php echo esc_attr( $list ); ?>" class="checkbox" id="ctct_optin" name="ctct_optin_list" />
449
  <?php echo esc_attr( $label ); ?>
450
  </label>
451
+ <?php echo constant_contact()->display->get_disclose_text(); ?>
452
  <?php wp_nonce_field( 'ct_ct_add_to_optin', 'ct_ct_optin', true, true ); ?>
453
  </p><?php
454
 
455
  }
456
 
457
  /**
458
+ * Sends contact to CTCT if optin checked.
459
  *
460
+ * @since 1.0.0
461
+ *
462
+ * @param array $comment_data comment form data.
463
+ * @return array Comment form data.
464
  */
465
  public function process_optin_comment_form( $comment_data ) {
466
 
484
  }
485
 
486
  /**
487
+ * Process our comment data and send to CC.
488
+ *
489
+ * @since 1.0.0
490
  *
 
491
  * @param array $comment_data Array of comment data.
492
+ * @return array Passed in comment data
493
  */
494
  public function _process_comment_data_for_optin( $comment_data ) {
495
 
701
 
702
  throw new Exception( 'Invalid property: ' . $field );
703
  }
704
+
705
+ /**
706
+ * Returns the status of our privacy policy acceptance.
707
+ *
708
+ * @since 1.2.0
709
+ *
710
+ * @return bool
711
+ */
712
+ public function privacy_policy_status() {
713
+ $status = get_option( 'ctct_privacy_policy_status', '' );
714
+ if ( '' === $status || 'false' === $status ) {
715
+ return false;
716
+ }
717
+
718
+ return true;
719
+ }
720
+
721
+ /**
722
+ * Outputs the markup for the privacy policy modal popup.
723
+ *
724
+ * @since 1.2.0
725
+ */
726
+ public function privacy_notice_markup() {
727
+ if ( $this->privacy_policy_status() ) {
728
+ return;
729
+ }
730
+ ?>
731
+ <div id="ctct-privacy-modal" class="ctct-modal">
732
+ <div class="ctct-modal-dialog" role="document">
733
+ <div class="ctct-modal-content">
734
+ <div class="ctct-modal-header">
735
+ <a href="#" class="ctct-modal-close" aria-hidden="true">&times;</a>
736
+ <h2 class="ctct-logo"><img src="<?php echo constant_contact()->url . '/assets/images/constant-contact-logo.png' ?>" alt="<?php esc_attr_e( 'Constant Contact logo', 'constant-contact-forms' ); ?>" /></h2>
737
+ </div>
738
+ <div class="ctct-modal-body ctct-privacy-modal-body">
739
+ <?php
740
+ echo $this->privacy_notice_modal_content();
741
+ ?>
742
+ </div><!-- modal body -->
743
+ <div id="ctct-modal-footer-privacy" class="ctct-modal-footer ctct-modal-footer-privacy">
744
+ <a class="button button-blue ctct-connect" data-agree="true"><?php esc_html_e( 'Agree', 'constant-contact-forms' ); ?></a>
745
+ <a class="button no-bg" data-agree="false"><?php esc_html_e( 'Disagree', 'constant-contact-forms' ); ?></a>
746
+ </div>
747
+ </div><!-- .modal-content -->
748
+ </div><!-- .modal-dialog -->
749
+ </div>
750
+ <?php
751
+ }
752
+
753
+ /**
754
+ * Returns the remote privacy policy page content for Constant Contact.
755
+ *
756
+ * @since 1.2.0
757
+ *
758
+ * @return mixed
759
+ */
760
+ public function privacy_notice_modal_content() {
761
+ $policy_output = wp_remote_get( 'https://www.constantcontact.com/legal/privacy-statement' );
762
+ if ( ! is_wp_error( $policy_output ) && 200 === wp_remote_retrieve_response_code( $policy_output ) ) {
763
+ $content = wp_remote_retrieve_body( $policy_output );
764
+ preg_match( '/<body[^>]*>(.*?)<\/body>/si', $content, $match );
765
+ $output = preg_replace( '@<(script|style)[^>]*?>.*?</\\1>@si', '', $match[1] );
766
+ $output = preg_replace( '@<section class=header>.*?</section>@si', '', $output );
767
+ return $output;
768
+ }
769
+ }
770
  }
771
 
772
  /**
includes/class-shortcode-admin.php CHANGED
@@ -65,15 +65,25 @@ if ( class_exists( 'WDS_Shortcodes', false ) && ! class_exists( 'ConstantContact
65
  * @return array $fields
66
  */
67
  public function fields( $fields, $button_data ) {
 
68
 
69
- $fields[] = array(
70
  'name' => __( 'Form Shortcode', 'constant-contact-forms' ),
71
  'id' => '_ctct_form',
72
  'type' => 'select',
73
  'show_option_none' => false,
74
- 'options' => constant_contact()->cpts->get_forms( true ),
75
  );
76
 
 
 
 
 
 
 
 
 
 
77
  return $fields;
78
  }
79
 
65
  * @return array $fields
66
  */
67
  public function fields( $fields, $button_data ) {
68
+ $forms = constant_contact()->cpts->get_forms( true );
69
 
70
+ $args = array(
71
  'name' => __( 'Form Shortcode', 'constant-contact-forms' ),
72
  'id' => '_ctct_form',
73
  'type' => 'select',
74
  'show_option_none' => false,
75
+ 'options' => $forms,
76
  );
77
 
78
+ if ( empty( $forms ) ) {
79
+ $args['before'] = sprintf(
80
+ __( '<p>No forms available. Visit your <a href="%s">forms list</a> to create one.</p>', 'constant-contact-forms' ),
81
+ admin_url( 'edit.php?post_type=ctct_forms' )
82
+ );
83
+ }
84
+
85
+ $fields[] = $args;
86
+
87
  return $fields;
88
  }
89
 
includes/helper-functions.php CHANGED
@@ -8,40 +8,44 @@
8
  */
9
 
10
  /**
11
- * Checks to see if a user is connected to Constant Contact or not
12
  *
13
- * @since 1.0.0
14
- * @return boolean whether or not they are connected
 
15
  */
16
  function constant_contact_is_connected() {
17
  return ( constant_contact()->api->is_connected() );
18
  }
19
 
20
  /**
21
- * Checks to see if a user is not connected to Constant Contact or not
 
 
22
  *
23
- * @since 1.0.0
24
- * @return boolean whether or not they are NOT connected
25
  */
26
  function constant_contact_is_not_connected() {
27
  return ! ( constant_contact()->api->is_connected() );
28
  }
29
 
30
  /**
31
- * Get a form's markup without using a shortcode
32
  *
33
  * @since 1.0.0
 
34
  * @param int $form_id Form post ID to grab.
35
- * @return string HTML markup
36
  */
37
  function constant_contact_get_form( $form_id ) {
38
  return constant_contact()->display_shortcode->get_form( $form_id );
39
  }
40
 
41
  /**
42
- * Get a form and display it without using a shortcode
43
  *
44
  * @since 1.0.0
 
45
  * @param int $form_id Form post ID to grab.
46
  */
47
  function constant_contact_display_form( $form_id ) {
@@ -49,11 +53,93 @@ function constant_contact_display_form( $form_id ) {
49
  }
50
 
51
  /**
52
- * Get an array of forms
 
 
53
  *
54
- * @since 1.0.0
55
  * @return array WP_Query results of forms.
56
  */
57
  function constant_contact_get_forms() {
58
  return constant_contact()->cpts->get_forms( false, true );
59
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  */
9
 
10
  /**
11
+ * Checks to see if a user is connected to Constant Contact or not.
12
  *
13
+ * @since 1.0.0
14
+ *
15
+ * @return boolean Whether or not they are connected
16
  */
17
  function constant_contact_is_connected() {
18
  return ( constant_contact()->api->is_connected() );
19
  }
20
 
21
  /**
22
+ * Checks to see if a user is not connected to Constant Contact or not.
23
+ *
24
+ * @since 1.0.0
25
  *
26
+ * @return boolean Whether or not they are NOT connected
 
27
  */
28
  function constant_contact_is_not_connected() {
29
  return ! ( constant_contact()->api->is_connected() );
30
  }
31
 
32
  /**
33
+ * Get a form's markup without using a shortcode.
34
  *
35
  * @since 1.0.0
36
+ *
37
  * @param int $form_id Form post ID to grab.
38
+ * @return string HTML markup
39
  */
40
  function constant_contact_get_form( $form_id ) {
41
  return constant_contact()->display_shortcode->get_form( $form_id );
42
  }
43
 
44
  /**
45
+ * Get a form and display it without using a shortcode.
46
  *
47
  * @since 1.0.0
48
+ *
49
  * @param int $form_id Form post ID to grab.
50
  */
51
  function constant_contact_display_form( $form_id ) {
53
  }
54
 
55
  /**
56
+ * Get an array of forms.
57
+ *
58
+ * @since 1.0.0
59
  *
 
60
  * @return array WP_Query results of forms.
61
  */
62
  function constant_contact_get_forms() {
63
  return constant_contact()->cpts->get_forms( false, true );
64
  }
65
+
66
+ /**
67
+ * Render a shortcode for display, not for parsing.
68
+ *
69
+ * @since 1.2.0
70
+ *
71
+ * @param $form_id Form ID to provide in the output.
72
+ * @return string Non-parsed shortcode.
73
+ */
74
+ function constant_contact_display_shortcode( $form_id ) {
75
+ return sprintf( '[ctct form="%s"]', $form_id );
76
+ }
77
+
78
+ /**
79
+ * Maybe display the opt-in notification on the dashboard.
80
+ *
81
+ * @since 1.2.0
82
+ *
83
+ * @return bool
84
+ */
85
+ function constant_contact_maybe_display_optin_notification() {
86
+
87
+ if ( ! function_exists( 'get_current_screen' ) ) {
88
+ return false;
89
+ }
90
+
91
+ $current_screen = get_current_screen();
92
+ if ( ! is_object( $current_screen ) || 'dashboard' !== $current_screen->base ) {
93
+ return false;
94
+ }
95
+
96
+ if ( ! current_user_can( 'manage_options' ) ) {
97
+ return false;
98
+ }
99
+
100
+ $privacy = get_option( 'ctct_privacy_policy_status', '' );
101
+
102
+ if ( '' !== $privacy ) {
103
+ return false;
104
+ }
105
+
106
+ return true;
107
+ }
108
+
109
+ /**
110
+ * Handle the optin checkbox for the admin notice.
111
+ *
112
+ * @since 1.2.0
113
+ */
114
+ function constant_contact_optin_ajax_handler() {
115
+
116
+ $response = $_REQUEST;
117
+
118
+ if ( ! isset( $response['optin'] ) || 'on' !== $response['optin'] ) {
119
+ wp_send_json_success( array( 'opted-in' => 'off' ) );
120
+ }
121
+
122
+ $options = get_option( constant_contact()->settings->key );
123
+ $options['_ctct_data_tracking'] = $response['optin'];
124
+ update_option( constant_contact()->settings->key, $options );
125
+
126
+ wp_send_json_success( array( 'opted-in' => 'on' ) );
127
+ exit();
128
+ }
129
+ add_action( 'wp_ajax_constant_contact_optin_ajax_handler', 'constant_contact_optin_ajax_handler' );
130
+
131
+ /**
132
+ * Handle the privacy policy agreement or disagreement selection.
133
+ *
134
+ * @since 1.2.0
135
+ */
136
+ function constant_contact_privacy_ajax_handler() {
137
+
138
+ $response = $_REQUEST;
139
+ $agreed = sanitize_text_field( $response['privacy_agree'] );
140
+ update_option( 'ctct_privacy_policy_status', $agreed );
141
+
142
+ wp_send_json_success( array( 'updated' => 'true' ) );
143
+ exit();
144
+ }
145
+ add_action( 'wp_ajax_constant_contact_privacy_ajax_handler', 'constant_contact_privacy_ajax_handler' );
includes/widgets/contact-form-select.php CHANGED
@@ -113,7 +113,7 @@ class ConstantContactWidget extends WP_Widget {
113
  public function get_forms() {
114
  $args = array(
115
  'post_type' => 'ctct_forms',
116
- 'posts_per_page' => - 1,
117
  'orderby' => 'title',
118
  );
119
  $forms = new WP_Query( $args );
113
  public function get_forms() {
114
  $args = array(
115
  'post_type' => 'ctct_forms',
116
+ 'posts_per_page' => -1,
117
  'orderby' => 'title',
118
  );
119
  $forms = new WP_Query( $args );
languages/constant-contact-forms.pot CHANGED
@@ -3,10 +3,10 @@ msgid ""
3
  msgstr ""
4
  "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
5
  "Project-Id-Version: Constant Contact Forms for WordPress\n"
6
- "POT-Creation-Date: 2016-11-30 14:07-0600\n"
7
- "PO-Revision-Date: 2016-10-26 11:35-0500\n"
8
  "Last-Translator: Michael Beckwith <michael.d.beckwith@gmail.com>\n"
9
- "Language-Team: Michael Beckwith <michael.d.beckwith@gmail.com>\n"
10
  "MIME-Version: 1.0\n"
11
  "Content-Type: text/plain; charset=UTF-8\n"
12
  "Content-Transfer-Encoding: 8bit\n"
@@ -21,184 +21,238 @@ msgstr ""
21
  "X-Poedit-SearchPathExcluded-0: *.js\n"
22
  "X-Poedit-SearchPathExcluded-1: vendor\n"
23
  "X-Poedit-SearchPathExcluded-2: tests\n"
 
24
 
25
  #. Author of the plugin/theme
26
- #: constant-contact-forms.php:201 includes/class-builder.php:309
27
  #: includes/class-cpts.php:95 includes/class-cpts.php:153
28
  msgid "Constant Contact"
29
  msgstr ""
30
 
31
  #: constant-contact-forms.php:232
32
  msgid ""
33
- "This plugin requires PHP 5.4 or higher. Your hosting provider or website "
34
- "administrator should be able to assist in updating your PHP version."
35
  msgstr ""
36
 
37
- #: constant-contact-forms.php:533
38
  msgid "Error loading license."
39
  msgstr ""
40
 
41
- #: includes/class-admin-pages.php:87
42
  msgid "This is a sample help header"
43
  msgstr ""
44
 
45
- #: includes/class-admin-pages.php:88
46
  msgid "This is some sample help text."
47
  msgstr ""
48
 
49
- #: includes/class-admin-pages.php:91
50
  msgid "This is another sample header"
51
  msgstr ""
52
 
53
- #: includes/class-admin-pages.php:92
54
  msgid "This is also some sample help text."
55
  msgstr ""
56
 
57
- #: includes/class-admin-pages.php:114
58
  msgid "Is this a sample question?"
59
  msgstr ""
60
 
61
- #: includes/class-admin-pages.php:115
62
  msgid "This is a sample answer"
63
  msgstr ""
64
 
65
- #: includes/class-admin-pages.php:118
66
  msgid "This is also a sample question"
67
  msgstr ""
68
 
69
- #: includes/class-admin-pages.php:119
70
  msgid "This is another sample answer"
71
  msgstr ""
72
 
73
- #: includes/class-admin-pages.php:136
74
  msgid "Help / FAQ"
75
  msgstr ""
76
 
77
- #: includes/class-admin-pages.php:143
78
  msgid "Help"
79
  msgstr ""
80
 
81
- #: includes/class-admin-pages.php:177
82
  msgid "FAQ"
83
  msgstr ""
84
 
85
- #: includes/class-admin-pages.php:241
86
- #: includes/class-notification-content.php:47
87
  msgid "Constant Contact Forms"
88
  msgstr ""
89
 
90
- #: includes/class-admin-pages.php:244
91
  msgid ""
92
  "This plugin makes it fast and easy to capture all kinds of visitor "
93
- "information right from your WordPress site—even if you dont have a Constant "
94
  "Contact account."
95
  msgstr ""
96
 
97
- #: includes/class-admin-pages.php:247
98
  msgid ""
99
- "Whether youre looking to collect email addresses, contact info, event sign-"
100
  "ups, or visitor feedback, you can customize your forms with data fields that "
101
  "work best for you."
102
  msgstr ""
103
 
104
- #: includes/class-admin-pages.php:249
105
  msgid ""
106
  "Quickly create different types of forms that are clear, simple, and mobile-"
107
  "optimized."
108
  msgstr ""
109
 
110
- #: includes/class-admin-pages.php:250
111
  msgid ""
112
  "Choose forms that automatically select the theme and style of your WordPress "
113
  "site."
114
  msgstr ""
115
 
116
- #: includes/class-admin-pages.php:251
117
  msgid ""
118
  "Customize the form data fields, so you can tailor the type of information "
119
  "you collect."
120
  msgstr ""
121
 
122
- #: includes/class-admin-pages.php:255
 
 
 
 
 
 
 
 
123
  msgid ""
124
- "Using your sign-up forms to collect email addresses? Email marketing is a "
125
- "great way to stay connected with visitors after theyve left your site. And "
126
- "with an active Constant Contact account, every new subscriber you capture "
127
- "will be automatically added to your selected email lists. "
 
 
 
128
  msgstr ""
129
 
130
- #: includes/class-admin-pages.php:258 includes/class-connect.php:220
 
 
 
 
 
 
 
 
131
  msgid "Try us Free"
132
  msgstr ""
133
 
134
- #: includes/class-admin-pages.php:268
135
  msgid "Already have a Constant Contact account?"
136
  msgstr ""
137
 
138
- #: includes/class-admin-pages.php:270
139
- msgid "Connect the plugin"
140
  msgstr ""
141
 
142
- #: includes/class-admin-pages.php:279
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
143
  msgid "Powerful Email Marketing, Made Simple."
144
  msgstr ""
145
 
146
- #: includes/class-admin-pages.php:282
147
  msgid "Create professional emails that bring customers to your door"
148
  msgstr ""
149
 
150
- #: includes/class-admin-pages.php:286
151
  msgid ""
152
  "Email marketing is good for your business. $44-back-for-every-$1-spent kind "
153
- "of good.* And with the Constant Contact Forms plugin, you can easily add "
154
- "sign-up forms to your site so you can stay connected with visitors long "
155
- "after theyve left."
156
  msgstr ""
157
 
158
- #: includes/class-admin-pages.php:290
159
  msgid "GPLv3 license"
160
  msgstr ""
161
 
162
- #: includes/class-admin-pages.php:293
163
  #, php-format
164
  msgid "This software is released under a modified %s."
165
  msgstr ""
166
 
167
- #: includes/class-admin-pages.php:300
168
  msgid "*Direct Marketing Association 2013 Statistical Fact Book"
169
  msgstr ""
170
 
171
- #: includes/class-admin-pages.php:309
172
  msgid "Easily Add Forms"
173
  msgstr ""
174
 
175
- #: includes/class-admin-pages.php:312
176
  msgctxt "add forms alt text"
177
  msgid "add forms screenshot"
178
  msgstr ""
179
 
180
- #: includes/class-admin-pages.php:315
181
  msgid ""
182
  "Create forms that automatically select the theme and styling of your "
183
  "WordPress site for a perfect match. "
184
  msgstr ""
185
 
186
- #: includes/class-admin-pages.php:321
187
  msgid "Stay Connected With Your WordPress Visitors"
188
  msgstr ""
189
 
190
- #: includes/class-admin-pages.php:324
191
  msgctxt "stay connected alt text"
192
  msgid "stay connected screenshot"
193
  msgstr ""
194
 
195
- #: includes/class-admin-pages.php:327
196
  msgid ""
197
  "Form completions from site visitors are conveniently added to your Constant "
198
  "Contact email list."
199
  msgstr ""
200
 
201
- #: includes/class-admin-pages.php:347
202
  msgid "Constant Contact Forms - License"
203
  msgstr ""
204
 
@@ -212,7 +266,7 @@ msgstr ""
212
  msgid "License"
213
  msgstr ""
214
 
215
- #: includes/class-admin.php:204 includes/class-settings.php:597
216
  msgid "Settings updated."
217
  msgstr ""
218
 
@@ -220,7 +274,7 @@ msgstr ""
220
  msgid "Description"
221
  msgstr ""
222
 
223
- #: includes/class-admin.php:243 includes/class-builder-fields.php:362
224
  msgid "Shortcode"
225
  msgstr ""
226
 
@@ -232,15 +286,15 @@ msgstr ""
232
  msgid "Spread the word!"
233
  msgstr ""
234
 
235
- #: includes/class-admin.php:377
236
  msgid "You have unsaved changes."
237
  msgstr ""
238
 
239
- #: includes/class-admin.php:378
240
  msgid "move up"
241
  msgstr ""
242
 
243
- #: includes/class-admin.php:379
244
  msgid "move down"
245
  msgstr ""
246
 
@@ -274,7 +328,7 @@ msgstr ""
274
  msgid "Button text"
275
  msgstr ""
276
 
277
- #: includes/class-builder-fields.php:163 includes/class-settings.php:236
278
  msgid "Add subscribers to"
279
  msgstr ""
280
 
@@ -306,7 +360,7 @@ msgstr ""
306
  msgid "Your Business Name"
307
  msgstr ""
308
 
309
- #: includes/class-builder-fields.php:236 includes/class-settings.php:257
310
  msgid "Opt-in Affirmation"
311
  msgstr ""
312
 
@@ -343,67 +397,115 @@ msgstr ""
343
  msgid "Remove Field"
344
  msgstr ""
345
 
346
- #: includes/class-builder-fields.php:292
347
- msgid "Field Label"
348
  msgstr ""
349
 
350
- #: includes/class-builder-fields.php:295
351
- msgid "Email"
352
  msgstr ""
353
 
354
- #: includes/class-builder-fields.php:300
355
- msgid "Field Description"
356
  msgstr ""
357
 
358
- #: includes/class-builder-fields.php:314
359
- msgid "Email (required)"
360
  msgstr ""
361
 
362
- #: includes/class-builder-fields.php:315
363
- msgid "First Name"
364
  msgstr ""
365
 
366
- #: includes/class-builder-fields.php:316
367
  msgid "Last Name"
368
  msgstr ""
369
 
370
- #: includes/class-builder-fields.php:317
 
 
 
 
371
  msgid "Phone Number"
372
  msgstr ""
373
 
374
- #: includes/class-builder-fields.php:318
 
 
 
 
375
  msgid "Address"
376
  msgstr ""
377
 
378
- #: includes/class-builder-fields.php:319
 
 
 
 
379
  msgid "Job Title"
380
  msgstr ""
381
 
382
- #: includes/class-builder-fields.php:320
 
 
 
 
383
  msgid "Company"
384
  msgstr ""
385
 
386
- #: includes/class-builder-fields.php:321
387
- msgid "Website"
388
  msgstr ""
389
 
390
  #: includes/class-builder-fields.php:329
391
- msgid "Custom Text Field"
392
  msgstr ""
393
 
394
  #: includes/class-builder-fields.php:330
 
 
 
 
 
 
 
 
 
 
 
 
395
  msgid "Custom Text Area"
396
  msgstr ""
397
 
398
- #: includes/class-builder-fields.php:335
 
 
 
 
399
  msgid "Select a Field"
400
  msgstr ""
401
 
402
- #: includes/class-builder-fields.php:346
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
403
  msgid "Required"
404
  msgstr ""
405
 
406
- #: includes/class-builder-fields.php:373
407
  msgid ""
408
  "Shortcode to embed - <em><small>You can copy and paste this in a post to "
409
  "display your form.</small></em>"
@@ -413,59 +515,64 @@ msgstr ""
413
  msgid "Please add an email field to continue."
414
  msgstr ""
415
 
416
- #: includes/class-builder.php:289
417
  msgid "Your first form is ready!"
418
  msgstr ""
419
 
420
- #: includes/class-builder.php:291
 
 
 
 
 
421
  msgid "Now, how would you like to manage the information you collect?"
422
  msgstr ""
423
 
424
- #: includes/class-builder.php:299 includes/class-connect.php:214
425
  msgctxt "email marketing alt text"
426
  msgid "? mail"
427
  msgstr ""
428
 
429
- #: includes/class-builder.php:301
430
  msgid "Try email marketing."
431
  msgstr ""
432
 
433
- #: includes/class-builder.php:303
434
  msgid ""
435
  "Import everything into Constant Contact so I can see what email marketing "
436
  "can do for me."
437
  msgstr ""
438
 
439
- #: includes/class-builder.php:316 includes/class-connect.php:226
440
  msgctxt "connect alt text"
441
  msgid "hand holding phone"
442
  msgstr ""
443
 
444
- #: includes/class-builder.php:318
445
  msgid "Connect my account."
446
  msgstr ""
447
 
448
- #: includes/class-builder.php:320
449
  msgid ""
450
  "Automatically add collected information to contacts in my Constant Contact "
451
  "account."
452
  msgstr ""
453
 
454
- #: includes/class-builder.php:323 includes/class-connect.php:242
455
  msgid "Connect Plugin"
456
  msgstr ""
457
 
458
- #: includes/class-builder.php:325
459
  msgid ""
460
  "By connecting, you authorize this\n"
461
  "\t\t\t\t\t\t\tplugin to access your account."
462
  msgstr ""
463
 
464
- #: includes/class-builder.php:333
465
  msgid "I'm all set"
466
  msgstr ""
467
 
468
- #: includes/class-builder.php:334
469
  msgid "I'll manage the information on my own for now."
470
  msgstr ""
471
 
@@ -499,38 +606,36 @@ msgstr ""
499
 
500
  #: includes/class-connect.php:206
501
  msgid ""
502
- "To take full advantage of this plugin, we recommend having an active "
503
- "Constant Contact account."
 
504
  msgstr ""
505
 
506
- #: includes/class-connect.php:216
507
- msgid "Need an account?"
508
  msgstr ""
509
 
510
- #: includes/class-connect.php:218
511
- msgid ""
512
- "Sign up for a free 60-day trial to connect with visitors beyond your website."
513
- msgstr ""
514
-
515
- #: includes/class-connect.php:228
516
- msgid "Have an account?"
517
  msgstr ""
518
 
519
- #: includes/class-connect.php:230
520
- msgid "Connect the plugin to log in to your Constant Contact account"
521
  msgstr ""
522
 
523
- #: includes/class-connect.php:231
524
- msgid "(by connecting, you authorize this plugin to access your account)."
 
 
525
  msgstr ""
526
 
527
- #: includes/class-connect.php:249
528
  msgid "NOTE: "
529
  msgstr ""
530
 
531
- #: includes/class-connect.php:249
532
  msgid ""
533
- "Its possible to use the plugin without connecting to a Constant Contact "
534
  "account. In this case, all information collected by the forms will be "
535
  "individually emailed to the Site Admin."
536
  msgstr ""
@@ -760,7 +865,10 @@ msgid "Form restored to revision from %s"
760
  msgstr ""
761
 
762
  #: includes/class-cpts.php:211
763
- msgid "Form published."
 
 
 
764
  msgstr ""
765
 
766
  #: includes/class-cpts.php:212
@@ -788,16 +896,16 @@ msgstr ""
788
  msgid "(Examples: Join Our Email List, Contact Us)"
789
  msgstr ""
790
 
791
- #: includes/class-cpts.php:311
792
  msgid "No title"
793
  msgstr ""
794
 
795
- #: includes/class-cpts.php:318
796
  #, php-format
797
  msgid "%s (last modified %s ago)"
798
  msgstr ""
799
 
800
- #: includes/class-display.php:350 includes/class-display.php:1119
801
  msgid "Error: Please correct your entry."
802
  msgstr ""
803
 
@@ -805,91 +913,91 @@ msgstr ""
805
  msgid " Error: Please fill out this field."
806
  msgstr ""
807
 
808
- #: includes/class-display.php:721
809
  msgid "Send"
810
  msgstr ""
811
 
812
- #: includes/class-display.php:834
813
  msgid "Street Address"
814
  msgstr ""
815
 
816
- #: includes/class-display.php:835
817
  msgid "Address Line 2"
818
  msgstr ""
819
 
820
- #: includes/class-display.php:836
821
  msgid "City"
822
  msgstr ""
823
 
824
- #: includes/class-display.php:837
825
  msgid "State"
826
  msgstr ""
827
 
828
- #: includes/class-display.php:838
829
  msgid "ZIP Code"
830
  msgstr ""
831
 
832
- #: includes/class-display.php:894
833
  msgid "Month"
834
  msgstr ""
835
 
836
- #: includes/class-display.php:895
837
  msgid "Day"
838
  msgstr ""
839
 
840
- #: includes/class-display.php:896
841
  msgid "Year"
842
  msgstr ""
843
 
844
- #: includes/class-display.php:1017
845
  msgid "January"
846
  msgstr ""
847
 
848
- #: includes/class-display.php:1018
849
  msgid "February"
850
  msgstr ""
851
 
852
- #: includes/class-display.php:1019
853
  msgid "March"
854
  msgstr ""
855
 
856
- #: includes/class-display.php:1020
857
  msgid "April"
858
  msgstr ""
859
 
860
- #: includes/class-display.php:1021
861
  msgid "May"
862
  msgstr ""
863
 
864
- #: includes/class-display.php:1022
865
  msgid "June"
866
  msgstr ""
867
 
868
- #: includes/class-display.php:1023
869
  msgid "July "
870
  msgstr ""
871
 
872
- #: includes/class-display.php:1024
873
  msgid "August"
874
  msgstr ""
875
 
876
- #: includes/class-display.php:1025
877
  msgid "September"
878
  msgstr ""
879
 
880
- #: includes/class-display.php:1026
881
  msgid "October"
882
  msgstr ""
883
 
884
- #: includes/class-display.php:1027
885
  msgid "November"
886
  msgstr ""
887
 
888
- #: includes/class-display.php:1028
889
  msgid "December"
890
  msgstr ""
891
 
892
- #: includes/class-display.php:1183
893
  #, php-format
894
  msgid ""
895
  "By submitting this form, you are granting: %s, permission to email you. You "
@@ -914,56 +1022,85 @@ msgstr ""
914
  msgid "Sync Lists with Constant Contact"
915
  msgstr ""
916
 
917
- #: includes/class-mail.php:191
918
  #, php-format
919
  msgid "Duplicate send mail for: %s and: %s"
920
  msgstr ""
921
 
922
- #: includes/class-mail.php:207
923
  msgid ""
924
  "Congratulations! Your Constant Contact Forms plugin has successfully "
925
  "captured new information:"
926
  msgstr ""
927
 
928
- #: includes/class-mail.php:209
929
  msgid ""
930
  "Don't forget: Email marketing is a great way to stay connected and engage "
931
- "with visitors after theyve left your site. When you connect to a Constant "
932
  "Contact account, all new subscribers are automatically synced so you can "
933
  "keep the interaction going through emails and more. Sign up for a Free Trial "
934
  "on the Connect page in the Plugin console view."
935
  msgstr ""
936
 
937
- #: includes/class-mail.php:215
938
  msgid "Great News: You just captured a new visitor submission"
939
  msgstr ""
940
 
941
- #: includes/class-notification-content.php:46
942
  #, php-format
943
  msgid ""
944
- "To take full advantage of the %s plugin, we recommend having an active "
945
- "Constant Contact account."
946
  msgstr ""
947
 
948
- #: includes/class-notification-content.php:53
949
  msgid "Connect your account"
950
  msgstr ""
951
 
952
- #: includes/class-notification-content.php:56
953
  msgid "Try Us Free"
954
  msgstr ""
955
 
956
- #: includes/class-notification-content.php:72
 
 
 
 
 
957
  msgid ""
958
  "You currently have a large number of lists in your Constant Contact account. "
959
  "You may experience some issues with syncing them."
960
  msgstr ""
961
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
962
  #: includes/class-notifications.php:404
963
  msgid "Dismiss this notice."
964
  msgstr ""
965
 
966
- #: includes/class-process-form.php:149 includes/class-process-form.php:564
 
 
 
 
 
 
 
 
967
  msgid ""
968
  "We had trouble processing your submission. Please review your entries and "
969
  "try again."
@@ -976,57 +1113,87 @@ msgid ""
976
  "required Form ID and try again."
977
  msgstr ""
978
 
979
- #: includes/class-process-form.php:533
980
  msgid "There was an error sending your form."
981
  msgstr ""
982
 
983
- #: includes/class-process-form.php:547
984
  msgid "Your information has been submitted."
985
  msgstr ""
986
 
987
- #: includes/class-settings.php:134 includes/class-settings.php:135
988
- #: includes/class-settings.php:154
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
989
  msgid "Advanced Opt-in"
990
  msgstr ""
991
 
992
- #: includes/class-settings.php:226
993
  msgid "Opt-in Location"
994
  msgstr ""
995
 
996
- #: includes/class-settings.php:233 includes/class-settings.php:240
997
  msgid "Select a list"
998
  msgstr ""
999
 
1000
- #: includes/class-settings.php:245
1001
  msgid "Business Name"
1002
  msgstr ""
1003
 
1004
- #: includes/class-settings.php:260
1005
  #, php-format
1006
  msgid "Yes, I would like to receive emails from %s. Sign me up!"
1007
  msgstr ""
1008
 
1009
- #: includes/class-settings.php:265
1010
  msgid "Disclosure Name"
1011
  msgstr ""
1012
 
1013
- #: includes/class-settings.php:273
1014
  msgid "Disclosure Address"
1015
  msgstr ""
1016
 
1017
- #: includes/class-settings.php:293
1018
  msgid "Add a checkbox to the comment field in your posts"
1019
  msgstr ""
1020
 
1021
- #: includes/class-settings.php:294
1022
  msgid "Add a checkbox to the main WordPress login page"
1023
  msgstr ""
1024
 
1025
- #: includes/class-settings.php:299
1026
  msgid "Add a checkbox to the WordPress user registration page"
1027
  msgstr ""
1028
 
1029
- #: includes/class-settings.php:391
1030
  msgid "Sign up to our newsletter."
1031
  msgstr ""
1032
 
@@ -1034,10 +1201,17 @@ msgstr ""
1034
  msgid "Add Constant Contact Form"
1035
  msgstr ""
1036
 
1037
- #: includes/class-shortcode-admin.php:70
1038
  msgid "Form Shortcode"
1039
  msgstr ""
1040
 
 
 
 
 
 
 
 
1041
  #: includes/widgets/contact-form-select.php:23
1042
  msgid "Display a Constant Contact form."
1043
  msgstr ""
3
  msgstr ""
4
  "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
5
  "Project-Id-Version: Constant Contact Forms for WordPress\n"
6
+ "POT-Creation-Date: 2017-02-07 21:22-0600\n"
7
+ "PO-Revision-Date: 2017-01-12 14:46-0600\n"
8
  "Last-Translator: Michael Beckwith <michael.d.beckwith@gmail.com>\n"
9
+ "Language-Team: Constant Contact\n"
10
  "MIME-Version: 1.0\n"
11
  "Content-Type: text/plain; charset=UTF-8\n"
12
  "Content-Transfer-Encoding: 8bit\n"
21
  "X-Poedit-SearchPathExcluded-0: *.js\n"
22
  "X-Poedit-SearchPathExcluded-1: vendor\n"
23
  "X-Poedit-SearchPathExcluded-2: tests\n"
24
+ "X-Poedit-SearchPathExcluded-3: node_modules\n"
25
 
26
  #. Author of the plugin/theme
27
+ #: constant-contact-forms.php:201 includes/class-builder.php:318
28
  #: includes/class-cpts.php:95 includes/class-cpts.php:153
29
  msgid "Constant Contact"
30
  msgstr ""
31
 
32
  #: constant-contact-forms.php:232
33
  msgid ""
34
+ "Constant Contact Forms requires PHP 5.4 or higher. Your hosting provider or "
35
+ "website administrator should be able to assist in updating your PHP version."
36
  msgstr ""
37
 
38
+ #: constant-contact-forms.php:550
39
  msgid "Error loading license."
40
  msgstr ""
41
 
42
+ #: includes/class-admin-pages.php:89
43
  msgid "This is a sample help header"
44
  msgstr ""
45
 
46
+ #: includes/class-admin-pages.php:90
47
  msgid "This is some sample help text."
48
  msgstr ""
49
 
50
+ #: includes/class-admin-pages.php:93
51
  msgid "This is another sample header"
52
  msgstr ""
53
 
54
+ #: includes/class-admin-pages.php:94
55
  msgid "This is also some sample help text."
56
  msgstr ""
57
 
58
+ #: includes/class-admin-pages.php:116
59
  msgid "Is this a sample question?"
60
  msgstr ""
61
 
62
+ #: includes/class-admin-pages.php:117
63
  msgid "This is a sample answer"
64
  msgstr ""
65
 
66
+ #: includes/class-admin-pages.php:120
67
  msgid "This is also a sample question"
68
  msgstr ""
69
 
70
+ #: includes/class-admin-pages.php:121
71
  msgid "This is another sample answer"
72
  msgstr ""
73
 
74
+ #: includes/class-admin-pages.php:135
75
  msgid "Help / FAQ"
76
  msgstr ""
77
 
78
+ #: includes/class-admin-pages.php:142
79
  msgid "Help"
80
  msgstr ""
81
 
82
+ #: includes/class-admin-pages.php:176
83
  msgid "FAQ"
84
  msgstr ""
85
 
86
+ #: includes/class-admin-pages.php:244
87
+ #: includes/class-notification-content.php:49
88
  msgid "Constant Contact Forms"
89
  msgstr ""
90
 
91
+ #: includes/class-admin-pages.php:246
92
  msgid ""
93
  "This plugin makes it fast and easy to capture all kinds of visitor "
94
+ "information right from your WordPress site—even if you don't have a Constant "
95
  "Contact account."
96
  msgstr ""
97
 
98
+ #: includes/class-admin-pages.php:249
99
  msgid ""
100
+ "Whether you're looking to collect email addresses, contact info, event sign-"
101
  "ups, or visitor feedback, you can customize your forms with data fields that "
102
  "work best for you."
103
  msgstr ""
104
 
105
+ #: includes/class-admin-pages.php:252
106
  msgid ""
107
  "Quickly create different types of forms that are clear, simple, and mobile-"
108
  "optimized."
109
  msgstr ""
110
 
111
+ #: includes/class-admin-pages.php:253
112
  msgid ""
113
  "Choose forms that automatically select the theme and style of your WordPress "
114
  "site."
115
  msgstr ""
116
 
117
+ #: includes/class-admin-pages.php:254
118
  msgid ""
119
  "Customize the form data fields, so you can tailor the type of information "
120
  "you collect."
121
  msgstr ""
122
 
123
+ #: includes/class-admin-pages.php:261
124
+ msgid "Collecting email addresses with the plugin?"
125
+ msgstr ""
126
+
127
+ #: includes/class-admin-pages.php:262
128
+ msgid "Turn those contacts into customers."
129
+ msgstr ""
130
+
131
+ #: includes/class-admin-pages.php:265
132
  msgid ""
133
+ "Nurture your new contacts with a Constant Contact email marketing account "
134
+ "even after they've left your website. Sign up for a 60-day trial account* "
135
+ "and you can:"
136
+ msgstr ""
137
+
138
+ #: includes/class-admin-pages.php:268
139
+ msgid "Seamlessly add new contacts to mailing lists."
140
  msgstr ""
141
 
142
+ #: includes/class-admin-pages.php:269
143
+ msgid "Create and send professional emails."
144
+ msgstr ""
145
+
146
+ #: includes/class-admin-pages.php:270
147
+ msgid "Get expert marketing help and support."
148
+ msgstr ""
149
+
150
+ #: includes/class-admin-pages.php:275 includes/class-connect.php:235
151
  msgid "Try us Free"
152
  msgstr ""
153
 
154
+ #: includes/class-admin-pages.php:278
155
  msgid "Already have a Constant Contact account?"
156
  msgstr ""
157
 
158
+ #: includes/class-admin-pages.php:280
159
+ msgid "Connect the plugin."
160
  msgstr ""
161
 
162
+ #: includes/class-admin-pages.php:284
163
+ msgid ""
164
+ "NOTE: You can use the Constant Contact Form plugin without a Constant "
165
+ "Contact account. All information collected by the forms will be individually "
166
+ "emailed to your site admin."
167
+ msgstr ""
168
+
169
+ #: includes/class-admin-pages.php:291 includes/class-connect.php:250
170
+ msgid "Sign Up"
171
+ msgstr ""
172
+
173
+ #: includes/class-admin-pages.php:292 includes/class-connect.php:241
174
+ msgid "Email marketing tips delivered to your inbox."
175
+ msgstr ""
176
+
177
+ #: includes/class-admin-pages.php:293 includes/class-connect.php:242
178
+ msgid ""
179
+ "Ready to grow with email marketing? Subscribe now for the latest tips and "
180
+ "industry best practices to create great-looking emails that work."
181
+ msgstr ""
182
+
183
+ #: includes/class-admin-pages.php:294 includes/class-connect.php:243
184
+ msgid "Enter your email address"
185
+ msgstr ""
186
+
187
+ #: includes/class-admin-pages.php:300 includes/class-connect.php:247
188
+ #, php-format
189
+ msgid ""
190
+ "By submitting this form, you agree to receive periodic product announcements "
191
+ "and account notifications from Constant Contact. Cancel these communications "
192
+ "at any time by clicking the unsubscribe link in the footer of the actual "
193
+ "email. Constant Contact, Inc, 1601 Trapelo Road, Waltham, MA 02451, %s"
194
+ msgstr ""
195
+
196
+ #: includes/class-admin-pages.php:310
197
  msgid "Powerful Email Marketing, Made Simple."
198
  msgstr ""
199
 
200
+ #: includes/class-admin-pages.php:313
201
  msgid "Create professional emails that bring customers to your door"
202
  msgstr ""
203
 
204
+ #: includes/class-admin-pages.php:317
205
  msgid ""
206
  "Email marketing is good for your business. $44-back-for-every-$1-spent kind "
207
+ "of good.* And with the Constant Contact for WordPress plugin, you can "
208
+ "easily add sign-up forms to your site so you can stay connected with "
209
+ "visitors long after they've left."
210
  msgstr ""
211
 
212
+ #: includes/class-admin-pages.php:321
213
  msgid "GPLv3 license"
214
  msgstr ""
215
 
216
+ #: includes/class-admin-pages.php:324
217
  #, php-format
218
  msgid "This software is released under a modified %s."
219
  msgstr ""
220
 
221
+ #: includes/class-admin-pages.php:330
222
  msgid "*Direct Marketing Association 2013 Statistical Fact Book"
223
  msgstr ""
224
 
225
+ #: includes/class-admin-pages.php:338
226
  msgid "Easily Add Forms"
227
  msgstr ""
228
 
229
+ #: includes/class-admin-pages.php:341
230
  msgctxt "add forms alt text"
231
  msgid "add forms screenshot"
232
  msgstr ""
233
 
234
+ #: includes/class-admin-pages.php:344
235
  msgid ""
236
  "Create forms that automatically select the theme and styling of your "
237
  "WordPress site for a perfect match. "
238
  msgstr ""
239
 
240
+ #: includes/class-admin-pages.php:350
241
  msgid "Stay Connected With Your WordPress Visitors"
242
  msgstr ""
243
 
244
+ #: includes/class-admin-pages.php:353
245
  msgctxt "stay connected alt text"
246
  msgid "stay connected screenshot"
247
  msgstr ""
248
 
249
+ #: includes/class-admin-pages.php:356
250
  msgid ""
251
  "Form completions from site visitors are conveniently added to your Constant "
252
  "Contact email list."
253
  msgstr ""
254
 
255
+ #: includes/class-admin-pages.php:376
256
  msgid "Constant Contact Forms - License"
257
  msgstr ""
258
 
266
  msgid "License"
267
  msgstr ""
268
 
269
+ #: includes/class-admin.php:204 includes/class-settings.php:653
270
  msgid "Settings updated."
271
  msgstr ""
272
 
274
  msgid "Description"
275
  msgstr ""
276
 
277
+ #: includes/class-admin.php:243 includes/class-builder-fields.php:431
278
  msgid "Shortcode"
279
  msgstr ""
280
 
286
  msgid "Spread the word!"
287
  msgstr ""
288
 
289
+ #: includes/class-admin.php:379
290
  msgid "You have unsaved changes."
291
  msgstr ""
292
 
293
+ #: includes/class-admin.php:380
294
  msgid "move up"
295
  msgstr ""
296
 
297
+ #: includes/class-admin.php:381
298
  msgid "move down"
299
  msgstr ""
300
 
328
  msgid "Button text"
329
  msgstr ""
330
 
331
+ #: includes/class-builder-fields.php:163 includes/class-settings.php:290
332
  msgid "Add subscribers to"
333
  msgstr ""
334
 
360
  msgid "Your Business Name"
361
  msgstr ""
362
 
363
+ #: includes/class-builder-fields.php:236 includes/class-settings.php:311
364
  msgid "Opt-in Affirmation"
365
  msgstr ""
366
 
397
  msgid "Remove Field"
398
  msgstr ""
399
 
400
+ #: includes/class-builder-fields.php:296
401
+ msgid "A brief description of this field (optional)"
402
  msgstr ""
403
 
404
+ #: includes/class-builder-fields.php:301
405
+ msgid "Email (required)"
406
  msgstr ""
407
 
408
+ #: includes/class-builder-fields.php:302
409
+ msgid "c.contact@example.com"
410
  msgstr ""
411
 
412
+ #: includes/class-builder-fields.php:305
413
+ msgid "First Name"
414
  msgstr ""
415
 
416
+ #: includes/class-builder-fields.php:306
417
+ msgid "John"
418
  msgstr ""
419
 
420
+ #: includes/class-builder-fields.php:309
421
  msgid "Last Name"
422
  msgstr ""
423
 
424
+ #: includes/class-builder-fields.php:310
425
+ msgid "Smith"
426
+ msgstr ""
427
+
428
+ #: includes/class-builder-fields.php:313
429
  msgid "Phone Number"
430
  msgstr ""
431
 
432
+ #: includes/class-builder-fields.php:314
433
+ msgid "(555) 272-3342"
434
+ msgstr ""
435
+
436
+ #: includes/class-builder-fields.php:317
437
  msgid "Address"
438
  msgstr ""
439
 
440
+ #: includes/class-builder-fields.php:318
441
+ msgid "4115 S. Main Rd."
442
+ msgstr ""
443
+
444
+ #: includes/class-builder-fields.php:321
445
  msgid "Job Title"
446
  msgstr ""
447
 
448
+ #: includes/class-builder-fields.php:322
449
+ msgid "Project Manager"
450
+ msgstr ""
451
+
452
+ #: includes/class-builder-fields.php:325
453
  msgid "Company"
454
  msgstr ""
455
 
456
+ #: includes/class-builder-fields.php:326
457
+ msgid "Acme Manufacturing"
458
  msgstr ""
459
 
460
  #: includes/class-builder-fields.php:329
461
+ msgid "Website"
462
  msgstr ""
463
 
464
  #: includes/class-builder-fields.php:330
465
+ msgid "http://www.example.com"
466
+ msgstr ""
467
+
468
+ #: includes/class-builder-fields.php:346
469
+ msgid "Custom Text Field"
470
+ msgstr ""
471
+
472
+ #: includes/class-builder-fields.php:347
473
+ msgid "A custom text field"
474
+ msgstr ""
475
+
476
+ #: includes/class-builder-fields.php:350
477
  msgid "Custom Text Area"
478
  msgstr ""
479
 
480
+ #: includes/class-builder-fields.php:351
481
+ msgid "A large custom text field"
482
+ msgstr ""
483
+
484
+ #: includes/class-builder-fields.php:386
485
  msgid "Select a Field"
486
  msgstr ""
487
 
488
+ #: includes/class-builder-fields.php:397
489
+ msgid "Field Label"
490
+ msgstr ""
491
+
492
+ #: includes/class-builder-fields.php:400
493
+ msgid "Email"
494
+ msgstr ""
495
+
496
+ #: includes/class-builder-fields.php:405
497
+ msgid "Field Description"
498
+ msgstr ""
499
+
500
+ #: includes/class-builder-fields.php:409
501
+ msgid "Ex: Enter email address"
502
+ msgstr ""
503
+
504
+ #: includes/class-builder-fields.php:415
505
  msgid "Required"
506
  msgstr ""
507
 
508
+ #: includes/class-builder-fields.php:442
509
  msgid ""
510
  "Shortcode to embed - <em><small>You can copy and paste this in a post to "
511
  "display your form.</small></em>"
515
  msgid "Please add an email field to continue."
516
  msgstr ""
517
 
518
+ #: includes/class-builder.php:291
519
  msgid "Your first form is ready!"
520
  msgstr ""
521
 
522
+ #: includes/class-builder.php:295
523
+ #, php-format
524
+ msgid "Paste shortcode %s into a post or page editor."
525
+ msgstr ""
526
+
527
+ #: includes/class-builder.php:302
528
  msgid "Now, how would you like to manage the information you collect?"
529
  msgstr ""
530
 
531
+ #: includes/class-builder.php:308
532
  msgctxt "email marketing alt text"
533
  msgid "? mail"
534
  msgstr ""
535
 
536
+ #: includes/class-builder.php:310
537
  msgid "Try email marketing."
538
  msgstr ""
539
 
540
+ #: includes/class-builder.php:312
541
  msgid ""
542
  "Import everything into Constant Contact so I can see what email marketing "
543
  "can do for me."
544
  msgstr ""
545
 
546
+ #: includes/class-builder.php:325
547
  msgctxt "connect alt text"
548
  msgid "hand holding phone"
549
  msgstr ""
550
 
551
+ #: includes/class-builder.php:327
552
  msgid "Connect my account."
553
  msgstr ""
554
 
555
+ #: includes/class-builder.php:329
556
  msgid ""
557
  "Automatically add collected information to contacts in my Constant Contact "
558
  "account."
559
  msgstr ""
560
 
561
+ #: includes/class-builder.php:332 includes/class-connect.php:225
562
  msgid "Connect Plugin"
563
  msgstr ""
564
 
565
+ #: includes/class-builder.php:334
566
  msgid ""
567
  "By connecting, you authorize this\n"
568
  "\t\t\t\t\t\t\tplugin to access your account."
569
  msgstr ""
570
 
571
+ #: includes/class-builder.php:342
572
  msgid "I'm all set"
573
  msgstr ""
574
 
575
+ #: includes/class-builder.php:343
576
  msgid "I'll manage the information on my own for now."
577
  msgstr ""
578
 
606
 
607
  #: includes/class-connect.php:206
608
  msgid ""
609
+ "Get the most out of this plugin &mdash; use it with an active Constant "
610
+ "Contact account. By connecting to an account, you'll be able to engage "
611
+ "visitors through email marketing and turn more of them into customers."
612
  msgstr ""
613
 
614
+ #: includes/class-connect.php:211
615
+ msgid "Connect your Constant Contact account."
616
  msgstr ""
617
 
618
+ #: includes/class-connect.php:212
619
+ msgid "By connecting, you authorize this plugin to access your account."
 
 
 
 
 
620
  msgstr ""
621
 
622
+ #: includes/class-connect.php:232
623
+ msgid "No Constant Contact account? Try us out."
624
  msgstr ""
625
 
626
+ #: includes/class-connect.php:233
627
+ msgid ""
628
+ "Create professional emails so you can nurture great relationships with new "
629
+ "contacts even after they leave your website. Sign up for a free 60-day trial."
630
  msgstr ""
631
 
632
+ #: includes/class-connect.php:255
633
  msgid "NOTE: "
634
  msgstr ""
635
 
636
+ #: includes/class-connect.php:255
637
  msgid ""
638
+ "It's possible to use the plugin without connecting to a Constant Contact "
639
  "account. In this case, all information collected by the forms will be "
640
  "individually emailed to the Site Admin."
641
  msgstr ""
865
  msgstr ""
866
 
867
  #: includes/class-cpts.php:211
868
+ #, php-format
869
+ msgid ""
870
+ "Success! Here's the shortcode: %s. Just paste it into a post or page editor "
871
+ "to publish"
872
  msgstr ""
873
 
874
  #: includes/class-cpts.php:212
896
  msgid "(Examples: Join Our Email List, Contact Us)"
897
  msgstr ""
898
 
899
+ #: includes/class-cpts.php:317
900
  msgid "No title"
901
  msgstr ""
902
 
903
+ #: includes/class-cpts.php:324
904
  #, php-format
905
  msgid "%s (last modified %s ago)"
906
  msgstr ""
907
 
908
+ #: includes/class-display.php:350 includes/class-display.php:1152
909
  msgid "Error: Please correct your entry."
910
  msgstr ""
911
 
913
  msgid " Error: Please fill out this field."
914
  msgstr ""
915
 
916
+ #: includes/class-display.php:753
917
  msgid "Send"
918
  msgstr ""
919
 
920
+ #: includes/class-display.php:866
921
  msgid "Street Address"
922
  msgstr ""
923
 
924
+ #: includes/class-display.php:867
925
  msgid "Address Line 2"
926
  msgstr ""
927
 
928
+ #: includes/class-display.php:868
929
  msgid "City"
930
  msgstr ""
931
 
932
+ #: includes/class-display.php:869
933
  msgid "State"
934
  msgstr ""
935
 
936
+ #: includes/class-display.php:870
937
  msgid "ZIP Code"
938
  msgstr ""
939
 
940
+ #: includes/class-display.php:926
941
  msgid "Month"
942
  msgstr ""
943
 
944
+ #: includes/class-display.php:927
945
  msgid "Day"
946
  msgstr ""
947
 
948
+ #: includes/class-display.php:928
949
  msgid "Year"
950
  msgstr ""
951
 
952
+ #: includes/class-display.php:1049
953
  msgid "January"
954
  msgstr ""
955
 
956
+ #: includes/class-display.php:1050
957
  msgid "February"
958
  msgstr ""
959
 
960
+ #: includes/class-display.php:1051
961
  msgid "March"
962
  msgstr ""
963
 
964
+ #: includes/class-display.php:1052
965
  msgid "April"
966
  msgstr ""
967
 
968
+ #: includes/class-display.php:1053
969
  msgid "May"
970
  msgstr ""
971
 
972
+ #: includes/class-display.php:1054
973
  msgid "June"
974
  msgstr ""
975
 
976
+ #: includes/class-display.php:1055
977
  msgid "July "
978
  msgstr ""
979
 
980
+ #: includes/class-display.php:1056
981
  msgid "August"
982
  msgstr ""
983
 
984
+ #: includes/class-display.php:1057
985
  msgid "September"
986
  msgstr ""
987
 
988
+ #: includes/class-display.php:1058
989
  msgid "October"
990
  msgstr ""
991
 
992
+ #: includes/class-display.php:1059
993
  msgid "November"
994
  msgstr ""
995
 
996
+ #: includes/class-display.php:1060
997
  msgid "December"
998
  msgstr ""
999
 
1000
+ #: includes/class-display.php:1216
1001
  #, php-format
1002
  msgid ""
1003
  "By submitting this form, you are granting: %s, permission to email you. You "
1022
  msgid "Sync Lists with Constant Contact"
1023
  msgstr ""
1024
 
1025
+ #: includes/class-mail.php:198
1026
  #, php-format
1027
  msgid "Duplicate send mail for: %s and: %s"
1028
  msgstr ""
1029
 
1030
+ #: includes/class-mail.php:214
1031
  msgid ""
1032
  "Congratulations! Your Constant Contact Forms plugin has successfully "
1033
  "captured new information:"
1034
  msgstr ""
1035
 
1036
+ #: includes/class-mail.php:216
1037
  msgid ""
1038
  "Don't forget: Email marketing is a great way to stay connected and engage "
1039
+ "with visitors after they've left your site. When you connect to a Constant "
1040
  "Contact account, all new subscribers are automatically synced so you can "
1041
  "keep the interaction going through emails and more. Sign up for a Free Trial "
1042
  "on the Connect page in the Plugin console view."
1043
  msgstr ""
1044
 
1045
+ #: includes/class-mail.php:222
1046
  msgid "Great News: You just captured a new visitor submission"
1047
  msgstr ""
1048
 
1049
+ #: includes/class-notification-content.php:48
1050
  #, php-format
1051
  msgid ""
1052
+ "Get the most out of the %s plugin &mdash; use it with an active Constant "
1053
+ "Contact account."
1054
  msgstr ""
1055
 
1056
+ #: includes/class-notification-content.php:55
1057
  msgid "Connect your account"
1058
  msgstr ""
1059
 
1060
+ #: includes/class-notification-content.php:58
1061
  msgid "Try Us Free"
1062
  msgstr ""
1063
 
1064
+ #: includes/class-notification-content.php:68
1065
+ #, php-format
1066
+ msgid "%sLearn More%s about the power of email marketing."
1067
+ msgstr ""
1068
+
1069
+ #: includes/class-notification-content.php:88
1070
  msgid ""
1071
  "You currently have a large number of lists in your Constant Contact account. "
1072
  "You may experience some issues with syncing them."
1073
  msgstr ""
1074
 
1075
+ #: includes/class-notification-content.php:105 includes/class-optin.php:117
1076
+ #: includes/class-settings.php:736
1077
+ msgid "Constant Contact logo"
1078
+ msgstr ""
1079
+
1080
+ #: includes/class-notification-content.php:107
1081
+ msgid "Constant Contact Forms for WordPress data tracking opt-in"
1082
+ msgstr ""
1083
+
1084
+ #: includes/class-notification-content.php:111
1085
+ msgid ""
1086
+ "Allow Constant Contact to use Google Analytics&trade; to track your usage "
1087
+ "across the Constant Contact Forms plugin.<br/>You can change this opt - in "
1088
+ "within the plugin's settings page at any time."
1089
+ msgstr ""
1090
+
1091
  #: includes/class-notifications.php:404
1092
  msgid "Dismiss this notice."
1093
  msgstr ""
1094
 
1095
+ #: includes/class-optin.php:125 includes/class-settings.php:744
1096
+ msgid "Agree"
1097
+ msgstr ""
1098
+
1099
+ #: includes/class-optin.php:126 includes/class-settings.php:745
1100
+ msgid "Disagree"
1101
+ msgstr ""
1102
+
1103
+ #: includes/class-process-form.php:149 includes/class-process-form.php:569
1104
  msgid ""
1105
  "We had trouble processing your submission. Please review your entries and "
1106
  "try again."
1113
  "required Form ID and try again."
1114
  msgstr ""
1115
 
1116
+ #: includes/class-process-form.php:538
1117
  msgid "There was an error sending your form."
1118
  msgstr ""
1119
 
1120
+ #: includes/class-process-form.php:552
1121
  msgid "Your information has been submitted."
1122
  msgstr ""
1123
 
1124
+ #: includes/class-settings.php:162
1125
+ msgid "Constant Contact Forms Settings"
1126
+ msgstr ""
1127
+
1128
+ #: includes/class-settings.php:163
1129
+ msgid "Settings"
1130
+ msgstr ""
1131
+
1132
+ #: includes/class-settings.php:249
1133
+ msgid "Google Analytics&trade; tracking opt-in."
1134
+ msgstr ""
1135
+
1136
+ #: includes/class-settings.php:252
1137
+ msgid ""
1138
+ "Allow Constant Contact to use Google Analytics&trade; to track your usage "
1139
+ "across the Constant Contact Forms plugin.<br/> NOTE &mdash; Your website and "
1140
+ "users will not be tracked. See our <a href=\"https://www.constantcontact.com/"
1141
+ "legal/privacy-statement\"> Privacy Statement</a> information about what is "
1142
+ "and is not tracked."
1143
+ msgstr ""
1144
+
1145
+ #: includes/class-settings.php:260
1146
+ msgid "Disable E-mail Notifications"
1147
+ msgstr ""
1148
+
1149
+ #: includes/class-settings.php:261
1150
+ msgid ""
1151
+ "This option will disable e-mail notifications when someone submits a form "
1152
+ "and you have a connected Constant Contact account."
1153
+ msgstr ""
1154
+
1155
+ #: includes/class-settings.php:274
1156
  msgid "Advanced Opt-in"
1157
  msgstr ""
1158
 
1159
+ #: includes/class-settings.php:279
1160
  msgid "Opt-in Location"
1161
  msgstr ""
1162
 
1163
+ #: includes/class-settings.php:287 includes/class-settings.php:294
1164
  msgid "Select a list"
1165
  msgstr ""
1166
 
1167
+ #: includes/class-settings.php:299
1168
  msgid "Business Name"
1169
  msgstr ""
1170
 
1171
+ #: includes/class-settings.php:314
1172
  #, php-format
1173
  msgid "Yes, I would like to receive emails from %s. Sign me up!"
1174
  msgstr ""
1175
 
1176
+ #: includes/class-settings.php:319
1177
  msgid "Disclosure Name"
1178
  msgstr ""
1179
 
1180
+ #: includes/class-settings.php:327
1181
  msgid "Disclosure Address"
1182
  msgstr ""
1183
 
1184
+ #: includes/class-settings.php:349
1185
  msgid "Add a checkbox to the comment field in your posts"
1186
  msgstr ""
1187
 
1188
+ #: includes/class-settings.php:350
1189
  msgid "Add a checkbox to the main WordPress login page"
1190
  msgstr ""
1191
 
1192
+ #: includes/class-settings.php:355
1193
  msgid "Add a checkbox to the WordPress user registration page"
1194
  msgstr ""
1195
 
1196
+ #: includes/class-settings.php:444
1197
  msgid "Sign up to our newsletter."
1198
  msgstr ""
1199
 
1201
  msgid "Add Constant Contact Form"
1202
  msgstr ""
1203
 
1204
+ #: includes/class-shortcode-admin.php:71
1205
  msgid "Form Shortcode"
1206
  msgstr ""
1207
 
1208
+ #: includes/class-shortcode-admin.php:80
1209
+ #, php-format
1210
+ msgid ""
1211
+ "<p>No forms available. Visit your <a href=\"%s\">forms list</a> to create "
1212
+ "one.</p>"
1213
+ msgstr ""
1214
+
1215
  #: includes/widgets/contact-form-select.php:23
1216
  msgid "Display a Constant Contact form."
1217
  msgstr ""
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: constantcontact
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: 4.0.0
5
- Tested up to: 4.7.1
6
- Stable tag: 1.1.1
7
  License: GPLv2
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -33,6 +33,19 @@ BONUS: If you have a Constant Contact account, all new email addresses that you
33
 
34
  == Changelog ==
35
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
  = 1.1.1 =
37
  * Fixed: Made frontend form default to an empty action attribute to take care of occasional 404 errors after submission.
38
  * Added: New filter on the default empty string from above, so others can provide their own redirect location if desired.
2
  Contributors: constantcontact
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: 4.0.0
5
+ Tested up to: 4.7.2
6
+ Stable tag: 1.2.0
7
  License: GPLv2
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
33
 
34
  == Changelog ==
35
 
36
+ = 1.2.0 =
37
+ * Added: Reveal shortcode for newly published form in admin notice and popup for non-connected accounts.
38
+ * Added: Classes for individual form inputs and textareas on rendered form.
39
+ * Added: Request to opt into some anonymous data tracking for Constant Contact's information usage.
40
+ * Added: Note about no forms being available in modal popup, if none available.
41
+ * Added: Ability to disable emails if Constant Contact account is connected and "disable email" option checked.
42
+ * Added: Necessary disclosure text to output on comment form and login/registration form when able to do advanced opt-in for list enrollment.
43
+ * Fixed: Possible issues with PHP 5.2 compatibility from the widget.
44
+ * Fixed: Prevent status message from displaying multiple times if multiple forms present on the page.
45
+ * Fixed: Ability to remove description values from various available form inputs.
46
+ * Updated: Changed field order in admin UI for creating Constant Contact form.
47
+ * Updated: Better compatibility with TwentyFourteen.
48
+
49
  = 1.1.1 =
50
  * Fixed: Made frontend form default to an empty action attribute to take care of occasional 404 errors after submission.
51
  * Added: New filter on the default empty string from above, so others can provide their own redirect location if desired.
vendor/constantcontact/constantcontact/constantcontact/src/Ctct/autoload.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- require_once('SplClassLoader.php');
3
 
4
  // Load the Ctct namespace
5
  $loader = new \Ctct\SplClassLoader('Ctct', dirname(__DIR__));
1
  <?php
2
+ require_once( 'SplClassLoader.php' );
3
 
4
  // Load the Ctct namespace
5
  $loader = new \Ctct\SplClassLoader('Ctct', dirname(__DIR__));