Form builder to get in touch with visitors, grow your email list and collect payments — Happyforms - Version 1.13.8

Version Description

  • New feature: "All Forms" screen now shows where a form is being used.
  • Improvement: Better support for international emails and website addresses.
Download this release

Release Info

Developer happyforms
Plugin Icon 128x128 Form builder to get in touch with visitors, grow your email list and collect payments — Happyforms
Version 1.13.8
Comparing to
See all releases

Code changes from version 1.13.7 to 1.13.8

Files changed (55) hide show
  1. core/assets/css/customize.css +66 -49
  2. core/assets/svg/icons/{country.svg → address.svg} +0 -0
  3. core/assets/svg/icons/attachment.svg +0 -1
  4. core/assets/svg/icons/{multiple-choice.svg → checkbox.svg} +0 -0
  5. core/assets/svg/icons/{legal.svg → consent-choice.svg} +0 -0
  6. core/assets/svg/icons/{date.svg → date-time.svg} +0 -0
  7. core/assets/svg/icons/divider.svg +0 -1
  8. core/assets/svg/icons/dropdown.svg +1 -1
  9. core/assets/svg/icons/email.svg +1 -1
  10. core/assets/svg/icons/file-upload.svg +1 -0
  11. core/assets/svg/icons/{title.svg → heading.svg} +1 -1
  12. core/assets/svg/icons/matrix.svg +1 -0
  13. core/assets/svg/icons/media.svg +1 -1
  14. core/assets/svg/icons/number-scale.svg +0 -24
  15. core/assets/svg/icons/number.svg +1 -1
  16. core/assets/svg/icons/{opt-in.svg → opt-in-choice.svg} +0 -0
  17. core/assets/svg/icons/page-break.svg +1 -1
  18. core/assets/svg/icons/paragraph.svg +1 -0
  19. core/assets/svg/icons/payment.svg +1 -1
  20. core/assets/svg/icons/placeholder.svg +0 -1
  21. core/assets/svg/icons/poll.svg +1 -1
  22. core/assets/svg/icons/{single-choice.svg → radio.svg} +0 -0
  23. core/assets/svg/icons/{rank-order.svg → rank.svg} +0 -0
  24. core/assets/svg/icons/{rating.svg → rate.svg} +0 -0
  25. core/assets/svg/icons/scale.svg +1 -1
  26. core/assets/svg/icons/separator.svg +1 -0
  27. core/assets/svg/icons/slider.svg +1 -0
  28. core/assets/svg/icons/table.svg +0 -1
  29. core/assets/svg/icons/{short-text.svg → text.svg} +0 -0
  30. core/assets/svg/icons/website-link.svg +0 -1
  31. core/assets/svg/icons/website.svg +1 -0
  32. core/classes/class-email-encoder.php +95 -0
  33. core/classes/class-email-message.php +56 -37
  34. core/classes/class-form-admin.php +189 -0
  35. core/classes/class-happyforms-core.php +3 -0
  36. core/classes/parts/class-part-email.php +2 -0
  37. core/helpers/helper-misc.php +8 -4
  38. core/helpers/helper-validation.php +1 -1
  39. core/lib/php-punycode/LICENSE +19 -0
  40. core/lib/php-punycode/src/Exception/DomainOutOfBoundsException.php +13 -0
  41. core/lib/php-punycode/src/Exception/LabelOutOfBoundsException.php +13 -0
  42. core/lib/php-punycode/src/Exception/OutOfBoundsException.php +13 -0
  43. core/lib/php-punycode/src/Punycode.php +360 -0
  44. core/templates/customize-controls/setup/upsell.php +1 -1
  45. core/templates/customize-form-part-footer.php +1 -1
  46. core/templates/customize-form-parts-drawer.php +1 -3
  47. core/templates/customize-form-setup-logic.php +0 -5
  48. happyforms.php +2 -2
  49. inc/assets/js/customize.js +43 -20
  50. inc/classes/class-happyforms.php +0 -24
  51. inc/classes/parts/class-part-layout-drawer-group.php +1 -1
  52. inc/templates/customize-controls/checkbox_dummy.php +2 -2
  53. inc/templates/customize-controls/email-parts-list-dummy.php +2 -3
  54. languages/happyforms.pot +61 -53
  55. readme.txt +8 -1
core/assets/css/customize.css CHANGED
@@ -183,27 +183,40 @@ p.description a {
183
  max-width: 100%;
184
  }
185
 
186
- .customize-control.customize-control-checkbox_dummy label span,
187
- .customize-control.customize-control-checkbox_dummy label i {
188
- opacity: 0.5;
189
- }
190
-
191
  .customize-control.customize-control-checkbox_dummy label a {
192
  margin-left: 5px;
193
  }
194
 
195
- .customize-control.customize-control-checkbox_dummy label a:after,
196
- .customize-control.customize-control--upsell a:after,
197
- .customize-control-email-parts-list_dummy a:after {
198
- content: "\f504";
199
- display: inline-block;
200
- font-family: dashicons;
201
- text-decoration: none;
202
  }
203
 
204
- .customize-control-email-parts-list_dummy a {
205
- display: inline-block;
206
- margin-top: 3px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
207
  }
208
 
209
  #customize-controls span.description {
@@ -1064,14 +1077,6 @@ ul.happyforms-parts-list li .happyforms-parts-list-item-title {
1064
  position: relative;
1065
  }
1066
 
1067
- ul.happyforms-parts-list li.happyforms-parts-list-item--dummy {
1068
- cursor: default;
1069
- }
1070
-
1071
- ul.happyforms-parts-list li.happyforms-parts-list-item--dummy .happyforms-parts-list-item-title h3,
1072
- ul.happyforms-parts-list li.happyforms-parts-list-item--dummy .happyforms-parts-list-item-description {
1073
- opacity: 0.5;
1074
- }
1075
 
1076
  ul.happyforms-parts-list li.happyforms-parts-list-item--dummy .happyforms-parts-list-item-title {
1077
  display: flex;
@@ -1106,7 +1111,7 @@ ul.happyforms-parts-list li .happyforms-parts-list-item-title:before {
1106
  }
1107
 
1108
  ul.happyforms-parts-list li[data-part-type="single_line_text"] .happyforms-parts-list-item-title:before {
1109
- background-image: url(../svg/icons/short-text.svg);
1110
  }
1111
 
1112
  ul.happyforms-parts-list li[data-part-type="multi_line_text"] .happyforms-parts-list-item-title:before {
@@ -1118,7 +1123,7 @@ ul.happyforms-parts-list li[data-part-type="email"] .happyforms-parts-list-item-
1118
  }
1119
 
1120
  ul.happyforms-parts-list li[data-part-type="website_url"] .happyforms-parts-list-item-title:before {
1121
- background-image: url(../svg/icons/website-link.svg);
1122
  }
1123
 
1124
  ul.happyforms-parts-list li[data-part-type="number"] .happyforms-parts-list-item-title:before {
@@ -1126,11 +1131,11 @@ ul.happyforms-parts-list li[data-part-type="number"] .happyforms-parts-list-item
1126
  }
1127
 
1128
  ul.happyforms-parts-list li[data-part-type="checkbox"] .happyforms-parts-list-item-title:before {
1129
- background-image: url(../svg/icons/multiple-choice.svg);
1130
  }
1131
 
1132
  ul.happyforms-parts-list li[data-part-type="radio"] .happyforms-parts-list-item-title:before {
1133
- background-image: url(../svg/icons/single-choice.svg);
1134
  }
1135
 
1136
  ul.happyforms-parts-list li[data-part-type="select"] .happyforms-parts-list-item-title:before {
@@ -1142,122 +1147,134 @@ ul.happyforms-parts-list li[data-part-type="country"] .happyforms-parts-list-ite
1142
  }
1143
 
1144
  ul.happyforms-parts-list li[data-part-type="attachment_dummy"] .happyforms-parts-list-item-title:before {
1145
- opacity: 0.5;
1146
  background-image: url(../svg/icons/attachment.svg);
1147
  }
1148
 
1149
  ul.happyforms-parts-list li[data-part-type="poll_dummy"] .happyforms-parts-list-item-title:before {
1150
- opacity: 0.5;
1151
  background-image: url(../svg/icons/poll.svg);
1152
  }
1153
 
1154
  ul.happyforms-parts-list li[data-part-type="page_break_dummy"] .happyforms-parts-list-item-title:before {
1155
- opacity: 0.5;
1156
  background-image: url(../svg/icons/page-break.svg);
1157
  }
1158
 
1159
  ul.happyforms-parts-list li[data-part-type="website_url_dummy"] .happyforms-parts-list-item-title:before {
 
 
 
 
1160
  opacity: 0.5;
 
 
 
 
 
 
 
 
 
1161
  background-image: url(../svg/icons/website-link.svg);
1162
  }
1163
 
1164
  ul.happyforms-parts-list li[data-part-type="table_dummy"] .happyforms-parts-list-item-title:before {
1165
- opacity: 0.5;
1166
  background-image: url(../svg/icons/table.svg);
1167
  }
1168
 
1169
  ul.happyforms-parts-list li[data-part-type="date_dummy"] .happyforms-parts-list-item-title:before {
1170
- opacity: 0.5;
1171
  background-image: url(../svg/icons/date.svg);
1172
  }
1173
 
1174
  ul.happyforms-parts-list li[data-part-type="address_dummy"] .happyforms-parts-list-item-title:before {
1175
- opacity: 0.5;
1176
  background-image: url(../svg/icons/country.svg);
1177
  }
1178
 
1179
  ul.happyforms-parts-list li[data-part-type="phone_dummy"] .happyforms-parts-list-item-title:before {
1180
- opacity: 0.5;
1181
  background-image: url(../svg/icons/phone.svg);
1182
  }
1183
 
1184
  ul.happyforms-parts-list li[data-part-type="title_dummy"] .happyforms-parts-list-item-title:before {
1185
- opacity: 0.5;
1186
  background-image: url(../svg/icons/title.svg);
1187
  }
1188
 
1189
  ul.happyforms-parts-list li[data-part-type="legal_dummy"] .happyforms-parts-list-item-title:before {
1190
- opacity: 0.5;
1191
  background-image: url(../svg/icons/legal.svg);
1192
  }
1193
 
1194
  ul.happyforms-parts-list li[data-part-type="rich_text_dummy"] .happyforms-parts-list-item-title:before {
1195
- opacity: 0.5;
1196
  background-image: url(../svg/icons/text-editor.svg);
1197
  }
1198
 
1199
  ul.happyforms-parts-list li[data-part-type="scale_dummy"] .happyforms-parts-list-item-title:before {
 
 
 
 
 
 
 
 
 
1200
  opacity: 0.5;
1201
  background-image: url(../svg/icons/scale.svg);
1202
  }
1203
 
 
 
 
 
1204
  ul.happyforms-parts-list li[data-part-type="rank_order_dummy"] .happyforms-parts-list-item-title:before {
1205
- opacity: 0.5;
1206
  background-image: url(../svg/icons/rank-order.svg);
1207
  }
1208
 
1209
  ul.happyforms-parts-list li[data-part-type="likert_scale_dummy"] .happyforms-parts-list-item-title:before {
1210
- opacity: 0.5;
1211
  background-image: url(../svg/icons/number-scale.svg);
1212
  }
1213
 
1214
  ul.happyforms-parts-list li[data-part-type="rating_dummy"] .happyforms-parts-list-item-title:before {
1215
- opacity: 0.5;
1216
  background-image: url(../svg/icons/rating.svg);
1217
  }
1218
 
1219
  ul.happyforms-parts-list li[data-part-type="rating_dummy"] .happyforms-parts-list-item-title:before {
1220
- opacity: 0.5;
1221
  background-image: url(../svg/icons/rating.svg);
1222
  }
1223
 
1224
  ul.happyforms-parts-list li[data-part-type="narrative_dummy"] .happyforms-parts-list-item-title:before {
1225
- opacity: 0.5;
1226
  background-image: url(../svg/icons/story.svg);
1227
  }
1228
 
1229
  ul.happyforms-parts-list li[data-part-type="placeholder_dummy"] .happyforms-parts-list-item-title:before {
1230
- opacity: 0.5;
 
 
 
1231
  background-image: url(../svg/icons/placeholder.svg);
1232
  }
1233
 
1234
  ul.happyforms-parts-list li[data-part-type="optin_dummy"] .happyforms-parts-list-item-title:before {
1235
- opacity: 0.5;
1236
  background-image: url(../svg/icons/opt-in.svg);
1237
  }
1238
 
1239
  ul.happyforms-parts-list li[data-part-type="payments_dummy"] .happyforms-parts-list-item-title:before {
1240
- opacity: 0.5;
1241
  background-image: url(../svg/icons/payment.svg);
1242
  }
1243
 
1244
  ul.happyforms-parts-list li[data-part-type="signature_dummy"] .happyforms-parts-list-item-title:before {
1245
- opacity: 0.5;
1246
  background-image: url(../svg/icons/signature.svg);
1247
  }
1248
 
1249
  ul.happyforms-parts-list li[data-part-type="divider_dummy"] .happyforms-parts-list-item-title:before {
1250
- opacity: 0.5;
 
 
 
1251
  background-image: url(../svg/icons/divider.svg);
1252
  }
1253
 
1254
  ul.happyforms-parts-list li[data-part-type="layout_title_dummy"] .happyforms-parts-list-item-title:before {
1255
- opacity: 0.5;
1256
  background-image: url(../svg/icons/title.svg);
1257
  }
1258
 
1259
  ul.happyforms-parts-list li[data-part-type="media_dummy"] .happyforms-parts-list-item-title:before {
1260
- opacity: 0.5;
1261
  background-image: url(../svg/icons/media.svg);
1262
  }
1263
 
183
  max-width: 100%;
184
  }
185
 
 
 
 
 
 
186
  .customize-control.customize-control-checkbox_dummy label a {
187
  margin-left: 5px;
188
  }
189
 
190
+ .customize-control-email-parts-list_dummy {
191
+ display: flex;
192
+ flex-wrap: wrap;
193
+ align-items: center;
 
 
 
194
  }
195
 
196
+ .customize-control-email-parts-list_dummy label[for="confirmation_email_respondent_address"]{
197
+ padding-bottom: 0px;
198
+ margin-bottom: 0px;
199
+ }
200
+
201
+ .customize-control-email-parts-list_dummy select#confirmation_email_respondent_address {
202
+ margin-top: 5px;
203
+ }
204
+
205
+ span.members-only {
206
+ background: #2c3338;
207
+ color: #fff;
208
+ font-size: 11px;
209
+ display: inline-block;
210
+ padding: 2px 8px;
211
+ border-radius: 2px;
212
+ margin: 0 0;
213
+ -webkit-user-select: none;
214
+ user-select: none;
215
+ line-height: 1.6;
216
+ }
217
+
218
+ .happyforms-form-part-logic span.members-only {
219
+ margin-left: 5px;
220
  }
221
 
222
  #customize-controls span.description {
1077
  position: relative;
1078
  }
1079
 
 
 
 
 
 
 
 
 
1080
 
1081
  ul.happyforms-parts-list li.happyforms-parts-list-item--dummy .happyforms-parts-list-item-title {
1082
  display: flex;
1111
  }
1112
 
1113
  ul.happyforms-parts-list li[data-part-type="single_line_text"] .happyforms-parts-list-item-title:before {
1114
+ background-image: url(../svg/icons/text.svg);
1115
  }
1116
 
1117
  ul.happyforms-parts-list li[data-part-type="multi_line_text"] .happyforms-parts-list-item-title:before {
1123
  }
1124
 
1125
  ul.happyforms-parts-list li[data-part-type="website_url"] .happyforms-parts-list-item-title:before {
1126
+ background-image: url(../svg/icons/website.svg);
1127
  }
1128
 
1129
  ul.happyforms-parts-list li[data-part-type="number"] .happyforms-parts-list-item-title:before {
1131
  }
1132
 
1133
  ul.happyforms-parts-list li[data-part-type="checkbox"] .happyforms-parts-list-item-title:before {
1134
+ background-image: url(../svg/icons/checkbox.svg);
1135
  }
1136
 
1137
  ul.happyforms-parts-list li[data-part-type="radio"] .happyforms-parts-list-item-title:before {
1138
+ background-image: url(../svg/icons/radio.svg);
1139
  }
1140
 
1141
  ul.happyforms-parts-list li[data-part-type="select"] .happyforms-parts-list-item-title:before {
1147
  }
1148
 
1149
  ul.happyforms-parts-list li[data-part-type="attachment_dummy"] .happyforms-parts-list-item-title:before {
 
1150
  background-image: url(../svg/icons/attachment.svg);
1151
  }
1152
 
1153
  ul.happyforms-parts-list li[data-part-type="poll_dummy"] .happyforms-parts-list-item-title:before {
 
1154
  background-image: url(../svg/icons/poll.svg);
1155
  }
1156
 
1157
  ul.happyforms-parts-list li[data-part-type="page_break_dummy"] .happyforms-parts-list-item-title:before {
 
1158
  background-image: url(../svg/icons/page-break.svg);
1159
  }
1160
 
1161
  ul.happyforms-parts-list li[data-part-type="website_url_dummy"] .happyforms-parts-list-item-title:before {
1162
+ background-image: url(../svg/icons/website.svg);
1163
+ }
1164
+
1165
+ ul.happyforms-parts-list li[data-part-type="table_dummy"] .happyforms-parts-list-item-title:before {
1166
  opacity: 0.5;
1167
+ background-image: url(../svg/icons/matrix.svg);
1168
+ }
1169
+
1170
+ ul.happyforms-parts-list li[data-part-type="date_dummy"] .happyforms-parts-list-item-title:before {
1171
+ opacity: 0.5;
1172
+ background-image: url(../svg/icons/date-time.svg);
1173
+ }
1174
+
1175
+ ul.happyforms-parts-list li[data-part-type="address_dummy"] .happyforms-parts-list-item-title:before {
1176
  background-image: url(../svg/icons/website-link.svg);
1177
  }
1178
 
1179
  ul.happyforms-parts-list li[data-part-type="table_dummy"] .happyforms-parts-list-item-title:before {
 
1180
  background-image: url(../svg/icons/table.svg);
1181
  }
1182
 
1183
  ul.happyforms-parts-list li[data-part-type="date_dummy"] .happyforms-parts-list-item-title:before {
 
1184
  background-image: url(../svg/icons/date.svg);
1185
  }
1186
 
1187
  ul.happyforms-parts-list li[data-part-type="address_dummy"] .happyforms-parts-list-item-title:before {
 
1188
  background-image: url(../svg/icons/country.svg);
1189
  }
1190
 
1191
  ul.happyforms-parts-list li[data-part-type="phone_dummy"] .happyforms-parts-list-item-title:before {
 
1192
  background-image: url(../svg/icons/phone.svg);
1193
  }
1194
 
1195
  ul.happyforms-parts-list li[data-part-type="title_dummy"] .happyforms-parts-list-item-title:before {
 
1196
  background-image: url(../svg/icons/title.svg);
1197
  }
1198
 
1199
  ul.happyforms-parts-list li[data-part-type="legal_dummy"] .happyforms-parts-list-item-title:before {
 
1200
  background-image: url(../svg/icons/legal.svg);
1201
  }
1202
 
1203
  ul.happyforms-parts-list li[data-part-type="rich_text_dummy"] .happyforms-parts-list-item-title:before {
 
1204
  background-image: url(../svg/icons/text-editor.svg);
1205
  }
1206
 
1207
  ul.happyforms-parts-list li[data-part-type="scale_dummy"] .happyforms-parts-list-item-title:before {
1208
+ background-image: url(../svg/icons/slider.svg);
1209
+ }
1210
+
1211
+ ul.happyforms-parts-list li[data-part-type="rank_order_dummy"] .happyforms-parts-list-item-title:before {
1212
+ opacity: 0.5;
1213
+ background-image: url(../svg/icons/rank.svg);
1214
+ }
1215
+
1216
+ ul.happyforms-parts-list li[data-part-type="likert_scale_dummy"] .happyforms-parts-list-item-title:before {
1217
  opacity: 0.5;
1218
  background-image: url(../svg/icons/scale.svg);
1219
  }
1220
 
1221
+ ul.happyforms-parts-list li[data-part-type="rating_dummy"] .happyforms-parts-list-item-title:before {
1222
+ background-image: url(../svg/icons/scale.svg);
1223
+ }
1224
+
1225
  ul.happyforms-parts-list li[data-part-type="rank_order_dummy"] .happyforms-parts-list-item-title:before {
 
1226
  background-image: url(../svg/icons/rank-order.svg);
1227
  }
1228
 
1229
  ul.happyforms-parts-list li[data-part-type="likert_scale_dummy"] .happyforms-parts-list-item-title:before {
 
1230
  background-image: url(../svg/icons/number-scale.svg);
1231
  }
1232
 
1233
  ul.happyforms-parts-list li[data-part-type="rating_dummy"] .happyforms-parts-list-item-title:before {
 
1234
  background-image: url(../svg/icons/rating.svg);
1235
  }
1236
 
1237
  ul.happyforms-parts-list li[data-part-type="rating_dummy"] .happyforms-parts-list-item-title:before {
 
1238
  background-image: url(../svg/icons/rating.svg);
1239
  }
1240
 
1241
  ul.happyforms-parts-list li[data-part-type="narrative_dummy"] .happyforms-parts-list-item-title:before {
 
1242
  background-image: url(../svg/icons/story.svg);
1243
  }
1244
 
1245
  ul.happyforms-parts-list li[data-part-type="placeholder_dummy"] .happyforms-parts-list-item-title:before {
1246
+ background-image: url(../svg/icons/paragraph.svg);
1247
+ }
1248
+
1249
+ ul.happyforms-parts-list li[data-part-type="optin_dummy"] .happyforms-parts-list-item-title:before {
1250
  background-image: url(../svg/icons/placeholder.svg);
1251
  }
1252
 
1253
  ul.happyforms-parts-list li[data-part-type="optin_dummy"] .happyforms-parts-list-item-title:before {
 
1254
  background-image: url(../svg/icons/opt-in.svg);
1255
  }
1256
 
1257
  ul.happyforms-parts-list li[data-part-type="payments_dummy"] .happyforms-parts-list-item-title:before {
 
1258
  background-image: url(../svg/icons/payment.svg);
1259
  }
1260
 
1261
  ul.happyforms-parts-list li[data-part-type="signature_dummy"] .happyforms-parts-list-item-title:before {
 
1262
  background-image: url(../svg/icons/signature.svg);
1263
  }
1264
 
1265
  ul.happyforms-parts-list li[data-part-type="divider_dummy"] .happyforms-parts-list-item-title:before {
1266
+ background-image: url(../svg/icons/separator.svg);
1267
+ }
1268
+
1269
+ ul.happyforms-parts-list li[data-part-type="layout_title_dummy"] .happyforms-parts-list-item-title:before {
1270
  background-image: url(../svg/icons/divider.svg);
1271
  }
1272
 
1273
  ul.happyforms-parts-list li[data-part-type="layout_title_dummy"] .happyforms-parts-list-item-title:before {
 
1274
  background-image: url(../svg/icons/title.svg);
1275
  }
1276
 
1277
  ul.happyforms-parts-list li[data-part-type="media_dummy"] .happyforms-parts-list-item-title:before {
 
1278
  background-image: url(../svg/icons/media.svg);
1279
  }
1280
 
core/assets/svg/icons/{country.svg → address.svg} RENAMED
File without changes
core/assets/svg/icons/attachment.svg DELETED
@@ -1 +0,0 @@
1
- <svg enable-background="new 0 0 24 24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m0 0h24v24h-24z" fill="none"/><path d="m19.4 10c-.7-3.4-3.7-6-7.4-6-2.9 0-5.4 1.6-6.7 4-3 .4-5.3 2.9-5.3 6 0 3.3 2.7 6 6 6h13c2.8 0 5-2.2 5-5 0-2.6-2-4.8-4.6-5zm-.4 8h-13c-2.2 0-4-1.8-4-4 0-2.1 1.5-3.8 3.6-4l1.1-.1.4-.9c1-1.9 2.8-3 4.9-3 2.6 0 4.9 1.9 5.4 4.4l.3 1.5 1.5.1c1.6.1 2.8 1.4 2.8 3s-1.4 3-3 3zm-11-5h2.6v3h2.9v-3h2.5l-4-4z" fill="#32373c"/></svg>
 
core/assets/svg/icons/{multiple-choice.svg → checkbox.svg} RENAMED
File without changes
core/assets/svg/icons/{legal.svg → consent-choice.svg} RENAMED
File without changes
core/assets/svg/icons/{date.svg → date-time.svg} RENAMED
File without changes
core/assets/svg/icons/divider.svg DELETED
@@ -1 +0,0 @@
1
- <svg enable-background="new 0 0 24 24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m0 0h24v24h-24z" fill="none"/><path clip-rule="evenodd" d="m4 11h16v2h-16z" fill-rule="evenodd"/></svg>
 
core/assets/svg/icons/dropdown.svg CHANGED
@@ -1 +1 @@
1
- <svg enable-background="new 0 0 24 24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m0 0h24v24h-24z" fill="none"/><path d="m12 4c4.4 0 8 3.6 8 8s-3.6 8-8 8-8-3.6-8-8 3.6-8 8-8m0-2c-5.5 0-10 4.5-10 10s4.5 10 10 10 10-4.5 10-10-4.5-10-10-10zm0 13-4-4h8z" fill="#32373c"/></svg>
1
+ <svg enable-background="new 0 0 24 24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m0 0h24v24h-24z" fill="none"/><path d="m0 0h24v24h-24z" fill="none"/><path d="m7 10 5 5 5-5z" fill="#32373c"/></svg>
core/assets/svg/icons/email.svg CHANGED
@@ -1 +1 @@
1
- <svg enable-background="new 0 0 24 24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m0 0h24v24h-24z" fill="none"/><path d="m22 6c0-1.1-.9-2-2-2h-16c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2zm-2 0-8 5-8-5zm0 12h-16v-10l8 5 8-5z" fill="#32373c"/></svg>
1
+ <svg enable-background="new 0 0 24 24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m0 0h24v24h-24z" fill="none"/><path d="m0 0h24v24h-24z" fill="none"/><path d="m12 2c-5.5 0-10 4.4-10 9.9s4.5 10 10 10h5v-2h-5c-4.3 0-8-3.7-8-8s3.7-8 8-8 8 3.7 8 8v1.4c0 .8-.7 1.6-1.5 1.6s-1.5-.7-1.5-1.5v-1.4c0-2.8-2.2-5-5-5s-5 2.2-5 5 2.2 5 5 5c1.4 0 2.6-.6 3.5-1.5.7.9 1.8 1.5 3 1.5 2 0 3.5-1.6 3.5-3.6v-1.4c0-5.6-4.5-10-10-10zm0 12.9c-1.7 0-3-1.3-3-3s1.3-3 3-3 3 1.3 3 3-1.3 3-3 3z" fill="#32373c"/></svg>
core/assets/svg/icons/file-upload.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg enable-background="new 0 0 24 24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m0 0h24v24h-24z" fill="none"/><path d="m20.3 15v4.4h-7v-15l5.7 5.3 1.3-1.4-7.9-7.4-7.4 7.4 1.3 1.4 5.1-5.1v14.9h-7.7v-4.5h-1.9v6.4h20.3v-6.4z" fill="#32373c"/></svg>
core/assets/svg/icons/{title.svg → heading.svg} RENAMED
@@ -1 +1 @@
1
- <svg enable-background="new 0 0 24 24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m0 0h24v24h-24z" fill="none"/><path d="m5 4v3h5.5v12h3v-12h5.5v-3z"/></svg>
1
+ <svg enable-background="new 0 0 24 24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m0 0h24v24h-24z" fill="none"/><path d="m4.4 3.3v17.5l7.6-6.3 7.6 6.3v-17.5z" fill="#32373c"/></svg>
core/assets/svg/icons/matrix.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg enable-background="new 0 0 24 24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m0 0h24v24h-24z" fill="none"/><path d="m0 0h24v24h-24z" fill="none"/><path d="m20 2h-16c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2v-16c0-1.1-.9-2-2-2zm-12 18h-4v-4h4zm0-6h-4v-4h4zm0-6h-4v-4h4zm6 12h-4v-4h4zm0-6h-4v-4h4zm0-6h-4v-4h4zm6 12h-4v-4h4zm0-6h-4v-4h4zm0-6h-4v-4h4z" fill="#32373c"/></svg>
core/assets/svg/icons/media.svg CHANGED
@@ -1 +1 @@
1
- <svg enable-background="new 0 0 24 24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m0 0h24v24h-24z" fill="none"/><path d="m19 4h-14c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-12c0-1.1-.9-2-2-2zm0 14h-14v-10h14z"/></svg>
1
+ <svg enable-background="new 0 0 24 24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m0 0h24v24h-24z" fill="none"/><path d="m19 4h-14c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-12c0-1.1-.9-2-2-2zm0 14h-14v-10h14z" fill="#32373c"/></svg>
core/assets/svg/icons/number-scale.svg DELETED
@@ -1,24 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!-- Generator: Adobe Illustrator 25.4.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
- <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
4
- viewBox="0 0 24 24" style="enable-background:new 0 0 24 24;" xml:space="preserve">
5
- <style type="text/css">
6
- .st0{fill:none;}
7
- </style>
8
- <g>
9
- <path class="st0" d="M0,0h24v24H0V0z"/>
10
- </g>
11
- <g>
12
- <g>
13
- <path d="M20,4H4C2.9,4,2,4.9,2,6v12c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V6C22,4.9,21.1,4,20,4z M20,18H4V6h16V18z"/>
14
- <polygon points="6.5,10.5 6.5,15 7.6,15 7.6,9 6.8,9 5,10.3 5.6,11.2 "/>
15
- <path d="M11.5,10.1c0.5,0,0.8,0.3,0.8,0.7c0,0.4-0.1,0.6-0.5,1.1c-0.4,0.4-1.1,1.1-2.1,2.1v1h3.9v-1h-2.4l0-0.1
16
- c0.7-0.7,1.1-1.1,1.4-1.4c0.6-0.6,0.9-1.2,0.9-1.9c0-0.2-0.1-1-0.9-1.5c-0.5-0.2-1.3-0.4-2,0c-0.8,0.4-1,1.1-1,1.1l1,0.4
17
- C10.7,10.4,10.9,10.1,11.5,10.1z"/>
18
- <path d="M17,13.9c-0.8,0-1-0.8-1-0.9l-1,0.4c0.4,1.6,2,1.5,2.1,1.5c1.2,0,1.7-0.7,1.8-0.9c0.3-0.5,0.4-1.2,0-1.8
19
- c-0.2-0.2-0.4-0.4-0.7-0.5v-0.1c0.2-0.1,0.4-0.3,0.5-0.5c0.3-0.4,0.3-1.1,0-1.6C18.5,9.6,18,9,16.9,9c-1.3,0-1.7,0.9-1.9,1.2
20
- l1,0.4c0.1-0.3,0.4-0.6,0.9-0.6c0.4,0,0.8,0.3,0.8,0.6c0,0.6-0.5,0.7-0.9,0.7h-0.5v1h0.5c0.6,0,1,0.2,1,0.8
21
- C17.9,13.7,17.4,13.9,17,13.9z"/>
22
- </g>
23
- </g>
24
- </svg>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
core/assets/svg/icons/number.svg CHANGED
@@ -1 +1 @@
1
- <svg enable-background="new 0 0 24 24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m0 0h24v24h-24z" fill="none"/><path d="m19 3h-14c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-14c0-1.1-.9-2-2-2zm0 16h-14v-14h14zm-7-2h2v-10h-4v2h2z" fill="#32373c"/></svg>
1
+ <svg enable-background="new 0 0 24 24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m0 0h24v24h-24z" fill="none"/><path d="m0 0h24v24h-24z" fill="none"/><path d="m20 10v-2h-4v-4h-2v4h-4v-4h-2v4h-4v2h4v4h-4v2h4v4h2v-4h4v4h2v-4h4v-2h-4v-4zm-6 4h-4v-4h4z" fill="#32373c"/></svg>
core/assets/svg/icons/{opt-in.svg → opt-in-choice.svg} RENAMED
File without changes
core/assets/svg/icons/page-break.svg CHANGED
@@ -1 +1 @@
1
- <svg enable-background="new 0 0 24 24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m0 0h24v24h-24z" fill="none"/><path d="m8 19h3v4h2v-4h3l-4-4zm8-14h-3v-4h-2v4h-3l4 4zm-12 6v2h16v-2z" fill="#32373c"/></svg>
1
+ <svg enable-background="new 0 0 24 24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m0 0h24v24h-24z" fill="none"/><path d="m6.4 4.7c0-.9.8-1.6 1.6-1.6h8c.9 0 1.6.8 1.6 1.6v4h2v-4c0-2-1.6-3.7-3.7-3.7h-7.9c-2 0-3.7 1.7-3.7 3.7v4h2v-4zm11.2 14.6c0 .9-.8 1.6-1.6 1.6h-8c-.9 0-1.6-.8-1.6-1.6v-4h-2.1v4c0 2 1.6 3.7 3.7 3.7h8c2 0 3.7-1.6 3.7-3.7v-4h-2v4zm-16.2-8v1.3h21.2v-1.3z" fill="#32373c"/></svg>
core/assets/svg/icons/paragraph.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg enable-background="new 0 0 24 24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m.8 0h24v24h-24v-24z" fill="none"/><path d="m19.5 3h-9.5v-.1l-1 .2c-2.6.5-4.5 2.8-4.5 5.5s1.9 5 4.5 5.4l.8.1v7h1.7v-16.4h3.3v16.3h1.7v-16.3h3z" fill="#32373c"/></svg>
core/assets/svg/icons/payment.svg CHANGED
@@ -1 +1 @@
1
- <svg enable-background="new 0 0 24 24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m0 0h24v24h-24z" fill="none"/><g fill="#32373c"><path d="m21 7.3v-2.3c0-1.1-.9-2-2-2h-14c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-2.3c.6-.4 1-1 1-1.7v-6c0-.7-.4-1.4-1-1.7zm-1 1.7v6h-7v-6zm-15 10v-14h14v2h-6c-1.1 0-2 .9-2 2v6c0 1.1.9 2 2 2h6v2z"/><circle cx="16" cy="12" r="1.5"/></g></svg>
1
+ <svg enable-background="new 0 0 24 24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m0 0h24v24h-24z" fill="none"/><path d="m22 4h-20v16h20zm-2 14h-16v-6h16zm0-10h-16v-2h16z" fill="#32373c"/></svg>
core/assets/svg/icons/placeholder.svg DELETED
@@ -1 +0,0 @@
1
- <svg enable-background="new 0 0 24 24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m0 0h24v24h-24z" fill="none"/><path d="m14.1 9 .9.9-9.1 9.1h-.9v-.9zm3.6-6c-.2 0-.5.1-.7.3l-1.8 1.8 3.8 3.8 1.7-1.9c.4-.4.4-1 0-1.4l-2.3-2.3c-.2-.2-.5-.3-.7-.3zm-3.6 3.2-11.1 11v3.8h3.8l11-11.1z" fill="#32373c"/></svg>
 
core/assets/svg/icons/poll.svg CHANGED
@@ -1 +1 @@
1
- <svg enable-background="new 0 0 24 24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m0 0h24v24h-24z" fill="none"/><path d="m19 3h-14c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-14c0-1.1-.9-2-2-2zm0 16h-14v-14h14zm-12-9h2v7h-2zm4-3h2v10h-2zm4 6h2v4h-2z" fill="#32373c"/></svg>
1
+ <svg enable-background="new 0 0 24 24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m0 0h24v24h-24z" fill="none"/><path d="m0 0h24v24h-24z" fill="none"/><path d="m18 13h-.7l-2 2h1.9l1.8 2h-14l1.8-2h2.1l-2-2h-.9l-3 3v4c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-4zm1 7h-14v-1h14zm-7.7-5c.4.4 1 .4 1.4 0l6.4-6.4c.4-.4.4-1 0-1.4l-5-4.9c-.4-.4-1-.4-1.4 0l-6.3 6.4c-.4.4-.4 1 0 1.4 0 0 4.9 4.9 4.9 4.9zm2.2-10.6 3.5 3.5-4.9 4.9-3.6-3.4s5-5 5-5z" fill="#32373c"/></svg>
core/assets/svg/icons/{single-choice.svg → radio.svg} RENAMED
File without changes
core/assets/svg/icons/{rank-order.svg → rank.svg} RENAMED
File without changes
core/assets/svg/icons/{rating.svg → rate.svg} RENAMED
File without changes
core/assets/svg/icons/scale.svg CHANGED
@@ -1 +1 @@
1
- <svg enable-background="new 0 0 24 24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m0 0h24v24h-24z" fill="none"/><path d="m19.5 9.5c-1 0-1.9.6-2.3 1.5h-2.9c-.4-.9-1.3-1.5-2.3-1.5s-1.9.6-2.3 1.5h-2.9c-.4-.9-1.3-1.5-2.3-1.5-1.4 0-2.5 1.1-2.5 2.5s1.1 2.5 2.5 2.5c1 0 1.9-.6 2.3-1.5h2.9c.4.9 1.3 1.5 2.3 1.5s1.9-.6 2.3-1.5h2.9c.4.9 1.3 1.5 2.3 1.5 1.4 0 2.5-1.1 2.5-2.5s-1.1-2.5-2.5-2.5z" fill="#32373c"/></svg>
1
+ <svg enable-background="new 0 0 24 24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m0 0h24v24h-24z" fill="none"/><path d="m0 0h24v24h-24z" fill="none"/><path d="m17 4h3v16h-3zm-12 10h3v6h-3zm6-5h3v11h-3z" fill="#32373c"/></svg>
core/assets/svg/icons/separator.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg enable-background="new 0 0 24 24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m0 0h24v24h-24z" fill="none"/><path d="m19 7.8v3.6h-14v-3.6h-1.9v8.4h1.9v-3.1h14v3.1h1.9v-8.4z" fill="#32373c"/><path d="m0 0h24v24h-24z" fill="none"/></svg>
core/assets/svg/icons/slider.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg enable-background="new 0 0 24 24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m0 0h24v24h-24z" fill="none"/><path d="m19.5 9.5c-1 0-1.9.6-2.3 1.5h-2.9c-.4-.9-1.3-1.5-2.3-1.5s-1.9.6-2.3 1.5h-2.9c-.4-.9-1.3-1.5-2.3-1.5-1.4 0-2.5 1.1-2.5 2.5s1.1 2.5 2.5 2.5c1 0 1.9-.6 2.3-1.5h2.9c.4.9 1.3 1.5 2.3 1.5s1.9-.6 2.3-1.5h2.9c.4.9 1.3 1.5 2.3 1.5 1.4 0 2.5-1.1 2.5-2.5s-1.1-2.5-2.5-2.5z" fill="#32373c"/></svg>
core/assets/svg/icons/table.svg DELETED
@@ -1 +0,0 @@
1
- <svg enable-background="new 0 0 24 24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m0 0h24v24h-24z" fill="none"/><path d="m22 2h-20v20h20zm-18 6v-4h16v4zm0 6v-4h16v4zm0 6v-4h16v4z" fill="#32373c"/></svg>
 
core/assets/svg/icons/{short-text.svg → text.svg} RENAMED
File without changes
core/assets/svg/icons/website-link.svg DELETED
@@ -1 +0,0 @@
1
- <svg enable-background="new 0 0 24 24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m0 0h24v24h-24z" fill="none"/><path d="m20 9c0-4.4-3.6-7.9-8-7.9s-8 3.5-8 7.9v6c0 4.4 3.6 8 8 8s8-3.6 8-8zm-2 0h-5v-5.8c2.8.4 5 2.9 5 5.8zm-7-5.8v5.8h-5c0-2.9 2.2-5.4 5-5.8zm7 11.8c0 3.3-2.7 6-6 6s-6-2.7-6-6v-4h12z" fill="#32373c"/></svg>
 
core/assets/svg/icons/website.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg enable-background="new 0 0 24 24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m0 0h24v24h-24z" fill="none"/><path d="m0 0h24v24h-24z" fill="none"/><path d="m3.9 12c0-1.7 1.4-3.1 3.1-3.1h4v-1.9h-4c-2.8 0-5 2.2-5 5s2.2 5 5 5h4v-1.9h-4c-1.7 0-3.1-1.4-3.1-3.1zm4.1 1h8v-2h-8zm9-6h-4v1.9h4c1.7 0 3.1 1.4 3.1 3.1s-1.4 3.1-3.1 3.1h-4v1.9h4c2.8 0 5-2.2 5-5s-2.2-5-5-5z" fill="#32373c"/></svg>
core/classes/class-email-encoder.php ADDED
@@ -0,0 +1,95 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class HappyForms_Email_Encoder {
4
+
5
+ private static $instance;
6
+ private $encoder;
7
+
8
+ public static function instance() {
9
+ if ( is_null( self::$instance ) ) {
10
+ self::$instance = new self();
11
+ }
12
+
13
+ return self::$instance;
14
+ }
15
+
16
+ public function __construct() {
17
+ require_once( happyforms_get_core_folder() . '/lib/php-punycode/src/Exception/OutOfBoundsException.php' );
18
+ require_once( happyforms_get_core_folder() . '/lib/php-punycode/src/Exception/LabelOutOfBoundsException.php' );
19
+ require_once( happyforms_get_core_folder() . '/lib/php-punycode/src/Exception/DomainOutOfBoundsException.php' );
20
+ require_once( happyforms_get_core_folder() . '/lib/php-punycode/src/Punycode.php' );
21
+
22
+ $this->encoder = new TrueBV\Punycode();
23
+ }
24
+
25
+ private function encode( $string ) {
26
+ try {
27
+ $string = $this->encoder->encode( $string );
28
+ } catch( Exception $e ) {
29
+ error_log( $e->getMessage() );
30
+ }
31
+
32
+ return $string;
33
+ }
34
+
35
+ private function decode( $string ) {
36
+ try {
37
+ $string = $this->encoder->decode( $string );
38
+ } catch( Exception $e ) {
39
+ error_log( $e->getMessage() );
40
+ }
41
+
42
+ return $string;
43
+ }
44
+
45
+ public function encode_email( $address ) {
46
+ if ( ! apply_filters( 'happyforms_encode_puny_address', true, $address ) ) {
47
+ return $address;
48
+ }
49
+
50
+ $parts = explode( '@', $address );
51
+ $parts = array_map( array( $this, 'encode' ), $parts );
52
+ $address = implode( '@', $parts );
53
+
54
+ return $address;
55
+ }
56
+
57
+ public function encode_url( $address ) {
58
+ if ( ! apply_filters( 'happyforms_encode_puny_address', true, $address ) ) {
59
+ return $address;
60
+ }
61
+
62
+ return $this->encode( $address );
63
+ }
64
+
65
+ public function decode_email( $address ) {
66
+ if ( ! apply_filters( 'happyforms_decode_puny_address', true, $address ) ) {
67
+ return $address;
68
+ }
69
+
70
+ $parts = explode( '@', $address );
71
+ $parts = array_map( array( $this, 'decode' ), $parts );
72
+ $address = implode( '@', $parts );
73
+
74
+ return $address;
75
+ }
76
+
77
+ public function decode_url( $address ) {
78
+ if ( ! apply_filters( 'happyforms_decode_puny_address', true, $address ) ) {
79
+ return $address;
80
+ }
81
+
82
+ return $this->encoder->decode( $address );
83
+ }
84
+
85
+ }
86
+
87
+ if ( ! function_exists( 'happyforms_get_email_encoder' ) ):
88
+
89
+ function happyforms_get_email_encoder() {
90
+ return HappyForms_Email_Encoder::instance();
91
+ }
92
+
93
+ endif;
94
+
95
+ happyforms_get_email_encoder();
core/classes/class-email-message.php CHANGED
@@ -9,7 +9,7 @@ class HappyForms_Email_Message {
9
  *
10
  * @var string
11
  */
12
- private $from;
13
 
14
  /**
15
  * The sender name.
@@ -27,7 +27,7 @@ class HappyForms_Email_Message {
27
  *
28
  * @var string
29
  */
30
- private $reply_to;
31
 
32
  /**
33
  * The list of recipients.
@@ -36,7 +36,7 @@ class HappyForms_Email_Message {
36
  *
37
  * @var array
38
  */
39
- private $to;
40
 
41
  /**
42
  * The list of cc addresses.
@@ -45,7 +45,7 @@ class HappyForms_Email_Message {
45
  *
46
  * @var array
47
  */
48
- private $ccs;
49
 
50
  /**
51
  * The list of bcc addresses.
@@ -54,7 +54,7 @@ class HappyForms_Email_Message {
54
  *
55
  * @var array
56
  */
57
- private $bccs;
58
 
59
  /**
60
  * The email subject.
@@ -95,8 +95,9 @@ class HappyForms_Email_Message {
95
  public $message;
96
 
97
  public function __construct( $message = array() ) {
98
- $this->from = '';
99
- $this->to = '';
 
100
  $this->ccs = array();
101
  $this->bccs = array();
102
  $this->subject = '';
@@ -106,15 +107,22 @@ class HappyForms_Email_Message {
106
 
107
  public function set_from( $email, $name = '' ) {
108
  $from = apply_filters( 'happyforms_email_from', $email, $this->message );
 
 
 
109
  $this->from = $from;
110
  }
111
 
112
  public function get_from() {
113
- return $this->from;
 
 
 
114
  }
115
 
116
  public function set_from_name( $name ) {
117
  $from_name = apply_filters( 'happyforms_email_from_name', $name, $this->message );
 
118
  $this->from_name = $from_name;
119
  }
120
 
@@ -134,19 +142,20 @@ class HappyForms_Email_Message {
134
  * @return array
135
  */
136
  $to = apply_filters( 'happyforms_email_to', $to, $this->message );
 
 
137
 
138
- $this->to = trim( $to );
139
  }
140
 
141
  public function get_to() {
142
- return $this->to;
 
 
 
143
  }
144
 
145
  public function set_ccs( $ccs = array() ) {
146
- if ( is_string( $ccs ) ) {
147
- $ccs = array( $ccs );
148
- }
149
-
150
  /**
151
  * Filter the list of recipients for this email message.
152
  *
@@ -158,20 +167,20 @@ class HappyForms_Email_Message {
158
  * @return array
159
  */
160
  $ccs = apply_filters( 'happyforms_email_ccs', $ccs, $this->message );
 
161
  $ccs = array_values( array_filter( array_map( 'trim', $ccs ) ) );
162
 
163
  $this->ccs = $ccs;
164
  }
165
 
166
  public function get_ccs() {
167
- return $this->ccs;
 
 
 
168
  }
169
 
170
  public function set_bccs( $bccs = array() ) {
171
- if ( is_string( $bccs ) ) {
172
- $bccs = array( $bccs );
173
- }
174
-
175
  /**
176
  * Filter the list of recipients for this email message.
177
  *
@@ -183,20 +192,20 @@ class HappyForms_Email_Message {
183
  * @return array
184
  */
185
  $bccs = apply_filters( 'happyforms_email_bccs', $bccs, $this->message );
 
186
  $bccs = array_values( array_filter( array_map( 'trim', $bccs ) ) );
187
 
188
  $this->bccs = $bccs;
189
  }
190
 
191
  public function get_bccs() {
192
- return $this->bccs;
 
 
 
193
  }
194
 
195
  public function set_reply_to( $reply_to = array() ) {
196
- if ( is_string( $reply_to ) ) {
197
- $reply_to = array( $reply_to );
198
- }
199
-
200
  /**
201
  * Filter the list of recipients for this email message.
202
  *
@@ -208,13 +217,17 @@ class HappyForms_Email_Message {
208
  * @return array
209
  */
210
  $reply_to = apply_filters( 'happyforms_email_reply_to', $reply_to, $this->message );
 
211
  $reply_to = array_values( array_filter( array_map( 'trim', $reply_to ) ) );
212
-
213
  $this->reply_to = $reply_to;
214
  }
215
 
216
  public function get_reply_to() {
217
- return $this->reply_to;
 
 
 
218
  }
219
 
220
  public function set_subject( $subject = '' ) {
@@ -270,16 +283,22 @@ class HappyForms_Email_Message {
270
  public function get_headers() {
271
  $headers = array();
272
 
273
- if ( ! empty( $this->reply_to ) ) {
274
- array_push( $headers, 'Reply-To: ' . implode( ', ', $this->reply_to ) );
 
 
275
  }
276
 
277
- if ( ! empty( $this->ccs ) ) {
278
- array_push( $headers, 'Cc: ' . implode( ', ', $this->ccs ) );
 
 
279
  }
280
 
281
- if ( ! empty( $this->bccs ) ) {
282
- array_push( $headers, 'Bcc: ' . implode( ', ', $this->bccs ) );
 
 
283
  }
284
 
285
  return $headers;
@@ -311,8 +330,10 @@ class HappyForms_Email_Message {
311
 
312
  public function send() {
313
  add_filter( 'wp_mail_content_type', array( $this, 'get_content_type' ) );
 
 
314
 
315
- if ( $this->from ) {
316
  add_filter( 'wp_mail_from', array( $this, 'get_from' ) );
317
  }
318
 
@@ -320,13 +341,11 @@ class HappyForms_Email_Message {
320
  add_filter( 'wp_mail_from_name', array( $this, 'get_from_name' ) );
321
  }
322
 
323
- $headers = $this->get_headers();
324
- $attachments = $this->get_attachments();
325
- $result = wp_mail( $this->to, $this->subject, $this->content, $headers, $attachments );
326
 
327
  remove_filter( 'wp_mail_content_type', array( $this, 'get_content_type' ) );
328
 
329
- if ( $this->from ) {
330
  remove_filter( 'wp_mail_from', array( $this, 'get_from' ) );
331
  }
332
 
9
  *
10
  * @var string
11
  */
12
+ private $from = array();
13
 
14
  /**
15
  * The sender name.
27
  *
28
  * @var string
29
  */
30
+ private $reply_to = array();
31
 
32
  /**
33
  * The list of recipients.
36
  *
37
  * @var array
38
  */
39
+ private $to = array();
40
 
41
  /**
42
  * The list of cc addresses.
45
  *
46
  * @var array
47
  */
48
+ private $ccs = array();
49
 
50
  /**
51
  * The list of bcc addresses.
54
  *
55
  * @var array
56
  */
57
+ private $bccs = array();
58
 
59
  /**
60
  * The email subject.
95
  public $message;
96
 
97
  public function __construct( $message = array() ) {
98
+ $this->from = array();
99
+ $this->to = array();
100
+ $this->reply_to = array();
101
  $this->ccs = array();
102
  $this->bccs = array();
103
  $this->subject = '';
107
 
108
  public function set_from( $email, $name = '' ) {
109
  $from = apply_filters( 'happyforms_email_from', $email, $this->message );
110
+ $from = is_array( $from ) ? $from : array( $from );
111
+ $from = array_values( array_filter( array_map( 'trim', $from ) ) );
112
+
113
  $this->from = $from;
114
  }
115
 
116
  public function get_from() {
117
+ $from = array_map( array( happyforms_get_email_encoder(), 'encode_email' ), $this->from );
118
+ $from = implode( ', ', $from );
119
+
120
+ return $from;
121
  }
122
 
123
  public function set_from_name( $name ) {
124
  $from_name = apply_filters( 'happyforms_email_from_name', $name, $this->message );
125
+
126
  $this->from_name = $from_name;
127
  }
128
 
142
  * @return array
143
  */
144
  $to = apply_filters( 'happyforms_email_to', $to, $this->message );
145
+ $to = is_array( $to ) ? $to : array( $to );
146
+ $to = array_values( array_filter( array_map( 'trim', $to ) ) );
147
 
148
+ $this->to = $to;
149
  }
150
 
151
  public function get_to() {
152
+ $to = array_map( array( happyforms_get_email_encoder(), 'encode_email' ), $this->to );
153
+ $to = implode( ', ', $to );
154
+
155
+ return $to;
156
  }
157
 
158
  public function set_ccs( $ccs = array() ) {
 
 
 
 
159
  /**
160
  * Filter the list of recipients for this email message.
161
  *
167
  * @return array
168
  */
169
  $ccs = apply_filters( 'happyforms_email_ccs', $ccs, $this->message );
170
+ $ccs = is_array( $ccs ) ? $ccs : array( $ccs );
171
  $ccs = array_values( array_filter( array_map( 'trim', $ccs ) ) );
172
 
173
  $this->ccs = $ccs;
174
  }
175
 
176
  public function get_ccs() {
177
+ $ccs = array_map( array( happyforms_get_email_encoder(), 'encode_email' ), $this->ccs );
178
+ $ccs = implode( ', ', $ccs );
179
+
180
+ return $ccs;
181
  }
182
 
183
  public function set_bccs( $bccs = array() ) {
 
 
 
 
184
  /**
185
  * Filter the list of recipients for this email message.
186
  *
192
  * @return array
193
  */
194
  $bccs = apply_filters( 'happyforms_email_bccs', $bccs, $this->message );
195
+ $bccs = is_array( $bccs ) ? $bccs : array( $bccs );
196
  $bccs = array_values( array_filter( array_map( 'trim', $bccs ) ) );
197
 
198
  $this->bccs = $bccs;
199
  }
200
 
201
  public function get_bccs() {
202
+ $bccs = array_map( array( happyforms_get_email_encoder(), 'encode_email' ), $this->bccs );
203
+ $bccs = implode( ', ', $bccs );
204
+
205
+ return $bccs;
206
  }
207
 
208
  public function set_reply_to( $reply_to = array() ) {
 
 
 
 
209
  /**
210
  * Filter the list of recipients for this email message.
211
  *
217
  * @return array
218
  */
219
  $reply_to = apply_filters( 'happyforms_email_reply_to', $reply_to, $this->message );
220
+ $reply_to = is_array( $reply_to ) ? $reply_to : array( $reply_to );
221
  $reply_to = array_values( array_filter( array_map( 'trim', $reply_to ) ) );
222
+
223
  $this->reply_to = $reply_to;
224
  }
225
 
226
  public function get_reply_to() {
227
+ $reply_to = array_map( array( happyforms_get_email_encoder(), 'encode_email' ), $this->reply_to );
228
+ $reply_to = implode( ', ', $reply_to );
229
+
230
+ return $reply_to;
231
  }
232
 
233
  public function set_subject( $subject = '' ) {
283
  public function get_headers() {
284
  $headers = array();
285
 
286
+ $reply_to = $this->get_reply_to();
287
+
288
+ if ( ! empty( $reply_to ) ) {
289
+ array_push( $headers, 'Reply-To: ' . $reply_to );
290
  }
291
 
292
+ $ccs = $this->get_ccs();
293
+
294
+ if ( ! empty( $ccs ) ) {
295
+ array_push( $headers, 'Cc: ' . $ccs );
296
  }
297
 
298
+ $bccs = $this->get_bccs();
299
+
300
+ if ( ! empty( $bccs ) ) {
301
+ array_push( $headers, 'Bcc: ' . $bccs );
302
  }
303
 
304
  return $headers;
330
 
331
  public function send() {
332
  add_filter( 'wp_mail_content_type', array( $this, 'get_content_type' ) );
333
+
334
+ $from = $this->get_from();
335
 
336
+ if ( $from ) {
337
  add_filter( 'wp_mail_from', array( $this, 'get_from' ) );
338
  }
339
 
341
  add_filter( 'wp_mail_from_name', array( $this, 'get_from_name' ) );
342
  }
343
 
344
+ $result = wp_mail( $this->get_to(), $this->get_subject(), $this->get_content(), $this->get_headers(), $this->get_attachments() );
 
 
345
 
346
  remove_filter( 'wp_mail_content_type', array( $this, 'get_content_type' ) );
347
 
348
+ if ( $from ) {
349
  remove_filter( 'wp_mail_from', array( $this, 'get_from' ) );
350
  }
351
 
core/classes/class-form-admin.php CHANGED
@@ -11,6 +11,8 @@ class HappyForms_Form_Admin {
11
  */
12
  private static $instance;
13
 
 
 
14
  /**
15
  * The singleton constructor.
16
  *
@@ -57,6 +59,8 @@ class HappyForms_Form_Admin {
57
  add_filter( 'admin_footer_text', 'happyforms_admin_footer' );
58
  add_action( 'load-edit.php', array( $this, 'change_bulk_draft_post_status' ) );
59
  add_action( 'transition_post_status', array( $this, 'change_draft_post_status' ), 10, 3 );
 
 
60
  }
61
 
62
  /**
@@ -280,6 +284,7 @@ class HappyForms_Form_Admin {
280
  'cb' => $columns['cb'],
281
  'title' => $columns['title'],
282
  'shortcode' => __( 'Shortcode', 'happyforms' ),
 
283
  'author' => __( 'Author', 'happyforms' ),
284
  'modified' => __( 'Date', 'happyforms' )
285
  );
@@ -342,6 +347,31 @@ class HappyForms_Form_Admin {
342
 
343
  printf( '%1$s<br>%2$s', __( 'Last modified', 'happyforms' ), $t_time );
344
  break;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
345
  }
346
  }
347
 
@@ -544,6 +574,165 @@ class HappyForms_Form_Admin {
544
  wp_update_post( array( 'ID' => $post->ID, 'post_status' => 'publish' ) );
545
  }
546
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
547
 
548
  /**
549
  * Action: output Javascript logic for copying
11
  */
12
  private static $instance;
13
 
14
+ private $added_to_links = array();
15
+
16
  /**
17
  * The singleton constructor.
18
  *
59
  add_filter( 'admin_footer_text', 'happyforms_admin_footer' );
60
  add_action( 'load-edit.php', array( $this, 'change_bulk_draft_post_status' ) );
61
  add_action( 'transition_post_status', array( $this, 'change_draft_post_status' ), 10, 3 );
62
+ add_action( 'load-edit.php', array( $this, 'get_added_to_links' ) );
63
+
64
  }
65
 
66
  /**
284
  'cb' => $columns['cb'],
285
  'title' => $columns['title'],
286
  'shortcode' => __( 'Shortcode', 'happyforms' ),
287
+ 'added_to' => __( 'Added to', 'happyforms' ),
288
  'author' => __( 'Author', 'happyforms' ),
289
  'modified' => __( 'Date', 'happyforms' )
290
  );
347
 
348
  printf( '%1$s<br>%2$s', __( 'Last modified', 'happyforms' ), $t_time );
349
  break;
350
+ case 'added_to':
351
+ $html_links = '';
352
+
353
+ foreach ( $this->added_to_links as $link ) {
354
+ if ( $id != $link['id'] ) {
355
+ continue;
356
+ }
357
+
358
+ if ( '' !== $html_links ) {
359
+ $html_links .= ', ';
360
+ }
361
+
362
+ $html_links .= sprintf( '<a href="%s">%s</a>', $link['edit_url'], $link['label'] );
363
+
364
+ if ( 'post' === $link['type'] && 'draft' === $link['status'] ) {
365
+ $html_links .= ' — Draft';
366
+ }
367
+ }
368
+
369
+ if ( empty( $html_links ) ) {
370
+ $html_links = '—';
371
+ }
372
+
373
+ echo $html_links;
374
+ break;
375
  }
376
  }
377
 
574
  wp_update_post( array( 'ID' => $post->ID, 'post_status' => 'publish' ) );
575
  }
576
 
577
+ public function get_added_to_links(){
578
+ remove_filter( 'get_edit_post_link', array( $this, 'get_edit_post_link' ), 10 );
579
+
580
+ global $wpdb;
581
+ $regex_block = '/wp:thethemefoundry\/happyforms {"id":"([0-9]*)"} \/-->/';
582
+ $regex_shortcode = '/\[form id="([0-9]*)" \/\]/';
583
+ $search_string_block = 'wp:thethemefoundry/happyforms';
584
+ $search_string_shortcode = '[form id="';
585
+
586
+ $query = $wpdb->prepare("
587
+ SELECT ID, post_title, post_content, post_status FROM $wpdb->posts WHERE 1=1
588
+ AND ( ( post_content LIKE '%%%s%%' ) OR ( post_content LIKE '%%%s%%' ) )
589
+ AND post_type IN ( 'post', 'page', 'wp_block' )
590
+ AND post_status IN ( 'publish', 'future', 'draft', 'pending', 'private' )
591
+ ORDER BY post_date DESC",
592
+ $search_string_block,
593
+ $search_string_shortcode,
594
+ );
595
+
596
+ $posts = $wpdb->get_results( $query );
597
+
598
+ if ( ! empty( $posts ) ) {
599
+ foreach( $posts as $post ) {
600
+ $label = '' == $post->post_title ? 'Untitled' : $post->post_title;
601
+
602
+ $link_data = array(
603
+ 'content' => $post->post_content,
604
+ 'label' => $label,
605
+ 'edit_url' => get_edit_post_link( $post->ID ),
606
+ 'type' => 'post',
607
+ 'post_id' => $post->ID,
608
+ 'status' => $post->post_status,
609
+ );
610
+
611
+ $this->create_added_to_link( $link_data, $regex_block );
612
+ $this->create_added_to_link( $link_data, $regex_shortcode );
613
+ }
614
+ }
615
+
616
+ // check if added to widget areas
617
+ global $wp_registered_sidebars;
618
+ $widget_areas = wp_get_sidebars_widgets();
619
+ $url_admin_widget_areas = get_admin_url( null, 'widgets.php' );
620
+
621
+ foreach( $widget_areas as $widget_area_id => $widget_area ) {
622
+ if ( 'wp_inactive_widgets' === $widget_area_id ) {
623
+ continue;
624
+ }
625
+
626
+ if ( ! isset( $wp_registered_sidebars[ $widget_area_id ] ) ) {
627
+ continue;
628
+ }
629
+
630
+ $widget_happyforms = get_option( 'widget_happyforms_widget', array() );
631
+ $widget_block = get_option( 'widget_block', array() );
632
+
633
+ foreach ( $widget_area as $widget_id ) {
634
+ $widget_area_name = $wp_registered_sidebars[ $widget_area_id ]['name'];
635
+ $widget_name = substr( $widget_id, 0, -2 );
636
+ $widget_index = substr( $widget_id, -1 );
637
+
638
+ if ( 'block' === $widget_name ) {
639
+ if ( ! isset( $widget_block[ $widget_index ] ) ) {
640
+ continue;
641
+ }
642
+
643
+ $link_data = array(
644
+ 'content' => $widget_block[ $widget_index ]['content'],
645
+ 'label' => $widget_area_name,
646
+ 'edit_url' => $url_admin_widget_areas,
647
+ 'type' => 'widget',
648
+ );
649
+
650
+ $this->create_added_to_link( $link_data, $regex_block );
651
+ $this->create_added_to_link( $link_data, $regex_shortcode );
652
+
653
+ } else if ( 'happyforms_widget' === $widget_name ) {
654
+ if ( ! isset( $widget_happyforms[ $widget_index ] ) ) {
655
+ continue;
656
+ }
657
+
658
+ $hf_widget_data = $widget_happyforms[ $widget_index ];
659
+ $form_id = $hf_widget_data['form_id'];
660
+ $link_added = $this->added_to_link_exists( $form_id, $widget_area_name, 'widget' );
661
+
662
+ if ( ! $link_added ) {
663
+ $added_to_link = array(
664
+ 'id' => $form_id,
665
+ 'label' => $widget_area_name,
666
+ 'edit_url' => $url_admin_widget_areas,
667
+ 'type' => 'widget',
668
+ );
669
+
670
+ $this->added_to_links[] = $added_to_link;
671
+ }
672
+ }
673
+ }
674
+ }
675
+
676
+ add_filter( 'get_edit_post_link', array( $this, 'get_edit_post_link' ), 10, 3 );
677
+ }
678
+
679
+ public function create_added_to_link( $link_data, $regex ) {
680
+ $has_matches = preg_match_all( $regex, $link_data['content'], $matches );
681
+
682
+ if ( empty( $has_matches ) ) {
683
+ return;
684
+ }
685
+
686
+ foreach ( $matches[1] as $form_id ) {
687
+ $label = $link_data['label'];
688
+ $type = $link_data['type'];
689
+ $link_added = false;
690
+
691
+ if ( 'post' === $type ) {
692
+ $link_added = $this->added_to_link_exists( $form_id, $label, $type, $link_data['post_id'] );
693
+ } else {
694
+ $link_added = $this->added_to_link_exists( $form_id, $label, $type );
695
+ }
696
+
697
+ if ( $link_added ) {
698
+ continue;
699
+ }
700
+
701
+ $added_to_link = array(
702
+ 'id' => $form_id,
703
+ 'label' => $label,
704
+ 'edit_url' => $link_data['edit_url'],
705
+ 'type' => $type,
706
+ );
707
+
708
+ if ( 'post' === $type ) {
709
+ $added_to_link['post_id'] = $link_data['post_id'];
710
+ $added_to_link['status'] = $link_data['status'];
711
+ }
712
+
713
+ $this->added_to_links[] = $added_to_link;
714
+ }
715
+ }
716
+
717
+ public function added_to_link_exists( $form_id, $label, $type, $post_id = 0 ) {
718
+ $exists = false;
719
+
720
+ foreach ( $this->added_to_links as $link ) {
721
+ if ( 'post' === $type ) {
722
+ $exists = ( $type === $link['type'] && $form_id === $link['id'] &&
723
+ $label === $link['label'] && $post_id === $link['post_id'] );
724
+ } else {
725
+ $exists = ( $type === $link['type'] && $form_id === $link['id'] && $label === $link['label'] );
726
+ }
727
+
728
+ if ( $exists ) {
729
+ break;
730
+ }
731
+ }
732
+
733
+ return $exists;
734
+ }
735
+
736
 
737
  /**
738
  * Action: output Javascript logic for copying
core/classes/class-happyforms-core.php CHANGED
@@ -89,6 +89,9 @@ class HappyForms_Core {
89
  require_once( happyforms_get_core_folder() . '/classes/class-block.php' );
90
  }
91
 
 
 
 
92
  // Admin hooks
93
  add_action( 'admin_menu', array( $this, 'admin_menu' ) );
94
  add_filter( 'submenu_file', array( $this, 'submenu_file' ) );
89
  require_once( happyforms_get_core_folder() . '/classes/class-block.php' );
90
  }
91
 
92
+ // Punycode support
93
+ require_once( happyforms_get_core_folder() . '/classes/class-email-encoder.php' );
94
+
95
  // Admin hooks
96
  add_action( 'admin_menu', array( $this, 'admin_menu' ) );
97
  add_filter( 'submenu_file', array( $this, 'submenu_file' ) );
core/classes/parts/class-part-email.php CHANGED
@@ -218,6 +218,8 @@ class HappyForms_Part_Email extends HappyForms_Form_Part {
218
 
219
  public function stringify_value( $value, $part, $form ) {
220
  if ( $this->type === $part['type'] ) {
 
 
221
  if ( ! empty( $part['prefix'] ) ) {
222
  $value = "{$part['prefix']}{$value}";
223
  }
218
 
219
  public function stringify_value( $value, $part, $form ) {
220
  if ( $this->type === $part['type'] ) {
221
+ $value = happyforms_get_email_encoder()->decode_email( $value );
222
+
223
  if ( ! empty( $part['prefix'] ) ) {
224
  $value = "{$part['prefix']}{$value}";
225
  }
core/helpers/helper-misc.php CHANGED
@@ -911,13 +911,16 @@ endif;
911
  if ( ! function_exists( 'happyforms_customize_part_logic' ) ) :
912
 
913
  function happyforms_customize_part_logic() {
914
- $template_path = happyforms_get_core_folder() . '/templates/customize-form-part-logic.php';
 
915
 
916
  $template_path = apply_filters( 'happyforms_customize_part_logic_template_path', $template_path );
917
 
918
- ob_start();
919
- require( $template_path );
920
- $template_html = ob_get_clean();
 
 
921
 
922
  echo $template_html;
923
  }
@@ -982,6 +985,7 @@ endif;
982
  if ( ! function_exists( 'happyforms_is_email' ) ):
983
 
984
  function happyforms_is_email( $email ) {
 
985
  $is_email = is_email( $email );
986
  $is_email = apply_filters( 'happyforms_is_email', $is_email, $email );
987
 
911
  if ( ! function_exists( 'happyforms_customize_part_logic' ) ) :
912
 
913
  function happyforms_customize_part_logic() {
914
+ $template_path = '';
915
+ $template_html = '';
916
 
917
  $template_path = apply_filters( 'happyforms_customize_part_logic_template_path', $template_path );
918
 
919
+ if ( '' !== $template_path ) {
920
+ ob_start();
921
+ require( $template_path );
922
+ $template_html = ob_get_clean();
923
+ }
924
 
925
  echo $template_html;
926
  }
985
  if ( ! function_exists( 'happyforms_is_email' ) ):
986
 
987
  function happyforms_is_email( $email ) {
988
+ $email = happyforms_get_email_encoder()->encode_email( $email );
989
  $is_email = is_email( $email );
990
  $is_email = apply_filters( 'happyforms_is_email', $is_email, $email );
991
 
core/helpers/helper-validation.php CHANGED
@@ -99,7 +99,7 @@ if ( ! function_exists( 'happyforms_sanitize_emails' ) ):
99
  */
100
  function happyforms_sanitize_emails( $emails ) {
101
  $emails = explode( ',', $emails );
102
- $emails = array_map( 'sanitize_email', $emails );
103
  $emails = array_filter( $emails );
104
  $emails = implode( ', ', $emails );
105
 
99
  */
100
  function happyforms_sanitize_emails( $emails ) {
101
  $emails = explode( ',', $emails );
102
+ $emails = array_map( 'sanitize_text_field', $emails );
103
  $emails = array_filter( $emails );
104
  $emails = implode( ', ', $emails );
105
 
core/lib/php-punycode/LICENSE ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Copyright (c) 2014 TrueServer B.V.
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is furnished
8
+ to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in all
11
+ copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ THE SOFTWARE.
core/lib/php-punycode/src/Exception/DomainOutOfBoundsException.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace TrueBV\Exception;
4
+
5
+ /**
6
+ * Class DomainOutOfBoundsException
7
+ * @package TrueBV\Exception
8
+ * @author Sebastian Kroczek <sk@xbug.de>
9
+ */
10
+ class DomainOutOfBoundsException extends OutOfBoundsException
11
+ {
12
+
13
+ }
core/lib/php-punycode/src/Exception/LabelOutOfBoundsException.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace TrueBV\Exception;
4
+
5
+ /**
6
+ * Class LabelOutOfBoundsException
7
+ * @package TrueBV\Exception
8
+ * @author Sebastian Kroczek <sk@xbug.de>
9
+ */
10
+ class LabelOutOfBoundsException extends OutOfBoundsException
11
+ {
12
+
13
+ }
core/lib/php-punycode/src/Exception/OutOfBoundsException.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace TrueBV\Exception;
4
+
5
+ /**
6
+ * Class OutOfBoundsException
7
+ * @package TrueBV\Exception
8
+ * @author Sebastian Kroczek <sk@xbug.de>
9
+ */
10
+ class OutOfBoundsException extends \RuntimeException
11
+ {
12
+
13
+ }
core/lib/php-punycode/src/Punycode.php ADDED
@@ -0,0 +1,360 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace TrueBV;
3
+
4
+ use TrueBV\Exception\DomainOutOfBoundsException;
5
+ use TrueBV\Exception\LabelOutOfBoundsException;
6
+
7
+ /**
8
+ * Punycode implementation as described in RFC 3492
9
+ *
10
+ * @link http://tools.ietf.org/html/rfc3492
11
+ */
12
+ class Punycode
13
+ {
14
+
15
+ /**
16
+ * Bootstring parameter values
17
+ *
18
+ */
19
+ const BASE = 36;
20
+ const TMIN = 1;
21
+ const TMAX = 26;
22
+ const SKEW = 38;
23
+ const DAMP = 700;
24
+ const INITIAL_BIAS = 72;
25
+ const INITIAL_N = 128;
26
+ const PREFIX = 'xn--';
27
+ const DELIMITER = '-';
28
+
29
+ /**
30
+ * Encode table
31
+ *
32
+ * @param array
33
+ */
34
+ protected static $encodeTable = array(
35
+ 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l',
36
+ 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x',
37
+ 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
38
+ );
39
+
40
+ /**
41
+ * Decode table
42
+ *
43
+ * @param array
44
+ */
45
+ protected static $decodeTable = array(
46
+ 'a' => 0, 'b' => 1, 'c' => 2, 'd' => 3, 'e' => 4, 'f' => 5,
47
+ 'g' => 6, 'h' => 7, 'i' => 8, 'j' => 9, 'k' => 10, 'l' => 11,
48
+ 'm' => 12, 'n' => 13, 'o' => 14, 'p' => 15, 'q' => 16, 'r' => 17,
49
+ 's' => 18, 't' => 19, 'u' => 20, 'v' => 21, 'w' => 22, 'x' => 23,
50
+ 'y' => 24, 'z' => 25, '0' => 26, '1' => 27, '2' => 28, '3' => 29,
51
+ '4' => 30, '5' => 31, '6' => 32, '7' => 33, '8' => 34, '9' => 35
52
+ );
53
+
54
+ /**
55
+ * Character encoding
56
+ *
57
+ * @param string
58
+ */
59
+ protected $encoding;
60
+
61
+ /**
62
+ * Constructor
63
+ *
64
+ * @param string $encoding Character encoding
65
+ */
66
+ public function __construct($encoding = 'UTF-8')
67
+ {
68
+ $this->encoding = $encoding;
69
+ }
70
+
71
+ /**
72
+ * Encode a domain to its Punycode version
73
+ *
74
+ * @param string $input Domain name in Unicode to be encoded
75
+ * @return string Punycode representation in ASCII
76
+ */
77
+ public function encode($input)
78
+ {
79
+ $input = mb_strtolower($input, $this->encoding);
80
+ $parts = explode('.', $input);
81
+ foreach ($parts as &$part) {
82
+ $length = strlen($part);
83
+ if ($length < 1) {
84
+ throw new LabelOutOfBoundsException(sprintf('The length of any one label is limited to between 1 and 63 octets, but %s given.', $length));
85
+ }
86
+ $part = $this->encodePart($part);
87
+ }
88
+ $output = implode('.', $parts);
89
+ $length = strlen($output);
90
+ if ($length > 255) {
91
+ throw new DomainOutOfBoundsException(sprintf('A full domain name is limited to 255 octets (including the separators), %s given.', $length));
92
+ }
93
+
94
+ return $output;
95
+ }
96
+
97
+ /**
98
+ * Encode a part of a domain name, such as tld, to its Punycode version
99
+ *
100
+ * @param string $input Part of a domain name
101
+ * @return string Punycode representation of a domain part
102
+ */
103
+ protected function encodePart($input)
104
+ {
105
+ $codePoints = $this->listCodePoints($input);
106
+
107
+ $n = static::INITIAL_N;
108
+ $bias = static::INITIAL_BIAS;
109
+ $delta = 0;
110
+ $h = $b = count($codePoints['basic']);
111
+
112
+ $output = '';
113
+ foreach ($codePoints['basic'] as $code) {
114
+ $output .= $this->codePointToChar($code);
115
+ }
116
+ if ($input === $output) {
117
+ return $output;
118
+ }
119
+ if ($b > 0) {
120
+ $output .= static::DELIMITER;
121
+ }
122
+
123
+ $codePoints['nonBasic'] = array_unique($codePoints['nonBasic']);
124
+ sort($codePoints['nonBasic']);
125
+
126
+ $i = 0;
127
+ $length = mb_strlen($input, $this->encoding);
128
+ while ($h < $length) {
129
+ $m = $codePoints['nonBasic'][$i++];
130
+ $delta = $delta + ($m - $n) * ($h + 1);
131
+ $n = $m;
132
+
133
+ foreach ($codePoints['all'] as $c) {
134
+ if ($c < $n || $c < static::INITIAL_N) {
135
+ $delta++;
136
+ }
137
+ if ($c === $n) {
138
+ $q = $delta;
139
+ for ($k = static::BASE;; $k += static::BASE) {
140
+ $t = $this->calculateThreshold($k, $bias);
141
+ if ($q < $t) {
142
+ break;
143
+ }
144
+
145
+ $code = $t + (($q - $t) % (static::BASE - $t));
146
+ $output .= static::$encodeTable[$code];
147
+
148
+ $q = ($q - $t) / (static::BASE - $t);
149
+ }
150
+
151
+ $output .= static::$encodeTable[$q];
152
+ $bias = $this->adapt($delta, $h + 1, ($h === $b));
153
+ $delta = 0;
154
+ $h++;
155
+ }
156
+ }
157
+
158
+ $delta++;
159
+ $n++;
160
+ }
161
+ $out = static::PREFIX . $output;
162
+ $length = strlen($out);
163
+ if ($length > 63 || $length < 1) {
164
+ throw new LabelOutOfBoundsException(sprintf('The length of any one label is limited to between 1 and 63 octets, but %s given.', $length));
165
+ }
166
+
167
+ return $out;
168
+ }
169
+
170
+ /**
171
+ * Decode a Punycode domain name to its Unicode counterpart
172
+ *
173
+ * @param string $input Domain name in Punycode
174
+ * @return string Unicode domain name
175
+ */
176
+ public function decode($input)
177
+ {
178
+ $input = strtolower($input);
179
+ $parts = explode('.', $input);
180
+ foreach ($parts as &$part) {
181
+ $length = strlen($part);
182
+ if ($length > 63 || $length < 1) {
183
+ throw new LabelOutOfBoundsException(sprintf('The length of any one label is limited to between 1 and 63 octets, but %s given.', $length));
184
+ }
185
+ if (strpos($part, static::PREFIX) !== 0) {
186
+ continue;
187
+ }
188
+
189
+ $part = substr($part, strlen(static::PREFIX));
190
+ $part = $this->decodePart($part);
191
+ }
192
+ $output = implode('.', $parts);
193
+ $length = strlen($output);
194
+ if ($length > 255) {
195
+ throw new DomainOutOfBoundsException(sprintf('A full domain name is limited to 255 octets (including the separators), %s given.', $length));
196
+ }
197
+
198
+ return $output;
199
+ }
200
+
201
+ /**
202
+ * Decode a part of domain name, such as tld
203
+ *
204
+ * @param string $input Part of a domain name
205
+ * @return string Unicode domain part
206
+ */
207
+ protected function decodePart($input)
208
+ {
209
+ $n = static::INITIAL_N;
210
+ $i = 0;
211
+ $bias = static::INITIAL_BIAS;
212
+ $output = '';
213
+
214
+ $pos = strrpos($input, static::DELIMITER);
215
+ if ($pos !== false) {
216
+ $output = substr($input, 0, $pos++);
217
+ } else {
218
+ $pos = 0;
219
+ }
220
+
221
+ $outputLength = strlen($output);
222
+ $inputLength = strlen($input);
223
+ while ($pos < $inputLength) {
224
+ $oldi = $i;
225
+ $w = 1;
226
+
227
+ for ($k = static::BASE;; $k += static::BASE) {
228
+ $digit = static::$decodeTable[$input[$pos++]];
229
+ $i = $i + ($digit * $w);
230
+ $t = $this->calculateThreshold($k, $bias);
231
+
232
+ if ($digit < $t) {
233
+ break;
234
+ }
235
+
236
+ $w = $w * (static::BASE - $t);
237
+ }
238
+
239
+ $bias = $this->adapt($i - $oldi, ++$outputLength, ($oldi === 0));
240
+ $n = $n + (int) ($i / $outputLength);
241
+ $i = $i % ($outputLength);
242
+ $output = mb_substr($output, 0, $i, $this->encoding) . $this->codePointToChar($n) . mb_substr($output, $i, $outputLength - 1, $this->encoding);
243
+
244
+ $i++;
245
+ }
246
+
247
+ return $output;
248
+ }
249
+
250
+ /**
251
+ * Calculate the bias threshold to fall between TMIN and TMAX
252
+ *
253
+ * @param integer $k
254
+ * @param integer $bias
255
+ * @return integer
256
+ */
257
+ protected function calculateThreshold($k, $bias)
258
+ {
259
+ if ($k <= $bias + static::TMIN) {
260
+ return static::TMIN;
261
+ } elseif ($k >= $bias + static::TMAX) {
262
+ return static::TMAX;
263
+ }
264
+ return $k - $bias;
265
+ }
266
+
267
+ /**
268
+ * Bias adaptation
269
+ *
270
+ * @param integer $delta
271
+ * @param integer $numPoints
272
+ * @param boolean $firstTime
273
+ * @return integer
274
+ */
275
+ protected function adapt($delta, $numPoints, $firstTime)
276
+ {
277
+ $delta = (int) (
278
+ ($firstTime)
279
+ ? $delta / static::DAMP
280
+ : $delta / 2
281
+ );
282
+ $delta += (int) ($delta / $numPoints);
283
+
284
+ $k = 0;
285
+ while ($delta > ((static::BASE - static::TMIN) * static::TMAX) / 2) {
286
+ $delta = (int) ($delta / (static::BASE - static::TMIN));
287
+ $k = $k + static::BASE;
288
+ }
289
+ $k = $k + (int) (((static::BASE - static::TMIN + 1) * $delta) / ($delta + static::SKEW));
290
+
291
+ return $k;
292
+ }
293
+
294
+ /**
295
+ * List code points for a given input
296
+ *
297
+ * @param string $input
298
+ * @return array Multi-dimension array with basic, non-basic and aggregated code points
299
+ */
300
+ protected function listCodePoints($input)
301
+ {
302
+ $codePoints = array(
303
+ 'all' => array(),
304
+ 'basic' => array(),
305
+ 'nonBasic' => array(),
306
+ );
307
+
308
+ $length = mb_strlen($input, $this->encoding);
309
+ for ($i = 0; $i < $length; $i++) {
310
+ $char = mb_substr($input, $i, 1, $this->encoding);
311
+ $code = $this->charToCodePoint($char);
312
+ if ($code < 128) {
313
+ $codePoints['all'][] = $codePoints['basic'][] = $code;
314
+ } else {
315
+ $codePoints['all'][] = $codePoints['nonBasic'][] = $code;
316
+ }
317
+ }
318
+
319
+ return $codePoints;
320
+ }
321
+
322
+ /**
323
+ * Convert a single or multi-byte character to its code point
324
+ *
325
+ * @param string $char
326
+ * @return integer
327
+ */
328
+ protected function charToCodePoint($char)
329
+ {
330
+ $code = ord($char[0]);
331
+ if ($code < 128) {
332
+ return $code;
333
+ } elseif ($code < 224) {
334
+ return (($code - 192) * 64) + (ord($char[1]) - 128);
335
+ } elseif ($code < 240) {
336
+ return (($code - 224) * 4096) + ((ord($char[1]) - 128) * 64) + (ord($char[2]) - 128);
337
+ } else {
338
+ return (($code - 240) * 262144) + ((ord($char[1]) - 128) * 4096) + ((ord($char[2]) - 128) * 64) + (ord($char[3]) - 128);
339
+ }
340
+ }
341
+
342
+ /**
343
+ * Convert a code point to its single or multi-byte character
344
+ *
345
+ * @param integer $code
346
+ * @return string
347
+ */
348
+ protected function codePointToChar($code)
349
+ {
350
+ if ($code <= 0x7F) {
351
+ return chr($code);
352
+ } elseif ($code <= 0x7FF) {
353
+ return chr(($code >> 6) + 192) . chr(($code & 63) + 128);
354
+ } elseif ($code <= 0xFFFF) {
355
+ return chr(($code >> 12) + 224) . chr((($code >> 6) & 63) + 128) . chr(($code & 63) + 128);
356
+ } else {
357
+ return chr(($code >> 18) + 240) . chr((($code >> 12) & 63) + 128) . chr((($code >> 6) & 63) + 128) . chr(($code & 63) + 128);
358
+ }
359
+ }
360
+ }
core/templates/customize-controls/setup/upsell.php CHANGED
@@ -1,3 +1,3 @@
1
  <div class="customize-control customize-control--upsell" id="<?php echo $control['id']; ?>">
2
- <a href="https://happyforms.io/upgrade" target="_blank" class="external"><?php echo $control['label']; ?></a>
3
  </div>
1
  <div class="customize-control customize-control--upsell" id="<?php echo $control['id']; ?>">
2
+ <span class="members-only"><?php _e( 'Members Only', 'happyforms') ?></span>
3
  </div>
core/templates/customize-form-part-footer.php CHANGED
@@ -2,7 +2,7 @@
2
  <div class="happyforms-widget-actions">
3
  <a href="#" class="happyforms-form-part-remove"><?php _e( 'Delete', 'happyforms' ); ?></a> |
4
  <a href="#" class="happyforms-form-part-duplicate"><?php _e( 'Duplicate', 'happyforms' ); ?></a>
5
- <a href="#" class="happyforms-form-part-logic"><?php _e( 'Logic', 'happyforms' ); ?></a>
6
  </div>
7
  </div>
8
  </div>
2
  <div class="happyforms-widget-actions">
3
  <a href="#" class="happyforms-form-part-remove"><?php _e( 'Delete', 'happyforms' ); ?></a> |
4
  <a href="#" class="happyforms-form-part-duplicate"><?php _e( 'Duplicate', 'happyforms' ); ?></a>
5
+ <a href="#" class="happyforms-form-part-logic"><?php _e( 'Logic', 'happyforms' ); ?><span class="members-only"><?php _e( 'Members Only', 'happyforms') ?></span></a>
6
  </div>
7
  </div>
8
  </div>
core/templates/customize-form-parts-drawer.php CHANGED
@@ -34,9 +34,7 @@
34
  <div class="happyforms-parts-list-item-content">
35
  <div class="happyforms-parts-list-item-title">
36
  <h3><%= part.label %></h3>
37
- <% if ( isDummy ) { %>
38
- <a href="https://happyforms.io/upgrade" target="_blank"><?php _e( 'Upgrade', 'happyforms' ); ?></a>
39
- <% } %>
40
  </div>
41
  <div class="happyforms-parts-list-item-description"><%= part.description %></div>
42
  </div>
34
  <div class="happyforms-parts-list-item-content">
35
  <div class="happyforms-parts-list-item-title">
36
  <h3><%= part.label %></h3>
37
+ <% if ( isDummy ) { %>&nbsp;<span class="members-only"><?php _e( 'Members Only', 'happyforms') ?></span><% } %>
 
 
38
  </div>
39
  <div class="happyforms-parts-list-item-description"><%= part.description %></div>
40
  </div>
core/templates/customize-form-setup-logic.php DELETED
@@ -1,5 +0,0 @@
1
- <div class="happyforms-setup-logic-wrap">
2
- <div class="happyforms-logic-view">
3
- <a href="https://happyforms.io/upgrade" class="external" target="_blank"><?php _e( 'Upgrade to add logic rule', 'happyforms' ); ?></a>
4
- </div>
5
- </div>
 
 
 
 
 
happyforms.php CHANGED
@@ -5,7 +5,7 @@
5
  * Plugin URI: https://happyforms.io
6
  * Description: We're changin' WordPress forms.
7
  * Author: Happyforms
8
- * Version: 1.13.7
9
  * Author URI: https://happyforms.io
10
  * Upgrade URI: https://happyforms.io/upgrade
11
  */
@@ -22,7 +22,7 @@ if ( defined( 'HAPPYFORMS_UPGRADE_VERSION' ) ) {
22
  /**
23
  * The current version of the plugin.
24
  */
25
- define( 'HAPPYFORMS_VERSION', '1.13.7' );
26
 
27
  if ( ! function_exists( 'happyforms_plugin_file' ) ):
28
  /**
5
  * Plugin URI: https://happyforms.io
6
  * Description: We're changin' WordPress forms.
7
  * Author: Happyforms
8
+ * Version: 1.13.8
9
  * Author URI: https://happyforms.io
10
  * Upgrade URI: https://happyforms.io/upgrade
11
  */
22
  /**
23
  * The current version of the plugin.
24
  */
25
+ define( 'HAPPYFORMS_VERSION', '1.13.8' );
26
 
27
  if ( ! function_exists( 'happyforms_plugin_file' ) ):
28
  /**
inc/assets/js/customize.js CHANGED
@@ -449,6 +449,12 @@
449
  this.unbindEvents();
450
  Backbone.View.prototype.remove.apply( this, arguments );
451
  },
 
 
 
 
 
 
452
  } );
453
 
454
  classes.views.Actions = classes.views.Base.extend( {
@@ -629,6 +635,7 @@
629
  'click .expand-collapse-all': 'onExpandCollapseAllClick',
630
  'global-attribute-set': 'onSetGlobalAttribute',
631
  'global-attribute-unset': 'onUnsetGlobalAttribute',
 
632
  },
633
 
634
  drawer: null,
@@ -951,6 +958,7 @@
951
  var $li = $( e.currentTarget );
952
 
953
  if ( $li.hasClass( 'happyforms-parts-list-item--dummy' ) || $li.hasClass( 'happyforms-parts-list-item--group' ) ) {
 
954
  return;
955
  }
956
 
@@ -966,22 +974,39 @@
966
  if ( '' === search ) {
967
  $partEls.removeClass( 'hidden' );
968
  $clearButton.removeClass( 'active' );
 
969
  } else {
970
  $clearButton.addClass( 'active' );
971
- }
972
 
973
- var results = happyForms.parts.filter( function( part ) {
974
- var label = part.get( 'label' ).toLowerCase();
975
- var description = part.get( 'description' ).toLowerCase();
 
976
 
977
- return label.indexOf( search ) >= 0 || description.indexOf( search ) >= 0;
978
- } );
979
 
980
- $partEls.addClass( 'hidden' );
 
981
 
982
- results.forEach( function( part ) {
983
- $( '.happyforms-parts-list-item[data-part-type="' + part.get( 'type' ) + '"]', this.$el ).removeClass( 'hidden' );
984
- } );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
985
  },
986
 
987
  onClearSearchClick: function( e ) {
@@ -1018,7 +1043,7 @@
1018
  'mouseout': 'onMouseOut',
1019
  'click .apply-all-check': 'applyOptionGlobally',
1020
  'click .happyforms-form-part-advanced-settings': 'onAdvancedSettingsClick',
1021
- 'click .happyforms-form-part-logic': 'onLogicButtonClick',
1022
  },
1023
 
1024
  initialize: function( options ) {
@@ -1446,15 +1471,6 @@
1446
  } );
1447
  },
1448
 
1449
- onLogicButtonClick: function( e ) {
1450
- e.preventDefault();
1451
- e.stopPropagation();
1452
-
1453
- $( '.happyforms-part-logic-wrap', this.$el ).slideToggle( 300, function() {
1454
- $( e.target ).toggleClass( 'opened' );
1455
- } );
1456
- },
1457
-
1458
  onNumberChange: function( e ) {
1459
  var $input = $( e.target );
1460
  var value = parseInt( $input.val(), 10 );
@@ -1551,6 +1567,7 @@
1551
  'keyup [data-attribute]': 'onInputChange',
1552
  'change [data-attribute]': 'onInputChange',
1553
  'change input[type=number]': 'onNumberChange',
 
1554
  } ),
1555
 
1556
  pointers: {},
@@ -1681,6 +1698,12 @@
1681
  classes.views.FormEmail = classes.views.FormSetup.extend( {
1682
  template: '#happyforms-form-email-template',
1683
 
 
 
 
 
 
 
1684
  editors: {
1685
  'confirmation_email_content' : {},
1686
  'abandoned_resume_email_content' : {},
449
  this.unbindEvents();
450
  Backbone.View.prototype.remove.apply( this, arguments );
451
  },
452
+
453
+ openUpgradeModal: function( e ) {
454
+ e.preventDefault();
455
+
456
+ happyForms.modals.openUpgradeModal();
457
+ },
458
  } );
459
 
460
  classes.views.Actions = classes.views.Base.extend( {
635
  'click .expand-collapse-all': 'onExpandCollapseAllClick',
636
  'global-attribute-set': 'onSetGlobalAttribute',
637
  'global-attribute-unset': 'onUnsetGlobalAttribute',
638
+ 'click .happyforms-parts-list-item--dummy': 'openUpgradeModal',
639
  },
640
 
641
  drawer: null,
958
  var $li = $( e.currentTarget );
959
 
960
  if ( $li.hasClass( 'happyforms-parts-list-item--dummy' ) || $li.hasClass( 'happyforms-parts-list-item--group' ) ) {
961
+ this.openUpgradeModal( e );
962
  return;
963
  }
964
 
974
  if ( '' === search ) {
975
  $partEls.removeClass( 'hidden' );
976
  $clearButton.removeClass( 'active' );
977
+
978
  } else {
979
  $clearButton.addClass( 'active' );
980
+ $partEls.addClass( 'hidden' );
981
 
982
+ var results = happyForms.parts.filter( function( part ) {
983
+ if ( 'layout_drawer_group' == part.get( 'type' ) ) {
984
+ return false;
985
+ }
986
 
987
+ var label = part.get( 'label' ).toLowerCase();
988
+ var description = part.get( 'description' ).toLowerCase();
989
 
990
+ return label.indexOf( search ) >= 0 || description.indexOf( search ) >= 0;
991
+ } );
992
 
993
+ var has_design_parts = false;
994
+ var design_parts = [ 'layout_title_dummy', 'placeholder_dummy', 'media_dummy', 'divider_dummy', 'page_break_dummy' ];
995
+
996
+ results.forEach( function( part ) {
997
+ var type = part.get( 'type' );
998
+
999
+ if ( design_parts.indexOf( type ) !== -1 ) {
1000
+ has_design_parts = true;
1001
+ }
1002
+
1003
+ $( '.happyforms-parts-list-item[data-part-type="' + type + '"]', this.$el ).removeClass( 'hidden' );
1004
+ } );
1005
+
1006
+ if ( has_design_parts ) {
1007
+ $( '.happyforms-parts-list-item.happyforms-parts-list-item--group', this.$el ).removeClass( 'hidden' );
1008
+ }
1009
+ }
1010
  },
1011
 
1012
  onClearSearchClick: function( e ) {
1043
  'mouseout': 'onMouseOut',
1044
  'click .apply-all-check': 'applyOptionGlobally',
1045
  'click .happyforms-form-part-advanced-settings': 'onAdvancedSettingsClick',
1046
+ 'click .happyforms-form-part-logic': 'openUpgradeModal',
1047
  },
1048
 
1049
  initialize: function( options ) {
1471
  } );
1472
  },
1473
 
 
 
 
 
 
 
 
 
 
1474
  onNumberChange: function( e ) {
1475
  var $input = $( e.target );
1476
  var value = parseInt( $input.val(), 10 );
1567
  'keyup [data-attribute]': 'onInputChange',
1568
  'change [data-attribute]': 'onInputChange',
1569
  'change input[type=number]': 'onNumberChange',
1570
+ 'click .customize-control-checkbox_dummy': 'openUpgradeModal',
1571
  } ),
1572
 
1573
  pointers: {},
1698
  classes.views.FormEmail = classes.views.FormSetup.extend( {
1699
  template: '#happyforms-form-email-template',
1700
 
1701
+
1702
+ events: _.extend( {}, classes.views.Base.prototype.events, {
1703
+ 'click .customize-control-checkbox_dummy': 'openUpgradeModal',
1704
+ 'click .customize-control-email-parts-list_dummy': 'openUpgradeModal',
1705
+ } ),
1706
+
1707
  editors: {
1708
  'confirmation_email_content' : {},
1709
  'abandoned_resume_email_content' : {},
inc/classes/class-happyforms.php CHANGED
@@ -35,7 +35,6 @@ class HappyForms extends HappyForms_Core {
35
  }
36
 
37
  $this->register_dummy_parts();
38
- $this->add_setup_logic_upgrade_links();
39
  }
40
 
41
  public function register_dummy_parts() {
@@ -289,29 +288,6 @@ class HappyForms extends HappyForms_Core {
289
  return false;
290
  }
291
 
292
- public function add_setup_logic_upgrade_links() {
293
- $control_slugs = array(
294
- 'email_recipient',
295
- 'email_bccs',
296
- 'alert_email_subject',
297
- 'redirect_url'
298
- );
299
-
300
- foreach ( $control_slugs as $slug ) {
301
- add_action( "happyforms_setup_control_{$slug}_after", array( $this, 'set_logic_link_template' ) );
302
- }
303
- }
304
-
305
- public function set_logic_link_template() {
306
- $html = '';
307
-
308
- ob_start();
309
- require( happyforms_get_core_folder() . '/templates/customize-form-setup-logic.php' );
310
- $html = ob_get_clean();
311
-
312
- echo $html;
313
- }
314
-
315
  public function register_modals() {
316
  $modals = happyforms_get_dashboard_modals();
317
 
35
  }
36
 
37
  $this->register_dummy_parts();
 
38
  }
39
 
40
  public function register_dummy_parts() {
288
  return false;
289
  }
290
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
291
  public function register_modals() {
292
  $modals = happyforms_get_dashboard_modals();
293
 
inc/classes/parts/class-part-layout-drawer-group.php CHANGED
@@ -6,7 +6,7 @@ class HappyForms_Part_LayoutDrawerGroup extends HappyForms_Form_Part {
6
  public $group = 'drawer_group';
7
 
8
  public function __construct() {
9
- $this->label = __( 'Layout', 'happyforms' );
10
  $this->description = '';
11
  }
12
 
6
  public $group = 'drawer_group';
7
 
8
  public function __construct() {
9
+ $this->label = __( 'Design', 'happyforms' );
10
  $this->description = '';
11
  }
12
 
inc/templates/customize-controls/checkbox_dummy.php CHANGED
@@ -1,10 +1,10 @@
1
  <div class="customize-control customize-control-checkbox customize-control-checkbox_dummy" id="customize-control-<?php echo $control['dummy_id']; ?>">
2
  <div class="customize-inside-control-row" data-pointer-target>
3
- <input type="checkbox" disabled="disabled" />
4
  <label>
5
  <span><?php echo $control['label']; ?></span>
6
  <?php if ( isset( $control['tooltip'] ) ) : ?><i class="fa fa-question-circle" aria-hidden="true" data-pointer><span><?php echo $control['tooltip']; ?></span></i><?php endif; ?>
7
- <a href="https://happyforms.me/upgrade" target="_blank" class="external"><?php _e( 'Upgrade', 'happyforms' ); ?></a>
8
  </label>
 
9
  </div>
10
  </div>
1
  <div class="customize-control customize-control-checkbox customize-control-checkbox_dummy" id="customize-control-<?php echo $control['dummy_id']; ?>">
2
  <div class="customize-inside-control-row" data-pointer-target>
3
+ <input type="checkbox" />
4
  <label>
5
  <span><?php echo $control['label']; ?></span>
6
  <?php if ( isset( $control['tooltip'] ) ) : ?><i class="fa fa-question-circle" aria-hidden="true" data-pointer><span><?php echo $control['tooltip']; ?></span></i><?php endif; ?>
 
7
  </label>
8
+ <span class="members-only"><?php _e( 'Members Only', 'happyforms') ?></span>
9
  </div>
10
  </div>
inc/templates/customize-controls/email-parts-list-dummy.php CHANGED
@@ -1,6 +1,6 @@
1
  <div class="customize-control customize-control-email-parts-list_dummy" id="customize-control-<?php echo $control['dummy_id']; ?>">
2
- <label for="<?php echo $control['dummy_id']; ?>" class="customize-control-title"><?php echo $control['label']; ?>:</label>
3
- <select id="<?php echo $control['dummy_id']; ?>" disabled>
4
  <%
5
  var options = _( parts ).where( { type: 'email' } );
6
 
@@ -8,5 +8,4 @@
8
  <option value="<%= option.id %>" <%= ( 0 === i ) ? 'selected' : '' %>>"<%= option.label %>" <?php _e( 'field', 'happyforms' ); ?></option>
9
  <% } ); %>
10
  </select>
11
- <a href="https://happyforms.me/upgrade" target="_blank" class="external"><?php _e( 'Upgrade', 'happyforms' ); ?></a>
12
  </div>
1
  <div class="customize-control customize-control-email-parts-list_dummy" id="customize-control-<?php echo $control['dummy_id']; ?>">
2
+ <label for="<?php echo $control['dummy_id']; ?>" class="customize-control-title"><?php echo $control['label']; ?>:</label>&nbsp<span class="members-only"><?php _e( 'Members Only', 'happyforms') ?></span>
3
+ <select id="<?php echo $control['dummy_id']; ?>">
4
  <%
5
  var options = _( parts ).where( { type: 'email' } );
6
 
8
  <option value="<%= option.id %>" <%= ( 0 === i ) ? 'selected' : '' %>>"<%= option.label %>" <?php _e( 'field', 'happyforms' ); ?></option>
9
  <% } ); %>
10
  </select>
 
11
  </div>
languages/happyforms.pot CHANGED
@@ -2,14 +2,14 @@
2
  # This file is distributed under the same license as the Happyforms (free) plugin.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Happyforms (free) 1.13.7\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/happyforms/\n"
7
  "Last-Translator: The Theme Foundry\n"
8
  "Language-Team: The Theme Foundry\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "POT-Creation-Date: 2021-11-09T14:36:52+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.4.0\n"
15
  "X-Domain: happyforms\n"
@@ -33,10 +33,10 @@ msgstr ""
33
 
34
  #: core/classes/class-block.php:52
35
  #: core/classes/class-form-controller.php:73
36
- #: core/classes/class-happyforms-core.php:182
37
- #: core/classes/class-happyforms-core.php:183
38
  #: core/classes/class-happyforms-widget.php:13
39
- #: core/helpers/helper-misc.php:1017
40
  msgid "Forms"
41
  msgstr ""
42
 
@@ -45,46 +45,50 @@ msgstr ""
45
  msgid "Displays a form."
46
  msgstr ""
47
 
48
- #: core/classes/class-form-admin.php:282
49
  msgid "Shortcode"
50
  msgstr ""
51
 
52
- #: core/classes/class-form-admin.php:283
 
 
 
 
53
  msgid "Author"
54
  msgstr ""
55
 
56
- #: core/classes/class-form-admin.php:284
57
  msgid "Date"
58
  msgstr ""
59
 
60
- #: core/classes/class-form-admin.php:332
61
  msgid "Copy to clipboard"
62
  msgstr ""
63
 
64
- #: core/classes/class-form-admin.php:343
65
  msgid "Last modified"
66
  msgstr ""
67
 
68
- #: core/classes/class-form-admin.php:415
69
  msgid "Edit"
70
  msgstr ""
71
 
72
- #: core/classes/class-form-admin.php:419
73
  #: core/templates/customize-form-item.php:27
74
  #: core/templates/customize-form-part-footer.php:4
75
  msgid "Duplicate"
76
  msgstr ""
77
 
78
- #: core/classes/class-form-admin.php:423
79
  #: inc/classes/class-message-admin.php:83
80
  msgid "Trash"
81
  msgstr ""
82
 
83
- #: core/classes/class-form-admin.php:467
84
  msgid "1 form duplicated."
85
  msgstr ""
86
 
87
- #: core/classes/class-form-admin.php:469
88
  msgid "Undo"
89
  msgstr ""
90
 
@@ -93,8 +97,8 @@ msgid "Form"
93
  msgstr ""
94
 
95
  #: core/classes/class-form-controller.php:75
96
- #: core/classes/class-happyforms-core.php:198
97
- #: core/classes/class-happyforms-core.php:199
98
  msgid "Add New"
99
  msgstr ""
100
 
@@ -130,8 +134,8 @@ msgstr ""
130
 
131
  #: core/classes/class-form-controller.php:84
132
  #: core/classes/class-form-controller.php:85
133
- #: core/classes/class-happyforms-core.php:190
134
- #: core/classes/class-happyforms-core.php:191
135
  msgid "All Forms"
136
  msgstr ""
137
 
@@ -394,7 +398,7 @@ msgid "Submit form"
394
  msgstr ""
395
 
396
  #: core/classes/class-form-shuffle.php:43
397
- #: inc/classes/class-happyforms.php:119
398
  msgid "Randomize fields to prevent bias"
399
  msgstr ""
400
 
@@ -842,26 +846,26 @@ msgstr ""
842
  msgid "Additional CSS"
843
  msgstr ""
844
 
845
- #: core/classes/class-happyforms-core.php:206
846
- #: core/classes/class-happyforms-core.php:207
847
  #: inc/classes/class-message-controller.php:584
848
  #: inc/classes/class-message-controller.php:585
849
  msgid "Activity"
850
  msgstr ""
851
 
852
- #: core/classes/class-happyforms-core.php:215
853
- #: core/classes/class-happyforms-core.php:216
854
  #: integrations/templates/admin-integrations.php:3
855
  msgid "Integrations"
856
  msgstr ""
857
 
858
- #: core/classes/class-happyforms-core.php:224
859
- #: core/classes/class-happyforms-core.php:225
860
  #: core/assets/jsx/build/admin/block.js:170
861
  msgid "Settings"
862
  msgstr ""
863
 
864
- #: core/classes/class-happyforms-core.php:464
865
  msgid "Add Form"
866
  msgstr ""
867
 
@@ -3023,6 +3027,14 @@ msgstr ""
3023
  msgid "part value is currently used as subject"
3024
  msgstr ""
3025
 
 
 
 
 
 
 
 
 
3026
  #: core/templates/customize-controls/style/divider.php:10
3027
  msgid "Back"
3028
  msgstr ""
@@ -3075,7 +3087,6 @@ msgid "Logic"
3075
  msgstr ""
3076
 
3077
  #: core/templates/customize-form-part-logic.php:4
3078
- #: core/templates/customize-form-setup-logic.php:3
3079
  msgid "Upgrade to add logic rule"
3080
  msgstr ""
3081
 
@@ -3087,14 +3098,7 @@ msgstr ""
3087
  msgid "Clear Results"
3088
  msgstr ""
3089
 
3090
- #: core/templates/customize-form-parts-drawer.php:38
3091
- #: inc/classes/class-happyforms.php:111
3092
- #: inc/templates/customize-controls/checkbox_dummy.php:7
3093
- #: inc/templates/customize-controls/email-parts-list-dummy.php:11
3094
- msgid "Upgrade"
3095
- msgstr ""
3096
-
3097
- #: core/templates/customize-form-parts-drawer.php:47
3098
  msgid "No fields found."
3099
  msgstr ""
3100
 
@@ -3281,7 +3285,7 @@ msgstr ""
3281
  #: core/templates/parts/customize-checkbox.php:141
3282
  #: core/templates/parts/customize-radio.php:115
3283
  #: core/templates/parts/customize-select.php:113
3284
- #: inc/classes/class-happyforms.php:149
3285
  msgid "Limit submissions"
3286
  msgstr ""
3287
 
@@ -3366,57 +3370,61 @@ msgstr ""
3366
  msgid "Click to edit this part."
3367
  msgstr ""
3368
 
3369
- #: inc/classes/class-happyforms.php:125
 
 
 
 
3370
  msgid "Use reCAPTCHA"
3371
  msgstr ""
3372
 
3373
- #: inc/classes/class-happyforms.php:131
3374
  msgid "Save incomplete and abandoned submissions"
3375
  msgstr ""
3376
 
3377
- #: inc/classes/class-happyforms.php:137
3378
  msgid "Let respondents save a draft submission and come back to it later"
3379
  msgstr ""
3380
 
3381
- #: inc/classes/class-happyforms.php:143
3382
  msgid "Require respondents to review a submission before submitting"
3383
  msgstr ""
3384
 
3385
- #: inc/classes/class-happyforms.php:155
3386
  msgid "Store replies and attachments in database"
3387
  msgstr ""
3388
 
3389
- #: inc/classes/class-happyforms.php:161
3390
  msgid "Capture user metadata (IP, language, platform, time and timezone)"
3391
  msgstr ""
3392
 
3393
- #: inc/classes/class-happyforms.php:167
3394
  msgid "Show an error message if field contains words in Disallowed Comment Keys"
3395
  msgstr ""
3396
 
3397
- #: inc/classes/class-happyforms.php:177
3398
  msgid "Include reply link"
3399
  msgstr ""
3400
 
3401
- #: inc/classes/class-happyforms.php:183
3402
  msgid "Include referral web address"
3403
  msgstr ""
3404
 
3405
- #: inc/classes/class-happyforms.php:189
3406
- #: inc/classes/class-happyforms.php:201
3407
  msgid "Attach .pdf"
3408
  msgstr ""
3409
 
3410
- #: inc/classes/class-happyforms.php:195
3411
  msgid "To email address"
3412
  msgstr ""
3413
 
3414
- #: inc/classes/class-happyforms.php:207
3415
  msgid "Send abandonment email"
3416
  msgstr ""
3417
 
3418
- #: inc/classes/class-happyforms.php:418
3419
- #: inc/classes/class-happyforms.php:436
3420
  msgid "Build your own WordPress form with Happyforms"
3421
  msgstr ""
3422
 
@@ -3494,7 +3502,7 @@ msgid "For adding a horizontal rule to visually separate fields."
3494
  msgstr ""
3495
 
3496
  #: inc/classes/parts/class-part-layout-drawer-group.php:9
3497
- msgid "Layout"
3498
  msgstr ""
3499
 
3500
  #: inc/classes/parts/class-part-layout-title-dummy.php:8
2
  # This file is distributed under the same license as the Happyforms (free) plugin.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Happyforms (free) 1.13.8\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/happyforms/\n"
7
  "Last-Translator: The Theme Foundry\n"
8
  "Language-Team: The Theme Foundry\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "POT-Creation-Date: 2021-11-29T07:39:54+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.4.0\n"
15
  "X-Domain: happyforms\n"
33
 
34
  #: core/classes/class-block.php:52
35
  #: core/classes/class-form-controller.php:73
36
+ #: core/classes/class-happyforms-core.php:185
37
+ #: core/classes/class-happyforms-core.php:186
38
  #: core/classes/class-happyforms-widget.php:13
39
+ #: core/helpers/helper-misc.php:1021
40
  msgid "Forms"
41
  msgstr ""
42
 
45
  msgid "Displays a form."
46
  msgstr ""
47
 
48
+ #: core/classes/class-form-admin.php:286
49
  msgid "Shortcode"
50
  msgstr ""
51
 
52
+ #: core/classes/class-form-admin.php:287
53
+ msgid "Added to"
54
+ msgstr ""
55
+
56
+ #: core/classes/class-form-admin.php:288
57
  msgid "Author"
58
  msgstr ""
59
 
60
+ #: core/classes/class-form-admin.php:289
61
  msgid "Date"
62
  msgstr ""
63
 
64
+ #: core/classes/class-form-admin.php:337
65
  msgid "Copy to clipboard"
66
  msgstr ""
67
 
68
+ #: core/classes/class-form-admin.php:348
69
  msgid "Last modified"
70
  msgstr ""
71
 
72
+ #: core/classes/class-form-admin.php:445
73
  msgid "Edit"
74
  msgstr ""
75
 
76
+ #: core/classes/class-form-admin.php:449
77
  #: core/templates/customize-form-item.php:27
78
  #: core/templates/customize-form-part-footer.php:4
79
  msgid "Duplicate"
80
  msgstr ""
81
 
82
+ #: core/classes/class-form-admin.php:453
83
  #: inc/classes/class-message-admin.php:83
84
  msgid "Trash"
85
  msgstr ""
86
 
87
+ #: core/classes/class-form-admin.php:497
88
  msgid "1 form duplicated."
89
  msgstr ""
90
 
91
+ #: core/classes/class-form-admin.php:499
92
  msgid "Undo"
93
  msgstr ""
94
 
97
  msgstr ""
98
 
99
  #: core/classes/class-form-controller.php:75
100
+ #: core/classes/class-happyforms-core.php:201
101
+ #: core/classes/class-happyforms-core.php:202
102
  msgid "Add New"
103
  msgstr ""
104
 
134
 
135
  #: core/classes/class-form-controller.php:84
136
  #: core/classes/class-form-controller.php:85
137
+ #: core/classes/class-happyforms-core.php:193
138
+ #: core/classes/class-happyforms-core.php:194
139
  msgid "All Forms"
140
  msgstr ""
141
 
398
  msgstr ""
399
 
400
  #: core/classes/class-form-shuffle.php:43
401
+ #: inc/classes/class-happyforms.php:118
402
  msgid "Randomize fields to prevent bias"
403
  msgstr ""
404
 
846
  msgid "Additional CSS"
847
  msgstr ""
848
 
849
+ #: core/classes/class-happyforms-core.php:209
850
+ #: core/classes/class-happyforms-core.php:210
851
  #: inc/classes/class-message-controller.php:584
852
  #: inc/classes/class-message-controller.php:585
853
  msgid "Activity"
854
  msgstr ""
855
 
856
+ #: core/classes/class-happyforms-core.php:218
857
+ #: core/classes/class-happyforms-core.php:219
858
  #: integrations/templates/admin-integrations.php:3
859
  msgid "Integrations"
860
  msgstr ""
861
 
862
+ #: core/classes/class-happyforms-core.php:227
863
+ #: core/classes/class-happyforms-core.php:228
864
  #: core/assets/jsx/build/admin/block.js:170
865
  msgid "Settings"
866
  msgstr ""
867
 
868
+ #: core/classes/class-happyforms-core.php:467
869
  msgid "Add Form"
870
  msgstr ""
871
 
3027
  msgid "part value is currently used as subject"
3028
  msgstr ""
3029
 
3030
+ #: core/templates/customize-controls/setup/upsell.php:2
3031
+ #: core/templates/customize-form-part-footer.php:5
3032
+ #: core/templates/customize-form-parts-drawer.php:37
3033
+ #: inc/templates/customize-controls/checkbox_dummy.php:8
3034
+ #: inc/templates/customize-controls/email-parts-list-dummy.php:2
3035
+ msgid "Members Only"
3036
+ msgstr ""
3037
+
3038
  #: core/templates/customize-controls/style/divider.php:10
3039
  msgid "Back"
3040
  msgstr ""
3087
  msgstr ""
3088
 
3089
  #: core/templates/customize-form-part-logic.php:4
 
3090
  msgid "Upgrade to add logic rule"
3091
  msgstr ""
3092
 
3098
  msgid "Clear Results"
3099
  msgstr ""
3100
 
3101
+ #: core/templates/customize-form-parts-drawer.php:45
 
 
 
 
 
 
 
3102
  msgid "No fields found."
3103
  msgstr ""
3104
 
3285
  #: core/templates/parts/customize-checkbox.php:141
3286
  #: core/templates/parts/customize-radio.php:115
3287
  #: core/templates/parts/customize-select.php:113
3288
+ #: inc/classes/class-happyforms.php:148
3289
  msgid "Limit submissions"
3290
  msgstr ""
3291
 
3370
  msgid "Click to edit this part."
3371
  msgstr ""
3372
 
3373
+ #: inc/classes/class-happyforms.php:110
3374
+ msgid "Upgrade"
3375
+ msgstr ""
3376
+
3377
+ #: inc/classes/class-happyforms.php:124
3378
  msgid "Use reCAPTCHA"
3379
  msgstr ""
3380
 
3381
+ #: inc/classes/class-happyforms.php:130
3382
  msgid "Save incomplete and abandoned submissions"
3383
  msgstr ""
3384
 
3385
+ #: inc/classes/class-happyforms.php:136
3386
  msgid "Let respondents save a draft submission and come back to it later"
3387
  msgstr ""
3388
 
3389
+ #: inc/classes/class-happyforms.php:142
3390
  msgid "Require respondents to review a submission before submitting"
3391
  msgstr ""
3392
 
3393
+ #: inc/classes/class-happyforms.php:154
3394
  msgid "Store replies and attachments in database"
3395
  msgstr ""
3396
 
3397
+ #: inc/classes/class-happyforms.php:160
3398
  msgid "Capture user metadata (IP, language, platform, time and timezone)"
3399
  msgstr ""
3400
 
3401
+ #: inc/classes/class-happyforms.php:166
3402
  msgid "Show an error message if field contains words in Disallowed Comment Keys"
3403
  msgstr ""
3404
 
3405
+ #: inc/classes/class-happyforms.php:176
3406
  msgid "Include reply link"
3407
  msgstr ""
3408
 
3409
+ #: inc/classes/class-happyforms.php:182
3410
  msgid "Include referral web address"
3411
  msgstr ""
3412
 
3413
+ #: inc/classes/class-happyforms.php:188
3414
+ #: inc/classes/class-happyforms.php:200
3415
  msgid "Attach .pdf"
3416
  msgstr ""
3417
 
3418
+ #: inc/classes/class-happyforms.php:194
3419
  msgid "To email address"
3420
  msgstr ""
3421
 
3422
+ #: inc/classes/class-happyforms.php:206
3423
  msgid "Send abandonment email"
3424
  msgstr ""
3425
 
3426
+ #: inc/classes/class-happyforms.php:394
3427
+ #: inc/classes/class-happyforms.php:412
3428
  msgid "Build your own WordPress form with Happyforms"
3429
  msgstr ""
3430
 
3502
  msgstr ""
3503
 
3504
  #: inc/classes/parts/class-part-layout-drawer-group.php:9
3505
+ msgid "Design"
3506
  msgstr ""
3507
 
3508
  #: inc/classes/parts/class-part-layout-title-dummy.php:8
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: contact form, contact form plugin, forms, form builder, custom form, intak
5
  Requires at least: 5.0
6
  Tested up to: 5.8
7
  Requires PHP: 7.0
8
- Stable tag: 1.13.7
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -151,6 +151,10 @@ Aw, honestly, the thought that you're writing about our contact form builder is
151
 
152
  == Changelog ==
153
 
 
 
 
 
154
  = 1.13.7 =
155
  * New feature: Reset buttons allow for resetting fields to defaults in Messages tab.
156
  * Improvement: Redesigned the sample form to better showcase current features.
@@ -875,6 +879,9 @@ Aw, honestly, the thought that you're writing about our contact form builder is
875
 
876
  == Upgrade Notice ==
877
 
 
 
 
878
  = 1.13.7 =
879
  * Messages tab field reset, better dashboard notices, miscellaneous improvements and bugfixes.
880
 
5
  Requires at least: 5.0
6
  Tested up to: 5.8
7
  Requires PHP: 7.0
8
+ Stable tag: 1.13.8
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
151
 
152
  == Changelog ==
153
 
154
+ = 1.13.8 =
155
+ * New feature: "All Forms" screen now shows where a form is being used.
156
+ * Improvement: Better support for international emails and website addresses.
157
+
158
  = 1.13.7 =
159
  * New feature: Reset buttons allow for resetting fields to defaults in Messages tab.
160
  * Improvement: Redesigned the sample form to better showcase current features.
879
 
880
  == Upgrade Notice ==
881
 
882
+ = 1.13.8 =
883
+ * New "Added to" column in "All Forms" screen, punycode support.
884
+
885
  = 1.13.7 =
886
  * Messages tab field reset, better dashboard notices, miscellaneous improvements and bugfixes.
887