Version Description
Download this release
Release Info
Developer | tlovett1 |
Plugin | Custom Contact Forms |
Version | 7.1 |
Comparing to | |
See all releases |
Code changes from version 7.0.3 to 7.1
- README.md +19 -18
- build/css/admin.css.map +1 -1
- build/css/form-manager.css +154 -59
- build/css/form-manager.css.map +1 -1
- build/css/form-manager.min.css +1 -1
- build/css/form-mce.css.map +1 -1
- build/js/form-manager.js +757 -297
- build/js/form-manager.min.js +2 -2
- build/js/form.min.js +1 -1
- classes/class-ccf-api-form-controller.php +47 -58
- classes/class-ccf-field-renderer.php +4 -3
- classes/class-ccf-form-cpt.php +1 -1
- classes/class-ccf-form-handler.php +163 -134
- classes/class-ccf-form-manager.php +253 -124
- classes/class-ccf-submission-cpt.php +1 -1
- classes/class-ccf-upgrader.php +56 -1
- custom-contact-forms.php +18 -1
- fonts/form-manager.eot +0 -0
- fonts/form-manager.svg +14 -12
- fonts/form-manager.ttf +0 -0
- fonts/form-manager.woff +0 -0
- fonts/icomoon.json +168 -97
- js/form.js +11 -3
- js/manager/collections.js +12 -0
- js/manager/models.js +129 -16
- js/manager/views.js +597 -263
- languages/custom-contact-forms.mo +0 -0
- languages/custom-contact-forms.po +426 -338
- readme.txt +6 -1
README.md
CHANGED
@@ -59,24 +59,25 @@ Each form has a number of settings that you should understand.
|
|
59 |
|
60 |
* `Pause Message` - This message will be shown if the form is paused.
|
61 |
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
|
|
80 |
|
81 |
|
82 |
|
59 |
|
60 |
* `Pause Message` - This message will be shown if the form is paused.
|
61 |
|
62 |
+
#### Form Notifications
|
63 |
+
|
64 |
+
For each of your form you can add email notifications (as many as you want). Email notifications will be sent when a
|
65 |
+
form is successfully filled out. Each notification contains the following configurable settings:
|
66 |
+
|
67 |
+
* `"To" Email Addresses` - You can send each notification to as many emails as you want. Addresses have two types: `custom` and
|
68 |
+
`field`. `custom` allows you to specify a specific email (such as your own). `field` will pull the email address dynamically from a form field.
|
69 |
+
* `"From" Email Address Type` - This allows you to set what email address the notification is sent from. `WordPress
|
70 |
+
Default` will use the default WordPress email address. `Custom Email` will allow you to manually type in a from
|
71 |
+
address. `Form Field` will allow you to choose an email field within the form to dynamically pull a from email
|
72 |
+
address.
|
73 |
+
* `"From" Name Type` - This allows you to set what name the notification email is sent from. `Custom Name`
|
74 |
+
will allow you to manually type in a from name. `Form Field` will allow you to choose a name field within
|
75 |
+
the form to dynamically pull a from email name.
|
76 |
+
* `Email Subject Type` - This allows you to set what subject line is used on the notification email. `Default`
|
77 |
+
will use the CCF default subject. `Custom Subject` will allow you to manually type in an email subject.
|
78 |
+
`Form Field` will allow you to choose a field within the form to dynamically pull a subject line.
|
79 |
+
|
80 |
+
__Note:__ In order for form notification changes to take affect, you will need to save the form.
|
81 |
|
82 |
|
83 |
|
build/css/admin.css.map
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
{
|
2 |
"version": 3,
|
3 |
-
"mappings": ";AAAA,UASC;EARA,WAAW,EAAE,MAAM;EACnB,GAAG,EAAC,2BAA2B;EAC/B,GAAG,EAAC,
|
4 |
"sources": ["../../scss/admin.scss"],
|
5 |
"names": [],
|
6 |
"file": "admin.css"
|
1 |
{
|
2 |
"version": 3,
|
3 |
+
"mappings": ";AAAA,UASC;EARA,WAAW,EAAE,MAAM;EACnB,GAAG,EAAC,2BAA2B;EAC/B,GAAG,EAAC,mNAGkD;EACtD,WAAW,EAAE,MAAM;EACnB,UAAU,EAAE,MAAM;AAIlB,0CAAsB;EACrB,WAAW,EAAE,MAAM;EACnB,OAAO,EAAE,GAAG;EACZ,KAAK,EAAE,IAAI;EACX,WAAW,EAAE,MAAM;EACnB,YAAY,EAAE,MAAM;EACpB,cAAc,EAAE,IAAI;EACpB,WAAW,EAAE,CAAC;EACd,MAAM,EAAE,OAAO;EACf,sBAAsB,EAAE,WAAW;;AAIrC,sBAAuB;EACtB,KAAK,EAAE,IAAI;EACX,OAAO,EAAE,KAAK;EACd,UAAU,EAAE,UAAU;EACtB,MAAM,EAAE,CAAC;EACT,gBAAgB,EAAE,OAAO;;AAG1B,2BAA4B;EAC3B,MAAM,EAAE,CAAC",
|
4 |
"sources": ["../../scss/admin.scss"],
|
5 |
"names": [],
|
6 |
"file": "admin.css"
|
build/css/form-manager.css
CHANGED
@@ -208,7 +208,7 @@
|
|
208 |
filter: alpha(opacity=1);
|
209 |
-moz-opacity: 0.1;
|
210 |
-khtml-opacity: 0.1;
|
211 |
-
z-index:
|
212 |
display: none; }
|
213 |
.ccf-main-modal .ccf-form-pane .bottom {
|
214 |
bottom: 0;
|
@@ -270,9 +270,11 @@
|
|
270 |
border-top: 1px solid #e5e5e5; }
|
271 |
.ccf-main-modal .ccf-form-pane .accordion-section.expanded .section-content {
|
272 |
display: block; }
|
273 |
-
.ccf-main-modal .ccf-form-pane .accordion-section.expanded
|
274 |
-
content: "
|
275 |
-
.ccf-main-modal .ccf-form-pane .accordion-section .
|
|
|
|
|
276 |
cursor: pointer;
|
277 |
display: block;
|
278 |
line-height: 29px;
|
@@ -282,10 +284,10 @@
|
|
282 |
font-size: 150%;
|
283 |
background-color: #fafafa;
|
284 |
margin: 0; }
|
285 |
-
.ccf-main-modal .ccf-form-pane .accordion-section .accordion-heading:before {
|
286 |
margin-right: 8px;
|
287 |
font-family: 'form-manager';
|
288 |
-
content: "
|
289 |
speak: none;
|
290 |
font-weight: normal;
|
291 |
font-variant: normal;
|
@@ -304,6 +306,50 @@
|
|
304 |
margin-top: 5px;
|
305 |
font-style: italic;
|
306 |
display: block; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
307 |
.ccf-main-modal .ccf-form-pane .left-sidebar {
|
308 |
box-sizing: border-box;
|
309 |
background-color: #f3f3f3;
|
@@ -421,61 +467,110 @@
|
|
421 |
bottom: 0;
|
422 |
background-color: #fff;
|
423 |
padding: 16px; }
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
430 |
margin: 0;
|
|
|
431 |
padding: 14px 21px;
|
432 |
-
|
433 |
-
.ccf-main-modal .ccf-existing-form-pane table .
|
434 |
-
|
435 |
-
.ccf-main-modal .ccf-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
.ccf-main-modal .ccf-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
479 |
|
480 |
.ccf-main-modal-overlay {
|
481 |
display: none;
|
208 |
filter: alpha(opacity=1);
|
209 |
-moz-opacity: 0.1;
|
210 |
-khtml-opacity: 0.1;
|
211 |
+
z-index: 3;
|
212 |
display: none; }
|
213 |
.ccf-main-modal .ccf-form-pane .bottom {
|
214 |
bottom: 0;
|
270 |
border-top: 1px solid #e5e5e5; }
|
271 |
.ccf-main-modal .ccf-form-pane .accordion-section.expanded .section-content {
|
272 |
display: block; }
|
273 |
+
.ccf-main-modal .ccf-form-pane .accordion-section.expanded .accordion-heading:before {
|
274 |
+
content: ""; }
|
275 |
+
.ccf-main-modal .ccf-form-pane .accordion-section.expanded .form-settings-heading:before {
|
276 |
+
content: ""; }
|
277 |
+
.ccf-main-modal .ccf-form-pane .accordion-section .accordion-heading, .ccf-main-modal .ccf-form-pane .accordion-section .form-settings-heading {
|
278 |
cursor: pointer;
|
279 |
display: block;
|
280 |
line-height: 29px;
|
284 |
font-size: 150%;
|
285 |
background-color: #fafafa;
|
286 |
margin: 0; }
|
287 |
+
.ccf-main-modal .ccf-form-pane .accordion-section .accordion-heading:before, .ccf-main-modal .ccf-form-pane .accordion-section .form-settings-heading:before {
|
288 |
margin-right: 8px;
|
289 |
font-family: 'form-manager';
|
290 |
+
content: "";
|
291 |
speak: none;
|
292 |
font-weight: normal;
|
293 |
font-variant: normal;
|
306 |
margin-top: 5px;
|
307 |
font-style: italic;
|
308 |
display: block; }
|
309 |
+
.ccf-main-modal .ccf-form-pane.show-form-settings .ccf-form-settings {
|
310 |
+
display: block; }
|
311 |
+
.ccf-main-modal .ccf-form-pane .ccf-form-settings {
|
312 |
+
display: none;
|
313 |
+
position: absolute;
|
314 |
+
width: 75%;
|
315 |
+
bottom: 50px;
|
316 |
+
left: 25%;
|
317 |
+
z-index: 2;
|
318 |
+
top: 0;
|
319 |
+
overflow: auto;
|
320 |
+
background-color: #fff;
|
321 |
+
border-top: 1px solid #ddd;
|
322 |
+
padding: 21px;
|
323 |
+
box-sizing: border-box; }
|
324 |
+
.ccf-main-modal .ccf-form-pane .ccf-form-settings p:first-child,
|
325 |
+
.ccf-main-modal .ccf-form-pane .ccf-form-settings h3:first-child {
|
326 |
+
margin-top: 0; }
|
327 |
+
.ccf-main-modal .ccf-form-pane .ccf-form-settings h3 {
|
328 |
+
border-bottom: 1px solid #ccc;
|
329 |
+
padding-bottom: .75em;
|
330 |
+
margin-top: 2em; }
|
331 |
+
.ccf-main-modal .ccf-form-pane .ccf-form-settings .ccf-form-notifications td {
|
332 |
+
position: relative; }
|
333 |
+
.ccf-main-modal .ccf-form-pane .ccf-form-settings .ccf-form-notifications .active {
|
334 |
+
width: 15%; }
|
335 |
+
.ccf-main-modal .ccf-form-pane .ccf-form-settings .ccf-form-notifications .active-indicator {
|
336 |
+
color: #33CA33;
|
337 |
+
font-size: 40px; }
|
338 |
+
.ccf-main-modal .ccf-form-pane .ccf-form-settings .ccf-form-notifications .inactive-indicator {
|
339 |
+
color: red;
|
340 |
+
font-size: 40px; }
|
341 |
+
.ccf-main-modal .ccf-form-pane .ccf-form-settings .ccf-form-notifications .add-notification {
|
342 |
+
margin-top: 1em;
|
343 |
+
cursor: pointer; }
|
344 |
+
.ccf-main-modal .ccf-form-pane .ccf-form-settings .close-notification {
|
345 |
+
position: absolute;
|
346 |
+
top: 10px;
|
347 |
+
right: 10px;
|
348 |
+
cursor: pointer;
|
349 |
+
font-size: 200%;
|
350 |
+
color: inherit; }
|
351 |
+
.ccf-main-modal .ccf-form-pane .ccf-form-settings .delete-notification {
|
352 |
+
color: red; }
|
353 |
.ccf-main-modal .ccf-form-pane .left-sidebar {
|
354 |
box-sizing: border-box;
|
355 |
background-color: #f3f3f3;
|
467 |
bottom: 0;
|
468 |
background-color: #fff;
|
469 |
padding: 16px; }
|
470 |
+
.ccf-main-modal .ccf-existing-form-pane table,
|
471 |
+
.ccf-main-modal .ccf-form-notifications table {
|
472 |
+
width: 100%;
|
473 |
+
border-collapse: collapse;
|
474 |
+
table-layout: fixed;
|
475 |
+
border: 1px solid #ddd; }
|
476 |
+
.ccf-main-modal .ccf-existing-form-pane table .left,
|
477 |
+
.ccf-main-modal .ccf-form-notifications table .left {
|
478 |
+
float: left;
|
479 |
+
width: 50%;
|
480 |
+
padding-right: 10px;
|
481 |
+
box-sizing: border-box; }
|
482 |
+
.ccf-main-modal .ccf-existing-form-pane table .left textarea,
|
483 |
+
.ccf-main-modal .ccf-form-notifications table .left textarea {
|
484 |
+
width: 100%;
|
485 |
+
height: 300px; }
|
486 |
+
.ccf-main-modal .ccf-existing-form-pane table .right,
|
487 |
+
.ccf-main-modal .ccf-form-notifications table .right {
|
488 |
+
padding-left: 10px;
|
489 |
+
box-sizing: border-box;
|
490 |
+
float: right;
|
491 |
+
width: 50%; }
|
492 |
+
.ccf-main-modal .ccf-existing-form-pane table td,
|
493 |
+
.ccf-main-modal .ccf-form-notifications table td {
|
494 |
+
margin: 0;
|
495 |
+
padding: 14px 21px;
|
496 |
+
text-align: left; }
|
497 |
+
.ccf-main-modal .ccf-existing-form-pane table .empty-form-table,
|
498 |
+
.ccf-main-modal .ccf-existing-form-pane table .no-notifications,
|
499 |
+
.ccf-main-modal .ccf-form-notifications table .empty-form-table,
|
500 |
+
.ccf-main-modal .ccf-form-notifications table .no-notifications {
|
501 |
+
text-align: center; }
|
502 |
+
.ccf-main-modal .ccf-existing-form-pane table thead, .ccf-main-modal .ccf-existing-form-pane table tfoot,
|
503 |
+
.ccf-main-modal .ccf-form-notifications table thead,
|
504 |
+
.ccf-main-modal .ccf-form-notifications table tfoot {
|
505 |
+
background-color: #f0f0f0; }
|
506 |
+
.ccf-main-modal .ccf-existing-form-pane table thead tr, .ccf-main-modal .ccf-existing-form-pane table tfoot tr,
|
507 |
+
.ccf-main-modal .ccf-form-notifications table thead tr,
|
508 |
+
.ccf-main-modal .ccf-form-notifications table tfoot tr {
|
509 |
+
border-bottom: 1px solid #e5e5e5;
|
510 |
+
border-top: 1px solid #e5e5e5; }
|
511 |
+
.ccf-main-modal .ccf-existing-form-pane table thead th, .ccf-main-modal .ccf-existing-form-pane table tfoot th,
|
512 |
+
.ccf-main-modal .ccf-form-notifications table thead th,
|
513 |
+
.ccf-main-modal .ccf-form-notifications table tfoot th {
|
514 |
margin: 0;
|
515 |
+
text-align: left;
|
516 |
padding: 14px 21px;
|
517 |
+
box-sizing: border-box; }
|
518 |
+
.ccf-main-modal .ccf-existing-form-pane table thead .id, .ccf-main-modal .ccf-existing-form-pane table tfoot .id,
|
519 |
+
.ccf-main-modal .ccf-form-notifications table thead .id,
|
520 |
+
.ccf-main-modal .ccf-form-notifications table tfoot .id {
|
521 |
+
width: 5%; }
|
522 |
+
.ccf-main-modal .ccf-existing-form-pane table thead .title, .ccf-main-modal .ccf-existing-form-pane table tfoot .title,
|
523 |
+
.ccf-main-modal .ccf-form-notifications table thead .title,
|
524 |
+
.ccf-main-modal .ccf-form-notifications table tfoot .title {
|
525 |
+
width: 30%; }
|
526 |
+
.ccf-main-modal .ccf-existing-form-pane table thead .author, .ccf-main-modal .ccf-existing-form-pane table tfoot .author,
|
527 |
+
.ccf-main-modal .ccf-form-notifications table thead .author,
|
528 |
+
.ccf-main-modal .ccf-form-notifications table tfoot .author {
|
529 |
+
width: 10%; }
|
530 |
+
.ccf-main-modal .ccf-existing-form-pane table thead .entries, .ccf-main-modal .ccf-existing-form-pane table tfoot .entries,
|
531 |
+
.ccf-main-modal .ccf-form-notifications table thead .entries,
|
532 |
+
.ccf-main-modal .ccf-form-notifications table tfoot .entries {
|
533 |
+
width: 10%; }
|
534 |
+
.ccf-main-modal .ccf-existing-form-pane table thead .submissions, .ccf-main-modal .ccf-existing-form-pane table tfoot .submissions,
|
535 |
+
.ccf-main-modal .ccf-form-notifications table thead .submissions,
|
536 |
+
.ccf-main-modal .ccf-form-notifications table tfoot .submissions {
|
537 |
+
width: 10%; }
|
538 |
+
.ccf-main-modal .ccf-existing-form-pane table thead .number-of-fields, .ccf-main-modal .ccf-existing-form-pane table tfoot .number-of-fields,
|
539 |
+
.ccf-main-modal .ccf-form-notifications table thead .number-of-fields,
|
540 |
+
.ccf-main-modal .ccf-form-notifications table tfoot .number-of-fields {
|
541 |
+
width: 15%; }
|
542 |
+
.ccf-main-modal .ccf-existing-form-pane table thead .date, .ccf-main-modal .ccf-existing-form-pane table tfoot .date,
|
543 |
+
.ccf-main-modal .ccf-form-notifications table thead .date,
|
544 |
+
.ccf-main-modal .ccf-form-notifications table tfoot .date {
|
545 |
+
width: 20%; }
|
546 |
+
.ccf-main-modal .ccf-existing-form-pane table tbody tr:nth-child(odd),
|
547 |
+
.ccf-main-modal .ccf-form-notifications table tbody tr:nth-child(odd) {
|
548 |
+
background-color: #fafafa;
|
549 |
+
margin: 0; }
|
550 |
+
.ccf-main-modal .ccf-existing-form-pane table tbody tr,
|
551 |
+
.ccf-main-modal .ccf-form-notifications table tbody tr {
|
552 |
+
background-color: #fff; }
|
553 |
+
.ccf-main-modal .ccf-existing-form-pane table tbody td,
|
554 |
+
.ccf-main-modal .ccf-form-notifications table tbody td {
|
555 |
+
vertical-align: top; }
|
556 |
+
.ccf-main-modal .ccf-existing-form-pane table tbody td a,
|
557 |
+
.ccf-main-modal .ccf-form-notifications table tbody td a {
|
558 |
+
text-decoration: none;
|
559 |
+
cursor: pointer; }
|
560 |
+
.ccf-main-modal .ccf-existing-form-pane table tbody td .title,
|
561 |
+
.ccf-main-modal .ccf-form-notifications table tbody td .title {
|
562 |
+
font-weight: bold;
|
563 |
+
font-size: 14px; }
|
564 |
+
.ccf-main-modal .ccf-existing-form-pane table tbody td .actions,
|
565 |
+
.ccf-main-modal .ccf-form-notifications table tbody td .actions {
|
566 |
+
visibility: hidden;
|
567 |
+
margin-top: 6px; }
|
568 |
+
.ccf-main-modal .ccf-existing-form-pane table tbody td .actions .delete,
|
569 |
+
.ccf-main-modal .ccf-form-notifications table tbody td .actions .delete {
|
570 |
+
color: #ff0000; }
|
571 |
+
.ccf-main-modal .ccf-existing-form-pane table tbody tr:hover td .actions,
|
572 |
+
.ccf-main-modal .ccf-form-notifications table tbody tr:hover td .actions {
|
573 |
+
visibility: visible; }
|
574 |
|
575 |
.ccf-main-modal-overlay {
|
576 |
display: none;
|
build/css/form-manager.css.map
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
{
|
2 |
"version": 3,
|
3 |
-
"mappings": ";AAAA,UASC;EARA,WAAW,EAAE,MAAM;EACnB,GAAG,EAAC,2BAA2B;EAC/B,GAAG,EAAC,mNAA8D;EAIlE,WAAW,EAAE,MAAM;EACnB,UAAU,EAAE,MAAM;AAGnB,UASC;EARA,WAAW,EAAE,cAAc;EAC3B,GAAG,EAAC,mCAAmC;EACvC,GAAG,EAAC,mPAAsE;EAI1E,WAAW,EAAE,MAAM;EACnB,UAAU,EAAE,MAAM;AAGnB,6BAA8B;EAC7B,WAAW,EAAE,MAAM;EACnB,OAAO,EAAE,GAAG;EACZ,aAAa,EAAE,GAAG;EAClB,KAAK,EAAE,IAAI;EACX,WAAW,EAAE,MAAM;EACnB,YAAY,EAAE,MAAM;EACpB,cAAc,EAAE,IAAI;EACpB,WAAW,EAAE,CAAC;EACd,MAAM,EAAE,OAAO;EACf,sBAAsB,EAAE,WAAW;;AAGpC,eAAgB;EAqBf,OAAO,EAAE,IAAI;EACb,QAAQ,EAAE,KAAK;EACf,GAAG,EAAE,IAAI;EACT,IAAI,EAAE,IAAI;EACV,KAAK,EAAE,IAAI;EACX,MAAM,EAAE,IAAI;EACZ,OAAO,EAAE,MAAM;EACf,QAAQ,EAAE,MAAM;EAChB,gBAAgB,EAAE,IAAI;EA5BtB,kCAAmB;IAClB,WAAW,EAAE,cAAc;IAC3B,OAAO,EAAE,eAAe;IACxB,KAAK,EAAE,IAAI;IACX,WAAW,EAAE,MAAM;IACnB,YAAY,EAAE,MAAM;IACpB,cAAc,EAAE,IAAI;IACpB,WAAW,EAAE,CAAC;IACd,MAAM,EAAE,OAAO;IACf,sBAAsB,EAAE,WAAW;EAGpC,2CAA4B;IAC3B,OAAO,EAAE,IAAI;EAGd,uBAAQ;IACP,OAAO,EAAE,KAAK;EAaf,sBAAO;IACN,aAAa,EAAE,GAAG;IAClB,QAAQ,EAAE,IAAI;IAGb,0CAAG;MACF,gBAAgB,EAAE,OAAO;IAK1B,8CAAG;MACF,gBAAgB,EAAE,OAAO;IAI3B,kCAAc;MACb,MAAM,EAAE,cAAc;MAEtB,2CAAS;QACR,MAAM,EAAE,iBAAiB;IAI3B,yBAAG;MACF,kBAAkB,EAAE,6BAAyB;MAC7C,UAAU,EAAE,6BAAyB;MACrC,MAAM,EAAE,iBAAiB;MACzB,UAAU,EAAE,OAAO;MACnB,SAAS,EAAE,IAAI;MACf,MAAM,EAAE,CAAC;MACT,WAAW,EAAE,GAAG;MAChB,KAAK,EAAE,IAAI;MACX,OAAO,EAAE,IAAI;MACb,MAAM,EAAE,IAAI;MAEZ,+BAAQ;QACP,MAAM,EAAE,cAAc;IAIxB,6BAAO;MACN,KAAK,EAAE,KAAK;MACZ,OAAO,EAAE,KAAK;MAEd,+BAAE;QACD,KAAK,EAAE,OAAO;QACd,WAAW,EAAE,GAAG;IAIlB,+BAAS;MACR,KAAK,EAAE,IAAI;MACX,OAAO,EAAE,IAAI;MACb,UAAU,EAAE,IAAI;MAChB,QAAQ,EAAE,IAAI;MACd,KAAK,EAAE,IAAI;MACX,gBAAgB,EAAE,IAAI;MACtB,WAAW,EAAE,iBAAiB;MAC9B,YAAY,EAAE,iBAAiB;MAC/B,aAAa,EAAE,iBAAiB;MAChC,OAAO,EAAE,SAAS;MAElB,sDAAuB;QACtB,UAAU,EAAE,GAAG;MAGhB,kDAAmB;QAClB,UAAU,EAAE,GAAG;QACf,KAAK,EAAE,IAAI;MAGZ,qCAAM;QACL,KAAK,EAAE,IAAI;QACX,KAAK,EAAE,IAAI;QACX,KAAK,EAAE,GAAG;MAGX,sCAAO;QACN,KAAK,EAAE,KAAK;QACZ,KAAK,EAAE,GAAG;MAKV,wTAA2B;QAC1B,KAAK,EAAE,IAAI;QACX,SAAS,EAAE,IAAI;MAGhB,qJAAW;QACV,MAAM,EAAE,aAAa;QACrB,SAAS,EAAE,GAAG;MAGf,oRAAe;QACd,OAAO,EAAE,YAAY;QACrB,YAAY,EAAE,GAAG;QAEjB,wTAAM;UACL,KAAK,EAAE,IAAI;MAIb,yIAAO;QACN,OAAO,EAAE,YAAY;QACrB,cAAc,EAAE,GAAG;QAEnB,8JAAO;UACN,KAAK,EAAE,IAAI;MAMd,wCAAS;QACR,SAAS,EAAE,IAAI;QACf,WAAW,EAAE,IAAI;QACjB,aAAa,EAAE,cAAc;QAC7B,cAAc,EAAE,GAAG;QACnB,aAAa,EAAE,GAAG;MAGnB,2CAAY;QACX,UAAU,EAAE,MAAM;MAGnB,qCAAM;QACL,WAAW,EAAE,IAAI;QACjB,aAAa,EAAE,GAAG;QAClB,MAAM,EAAE,OAAO;QAEf,0CAAK;UACJ,KAAK,EAAE,GAAG;MAIZ,8DAA+B;QAC9B,OAAO,EAAE,YAAY;MAGtB,2DAA4B;QAC3B,OAAO,EAAE,YAAY;MAGtB,4FAA6B;QAC5B,MAAM,EAAE,OAAO;QACf,KAAK,EAAE,IAAI;QACX,gBAAgB,EAAE,IAAI;QACtB,KAAK,EAAE,IAAI;QACX,MAAM,EAAE,cAAc;QACtB,kBAAkB,EAAE,mCAAqC;QACzD,UAAU,EAAE,mCAAqC;MAGlD,wCAAS;QACR,MAAM,EAAE,IAAI;EAKf,2BAAY;IACX,QAAQ,EAAE,QAAQ;IAClB,GAAG,EAAE,IAAI;IACT,KAAK,EAAE,IAAI;IACX,SAAS,EAAE,IAAI;IACf,MAAM,EAAE,OAAO;IACf,KAAK,EAAE,IAAI;IACX,OAAO,EAAE,MAAM;EAGhB,0BAAW;IACV,QAAQ,EAAE,QAAQ;IAClB,GAAG,EAAE,CAAC;IACN,KAAK,EAAE,CAAC;IACR,IAAI,EAAE,CAAC;IACP,MAAM,EAAE,KAAK;IAEb,6BAAG;MACF,OAAO,EAAE,IAAI;IAGd,6BAAG;MACF,MAAM,EAAE,IAAI;MACZ,UAAU,EAAE,UAAU;MACtB,SAAS,EAAE,IAAI;MACf,MAAM,EAAE,CAAC;MACT,eAAe,EAAE,IAAI;MACrB,UAAU,EAAE,cAAc;MAC1B,UAAU,EAAE,OAAO;MACnB,OAAO,EAAE,MAAM;MAEf,gCAAG;QACF,OAAO,EAAE,YAAY;QACrB,MAAM,EAAE,CAAC;QACT,OAAO,EAAE,CAAC;QACV,OAAO,EAAE,YAAY;QACrB,MAAM,EAAE,IAAI;QACZ,cAAc,EAAE,MAAM;QACtB,WAAW,EAAE,IAAI;QACjB,OAAO,EAAE,KAAK;QAEd,kCAAE;UACD,eAAe,EAAE,IAAI;UAErB,yCAAO;YACN,KAAK,EAAE,IAAI;UAGZ,2CAAW;YACV,KAAK,EAAE,IAAI;EAOhB,8BAAe;IACd,OAAO,EAAE,IAAI;IACb,QAAQ,EAAE,QAAQ;IAClB,GAAG,EAAE,KAAK;IACV,KAAK,EAAE,CAAC;IACR,IAAI,EAAE,CAAC;IACP,MAAM,EAAE,CAAC;IAET,qCAAS;MACR,GAAG,EAAE,IAAI;MACT,UAAU,EAAE,iBAAiB;MAE7B,wGAA6B;QAC5B,UAAU,EAAE,CAAC;IAIf,gDAAkB;MACjB,QAAQ,EAAE,QAAQ;MAClB,GAAG,EAAE,CAAC;MACN,IAAI,EAAE,CAAC;MACP,KAAK,EAAE,CAAC;MACR,MAAM,EAAE,IAAI;MACZ,gBAAgB,EAAE,IAAI;MACtB,OAAO,EAAE,EAAE;MACX,UAAU,EAAE,oDAAoD;MAChE,MAAM,EAAE,gBAAgB;MACxB,YAAY,EAAE,GAAG;MACjB,cAAc,EAAE,GAAG;MAEnB,OAAO,EAAE,CAAC;MACV,OAAO,EAAE,IAAI;IAGd,sCAAQ;MACP,MAAM,EAAE,CAAC;MACT,IAAI,EAAE,CAAC;MACP,KAAK,EAAE,CAAC;MACR,MAAM,EAAE,IAAI;MACZ,OAAO,EAAE,UAAU;MACnB,QAAQ,EAAE,QAAQ;MAClB,UAAU,EAAE,KAAK;MACjB,WAAW,EAAE,IAAI;MACjB,UAAU,EAAE,iBAAiB;MAE7B,4CAAM;QACL,KAAK,EAAE,IAAI;QACX,gBAAgB,EAAE,OAAO;QACzB,YAAY,EAAE,IAAI;QAClB,aAAa,EAAE,IAAI;QACnB,KAAK,EAAE,IAAI;QAEX,yBAA0B;UAP3B,4CAAM;YAQJ,OAAO,EAAE,IAAI;QAGd,kDAAM;UACL,cAAc,EAAE,MAAM;UACtB,WAAW,EAAE,GAAG;QAGjB,mDAAO;UACN,cAAc,EAAE,MAAM;QAGvB,sDAAU;UACT,KAAK,EAAE,GAAG;UACV,OAAO,EAAE,IAAI;UACb,SAAS,EAAE,IAAI;UACf,cAAc,EAAE,MAAM;UACtB,WAAW,EAAE,IAAI;UACjB,WAAW,EAAE,GAAG;QAGjB,0DAAc;UACb,KAAK,EAAE,KAAK;UACZ,OAAO,EAAE,IAAI;UACb,cAAc,EAAE,MAAM;UACtB,SAAS,EAAE,IAAI;UACf,WAAW,EAAE,IAAI;UACjB,WAAW,EAAE,GAAG;MAIlB,yEAAmC;QAClC,OAAO,EAAE,MAAM;MAGhB,mEAA6B;QAC5B,OAAO,EAAE,MAAM;MAGhB,+CAAS;QACR,OAAO,EAAE,IAAI;QACb,UAAU,EAAE,OAAO;QACnB,KAAK,EAAE,KAAK;QACZ,KAAK,EAAE,IAAI;QACX,MAAM,EAAE,IAAI;QACZ,UAAU,EAAE,IAAI;MAGjB,2DAAqB;QACpB,UAAU,EAAE,IAAI;QAChB,KAAK,EAAE,KAAK;QACZ,WAAW,EAAE,GAAG;IAIlB,iDAAmB;MAClB,gBAAgB,EAAE,IAAI;MACtB,aAAa,EAAE,CAAC;MAEhB,6DAAc;QACb,UAAU,EAAE,iBAAiB;MAI7B,2EAAiB;QAChB,OAAO,EAAE,KAAK;MAGf,oEAAU;QACT,OAAO,EAAE,GAAG;MAId,oEAAmB;QAclB,MAAM,EAAE,OAAO;QACf,OAAO,EAAE,KAAK;QACd,WAAW,EAAE,IAAI;QACjB,KAAK,EAAE,OAAO;QACd,OAAO,EAAE,SAAS;QAClB,aAAa,EAAE,iBAAiB;QAChC,SAAS,EAAE,IAAI;QACf,gBAAgB,EAAE,OAAO;QACzB,MAAM,EAAE,CAAC;QArBT,2EAAS;UACR,YAAY,EAAE,GAAG;UACjB,WAAW,EAAE,cAAc;UAC3B,OAAO,EAAE,GAAG;UACZ,KAAK,EAAE,IAAI;UACX,WAAW,EAAE,MAAM;UACnB,YAAY,EAAE,MAAM;UACpB,cAAc,EAAE,IAAI;UACpB,WAAW,EAAE,CAAC;UACd,MAAM,EAAE,OAAO;UACf,sBAAsB,EAAE,WAAW;MAcrC,kEAAiB;QAChB,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,SAAS;QAClB,aAAa,EAAE,iBAAiB;IAIlC,oCAAM;MACL,OAAO,EAAE,KAAK;MACd,aAAa,EAAE,GAAG;IAGnB,uCAAS;MACR,UAAU,EAAE,GAAG;MACf,UAAU,EAAE,MAAM;MAClB,OAAO,EAAE,KAAK;IAGf,4CAAc;MACb,UAAU,EAAE,UAAU;MACtB,gBAAgB,EAAE,OAAO;MACzB,QAAQ,EAAE,QAAQ;MAClB,UAAU,EAAE,cAAc;MAC1B,YAAY,EAAE,cAAc;MAC5B,QAAQ,EAAE,MAAM;MAChB,KAAK,EAAE,GAAG;MACV,GAAG,EAAE,CAAC;MACN,OAAO,EAAE,CAAC;MACV,MAAM,EAAE,IAAI;MACZ,IAAI,EAAE,CAAC;MACP,QAAQ,EAAE,IAAI;MAEd,2EAA+B;QAC9B,UAAU,EAAE,CAAC;MAGd,kLAA4C;QAC3C,OAAO,EAAE,GAAG;QAEZ,gcAA+B;UAC9B,OAAO,EAAE,IAAI;IAKhB,4CAAc;MACb,UAAU,EAAE,UAAU;MACtB,QAAQ,EAAE,QAAQ;MAClB,KAAK,EAAE,GAAG;MACV,MAAM,EAAE,IAAI;MACZ,IAAI,EAAE,GAAG;MACT,KAAK,EAAE,GAAG;MACV,GAAG,EAAE,CAAC;MACN,QAAQ,EAAE,IAAI;MACd,UAAU,EAAE,cAAc;MAC1B,OAAO,EAAE,IAAI;MAEb,+DAAmB;QAClB,MAAM,EAAE,kBAAkB;QAC1B,MAAM,EAAE,IAAI;QACZ,aAAa,EAAE,GAAG;MAInB,uDAAW;QACV,SAAS,EAAE,IAAI;QACf,OAAO,EAAE,IAAI;QACb,UAAU,EAAE,MAAM;MAGnB,kDAAQ;QACP,KAAK,EAAE,IAAI;QACX,OAAO,EAAE,KAAK;QACd,UAAU,EAAE,GAAG;QACf,UAAU,EAAC,UAAU;QACrB,eAAe,EAAC,UAAU;QAC1B,kBAAkB,EAAC,UAAU;QAC7B,UAAU,EAAE,MAAM;QAClB,SAAS,EAAE,IAAI;QACf,UAAU,EAAE,MAAM;QAClB,OAAO,EAAE,QAAQ;QACjB,MAAM,EAAE,kBAAkB;QAC1B,OAAO,EAAE,uBAAuB;IAIlC,6CAAe;MACd,UAAU,EAAE,UAAU;MACtB,OAAO,EAAE,CAAC;MACV,QAAQ,EAAE,QAAQ;MAClB,QAAQ,EAAE,MAAM;MAChB,KAAK,EAAE,GAAG;MACV,GAAG,EAAE,CAAC;MACN,QAAQ,EAAE,IAAI;MACd,gBAAgB,EAAE,OAAO;MACzB,KAAK,EAAE,CAAC;MACR,MAAM,EAAE,IAAI;MACZ,WAAW,EAAE,iBAAiB;MAE9B,oEAAuB;QACtB,aAAa,EAAE,GAAG;MAGnB,uDAAU;QACT,OAAO,EAAE,IAAI;QACb,UAAU,EAAE,MAAM;QAClB,SAAS,EAAE,IAAI;MAGhB,mDAAM;QACL,OAAO,EAAE,YAAY;QACrB,MAAM,EAAE,CAAC;QAET,6DAAU;UACT,KAAK,EAAE,GAAG;MAKX,gEAAM;QACL,YAAY,EAAE,OAAO;QACrB,YAAY,EAAE,GAAG;MAInB,yEAA4B;QAC3B,YAAY,EAAE,OAAO;QACrB,YAAY,EAAE,GAAG;MAGlB,8DAAiB;QAChB,KAAK,EAAE,IAAI;QACX,OAAO,EAAE,KAAK;QACd,UAAU,EAAE,GAAG;MAGhB,4EAA+B;QAC9B,OAAO,EAAE,YAAY;QACrB,cAAc,EAAE,MAAM;MAGvB,4DAAe;QACd,OAAO,EAAE,YAAY;MAGtB,sDAAS;QACR,KAAK,EAAE,IAAI;QACX,MAAM,EAAE,IAAI;QACZ,UAAU,EAAE,GAAG;MAGhB,yDAAY;QACX,MAAM,EAAE,KAAK;QACb,KAAK,EAAE,IAAI;MAKV,4FAAmB;QAClB,KAAK,EAAE,KAAK;QACZ,OAAO,EAAE,YAAY;MAGtB,+EAAM;QACL,KAAK,EAAE,OAAO;QACd,MAAM,EAAE,IAAI;QAEZ,sFAAS;UACR,MAAM,EAAE,IAAI;MAId,iKAAc;QACb,MAAM,EAAE,OAAO;QACf,KAAK,EAAE,OAAO;EAOnB,uCAAwB;IACvB,OAAO,EAAE,IAAI;IACb,QAAQ,EAAE,QAAQ;IAClB,QAAQ,EAAE,MAAM;IAChB,GAAG,EAAE,KAAK;IACV,KAAK,EAAE,CAAC;IACR,IAAI,EAAE,CAAC;IACP,MAAM,EAAE,CAAC;IACT,gBAAgB,EAAE,IAAI;IACtB,OAAO,EAAE,IAAI;IAEb,6CAAM;MACL,KAAK,EAAE,IAAI;MACX,eAAe,EAAE,QAAQ;MACzB,YAAY,EAAE,KAAK;MACnB,MAAM,EAAE,cAAc;MAEtB,gDAAG;QACF,MAAM,EAAE,CAAC;QACT,OAAO,EAAE,SAAS;QAClB,UAAU,EAAE,IAAI;MAGjB,+DAAkB;QACjB,UAAU,EAAE,MAAM;MAGnB,wGAAY;QACX,gBAAgB,EAAE,OAAO;QAEzB,8GAAG;UACF,aAAa,EAAE,iBAAiB;UAChC,UAAU,EAAE,iBAAiB;QAG9B,8GAAG;UACF,MAAM,EAAE,CAAC;UACT,UAAU,EAAE,IAAI;UAChB,OAAO,EAAE,SAAS;UAClB,UAAU,EAAE,UAAU;QAGvB,gHAAI;UACH,KAAK,EAAE,EAAE;QAGV,sHAAO;UACN,KAAK,EAAE,GAAG;QAGX,wHAAQ;UACP,KAAK,EAAE,GAAG;QAGX,0HAAS;UACR,KAAK,EAAE,GAAG;QAGX,kIAAa;UACZ,KAAK,EAAE,GAAG;QAGX,4IAAkB;UACjB,KAAK,EAAE,GAAG;QAGX,oHAAM;UACL,KAAK,EAAE,GAAG;MAKX,qEAAkB;QACjB,gBAAgB,EAAE,OAAO;QACzB,MAAM,EAAE,CAAC;MAGV,sDAAG;QACF,gBAAgB,EAAE,IAAI;MAGvB,sDAAG;QACF,cAAc,EAAE,GAAG;QAEnB,wDAAE;UACD,eAAe,EAAE,IAAI;UACrB,MAAM,EAAE,OAAO;QAGhB,6DAAO;UACN,WAAW,EAAE,IAAI;UACjB,SAAS,EAAE,IAAI;QAGhB,+DAAS;UACR,UAAU,EAAE,MAAM;UAClB,UAAU,EAAE,GAAG;UAEf,uEAAQ;YACP,KAAK,EAAE,OAAO;MAKjB,wEAAqB;QACpB,UAAU,EAAE,OAAO;;AAOxB,uBAAwB;EACvB,OAAO,EAAE,IAAI;EACb,QAAQ,EAAE,KAAK;EACf,GAAG,EAAE,GAAG;EACR,IAAI,EAAE,GAAG;EACT,KAAK,EAAE,IAAI;EACX,MAAM,EAAE,IAAI;EACZ,OAAO,EAAE,MAAM;EACf,OAAO,EAAE,GAAG;EACZ,UAAU,EAAE,qDAAqD;EACjE,MAAM,EAAE,iBAAiB;EACzB,YAAY,EAAE,GAAG;EACjB,cAAc,EAAE,GAAG;EACnB,gBAAgB,EAAE,IAAI;;AAGvB,eAAgB;EACf,SAAS,EAAE,IAAI;EACf,UAAU,EAAE,GAAG;EACf,UAAU,EAAE,KAAK;EAEjB,sBAAO;IACN,OAAO,EAAE,KAAK;EAGf,0BAAW;IACV,UAAU,EAAE,MAAM;IAClB,aAAa,EAAE,GAAG;EAGnB,iBAAE;IACD,MAAM,EAAE,OAAO;IACf,KAAK,EAAE,OAAO;IACd,UAAU,EAAE,OAAO;IACnB,eAAe,EAAE,IAAI;IAErB,+FAAgC;MAC/B,SAAS,EAAE,IAAI;MACf,WAAW,EAAE,IAAI;MACjB,OAAO,EAAE,aAAa;MAEtB,uHAAQ;QACP,KAAK,EAAE,IAAI;QACX,gBAAgB,EAAE,OAAO;IAI3B,0BAAW;MACV,KAAK,EAAE,IAAI;MAEX,gCAAQ;QACP,KAAK,EAAE,IAAI;QACX,UAAU,EAAE,OAAO;;AAMvB,gBAAiB;EAChB,OAAO,EAAE,IAAI;EAEb,qBAAO;IACN,OAAO,EAAE,KAAK;EAGf,oDAAoC;IACnC,QAAQ,EAAE,KAAK;IACf,GAAG,EAAE,CAAC;IACN,IAAI,EAAE,CAAC;IACP,KAAK,EAAE,CAAC;IACR,MAAM,EAAE,CAAC;IACT,UAAU,EAAE,IAAI;IAChB,OAAO,EAAE,GAAG;IACZ,MAAM,EAAE,iBAAiB;IACzB,OAAO,EAAE,OAAO;EAGjB,qCAAqB;IACpB,QAAQ,EAAE,KAAK;IACf,GAAG,EAAE,GAAG;IACR,IAAI,EAAE,GAAG;IACT,KAAK,EAAE,KAAK;IACZ,WAAW,EAAE,MAAM;IACnB,UAAU,EAAE,IAAI;IAChB,kBAAkB,EAAE,4BAA8B;IAClD,UAAU,EAAE,4BAA8B;IAC1C,WAAW,EAAE,GAAG;IAChB,OAAO,EAAE,OAAO;IAEhB,4CAAO;MACN,SAAS,EAAE,IAAI;MACf,QAAQ,EAAE,QAAQ;MAClB,KAAK,EAAE,IAAI;MACX,MAAM,EAAE,OAAO;IAGhB,8CAAS;MACR,MAAM,EAAE,IAAI;MACZ,UAAU,EAAE,MAAM;MAElB,qDAAO;QACN,KAAK,EAAE,OAAO;QACd,SAAS,EAAE,KAAK;QAChB,MAAM,EAAE,SAAS",
|
4 |
"sources": ["../../scss/form-manager.scss"],
|
5 |
"names": [],
|
6 |
"file": "form-manager.css"
|
1 |
{
|
2 |
"version": 3,
|
3 |
+
"mappings": "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",
|
4 |
"sources": ["../../scss/form-manager.scss"],
|
5 |
"names": [],
|
6 |
"file": "form-manager.css"
|
build/css/form-manager.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
@charset "UTF-8";@font-face{font-family:menu;src:url(../../fonts/menu.eot);src:url(../../fonts/menu.eot?#iefix) format("embedded-opentype"),url(../../fonts/menu.woff) format("woff"),url(../../fonts/menu.ttf) format("truetype"),url(../../fonts/menu.svg#form-manager) format("svg");font-weight:400;font-style:normal}@font-face{font-family:form-manager;src:url(../../fonts/form-manager.eot);src:url(../../fonts/form-manager.eot?#iefix) format("embedded-opentype"),url(../../fonts/form-manager.woff) format("woff"),url(../../fonts/form-manager.ttf) format("truetype"),url(../../fonts/form-manager.svg#form-manager) format("svg");font-weight:400;font-style:normal}.ccf-open-form-manager:before{font-family:menu;content:"";padding-right:4px;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;cursor:pointer;-webkit-font-smoothing:antialiased}.ccf-main-modal{display:none;position:fixed;top:30px;left:30px;right:30px;bottom:30px;z-index:160000;overflow:hidden;background-color:#fff}.ccf-main-modal [data-icon]:before{font-family:form-manager;content:attr(data-icon);speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;cursor:pointer;-webkit-font-smoothing:antialiased}.ccf-main-modal .single .insert-form-button{display:none}.ccf-main-modal .hidden{display:block}.ccf-main-modal .field{margin-bottom:5px;overflow:auto}.ccf-main-modal .field.field-incomplete h4{background-color:#ffebe8}.ccf-main-modal .field.field-duplicate-slug h4{background-color:#ffe6a5}.ccf-main-modal .field.ccf-editing{border:#999 1px solid}.ccf-main-modal .field.ccf-editing h4:hover{border:1px solid #e5e5e5}.ccf-main-modal .field h4{-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);border:1px solid #e5e5e5;background:#fafafa;font-size:13px;margin:0;font-weight:600;color:#222;padding:13px;cursor:move}.ccf-main-modal .field h4:hover{border:#999 1px solid}.ccf-main-modal .field .right{float:right;display:block}.ccf-main-modal .field .right a{color:inherit;margin-left:3px}.ccf-main-modal .field .preview{clear:both;display:none;text-align:left;overflow:auto;float:none;background-color:#fff;border-left:1px solid #e5e5e5;border-right:1px solid #e5e5e5;border-bottom:1px solid #e5e5e5;padding:10px 20px}.ccf-main-modal .field .preview .recaptcha-preview-img{margin-top:7px}.ccf-main-modal .field .preview .field-description{margin-top:3px;clear:left}.ccf-main-modal .field .preview .left{float:left;clear:both;width:47%}.ccf-main-modal .field .preview .right{float:right;width:47%}.ccf-main-modal .field .preview .full input[type=text],.ccf-main-modal .field .preview .full select,.ccf-main-modal .field .preview .left input[type=text],.ccf-main-modal .field .preview .left select,.ccf-main-modal .field .preview .right input[type=text],.ccf-main-modal .field .preview .right select{width:100%;max-width:100%}.ccf-main-modal .field .preview .full .sub-label,.ccf-main-modal .field .preview .left .sub-label,.ccf-main-modal .field .preview .right .sub-label{margin:3px 0 3px 2px;font-size:90%}.ccf-main-modal .field .preview .full .hour,.ccf-main-modal .field .preview .full .minute,.ccf-main-modal .field .preview .left .hour,.ccf-main-modal .field .preview .left .minute,.ccf-main-modal .field .preview .right .hour,.ccf-main-modal .field .preview .right .minute{display:inline-block;margin-right:5px}.ccf-main-modal .field .preview .full .hour input,.ccf-main-modal .field .preview .full .minute input,.ccf-main-modal .field .preview .left .hour input,.ccf-main-modal .field .preview .left .minute input,.ccf-main-modal .field .preview .right .hour input,.ccf-main-modal .field .preview .right .minute input{width:35px}.ccf-main-modal .field .preview .full .am-pm,.ccf-main-modal .field .preview .left .am-pm,.ccf-main-modal .field .preview .right .am-pm{display:inline-block;vertical-align:top}.ccf-main-modal .field .preview .full .am-pm select,.ccf-main-modal .field .preview .left .am-pm select,.ccf-main-modal .field .preview .right .am-pm select{width:60px}.ccf-main-modal .field .preview .heading{font-size:125%;font-weight:700;border-bottom:1px solid #ccc;padding-bottom:9px;margin-bottom:9px}.ccf-main-modal .field .preview .subheading{font-style:italic}.ccf-main-modal .field .preview label{font-weight:700;margin-bottom:3px;cursor:inherit}.ccf-main-modal .field .preview label span{color:red}.ccf-main-modal .field .preview input[type=checkbox]+label,.ccf-main-modal .field .preview input[type=radio]+label{display:inline-block}.ccf-main-modal .field .preview input[type=text],.ccf-main-modal .field .preview textarea{width:100%;background-color:#fff;color:#333;border:1px solid #ddd;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.07);box-shadow:inset 0 1px 2px rgba(0,0,0,.07)}.ccf-main-modal .field .preview textarea{height:60px}.ccf-main-modal .close-icon{position:absolute;top:16px;right:16px;font-size:35px;cursor:pointer;color:#333;z-index:160001}.ccf-main-modal .main-menu{position:absolute;top:0;right:0;left:0;height:125px}.ccf-main-modal .main-menu h1{padding:16px}.ccf-main-modal .main-menu ul{height:40px;box-sizing:border-box;font-size:14px;margin:0;list-style-type:none;border-top:1px solid #ddd;background:#f3f3f3;padding:0 16px}.ccf-main-modal .main-menu ul li{margin:0;display:inline-block;height:38px;vertical-align:middle;line-height:40px;padding:0 8px}.ccf-main-modal .main-menu ul li a{text-decoration:none}.ccf-main-modal .main-menu ul li a :hover,.ccf-main-modal .main-menu ul li a.selected{color:#000}.ccf-main-modal .ccf-form-pane{display:none;position:absolute;top:125px;right:0;left:0;bottom:0}.ccf-main-modal .ccf-form-pane.single{top:85px;border-top:1px solid #e5e5e5}.ccf-main-modal .ccf-form-pane.single .form-content,.ccf-main-modal .ccf-form-pane.single .left-sidebar{border-top:0}.ccf-main-modal .ccf-form-pane .disabled-overlay{position:absolute;top:0;left:0;right:0;bottom:50px;background-color:#000;opacity:.1;-ms-filter:"alpha(Opacity=1)";filter:alpha(opacity=1);-moz-opacity:.1;-khtml-opacity:.1;z-index:1;display:none}.ccf-main-modal .ccf-form-pane .bottom{bottom:0;left:0;right:0;height:50px;padding:0 16px 0 0;position:absolute;text-align:right;line-height:50px;border-top:1px solid #e5e5e5}.ccf-main-modal .ccf-form-pane .bottom .left{float:left;background-color:#00a0d2;padding-left:16px;padding-right:16px;color:#fff}@media (max-width:830px){.ccf-main-modal .ccf-form-pane .bottom .left{display:none}}.ccf-main-modal .ccf-form-pane .bottom .left input{vertical-align:middle;margin-left:5px}.ccf-main-modal .ccf-form-pane .bottom .left button{vertical-align:middle}.ccf-main-modal .ccf-form-pane .bottom .left .signup-x{color:red;display:none;font-size:150%;vertical-align:middle;font-weight:700;margin-left:4px}.ccf-main-modal .ccf-form-pane .bottom .left .signup-check{color:green;display:none;vertical-align:middle;font-size:150%;font-weight:700;margin-left:4px}.ccf-main-modal .ccf-form-pane .bottom .left.signup-error .signup-x,.ccf-main-modal .ccf-form-pane .bottom .left.signup-success .signup-check{display:inline}.ccf-main-modal .ccf-form-pane .bottom .spinner{display:none;visibility:visible;float:right;width:16px;height:16px;margin-top:16px}.ccf-main-modal .ccf-form-pane .bottom input[type=button]{margin-top:11px;float:right;margin-left:6px}.ccf-main-modal .ccf-form-pane .accordion-section{background-color:#fff;border-bottom:0}.ccf-main-modal .ccf-form-pane .accordion-section:first-child{border-top:1px solid #e5e5e5}.ccf-main-modal .ccf-form-pane .accordion-section.expanded .section-content{display:block}.ccf-main-modal .ccf-form-pane .accordion-section.expanded h2:before{content:""}.ccf-main-modal .ccf-form-pane .accordion-section .accordion-heading{cursor:pointer;display:block;line-height:29px;color:inherit;padding:10px 20px;border-bottom:1px solid #e5e5e5;font-size:150%;background-color:#fafafa;margin:0}.ccf-main-modal .ccf-form-pane .accordion-section .accordion-heading:before{margin-right:8px;font-family:form-manager;content:"";speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;cursor:pointer;-webkit-font-smoothing:antialiased}.ccf-main-modal .ccf-form-pane .accordion-section .section-content{display:none;padding:10px 20px;border-bottom:1px solid #e5e5e5}.ccf-main-modal .ccf-form-pane label{display:block;margin-bottom:8px}.ccf-main-modal .ccf-form-pane .explain{margin-top:5px;font-style:italic;display:block}.ccf-main-modal .ccf-form-pane .left-sidebar{box-sizing:border-box;background-color:#f3f3f3;position:absolute;border-top:1px solid #ddd;border-right:1px solid #ddd;width:25%;top:0;padding:0;bottom:50px;left:0;overflow:auto}.ccf-main-modal .ccf-form-pane .left-sidebar .accordion-section:first-child{border-top:0}.ccf-main-modal .ccf-form-pane .left-sidebar .fields,.ccf-main-modal .ccf-form-pane .left-sidebar .special-fields,.ccf-main-modal .ccf-form-pane .left-sidebar .structure-fields{padding:5px}.ccf-main-modal .ccf-form-pane .left-sidebar .fields .field .preview,.ccf-main-modal .ccf-form-pane .left-sidebar .fields .field .right,.ccf-main-modal .ccf-form-pane .left-sidebar .special-fields .field .preview,.ccf-main-modal .ccf-form-pane .left-sidebar .special-fields .field .right,.ccf-main-modal .ccf-form-pane .left-sidebar .structure-fields .field .preview,.ccf-main-modal .ccf-form-pane .left-sidebar .structure-fields .field .right{display:none}.ccf-main-modal .ccf-form-pane .form-content{box-sizing:border-box;position:absolute;width:40%;bottom:50px;left:25%;right:35%;top:0;overflow:auto;border-top:1px solid #ddd;padding:21px}.ccf-main-modal .ccf-form-pane .form-content .field-placeholder{border:1px dashed #e5e5e5;height:46px;margin-bottom:5px}.ccf-main-modal .ccf-form-pane .form-content .no-fields{font-size:22px;padding:16px;font-style:italic}.ccf-main-modal .ccf-form-pane .form-content:after{width:100%;display:block;margin-top:5px;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;font-style:italic;font-size:22px;text-align:center;padding:1em .5em;border:4px dashed #e5e5e5;content:attr(data-drag-message)}.ccf-main-modal .ccf-form-pane .right-sidebar{box-sizing:border-box;padding:0;position:absolute;width:35%;top:0;overflow:auto;background-color:#f3f3f3;right:0;bottom:50px;border-left:1px solid #ddd}.ccf-main-modal .ccf-form-pane .right-sidebar .section-content>div{margin-bottom:6px}.ccf-main-modal .ccf-form-pane .right-sidebar .no-field{padding:16px;font-style:italic;font-size:22px}.ccf-main-modal .ccf-form-pane .right-sidebar label{display:inline-block;margin:0}.ccf-main-modal .ccf-form-pane .right-sidebar label .required{color:red}.ccf-main-modal .ccf-form-pane .right-sidebar .field-error input{border-color:red;border-width:2px}.ccf-main-modal .ccf-form-pane .right-sidebar .field-duplicate-slug input{border-color:#ffe6a5;border-width:2px}.ccf-main-modal .ccf-form-pane .right-sidebar input[type=text]{width:100%;display:block;margin-top:5px}.ccf-main-modal .ccf-form-pane .right-sidebar input[type=checkbox]+label{display:inline-block;vertical-align:middle}.ccf-main-modal .ccf-form-pane .right-sidebar label+select{display:inline-block}.ccf-main-modal .ccf-form-pane .right-sidebar textarea{width:100%;height:80px;margin-top:5px}.ccf-main-modal .ccf-form-pane .right-sidebar .field-html{height:150px;width:100%}.ccf-main-modal .ccf-form-pane .right-sidebar .repeatable-choices .choice input[type=text]{width:100px;display:inline-block}.ccf-main-modal .ccf-form-pane .right-sidebar .repeatable-choices .choice .move{color:inherit;cursor:move}.ccf-main-modal .ccf-form-pane .right-sidebar .repeatable-choices .choice .move:before{cursor:move}.ccf-main-modal .ccf-form-pane .right-sidebar .repeatable-choices .choice .add,.ccf-main-modal .ccf-form-pane .right-sidebar .repeatable-choices .choice .delete{cursor:pointer;color:inherit}.ccf-main-modal .ccf-existing-form-pane{display:none;position:absolute;overflow:scroll;top:125px;right:0;left:0;bottom:0;background-color:#fff;padding:16px}.ccf-main-modal .ccf-existing-form-pane table{width:100%;border-collapse:collapse;table-layout:fixed;border:1px solid #ddd}.ccf-main-modal .ccf-existing-form-pane table td{margin:0;padding:14px 21px;text-align:left}.ccf-main-modal .ccf-existing-form-pane table .empty-form-table{text-align:center}.ccf-main-modal .ccf-existing-form-pane table tfoot,.ccf-main-modal .ccf-existing-form-pane table thead{background-color:#f0f0f0}.ccf-main-modal .ccf-existing-form-pane table tfoot tr,.ccf-main-modal .ccf-existing-form-pane table thead tr{border-bottom:1px solid #e5e5e5;border-top:1px solid #e5e5e5}.ccf-main-modal .ccf-existing-form-pane table tfoot th,.ccf-main-modal .ccf-existing-form-pane table thead th{margin:0;text-align:left;padding:14px 21px;box-sizing:border-box}.ccf-main-modal .ccf-existing-form-pane table tfoot .id,.ccf-main-modal .ccf-existing-form-pane table thead .id{width:5%}.ccf-main-modal .ccf-existing-form-pane table tfoot .title,.ccf-main-modal .ccf-existing-form-pane table thead .title{width:30%}.ccf-main-modal .ccf-existing-form-pane table tfoot .author,.ccf-main-modal .ccf-existing-form-pane table tfoot .entries,.ccf-main-modal .ccf-existing-form-pane table tfoot .submissions,.ccf-main-modal .ccf-existing-form-pane table thead .author,.ccf-main-modal .ccf-existing-form-pane table thead .entries,.ccf-main-modal .ccf-existing-form-pane table thead .submissions{width:10%}.ccf-main-modal .ccf-existing-form-pane table tfoot .number-of-fields,.ccf-main-modal .ccf-existing-form-pane table thead .number-of-fields{width:15%}.ccf-main-modal .ccf-existing-form-pane table tfoot .date,.ccf-main-modal .ccf-existing-form-pane table thead .date{width:20%}.ccf-main-modal .ccf-existing-form-pane table tbody tr:nth-child(odd){background-color:#fafafa;margin:0}.ccf-main-modal .ccf-existing-form-pane table tbody tr{background-color:#fff}.ccf-main-modal .ccf-existing-form-pane table tbody td{vertical-align:top}.ccf-main-modal .ccf-existing-form-pane table tbody td a{text-decoration:none;cursor:pointer}.ccf-main-modal .ccf-existing-form-pane table tbody td .title{font-weight:700;font-size:14px}.ccf-main-modal .ccf-existing-form-pane table tbody td .actions{visibility:hidden;margin-top:6px}.ccf-main-modal .ccf-existing-form-pane table tbody td .actions .delete{color:red}.ccf-main-modal .ccf-existing-form-pane table tbody tr:hover td .actions{visibility:visible}.ccf-main-modal-overlay{display:none;position:fixed;top:0;left:0;width:100%;height:100%;z-index:159900;opacity:.7;-ms-filter:"alpha(Opacity=70)";filter:alpha(opacity=70);-moz-opacity:.7;-khtml-opacity:.7;background-color:#000}.ccf-pagination{font-size:12px;margin-top:8px;text-align:right}.ccf-pagination .pages{padding:0 4px}.ccf-pagination .num-items{font-style:italic;padding-right:4px}.ccf-pagination a{cursor:pointer;color:#0074a2;background:#f0f0f0;text-decoration:none}.ccf-pagination a.first,.ccf-pagination a.last,.ccf-pagination a.next,.ccf-pagination a.prev{font-size:16px;line-height:22px;padding:0 7px 2px}.ccf-pagination a.first:hover,.ccf-pagination a.last:hover,.ccf-pagination a.next:hover,.ccf-pagination a.prev:hover{color:#fff;background-color:#2ea2cc}.ccf-pagination a.disabled{color:#aaa}.ccf-pagination a.disabled:hover{color:#aaa;background:#f0f0f0}.ccf-error-modal{display:none}.ccf-error-modal.show{display:block}.ccf-error-modal .ccf-notification-dialog-background{position:fixed;top:0;left:0;right:0;bottom:0;background:#000;opacity:.7;filter:alpha(opacity=70);z-index:1000000}.ccf-error-modal .notification-dialog{position:fixed;top:30%;left:50%;width:450px;margin-left:-225px;background:#fff;-webkit-box-shadow:0 3px 6px rgba(0,0,0,.3);box-shadow:0 3px 6px rgba(0,0,0,.3);line-height:1.5;z-index:1000005}.ccf-error-modal .notification-dialog .close{font-size:25px;position:absolute;right:10px;cursor:pointer}.ccf-error-modal .notification-dialog .message{margin:25px;text-align:center}.ccf-error-modal .notification-dialog .message .title{color:#23282d;font-size:1.3em;margin:0 0 1em}
|
1 |
+
@charset "UTF-8";@font-face{font-family:menu;src:url(../../fonts/menu.eot);src:url(../../fonts/menu.eot?#iefix) format("embedded-opentype"),url(../../fonts/menu.woff) format("woff"),url(../../fonts/menu.ttf) format("truetype"),url(../../fonts/menu.svg#form-manager) format("svg");font-weight:400;font-style:normal}@font-face{font-family:form-manager;src:url(../../fonts/form-manager.eot);src:url(../../fonts/form-manager.eot?#iefix) format("embedded-opentype"),url(../../fonts/form-manager.woff) format("woff"),url(../../fonts/form-manager.ttf) format("truetype"),url(../../fonts/form-manager.svg#form-manager) format("svg");font-weight:400;font-style:normal}.ccf-open-form-manager:before{font-family:menu;content:"";padding-right:4px;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;cursor:pointer;-webkit-font-smoothing:antialiased}.ccf-main-modal{display:none;position:fixed;top:30px;left:30px;right:30px;bottom:30px;z-index:160000;overflow:hidden;background-color:#fff}.ccf-main-modal [data-icon]:before{font-family:form-manager;content:attr(data-icon);speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;cursor:pointer;-webkit-font-smoothing:antialiased}.ccf-main-modal .single .insert-form-button{display:none}.ccf-main-modal .hidden{display:block}.ccf-main-modal .field{margin-bottom:5px;overflow:auto}.ccf-main-modal .field.field-incomplete h4{background-color:#ffebe8}.ccf-main-modal .field.field-duplicate-slug h4{background-color:#ffe6a5}.ccf-main-modal .field.ccf-editing{border:#999 1px solid}.ccf-main-modal .field.ccf-editing h4:hover{border:1px solid #e5e5e5}.ccf-main-modal .field h4{-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);border:1px solid #e5e5e5;background:#fafafa;font-size:13px;margin:0;font-weight:600;color:#222;padding:13px;cursor:move}.ccf-main-modal .field h4:hover{border:#999 1px solid}.ccf-main-modal .field .right{float:right;display:block}.ccf-main-modal .field .right a{color:inherit;margin-left:3px}.ccf-main-modal .field .preview{clear:both;display:none;text-align:left;overflow:auto;float:none;background-color:#fff;border-left:1px solid #e5e5e5;border-right:1px solid #e5e5e5;border-bottom:1px solid #e5e5e5;padding:10px 20px}.ccf-main-modal .field .preview .recaptcha-preview-img{margin-top:7px}.ccf-main-modal .field .preview .field-description{margin-top:3px;clear:left}.ccf-main-modal .field .preview .left{float:left;clear:both;width:47%}.ccf-main-modal .field .preview .right{float:right;width:47%}.ccf-main-modal .field .preview .full input[type=text],.ccf-main-modal .field .preview .full select,.ccf-main-modal .field .preview .left input[type=text],.ccf-main-modal .field .preview .left select,.ccf-main-modal .field .preview .right input[type=text],.ccf-main-modal .field .preview .right select{width:100%;max-width:100%}.ccf-main-modal .field .preview .full .sub-label,.ccf-main-modal .field .preview .left .sub-label,.ccf-main-modal .field .preview .right .sub-label{margin:3px 0 3px 2px;font-size:90%}.ccf-main-modal .field .preview .full .hour,.ccf-main-modal .field .preview .full .minute,.ccf-main-modal .field .preview .left .hour,.ccf-main-modal .field .preview .left .minute,.ccf-main-modal .field .preview .right .hour,.ccf-main-modal .field .preview .right .minute{display:inline-block;margin-right:5px}.ccf-main-modal .field .preview .full .hour input,.ccf-main-modal .field .preview .full .minute input,.ccf-main-modal .field .preview .left .hour input,.ccf-main-modal .field .preview .left .minute input,.ccf-main-modal .field .preview .right .hour input,.ccf-main-modal .field .preview .right .minute input{width:35px}.ccf-main-modal .field .preview .full .am-pm,.ccf-main-modal .field .preview .left .am-pm,.ccf-main-modal .field .preview .right .am-pm{display:inline-block;vertical-align:top}.ccf-main-modal .field .preview .full .am-pm select,.ccf-main-modal .field .preview .left .am-pm select,.ccf-main-modal .field .preview .right .am-pm select{width:60px}.ccf-main-modal .field .preview .heading{font-size:125%;font-weight:700;border-bottom:1px solid #ccc;padding-bottom:9px;margin-bottom:9px}.ccf-main-modal .field .preview .subheading{font-style:italic}.ccf-main-modal .field .preview label{font-weight:700;margin-bottom:3px;cursor:inherit}.ccf-main-modal .field .preview label span{color:red}.ccf-main-modal .field .preview input[type=checkbox]+label,.ccf-main-modal .field .preview input[type=radio]+label{display:inline-block}.ccf-main-modal .field .preview input[type=text],.ccf-main-modal .field .preview textarea{width:100%;background-color:#fff;color:#333;border:1px solid #ddd;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.07);box-shadow:inset 0 1px 2px rgba(0,0,0,.07)}.ccf-main-modal .field .preview textarea{height:60px}.ccf-main-modal .close-icon{position:absolute;top:16px;right:16px;font-size:35px;cursor:pointer;color:#333;z-index:160001}.ccf-main-modal .main-menu{position:absolute;top:0;right:0;left:0;height:125px}.ccf-main-modal .main-menu h1{padding:16px}.ccf-main-modal .main-menu ul{height:40px;box-sizing:border-box;font-size:14px;margin:0;list-style-type:none;border-top:1px solid #ddd;background:#f3f3f3;padding:0 16px}.ccf-main-modal .main-menu ul li{margin:0;display:inline-block;height:38px;vertical-align:middle;line-height:40px;padding:0 8px}.ccf-main-modal .main-menu ul li a{text-decoration:none}.ccf-main-modal .main-menu ul li a :hover,.ccf-main-modal .main-menu ul li a.selected{color:#000}.ccf-main-modal .ccf-form-pane{display:none;position:absolute;top:125px;right:0;left:0;bottom:0}.ccf-main-modal .ccf-form-pane.single{top:85px;border-top:1px solid #e5e5e5}.ccf-main-modal .ccf-form-pane.single .form-content,.ccf-main-modal .ccf-form-pane.single .left-sidebar{border-top:0}.ccf-main-modal .ccf-form-pane .disabled-overlay{position:absolute;top:0;left:0;right:0;bottom:50px;background-color:#000;opacity:.1;-ms-filter:"alpha(Opacity=1)";filter:alpha(opacity=1);-moz-opacity:.1;-khtml-opacity:.1;z-index:3;display:none}.ccf-main-modal .ccf-form-pane .bottom{bottom:0;left:0;right:0;height:50px;padding:0 16px 0 0;position:absolute;text-align:right;line-height:50px;border-top:1px solid #e5e5e5}.ccf-main-modal .ccf-form-pane .bottom .left{float:left;background-color:#00a0d2;padding-left:16px;padding-right:16px;color:#fff}@media (max-width:830px){.ccf-main-modal .ccf-form-pane .bottom .left{display:none}}.ccf-main-modal .ccf-form-pane .bottom .left input{vertical-align:middle;margin-left:5px}.ccf-main-modal .ccf-form-pane .bottom .left button{vertical-align:middle}.ccf-main-modal .ccf-form-pane .bottom .left .signup-x{color:red;display:none;font-size:150%;vertical-align:middle;font-weight:700;margin-left:4px}.ccf-main-modal .ccf-form-pane .bottom .left .signup-check{color:green;display:none;vertical-align:middle;font-size:150%;font-weight:700;margin-left:4px}.ccf-main-modal .ccf-form-pane .bottom .left.signup-error .signup-x,.ccf-main-modal .ccf-form-pane .bottom .left.signup-success .signup-check{display:inline}.ccf-main-modal .ccf-form-pane .bottom .spinner{display:none;visibility:visible;float:right;width:16px;height:16px;margin-top:16px}.ccf-main-modal .ccf-form-pane .bottom input[type=button]{margin-top:11px;float:right;margin-left:6px}.ccf-main-modal .ccf-form-pane .accordion-section{background-color:#fff;border-bottom:0}.ccf-main-modal .ccf-form-pane .accordion-section:first-child{border-top:1px solid #e5e5e5}.ccf-main-modal .ccf-form-pane .accordion-section.expanded .section-content{display:block}.ccf-main-modal .ccf-form-pane .accordion-section.expanded .accordion-heading:before{content:""}.ccf-main-modal .ccf-form-pane .accordion-section.expanded .form-settings-heading:before{content:""}.ccf-main-modal .ccf-form-pane .accordion-section .accordion-heading,.ccf-main-modal .ccf-form-pane .accordion-section .form-settings-heading{cursor:pointer;display:block;line-height:29px;color:inherit;padding:10px 20px;border-bottom:1px solid #e5e5e5;font-size:150%;background-color:#fafafa;margin:0}.ccf-main-modal .ccf-form-pane .accordion-section .accordion-heading:before,.ccf-main-modal .ccf-form-pane .accordion-section .form-settings-heading:before{margin-right:8px;font-family:form-manager;content:"";speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;cursor:pointer;-webkit-font-smoothing:antialiased}.ccf-main-modal .ccf-form-pane .accordion-section .section-content{display:none;padding:10px 20px;border-bottom:1px solid #e5e5e5}.ccf-main-modal .ccf-form-pane label{display:block;margin-bottom:8px}.ccf-main-modal .ccf-form-pane .explain{margin-top:5px;font-style:italic;display:block}.ccf-main-modal .ccf-form-pane.show-form-settings .ccf-form-settings{display:block}.ccf-main-modal .ccf-form-pane .ccf-form-settings{display:none;position:absolute;width:75%;bottom:50px;left:25%;z-index:2;top:0;overflow:auto;background-color:#fff;border-top:1px solid #ddd;padding:21px;box-sizing:border-box}.ccf-main-modal .ccf-form-pane .ccf-form-settings h3:first-child,.ccf-main-modal .ccf-form-pane .ccf-form-settings p:first-child{margin-top:0}.ccf-main-modal .ccf-form-pane .ccf-form-settings h3{border-bottom:1px solid #ccc;padding-bottom:.75em;margin-top:2em}.ccf-main-modal .ccf-form-pane .ccf-form-settings .ccf-form-notifications td{position:relative}.ccf-main-modal .ccf-form-pane .ccf-form-settings .ccf-form-notifications .active{width:15%}.ccf-main-modal .ccf-form-pane .ccf-form-settings .ccf-form-notifications .active-indicator{color:#33CA33;font-size:40px}.ccf-main-modal .ccf-form-pane .ccf-form-settings .ccf-form-notifications .inactive-indicator{color:red;font-size:40px}.ccf-main-modal .ccf-form-pane .ccf-form-settings .ccf-form-notifications .add-notification{margin-top:1em;cursor:pointer}.ccf-main-modal .ccf-form-pane .ccf-form-settings .close-notification{position:absolute;top:10px;right:10px;cursor:pointer;font-size:200%;color:inherit}.ccf-main-modal .ccf-form-pane .ccf-form-settings .delete-notification{color:red}.ccf-main-modal .ccf-form-pane .left-sidebar{box-sizing:border-box;background-color:#f3f3f3;position:absolute;border-top:1px solid #ddd;border-right:1px solid #ddd;width:25%;top:0;padding:0;bottom:50px;left:0;overflow:auto}.ccf-main-modal .ccf-form-pane .left-sidebar .accordion-section:first-child{border-top:0}.ccf-main-modal .ccf-form-pane .left-sidebar .fields,.ccf-main-modal .ccf-form-pane .left-sidebar .special-fields,.ccf-main-modal .ccf-form-pane .left-sidebar .structure-fields{padding:5px}.ccf-main-modal .ccf-form-pane .left-sidebar .fields .field .preview,.ccf-main-modal .ccf-form-pane .left-sidebar .fields .field .right,.ccf-main-modal .ccf-form-pane .left-sidebar .special-fields .field .preview,.ccf-main-modal .ccf-form-pane .left-sidebar .special-fields .field .right,.ccf-main-modal .ccf-form-pane .left-sidebar .structure-fields .field .preview,.ccf-main-modal .ccf-form-pane .left-sidebar .structure-fields .field .right{display:none}.ccf-main-modal .ccf-form-pane .form-content{box-sizing:border-box;position:absolute;width:40%;bottom:50px;left:25%;right:35%;top:0;overflow:auto;border-top:1px solid #ddd;padding:21px}.ccf-main-modal .ccf-form-pane .form-content .field-placeholder{border:1px dashed #e5e5e5;height:46px;margin-bottom:5px}.ccf-main-modal .ccf-form-pane .form-content .no-fields{font-size:22px;padding:16px;font-style:italic}.ccf-main-modal .ccf-form-pane .form-content:after{width:100%;display:block;margin-top:5px;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;font-style:italic;font-size:22px;text-align:center;padding:1em .5em;border:4px dashed #e5e5e5;content:attr(data-drag-message)}.ccf-main-modal .ccf-form-pane .right-sidebar{box-sizing:border-box;padding:0;position:absolute;width:35%;top:0;overflow:auto;background-color:#f3f3f3;right:0;bottom:50px;border-left:1px solid #ddd}.ccf-main-modal .ccf-form-pane .right-sidebar .section-content>div{margin-bottom:6px}.ccf-main-modal .ccf-form-pane .right-sidebar .no-field{padding:16px;font-style:italic;font-size:22px}.ccf-main-modal .ccf-form-pane .right-sidebar label{display:inline-block;margin:0}.ccf-main-modal .ccf-form-pane .right-sidebar label .required{color:red}.ccf-main-modal .ccf-form-pane .right-sidebar .field-error input{border-color:red;border-width:2px}.ccf-main-modal .ccf-form-pane .right-sidebar .field-duplicate-slug input{border-color:#ffe6a5;border-width:2px}.ccf-main-modal .ccf-form-pane .right-sidebar input[type=text]{width:100%;display:block;margin-top:5px}.ccf-main-modal .ccf-form-pane .right-sidebar input[type=checkbox]+label{display:inline-block;vertical-align:middle}.ccf-main-modal .ccf-form-pane .right-sidebar label+select{display:inline-block}.ccf-main-modal .ccf-form-pane .right-sidebar textarea{width:100%;height:80px;margin-top:5px}.ccf-main-modal .ccf-form-pane .right-sidebar .field-html{height:150px;width:100%}.ccf-main-modal .ccf-form-pane .right-sidebar .repeatable-choices .choice input[type=text]{width:100px;display:inline-block}.ccf-main-modal .ccf-form-pane .right-sidebar .repeatable-choices .choice .move{color:inherit;cursor:move}.ccf-main-modal .ccf-form-pane .right-sidebar .repeatable-choices .choice .move:before{cursor:move}.ccf-main-modal .ccf-form-pane .right-sidebar .repeatable-choices .choice .add,.ccf-main-modal .ccf-form-pane .right-sidebar .repeatable-choices .choice .delete{cursor:pointer;color:inherit}.ccf-main-modal .ccf-existing-form-pane{display:none;position:absolute;overflow:scroll;top:125px;right:0;left:0;bottom:0;background-color:#fff;padding:16px}.ccf-main-modal .ccf-existing-form-pane table,.ccf-main-modal .ccf-form-notifications table{width:100%;border-collapse:collapse;table-layout:fixed;border:1px solid #ddd}.ccf-main-modal .ccf-existing-form-pane table .left,.ccf-main-modal .ccf-form-notifications table .left{float:left;width:50%;padding-right:10px;box-sizing:border-box}.ccf-main-modal .ccf-existing-form-pane table .left textarea,.ccf-main-modal .ccf-form-notifications table .left textarea{width:100%;height:300px}.ccf-main-modal .ccf-existing-form-pane table .right,.ccf-main-modal .ccf-form-notifications table .right{padding-left:10px;box-sizing:border-box;float:right;width:50%}.ccf-main-modal .ccf-existing-form-pane table td,.ccf-main-modal .ccf-form-notifications table td{margin:0;padding:14px 21px;text-align:left}.ccf-main-modal .ccf-existing-form-pane table .empty-form-table,.ccf-main-modal .ccf-existing-form-pane table .no-notifications,.ccf-main-modal .ccf-form-notifications table .empty-form-table,.ccf-main-modal .ccf-form-notifications table .no-notifications{text-align:center}.ccf-main-modal .ccf-existing-form-pane table tfoot,.ccf-main-modal .ccf-existing-form-pane table thead,.ccf-main-modal .ccf-form-notifications table tfoot,.ccf-main-modal .ccf-form-notifications table thead{background-color:#f0f0f0}.ccf-main-modal .ccf-existing-form-pane table tfoot tr,.ccf-main-modal .ccf-existing-form-pane table thead tr,.ccf-main-modal .ccf-form-notifications table tfoot tr,.ccf-main-modal .ccf-form-notifications table thead tr{border-bottom:1px solid #e5e5e5;border-top:1px solid #e5e5e5}.ccf-main-modal .ccf-existing-form-pane table tfoot th,.ccf-main-modal .ccf-existing-form-pane table thead th,.ccf-main-modal .ccf-form-notifications table tfoot th,.ccf-main-modal .ccf-form-notifications table thead th{margin:0;text-align:left;padding:14px 21px;box-sizing:border-box}.ccf-main-modal .ccf-existing-form-pane table tfoot .id,.ccf-main-modal .ccf-existing-form-pane table thead .id,.ccf-main-modal .ccf-form-notifications table tfoot .id,.ccf-main-modal .ccf-form-notifications table thead .id{width:5%}.ccf-main-modal .ccf-existing-form-pane table tfoot .title,.ccf-main-modal .ccf-existing-form-pane table thead .title,.ccf-main-modal .ccf-form-notifications table tfoot .title,.ccf-main-modal .ccf-form-notifications table thead .title{width:30%}.ccf-main-modal .ccf-existing-form-pane table tfoot .author,.ccf-main-modal .ccf-existing-form-pane table tfoot .entries,.ccf-main-modal .ccf-existing-form-pane table tfoot .submissions,.ccf-main-modal .ccf-existing-form-pane table thead .author,.ccf-main-modal .ccf-existing-form-pane table thead .entries,.ccf-main-modal .ccf-existing-form-pane table thead .submissions,.ccf-main-modal .ccf-form-notifications table tfoot .author,.ccf-main-modal .ccf-form-notifications table tfoot .entries,.ccf-main-modal .ccf-form-notifications table tfoot .submissions,.ccf-main-modal .ccf-form-notifications table thead .author,.ccf-main-modal .ccf-form-notifications table thead .entries,.ccf-main-modal .ccf-form-notifications table thead .submissions{width:10%}.ccf-main-modal .ccf-existing-form-pane table tfoot .number-of-fields,.ccf-main-modal .ccf-existing-form-pane table thead .number-of-fields,.ccf-main-modal .ccf-form-notifications table tfoot .number-of-fields,.ccf-main-modal .ccf-form-notifications table thead .number-of-fields{width:15%}.ccf-main-modal .ccf-existing-form-pane table tfoot .date,.ccf-main-modal .ccf-existing-form-pane table thead .date,.ccf-main-modal .ccf-form-notifications table tfoot .date,.ccf-main-modal .ccf-form-notifications table thead .date{width:20%}.ccf-main-modal .ccf-existing-form-pane table tbody tr:nth-child(odd),.ccf-main-modal .ccf-form-notifications table tbody tr:nth-child(odd){background-color:#fafafa;margin:0}.ccf-main-modal .ccf-existing-form-pane table tbody tr,.ccf-main-modal .ccf-form-notifications table tbody tr{background-color:#fff}.ccf-main-modal .ccf-existing-form-pane table tbody td,.ccf-main-modal .ccf-form-notifications table tbody td{vertical-align:top}.ccf-main-modal .ccf-existing-form-pane table tbody td a,.ccf-main-modal .ccf-form-notifications table tbody td a{text-decoration:none;cursor:pointer}.ccf-main-modal .ccf-existing-form-pane table tbody td .title,.ccf-main-modal .ccf-form-notifications table tbody td .title{font-weight:700;font-size:14px}.ccf-main-modal .ccf-existing-form-pane table tbody td .actions,.ccf-main-modal .ccf-form-notifications table tbody td .actions{visibility:hidden;margin-top:6px}.ccf-main-modal .ccf-existing-form-pane table tbody td .actions .delete,.ccf-main-modal .ccf-form-notifications table tbody td .actions .delete{color:red}.ccf-main-modal .ccf-existing-form-pane table tbody tr:hover td .actions,.ccf-main-modal .ccf-form-notifications table tbody tr:hover td .actions{visibility:visible}.ccf-main-modal-overlay{display:none;position:fixed;top:0;left:0;width:100%;height:100%;z-index:159900;opacity:.7;-ms-filter:"alpha(Opacity=70)";filter:alpha(opacity=70);-moz-opacity:.7;-khtml-opacity:.7;background-color:#000}.ccf-pagination{font-size:12px;margin-top:8px;text-align:right}.ccf-pagination .pages{padding:0 4px}.ccf-pagination .num-items{font-style:italic;padding-right:4px}.ccf-pagination a{cursor:pointer;color:#0074a2;background:#f0f0f0;text-decoration:none}.ccf-pagination a.first,.ccf-pagination a.last,.ccf-pagination a.next,.ccf-pagination a.prev{font-size:16px;line-height:22px;padding:0 7px 2px}.ccf-pagination a.first:hover,.ccf-pagination a.last:hover,.ccf-pagination a.next:hover,.ccf-pagination a.prev:hover{color:#fff;background-color:#2ea2cc}.ccf-pagination a.disabled{color:#aaa}.ccf-pagination a.disabled:hover{color:#aaa;background:#f0f0f0}.ccf-error-modal{display:none}.ccf-error-modal.show{display:block}.ccf-error-modal .ccf-notification-dialog-background{position:fixed;top:0;left:0;right:0;bottom:0;background:#000;opacity:.7;filter:alpha(opacity=70);z-index:1000000}.ccf-error-modal .notification-dialog{position:fixed;top:30%;left:50%;width:450px;margin-left:-225px;background:#fff;-webkit-box-shadow:0 3px 6px rgba(0,0,0,.3);box-shadow:0 3px 6px rgba(0,0,0,.3);line-height:1.5;z-index:1000005}.ccf-error-modal .notification-dialog .close{font-size:25px;position:absolute;right:10px;cursor:pointer}.ccf-error-modal .notification-dialog .message{margin:25px;text-align:center}.ccf-error-modal .notification-dialog .message .title{color:#23282d;font-size:1.3em;margin:0 0 1em}
|
build/css/form-mce.css.map
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
{
|
2 |
"version": 3,
|
3 |
-
"mappings": "AAAA,iBAAkB;EACjB,MAAM,EAAE,iBAAiB;EACzB,gBAAgB,EAAE,OAAO;EACzB,OAAO,EAAE,SAAS;EAClB,SAAS,EAAE,IAAI;EACf,WAAW,EAAE,sBAAsB;EAEnC,+BAAgB;IACf,UAAU,EAAE,MAAM;EAGnB,oBAAG;IACF,MAAM,EAAE,UAAU;IAClB,OAAO,EAAE,CAAC;EAGX,+BAAc;IACb,UAAU,EAAE,IAAI;IAEhB,qCAAM;MACL,KAAK,EAAE,IAAI;MACX,YAAY,EAAE,IAAI;MAClB,UAAU,EAAE,OAAO;MACnB,kBAAkB,EAAE,+
|
4 |
"sources": ["../../scss/form-mce.scss"],
|
5 |
"names": [],
|
6 |
"file": "form-mce.css"
|
1 |
{
|
2 |
"version": 3,
|
3 |
+
"mappings": "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",
|
4 |
"sources": ["../../scss/form-mce.scss"],
|
5 |
"names": [],
|
6 |
"file": "form-mce.css"
|
build/js/form-manager.js
CHANGED
@@ -333,6 +333,75 @@
|
|
333 |
}
|
334 |
);
|
335 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
336 |
wp.ccf.models.Form = wp.ccf.models.Form || wp.api.models.Post.extend(
|
337 |
{
|
338 |
|
@@ -344,7 +413,7 @@
|
|
344 |
|
345 |
idAttribute: 'id',
|
346 |
|
347 |
-
initialize: function() {
|
348 |
this.on( 'sync', this.decode, this );
|
349 |
},
|
350 |
|
@@ -358,17 +427,8 @@
|
|
358 |
completionActionType: 'text',
|
359 |
completionRedirectUrl: '',
|
360 |
completionMessage: '',
|
361 |
-
|
362 |
-
|
363 |
-
emailNotificationFromType: 'default',
|
364 |
-
emailNotificationFromAddress: '',
|
365 |
-
emailNotificationFromField: '',
|
366 |
-
emailNotificationSubjectType: 'default',
|
367 |
-
emailNotificationSubject: '',
|
368 |
-
emailNotificationSubjectField: '',
|
369 |
-
emailNotificationFromNameType: 'custom',
|
370 |
-
emailNotificationFromName: 'WordPress',
|
371 |
-
emailNotificationFromNameField: '',
|
372 |
pause: false,
|
373 |
pauseMessage: ccfSettings.pauseMessage
|
374 |
};
|
@@ -404,7 +464,9 @@
|
|
404 |
},
|
405 |
|
406 |
parse: function( response ) {
|
407 |
-
var SELF = this
|
|
|
|
|
408 |
|
409 |
if ( response.fields ) {
|
410 |
|
@@ -412,7 +474,7 @@
|
|
412 |
|
413 |
if ( fields && fields.length > 0 ) {
|
414 |
|
415 |
-
for (
|
416 |
var newField = response.fields[i];
|
417 |
|
418 |
var field = fields.findWhere( { slug: newField.slug } );
|
@@ -422,7 +484,7 @@
|
|
422 |
var choices = SELF.get( 'choices' );
|
423 |
|
424 |
if ( choices && choices.length > 0 ) {
|
425 |
-
for (
|
426 |
var choice = choices.at( z );
|
427 |
choice.set( newField.choices[z] );
|
428 |
choice.decode();
|
@@ -452,6 +514,52 @@
|
|
452 |
}
|
453 |
}
|
454 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
455 |
return this.constructor.__super__.parse.call( this, response );
|
456 |
},
|
457 |
|
@@ -462,6 +570,10 @@
|
|
462 |
attributes.fields = attributes.fields.toJSON();
|
463 |
}
|
464 |
|
|
|
|
|
|
|
|
|
465 |
if ( attributes.author ) {
|
466 |
attributes.author = attributes.author.toJSON();
|
467 |
}
|
@@ -635,7 +747,8 @@
|
|
635 |
var defaults = {
|
636 |
type: 'date',
|
637 |
showDate: true,
|
638 |
-
showTime: true
|
|
|
639 |
};
|
640 |
|
641 |
return _.defaults( defaults, this.constructor.__super__.defaults() );
|
@@ -877,6 +990,18 @@
|
|
877 |
}
|
878 |
);
|
879 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
880 |
wp.ccf.collections.Submissions = wp.ccf.collections.Submissions || wp.api.collections.Posts.extend(
|
881 |
{
|
882 |
model: wp.ccf.models.Submission,
|
@@ -973,26 +1098,514 @@
|
|
973 |
return this;
|
974 |
},
|
975 |
|
976 |
-
triggerAdd: function() {
|
977 |
-
this.field.get( 'choices' ).add( new wp.ccf.models.FieldChoice() );
|
978 |
-
},
|
979 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
980 |
triggerDelete: function() {
|
981 |
-
|
982 |
-
if ( choices.length > 1 ) {
|
983 |
-
choices.remove( this.model );
|
984 |
-
this.destroy();
|
985 |
-
this.remove();
|
986 |
-
} else {
|
987 |
-
var inputs = this.el.querySelectorAll( '.choice-label, .choice-value' );
|
988 |
-
var selected = this.el.querySelectorAll( '.choice-selected' );
|
989 |
-
|
990 |
-
for ( var i = 0; i < inputs.length; i++ ) {
|
991 |
-
inputs[i].value = '';
|
992 |
-
}
|
993 |
-
|
994 |
-
selected[0].checked = false;
|
995 |
-
}
|
996 |
}
|
997 |
}
|
998 |
);
|
@@ -1238,8 +1851,15 @@
|
|
1238 |
this.model.set( 'value', value[0].value );
|
1239 |
}
|
1240 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1241 |
this.model.set( 'className', this.el.querySelectorAll( '.field-class-name' )[0].value );
|
1242 |
-
this.model.set( 'showDate',
|
1243 |
|
1244 |
var oldShowTime = this.model.get( 'showTime' );
|
1245 |
var showTime = ( this.el.querySelectorAll( '.field-show-time' )[0].checked ) ? true : false;
|
@@ -1247,7 +1867,7 @@
|
|
1247 |
this.model.set( 'showTime', showTime );
|
1248 |
this.model.set( 'required', ( this.el.querySelectorAll( '.field-required' )[0].value == 1 ) ? true : false );
|
1249 |
|
1250 |
-
if ( showTime != oldShowTime ) {
|
1251 |
this.render();
|
1252 |
}
|
1253 |
|
@@ -1686,16 +2306,46 @@
|
|
1686 |
'change select': 'save',
|
1687 |
'change select.form-completion-action-type': 'toggleCompletionFields',
|
1688 |
'change select.form-pause': 'togglePauseFields',
|
1689 |
-
'
|
1690 |
},
|
1691 |
|
|
|
|
|
1692 |
initialize: function( options ) {
|
1693 |
this.model = options.form;
|
|
|
|
|
|
|
|
|
1694 |
},
|
1695 |
|
1696 |
-
|
1697 |
-
|
1698 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1699 |
},
|
1700 |
|
1701 |
toggleCompletionFields: function() {
|
@@ -1725,9 +2375,7 @@
|
|
1725 |
}
|
1726 |
},
|
1727 |
|
1728 |
-
save: function(
|
1729 |
-
var SELF = this;
|
1730 |
-
|
1731 |
if ( this.el.innerHTML === '' ) {
|
1732 |
// @todo: for some reason this is needed for IE8
|
1733 |
return;
|
@@ -1756,259 +2404,43 @@
|
|
1756 |
|
1757 |
var completionActionType = this.el.querySelectorAll( '.form-completion-action-type' )[0].value;
|
1758 |
this.model.set( 'completionActionType', completionActionType );
|
1759 |
-
|
1760 |
-
if ( typeof $promise !== 'undefined' && typeof $promise.promise !== 'undefined' ) {
|
1761 |
-
$promise.resolve();
|
1762 |
-
}
|
1763 |
-
},
|
1764 |
-
|
1765 |
-
render: function() {
|
1766 |
-
var context = {
|
1767 |
-
form: this.model.toJSON()
|
1768 |
-
};
|
1769 |
-
|
1770 |
-
this.el.innerHTML = this.template( context );
|
1771 |
-
|
1772 |
-
this.toggleCompletionFields();
|
1773 |
-
|
1774 |
-
this.togglePauseFields();
|
1775 |
-
|
1776 |
-
wp.ccf.dispatcher.on( 'saveFormSettings', this.save, this );
|
1777 |
-
wp.ccf.dispatcher.on( 'mainViewChange', this.save, this );
|
1778 |
-
|
1779 |
-
return this;
|
1780 |
-
}
|
1781 |
-
}
|
1782 |
-
);
|
1783 |
-
|
1784 |
-
wp.ccf.views.FormNotifications = wp.ccf.views.FormNotifications || Backbone.View.extend(
|
1785 |
-
{
|
1786 |
-
template: wp.ccf.utils.template( 'ccf-form-notifications-template' ),
|
1787 |
-
|
1788 |
-
events: {
|
1789 |
-
'blur input': 'save',
|
1790 |
-
'change select': 'save',
|
1791 |
-
'change select.form-send-email-notifications': 'toggleNotificationFields',
|
1792 |
-
'change select.form-email-notification-from-type': 'toggleNotificationFields',
|
1793 |
-
'change select.form-email-notification-from-name-type': 'toggleNotificationFields',
|
1794 |
-
'change select.form-email-notification-subject-type': 'toggleNotificationFields'
|
1795 |
-
},
|
1796 |
-
|
1797 |
-
initialize: function( options ) {
|
1798 |
-
this.model = options.form;
|
1799 |
-
},
|
1800 |
-
|
1801 |
-
destroy: function() {
|
1802 |
-
wp.ccf.dispatcher.off( 'saveFormNotifications', this.save );
|
1803 |
-
wp.ccf.dispatcher.off( 'mainViewChange', this.save );
|
1804 |
-
this.undelegateEvents();
|
1805 |
-
this.unbind();
|
1806 |
-
},
|
1807 |
-
|
1808 |
-
updateFromFieldField: function() {
|
1809 |
-
var emailNotificationFromField = this.el.querySelectorAll( '.form-email-notification-from-field' )[0];
|
1810 |
-
emailNotificationFromField.innerHTML = '';
|
1811 |
-
emailNotificationFromField.disabled = false;
|
1812 |
-
|
1813 |
-
var emailNotificationSubjectField = this.el.querySelectorAll( '.form-email-notification-subject-field' )[0];
|
1814 |
-
emailNotificationSubjectField.innerHTML = '';
|
1815 |
-
emailNotificationSubjectField.disabled = false;
|
1816 |
-
|
1817 |
-
var emailNotificationFromNameField = this.el.querySelectorAll( '.form-email-notification-from-name-field' )[0];
|
1818 |
-
emailNotificationFromNameField.innerHTML = '';
|
1819 |
-
emailNotificationFromNameField.disabled = false;
|
1820 |
-
|
1821 |
-
var fields = this.model.get( 'fields' ),
|
1822 |
-
addressFieldsAdded = 0,
|
1823 |
-
nameFieldsAdded = 0,
|
1824 |
-
subjectFieldsAdded = 0;
|
1825 |
-
|
1826 |
-
var addressField = this.model.get( 'emailNotificationFromField' );
|
1827 |
-
var subjectField = this.model.get( 'emailNotificationSubjectField' );
|
1828 |
-
var nameField = this.model.get( 'emailNotificationFromNameField' ),
|
1829 |
-
option;
|
1830 |
-
|
1831 |
-
if ( fields.length >= 1 ) {
|
1832 |
-
fields.each( function( field ) {
|
1833 |
-
if ( 'email' === field.get( 'type' ) ) {
|
1834 |
-
option = document.createElement( 'option' );
|
1835 |
-
option.innerHTML = field.get( 'slug' );
|
1836 |
-
option.value = field.get( 'slug' );
|
1837 |
-
|
1838 |
-
if ( field.get( 'slug' ) === addressField ) {
|
1839 |
-
option.selected = true;
|
1840 |
-
}
|
1841 |
-
|
1842 |
-
emailNotificationFromField.appendChild( option );
|
1843 |
-
|
1844 |
-
addressFieldsAdded++;
|
1845 |
-
} else if ( 'name' === field.get( 'type' ) ) {
|
1846 |
-
option = document.createElement( 'option' );
|
1847 |
-
option.innerHTML = field.get( 'slug' );
|
1848 |
-
option.value = field.get( 'slug' );
|
1849 |
-
|
1850 |
-
if ( field.get( 'slug' ) === nameField ) {
|
1851 |
-
option.selected = true;
|
1852 |
-
}
|
1853 |
-
|
1854 |
-
emailNotificationFromNameField.appendChild( option );
|
1855 |
-
|
1856 |
-
nameFieldsAdded++;
|
1857 |
-
} else if ( 'single-line-text' === field.get( 'type' ) ) {
|
1858 |
-
// @Todo: add more applicable fields
|
1859 |
-
|
1860 |
-
option = document.createElement( 'option' );
|
1861 |
-
option.innerHTML = field.get( 'slug' );
|
1862 |
-
option.value = field.get( 'slug' );
|
1863 |
-
|
1864 |
-
if ( field.get( 'slug' ) === subjectField ) {
|
1865 |
-
option.selected = true;
|
1866 |
-
}
|
1867 |
-
|
1868 |
-
emailNotificationSubjectField.appendChild( option );
|
1869 |
-
|
1870 |
-
subjectFieldsAdded++;
|
1871 |
-
}
|
1872 |
-
});
|
1873 |
-
}
|
1874 |
-
|
1875 |
-
if ( 0 === addressFieldsAdded ) {
|
1876 |
-
option = document.createElement( 'option' );
|
1877 |
-
option.innerHTML = ccfSettings.noEmailFields;
|
1878 |
-
emailNotificationFromField.appendChild( option );
|
1879 |
-
emailNotificationFromField.disabled = true;
|
1880 |
-
}
|
1881 |
-
|
1882 |
-
if ( 0 === nameFieldsAdded ) {
|
1883 |
-
option = document.createElement( 'option' );
|
1884 |
-
option.innerHTML = ccfSettings.noNameFields;
|
1885 |
-
emailNotificationFromNameField.appendChild( option );
|
1886 |
-
emailNotificationFromNameField.disabled = true;
|
1887 |
-
}
|
1888 |
-
|
1889 |
-
if ( 0 === subjectFieldsAdded ) {
|
1890 |
-
option = document.createElement( 'option' );
|
1891 |
-
option.innerHTML = ccfSettings.noApplicableFields;
|
1892 |
-
emailNotificationSubjectField.appendChild( option );
|
1893 |
-
emailNotificationSubjectField.disabled = true;
|
1894 |
-
}
|
1895 |
-
},
|
1896 |
-
|
1897 |
-
toggleNotificationFields: function() {
|
1898 |
-
var i;
|
1899 |
-
|
1900 |
-
var sendEmailNotifications = this.el.querySelectorAll( '.form-send-email-notifications' )[0].value;
|
1901 |
-
|
1902 |
-
var emailNotificationSettings = this.el.querySelectorAll( '.email-notification-setting' );
|
1903 |
-
|
1904 |
-
var emailNotificationFromAddress = this.el.querySelectorAll( '.email-notification-from-address' )[0];
|
1905 |
-
|
1906 |
-
var emailNotificationFromField = this.el.querySelectorAll( '.email-notification-from-field' )[0];
|
1907 |
-
|
1908 |
-
var emailNotificationFromType = this.el.querySelectorAll( '.form-email-notification-from-type' )[0];
|
1909 |
-
|
1910 |
-
var emailNotificationSubject = this.el.querySelectorAll( '.email-notification-subject' )[0];
|
1911 |
-
|
1912 |
-
var emailNotificationSubjectField = this.el.querySelectorAll( '.email-notification-subject-field' )[0];
|
1913 |
-
|
1914 |
-
var emailNotificationSubjectType = this.el.querySelectorAll( '.form-email-notification-subject-type' )[0];
|
1915 |
-
|
1916 |
-
var emailNotificationFromName = this.el.querySelectorAll( '.email-notification-from-name' )[0];
|
1917 |
-
|
1918 |
-
var emailNotificationFromNameField = this.el.querySelectorAll( '.email-notification-from-name-field' )[0];
|
1919 |
-
|
1920 |
-
var emailNotificationFromNameType = this.el.querySelectorAll( '.form-email-notification-from-name-type' )[0];
|
1921 |
-
|
1922 |
-
if ( parseInt( sendEmailNotifications ) ) {
|
1923 |
-
for ( i = 0; i < emailNotificationSettings.length; i++ ) {
|
1924 |
-
emailNotificationSettings[i].style.display = 'block';
|
1925 |
-
}
|
1926 |
-
|
1927 |
-
emailNotificationFromAddress.style.display = 'none';
|
1928 |
-
emailNotificationFromField.style.display = 'none';
|
1929 |
-
|
1930 |
-
if ( 'custom' === emailNotificationFromType.value ) {
|
1931 |
-
emailNotificationFromAddress.style.display = 'block';
|
1932 |
-
} else if ( 'field' === emailNotificationFromType.value ) {
|
1933 |
-
emailNotificationFromField.style.display = 'block';
|
1934 |
-
}
|
1935 |
-
|
1936 |
-
emailNotificationSubject.style.display = 'none';
|
1937 |
-
emailNotificationSubjectField.style.display = 'none';
|
1938 |
-
|
1939 |
-
if ( 'custom' === emailNotificationSubjectType.value ) {
|
1940 |
-
emailNotificationSubject.style.display = 'block';
|
1941 |
-
} else if ( 'field' === emailNotificationSubjectType.value ) {
|
1942 |
-
emailNotificationSubjectField.style.display = 'block';
|
1943 |
-
}
|
1944 |
-
|
1945 |
-
emailNotificationFromName.style.display = 'none';
|
1946 |
-
emailNotificationFromNameField.style.display = 'none';
|
1947 |
-
|
1948 |
-
if ( 'custom' === emailNotificationFromNameType.value ) {
|
1949 |
-
emailNotificationFromName.style.display = 'block';
|
1950 |
-
} else if ( 'field' === emailNotificationFromNameType.value ) {
|
1951 |
-
emailNotificationFromNameField.style.display = 'block';
|
1952 |
-
}
|
1953 |
-
} else {
|
1954 |
-
for ( i = 0; i < emailNotificationSettings.length; i++ ) {
|
1955 |
-
emailNotificationSettings[i].style.display = 'none';
|
1956 |
-
}
|
1957 |
-
|
1958 |
-
emailNotificationFromAddress.style.display = 'none';
|
1959 |
-
emailNotificationFromField.style.display = 'none';
|
1960 |
-
|
1961 |
-
emailNotificationSubject.style.display = 'none';
|
1962 |
-
emailNotificationSubjectField.style.display = 'none';
|
1963 |
-
|
1964 |
-
emailNotificationFromName.style.display = 'none';
|
1965 |
-
emailNotificationFromNameField.style.display = 'none';
|
1966 |
-
}
|
1967 |
},
|
1968 |
|
1969 |
-
|
1970 |
-
var SELF = this;
|
1971 |
-
|
1972 |
if ( this.el.innerHTML === '' ) {
|
1973 |
// @todo: for some reason this is needed for IE8
|
1974 |
return;
|
1975 |
}
|
1976 |
|
1977 |
-
|
1978 |
-
this.model.set( 'sendEmailNotifications', ( parseInt( sendEmailNotifications ) ) ? true : false );
|
1979 |
-
|
1980 |
-
var emailNotificationAddresses = this.el.querySelectorAll( '.form-email-notification-addresses' )[0].value;
|
1981 |
-
this.model.set( 'emailNotificationAddresses', emailNotificationAddresses );
|
1982 |
-
|
1983 |
-
var emailNotificationFromType = this.el.querySelectorAll( '.form-email-notification-from-type' )[0].value;
|
1984 |
-
this.model.set( 'emailNotificationFromType', emailNotificationFromType );
|
1985 |
-
|
1986 |
-
var emailNotificationFromAddress = this.el.querySelectorAll( '.form-email-notification-from-address' )[0].value;
|
1987 |
-
this.model.set( 'emailNotificationFromAddress', emailNotificationFromAddress );
|
1988 |
-
|
1989 |
-
var emailNotificationFromField = this.el.querySelectorAll( '.form-email-notification-from-field' )[0].value;
|
1990 |
-
this.model.set( 'emailNotificationFromField', emailNotificationFromField );
|
1991 |
-
|
1992 |
-
var emailNotificationFromNameType = this.el.querySelectorAll( '.form-email-notification-from-name-type' )[0].value;
|
1993 |
-
this.model.set( 'emailNotificationFromNameType', emailNotificationFromNameType );
|
1994 |
-
|
1995 |
-
var emailNotificationFromName = this.el.querySelectorAll( '.form-email-notification-from-name' )[0].value;
|
1996 |
-
this.model.set( 'emailNotificationFromName', emailNotificationFromName );
|
1997 |
|
1998 |
-
|
1999 |
-
|
|
|
2000 |
|
2001 |
-
|
2002 |
-
|
|
|
|
|
2003 |
|
2004 |
-
|
2005 |
-
|
|
|
|
|
2006 |
|
2007 |
-
|
2008 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009 |
|
2010 |
-
if (
|
2011 |
-
|
|
|
2012 |
}
|
2013 |
},
|
2014 |
|
@@ -2018,16 +2450,33 @@
|
|
2018 |
};
|
2019 |
|
2020 |
var fields = this.model.get( 'fields' );
|
|
|
2021 |
|
2022 |
this.el.innerHTML = this.template( context );
|
2023 |
|
2024 |
-
this.
|
2025 |
-
this.updateFromFieldField();
|
2026 |
|
2027 |
-
|
2028 |
-
|
2029 |
-
this.
|
2030 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2031 |
|
2032 |
return this;
|
2033 |
}
|
@@ -2039,14 +2488,14 @@
|
|
2039 |
template: wp.ccf.utils.template( 'ccf-form-pane-template' ),
|
2040 |
subViews: {
|
2041 |
'field-sidebar': wp.ccf.views.FieldSidebar,
|
2042 |
-
'form-settings': wp.ccf.views.FormSettings
|
2043 |
-
'form-notifications': wp.ccf.views.FormNotifications
|
2044 |
},
|
2045 |
|
2046 |
events: {
|
2047 |
'click .save-button': 'sync',
|
2048 |
'click .signup-button': 'signup',
|
2049 |
'click .accordion-heading': 'accordionClick',
|
|
|
2050 |
'click .insert-form-button': 'insertForm'
|
2051 |
},
|
2052 |
|
@@ -2097,6 +2546,16 @@
|
|
2097 |
section.className = section.className.replace( /expanded/i, '' );
|
2098 |
}
|
2099 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2100 |
},
|
2101 |
|
2102 |
openEditField: function( field ) {
|
@@ -2122,13 +2581,11 @@
|
|
2122 |
|
2123 |
var $settings = $.Deferred();
|
2124 |
var $field = $.Deferred();
|
2125 |
-
var $notifications = $.Deferred();
|
2126 |
|
2127 |
wp.ccf.dispatcher.trigger( 'saveFormSettings', $settings );
|
2128 |
-
wp.ccf.dispatcher.trigger( 'saveFormNotifications', $notifications );
|
2129 |
wp.ccf.dispatcher.trigger( 'saveField', $field );
|
2130 |
|
2131 |
-
$.when( $settings, $field
|
2132 |
var fields = SELF.model.get( 'fields' );
|
2133 |
var allReqsMet = true;
|
2134 |
var slugs = {};
|
@@ -2231,6 +2688,8 @@
|
|
2231 |
|
2232 |
SELF.el.innerHTML = this.template( context );
|
2233 |
|
|
|
|
|
2234 |
var fields = SELF.el.querySelectorAll( '.fields' )[0];
|
2235 |
|
2236 |
_.each( ccfSettings.fieldLabels, function( label, type ) {
|
@@ -2307,7 +2766,7 @@
|
|
2307 |
|
2308 |
});
|
2309 |
|
2310 |
-
SELF.initRenderSubViews(
|
2311 |
|
2312 |
SELF.enableDisableInsert();
|
2313 |
|
@@ -2857,6 +3316,7 @@
|
|
2857 |
}
|
2858 |
);
|
2859 |
})( jQuery, Backbone, _, ccfSettings );
|
|
|
2860 |
( function( $, Backbone, _, ccfSettings ) {
|
2861 |
'use strict';
|
2862 |
|
333 |
}
|
334 |
);
|
335 |
|
336 |
+
wp.ccf.models.FormNotificationAddress = wp.ccf.models.FormNotificationAddress || Backbone.Model.extend(
|
337 |
+
{
|
338 |
+
defaults: {
|
339 |
+
type: 'custom',
|
340 |
+
field: '',
|
341 |
+
email: ''
|
342 |
+
},
|
343 |
+
|
344 |
+
decode: function() {
|
345 |
+
return _modelDecode.call( this, [] );
|
346 |
+
},
|
347 |
+
|
348 |
+
set: _modelSet
|
349 |
+
}
|
350 |
+
);
|
351 |
+
|
352 |
+
wp.ccf.models.FormNotification = wp.ccf.models.FormNotification || Backbone.Model.extend(
|
353 |
+
{
|
354 |
+
defaults: function() {
|
355 |
+
return {
|
356 |
+
title: '',
|
357 |
+
content: '',
|
358 |
+
active: false,
|
359 |
+
addresses: new wp.ccf.collections.FormNotificationAddresses(),
|
360 |
+
fromType: 'default',
|
361 |
+
fromAddress: '',
|
362 |
+
fromField: '',
|
363 |
+
subjectType: 'default',
|
364 |
+
subject: '',
|
365 |
+
subjectField: '',
|
366 |
+
fromNameType: 'custom',
|
367 |
+
fromName: 'WordPress',
|
368 |
+
fromNameField: ''
|
369 |
+
};
|
370 |
+
},
|
371 |
+
|
372 |
+
initialize: function( attributes ) {
|
373 |
+
if ( typeof attributes === 'object' && attributes.addresses ) {
|
374 |
+
var addresses = [];
|
375 |
+
|
376 |
+
_.each( attributes.addresses, function( address ) {
|
377 |
+
var addressModel = new wp.ccf.models.FormNotificationAddress( address );
|
378 |
+
addressModel.decode();
|
379 |
+
|
380 |
+
addresses.push( addressModel );
|
381 |
+
});
|
382 |
+
|
383 |
+
this.set( 'addresses', new wp.ccf.collections.FormNotificationAddresses( addresses ) );
|
384 |
+
}
|
385 |
+
},
|
386 |
+
|
387 |
+
decode: function() {
|
388 |
+
return _modelDecode.call( this, [] );
|
389 |
+
},
|
390 |
+
|
391 |
+
toJSON: function() {
|
392 |
+
var attributes = this.constructor.__super__.toJSON.call( this );
|
393 |
+
|
394 |
+
if ( attributes.addresses ) {
|
395 |
+
attributes.addresses = attributes.addresses.toJSON();
|
396 |
+
}
|
397 |
+
|
398 |
+
return attributes;
|
399 |
+
},
|
400 |
+
|
401 |
+
set: _modelSet
|
402 |
+
}
|
403 |
+
);
|
404 |
+
|
405 |
wp.ccf.models.Form = wp.ccf.models.Form || wp.api.models.Post.extend(
|
406 |
{
|
407 |
|
413 |
|
414 |
idAttribute: 'id',
|
415 |
|
416 |
+
initialize: function( attributes ) {
|
417 |
this.on( 'sync', this.decode, this );
|
418 |
},
|
419 |
|
427 |
completionActionType: 'text',
|
428 |
completionRedirectUrl: '',
|
429 |
completionMessage: '',
|
430 |
+
|
431 |
+
notifications: new wp.ccf.collections.FormNotifications(),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
432 |
pause: false,
|
433 |
pauseMessage: ccfSettings.pauseMessage
|
434 |
};
|
464 |
},
|
465 |
|
466 |
parse: function( response ) {
|
467 |
+
var SELF = this,
|
468 |
+
i = 0,
|
469 |
+
z = 0;
|
470 |
|
471 |
if ( response.fields ) {
|
472 |
|
474 |
|
475 |
if ( fields && fields.length > 0 ) {
|
476 |
|
477 |
+
for ( i = 0; i < response.fields.length; i++ ) {
|
478 |
var newField = response.fields[i];
|
479 |
|
480 |
var field = fields.findWhere( { slug: newField.slug } );
|
484 |
var choices = SELF.get( 'choices' );
|
485 |
|
486 |
if ( choices && choices.length > 0 ) {
|
487 |
+
for ( z = 0; z < newField.choices; z++ ) {
|
488 |
var choice = choices.at( z );
|
489 |
choice.set( newField.choices[z] );
|
490 |
choice.decode();
|
514 |
}
|
515 |
}
|
516 |
|
517 |
+
if ( response.notifications ) {
|
518 |
+
|
519 |
+
var notifications = SELF.get( 'notifications' );
|
520 |
+
|
521 |
+
if ( notifications && notifications.length > 0 ) {
|
522 |
+
|
523 |
+
for ( i = 0; i < response.notifications.length; i++ ) {
|
524 |
+
var newNotification = response.notifications[i];
|
525 |
+
|
526 |
+
var notification = notifications.findWhere( { slug: newNotification.slug } );
|
527 |
+
|
528 |
+
if ( notification ) {
|
529 |
+
if ( typeof newNotification.addresses !== 'undefined' ) {
|
530 |
+
var addresses = SELF.get( 'addresses' );
|
531 |
+
|
532 |
+
if ( addresses && addresses.length > 0 ) {
|
533 |
+
for ( z = 0; z < newNotification.addresses; z++ ) {
|
534 |
+
var address = addresses.at( z );
|
535 |
+
address.set( newNotification.addresses[z] );
|
536 |
+
address.decode();
|
537 |
+
}
|
538 |
+
}
|
539 |
+
|
540 |
+
delete response.notifications[i].addresses;
|
541 |
+
}
|
542 |
+
|
543 |
+
notification.set( newNotification );
|
544 |
+
notification.decode();
|
545 |
+
}
|
546 |
+
}
|
547 |
+
|
548 |
+
delete response.notifications;
|
549 |
+
} else {
|
550 |
+
var newNotifications = [];
|
551 |
+
|
552 |
+
_.each( response.notifications, function( notification ) {
|
553 |
+
var notificationModel = new wp.ccf.models.FormNotification( notification );
|
554 |
+
notificationModel.decode();
|
555 |
+
|
556 |
+
newNotifications.push( notificationModel );
|
557 |
+
});
|
558 |
+
|
559 |
+
response.notifications = new wp.ccf.collections.FormNotifications( newNotifications );
|
560 |
+
}
|
561 |
+
}
|
562 |
+
|
563 |
return this.constructor.__super__.parse.call( this, response );
|
564 |
},
|
565 |
|
570 |
attributes.fields = attributes.fields.toJSON();
|
571 |
}
|
572 |
|
573 |
+
if ( attributes.notifications ) {
|
574 |
+
attributes.notifications = attributes.notifications.toJSON();
|
575 |
+
}
|
576 |
+
|
577 |
if ( attributes.author ) {
|
578 |
attributes.author = attributes.author.toJSON();
|
579 |
}
|
747 |
var defaults = {
|
748 |
type: 'date',
|
749 |
showDate: true,
|
750 |
+
showTime: true,
|
751 |
+
dateFormat: 'mm/dd/yyyy'
|
752 |
};
|
753 |
|
754 |
return _.defaults( defaults, this.constructor.__super__.defaults() );
|
990 |
}
|
991 |
);
|
992 |
|
993 |
+
wp.ccf.collections.FormNotificationAddresses = wp.ccf.collections.FormNotificationAddresses || Backbone.Collection.extend(
|
994 |
+
{
|
995 |
+
model: wp.ccf.models.FormNotificationAddress
|
996 |
+
}
|
997 |
+
);
|
998 |
+
|
999 |
+
wp.ccf.collections.FormNotifications = wp.ccf.collections.FormNotifications || Backbone.Collection.extend(
|
1000 |
+
{
|
1001 |
+
model: wp.ccf.models.FormNotification
|
1002 |
+
}
|
1003 |
+
);
|
1004 |
+
|
1005 |
wp.ccf.collections.Submissions = wp.ccf.collections.Submissions || wp.api.collections.Posts.extend(
|
1006 |
{
|
1007 |
model: wp.ccf.models.Submission,
|
1098 |
return this;
|
1099 |
},
|
1100 |
|
1101 |
+
triggerAdd: function() {
|
1102 |
+
this.field.get( 'choices' ).add( new wp.ccf.models.FieldChoice() );
|
1103 |
+
},
|
1104 |
+
|
1105 |
+
triggerDelete: function() {
|
1106 |
+
var choices = this.field.get( 'choices' );
|
1107 |
+
if ( choices.length > 1 ) {
|
1108 |
+
choices.remove( this.model );
|
1109 |
+
this.destroy();
|
1110 |
+
this.remove();
|
1111 |
+
} else {
|
1112 |
+
var inputs = this.el.querySelectorAll( '.choice-label, .choice-value' );
|
1113 |
+
var selected = this.el.querySelectorAll( '.choice-selected' );
|
1114 |
+
|
1115 |
+
for ( var i = 0; i < inputs.length; i++ ) {
|
1116 |
+
inputs[i].value = '';
|
1117 |
+
}
|
1118 |
+
|
1119 |
+
selected[0].checked = false;
|
1120 |
+
}
|
1121 |
+
}
|
1122 |
+
}
|
1123 |
+
);
|
1124 |
+
|
1125 |
+
wp.ccf.views.EmptyFormNotificationTableRow = wp.ccf.views.EmptyFormNotificationTableRow || Backbone.View.extend(
|
1126 |
+
{
|
1127 |
+
tagName: 'tr',
|
1128 |
+
template: wp.ccf.utils.template( 'ccf-empty-form-notification-row-template'),
|
1129 |
+
|
1130 |
+
events: {
|
1131 |
+
'click .add': 'triggerAdd'
|
1132 |
+
},
|
1133 |
+
|
1134 |
+
initialize: function( options ) {
|
1135 |
+
this.form = options.form;
|
1136 |
+
},
|
1137 |
+
|
1138 |
+
destroy: function() {
|
1139 |
+
this.unbind();
|
1140 |
+
},
|
1141 |
+
|
1142 |
+
render: function() {
|
1143 |
+
this.$el.html( this.template() );
|
1144 |
+
return this;
|
1145 |
+
},
|
1146 |
+
|
1147 |
+
triggerAdd: function() {
|
1148 |
+
var notifications = this.form.get( 'notifications' );
|
1149 |
+
|
1150 |
+
this.destroy();
|
1151 |
+
|
1152 |
+
notifications.add( new wp.ccf.models.FormNotification() );
|
1153 |
+
}
|
1154 |
+
}
|
1155 |
+
);
|
1156 |
+
|
1157 |
+
wp.ccf.views.EmptyFormTableRow = wp.ccf.views.EmptyFormTableRow || Backbone.View.extend(
|
1158 |
+
{
|
1159 |
+
tagName: 'tr',
|
1160 |
+
template: wp.ccf.utils.template( 'ccf-empty-form-table-row-template'),
|
1161 |
+
|
1162 |
+
render: function() {
|
1163 |
+
this.$el.html( this.template() );
|
1164 |
+
return this;
|
1165 |
+
}
|
1166 |
+
}
|
1167 |
+
);
|
1168 |
+
|
1169 |
+
wp.ccf.views.FormNotificationAddress = Backbone.View.extend(
|
1170 |
+
{
|
1171 |
+
template: wp.ccf.utils.template( 'ccf-form-notification-address-template' ),
|
1172 |
+
className: 'address',
|
1173 |
+
|
1174 |
+
events: {
|
1175 |
+
'click .add': 'triggerAdd',
|
1176 |
+
'click .delete': 'triggerDelete',
|
1177 |
+
'blur input': 'save',
|
1178 |
+
'change select': 'save'
|
1179 |
+
},
|
1180 |
+
|
1181 |
+
initialize: function( options ) {
|
1182 |
+
this.notification = options.notification;
|
1183 |
+
this.parent = options.parent;
|
1184 |
+
this.form = options.form;
|
1185 |
+
},
|
1186 |
+
|
1187 |
+
destroy: function() {
|
1188 |
+
this.unbind();
|
1189 |
+
},
|
1190 |
+
|
1191 |
+
save: function() {
|
1192 |
+
// @todo: fix this ie8 hack
|
1193 |
+
if ( this.el.innerHTML === '' ) {
|
1194 |
+
return;
|
1195 |
+
}
|
1196 |
+
|
1197 |
+
var type = this.el.querySelectorAll( '.form-notification-address-type' )[0].value;
|
1198 |
+
var email = this.el.querySelectorAll( '.form-notification-address-email' );
|
1199 |
+
var field = this.el.querySelectorAll( '.form-notification-address-field' );
|
1200 |
+
var oldType = this.model.get( 'type' );
|
1201 |
+
|
1202 |
+
if ( email.length ) {
|
1203 |
+
this.model.set( 'email', email[0].value );
|
1204 |
+
}
|
1205 |
+
|
1206 |
+
if ( field.length ) {
|
1207 |
+
this.model.set( 'field', field[0].value );
|
1208 |
+
}
|
1209 |
+
|
1210 |
+
this.model.set( 'type', type );
|
1211 |
+
|
1212 |
+
if ( oldType !== type ) {
|
1213 |
+
this.render();
|
1214 |
+
}
|
1215 |
+
|
1216 |
+
return this;
|
1217 |
+
|
1218 |
+
},
|
1219 |
+
|
1220 |
+
updateFromFieldField: function() {
|
1221 |
+
if ( 'edit' !== this.parent.context || 'field' !== this.model.get( 'type' ) ) {
|
1222 |
+
return;
|
1223 |
+
}
|
1224 |
+
|
1225 |
+
var addressFromField = this.el.querySelectorAll( '.form-notification-address-field' )[0];
|
1226 |
+
addressFromField.innerHTML = '';
|
1227 |
+
addressFromField.disabled = false;
|
1228 |
+
|
1229 |
+
var fields = this.form.get( 'fields' ),
|
1230 |
+
addressFieldsAdded = 0;
|
1231 |
+
|
1232 |
+
var addressField = this.model.get( 'field' ),
|
1233 |
+
option;
|
1234 |
+
|
1235 |
+
if ( fields.length >= 1 ) {
|
1236 |
+
fields.each( function( field ) {
|
1237 |
+
if ( 'email' === field.get( 'type' ) ) {
|
1238 |
+
option = document.createElement( 'option' );
|
1239 |
+
option.innerHTML = field.get( 'slug' );
|
1240 |
+
option.value = field.get( 'slug' );
|
1241 |
+
|
1242 |
+
if ( field.get( 'slug' ) === addressField ) {
|
1243 |
+
option.selected = true;
|
1244 |
+
}
|
1245 |
+
|
1246 |
+
addressFromField.appendChild( option );
|
1247 |
+
|
1248 |
+
addressFieldsAdded++;
|
1249 |
+
}
|
1250 |
+
});
|
1251 |
+
}
|
1252 |
+
|
1253 |
+
if ( 0 === addressFieldsAdded ) {
|
1254 |
+
option = document.createElement( 'option' );
|
1255 |
+
option.innerHTML = ccfSettings.noEmailFields;
|
1256 |
+
option.value = '';
|
1257 |
+
addressFromField.appendChild( option );
|
1258 |
+
addressFromField.disabled = true;
|
1259 |
+
}
|
1260 |
+
},
|
1261 |
+
|
1262 |
+
render: function() {
|
1263 |
+
var context = {};
|
1264 |
+
if ( this.model ) {
|
1265 |
+
context.address = this.model.toJSON();
|
1266 |
+
}
|
1267 |
+
|
1268 |
+
this.el.innerHTML = this.template( context );
|
1269 |
+
|
1270 |
+
var fields = this.form.get( 'fields' );
|
1271 |
+
|
1272 |
+
this.listenTo( fields, 'add', this.updateFromFieldField, this );
|
1273 |
+
this.listenTo( fields, 'remove', this.updateFromFieldField, this );
|
1274 |
+
|
1275 |
+
if ( 'field' === this.model.get( 'type' ) ) {
|
1276 |
+
this.updateFromFieldField();
|
1277 |
+
}
|
1278 |
+
|
1279 |
+
return this;
|
1280 |
+
},
|
1281 |
+
|
1282 |
+
triggerAdd: function() {
|
1283 |
+
this.notification.get( 'addresses' ).add( new wp.ccf.models.FormNotificationAddress() );
|
1284 |
+
},
|
1285 |
+
|
1286 |
+
triggerDelete: function() {
|
1287 |
+
var addresses = this.notification.get( 'addresses' );
|
1288 |
+
|
1289 |
+
if ( addresses.length > 1 ) {
|
1290 |
+
this.parent.deleteAddress( this );
|
1291 |
+
} else {
|
1292 |
+
this.model.clear().set( wp.ccf.models.FormNotificationAddress.prototype.defaults );
|
1293 |
+
this.destroy();
|
1294 |
+
this.render();
|
1295 |
+
}
|
1296 |
+
}
|
1297 |
+
}
|
1298 |
+
);
|
1299 |
+
|
1300 |
+
wp.ccf.views.ExistingFormNotificationRow = Backbone.View.extend(
|
1301 |
+
{
|
1302 |
+
template: wp.ccf.utils.template( 'ccf-existing-form-notification-table-row-template' ),
|
1303 |
+
tagName: 'tr',
|
1304 |
+
|
1305 |
+
events: {
|
1306 |
+
'change select.form-email-notification-from-type': 'toggleNotificationFields',
|
1307 |
+
'change select.form-email-notification-from-name-type': 'toggleNotificationFields',
|
1308 |
+
'change select.form-email-notification-subject-type': 'toggleNotificationFields',
|
1309 |
+
'click .close-notification': 'changeContext',
|
1310 |
+
'click .edit-notification': 'changeContext',
|
1311 |
+
'click .delete-notification': 'triggerDelete',
|
1312 |
+
'blur input': 'save',
|
1313 |
+
'change select': 'save'
|
1314 |
+
},
|
1315 |
+
|
1316 |
+
addressViews: [],
|
1317 |
+
|
1318 |
+
initialize: function( options ) {
|
1319 |
+
this.form = options.form;
|
1320 |
+
this.addressViews = [];
|
1321 |
+
this.parent = options.parent;
|
1322 |
+
this.context = ( 'undefined' !== typeof options.context ) ? options.context : 'view';
|
1323 |
+
|
1324 |
+
var addresses = this.model.get( 'addresses' );
|
1325 |
+
this.listenTo( addresses, 'add', this.addAddress );
|
1326 |
+
},
|
1327 |
+
|
1328 |
+
deleteAddress: function( view ) {
|
1329 |
+
_.each( this.addressViews, function( currentView ) {
|
1330 |
+
if ( view.cid === currentView.cid ) {
|
1331 |
+
var index = _.indexOf( this.addressViews, currentView );
|
1332 |
+
this.model.get( 'addresses' ).remove( view.model );
|
1333 |
+
this.addressViews[index].remove();
|
1334 |
+
this.addressViews.splice( index, 1 );
|
1335 |
+
}
|
1336 |
+
}, this );
|
1337 |
+
},
|
1338 |
+
|
1339 |
+
addAddress: function( model ) {
|
1340 |
+
var addressesContainer = this.el.querySelectorAll( '.addresses' )[0];
|
1341 |
+
var view = new wp.ccf.views.FormNotificationAddress( { model: model, parent: this, notification: this.model, form: this.form } );
|
1342 |
+
this.addressViews.push( view );
|
1343 |
+
addressesContainer.appendChild( view.render().el );
|
1344 |
+
},
|
1345 |
+
|
1346 |
+
destroy: function() {
|
1347 |
+
this.unbind();
|
1348 |
+
},
|
1349 |
+
|
1350 |
+
changeContext: function( event, forceContext ) {
|
1351 |
+
if ( 'edit' === this.context ) {
|
1352 |
+
this.save();
|
1353 |
+
}
|
1354 |
+
|
1355 |
+
if ( forceContext ) {
|
1356 |
+
this.context = forceContext;
|
1357 |
+
} else {
|
1358 |
+
if ( 'view' === this.context ) {
|
1359 |
+
this.parent.closeAllNotifications();
|
1360 |
+
}
|
1361 |
+
|
1362 |
+
this.context = ( 'edit' === this.context ) ? 'view' : 'edit';
|
1363 |
+
}
|
1364 |
+
|
1365 |
+
this.destroy();
|
1366 |
+
this.render();
|
1367 |
+
},
|
1368 |
+
|
1369 |
+
updateFromFieldField: function() {
|
1370 |
+
if ( 'edit' !== this.context ) {
|
1371 |
+
return;
|
1372 |
+
}
|
1373 |
+
|
1374 |
+
var emailNotificationFromField = this.el.querySelectorAll( '.form-email-notification-from-field' )[0];
|
1375 |
+
emailNotificationFromField.innerHTML = '';
|
1376 |
+
emailNotificationFromField.disabled = false;
|
1377 |
+
|
1378 |
+
var emailNotificationSubjectField = this.el.querySelectorAll( '.form-email-notification-subject-field' )[0];
|
1379 |
+
emailNotificationSubjectField.innerHTML = '';
|
1380 |
+
emailNotificationSubjectField.disabled = false;
|
1381 |
+
|
1382 |
+
var emailNotificationFromNameField = this.el.querySelectorAll( '.form-email-notification-from-name-field' )[0];
|
1383 |
+
emailNotificationFromNameField.innerHTML = '';
|
1384 |
+
emailNotificationFromNameField.disabled = false;
|
1385 |
+
|
1386 |
+
var fields = this.form.get( 'fields' ),
|
1387 |
+
addressFieldsAdded = 0,
|
1388 |
+
nameFieldsAdded = 0,
|
1389 |
+
subjectFieldsAdded = 0;
|
1390 |
+
|
1391 |
+
var addressField = this.model.get( 'emailNotificationFromField' );
|
1392 |
+
var subjectField = this.model.get( 'emailNotificationSubjectField' );
|
1393 |
+
var nameField = this.model.get( 'emailNotificationFromNameField' ),
|
1394 |
+
option;
|
1395 |
+
|
1396 |
+
if ( fields.length >= 1 ) {
|
1397 |
+
fields.each( function( field ) {
|
1398 |
+
if ( 'email' === field.get( 'type' ) ) {
|
1399 |
+
option = document.createElement( 'option' );
|
1400 |
+
option.innerHTML = field.get( 'slug' );
|
1401 |
+
option.value = field.get( 'slug' );
|
1402 |
+
|
1403 |
+
if ( field.get( 'slug' ) === addressField ) {
|
1404 |
+
option.selected = true;
|
1405 |
+
}
|
1406 |
+
|
1407 |
+
emailNotificationFromField.appendChild( option );
|
1408 |
+
|
1409 |
+
addressFieldsAdded++;
|
1410 |
+
} else if ( 'name' === field.get( 'type' ) ) {
|
1411 |
+
option = document.createElement( 'option' );
|
1412 |
+
option.innerHTML = field.get( 'slug' );
|
1413 |
+
option.value = field.get( 'slug' );
|
1414 |
+
|
1415 |
+
if ( field.get( 'slug' ) === nameField ) {
|
1416 |
+
option.selected = true;
|
1417 |
+
}
|
1418 |
+
|
1419 |
+
emailNotificationFromNameField.appendChild( option );
|
1420 |
+
|
1421 |
+
nameFieldsAdded++;
|
1422 |
+
} else if ( 'single-line-text' === field.get( 'type' ) ) {
|
1423 |
+
// @Todo: add more applicable fields
|
1424 |
+
|
1425 |
+
option = document.createElement( 'option' );
|
1426 |
+
option.innerHTML = field.get( 'slug' );
|
1427 |
+
option.value = field.get( 'slug' );
|
1428 |
+
|
1429 |
+
if ( field.get( 'slug' ) === subjectField ) {
|
1430 |
+
option.selected = true;
|
1431 |
+
}
|
1432 |
+
|
1433 |
+
emailNotificationSubjectField.appendChild( option );
|
1434 |
+
|
1435 |
+
subjectFieldsAdded++;
|
1436 |
+
}
|
1437 |
+
});
|
1438 |
+
}
|
1439 |
+
|
1440 |
+
if ( 0 === addressFieldsAdded ) {
|
1441 |
+
option = document.createElement( 'option' );
|
1442 |
+
option.innerHTML = ccfSettings.noEmailFields;
|
1443 |
+
option.value = '';
|
1444 |
+
emailNotificationFromField.appendChild( option );
|
1445 |
+
emailNotificationFromField.disabled = true;
|
1446 |
+
}
|
1447 |
+
|
1448 |
+
if ( 0 === nameFieldsAdded ) {
|
1449 |
+
option = document.createElement( 'option' );
|
1450 |
+
option.innerHTML = ccfSettings.noNameFields;
|
1451 |
+
option.value = '';
|
1452 |
+
emailNotificationFromNameField.appendChild( option );
|
1453 |
+
emailNotificationFromNameField.disabled = true;
|
1454 |
+
}
|
1455 |
+
|
1456 |
+
if ( 0 === subjectFieldsAdded ) {
|
1457 |
+
option = document.createElement( 'option' );
|
1458 |
+
option.innerHTML = ccfSettings.noApplicableFields;
|
1459 |
+
option.value = '';
|
1460 |
+
emailNotificationSubjectField.appendChild( option );
|
1461 |
+
emailNotificationSubjectField.disabled = true;
|
1462 |
+
}
|
1463 |
+
},
|
1464 |
+
|
1465 |
+
toggleNotificationFields: function() {
|
1466 |
+
var i;
|
1467 |
+
|
1468 |
+
var emailNotificationFromAddress = this.el.querySelectorAll( '.email-notification-from-address' )[0];
|
1469 |
+
|
1470 |
+
var emailNotificationFromField = this.el.querySelectorAll( '.email-notification-from-field' )[0];
|
1471 |
+
|
1472 |
+
var emailNotificationFromType = this.el.querySelectorAll( '.form-email-notification-from-type' )[0];
|
1473 |
+
|
1474 |
+
var emailNotificationSubject = this.el.querySelectorAll( '.email-notification-subject' )[0];
|
1475 |
+
|
1476 |
+
var emailNotificationSubjectField = this.el.querySelectorAll( '.email-notification-subject-field' )[0];
|
1477 |
+
|
1478 |
+
var emailNotificationSubjectType = this.el.querySelectorAll( '.form-email-notification-subject-type' )[0];
|
1479 |
+
|
1480 |
+
var emailNotificationFromName = this.el.querySelectorAll( '.email-notification-from-name' )[0];
|
1481 |
+
|
1482 |
+
var emailNotificationFromNameField = this.el.querySelectorAll( '.email-notification-from-name-field' )[0];
|
1483 |
+
|
1484 |
+
var emailNotificationFromNameType = this.el.querySelectorAll( '.form-email-notification-from-name-type' )[0];
|
1485 |
+
|
1486 |
+
emailNotificationFromAddress.style.display = 'none';
|
1487 |
+
emailNotificationFromField.style.display = 'none';
|
1488 |
+
|
1489 |
+
if ( 'custom' === emailNotificationFromType.value ) {
|
1490 |
+
emailNotificationFromAddress.style.display = 'block';
|
1491 |
+
} else if ( 'field' === emailNotificationFromType.value ) {
|
1492 |
+
emailNotificationFromField.style.display = 'block';
|
1493 |
+
}
|
1494 |
+
|
1495 |
+
emailNotificationSubject.style.display = 'none';
|
1496 |
+
emailNotificationSubjectField.style.display = 'none';
|
1497 |
+
|
1498 |
+
if ( 'custom' === emailNotificationSubjectType.value ) {
|
1499 |
+
emailNotificationSubject.style.display = 'block';
|
1500 |
+
} else if ( 'field' === emailNotificationSubjectType.value ) {
|
1501 |
+
emailNotificationSubjectField.style.display = 'block';
|
1502 |
+
}
|
1503 |
+
|
1504 |
+
emailNotificationFromName.style.display = 'none';
|
1505 |
+
emailNotificationFromNameField.style.display = 'none';
|
1506 |
+
|
1507 |
+
if ( 'custom' === emailNotificationFromNameType.value ) {
|
1508 |
+
emailNotificationFromName.style.display = 'block';
|
1509 |
+
} else if ( 'field' === emailNotificationFromNameType.value ) {
|
1510 |
+
emailNotificationFromNameField.style.display = 'block';
|
1511 |
+
}
|
1512 |
+
},
|
1513 |
+
|
1514 |
+
save: function() {
|
1515 |
+
// @todo: fix this ie8 hack
|
1516 |
+
if ( this.el.innerHTML === '' ) {
|
1517 |
+
return;
|
1518 |
+
}
|
1519 |
+
|
1520 |
+
if ( 'edit' !== this.context ) {
|
1521 |
+
return;
|
1522 |
+
}
|
1523 |
+
|
1524 |
+
var emailNotificationTitle = this.el.querySelectorAll( '.form-email-notification-title' )[0].value;
|
1525 |
+
this.model.set( 'title', emailNotificationTitle );
|
1526 |
+
|
1527 |
+
var emailNotificationContent = this.el.querySelectorAll( '.form-email-notification-content' )[0].value;
|
1528 |
+
this.model.set( 'content', emailNotificationContent );
|
1529 |
+
|
1530 |
+
var emailNotificationActive = this.el.querySelectorAll( '.form-email-notification-active' )[0].value;
|
1531 |
+
this.model.set( 'active', ( 'Yes' === emailNotificationActive ) ? true : false );
|
1532 |
+
|
1533 |
+
var emailNotificationFromType = this.el.querySelectorAll( '.form-email-notification-from-type' )[0].value;
|
1534 |
+
this.model.set( 'fromType', emailNotificationFromType );
|
1535 |
+
|
1536 |
+
var emailNotificationFromAddress = this.el.querySelectorAll( '.form-email-notification-from-address' )[0].value;
|
1537 |
+
this.model.set( 'fromAddress', emailNotificationFromAddress );
|
1538 |
+
|
1539 |
+
var emailNotificationFromField = this.el.querySelectorAll( '.form-email-notification-from-field' )[0].value;
|
1540 |
+
this.model.set( 'fromField', emailNotificationFromField );
|
1541 |
+
|
1542 |
+
var emailNotificationFromNameType = this.el.querySelectorAll( '.form-email-notification-from-name-type' )[0].value;
|
1543 |
+
this.model.set( 'fromNameType', emailNotificationFromNameType );
|
1544 |
+
|
1545 |
+
var emailNotificationFromName = this.el.querySelectorAll( '.form-email-notification-from-name' )[0].value;
|
1546 |
+
this.model.set( 'fromName', emailNotificationFromName );
|
1547 |
+
|
1548 |
+
var emailNotificationFromNameField = this.el.querySelectorAll( '.form-email-notification-from-name-field' )[0].value;
|
1549 |
+
this.model.set( 'fromNameField', emailNotificationFromNameField );
|
1550 |
+
|
1551 |
+
var emailNotificationSubjectType = this.el.querySelectorAll( '.form-email-notification-subject-type' )[0].value;
|
1552 |
+
this.model.set( 'subjectType', emailNotificationSubjectType );
|
1553 |
+
|
1554 |
+
var emailNotificationSubject = this.el.querySelectorAll( '.form-email-notification-subject' )[0].value;
|
1555 |
+
this.model.set( 'subject', emailNotificationSubject );
|
1556 |
+
|
1557 |
+
var emailNotificationSubjectField = this.el.querySelectorAll( '.form-email-notification-subject-field' )[0].value;
|
1558 |
+
this.model.set( 'subjectField', emailNotificationSubjectField );
|
1559 |
+
|
1560 |
+
for ( var i = 0; i < this.addressViews.length; i++ ) {
|
1561 |
+
this.addressViews[i].save();
|
1562 |
+
}
|
1563 |
+
|
1564 |
+
return this;
|
1565 |
+
|
1566 |
+
},
|
1567 |
+
|
1568 |
+
render: function() {
|
1569 |
+
var context = {
|
1570 |
+
context: this.context,
|
1571 |
+
form: this.form.toJSON()
|
1572 |
+
};
|
1573 |
+
|
1574 |
+
if ( this.model ) {
|
1575 |
+
context.notification = this.model.toJSON();
|
1576 |
+
}
|
1577 |
+
|
1578 |
+
this.el.innerHTML = this.template( context );
|
1579 |
+
|
1580 |
+
if ( 'edit' === this.context) {
|
1581 |
+
this.toggleNotificationFields();
|
1582 |
+
this.updateFromFieldField();
|
1583 |
+
|
1584 |
+
var addressesContainer = this.el.querySelectorAll( '.addresses' )[0];
|
1585 |
+
var addresses = this.model.get( 'addresses' );
|
1586 |
+
|
1587 |
+
if ( addresses.length >= 1 ) {
|
1588 |
+
addresses.each( function( model ) {
|
1589 |
+
var address = new wp.ccf.views.FormNotificationAddress( { model: model, parent: this, notification: this.model, form: this.form } ).render();
|
1590 |
+
addressesContainer.appendChild( address.el );
|
1591 |
+
this.addressViews.push( address );
|
1592 |
+
}, this );
|
1593 |
+
} else {
|
1594 |
+
var newAddress = new wp.ccf.models.FormNotificationAddress();
|
1595 |
+
addresses.add( newAddress );
|
1596 |
+
}
|
1597 |
+
}
|
1598 |
+
|
1599 |
+
var fields = this.form.get( 'fields' );
|
1600 |
+
|
1601 |
+
this.listenTo( fields, 'add', this.updateFromFieldField, this );
|
1602 |
+
this.listenTo( fields, 'remove', this.updateFromFieldField, this );
|
1603 |
+
|
1604 |
+
return this;
|
1605 |
+
},
|
1606 |
+
|
1607 |
triggerDelete: function() {
|
1608 |
+
this.parent.deleteNotification( this );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1609 |
}
|
1610 |
}
|
1611 |
);
|
1851 |
this.model.set( 'value', value[0].value );
|
1852 |
}
|
1853 |
|
1854 |
+
var dateFormat = this.el.querySelectorAll( '.field-date-format' );
|
1855 |
+
if ( dateFormat.length ) {
|
1856 |
+
this.model.set( 'dateFormat', dateFormat[0].value );
|
1857 |
+
}
|
1858 |
+
|
1859 |
+
var oldShowDate = this.model.get( 'showDate' );
|
1860 |
+
var showDate = ( this.el.querySelectorAll( '.field-show-date' )[0].checked ) ? true : false;
|
1861 |
this.model.set( 'className', this.el.querySelectorAll( '.field-class-name' )[0].value );
|
1862 |
+
this.model.set( 'showDate', showDate );
|
1863 |
|
1864 |
var oldShowTime = this.model.get( 'showTime' );
|
1865 |
var showTime = ( this.el.querySelectorAll( '.field-show-time' )[0].checked ) ? true : false;
|
1867 |
this.model.set( 'showTime', showTime );
|
1868 |
this.model.set( 'required', ( this.el.querySelectorAll( '.field-required' )[0].value == 1 ) ? true : false );
|
1869 |
|
1870 |
+
if ( showTime != oldShowTime || showDate != oldShowDate ) {
|
1871 |
this.render();
|
1872 |
}
|
1873 |
|
2306 |
'change select': 'save',
|
2307 |
'change select.form-completion-action-type': 'toggleCompletionFields',
|
2308 |
'change select.form-pause': 'togglePauseFields',
|
2309 |
+
'click .add-notification': 'triggerAddNotification'
|
2310 |
},
|
2311 |
|
2312 |
+
notificationViews: [],
|
2313 |
+
|
2314 |
initialize: function( options ) {
|
2315 |
this.model = options.form;
|
2316 |
+
this.notificationViews = [];
|
2317 |
+
|
2318 |
+
var notifications = this.model.get( 'notifications' );
|
2319 |
+
this.listenTo( notifications, 'add', this.addNotification );
|
2320 |
},
|
2321 |
|
2322 |
+
triggerAddNotification: function() {
|
2323 |
+
var notifications = this.model.get( 'notifications' );
|
2324 |
+
|
2325 |
+
notifications.add( new wp.ccf.models.FormNotification() );
|
2326 |
+
},
|
2327 |
+
|
2328 |
+
closeAllNotifications: function() {
|
2329 |
+
_.each( this.notificationViews, function( view ) {
|
2330 |
+
view.changeContext( null, 'view' );
|
2331 |
+
} );
|
2332 |
+
},
|
2333 |
+
|
2334 |
+
addNotification: function( model ) {
|
2335 |
+
var view = new wp.ccf.views.ExistingFormNotificationRow( { model: model, form: this.model, context: 'edit', parent: this } ).render();
|
2336 |
+
var rowContainer = this.el.querySelectorAll( '.ccf-form-notifications .rows' )[0];
|
2337 |
+
|
2338 |
+
if ( rowContainer.querySelectorAll( '.no-notifications' ).length > 0 ) {
|
2339 |
+
rowContainer.removeChild( rowContainer.firstChild );
|
2340 |
+
}
|
2341 |
+
|
2342 |
+
_.each( this.notificationViews, function( view ) {
|
2343 |
+
view.changeContext( null, 'view' );
|
2344 |
+
} );
|
2345 |
+
|
2346 |
+
this.notificationViews.push( view );
|
2347 |
+
|
2348 |
+
rowContainer.appendChild( view.el );
|
2349 |
},
|
2350 |
|
2351 |
toggleCompletionFields: function() {
|
2375 |
}
|
2376 |
},
|
2377 |
|
2378 |
+
save: function() {
|
|
|
|
|
2379 |
if ( this.el.innerHTML === '' ) {
|
2380 |
// @todo: for some reason this is needed for IE8
|
2381 |
return;
|
2404 |
|
2405 |
var completionActionType = this.el.querySelectorAll( '.form-completion-action-type' )[0].value;
|
2406 |
this.model.set( 'completionActionType', completionActionType );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2407 |
},
|
2408 |
|
2409 |
+
fullSave: function( $promise ) {
|
|
|
|
|
2410 |
if ( this.el.innerHTML === '' ) {
|
2411 |
// @todo: for some reason this is needed for IE8
|
2412 |
return;
|
2413 |
}
|
2414 |
|
2415 |
+
this.save();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2416 |
|
2417 |
+
_.each( this.notificationViews, function( view ) {
|
2418 |
+
view.save();
|
2419 |
+
} );
|
2420 |
|
2421 |
+
if ( typeof $promise !== 'undefined' && typeof $promise.promise !== 'undefined' ) {
|
2422 |
+
$promise.resolve();
|
2423 |
+
}
|
2424 |
+
},
|
2425 |
|
2426 |
+
destroy: function() {
|
2427 |
+
wp.ccf.dispatcher.off( 'saveFormSettings', this.fullSave );
|
2428 |
+
wp.ccf.dispatcher.off( 'mainViewChange', this.fullSave );
|
2429 |
+
},
|
2430 |
|
2431 |
+
deleteNotification: function( view ) {
|
2432 |
+
_.each( this.notificationViews, function( currentView ) {
|
2433 |
+
if ( view.cid === currentView.cid ) {
|
2434 |
+
var index = _.indexOf( this.notificationViews, currentView );
|
2435 |
+
this.model.get( 'notifications' ).remove( view.model );
|
2436 |
+
this.notificationViews[index].remove();
|
2437 |
+
this.notificationViews.splice( index, 1 );
|
2438 |
+
}
|
2439 |
+
}, this );
|
2440 |
|
2441 |
+
if ( ! this.notificationViews.length ) {
|
2442 |
+
var rowContainer = this.el.querySelectorAll( '.ccf-form-notifications .rows' )[0];
|
2443 |
+
rowContainer.appendChild( new wp.ccf.views.EmptyFormNotificationTableRow( { form: this.model } ).render().el );
|
2444 |
}
|
2445 |
},
|
2446 |
|
2450 |
};
|
2451 |
|
2452 |
var fields = this.model.get( 'fields' );
|
2453 |
+
var notifications = this.model.get( 'notifications' );
|
2454 |
|
2455 |
this.el.innerHTML = this.template( context );
|
2456 |
|
2457 |
+
this.toggleCompletionFields();
|
|
|
2458 |
|
2459 |
+
this.togglePauseFields();
|
2460 |
+
|
2461 |
+
var rowContainer = this.el.querySelectorAll( '.ccf-form-notifications .rows' )[0];
|
2462 |
+
var newRowContainer = document.createElement( 'tbody');
|
2463 |
+
|
2464 |
+
newRowContainer.className = 'rows';
|
2465 |
+
|
2466 |
+
if ( notifications.length >= 1 ) {
|
2467 |
+
notifications.each( function( model ) {
|
2468 |
+
var row = new wp.ccf.views.ExistingFormNotificationRow( { model: model, form: this.model, parent: this } ).render();
|
2469 |
+
newRowContainer.appendChild( row.el );
|
2470 |
+
this.notificationViews.push( row );
|
2471 |
+
}, this );
|
2472 |
+
} else {
|
2473 |
+
newRowContainer.appendChild( new wp.ccf.views.EmptyFormNotificationTableRow( { form: this.model } ).render().el );
|
2474 |
+
}
|
2475 |
+
|
2476 |
+
rowContainer.parentNode.replaceChild( newRowContainer, rowContainer );
|
2477 |
+
|
2478 |
+
wp.ccf.dispatcher.on( 'mainViewChange', this.fullSave, this );
|
2479 |
+
wp.ccf.dispatcher.on( 'saveFormSettings', this.fullSave, this );
|
2480 |
|
2481 |
return this;
|
2482 |
}
|
2488 |
template: wp.ccf.utils.template( 'ccf-form-pane-template' ),
|
2489 |
subViews: {
|
2490 |
'field-sidebar': wp.ccf.views.FieldSidebar,
|
2491 |
+
'form-settings': wp.ccf.views.FormSettings
|
|
|
2492 |
},
|
2493 |
|
2494 |
events: {
|
2495 |
'click .save-button': 'sync',
|
2496 |
'click .signup-button': 'signup',
|
2497 |
'click .accordion-heading': 'accordionClick',
|
2498 |
+
'click .form-settings-heading': 'accordionClick',
|
2499 |
'click .insert-form-button': 'insertForm'
|
2500 |
},
|
2501 |
|
2546 |
section.className = section.className.replace( /expanded/i, '' );
|
2547 |
}
|
2548 |
});
|
2549 |
+
|
2550 |
+
if ( event.currentTarget.className.match( /form-settings-heading/i ) ) {
|
2551 |
+
if ( this.el.className.match( /show-form-settings/i ) ) {
|
2552 |
+
this.el.className = this.el.className.replace( /show-form-settings/i, '' );
|
2553 |
+
} else {
|
2554 |
+
this.el.className += ' show-form-settings';
|
2555 |
+
}
|
2556 |
+
} else {
|
2557 |
+
this.el.className = this.el.className.replace( /show-form-settings/i, '' );
|
2558 |
+
}
|
2559 |
},
|
2560 |
|
2561 |
openEditField: function( field ) {
|
2581 |
|
2582 |
var $settings = $.Deferred();
|
2583 |
var $field = $.Deferred();
|
|
|
2584 |
|
2585 |
wp.ccf.dispatcher.trigger( 'saveFormSettings', $settings );
|
|
|
2586 |
wp.ccf.dispatcher.trigger( 'saveField', $field );
|
2587 |
|
2588 |
+
$.when( $settings, $field ).then( function() {
|
2589 |
var fields = SELF.model.get( 'fields' );
|
2590 |
var allReqsMet = true;
|
2591 |
var slugs = {};
|
2688 |
|
2689 |
SELF.el.innerHTML = this.template( context );
|
2690 |
|
2691 |
+
SELF.el.className = SELF.el.className.replace( /show-form-settings/i, '' );
|
2692 |
+
|
2693 |
var fields = SELF.el.querySelectorAll( '.fields' )[0];
|
2694 |
|
2695 |
_.each( ccfSettings.fieldLabels, function( label, type ) {
|
2766 |
|
2767 |
});
|
2768 |
|
2769 |
+
SELF.initRenderSubViews( false, true, { form: SELF.model } );
|
2770 |
|
2771 |
SELF.enableDisableInsert();
|
2772 |
|
3316 |
}
|
3317 |
);
|
3318 |
})( jQuery, Backbone, _, ccfSettings );
|
3319 |
+
|
3320 |
( function( $, Backbone, _, ccfSettings ) {
|
3321 |
'use strict';
|
3322 |
|
build/js/form-manager.min.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
(function(e,t,i,l){"use strict";window.wp=window.wp||{},wp.ccf=wp.ccf||{},wp.ccf.utils=wp.ccf.utils||{},wp.ccf.utils.cleanDateFields=function(e){delete e.date,delete e.date_gmt,delete e.modified,delete e.modified_gmt,delete e.date_tz,delete e.modified_tz},wp.ccf.utils.template=i.memoize(function(e){var t={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g};return i.template(document.getElementById(e).innerHTML,null,t)}),wp.ccf.utils.insertFormShortcode=function(e){var t=wp.ccf.forms.findWhere({id:e.get("id")});t||wp.ccf.forms.add(e);var i=tinymce.get(wpActiveEditor),l='[ccf_form id="'+e.get("id")+'"]';i&&!i.isHidden()?tinymce.activeEditor.execCommand("mceInsertContent",!1,l):document.getElementById(wpActiveEditor).value+=l},wp.ccf.utils.getPrettyPostDate=function(e){return e=moment.utc(e),l.gmtOffset&&(e=e.utcOffset(60*parseInt(l.gmtOffset))),e.format("h:mm a M/D/YYYY")},wp.ccf.utils.wordChop=function(e,t){var i=e.substr(0,t);return i.substr(0,Math.min(i.length,i.lastIndexOf(" "))),i.length<e.length&&(i+="..."),i},wp.ccf.utils.isFieldDate=function(e){return e.date!==void 0||e.hour!==void 0&&e.minute!==void 0&&e["am-pm"]!==void 0?!0:!1},wp.ccf.utils.isFieldName=function(e){return e.name!==void 0||e.last!==void 0?!0:!1},wp.ccf.utils.isFieldEmailConfirm=function(e){return e.email!==void 0||e.confirm!==void 0?!0:!1},wp.ccf.utils.isFieldAddress=function(e){return e.street!==void 0&&e.city!==void 0&&e.zipcode!==void 0&&e.line_two!==void 0?!0:!1},wp.ccf.utils.isFieldFile=function(e){return e.id!==void 0&&e.url!==void 0&&e.file_name!==void 0?!0:!1},wp.ccf.utils.getPrettyFieldEmailConfirm=function(e){return e.email?e.email:e.confirm?e.confirm:"-"},wp.ccf.utils.getPrettyFieldDate=function(e){var t="",i="";if(e.hour&&e.minute&&e["am-pm"]&&(t+=e.hour+":"+e.minute+" "+e["am-pm"]),e.date&&(t+=" "+e.date),!t)return"-";var s=moment.utc(t);return s.isValid()?(e.hour&&e.minute&&e["am-pm"]&&(i+=s.format("h:mm a")),e.date&&(i&&(i+=" "),i+=s.format("M/D/YYYY")),i):l.invalidDate},wp.ccf.utils.getPrettyFieldName=function(e){var t=e.first;return t.length>0&&(t+=" "),e.last&&(t+=e.last),t||(t="-"),t},wp.ccf.utils.getPrettyFieldAddress=function(e){if(!e.street||!e.city)return"-";var t=e.street;return e.line_two&&(t+=" "+e.line_two),t+=", "+e.city,e.state&&(t+=", "+e.state),e.zipcode&&(t+=" "+e.zipcode),e.country&&(t+=" "+e.country),t}})(jQuery,Backbone,_,ccfSettings),function(e,t,i){"use strict";wp.ccf.mixins=wp.ccf.mixins||{},wp.ccf.mixins.subViewable=wp.ccf.mixins.subViewable||{subViews:{},initRenderSubViews:function(e,t,l){this.renderedSubViews||(this.renderedSubViews={});for(var s in this.subViews){var c={el:this.$el.find(".ccf-"+s),parent:this};l&&i.extend(c,l),this.renderedSubViews[s]&&this.renderedSubViews[s].destroy&&this.renderedSubViews[s].destroy(),(t||!this.renderedSubViews[s])&&(this.renderedSubViews[s]=new this.subViews[s](c)),this.renderedSubViews[s].render(),e&&(this.renderedSubViews[s].el.style.display="block")}return this},showView:function(e,t,i){if(this.renderedSubViews!==void 0&&this.renderedSubViews[e]!==void 0){var l=this.renderedSubViews[e];i||l.render(t),l.el.style.display="block",this.currentView=e;for(var s in this.subViews)s!==e&&(this.renderedSubViews[s].el.style.display="none")}}}}(jQuery,Backbone,_,ccfSettings),function(e,t,i,l,s){"use strict";wp.ccf.models=wp.ccf.models||{},wp.ccf.models.Fields=wp.ccf.models.Fields||{};var c=function(e,i,l){return"object"!=typeof i&&""===i&&(i=""),t.Model.prototype.set.call(this,e,i,l)},r=function(e,t,i){return i=i||{},i.emulateHTTP=!0,this.constructor.__super__.sync.call(this,e,t,i)},o=function(e){for(var t in this.attributes)if(-1===i.indexOf(e,t)){var l=this.get(t);"string"==typeof l&&""!==l&&(l=(l+"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/“/g,"”").replace(/”/g,"”").replace(/‘/g,"‘").replace(/&/g,"&").replace(/'/g,"'"),this.set(t,l))}return this};wp.ccf.models.FieldChoice=wp.ccf.models.FieldChoice||t.Model.extend({defaults:{label:"",value:"",selected:!1},decode:function(){return o.call(this,[])},set:c}),wp.ccf.models.Form=wp.ccf.models.Form||wp.api.models.Post.extend({urlRoot:s.root.replace(/\/$/,"")+"/ccf/v1/forms",set:c,sync:r,idAttribute:"id",initialize:function(){this.on("sync",this.decode,this)},defaults:function(){var e={fields:new wp.ccf.collections.Fields,type:"ccf_form",status:"publish",description:"",buttonText:"Submit Form",completionActionType:"text",completionRedirectUrl:"",completionMessage:"",sendEmailNotifications:!1,emailNotificationAddresses:l.adminEmail,emailNotificationFromType:"default",emailNotificationFromAddress:"",emailNotificationFromField:"",emailNotificationSubjectType:"default",emailNotificationSubject:"",emailNotificationSubjectField:"",emailNotificationFromNameType:"custom",emailNotificationFromName:"WordPress",emailNotificationFromNameField:"",pause:!1,pauseMessage:l.pauseMessage};return e=i.defaults(e,this.constructor.__super__.defaults),wp.ccf.utils.cleanDateFields(e),e},decode:function(){var e=i.keys(wp.api.models.Post.prototype.defaults);return e=i.without(e,"title"),o.call(this,e)},getFieldSlugs:function(e){var t=wp.ccf.currentForm.get("fields"),i=[];return t.each(function(t){e&&t.isImmutable||i.push(t.get("slug"))}),i},parse:function(e){var t=this;if(e.fields){var l=t.get("fields");if(l&&l.length>0){for(var s=0;e.fields.length>s;s++){var c=e.fields[s],r=l.findWhere({slug:c.slug});if(r){if(c.choices!==void 0){var o=t.get("choices");if(o&&o.length>0)for(var n=0;c.choices>n;n++){var a=o.at(n);a.set(c.choices[n]),a.decode()}delete e.fields[s].choices}r.set(c),r.decode()}}delete e.fields}else{var d=[];i.each(e.fields,function(e){var t=new wp.ccf.models.Fields[e.type](e);t.decode(),d.push(t)}),e.fields=new wp.ccf.collections.Fields(d,{formId:e.id})}}return this.constructor.__super__.parse.call(this,e)},toJSON:function(){var e=this.constructor.__super__.toJSON.call(this);return e.fields&&(e.fields=e.fields.toJSON()),e.author&&(e.author=e.author.toJSON()),e}}),wp.ccf.models.Submission=wp.api.models.Submission||wp.api.models.Post.extend({defaults:{id:null,data:{}},sync:r,urlRoot:s.root.replace(/\/$/,"")+"/ccf/v1/submissions"}),wp.ccf.models.Field=wp.api.models.Field||wp.api.models.Post.extend({idAttribute:"id",defaults:{id:null},set:c,required:function(){return["slug"]},decode:function(){return o.call(this,i.keys(wp.api.models.Post.prototype.defaults))},hasRequiredAttributes:function(){var e=this,t=!0;return i.each(this.required(),function(i){(e.get(i)===void 0||""===e.get(i))&&(t=!1)}),t},sync:r}),wp.ccf.models.StandardField=wp.ccf.models.StandardField||wp.ccf.models.Field.extend({idAttribute:"id",defaults:function(){var e={label:l.fieldLabel,value:"",placeholder:"",slug:"",type:"",required:!1,className:"",description:""};return i.defaults(e,this.constructor.__super__.defaults)}}),wp.ccf.models.Fields["single-line-text"]=wp.ccf.models.Fields["single-line-text"]||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"single-line-text"};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.file=wp.ccf.models.Fields.file||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"file",fileExtensions:"",maxFileSize:l.maxFileSize};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields["paragraph-text"]=wp.ccf.models.Fields["paragraph-text"]||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"paragraph-text"};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.hidden=wp.ccf.models.Fields.hidden||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"hidden"};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.email=wp.ccf.models.Fields.email||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"email",emailConfirmation:!1};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.website=wp.ccf.models.Fields.website||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"website",placeholder:"http://"};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.phone=wp.ccf.models.Fields.phone||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"phone",phoneFormat:"us"};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.date=wp.ccf.models.Fields.date||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"date",showDate:!0,showTime:!0};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.name=wp.ccf.models.Fields.name||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"name"};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.recaptcha=wp.ccf.models.Fields.recaptcha||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"recaptcha",siteKey:"",secretKey:""};return i.defaults(e,this.constructor.__super__.defaults())},required:function(){return["siteKey","secretKey"]},isImmutable:!0}),wp.ccf.models.Fields.address=wp.ccf.models.Fields.address||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"address",addressType:"us"};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields["section-header"]=wp.ccf.models.Fields["section-header"]||wp.ccf.models.Field.extend({defaults:function(){var e={type:"section-header",slug:"",heading:"",subheading:"",className:""};return i.defaults(e,this.constructor.__super__.defaults)},required:function(){return[]},isImmutable:!0}),wp.ccf.models.Fields.html=wp.ccf.models.Fields.html||wp.ccf.models.Field.extend({defaults:function(){var e={type:"html",slug:"",html:"",className:""};return i.defaults(e,this.constructor.__super__.defaults)},required:function(){return[]},isImmutable:!0}),wp.ccf.models.ChoiceableField=wp.ccf.models.ChoiceableField||wp.ccf.models.StandardField.extend({defaults:function(){var e={choices:new wp.ccf.collections.FieldChoices};return i.defaults(e,this.constructor.__super__.defaults())},initialize:function(e){if("object"==typeof e&&e.choices){var t=[];i.each(e.choices,function(e){var i=new wp.ccf.models.FieldChoice(e);i.decode(),t.push(i)}),this.set("choices",new wp.ccf.collections.FieldChoices(t))}}}),wp.ccf.models.Fields.radio=wp.ccf.models.Fields.radio||wp.ccf.models.ChoiceableField.extend({defaults:function(){var e={type:"radio"};return i.defaults(e,this.constructor.__super__.defaults())},initialize:function(){return this.constructor.__super__.initialize.apply(this,arguments)}}),wp.ccf.models.Fields.checkboxes=wp.ccf.models.Fields.checkboxes||wp.ccf.models.ChoiceableField.extend({defaults:function(){var e={type:"checkboxes"};return i.defaults(e,this.constructor.__super__.defaults())},initialize:function(){return this.constructor.__super__.initialize.apply(this,arguments)}}),wp.ccf.models.Fields.dropdown=wp.ccf.models.Fields.dropdown||wp.ccf.models.ChoiceableField.extend({defaults:function(){var e={type:"dropdown"};return i.defaults(e,this.constructor.__super__.defaults())},initialize:function(){return this.constructor.__super__.initialize.apply(this,arguments)}})}(jQuery,Backbone,_,ccfSettings,WP_API_Settings),function(e,t,i){"use strict";var l=function(e,t,i){return i=i||{},i.emulateHTTP=!0,this.constructor.__super__.sync.call(this,e,t,i)};wp.ccf.collections=wp.ccf.collections||{},wp.ccf.collections.Forms=wp.ccf.collections.Forms||wp.api.collections.Posts.extend({model:wp.ccf.models.Form,url:WP_API_Settings.root.replace(/\/$/,"")+"/ccf/v1/forms",formsFetching:{},initialize:function(){this.constructor.__super__.initialize(),this.formsFetching={}},sync:l,remove:function(e,t){t=t||{};var l=this.constructor.__super__.remove.call(this,e,t);return t.destroy&&(e instanceof Array?i.each(e,function(e){e.destroy()}):e.destroy()),l}}),wp.ccf.collections.Fields=wp.ccf.collections.Fields||wp.api.collections.Posts.extend({model:wp.ccf.models.Field,url:function(){return WP_API_Settings.root+"/ccf/forms/"+this.formId+"/fields"},initialize:function(e,t){t&&t.formId&&(this.formId=t.formId)},sync:l}),wp.ccf.collections.Submissions=wp.ccf.collections.Submissions||wp.api.collections.Posts.extend({model:wp.ccf.models.Submission,url:function(){return WP_API_Settings.root.replace(/\/$/,"")+"/ccf/v1/forms/"+this.formId+"/submissions"},initialize:function(e,t){this.constructor.__super__.initialize.apply(this,arguments),t&&t.formId&&(this.formId=t.formId)},sync:l}),wp.ccf.collections.FieldChoices=wp.ccf.collections.FieldChoices||t.Collection.extend({model:wp.ccf.models.FieldChoice})}(jQuery,Backbone,_,ccfSettings),function(e,t,i,l){"use strict";wp.ccf.views=wp.ccf.views||{},wp.ccf.views.Fields=wp.ccf.views.Fields||{},wp.ccf.views.FieldChoice=t.View.extend({template:wp.ccf.utils.template("ccf-field-choice-template"),className:"choice",events:{"click .add":"triggerAdd","click .delete":"triggerDelete","blur input":"saveChoice",saveChoice:"saveChoice",sorted:"triggerUpdateSort"},initialize:function(e){this.field=e.field},destroy:function(){wp.ccf.dispatcher.off("mainViewChange",this.saveChoice),this.unbind()},triggerUpdateSort:function(e,t){this.field.get("choices").remove(this.model,{silent:!0}),this.field.get("choices").add(this.model,{at:t,silent:!0})},saveChoice:function(){if(""!==this.el.innerHTML){var e=this.el.querySelectorAll(".choice-label")[0].value,t=this.el.querySelectorAll(".choice-value")[0].value;this.model.set("label",e),this.model.set("value",t);var i=this.el.querySelectorAll(".choice-selected")[0],l=i.checked?!0:!1;return this.model.set("selected",l),this}},render:function(){var e={};return this.model&&(e.choice=this.model.toJSON()),this.el.innerHTML=this.template(e),wp.ccf.dispatcher.on("mainViewChange",this.saveChoice,this),this},triggerAdd:function(){this.field.get("choices").add(new wp.ccf.models.FieldChoice)},triggerDelete:function(){var e=this.field.get("choices");if(e.length>1)e.remove(this.model),this.destroy(),this.remove();else{for(var t=this.el.querySelectorAll(".choice-label, .choice-value"),i=this.el.querySelectorAll(".choice-selected"),l=0;t.length>l;l++)t[l].value="";i[0].checked=!1}}}),wp.ccf.views.FieldBase=wp.ccf.views.FieldBase||t.View.extend({events:{"blur input":"saveField","blur input.field-slug":"checkSlug","blur textarea":"saveField","change select":"saveField",'change input[type="checkbox"]':"saveField"},checkSlug:function(){var e=this.el.querySelectorAll(".field-slug");if(e.length>0){var t=e[0],i=!1;t.parentNode.className=t.value&&!t.value.match(/^[a-zA-Z0-9\-_]+$/)?t.parentNode.className.replace(/ field-error/i,"")+" field-error":t.parentNode.className.replace(/ field-error/i,""),this.collection.length>0&&""!==t.value?(this.collection.each(function(e){e!==this.model&&t.value===e.get("slug")&&(i=!0)},this),t.parentNode.className=i?t.parentNode.className.replace(/ field-duplicate-slug/i,"")+" field-duplicate-slug":t.parentNode.className.replace(/ field-duplicate-slug/i,"")):t.parentNode.className=t.parentNode.className.replace(/ field-duplicate-slug/i,"")}},destroy:function(){this.unbind()},render:function(){return this.el.innerHTML=this.template({field:this.model.toJSON()}),this.checkSlug(),this}}),wp.ccf.views.Fields["single-line-text"]=wp.ccf.views.Fields["single-line-text"]||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-single-line-text-template"),initialize:function(){},saveField:function(){return""!==this.el.innerHTML?(this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("description",this.el.querySelectorAll(".field-description")[0].value),this.model.set("value",this.el.querySelectorAll(".field-value")[0].value),this.model.set("placeholder",this.el.querySelectorAll(".field-placeholder")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1),this):void 0}}),wp.ccf.views.Fields.file=wp.ccf.views.Fields.file||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-file-template"),initialize:function(){},saveField:function(){return""!==this.el.innerHTML?(this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("description",this.el.querySelectorAll(".field-description")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1),this.model.set("fileExtensions",this.el.querySelectorAll(".field-file-extensions")[0].value),this.model.set("maxFileSize",this.el.querySelectorAll(".field-max-file-size")[0].value),this):void 0}}),wp.ccf.views.Fields.recaptcha=wp.ccf.views.Fields.recaptcha||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-recaptcha-template"),initialize:function(){},saveField:function(){return""!==this.el.innerHTML?(this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("description",this.el.querySelectorAll(".field-description")[0].value),this.model.set("siteKey",this.el.querySelectorAll(".field-site-key")[0].value),this.model.set("secretKey",this.el.querySelectorAll(".field-secret-key")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this):void 0}}),wp.ccf.views.Fields["section-header"]=wp.ccf.views.Fields["section-header"]||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-section-header-template"),initialize:function(){},saveField:function(){return""!==this.el.innerHTML?(this.model.set("heading",this.el.querySelectorAll(".field-heading")[0].value),this.model.set("subheading",this.el.querySelectorAll(".field-subheading")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this):void 0}}),wp.ccf.views.Fields.html=wp.ccf.views.Fields.html||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-html-template"),initialize:function(){},saveField:function(){return""!==this.el.innerHTML?(this.model.set("html",this.el.querySelectorAll(".field-html")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this):void 0}}),wp.ccf.views.Fields["paragraph-text"]=wp.ccf.views.Fields["paragraph-text"]||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-paragraph-text-template"),saveField:function(){return""!==this.el.innerHTML?(this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("description",this.el.querySelectorAll(".field-description")[0].value),this.model.set("value",this.el.querySelectorAll(".field-value")[0].value),this.model.set("placeholder",this.el.querySelectorAll(".field-placeholder")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1),this):void 0}}),wp.ccf.views.Fields.hidden=wp.ccf.views.Fields.hidden||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-hidden-template"),saveField:function(){return""!==this.el.innerHTML?(this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("value",this.el.querySelectorAll(".field-value")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this):void 0}}),wp.ccf.views.Fields.date=wp.ccf.views.Fields.date||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-date-template"),saveField:function(){if(""!==this.el.innerHTML){this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("description",this.el.querySelectorAll(".field-description")[0].value);var e=this.el.querySelectorAll(".field-value");e.length>0&&this.model.set("value",e[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("showDate",this.el.querySelectorAll(".field-show-date")[0].checked?!0:!1);var t=this.model.get("showTime"),i=this.el.querySelectorAll(".field-show-time")[0].checked?!0:!1;return this.model.set("showTime",i),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1),i!=t&&this.render(),this}}}),wp.ccf.views.Fields.name=wp.ccf.views.Fields.name||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-name-template"),saveField:function(){return""!==this.el.innerHTML?(this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("description",this.el.querySelectorAll(".field-description")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1),this):void 0}}),wp.ccf.views.Fields.website=wp.ccf.views.Fields.website||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-website-template"),saveField:function(){return""!==this.el.innerHTML?(this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("description",this.el.querySelectorAll(".field-description")[0].value),this.model.set("value",this.el.querySelectorAll(".field-value")[0].value),this.model.set("placeholder",this.el.querySelectorAll(".field-placeholder")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1),this):void 0}}),wp.ccf.views.Fields.phone=wp.ccf.views.Fields.phone||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-phone-template"),saveField:function(){return""!==this.el.innerHTML?(this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("description",this.el.querySelectorAll(".field-description")[0].value),this.model.set("value",this.el.querySelectorAll(".field-value")[0].value),this.model.set("placeholder",this.el.querySelectorAll(".field-placeholder")[0].value),this.model.set("phoneFormat",this.el.querySelectorAll(".field-phone-format")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1),this):void 0}}),wp.ccf.views.Fields.address=wp.ccf.views.Fields.address||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-address-template"),saveField:function(){return""!==this.el.innerHTML?(this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("description",this.el.querySelectorAll(".field-description")[0].value),this.model.set("addressType",this.el.querySelectorAll(".field-address-type")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1),this):void 0}}),wp.ccf.views.Fields.email=wp.ccf.views.Fields.email||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-email-template"),saveField:function(){if(""!==this.el.innerHTML){this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("description",this.el.querySelectorAll(".field-description")[0].value);var e=this.el.querySelectorAll(".field-value");e.length&&this.model.set("value",e[0].value);var t=this.el.querySelectorAll(".field-placeholder");t.length&&this.model.set("placeholder",t[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1);var i=1==this.el.querySelectorAll(".field-email-confirmation")[0].value?!0:!1,l=this.model.get("emailConfirmation");return this.model.set("emailConfirmation",i),l!=i&&this.render(),this}}}),wp.ccf.views.ChoiceableField=wp.ccf.views.ChoiceableField||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-dropdown-template"),initialize:function(){var e=this.model.get("choices");this.listenTo(e,"add",this.addChoice)},addChoice:function(e){var t=new wp.ccf.views.FieldChoice({model:e,field:this.model}).render(),i=this.el.querySelectorAll(".repeatable-choices")[0];i.appendChild(t.el)},saveField:function(){if(""!==this.el.innerHTML){this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("description",this.el.querySelectorAll(".field-description")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1);var t=this.el.querySelectorAll(".repeatable-choices")[0].querySelectorAll(".choice");return i.each(t,function(t){e(t).trigger("saveChoice")}),this}},render:function(){var t=this;t.el.innerHTML=t.template({field:t.model.toJSON()}),t.checkSlug();var i=t.model.get("choices"),l=this.el.querySelectorAll(".repeatable-choices")[0];if(i.length>=1)i.each(function(e){var i=new wp.ccf.views.FieldChoice({model:e,field:t.model}).render();l.appendChild(i.el)});else{var s=new wp.ccf.models.FieldChoice;i.add(s)}return l=this.el.querySelectorAll(".repeatable-choices")[0],e(l).sortable({handle:".move",axis:"y",stop:function(e,t){t.item.trigger("sorted",t.item.index())}}),t}}),wp.ccf.views.Fields.dropdown=wp.ccf.views.Fields.dropdown||wp.ccf.views.ChoiceableField.extend({template:wp.ccf.utils.template("ccf-dropdown-template"),events:function(){return this.constructor.__super__.events}}),wp.ccf.views.Fields.radio=wp.ccf.views.Fields.radio||wp.ccf.views.ChoiceableField.extend({template:wp.ccf.utils.template("ccf-radio-template"),events:function(){return this.constructor.__super__.events}}),wp.ccf.views.Fields.checkboxes=wp.ccf.views.Fields.checkboxes||wp.ccf.views.ChoiceableField.extend({template:wp.ccf.utils.template("ccf-checkboxes-template"),events:function(){return this.constructor.__super__.events}}),wp.ccf.views.FieldSidebar=wp.ccf.views.FieldSidebar||t.View.extend({initialize:function(e){this.currentFieldView=null,this.form=e.form},save:function(e){this.currentFieldView&&""!==this.currentFieldView.el.innerHTML&&this.currentFieldView.saveField(),e&&e instanceof Object&&e.resolve()},fieldRemoved:function(){this.currentFieldView&&(this.form.get("fields").get(this.currentFieldView.model)||this.render())},destroy:function(){wp.ccf.dispatcher.off("saveField",this.save),wp.ccf.dispatcher.off("mainViewChange",this.save),this.unbind()},render:function(e){var t={};if(e){var i=e.get("type");this.currentFieldView&&(this.currentFieldView.saveField(),this.currentFieldView.destroy&&this.currentFieldView.destroy()),this.currentFieldView=new wp.ccf.views.Fields[i]({model:e,collection:this.form.get("fields")}),this.currentFieldView.render(),this.el.innerHTML="",this.el.appendChild(this.currentFieldView.el);var l=this.form.get("fields");this.listenTo(l,"remove",this.fieldRemoved)}else{var s=wp.ccf.utils.template("ccf-empty-field-template");this.el.innerHTML=s(t)}return wp.ccf.dispatcher.on("saveField",this.save,this),wp.ccf.dispatcher.on("mainViewChange",this.save,this),this}}),wp.ccf.views.FieldRowPlaceholder=wp.ccf.views.FieldRowPlaceholder||t.View.extend({template:wp.ccf.utils.template("ccf-field-row-template"),tagName:"div",className:"field",initialize:function(e){this.type=e.type},render:function(){return this.el.innerHTML=this.template({label:l.allLabels[this.type]}),this.el.setAttribute("data-field-type",this.type),this.el.className+=" "+this.type,this}}),wp.ccf.views.FieldRow=wp.ccf.views.FieldRow||t.View.extend({template:wp.ccf.utils.template("ccf-field-row-template"),tagName:"div",className:"field",events:{"click .delete":"triggerDelete","click h4":"triggerEdit",sorted:"triggerUpdateSort"},initialize:function(e){i.bindAll(this,"triggerDelete"),this.form=e.form,this.listenTo(this.model,"change",this.handleChange,this),this.listenTo(this.model,"requirementsNotMet",this.requirementsNotMet,this),this.listenTo(this.model,"requirementsMet",this.requirementsMet,this),this.listenTo(this.model,"duplicateSlug",this.duplicateSlug,this),this.model.attributes.choices&&this.listenTo(this.model.attributes.choices,"change",this.handleChange,this)},duplicateSlug:function(){this.requirementsMet(),this.el.className+=" field-duplicate-slug"},requirementsNotMet:function(){this.requirementsMet(),this.el.className+=" field-incomplete"},requirementsMet:function(){this.el.className=this.el.className.replace(/(field-incomplete|field-duplicate-slug)/i,"")},triggerUpdateSort:function(e,t){this.form.get("fields").remove(this.model),this.form.get("fields").add(this.model,{at:t})},handleChange:function(){this.render()},triggerDelete:function(e){e.stopPropagation(),this.form.get("fields").remove(this.model),this.undelegateEvents(),this.remove()},triggerEdit:function(){var e=this.el.parentNode.querySelectorAll(".ccf-editing");i.each(e,function(e){e.className=e.className.replace(/ccf-editing/i,"")}),this.el.className=this.el.className.replace(/ccf-editing/i,"")+" ccf-editing",wp.ccf.dispatcher.trigger("openEditField",this.model)},render:function(e){this.el.innerHTML=this.template({label:l.allLabels[this.model.get("type")]}),this.el.setAttribute("data-field-type",this.model.get("type"));var t=RegExp(" "+this.model.get("type"),"i");this.el.className=this.el.className.replace(t,"")+" "+this.model.get("type"),e&&(this.el.className=this.el.className.replace(/ instantiated/i,"")+" instantiated");var i=document.getElementById("ccf-"+this.model.get("type")+"-preview-template");if(i){var s=this.el.querySelectorAll(".preview")[0];s.style.display="block",s.innerHTML=wp.ccf.utils.template("ccf-"+this.model.get("type")+"-preview-template")({field:this.model.toJSON()})}return this}}),wp.ccf.views.FormSettings=wp.ccf.views.FormSettings||t.View.extend({template:wp.ccf.utils.template("ccf-form-settings-template"),events:{"blur input":"save","change select":"save","change select.form-completion-action-type":"toggleCompletionFields","change select.form-pause":"togglePauseFields","change select.form-send-email-notifications":"toggleNotificationFields"},initialize:function(e){this.model=e.form},destroy:function(){wp.ccf.dispatcher.off("saveFormSettings",this.save),wp.ccf.dispatcher.off("mainViewChange",this.save)},toggleCompletionFields:function(){var e=this.el.querySelectorAll(".form-completion-action-type")[0].value,t=this.el.querySelectorAll(".completion-message")[0],i=this.el.querySelectorAll(".completion-redirect-url")[0];"text"===e?(t.style.display="block",i.style.display="none"):(t.style.display="none",i.style.display="block")},togglePauseFields:function(){var e=this.el.querySelectorAll(".form-pause")[0].value,t=this.el.querySelectorAll(".pause-message")[0];t.style.display=parseInt(e)?"block":"none"},save:function(e){if(""!==this.el.innerHTML){var t=this.el.querySelectorAll(".form-title")[0].value;this.model.set("title",{raw:t});var i=this.el.querySelectorAll(".form-description")[0].value;this.model.set("description",i);var l=this.el.querySelectorAll(".form-button-text")[0].value;this.model.set("buttonText",l);var s=this.el.querySelectorAll(".form-pause")[0].value;this.model.set("pause",parseInt(s)?!0:!1);var c=this.el.querySelectorAll(".form-pause-message")[0].value;
|
2 |
-
this.model.set("pauseMessage",c);var r=this.el.querySelectorAll(".form-completion-message")[0].value;this.model.set("completionMessage",r);var o=this.el.querySelectorAll(".form-completion-redirect-url")[0].value;this.model.set("completionRedirectUrl",o);var n=this.el.querySelectorAll(".form-completion-action-type")[0].value;this.model.set("completionActionType",n),e!==void 0&&e.promise!==void 0&&e.resolve()}},render:function(){var e={form:this.model.toJSON()};return this.el.innerHTML=this.template(e),this.toggleCompletionFields(),this.togglePauseFields(),wp.ccf.dispatcher.on("saveFormSettings",this.save,this),wp.ccf.dispatcher.on("mainViewChange",this.save,this),this}}),wp.ccf.views.FormNotifications=wp.ccf.views.FormNotifications||t.View.extend({template:wp.ccf.utils.template("ccf-form-notifications-template"),events:{"blur input":"save","change select":"save","change select.form-send-email-notifications":"toggleNotificationFields","change select.form-email-notification-from-type":"toggleNotificationFields","change select.form-email-notification-from-name-type":"toggleNotificationFields","change select.form-email-notification-subject-type":"toggleNotificationFields"},initialize:function(e){this.model=e.form},destroy:function(){wp.ccf.dispatcher.off("saveFormNotifications",this.save),wp.ccf.dispatcher.off("mainViewChange",this.save),this.undelegateEvents(),this.unbind()},updateFromFieldField:function(){var e=this.el.querySelectorAll(".form-email-notification-from-field")[0];e.innerHTML="",e.disabled=!1;var t=this.el.querySelectorAll(".form-email-notification-subject-field")[0];t.innerHTML="",t.disabled=!1;var i=this.el.querySelectorAll(".form-email-notification-from-name-field")[0];i.innerHTML="",i.disabled=!1;var s,c=this.model.get("fields"),r=0,o=0,n=0,a=this.model.get("emailNotificationFromField"),d=this.model.get("emailNotificationSubjectField"),u=this.model.get("emailNotificationFromNameField");c.length>=1&&c.each(function(l){"email"===l.get("type")?(s=document.createElement("option"),s.innerHTML=l.get("slug"),s.value=l.get("slug"),l.get("slug")===a&&(s.selected=!0),e.appendChild(s),r++):"name"===l.get("type")?(s=document.createElement("option"),s.innerHTML=l.get("slug"),s.value=l.get("slug"),l.get("slug")===u&&(s.selected=!0),i.appendChild(s),o++):"single-line-text"===l.get("type")&&(s=document.createElement("option"),s.innerHTML=l.get("slug"),s.value=l.get("slug"),l.get("slug")===d&&(s.selected=!0),t.appendChild(s),n++)}),0===r&&(s=document.createElement("option"),s.innerHTML=l.noEmailFields,e.appendChild(s),e.disabled=!0),0===o&&(s=document.createElement("option"),s.innerHTML=l.noNameFields,i.appendChild(s),i.disabled=!0),0===n&&(s=document.createElement("option"),s.innerHTML=l.noApplicableFields,t.appendChild(s),t.disabled=!0)},toggleNotificationFields:function(){var e,t=this.el.querySelectorAll(".form-send-email-notifications")[0].value,i=this.el.querySelectorAll(".email-notification-setting"),l=this.el.querySelectorAll(".email-notification-from-address")[0],s=this.el.querySelectorAll(".email-notification-from-field")[0],c=this.el.querySelectorAll(".form-email-notification-from-type")[0],r=this.el.querySelectorAll(".email-notification-subject")[0],o=this.el.querySelectorAll(".email-notification-subject-field")[0],n=this.el.querySelectorAll(".form-email-notification-subject-type")[0],a=this.el.querySelectorAll(".email-notification-from-name")[0],d=this.el.querySelectorAll(".email-notification-from-name-field")[0],u=this.el.querySelectorAll(".form-email-notification-from-name-type")[0];if(parseInt(t)){for(e=0;i.length>e;e++)i[e].style.display="block";l.style.display="none",s.style.display="none","custom"===c.value?l.style.display="block":"field"===c.value&&(s.style.display="block"),r.style.display="none",o.style.display="none","custom"===n.value?r.style.display="block":"field"===n.value&&(o.style.display="block"),a.style.display="none",d.style.display="none","custom"===u.value?a.style.display="block":"field"===u.value&&(d.style.display="block")}else{for(e=0;i.length>e;e++)i[e].style.display="none";l.style.display="none",s.style.display="none",r.style.display="none",o.style.display="none",a.style.display="none",d.style.display="none"}},save:function(e){if(""!==this.el.innerHTML){var t=this.el.querySelectorAll(".form-send-email-notifications")[0].value;this.model.set("sendEmailNotifications",parseInt(t)?!0:!1);var i=this.el.querySelectorAll(".form-email-notification-addresses")[0].value;this.model.set("emailNotificationAddresses",i);var l=this.el.querySelectorAll(".form-email-notification-from-type")[0].value;this.model.set("emailNotificationFromType",l);var s=this.el.querySelectorAll(".form-email-notification-from-address")[0].value;this.model.set("emailNotificationFromAddress",s);var c=this.el.querySelectorAll(".form-email-notification-from-field")[0].value;this.model.set("emailNotificationFromField",c);var r=this.el.querySelectorAll(".form-email-notification-from-name-type")[0].value;this.model.set("emailNotificationFromNameType",r);var o=this.el.querySelectorAll(".form-email-notification-from-name")[0].value;this.model.set("emailNotificationFromName",o);var n=this.el.querySelectorAll(".form-email-notification-from-name-field")[0].value;this.model.set("emailNotificationFromNameField",n);var a=this.el.querySelectorAll(".form-email-notification-subject-type")[0].value;this.model.set("emailNotificationSubjectType",a);var d=this.el.querySelectorAll(".form-email-notification-subject")[0].value;this.model.set("emailNotificationSubject",d);var u=this.el.querySelectorAll(".form-email-notification-subject-field")[0].value;this.model.set("emailNotificationSubjectField",u),e!==void 0&&e.promise!==void 0&&e.resolve()}},render:function(){var e={form:this.model.toJSON()},t=this.model.get("fields");return this.el.innerHTML=this.template(e),this.toggleNotificationFields(),this.updateFromFieldField(),wp.ccf.dispatcher.on("saveFormNotifications",this.save,this),wp.ccf.dispatcher.on("mainViewChange",this.save,this),this.listenTo(t,"add",this.updateFromFieldField,this),this.listenTo(t,"remove",this.updateFromFieldField,this),this}}),wp.ccf.views.FormPane=wp.ccf.views.FormPane||t.View.extend(i.defaults({template:wp.ccf.utils.template("ccf-form-pane-template"),subViews:{"field-sidebar":wp.ccf.views.FieldSidebar,"form-settings":wp.ccf.views.FormSettings,"form-notifications":wp.ccf.views.FormNotifications},events:{"click .save-button":"sync","click .signup-button":"signup","click .accordion-heading":"accordionClick","click .insert-form-button":"insertForm"},initialize:function(){wp.ccf.dispatcher.on("openEditField",this.openEditField,this)},insertForm:function(){wp.ccf.utils.insertFormShortcode(this.model),wp.ccf.toggle()},signup:function(){var t=this.el.querySelectorAll(".email-signup-field")[0].value,i=this.el.querySelectorAll(".bottom .left.signup")[0];i.className="left signup",t?e.ajax({url:"//taylorlovett.us8.list-manage.com/subscribe/post-json?u=66118f9a5b0ab0414e83f043a&id=b4ed816a24&c=?",method:"post",dataType:"jsonp",data:{EMAIL:t}}).done(function(){i.className="left signup signup-success"}):i.className="left signup signup-error"},accordionClick:function(t){var l=e(t.currentTarget).parents(".accordion-container")[0],s=l.querySelectorAll(".accordion-section");t.currentTarget.parentNode.className.match(/expanded/i)?t.currentTarget.parentNode.className=t.currentTarget.parentNode.className.replace(/expanded/i,""):t.currentTarget.parentNode.className+=" expanded",i.each(s,function(e){e!=t.currentTarget.parentNode&&e.className.match(/expanded/i)&&(e.className=e.className.replace(/expanded/i,""))})},openEditField:function(e){this.renderedSubViews["field-sidebar"].render(e).el.style.display="block"},disable:function(){this.el.querySelectorAll(".save-button")[0].setAttribute("disabled","disabled"),this.el.querySelectorAll(".disabled-overlay")[0].style.display="block"},enable:function(){this.el.querySelectorAll(".save-button")[0].removeAttribute("disabled"),this.el.querySelectorAll(".disabled-overlay")[0].style.display="none"},sync:function(){var t=this,i=e(this.el.querySelectorAll(".spinner")[0]);i.fadeIn(),t.disable();var s=e.Deferred(),c=e.Deferred(),r=e.Deferred();wp.ccf.dispatcher.trigger("saveFormSettings",s),wp.ccf.dispatcher.trigger("saveFormNotifications",r),wp.ccf.dispatcher.trigger("saveField",c),e.when(s,c,r).then(function(){var e=t.model.get("fields"),s=!0,c={};e.each(function(e){var t=e.get("slug");e.hasRequiredAttributes()?t&&!t.match(/^[a-zA-Z0-9\-_]+$/)?(s=!1,e.trigger("requirementsNotMet")):c[e.get("slug")]!==void 0?(s=!1,e.trigger("duplicateSlug"),c[e.get("slug")].trigger("duplicateSlug")):e.trigger("requirementsMet"):(s=!1,e.trigger("requirementsNotMet")),e.get("slug")&&(c[e.get("slug")]=e)}),s?t.model.save({},{context:"edit"}).error(function(){var e="sync";wp.ccf.errorModal.render(e).show()}).done(function(){l.single&&!l.postId&&(window.location=l.adminUrl+"post.php?post="+t.model.get("id")+"&action=edit#ccf-form/"+t.model.get("id"))}).complete(function(){i.fadeOut(),t.enable(),wp.ccf.dispatcher.trigger("saveFormComplete",t.model)}):(t.enable(),i.fadeOut())})},enableDisableInsert:function(){var e=this.el.querySelectorAll(".insert-form-button")[0];this.model.get("id")?e.removeAttribute("disabled"):e.setAttribute("disabled","disabled")},getNextFieldOrd:function(){var e=this.model.get("fields"),t=e.length+1;return e.each(function(e){var i=e.get("slug"),l=/\-([0-9]+)$/g,s=l.exec(i);if(s&&s[1]){var c=parseInt(s[1]);c>=t&&(t=c+1)}}),t},render:function(t){var s=this;s.model=t?t:new wp.ccf.models.Form,this.listenTo(s.model,"change",this.enableDisableInsert,this);var c={labels:l.fieldLabels,form:s.model.toJSON()};window.form=s.model,s.el.innerHTML=this.template(c);var r=s.el.querySelectorAll(".fields")[0];i.each(l.fieldLabels,function(e,t){r.appendChild(new wp.ccf.views.FieldRowPlaceholder({type:t}).render().el)});var o=s.el.querySelectorAll(".structure-fields")[0];i.each(l.structureFieldLabels,function(e,t){o.appendChild(new wp.ccf.views.FieldRowPlaceholder({type:t}).render().el)});var n=s.el.querySelectorAll(".special-fields")[0];i.each(l.specialFieldLabels,function(e,t){n.appendChild(new wp.ccf.views.FieldRowPlaceholder({type:t}).render().el)});var a=s.model.get("fields"),d=s.el.querySelectorAll(".form-content")[0],u=e(d);return e(s.el.querySelectorAll(".left-sidebar")[0].querySelectorAll(".field")).draggable({cursor:"move",distance:2,zIndex:160001,scroll:!1,containment:"document",appendTo:".ccf-main-modal",snap:!1,connectToSortable:".form-content",helper:function(t){var i=e(t.currentTarget),l=e('<div class="field" data-field-type="'+i.attr("data-field-type")+'"><h4>'+i.find(".label").html()+"</h4></div>");return l.css({width:u.width(),opacity:".75",height:i.height()})}}),a.length>=1&&(d.innerHTML="",a.each(function(e){var t=new wp.ccf.views.FieldRow({model:e,form:s.model}).render(!0).el;d.appendChild(t)})),e(d).sortable({axis:"y",distance:2,handle:"h4",placeholder:"field-placeholder",stop:function(e,t){if(!t.item.hasClass("instantiated")){var i=t.item.attr("data-field-type"),l={};wp.ccf.models.Fields[i].prototype.defaults().slug!==void 0&&(l.slug=i+"-"+s.getNextFieldOrd());var c=new wp.ccf.models.Fields[i](l),r=s.model.get("fields");r.add(c),new wp.ccf.views.FieldRow({model:c,el:t.item,form:s.model}).render(!0),t.item.attr("style","")}t.item.trigger("sorted",t.item.index())}}),s.initRenderSubViews(!0,!0,{form:s.model}),s.enableDisableInsert(),s}},wp.ccf.mixins.subViewable)),wp.ccf.views.ExistingFormTableRow=wp.ccf.views.ExistingFormTableRow||t.View.extend({tagName:"tr",template:wp.ccf.utils.template("ccf-existing-form-table-row-template"),events:{"click .edit":"triggerMainViewChange","click .delete":"triggerDelete","click .insert-form-button":"insertForm"},initialize:function(e){this.parent=e.parent},insertForm:function(){wp.ccf.utils.insertFormShortcode(this.model),wp.ccf.toggle()},triggerMainViewChange:function(){wp.ccf.switchToForm(this.model)},triggerDelete:function(){var e,t=this,i=t.parent.collection.state.currentPage;t.model.destroy().done(function(){e=i,e===t.parent.collection.state.totalPages&&e-1===(t.parent.collection.state.totalObjects-1)/l.postsPerPage&&e--,t.parent.showPage(e).done(function(){t.parent.renderPagination()})})},render:function(){return this.$el.html(this.template({form:this.model.toJSON(),utils:{getPrettyPostDate:wp.ccf.utils.getPrettyPostDate}})),this}}),wp.ccf.views.EmptyFormTableRow=wp.ccf.views.EmptyFormTableRow||t.View.extend({tagName:"tr",template:wp.ccf.utils.template("ccf-empty-form-table-row-template"),render:function(){return this.$el.html(this.template()),this}}),wp.ccf.views.ExistingFormTable=wp.ccf.views.ExistingFormTable||t.View.extend({template:wp.ccf.utils.template("ccf-existing-form-table-template"),initialize:function(){this.parent=arguments.parent,this.collection=new wp.ccf.collections.Forms,wp.ccf.dispatcher.on("changeFormTablePage",this.showPage,this),wp.ccf.dispatcher.on("saveFormComplete",this.render,this)},showPage:function(e){var t=this,i=this.collection.fetch({data:{page:e}});return i.error(function(){var e="sync";wp.ccf.errorModal.render(e).show()}),i.done(function(){var e=t.el.querySelectorAll(".rows")[0],i=document.createElement("tbody");i.className="rows",t.collection.length>=1?t.collection.each(function(e){var l=new wp.ccf.views.ExistingFormTableRow({model:e,parent:t}).render();i.appendChild(l.el)},t):i.appendChild((new wp.ccf.views.EmptyFormTableRow).render().el),e.parentNode.replaceChild(i,e)}),i},renderPagination:function(){var e=this.el.querySelectorAll(".ccf-pagination")[0];e.innerHTML="",this.collection.state.totalPages>1&&e.appendChild(new wp.ccf.views.Pagination({parent:this}).render(this.collection.state.totalPages,this.collection.state.currentPage).el)},render:function(){var e=this;return this.el.innerHTML=this.template(),this.el.querySelectorAll(".ccf-pagination")[0],this.showPage(1).done(function(){e.renderPagination()}),this}}),wp.ccf.views.ExistingFormPane=wp.ccf.views.ExistingFormPane||t.View.extend(i.defaults({template:wp.ccf.utils.template("ccf-existing-form-pane-template"),subViews:{"existing-form-table":wp.ccf.views.ExistingFormTable},render:function(){return this.rendered?this:(this.rendered=!0,this.el.innerHTML=this.template(),this.initRenderSubViews(!0),this)}},wp.ccf.mixins.subViewable)),wp.ccf.views.MainModal=wp.ccf.views.MainModal||t.View.extend(i.defaults({tagName:"div",className:"ccf-main-modal",template:wp.ccf.utils.template("ccf-main-modal-template"),events:{"click .close-icon":"hide","click .main-menu a":"menuClick"},subViews:{"form-pane":wp.ccf.views.FormPane},initialize:function(){l.single||(this.subViews["existing-form-pane"]=wp.ccf.views.ExistingFormPane),wp.ccf.dispatcher.on("mainViewChange",this.toggleView,this)},toggleView:function(e){this.showView(e,wp.ccf.currentForm);var t=e;"form-pane"===e&&wp.ccf.currentForm&&(t="existing-form-pane");var l=this.el.querySelectorAll(".menu-item");i.each(l,function(e){var i=e.getAttribute("data-view");e.className=i===t?e.className.replace("selected","")+" selected":e.className.replace("selected","")})},menuClick:function(e){var t=e.target.getAttribute("data-view");"form-pane"===t&&(wp.ccf.currentForm=null),wp.ccf.dispatcher.trigger("mainViewChange",t),e.preventDefault()},render:function(e){return e=e||!1,this.overlay(),this.el.innerHTML=this.template({single:e}),this.initRenderSubViews(),this.showView("form-pane",wp.ccf.currentForm,!0),this},overlay:function(){return this.overlayEl===void 0&&(this.overlayEl=document.createElement("div"),this.overlayEl.className="ccf-main-modal-overlay",document.body.appendChild(this.overlayEl)),this.overlayEl},remove:function(){return document.body.removeChild(this.overlay()),this},show:function(){e(this.overlay()).show(),this.$el.show()},hide:function(){e(this.overlay()).hide(),this.$el.hide()}},wp.ccf.mixins.subViewable)),wp.ccf.views.SubmissionRow=wp.ccf.views.SubmissionRow||t.View.extend({tagName:"tr",template:wp.ccf.utils.template("ccf-submission-row-template"),events:{"click .view":"view","click .delete":"delete"},initialize:function(e){this.parent=e.parent},"delete":function(){var e,t=this,i=t.parent.collection.state.currentPage;t.model.destroy().done(function(){e=i,e===t.parent.collection.state.totalPages&&e-1===(t.parent.collection.state.totalObjects-1)/l.postsPerPage&&e--,t.parent.showPage(e).done(function(){t.parent.renderPagination()})})},view:function(e){var t=e.currentTarget.getAttribute("data-submission-id"),i=e.currentTarget.getAttribute("data-submission-date");tb_show(l.thickboxTitle+" - "+wp.ccf.utils.getPrettyPostDate(i),"#TB_inline?height=500&width=700&inlineId=ccf-submission-content-"+parseInt(t),null)},render:function(){return this.$el.html(this.template({submission:this.model.toJSON(),currentColumns:this.parent.columns,columns:wp.ccf.currentForm.getFieldSlugs(!0),utils:{getPrettyPostDate:wp.ccf.utils.getPrettyPostDate,wordChop:wp.ccf.utils.wordChop,isFieldDate:wp.ccf.utils.isFieldDate,isFieldName:wp.ccf.utils.isFieldName,isFieldFile:wp.ccf.utils.isFieldFile,isFieldAddress:wp.ccf.utils.isFieldAddress,isFieldEmailConfirm:wp.ccf.utils.isFieldEmailConfirm,getPrettyFieldDate:wp.ccf.utils.getPrettyFieldDate,getPrettyFieldAddress:wp.ccf.utils.getPrettyFieldAddress,getPrettyFieldName:wp.ccf.utils.getPrettyFieldName,getPrettyFieldEmailConfirm:wp.ccf.utils.getPrettyFieldEmailConfirm}})),this}}),wp.ccf.views.SubmissionsTable=wp.ccf.views.SubmissionsTable||t.View.extend({template:wp.ccf.utils.template("ccf-submission-table-template"),events:{"click .prev:not(.disabled)":"previousPage","click .next:not(.disabled)":"nextPage","click .first:not(.disabled)":"firstPage","click .last:not(.disabled)":"lastPage"},initialize:function(){this.collection=new wp.ccf.collections.Submissions({},{formId:l.postId}),wp.ccf.dispatcher.on("submissionTableRebuild",this.render,this)},showPage:function(e){var t=this,i=this.collection.fetch({data:{page:e}});return i.error(function(){var e="sync";wp.ccf.errorModal.render(e).show()}),i.done(function(){var e=t.el.querySelectorAll(".submission-rows")[0],i=document.createElement("tbody");i.className="submission-rows",t.collection.length>=1?t.collection.each(function(e){var l=new wp.ccf.views.SubmissionRow({model:e,parent:t}).render();i.appendChild(l.el)},t):i.appendChild(new wp.ccf.views.EmptySubmissionTableRow({parent:t}).render(wp.ccf.currentForm.getFieldSlugs(!0).concat("date")).el),e.parentNode.replaceChild(i,e)}),i},renderPagination:function(){var e=this.el.querySelectorAll(".ccf-pagination")[0];e.innerHTML="",this.collection.state.totalPages>1&&e.appendChild(new wp.ccf.views.Pagination({parent:this}).render(this.collection.state.totalPages,this.collection.state.currentPage).el)},render:function(e){var t=this;return t.columns=e?e:wp.ccf.currentForm.getFieldSlugs(!0).slice(0,4).concat("date"),1>t.columns.length?t.el.innerHTML="":(t.el.innerHTML=t.template({columns:t.columns}),t.el.querySelectorAll(".ccf-pagination")[0],t.showPage(1).done(function(){t.renderPagination()})),t}}),wp.ccf.views.ErrorModal=wp.ccf.views.ErrorModal||t.View.extend({template:wp.ccf.utils.template("ccf-error-modal-template"),tagName:"div",className:"ccf-error-modal",events:{"click .close":"hide"},hide:function(){this.el.className=this.el.className.replace(" show","")},show:function(){this.el.className=this.el.className.replace(" show","")+" show"},toggle:function(){this.el.className.match(" show")?this.hide():this.show()},render:function(e){var t={messageType:""};return e&&(t.messageType=e),this.el.innerHTML=this.template(t),this}}),wp.ccf.views.Pagination=wp.ccf.views.Pagination||t.View.extend({template:wp.ccf.utils.template("ccf-pagination-template"),events:{"click .prev:not(.disabled)":"previousPage","click .next:not(.disabled)":"nextPage","click .first:not(.disabled)":"firstPage","click .last:not(.disabled)":"lastPage"},initialize:function(e){this.parent=e.parent},previousPage:function(){var e=this;e.parent.showPage(e.parent.collection.state.currentPage-1).done(function(){e.render()})},nextPage:function(){var e=this;e.parent.showPage(e.parent.collection.state.currentPage+1).done(function(){e.render()})},firstPage:function(){var e=this;e.parent.showPage(1).done(function(){e.render()})},lastPage:function(){var e=this;e.parent.showPage(e.parent.collection.state.totalPages).done(function(){e.render()})},render:function(){return this.el.innerHTML=this.template({totalPages:this.parent.collection.state.totalPages,currentPage:this.parent.collection.state.currentPage,totalObjects:this.parent.collection.state.totalObjects}),this}}),wp.ccf.views.EmptySubmissionTableRow=wp.ccf.views.EmptySubmissionTableRow||t.View.extend({tagName:"tr",template:wp.ccf.utils.template("ccf-no-submissions-row-template"),initialize:function(e){this.parent=e.parent},render:function(){return this.el.innerHTML=this.template({columns:this.parent.columns}),this}}),wp.ccf.views.SubmissionColumnController=wp.ccf.views.SubmissionColumnController||t.View.extend({template:wp.ccf.utils.template("ccf-submissions-controller-template"),events:{"click input[type=checkbox]":"triggerTableRebuild"},render:function(){this.el.innerHTML=this.template({columns:wp.ccf.currentForm.getFieldSlugs(!0).concat("date")})},triggerTableRebuild:function(){var e=[],t=document.querySelectorAll(".submission-column-checkbox");if(t.length>=1)for(var i=0;t.length>i;i++)t[i].checked&&e.push(t[i].value);wp.ccf.dispatcher.trigger("submissionTableRebuild",e)}})}(jQuery,Backbone,_,ccfSettings),function(e,t){"use strict";wp.ccf.router=wp.ccf.router||t.Router.extend({routes:{"ccf-form":"open","ccf-form/:formId":"open"},open:function(e){wp.ccf.show(e)}})}(jQuery,Backbone,_,ccfSettings),function(e,t,i,l){"use strict";wp.ccf=i.defaults(wp.ccf,{forms:new wp.ccf.collections.Forms,currentForm:null,errorModal:null,_currentFormDeferred:null,dispatcher:{},show:function(e){return this.switchToForm(e),this.instance.show(),this.instance},initErrorModal:function(){this.errorModal=(new wp.ccf.views.ErrorModal).render();var e=document.getElementsByTagName("body")[0];e.appendChild(this.errorModal.el)},switchToForm:function(e){var t=this;if(+e===parseInt(e)){var i=parseInt(e);if(e=t.forms.findWhere({id:parseInt(i)}),!e){var l;return t.forms.formsFetching[i]!==void 0?(l=t.forms.formsFetching[i],e=null):(e=new wp.ccf.models.Form({id:i}),l=e.fetch(),t.forms.formsFetching[i]=l),l.done(function(){e?(delete t.forms.formsFetching[i],t.forms.add(e)):e=t.forms.findWhere({id:i}),t.currentForm=e,wp.ccf.dispatcher.trigger("mainViewChange","form-pane")}),l}t.currentForm=e,wp.ccf.dispatcher.trigger("mainViewChange","form-pane")}else t.currentForm=e,wp.ccf.dispatcher.trigger("mainViewChange","form-pane");return!0},hide:function(){return this.instance.hide(),this.instance},toggle:function(e){return this.switchToForm(e),this.instance.$el.is(":visible")?this.instance.hide():this.instance.show(),this.instance},createSubmissionsTable:function(e){var t=document.querySelectorAll(".ccf-submission-column-controller"),i=new wp.ccf.views.SubmissionsTable({el:e});i.render(),t&&new wp.ccf.views.SubmissionColumnController({el:t}).render()},_setupMainModal:function(e){return this.instance=(new wp.ccf.views.MainModal).render(e),document.getElementsByTagName("body")[0].appendChild(this.instance.el),t.history.start(),this.instance},createManager:function(){var s=this,c=document.querySelectorAll(".ccf-open-form-manager")[0];if(!c)return!1;i.extend(this.dispatcher,t.Events),new wp.ccf.router,s.initErrorModal();var r=!1;if(l.single)if(r=!0,l.postId){var o=parseInt(l.postId);if(s.forms.formsFetching[o]===void 0){var n=new wp.ccf.models.Form({id:o}),a=n.fetch();s.forms.formsFetching[o]=a,s._currentFormDeferred=a,a.done(function(){delete s.forms.formsFetching[o],s.forms.add(n),s.currentForm=n})}else s._currentFormDeferred=s.forms.formsFetching[o],s._currentFormDeferred.done(function(){s.currentForm=s.forms.findWhere({id:o})});e.when(s._currentFormDeferred).then(function(){s._setupMainModal(!0),c.style.display="inline-block";var e=document.getElementById("ccf-submissions");if(e){var t=e.querySelectorAll(".inside")[0],i=document.createElement("div");i.className="ccf-submission-icon",i.setAttribute("data-icon","");var r=document.createElement("a");r.href="?action=edit&post="+parseInt(l.postId)+"&download_submissions=1&download_submissions_nonce="+l.downloadSubmissionsNonce,r.className="ccf-submission-icon",r.setAttribute("data-icon","");var o=document.getElementById("show-settings-link");i.onclick=function(){o.click()},e.insertBefore(i,e.firstChild.nextSibling.nextSibling),e.insertBefore(r,e.firstChild.nextSibling.nextSibling),wp.ccf.createSubmissionsTable(t)}})}else s._setupMainModal(!0),c.style.display="inline-block";else s._setupMainModal();var d=function(e){e=e||window.event;var t=e.currentTarget?e.currentTarget:e.srcElement,i=t.getAttribute("data-form-id");wp.ccf.toggle(i)};c.addEventListener?c.addEventListener("click",d,!1):c.attachEvent("onclick",d)}}),wp.ccf.createManager()}(jQuery,Backbone,_,ccfSettings);
|
1 |
+
(function(e,t,i,l){"use strict";window.wp=window.wp||{},wp.ccf=wp.ccf||{},wp.ccf.utils=wp.ccf.utils||{},wp.ccf.utils.cleanDateFields=function(e){delete e.date,delete e.date_gmt,delete e.modified,delete e.modified_gmt,delete e.date_tz,delete e.modified_tz},wp.ccf.utils.template=i.memoize(function(e){var t={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g};return i.template(document.getElementById(e).innerHTML,null,t)}),wp.ccf.utils.insertFormShortcode=function(e){var t=wp.ccf.forms.findWhere({id:e.get("id")});t||wp.ccf.forms.add(e);var i=tinymce.get(wpActiveEditor),l='[ccf_form id="'+e.get("id")+'"]';i&&!i.isHidden()?tinymce.activeEditor.execCommand("mceInsertContent",!1,l):document.getElementById(wpActiveEditor).value+=l},wp.ccf.utils.getPrettyPostDate=function(e){return e=moment.utc(e),l.gmtOffset&&(e=e.utcOffset(60*parseInt(l.gmtOffset))),e.format("h:mm a M/D/YYYY")},wp.ccf.utils.wordChop=function(e,t){var i=e.substr(0,t);return i.substr(0,Math.min(i.length,i.lastIndexOf(" "))),i.length<e.length&&(i+="..."),i},wp.ccf.utils.isFieldDate=function(e){return e.date!==void 0||e.hour!==void 0&&e.minute!==void 0&&e["am-pm"]!==void 0?!0:!1},wp.ccf.utils.isFieldName=function(e){return e.name!==void 0||e.last!==void 0?!0:!1},wp.ccf.utils.isFieldEmailConfirm=function(e){return e.email!==void 0||e.confirm!==void 0?!0:!1},wp.ccf.utils.isFieldAddress=function(e){return e.street!==void 0&&e.city!==void 0&&e.zipcode!==void 0&&e.line_two!==void 0?!0:!1},wp.ccf.utils.isFieldFile=function(e){return e.id!==void 0&&e.url!==void 0&&e.file_name!==void 0?!0:!1},wp.ccf.utils.getPrettyFieldEmailConfirm=function(e){return e.email?e.email:e.confirm?e.confirm:"-"},wp.ccf.utils.getPrettyFieldDate=function(e){var t="",i="";if(e.hour&&e.minute&&e["am-pm"]&&(t+=e.hour+":"+e.minute+" "+e["am-pm"]),e.date&&(t+=" "+e.date),!t)return"-";var s=moment.utc(t);return s.isValid()?(e.hour&&e.minute&&e["am-pm"]&&(i+=s.format("h:mm a")),e.date&&(i&&(i+=" "),i+=s.format("M/D/YYYY")),i):l.invalidDate},wp.ccf.utils.getPrettyFieldName=function(e){var t=e.first;return t.length>0&&(t+=" "),e.last&&(t+=e.last),t||(t="-"),t},wp.ccf.utils.getPrettyFieldAddress=function(e){if(!e.street||!e.city)return"-";var t=e.street;return e.line_two&&(t+=" "+e.line_two),t+=", "+e.city,e.state&&(t+=", "+e.state),e.zipcode&&(t+=" "+e.zipcode),e.country&&(t+=" "+e.country),t}})(jQuery,Backbone,_,ccfSettings),function(e,t,i){"use strict";wp.ccf.mixins=wp.ccf.mixins||{},wp.ccf.mixins.subViewable=wp.ccf.mixins.subViewable||{subViews:{},initRenderSubViews:function(e,t,l){this.renderedSubViews||(this.renderedSubViews={});for(var s in this.subViews){var c={el:this.$el.find(".ccf-"+s),parent:this};l&&i.extend(c,l),this.renderedSubViews[s]&&this.renderedSubViews[s].destroy&&this.renderedSubViews[s].destroy(),(t||!this.renderedSubViews[s])&&(this.renderedSubViews[s]=new this.subViews[s](c)),this.renderedSubViews[s].render(),e&&(this.renderedSubViews[s].el.style.display="block")}return this},showView:function(e,t,i){if(this.renderedSubViews!==void 0&&this.renderedSubViews[e]!==void 0){var l=this.renderedSubViews[e];i||l.render(t),l.el.style.display="block",this.currentView=e;for(var s in this.subViews)s!==e&&(this.renderedSubViews[s].el.style.display="none")}}}}(jQuery,Backbone,_,ccfSettings),function(e,t,i,l){"use strict";wp.ccf.models=wp.ccf.models||{},wp.ccf.models.Fields=wp.ccf.models.Fields||{};var s=function(e,i,l){return"object"!=typeof i&&""===i&&(i=""),t.Model.prototype.set.call(this,e,i,l)},c=function(e,t,i){return i=i||{},i.emulateHTTP=!0,this.constructor.__super__.sync.call(this,e,t,i)},o=function(e){for(var t in this.attributes)if(-1===i.indexOf(e,t)){var l=this.get(t);"string"==typeof l&&""!==l&&(l=(l+"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/“/g,"”").replace(/”/g,"”").replace(/‘/g,"‘").replace(/&/g,"&").replace(/'/g,"'"),this.set(t,l))}return this};wp.ccf.models.FieldChoice=wp.ccf.models.FieldChoice||t.Model.extend({defaults:{label:"",value:"",selected:!1},decode:function(){return o.call(this,[])},set:s}),wp.ccf.models.FormNotificationAddress=wp.ccf.models.FormNotificationAddress||t.Model.extend({defaults:{type:"custom",field:"",email:""},decode:function(){return o.call(this,[])},set:s}),wp.ccf.models.FormNotification=wp.ccf.models.FormNotification||t.Model.extend({defaults:function(){return{title:"",content:"",active:!1,addresses:new wp.ccf.collections.FormNotificationAddresses,fromType:"default",fromAddress:"",fromField:"",subjectType:"default",subject:"",subjectField:"",fromNameType:"custom",fromName:"WordPress",fromNameField:""}},initialize:function(e){if("object"==typeof e&&e.addresses){var t=[];i.each(e.addresses,function(e){var i=new wp.ccf.models.FormNotificationAddress(e);i.decode(),t.push(i)}),this.set("addresses",new wp.ccf.collections.FormNotificationAddresses(t))}},decode:function(){return o.call(this,[])},toJSON:function(){var e=this.constructor.__super__.toJSON.call(this);return e.addresses&&(e.addresses=e.addresses.toJSON()),e},set:s}),wp.ccf.models.Form=wp.ccf.models.Form||wp.api.models.Post.extend({urlRoot:l.apiRoot.replace(/\/$/,"")+"/ccf/v1/forms",set:s,sync:c,idAttribute:"id",initialize:function(){this.on("sync",this.decode,this)},defaults:function(){var e={fields:new wp.ccf.collections.Fields,type:"ccf_form",status:"publish",description:"",buttonText:"Submit Form",completionActionType:"text",completionRedirectUrl:"",completionMessage:"",notifications:new wp.ccf.collections.FormNotifications,pause:!1,pauseMessage:l.pauseMessage};return e=i.defaults(e,this.constructor.__super__.defaults),wp.ccf.utils.cleanDateFields(e),e},decode:function(){var e=i.keys(wp.api.models.Post.prototype.defaults);return e=i.without(e,"title"),o.call(this,e)},getFieldSlugs:function(e){var t=wp.ccf.currentForm.get("fields"),i=[];return t.each(function(t){e&&t.isImmutable||i.push(t.get("slug"))}),i},parse:function(e){var t=this,l=0,s=0;if(e.fields){var c=t.get("fields");if(c&&c.length>0){for(l=0;e.fields.length>l;l++){var o=e.fields[l],r=c.findWhere({slug:o.slug});if(r){if(o.choices!==void 0){var n=t.get("choices");if(n&&n.length>0)for(s=0;o.choices>s;s++){var a=n.at(s);a.set(o.choices[s]),a.decode()}delete e.fields[l].choices}r.set(o),r.decode()}}delete e.fields}else{var d=[];i.each(e.fields,function(e){var t=new wp.ccf.models.Fields[e.type](e);t.decode(),d.push(t)}),e.fields=new wp.ccf.collections.Fields(d,{formId:e.id})}}if(e.notifications){var f=t.get("notifications");if(f&&f.length>0){for(l=0;e.notifications.length>l;l++){var u=e.notifications[l],m=f.findWhere({slug:u.slug});if(m){if(u.addresses!==void 0){var h=t.get("addresses");if(h&&h.length>0)for(s=0;u.addresses>s;s++){var p=h.at(s);p.set(u.addresses[s]),p.decode()}delete e.notifications[l].addresses}m.set(u),m.decode()}}delete e.notifications}else{var w=[];i.each(e.notifications,function(e){var t=new wp.ccf.models.FormNotification(e);t.decode(),w.push(t)}),e.notifications=new wp.ccf.collections.FormNotifications(w)}}return this.constructor.__super__.parse.call(this,e)},toJSON:function(){var e=this.constructor.__super__.toJSON.call(this);return e.fields&&(e.fields=e.fields.toJSON()),e.notifications&&(e.notifications=e.notifications.toJSON()),e.author&&(e.author=e.author.toJSON()),e}}),wp.ccf.models.Submission=wp.api.models.Submission||wp.api.models.Post.extend({defaults:{id:null,data:{}},sync:c,urlRoot:l.apiRoot.replace(/\/$/,"")+"/ccf/v1/submissions"}),wp.ccf.models.Field=wp.api.models.Field||wp.api.models.Post.extend({idAttribute:"id",defaults:{id:null},set:s,required:function(){return["slug"]},decode:function(){return o.call(this,i.keys(wp.api.models.Post.prototype.defaults))},hasRequiredAttributes:function(){var e=this,t=!0;return i.each(this.required(),function(i){(e.get(i)===void 0||""===e.get(i))&&(t=!1)}),t},sync:c}),wp.ccf.models.StandardField=wp.ccf.models.StandardField||wp.ccf.models.Field.extend({idAttribute:"id",defaults:function(){var e={label:l.fieldLabel,value:"",placeholder:"",slug:"",type:"",required:!1,className:"",description:""};return i.defaults(e,this.constructor.__super__.defaults)}}),wp.ccf.models.Fields["single-line-text"]=wp.ccf.models.Fields["single-line-text"]||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"single-line-text"};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.file=wp.ccf.models.Fields.file||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"file",fileExtensions:"",maxFileSize:l.maxFileSize};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields["paragraph-text"]=wp.ccf.models.Fields["paragraph-text"]||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"paragraph-text"};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.hidden=wp.ccf.models.Fields.hidden||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"hidden"};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.email=wp.ccf.models.Fields.email||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"email",emailConfirmation:!1};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.website=wp.ccf.models.Fields.website||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"website",placeholder:"http://"};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.phone=wp.ccf.models.Fields.phone||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"phone",phoneFormat:"us"};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.date=wp.ccf.models.Fields.date||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"date",showDate:!0,showTime:!0,dateFormat:"mm/dd/yyyy"};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.name=wp.ccf.models.Fields.name||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"name"};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.recaptcha=wp.ccf.models.Fields.recaptcha||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"recaptcha",siteKey:"",secretKey:""};return i.defaults(e,this.constructor.__super__.defaults())},required:function(){return["siteKey","secretKey"]},isImmutable:!0}),wp.ccf.models.Fields.address=wp.ccf.models.Fields.address||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"address",addressType:"us"};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields["section-header"]=wp.ccf.models.Fields["section-header"]||wp.ccf.models.Field.extend({defaults:function(){var e={type:"section-header",slug:"",heading:"",subheading:"",className:""};return i.defaults(e,this.constructor.__super__.defaults)},required:function(){return[]},isImmutable:!0}),wp.ccf.models.Fields.html=wp.ccf.models.Fields.html||wp.ccf.models.Field.extend({defaults:function(){var e={type:"html",slug:"",html:"",className:""};return i.defaults(e,this.constructor.__super__.defaults)},required:function(){return[]},isImmutable:!0}),wp.ccf.models.ChoiceableField=wp.ccf.models.ChoiceableField||wp.ccf.models.StandardField.extend({defaults:function(){var e={choices:new wp.ccf.collections.FieldChoices};return i.defaults(e,this.constructor.__super__.defaults())},initialize:function(e){if("object"==typeof e&&e.choices){var t=[];i.each(e.choices,function(e){var i=new wp.ccf.models.FieldChoice(e);i.decode(),t.push(i)}),this.set("choices",new wp.ccf.collections.FieldChoices(t))}}}),wp.ccf.models.Fields.radio=wp.ccf.models.Fields.radio||wp.ccf.models.ChoiceableField.extend({defaults:function(){var e={type:"radio"};return i.defaults(e,this.constructor.__super__.defaults())},initialize:function(){return this.constructor.__super__.initialize.apply(this,arguments)}}),wp.ccf.models.Fields.checkboxes=wp.ccf.models.Fields.checkboxes||wp.ccf.models.ChoiceableField.extend({defaults:function(){var e={type:"checkboxes"};return i.defaults(e,this.constructor.__super__.defaults())},initialize:function(){return this.constructor.__super__.initialize.apply(this,arguments)}}),wp.ccf.models.Fields.dropdown=wp.ccf.models.Fields.dropdown||wp.ccf.models.ChoiceableField.extend({defaults:function(){var e={type:"dropdown"};return i.defaults(e,this.constructor.__super__.defaults())},initialize:function(){return this.constructor.__super__.initialize.apply(this,arguments)}})}(jQuery,Backbone,_,ccfSettings),function(e,t,i,l){"use strict";var s=function(e,t,i){return i=i||{},i.emulateHTTP=!0,this.constructor.__super__.sync.call(this,e,t,i)};wp.ccf.collections=wp.ccf.collections||{},wp.ccf.collections.Forms=wp.ccf.collections.Forms||wp.api.collections.Posts.extend({model:wp.ccf.models.Form,url:l.apiRoot.replace(/\/$/,"")+"/ccf/v1/forms",formsFetching:{},initialize:function(){this.constructor.__super__.initialize(),this.formsFetching={}},sync:s,remove:function(e,t){t=t||{};var l=this.constructor.__super__.remove.call(this,e,t);return t.destroy&&(e instanceof Array?i.each(e,function(e){e.destroy()}):e.destroy()),l}}),wp.ccf.collections.Fields=wp.ccf.collections.Fields||wp.api.collections.Posts.extend({model:wp.ccf.models.Field,url:function(){return l.apiRoot+"/ccf/forms/"+this.formId+"/fields"},initialize:function(e,t){t&&t.formId&&(this.formId=t.formId)},sync:s}),wp.ccf.collections.FormNotificationAddresses=wp.ccf.collections.FormNotificationAddresses||t.Collection.extend({model:wp.ccf.models.FormNotificationAddress}),wp.ccf.collections.FormNotifications=wp.ccf.collections.FormNotifications||t.Collection.extend({model:wp.ccf.models.FormNotification}),wp.ccf.collections.Submissions=wp.ccf.collections.Submissions||wp.api.collections.Posts.extend({model:wp.ccf.models.Submission,url:function(){return l.apiRoot.replace(/\/$/,"")+"/ccf/v1/forms/"+this.formId+"/submissions"},initialize:function(e,t){this.constructor.__super__.initialize.apply(this,arguments),t&&t.formId&&(this.formId=t.formId)},sync:s}),wp.ccf.collections.FieldChoices=wp.ccf.collections.FieldChoices||t.Collection.extend({model:wp.ccf.models.FieldChoice})}(jQuery,Backbone,_,ccfSettings),function(e,t,i,l){"use strict";wp.ccf.views=wp.ccf.views||{},wp.ccf.views.Fields=wp.ccf.views.Fields||{},wp.ccf.views.FieldChoice=t.View.extend({template:wp.ccf.utils.template("ccf-field-choice-template"),className:"choice",events:{"click .add":"triggerAdd","click .delete":"triggerDelete","blur input":"saveChoice",saveChoice:"saveChoice",sorted:"triggerUpdateSort"},initialize:function(e){this.field=e.field},destroy:function(){wp.ccf.dispatcher.off("mainViewChange",this.saveChoice),this.unbind()},triggerUpdateSort:function(e,t){this.field.get("choices").remove(this.model,{silent:!0}),this.field.get("choices").add(this.model,{at:t,silent:!0})},saveChoice:function(){if(""!==this.el.innerHTML){var e=this.el.querySelectorAll(".choice-label")[0].value,t=this.el.querySelectorAll(".choice-value")[0].value;this.model.set("label",e),this.model.set("value",t);var i=this.el.querySelectorAll(".choice-selected")[0],l=i.checked?!0:!1;return this.model.set("selected",l),this}},render:function(){var e={};return this.model&&(e.choice=this.model.toJSON()),this.el.innerHTML=this.template(e),wp.ccf.dispatcher.on("mainViewChange",this.saveChoice,this),this},triggerAdd:function(){this.field.get("choices").add(new wp.ccf.models.FieldChoice)},triggerDelete:function(){var e=this.field.get("choices");if(e.length>1)e.remove(this.model),this.destroy(),this.remove();else{for(var t=this.el.querySelectorAll(".choice-label, .choice-value"),i=this.el.querySelectorAll(".choice-selected"),l=0;t.length>l;l++)t[l].value="";i[0].checked=!1}}}),wp.ccf.views.EmptyFormNotificationTableRow=wp.ccf.views.EmptyFormNotificationTableRow||t.View.extend({tagName:"tr",template:wp.ccf.utils.template("ccf-empty-form-notification-row-template"),events:{"click .add":"triggerAdd"},initialize:function(e){this.form=e.form},destroy:function(){this.unbind()},render:function(){return this.$el.html(this.template()),this},triggerAdd:function(){var e=this.form.get("notifications");this.destroy(),e.add(new wp.ccf.models.FormNotification)}}),wp.ccf.views.EmptyFormTableRow=wp.ccf.views.EmptyFormTableRow||t.View.extend({tagName:"tr",template:wp.ccf.utils.template("ccf-empty-form-table-row-template"),render:function(){return this.$el.html(this.template()),this}}),wp.ccf.views.FormNotificationAddress=t.View.extend({template:wp.ccf.utils.template("ccf-form-notification-address-template"),className:"address",events:{"click .add":"triggerAdd","click .delete":"triggerDelete","blur input":"save","change select":"save"},initialize:function(e){this.notification=e.notification,this.parent=e.parent,this.form=e.form},destroy:function(){this.unbind()},save:function(){if(""!==this.el.innerHTML){var e=this.el.querySelectorAll(".form-notification-address-type")[0].value,t=this.el.querySelectorAll(".form-notification-address-email"),i=this.el.querySelectorAll(".form-notification-address-field"),l=this.model.get("type");return t.length&&this.model.set("email",t[0].value),i.length&&this.model.set("field",i[0].value),this.model.set("type",e),l!==e&&this.render(),this}},updateFromFieldField:function(){if("edit"===this.parent.context&&"field"===this.model.get("type")){var e=this.el.querySelectorAll(".form-notification-address-field")[0];e.innerHTML="",e.disabled=!1;var t,i=this.form.get("fields"),s=0,c=this.model.get("field");i.length>=1&&i.each(function(i){"email"===i.get("type")&&(t=document.createElement("option"),t.innerHTML=i.get("slug"),t.value=i.get("slug"),i.get("slug")===c&&(t.selected=!0),e.appendChild(t),s++)}),0===s&&(t=document.createElement("option"),t.innerHTML=l.noEmailFields,t.value="",e.appendChild(t),e.disabled=!0)}},render:function(){var e={};this.model&&(e.address=this.model.toJSON()),this.el.innerHTML=this.template(e);var t=this.form.get("fields");return this.listenTo(t,"add",this.updateFromFieldField,this),this.listenTo(t,"remove",this.updateFromFieldField,this),"field"===this.model.get("type")&&this.updateFromFieldField(),this},triggerAdd:function(){this.notification.get("addresses").add(new wp.ccf.models.FormNotificationAddress)},triggerDelete:function(){var e=this.notification.get("addresses");e.length>1?this.parent.deleteAddress(this):(this.model.clear().set(wp.ccf.models.FormNotificationAddress.prototype.defaults),this.destroy(),this.render())}}),wp.ccf.views.ExistingFormNotificationRow=t.View.extend({template:wp.ccf.utils.template("ccf-existing-form-notification-table-row-template"),tagName:"tr",events:{"change select.form-email-notification-from-type":"toggleNotificationFields","change select.form-email-notification-from-name-type":"toggleNotificationFields","change select.form-email-notification-subject-type":"toggleNotificationFields","click .close-notification":"changeContext","click .edit-notification":"changeContext","click .delete-notification":"triggerDelete","blur input":"save","change select":"save"},addressViews:[],initialize:function(e){this.form=e.form,this.addressViews=[],this.parent=e.parent,this.context=e.context!==void 0?e.context:"view";var t=this.model.get("addresses");this.listenTo(t,"add",this.addAddress)},deleteAddress:function(e){i.each(this.addressViews,function(t){if(e.cid===t.cid){var l=i.indexOf(this.addressViews,t);this.model.get("addresses").remove(e.model),this.addressViews[l].remove(),this.addressViews.splice(l,1)}},this)},addAddress:function(e){var t=this.el.querySelectorAll(".addresses")[0],i=new wp.ccf.views.FormNotificationAddress({model:e,parent:this,notification:this.model,form:this.form});this.addressViews.push(i),t.appendChild(i.render().el)},destroy:function(){this.unbind()},changeContext:function(e,t){"edit"===this.context&&this.save(),t?this.context=t:("view"===this.context&&this.parent.closeAllNotifications(),this.context="edit"===this.context?"view":"edit"),this.destroy(),this.render()},updateFromFieldField:function(){if("edit"===this.context){var e=this.el.querySelectorAll(".form-email-notification-from-field")[0];e.innerHTML="",e.disabled=!1;var t=this.el.querySelectorAll(".form-email-notification-subject-field")[0];t.innerHTML="",t.disabled=!1;var i=this.el.querySelectorAll(".form-email-notification-from-name-field")[0];i.innerHTML="",i.disabled=!1;var s,c=this.form.get("fields"),o=0,r=0,n=0,a=this.model.get("emailNotificationFromField"),d=this.model.get("emailNotificationSubjectField"),f=this.model.get("emailNotificationFromNameField");c.length>=1&&c.each(function(l){"email"===l.get("type")?(s=document.createElement("option"),s.innerHTML=l.get("slug"),s.value=l.get("slug"),l.get("slug")===a&&(s.selected=!0),e.appendChild(s),o++):"name"===l.get("type")?(s=document.createElement("option"),s.innerHTML=l.get("slug"),s.value=l.get("slug"),l.get("slug")===f&&(s.selected=!0),i.appendChild(s),r++):"single-line-text"===l.get("type")&&(s=document.createElement("option"),s.innerHTML=l.get("slug"),s.value=l.get("slug"),l.get("slug")===d&&(s.selected=!0),t.appendChild(s),n++)}),0===o&&(s=document.createElement("option"),s.innerHTML=l.noEmailFields,s.value="",e.appendChild(s),e.disabled=!0),0===r&&(s=document.createElement("option"),s.innerHTML=l.noNameFields,s.value="",i.appendChild(s),i.disabled=!0),0===n&&(s=document.createElement("option"),s.innerHTML=l.noApplicableFields,s.value="",t.appendChild(s),t.disabled=!0)}},toggleNotificationFields:function(){var e=this.el.querySelectorAll(".email-notification-from-address")[0],t=this.el.querySelectorAll(".email-notification-from-field")[0],i=this.el.querySelectorAll(".form-email-notification-from-type")[0],l=this.el.querySelectorAll(".email-notification-subject")[0],s=this.el.querySelectorAll(".email-notification-subject-field")[0],c=this.el.querySelectorAll(".form-email-notification-subject-type")[0],o=this.el.querySelectorAll(".email-notification-from-name")[0],r=this.el.querySelectorAll(".email-notification-from-name-field")[0],n=this.el.querySelectorAll(".form-email-notification-from-name-type")[0];e.style.display="none",t.style.display="none","custom"===i.value?e.style.display="block":"field"===i.value&&(t.style.display="block"),l.style.display="none",s.style.display="none","custom"===c.value?l.style.display="block":"field"===c.value&&(s.style.display="block"),o.style.display="none",r.style.display="none","custom"===n.value?o.style.display="block":"field"===n.value&&(r.style.display="block")},save:function(){if(""!==this.el.innerHTML&&"edit"===this.context){var e=this.el.querySelectorAll(".form-email-notification-title")[0].value;this.model.set("title",e);var t=this.el.querySelectorAll(".form-email-notification-content")[0].value;this.model.set("content",t);var i=this.el.querySelectorAll(".form-email-notification-active")[0].value;this.model.set("active","Yes"===i?!0:!1);var l=this.el.querySelectorAll(".form-email-notification-from-type")[0].value;this.model.set("fromType",l);var s=this.el.querySelectorAll(".form-email-notification-from-address")[0].value;this.model.set("fromAddress",s);var c=this.el.querySelectorAll(".form-email-notification-from-field")[0].value;this.model.set("fromField",c);var o=this.el.querySelectorAll(".form-email-notification-from-name-type")[0].value;this.model.set("fromNameType",o);var r=this.el.querySelectorAll(".form-email-notification-from-name")[0].value;this.model.set("fromName",r);var n=this.el.querySelectorAll(".form-email-notification-from-name-field")[0].value;this.model.set("fromNameField",n);var a=this.el.querySelectorAll(".form-email-notification-subject-type")[0].value;this.model.set("subjectType",a);var d=this.el.querySelectorAll(".form-email-notification-subject")[0].value;this.model.set("subject",d);var f=this.el.querySelectorAll(".form-email-notification-subject-field")[0].value;this.model.set("subjectField",f);for(var u=0;this.addressViews.length>u;u++)this.addressViews[u].save();return this}},render:function(){var e={context:this.context,form:this.form.toJSON()};if(this.model&&(e.notification=this.model.toJSON()),this.el.innerHTML=this.template(e),"edit"===this.context){this.toggleNotificationFields(),this.updateFromFieldField();var t=this.el.querySelectorAll(".addresses")[0],i=this.model.get("addresses");if(i.length>=1)i.each(function(e){var i=new wp.ccf.views.FormNotificationAddress({model:e,parent:this,notification:this.model,form:this.form}).render();t.appendChild(i.el),this.addressViews.push(i)},this);else{var l=new wp.ccf.models.FormNotificationAddress;i.add(l)}}var s=this.form.get("fields");return this.listenTo(s,"add",this.updateFromFieldField,this),this.listenTo(s,"remove",this.updateFromFieldField,this),this},triggerDelete:function(){this.parent.deleteNotification(this)}}),wp.ccf.views.FieldBase=wp.ccf.views.FieldBase||t.View.extend({events:{"blur input":"saveField","blur input.field-slug":"checkSlug","blur textarea":"saveField","change select":"saveField",'change input[type="checkbox"]':"saveField"},checkSlug:function(){var e=this.el.querySelectorAll(".field-slug");if(e.length>0){var t=e[0],i=!1;t.parentNode.className=t.value&&!t.value.match(/^[a-zA-Z0-9\-_]+$/)?t.parentNode.className.replace(/ field-error/i,"")+" field-error":t.parentNode.className.replace(/ field-error/i,""),this.collection.length>0&&""!==t.value?(this.collection.each(function(e){e!==this.model&&t.value===e.get("slug")&&(i=!0)},this),t.parentNode.className=i?t.parentNode.className.replace(/ field-duplicate-slug/i,"")+" field-duplicate-slug":t.parentNode.className.replace(/ field-duplicate-slug/i,"")):t.parentNode.className=t.parentNode.className.replace(/ field-duplicate-slug/i,"")}},destroy:function(){this.unbind()},render:function(){return this.el.innerHTML=this.template({field:this.model.toJSON()}),this.checkSlug(),this}}),wp.ccf.views.Fields["single-line-text"]=wp.ccf.views.Fields["single-line-text"]||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-single-line-text-template"),initialize:function(){},saveField:function(){return""!==this.el.innerHTML?(this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("description",this.el.querySelectorAll(".field-description")[0].value),this.model.set("value",this.el.querySelectorAll(".field-value")[0].value),this.model.set("placeholder",this.el.querySelectorAll(".field-placeholder")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1),this):void 0}}),wp.ccf.views.Fields.file=wp.ccf.views.Fields.file||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-file-template"),initialize:function(){},saveField:function(){return""!==this.el.innerHTML?(this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("description",this.el.querySelectorAll(".field-description")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1),this.model.set("fileExtensions",this.el.querySelectorAll(".field-file-extensions")[0].value),this.model.set("maxFileSize",this.el.querySelectorAll(".field-max-file-size")[0].value),this):void 0}}),wp.ccf.views.Fields.recaptcha=wp.ccf.views.Fields.recaptcha||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-recaptcha-template"),initialize:function(){},saveField:function(){return""!==this.el.innerHTML?(this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("description",this.el.querySelectorAll(".field-description")[0].value),this.model.set("siteKey",this.el.querySelectorAll(".field-site-key")[0].value),this.model.set("secretKey",this.el.querySelectorAll(".field-secret-key")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this):void 0}}),wp.ccf.views.Fields["section-header"]=wp.ccf.views.Fields["section-header"]||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-section-header-template"),initialize:function(){},saveField:function(){return""!==this.el.innerHTML?(this.model.set("heading",this.el.querySelectorAll(".field-heading")[0].value),this.model.set("subheading",this.el.querySelectorAll(".field-subheading")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this):void 0}}),wp.ccf.views.Fields.html=wp.ccf.views.Fields.html||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-html-template"),initialize:function(){},saveField:function(){return""!==this.el.innerHTML?(this.model.set("html",this.el.querySelectorAll(".field-html")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this):void 0}}),wp.ccf.views.Fields["paragraph-text"]=wp.ccf.views.Fields["paragraph-text"]||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-paragraph-text-template"),saveField:function(){return""!==this.el.innerHTML?(this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("description",this.el.querySelectorAll(".field-description")[0].value),this.model.set("value",this.el.querySelectorAll(".field-value")[0].value),this.model.set("placeholder",this.el.querySelectorAll(".field-placeholder")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1),this):void 0}}),wp.ccf.views.Fields.hidden=wp.ccf.views.Fields.hidden||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-hidden-template"),saveField:function(){return""!==this.el.innerHTML?(this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("value",this.el.querySelectorAll(".field-value")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this):void 0}}),wp.ccf.views.Fields.date=wp.ccf.views.Fields.date||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-date-template"),saveField:function(){if(""!==this.el.innerHTML){this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("description",this.el.querySelectorAll(".field-description")[0].value);var e=this.el.querySelectorAll(".field-value");e.length>0&&this.model.set("value",e[0].value);var t=this.el.querySelectorAll(".field-date-format");t.length&&this.model.set("dateFormat",t[0].value);var i=this.model.get("showDate"),l=this.el.querySelectorAll(".field-show-date")[0].checked?!0:!1;this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("showDate",l);var s=this.model.get("showTime"),c=this.el.querySelectorAll(".field-show-time")[0].checked?!0:!1;return this.model.set("showTime",c),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1),(c!=s||l!=i)&&this.render(),this}}}),wp.ccf.views.Fields.name=wp.ccf.views.Fields.name||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-name-template"),saveField:function(){return""!==this.el.innerHTML?(this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("description",this.el.querySelectorAll(".field-description")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1),this):void 0}}),wp.ccf.views.Fields.website=wp.ccf.views.Fields.website||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-website-template"),saveField:function(){return""!==this.el.innerHTML?(this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("description",this.el.querySelectorAll(".field-description")[0].value),this.model.set("value",this.el.querySelectorAll(".field-value")[0].value),this.model.set("placeholder",this.el.querySelectorAll(".field-placeholder")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1),this):void 0
|
2 |
+
}}),wp.ccf.views.Fields.phone=wp.ccf.views.Fields.phone||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-phone-template"),saveField:function(){return""!==this.el.innerHTML?(this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("description",this.el.querySelectorAll(".field-description")[0].value),this.model.set("value",this.el.querySelectorAll(".field-value")[0].value),this.model.set("placeholder",this.el.querySelectorAll(".field-placeholder")[0].value),this.model.set("phoneFormat",this.el.querySelectorAll(".field-phone-format")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1),this):void 0}}),wp.ccf.views.Fields.address=wp.ccf.views.Fields.address||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-address-template"),saveField:function(){return""!==this.el.innerHTML?(this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("description",this.el.querySelectorAll(".field-description")[0].value),this.model.set("addressType",this.el.querySelectorAll(".field-address-type")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1),this):void 0}}),wp.ccf.views.Fields.email=wp.ccf.views.Fields.email||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-email-template"),saveField:function(){if(""!==this.el.innerHTML){this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("description",this.el.querySelectorAll(".field-description")[0].value);var e=this.el.querySelectorAll(".field-value");e.length&&this.model.set("value",e[0].value);var t=this.el.querySelectorAll(".field-placeholder");t.length&&this.model.set("placeholder",t[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1);var i=1==this.el.querySelectorAll(".field-email-confirmation")[0].value?!0:!1,l=this.model.get("emailConfirmation");return this.model.set("emailConfirmation",i),l!=i&&this.render(),this}}}),wp.ccf.views.ChoiceableField=wp.ccf.views.ChoiceableField||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-dropdown-template"),initialize:function(){var e=this.model.get("choices");this.listenTo(e,"add",this.addChoice)},addChoice:function(e){var t=new wp.ccf.views.FieldChoice({model:e,field:this.model}).render(),i=this.el.querySelectorAll(".repeatable-choices")[0];i.appendChild(t.el)},saveField:function(){if(""!==this.el.innerHTML){this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("description",this.el.querySelectorAll(".field-description")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1);var t=this.el.querySelectorAll(".repeatable-choices")[0].querySelectorAll(".choice");return i.each(t,function(t){e(t).trigger("saveChoice")}),this}},render:function(){var t=this;t.el.innerHTML=t.template({field:t.model.toJSON()}),t.checkSlug();var i=t.model.get("choices"),l=this.el.querySelectorAll(".repeatable-choices")[0];if(i.length>=1)i.each(function(e){var i=new wp.ccf.views.FieldChoice({model:e,field:t.model}).render();l.appendChild(i.el)});else{var s=new wp.ccf.models.FieldChoice;i.add(s)}return l=this.el.querySelectorAll(".repeatable-choices")[0],e(l).sortable({handle:".move",axis:"y",stop:function(e,t){t.item.trigger("sorted",t.item.index())}}),t}}),wp.ccf.views.Fields.dropdown=wp.ccf.views.Fields.dropdown||wp.ccf.views.ChoiceableField.extend({template:wp.ccf.utils.template("ccf-dropdown-template"),events:function(){return this.constructor.__super__.events}}),wp.ccf.views.Fields.radio=wp.ccf.views.Fields.radio||wp.ccf.views.ChoiceableField.extend({template:wp.ccf.utils.template("ccf-radio-template"),events:function(){return this.constructor.__super__.events}}),wp.ccf.views.Fields.checkboxes=wp.ccf.views.Fields.checkboxes||wp.ccf.views.ChoiceableField.extend({template:wp.ccf.utils.template("ccf-checkboxes-template"),events:function(){return this.constructor.__super__.events}}),wp.ccf.views.FieldSidebar=wp.ccf.views.FieldSidebar||t.View.extend({initialize:function(e){this.currentFieldView=null,this.form=e.form},save:function(e){this.currentFieldView&&""!==this.currentFieldView.el.innerHTML&&this.currentFieldView.saveField(),e&&e instanceof Object&&e.resolve()},fieldRemoved:function(){this.currentFieldView&&(this.form.get("fields").get(this.currentFieldView.model)||this.render())},destroy:function(){wp.ccf.dispatcher.off("saveField",this.save),wp.ccf.dispatcher.off("mainViewChange",this.save),this.unbind()},render:function(e){var t={};if(e){var i=e.get("type");this.currentFieldView&&(this.currentFieldView.saveField(),this.currentFieldView.destroy&&this.currentFieldView.destroy()),this.currentFieldView=new wp.ccf.views.Fields[i]({model:e,collection:this.form.get("fields")}),this.currentFieldView.render(),this.el.innerHTML="",this.el.appendChild(this.currentFieldView.el);var l=this.form.get("fields");this.listenTo(l,"remove",this.fieldRemoved)}else{var s=wp.ccf.utils.template("ccf-empty-field-template");this.el.innerHTML=s(t)}return wp.ccf.dispatcher.on("saveField",this.save,this),wp.ccf.dispatcher.on("mainViewChange",this.save,this),this}}),wp.ccf.views.FieldRowPlaceholder=wp.ccf.views.FieldRowPlaceholder||t.View.extend({template:wp.ccf.utils.template("ccf-field-row-template"),tagName:"div",className:"field",initialize:function(e){this.type=e.type},render:function(){return this.el.innerHTML=this.template({label:l.allLabels[this.type]}),this.el.setAttribute("data-field-type",this.type),this.el.className+=" "+this.type,this}}),wp.ccf.views.FieldRow=wp.ccf.views.FieldRow||t.View.extend({template:wp.ccf.utils.template("ccf-field-row-template"),tagName:"div",className:"field",events:{"click .delete":"triggerDelete","click h4":"triggerEdit",sorted:"triggerUpdateSort"},initialize:function(e){i.bindAll(this,"triggerDelete"),this.form=e.form,this.listenTo(this.model,"change",this.handleChange,this),this.listenTo(this.model,"requirementsNotMet",this.requirementsNotMet,this),this.listenTo(this.model,"requirementsMet",this.requirementsMet,this),this.listenTo(this.model,"duplicateSlug",this.duplicateSlug,this),this.model.attributes.choices&&this.listenTo(this.model.attributes.choices,"change",this.handleChange,this)},duplicateSlug:function(){this.requirementsMet(),this.el.className+=" field-duplicate-slug"},requirementsNotMet:function(){this.requirementsMet(),this.el.className+=" field-incomplete"},requirementsMet:function(){this.el.className=this.el.className.replace(/(field-incomplete|field-duplicate-slug)/i,"")},triggerUpdateSort:function(e,t){this.form.get("fields").remove(this.model),this.form.get("fields").add(this.model,{at:t})},handleChange:function(){this.render()},triggerDelete:function(e){e.stopPropagation(),this.form.get("fields").remove(this.model),this.undelegateEvents(),this.remove()},triggerEdit:function(){var e=this.el.parentNode.querySelectorAll(".ccf-editing");i.each(e,function(e){e.className=e.className.replace(/ccf-editing/i,"")}),this.el.className=this.el.className.replace(/ccf-editing/i,"")+" ccf-editing",wp.ccf.dispatcher.trigger("openEditField",this.model)},render:function(e){this.el.innerHTML=this.template({label:l.allLabels[this.model.get("type")]}),this.el.setAttribute("data-field-type",this.model.get("type"));var t=RegExp(" "+this.model.get("type"),"i");this.el.className=this.el.className.replace(t,"")+" "+this.model.get("type"),e&&(this.el.className=this.el.className.replace(/ instantiated/i,"")+" instantiated");var i=document.getElementById("ccf-"+this.model.get("type")+"-preview-template");if(i){var s=this.el.querySelectorAll(".preview")[0];s.style.display="block",s.innerHTML=wp.ccf.utils.template("ccf-"+this.model.get("type")+"-preview-template")({field:this.model.toJSON()})}return this}}),wp.ccf.views.FormSettings=wp.ccf.views.FormSettings||t.View.extend({template:wp.ccf.utils.template("ccf-form-settings-template"),events:{"blur input":"save","change select":"save","change select.form-completion-action-type":"toggleCompletionFields","change select.form-pause":"togglePauseFields","click .add-notification":"triggerAddNotification"},notificationViews:[],initialize:function(e){this.model=e.form,this.notificationViews=[];var t=this.model.get("notifications");this.listenTo(t,"add",this.addNotification)},triggerAddNotification:function(){var e=this.model.get("notifications");e.add(new wp.ccf.models.FormNotification)},closeAllNotifications:function(){i.each(this.notificationViews,function(e){e.changeContext(null,"view")})},addNotification:function(e){var t=new wp.ccf.views.ExistingFormNotificationRow({model:e,form:this.model,context:"edit",parent:this}).render(),l=this.el.querySelectorAll(".ccf-form-notifications .rows")[0];l.querySelectorAll(".no-notifications").length>0&&l.removeChild(l.firstChild),i.each(this.notificationViews,function(e){e.changeContext(null,"view")}),this.notificationViews.push(t),l.appendChild(t.el)},toggleCompletionFields:function(){var e=this.el.querySelectorAll(".form-completion-action-type")[0].value,t=this.el.querySelectorAll(".completion-message")[0],i=this.el.querySelectorAll(".completion-redirect-url")[0];"text"===e?(t.style.display="block",i.style.display="none"):(t.style.display="none",i.style.display="block")},togglePauseFields:function(){var e=this.el.querySelectorAll(".form-pause")[0].value,t=this.el.querySelectorAll(".pause-message")[0];t.style.display=parseInt(e)?"block":"none"},save:function(){if(""!==this.el.innerHTML){var e=this.el.querySelectorAll(".form-title")[0].value;this.model.set("title",{raw:e});var t=this.el.querySelectorAll(".form-description")[0].value;this.model.set("description",t);var i=this.el.querySelectorAll(".form-button-text")[0].value;this.model.set("buttonText",i);var l=this.el.querySelectorAll(".form-pause")[0].value;this.model.set("pause",parseInt(l)?!0:!1);var s=this.el.querySelectorAll(".form-pause-message")[0].value;this.model.set("pauseMessage",s);var c=this.el.querySelectorAll(".form-completion-message")[0].value;this.model.set("completionMessage",c);var o=this.el.querySelectorAll(".form-completion-redirect-url")[0].value;this.model.set("completionRedirectUrl",o);var r=this.el.querySelectorAll(".form-completion-action-type")[0].value;this.model.set("completionActionType",r)}},fullSave:function(e){""!==this.el.innerHTML&&(this.save(),i.each(this.notificationViews,function(e){e.save()}),e!==void 0&&e.promise!==void 0&&e.resolve())},destroy:function(){wp.ccf.dispatcher.off("saveFormSettings",this.fullSave),wp.ccf.dispatcher.off("mainViewChange",this.fullSave)},deleteNotification:function(e){if(i.each(this.notificationViews,function(t){if(e.cid===t.cid){var l=i.indexOf(this.notificationViews,t);this.model.get("notifications").remove(e.model),this.notificationViews[l].remove(),this.notificationViews.splice(l,1)}},this),!this.notificationViews.length){var t=this.el.querySelectorAll(".ccf-form-notifications .rows")[0];t.appendChild(new wp.ccf.views.EmptyFormNotificationTableRow({form:this.model}).render().el)}},render:function(){var e={form:this.model.toJSON()};this.model.get("fields");var t=this.model.get("notifications");this.el.innerHTML=this.template(e),this.toggleCompletionFields(),this.togglePauseFields();var i=this.el.querySelectorAll(".ccf-form-notifications .rows")[0],l=document.createElement("tbody");return l.className="rows",t.length>=1?t.each(function(e){var t=new wp.ccf.views.ExistingFormNotificationRow({model:e,form:this.model,parent:this}).render();l.appendChild(t.el),this.notificationViews.push(t)},this):l.appendChild(new wp.ccf.views.EmptyFormNotificationTableRow({form:this.model}).render().el),i.parentNode.replaceChild(l,i),wp.ccf.dispatcher.on("mainViewChange",this.fullSave,this),wp.ccf.dispatcher.on("saveFormSettings",this.fullSave,this),this}}),wp.ccf.views.FormPane=wp.ccf.views.FormPane||t.View.extend(i.defaults({template:wp.ccf.utils.template("ccf-form-pane-template"),subViews:{"field-sidebar":wp.ccf.views.FieldSidebar,"form-settings":wp.ccf.views.FormSettings},events:{"click .save-button":"sync","click .signup-button":"signup","click .accordion-heading":"accordionClick","click .form-settings-heading":"accordionClick","click .insert-form-button":"insertForm"},initialize:function(){wp.ccf.dispatcher.on("openEditField",this.openEditField,this)},insertForm:function(){wp.ccf.utils.insertFormShortcode(this.model),wp.ccf.toggle()},signup:function(){var t=this.el.querySelectorAll(".email-signup-field")[0].value,i=this.el.querySelectorAll(".bottom .left.signup")[0];i.className="left signup",t?e.ajax({url:"//taylorlovett.us8.list-manage.com/subscribe/post-json?u=66118f9a5b0ab0414e83f043a&id=b4ed816a24&c=?",method:"post",dataType:"jsonp",data:{EMAIL:t}}).done(function(){i.className="left signup signup-success"}):i.className="left signup signup-error"},accordionClick:function(t){var l=e(t.currentTarget).parents(".accordion-container")[0],s=l.querySelectorAll(".accordion-section");t.currentTarget.parentNode.className.match(/expanded/i)?t.currentTarget.parentNode.className=t.currentTarget.parentNode.className.replace(/expanded/i,""):t.currentTarget.parentNode.className+=" expanded",i.each(s,function(e){e!=t.currentTarget.parentNode&&e.className.match(/expanded/i)&&(e.className=e.className.replace(/expanded/i,""))}),t.currentTarget.className.match(/form-settings-heading/i)?this.el.className.match(/show-form-settings/i)?this.el.className=this.el.className.replace(/show-form-settings/i,""):this.el.className+=" show-form-settings":this.el.className=this.el.className.replace(/show-form-settings/i,"")},openEditField:function(e){this.renderedSubViews["field-sidebar"].render(e).el.style.display="block"},disable:function(){this.el.querySelectorAll(".save-button")[0].setAttribute("disabled","disabled"),this.el.querySelectorAll(".disabled-overlay")[0].style.display="block"},enable:function(){this.el.querySelectorAll(".save-button")[0].removeAttribute("disabled"),this.el.querySelectorAll(".disabled-overlay")[0].style.display="none"},sync:function(){var t=this,i=e(this.el.querySelectorAll(".spinner")[0]);i.fadeIn(),t.disable();var s=e.Deferred(),c=e.Deferred();wp.ccf.dispatcher.trigger("saveFormSettings",s),wp.ccf.dispatcher.trigger("saveField",c),e.when(s,c).then(function(){var e=t.model.get("fields"),s=!0,c={};e.each(function(e){var t=e.get("slug");e.hasRequiredAttributes()?t&&!t.match(/^[a-zA-Z0-9\-_]+$/)?(s=!1,e.trigger("requirementsNotMet")):c[e.get("slug")]!==void 0?(s=!1,e.trigger("duplicateSlug"),c[e.get("slug")].trigger("duplicateSlug")):e.trigger("requirementsMet"):(s=!1,e.trigger("requirementsNotMet")),e.get("slug")&&(c[e.get("slug")]=e)}),s?t.model.save({},{context:"edit"}).error(function(){var e="sync";wp.ccf.errorModal.render(e).show()}).done(function(){l.single&&!l.postId&&(window.location=l.adminUrl+"post.php?post="+t.model.get("id")+"&action=edit#ccf-form/"+t.model.get("id"))}).complete(function(){i.fadeOut(),t.enable(),wp.ccf.dispatcher.trigger("saveFormComplete",t.model)}):(t.enable(),i.fadeOut())})},enableDisableInsert:function(){var e=this.el.querySelectorAll(".insert-form-button")[0];this.model.get("id")?e.removeAttribute("disabled"):e.setAttribute("disabled","disabled")},getNextFieldOrd:function(){var e=this.model.get("fields"),t=e.length+1;return e.each(function(e){var i=e.get("slug"),l=/\-([0-9]+)$/g,s=l.exec(i);if(s&&s[1]){var c=parseInt(s[1]);c>=t&&(t=c+1)}}),t},render:function(t){var s=this;s.model=t?t:new wp.ccf.models.Form,this.listenTo(s.model,"change",this.enableDisableInsert,this);var c={labels:l.fieldLabels,form:s.model.toJSON()};window.form=s.model,s.el.innerHTML=this.template(c),s.el.className=s.el.className.replace(/show-form-settings/i,"");var o=s.el.querySelectorAll(".fields")[0];i.each(l.fieldLabels,function(e,t){o.appendChild(new wp.ccf.views.FieldRowPlaceholder({type:t}).render().el)});var r=s.el.querySelectorAll(".structure-fields")[0];i.each(l.structureFieldLabels,function(e,t){r.appendChild(new wp.ccf.views.FieldRowPlaceholder({type:t}).render().el)});var n=s.el.querySelectorAll(".special-fields")[0];i.each(l.specialFieldLabels,function(e,t){n.appendChild(new wp.ccf.views.FieldRowPlaceholder({type:t}).render().el)});var a=s.model.get("fields"),d=s.el.querySelectorAll(".form-content")[0],f=e(d);return e(s.el.querySelectorAll(".left-sidebar")[0].querySelectorAll(".field")).draggable({cursor:"move",distance:2,zIndex:160001,scroll:!1,containment:"document",appendTo:".ccf-main-modal",snap:!1,connectToSortable:".form-content",helper:function(t){var i=e(t.currentTarget),l=e('<div class="field" data-field-type="'+i.attr("data-field-type")+'"><h4>'+i.find(".label").html()+"</h4></div>");return l.css({width:f.width(),opacity:".75",height:i.height()})}}),a.length>=1&&(d.innerHTML="",a.each(function(e){var t=new wp.ccf.views.FieldRow({model:e,form:s.model}).render(!0).el;d.appendChild(t)})),e(d).sortable({axis:"y",distance:2,handle:"h4",placeholder:"field-placeholder",stop:function(e,t){if(!t.item.hasClass("instantiated")){var i=t.item.attr("data-field-type"),l={};wp.ccf.models.Fields[i].prototype.defaults().slug!==void 0&&(l.slug=i+"-"+s.getNextFieldOrd());var c=new wp.ccf.models.Fields[i](l),o=s.model.get("fields");o.add(c),new wp.ccf.views.FieldRow({model:c,el:t.item,form:s.model}).render(!0),t.item.attr("style","")}t.item.trigger("sorted",t.item.index())}}),s.initRenderSubViews(!1,!0,{form:s.model}),s.enableDisableInsert(),s}},wp.ccf.mixins.subViewable)),wp.ccf.views.ExistingFormTableRow=wp.ccf.views.ExistingFormTableRow||t.View.extend({tagName:"tr",template:wp.ccf.utils.template("ccf-existing-form-table-row-template"),events:{"click .edit":"triggerMainViewChange","click .delete":"triggerDelete","click .insert-form-button":"insertForm"},initialize:function(e){this.parent=e.parent},insertForm:function(){wp.ccf.utils.insertFormShortcode(this.model),wp.ccf.toggle()},triggerMainViewChange:function(){wp.ccf.switchToForm(this.model)},triggerDelete:function(){var e,t=this,i=t.parent.collection.state.currentPage;t.model.destroy().done(function(){e=i,e===t.parent.collection.state.totalPages&&e-1===(t.parent.collection.state.totalObjects-1)/l.postsPerPage&&e--,t.parent.showPage(e).done(function(){t.parent.renderPagination()})})},render:function(){return this.$el.html(this.template({form:this.model.toJSON(),utils:{getPrettyPostDate:wp.ccf.utils.getPrettyPostDate}})),this}}),wp.ccf.views.EmptyFormTableRow=wp.ccf.views.EmptyFormTableRow||t.View.extend({tagName:"tr",template:wp.ccf.utils.template("ccf-empty-form-table-row-template"),render:function(){return this.$el.html(this.template()),this}}),wp.ccf.views.ExistingFormTable=wp.ccf.views.ExistingFormTable||t.View.extend({template:wp.ccf.utils.template("ccf-existing-form-table-template"),initialize:function(){this.parent=arguments.parent,this.collection=new wp.ccf.collections.Forms,wp.ccf.dispatcher.on("changeFormTablePage",this.showPage,this),wp.ccf.dispatcher.on("saveFormComplete",this.render,this)},showPage:function(e){var t=this,i=this.collection.fetch({data:{page:e}});return i.error(function(){var e="sync";wp.ccf.errorModal.render(e).show()}),i.done(function(){var e=t.el.querySelectorAll(".rows")[0],i=document.createElement("tbody");i.className="rows",t.collection.length>=1?t.collection.each(function(e){var l=new wp.ccf.views.ExistingFormTableRow({model:e,parent:t}).render();i.appendChild(l.el)},t):i.appendChild((new wp.ccf.views.EmptyFormTableRow).render().el),e.parentNode.replaceChild(i,e)}),i},renderPagination:function(){var e=this.el.querySelectorAll(".ccf-pagination")[0];e.innerHTML="",this.collection.state.totalPages>1&&e.appendChild(new wp.ccf.views.Pagination({parent:this}).render(this.collection.state.totalPages,this.collection.state.currentPage).el)},render:function(){var e=this;return this.el.innerHTML=this.template(),this.el.querySelectorAll(".ccf-pagination")[0],this.showPage(1).done(function(){e.renderPagination()}),this}}),wp.ccf.views.ExistingFormPane=wp.ccf.views.ExistingFormPane||t.View.extend(i.defaults({template:wp.ccf.utils.template("ccf-existing-form-pane-template"),subViews:{"existing-form-table":wp.ccf.views.ExistingFormTable},render:function(){return this.rendered?this:(this.rendered=!0,this.el.innerHTML=this.template(),this.initRenderSubViews(!0),this)}},wp.ccf.mixins.subViewable)),wp.ccf.views.MainModal=wp.ccf.views.MainModal||t.View.extend(i.defaults({tagName:"div",className:"ccf-main-modal",template:wp.ccf.utils.template("ccf-main-modal-template"),events:{"click .close-icon":"hide","click .main-menu a":"menuClick"},subViews:{"form-pane":wp.ccf.views.FormPane},initialize:function(){l.single||(this.subViews["existing-form-pane"]=wp.ccf.views.ExistingFormPane),wp.ccf.dispatcher.on("mainViewChange",this.toggleView,this)},toggleView:function(e){this.showView(e,wp.ccf.currentForm);var t=e;"form-pane"===e&&wp.ccf.currentForm&&(t="existing-form-pane");var l=this.el.querySelectorAll(".menu-item");i.each(l,function(e){var i=e.getAttribute("data-view");e.className=i===t?e.className.replace("selected","")+" selected":e.className.replace("selected","")})},menuClick:function(e){var t=e.target.getAttribute("data-view");"form-pane"===t&&(wp.ccf.currentForm=null),wp.ccf.dispatcher.trigger("mainViewChange",t),e.preventDefault()},render:function(e){return e=e||!1,this.overlay(),this.el.innerHTML=this.template({single:e}),this.initRenderSubViews(),this.showView("form-pane",wp.ccf.currentForm,!0),this},overlay:function(){return this.overlayEl===void 0&&(this.overlayEl=document.createElement("div"),this.overlayEl.className="ccf-main-modal-overlay",document.body.appendChild(this.overlayEl)),this.overlayEl},remove:function(){return document.body.removeChild(this.overlay()),this},show:function(){e(this.overlay()).show(),this.$el.show()},hide:function(){e(this.overlay()).hide(),this.$el.hide()}},wp.ccf.mixins.subViewable)),wp.ccf.views.SubmissionRow=wp.ccf.views.SubmissionRow||t.View.extend({tagName:"tr",template:wp.ccf.utils.template("ccf-submission-row-template"),events:{"click .view":"view","click .delete":"delete"},initialize:function(e){this.parent=e.parent},"delete":function(){var e,t=this,i=t.parent.collection.state.currentPage;t.model.destroy().done(function(){e=i,e===t.parent.collection.state.totalPages&&e-1===(t.parent.collection.state.totalObjects-1)/l.postsPerPage&&e--,t.parent.showPage(e).done(function(){t.parent.renderPagination()})})},view:function(e){var t=e.currentTarget.getAttribute("data-submission-id"),i=e.currentTarget.getAttribute("data-submission-date");tb_show(l.thickboxTitle+" - "+wp.ccf.utils.getPrettyPostDate(i),"#TB_inline?height=500&width=700&inlineId=ccf-submission-content-"+parseInt(t),null)},render:function(){return this.$el.html(this.template({submission:this.model.toJSON(),currentColumns:this.parent.columns,columns:wp.ccf.currentForm.getFieldSlugs(!0),utils:{getPrettyPostDate:wp.ccf.utils.getPrettyPostDate,wordChop:wp.ccf.utils.wordChop,isFieldDate:wp.ccf.utils.isFieldDate,isFieldName:wp.ccf.utils.isFieldName,isFieldFile:wp.ccf.utils.isFieldFile,isFieldAddress:wp.ccf.utils.isFieldAddress,isFieldEmailConfirm:wp.ccf.utils.isFieldEmailConfirm,getPrettyFieldDate:wp.ccf.utils.getPrettyFieldDate,getPrettyFieldAddress:wp.ccf.utils.getPrettyFieldAddress,getPrettyFieldName:wp.ccf.utils.getPrettyFieldName,getPrettyFieldEmailConfirm:wp.ccf.utils.getPrettyFieldEmailConfirm}})),this}}),wp.ccf.views.SubmissionsTable=wp.ccf.views.SubmissionsTable||t.View.extend({template:wp.ccf.utils.template("ccf-submission-table-template"),events:{"click .prev:not(.disabled)":"previousPage","click .next:not(.disabled)":"nextPage","click .first:not(.disabled)":"firstPage","click .last:not(.disabled)":"lastPage"},initialize:function(){this.collection=new wp.ccf.collections.Submissions({},{formId:l.postId}),wp.ccf.dispatcher.on("submissionTableRebuild",this.render,this)},showPage:function(e){var t=this,i=this.collection.fetch({data:{page:e}});return i.error(function(){var e="sync";wp.ccf.errorModal.render(e).show()}),i.done(function(){var e=t.el.querySelectorAll(".submission-rows")[0],i=document.createElement("tbody");i.className="submission-rows",t.collection.length>=1?t.collection.each(function(e){var l=new wp.ccf.views.SubmissionRow({model:e,parent:t}).render();i.appendChild(l.el)},t):i.appendChild(new wp.ccf.views.EmptySubmissionTableRow({parent:t}).render(wp.ccf.currentForm.getFieldSlugs(!0).concat("date")).el),e.parentNode.replaceChild(i,e)}),i},renderPagination:function(){var e=this.el.querySelectorAll(".ccf-pagination")[0];e.innerHTML="",this.collection.state.totalPages>1&&e.appendChild(new wp.ccf.views.Pagination({parent:this}).render(this.collection.state.totalPages,this.collection.state.currentPage).el)},render:function(e){var t=this;return t.columns=e?e:wp.ccf.currentForm.getFieldSlugs(!0).slice(0,4).concat("date"),1>t.columns.length?t.el.innerHTML="":(t.el.innerHTML=t.template({columns:t.columns}),t.el.querySelectorAll(".ccf-pagination")[0],t.showPage(1).done(function(){t.renderPagination()})),t}}),wp.ccf.views.ErrorModal=wp.ccf.views.ErrorModal||t.View.extend({template:wp.ccf.utils.template("ccf-error-modal-template"),tagName:"div",className:"ccf-error-modal",events:{"click .close":"hide"},hide:function(){this.el.className=this.el.className.replace(" show","")},show:function(){this.el.className=this.el.className.replace(" show","")+" show"},toggle:function(){this.el.className.match(" show")?this.hide():this.show()},render:function(e){var t={messageType:""};return e&&(t.messageType=e),this.el.innerHTML=this.template(t),this}}),wp.ccf.views.Pagination=wp.ccf.views.Pagination||t.View.extend({template:wp.ccf.utils.template("ccf-pagination-template"),events:{"click .prev:not(.disabled)":"previousPage","click .next:not(.disabled)":"nextPage","click .first:not(.disabled)":"firstPage","click .last:not(.disabled)":"lastPage"},initialize:function(e){this.parent=e.parent},previousPage:function(){var e=this;e.parent.showPage(e.parent.collection.state.currentPage-1).done(function(){e.render()})},nextPage:function(){var e=this;e.parent.showPage(e.parent.collection.state.currentPage+1).done(function(){e.render()})},firstPage:function(){var e=this;e.parent.showPage(1).done(function(){e.render()})},lastPage:function(){var e=this;e.parent.showPage(e.parent.collection.state.totalPages).done(function(){e.render()})},render:function(){return this.el.innerHTML=this.template({totalPages:this.parent.collection.state.totalPages,currentPage:this.parent.collection.state.currentPage,totalObjects:this.parent.collection.state.totalObjects}),this}}),wp.ccf.views.EmptySubmissionTableRow=wp.ccf.views.EmptySubmissionTableRow||t.View.extend({tagName:"tr",template:wp.ccf.utils.template("ccf-no-submissions-row-template"),initialize:function(e){this.parent=e.parent},render:function(){return this.el.innerHTML=this.template({columns:this.parent.columns}),this}}),wp.ccf.views.SubmissionColumnController=wp.ccf.views.SubmissionColumnController||t.View.extend({template:wp.ccf.utils.template("ccf-submissions-controller-template"),events:{"click input[type=checkbox]":"triggerTableRebuild"},render:function(){this.el.innerHTML=this.template({columns:wp.ccf.currentForm.getFieldSlugs(!0).concat("date")})},triggerTableRebuild:function(){var e=[],t=document.querySelectorAll(".submission-column-checkbox");if(t.length>=1)for(var i=0;t.length>i;i++)t[i].checked&&e.push(t[i].value);wp.ccf.dispatcher.trigger("submissionTableRebuild",e)}})}(jQuery,Backbone,_,ccfSettings),function(e,t){"use strict";wp.ccf.router=wp.ccf.router||t.Router.extend({routes:{"ccf-form":"open","ccf-form/:formId":"open"},open:function(e){wp.ccf.show(e)}})}(jQuery,Backbone,_,ccfSettings),function(e,t,i,l){"use strict";wp.ccf=i.defaults(wp.ccf,{forms:new wp.ccf.collections.Forms,currentForm:null,errorModal:null,_currentFormDeferred:null,dispatcher:{},show:function(e){return this.switchToForm(e),this.instance.show(),this.instance},initErrorModal:function(){this.errorModal=(new wp.ccf.views.ErrorModal).render();var e=document.getElementsByTagName("body")[0];e.appendChild(this.errorModal.el)},switchToForm:function(e){var t=this;if(+e===parseInt(e)){var i=parseInt(e);if(e=t.forms.findWhere({id:parseInt(i)}),!e){var l;return t.forms.formsFetching[i]!==void 0?(l=t.forms.formsFetching[i],e=null):(e=new wp.ccf.models.Form({id:i}),l=e.fetch(),t.forms.formsFetching[i]=l),l.done(function(){e?(delete t.forms.formsFetching[i],t.forms.add(e)):e=t.forms.findWhere({id:i}),t.currentForm=e,wp.ccf.dispatcher.trigger("mainViewChange","form-pane")}),l}t.currentForm=e,wp.ccf.dispatcher.trigger("mainViewChange","form-pane")}else t.currentForm=e,wp.ccf.dispatcher.trigger("mainViewChange","form-pane");return!0},hide:function(){return this.instance.hide(),this.instance},toggle:function(e){return this.switchToForm(e),this.instance.$el.is(":visible")?this.instance.hide():this.instance.show(),this.instance},createSubmissionsTable:function(e){var t=document.querySelectorAll(".ccf-submission-column-controller"),i=new wp.ccf.views.SubmissionsTable({el:e});i.render(),t&&new wp.ccf.views.SubmissionColumnController({el:t}).render()},_setupMainModal:function(e){return this.instance=(new wp.ccf.views.MainModal).render(e),document.getElementsByTagName("body")[0].appendChild(this.instance.el),t.history.start(),this.instance},createManager:function(){var s=this,c=document.querySelectorAll(".ccf-open-form-manager")[0];if(!c)return!1;i.extend(this.dispatcher,t.Events),new wp.ccf.router,s.initErrorModal();var o=!1;if(l.single)if(o=!0,l.postId){var r=parseInt(l.postId);if(s.forms.formsFetching[r]===void 0){var n=new wp.ccf.models.Form({id:r}),a=n.fetch();s.forms.formsFetching[r]=a,s._currentFormDeferred=a,a.done(function(){delete s.forms.formsFetching[r],s.forms.add(n),s.currentForm=n})}else s._currentFormDeferred=s.forms.formsFetching[r],s._currentFormDeferred.done(function(){s.currentForm=s.forms.findWhere({id:r})});e.when(s._currentFormDeferred).then(function(){s._setupMainModal(!0),c.style.display="inline-block";var e=document.getElementById("ccf-submissions");if(e){var t=e.querySelectorAll(".inside")[0],i=document.createElement("div");i.className="ccf-submission-icon",i.setAttribute("data-icon","");var o=document.createElement("a");o.href="?action=edit&post="+parseInt(l.postId)+"&download_submissions=1&download_submissions_nonce="+l.downloadSubmissionsNonce,o.className="ccf-submission-icon",o.setAttribute("data-icon","");var r=document.getElementById("show-settings-link");i.onclick=function(){r.click()},e.insertBefore(i,e.firstChild.nextSibling.nextSibling),e.insertBefore(o,e.firstChild.nextSibling.nextSibling),wp.ccf.createSubmissionsTable(t)}})}else s._setupMainModal(!0),c.style.display="inline-block";else s._setupMainModal();var d=function(e){e=e||window.event;var t=e.currentTarget?e.currentTarget:e.srcElement,i=t.getAttribute("data-form-id");wp.ccf.toggle(i)};c.addEventListener?c.addEventListener("click",d,!1):c.attachEvent("onclick",d)}}),wp.ccf.createManager()}(jQuery,Backbone,_,ccfSettings);
|
build/js/form.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
(function(e,t){"use strict";window.wp=window.wp||{},wp.ccf=wp.ccf||{},wp.ccf.validators=wp.ccf.validators||{};var i={},l={};window.ccfRecaptchaOnload=function(){for(var e=document.querySelectorAll(".ccf-recaptcha-wrapper"),l=function(l){grecaptcha.render(e[s],{sitekey:e[s].getAttribute("data-sitekey"),theme:t.recaptcha_theme,callback:function(){i[l]=!0}})},s=0;e.length>s;s++){var r=e[s].getAttribute("data-form-id");l(r)}};var s=function(e){if(this.wrapper=e,this.errors={},e.className.match(" field-required")){this.inputs=this.wrapper.querySelectorAll(".field-input");var i=this.wrapper.querySelectorAll(".error");i.length&&i[0].parentNode.removeChild(i[0]);var l=!1;if(_.each(this.inputs,function(e){(e.checked&&e.value||e.selected)&&(l=!0)}),!l){this.errors[this.inputs[this.inputs.length-1].getAttribute("name")]={required:!0};var s=document.createElement("div");s.className="error required-error",s.innerHTML=t.required,e.appendChild(s)}}},r=function(e,i){return function(l){this.wrapper=l,this.inputs=this.wrapper.querySelectorAll(".field-input"),this.errors={};for(var s=this.wrapper.querySelectorAll(".error"),r=s.length-1;r>=0;r--)s[r].parentNode.removeChild(s[r]);_.each(this.inputs,function(t){var i=t.getAttribute("name");this.errors[i]={},t.getAttribute("aria-required")&&""===t.value&&(this.errors[i].required=t),e&&e.call(this,t)},this),i&&i.call(this);var c;for(var o in this.errors)if(this.errors.hasOwnProperty(o))for(var n in this.errors[o])c=document.createElement("div"),c.className="error "+n+"-error",c.setAttribute("data-field-name",o),c.innerHTML=t[n],this.errors[o][n].parentNode.insertBefore(c,this.errors[o][n].nextSibling)}};wp.ccf.validators["single-line-text"]=wp.ccf.validators["single-line-text"]||r(),wp.ccf.validators["paragraph-text"]=wp.ccf.validators["paragraph-text"]||r(),wp.ccf.validators.name=wp.ccf.validators.name||r(),wp.ccf.validators.email=wp.ccf.validators.email||r(!1,function(){var e=this.inputs[0].value;if(e){2===this.inputs.length&&e!==this.inputs[1].value&&(this.errors[this.inputs[0].getAttribute("name")].match=this.wrapper.lastChild);var t=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;t.test(e)||(this.errors[this.inputs[0].getAttribute("name")].email=this.wrapper.lastChild)}}),wp.ccf.validators.recaptcha=wp.ccf.validators.recaptcha||function(e,l){this.wrapper=e,this.inputs=this.wrapper.querySelectorAll(".g-recaptcha-response"),this.errors={};for(var s=this.wrapper.querySelectorAll(".error"),r=s.length-1;r>=0;r--)s[r].parentNode.removeChild(s[r]);i[l]||(this.errors["g-recaptcha-response"]={},this.errors["g-recaptcha-response"].recaptcha=this.wrapper.lastChild);var c;for(var o in this.errors)if(this.errors.hasOwnProperty(o))for(var n in this.errors[o])c=document.createElement("div"),c.className="error "+n+"-error",c.setAttribute("data-field-name",o),c.innerHTML=t[n],this.errors[o][n].parentNode.insertBefore(c,this.errors[o][n].nextSibling)},wp.ccf.validators.phone=wp.ccf.validators.phone||r(!1,function(){var e=this.inputs[0].value;if(e){var t=/^[0-9+.)(\- ]+$/;if(t.test(e)){if("us"===this.wrapper.getAttribute("data-phone-format")){var i=e.replace(/[^0-9]/gi,"");10!==i.length&&(this.errors[this.inputs[0].getAttribute("name")].digits=this.wrapper.lastChild)}}else this.errors[this.inputs[0].getAttribute("name")].phone=this.wrapper.lastChild}}),wp.ccf.validators.date=wp.ccf.validators.date||function(e){this.wrapper=e,this.errors={},this.inputs=this.wrapper.querySelectorAll(".field-input");for(var i=this.wrapper.querySelectorAll(".error"),l=i.length-1;l>=0;l--)i[l].parentNode.removeChild(i[l]);var s;_.each(this.inputs,function(i){var l=i.getAttribute("name");if(this.errors[l]={},i.getAttribute("aria-required")&&""===i.value&&(this.errors[l].required=!0,s=document.createElement("div"),s.className="error required-error",1===this.inputs.length?(s.innerHTML=t.required,s.className+=" right-error",i.parentNode.insertBefore(s,i.nextSibling)):(s.innerHTML=t[l.replace(/.*\[(.*?)\]/i,"$1")+"_required"],e.appendChild(s))),""!==i.value){var r=l.replace(/^.*\[(.*?)\]$/,"$1");"date"===r?i.value.match(/^([0-9]|\/)+$/)||(s=document.createElement("div"),s.className="error date-error",s.innerHTML=t.date,e.appendChild(s)):"hour"===r?i.value.match(/^[0-9]+$/)||(s=document.createElement("div"),s.className="error hour-error",s.innerHTML=t.hour,e.appendChild(s)):"minute"===r&&(i.value.match(/^[0-9]+$/)||(s=document.createElement("div"),s.className="error minute-error",s.innerHTML=t.minute,e.appendChild(s)))}},this)},wp.ccf.validators.address=wp.ccf.validators.address||r(),wp.ccf.validators.file=wp.ccf.validators.file||function(e){this.wrapper=e,this.inputs=this.wrapper.querySelectorAll(".field-input"),this.errors={};for(var i=this.wrapper.querySelectorAll(".error"),l=i.length-1;l>=0;l--)i[l].parentNode.removeChild(i[l]);_.each(this.inputs,function(e){var t=e.getAttribute("name");this.errors[t]={},e.getAttribute("aria-required")&&""===e.value&&(this.errors[t].required=e)},this);var s=this.inputs[0],r=this.wrapper.getAttribute("data-max-file-size"),c=this.wrapper.getAttribute("data-file-extensions");if(s.value){if(r){var o=1e3*1e3*parseInt(r);if(s.files)s.files[0].size>o&&(this.errors[this.inputs[0].getAttribute("name")].fileSize=this.wrapper.lastChild);else if("undefined"!=typeof ActiveXObject)try{var n=new ActiveXObject("Scripting.FileSystemObject"),a=n.getFile(s.value);a.size>o&&(this.errors[this.inputs[0].getAttribute("name")].fileSize=this.wrapper.lastChild)}catch(d){}}if(c){var
|
1 |
+
(function(e,t){"use strict";window.wp=window.wp||{},wp.ccf=wp.ccf||{},wp.ccf.validators=wp.ccf.validators||{};var i={},l={};window.ccfRecaptchaOnload=function(){for(var e=document.querySelectorAll(".ccf-recaptcha-wrapper"),l=function(l){grecaptcha.render(e[s],{sitekey:e[s].getAttribute("data-sitekey"),theme:t.recaptcha_theme,callback:function(){i[l]=!0}})},s=0;e.length>s;s++){var r=e[s].getAttribute("data-form-id");l(r)}};var s=function(e){if(this.wrapper=e,this.errors={},e.className.match(" field-required")){this.inputs=this.wrapper.querySelectorAll(".field-input");var i=this.wrapper.querySelectorAll(".error");i.length&&i[0].parentNode.removeChild(i[0]);var l=!1;if(_.each(this.inputs,function(e){(e.checked&&e.value||e.selected)&&(l=!0)}),!l){this.errors[this.inputs[this.inputs.length-1].getAttribute("name")]={required:!0};var s=document.createElement("div");s.className="error required-error",s.innerHTML=t.required,e.appendChild(s)}}},r=function(e,i){return function(l){this.wrapper=l,this.inputs=this.wrapper.querySelectorAll(".field-input"),this.errors={};for(var s=this.wrapper.querySelectorAll(".error"),r=s.length-1;r>=0;r--)s[r].parentNode.removeChild(s[r]);_.each(this.inputs,function(t){var i=t.getAttribute("name");this.errors[i]={},t.getAttribute("aria-required")&&""===t.value&&(this.errors[i].required=t),e&&e.call(this,t)},this),i&&i.call(this);var c;for(var o in this.errors)if(this.errors.hasOwnProperty(o))for(var n in this.errors[o])c=document.createElement("div"),c.className="error "+n+"-error",c.setAttribute("data-field-name",o),c.innerHTML=t[n],this.errors[o][n].parentNode.insertBefore(c,this.errors[o][n].nextSibling)}};wp.ccf.validators["single-line-text"]=wp.ccf.validators["single-line-text"]||r(),wp.ccf.validators["paragraph-text"]=wp.ccf.validators["paragraph-text"]||r(),wp.ccf.validators.name=wp.ccf.validators.name||r(),wp.ccf.validators.email=wp.ccf.validators.email||r(!1,function(){var e=this.inputs[0].value;if(e){2===this.inputs.length&&e!==this.inputs[1].value&&(this.errors[this.inputs[0].getAttribute("name")].match=this.wrapper.lastChild);var t=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;t.test(e)||(this.errors[this.inputs[0].getAttribute("name")].email=this.wrapper.lastChild)}}),wp.ccf.validators.recaptcha=wp.ccf.validators.recaptcha||function(e,l){this.wrapper=e,this.inputs=this.wrapper.querySelectorAll(".g-recaptcha-response"),this.errors={};for(var s=this.wrapper.querySelectorAll(".error"),r=s.length-1;r>=0;r--)s[r].parentNode.removeChild(s[r]);i[l]||(this.errors["g-recaptcha-response"]={},this.errors["g-recaptcha-response"].recaptcha=this.wrapper.lastChild);var c;for(var o in this.errors)if(this.errors.hasOwnProperty(o))for(var n in this.errors[o])c=document.createElement("div"),c.className="error "+n+"-error",c.setAttribute("data-field-name",o),c.innerHTML=t[n],this.errors[o][n].parentNode.insertBefore(c,this.errors[o][n].nextSibling)},wp.ccf.validators.phone=wp.ccf.validators.phone||r(!1,function(){var e=this.inputs[0].value;if(e){var t=/^[0-9+.)(\- ]+$/;if(t.test(e)){if("us"===this.wrapper.getAttribute("data-phone-format")){var i=e.replace(/[^0-9]/gi,"");10!==i.length&&(this.errors[this.inputs[0].getAttribute("name")].digits=this.wrapper.lastChild)}}else this.errors[this.inputs[0].getAttribute("name")].phone=this.wrapper.lastChild}}),wp.ccf.validators.date=wp.ccf.validators.date||function(e){this.wrapper=e,this.errors={},this.inputs=this.wrapper.querySelectorAll(".field-input");for(var i=this.wrapper.querySelectorAll(".error"),l=i.length-1;l>=0;l--)i[l].parentNode.removeChild(i[l]);var s;_.each(this.inputs,function(i){var l=i.getAttribute("name");if(this.errors[l]={},i.getAttribute("aria-required")&&""===i.value&&(this.errors[l].required=!0,s=document.createElement("div"),s.className="error required-error",1===this.inputs.length?(s.innerHTML=t.required,s.className+=" right-error",i.parentNode.insertBefore(s,i.nextSibling)):(s.innerHTML=t[l.replace(/.*\[(.*?)\]/i,"$1")+"_required"],e.appendChild(s))),""!==i.value){var r=l.replace(/^.*\[(.*?)\]$/,"$1");"date"===r?i.value.match(/^([0-9]|\/)+$/)||(s=document.createElement("div"),s.className="error date-error",s.innerHTML=t.date,e.appendChild(s)):"hour"===r?i.value.match(/^[0-9]+$/)||(s=document.createElement("div"),s.className="error hour-error",s.innerHTML=t.hour,e.appendChild(s)):"minute"===r&&(i.value.match(/^[0-9]+$/)||(s=document.createElement("div"),s.className="error minute-error",s.innerHTML=t.minute,e.appendChild(s)))}},this)},wp.ccf.validators.address=wp.ccf.validators.address||r(),wp.ccf.validators.file=wp.ccf.validators.file||function(e){this.wrapper=e,this.inputs=this.wrapper.querySelectorAll(".field-input"),this.errors={};for(var i=this.wrapper.querySelectorAll(".error"),l=i.length-1;l>=0;l--)i[l].parentNode.removeChild(i[l]);_.each(this.inputs,function(e){var t=e.getAttribute("name");this.errors[t]={},e.getAttribute("aria-required")&&""===e.value&&(this.errors[t].required=e)},this);var s=this.inputs[0],r=this.wrapper.getAttribute("data-max-file-size"),c=this.wrapper.getAttribute("data-file-extensions");if(s.value){if(r){var o=1e3*1e3*parseInt(r);if(s.files)s.files[0].size>o&&(this.errors[this.inputs[0].getAttribute("name")].fileSize=this.wrapper.lastChild);else if("undefined"!=typeof ActiveXObject)try{var n=new ActiveXObject("Scripting.FileSystemObject"),a=n.getFile(s.value);a.size>o&&(this.errors[this.inputs[0].getAttribute("name")].fileSize=this.wrapper.lastChild)}catch(d){}}if(c){var f=c.replace(";",",").toLowerCase();if(f=f.replace(/\s+/g,""),f=f.split(","),f.length){var u=s.value.replace(/^.*\.(.+)$/g,"$1").toLowerCase();-1===_.indexOf(f,u)&&(this.errors[this.inputs[0].getAttribute("name")].fileExtension=this.wrapper.lastChild)}}}var h;for(var m in this.errors)if(this.errors.hasOwnProperty(m))for(var p in this.errors[m])h=document.createElement("div"),h.className="error "+p+"-error",h.setAttribute("data-field-name",m),h.innerHTML=t[p],"fileExtension"===p&&c?h.innerHTML+=" ("+c+")":"fileSize"===p&&r&&(h.innerHTML+=" "+r+" MB"),this.errors[m][p].parentNode.insertBefore(h,this.errors[m][p].nextSibling)},wp.ccf.validators.website=wp.ccf.validators.website||r(function(e){if(e.value){var t=/^http(s?)\:\/\/(([a-zA-Z0-9\-\._]+(\.[a-zA-Z0-9\-\._]+)+)|localhost)(\/?)([a-zA-Z0-9\-\.\?\,\'\/\\\+&%\$#_]*)?([\d\w\.\/\%\+\-\=\&\?\:\\\"\'\,\|\~\;]*)$/;t.test(e.value)||(this.errors[e.getAttribute("name")].website=e)}}),wp.ccf.validators.checkboxes=wp.ccf.validators.checkboxes||s,wp.ccf.validators.dropdown=wp.ccf.validators.dropdown||r(),wp.ccf.validators.radio=wp.ccf.validators.radio||s,wp.ccf.iframeOnload=function(e){l[e]&&l[e]()},wp.ccf.setupDOM=wp.ccf.setupDOM||function(){for(var s,r,c=document.querySelectorAll(".ccf-datepicker"),o=0;c.length>o;o++)s={},r=c[o].getAttribute("data-date-format"),r&&(s.dateFormat=r.replace(/yyyy/i,"yy")),e(c[o]).datepicker(s);var n=document.querySelectorAll(".ccf-form-wrapper");n.length>=1&&_.each(n,function(s){function r(t){var i=s.querySelectorAll(".field"),l=[];if(_.each(i,function(e){if(!e.className.match(/ skip-field/i)){var t=e.getAttribute("data-field-type"),i=e.getAttribute("data-field-slug");m[i]=e;var s=new wp.ccf.validators[t](e,n);if(_.size(s.errors)){var r=0;for(var c in s.errors)s.errors.hasOwnProperty(c)&&_.size(s.errors[c])&&r++;r>0&&l.push(s)}}}),!l.length)return o.trigger("ccfFormSuccess"),s.className=s.className.replace(/ loading/i,"")+" loading",f.animate({opacity:100}),!0;t.returnFalse=!1,t.preventDefault&&t.preventDefault(),o.trigger("ccfFormError",l);var r=e(window).scrollTop(),c=r+e(window).height(),a=e(l[0].wrapper),d=a.offset(),u=d.top,h=u+a.height();return u>=r&&c>=h||e("html, body").animate({scrollTop:a.offset().top},500),!1}var c=s.querySelectorAll(".ccf-form")[0],o=e(c),n=parseInt(s.getAttribute("data-form-id")),a=c.querySelectorAll(".ccf-submit-button")[0],d=document.getElementById("ccf_form_frame_"+n),f=e(c.querySelectorAll(".loading-img")[0]),u=e(d),h=e(a),m={};l[n]=function(){var l,s=u.contents().find("body").text();if(!s)return!1;c.className=c.className.replace(/ loading/i,""),f.animate({opacity:0}),i[n]=!1;try{l=e.parseJSON(s)}catch(r){var o=document.createElement("div");return o.className="error unknown-error",o.innerText=t.unknown,a.parentNode.appendChild(o),!1}var d=a.parentNode.querySelectorAll(".error");if(d.length&&d[0].parentNode.removeChild(d[0]),l.success)if("text"===l.action_type&&l.completion_message){c.innerHTML="";var h=document.createElement("div");h.innerHTML=l.completion_message,h.className="ccf-form-complete",c.appendChild(h),e("html, body").animate({scrollTop:e(c).offset().top},500)}else"redirect"===l.action_type&&l.completion_redirect_url&&(document.location=l.completion_redirect_url);else l.field_errors&&_.each(l.field_errors,function(e,t){var i=m[t].querySelectorAll(".field-input");for(var l in e)if(e.hasOwnProperty(l)){var s=document.createElement("div");s.className="error "+l+"-error",s.innerHTML=e[l],1===i.length?i[i.length-1].parentNode.insertBefore(s,i[i.length-1].nextSibling):m[t].appendChild(s)}})},h.on("click",function(e){return e.preventDefault(),c.target="ccf_form_frame_"+n,c.action=t.ajaxurl,o.submit(),!1}),o.on("submit",r)})},e(document).ready(wp.ccf.setupDOM)})(jQuery,ccfSettings);
|
classes/class-ccf-api-form-controller.php
CHANGED
@@ -20,7 +20,7 @@ class CCF_API_Form_Controller extends WP_REST_Controller {
|
|
20 |
|
21 |
/**
|
22 |
* Setup instance variables
|
23 |
-
*
|
24 |
* @since 7.0
|
25 |
*/
|
26 |
public function __construct() {
|
@@ -85,6 +85,10 @@ class CCF_API_Form_Controller extends WP_REST_Controller {
|
|
85 |
'sanitize' => array( $this, 'boolval' ),
|
86 |
'escape' => array( $this, 'boolval' ),
|
87 |
),
|
|
|
|
|
|
|
|
|
88 |
'heading' => array(
|
89 |
'sanitize' => 'sanitize_text_field',
|
90 |
'escape' => 'esc_html',
|
@@ -323,9 +327,38 @@ class CCF_API_Form_Controller extends WP_REST_Controller {
|
|
323 |
update_post_meta( $form_id, 'ccf_attached_fields', $new_fields );
|
324 |
}
|
325 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
326 |
/**
|
327 |
* Create/update a form
|
328 |
-
*
|
329 |
* @param array $data
|
330 |
* @since 7.0
|
331 |
* @return array
|
@@ -351,6 +384,8 @@ class CCF_API_Form_Controller extends WP_REST_Controller {
|
|
351 |
|
352 |
$this->_create_and_map_fields( $data['fields'], $result );
|
353 |
|
|
|
|
|
354 |
if ( isset( $data['buttonText'] ) ) {
|
355 |
update_post_meta( $result, 'ccf_form_buttonText', sanitize_text_field( $data['buttonText'] ) );
|
356 |
}
|
@@ -383,46 +418,6 @@ class CCF_API_Form_Controller extends WP_REST_Controller {
|
|
383 |
update_post_meta( $result, 'ccf_form_pause_message', sanitize_text_field( $data['pauseMessage'] ) );
|
384 |
}
|
385 |
|
386 |
-
if ( isset( $data['emailNotificationAddresses'] ) ) {
|
387 |
-
update_post_meta( $result, 'ccf_form_email_notification_addresses', sanitize_text_field( $data['emailNotificationAddresses'] ) );
|
388 |
-
}
|
389 |
-
|
390 |
-
if ( isset( $data['emailNotificationFromType'] ) ) {
|
391 |
-
update_post_meta( $result, 'ccf_form_email_notification_from_type', sanitize_text_field( $data['emailNotificationFromType'] ) );
|
392 |
-
}
|
393 |
-
|
394 |
-
if ( isset( $data['emailNotificationFromAddress'] ) ) {
|
395 |
-
update_post_meta( $result, 'ccf_form_email_notification_from_address', sanitize_text_field( $data['emailNotificationFromAddress'] ) );
|
396 |
-
}
|
397 |
-
|
398 |
-
if ( isset( $data['emailNotificationFromField'] ) ) {
|
399 |
-
update_post_meta( $result, 'ccf_form_email_notification_from_field', sanitize_text_field( $data['emailNotificationFromField'] ) );
|
400 |
-
}
|
401 |
-
|
402 |
-
if ( isset( $data['emailNotificationSubjectType'] ) ) {
|
403 |
-
update_post_meta( $result, 'ccf_form_email_notification_subject_type', sanitize_text_field( $data['emailNotificationSubjectType'] ) );
|
404 |
-
}
|
405 |
-
|
406 |
-
if ( isset( $data['emailNotificationSubject'] ) ) {
|
407 |
-
update_post_meta( $result, 'ccf_form_email_notification_subject', sanitize_text_field( $data['emailNotificationSubject'] ) );
|
408 |
-
}
|
409 |
-
|
410 |
-
if ( isset( $data['emailNotificationSubjectField'] ) ) {
|
411 |
-
update_post_meta( $result, 'ccf_form_email_notification_subject_field', sanitize_text_field( $data['emailNotificationSubjectField'] ) );
|
412 |
-
}
|
413 |
-
|
414 |
-
if ( isset( $data['emailNotificationFromNameType'] ) ) {
|
415 |
-
update_post_meta( $result, 'ccf_form_email_notification_from_name_type', sanitize_text_field( $data['emailNotificationFromNameType'] ) );
|
416 |
-
}
|
417 |
-
|
418 |
-
if ( isset( $data['emailNotificationFromName'] ) ) {
|
419 |
-
update_post_meta( $result, 'ccf_form_email_notification_from_name', sanitize_text_field( $data['emailNotificationFromName'] ) );
|
420 |
-
}
|
421 |
-
|
422 |
-
if ( isset( $data['emailNotificationFromNameField'] ) ) {
|
423 |
-
update_post_meta( $result, 'ccf_form_email_notification_from_name_field', sanitize_text_field( $data['emailNotificationFromNameField'] ) );
|
424 |
-
}
|
425 |
-
|
426 |
return $result;
|
427 |
} else {
|
428 |
return new WP_Error( 'create-form-error' );
|
@@ -554,7 +549,7 @@ class CCF_API_Form_Controller extends WP_REST_Controller {
|
|
554 |
}
|
555 |
|
556 |
$response = rest_ensure_response( $posts );
|
557 |
-
|
558 |
$response->header( 'X-WP-Total', (int) $query->found_posts );
|
559 |
$max_pages = ceil( (int) $query->found_posts / $args['posts_per_page'] );
|
560 |
$response->header( 'X-WP-TotalPages', (int) $max_pages );
|
@@ -883,7 +878,7 @@ class CCF_API_Form_Controller extends WP_REST_Controller {
|
|
883 |
|
884 |
if ( ! empty( $user ) ) {
|
885 |
$user = (array) $user->data;
|
886 |
-
|
887 |
unset( $user['user_pass'] );
|
888 |
unset( $user['user_activation_key'] );
|
889 |
} else {
|
@@ -917,25 +912,19 @@ class CCF_API_Form_Controller extends WP_REST_Controller {
|
|
917 |
$data['completionActionType'] = esc_attr( get_post_meta( $data['id'], 'ccf_form_completion_action_type', true ) );
|
918 |
$data['completionRedirectUrl'] = esc_url_raw( get_post_meta( $data['id'], 'ccf_form_completion_redirect_url', true ) );
|
919 |
$data['completionMessage'] = esc_html( get_post_meta( $data['id'], 'ccf_form_completion_message', true ) );
|
920 |
-
$data['sendEmailNotifications'] = (bool) get_post_meta( $data['id'], 'ccf_form_send_email_notifications', true );
|
921 |
$data['pause'] = (bool) get_post_meta( $data['id'], 'ccf_form_pause', true );
|
922 |
$data['pauseMessage'] = esc_html( get_post_meta( $data['id'], 'ccf_form_pause_message', true ) );
|
923 |
-
$data['emailNotificationAddresses'] = esc_html( get_post_meta( $data['id'], 'ccf_form_email_notification_addresses', true ) );
|
924 |
-
|
925 |
-
$data['emailNotificationFromType'] = esc_html( get_post_meta( $data['id'], 'ccf_form_email_notification_from_type', true ) );
|
926 |
-
$data['emailNotificationFromAddress'] = esc_html( get_post_meta( $data['id'], 'ccf_form_email_notification_from_address', true ) );
|
927 |
-
$data['emailNotificationFromField'] = esc_html( get_post_meta( $data['id'], 'ccf_form_email_notification_from_field', true ) );
|
928 |
|
929 |
-
|
930 |
-
$
|
931 |
-
|
|
|
|
|
932 |
|
933 |
-
$data['
|
934 |
-
$data['emailNotificationFromName'] = esc_html( get_post_meta( $data['id'], 'ccf_form_email_notification_from_name', true ) );
|
935 |
-
$data['emailNotificationFromNameField'] = esc_html( get_post_meta( $data['id'], 'ccf_form_email_notification_from_name_field', true ) );
|
936 |
|
937 |
$submissions = get_children( array( 'post_type' => 'ccf_submission', 'post_parent' => $data['id'], 'numberposts' => apply_filters( 'ccf_max_submissions', 5000, $data ) ) );
|
938 |
-
|
939 |
$data['submissions'] = count( $submissions );
|
940 |
|
941 |
return $data;
|
@@ -943,7 +932,7 @@ class CCF_API_Form_Controller extends WP_REST_Controller {
|
|
943 |
|
944 |
/**
|
945 |
* Format date for response
|
946 |
-
*
|
947 |
* @param string $date_gmt
|
948 |
* @param string $date
|
949 |
* @since 7.0
|
20 |
|
21 |
/**
|
22 |
* Setup instance variables
|
23 |
+
*
|
24 |
* @since 7.0
|
25 |
*/
|
26 |
public function __construct() {
|
85 |
'sanitize' => array( $this, 'boolval' ),
|
86 |
'escape' => array( $this, 'boolval' ),
|
87 |
),
|
88 |
+
'dateFormat' => array(
|
89 |
+
'sanitize' => 'sanitize_text_field',
|
90 |
+
'escape' => 'esc_html',
|
91 |
+
),
|
92 |
'heading' => array(
|
93 |
'sanitize' => 'sanitize_text_field',
|
94 |
'escape' => 'esc_html',
|
327 |
update_post_meta( $form_id, 'ccf_attached_fields', $new_fields );
|
328 |
}
|
329 |
|
330 |
+
/**
|
331 |
+
* Create/update notifications
|
332 |
+
*
|
333 |
+
* @param array $notifications
|
334 |
+
* @param int $form_id
|
335 |
+
* @since 7.2
|
336 |
+
*/
|
337 |
+
public function _create_and_map_notifications( $notifications, $form_id ) {
|
338 |
+
// @Todo: better sanitization
|
339 |
+
$clean_notifications = array();
|
340 |
+
for ( $index = 0; $index < count( $notifications ); $index++ ) {
|
341 |
+
foreach ( $notifications[$index] as $notification_key => $notification_value ) {
|
342 |
+
if ( 'addresses' === $notification_key ) {
|
343 |
+
foreach ( $notification_value as $address_key => $address_value ) {
|
344 |
+
if ( ( 'field' === $address_value['type'] && ! empty( $address_value['field'] ) ) || ( 'custom' === $address_value['type'] && ! empty( $address_value['email'] ) ) ) {
|
345 |
+
$clean_notifications[$index][$notification_key][$address_key] = array_map( 'sanitize_text_field', $address_value );
|
346 |
+
}
|
347 |
+
}
|
348 |
+
} elseif ( 'content' === $notification_key ) {
|
349 |
+
$clean_notifications[$index][$notification_key] = wp_kses_post( $notification_value );
|
350 |
+
} else {
|
351 |
+
$clean_notifications[$index][$notification_key] = sanitize_text_field( $notification_value );
|
352 |
+
}
|
353 |
+
}
|
354 |
+
}
|
355 |
+
|
356 |
+
update_post_meta( $form_id, 'ccf_form_notifications', $clean_notifications );
|
357 |
+
}
|
358 |
+
|
359 |
/**
|
360 |
* Create/update a form
|
361 |
+
*
|
362 |
* @param array $data
|
363 |
* @since 7.0
|
364 |
* @return array
|
384 |
|
385 |
$this->_create_and_map_fields( $data['fields'], $result );
|
386 |
|
387 |
+
$this->_create_and_map_notifications( $data['notifications'], $result );
|
388 |
+
|
389 |
if ( isset( $data['buttonText'] ) ) {
|
390 |
update_post_meta( $result, 'ccf_form_buttonText', sanitize_text_field( $data['buttonText'] ) );
|
391 |
}
|
418 |
update_post_meta( $result, 'ccf_form_pause_message', sanitize_text_field( $data['pauseMessage'] ) );
|
419 |
}
|
420 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
421 |
return $result;
|
422 |
} else {
|
423 |
return new WP_Error( 'create-form-error' );
|
549 |
}
|
550 |
|
551 |
$response = rest_ensure_response( $posts );
|
552 |
+
|
553 |
$response->header( 'X-WP-Total', (int) $query->found_posts );
|
554 |
$max_pages = ceil( (int) $query->found_posts / $args['posts_per_page'] );
|
555 |
$response->header( 'X-WP-TotalPages', (int) $max_pages );
|
878 |
|
879 |
if ( ! empty( $user ) ) {
|
880 |
$user = (array) $user->data;
|
881 |
+
|
882 |
unset( $user['user_pass'] );
|
883 |
unset( $user['user_activation_key'] );
|
884 |
} else {
|
912 |
$data['completionActionType'] = esc_attr( get_post_meta( $data['id'], 'ccf_form_completion_action_type', true ) );
|
913 |
$data['completionRedirectUrl'] = esc_url_raw( get_post_meta( $data['id'], 'ccf_form_completion_redirect_url', true ) );
|
914 |
$data['completionMessage'] = esc_html( get_post_meta( $data['id'], 'ccf_form_completion_message', true ) );
|
|
|
915 |
$data['pause'] = (bool) get_post_meta( $data['id'], 'ccf_form_pause', true );
|
916 |
$data['pauseMessage'] = esc_html( get_post_meta( $data['id'], 'ccf_form_pause_message', true ) );
|
|
|
|
|
|
|
|
|
|
|
917 |
|
918 |
+
// @Todo: escaping
|
919 |
+
$notifications = get_post_meta( $data['id'], 'ccf_form_notifications', true );
|
920 |
+
if ( empty( $notifications ) ) {
|
921 |
+
$notifications = array();
|
922 |
+
}
|
923 |
|
924 |
+
$data['notifications'] = $notifications;
|
|
|
|
|
925 |
|
926 |
$submissions = get_children( array( 'post_type' => 'ccf_submission', 'post_parent' => $data['id'], 'numberposts' => apply_filters( 'ccf_max_submissions', 5000, $data ) ) );
|
927 |
+
|
928 |
$data['submissions'] = count( $submissions );
|
929 |
|
930 |
return $data;
|
932 |
|
933 |
/**
|
934 |
* Format date for response
|
935 |
+
*
|
936 |
* @param string $date_gmt
|
937 |
* @param string $date
|
938 |
* @since 7.0
|
classes/class-ccf-field-renderer.php
CHANGED
@@ -911,6 +911,7 @@ class CCF_Field_Renderer {
|
|
911 |
$class_name = get_post_meta( $field_id, 'ccf_field_className', true );
|
912 |
$show_date = get_post_meta( $field_id, 'ccf_field_showDate', true );
|
913 |
$show_time = get_post_meta( $field_id, 'ccf_field_showTime', true );
|
|
|
914 |
$description = get_post_meta( $field_id, 'ccf_field_description', true );
|
915 |
|
916 |
$errors = CCF_Form_Handler::factory()->get_errors( $form_id, $slug );
|
@@ -947,7 +948,7 @@ class CCF_Field_Renderer {
|
|
947 |
<?php echo esc_html( $label ); ?>
|
948 |
</label>
|
949 |
<?php if ( ! empty( $show_date ) && empty( $show_time ) ) { ?>
|
950 |
-
<input <?php if ( ! empty( $required ) ) : ?>required aria-required="true"<?php endif; ?> name="ccf_field_<?php echo esc_attr( $slug ); ?>[date]" value="<?php if ( ! empty( $date_post_value ) ) { echo esc_attr( $date_post_value ); } else { echo esc_attr( $value ); } ?>" class="<?php if ( ! empty( $errors ) ) : ?>field-error-input<?php endif; ?> ccf-datepicker field-input" id="ccf_field_<?php echo esc_attr( $slug ); ?>" type="text">
|
951 |
<?php } else if ( empty( $show_date ) && ! empty( $show_time ) ) { ?>
|
952 |
<div class="hour">
|
953 |
<input maxlength="2" class="<?php if ( ! empty( $errors['hour_required'] ) ) : ?>field-error-input<?php endif; ?> field-input" <?php if ( ! empty( $required ) ) : ?>required aria-required="true"<?php endif; ?> name="ccf_field_<?php echo esc_attr( $slug ); ?>[hour]" value="<?php if ( ! empty( $hour_post_value ) ) { echo esc_attr( $hour_post_value ); } ?>" id="ccf_field_<?php echo esc_attr( $slug ); ?>-hour" type="text">
|
@@ -966,7 +967,7 @@ class CCF_Field_Renderer {
|
|
966 |
<div class="ccf-clear"></div>
|
967 |
<?php } else { ?>
|
968 |
<div class="left">
|
969 |
-
<input value="<?php if ( ! empty( $date_post_value ) ) { echo esc_attr( $date_post_value ); } ?>" <?php if ( ! empty( $required ) ) : ?>required aria-required="true"<?php endif; ?> name="ccf_field_<?php echo esc_attr( $slug ); ?>[date]" class="<?php if ( ! empty( $errors['date_required'] ) ) : ?>field-error-input<?php endif; ?> ccf-datepicker field-input" id="ccf_field_<?php echo esc_attr( $slug ); ?>-date" type="text">
|
970 |
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>-date" class="sub-label"><?php esc_html_e( 'Date', 'custom-contact-forms' ); ?></label>
|
971 |
</div>
|
972 |
<div class="right">
|
@@ -1158,4 +1159,4 @@ class CCF_Field_Renderer {
|
|
1158 |
|
1159 |
return $instance;
|
1160 |
}
|
1161 |
-
}
|
911 |
$class_name = get_post_meta( $field_id, 'ccf_field_className', true );
|
912 |
$show_date = get_post_meta( $field_id, 'ccf_field_showDate', true );
|
913 |
$show_time = get_post_meta( $field_id, 'ccf_field_showTime', true );
|
914 |
+
$date_format = get_post_meta( $field_id, 'ccf_field_dateFormat', true );
|
915 |
$description = get_post_meta( $field_id, 'ccf_field_description', true );
|
916 |
|
917 |
$errors = CCF_Form_Handler::factory()->get_errors( $form_id, $slug );
|
948 |
<?php echo esc_html( $label ); ?>
|
949 |
</label>
|
950 |
<?php if ( ! empty( $show_date ) && empty( $show_time ) ) { ?>
|
951 |
+
<input data-date-format="<?php echo esc_attr( $date_format ); ?>" <?php if ( ! empty( $required ) ) : ?>required aria-required="true"<?php endif; ?> name="ccf_field_<?php echo esc_attr( $slug ); ?>[date]" value="<?php if ( ! empty( $date_post_value ) ) { echo esc_attr( $date_post_value ); } else { echo esc_attr( $value ); } ?>" class="<?php if ( ! empty( $errors ) ) : ?>field-error-input<?php endif; ?> ccf-datepicker field-input" id="ccf_field_<?php echo esc_attr( $slug ); ?>" type="text">
|
952 |
<?php } else if ( empty( $show_date ) && ! empty( $show_time ) ) { ?>
|
953 |
<div class="hour">
|
954 |
<input maxlength="2" class="<?php if ( ! empty( $errors['hour_required'] ) ) : ?>field-error-input<?php endif; ?> field-input" <?php if ( ! empty( $required ) ) : ?>required aria-required="true"<?php endif; ?> name="ccf_field_<?php echo esc_attr( $slug ); ?>[hour]" value="<?php if ( ! empty( $hour_post_value ) ) { echo esc_attr( $hour_post_value ); } ?>" id="ccf_field_<?php echo esc_attr( $slug ); ?>-hour" type="text">
|
967 |
<div class="ccf-clear"></div>
|
968 |
<?php } else { ?>
|
969 |
<div class="left">
|
970 |
+
<input data-date-format="<?php echo esc_attr( $date_format ); ?>" value="<?php if ( ! empty( $date_post_value ) ) { echo esc_attr( $date_post_value ); } ?>" <?php if ( ! empty( $required ) ) : ?>required aria-required="true"<?php endif; ?> name="ccf_field_<?php echo esc_attr( $slug ); ?>[date]" class="<?php if ( ! empty( $errors['date_required'] ) ) : ?>field-error-input<?php endif; ?> ccf-datepicker field-input" id="ccf_field_<?php echo esc_attr( $slug ); ?>-date" type="text">
|
971 |
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>-date" class="sub-label"><?php esc_html_e( 'Date', 'custom-contact-forms' ); ?></label>
|
972 |
</div>
|
973 |
<div class="right">
|
1159 |
|
1160 |
return $instance;
|
1161 |
}
|
1162 |
+
}
|
classes/class-ccf-form-cpt.php
CHANGED
@@ -587,7 +587,7 @@ class CCF_Form_CPT {
|
|
587 |
|
588 |
$args = array(
|
589 |
'labels' => $labels,
|
590 |
-
'public' =>
|
591 |
'publicly_queryable' => false,
|
592 |
'exclude_from_search' => true,
|
593 |
'show_ui' => true,
|
587 |
|
588 |
$args = array(
|
589 |
'labels' => $labels,
|
590 |
+
'public' => false,
|
591 |
'publicly_queryable' => false,
|
592 |
'exclude_from_search' => true,
|
593 |
'show_ui' => true,
|
classes/class-ccf-form-handler.php
CHANGED
@@ -689,186 +689,215 @@ class CCF_Form_Handler {
|
|
689 |
'action_type' => get_post_meta( $form_id, 'ccf_form_completion_action_type', true ),
|
690 |
);
|
691 |
|
692 |
-
$
|
693 |
-
$email_addresses_field = get_post_meta( $form_id, 'ccf_form_email_notification_addresses', true );
|
694 |
|
695 |
-
|
696 |
-
$email_addresses_field = str_replace( ';', ',', $email_addresses_field );
|
697 |
-
$email_addresses = explode( ',', $email_addresses_field );
|
698 |
-
$email_addresses = array_map( 'trim', $email_addresses );
|
699 |
|
700 |
-
|
701 |
-
|
|
|
702 |
|
703 |
-
|
704 |
|
705 |
-
|
706 |
-
$field_id = $field_slug_to_id[$slug]['id'];
|
707 |
-
$label = get_post_meta( $field_id, 'ccf_field_label', true );
|
708 |
-
$type = get_post_meta( $field_id, 'ccf_field_type', true );
|
709 |
|
710 |
-
if (
|
711 |
-
$
|
712 |
-
}
|
713 |
-
?>
|
714 |
|
715 |
-
|
716 |
-
<?php if ( ! empty( $label ) ) : ?>
|
717 |
-
<b><?php echo esc_html( $label ); ?> <?php if ( apply_filters( 'ccf_show_slug_in_submission_email', false, $submission_id, $form_id ) ) : ?>(<?php echo esc_html( $slug ); ?>)<?php endif; ?>:</b>
|
718 |
-
<?php else : ?>
|
719 |
-
<b><?php echo esc_html( $slug ); ?>:</b>
|
720 |
-
<?php endif; ?>
|
721 |
-
</div>
|
722 |
-
<div style="margin-bottom: 10px;">
|
723 |
-
<?php if ( ! empty( $field ) ) : ?>
|
724 |
|
725 |
-
|
|
|
|
|
|
|
726 |
|
727 |
-
|
|
|
|
|
|
|
728 |
|
729 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
730 |
|
731 |
-
|
732 |
|
733 |
-
|
734 |
|
735 |
-
|
736 |
|
737 |
-
|
738 |
|
739 |
-
|
740 |
|
741 |
-
|
742 |
|
743 |
-
|
744 |
-
<?php echo esc_html( stripslashes( $field['email'] ) ); ?>
|
745 |
-
<?php else : ?>
|
746 |
-
<?php echo esc_html( stripslashes( $field ) ); ?>
|
747 |
-
<?php endif; ?>
|
748 |
|
749 |
-
|
750 |
|
751 |
-
|
752 |
|
753 |
-
|
754 |
-
|
755 |
-
|
756 |
-
<?php echo esc_html( stripslashes( $
|
757 |
-
<?php $i++; ?>
|
758 |
<?php endif; ?>
|
759 |
-
<?php endforeach; ?>
|
760 |
|
761 |
-
<?php
|
762 |
-
|
763 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
764 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
765 |
<?php else : ?>
|
766 |
-
|
767 |
<?php endif; ?>
|
|
|
768 |
|
769 |
-
|
770 |
-
|
771 |
-
<?php endif; ?>
|
772 |
-
<?php else : ?>
|
773 |
-
<span>-</span>
|
774 |
-
<?php endif; ?>
|
775 |
-
</div>
|
776 |
|
777 |
-
|
778 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
779 |
|
780 |
-
|
781 |
-
|
782 |
-
|
783 |
-
|
784 |
-
|
785 |
-
|
786 |
-
|
787 |
-
|
788 |
-
<?php
|
789 |
-
}
|
790 |
|
791 |
-
|
792 |
-
?>
|
793 |
-
<div>
|
794 |
-
<?php esc_html_e( 'Form submitter IP', 'custom-contact-forms' ); ?>:
|
795 |
-
<?php echo esc_html( $_SERVER['REMOTE_ADDR'] ); ?>
|
796 |
-
</div>
|
797 |
-
<?php
|
798 |
-
}
|
799 |
|
800 |
-
|
|
|
801 |
|
802 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
803 |
|
804 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
805 |
|
806 |
-
|
807 |
-
$email_notification_from_name = get_post_meta( $form_id, 'ccf_form_email_notification_from_name', true );
|
808 |
-
|
809 |
-
$name = null;
|
810 |
-
$email = null;
|
811 |
|
812 |
-
|
813 |
-
$
|
814 |
-
|
815 |
-
$name_field = get_post_meta( $form_id, 'ccf_form_email_notification_from_name_field', true );
|
816 |
-
|
817 |
-
if ( ! empty( $name_field ) && ! empty( $submission[$name_field] ) && is_array( $submission[$name_field] ) ) {
|
818 |
-
if ( ! empty( $submission[$name_field]['first'] ) || ! empty( $submission[$name_field]['last'] ) ) {
|
819 |
-
$name = $submission[$name_field]['first'] . ' ' . $submission[$name_field]['last'];
|
820 |
-
}
|
821 |
}
|
822 |
-
|
823 |
-
|
824 |
-
|
825 |
-
|
826 |
-
|
827 |
-
|
828 |
-
|
829 |
-
|
830 |
-
if ( is_array( $submission[$email_field] ) && ! empty( $submission[$email_field]['confirm'] ) ) {
|
831 |
-
$email = $submission[$email_field]['confirm'];
|
832 |
-
} else {
|
833 |
-
$email = $submission[$email_field];
|
834 |
}
|
835 |
}
|
836 |
-
}
|
837 |
|
838 |
-
|
839 |
-
$headers[] = 'From: ' . sanitize_text_field( $name ) . ' <' . sanitize_email( $email ) . '>';
|
840 |
-
$headers[] = 'Reply-To: ' . sanitize_email( $email );
|
841 |
-
} elseif ( ! empty( $name ) && empty( $email ) ) {
|
842 |
-
$headers[] = 'From: ' . sanitize_text_field( $name );
|
843 |
-
} elseif ( empty( $name ) && ! empty( $email ) ) {
|
844 |
-
$headers[] = 'From: ' . sanitize_email( $email );
|
845 |
-
$headers[] = 'Reply-To: ' . sanitize_email( $email );
|
846 |
-
}
|
847 |
|
848 |
-
|
849 |
|
850 |
-
|
851 |
-
|
852 |
-
|
853 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
854 |
|
855 |
-
|
856 |
-
|
857 |
-
|
858 |
-
|
859 |
-
|
860 |
-
if ( ! empty( $subject_field ) && ! empty( $submission[$subject_field] ) ) {
|
861 |
-
$subject = $submission[$subject_field];
|
862 |
}
|
863 |
-
}
|
864 |
|
865 |
-
foreach ( $email_addresses as $email ) {
|
866 |
-
$subject = apply_filters( 'ccf_email_subject', $subject, $form_id, $email, $form_page );
|
867 |
-
wp_mail( $email, $subject, apply_filters( 'ccf_email_content', $message, $form_id, $email, $form_page ), apply_filters( 'ccf_email_headers', $headers, $form_id, $email, $form_page ) );
|
868 |
}
|
869 |
}
|
870 |
}
|
871 |
|
|
|
872 |
if ( 'redirect' === $output['action_type'] ) {
|
873 |
$output['completion_redirect_url'] = get_post_meta( $form_id, 'ccf_form_completion_redirect_url', true );
|
874 |
} else {
|
689 |
'action_type' => get_post_meta( $form_id, 'ccf_form_completion_action_type', true ),
|
690 |
);
|
691 |
|
692 |
+
$notifications = get_post_meta( $form_id, 'ccf_form_notifications', true );
|
|
|
693 |
|
694 |
+
$form_page = ( ! empty( $_POST['form_page'] ) ) ? $_POST['form_page'] : null;
|
|
|
|
|
|
|
695 |
|
696 |
+
if ( ! empty( $notifications ) ) {
|
697 |
+
foreach( $notifications as $notification ) {
|
698 |
+
if ( ! empty( $notification['active'] ) && ! empty( $notification['addresses'] ) ) {
|
699 |
|
700 |
+
$message = $notification['content'];
|
701 |
|
702 |
+
// Variables
|
|
|
|
|
|
|
703 |
|
704 |
+
if ( false !== stripos( $message, '[all_fields]' ) ) {
|
705 |
+
$all_fields = '';
|
|
|
|
|
706 |
|
707 |
+
ob_start();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
708 |
|
709 |
+
foreach ( $submission as $slug => $field ) {
|
710 |
+
$field_id = $field_slug_to_id[$slug]['id'];
|
711 |
+
$label = get_post_meta( $field_id, 'ccf_field_label', true );
|
712 |
+
$type = get_post_meta( $field_id, 'ccf_field_type', true );
|
713 |
|
714 |
+
if ( 'hidden' === $type ) {
|
715 |
+
$label = esc_html__( '*Hidden Field*', 'custom-contact-forms' );
|
716 |
+
}
|
717 |
+
?>
|
718 |
|
719 |
+
<div>
|
720 |
+
<?php if ( ! empty( $label ) ) : ?>
|
721 |
+
<b><?php echo esc_html( $label ); ?> <?php if ( apply_filters( 'ccf_show_slug_in_submission_email', false, $submission_id, $form_id ) ) : ?>(<?php echo esc_html( $slug ); ?>)<?php endif; ?>:</b>
|
722 |
+
<?php else : ?>
|
723 |
+
<b><?php echo esc_html( $slug ); ?>:</b>
|
724 |
+
<?php endif; ?>
|
725 |
+
</div>
|
726 |
+
<div style="margin-bottom: 10px;">
|
727 |
+
<?php if ( ! empty( $field ) ) : ?>
|
728 |
|
729 |
+
<?php if ( 'date' === $type ) : ?>
|
730 |
|
731 |
+
<?php echo esc_html( stripslashes( CCF_Submission_CPT::factory()->get_pretty_field_date( $field ) ) ); ?>
|
732 |
|
733 |
+
<?php elseif ( 'name' === $type ) : ?>
|
734 |
|
735 |
+
<?php echo esc_html( stripslashes( CCF_Submission_CPT::factory()->get_pretty_field_name( $field ) ) ); ?>
|
736 |
|
737 |
+
<?php elseif ( 'file' === $type ) : ?>
|
738 |
|
739 |
+
<a href="<?php echo esc_url( $field['url'] ); ?>"><?php echo esc_html( stripslashes( $field['file_name'] ) ); ?></a>
|
740 |
|
741 |
+
<?php elseif ( 'address' === $type ) : ?>
|
|
|
|
|
|
|
|
|
742 |
|
743 |
+
<?php echo esc_html( stripslashes( CCF_Submission_CPT::factory()->get_pretty_field_address( $field ) ) ); ?>
|
744 |
|
745 |
+
<?php elseif ( 'email' === $type ) : ?>
|
746 |
|
747 |
+
<?php if ( is_array( $field ) ) : ?>
|
748 |
+
<?php echo esc_html( stripslashes( $field['email'] ) ); ?>
|
749 |
+
<?php else : ?>
|
750 |
+
<?php echo esc_html( stripslashes( $field ) ); ?>
|
|
|
751 |
<?php endif; ?>
|
|
|
752 |
|
753 |
+
<?php elseif ( 'dropdown' === $type || 'radio' === $type || 'checkboxes' === $type ) : ?>
|
754 |
+
|
755 |
+
<?php if ( is_array( $field ) ) : ?>
|
756 |
+
|
757 |
+
<?php $i = 0; foreach ( $field as $value ) : ?>
|
758 |
+
<?php if ( ! empty( $value ) ) : ?>
|
759 |
+
<?php if ( $i !== 0 ) : ?><br><?php endif; ?>
|
760 |
+
<?php echo esc_html( stripslashes( $value ) ); ?>
|
761 |
+
<?php $i++; ?>
|
762 |
+
<?php endif; ?>
|
763 |
+
<?php endforeach; ?>
|
764 |
|
765 |
+
<?php if ( 0 === $i ) : ?>
|
766 |
+
<span>-</span>
|
767 |
+
<?php endif; ?>
|
768 |
+
|
769 |
+
<?php else : ?>
|
770 |
+
<?php echo esc_html( stripslashes( $field ) ); ?>
|
771 |
+
<?php endif; ?>
|
772 |
+
|
773 |
+
<?php else : ?>
|
774 |
+
<?php echo esc_html( stripslashes( $field ) ); ?>
|
775 |
+
<?php endif; ?>
|
776 |
<?php else : ?>
|
777 |
+
<span>-</span>
|
778 |
<?php endif; ?>
|
779 |
+
</div>
|
780 |
|
781 |
+
<?php
|
782 |
+
}
|
|
|
|
|
|
|
|
|
|
|
783 |
|
784 |
+
if ( ! empty( $form_page ) ) {
|
785 |
+
?>
|
786 |
+
<div>
|
787 |
+
<?php esc_html_e( 'Form submitted from', 'custom-contact-forms' ); ?>:
|
788 |
+
<?php echo esc_url( $form_page ); ?>
|
789 |
+
</div>
|
790 |
+
<?php
|
791 |
+
}
|
792 |
|
793 |
+
if ( apply_filters( 'ccf_show_ip_in_submission_email', true, $submission_id, $form_id ) ) {
|
794 |
+
?>
|
795 |
+
<div>
|
796 |
+
<?php esc_html_e( 'Form submitter IP', 'custom-contact-forms' ); ?>:
|
797 |
+
<?php echo esc_html( $_SERVER['REMOTE_ADDR'] ); ?>
|
798 |
+
</div>
|
799 |
+
<?php
|
800 |
+
}
|
|
|
|
|
801 |
|
802 |
+
$all_fields .= ob_get_clean();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
803 |
|
804 |
+
$message = str_ireplace( '[all_fields]', $all_fields, $message );
|
805 |
+
}
|
806 |
|
807 |
+
$headers = array( 'MIME-Version: 1.0', 'Content-type: text/html; charset=utf-8' );
|
808 |
+
$name = null;
|
809 |
+
$email = null;
|
810 |
+
|
811 |
+
if ( 'custom' === $notification['fromNameType'] ) {
|
812 |
+
$name = $notification['fromName'];
|
813 |
+
} else {
|
814 |
+
$name_field = $notification['fromNameField'];
|
815 |
+
|
816 |
+
if ( ! empty( $name_field ) && ! empty( $submission[$name_field] ) && is_array( $submission[$name_field] ) ) {
|
817 |
+
if ( ! empty( $submission[$name_field]['first'] ) || ! empty( $submission[$name_field]['last'] ) ) {
|
818 |
+
$name = $submission[$name_field]['first'] . ' ' . $submission[$name_field]['last'];
|
819 |
+
}
|
820 |
+
}
|
821 |
+
}
|
822 |
+
|
823 |
+
if ( 'custom' === $notification['fromType'] ) {
|
824 |
+
$email = $notification['fromAddress'];
|
825 |
+
} elseif ( 'field' === $notification['fromType'] ) {
|
826 |
+
$email_field = $notification['fromField'];
|
827 |
+
|
828 |
+
if ( ! empty( $email_field ) && ! empty( $submission[$email_field] ) ) {
|
829 |
+
if ( is_array( $submission[$email_field] ) && ! empty( $submission[$email_field]['confirm'] ) ) {
|
830 |
+
$email = $submission[$email_field]['confirm'];
|
831 |
+
} else {
|
832 |
+
$email = $submission[$email_field];
|
833 |
+
}
|
834 |
+
}
|
835 |
+
}
|
836 |
|
837 |
+
if ( ! empty( $name ) && ! empty( $email ) ) {
|
838 |
+
$headers[] = 'From: ' . sanitize_text_field( $name ) . ' <' . sanitize_email( $email ) . '>';
|
839 |
+
$headers[] = 'Reply-To: ' . sanitize_email( $email );
|
840 |
+
} elseif ( ! empty( $name ) && empty( $email ) ) {
|
841 |
+
$headers[] = 'From: ' . sanitize_text_field( $name );
|
842 |
+
} elseif ( empty( $name ) && ! empty( $email ) ) {
|
843 |
+
$headers[] = 'From: ' . sanitize_email( $email );
|
844 |
+
$headers[] = 'Reply-To: ' . sanitize_email( $email );
|
845 |
+
}
|
846 |
|
847 |
+
$email_notification_subject_type = $notification['subjectType'];
|
|
|
|
|
|
|
|
|
848 |
|
849 |
+
$subject = sprintf( __( '%s: Form Submission', 'custom-contact-forms' ), wp_specialchars_decode( get_bloginfo( 'name' ) ) );
|
850 |
+
if ( ! empty( $form->post_title ) ) {
|
851 |
+
$subject .= sprintf( __( ' to "%s"', 'custom-contact-forms' ), wp_specialchars_decode( $form->post_title ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
852 |
}
|
853 |
+
|
854 |
+
if ( 'custom' === $email_notification_subject_type ) {
|
855 |
+
$subject = $notification['subject'];
|
856 |
+
} elseif ( 'field' === $email_notification_subject_type ) {
|
857 |
+
$subject_field = $notification['subjectField'];
|
858 |
+
|
859 |
+
if ( ! empty( $subject_field ) && ! empty( $submission[$subject_field] ) ) {
|
860 |
+
$subject = $submission[$subject_field];
|
|
|
|
|
|
|
|
|
861 |
}
|
862 |
}
|
|
|
863 |
|
864 |
+
foreach ( $notification['addresses'] as $address ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
865 |
|
866 |
+
if ( ! empty( $address['email'] ) || ! empty( $address['field'] ) ) {
|
867 |
|
868 |
+
$email = '';
|
869 |
+
|
870 |
+
if ( 'custom' === $address['type'] ) {
|
871 |
+
$email = $address['email'];
|
872 |
+
} else {
|
873 |
+
$email_field = $address['field'];
|
874 |
+
|
875 |
+
if ( ! empty( $email_field ) && ! empty( $submission[$email_field] ) ) {
|
876 |
+
if ( is_array( $submission[$email_field] ) && ! empty( $submission[$email_field]['confirm'] ) ) {
|
877 |
+
$email = $submission[$email_field]['confirm'];
|
878 |
+
} else {
|
879 |
+
$email = $submission[$email_field];
|
880 |
+
}
|
881 |
+
}
|
882 |
+
}
|
883 |
+
|
884 |
+
if ( ! empty( $email ) ) {
|
885 |
+
$subject = apply_filters( 'ccf_email_subject', $subject, $form_id, $email, $form_page, $notification );
|
886 |
+
$notification_content = apply_filters( 'ccf_email_content', $message, $form_id, $email, $form_page, $notification );
|
887 |
+
$notification_headers = apply_filters( 'ccf_email_headers', $headers, $form_id, $email, $form_page, $notification );
|
888 |
|
889 |
+
do_action( 'ccf_send_notification', $email, $subject, $notification_content, $notification_headers, $notification );
|
890 |
+
|
891 |
+
wp_mail( $email, $subject, $notification_content, $notification_headers );
|
892 |
+
}
|
893 |
+
}
|
|
|
|
|
894 |
}
|
|
|
895 |
|
|
|
|
|
|
|
896 |
}
|
897 |
}
|
898 |
}
|
899 |
|
900 |
+
|
901 |
if ( 'redirect' === $output['action_type'] ) {
|
902 |
$output['completion_redirect_url'] = get_post_meta( $form_id, 'ccf_form_completion_redirect_url', true );
|
903 |
} else {
|
classes/class-ccf-form-manager.php
CHANGED
@@ -120,10 +120,13 @@ class CCF_Form_Manager {
|
|
120 |
<div class="structure-fields draggable-fields"></div>
|
121 |
</div>
|
122 |
</div>
|
123 |
-
<div class="accordion-section
|
124 |
-
|
|
|
125 |
</div>
|
126 |
|
|
|
|
|
127 |
<div class="form-content" data-drag-message="<?php esc_html_e( '← Drag fields from the left here.', 'custom-contact-forms' ); ?>">
|
128 |
</div>
|
129 |
|
@@ -145,140 +148,257 @@ class CCF_Form_Manager {
|
|
145 |
</div>
|
146 |
</script>
|
147 |
|
148 |
-
<script type="text/html" id="ccf-form-
|
149 |
-
<
|
150 |
-
<div class="section-content">
|
151 |
-
<p>
|
152 |
-
<label for="ccf_form_title"><?php esc_html_e( 'Form Title:', 'custom-contact-forms' ); ?></label>
|
153 |
-
<input class="widefat form-title" id="ccf_form_title" name="title" type="text" value="{{ form.title.raw }}">
|
154 |
-
</p>
|
155 |
-
|
156 |
-
<p>
|
157 |
-
<label for="ccf_form_description"><?php esc_html_e( 'Form Description:', 'custom-contact-forms' ); ?></label>
|
158 |
-
<textarea class="widefat form-description" id="ccf_form_description" name="description">{{ form.description }}</textarea>
|
159 |
-
</p>
|
160 |
-
|
161 |
-
<p>
|
162 |
-
<label for="ccf_form_button_text"><?php esc_html_e( 'Button Text:', 'custom-contact-forms' ); ?></label>
|
163 |
-
<input class="widefat form-button-text" id="ccf_form_button_text" name="text" type="text" value="{{ form.buttonText }}">
|
164 |
-
</p>
|
165 |
-
|
166 |
-
<p>
|
167 |
-
<label for="ccf_form_completion_action_type"><?php esc_html_e( 'On form completion:', 'custom-contact-forms' ); ?></label>
|
168 |
-
|
169 |
-
<select name="completion_action_type" class="form-completion-action-type" id="ccf_form_completion_action_type">
|
170 |
-
<option value="text"><?php esc_html_e( 'Show text', 'custom-contact-forms' ); ?></option>
|
171 |
-
<option value="redirect" <# if ( 'redirect' === form.completionActionType ) { #>selected<# } #>><?php esc_html_e( 'Redirect', 'custom-contact-forms' ); ?></option>
|
172 |
-
</select>
|
173 |
-
</p>
|
174 |
-
<p class="completion-redirect-url">
|
175 |
-
<label for="ccf_form_completion_redirect_url"><?php esc_html_e( 'Redirect URL:', 'custom-contact-forms' ); ?></label>
|
176 |
-
<input class="widefat form-completion-redirect-url" id="ccf_form_completion_redirect_url" name="text" type="text" value="{{ form.completionRedirectUrl }}">
|
177 |
-
</p>
|
178 |
-
<p class="completion-message">
|
179 |
-
<label for="ccf_form_completion_message"><?php esc_html_e( 'Completion Message:', 'custom-contact-forms' ); ?></label>
|
180 |
-
<textarea class="widefat form-completion-message" id="ccf_form_completion_message" name="completion-message">{{ form.completionMessage }}</textarea>
|
181 |
-
</p>
|
182 |
-
<p>
|
183 |
-
<label for="ccf_form_pause"><?php esc_html_e( 'Pause form:', 'custom-contact-forms' ); ?></label>
|
184 |
-
|
185 |
-
<select name="form_pause" class="form-pause" id="ccf_form_pause">
|
186 |
-
<option value="0"><?php esc_html_e( 'No', 'custom-contact-forms' ); ?></option>
|
187 |
-
<option value="1" <# if ( form.pause ) { #>selected<# } #>><?php esc_html_e( 'Yes', 'custom-contact-forms' ); ?></option>
|
188 |
-
</select>
|
189 |
-
</p>
|
190 |
-
<p class="pause-message">
|
191 |
-
<label for="ccf_form_pause_message"><?php esc_html_e( 'Pause Message:', 'custom-contact-forms' ); ?></label>
|
192 |
-
<textarea class="widefat form-pause-message" id="ccf_form_pause_message" name="pause-message">{{ form.pauseMessage }}</textarea>
|
193 |
-
</p>
|
194 |
-
</div>
|
195 |
</script>
|
196 |
|
197 |
-
<script type="text/html" id="ccf-form-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
<option value="0" <# if ( ! form.sendEmailNotifications ) { #>selected<# } #>><?php esc_html_e( 'No', 'custom-contact-forms' ); ?></option>
|
206 |
-
</select>
|
207 |
-
</p>
|
208 |
-
|
209 |
-
<p class="email-notification-setting">
|
210 |
-
<label for="ccf_form_email_notification_addresses"><?php esc_html_e( '"To" Email Addresses (comma separated):', 'custom-contact-forms' ); ?></label>
|
211 |
-
<input class="widefat form-email-notification-addresses" id="ccf_form_email_notification_addresses" name="email-notification-addresses" value="{{ form.emailNotificationAddresses }}">
|
212 |
-
</p>
|
213 |
-
|
214 |
-
<p class="email-notification-setting">
|
215 |
-
<label for="ccf_form_email_notification_from_type"><?php esc_html_e( '"From" Email Address Type:', 'custom-contact-forms' ); ?></label>
|
216 |
-
<select name="email_notification_from_type" class="form-email-notification-from-type" id="ccf_form_email_notification_from_type">
|
217 |
-
<option value="default"><?php esc_html_e( 'WordPress Default', 'custom-contact-forms' ); ?></option>
|
218 |
-
<option value="custom" <# if ( 'custom' === form.emailNotificationFromType ) { #>selected<# } #>><?php esc_html_e( 'Custom Email', 'custom-contact-forms' ); ?></option>
|
219 |
-
<option value="field" <# if ( 'field' === form.emailNotificationFromType ) { #>selected<# } #>><?php esc_html_e( 'Form Field', 'custom-contact-forms' ); ?></option>
|
220 |
-
</select>
|
221 |
-
|
222 |
-
<span class="explain"><?php esc_html_e( 'You can set the notification emails from address to be the WP default, a custom email address, or pull the address from a field in the form.', 'custom-contact-forms' ); ?></span>
|
223 |
-
</p>
|
224 |
-
|
225 |
-
<p class="email-notification-from-address">
|
226 |
-
<label for="ccf_form_email_notification_from_address"><?php esc_html_e( 'Custom "From" Email Address:', 'custom-contact-forms' ); ?></label>
|
227 |
-
<input class="widefat form-email-notification-from-address" id="ccf_form_email_notification_from_address" name="email-notification-from-address" value="{{ form.emailNotificationFromAddress }}">
|
228 |
-
</p>
|
229 |
-
|
230 |
-
<p class="email-notification-from-field">
|
231 |
-
<label for="ccf_form_email_notification_from_field"><?php esc_html_e( 'Pull "From" Email Dynamically from Field:', 'custom-contact-forms' ); ?></label>
|
232 |
-
<select name="email_notification_from_field" class="form-email-notification-from-field" id="ccf_form_email_notification_from_field">
|
233 |
-
</select>
|
234 |
-
</p>
|
235 |
-
|
236 |
-
<p class="email-notification-setting">
|
237 |
-
<label for="ccf_form_email_notification_from_name_type"><?php esc_html_e( '"From" Name Type:', 'custom-contact-forms' ); ?></label>
|
238 |
-
<select name="email_notification_from_name_type" class="form-email-notification-from-name-type" id="ccf_form_email_notification_from_name_type">
|
239 |
-
<option value="custom"><?php esc_html_e( 'Custom Name', 'custom-contact-forms' ); ?></option>
|
240 |
-
<option value="field" <# if ( 'field' === form.emailNotificationFromNameType ) { #>selected<# } #>><?php esc_html_e( 'Form Field', 'custom-contact-forms' ); ?></option>
|
241 |
-
</select>
|
242 |
|
243 |
-
<
|
244 |
-
|
|
|
|
|
|
|
|
|
|
|
245 |
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
250 |
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
256 |
|
|
|
|
|
|
|
|
|
|
|
257 |
|
|
|
|
|
|
|
258 |
|
|
|
|
|
259 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
260 |
|
|
|
|
|
|
|
|
|
|
|
261 |
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
<option value="field" <# if ( 'field' === form.emailNotificationSubjectType ) { #>selected<# } #>><?php esc_html_e( 'Form Field', 'custom-contact-forms' ); ?></option>
|
268 |
-
</select>
|
269 |
|
270 |
-
|
271 |
-
|
|
|
272 |
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
277 |
|
278 |
-
<p
|
279 |
-
<
|
280 |
-
<select name="email_notification_subject_field" class="form-email-notification-subject-field" id="ccf_form_email_notification_subject_field">
|
281 |
-
</select>
|
282 |
</p>
|
283 |
</div>
|
284 |
</script>
|
@@ -689,12 +809,21 @@ class CCF_Form_Manager {
|
|
689 |
</div>
|
690 |
<div>
|
691 |
<input type="checkbox" <# if ( field.showDate ) { #>checked="checked"<# } #> class="field-show-date" value="1" id="ccf-field-show-date">
|
692 |
-
<label for="ccf-show-date"><?php esc_html_e( 'Enable Date Select', 'custom-contact-forms' ); ?></label>
|
693 |
</div>
|
694 |
<div>
|
695 |
<input type="checkbox" <# if ( field.showTime ) { #>checked="checked"<# } #> class="field-show-time" value="1" id="ccf-field-show-time">
|
696 |
-
<label for="ccf-show-time"><?php esc_html_e( 'Enable Time Select', 'custom-contact-forms' ); ?></label>
|
697 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
698 |
</div>
|
699 |
</div>
|
700 |
<div class="accordion-section">
|
120 |
<div class="structure-fields draggable-fields"></div>
|
121 |
</div>
|
122 |
</div>
|
123 |
+
<div class="accordion-section">
|
124 |
+
<a class="form-settings-heading"><?php esc_html_e( 'Form Settings', 'custom-contact-forms' ); ?></a>
|
125 |
+
</div>
|
126 |
</div>
|
127 |
|
128 |
+
<div class="ccf-form-settings"></div>
|
129 |
+
|
130 |
<div class="form-content" data-drag-message="<?php esc_html_e( '← Drag fields from the left here.', 'custom-contact-forms' ); ?>">
|
131 |
</div>
|
132 |
|
148 |
</div>
|
149 |
</script>
|
150 |
|
151 |
+
<script type="text/html" id="ccf-empty-form-notification-row-template">
|
152 |
+
<td colspan="4" class="no-notifications"><?php esc_html_e( 'No notifications yet.', 'custom-contact-forms' ); ?> <a class="add"><?php esc_html_e( 'Add one?', 'custom-contact-forms' ); ?></a></td>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
153 |
</script>
|
154 |
|
155 |
+
<script type="text/html" id="ccf-existing-form-notification-table-row-template">
|
156 |
+
<# if ( 'view' === context ) { #>
|
157 |
+
<td>
|
158 |
+
<# if ( '' !== notification.title ) { #>
|
159 |
+
{{ notification.title }}
|
160 |
+
<# } else { #>
|
161 |
+
<?php esc_html_e( '(Untitled)', 'custom-contact-forms' ); ?>
|
162 |
+
<# } #>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
163 |
|
164 |
+
<div class="actions">
|
165 |
+
<a class="edit-notification"><?php esc_html_e( 'Edit', 'custom-contact-forms' ); ?></a> |
|
166 |
+
<a class="delete-notification"><?php esc_html_e( 'Delete', 'custom-contact-forms' ); ?></a>
|
167 |
+
</div>
|
168 |
+
</td>
|
169 |
+
<td>
|
170 |
+
<# if ( 'default' === notification.subjectType ) { #>
|
171 |
|
172 |
+
<?php echo wp_specialchars_decode( get_bloginfo( 'name' ) ); ?>: <?php esc_html_e( 'Form Submission', 'custom-contact-forms' ); ?>
|
173 |
+
<# if ( form.title.raw ) { #>
|
174 |
+
<?php esc_html_e( 'to', 'custom-contact-forms' ); ?> {{ form.title.raw }}
|
175 |
+
<# } #>
|
176 |
+
<# } else if ( 'custom' === notification.subjectType ) { #>
|
177 |
+
{{ notification.subject }}
|
178 |
+
<# } else { #>
|
179 |
+
<?php esc_html_e( 'Pulled from', 'custom-contact-forms' ); ?> {{ notification.subjectField }}
|
180 |
+
<# } #>
|
181 |
+
</td>
|
182 |
+
<td>
|
183 |
+
<# if ( ! notification.addresses.length || ( 1 === notification.addresses.length && ! notification.addresses[0].email && ! notification.addresses[0].field ) ) { #>
|
184 |
+
<?php esc_html_e( 'No One', 'custom-contact-forms' ); ?>
|
185 |
+
<# } else { #>
|
186 |
+
<# var i = 0; _.each( notification.addresses, function( address ) { if ( ( 'custom' === address.type && address.email ) || ( 'field' === address.type && address.field ) ) { i++ #>
|
187 |
+
<# if ( i > 1 ) { #>
|
188 |
+
,
|
189 |
+
<# } #>
|
190 |
|
191 |
+
<# if ( 'custom' === address.type ) { #>
|
192 |
+
{{ address.email }}
|
193 |
+
<# } else { #>
|
194 |
+
"{{ address.field }}" <?php esc_html_e( 'Field', 'custom-contact-forms' ); ?>
|
195 |
+
<# } #>
|
196 |
+
<# } } ); #>
|
197 |
+
<# } #>
|
198 |
+
</td>
|
199 |
+
<td>
|
200 |
+
<# if ( notification.active ) { #>
|
201 |
+
<span class="active-indicator">•</span>
|
202 |
+
<# } else { #>
|
203 |
+
<span class="inactive-indicator">•</span>
|
204 |
+
<# } #>
|
205 |
+
</td>
|
206 |
+
<# } else { #>
|
207 |
+
<td colspan="4">
|
208 |
+
<a class="close-notification">×</a>
|
209 |
|
210 |
+
<div class="left">
|
211 |
+
<p class="email-notification-name">
|
212 |
+
<label for="ccf_form_email_notification_title"><?php esc_html_e( 'Notification Title:', 'custom-contact-forms' ); ?></label>
|
213 |
+
<input class="widefat form-email-notification-title" id="ccf_form_email_notification_title" name="email-notification-title" value="{{ notification.title }}">
|
214 |
+
</p>
|
215 |
|
216 |
+
<label for="ccf_form_email_notification_content"><?php esc_html_e( 'Email content (HTML):', 'custom-contact-forms' ); ?></label>
|
217 |
+
<textarea id="ccf_form_email_notification_content" class="form-email-notification-content">{{ notification.content }}</textarea><br />
|
218 |
+
<strong><?php esc_html_e( 'Variables:', 'custom-contact-forms' ); ?></strong> [all_fields]
|
219 |
|
220 |
+
<p class="email-notification-setting">
|
221 |
+
<label for="ccf_form_email_notification_addresses"><?php esc_html_e( '"To" Email Addresses:', 'custom-contact-forms' ); ?></label>
|
222 |
|
223 |
+
<div class="addresses">
|
224 |
+
</div>
|
225 |
+
</p>
|
226 |
+
|
227 |
+
<p><em><?php _e( 'If you are not receiving email notifications, we highly recommend installing the <a href="https://wordpress.org/plugins/easy-wp-smtp/">WP Easy SMTP</a> plugin as there is probably an issue with emailing on your host.', 'custom-contact-forms' ); ?></em></p>
|
228 |
+
</div>
|
229 |
+
<div class="right">
|
230 |
+
<p class="email-notification-active">
|
231 |
+
<label for="ccf_form_email_notification_active"><strong><?php esc_html_e( 'Activate Notification:', 'custom-contact-forms' ); ?></strong></label>
|
232 |
+
|
233 |
+
<select name="email_notification_active" class="form-email-notification-active" id="ccf_form_email_notification_active">
|
234 |
+
<option><?php esc_html_e( 'No', 'custom-contact-forms' ); ?></option>
|
235 |
+
<option <# if ( notification.active ) { #>selected<# } #>><?php esc_html_e( 'Yes', 'custom-contact-forms' ); ?></option>
|
236 |
+
</select>
|
237 |
+
|
238 |
+
<span class="explain"><?php esc_html_e( 'Only active notifications will be sent.', 'custom-contact-forms' ); ?></span>
|
239 |
+
</p>
|
240 |
+
|
241 |
+
<p class="email-notification-setting">
|
242 |
+
<label for="ccf_form_email_notification_from_type"><?php esc_html_e( '"From" Email Address Type:', 'custom-contact-forms' ); ?></label>
|
243 |
+
<select name="email_notification_from_type" class="form-email-notification-from-type" id="ccf_form_email_notification_from_type">
|
244 |
+
<option value="default"><?php esc_html_e( 'WordPress Default', 'custom-contact-forms' ); ?></option>
|
245 |
+
<option value="custom" <# if ( 'custom' === notification.fromType ) { #>selected<# } #>><?php esc_html_e( 'Custom Email', 'custom-contact-forms' ); ?></option>
|
246 |
+
<option value="field" <# if ( 'field' === notification.fromType ) { #>selected<# } #>><?php esc_html_e( 'Form Field', 'custom-contact-forms' ); ?></option>
|
247 |
+
</select>
|
248 |
+
|
249 |
+
<span class="explain"><?php esc_html_e( 'You can set the notification emails from address to be the WP default, a custom email address, or pull the address from a field in the form.', 'custom-contact-forms' ); ?></span>
|
250 |
+
</p>
|
251 |
+
|
252 |
+
<p class="email-notification-from-address">
|
253 |
+
<label for="ccf_form_email_notification_from_address"><?php esc_html_e( 'Custom "From" Email Address:', 'custom-contact-forms' ); ?></label>
|
254 |
+
<input class="widefat form-email-notification-from-address" id="ccf_form_email_notification_from_address" name="email-notification-from-address" value="{{ notification.fromAddress }}">
|
255 |
+
</p>
|
256 |
+
|
257 |
+
<p class="email-notification-from-field">
|
258 |
+
<label for="ccf_form_email_notification_from_field"><?php esc_html_e( 'Pull "From" Email Dynamically from Field:', 'custom-contact-forms' ); ?></label>
|
259 |
+
<select name="email_notification_from_field" class="form-email-notification-from-field" id="ccf_form_email_notification_from_field">
|
260 |
+
</select>
|
261 |
+
</p>
|
262 |
+
|
263 |
+
<p class="email-notification-setting">
|
264 |
+
<label for="ccf_form_email_notification_from_name_type"><?php esc_html_e( '"From" Name Type:', 'custom-contact-forms' ); ?></label>
|
265 |
+
<select name="email_notification_from_name_type" class="form-email-notification-from-name-type" id="ccf_form_email_notification_from_name_type">
|
266 |
+
<option value="custom"><?php esc_html_e( 'Custom Name', 'custom-contact-forms' ); ?></option>
|
267 |
+
<option value="field" <# if ( 'field' === notification.fromNameType ) { #>selected<# } #>><?php esc_html_e( 'Form Field', 'custom-contact-forms' ); ?></option>
|
268 |
+
</select>
|
269 |
+
|
270 |
+
<span class="explain"><?php esc_html_e( 'You can set the notification emails from name to be a custom name or pull the name from a field in the form.', 'custom-contact-forms' ); ?></span>
|
271 |
+
</p>
|
272 |
+
|
273 |
+
<p class="email-notification-from-name">
|
274 |
+
<label for="ccf_form_email_notification_from_name"><?php esc_html_e( 'Custom "From" Name:', 'custom-contact-forms' ); ?></label>
|
275 |
+
<input class="widefat form-email-notification-from-name" id="ccf_form_email_notification_from_name" name="email-notification-from-name" value="{{ notification.fromName }}">
|
276 |
+
</p>
|
277 |
+
|
278 |
+
<p class="email-notification-from-name-field">
|
279 |
+
<label for="ccf_form_email_notification_from_name_field"><?php esc_html_e( 'Pull "From" Name Dynamically from Field:', 'custom-contact-forms' ); ?></label>
|
280 |
+
<select name="email_notification_from_name_field" class="form-email-notification-from-name-field" id="ccf_form_email_notification_from_name_field">
|
281 |
+
</select>
|
282 |
+
</p>
|
283 |
+
|
284 |
+
<p class="email-notification-setting">
|
285 |
+
<label for="ccf_form_email_notification_subject_type"><?php esc_html_e( 'Email Subject Type:', 'custom-contact-forms' ); ?></label>
|
286 |
+
<select name="email_notification_subject_type" class="form-email-notification-subject-type" id="ccf_form_email_notification_subject_type">
|
287 |
+
<option value="default"><?php esc_html_e( 'Default', 'custom-contact-forms' ); ?></option>
|
288 |
+
<option value="custom" <# if ( 'custom' === notification.subjectType ) { #>selected<# } #>><?php esc_html_e( 'Custom Subject', 'custom-contact-forms' ); ?></option>
|
289 |
+
<option value="field" <# if ( 'field' === notification.subjectType ) { #>selected<# } #>><?php esc_html_e( 'Form Field', 'custom-contact-forms' ); ?></option>
|
290 |
+
</select>
|
291 |
+
|
292 |
+
<span class="explain"><?php esc_html_e( 'You can set the notification emails subject line to be the CCF default, custom text, or pull the subject from a field in the form.', 'custom-contact-forms' ); ?></span>
|
293 |
+
</p>
|
294 |
+
|
295 |
+
<p class="email-notification-subject">
|
296 |
+
<label for="ccf_form_email_notification_subject"><?php esc_html_e( 'Custom Email Subject:', 'custom-contact-forms' ); ?></label>
|
297 |
+
<input class="widefat form-email-notification-subject" id="ccf_form_email_notification_subject" name="email-notification-subject" value="{{ notification.subject }}">
|
298 |
+
</p>
|
299 |
+
|
300 |
+
<p class="email-notification-subject-field">
|
301 |
+
<label for="ccf_form_email_notification_subject_field"><?php esc_html_e( 'Pull Email Subject Dynamically from Field:', 'custom-contact-forms' ); ?></label>
|
302 |
+
<select name="email_notification_subject_field" class="form-email-notification-subject-field" id="ccf_form_email_notification_subject_field">
|
303 |
+
</select>
|
304 |
+
</p>
|
305 |
+
</div>
|
306 |
+
</td>
|
307 |
+
<# } #>
|
308 |
+
</script>
|
309 |
|
310 |
+
<script type="text/html" id="ccf-form-notification-address-template">
|
311 |
+
<select name="form_notification_address_type" class="form-notification-address-type" id="ccf_form_notification_address_type">
|
312 |
+
<option value="custom"><?php esc_html_e( 'Custom Email', 'custom-contact-forms' ); ?></option>
|
313 |
+
<option value="field" <# if ( 'field' === address.type ) { #>selected<# } #>><?php esc_html_e( 'Form Field', 'custom-contact-forms' ); ?></option>
|
314 |
+
</select>
|
315 |
|
316 |
+
<# if ( 'custom' === address.type ) { #>
|
317 |
+
<input class="form-notification-address-email" type="text" placeholder="<?php esc_html_e( 'Email', 'custom-contact-forms' ); ?>" value="{{ address.email }}">
|
318 |
+
<# } else if ( 'field' === address.type ) { #>
|
319 |
+
<select name="form_notification_address_field" class="form-notification-address-field" id="ccf_form_notification_address_field"></select>
|
320 |
+
<# } #>
|
|
|
|
|
321 |
|
322 |
+
<a aria-hidden="true" data-icon="" class="add"></a>
|
323 |
+
<a aria-hidden="true" data-icon="" class="delete"></a>
|
324 |
+
</script>
|
325 |
|
326 |
+
<script type="text/html" id="ccf-form-settings-template">
|
327 |
+
<h3>General</h3>
|
328 |
+
|
329 |
+
<p>
|
330 |
+
<label for="ccf_form_title"><?php esc_html_e( 'Form Title:', 'custom-contact-forms' ); ?></label>
|
331 |
+
<input class="widefat form-title" id="ccf_form_title" name="title" type="text" value="{{ form.title.raw }}">
|
332 |
+
</p>
|
333 |
+
|
334 |
+
<p>
|
335 |
+
<label for="ccf_form_description"><?php esc_html_e( 'Form Description:', 'custom-contact-forms' ); ?></label>
|
336 |
+
<textarea class="widefat form-description" id="ccf_form_description" name="description">{{ form.description }}</textarea>
|
337 |
+
</p>
|
338 |
+
|
339 |
+
<p>
|
340 |
+
<label for="ccf_form_button_text"><?php esc_html_e( 'Button Text:', 'custom-contact-forms' ); ?></label>
|
341 |
+
<input class="widefat form-button-text" id="ccf_form_button_text" name="text" type="text" value="{{ form.buttonText }}">
|
342 |
+
</p>
|
343 |
+
|
344 |
+
<p>
|
345 |
+
<label for="ccf_form_completion_action_type"><?php esc_html_e( 'On form completion:', 'custom-contact-forms' ); ?></label>
|
346 |
+
|
347 |
+
<select name="completion_action_type" class="form-completion-action-type" id="ccf_form_completion_action_type">
|
348 |
+
<option value="text"><?php esc_html_e( 'Show text', 'custom-contact-forms' ); ?></option>
|
349 |
+
<option value="redirect" <# if ( 'redirect' === form.completionActionType ) { #>selected<# } #>><?php esc_html_e( 'Redirect', 'custom-contact-forms' ); ?></option>
|
350 |
+
</select>
|
351 |
+
</p>
|
352 |
+
<p class="completion-redirect-url">
|
353 |
+
<label for="ccf_form_completion_redirect_url"><?php esc_html_e( 'Redirect URL:', 'custom-contact-forms' ); ?></label>
|
354 |
+
<input class="widefat form-completion-redirect-url" id="ccf_form_completion_redirect_url" name="text" type="text" value="{{ form.completionRedirectUrl }}">
|
355 |
+
</p>
|
356 |
+
<p class="completion-message">
|
357 |
+
<label for="ccf_form_completion_message"><?php esc_html_e( 'Completion Message:', 'custom-contact-forms' ); ?></label>
|
358 |
+
<textarea class="widefat form-completion-message" id="ccf_form_completion_message" name="completion-message">{{ form.completionMessage }}</textarea>
|
359 |
+
</p>
|
360 |
+
<p>
|
361 |
+
<label for="ccf_form_pause"><?php esc_html_e( 'Pause form:', 'custom-contact-forms' ); ?></label>
|
362 |
+
|
363 |
+
<select name="form_pause" class="form-pause" id="ccf_form_pause">
|
364 |
+
<option value="0"><?php esc_html_e( 'No', 'custom-contact-forms' ); ?></option>
|
365 |
+
<option value="1" <# if ( form.pause ) { #>selected<# } #>><?php esc_html_e( 'Yes', 'custom-contact-forms' ); ?></option>
|
366 |
+
</select>
|
367 |
+
</p>
|
368 |
+
<p class="pause-message">
|
369 |
+
<label for="ccf_form_pause_message"><?php esc_html_e( 'Pause Message:', 'custom-contact-forms' ); ?></label>
|
370 |
+
<textarea class="widefat form-pause-message" id="ccf_form_pause_message" name="pause-message">{{ form.pauseMessage }}</textarea>
|
371 |
+
</p>
|
372 |
+
|
373 |
+
<h3><?php esc_html_e( 'Email Notifications', 'custom-contact-forms' ); ?></h3>
|
374 |
+
|
375 |
+
<div class="ccf-form-notifications">
|
376 |
+
<table cellpadding="0" cellspacing="0">
|
377 |
+
<thead>
|
378 |
+
<tr>
|
379 |
+
<th class="name"><?php esc_html_e( 'Title', 'custom-contact-forms' ); ?></th>
|
380 |
+
<th class="subject"><?php esc_html_e( 'Subject', 'custom-contact-forms' ); ?></th>
|
381 |
+
<th class="to"><?php esc_html_e( 'To', 'custom-contact-forms' ); ?></th>
|
382 |
+
<th class="active"><?php esc_html_e( 'Active', 'custom-contact-forms' ); ?></th>
|
383 |
+
</tr>
|
384 |
+
</thead>
|
385 |
+
<tbody class="rows">
|
386 |
+
|
387 |
+
</tbody>
|
388 |
+
<tfoot>
|
389 |
+
<tr>
|
390 |
+
<th class="name"><?php esc_html_e( 'Title', 'custom-contact-forms' ); ?></th>
|
391 |
+
<th class="subject"><?php esc_html_e( 'Subject', 'custom-contact-forms' ); ?></th>
|
392 |
+
<th class="to"><?php esc_html_e( 'To', 'custom-contact-forms' ); ?></th>
|
393 |
+
<th class="active"><?php esc_html_e( 'Active', 'custom-contact-forms' ); ?></th>
|
394 |
+
</tr>
|
395 |
+
</tfoot>
|
396 |
+
</table>
|
397 |
+
|
398 |
+
<a class="add-notification button"><?php esc_html_e( 'New Notification', 'custom-contact-forms' ); ?></a>
|
399 |
|
400 |
+
<p>
|
401 |
+
<span class="explain"><?php esc_html_e( 'For notification changes to take affect (updating, adding, deleting, etc.), you will need to save the form.', 'custom-contact-forms' ); ?></span>
|
|
|
|
|
402 |
</p>
|
403 |
</div>
|
404 |
</script>
|
809 |
</div>
|
810 |
<div>
|
811 |
<input type="checkbox" <# if ( field.showDate ) { #>checked="checked"<# } #> class="field-show-date" value="1" id="ccf-field-show-date">
|
812 |
+
<label for="ccf-field-show-date"><?php esc_html_e( 'Enable Date Select', 'custom-contact-forms' ); ?></label>
|
813 |
</div>
|
814 |
<div>
|
815 |
<input type="checkbox" <# if ( field.showTime ) { #>checked="checked"<# } #> class="field-show-time" value="1" id="ccf-field-show-time">
|
816 |
+
<label for="ccf-field-show-time"><?php esc_html_e( 'Enable Time Select', 'custom-contact-forms' ); ?></label>
|
817 |
</div>
|
818 |
+
<# if ( field.showDate ) { #>
|
819 |
+
<div>
|
820 |
+
<label for="ccf-date-format"><?php esc_html_e( 'Date Format:', 'custom-contact-forms' ); ?></label>
|
821 |
+
<select id="ccf-date-format" class="field-date-format">
|
822 |
+
<option value="mm/dd/yyyy">mm/dd/yyyy</option>
|
823 |
+
<option <# if ( 'dd/mm/yyyy' === field.dateFormat ) { #>selected="selected"<# } #>>dd/mm/yyyy</option>
|
824 |
+
</select>
|
825 |
+
</div>
|
826 |
+
<# } #>
|
827 |
</div>
|
828 |
</div>
|
829 |
<div class="accordion-section">
|
classes/class-ccf-submission-cpt.php
CHANGED
@@ -39,7 +39,7 @@ class CCF_Submission_CPT {
|
|
39 |
public function setup_cpt() {
|
40 |
$args = array(
|
41 |
'label' => esc_html__( 'Form Submissions', 'custom-contact-forms' ),
|
42 |
-
'public' =>
|
43 |
'exclude_from_search' => true,
|
44 |
'show_in_nav_menus' => false,
|
45 |
'show_ui' => false,
|
39 |
public function setup_cpt() {
|
40 |
$args = array(
|
41 |
'label' => esc_html__( 'Form Submissions', 'custom-contact-forms' ),
|
42 |
+
'public' => false,
|
43 |
'exclude_from_search' => true,
|
44 |
'show_in_nav_menus' => false,
|
45 |
'show_ui' => false,
|
classes/class-ccf-upgrader.php
CHANGED
@@ -296,10 +296,65 @@ class CCF_Upgrader {
|
|
296 |
* @since 6.1
|
297 |
* @return mixed
|
298 |
*/
|
299 |
-
function strstrb( $h, $n ){
|
300 |
return array_shift( explode( $n, $h, 2 ) );
|
301 |
}
|
302 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
303 |
/**
|
304 |
* Return singleton instance of class
|
305 |
*
|
296 |
* @since 6.1
|
297 |
* @return mixed
|
298 |
*/
|
299 |
+
public function strstrb( $h, $n ){
|
300 |
return array_shift( explode( $n, $h, 2 ) );
|
301 |
}
|
302 |
|
303 |
+
/**
|
304 |
+
* Upgrade notifications for 7.1
|
305 |
+
*
|
306 |
+
* @since 7.1
|
307 |
+
*/
|
308 |
+
public function notifications_upgrade_71() {
|
309 |
+
$forms = new WP_Query( array(
|
310 |
+
'post_type' => 'ccf_form',
|
311 |
+
'post_per_page' => 1000,
|
312 |
+
'no_found_rows' => true,
|
313 |
+
'fields' => 'ids',
|
314 |
+
) );
|
315 |
+
|
316 |
+
if ( ! empty( $forms->posts ) ) {
|
317 |
+
foreach ( $forms->posts as $form_id ) {
|
318 |
+
$send_notifications = get_post_meta( $form_id, 'ccf_form_send_email_notifications', true );
|
319 |
+
|
320 |
+
$addresses = get_post_meta( $form_id, 'ccf_form_email_notification_addresses', true );
|
321 |
+
$formatted_addresses = array();
|
322 |
+
|
323 |
+
if ( ! empty( $addresses ) ) {
|
324 |
+
$addresses = explode( ',', $addresses );
|
325 |
+
|
326 |
+
foreach ( $addresses as $address ) {
|
327 |
+
$formatted_addresses[] = array(
|
328 |
+
'type' => 'custom',
|
329 |
+
'email' => sanitize_text_field( $address ),
|
330 |
+
'field' => '',
|
331 |
+
);
|
332 |
+
}
|
333 |
+
}
|
334 |
+
|
335 |
+
$notifications = array(
|
336 |
+
array(
|
337 |
+
'title' => '',
|
338 |
+
'content' => '[all_fields]',
|
339 |
+
'active' => ( ! empty( $send_notifications ) ) ? true : false,
|
340 |
+
'addresses' => $formatted_addresses,
|
341 |
+
'fromType' => sanitize_text_field( get_post_meta( $form_id, 'ccf_form_email_notification_from_type', true ) ),
|
342 |
+
'fromAddress' => sanitize_text_field( get_post_meta( $form_id, 'ccf_form_email_notification_from_address', true ) ),
|
343 |
+
'fromField' => sanitize_text_field( get_post_meta( $form_id, 'ccf_form_email_notification_from_field', true ) ),
|
344 |
+
'subjectType' => sanitize_text_field( get_post_meta( $form_id, 'ccf_form_email_notification_subject_type', true ) ),
|
345 |
+
'subject' => sanitize_text_field( get_post_meta( $form_id, 'ccf_form_email_notification_subject', true ) ),
|
346 |
+
'subjectField' => sanitize_text_field( get_post_meta( $form_id, 'ccf_form_email_notification_subject_field', true ) ),
|
347 |
+
'fromNameType' => sanitize_text_field( get_post_meta( $form_id, 'ccf_form_email_notification_from_name_type', true ) ),
|
348 |
+
'fromName' => sanitize_text_field( get_post_meta( $form_id, 'ccf_form_email_notification_from_name', true ) ),
|
349 |
+
'fromNameField' => sanitize_text_field( get_post_meta( $form_id, 'ccf_form_email_notification_from_name_field', true ) ),
|
350 |
+
)
|
351 |
+
);
|
352 |
+
|
353 |
+
update_post_meta( $form_id, 'ccf_form_notifications', $notifications );
|
354 |
+
}
|
355 |
+
}
|
356 |
+
}
|
357 |
+
|
358 |
/**
|
359 |
* Return singleton instance of class
|
360 |
*
|
custom-contact-forms.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
* Plugin URI: http://www.taylorlovett.com
|
5 |
* Description: Build beautiful custom forms the WordPress way. View live previews of your forms while you build them.
|
6 |
* Author: Taylor Lovett
|
7 |
-
* Version: 7.
|
8 |
* Author URI: http://www.taylorlovett.com
|
9 |
*/
|
10 |
|
@@ -61,4 +61,21 @@ function ccf_flush_rewrites() {
|
|
61 |
update_option( 'ccf_flush_rewrites', true );
|
62 |
}
|
63 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
register_activation_hook( __FILE__, 'ccf_flush_rewrites' );
|
|
4 |
* Plugin URI: http://www.taylorlovett.com
|
5 |
* Description: Build beautiful custom forms the WordPress way. View live previews of your forms while you build them.
|
6 |
* Author: Taylor Lovett
|
7 |
+
* Version: 7.1
|
8 |
* Author URI: http://www.taylorlovett.com
|
9 |
*/
|
10 |
|
61 |
update_option( 'ccf_flush_rewrites', true );
|
62 |
}
|
63 |
|
64 |
+
/**
|
65 |
+
* Upgrade CCF DB information
|
66 |
+
*
|
67 |
+
* @since 7.1
|
68 |
+
*/
|
69 |
+
function ccf_upgrade() {
|
70 |
+
$version = get_option( 'ccf_db_version' );
|
71 |
+
|
72 |
+
if ( empty( $version ) || version_compare( $version, '7.1', '<' ) ) {
|
73 |
+
// Upgrade to 7.1
|
74 |
+
CCF_Upgrader::factory()->notifications_upgrade_71();
|
75 |
+
}
|
76 |
+
|
77 |
+
update_option( 'ccf_db_version', '7.1' );
|
78 |
+
}
|
79 |
+
|
80 |
register_activation_hook( __FILE__, 'ccf_flush_rewrites' );
|
81 |
+
register_activation_hook( __FILE__, 'ccf_upgrade' );
|
fonts/form-manager.eot
CHANGED
Binary file
|
fonts/form-manager.svg
CHANGED
@@ -6,16 +6,18 @@
|
|
6 |
<font id="form-manager" horiz-adv-x="1024">
|
7 |
<font-face units-per-em="1024" ascent="960" descent="-64" />
|
8 |
<missing-glyph horiz-adv-x="1024" />
|
9 |
-
<glyph unicode=" "
|
10 |
-
<glyph unicode="" d="M864 960c88.364 0 160-71.634 160-160 0-36.020-11.91-69.258-32-96l-64-64-224 224 64 64c26.742 20.090 59.978 32 96 32zM64 224l-64-288 288 64 592 592-224 224-592-592zM715.578 596.422l-448-448-55.156 55.156 448 448 55.156-55.156z" />
|
11 |
-
<glyph unicode="" d="M512 768c-223.318 0-416.882-130.042-512-320 95.118-189.958 288.682-320 512-320 223.314 0 416.878 130.042 512 320-95.116 189.958-288.686 320-512 320zM764.45 598.296c60.162-38.374 111.142-89.774 149.434-150.296-38.292-60.522-89.274-111.922-149.436-150.298-75.594-48.216-162.89-73.702-252.448-73.702-89.56 0-176.856 25.486-252.45 73.704-60.16 38.372-111.14 89.772-149.434 150.296 38.292 60.524 89.274 111.924 149.434 150.296 3.918 2.5 7.876 4.922 11.858 7.3-9.958-27.328-15.408-56.822-15.408-87.596 0-141.384 114.616-256 256-256s256 114.616 256 256c0 30.774-5.45 60.268-15.408 87.598 3.98-2.378 7.938-4.802 11.858-7.302zM512 550c0-53.020-42.98-96-96-96s-96 42.98-96 96 42.98 96 96 96 96-42.98 96-96z" />
|
12 |
-
<glyph unicode="" d="M1014.662 137.34c-0.004 0.004-0.008 0.008-0.012 0.010l-310.644 310.65 310.644 310.65c0.004 0.004 0.008 0.006 0.012 0.010 3.344 3.346 5.762 7.254 7.312 11.416 4.246 11.376 1.824 24.682-7.324 33.83l-146.746 146.746c-9.148 9.146-22.45 11.566-33.828 7.32-4.16-1.55-8.070-3.968-11.418-7.31 0-0.004-0.004-0.006-0.008-0.010l-310.648-310.652-310.648 310.65c-0.004 0.004-0.006 0.006-0.010 0.010-3.346 3.342-7.254 5.76-11.414 7.31-11.38 4.248-24.682 1.826-33.83-7.32l-146.748-146.748c-9.148-9.148-11.568-22.452-7.322-33.828 1.552-4.16 3.97-8.072 7.312-11.416 0.004-0.002 0.006-0.006 0.010-0.010l310.65-310.648-310.65-310.652c-0.002-0.004-0.006-0.006-0.008-0.010-3.342-3.346-5.76-7.254-7.314-11.414-4.248-11.376-1.826-24.682 7.322-33.83l146.748-146.746c9.15-9.148 22.452-11.568 33.83-7.322 4.16 1.552 8.070 3.97 11.416 7.312 0.002 0.004 0.006 0.006 0.010 0.010l310.648 310.65 310.648-310.65c0.004-0.002 0.008-0.006 0.012-0.008 3.348-3.344 7.254-5.762 11.414-7.314 11.378-4.246 24.684-1.826 33.828 7.322l146.746 146.748c9.148 9.148 11.57 22.454 7.324 33.83-1.552 4.16-3.97 8.068-7.314 11.414z" />
|
13 |
-
<glyph unicode="" d="M864 832l-480-480-224 224-160-160 384-384 640 640z" />
|
14 |
-
<glyph unicode="" d="M0 544v-192c0-17.672 14.328-32 32-32h960c17.672 0 32 14.328 32 32v192c0 17.672-14.328 32-32 32h-960c-17.672 0-32-14.328-32-32z" />
|
15 |
-
<glyph unicode="" d="M992 576h-352v352c0 17.672-14.328 32-32 32h-192c-17.672 0-32-14.328-32-32v-352h-352c-17.672 0-32-14.328-32-32v-192c0-17.672 14.328-32 32-32h352v-352c0-17.672 14.328-32 32-32h192c17.672 0 32 14.328 32 32v352h352c17.672 0 32 14.328 32 32v192c0 17.672-14.328 32-32 32z" />
|
16 |
-
<glyph unicode="" d="M512 972.8l-235.52-373.76h470.989l-235.469 373.76zM512.051-51.2l235.469 373.76-471.040 0.051 235.571-373.811z" />
|
17 |
-
<glyph unicode="&#
|
18 |
-
<glyph unicode="&#
|
19 |
-
<glyph unicode="&#
|
20 |
-
<glyph unicode="&#
|
|
|
|
|
21 |
</font></defs></svg>
|
6 |
<font id="form-manager" horiz-adv-x="1024">
|
7 |
<font-face units-per-em="1024" ascent="960" descent="-64" />
|
8 |
<missing-glyph horiz-adv-x="1024" />
|
9 |
+
<glyph unicode=" " horiz-adv-x="512" d="" />
|
10 |
+
<glyph unicode="" glyph-name="pencil" d="M864 960c88.364 0 160-71.634 160-160 0-36.020-11.91-69.258-32-96l-64-64-224 224 64 64c26.742 20.090 59.978 32 96 32zM64 224l-64-288 288 64 592 592-224 224-592-592zM715.578 596.422l-448-448-55.156 55.156 448 448 55.156-55.156z" />
|
11 |
+
<glyph unicode="" glyph-name="eye" d="M512 768c-223.318 0-416.882-130.042-512-320 95.118-189.958 288.682-320 512-320 223.314 0 416.878 130.042 512 320-95.116 189.958-288.686 320-512 320zM764.45 598.296c60.162-38.374 111.142-89.774 149.434-150.296-38.292-60.522-89.274-111.922-149.436-150.298-75.594-48.216-162.89-73.702-252.448-73.702-89.56 0-176.856 25.486-252.45 73.704-60.16 38.372-111.14 89.772-149.434 150.296 38.292 60.524 89.274 111.924 149.434 150.296 3.918 2.5 7.876 4.922 11.858 7.3-9.958-27.328-15.408-56.822-15.408-87.596 0-141.384 114.616-256 256-256s256 114.616 256 256c0 30.774-5.45 60.268-15.408 87.598 3.98-2.378 7.938-4.802 11.858-7.302zM512 550c0-53.020-42.98-96-96-96s-96 42.98-96 96 42.98 96 96 96 96-42.98 96-96z" />
|
12 |
+
<glyph unicode="" glyph-name="close" d="M1014.662 137.34c-0.004 0.004-0.008 0.008-0.012 0.010l-310.644 310.65 310.644 310.65c0.004 0.004 0.008 0.006 0.012 0.010 3.344 3.346 5.762 7.254 7.312 11.416 4.246 11.376 1.824 24.682-7.324 33.83l-146.746 146.746c-9.148 9.146-22.45 11.566-33.828 7.32-4.16-1.55-8.070-3.968-11.418-7.31 0-0.004-0.004-0.006-0.008-0.010l-310.648-310.652-310.648 310.65c-0.004 0.004-0.006 0.006-0.010 0.010-3.346 3.342-7.254 5.76-11.414 7.31-11.38 4.248-24.682 1.826-33.83-7.32l-146.748-146.748c-9.148-9.148-11.568-22.452-7.322-33.828 1.552-4.16 3.97-8.072 7.312-11.416 0.004-0.002 0.006-0.006 0.010-0.010l310.65-310.648-310.65-310.652c-0.002-0.004-0.006-0.006-0.008-0.010-3.342-3.346-5.76-7.254-7.314-11.414-4.248-11.376-1.826-24.682 7.322-33.83l146.748-146.746c9.15-9.148 22.452-11.568 33.83-7.322 4.16 1.552 8.070 3.97 11.416 7.312 0.002 0.004 0.006 0.006 0.010 0.010l310.648 310.65 310.648-310.65c0.004-0.002 0.008-0.006 0.012-0.008 3.348-3.344 7.254-5.762 11.414-7.314 11.378-4.246 24.684-1.826 33.828 7.322l146.746 146.748c9.148 9.148 11.57 22.454 7.324 33.83-1.552 4.16-3.97 8.068-7.314 11.414z" />
|
13 |
+
<glyph unicode="" glyph-name="checkmark" d="M864 832l-480-480-224 224-160-160 384-384 640 640z" />
|
14 |
+
<glyph unicode="" glyph-name="minus" d="M0 544v-192c0-17.672 14.328-32 32-32h960c17.672 0 32 14.328 32 32v192c0 17.672-14.328 32-32 32h-960c-17.672 0-32-14.328-32-32z" />
|
15 |
+
<glyph unicode="" glyph-name="plus" d="M992 576h-352v352c0 17.672-14.328 32-32 32h-192c-17.672 0-32-14.328-32-32v-352h-352c-17.672 0-32-14.328-32-32v-192c0-17.672 14.328-32 32-32h352v-352c0-17.672 14.328-32 32-32h192c17.672 0 32 14.328 32 32v352h352c17.672 0 32 14.328 32 32v192c0 17.672-14.328 32-32 32z" />
|
16 |
+
<glyph unicode="" glyph-name="menu" d="M512 972.8l-235.52-373.76h470.989l-235.469 373.76zM512.051-51.2l235.469 373.76-471.040 0.051 235.571-373.811z" />
|
17 |
+
<glyph unicode="" glyph-name="triangle-left" d="M716.8 716.8v-512l-460.8 256 460.8 256z" />
|
18 |
+
<glyph unicode="" glyph-name="triangle-down" d="M256 665.6h512l-256-460.8-256 460.8z" />
|
19 |
+
<glyph unicode="" glyph-name="triangle-right" d="M768 460.8l-460.8-256v512l460.8-256z" />
|
20 |
+
<glyph unicode="" glyph-name="triangle-up" d="M768 256h-512l256 460.8 256-460.8z" />
|
21 |
+
<glyph unicode="" glyph-name="cog" d="M933.79 349.75c-53.726 93.054-21.416 212.304 72.152 266.488l-100.626 174.292c-28.75-16.854-62.176-26.518-97.846-26.518-107.536 0-194.708 87.746-194.708 195.99h-201.258c0.266-33.41-8.074-67.282-25.958-98.252-53.724-93.056-173.156-124.702-266.862-70.758l-100.624-174.292c28.97-16.472 54.050-40.588 71.886-71.478 53.638-92.908 21.512-211.92-71.708-266.224l100.626-174.292c28.65 16.696 61.916 26.254 97.4 26.254 107.196 0 194.144-87.192 194.7-194.958h201.254c-0.086 33.074 8.272 66.57 25.966 97.218 53.636 92.906 172.776 124.594 266.414 71.012l100.626 174.29c-28.78 16.466-53.692 40.498-71.434 71.228zM512 240.668c-114.508 0-207.336 92.824-207.336 207.334 0 114.508 92.826 207.334 207.336 207.334 114.508 0 207.332-92.826 207.332-207.334-0.002-114.51-92.824-207.334-207.332-207.334z" />
|
22 |
+
<glyph unicode="" glyph-name="download3" d="M736 512l-256-256-256 256h160v384h192v-384zM480 256h-480v-256h960v256h-480zM896 128h-128v64h128v-64z" />
|
23 |
</font></defs></svg>
|
fonts/form-manager.ttf
CHANGED
Binary file
|
fonts/form-manager.woff
CHANGED
Binary file
|
fonts/icomoon.json
CHANGED
@@ -1,6 +1,129 @@
|
|
1 |
{
|
2 |
"IcoMoonType": "selection",
|
3 |
"icons": [
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
{
|
5 |
"icon": {
|
6 |
"paths": [
|
@@ -18,16 +141,16 @@
|
|
18 |
},
|
19 |
"attrs": [],
|
20 |
"properties": {
|
21 |
-
"id":
|
22 |
"order": 11,
|
23 |
"prevSize": 32,
|
24 |
"code": 59847,
|
25 |
"ligatures": "download3, save5",
|
26 |
"name": "download3"
|
27 |
},
|
28 |
-
"setIdx":
|
29 |
-
"setId":
|
30 |
-
"iconIdx":
|
31 |
},
|
32 |
{
|
33 |
"icon": {
|
@@ -35,6 +158,7 @@
|
|
35 |
"M933.79 610.25c-53.726-93.054-21.416-212.304 72.152-266.488l-100.626-174.292c-28.75 16.854-62.176 26.518-97.846 26.518-107.536 0-194.708-87.746-194.708-195.99h-201.258c0.266 33.41-8.074 67.282-25.958 98.252-53.724 93.056-173.156 124.702-266.862 70.758l-100.624 174.292c28.97 16.472 54.050 40.588 71.886 71.478 53.638 92.908 21.512 211.92-71.708 266.224l100.626 174.292c28.65-16.696 61.916-26.254 97.4-26.254 107.196 0 194.144 87.192 194.7 194.958h201.254c-0.086-33.074 8.272-66.57 25.966-97.218 53.636-92.906 172.776-124.594 266.414-71.012l100.626-174.29c-28.78-16.466-53.692-40.498-71.434-71.228zM512 719.332c-114.508 0-207.336-92.824-207.336-207.334 0-114.508 92.826-207.334 207.336-207.334 114.508 0 207.332 92.826 207.332 207.334-0.002 114.51-92.824 207.334-207.332 207.334z"
|
36 |
],
|
37 |
"attrs": [],
|
|
|
38 |
"tags": [
|
39 |
"cog",
|
40 |
"gear",
|
@@ -49,22 +173,24 @@
|
|
49 |
},
|
50 |
"attrs": [],
|
51 |
"properties": {
|
52 |
-
"id":
|
53 |
"order": 10,
|
54 |
"prevSize": 32,
|
55 |
"code": 59796,
|
56 |
"ligatures": "cog, gear",
|
57 |
"name": "cog"
|
58 |
},
|
59 |
-
"setIdx":
|
60 |
"setId": 1,
|
61 |
-
"iconIdx":
|
62 |
},
|
63 |
{
|
64 |
"icon": {
|
65 |
"paths": [
|
66 |
"M864 0c88.364 0 160 71.634 160 160 0 36.020-11.91 69.258-32 96l-64 64-224-224 64-64c26.742-20.090 59.978-32 96-32zM64 736l-64 288 288-64 592-592-224-224-592 592zM715.578 363.578l-448 448-55.156-55.156 448-448 55.156 55.156z"
|
67 |
],
|
|
|
|
|
68 |
"tags": [
|
69 |
"pencil",
|
70 |
"write",
|
@@ -74,22 +200,25 @@
|
|
74 |
],
|
75 |
"grid": 16
|
76 |
},
|
|
|
77 |
"properties": {
|
78 |
-
"id":
|
79 |
"order": 5,
|
80 |
"prevSize": 32,
|
81 |
"name": "pencil",
|
82 |
"code": 58880
|
83 |
},
|
84 |
-
"setIdx":
|
85 |
"setId": 1,
|
86 |
-
"iconIdx":
|
87 |
},
|
88 |
{
|
89 |
"icon": {
|
90 |
"paths": [
|
91 |
"M512 192c-223.318 0-416.882 130.042-512 320 95.118 189.958 288.682 320 512 320 223.314 0 416.878-130.042 512-320-95.116-189.958-288.686-320-512-320zM764.45 361.704c60.162 38.374 111.142 89.774 149.434 150.296-38.292 60.522-89.274 111.922-149.436 150.298-75.594 48.216-162.89 73.702-252.448 73.702-89.56 0-176.856-25.486-252.45-73.704-60.16-38.372-111.14-89.772-149.434-150.296 38.292-60.524 89.274-111.924 149.434-150.296 3.918-2.5 7.876-4.922 11.858-7.3-9.958 27.328-15.408 56.822-15.408 87.596 0 141.384 114.616 256 256 256s256-114.616 256-256c0-30.774-5.45-60.268-15.408-87.598 3.98 2.378 7.938 4.802 11.858 7.302zM512 410c0 53.020-42.98 96-96 96s-96-42.98-96-96 42.98-96 96-96 96 42.98 96 96z"
|
92 |
],
|
|
|
|
|
93 |
"tags": [
|
94 |
"eye",
|
95 |
"views",
|
@@ -98,22 +227,25 @@
|
|
98 |
],
|
99 |
"grid": 16
|
100 |
},
|
|
|
101 |
"properties": {
|
102 |
-
"id":
|
103 |
"order": 9,
|
104 |
"prevSize": 32,
|
105 |
"code": 58881,
|
106 |
"name": "eye"
|
107 |
},
|
108 |
-
"setIdx":
|
109 |
"setId": 1,
|
110 |
-
"iconIdx":
|
111 |
},
|
112 |
{
|
113 |
"icon": {
|
114 |
"paths": [
|
115 |
"M1014.662 822.66c-0.004-0.004-0.008-0.008-0.012-0.010l-310.644-310.65 310.644-310.65c0.004-0.004 0.008-0.006 0.012-0.010 3.344-3.346 5.762-7.254 7.312-11.416 4.246-11.376 1.824-24.682-7.324-33.83l-146.746-146.746c-9.148-9.146-22.45-11.566-33.828-7.32-4.16 1.55-8.070 3.968-11.418 7.31 0 0.004-0.004 0.006-0.008 0.010l-310.648 310.652-310.648-310.65c-0.004-0.004-0.006-0.006-0.010-0.010-3.346-3.342-7.254-5.76-11.414-7.31-11.38-4.248-24.682-1.826-33.83 7.32l-146.748 146.748c-9.148 9.148-11.568 22.452-7.322 33.828 1.552 4.16 3.97 8.072 7.312 11.416 0.004 0.002 0.006 0.006 0.010 0.010l310.65 310.648-310.65 310.652c-0.002 0.004-0.006 0.006-0.008 0.010-3.342 3.346-5.76 7.254-7.314 11.414-4.248 11.376-1.826 24.682 7.322 33.83l146.748 146.746c9.15 9.148 22.452 11.568 33.83 7.322 4.16-1.552 8.070-3.97 11.416-7.312 0.002-0.004 0.006-0.006 0.010-0.010l310.648-310.65 310.648 310.65c0.004 0.002 0.008 0.006 0.012 0.008 3.348 3.344 7.254 5.762 11.414 7.314 11.378 4.246 24.684 1.826 33.828-7.322l146.746-146.748c9.148-9.148 11.57-22.454 7.324-33.83-1.552-4.16-3.97-8.068-7.314-11.414z"
|
116 |
],
|
|
|
|
|
117 |
"tags": [
|
118 |
"close",
|
119 |
"cancel",
|
@@ -123,22 +255,25 @@
|
|
123 |
],
|
124 |
"grid": 16
|
125 |
},
|
|
|
126 |
"properties": {
|
127 |
-
"id":
|
128 |
"order": 4,
|
129 |
"prevSize": 32,
|
130 |
"name": "close",
|
131 |
"code": 58882
|
132 |
},
|
133 |
-
"setIdx":
|
134 |
"setId": 1,
|
135 |
-
"iconIdx":
|
136 |
},
|
137 |
{
|
138 |
"icon": {
|
139 |
"paths": [
|
140 |
"M864 128l-480 480-224-224-160 160 384 384 640-640z"
|
141 |
],
|
|
|
|
|
142 |
"tags": [
|
143 |
"checkmark",
|
144 |
"tick",
|
@@ -148,22 +283,25 @@
|
|
148 |
],
|
149 |
"grid": 16
|
150 |
},
|
|
|
151 |
"properties": {
|
152 |
-
"id":
|
153 |
"order": 3,
|
154 |
"prevSize": 32,
|
155 |
"name": "checkmark",
|
156 |
"code": 58883
|
157 |
},
|
158 |
-
"setIdx":
|
159 |
"setId": 1,
|
160 |
-
"iconIdx":
|
161 |
},
|
162 |
{
|
163 |
"icon": {
|
164 |
"paths": [
|
165 |
"M0 416v192c0 17.672 14.328 32 32 32h960c17.672 0 32-14.328 32-32v-192c0-17.672-14.328-32-32-32h-960c-17.672 0-32 14.328-32 32z"
|
166 |
],
|
|
|
|
|
167 |
"tags": [
|
168 |
"minus",
|
169 |
"minimize",
|
@@ -171,22 +309,25 @@
|
|
171 |
],
|
172 |
"grid": 16
|
173 |
},
|
|
|
174 |
"properties": {
|
175 |
-
"id":
|
176 |
"order": 2,
|
177 |
"prevSize": 32,
|
178 |
"name": "minus",
|
179 |
"code": 58884
|
180 |
},
|
181 |
-
"setIdx":
|
182 |
"setId": 1,
|
183 |
-
"iconIdx":
|
184 |
},
|
185 |
{
|
186 |
"icon": {
|
187 |
"paths": [
|
188 |
"M992 384h-352v-352c0-17.672-14.328-32-32-32h-192c-17.672 0-32 14.328-32 32v352h-352c-17.672 0-32 14.328-32 32v192c0 17.672 14.328 32 32 32h352v352c0 17.672 14.328 32 32 32h192c17.672 0 32-14.328 32-32v-352h352c17.672 0 32-14.328 32-32v-192c0-17.672-14.328-32-32-32z"
|
189 |
],
|
|
|
|
|
190 |
"tags": [
|
191 |
"plus",
|
192 |
"add",
|
@@ -194,88 +335,17 @@
|
|
194 |
],
|
195 |
"grid": 16
|
196 |
},
|
|
|
197 |
"properties": {
|
198 |
-
"id":
|
199 |
"order": 1,
|
200 |
"prevSize": 32,
|
201 |
"name": "plus",
|
202 |
"code": 58885
|
203 |
},
|
204 |
-
"setIdx":
|
205 |
-
"setId": 1,
|
206 |
-
"iconIdx": 6
|
207 |
-
},
|
208 |
-
{
|
209 |
-
"icon": {
|
210 |
-
"paths": [
|
211 |
-
"M747.52 307.251l-471.040-0.051 235.52 409.6z"
|
212 |
-
],
|
213 |
-
"tags": [
|
214 |
-
"arrow-down",
|
215 |
-
"triangle",
|
216 |
-
"down",
|
217 |
-
"bottom"
|
218 |
-
],
|
219 |
-
"grid": 20
|
220 |
-
},
|
221 |
-
"properties": {
|
222 |
-
"id": 202,
|
223 |
-
"order": 8,
|
224 |
-
"prevSize": 20,
|
225 |
-
"code": 58887,
|
226 |
-
"name": "arrow-down"
|
227 |
-
},
|
228 |
-
"setIdx": 1,
|
229 |
"setId": 1,
|
230 |
"iconIdx": 7
|
231 |
-
},
|
232 |
-
{
|
233 |
-
"icon": {
|
234 |
-
"paths": [
|
235 |
-
"M307.251 276.48l-0.051 471.040 409.6-235.52z"
|
236 |
-
],
|
237 |
-
"tags": [
|
238 |
-
"arrow-right",
|
239 |
-
"triangle",
|
240 |
-
"right",
|
241 |
-
"next"
|
242 |
-
],
|
243 |
-
"grid": 20
|
244 |
-
},
|
245 |
-
"properties": {
|
246 |
-
"id": 204,
|
247 |
-
"order": 7,
|
248 |
-
"prevSize": 20,
|
249 |
-
"code": 58888,
|
250 |
-
"name": "arrow-right"
|
251 |
-
},
|
252 |
-
"setIdx": 1,
|
253 |
-
"setId": 1,
|
254 |
-
"iconIdx": 8
|
255 |
-
},
|
256 |
-
{
|
257 |
-
"icon": {
|
258 |
-
"paths": [
|
259 |
-
"M512 0l-235.52 373.76h470.989l-235.469-373.76zM512.051 1024l235.469-373.76-471.040-0.051 235.571 373.811z"
|
260 |
-
],
|
261 |
-
"tags": [
|
262 |
-
"menu",
|
263 |
-
"arrows",
|
264 |
-
"up-down",
|
265 |
-
"dropdown"
|
266 |
-
],
|
267 |
-
"grid": 20
|
268 |
-
},
|
269 |
-
"properties": {
|
270 |
-
"id": 221,
|
271 |
-
"order": 6,
|
272 |
-
"prevSize": 20,
|
273 |
-
"name": "menu",
|
274 |
-
"code": 58886
|
275 |
-
},
|
276 |
-
"setIdx": 1,
|
277 |
-
"setId": 1,
|
278 |
-
"iconIdx": 9
|
279 |
}
|
280 |
],
|
281 |
"height": 1024,
|
@@ -300,7 +370,8 @@
|
|
300 |
"showQuickUse": true,
|
301 |
"quickUsageToken": false,
|
302 |
"showMetrics": true,
|
303 |
-
"showMetadata": false
|
|
|
304 |
},
|
305 |
"imagePref": {
|
306 |
"color": 0,
|
1 |
{
|
2 |
"IcoMoonType": "selection",
|
3 |
"icons": [
|
4 |
+
{
|
5 |
+
"icon": {
|
6 |
+
"paths": [
|
7 |
+
"M256 307.2h512l-256 460.8-256-460.8z"
|
8 |
+
],
|
9 |
+
"attrs": [],
|
10 |
+
"isMulticolor": false,
|
11 |
+
"tags": [
|
12 |
+
"triangle-down"
|
13 |
+
],
|
14 |
+
"grid": 20
|
15 |
+
},
|
16 |
+
"attrs": [],
|
17 |
+
"properties": {
|
18 |
+
"id": 80,
|
19 |
+
"order": 3,
|
20 |
+
"prevSize": 20,
|
21 |
+
"code": 59649,
|
22 |
+
"name": "triangle-down"
|
23 |
+
},
|
24 |
+
"setIdx": 0,
|
25 |
+
"setId": 5,
|
26 |
+
"iconIdx": 80
|
27 |
+
},
|
28 |
+
{
|
29 |
+
"icon": {
|
30 |
+
"paths": [
|
31 |
+
"M716.8 256v512l-460.8-256 460.8-256z"
|
32 |
+
],
|
33 |
+
"attrs": [],
|
34 |
+
"isMulticolor": false,
|
35 |
+
"tags": [
|
36 |
+
"triangle-left"
|
37 |
+
],
|
38 |
+
"grid": 20
|
39 |
+
},
|
40 |
+
"attrs": [],
|
41 |
+
"properties": {
|
42 |
+
"id": 81,
|
43 |
+
"order": 2,
|
44 |
+
"prevSize": 20,
|
45 |
+
"code": 59648,
|
46 |
+
"name": "triangle-left"
|
47 |
+
},
|
48 |
+
"setIdx": 0,
|
49 |
+
"setId": 5,
|
50 |
+
"iconIdx": 81
|
51 |
+
},
|
52 |
+
{
|
53 |
+
"icon": {
|
54 |
+
"paths": [
|
55 |
+
"M768 512l-460.8 256v-512l460.8 256z"
|
56 |
+
],
|
57 |
+
"attrs": [],
|
58 |
+
"isMulticolor": false,
|
59 |
+
"tags": [
|
60 |
+
"triangle-right"
|
61 |
+
],
|
62 |
+
"grid": 20
|
63 |
+
},
|
64 |
+
"attrs": [],
|
65 |
+
"properties": {
|
66 |
+
"id": 82,
|
67 |
+
"order": 4,
|
68 |
+
"prevSize": 20,
|
69 |
+
"code": 59650,
|
70 |
+
"name": "triangle-right"
|
71 |
+
},
|
72 |
+
"setIdx": 0,
|
73 |
+
"setId": 5,
|
74 |
+
"iconIdx": 82
|
75 |
+
},
|
76 |
+
{
|
77 |
+
"icon": {
|
78 |
+
"paths": [
|
79 |
+
"M768 716.8h-512l256-460.8 256 460.8z"
|
80 |
+
],
|
81 |
+
"attrs": [],
|
82 |
+
"isMulticolor": false,
|
83 |
+
"tags": [
|
84 |
+
"triangle-up"
|
85 |
+
],
|
86 |
+
"grid": 20
|
87 |
+
},
|
88 |
+
"attrs": [],
|
89 |
+
"properties": {
|
90 |
+
"id": 83,
|
91 |
+
"order": 5,
|
92 |
+
"prevSize": 20,
|
93 |
+
"code": 59651,
|
94 |
+
"name": "triangle-up"
|
95 |
+
},
|
96 |
+
"setIdx": 0,
|
97 |
+
"setId": 5,
|
98 |
+
"iconIdx": 83
|
99 |
+
},
|
100 |
+
{
|
101 |
+
"icon": {
|
102 |
+
"paths": [
|
103 |
+
"M512 0l-235.52 373.76h470.989l-235.469-373.76zM512.051 1024l235.469-373.76-471.040-0.051 235.571 373.811z"
|
104 |
+
],
|
105 |
+
"attrs": [],
|
106 |
+
"isMulticolor": false,
|
107 |
+
"tags": [
|
108 |
+
"menu",
|
109 |
+
"arrows",
|
110 |
+
"up-down",
|
111 |
+
"dropdown"
|
112 |
+
],
|
113 |
+
"grid": 20
|
114 |
+
},
|
115 |
+
"attrs": [],
|
116 |
+
"properties": {
|
117 |
+
"id": 2,
|
118 |
+
"order": 6,
|
119 |
+
"prevSize": 20,
|
120 |
+
"name": "menu",
|
121 |
+
"code": 58886
|
122 |
+
},
|
123 |
+
"setIdx": 3,
|
124 |
+
"setId": 2,
|
125 |
+
"iconIdx": 2
|
126 |
+
},
|
127 |
{
|
128 |
"icon": {
|
129 |
"paths": [
|
141 |
},
|
142 |
"attrs": [],
|
143 |
"properties": {
|
144 |
+
"id": 0,
|
145 |
"order": 11,
|
146 |
"prevSize": 32,
|
147 |
"code": 59847,
|
148 |
"ligatures": "download3, save5",
|
149 |
"name": "download3"
|
150 |
},
|
151 |
+
"setIdx": 4,
|
152 |
+
"setId": 1,
|
153 |
+
"iconIdx": 0
|
154 |
},
|
155 |
{
|
156 |
"icon": {
|
158 |
"M933.79 610.25c-53.726-93.054-21.416-212.304 72.152-266.488l-100.626-174.292c-28.75 16.854-62.176 26.518-97.846 26.518-107.536 0-194.708-87.746-194.708-195.99h-201.258c0.266 33.41-8.074 67.282-25.958 98.252-53.724 93.056-173.156 124.702-266.862 70.758l-100.624 174.292c28.97 16.472 54.050 40.588 71.886 71.478 53.638 92.908 21.512 211.92-71.708 266.224l100.626 174.292c28.65-16.696 61.916-26.254 97.4-26.254 107.196 0 194.144 87.192 194.7 194.958h201.254c-0.086-33.074 8.272-66.57 25.966-97.218 53.636-92.906 172.776-124.594 266.414-71.012l100.626-174.29c-28.78-16.466-53.692-40.498-71.434-71.228zM512 719.332c-114.508 0-207.336-92.824-207.336-207.334 0-114.508 92.826-207.334 207.336-207.334 114.508 0 207.332 92.826 207.332 207.334-0.002 114.51-92.824 207.334-207.332 207.334z"
|
159 |
],
|
160 |
"attrs": [],
|
161 |
+
"isMulticolor": false,
|
162 |
"tags": [
|
163 |
"cog",
|
164 |
"gear",
|
173 |
},
|
174 |
"attrs": [],
|
175 |
"properties": {
|
176 |
+
"id": 1,
|
177 |
"order": 10,
|
178 |
"prevSize": 32,
|
179 |
"code": 59796,
|
180 |
"ligatures": "cog, gear",
|
181 |
"name": "cog"
|
182 |
},
|
183 |
+
"setIdx": 4,
|
184 |
"setId": 1,
|
185 |
+
"iconIdx": 1
|
186 |
},
|
187 |
{
|
188 |
"icon": {
|
189 |
"paths": [
|
190 |
"M864 0c88.364 0 160 71.634 160 160 0 36.020-11.91 69.258-32 96l-64 64-224-224 64-64c26.742-20.090 59.978-32 96-32zM64 736l-64 288 288-64 592-592-224-224-592 592zM715.578 363.578l-448 448-55.156-55.156 448-448 55.156 55.156z"
|
191 |
],
|
192 |
+
"attrs": [],
|
193 |
+
"isMulticolor": false,
|
194 |
"tags": [
|
195 |
"pencil",
|
196 |
"write",
|
200 |
],
|
201 |
"grid": 16
|
202 |
},
|
203 |
+
"attrs": [],
|
204 |
"properties": {
|
205 |
+
"id": 2,
|
206 |
"order": 5,
|
207 |
"prevSize": 32,
|
208 |
"name": "pencil",
|
209 |
"code": 58880
|
210 |
},
|
211 |
+
"setIdx": 4,
|
212 |
"setId": 1,
|
213 |
+
"iconIdx": 2
|
214 |
},
|
215 |
{
|
216 |
"icon": {
|
217 |
"paths": [
|
218 |
"M512 192c-223.318 0-416.882 130.042-512 320 95.118 189.958 288.682 320 512 320 223.314 0 416.878-130.042 512-320-95.116-189.958-288.686-320-512-320zM764.45 361.704c60.162 38.374 111.142 89.774 149.434 150.296-38.292 60.522-89.274 111.922-149.436 150.298-75.594 48.216-162.89 73.702-252.448 73.702-89.56 0-176.856-25.486-252.45-73.704-60.16-38.372-111.14-89.772-149.434-150.296 38.292-60.524 89.274-111.924 149.434-150.296 3.918-2.5 7.876-4.922 11.858-7.3-9.958 27.328-15.408 56.822-15.408 87.596 0 141.384 114.616 256 256 256s256-114.616 256-256c0-30.774-5.45-60.268-15.408-87.598 3.98 2.378 7.938 4.802 11.858 7.302zM512 410c0 53.020-42.98 96-96 96s-96-42.98-96-96 42.98-96 96-96 96 42.98 96 96z"
|
219 |
],
|
220 |
+
"attrs": [],
|
221 |
+
"isMulticolor": false,
|
222 |
"tags": [
|
223 |
"eye",
|
224 |
"views",
|
227 |
],
|
228 |
"grid": 16
|
229 |
},
|
230 |
+
"attrs": [],
|
231 |
"properties": {
|
232 |
+
"id": 3,
|
233 |
"order": 9,
|
234 |
"prevSize": 32,
|
235 |
"code": 58881,
|
236 |
"name": "eye"
|
237 |
},
|
238 |
+
"setIdx": 4,
|
239 |
"setId": 1,
|
240 |
+
"iconIdx": 3
|
241 |
},
|
242 |
{
|
243 |
"icon": {
|
244 |
"paths": [
|
245 |
"M1014.662 822.66c-0.004-0.004-0.008-0.008-0.012-0.010l-310.644-310.65 310.644-310.65c0.004-0.004 0.008-0.006 0.012-0.010 3.344-3.346 5.762-7.254 7.312-11.416 4.246-11.376 1.824-24.682-7.324-33.83l-146.746-146.746c-9.148-9.146-22.45-11.566-33.828-7.32-4.16 1.55-8.070 3.968-11.418 7.31 0 0.004-0.004 0.006-0.008 0.010l-310.648 310.652-310.648-310.65c-0.004-0.004-0.006-0.006-0.010-0.010-3.346-3.342-7.254-5.76-11.414-7.31-11.38-4.248-24.682-1.826-33.83 7.32l-146.748 146.748c-9.148 9.148-11.568 22.452-7.322 33.828 1.552 4.16 3.97 8.072 7.312 11.416 0.004 0.002 0.006 0.006 0.010 0.010l310.65 310.648-310.65 310.652c-0.002 0.004-0.006 0.006-0.008 0.010-3.342 3.346-5.76 7.254-7.314 11.414-4.248 11.376-1.826 24.682 7.322 33.83l146.748 146.746c9.15 9.148 22.452 11.568 33.83 7.322 4.16-1.552 8.070-3.97 11.416-7.312 0.002-0.004 0.006-0.006 0.010-0.010l310.648-310.65 310.648 310.65c0.004 0.002 0.008 0.006 0.012 0.008 3.348 3.344 7.254 5.762 11.414 7.314 11.378 4.246 24.684 1.826 33.828-7.322l146.746-146.748c9.148-9.148 11.57-22.454 7.324-33.83-1.552-4.16-3.97-8.068-7.314-11.414z"
|
246 |
],
|
247 |
+
"attrs": [],
|
248 |
+
"isMulticolor": false,
|
249 |
"tags": [
|
250 |
"close",
|
251 |
"cancel",
|
255 |
],
|
256 |
"grid": 16
|
257 |
},
|
258 |
+
"attrs": [],
|
259 |
"properties": {
|
260 |
+
"id": 4,
|
261 |
"order": 4,
|
262 |
"prevSize": 32,
|
263 |
"name": "close",
|
264 |
"code": 58882
|
265 |
},
|
266 |
+
"setIdx": 4,
|
267 |
"setId": 1,
|
268 |
+
"iconIdx": 4
|
269 |
},
|
270 |
{
|
271 |
"icon": {
|
272 |
"paths": [
|
273 |
"M864 128l-480 480-224-224-160 160 384 384 640-640z"
|
274 |
],
|
275 |
+
"attrs": [],
|
276 |
+
"isMulticolor": false,
|
277 |
"tags": [
|
278 |
"checkmark",
|
279 |
"tick",
|
283 |
],
|
284 |
"grid": 16
|
285 |
},
|
286 |
+
"attrs": [],
|
287 |
"properties": {
|
288 |
+
"id": 5,
|
289 |
"order": 3,
|
290 |
"prevSize": 32,
|
291 |
"name": "checkmark",
|
292 |
"code": 58883
|
293 |
},
|
294 |
+
"setIdx": 4,
|
295 |
"setId": 1,
|
296 |
+
"iconIdx": 5
|
297 |
},
|
298 |
{
|
299 |
"icon": {
|
300 |
"paths": [
|
301 |
"M0 416v192c0 17.672 14.328 32 32 32h960c17.672 0 32-14.328 32-32v-192c0-17.672-14.328-32-32-32h-960c-17.672 0-32 14.328-32 32z"
|
302 |
],
|
303 |
+
"attrs": [],
|
304 |
+
"isMulticolor": false,
|
305 |
"tags": [
|
306 |
"minus",
|
307 |
"minimize",
|
309 |
],
|
310 |
"grid": 16
|
311 |
},
|
312 |
+
"attrs": [],
|
313 |
"properties": {
|
314 |
+
"id": 6,
|
315 |
"order": 2,
|
316 |
"prevSize": 32,
|
317 |
"name": "minus",
|
318 |
"code": 58884
|
319 |
},
|
320 |
+
"setIdx": 4,
|
321 |
"setId": 1,
|
322 |
+
"iconIdx": 6
|
323 |
},
|
324 |
{
|
325 |
"icon": {
|
326 |
"paths": [
|
327 |
"M992 384h-352v-352c0-17.672-14.328-32-32-32h-192c-17.672 0-32 14.328-32 32v352h-352c-17.672 0-32 14.328-32 32v192c0 17.672 14.328 32 32 32h352v352c0 17.672 14.328 32 32 32h192c17.672 0 32-14.328 32-32v-352h352c17.672 0 32-14.328 32-32v-192c0-17.672-14.328-32-32-32z"
|
328 |
],
|
329 |
+
"attrs": [],
|
330 |
+
"isMulticolor": false,
|
331 |
"tags": [
|
332 |
"plus",
|
333 |
"add",
|
335 |
],
|
336 |
"grid": 16
|
337 |
},
|
338 |
+
"attrs": [],
|
339 |
"properties": {
|
340 |
+
"id": 7,
|
341 |
"order": 1,
|
342 |
"prevSize": 32,
|
343 |
"name": "plus",
|
344 |
"code": 58885
|
345 |
},
|
346 |
+
"setIdx": 4,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
347 |
"setId": 1,
|
348 |
"iconIdx": 7
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
349 |
}
|
350 |
],
|
351 |
"height": 1024,
|
370 |
"showQuickUse": true,
|
371 |
"quickUsageToken": false,
|
372 |
"showMetrics": true,
|
373 |
+
"showMetadata": false,
|
374 |
+
"embed": false
|
375 |
},
|
376 |
"imagePref": {
|
377 |
"color": 0,
|
js/form.js
CHANGED
@@ -360,10 +360,18 @@
|
|
360 |
};
|
361 |
|
362 |
wp.ccf.setupDOM = wp.ccf.setupDOM || function() {
|
363 |
-
var datepickers = document.querySelectorAll( '.ccf-datepicker' )
|
|
|
|
|
364 |
|
365 |
for ( var i = 0; i < datepickers.length; i++ ) {
|
366 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
367 |
}
|
368 |
|
369 |
var forms = document.querySelectorAll( '.ccf-form-wrapper' );
|
@@ -538,4 +546,4 @@
|
|
538 |
* Register listeners on DOM
|
539 |
*/
|
540 |
$( document ).ready( wp.ccf.setupDOM );
|
541 |
-
})( jQuery, ccfSettings );
|
360 |
};
|
361 |
|
362 |
wp.ccf.setupDOM = wp.ccf.setupDOM || function() {
|
363 |
+
var datepickers = document.querySelectorAll( '.ccf-datepicker' ),
|
364 |
+
options,
|
365 |
+
format;
|
366 |
|
367 |
for ( var i = 0; i < datepickers.length; i++ ) {
|
368 |
+
options = {};
|
369 |
+
format = datepickers[i].getAttribute( 'data-date-format');
|
370 |
+
if ( format ) {
|
371 |
+
options.dateFormat = format.replace( /yyyy/i, 'yy' );
|
372 |
+
}
|
373 |
+
|
374 |
+
$( datepickers[i] ).datepicker( options );
|
375 |
}
|
376 |
|
377 |
var forms = document.querySelectorAll( '.ccf-form-wrapper' );
|
546 |
* Register listeners on DOM
|
547 |
*/
|
548 |
$( document ).ready( wp.ccf.setupDOM );
|
549 |
+
})( jQuery, ccfSettings );
|
js/manager/collections.js
CHANGED
@@ -68,6 +68,18 @@
|
|
68 |
}
|
69 |
);
|
70 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
wp.ccf.collections.Submissions = wp.ccf.collections.Submissions || wp.api.collections.Posts.extend(
|
72 |
{
|
73 |
model: wp.ccf.models.Submission,
|
68 |
}
|
69 |
);
|
70 |
|
71 |
+
wp.ccf.collections.FormNotificationAddresses = wp.ccf.collections.FormNotificationAddresses || Backbone.Collection.extend(
|
72 |
+
{
|
73 |
+
model: wp.ccf.models.FormNotificationAddress
|
74 |
+
}
|
75 |
+
);
|
76 |
+
|
77 |
+
wp.ccf.collections.FormNotifications = wp.ccf.collections.FormNotifications || Backbone.Collection.extend(
|
78 |
+
{
|
79 |
+
model: wp.ccf.models.FormNotification
|
80 |
+
}
|
81 |
+
);
|
82 |
+
|
83 |
wp.ccf.collections.Submissions = wp.ccf.collections.Submissions || wp.api.collections.Posts.extend(
|
84 |
{
|
85 |
model: wp.ccf.models.Submission,
|
js/manager/models.js
CHANGED
@@ -73,6 +73,75 @@
|
|
73 |
}
|
74 |
);
|
75 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
wp.ccf.models.Form = wp.ccf.models.Form || wp.api.models.Post.extend(
|
77 |
{
|
78 |
|
@@ -84,7 +153,7 @@
|
|
84 |
|
85 |
idAttribute: 'id',
|
86 |
|
87 |
-
initialize: function() {
|
88 |
this.on( 'sync', this.decode, this );
|
89 |
},
|
90 |
|
@@ -98,17 +167,8 @@
|
|
98 |
completionActionType: 'text',
|
99 |
completionRedirectUrl: '',
|
100 |
completionMessage: '',
|
101 |
-
|
102 |
-
|
103 |
-
emailNotificationFromType: 'default',
|
104 |
-
emailNotificationFromAddress: '',
|
105 |
-
emailNotificationFromField: '',
|
106 |
-
emailNotificationSubjectType: 'default',
|
107 |
-
emailNotificationSubject: '',
|
108 |
-
emailNotificationSubjectField: '',
|
109 |
-
emailNotificationFromNameType: 'custom',
|
110 |
-
emailNotificationFromName: 'WordPress',
|
111 |
-
emailNotificationFromNameField: '',
|
112 |
pause: false,
|
113 |
pauseMessage: ccfSettings.pauseMessage
|
114 |
};
|
@@ -144,7 +204,9 @@
|
|
144 |
},
|
145 |
|
146 |
parse: function( response ) {
|
147 |
-
var SELF = this
|
|
|
|
|
148 |
|
149 |
if ( response.fields ) {
|
150 |
|
@@ -152,7 +214,7 @@
|
|
152 |
|
153 |
if ( fields && fields.length > 0 ) {
|
154 |
|
155 |
-
for (
|
156 |
var newField = response.fields[i];
|
157 |
|
158 |
var field = fields.findWhere( { slug: newField.slug } );
|
@@ -162,7 +224,7 @@
|
|
162 |
var choices = SELF.get( 'choices' );
|
163 |
|
164 |
if ( choices && choices.length > 0 ) {
|
165 |
-
for (
|
166 |
var choice = choices.at( z );
|
167 |
choice.set( newField.choices[z] );
|
168 |
choice.decode();
|
@@ -192,6 +254,52 @@
|
|
192 |
}
|
193 |
}
|
194 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
195 |
return this.constructor.__super__.parse.call( this, response );
|
196 |
},
|
197 |
|
@@ -202,6 +310,10 @@
|
|
202 |
attributes.fields = attributes.fields.toJSON();
|
203 |
}
|
204 |
|
|
|
|
|
|
|
|
|
205 |
if ( attributes.author ) {
|
206 |
attributes.author = attributes.author.toJSON();
|
207 |
}
|
@@ -375,7 +487,8 @@
|
|
375 |
var defaults = {
|
376 |
type: 'date',
|
377 |
showDate: true,
|
378 |
-
showTime: true
|
|
|
379 |
};
|
380 |
|
381 |
return _.defaults( defaults, this.constructor.__super__.defaults() );
|
73 |
}
|
74 |
);
|
75 |
|
76 |
+
wp.ccf.models.FormNotificationAddress = wp.ccf.models.FormNotificationAddress || Backbone.Model.extend(
|
77 |
+
{
|
78 |
+
defaults: {
|
79 |
+
type: 'custom',
|
80 |
+
field: '',
|
81 |
+
email: ''
|
82 |
+
},
|
83 |
+
|
84 |
+
decode: function() {
|
85 |
+
return _modelDecode.call( this, [] );
|
86 |
+
},
|
87 |
+
|
88 |
+
set: _modelSet
|
89 |
+
}
|
90 |
+
);
|
91 |
+
|
92 |
+
wp.ccf.models.FormNotification = wp.ccf.models.FormNotification || Backbone.Model.extend(
|
93 |
+
{
|
94 |
+
defaults: function() {
|
95 |
+
return {
|
96 |
+
title: '',
|
97 |
+
content: '',
|
98 |
+
active: false,
|
99 |
+
addresses: new wp.ccf.collections.FormNotificationAddresses(),
|
100 |
+
fromType: 'default',
|
101 |
+
fromAddress: '',
|
102 |
+
fromField: '',
|
103 |
+
subjectType: 'default',
|
104 |
+
subject: '',
|
105 |
+
subjectField: '',
|
106 |
+
fromNameType: 'custom',
|
107 |
+
fromName: 'WordPress',
|
108 |
+
fromNameField: ''
|
109 |
+
};
|
110 |
+
},
|
111 |
+
|
112 |
+
initialize: function( attributes ) {
|
113 |
+
if ( typeof attributes === 'object' && attributes.addresses ) {
|
114 |
+
var addresses = [];
|
115 |
+
|
116 |
+
_.each( attributes.addresses, function( address ) {
|
117 |
+
var addressModel = new wp.ccf.models.FormNotificationAddress( address );
|
118 |
+
addressModel.decode();
|
119 |
+
|
120 |
+
addresses.push( addressModel );
|
121 |
+
});
|
122 |
+
|
123 |
+
this.set( 'addresses', new wp.ccf.collections.FormNotificationAddresses( addresses ) );
|
124 |
+
}
|
125 |
+
},
|
126 |
+
|
127 |
+
decode: function() {
|
128 |
+
return _modelDecode.call( this, [] );
|
129 |
+
},
|
130 |
+
|
131 |
+
toJSON: function() {
|
132 |
+
var attributes = this.constructor.__super__.toJSON.call( this );
|
133 |
+
|
134 |
+
if ( attributes.addresses ) {
|
135 |
+
attributes.addresses = attributes.addresses.toJSON();
|
136 |
+
}
|
137 |
+
|
138 |
+
return attributes;
|
139 |
+
},
|
140 |
+
|
141 |
+
set: _modelSet
|
142 |
+
}
|
143 |
+
);
|
144 |
+
|
145 |
wp.ccf.models.Form = wp.ccf.models.Form || wp.api.models.Post.extend(
|
146 |
{
|
147 |
|
153 |
|
154 |
idAttribute: 'id',
|
155 |
|
156 |
+
initialize: function( attributes ) {
|
157 |
this.on( 'sync', this.decode, this );
|
158 |
},
|
159 |
|
167 |
completionActionType: 'text',
|
168 |
completionRedirectUrl: '',
|
169 |
completionMessage: '',
|
170 |
+
|
171 |
+
notifications: new wp.ccf.collections.FormNotifications(),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
172 |
pause: false,
|
173 |
pauseMessage: ccfSettings.pauseMessage
|
174 |
};
|
204 |
},
|
205 |
|
206 |
parse: function( response ) {
|
207 |
+
var SELF = this,
|
208 |
+
i = 0,
|
209 |
+
z = 0;
|
210 |
|
211 |
if ( response.fields ) {
|
212 |
|
214 |
|
215 |
if ( fields && fields.length > 0 ) {
|
216 |
|
217 |
+
for ( i = 0; i < response.fields.length; i++ ) {
|
218 |
var newField = response.fields[i];
|
219 |
|
220 |
var field = fields.findWhere( { slug: newField.slug } );
|
224 |
var choices = SELF.get( 'choices' );
|
225 |
|
226 |
if ( choices && choices.length > 0 ) {
|
227 |
+
for ( z = 0; z < newField.choices; z++ ) {
|
228 |
var choice = choices.at( z );
|
229 |
choice.set( newField.choices[z] );
|
230 |
choice.decode();
|
254 |
}
|
255 |
}
|
256 |
|
257 |
+
if ( response.notifications ) {
|
258 |
+
|
259 |
+
var notifications = SELF.get( 'notifications' );
|
260 |
+
|
261 |
+
if ( notifications && notifications.length > 0 ) {
|
262 |
+
|
263 |
+
for ( i = 0; i < response.notifications.length; i++ ) {
|
264 |
+
var newNotification = response.notifications[i];
|
265 |
+
|
266 |
+
var notification = notifications.findWhere( { slug: newNotification.slug } );
|
267 |
+
|
268 |
+
if ( notification ) {
|
269 |
+
if ( typeof newNotification.addresses !== 'undefined' ) {
|
270 |
+
var addresses = SELF.get( 'addresses' );
|
271 |
+
|
272 |
+
if ( addresses && addresses.length > 0 ) {
|
273 |
+
for ( z = 0; z < newNotification.addresses; z++ ) {
|
274 |
+
var address = addresses.at( z );
|
275 |
+
address.set( newNotification.addresses[z] );
|
276 |
+
address.decode();
|
277 |
+
}
|
278 |
+
}
|
279 |
+
|
280 |
+
delete response.notifications[i].addresses;
|
281 |
+
}
|
282 |
+
|
283 |
+
notification.set( newNotification );
|
284 |
+
notification.decode();
|
285 |
+
}
|
286 |
+
}
|
287 |
+
|
288 |
+
delete response.notifications;
|
289 |
+
} else {
|
290 |
+
var newNotifications = [];
|
291 |
+
|
292 |
+
_.each( response.notifications, function( notification ) {
|
293 |
+
var notificationModel = new wp.ccf.models.FormNotification( notification );
|
294 |
+
notificationModel.decode();
|
295 |
+
|
296 |
+
newNotifications.push( notificationModel );
|
297 |
+
});
|
298 |
+
|
299 |
+
response.notifications = new wp.ccf.collections.FormNotifications( newNotifications );
|
300 |
+
}
|
301 |
+
}
|
302 |
+
|
303 |
return this.constructor.__super__.parse.call( this, response );
|
304 |
},
|
305 |
|
310 |
attributes.fields = attributes.fields.toJSON();
|
311 |
}
|
312 |
|
313 |
+
if ( attributes.notifications ) {
|
314 |
+
attributes.notifications = attributes.notifications.toJSON();
|
315 |
+
}
|
316 |
+
|
317 |
if ( attributes.author ) {
|
318 |
attributes.author = attributes.author.toJSON();
|
319 |
}
|
487 |
var defaults = {
|
488 |
type: 'date',
|
489 |
showDate: true,
|
490 |
+
showTime: true,
|
491 |
+
dateFormat: 'mm/dd/yyyy'
|
492 |
};
|
493 |
|
494 |
return _.defaults( defaults, this.constructor.__super__.defaults() );
|
js/manager/views.js
CHANGED
@@ -90,6 +90,494 @@
|
|
90 |
}
|
91 |
);
|
92 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
93 |
wp.ccf.views.FieldBase = wp.ccf.views.FieldBase || Backbone.View.extend(
|
94 |
{
|
95 |
events: {
|
@@ -331,8 +819,15 @@
|
|
331 |
this.model.set( 'value', value[0].value );
|
332 |
}
|
333 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
334 |
this.model.set( 'className', this.el.querySelectorAll( '.field-class-name' )[0].value );
|
335 |
-
this.model.set( 'showDate',
|
336 |
|
337 |
var oldShowTime = this.model.get( 'showTime' );
|
338 |
var showTime = ( this.el.querySelectorAll( '.field-show-time' )[0].checked ) ? true : false;
|
@@ -340,7 +835,7 @@
|
|
340 |
this.model.set( 'showTime', showTime );
|
341 |
this.model.set( 'required', ( this.el.querySelectorAll( '.field-required' )[0].value == 1 ) ? true : false );
|
342 |
|
343 |
-
if ( showTime != oldShowTime ) {
|
344 |
this.render();
|
345 |
}
|
346 |
|
@@ -779,16 +1274,46 @@
|
|
779 |
'change select': 'save',
|
780 |
'change select.form-completion-action-type': 'toggleCompletionFields',
|
781 |
'change select.form-pause': 'togglePauseFields',
|
782 |
-
'
|
783 |
},
|
784 |
|
|
|
|
|
785 |
initialize: function( options ) {
|
786 |
this.model = options.form;
|
|
|
|
|
|
|
|
|
787 |
},
|
788 |
|
789 |
-
|
790 |
-
|
791 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
792 |
},
|
793 |
|
794 |
toggleCompletionFields: function() {
|
@@ -818,9 +1343,7 @@
|
|
818 |
}
|
819 |
},
|
820 |
|
821 |
-
save: function(
|
822 |
-
var SELF = this;
|
823 |
-
|
824 |
if ( this.el.innerHTML === '' ) {
|
825 |
// @todo: for some reason this is needed for IE8
|
826 |
return;
|
@@ -849,259 +1372,43 @@
|
|
849 |
|
850 |
var completionActionType = this.el.querySelectorAll( '.form-completion-action-type' )[0].value;
|
851 |
this.model.set( 'completionActionType', completionActionType );
|
852 |
-
|
853 |
-
if ( typeof $promise !== 'undefined' && typeof $promise.promise !== 'undefined' ) {
|
854 |
-
$promise.resolve();
|
855 |
-
}
|
856 |
-
},
|
857 |
-
|
858 |
-
render: function() {
|
859 |
-
var context = {
|
860 |
-
form: this.model.toJSON()
|
861 |
-
};
|
862 |
-
|
863 |
-
this.el.innerHTML = this.template( context );
|
864 |
-
|
865 |
-
this.toggleCompletionFields();
|
866 |
-
|
867 |
-
this.togglePauseFields();
|
868 |
-
|
869 |
-
wp.ccf.dispatcher.on( 'saveFormSettings', this.save, this );
|
870 |
-
wp.ccf.dispatcher.on( 'mainViewChange', this.save, this );
|
871 |
-
|
872 |
-
return this;
|
873 |
-
}
|
874 |
-
}
|
875 |
-
);
|
876 |
-
|
877 |
-
wp.ccf.views.FormNotifications = wp.ccf.views.FormNotifications || Backbone.View.extend(
|
878 |
-
{
|
879 |
-
template: wp.ccf.utils.template( 'ccf-form-notifications-template' ),
|
880 |
-
|
881 |
-
events: {
|
882 |
-
'blur input': 'save',
|
883 |
-
'change select': 'save',
|
884 |
-
'change select.form-send-email-notifications': 'toggleNotificationFields',
|
885 |
-
'change select.form-email-notification-from-type': 'toggleNotificationFields',
|
886 |
-
'change select.form-email-notification-from-name-type': 'toggleNotificationFields',
|
887 |
-
'change select.form-email-notification-subject-type': 'toggleNotificationFields'
|
888 |
-
},
|
889 |
-
|
890 |
-
initialize: function( options ) {
|
891 |
-
this.model = options.form;
|
892 |
-
},
|
893 |
-
|
894 |
-
destroy: function() {
|
895 |
-
wp.ccf.dispatcher.off( 'saveFormNotifications', this.save );
|
896 |
-
wp.ccf.dispatcher.off( 'mainViewChange', this.save );
|
897 |
-
this.undelegateEvents();
|
898 |
-
this.unbind();
|
899 |
-
},
|
900 |
-
|
901 |
-
updateFromFieldField: function() {
|
902 |
-
var emailNotificationFromField = this.el.querySelectorAll( '.form-email-notification-from-field' )[0];
|
903 |
-
emailNotificationFromField.innerHTML = '';
|
904 |
-
emailNotificationFromField.disabled = false;
|
905 |
-
|
906 |
-
var emailNotificationSubjectField = this.el.querySelectorAll( '.form-email-notification-subject-field' )[0];
|
907 |
-
emailNotificationSubjectField.innerHTML = '';
|
908 |
-
emailNotificationSubjectField.disabled = false;
|
909 |
-
|
910 |
-
var emailNotificationFromNameField = this.el.querySelectorAll( '.form-email-notification-from-name-field' )[0];
|
911 |
-
emailNotificationFromNameField.innerHTML = '';
|
912 |
-
emailNotificationFromNameField.disabled = false;
|
913 |
-
|
914 |
-
var fields = this.model.get( 'fields' ),
|
915 |
-
addressFieldsAdded = 0,
|
916 |
-
nameFieldsAdded = 0,
|
917 |
-
subjectFieldsAdded = 0;
|
918 |
-
|
919 |
-
var addressField = this.model.get( 'emailNotificationFromField' );
|
920 |
-
var subjectField = this.model.get( 'emailNotificationSubjectField' );
|
921 |
-
var nameField = this.model.get( 'emailNotificationFromNameField' ),
|
922 |
-
option;
|
923 |
-
|
924 |
-
if ( fields.length >= 1 ) {
|
925 |
-
fields.each( function( field ) {
|
926 |
-
if ( 'email' === field.get( 'type' ) ) {
|
927 |
-
option = document.createElement( 'option' );
|
928 |
-
option.innerHTML = field.get( 'slug' );
|
929 |
-
option.value = field.get( 'slug' );
|
930 |
-
|
931 |
-
if ( field.get( 'slug' ) === addressField ) {
|
932 |
-
option.selected = true;
|
933 |
-
}
|
934 |
-
|
935 |
-
emailNotificationFromField.appendChild( option );
|
936 |
-
|
937 |
-
addressFieldsAdded++;
|
938 |
-
} else if ( 'name' === field.get( 'type' ) ) {
|
939 |
-
option = document.createElement( 'option' );
|
940 |
-
option.innerHTML = field.get( 'slug' );
|
941 |
-
option.value = field.get( 'slug' );
|
942 |
-
|
943 |
-
if ( field.get( 'slug' ) === nameField ) {
|
944 |
-
option.selected = true;
|
945 |
-
}
|
946 |
-
|
947 |
-
emailNotificationFromNameField.appendChild( option );
|
948 |
-
|
949 |
-
nameFieldsAdded++;
|
950 |
-
} else if ( 'single-line-text' === field.get( 'type' ) ) {
|
951 |
-
// @Todo: add more applicable fields
|
952 |
-
|
953 |
-
option = document.createElement( 'option' );
|
954 |
-
option.innerHTML = field.get( 'slug' );
|
955 |
-
option.value = field.get( 'slug' );
|
956 |
-
|
957 |
-
if ( field.get( 'slug' ) === subjectField ) {
|
958 |
-
option.selected = true;
|
959 |
-
}
|
960 |
-
|
961 |
-
emailNotificationSubjectField.appendChild( option );
|
962 |
-
|
963 |
-
subjectFieldsAdded++;
|
964 |
-
}
|
965 |
-
});
|
966 |
-
}
|
967 |
-
|
968 |
-
if ( 0 === addressFieldsAdded ) {
|
969 |
-
option = document.createElement( 'option' );
|
970 |
-
option.innerHTML = ccfSettings.noEmailFields;
|
971 |
-
emailNotificationFromField.appendChild( option );
|
972 |
-
emailNotificationFromField.disabled = true;
|
973 |
-
}
|
974 |
-
|
975 |
-
if ( 0 === nameFieldsAdded ) {
|
976 |
-
option = document.createElement( 'option' );
|
977 |
-
option.innerHTML = ccfSettings.noNameFields;
|
978 |
-
emailNotificationFromNameField.appendChild( option );
|
979 |
-
emailNotificationFromNameField.disabled = true;
|
980 |
-
}
|
981 |
-
|
982 |
-
if ( 0 === subjectFieldsAdded ) {
|
983 |
-
option = document.createElement( 'option' );
|
984 |
-
option.innerHTML = ccfSettings.noApplicableFields;
|
985 |
-
emailNotificationSubjectField.appendChild( option );
|
986 |
-
emailNotificationSubjectField.disabled = true;
|
987 |
-
}
|
988 |
-
},
|
989 |
-
|
990 |
-
toggleNotificationFields: function() {
|
991 |
-
var i;
|
992 |
-
|
993 |
-
var sendEmailNotifications = this.el.querySelectorAll( '.form-send-email-notifications' )[0].value;
|
994 |
-
|
995 |
-
var emailNotificationSettings = this.el.querySelectorAll( '.email-notification-setting' );
|
996 |
-
|
997 |
-
var emailNotificationFromAddress = this.el.querySelectorAll( '.email-notification-from-address' )[0];
|
998 |
-
|
999 |
-
var emailNotificationFromField = this.el.querySelectorAll( '.email-notification-from-field' )[0];
|
1000 |
-
|
1001 |
-
var emailNotificationFromType = this.el.querySelectorAll( '.form-email-notification-from-type' )[0];
|
1002 |
-
|
1003 |
-
var emailNotificationSubject = this.el.querySelectorAll( '.email-notification-subject' )[0];
|
1004 |
-
|
1005 |
-
var emailNotificationSubjectField = this.el.querySelectorAll( '.email-notification-subject-field' )[0];
|
1006 |
-
|
1007 |
-
var emailNotificationSubjectType = this.el.querySelectorAll( '.form-email-notification-subject-type' )[0];
|
1008 |
-
|
1009 |
-
var emailNotificationFromName = this.el.querySelectorAll( '.email-notification-from-name' )[0];
|
1010 |
-
|
1011 |
-
var emailNotificationFromNameField = this.el.querySelectorAll( '.email-notification-from-name-field' )[0];
|
1012 |
-
|
1013 |
-
var emailNotificationFromNameType = this.el.querySelectorAll( '.form-email-notification-from-name-type' )[0];
|
1014 |
-
|
1015 |
-
if ( parseInt( sendEmailNotifications ) ) {
|
1016 |
-
for ( i = 0; i < emailNotificationSettings.length; i++ ) {
|
1017 |
-
emailNotificationSettings[i].style.display = 'block';
|
1018 |
-
}
|
1019 |
-
|
1020 |
-
emailNotificationFromAddress.style.display = 'none';
|
1021 |
-
emailNotificationFromField.style.display = 'none';
|
1022 |
-
|
1023 |
-
if ( 'custom' === emailNotificationFromType.value ) {
|
1024 |
-
emailNotificationFromAddress.style.display = 'block';
|
1025 |
-
} else if ( 'field' === emailNotificationFromType.value ) {
|
1026 |
-
emailNotificationFromField.style.display = 'block';
|
1027 |
-
}
|
1028 |
-
|
1029 |
-
emailNotificationSubject.style.display = 'none';
|
1030 |
-
emailNotificationSubjectField.style.display = 'none';
|
1031 |
-
|
1032 |
-
if ( 'custom' === emailNotificationSubjectType.value ) {
|
1033 |
-
emailNotificationSubject.style.display = 'block';
|
1034 |
-
} else if ( 'field' === emailNotificationSubjectType.value ) {
|
1035 |
-
emailNotificationSubjectField.style.display = 'block';
|
1036 |
-
}
|
1037 |
-
|
1038 |
-
emailNotificationFromName.style.display = 'none';
|
1039 |
-
emailNotificationFromNameField.style.display = 'none';
|
1040 |
-
|
1041 |
-
if ( 'custom' === emailNotificationFromNameType.value ) {
|
1042 |
-
emailNotificationFromName.style.display = 'block';
|
1043 |
-
} else if ( 'field' === emailNotificationFromNameType.value ) {
|
1044 |
-
emailNotificationFromNameField.style.display = 'block';
|
1045 |
-
}
|
1046 |
-
} else {
|
1047 |
-
for ( i = 0; i < emailNotificationSettings.length; i++ ) {
|
1048 |
-
emailNotificationSettings[i].style.display = 'none';
|
1049 |
-
}
|
1050 |
-
|
1051 |
-
emailNotificationFromAddress.style.display = 'none';
|
1052 |
-
emailNotificationFromField.style.display = 'none';
|
1053 |
-
|
1054 |
-
emailNotificationSubject.style.display = 'none';
|
1055 |
-
emailNotificationSubjectField.style.display = 'none';
|
1056 |
-
|
1057 |
-
emailNotificationFromName.style.display = 'none';
|
1058 |
-
emailNotificationFromNameField.style.display = 'none';
|
1059 |
-
}
|
1060 |
},
|
1061 |
|
1062 |
-
|
1063 |
-
var SELF = this;
|
1064 |
-
|
1065 |
if ( this.el.innerHTML === '' ) {
|
1066 |
// @todo: for some reason this is needed for IE8
|
1067 |
return;
|
1068 |
}
|
1069 |
|
1070 |
-
|
1071 |
-
this.model.set( 'sendEmailNotifications', ( parseInt( sendEmailNotifications ) ) ? true : false );
|
1072 |
-
|
1073 |
-
var emailNotificationAddresses = this.el.querySelectorAll( '.form-email-notification-addresses' )[0].value;
|
1074 |
-
this.model.set( 'emailNotificationAddresses', emailNotificationAddresses );
|
1075 |
-
|
1076 |
-
var emailNotificationFromType = this.el.querySelectorAll( '.form-email-notification-from-type' )[0].value;
|
1077 |
-
this.model.set( 'emailNotificationFromType', emailNotificationFromType );
|
1078 |
-
|
1079 |
-
var emailNotificationFromAddress = this.el.querySelectorAll( '.form-email-notification-from-address' )[0].value;
|
1080 |
-
this.model.set( 'emailNotificationFromAddress', emailNotificationFromAddress );
|
1081 |
-
|
1082 |
-
var emailNotificationFromField = this.el.querySelectorAll( '.form-email-notification-from-field' )[0].value;
|
1083 |
-
this.model.set( 'emailNotificationFromField', emailNotificationFromField );
|
1084 |
-
|
1085 |
-
var emailNotificationFromNameType = this.el.querySelectorAll( '.form-email-notification-from-name-type' )[0].value;
|
1086 |
-
this.model.set( 'emailNotificationFromNameType', emailNotificationFromNameType );
|
1087 |
-
|
1088 |
-
var emailNotificationFromName = this.el.querySelectorAll( '.form-email-notification-from-name' )[0].value;
|
1089 |
-
this.model.set( 'emailNotificationFromName', emailNotificationFromName );
|
1090 |
|
1091 |
-
|
1092 |
-
|
|
|
1093 |
|
1094 |
-
|
1095 |
-
|
|
|
|
|
1096 |
|
1097 |
-
|
1098 |
-
|
|
|
|
|
1099 |
|
1100 |
-
|
1101 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1102 |
|
1103 |
-
if (
|
1104 |
-
|
|
|
1105 |
}
|
1106 |
},
|
1107 |
|
@@ -1111,16 +1418,33 @@
|
|
1111 |
};
|
1112 |
|
1113 |
var fields = this.model.get( 'fields' );
|
|
|
1114 |
|
1115 |
this.el.innerHTML = this.template( context );
|
1116 |
|
1117 |
-
this.
|
1118 |
-
this.updateFromFieldField();
|
1119 |
|
1120 |
-
|
1121 |
-
|
1122 |
-
this.
|
1123 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1124 |
|
1125 |
return this;
|
1126 |
}
|
@@ -1132,14 +1456,14 @@
|
|
1132 |
template: wp.ccf.utils.template( 'ccf-form-pane-template' ),
|
1133 |
subViews: {
|
1134 |
'field-sidebar': wp.ccf.views.FieldSidebar,
|
1135 |
-
'form-settings': wp.ccf.views.FormSettings
|
1136 |
-
'form-notifications': wp.ccf.views.FormNotifications
|
1137 |
},
|
1138 |
|
1139 |
events: {
|
1140 |
'click .save-button': 'sync',
|
1141 |
'click .signup-button': 'signup',
|
1142 |
'click .accordion-heading': 'accordionClick',
|
|
|
1143 |
'click .insert-form-button': 'insertForm'
|
1144 |
},
|
1145 |
|
@@ -1190,6 +1514,16 @@
|
|
1190 |
section.className = section.className.replace( /expanded/i, '' );
|
1191 |
}
|
1192 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1193 |
},
|
1194 |
|
1195 |
openEditField: function( field ) {
|
@@ -1215,13 +1549,11 @@
|
|
1215 |
|
1216 |
var $settings = $.Deferred();
|
1217 |
var $field = $.Deferred();
|
1218 |
-
var $notifications = $.Deferred();
|
1219 |
|
1220 |
wp.ccf.dispatcher.trigger( 'saveFormSettings', $settings );
|
1221 |
-
wp.ccf.dispatcher.trigger( 'saveFormNotifications', $notifications );
|
1222 |
wp.ccf.dispatcher.trigger( 'saveField', $field );
|
1223 |
|
1224 |
-
$.when( $settings, $field
|
1225 |
var fields = SELF.model.get( 'fields' );
|
1226 |
var allReqsMet = true;
|
1227 |
var slugs = {};
|
@@ -1324,6 +1656,8 @@
|
|
1324 |
|
1325 |
SELF.el.innerHTML = this.template( context );
|
1326 |
|
|
|
|
|
1327 |
var fields = SELF.el.querySelectorAll( '.fields' )[0];
|
1328 |
|
1329 |
_.each( ccfSettings.fieldLabels, function( label, type ) {
|
@@ -1400,7 +1734,7 @@
|
|
1400 |
|
1401 |
});
|
1402 |
|
1403 |
-
SELF.initRenderSubViews(
|
1404 |
|
1405 |
SELF.enableDisableInsert();
|
1406 |
|
@@ -1949,4 +2283,4 @@
|
|
1949 |
}
|
1950 |
}
|
1951 |
);
|
1952 |
-
})( jQuery, Backbone, _, ccfSettings );
|
90 |
}
|
91 |
);
|
92 |
|
93 |
+
wp.ccf.views.EmptyFormNotificationTableRow = wp.ccf.views.EmptyFormNotificationTableRow || Backbone.View.extend(
|
94 |
+
{
|
95 |
+
tagName: 'tr',
|
96 |
+
template: wp.ccf.utils.template( 'ccf-empty-form-notification-row-template'),
|
97 |
+
|
98 |
+
events: {
|
99 |
+
'click .add': 'triggerAdd'
|
100 |
+
},
|
101 |
+
|
102 |
+
initialize: function( options ) {
|
103 |
+
this.form = options.form;
|
104 |
+
},
|
105 |
+
|
106 |
+
destroy: function() {
|
107 |
+
this.unbind();
|
108 |
+
},
|
109 |
+
|
110 |
+
render: function() {
|
111 |
+
this.$el.html( this.template() );
|
112 |
+
return this;
|
113 |
+
},
|
114 |
+
|
115 |
+
triggerAdd: function() {
|
116 |
+
var notifications = this.form.get( 'notifications' );
|
117 |
+
|
118 |
+
this.destroy();
|
119 |
+
|
120 |
+
notifications.add( new wp.ccf.models.FormNotification() );
|
121 |
+
}
|
122 |
+
}
|
123 |
+
);
|
124 |
+
|
125 |
+
wp.ccf.views.EmptyFormTableRow = wp.ccf.views.EmptyFormTableRow || Backbone.View.extend(
|
126 |
+
{
|
127 |
+
tagName: 'tr',
|
128 |
+
template: wp.ccf.utils.template( 'ccf-empty-form-table-row-template'),
|
129 |
+
|
130 |
+
render: function() {
|
131 |
+
this.$el.html( this.template() );
|
132 |
+
return this;
|
133 |
+
}
|
134 |
+
}
|
135 |
+
);
|
136 |
+
|
137 |
+
wp.ccf.views.FormNotificationAddress = Backbone.View.extend(
|
138 |
+
{
|
139 |
+
template: wp.ccf.utils.template( 'ccf-form-notification-address-template' ),
|
140 |
+
className: 'address',
|
141 |
+
|
142 |
+
events: {
|
143 |
+
'click .add': 'triggerAdd',
|
144 |
+
'click .delete': 'triggerDelete',
|
145 |
+
'blur input': 'save',
|
146 |
+
'change select': 'save'
|
147 |
+
},
|
148 |
+
|
149 |
+
initialize: function( options ) {
|
150 |
+
this.notification = options.notification;
|
151 |
+
this.parent = options.parent;
|
152 |
+
this.form = options.form;
|
153 |
+
},
|
154 |
+
|
155 |
+
destroy: function() {
|
156 |
+
this.unbind();
|
157 |
+
},
|
158 |
+
|
159 |
+
save: function() {
|
160 |
+
// @todo: fix this ie8 hack
|
161 |
+
if ( this.el.innerHTML === '' ) {
|
162 |
+
return;
|
163 |
+
}
|
164 |
+
|
165 |
+
var type = this.el.querySelectorAll( '.form-notification-address-type' )[0].value;
|
166 |
+
var email = this.el.querySelectorAll( '.form-notification-address-email' );
|
167 |
+
var field = this.el.querySelectorAll( '.form-notification-address-field' );
|
168 |
+
var oldType = this.model.get( 'type' );
|
169 |
+
|
170 |
+
if ( email.length ) {
|
171 |
+
this.model.set( 'email', email[0].value );
|
172 |
+
}
|
173 |
+
|
174 |
+
if ( field.length ) {
|
175 |
+
this.model.set( 'field', field[0].value );
|
176 |
+
}
|
177 |
+
|
178 |
+
this.model.set( 'type', type );
|
179 |
+
|
180 |
+
if ( oldType !== type ) {
|
181 |
+
this.render();
|
182 |
+
}
|
183 |
+
|
184 |
+
return this;
|
185 |
+
|
186 |
+
},
|
187 |
+
|
188 |
+
updateFromFieldField: function() {
|
189 |
+
if ( 'edit' !== this.parent.context || 'field' !== this.model.get( 'type' ) ) {
|
190 |
+
return;
|
191 |
+
}
|
192 |
+
|
193 |
+
var addressFromField = this.el.querySelectorAll( '.form-notification-address-field' )[0];
|
194 |
+
addressFromField.innerHTML = '';
|
195 |
+
addressFromField.disabled = false;
|
196 |
+
|
197 |
+
var fields = this.form.get( 'fields' ),
|
198 |
+
addressFieldsAdded = 0;
|
199 |
+
|
200 |
+
var addressField = this.model.get( 'field' ),
|
201 |
+
option;
|
202 |
+
|
203 |
+
if ( fields.length >= 1 ) {
|
204 |
+
fields.each( function( field ) {
|
205 |
+
if ( 'email' === field.get( 'type' ) ) {
|
206 |
+
option = document.createElement( 'option' );
|
207 |
+
option.innerHTML = field.get( 'slug' );
|
208 |
+
option.value = field.get( 'slug' );
|
209 |
+
|
210 |
+
if ( field.get( 'slug' ) === addressField ) {
|
211 |
+
option.selected = true;
|
212 |
+
}
|
213 |
+
|
214 |
+
addressFromField.appendChild( option );
|
215 |
+
|
216 |
+
addressFieldsAdded++;
|
217 |
+
}
|
218 |
+
});
|
219 |
+
}
|
220 |
+
|
221 |
+
if ( 0 === addressFieldsAdded ) {
|
222 |
+
option = document.createElement( 'option' );
|
223 |
+
option.innerHTML = ccfSettings.noEmailFields;
|
224 |
+
option.value = '';
|
225 |
+
addressFromField.appendChild( option );
|
226 |
+
addressFromField.disabled = true;
|
227 |
+
}
|
228 |
+
},
|
229 |
+
|
230 |
+
render: function() {
|
231 |
+
var context = {};
|
232 |
+
if ( this.model ) {
|
233 |
+
context.address = this.model.toJSON();
|
234 |
+
}
|
235 |
+
|
236 |
+
this.el.innerHTML = this.template( context );
|
237 |
+
|
238 |
+
var fields = this.form.get( 'fields' );
|
239 |
+
|
240 |
+
this.listenTo( fields, 'add', this.updateFromFieldField, this );
|
241 |
+
this.listenTo( fields, 'remove', this.updateFromFieldField, this );
|
242 |
+
|
243 |
+
if ( 'field' === this.model.get( 'type' ) ) {
|
244 |
+
this.updateFromFieldField();
|
245 |
+
}
|
246 |
+
|
247 |
+
return this;
|
248 |
+
},
|
249 |
+
|
250 |
+
triggerAdd: function() {
|
251 |
+
this.notification.get( 'addresses' ).add( new wp.ccf.models.FormNotificationAddress() );
|
252 |
+
},
|
253 |
+
|
254 |
+
triggerDelete: function() {
|
255 |
+
var addresses = this.notification.get( 'addresses' );
|
256 |
+
|
257 |
+
if ( addresses.length > 1 ) {
|
258 |
+
this.parent.deleteAddress( this );
|
259 |
+
} else {
|
260 |
+
this.model.clear().set( wp.ccf.models.FormNotificationAddress.prototype.defaults );
|
261 |
+
this.destroy();
|
262 |
+
this.render();
|
263 |
+
}
|
264 |
+
}
|
265 |
+
}
|
266 |
+
);
|
267 |
+
|
268 |
+
wp.ccf.views.ExistingFormNotificationRow = Backbone.View.extend(
|
269 |
+
{
|
270 |
+
template: wp.ccf.utils.template( 'ccf-existing-form-notification-table-row-template' ),
|
271 |
+
tagName: 'tr',
|
272 |
+
|
273 |
+
events: {
|
274 |
+
'change select.form-email-notification-from-type': 'toggleNotificationFields',
|
275 |
+
'change select.form-email-notification-from-name-type': 'toggleNotificationFields',
|
276 |
+
'change select.form-email-notification-subject-type': 'toggleNotificationFields',
|
277 |
+
'click .close-notification': 'changeContext',
|
278 |
+
'click .edit-notification': 'changeContext',
|
279 |
+
'click .delete-notification': 'triggerDelete',
|
280 |
+
'blur input': 'save',
|
281 |
+
'change select': 'save'
|
282 |
+
},
|
283 |
+
|
284 |
+
addressViews: [],
|
285 |
+
|
286 |
+
initialize: function( options ) {
|
287 |
+
this.form = options.form;
|
288 |
+
this.addressViews = [];
|
289 |
+
this.parent = options.parent;
|
290 |
+
this.context = ( 'undefined' !== typeof options.context ) ? options.context : 'view';
|
291 |
+
|
292 |
+
var addresses = this.model.get( 'addresses' );
|
293 |
+
this.listenTo( addresses, 'add', this.addAddress );
|
294 |
+
},
|
295 |
+
|
296 |
+
deleteAddress: function( view ) {
|
297 |
+
_.each( this.addressViews, function( currentView ) {
|
298 |
+
if ( view.cid === currentView.cid ) {
|
299 |
+
var index = _.indexOf( this.addressViews, currentView );
|
300 |
+
this.model.get( 'addresses' ).remove( view.model );
|
301 |
+
this.addressViews[index].remove();
|
302 |
+
this.addressViews.splice( index, 1 );
|
303 |
+
}
|
304 |
+
}, this );
|
305 |
+
},
|
306 |
+
|
307 |
+
addAddress: function( model ) {
|
308 |
+
var addressesContainer = this.el.querySelectorAll( '.addresses' )[0];
|
309 |
+
var view = new wp.ccf.views.FormNotificationAddress( { model: model, parent: this, notification: this.model, form: this.form } );
|
310 |
+
this.addressViews.push( view );
|
311 |
+
addressesContainer.appendChild( view.render().el );
|
312 |
+
},
|
313 |
+
|
314 |
+
destroy: function() {
|
315 |
+
this.unbind();
|
316 |
+
},
|
317 |
+
|
318 |
+
changeContext: function( event, forceContext ) {
|
319 |
+
if ( 'edit' === this.context ) {
|
320 |
+
this.save();
|
321 |
+
}
|
322 |
+
|
323 |
+
if ( forceContext ) {
|
324 |
+
this.context = forceContext;
|
325 |
+
} else {
|
326 |
+
if ( 'view' === this.context ) {
|
327 |
+
this.parent.closeAllNotifications();
|
328 |
+
}
|
329 |
+
|
330 |
+
this.context = ( 'edit' === this.context ) ? 'view' : 'edit';
|
331 |
+
}
|
332 |
+
|
333 |
+
this.destroy();
|
334 |
+
this.render();
|
335 |
+
},
|
336 |
+
|
337 |
+
updateFromFieldField: function() {
|
338 |
+
if ( 'edit' !== this.context ) {
|
339 |
+
return;
|
340 |
+
}
|
341 |
+
|
342 |
+
var emailNotificationFromField = this.el.querySelectorAll( '.form-email-notification-from-field' )[0];
|
343 |
+
emailNotificationFromField.innerHTML = '';
|
344 |
+
emailNotificationFromField.disabled = false;
|
345 |
+
|
346 |
+
var emailNotificationSubjectField = this.el.querySelectorAll( '.form-email-notification-subject-field' )[0];
|
347 |
+
emailNotificationSubjectField.innerHTML = '';
|
348 |
+
emailNotificationSubjectField.disabled = false;
|
349 |
+
|
350 |
+
var emailNotificationFromNameField = this.el.querySelectorAll( '.form-email-notification-from-name-field' )[0];
|
351 |
+
emailNotificationFromNameField.innerHTML = '';
|
352 |
+
emailNotificationFromNameField.disabled = false;
|
353 |
+
|
354 |
+
var fields = this.form.get( 'fields' ),
|
355 |
+
addressFieldsAdded = 0,
|
356 |
+
nameFieldsAdded = 0,
|
357 |
+
subjectFieldsAdded = 0;
|
358 |
+
|
359 |
+
var addressField = this.model.get( 'emailNotificationFromField' );
|
360 |
+
var subjectField = this.model.get( 'emailNotificationSubjectField' );
|
361 |
+
var nameField = this.model.get( 'emailNotificationFromNameField' ),
|
362 |
+
option;
|
363 |
+
|
364 |
+
if ( fields.length >= 1 ) {
|
365 |
+
fields.each( function( field ) {
|
366 |
+
if ( 'email' === field.get( 'type' ) ) {
|
367 |
+
option = document.createElement( 'option' );
|
368 |
+
option.innerHTML = field.get( 'slug' );
|
369 |
+
option.value = field.get( 'slug' );
|
370 |
+
|
371 |
+
if ( field.get( 'slug' ) === addressField ) {
|
372 |
+
option.selected = true;
|
373 |
+
}
|
374 |
+
|
375 |
+
emailNotificationFromField.appendChild( option );
|
376 |
+
|
377 |
+
addressFieldsAdded++;
|
378 |
+
} else if ( 'name' === field.get( 'type' ) ) {
|
379 |
+
option = document.createElement( 'option' );
|
380 |
+
option.innerHTML = field.get( 'slug' );
|
381 |
+
option.value = field.get( 'slug' );
|
382 |
+
|
383 |
+
if ( field.get( 'slug' ) === nameField ) {
|
384 |
+
option.selected = true;
|
385 |
+
}
|
386 |
+
|
387 |
+
emailNotificationFromNameField.appendChild( option );
|
388 |
+
|
389 |
+
nameFieldsAdded++;
|
390 |
+
} else if ( 'single-line-text' === field.get( 'type' ) ) {
|
391 |
+
// @Todo: add more applicable fields
|
392 |
+
|
393 |
+
option = document.createElement( 'option' );
|
394 |
+
option.innerHTML = field.get( 'slug' );
|
395 |
+
option.value = field.get( 'slug' );
|
396 |
+
|
397 |
+
if ( field.get( 'slug' ) === subjectField ) {
|
398 |
+
option.selected = true;
|
399 |
+
}
|
400 |
+
|
401 |
+
emailNotificationSubjectField.appendChild( option );
|
402 |
+
|
403 |
+
subjectFieldsAdded++;
|
404 |
+
}
|
405 |
+
});
|
406 |
+
}
|
407 |
+
|
408 |
+
if ( 0 === addressFieldsAdded ) {
|
409 |
+
option = document.createElement( 'option' );
|
410 |
+
option.innerHTML = ccfSettings.noEmailFields;
|
411 |
+
option.value = '';
|
412 |
+
emailNotificationFromField.appendChild( option );
|
413 |
+
emailNotificationFromField.disabled = true;
|
414 |
+
}
|
415 |
+
|
416 |
+
if ( 0 === nameFieldsAdded ) {
|
417 |
+
option = document.createElement( 'option' );
|
418 |
+
option.innerHTML = ccfSettings.noNameFields;
|
419 |
+
option.value = '';
|
420 |
+
emailNotificationFromNameField.appendChild( option );
|
421 |
+
emailNotificationFromNameField.disabled = true;
|
422 |
+
}
|
423 |
+
|
424 |
+
if ( 0 === subjectFieldsAdded ) {
|
425 |
+
option = document.createElement( 'option' );
|
426 |
+
option.innerHTML = ccfSettings.noApplicableFields;
|
427 |
+
option.value = '';
|
428 |
+
emailNotificationSubjectField.appendChild( option );
|
429 |
+
emailNotificationSubjectField.disabled = true;
|
430 |
+
}
|
431 |
+
},
|
432 |
+
|
433 |
+
toggleNotificationFields: function() {
|
434 |
+
var i;
|
435 |
+
|
436 |
+
var emailNotificationFromAddress = this.el.querySelectorAll( '.email-notification-from-address' )[0];
|
437 |
+
|
438 |
+
var emailNotificationFromField = this.el.querySelectorAll( '.email-notification-from-field' )[0];
|
439 |
+
|
440 |
+
var emailNotificationFromType = this.el.querySelectorAll( '.form-email-notification-from-type' )[0];
|
441 |
+
|
442 |
+
var emailNotificationSubject = this.el.querySelectorAll( '.email-notification-subject' )[0];
|
443 |
+
|
444 |
+
var emailNotificationSubjectField = this.el.querySelectorAll( '.email-notification-subject-field' )[0];
|
445 |
+
|
446 |
+
var emailNotificationSubjectType = this.el.querySelectorAll( '.form-email-notification-subject-type' )[0];
|
447 |
+
|
448 |
+
var emailNotificationFromName = this.el.querySelectorAll( '.email-notification-from-name' )[0];
|
449 |
+
|
450 |
+
var emailNotificationFromNameField = this.el.querySelectorAll( '.email-notification-from-name-field' )[0];
|
451 |
+
|
452 |
+
var emailNotificationFromNameType = this.el.querySelectorAll( '.form-email-notification-from-name-type' )[0];
|
453 |
+
|
454 |
+
emailNotificationFromAddress.style.display = 'none';
|
455 |
+
emailNotificationFromField.style.display = 'none';
|
456 |
+
|
457 |
+
if ( 'custom' === emailNotificationFromType.value ) {
|
458 |
+
emailNotificationFromAddress.style.display = 'block';
|
459 |
+
} else if ( 'field' === emailNotificationFromType.value ) {
|
460 |
+
emailNotificationFromField.style.display = 'block';
|
461 |
+
}
|
462 |
+
|
463 |
+
emailNotificationSubject.style.display = 'none';
|
464 |
+
emailNotificationSubjectField.style.display = 'none';
|
465 |
+
|
466 |
+
if ( 'custom' === emailNotificationSubjectType.value ) {
|
467 |
+
emailNotificationSubject.style.display = 'block';
|
468 |
+
} else if ( 'field' === emailNotificationSubjectType.value ) {
|
469 |
+
emailNotificationSubjectField.style.display = 'block';
|
470 |
+
}
|
471 |
+
|
472 |
+
emailNotificationFromName.style.display = 'none';
|
473 |
+
emailNotificationFromNameField.style.display = 'none';
|
474 |
+
|
475 |
+
if ( 'custom' === emailNotificationFromNameType.value ) {
|
476 |
+
emailNotificationFromName.style.display = 'block';
|
477 |
+
} else if ( 'field' === emailNotificationFromNameType.value ) {
|
478 |
+
emailNotificationFromNameField.style.display = 'block';
|
479 |
+
}
|
480 |
+
},
|
481 |
+
|
482 |
+
save: function() {
|
483 |
+
// @todo: fix this ie8 hack
|
484 |
+
if ( this.el.innerHTML === '' ) {
|
485 |
+
return;
|
486 |
+
}
|
487 |
+
|
488 |
+
if ( 'edit' !== this.context ) {
|
489 |
+
return;
|
490 |
+
}
|
491 |
+
|
492 |
+
var emailNotificationTitle = this.el.querySelectorAll( '.form-email-notification-title' )[0].value;
|
493 |
+
this.model.set( 'title', emailNotificationTitle );
|
494 |
+
|
495 |
+
var emailNotificationContent = this.el.querySelectorAll( '.form-email-notification-content' )[0].value;
|
496 |
+
this.model.set( 'content', emailNotificationContent );
|
497 |
+
|
498 |
+
var emailNotificationActive = this.el.querySelectorAll( '.form-email-notification-active' )[0].value;
|
499 |
+
this.model.set( 'active', ( 'Yes' === emailNotificationActive ) ? true : false );
|
500 |
+
|
501 |
+
var emailNotificationFromType = this.el.querySelectorAll( '.form-email-notification-from-type' )[0].value;
|
502 |
+
this.model.set( 'fromType', emailNotificationFromType );
|
503 |
+
|
504 |
+
var emailNotificationFromAddress = this.el.querySelectorAll( '.form-email-notification-from-address' )[0].value;
|
505 |
+
this.model.set( 'fromAddress', emailNotificationFromAddress );
|
506 |
+
|
507 |
+
var emailNotificationFromField = this.el.querySelectorAll( '.form-email-notification-from-field' )[0].value;
|
508 |
+
this.model.set( 'fromField', emailNotificationFromField );
|
509 |
+
|
510 |
+
var emailNotificationFromNameType = this.el.querySelectorAll( '.form-email-notification-from-name-type' )[0].value;
|
511 |
+
this.model.set( 'fromNameType', emailNotificationFromNameType );
|
512 |
+
|
513 |
+
var emailNotificationFromName = this.el.querySelectorAll( '.form-email-notification-from-name' )[0].value;
|
514 |
+
this.model.set( 'fromName', emailNotificationFromName );
|
515 |
+
|
516 |
+
var emailNotificationFromNameField = this.el.querySelectorAll( '.form-email-notification-from-name-field' )[0].value;
|
517 |
+
this.model.set( 'fromNameField', emailNotificationFromNameField );
|
518 |
+
|
519 |
+
var emailNotificationSubjectType = this.el.querySelectorAll( '.form-email-notification-subject-type' )[0].value;
|
520 |
+
this.model.set( 'subjectType', emailNotificationSubjectType );
|
521 |
+
|
522 |
+
var emailNotificationSubject = this.el.querySelectorAll( '.form-email-notification-subject' )[0].value;
|
523 |
+
this.model.set( 'subject', emailNotificationSubject );
|
524 |
+
|
525 |
+
var emailNotificationSubjectField = this.el.querySelectorAll( '.form-email-notification-subject-field' )[0].value;
|
526 |
+
this.model.set( 'subjectField', emailNotificationSubjectField );
|
527 |
+
|
528 |
+
for ( var i = 0; i < this.addressViews.length; i++ ) {
|
529 |
+
this.addressViews[i].save();
|
530 |
+
}
|
531 |
+
|
532 |
+
return this;
|
533 |
+
|
534 |
+
},
|
535 |
+
|
536 |
+
render: function() {
|
537 |
+
var context = {
|
538 |
+
context: this.context,
|
539 |
+
form: this.form.toJSON()
|
540 |
+
};
|
541 |
+
|
542 |
+
if ( this.model ) {
|
543 |
+
context.notification = this.model.toJSON();
|
544 |
+
}
|
545 |
+
|
546 |
+
this.el.innerHTML = this.template( context );
|
547 |
+
|
548 |
+
if ( 'edit' === this.context) {
|
549 |
+
this.toggleNotificationFields();
|
550 |
+
this.updateFromFieldField();
|
551 |
+
|
552 |
+
var addressesContainer = this.el.querySelectorAll( '.addresses' )[0];
|
553 |
+
var addresses = this.model.get( 'addresses' );
|
554 |
+
|
555 |
+
if ( addresses.length >= 1 ) {
|
556 |
+
addresses.each( function( model ) {
|
557 |
+
var address = new wp.ccf.views.FormNotificationAddress( { model: model, parent: this, notification: this.model, form: this.form } ).render();
|
558 |
+
addressesContainer.appendChild( address.el );
|
559 |
+
this.addressViews.push( address );
|
560 |
+
}, this );
|
561 |
+
} else {
|
562 |
+
var newAddress = new wp.ccf.models.FormNotificationAddress();
|
563 |
+
addresses.add( newAddress );
|
564 |
+
}
|
565 |
+
}
|
566 |
+
|
567 |
+
var fields = this.form.get( 'fields' );
|
568 |
+
|
569 |
+
this.listenTo( fields, 'add', this.updateFromFieldField, this );
|
570 |
+
this.listenTo( fields, 'remove', this.updateFromFieldField, this );
|
571 |
+
|
572 |
+
return this;
|
573 |
+
},
|
574 |
+
|
575 |
+
triggerDelete: function() {
|
576 |
+
this.parent.deleteNotification( this );
|
577 |
+
}
|
578 |
+
}
|
579 |
+
);
|
580 |
+
|
581 |
wp.ccf.views.FieldBase = wp.ccf.views.FieldBase || Backbone.View.extend(
|
582 |
{
|
583 |
events: {
|
819 |
this.model.set( 'value', value[0].value );
|
820 |
}
|
821 |
|
822 |
+
var dateFormat = this.el.querySelectorAll( '.field-date-format' );
|
823 |
+
if ( dateFormat.length ) {
|
824 |
+
this.model.set( 'dateFormat', dateFormat[0].value );
|
825 |
+
}
|
826 |
+
|
827 |
+
var oldShowDate = this.model.get( 'showDate' );
|
828 |
+
var showDate = ( this.el.querySelectorAll( '.field-show-date' )[0].checked ) ? true : false;
|
829 |
this.model.set( 'className', this.el.querySelectorAll( '.field-class-name' )[0].value );
|
830 |
+
this.model.set( 'showDate', showDate );
|
831 |
|
832 |
var oldShowTime = this.model.get( 'showTime' );
|
833 |
var showTime = ( this.el.querySelectorAll( '.field-show-time' )[0].checked ) ? true : false;
|
835 |
this.model.set( 'showTime', showTime );
|
836 |
this.model.set( 'required', ( this.el.querySelectorAll( '.field-required' )[0].value == 1 ) ? true : false );
|
837 |
|
838 |
+
if ( showTime != oldShowTime || showDate != oldShowDate ) {
|
839 |
this.render();
|
840 |
}
|
841 |
|
1274 |
'change select': 'save',
|
1275 |
'change select.form-completion-action-type': 'toggleCompletionFields',
|
1276 |
'change select.form-pause': 'togglePauseFields',
|
1277 |
+
'click .add-notification': 'triggerAddNotification'
|
1278 |
},
|
1279 |
|
1280 |
+
notificationViews: [],
|
1281 |
+
|
1282 |
initialize: function( options ) {
|
1283 |
this.model = options.form;
|
1284 |
+
this.notificationViews = [];
|
1285 |
+
|
1286 |
+
var notifications = this.model.get( 'notifications' );
|
1287 |
+
this.listenTo( notifications, 'add', this.addNotification );
|
1288 |
},
|
1289 |
|
1290 |
+
triggerAddNotification: function() {
|
1291 |
+
var notifications = this.model.get( 'notifications' );
|
1292 |
+
|
1293 |
+
notifications.add( new wp.ccf.models.FormNotification() );
|
1294 |
+
},
|
1295 |
+
|
1296 |
+
closeAllNotifications: function() {
|
1297 |
+
_.each( this.notificationViews, function( view ) {
|
1298 |
+
view.changeContext( null, 'view' );
|
1299 |
+
} );
|
1300 |
+
},
|
1301 |
+
|
1302 |
+
addNotification: function( model ) {
|
1303 |
+
var view = new wp.ccf.views.ExistingFormNotificationRow( { model: model, form: this.model, context: 'edit', parent: this } ).render();
|
1304 |
+
var rowContainer = this.el.querySelectorAll( '.ccf-form-notifications .rows' )[0];
|
1305 |
+
|
1306 |
+
if ( rowContainer.querySelectorAll( '.no-notifications' ).length > 0 ) {
|
1307 |
+
rowContainer.removeChild( rowContainer.firstChild );
|
1308 |
+
}
|
1309 |
+
|
1310 |
+
_.each( this.notificationViews, function( view ) {
|
1311 |
+
view.changeContext( null, 'view' );
|
1312 |
+
} );
|
1313 |
+
|
1314 |
+
this.notificationViews.push( view );
|
1315 |
+
|
1316 |
+
rowContainer.appendChild( view.el );
|
1317 |
},
|
1318 |
|
1319 |
toggleCompletionFields: function() {
|
1343 |
}
|
1344 |
},
|
1345 |
|
1346 |
+
save: function() {
|
|
|
|
|
1347 |
if ( this.el.innerHTML === '' ) {
|
1348 |
// @todo: for some reason this is needed for IE8
|
1349 |
return;
|
1372 |
|
1373 |
var completionActionType = this.el.querySelectorAll( '.form-completion-action-type' )[0].value;
|
1374 |
this.model.set( 'completionActionType', completionActionType );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1375 |
},
|
1376 |
|
1377 |
+
fullSave: function( $promise ) {
|
|
|
|
|
1378 |
if ( this.el.innerHTML === '' ) {
|
1379 |
// @todo: for some reason this is needed for IE8
|
1380 |
return;
|
1381 |
}
|
1382 |
|
1383 |
+
this.save();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1384 |
|
1385 |
+
_.each( this.notificationViews, function( view ) {
|
1386 |
+
view.save();
|
1387 |
+
} );
|
1388 |
|
1389 |
+
if ( typeof $promise !== 'undefined' && typeof $promise.promise !== 'undefined' ) {
|
1390 |
+
$promise.resolve();
|
1391 |
+
}
|
1392 |
+
},
|
1393 |
|
1394 |
+
destroy: function() {
|
1395 |
+
wp.ccf.dispatcher.off( 'saveFormSettings', this.fullSave );
|
1396 |
+
wp.ccf.dispatcher.off( 'mainViewChange', this.fullSave );
|
1397 |
+
},
|
1398 |
|
1399 |
+
deleteNotification: function( view ) {
|
1400 |
+
_.each( this.notificationViews, function( currentView ) {
|
1401 |
+
if ( view.cid === currentView.cid ) {
|
1402 |
+
var index = _.indexOf( this.notificationViews, currentView );
|
1403 |
+
this.model.get( 'notifications' ).remove( view.model );
|
1404 |
+
this.notificationViews[index].remove();
|
1405 |
+
this.notificationViews.splice( index, 1 );
|
1406 |
+
}
|
1407 |
+
}, this );
|
1408 |
|
1409 |
+
if ( ! this.notificationViews.length ) {
|
1410 |
+
var rowContainer = this.el.querySelectorAll( '.ccf-form-notifications .rows' )[0];
|
1411 |
+
rowContainer.appendChild( new wp.ccf.views.EmptyFormNotificationTableRow( { form: this.model } ).render().el );
|
1412 |
}
|
1413 |
},
|
1414 |
|
1418 |
};
|
1419 |
|
1420 |
var fields = this.model.get( 'fields' );
|
1421 |
+
var notifications = this.model.get( 'notifications' );
|
1422 |
|
1423 |
this.el.innerHTML = this.template( context );
|
1424 |
|
1425 |
+
this.toggleCompletionFields();
|
|
|
1426 |
|
1427 |
+
this.togglePauseFields();
|
1428 |
+
|
1429 |
+
var rowContainer = this.el.querySelectorAll( '.ccf-form-notifications .rows' )[0];
|
1430 |
+
var newRowContainer = document.createElement( 'tbody');
|
1431 |
+
|
1432 |
+
newRowContainer.className = 'rows';
|
1433 |
+
|
1434 |
+
if ( notifications.length >= 1 ) {
|
1435 |
+
notifications.each( function( model ) {
|
1436 |
+
var row = new wp.ccf.views.ExistingFormNotificationRow( { model: model, form: this.model, parent: this } ).render();
|
1437 |
+
newRowContainer.appendChild( row.el );
|
1438 |
+
this.notificationViews.push( row );
|
1439 |
+
}, this );
|
1440 |
+
} else {
|
1441 |
+
newRowContainer.appendChild( new wp.ccf.views.EmptyFormNotificationTableRow( { form: this.model } ).render().el );
|
1442 |
+
}
|
1443 |
+
|
1444 |
+
rowContainer.parentNode.replaceChild( newRowContainer, rowContainer );
|
1445 |
+
|
1446 |
+
wp.ccf.dispatcher.on( 'mainViewChange', this.fullSave, this );
|
1447 |
+
wp.ccf.dispatcher.on( 'saveFormSettings', this.fullSave, this );
|
1448 |
|
1449 |
return this;
|
1450 |
}
|
1456 |
template: wp.ccf.utils.template( 'ccf-form-pane-template' ),
|
1457 |
subViews: {
|
1458 |
'field-sidebar': wp.ccf.views.FieldSidebar,
|
1459 |
+
'form-settings': wp.ccf.views.FormSettings
|
|
|
1460 |
},
|
1461 |
|
1462 |
events: {
|
1463 |
'click .save-button': 'sync',
|
1464 |
'click .signup-button': 'signup',
|
1465 |
'click .accordion-heading': 'accordionClick',
|
1466 |
+
'click .form-settings-heading': 'accordionClick',
|
1467 |
'click .insert-form-button': 'insertForm'
|
1468 |
},
|
1469 |
|
1514 |
section.className = section.className.replace( /expanded/i, '' );
|
1515 |
}
|
1516 |
});
|
1517 |
+
|
1518 |
+
if ( event.currentTarget.className.match( /form-settings-heading/i ) ) {
|
1519 |
+
if ( this.el.className.match( /show-form-settings/i ) ) {
|
1520 |
+
this.el.className = this.el.className.replace( /show-form-settings/i, '' );
|
1521 |
+
} else {
|
1522 |
+
this.el.className += ' show-form-settings';
|
1523 |
+
}
|
1524 |
+
} else {
|
1525 |
+
this.el.className = this.el.className.replace( /show-form-settings/i, '' );
|
1526 |
+
}
|
1527 |
},
|
1528 |
|
1529 |
openEditField: function( field ) {
|
1549 |
|
1550 |
var $settings = $.Deferred();
|
1551 |
var $field = $.Deferred();
|
|
|
1552 |
|
1553 |
wp.ccf.dispatcher.trigger( 'saveFormSettings', $settings );
|
|
|
1554 |
wp.ccf.dispatcher.trigger( 'saveField', $field );
|
1555 |
|
1556 |
+
$.when( $settings, $field ).then( function() {
|
1557 |
var fields = SELF.model.get( 'fields' );
|
1558 |
var allReqsMet = true;
|
1559 |
var slugs = {};
|
1656 |
|
1657 |
SELF.el.innerHTML = this.template( context );
|
1658 |
|
1659 |
+
SELF.el.className = SELF.el.className.replace( /show-form-settings/i, '' );
|
1660 |
+
|
1661 |
var fields = SELF.el.querySelectorAll( '.fields' )[0];
|
1662 |
|
1663 |
_.each( ccfSettings.fieldLabels, function( label, type ) {
|
1734 |
|
1735 |
});
|
1736 |
|
1737 |
+
SELF.initRenderSubViews( false, true, { form: SELF.model } );
|
1738 |
|
1739 |
SELF.enableDisableInsert();
|
1740 |
|
2283 |
}
|
2284 |
}
|
2285 |
);
|
2286 |
+
})( jQuery, Backbone, _, ccfSettings );
|
languages/custom-contact-forms.mo
CHANGED
Binary file
|
languages/custom-contact-forms.po
CHANGED
@@ -5,15 +5,15 @@ msgstr ""
|
|
5 |
"Project-Id-Version: Custom Contact Forms\n"
|
6 |
"Report-Msgid-Bugs-To: https://github.com/tlovett1/custom-contact-forms/"
|
7 |
"issues\n"
|
8 |
-
"POT-Creation-Date: 2015-12-
|
9 |
-
"PO-Revision-Date: 2015-12-
|
10 |
"Last-Translator: Taylor Lovett <tlovett88@gmail.com>\n"
|
11 |
-
"Language-Team:
|
12 |
"Language: en\n"
|
13 |
"MIME-Version: 1.0\n"
|
14 |
"Content-Type: text/plain; charset=UTF-8\n"
|
15 |
"Content-Transfer-Encoding: 8bit\n"
|
16 |
-
"X-Generator: Poedit 1.6
|
17 |
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
18 |
"X-Poedit-Basepath: .\n"
|
19 |
"X-Poedit-SourceCharset: UTF-8\n"
|
@@ -23,23 +23,23 @@ msgstr ""
|
|
23 |
"X-Textdomain-Support: yes\n"
|
24 |
"X-Poedit-SearchPath-0: ..\n"
|
25 |
|
26 |
-
#: ../classes/class-ccf-api-form-controller.php:
|
27 |
msgid "Form not found"
|
28 |
msgstr ""
|
29 |
|
30 |
-
#: ../classes/class-ccf-api-form-controller.php:
|
31 |
msgid "Could not create form"
|
32 |
msgstr ""
|
33 |
|
34 |
-
#: ../classes/class-ccf-api-form-controller.php:
|
35 |
msgid "Could not update form"
|
36 |
msgstr ""
|
37 |
|
38 |
-
#: ../classes/class-ccf-api-form-controller.php:
|
39 |
msgid "Could not delete form"
|
40 |
msgstr ""
|
41 |
|
42 |
-
#: ../classes/class-ccf-api-form-controller.php:
|
43 |
msgid "Could not delete submission"
|
44 |
msgstr ""
|
45 |
|
@@ -47,14 +47,14 @@ msgstr ""
|
|
47 |
msgid "Form Field Choices"
|
48 |
msgstr ""
|
49 |
|
50 |
-
#: ../classes/class-ccf-custom-contact-forms.php:
|
51 |
#, php-format
|
52 |
msgid ""
|
53 |
"Custom Contact Forms will not work unless pretty permalinks (not default) "
|
54 |
"are enabled. Please update your <a href=\"%s\">permalinks settings</a>."
|
55 |
msgstr ""
|
56 |
|
57 |
-
#: ../classes/class-ccf-custom-contact-forms.php:
|
58 |
#, php-format
|
59 |
msgid "<a href=\"%s\">Forms and Submissions</a>"
|
60 |
msgstr ""
|
@@ -82,110 +82,111 @@ msgid "Max file size is %d MB. "
|
|
82 |
msgstr ""
|
83 |
|
84 |
#: ../classes/class-ccf-field-renderer.php:555
|
85 |
-
#: ../classes/class-ccf-form-manager.php:
|
86 |
-
#: ../classes/class-ccf-form-manager.php:
|
87 |
msgid "Street Address"
|
88 |
msgstr ""
|
89 |
|
90 |
#: ../classes/class-ccf-field-renderer.php:559
|
91 |
-
#: ../classes/class-ccf-form-manager.php:
|
92 |
-
#: ../classes/class-ccf-form-manager.php:
|
93 |
msgid "Address Line 2"
|
94 |
msgstr ""
|
95 |
|
96 |
#: ../classes/class-ccf-field-renderer.php:566
|
97 |
-
#: ../classes/class-ccf-form-manager.php:
|
98 |
-
#: ../classes/class-ccf-form-manager.php:
|
99 |
msgid "City"
|
100 |
msgstr ""
|
101 |
|
102 |
#: ../classes/class-ccf-field-renderer.php:579
|
103 |
-
#: ../classes/class-ccf-form-manager.php:
|
104 |
msgid "State"
|
105 |
msgstr ""
|
106 |
|
107 |
#: ../classes/class-ccf-field-renderer.php:587
|
108 |
-
#: ../classes/class-ccf-form-manager.php:
|
109 |
msgid "ZIP Code"
|
110 |
msgstr ""
|
111 |
|
112 |
#: ../classes/class-ccf-field-renderer.php:597
|
113 |
-
#: ../classes/class-ccf-form-manager.php:
|
114 |
msgid "State / Region / Province"
|
115 |
msgstr ""
|
116 |
|
117 |
#: ../classes/class-ccf-field-renderer.php:605
|
118 |
-
#: ../classes/class-ccf-form-manager.php:
|
119 |
msgid "ZIP / Postal Code"
|
120 |
msgstr ""
|
121 |
|
122 |
#: ../classes/class-ccf-field-renderer.php:617
|
123 |
-
#: ../classes/class-ccf-form-manager.php:
|
124 |
msgid "Country"
|
125 |
msgstr ""
|
126 |
|
127 |
#: ../classes/class-ccf-field-renderer.php:792
|
128 |
-
#: ../classes/class-ccf-form-manager.php:
|
129 |
msgid "email@example.com"
|
130 |
msgstr ""
|
131 |
|
132 |
#: ../classes/class-ccf-field-renderer.php:802
|
133 |
-
#: ../classes/class-ccf-form-manager.php:
|
134 |
-
#: ../classes/class-ccf-form-manager.php:
|
|
|
135 |
msgid "Email"
|
136 |
msgstr ""
|
137 |
|
138 |
#: ../classes/class-ccf-field-renderer.php:809
|
139 |
-
#: ../classes/class-ccf-form-manager.php:
|
140 |
msgid "Confirm Email"
|
141 |
msgstr ""
|
142 |
|
143 |
#: ../classes/class-ccf-field-renderer.php:875
|
144 |
-
#: ../classes/class-ccf-form-manager.php:
|
145 |
msgid "First"
|
146 |
msgstr ""
|
147 |
|
148 |
#: ../classes/class-ccf-field-renderer.php:882
|
149 |
-
#: ../classes/class-ccf-form-manager.php:
|
150 |
msgid "Last"
|
151 |
msgstr ""
|
152 |
|
153 |
-
#: ../classes/class-ccf-field-renderer.php:
|
154 |
-
#: ../classes/class-ccf-field-renderer.php:
|
155 |
-
#: ../classes/class-ccf-form-manager.php:
|
156 |
-
#: ../classes/class-ccf-form-manager.php:
|
157 |
msgid "HH"
|
158 |
msgstr ""
|
159 |
|
160 |
-
#: ../classes/class-ccf-field-renderer.php:
|
161 |
-
#: ../classes/class-ccf-field-renderer.php:
|
162 |
-
#: ../classes/class-ccf-form-manager.php:
|
163 |
-
#: ../classes/class-ccf-form-manager.php:
|
164 |
msgid "MM"
|
165 |
msgstr ""
|
166 |
|
167 |
-
#: ../classes/class-ccf-field-renderer.php:
|
168 |
-
#: ../classes/class-ccf-field-renderer.php:
|
169 |
-
#: ../classes/class-ccf-form-manager.php:
|
170 |
-
#: ../classes/class-ccf-form-manager.php:
|
171 |
msgid "AM"
|
172 |
msgstr ""
|
173 |
|
174 |
-
#: ../classes/class-ccf-field-renderer.php:
|
175 |
-
#: ../classes/class-ccf-field-renderer.php:
|
176 |
-
#: ../classes/class-ccf-form-manager.php:
|
177 |
-
#: ../classes/class-ccf-form-manager.php:
|
178 |
msgid "PM"
|
179 |
msgstr ""
|
180 |
|
181 |
-
#: ../classes/class-ccf-field-renderer.php:
|
182 |
#: ../classes/class-ccf-form-cpt.php:513
|
183 |
-
#: ../classes/class-ccf-form-manager.php:
|
184 |
-
#: ../classes/class-ccf-form-manager.php:
|
185 |
-
#: ../classes/class-ccf-form-manager.php:
|
186 |
-
#: ../classes/class-ccf-form-manager.php:
|
187 |
-
#: ../classes/class-ccf-form-manager.php:
|
188 |
-
#: ../classes/class-ccf-form-manager.php:
|
189 |
msgid "Date"
|
190 |
msgstr ""
|
191 |
|
@@ -195,8 +196,8 @@ msgstr ""
|
|
195 |
|
196 |
#: ../classes/class-ccf-form-cpt.php:329 ../classes/class-ccf-form-cpt.php:347
|
197 |
#: ../classes/class-ccf-form-cpt.php:511
|
198 |
-
#: ../classes/class-ccf-form-manager.php:
|
199 |
-
#: ../classes/class-ccf-form-manager.php:
|
200 |
msgid "Submissions"
|
201 |
msgstr ""
|
202 |
|
@@ -237,7 +238,7 @@ msgid "Export"
|
|
237 |
msgstr ""
|
238 |
|
239 |
#: ../classes/class-ccf-form-cpt.php:449
|
240 |
-
#: ../classes/class-ccf-form-manager.php:
|
241 |
msgid "(No title)"
|
242 |
msgstr ""
|
243 |
|
@@ -250,14 +251,14 @@ msgid "Form Title"
|
|
250 |
msgstr ""
|
251 |
|
252 |
#: ../classes/class-ccf-form-cpt.php:510
|
253 |
-
#: ../classes/class-ccf-form-manager.php:
|
254 |
-
#: ../classes/class-ccf-form-manager.php:
|
255 |
msgid "Author"
|
256 |
msgstr ""
|
257 |
|
258 |
#: ../classes/class-ccf-form-cpt.php:512
|
259 |
-
#: ../classes/class-ccf-form-manager.php:
|
260 |
-
#: ../classes/class-ccf-form-manager.php:
|
261 |
msgid "Number of Fields"
|
262 |
msgstr ""
|
263 |
|
@@ -434,29 +435,29 @@ msgstr ""
|
|
434 |
msgid "AM/PM is required."
|
435 |
msgstr ""
|
436 |
|
437 |
-
#: ../classes/class-ccf-form-handler.php:
|
438 |
msgid "*Hidden Field*"
|
439 |
msgstr ""
|
440 |
|
441 |
-
#: ../classes/class-ccf-form-handler.php:
|
442 |
msgid "Form submitted from"
|
443 |
msgstr ""
|
444 |
|
445 |
-
#: ../classes/class-ccf-form-handler.php:
|
446 |
msgid "Form submitter IP"
|
447 |
msgstr ""
|
448 |
|
449 |
-
#: ../classes/class-ccf-form-handler.php:
|
450 |
#, php-format
|
451 |
msgid "%s: Form Submission"
|
452 |
msgstr ""
|
453 |
|
454 |
-
#: ../classes/class-ccf-form-handler.php:
|
455 |
#, php-format
|
456 |
msgid " to \"%s\""
|
457 |
msgstr ""
|
458 |
|
459 |
-
#: ../classes/class-ccf-form-handler.php:
|
460 |
#: ../classes/class-ccf-form-renderer.php:134
|
461 |
msgid "Thank you for your submission."
|
462 |
msgstr ""
|
@@ -494,325 +495,419 @@ msgstr ""
|
|
494 |
msgid "Structure"
|
495 |
msgstr ""
|
496 |
|
497 |
-
#: ../classes/class-ccf-form-manager.php:
|
|
|
|
|
|
|
|
|
498 |
msgid "← Drag fields from the left here."
|
499 |
msgstr ""
|
500 |
|
501 |
-
#: ../classes/class-ccf-form-manager.php:
|
502 |
-
#: ../classes/class-ccf-form-manager.php:
|
503 |
msgid "Insert into post"
|
504 |
msgstr ""
|
505 |
|
506 |
-
#: ../classes/class-ccf-form-manager.php:
|
507 |
msgid "Save Form"
|
508 |
msgstr ""
|
509 |
|
510 |
-
#: ../classes/class-ccf-form-manager.php:
|
511 |
-
msgid "
|
512 |
msgstr ""
|
513 |
|
514 |
-
#: ../classes/class-ccf-form-manager.php:
|
515 |
-
msgid "
|
516 |
msgstr ""
|
517 |
|
518 |
-
#: ../classes/class-ccf-form-manager.php:
|
519 |
-
msgid "
|
520 |
msgstr ""
|
521 |
|
522 |
-
#: ../classes/class-ccf-form-manager.php:
|
523 |
-
|
|
|
524 |
msgstr ""
|
525 |
|
526 |
-
#: ../classes/class-ccf-form-manager.php:
|
527 |
-
msgid "
|
528 |
msgstr ""
|
529 |
|
530 |
-
#: ../classes/class-ccf-form-manager.php:
|
531 |
-
|
|
|
532 |
msgstr ""
|
533 |
|
534 |
-
#: ../classes/class-ccf-form-manager.php:
|
535 |
-
msgid "
|
536 |
msgstr ""
|
537 |
|
538 |
-
#: ../classes/class-ccf-form-manager.php:
|
539 |
-
msgid "
|
540 |
msgstr ""
|
541 |
|
542 |
-
#: ../classes/class-ccf-form-manager.php:
|
543 |
-
msgid "
|
544 |
msgstr ""
|
545 |
|
546 |
-
#: ../classes/class-ccf-form-manager.php:
|
547 |
-
msgid "
|
548 |
msgstr ""
|
549 |
|
550 |
-
#: ../classes/class-ccf-form-manager.php:
|
551 |
-
|
552 |
-
#: ../classes/class-ccf-form-manager.php:362
|
553 |
-
#: ../classes/class-ccf-form-manager.php:412
|
554 |
-
#: ../classes/class-ccf-form-manager.php:488
|
555 |
-
#: ../classes/class-ccf-form-manager.php:578
|
556 |
-
#: ../classes/class-ccf-form-manager.php:643
|
557 |
-
#: ../classes/class-ccf-form-manager.php:685
|
558 |
-
#: ../classes/class-ccf-form-manager.php:746
|
559 |
-
#: ../classes/class-ccf-form-manager.php:793
|
560 |
-
#: ../classes/class-ccf-form-manager.php:835
|
561 |
-
#: ../classes/class-ccf-form-manager.php:842
|
562 |
-
#: ../classes/class-ccf-form-manager.php:893
|
563 |
-
#: ../classes/class-ccf-form-manager.php:936
|
564 |
-
#: ../classes/class-ccf-form-manager.php:979
|
565 |
-
msgid "No"
|
566 |
msgstr ""
|
567 |
|
568 |
-
#: ../classes/class-ccf-form-manager.php:
|
569 |
-
|
570 |
-
#: ../classes/class-ccf-form-manager.php:361
|
571 |
-
#: ../classes/class-ccf-form-manager.php:411
|
572 |
-
#: ../classes/class-ccf-form-manager.php:487
|
573 |
-
#: ../classes/class-ccf-form-manager.php:577
|
574 |
-
#: ../classes/class-ccf-form-manager.php:642
|
575 |
-
#: ../classes/class-ccf-form-manager.php:684
|
576 |
-
#: ../classes/class-ccf-form-manager.php:745
|
577 |
-
#: ../classes/class-ccf-form-manager.php:792
|
578 |
-
#: ../classes/class-ccf-form-manager.php:834
|
579 |
-
#: ../classes/class-ccf-form-manager.php:841
|
580 |
-
#: ../classes/class-ccf-form-manager.php:892
|
581 |
-
#: ../classes/class-ccf-form-manager.php:935
|
582 |
-
#: ../classes/class-ccf-form-manager.php:978
|
583 |
-
msgid "Yes"
|
584 |
msgstr ""
|
585 |
|
586 |
-
#: ../classes/class-ccf-form-manager.php:
|
587 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
588 |
msgstr ""
|
589 |
|
590 |
-
#: ../classes/class-ccf-form-manager.php:
|
591 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
592 |
msgstr ""
|
593 |
|
594 |
-
#: ../classes/class-ccf-form-manager.php:
|
595 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
596 |
msgstr ""
|
597 |
|
598 |
-
#: ../classes/class-ccf-form-manager.php:
|
599 |
-
msgid "
|
600 |
msgstr ""
|
601 |
|
602 |
-
#: ../classes/class-ccf-form-manager.php:
|
603 |
msgid "\"From\" Email Address Type:"
|
604 |
msgstr ""
|
605 |
|
606 |
-
#: ../classes/class-ccf-form-manager.php:
|
607 |
msgid "WordPress Default"
|
608 |
msgstr ""
|
609 |
|
610 |
-
#: ../classes/class-ccf-form-manager.php:
|
|
|
611 |
msgid "Custom Email"
|
612 |
msgstr ""
|
613 |
|
614 |
-
#: ../classes/class-ccf-form-manager.php:
|
615 |
-
#: ../classes/class-ccf-form-manager.php:
|
616 |
-
#: ../classes/class-ccf-form-manager.php:
|
|
|
617 |
msgid "Form Field"
|
618 |
msgstr ""
|
619 |
|
620 |
-
#: ../classes/class-ccf-form-manager.php:
|
621 |
msgid ""
|
622 |
"You can set the notification emails from address to be the WP default, a "
|
623 |
"custom email address, or pull the address from a field in the form."
|
624 |
msgstr ""
|
625 |
|
626 |
-
#: ../classes/class-ccf-form-manager.php:
|
627 |
msgid "Custom \"From\" Email Address:"
|
628 |
msgstr ""
|
629 |
|
630 |
-
#: ../classes/class-ccf-form-manager.php:
|
631 |
msgid "Pull \"From\" Email Dynamically from Field:"
|
632 |
msgstr ""
|
633 |
|
634 |
-
#: ../classes/class-ccf-form-manager.php:
|
635 |
msgid "\"From\" Name Type:"
|
636 |
msgstr ""
|
637 |
|
638 |
-
#: ../classes/class-ccf-form-manager.php:
|
639 |
msgid "Custom Name"
|
640 |
msgstr ""
|
641 |
|
642 |
-
#: ../classes/class-ccf-form-manager.php:
|
643 |
msgid ""
|
644 |
"You can set the notification emails from name to be a custom name or pull "
|
645 |
"the name from a field in the form."
|
646 |
msgstr ""
|
647 |
|
648 |
-
#: ../classes/class-ccf-form-manager.php:
|
649 |
msgid "Custom \"From\" Name:"
|
650 |
msgstr ""
|
651 |
|
652 |
-
#: ../classes/class-ccf-form-manager.php:
|
653 |
msgid "Pull \"From\" Name Dynamically from Field:"
|
654 |
msgstr ""
|
655 |
|
656 |
-
#: ../classes/class-ccf-form-manager.php:
|
657 |
msgid "Email Subject Type:"
|
658 |
msgstr ""
|
659 |
|
660 |
-
#: ../classes/class-ccf-form-manager.php:
|
661 |
msgid "Default"
|
662 |
msgstr ""
|
663 |
|
664 |
-
#: ../classes/class-ccf-form-manager.php:
|
665 |
msgid "Custom Subject"
|
666 |
msgstr ""
|
667 |
|
668 |
-
#: ../classes/class-ccf-form-manager.php:
|
669 |
msgid ""
|
670 |
"You can set the notification emails subject line to be the CCF default, "
|
671 |
"custom text, or pull the subject from a field in the form."
|
672 |
msgstr ""
|
673 |
|
674 |
-
#: ../classes/class-ccf-form-manager.php:
|
675 |
msgid "Custom Email Subject:"
|
676 |
msgstr ""
|
677 |
|
678 |
-
#: ../classes/class-ccf-form-manager.php:
|
679 |
msgid "Pull Email Subject Dynamically from Field:"
|
680 |
msgstr ""
|
681 |
|
682 |
-
#: ../classes/class-ccf-form-manager.php:
|
683 |
-
msgid "
|
684 |
msgstr ""
|
685 |
|
686 |
-
#: ../classes/class-ccf-form-manager.php:
|
687 |
-
|
688 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
689 |
msgstr ""
|
690 |
|
691 |
-
#: ../classes/class-ccf-form-manager.php:
|
692 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
693 |
msgid "Title"
|
694 |
msgstr ""
|
695 |
|
696 |
-
#: ../classes/class-ccf-form-manager.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
697 |
msgid "<span>←</span> Click on a field to edit it."
|
698 |
msgstr ""
|
699 |
|
700 |
-
#: ../classes/class-ccf-form-manager.php:
|
701 |
-
#: ../classes/class-ccf-form-manager.php:
|
702 |
-
#: ../classes/class-ccf-form-manager.php:
|
703 |
-
#: ../classes/class-ccf-form-manager.php:
|
704 |
msgid "Internal Unique Slug"
|
705 |
msgstr ""
|
706 |
|
707 |
-
#: ../classes/class-ccf-form-manager.php:
|
708 |
-
#: ../classes/class-ccf-form-manager.php:
|
709 |
-
#: ../classes/class-ccf-form-manager.php:
|
710 |
-
#: ../classes/class-ccf-form-manager.php:
|
711 |
-
#: ../classes/class-ccf-form-manager.php:
|
712 |
-
#: ../classes/class-ccf-form-manager.php:
|
713 |
-
#: ../classes/class-ccf-form-manager.php:
|
714 |
-
#: ../classes/class-ccf-form-manager.php:
|
715 |
-
#: ../classes/class-ccf-form-manager.php:
|
716 |
-
#: ../classes/class-ccf-form-manager.php:
|
717 |
-
#: ../classes/class-ccf-form-manager.php:
|
718 |
-
#: ../classes/class-ccf-form-manager.php:
|
719 |
-
#: ../classes/class-ccf-form-manager.php:
|
720 |
msgid "Label:"
|
721 |
msgstr ""
|
722 |
|
723 |
-
#: ../classes/class-ccf-form-manager.php:
|
724 |
-
#: ../classes/class-ccf-form-manager.php:
|
725 |
-
#: ../classes/class-ccf-form-manager.php:
|
726 |
-
#: ../classes/class-ccf-form-manager.php:
|
727 |
-
#: ../classes/class-ccf-form-manager.php:
|
728 |
-
#: ../classes/class-ccf-form-manager.php:
|
729 |
-
#: ../classes/class-ccf-form-manager.php:
|
730 |
-
#: ../classes/class-ccf-form-manager.php:
|
731 |
-
#: ../classes/class-ccf-form-manager.php:
|
732 |
-
#: ../classes/class-ccf-form-manager.php:
|
733 |
-
#: ../classes/class-ccf-form-manager.php:
|
734 |
-
#: ../classes/class-ccf-form-manager.php:
|
735 |
-
#: ../classes/class-ccf-form-manager.php:
|
736 |
msgid "Description:"
|
737 |
msgstr ""
|
738 |
|
739 |
-
#: ../classes/class-ccf-form-manager.php:
|
740 |
-
#: ../classes/class-ccf-form-manager.php:
|
741 |
-
#: ../classes/class-ccf-form-manager.php:
|
742 |
-
#: ../classes/class-ccf-form-manager.php:
|
743 |
-
#: ../classes/class-ccf-form-manager.php:
|
744 |
-
#: ../classes/class-ccf-form-manager.php:
|
745 |
-
#: ../classes/class-ccf-form-manager.php:
|
746 |
msgid "Initial Value:"
|
747 |
msgstr ""
|
748 |
|
749 |
-
#: ../classes/class-ccf-form-manager.php:
|
750 |
-
#: ../classes/class-ccf-form-manager.php:
|
751 |
-
#: ../classes/class-ccf-form-manager.php:
|
752 |
-
#: ../classes/class-ccf-form-manager.php:
|
753 |
-
#: ../classes/class-ccf-form-manager.php:
|
754 |
-
#: ../classes/class-ccf-form-manager.php:
|
755 |
-
#: ../classes/class-ccf-form-manager.php:
|
756 |
-
#: ../classes/class-ccf-form-manager.php:
|
757 |
-
#: ../classes/class-ccf-form-manager.php:
|
758 |
-
#: ../classes/class-ccf-form-manager.php:
|
759 |
-
#: ../classes/class-ccf-form-manager.php:
|
760 |
-
#: ../classes/class-ccf-form-manager.php:
|
761 |
msgid "Required:"
|
762 |
msgstr ""
|
763 |
|
764 |
-
#: ../classes/class-ccf-form-manager.php:
|
765 |
-
#: ../classes/class-ccf-form-manager.php:
|
766 |
-
#: ../classes/class-ccf-form-manager.php:
|
767 |
-
#: ../classes/class-ccf-form-manager.php:
|
768 |
-
#: ../classes/class-ccf-form-manager.php:
|
769 |
-
#: ../classes/class-ccf-form-manager.php:
|
770 |
-
#: ../classes/class-ccf-form-manager.php:
|
771 |
-
#: ../classes/class-ccf-form-manager.php:
|
772 |
-
#: ../classes/class-ccf-form-manager.php:
|
773 |
-
#: ../classes/class-ccf-form-manager.php:
|
774 |
-
#: ../classes/class-ccf-form-manager.php:
|
775 |
-
#: ../classes/class-ccf-form-manager.php:
|
776 |
-
#: ../classes/class-ccf-form-manager.php:
|
777 |
-
#: ../classes/class-ccf-form-manager.php:
|
778 |
-
#: ../classes/class-ccf-form-manager.php:
|
779 |
-
#: ../classes/class-ccf-form-manager.php:
|
780 |
msgid "Advanced"
|
781 |
msgstr ""
|
782 |
|
783 |
-
#: ../classes/class-ccf-form-manager.php:
|
784 |
-
#: ../classes/class-ccf-form-manager.php:
|
785 |
-
#: ../classes/class-ccf-form-manager.php:
|
786 |
-
#: ../classes/class-ccf-form-manager.php:
|
787 |
-
#: ../classes/class-ccf-form-manager.php:
|
788 |
-
#: ../classes/class-ccf-form-manager.php:
|
789 |
-
#: ../classes/class-ccf-form-manager.php:
|
790 |
-
#: ../classes/class-ccf-form-manager.php:
|
791 |
-
#: ../classes/class-ccf-form-manager.php:
|
792 |
-
#: ../classes/class-ccf-form-manager.php:
|
793 |
-
#: ../classes/class-ccf-form-manager.php:
|
794 |
-
#: ../classes/class-ccf-form-manager.php:
|
795 |
-
#: ../classes/class-ccf-form-manager.php:
|
796 |
-
#: ../classes/class-ccf-form-manager.php:
|
797 |
-
#: ../classes/class-ccf-form-manager.php:
|
798 |
-
#: ../classes/class-ccf-form-manager.php:
|
799 |
msgid "Class Name:"
|
800 |
msgstr ""
|
801 |
|
802 |
-
#: ../classes/class-ccf-form-manager.php:
|
803 |
-
#: ../classes/class-ccf-form-manager.php:
|
804 |
-
#: ../classes/class-ccf-form-manager.php:
|
805 |
-
#: ../classes/class-ccf-form-manager.php:
|
806 |
-
#: ../classes/class-ccf-form-manager.php:
|
807 |
-
#: ../classes/class-ccf-form-manager.php:
|
808 |
msgid "Placeholder Text:"
|
809 |
msgstr ""
|
810 |
|
811 |
-
#: ../classes/class-ccf-form-manager.php:
|
812 |
msgid "Allowed File Extensions (comma separate):"
|
813 |
msgstr ""
|
814 |
|
815 |
-
#: ../classes/class-ccf-form-manager.php:
|
816 |
msgid ""
|
817 |
"If left blank, will default to all extensions registered by WordPress. If "
|
818 |
"you use a file extension or mime type not <a href=\"http://codex.wordpress."
|
@@ -820,265 +915,261 @@ msgid ""
|
|
820 |
"a>, you will need to filter and manually whitelist the new extension."
|
821 |
msgstr ""
|
822 |
|
823 |
-
#: ../classes/class-ccf-form-manager.php:
|
824 |
msgid "Max File Size (in MB):"
|
825 |
msgstr ""
|
826 |
|
827 |
-
#: ../classes/class-ccf-form-manager.php:
|
828 |
#, php-format
|
829 |
msgid ""
|
830 |
"If left blank, will default to %d MB. Maximum allowed by server is %d MB."
|
831 |
msgstr ""
|
832 |
|
833 |
-
#: ../classes/class-ccf-form-manager.php:
|
834 |
msgid ""
|
835 |
"reCAPTCHA is a simple captcha service provided by Google. <a target=\"_blank"
|
836 |
"\" href=\"https://www.google.com/recaptcha/intro/index.html\">Learn more</a>"
|
837 |
msgstr ""
|
838 |
|
839 |
-
#: ../classes/class-ccf-form-manager.php:
|
840 |
msgid "Site Key:"
|
841 |
msgstr ""
|
842 |
|
843 |
-
#: ../classes/class-ccf-form-manager.php:
|
844 |
-
#: ../classes/class-ccf-form-manager.php:
|
845 |
msgid "Don't have one?"
|
846 |
msgstr ""
|
847 |
|
848 |
-
#: ../classes/class-ccf-form-manager.php:
|
849 |
msgid "Secret Key:"
|
850 |
msgstr ""
|
851 |
|
852 |
-
#: ../classes/class-ccf-form-manager.php:
|
853 |
-
#: ../classes/class-ccf-form-manager.php:
|
854 |
-
#: ../classes/class-ccf-form-manager.php:
|
855 |
-
#: ../classes/class-ccf-form-manager.php:
|
856 |
-
#: ../classes/class-ccf-form-manager.php:
|
857 |
-
#: ../classes/class-ccf-form-manager.php:
|
858 |
-
#: ../classes/class-ccf-form-manager.php:
|
859 |
-
#: ../classes/class-ccf-form-manager.php:
|
860 |
-
#: ../classes/class-ccf-form-manager.php:
|
861 |
-
#: ../classes/class-ccf-form-manager.php:
|
862 |
-
#: ../classes/class-ccf-form-manager.php:
|
863 |
-
#: ../classes/class-ccf-form-manager.php:
|
864 |
msgid "Basic"
|
865 |
msgstr ""
|
866 |
|
867 |
-
#: ../classes/class-ccf-form-manager.php:
|
868 |
msgid "HTML Content:"
|
869 |
msgstr ""
|
870 |
|
871 |
-
#: ../classes/class-ccf-form-manager.php:
|
872 |
msgid "Heading:"
|
873 |
msgstr ""
|
874 |
|
875 |
-
#: ../classes/class-ccf-form-manager.php:
|
876 |
msgid "Sub Heading:"
|
877 |
msgstr ""
|
878 |
|
879 |
-
#: ../classes/class-ccf-form-manager.php:
|
880 |
-
#: ../classes/class-ccf-form-manager.php:
|
881 |
-
#: ../classes/class-ccf-form-manager.php:
|
882 |
-
#: ../classes/class-ccf-form-manager.php:
|
883 |
-
#: ../classes/class-ccf-form-manager.php:
|
884 |
-
#: ../classes/class-ccf-form-manager.php:
|
885 |
-
#: ../classes/class-ccf-form-manager.php:
|
886 |
-
#: ../classes/class-ccf-form-manager.php:
|
887 |
-
#: ../classes/class-ccf-form-manager.php:
|
888 |
msgid "Internal Unique Slug (a-z, 0-9, -, _):"
|
889 |
msgstr ""
|
890 |
|
891 |
-
#: ../classes/class-ccf-form-manager.php:
|
892 |
msgid "Enable Date Select"
|
893 |
msgstr ""
|
894 |
|
895 |
-
#: ../classes/class-ccf-form-manager.php:
|
896 |
msgid "Enable Time Select"
|
897 |
msgstr ""
|
898 |
|
899 |
-
#: ../classes/class-ccf-form-manager.php:
|
|
|
|
|
|
|
|
|
900 |
msgid "Format:"
|
901 |
msgstr ""
|
902 |
|
903 |
-
#: ../classes/class-ccf-form-manager.php:
|
904 |
-
#: ../classes/class-ccf-form-manager.php:
|
905 |
msgid "International"
|
906 |
msgstr ""
|
907 |
|
908 |
-
#: ../classes/class-ccf-form-manager.php:
|
909 |
msgid "Type:"
|
910 |
msgstr ""
|
911 |
|
912 |
-
#: ../classes/class-ccf-form-manager.php:
|
913 |
msgid "United States"
|
914 |
msgstr ""
|
915 |
|
916 |
-
#: ../classes/class-ccf-form-manager.php:
|
917 |
msgid "Require Confirmation:"
|
918 |
msgstr ""
|
919 |
|
920 |
-
#: ../classes/class-ccf-form-manager.php:
|
921 |
msgid "Label"
|
922 |
msgstr ""
|
923 |
|
924 |
-
#: ../classes/class-ccf-form-manager.php:
|
925 |
msgid "Value"
|
926 |
msgstr ""
|
927 |
|
928 |
-
#: ../classes/class-ccf-form-manager.php:
|
929 |
-
#: ../classes/class-ccf-form-manager.php:
|
930 |
-
#: ../classes/class-ccf-form-manager.php:
|
931 |
msgid "Manage field choices:"
|
932 |
msgstr ""
|
933 |
|
934 |
-
#: ../classes/class-ccf-form-manager.php:
|
935 |
-
#: ../classes/class-ccf-form-manager.php:
|
936 |
-
#: ../classes/class-ccf-form-manager.php:
|
937 |
msgid ""
|
938 |
"Note: If an option does not have a \"value\", it will not be considered a "
|
939 |
"valid selection if the field is required. The \"value\" is what's read, "
|
940 |
"stored, and displayed in the submission."
|
941 |
msgstr ""
|
942 |
|
943 |
-
#: ../classes/class-ccf-form-manager.php:
|
944 |
msgid "You currently have no forms. Add some!"
|
945 |
msgstr ""
|
946 |
|
947 |
-
#: ../classes/class-ccf-form-manager.php:
|
948 |
msgid "Allowed file extensions are {{ extensions }}. "
|
949 |
msgstr ""
|
950 |
|
951 |
-
#: ../classes/class-ccf-form-manager.php:
|
952 |
msgid "Max file size is {{ file_size }} MB. "
|
953 |
msgstr ""
|
954 |
|
955 |
-
#: ../classes/class-ccf-form-manager.php:
|
956 |
-
#: ../classes/class-ccf-form-manager.php:
|
957 |
-
#: ../classes/class-ccf-form-manager.php:
|
958 |
msgid "An example choice"
|
959 |
msgstr ""
|
960 |
|
961 |
-
#: ../classes/class-ccf-form-manager.php:
|
962 |
msgid "Arbitrary block of HTML."
|
963 |
msgstr ""
|
964 |
|
965 |
-
#: ../classes/class-ccf-form-manager.php:
|
966 |
msgid "Section Heading"
|
967 |
msgstr ""
|
968 |
|
969 |
-
#: ../classes/class-ccf-form-manager.php:
|
970 |
msgid "This is the sub-heading text."
|
971 |
msgstr ""
|
972 |
|
973 |
-
#: ../classes/class-ccf-form-manager.php:
|
974 |
-
msgid "Edit"
|
975 |
-
msgstr ""
|
976 |
-
|
977 |
-
#: ../classes/class-ccf-form-manager.php:1285
|
978 |
msgid "Trash"
|
979 |
msgstr ""
|
980 |
|
981 |
-
#: ../classes/class-ccf-form-manager.php:
|
982 |
msgid "There is a problem with this form. Is it trashed or deleted?"
|
983 |
msgstr ""
|
984 |
|
985 |
-
#: ../classes/class-ccf-form-manager.php:
|
986 |
msgid "IP Address"
|
987 |
msgstr ""
|
988 |
|
989 |
-
#: ../classes/class-ccf-form-manager.php:
|
990 |
msgid "There are no submissions."
|
991 |
msgstr ""
|
992 |
|
993 |
-
#: ../classes/class-ccf-form-manager.php:
|
994 |
msgid "Add Form"
|
995 |
msgstr ""
|
996 |
|
997 |
-
#: ../classes/class-ccf-form-manager.php:
|
998 |
msgid "Single Line Text"
|
999 |
msgstr ""
|
1000 |
|
1001 |
-
#: ../classes/class-ccf-form-manager.php:
|
1002 |
msgid "Dropdown"
|
1003 |
msgstr ""
|
1004 |
|
1005 |
-
#: ../classes/class-ccf-form-manager.php:
|
1006 |
msgid "Checkboxes"
|
1007 |
msgstr ""
|
1008 |
|
1009 |
-
#: ../classes/class-ccf-form-manager.php:
|
1010 |
msgid "Radio Buttons"
|
1011 |
msgstr ""
|
1012 |
|
1013 |
-
#: ../classes/class-ccf-form-manager.php:
|
1014 |
msgid "Paragraph Text"
|
1015 |
msgstr ""
|
1016 |
|
1017 |
-
#: ../classes/class-ccf-form-manager.php:
|
1018 |
msgid "Hidden"
|
1019 |
msgstr ""
|
1020 |
|
1021 |
-
#: ../classes/class-ccf-form-manager.php:
|
1022 |
msgid "File Upload"
|
1023 |
msgstr ""
|
1024 |
|
1025 |
-
#: ../classes/class-ccf-form-manager.php:
|
1026 |
msgid "HTML"
|
1027 |
msgstr ""
|
1028 |
|
1029 |
-
#: ../classes/class-ccf-form-manager.php:
|
1030 |
msgid "Section Header"
|
1031 |
msgstr ""
|
1032 |
|
1033 |
-
#: ../classes/class-ccf-form-manager.php:
|
1034 |
msgid "Name"
|
1035 |
msgstr ""
|
1036 |
|
1037 |
-
#: ../classes/class-ccf-form-manager.php:
|
1038 |
msgid "Date/Time"
|
1039 |
msgstr ""
|
1040 |
|
1041 |
-
#: ../classes/class-ccf-form-manager.php:
|
1042 |
msgid "Website"
|
1043 |
msgstr ""
|
1044 |
|
1045 |
-
#: ../classes/class-ccf-form-manager.php:
|
1046 |
msgid "Address"
|
1047 |
msgstr ""
|
1048 |
|
1049 |
-
#: ../classes/class-ccf-form-manager.php:
|
1050 |
msgid "Phone"
|
1051 |
msgstr ""
|
1052 |
|
1053 |
-
#: ../classes/class-ccf-form-manager.php:
|
1054 |
msgid "reCAPTCHA"
|
1055 |
msgstr ""
|
1056 |
|
1057 |
-
#: ../classes/class-ccf-form-manager.php:
|
1058 |
msgid "You have no email fields"
|
1059 |
msgstr ""
|
1060 |
|
1061 |
-
#: ../classes/class-ccf-form-manager.php:
|
1062 |
msgid "You have no name fields"
|
1063 |
msgstr ""
|
1064 |
|
1065 |
-
#: ../classes/class-ccf-form-manager.php:
|
1066 |
msgid "You have no applicable fields"
|
1067 |
msgstr ""
|
1068 |
|
1069 |
-
#: ../classes/class-ccf-form-manager.php:
|
1070 |
msgid "Invalid date"
|
1071 |
msgstr ""
|
1072 |
|
1073 |
-
#: ../classes/class-ccf-form-manager.php:
|
1074 |
msgid "Field Label"
|
1075 |
msgstr ""
|
1076 |
|
1077 |
-
#: ../classes/class-ccf-form-manager.php:
|
1078 |
-
msgid "Form Submission"
|
1079 |
-
msgstr ""
|
1080 |
-
|
1081 |
-
#: ../classes/class-ccf-form-manager.php:1586
|
1082 |
#: ../classes/class-ccf-form-renderer.php:120
|
1083 |
msgid "This form is paused right now. Check back later!"
|
1084 |
msgstr ""
|
@@ -1192,20 +1283,17 @@ msgstr ""
|
|
1192 |
msgid "The specified namespace could not be found."
|
1193 |
msgstr ""
|
1194 |
|
1195 |
-
#. translators: 1: function name, 2: WordPress version number, 3: new function name
|
1196 |
#: ../wp-api/core/wp-includes/rest-api/rest-functions.php:327
|
1197 |
#, php-format
|
1198 |
msgid "%1$s (since %2$s; use %3$s instead)"
|
1199 |
msgstr ""
|
1200 |
|
1201 |
-
#. translators: 1: function name, 2: WordPress version number
|
1202 |
#: ../wp-api/core/wp-includes/rest-api/rest-functions.php:330
|
1203 |
#: ../wp-api/core/wp-includes/rest-api/rest-functions.php:351
|
1204 |
#, php-format
|
1205 |
msgid "%1$s (since %2$s; no alternative available)"
|
1206 |
msgstr ""
|
1207 |
|
1208 |
-
#. translators: 1: function name, 2: WordPress version number, 3: new argument name
|
1209 |
#: ../wp-api/core/wp-includes/rest-api/rest-functions.php:348
|
1210 |
#, php-format
|
1211 |
msgid "%1$s (since %2$s; %3$s)"
|
5 |
"Project-Id-Version: Custom Contact Forms\n"
|
6 |
"Report-Msgid-Bugs-To: https://github.com/tlovett1/custom-contact-forms/"
|
7 |
"issues\n"
|
8 |
+
"POT-Creation-Date: 2015-12-31 13:08-0500\n"
|
9 |
+
"PO-Revision-Date: 2015-12-31 13:08-0500\n"
|
10 |
"Last-Translator: Taylor Lovett <tlovett88@gmail.com>\n"
|
11 |
+
"Language-Team: \n"
|
12 |
"Language: en\n"
|
13 |
"MIME-Version: 1.0\n"
|
14 |
"Content-Type: text/plain; charset=UTF-8\n"
|
15 |
"Content-Transfer-Encoding: 8bit\n"
|
16 |
+
"X-Generator: Poedit 1.8.6\n"
|
17 |
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
18 |
"X-Poedit-Basepath: .\n"
|
19 |
"X-Poedit-SourceCharset: UTF-8\n"
|
23 |
"X-Textdomain-Support: yes\n"
|
24 |
"X-Poedit-SearchPath-0: ..\n"
|
25 |
|
26 |
+
#: ../classes/class-ccf-api-form-controller.php:578
|
27 |
msgid "Form not found"
|
28 |
msgstr ""
|
29 |
|
30 |
+
#: ../classes/class-ccf-api-form-controller.php:604
|
31 |
msgid "Could not create form"
|
32 |
msgstr ""
|
33 |
|
34 |
+
#: ../classes/class-ccf-api-form-controller.php:634
|
35 |
msgid "Could not update form"
|
36 |
msgstr ""
|
37 |
|
38 |
+
#: ../classes/class-ccf-api-form-controller.php:662
|
39 |
msgid "Could not delete form"
|
40 |
msgstr ""
|
41 |
|
42 |
+
#: ../classes/class-ccf-api-form-controller.php:691
|
43 |
msgid "Could not delete submission"
|
44 |
msgstr ""
|
45 |
|
47 |
msgid "Form Field Choices"
|
48 |
msgstr ""
|
49 |
|
50 |
+
#: ../classes/class-ccf-custom-contact-forms.php:71
|
51 |
#, php-format
|
52 |
msgid ""
|
53 |
"Custom Contact Forms will not work unless pretty permalinks (not default) "
|
54 |
"are enabled. Please update your <a href=\"%s\">permalinks settings</a>."
|
55 |
msgstr ""
|
56 |
|
57 |
+
#: ../classes/class-ccf-custom-contact-forms.php:89
|
58 |
#, php-format
|
59 |
msgid "<a href=\"%s\">Forms and Submissions</a>"
|
60 |
msgstr ""
|
82 |
msgstr ""
|
83 |
|
84 |
#: ../classes/class-ccf-field-renderer.php:555
|
85 |
+
#: ../classes/class-ccf-form-manager.php:1316
|
86 |
+
#: ../classes/class-ccf-form-manager.php:1341
|
87 |
msgid "Street Address"
|
88 |
msgstr ""
|
89 |
|
90 |
#: ../classes/class-ccf-field-renderer.php:559
|
91 |
+
#: ../classes/class-ccf-form-manager.php:1320
|
92 |
+
#: ../classes/class-ccf-form-manager.php:1345
|
93 |
msgid "Address Line 2"
|
94 |
msgstr ""
|
95 |
|
96 |
#: ../classes/class-ccf-field-renderer.php:566
|
97 |
+
#: ../classes/class-ccf-form-manager.php:1324
|
98 |
+
#: ../classes/class-ccf-form-manager.php:1349
|
99 |
msgid "City"
|
100 |
msgstr ""
|
101 |
|
102 |
#: ../classes/class-ccf-field-renderer.php:579
|
103 |
+
#: ../classes/class-ccf-form-manager.php:1332
|
104 |
msgid "State"
|
105 |
msgstr ""
|
106 |
|
107 |
#: ../classes/class-ccf-field-renderer.php:587
|
108 |
+
#: ../classes/class-ccf-form-manager.php:1336
|
109 |
msgid "ZIP Code"
|
110 |
msgstr ""
|
111 |
|
112 |
#: ../classes/class-ccf-field-renderer.php:597
|
113 |
+
#: ../classes/class-ccf-form-manager.php:1353
|
114 |
msgid "State / Region / Province"
|
115 |
msgstr ""
|
116 |
|
117 |
#: ../classes/class-ccf-field-renderer.php:605
|
118 |
+
#: ../classes/class-ccf-form-manager.php:1357
|
119 |
msgid "ZIP / Postal Code"
|
120 |
msgstr ""
|
121 |
|
122 |
#: ../classes/class-ccf-field-renderer.php:617
|
123 |
+
#: ../classes/class-ccf-form-manager.php:1365
|
124 |
msgid "Country"
|
125 |
msgstr ""
|
126 |
|
127 |
#: ../classes/class-ccf-field-renderer.php:792
|
128 |
+
#: ../classes/class-ccf-form-manager.php:1376
|
129 |
msgid "email@example.com"
|
130 |
msgstr ""
|
131 |
|
132 |
#: ../classes/class-ccf-field-renderer.php:802
|
133 |
+
#: ../classes/class-ccf-form-manager.php:317
|
134 |
+
#: ../classes/class-ccf-form-manager.php:1380
|
135 |
+
#: ../classes/class-ccf-form-manager.php:1682
|
136 |
msgid "Email"
|
137 |
msgstr ""
|
138 |
|
139 |
#: ../classes/class-ccf-field-renderer.php:809
|
140 |
+
#: ../classes/class-ccf-form-manager.php:1384
|
141 |
msgid "Confirm Email"
|
142 |
msgstr ""
|
143 |
|
144 |
#: ../classes/class-ccf-field-renderer.php:875
|
145 |
+
#: ../classes/class-ccf-form-manager.php:1252
|
146 |
msgid "First"
|
147 |
msgstr ""
|
148 |
|
149 |
#: ../classes/class-ccf-field-renderer.php:882
|
150 |
+
#: ../classes/class-ccf-form-manager.php:1256
|
151 |
msgid "Last"
|
152 |
msgstr ""
|
153 |
|
154 |
+
#: ../classes/class-ccf-field-renderer.php:955
|
155 |
+
#: ../classes/class-ccf-field-renderer.php:976
|
156 |
+
#: ../classes/class-ccf-form-manager.php:1271
|
157 |
+
#: ../classes/class-ccf-form-manager.php:1292
|
158 |
msgid "HH"
|
159 |
msgstr ""
|
160 |
|
161 |
+
#: ../classes/class-ccf-field-renderer.php:959
|
162 |
+
#: ../classes/class-ccf-field-renderer.php:980
|
163 |
+
#: ../classes/class-ccf-form-manager.php:1275
|
164 |
+
#: ../classes/class-ccf-form-manager.php:1296
|
165 |
msgid "MM"
|
166 |
msgstr ""
|
167 |
|
168 |
+
#: ../classes/class-ccf-field-renderer.php:963
|
169 |
+
#: ../classes/class-ccf-field-renderer.php:984
|
170 |
+
#: ../classes/class-ccf-form-manager.php:1279
|
171 |
+
#: ../classes/class-ccf-form-manager.php:1300
|
172 |
msgid "AM"
|
173 |
msgstr ""
|
174 |
|
175 |
+
#: ../classes/class-ccf-field-renderer.php:964
|
176 |
+
#: ../classes/class-ccf-field-renderer.php:985
|
177 |
+
#: ../classes/class-ccf-form-manager.php:1280
|
178 |
+
#: ../classes/class-ccf-form-manager.php:1301
|
179 |
msgid "PM"
|
180 |
msgstr ""
|
181 |
|
182 |
+
#: ../classes/class-ccf-field-renderer.php:971
|
183 |
#: ../classes/class-ccf-form-cpt.php:513
|
184 |
+
#: ../classes/class-ccf-form-manager.php:430
|
185 |
+
#: ../classes/class-ccf-form-manager.php:443
|
186 |
+
#: ../classes/class-ccf-form-manager.php:1287
|
187 |
+
#: ../classes/class-ccf-form-manager.php:1470
|
188 |
+
#: ../classes/class-ccf-form-manager.php:1484
|
189 |
+
#: ../classes/class-ccf-form-manager.php:1622
|
190 |
msgid "Date"
|
191 |
msgstr ""
|
192 |
|
196 |
|
197 |
#: ../classes/class-ccf-form-cpt.php:329 ../classes/class-ccf-form-cpt.php:347
|
198 |
#: ../classes/class-ccf-form-cpt.php:511
|
199 |
+
#: ../classes/class-ccf-form-manager.php:433
|
200 |
+
#: ../classes/class-ccf-form-manager.php:446
|
201 |
msgid "Submissions"
|
202 |
msgstr ""
|
203 |
|
238 |
msgstr ""
|
239 |
|
240 |
#: ../classes/class-ccf-form-cpt.php:449
|
241 |
+
#: ../classes/class-ccf-form-manager.php:1412
|
242 |
msgid "(No title)"
|
243 |
msgstr ""
|
244 |
|
251 |
msgstr ""
|
252 |
|
253 |
#: ../classes/class-ccf-form-cpt.php:510
|
254 |
+
#: ../classes/class-ccf-form-manager.php:431
|
255 |
+
#: ../classes/class-ccf-form-manager.php:444
|
256 |
msgid "Author"
|
257 |
msgstr ""
|
258 |
|
259 |
#: ../classes/class-ccf-form-cpt.php:512
|
260 |
+
#: ../classes/class-ccf-form-manager.php:432
|
261 |
+
#: ../classes/class-ccf-form-manager.php:445
|
262 |
msgid "Number of Fields"
|
263 |
msgstr ""
|
264 |
|
435 |
msgid "AM/PM is required."
|
436 |
msgstr ""
|
437 |
|
438 |
+
#: ../classes/class-ccf-form-handler.php:715
|
439 |
msgid "*Hidden Field*"
|
440 |
msgstr ""
|
441 |
|
442 |
+
#: ../classes/class-ccf-form-handler.php:787
|
443 |
msgid "Form submitted from"
|
444 |
msgstr ""
|
445 |
|
446 |
+
#: ../classes/class-ccf-form-handler.php:796
|
447 |
msgid "Form submitter IP"
|
448 |
msgstr ""
|
449 |
|
450 |
+
#: ../classes/class-ccf-form-handler.php:849
|
451 |
#, php-format
|
452 |
msgid "%s: Form Submission"
|
453 |
msgstr ""
|
454 |
|
455 |
+
#: ../classes/class-ccf-form-handler.php:851
|
456 |
#, php-format
|
457 |
msgid " to \"%s\""
|
458 |
msgstr ""
|
459 |
|
460 |
+
#: ../classes/class-ccf-form-handler.php:907
|
461 |
#: ../classes/class-ccf-form-renderer.php:134
|
462 |
msgid "Thank you for your submission."
|
463 |
msgstr ""
|
495 |
msgid "Structure"
|
496 |
msgstr ""
|
497 |
|
498 |
+
#: ../classes/class-ccf-form-manager.php:124
|
499 |
+
msgid "Form Settings"
|
500 |
+
msgstr ""
|
501 |
+
|
502 |
+
#: ../classes/class-ccf-form-manager.php:130
|
503 |
msgid "← Drag fields from the left here."
|
504 |
msgstr ""
|
505 |
|
506 |
+
#: ../classes/class-ccf-form-manager.php:145
|
507 |
+
#: ../classes/class-ccf-form-manager.php:1415
|
508 |
msgid "Insert into post"
|
509 |
msgstr ""
|
510 |
|
511 |
+
#: ../classes/class-ccf-form-manager.php:146
|
512 |
msgid "Save Form"
|
513 |
msgstr ""
|
514 |
|
515 |
+
#: ../classes/class-ccf-form-manager.php:152
|
516 |
+
msgid "No notifications yet."
|
517 |
msgstr ""
|
518 |
|
519 |
+
#: ../classes/class-ccf-form-manager.php:152
|
520 |
+
msgid "Add one?"
|
521 |
msgstr ""
|
522 |
|
523 |
+
#: ../classes/class-ccf-form-manager.php:161
|
524 |
+
msgid "(Untitled)"
|
525 |
msgstr ""
|
526 |
|
527 |
+
#: ../classes/class-ccf-form-manager.php:165
|
528 |
+
#: ../classes/class-ccf-form-manager.php:1414
|
529 |
+
msgid "Edit"
|
530 |
msgstr ""
|
531 |
|
532 |
+
#: ../classes/class-ccf-form-manager.php:166
|
533 |
+
msgid "Delete"
|
534 |
msgstr ""
|
535 |
|
536 |
+
#: ../classes/class-ccf-form-manager.php:172
|
537 |
+
#: ../classes/class-ccf-form-manager.php:1718
|
538 |
+
msgid "Form Submission"
|
539 |
msgstr ""
|
540 |
|
541 |
+
#: ../classes/class-ccf-form-manager.php:174
|
542 |
+
msgid "to"
|
543 |
msgstr ""
|
544 |
|
545 |
+
#: ../classes/class-ccf-form-manager.php:179
|
546 |
+
msgid "Pulled from"
|
547 |
msgstr ""
|
548 |
|
549 |
+
#: ../classes/class-ccf-form-manager.php:184
|
550 |
+
msgid "No One"
|
551 |
msgstr ""
|
552 |
|
553 |
+
#: ../classes/class-ccf-form-manager.php:194
|
554 |
+
msgid "Field"
|
555 |
msgstr ""
|
556 |
|
557 |
+
#: ../classes/class-ccf-form-manager.php:212
|
558 |
+
msgid "Notification Title:"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
559 |
msgstr ""
|
560 |
|
561 |
+
#: ../classes/class-ccf-form-manager.php:216
|
562 |
+
msgid "Email content (HTML):"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
563 |
msgstr ""
|
564 |
|
565 |
+
#: ../classes/class-ccf-form-manager.php:218
|
566 |
+
msgid "Variables:"
|
567 |
+
msgstr ""
|
568 |
+
|
569 |
+
#: ../classes/class-ccf-form-manager.php:221
|
570 |
+
msgid "\"To\" Email Addresses:"
|
571 |
+
msgstr ""
|
572 |
+
|
573 |
+
#: ../classes/class-ccf-form-manager.php:227
|
574 |
+
msgid ""
|
575 |
+
"If you are not receiving email notifications, we highly recommend installing "
|
576 |
+
"the <a href=\"https://wordpress.org/plugins/easy-wp-smtp/\">WP Easy SMTP</a> "
|
577 |
+
"plugin as there is probably an issue with emailing on your host."
|
578 |
+
msgstr ""
|
579 |
+
|
580 |
+
#: ../classes/class-ccf-form-manager.php:231
|
581 |
+
msgid "Activate Notification:"
|
582 |
msgstr ""
|
583 |
|
584 |
+
#: ../classes/class-ccf-form-manager.php:234
|
585 |
+
#: ../classes/class-ccf-form-manager.php:364
|
586 |
+
#: ../classes/class-ccf-form-manager.php:484
|
587 |
+
#: ../classes/class-ccf-form-manager.php:534
|
588 |
+
#: ../classes/class-ccf-form-manager.php:610
|
589 |
+
#: ../classes/class-ccf-form-manager.php:700
|
590 |
+
#: ../classes/class-ccf-form-manager.php:765
|
591 |
+
#: ../classes/class-ccf-form-manager.php:807
|
592 |
+
#: ../classes/class-ccf-form-manager.php:877
|
593 |
+
#: ../classes/class-ccf-form-manager.php:924
|
594 |
+
#: ../classes/class-ccf-form-manager.php:966
|
595 |
+
#: ../classes/class-ccf-form-manager.php:973
|
596 |
+
#: ../classes/class-ccf-form-manager.php:1024
|
597 |
+
#: ../classes/class-ccf-form-manager.php:1067
|
598 |
+
#: ../classes/class-ccf-form-manager.php:1110
|
599 |
+
msgid "No"
|
600 |
msgstr ""
|
601 |
|
602 |
+
#: ../classes/class-ccf-form-manager.php:235
|
603 |
+
#: ../classes/class-ccf-form-manager.php:365
|
604 |
+
#: ../classes/class-ccf-form-manager.php:483
|
605 |
+
#: ../classes/class-ccf-form-manager.php:533
|
606 |
+
#: ../classes/class-ccf-form-manager.php:609
|
607 |
+
#: ../classes/class-ccf-form-manager.php:699
|
608 |
+
#: ../classes/class-ccf-form-manager.php:764
|
609 |
+
#: ../classes/class-ccf-form-manager.php:806
|
610 |
+
#: ../classes/class-ccf-form-manager.php:876
|
611 |
+
#: ../classes/class-ccf-form-manager.php:923
|
612 |
+
#: ../classes/class-ccf-form-manager.php:965
|
613 |
+
#: ../classes/class-ccf-form-manager.php:972
|
614 |
+
#: ../classes/class-ccf-form-manager.php:1023
|
615 |
+
#: ../classes/class-ccf-form-manager.php:1066
|
616 |
+
#: ../classes/class-ccf-form-manager.php:1109
|
617 |
+
msgid "Yes"
|
618 |
msgstr ""
|
619 |
|
620 |
+
#: ../classes/class-ccf-form-manager.php:238
|
621 |
+
msgid "Only active notifications will be sent."
|
622 |
msgstr ""
|
623 |
|
624 |
+
#: ../classes/class-ccf-form-manager.php:242
|
625 |
msgid "\"From\" Email Address Type:"
|
626 |
msgstr ""
|
627 |
|
628 |
+
#: ../classes/class-ccf-form-manager.php:244
|
629 |
msgid "WordPress Default"
|
630 |
msgstr ""
|
631 |
|
632 |
+
#: ../classes/class-ccf-form-manager.php:245
|
633 |
+
#: ../classes/class-ccf-form-manager.php:312
|
634 |
msgid "Custom Email"
|
635 |
msgstr ""
|
636 |
|
637 |
+
#: ../classes/class-ccf-form-manager.php:246
|
638 |
+
#: ../classes/class-ccf-form-manager.php:267
|
639 |
+
#: ../classes/class-ccf-form-manager.php:289
|
640 |
+
#: ../classes/class-ccf-form-manager.php:313
|
641 |
msgid "Form Field"
|
642 |
msgstr ""
|
643 |
|
644 |
+
#: ../classes/class-ccf-form-manager.php:249
|
645 |
msgid ""
|
646 |
"You can set the notification emails from address to be the WP default, a "
|
647 |
"custom email address, or pull the address from a field in the form."
|
648 |
msgstr ""
|
649 |
|
650 |
+
#: ../classes/class-ccf-form-manager.php:253
|
651 |
msgid "Custom \"From\" Email Address:"
|
652 |
msgstr ""
|
653 |
|
654 |
+
#: ../classes/class-ccf-form-manager.php:258
|
655 |
msgid "Pull \"From\" Email Dynamically from Field:"
|
656 |
msgstr ""
|
657 |
|
658 |
+
#: ../classes/class-ccf-form-manager.php:264
|
659 |
msgid "\"From\" Name Type:"
|
660 |
msgstr ""
|
661 |
|
662 |
+
#: ../classes/class-ccf-form-manager.php:266
|
663 |
msgid "Custom Name"
|
664 |
msgstr ""
|
665 |
|
666 |
+
#: ../classes/class-ccf-form-manager.php:270
|
667 |
msgid ""
|
668 |
"You can set the notification emails from name to be a custom name or pull "
|
669 |
"the name from a field in the form."
|
670 |
msgstr ""
|
671 |
|
672 |
+
#: ../classes/class-ccf-form-manager.php:274
|
673 |
msgid "Custom \"From\" Name:"
|
674 |
msgstr ""
|
675 |
|
676 |
+
#: ../classes/class-ccf-form-manager.php:279
|
677 |
msgid "Pull \"From\" Name Dynamically from Field:"
|
678 |
msgstr ""
|
679 |
|
680 |
+
#: ../classes/class-ccf-form-manager.php:285
|
681 |
msgid "Email Subject Type:"
|
682 |
msgstr ""
|
683 |
|
684 |
+
#: ../classes/class-ccf-form-manager.php:287
|
685 |
msgid "Default"
|
686 |
msgstr ""
|
687 |
|
688 |
+
#: ../classes/class-ccf-form-manager.php:288
|
689 |
msgid "Custom Subject"
|
690 |
msgstr ""
|
691 |
|
692 |
+
#: ../classes/class-ccf-form-manager.php:292
|
693 |
msgid ""
|
694 |
"You can set the notification emails subject line to be the CCF default, "
|
695 |
"custom text, or pull the subject from a field in the form."
|
696 |
msgstr ""
|
697 |
|
698 |
+
#: ../classes/class-ccf-form-manager.php:296
|
699 |
msgid "Custom Email Subject:"
|
700 |
msgstr ""
|
701 |
|
702 |
+
#: ../classes/class-ccf-form-manager.php:301
|
703 |
msgid "Pull Email Subject Dynamically from Field:"
|
704 |
msgstr ""
|
705 |
|
706 |
+
#: ../classes/class-ccf-form-manager.php:330
|
707 |
+
msgid "Form Title:"
|
708 |
msgstr ""
|
709 |
|
710 |
+
#: ../classes/class-ccf-form-manager.php:335
|
711 |
+
msgid "Form Description:"
|
712 |
+
msgstr ""
|
713 |
+
|
714 |
+
#: ../classes/class-ccf-form-manager.php:340
|
715 |
+
msgid "Button Text:"
|
716 |
+
msgstr ""
|
717 |
+
|
718 |
+
#: ../classes/class-ccf-form-manager.php:345
|
719 |
+
msgid "On form completion:"
|
720 |
+
msgstr ""
|
721 |
+
|
722 |
+
#: ../classes/class-ccf-form-manager.php:348
|
723 |
+
msgid "Show text"
|
724 |
msgstr ""
|
725 |
|
726 |
+
#: ../classes/class-ccf-form-manager.php:349
|
727 |
+
msgid "Redirect"
|
728 |
+
msgstr ""
|
729 |
+
|
730 |
+
#: ../classes/class-ccf-form-manager.php:353
|
731 |
+
msgid "Redirect URL:"
|
732 |
+
msgstr ""
|
733 |
+
|
734 |
+
#: ../classes/class-ccf-form-manager.php:357
|
735 |
+
msgid "Completion Message:"
|
736 |
+
msgstr ""
|
737 |
+
|
738 |
+
#: ../classes/class-ccf-form-manager.php:361
|
739 |
+
msgid "Pause form:"
|
740 |
+
msgstr ""
|
741 |
+
|
742 |
+
#: ../classes/class-ccf-form-manager.php:369
|
743 |
+
msgid "Pause Message:"
|
744 |
+
msgstr ""
|
745 |
+
|
746 |
+
#: ../classes/class-ccf-form-manager.php:373
|
747 |
+
msgid "Email Notifications"
|
748 |
+
msgstr ""
|
749 |
+
|
750 |
+
#: ../classes/class-ccf-form-manager.php:379
|
751 |
+
#: ../classes/class-ccf-form-manager.php:390
|
752 |
+
#: ../classes/class-ccf-form-manager.php:429
|
753 |
+
#: ../classes/class-ccf-form-manager.php:442
|
754 |
msgid "Title"
|
755 |
msgstr ""
|
756 |
|
757 |
+
#: ../classes/class-ccf-form-manager.php:380
|
758 |
+
#: ../classes/class-ccf-form-manager.php:391
|
759 |
+
msgid "Subject"
|
760 |
+
msgstr ""
|
761 |
+
|
762 |
+
#: ../classes/class-ccf-form-manager.php:381
|
763 |
+
#: ../classes/class-ccf-form-manager.php:392
|
764 |
+
msgid "To"
|
765 |
+
msgstr ""
|
766 |
+
|
767 |
+
#: ../classes/class-ccf-form-manager.php:382
|
768 |
+
#: ../classes/class-ccf-form-manager.php:393
|
769 |
+
msgid "Active"
|
770 |
+
msgstr ""
|
771 |
+
|
772 |
+
#: ../classes/class-ccf-form-manager.php:398
|
773 |
+
msgid "New Notification"
|
774 |
+
msgstr ""
|
775 |
+
|
776 |
+
#: ../classes/class-ccf-form-manager.php:401
|
777 |
+
msgid ""
|
778 |
+
"For notification changes to take affect (updating, adding, deleting, etc.), "
|
779 |
+
"you will need to save the form."
|
780 |
+
msgstr ""
|
781 |
+
|
782 |
+
#: ../classes/class-ccf-form-manager.php:413
|
783 |
+
msgid "items"
|
784 |
+
msgstr ""
|
785 |
+
|
786 |
+
#: ../classes/class-ccf-form-manager.php:428
|
787 |
+
#: ../classes/class-ccf-form-manager.php:441
|
788 |
+
msgid "ID"
|
789 |
+
msgstr ""
|
790 |
+
|
791 |
+
#: ../classes/class-ccf-form-manager.php:456
|
792 |
msgid "<span>←</span> Click on a field to edit it."
|
793 |
msgstr ""
|
794 |
|
795 |
+
#: ../classes/class-ccf-form-manager.php:465
|
796 |
+
#: ../classes/class-ccf-form-manager.php:509
|
797 |
+
#: ../classes/class-ccf-form-manager.php:591
|
798 |
+
#: ../classes/class-ccf-form-manager.php:681
|
799 |
msgid "Internal Unique Slug"
|
800 |
msgstr ""
|
801 |
|
802 |
+
#: ../classes/class-ccf-form-manager.php:469
|
803 |
+
#: ../classes/class-ccf-form-manager.php:513
|
804 |
+
#: ../classes/class-ccf-form-manager.php:556
|
805 |
+
#: ../classes/class-ccf-form-manager.php:595
|
806 |
+
#: ../classes/class-ccf-form-manager.php:685
|
807 |
+
#: ../classes/class-ccf-form-manager.php:754
|
808 |
+
#: ../classes/class-ccf-form-manager.php:790
|
809 |
+
#: ../classes/class-ccf-form-manager.php:855
|
810 |
+
#: ../classes/class-ccf-form-manager.php:906
|
811 |
+
#: ../classes/class-ccf-form-manager.php:949
|
812 |
+
#: ../classes/class-ccf-form-manager.php:1013
|
813 |
+
#: ../classes/class-ccf-form-manager.php:1056
|
814 |
+
#: ../classes/class-ccf-form-manager.php:1099
|
815 |
msgid "Label:"
|
816 |
msgstr ""
|
817 |
|
818 |
+
#: ../classes/class-ccf-form-manager.php:473
|
819 |
+
#: ../classes/class-ccf-form-manager.php:517
|
820 |
+
#: ../classes/class-ccf-form-manager.php:560
|
821 |
+
#: ../classes/class-ccf-form-manager.php:599
|
822 |
+
#: ../classes/class-ccf-form-manager.php:689
|
823 |
+
#: ../classes/class-ccf-form-manager.php:758
|
824 |
+
#: ../classes/class-ccf-form-manager.php:794
|
825 |
+
#: ../classes/class-ccf-form-manager.php:859
|
826 |
+
#: ../classes/class-ccf-form-manager.php:910
|
827 |
+
#: ../classes/class-ccf-form-manager.php:953
|
828 |
+
#: ../classes/class-ccf-form-manager.php:1017
|
829 |
+
#: ../classes/class-ccf-form-manager.php:1060
|
830 |
+
#: ../classes/class-ccf-form-manager.php:1103
|
831 |
msgid "Description:"
|
832 |
msgstr ""
|
833 |
|
834 |
+
#: ../classes/class-ccf-form-manager.php:477
|
835 |
+
#: ../classes/class-ccf-form-manager.php:603
|
836 |
+
#: ../classes/class-ccf-form-manager.php:693
|
837 |
+
#: ../classes/class-ccf-form-manager.php:729
|
838 |
+
#: ../classes/class-ccf-form-manager.php:799
|
839 |
+
#: ../classes/class-ccf-form-manager.php:863
|
840 |
+
#: ../classes/class-ccf-form-manager.php:958
|
841 |
msgid "Initial Value:"
|
842 |
msgstr ""
|
843 |
|
844 |
+
#: ../classes/class-ccf-form-manager.php:481
|
845 |
+
#: ../classes/class-ccf-form-manager.php:531
|
846 |
+
#: ../classes/class-ccf-form-manager.php:607
|
847 |
+
#: ../classes/class-ccf-form-manager.php:697
|
848 |
+
#: ../classes/class-ccf-form-manager.php:762
|
849 |
+
#: ../classes/class-ccf-form-manager.php:804
|
850 |
+
#: ../classes/class-ccf-form-manager.php:874
|
851 |
+
#: ../classes/class-ccf-form-manager.php:921
|
852 |
+
#: ../classes/class-ccf-form-manager.php:963
|
853 |
+
#: ../classes/class-ccf-form-manager.php:1021
|
854 |
+
#: ../classes/class-ccf-form-manager.php:1064
|
855 |
+
#: ../classes/class-ccf-form-manager.php:1107
|
856 |
msgid "Required:"
|
857 |
msgstr ""
|
858 |
|
859 |
+
#: ../classes/class-ccf-form-manager.php:490
|
860 |
+
#: ../classes/class-ccf-form-manager.php:540
|
861 |
+
#: ../classes/class-ccf-form-manager.php:576
|
862 |
+
#: ../classes/class-ccf-form-manager.php:616
|
863 |
+
#: ../classes/class-ccf-form-manager.php:641
|
864 |
+
#: ../classes/class-ccf-form-manager.php:666
|
865 |
+
#: ../classes/class-ccf-form-manager.php:706
|
866 |
+
#: ../classes/class-ccf-form-manager.php:735
|
867 |
+
#: ../classes/class-ccf-form-manager.php:771
|
868 |
+
#: ../classes/class-ccf-form-manager.php:830
|
869 |
+
#: ../classes/class-ccf-form-manager.php:883
|
870 |
+
#: ../classes/class-ccf-form-manager.php:930
|
871 |
+
#: ../classes/class-ccf-form-manager.php:979
|
872 |
+
#: ../classes/class-ccf-form-manager.php:1037
|
873 |
+
#: ../classes/class-ccf-form-manager.php:1080
|
874 |
+
#: ../classes/class-ccf-form-manager.php:1123
|
875 |
msgid "Advanced"
|
876 |
msgstr ""
|
877 |
|
878 |
+
#: ../classes/class-ccf-form-manager.php:493
|
879 |
+
#: ../classes/class-ccf-form-manager.php:543
|
880 |
+
#: ../classes/class-ccf-form-manager.php:579
|
881 |
+
#: ../classes/class-ccf-form-manager.php:619
|
882 |
+
#: ../classes/class-ccf-form-manager.php:644
|
883 |
+
#: ../classes/class-ccf-form-manager.php:669
|
884 |
+
#: ../classes/class-ccf-form-manager.php:709
|
885 |
+
#: ../classes/class-ccf-form-manager.php:738
|
886 |
+
#: ../classes/class-ccf-form-manager.php:774
|
887 |
+
#: ../classes/class-ccf-form-manager.php:833
|
888 |
+
#: ../classes/class-ccf-form-manager.php:886
|
889 |
+
#: ../classes/class-ccf-form-manager.php:933
|
890 |
+
#: ../classes/class-ccf-form-manager.php:982
|
891 |
+
#: ../classes/class-ccf-form-manager.php:1040
|
892 |
+
#: ../classes/class-ccf-form-manager.php:1083
|
893 |
+
#: ../classes/class-ccf-form-manager.php:1126
|
894 |
msgid "Class Name:"
|
895 |
msgstr ""
|
896 |
|
897 |
+
#: ../classes/class-ccf-form-manager.php:497
|
898 |
+
#: ../classes/class-ccf-form-manager.php:623
|
899 |
+
#: ../classes/class-ccf-form-manager.php:713
|
900 |
+
#: ../classes/class-ccf-form-manager.php:838
|
901 |
+
#: ../classes/class-ccf-form-manager.php:890
|
902 |
+
#: ../classes/class-ccf-form-manager.php:987
|
903 |
msgid "Placeholder Text:"
|
904 |
msgstr ""
|
905 |
|
906 |
+
#: ../classes/class-ccf-form-manager.php:521
|
907 |
msgid "Allowed File Extensions (comma separate):"
|
908 |
msgstr ""
|
909 |
|
910 |
+
#: ../classes/class-ccf-form-manager.php:523
|
911 |
msgid ""
|
912 |
"If left blank, will default to all extensions registered by WordPress. If "
|
913 |
"you use a file extension or mime type not <a href=\"http://codex.wordpress."
|
915 |
"a>, you will need to filter and manually whitelist the new extension."
|
916 |
msgstr ""
|
917 |
|
918 |
+
#: ../classes/class-ccf-form-manager.php:526
|
919 |
msgid "Max File Size (in MB):"
|
920 |
msgstr ""
|
921 |
|
922 |
+
#: ../classes/class-ccf-form-manager.php:528
|
923 |
#, php-format
|
924 |
msgid ""
|
925 |
"If left blank, will default to %d MB. Maximum allowed by server is %d MB."
|
926 |
msgstr ""
|
927 |
|
928 |
+
#: ../classes/class-ccf-form-manager.php:554
|
929 |
msgid ""
|
930 |
"reCAPTCHA is a simple captcha service provided by Google. <a target=\"_blank"
|
931 |
"\" href=\"https://www.google.com/recaptcha/intro/index.html\">Learn more</a>"
|
932 |
msgstr ""
|
933 |
|
934 |
+
#: ../classes/class-ccf-form-manager.php:564
|
935 |
msgid "Site Key:"
|
936 |
msgstr ""
|
937 |
|
938 |
+
#: ../classes/class-ccf-form-manager.php:566
|
939 |
+
#: ../classes/class-ccf-form-manager.php:571
|
940 |
msgid "Don't have one?"
|
941 |
msgstr ""
|
942 |
|
943 |
+
#: ../classes/class-ccf-form-manager.php:569
|
944 |
msgid "Secret Key:"
|
945 |
msgstr ""
|
946 |
|
947 |
+
#: ../classes/class-ccf-form-manager.php:632
|
948 |
+
#: ../classes/class-ccf-form-manager.php:653
|
949 |
+
#: ../classes/class-ccf-form-manager.php:678
|
950 |
+
#: ../classes/class-ccf-form-manager.php:722
|
951 |
+
#: ../classes/class-ccf-form-manager.php:747
|
952 |
+
#: ../classes/class-ccf-form-manager.php:783
|
953 |
+
#: ../classes/class-ccf-form-manager.php:848
|
954 |
+
#: ../classes/class-ccf-form-manager.php:899
|
955 |
+
#: ../classes/class-ccf-form-manager.php:942
|
956 |
+
#: ../classes/class-ccf-form-manager.php:1006
|
957 |
+
#: ../classes/class-ccf-form-manager.php:1049
|
958 |
+
#: ../classes/class-ccf-form-manager.php:1092
|
959 |
msgid "Basic"
|
960 |
msgstr ""
|
961 |
|
962 |
+
#: ../classes/class-ccf-form-manager.php:635
|
963 |
msgid "HTML Content:"
|
964 |
msgstr ""
|
965 |
|
966 |
+
#: ../classes/class-ccf-form-manager.php:656
|
967 |
msgid "Heading:"
|
968 |
msgstr ""
|
969 |
|
970 |
+
#: ../classes/class-ccf-form-manager.php:660
|
971 |
msgid "Sub Heading:"
|
972 |
msgstr ""
|
973 |
|
974 |
+
#: ../classes/class-ccf-form-manager.php:725
|
975 |
+
#: ../classes/class-ccf-form-manager.php:750
|
976 |
+
#: ../classes/class-ccf-form-manager.php:786
|
977 |
+
#: ../classes/class-ccf-form-manager.php:851
|
978 |
+
#: ../classes/class-ccf-form-manager.php:902
|
979 |
+
#: ../classes/class-ccf-form-manager.php:945
|
980 |
+
#: ../classes/class-ccf-form-manager.php:1009
|
981 |
+
#: ../classes/class-ccf-form-manager.php:1052
|
982 |
+
#: ../classes/class-ccf-form-manager.php:1095
|
983 |
msgid "Internal Unique Slug (a-z, 0-9, -, _):"
|
984 |
msgstr ""
|
985 |
|
986 |
+
#: ../classes/class-ccf-form-manager.php:812
|
987 |
msgid "Enable Date Select"
|
988 |
msgstr ""
|
989 |
|
990 |
+
#: ../classes/class-ccf-form-manager.php:816
|
991 |
msgid "Enable Time Select"
|
992 |
msgstr ""
|
993 |
|
994 |
+
#: ../classes/class-ccf-form-manager.php:820
|
995 |
+
msgid "Date Format:"
|
996 |
+
msgstr ""
|
997 |
+
|
998 |
+
#: ../classes/class-ccf-form-manager.php:867
|
999 |
msgid "Format:"
|
1000 |
msgstr ""
|
1001 |
|
1002 |
+
#: ../classes/class-ccf-form-manager.php:870
|
1003 |
+
#: ../classes/class-ccf-form-manager.php:917
|
1004 |
msgid "International"
|
1005 |
msgstr ""
|
1006 |
|
1007 |
+
#: ../classes/class-ccf-form-manager.php:914
|
1008 |
msgid "Type:"
|
1009 |
msgstr ""
|
1010 |
|
1011 |
+
#: ../classes/class-ccf-form-manager.php:916
|
1012 |
msgid "United States"
|
1013 |
msgstr ""
|
1014 |
|
1015 |
+
#: ../classes/class-ccf-form-manager.php:970
|
1016 |
msgid "Require Confirmation:"
|
1017 |
msgstr ""
|
1018 |
|
1019 |
+
#: ../classes/class-ccf-form-manager.php:998
|
1020 |
msgid "Label"
|
1021 |
msgstr ""
|
1022 |
|
1023 |
+
#: ../classes/class-ccf-form-manager.php:999
|
1024 |
msgid "Value"
|
1025 |
msgstr ""
|
1026 |
|
1027 |
+
#: ../classes/class-ccf-form-manager.php:1028
|
1028 |
+
#: ../classes/class-ccf-form-manager.php:1071
|
1029 |
+
#: ../classes/class-ccf-form-manager.php:1114
|
1030 |
msgid "Manage field choices:"
|
1031 |
msgstr ""
|
1032 |
|
1033 |
+
#: ../classes/class-ccf-form-manager.php:1032
|
1034 |
+
#: ../classes/class-ccf-form-manager.php:1075
|
1035 |
+
#: ../classes/class-ccf-form-manager.php:1118
|
1036 |
msgid ""
|
1037 |
"Note: If an option does not have a \"value\", it will not be considered a "
|
1038 |
"valid selection if the field is required. The \"value\" is what's read, "
|
1039 |
"stored, and displayed in the submission."
|
1040 |
msgstr ""
|
1041 |
|
1042 |
+
#: ../classes/class-ccf-form-manager.php:1135
|
1043 |
msgid "You currently have no forms. Add some!"
|
1044 |
msgstr ""
|
1045 |
|
1046 |
+
#: ../classes/class-ccf-form-manager.php:1158
|
1047 |
msgid "Allowed file extensions are {{ extensions }}. "
|
1048 |
msgstr ""
|
1049 |
|
1050 |
+
#: ../classes/class-ccf-form-manager.php:1160
|
1051 |
msgid "Max file size is {{ file_size }} MB. "
|
1052 |
msgstr ""
|
1053 |
|
1054 |
+
#: ../classes/class-ccf-form-manager.php:1185
|
1055 |
+
#: ../classes/class-ccf-form-manager.php:1201
|
1056 |
+
#: ../classes/class-ccf-form-manager.php:1219
|
1057 |
msgid "An example choice"
|
1058 |
msgstr ""
|
1059 |
|
1060 |
+
#: ../classes/class-ccf-form-manager.php:1237
|
1061 |
msgid "Arbitrary block of HTML."
|
1062 |
msgstr ""
|
1063 |
|
1064 |
+
#: ../classes/class-ccf-form-manager.php:1243
|
1065 |
msgid "Section Heading"
|
1066 |
msgstr ""
|
1067 |
|
1068 |
+
#: ../classes/class-ccf-form-manager.php:1245
|
1069 |
msgid "This is the sub-heading text."
|
1070 |
msgstr ""
|
1071 |
|
1072 |
+
#: ../classes/class-ccf-form-manager.php:1416
|
|
|
|
|
|
|
|
|
1073 |
msgid "Trash"
|
1074 |
msgstr ""
|
1075 |
|
1076 |
+
#: ../classes/class-ccf-form-manager.php:1459
|
1077 |
msgid "There is a problem with this form. Is it trashed or deleted?"
|
1078 |
msgstr ""
|
1079 |
|
1080 |
+
#: ../classes/class-ccf-form-manager.php:1601
|
1081 |
msgid "IP Address"
|
1082 |
msgstr ""
|
1083 |
|
1084 |
+
#: ../classes/class-ccf-form-manager.php:1613
|
1085 |
msgid "There are no submissions."
|
1086 |
msgstr ""
|
1087 |
|
1088 |
+
#: ../classes/class-ccf-form-manager.php:1642
|
1089 |
msgid "Add Form"
|
1090 |
msgstr ""
|
1091 |
|
1092 |
+
#: ../classes/class-ccf-form-manager.php:1667
|
1093 |
msgid "Single Line Text"
|
1094 |
msgstr ""
|
1095 |
|
1096 |
+
#: ../classes/class-ccf-form-manager.php:1668
|
1097 |
msgid "Dropdown"
|
1098 |
msgstr ""
|
1099 |
|
1100 |
+
#: ../classes/class-ccf-form-manager.php:1669
|
1101 |
msgid "Checkboxes"
|
1102 |
msgstr ""
|
1103 |
|
1104 |
+
#: ../classes/class-ccf-form-manager.php:1670
|
1105 |
msgid "Radio Buttons"
|
1106 |
msgstr ""
|
1107 |
|
1108 |
+
#: ../classes/class-ccf-form-manager.php:1671
|
1109 |
msgid "Paragraph Text"
|
1110 |
msgstr ""
|
1111 |
|
1112 |
+
#: ../classes/class-ccf-form-manager.php:1672
|
1113 |
msgid "Hidden"
|
1114 |
msgstr ""
|
1115 |
|
1116 |
+
#: ../classes/class-ccf-form-manager.php:1673
|
1117 |
msgid "File Upload"
|
1118 |
msgstr ""
|
1119 |
|
1120 |
+
#: ../classes/class-ccf-form-manager.php:1677
|
1121 |
msgid "HTML"
|
1122 |
msgstr ""
|
1123 |
|
1124 |
+
#: ../classes/class-ccf-form-manager.php:1678
|
1125 |
msgid "Section Header"
|
1126 |
msgstr ""
|
1127 |
|
1128 |
+
#: ../classes/class-ccf-form-manager.php:1683
|
1129 |
msgid "Name"
|
1130 |
msgstr ""
|
1131 |
|
1132 |
+
#: ../classes/class-ccf-form-manager.php:1684
|
1133 |
msgid "Date/Time"
|
1134 |
msgstr ""
|
1135 |
|
1136 |
+
#: ../classes/class-ccf-form-manager.php:1685
|
1137 |
msgid "Website"
|
1138 |
msgstr ""
|
1139 |
|
1140 |
+
#: ../classes/class-ccf-form-manager.php:1686
|
1141 |
msgid "Address"
|
1142 |
msgstr ""
|
1143 |
|
1144 |
+
#: ../classes/class-ccf-form-manager.php:1687
|
1145 |
msgid "Phone"
|
1146 |
msgstr ""
|
1147 |
|
1148 |
+
#: ../classes/class-ccf-form-manager.php:1688
|
1149 |
msgid "reCAPTCHA"
|
1150 |
msgstr ""
|
1151 |
|
1152 |
+
#: ../classes/class-ccf-form-manager.php:1712
|
1153 |
msgid "You have no email fields"
|
1154 |
msgstr ""
|
1155 |
|
1156 |
+
#: ../classes/class-ccf-form-manager.php:1713
|
1157 |
msgid "You have no name fields"
|
1158 |
msgstr ""
|
1159 |
|
1160 |
+
#: ../classes/class-ccf-form-manager.php:1714
|
1161 |
msgid "You have no applicable fields"
|
1162 |
msgstr ""
|
1163 |
|
1164 |
+
#: ../classes/class-ccf-form-manager.php:1715
|
1165 |
msgid "Invalid date"
|
1166 |
msgstr ""
|
1167 |
|
1168 |
+
#: ../classes/class-ccf-form-manager.php:1717
|
1169 |
msgid "Field Label"
|
1170 |
msgstr ""
|
1171 |
|
1172 |
+
#: ../classes/class-ccf-form-manager.php:1719
|
|
|
|
|
|
|
|
|
1173 |
#: ../classes/class-ccf-form-renderer.php:120
|
1174 |
msgid "This form is paused right now. Check back later!"
|
1175 |
msgstr ""
|
1283 |
msgid "The specified namespace could not be found."
|
1284 |
msgstr ""
|
1285 |
|
|
|
1286 |
#: ../wp-api/core/wp-includes/rest-api/rest-functions.php:327
|
1287 |
#, php-format
|
1288 |
msgid "%1$s (since %2$s; use %3$s instead)"
|
1289 |
msgstr ""
|
1290 |
|
|
|
1291 |
#: ../wp-api/core/wp-includes/rest-api/rest-functions.php:330
|
1292 |
#: ../wp-api/core/wp-includes/rest-api/rest-functions.php:351
|
1293 |
#, php-format
|
1294 |
msgid "%1$s (since %2$s; no alternative available)"
|
1295 |
msgstr ""
|
1296 |
|
|
|
1297 |
#: ../wp-api/core/wp-includes/rest-api/rest-functions.php:348
|
1298 |
#, php-format
|
1299 |
msgid "%1$s (since %2$s; %3$s)"
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
|
|
4 |
Tags: contact form, web form, custom contact form, custom forms, captcha form, contact fields, form mailers, forms
|
5 |
Requires at least: 3.9
|
6 |
Tested up to: 4.5
|
7 |
-
Stable tag: 7.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -37,6 +37,11 @@ For questions, feature requests, and support concerning the Custom Contact Forms
|
|
37 |
|
38 |
== Changelog ==
|
39 |
|
|
|
|
|
|
|
|
|
|
|
40 |
= 7.0.3 =
|
41 |
* Unhack API
|
42 |
* Use site_url() for API endpoints
|
4 |
Tags: contact form, web form, custom contact form, custom forms, captcha form, contact fields, form mailers, forms
|
5 |
Requires at least: 3.9
|
6 |
Tested up to: 4.5
|
7 |
+
Stable tag: 7.1
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
37 |
|
38 |
== Changelog ==
|
39 |
|
40 |
+
= 7.1.0 =
|
41 |
+
* Enable non-American date formats
|
42 |
+
* Make submissions and forms private so they don't show in sitemaps
|
43 |
+
* Redo form email notifications and settings UI
|
44 |
+
|
45 |
= 7.0.3 =
|
46 |
* Unhack API
|
47 |
* Use site_url() for API endpoints
|