Version Description
- Add form notifications tab
- Make from address for email notifications configurable
- Properly check if SCRIPT_DEBUG is defined
- Fix dropdown preview bug
- Properly notify user of duplicate slugs
Download this release
Release Info
Developer | tlovett1 |
Plugin | Custom Contact Forms |
Version | 6.3 |
Comparing to | |
See all releases |
Code changes from version 6.2.3 to 6.3
- README.md +6 -0
- build/css/form-manager.css +8 -1
- build/css/form-manager.css.map +1 -1
- build/css/form-manager.min.css +1 -1
- build/js/form-manager.js +139 -21
- build/js/form-manager.min.js +2 -2
- classes/class-ccf-api.php +27 -0
- classes/class-ccf-form-cpt.php +1 -1
- classes/class-ccf-form-handler.php +30 -2
- classes/class-ccf-form-manager.php +43 -6
- classes/class-ccf-form-renderer.php +1 -1
- custom-contact-forms.php +1 -1
- js/manager/models.js +4 -1
- js/manager/views.js +135 -20
- languages/custom-contact-forms.mo +0 -0
- languages/custom-contact-forms.po +284 -246
- readme.txt +9 -1
- scss/form-manager.scss +11 -0
README.md
CHANGED
@@ -101,6 +101,12 @@ are internal, and labels are visible to the end form user. If a choice does not
|
|
101 |
|
102 |
* __Format__ - Allows you to prompt the user for a United States or international phone number.
|
103 |
|
|
|
|
|
|
|
|
|
|
|
|
|
104 |
##### Structure Fields
|
105 |
|
106 |
* `HTML` - An easy way to insert arbitrary HTML into the middle of a form.
|
101 |
|
102 |
* __Format__ - Allows you to prompt the user for a United States or international phone number.
|
103 |
|
104 |
+
* `reCAPTCHA` - A Captcha field using Google's free reCAPTCHA technology. You will need to
|
105 |
+
[sign up](https://www.google.com/recaptcha) for reCAPTCHA before this field will work.
|
106 |
+
|
107 |
+
* __Site Key__ - Your Google reCAPTCHA site key.
|
108 |
+
* __Secret Key__ - Your Google reCATPCHA secret key.
|
109 |
+
|
110 |
##### Structure Fields
|
111 |
|
112 |
* `HTML` - An easy way to insert arbitrary HTML into the middle of a form.
|
build/css/form-manager.css
CHANGED
@@ -279,6 +279,9 @@
|
|
279 |
padding: 5px; }
|
280 |
.ccf-main-modal .ccf-form-pane .left-sidebar .fields .field .right, .ccf-main-modal .ccf-form-pane .left-sidebar .fields .field .preview, .ccf-main-modal .ccf-form-pane .left-sidebar .structure-fields .field .right, .ccf-main-modal .ccf-form-pane .left-sidebar .structure-fields .field .preview, .ccf-main-modal .ccf-form-pane .left-sidebar .special-fields .field .right, .ccf-main-modal .ccf-form-pane .left-sidebar .special-fields .field .preview {
|
281 |
display: none; }
|
|
|
|
|
|
|
282 |
.ccf-main-modal .ccf-form-pane .form-content {
|
283 |
box-sizing: border-box;
|
284 |
position: absolute;
|
@@ -319,7 +322,11 @@
|
|
319 |
.ccf-main-modal .ccf-form-pane .right-sidebar label .required {
|
320 |
color: red; }
|
321 |
.ccf-main-modal .ccf-form-pane .right-sidebar .field-error input {
|
322 |
-
border-color: #ff0000;
|
|
|
|
|
|
|
|
|
323 |
.ccf-main-modal .ccf-form-pane .right-sidebar input[type=text] {
|
324 |
width: 100%;
|
325 |
display: block;
|
279 |
padding: 5px; }
|
280 |
.ccf-main-modal .ccf-form-pane .left-sidebar .fields .field .right, .ccf-main-modal .ccf-form-pane .left-sidebar .fields .field .preview, .ccf-main-modal .ccf-form-pane .left-sidebar .structure-fields .field .right, .ccf-main-modal .ccf-form-pane .left-sidebar .structure-fields .field .preview, .ccf-main-modal .ccf-form-pane .left-sidebar .special-fields .field .right, .ccf-main-modal .ccf-form-pane .left-sidebar .special-fields .field .preview {
|
281 |
display: none; }
|
282 |
+
.ccf-main-modal .ccf-form-pane .left-sidebar .explain {
|
283 |
+
margin-top: 5px;
|
284 |
+
font-style: italic; }
|
285 |
.ccf-main-modal .ccf-form-pane .form-content {
|
286 |
box-sizing: border-box;
|
287 |
position: absolute;
|
322 |
.ccf-main-modal .ccf-form-pane .right-sidebar label .required {
|
323 |
color: red; }
|
324 |
.ccf-main-modal .ccf-form-pane .right-sidebar .field-error input {
|
325 |
+
border-color: #ff0000;
|
326 |
+
border-width: 2px; }
|
327 |
+
.ccf-main-modal .ccf-form-pane .right-sidebar .field-duplicate-slug input {
|
328 |
+
border-color: #ffe6a5;
|
329 |
+
border-width: 2px; }
|
330 |
.ccf-main-modal .ccf-form-pane .right-sidebar input[type=text] {
|
331 |
width: 100%;
|
332 |
display: block;
|
build/css/form-manager.css.map
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
{
|
2 |
"version": 3,
|
3 |
-
"mappings": "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
|
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}.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 .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;position:absolute;text-align:right;line-height:50px;border-top:1px solid #e5e5e5}.ccf-main-modal .ccf-form-pane .bottom .spinner{display:none;float:right;width:16px;height:16px;margin-top:16px}.ccf-main-modal .ccf-form-pane .bottom input{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 h2{cursor:pointer;padding:10px 20px;border-bottom:1px solid #e5e5e5;font-size:150%;background-color:#fafafa;margin:0}.ccf-main-modal .ccf-form-pane .accordion-section h2: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 .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 .no-fields{font-size:22px;padding:16px;font-style:italic}.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}.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}.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}
|
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}.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 .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;position:absolute;text-align:right;line-height:50px;border-top:1px solid #e5e5e5}.ccf-main-modal .ccf-form-pane .bottom .spinner{display:none;float:right;width:16px;height:16px;margin-top:16px}.ccf-main-modal .ccf-form-pane .bottom input{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 h2{cursor:pointer;padding:10px 20px;border-bottom:1px solid #e5e5e5;font-size:150%;background-color:#fafafa;margin:0}.ccf-main-modal .ccf-form-pane .accordion-section h2: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 .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 .left-sidebar .explain{margin-top:5px;font-style:italic}.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 .no-fields{font-size:22px;padding:16px;font-style:italic}.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}.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}
|
build/js/form-manager.js
CHANGED
@@ -300,7 +300,10 @@
|
|
300 |
completionRedirectUrl: '',
|
301 |
completionMessage: '',
|
302 |
sendEmailNotifications: false,
|
303 |
-
emailNotificationAddresses: ccfSettings.adminEmail
|
|
|
|
|
|
|
304 |
};
|
305 |
|
306 |
defaults = _.defaults( defaults, this.constructor.__super__.defaults );
|
@@ -899,16 +902,33 @@
|
|
899 |
},
|
900 |
|
901 |
checkSlug: function() {
|
902 |
-
var slugSelection = this.el.querySelectorAll( '.field-slug'
|
903 |
|
904 |
if ( slugSelection.length > 0 ) {
|
905 |
var slug = slugSelection[0];
|
|
|
906 |
|
907 |
if ( slug.value && ! slug.value.match( /^[a-zA-Z0-9\-_]+$/ ) ) {
|
908 |
slug.parentNode.className = slug.parentNode.className.replace( / field-error/i, '' ) + ' field-error';
|
909 |
} else {
|
910 |
slug.parentNode.className = slug.parentNode.className.replace( / field-error/i, '' );
|
911 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
912 |
}
|
913 |
|
914 |
},
|
@@ -1213,6 +1233,8 @@
|
|
1213 |
|
1214 |
SELF.el.innerHTML = SELF.template( { field: SELF.model.toJSON() } );
|
1215 |
|
|
|
|
|
1216 |
var choicesCollection = SELF.model.get( 'choices' );
|
1217 |
|
1218 |
var choices = this.el.querySelectorAll( '.repeatable-choices' )[0];
|
@@ -1322,7 +1344,7 @@
|
|
1322 |
}
|
1323 |
}
|
1324 |
|
1325 |
-
this.currentFieldView = new wp.ccf.views.Fields[type]( { model: field } );
|
1326 |
|
1327 |
this.currentFieldView.render();
|
1328 |
|
@@ -1492,18 +1514,6 @@
|
|
1492 |
}
|
1493 |
},
|
1494 |
|
1495 |
-
toggleNotificationFields: function() {
|
1496 |
-
var sendEmailNotifications = this.el.querySelectorAll( '.form-send-email-notifications' )[0].value;
|
1497 |
-
|
1498 |
-
var emailNotificationAddresses = this.el.querySelectorAll( '.email-notification-addresses' )[0];
|
1499 |
-
|
1500 |
-
if ( parseInt( sendEmailNotifications ) ) {
|
1501 |
-
emailNotificationAddresses.style.display = 'block';
|
1502 |
-
} else {
|
1503 |
-
emailNotificationAddresses.style.display = 'none';
|
1504 |
-
}
|
1505 |
-
},
|
1506 |
-
|
1507 |
save: function( $promise ) {
|
1508 |
var SELF = this;
|
1509 |
|
@@ -1530,30 +1540,135 @@
|
|
1530 |
var completionActionType = this.el.querySelectorAll( '.form-completion-action-type' )[0].value;
|
1531 |
this.model.set( 'completionActionType', completionActionType );
|
1532 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1533 |
var sendEmailNotifications = this.el.querySelectorAll( '.form-send-email-notifications' )[0].value;
|
1534 |
this.model.set( 'sendEmailNotifications', ( parseInt( sendEmailNotifications ) ) ? true : false );
|
1535 |
|
1536 |
var emailNotificationAddresses = this.el.querySelectorAll( '.form-email-notification-addresses' )[0].value;
|
1537 |
this.model.set( 'emailNotificationAddresses', emailNotificationAddresses );
|
1538 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1539 |
if ( typeof $promise !== 'undefined' && typeof $promise.promise !== 'undefined' ) {
|
1540 |
$promise.resolve();
|
1541 |
}
|
1542 |
},
|
1543 |
|
1544 |
render: function() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1545 |
var context = {
|
1546 |
-
form: this.model.toJSON()
|
|
|
1547 |
};
|
1548 |
|
1549 |
this.el.innerHTML = this.template( context );
|
1550 |
|
1551 |
-
this.toggleCompletionFields();
|
1552 |
-
|
1553 |
this.toggleNotificationFields();
|
1554 |
|
1555 |
-
wp.ccf.dispatcher.on( '
|
1556 |
wp.ccf.dispatcher.on( 'mainViewChange', this.save, this );
|
|
|
|
|
1557 |
|
1558 |
return this;
|
1559 |
}
|
@@ -1565,7 +1680,8 @@
|
|
1565 |
template: _.template( document.getElementById( 'ccf-form-pane-template' ).innerHTML ),
|
1566 |
subViews: {
|
1567 |
'field-sidebar': wp.ccf.views.FieldSidebar,
|
1568 |
-
'form-settings': wp.ccf.views.FormSettings
|
|
|
1569 |
},
|
1570 |
|
1571 |
events: {
|
@@ -1625,11 +1741,13 @@
|
|
1625 |
|
1626 |
var $settings = $.Deferred();
|
1627 |
var $field = $.Deferred();
|
|
|
1628 |
|
1629 |
wp.ccf.dispatcher.trigger( 'saveFormSettings', $settings );
|
|
|
1630 |
wp.ccf.dispatcher.trigger( 'saveField', $field );
|
1631 |
|
1632 |
-
$.when( $settings, $field ).then( function() {
|
1633 |
var fields = SELF.model.get( 'fields' );
|
1634 |
var allReqsMet = true;
|
1635 |
var slugs = {};
|
300 |
completionRedirectUrl: '',
|
301 |
completionMessage: '',
|
302 |
sendEmailNotifications: false,
|
303 |
+
emailNotificationAddresses: ccfSettings.adminEmail,
|
304 |
+
emailNotificationFromType: 'default',
|
305 |
+
emailNotificationFromAddress: '',
|
306 |
+
emailNotificationFromField: ''
|
307 |
};
|
308 |
|
309 |
defaults = _.defaults( defaults, this.constructor.__super__.defaults );
|
902 |
},
|
903 |
|
904 |
checkSlug: function() {
|
905 |
+
var slugSelection = this.el.querySelectorAll( '.field-slug');
|
906 |
|
907 |
if ( slugSelection.length > 0 ) {
|
908 |
var slug = slugSelection[0];
|
909 |
+
var duplicate = false;
|
910 |
|
911 |
if ( slug.value && ! slug.value.match( /^[a-zA-Z0-9\-_]+$/ ) ) {
|
912 |
slug.parentNode.className = slug.parentNode.className.replace( / field-error/i, '' ) + ' field-error';
|
913 |
} else {
|
914 |
slug.parentNode.className = slug.parentNode.className.replace( / field-error/i, '' );
|
915 |
}
|
916 |
+
|
917 |
+
if ( this.collection.length > 0 && '' !== slug.value ) {
|
918 |
+
this.collection.each( function( field ) {
|
919 |
+
if ( field !== this.model && slug.value === field.get( 'slug' ) ) {
|
920 |
+
duplicate = true;
|
921 |
+
}
|
922 |
+
}, this );
|
923 |
+
|
924 |
+
if ( duplicate ) {
|
925 |
+
slug.parentNode.className = slug.parentNode.className.replace( / field-duplicate-slug/i, '' ) + ' field-duplicate-slug';
|
926 |
+
} else {
|
927 |
+
slug.parentNode.className = slug.parentNode.className.replace( / field-duplicate-slug/i, '' );
|
928 |
+
}
|
929 |
+
} else {
|
930 |
+
slug.parentNode.className = slug.parentNode.className.replace( / field-duplicate-slug/i, '' );
|
931 |
+
}
|
932 |
}
|
933 |
|
934 |
},
|
1233 |
|
1234 |
SELF.el.innerHTML = SELF.template( { field: SELF.model.toJSON() } );
|
1235 |
|
1236 |
+
SELF.checkSlug();
|
1237 |
+
|
1238 |
var choicesCollection = SELF.model.get( 'choices' );
|
1239 |
|
1240 |
var choices = this.el.querySelectorAll( '.repeatable-choices' )[0];
|
1344 |
}
|
1345 |
}
|
1346 |
|
1347 |
+
this.currentFieldView = new wp.ccf.views.Fields[type]( { model: field, collection: this.form.get( 'fields' ) } );
|
1348 |
|
1349 |
this.currentFieldView.render();
|
1350 |
|
1514 |
}
|
1515 |
},
|
1516 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1517 |
save: function( $promise ) {
|
1518 |
var SELF = this;
|
1519 |
|
1540 |
var completionActionType = this.el.querySelectorAll( '.form-completion-action-type' )[0].value;
|
1541 |
this.model.set( 'completionActionType', completionActionType );
|
1542 |
|
1543 |
+
if ( typeof $promise !== 'undefined' && typeof $promise.promise !== 'undefined' ) {
|
1544 |
+
$promise.resolve();
|
1545 |
+
}
|
1546 |
+
},
|
1547 |
+
|
1548 |
+
render: function() {
|
1549 |
+
var context = {
|
1550 |
+
form: this.model.toJSON()
|
1551 |
+
};
|
1552 |
+
|
1553 |
+
this.el.innerHTML = this.template( context );
|
1554 |
+
|
1555 |
+
this.toggleCompletionFields();
|
1556 |
+
|
1557 |
+
wp.ccf.dispatcher.on( 'saveFormSettings', this.save, this );
|
1558 |
+
wp.ccf.dispatcher.on( 'mainViewChange', this.save, this );
|
1559 |
+
|
1560 |
+
return this;
|
1561 |
+
}
|
1562 |
+
}
|
1563 |
+
);
|
1564 |
+
|
1565 |
+
wp.ccf.views.FormNotifications = wp.ccf.views.FormNotifications || Backbone.View.extend(
|
1566 |
+
{
|
1567 |
+
template: _.template( document.getElementById( 'ccf-form-notifications-template' ).innerHTML ),
|
1568 |
+
|
1569 |
+
events: {
|
1570 |
+
'blur input': 'save',
|
1571 |
+
'change select': 'save',
|
1572 |
+
'change select.form-send-email-notifications': 'toggleNotificationFields',
|
1573 |
+
'change select.form-email-notification-from-type': 'toggleNotificationFields'
|
1574 |
+
},
|
1575 |
+
|
1576 |
+
initialize: function( options ) {
|
1577 |
+
this.model = options.form;
|
1578 |
+
},
|
1579 |
+
|
1580 |
+
destroy: function() {
|
1581 |
+
wp.ccf.dispatcher.off( 'saveFormSettings', this.save );
|
1582 |
+
wp.ccf.dispatcher.off( 'mainViewChange', this.save );
|
1583 |
+
},
|
1584 |
+
|
1585 |
+
toggleNotificationFields: function() {
|
1586 |
+
var i;
|
1587 |
+
|
1588 |
+
var sendEmailNotifications = this.el.querySelectorAll( '.form-send-email-notifications' )[0].value;
|
1589 |
+
|
1590 |
+
var emailNotificationSettings = this.el.querySelectorAll( '.email-notification-setting' );
|
1591 |
+
|
1592 |
+
var emailNotificationFromAddress = this.el.querySelectorAll( '.email-notification-from-address' )[0];
|
1593 |
+
|
1594 |
+
var emailNotificationFromField = this.el.querySelectorAll( '.email-notification-from-field' )[0];
|
1595 |
+
|
1596 |
+
var emailNotificationFromType = this.el.querySelectorAll( '.form-email-notification-from-type' )[0];
|
1597 |
+
|
1598 |
+
if ( parseInt( sendEmailNotifications ) ) {
|
1599 |
+
for ( i = 0; i < emailNotificationSettings; i++ ) {
|
1600 |
+
emailNotificationAddresses.style.display = 'block';
|
1601 |
+
}
|
1602 |
+
|
1603 |
+
emailNotificationFromAddress.style.display = 'none';
|
1604 |
+
emailNotificationFromField.style.display = 'none';
|
1605 |
+
|
1606 |
+
if ( 'custom' === emailNotificationFromType.value ) {
|
1607 |
+
emailNotificationFromAddress.style.display = 'block';
|
1608 |
+
} else if ( 'field' === emailNotificationFromType.value ) {
|
1609 |
+
emailNotificationFromField.style.display = 'block';
|
1610 |
+
}
|
1611 |
+
} else {
|
1612 |
+
for ( i = 0; i < emailNotificationSettings; i++ ) {
|
1613 |
+
emailNotificationAddresses.style.display = 'none';
|
1614 |
+
}
|
1615 |
+
|
1616 |
+
emailNotificationFromAddress.style.display = 'none';
|
1617 |
+
emailNotificationFromField.style.display = 'none';
|
1618 |
+
}
|
1619 |
+
},
|
1620 |
+
|
1621 |
+
save: function( $promise ) {
|
1622 |
+
var SELF = this;
|
1623 |
+
|
1624 |
+
if ( this.el.innerHTML === '' ) {
|
1625 |
+
// @todo: for some reason this is needed for IE8
|
1626 |
+
return;
|
1627 |
+
}
|
1628 |
+
|
1629 |
var sendEmailNotifications = this.el.querySelectorAll( '.form-send-email-notifications' )[0].value;
|
1630 |
this.model.set( 'sendEmailNotifications', ( parseInt( sendEmailNotifications ) ) ? true : false );
|
1631 |
|
1632 |
var emailNotificationAddresses = this.el.querySelectorAll( '.form-email-notification-addresses' )[0].value;
|
1633 |
this.model.set( 'emailNotificationAddresses', emailNotificationAddresses );
|
1634 |
|
1635 |
+
var emailNotificationFromType = this.el.querySelectorAll( '.form-email-notification-from-type' )[0].value;
|
1636 |
+
this.model.set( 'emailNotificationFromType', emailNotificationFromType );
|
1637 |
+
|
1638 |
+
var emailNotificationFromAddress = this.el.querySelectorAll( '.form-email-notification-from-address' )[0].value;
|
1639 |
+
this.model.set( 'emailNotificationFromAddress', emailNotificationFromAddress );
|
1640 |
+
|
1641 |
+
var emailNotificationFromField = this.el.querySelectorAll( '.form-email-notification-from-field' )[0].value;
|
1642 |
+
this.model.set( 'emailNotificationFromField', emailNotificationFromField );
|
1643 |
+
|
1644 |
if ( typeof $promise !== 'undefined' && typeof $promise.promise !== 'undefined' ) {
|
1645 |
$promise.resolve();
|
1646 |
}
|
1647 |
},
|
1648 |
|
1649 |
render: function() {
|
1650 |
+
var emailFields = [],
|
1651 |
+
fields = this.model.get( 'fields' );
|
1652 |
+
|
1653 |
+
fields.each( function( field ) {
|
1654 |
+
if ( 'email' === field.get( 'type' ) ) {
|
1655 |
+
emailFields.push( field );
|
1656 |
+
}
|
1657 |
+
});
|
1658 |
+
|
1659 |
var context = {
|
1660 |
+
form: this.model.toJSON(),
|
1661 |
+
emailFields: emailFields
|
1662 |
};
|
1663 |
|
1664 |
this.el.innerHTML = this.template( context );
|
1665 |
|
|
|
|
|
1666 |
this.toggleNotificationFields();
|
1667 |
|
1668 |
+
wp.ccf.dispatcher.on( 'saveFormNotifications', this.save, this );
|
1669 |
wp.ccf.dispatcher.on( 'mainViewChange', this.save, this );
|
1670 |
+
this.listenTo( fields, 'add', this.render, this );
|
1671 |
+
this.listenTo( fields, 'remove', this.render, this );
|
1672 |
|
1673 |
return this;
|
1674 |
}
|
1680 |
template: _.template( document.getElementById( 'ccf-form-pane-template' ).innerHTML ),
|
1681 |
subViews: {
|
1682 |
'field-sidebar': wp.ccf.views.FieldSidebar,
|
1683 |
+
'form-settings': wp.ccf.views.FormSettings,
|
1684 |
+
'form-notifications': wp.ccf.views.FormNotifications
|
1685 |
},
|
1686 |
|
1687 |
events: {
|
1741 |
|
1742 |
var $settings = $.Deferred();
|
1743 |
var $field = $.Deferred();
|
1744 |
+
var $notifications = $.Deferred();
|
1745 |
|
1746 |
wp.ccf.dispatcher.trigger( 'saveFormSettings', $settings );
|
1747 |
+
wp.ccf.dispatcher.trigger( 'saveFormNotifications', $notifications );
|
1748 |
wp.ccf.dispatcher.trigger( 'saveField', $field );
|
1749 |
|
1750 |
+
$.when( $settings, $field, $notifications ).then( function() {
|
1751 |
var fields = SELF.model.get( 'fields' );
|
1752 |
var allReqsMet = true;
|
1753 |
var slugs = {};
|
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.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(e),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.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.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(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)},n=function(e){for(var t in this.attributes)if(-1===e.indexOf(t)){var i=this.get(t);"string"==typeof i&&""!==i&&(i=(i+"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/“/g,"”").replace(/”/g,"”").replace(/‘/g,"‘").replace(/'/g,"'"),this.set(t,i))}return this};wp.ccf.models.FieldChoice=wp.ccf.models.FieldChoice||t.Model.extend({defaults:{label:"",value:"",selected:!1},decode:function(){return n.call(this,[])},set:c}),wp.ccf.models.Form=wp.ccf.models.Form||wp.api.models.Post.extend({urlRoot:s.root+"/ccf/forms",set:c,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};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"),n.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],n=l.findWhere({slug:c.slug});if(n){if(c.choices!==void 0){var r=t.get("choices");if(r&&r.length>0)for(var o=0;c.choices>o;o++){var a=r.at(o);a.set(c.choices[o]),a.decode()}delete e.fields[s].choices}n.set(c),n.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({idAttribute:"ID",defaults:{ID:null,data:{}}}),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 n.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}}),wp.ccf.models.StandardField=wp.ccf.models.StandardField||wp.ccf.models.Field.extend({idAttribute:"ID",defaults:function(){var e={label:"Field Label",value:"",placeholder:"",slug:"",type:"",required:!1,className:""};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["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"};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";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+"/ccf/forms",formsFetching:{},initialize:function(){this.constructor.__super__.initialize(),this.formsFetching={}},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)}}),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+"/ccf/forms/"+this.formId+"/submissions"},initialize:function(e,t){this.constructor.__super__.initialize.apply(this,arguments),t&&t.formId&&(this.formId=t.formId)}}),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:i.template(document.getElementById("ccf-field-choice-template").innerHTML),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];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,"")}},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:i.template(document.getElementById("ccf-single-line-text-template").innerHTML),initialize:function(){},saveField:function(){return 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("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}}),wp.ccf.views.Fields.recaptcha=wp.ccf.views.Fields.recaptcha||wp.ccf.views.FieldBase.extend({template:i.template(document.getElementById("ccf-recaptcha-template").innerHTML),initialize:function(){},saveField:function(){return this.model.set("label",this.el.querySelectorAll(".field-label")[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}}),wp.ccf.views.Fields["section-header"]=wp.ccf.views.Fields["section-header"]||wp.ccf.views.FieldBase.extend({template:i.template(document.getElementById("ccf-section-header-template").innerHTML),initialize:function(){},saveField:function(){return 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}}),wp.ccf.views.Fields.html=wp.ccf.views.Fields.html||wp.ccf.views.FieldBase.extend({template:i.template(document.getElementById("ccf-html-template").innerHTML),initialize:function(){},saveField:function(){return this.model.set("html",this.el.querySelectorAll(".field-html")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this}}),wp.ccf.views.Fields["paragraph-text"]=wp.ccf.views.Fields["paragraph-text"]||wp.ccf.views.FieldBase.extend({template:i.template(document.getElementById("ccf-paragraph-text-template").innerHTML),saveField:function(){return 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("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}}),wp.ccf.views.Fields.hidden=wp.ccf.views.Fields.hidden||wp.ccf.views.FieldBase.extend({template:i.template(document.getElementById("ccf-hidden-template").innerHTML),saveField:function(){return 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}}),wp.ccf.views.Fields.date=wp.ccf.views.Fields.date||wp.ccf.views.FieldBase.extend({template:i.template(document.getElementById("ccf-date-template").innerHTML),saveField:function(){this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("label",this.el.querySelectorAll(".field-label")[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:i.template(document.getElementById("ccf-name-template").innerHTML),saveField:function(){return 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("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1),this}}),wp.ccf.views.Fields.website=wp.ccf.views.Fields.website||wp.ccf.views.FieldBase.extend({template:i.template(document.getElementById("ccf-website-template").innerHTML),saveField:function(){return 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("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}}),wp.ccf.views.Fields.phone=wp.ccf.views.Fields.phone||wp.ccf.views.FieldBase.extend({template:i.template(document.getElementById("ccf-phone-template").innerHTML),saveField:function(){return 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("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}}),wp.ccf.views.Fields.address=wp.ccf.views.Fields.address||wp.ccf.views.FieldBase.extend({template:i.template(document.getElementById("ccf-address-template").innerHTML),saveField:function(){return 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("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}}),wp.ccf.views.Fields.email=wp.ccf.views.Fields.email||wp.ccf.views.FieldBase.extend({template:i.template(document.getElementById("ccf-email-template").innerHTML),saveField:function(){this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("label",this.el.querySelectorAll(".field-label")[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:i.template(document.getElementById("ccf-dropdown-template").innerHTML),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(){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("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()});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:i.template(document.getElementById("ccf-dropdown-template").innerHTML),events:function(){return this.constructor.__super__.events}}),wp.ccf.views.Fields.radio=wp.ccf.views.Fields.radio||wp.ccf.views.ChoiceableField.extend({template:i.template(document.getElementById("ccf-radio-template").innerHTML),events:function(){return this.constructor.__super__.events}}),wp.ccf.views.Fields.checkboxes=wp.ccf.views.Fields.checkboxes||wp.ccf.views.ChoiceableField.extend({template:i.template(document.getElementById("ccf-checkboxes-template").innerHTML),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 l=e.get("type");this.currentFieldView&&(this.currentFieldView.saveField(),this.currentFieldView.destroy&&this.currentFieldView.destroy()),this.currentFieldView=new wp.ccf.views.Fields[l]({model:e}),this.currentFieldView.render(),this.el.innerHTML="",this.el.appendChild(this.currentFieldView.el);var s=this.form.get("fields");this.listenTo(s,"remove",this.fieldRemoved)}else{var c=i.template(document.getElementById("ccf-empty-field-template").innerHTML);this.el.innerHTML=c(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:i.template(document.getElementById("ccf-field-row-template").innerHTML),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:i.template(document.getElementById("ccf-field-row-template").innerHTML),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 s=document.getElementById("ccf-"+this.model.get("type")+"-preview-template");if(s){var c=this.el.querySelectorAll(".preview")[0];c.style.display="block",c.innerHTML=i.template(s.innerHTML)({field:this.model.toJSON()})}return this}}),wp.ccf.views.FormSettings=wp.ccf.views.FormSettings||t.View.extend({template:i.template(document.getElementById("ccf-form-settings-template").innerHTML),events:{"blur input":"save","change select":"save","change select.form-completion-action-type":"toggleCompletionFields","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")},toggleNotificationFields:function(){var e=this.el.querySelectorAll(".form-send-email-notifications")[0].value,t=this.el.querySelectorAll(".email-notification-addresses")[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",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-completion-message")[0].value;this.model.set("completionMessage",s);var c=this.el.querySelectorAll(".form-completion-redirect-url")[0].value;this.model.set("completionRedirectUrl",c);var n=this.el.querySelectorAll(".form-completion-action-type")[0].value;this.model.set("completionActionType",n);var r=this.el.querySelectorAll(".form-send-email-notifications")[0].value;this.model.set("sendEmailNotifications",parseInt(r)?!0:!1);var o=this.el.querySelectorAll(".form-email-notification-addresses")[0].value;this.model.set("emailNotificationAddresses",o),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.toggleNotificationFields(),wp.ccf.dispatcher.on("saveFormSettings",this.save,this),wp.ccf.dispatcher.on("mainViewChange",this.save,this),this}}),wp.ccf.views.FormPane=wp.ccf.views.FormPane||t.View.extend(i.defaults({template:i.template(document.getElementById("ccf-form-pane-template").innerHTML),subViews:{"field-sidebar":wp.ccf.views.FieldSidebar,"form-settings":wp.ccf.views.FormSettings},events:{"click .save-button":"sync","click h2":"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()},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();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"}).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);
|
2 |
-
var c={labels:l.fieldLabels,form:s.model.toJSON()};window.form=s.model,s.el.innerHTML=this.template(c);var n=s.el.querySelectorAll(".fields")[0];i.each(l.fieldLabels,function(e,t){n.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 o=s.el.querySelectorAll(".special-fields")[0];i.each(l.specialFieldLabels,function(e,t){o.appendChild(new wp.ccf.views.FieldRowPlaceholder({type:t}).render().el)}),e(s.el.querySelectorAll(".left-sidebar")[0].querySelectorAll(".field")).draggable({cursor:"move",zIndex:160001,scroll:!1,containment:".ccf-form-pane",appendTo:".ccf-main-modal",snap:!0,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:i.width(),height:i.height()})}});var a=s.model.get("fields"),d=s.el.querySelectorAll(".form-content")[0];return 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",handle:"h4",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),n=s.model.get("fields");n.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:i.template(document.getElementById("ccf-existing-form-table-row-template").innerHTML),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:i.template(document.getElementById("ccf-empty-form-table-row-template").innerHTML),render:function(){return this.$el.html(this.template()),this}}),wp.ccf.views.ExistingFormTable=wp.ccf.views.ExistingFormTable||t.View.extend({template:i.template(document.getElementById("ccf-existing-form-table-template").innerHTML),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.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:i.template(document.getElementById("ccf-existing-form-pane-template").innerHTML),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:i.template(document.getElementById("ccf-main-modal-template").innerHTML),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:i.template(document.getElementById("ccf-submission-row-template").innerHTML),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,isFieldAddress:wp.ccf.utils.isFieldAddress,getPrettyFieldDate:wp.ccf.utils.getPrettyFieldDate,getPrettyFieldAddress:wp.ccf.utils.getPrettyFieldAddress,getPrettyFieldName:wp.ccf.utils.getPrettyFieldName}})),this}}),wp.ccf.views.SubmissionsTable=wp.ccf.views.SubmissionsTable||t.View.extend({template:i.template(document.getElementById("ccf-submission-table-template").innerHTML),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.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.Pagination=wp.ccf.views.Pagination||t.View.extend({template:i.template(document.getElementById("ccf-pagination-template").innerHTML),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:i.template(document.getElementById("ccf-no-submissions-row-template").innerHTML),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:i.template(document.getElementById("ccf-submissions-controller-template").innerHTML),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,_currentFormDeferred:null,dispatcher:{},show:function(e){return this.switchToForm(e),this.instance.show(),this.instance},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;i.extend(this.dispatcher,t.Events),new wp.ccf.router;var c=!1,n=document.querySelectorAll(".ccf-open-form-manager")[0];if(l.single)if(c=!0,l.postId){var r=parseInt(l.postId);if(s.forms.formsFetching[r]===void 0){var o=new wp.ccf.models.Form({ID:r}),a=o.fetch();s.forms.formsFetching[r]=a,s._currentFormDeferred=a,a.done(function(){delete s.forms.formsFetching[r],s.forms.add(o),s.currentForm=o})}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),n.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-settings",i.setAttribute("data-icon","");var l=document.getElementById("show-settings-link");i.onclick=function(){l.click()},e.insertBefore(i,e.firstChild.nextSibling.nextSibling),wp.ccf.createSubmissionsTable(t)}})}else s._setupMainModal(!0),n.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)};n.addEventListener?n.addEventListener("click",d,!1):n.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.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(e),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.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.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(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)},n=function(e){for(var t in this.attributes)if(-1===e.indexOf(t)){var i=this.get(t);"string"==typeof i&&""!==i&&(i=(i+"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/“/g,"”").replace(/”/g,"”").replace(/‘/g,"‘").replace(/'/g,"'"),this.set(t,i))}return this};wp.ccf.models.FieldChoice=wp.ccf.models.FieldChoice||t.Model.extend({defaults:{label:"",value:"",selected:!1},decode:function(){return n.call(this,[])},set:c}),wp.ccf.models.Form=wp.ccf.models.Form||wp.api.models.Post.extend({urlRoot:s.root+"/ccf/forms",set:c,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:""};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"),n.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],n=l.findWhere({slug:c.slug});if(n){if(c.choices!==void 0){var r=t.get("choices");if(r&&r.length>0)for(var o=0;c.choices>o;o++){var a=r.at(o);a.set(c.choices[o]),a.decode()}delete e.fields[s].choices}n.set(c),n.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({idAttribute:"ID",defaults:{ID:null,data:{}}}),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 n.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}}),wp.ccf.models.StandardField=wp.ccf.models.StandardField||wp.ccf.models.Field.extend({idAttribute:"ID",defaults:function(){var e={label:"Field Label",value:"",placeholder:"",slug:"",type:"",required:!1,className:""};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["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"};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";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+"/ccf/forms",formsFetching:{},initialize:function(){this.constructor.__super__.initialize(),this.formsFetching={}},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)}}),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+"/ccf/forms/"+this.formId+"/submissions"},initialize:function(e,t){this.constructor.__super__.initialize.apply(this,arguments),t&&t.formId&&(this.formId=t.formId)}}),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:i.template(document.getElementById("ccf-field-choice-template").innerHTML),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:i.template(document.getElementById("ccf-single-line-text-template").innerHTML),initialize:function(){},saveField:function(){return 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("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}}),wp.ccf.views.Fields.recaptcha=wp.ccf.views.Fields.recaptcha||wp.ccf.views.FieldBase.extend({template:i.template(document.getElementById("ccf-recaptcha-template").innerHTML),initialize:function(){},saveField:function(){return this.model.set("label",this.el.querySelectorAll(".field-label")[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}}),wp.ccf.views.Fields["section-header"]=wp.ccf.views.Fields["section-header"]||wp.ccf.views.FieldBase.extend({template:i.template(document.getElementById("ccf-section-header-template").innerHTML),initialize:function(){},saveField:function(){return 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}}),wp.ccf.views.Fields.html=wp.ccf.views.Fields.html||wp.ccf.views.FieldBase.extend({template:i.template(document.getElementById("ccf-html-template").innerHTML),initialize:function(){},saveField:function(){return this.model.set("html",this.el.querySelectorAll(".field-html")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this}}),wp.ccf.views.Fields["paragraph-text"]=wp.ccf.views.Fields["paragraph-text"]||wp.ccf.views.FieldBase.extend({template:i.template(document.getElementById("ccf-paragraph-text-template").innerHTML),saveField:function(){return 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("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}}),wp.ccf.views.Fields.hidden=wp.ccf.views.Fields.hidden||wp.ccf.views.FieldBase.extend({template:i.template(document.getElementById("ccf-hidden-template").innerHTML),saveField:function(){return 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}}),wp.ccf.views.Fields.date=wp.ccf.views.Fields.date||wp.ccf.views.FieldBase.extend({template:i.template(document.getElementById("ccf-date-template").innerHTML),saveField:function(){this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("label",this.el.querySelectorAll(".field-label")[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:i.template(document.getElementById("ccf-name-template").innerHTML),saveField:function(){return 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("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1),this}}),wp.ccf.views.Fields.website=wp.ccf.views.Fields.website||wp.ccf.views.FieldBase.extend({template:i.template(document.getElementById("ccf-website-template").innerHTML),saveField:function(){return 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("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}}),wp.ccf.views.Fields.phone=wp.ccf.views.Fields.phone||wp.ccf.views.FieldBase.extend({template:i.template(document.getElementById("ccf-phone-template").innerHTML),saveField:function(){return 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("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}}),wp.ccf.views.Fields.address=wp.ccf.views.Fields.address||wp.ccf.views.FieldBase.extend({template:i.template(document.getElementById("ccf-address-template").innerHTML),saveField:function(){return 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("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}}),wp.ccf.views.Fields.email=wp.ccf.views.Fields.email||wp.ccf.views.FieldBase.extend({template:i.template(document.getElementById("ccf-email-template").innerHTML),saveField:function(){this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("label",this.el.querySelectorAll(".field-label")[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:i.template(document.getElementById("ccf-dropdown-template").innerHTML),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(){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("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:i.template(document.getElementById("ccf-dropdown-template").innerHTML),events:function(){return this.constructor.__super__.events}}),wp.ccf.views.Fields.radio=wp.ccf.views.Fields.radio||wp.ccf.views.ChoiceableField.extend({template:i.template(document.getElementById("ccf-radio-template").innerHTML),events:function(){return this.constructor.__super__.events}}),wp.ccf.views.Fields.checkboxes=wp.ccf.views.Fields.checkboxes||wp.ccf.views.ChoiceableField.extend({template:i.template(document.getElementById("ccf-checkboxes-template").innerHTML),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 l=e.get("type");this.currentFieldView&&(this.currentFieldView.saveField(),this.currentFieldView.destroy&&this.currentFieldView.destroy()),this.currentFieldView=new wp.ccf.views.Fields[l]({model:e,collection:this.form.get("fields")}),this.currentFieldView.render(),this.el.innerHTML="",this.el.appendChild(this.currentFieldView.el);var s=this.form.get("fields");this.listenTo(s,"remove",this.fieldRemoved)}else{var c=i.template(document.getElementById("ccf-empty-field-template").innerHTML);this.el.innerHTML=c(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:i.template(document.getElementById("ccf-field-row-template").innerHTML),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:i.template(document.getElementById("ccf-field-row-template").innerHTML),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 s=document.getElementById("ccf-"+this.model.get("type")+"-preview-template");if(s){var c=this.el.querySelectorAll(".preview")[0];c.style.display="block",c.innerHTML=i.template(s.innerHTML)({field:this.model.toJSON()})}return this}}),wp.ccf.views.FormSettings=wp.ccf.views.FormSettings||t.View.extend({template:i.template(document.getElementById("ccf-form-settings-template").innerHTML),events:{"blur input":"save","change select":"save","change select.form-completion-action-type":"toggleCompletionFields","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")},save:function(e){if(""!==this.el.innerHTML){var t=this.el.querySelectorAll(".form-title")[0].value;this.model.set("title",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-completion-message")[0].value;this.model.set("completionMessage",s);var c=this.el.querySelectorAll(".form-completion-redirect-url")[0].value;this.model.set("completionRedirectUrl",c);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(),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:i.template(document.getElementById("ccf-form-notifications-template").innerHTML),events:{"blur input":"save","change select":"save","change select.form-send-email-notifications":"toggleNotificationFields","change select.form-email-notification-from-type":"toggleNotificationFields"},initialize:function(e){this.model=e.form},destroy:function(){wp.ccf.dispatcher.off("saveFormSettings",this.save),wp.ccf.dispatcher.off("mainViewChange",this.save)},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];if(parseInt(t)){for(e=0;i>e;e++)emailNotificationAddresses.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")}else{for(e=0;i>e;e++)emailNotificationAddresses.style.display="none";l.style.display="none",s.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),e!==void 0&&e.promise!==void 0&&e.resolve()}},render:function(){var e=[],t=this.model.get("fields");t.each(function(t){"email"===t.get("type")&&e.push(t)});var i={form:this.model.toJSON(),emailFields:e};return this.el.innerHTML=this.template(i),this.toggleNotificationFields(),wp.ccf.dispatcher.on("saveFormNotifications",this.save,this),wp.ccf.dispatcher.on("mainViewChange",this.save,this),this.listenTo(t,"add",this.render,this),this.listenTo(t,"remove",this.render,this),this}}),wp.ccf.views.FormPane=wp.ccf.views.FormPane||t.View.extend(i.defaults({template:i.template(document.getElementById("ccf-form-pane-template").innerHTML),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 h2":"accordionClick","click .insert-form-button":"insertForm"},initialize:function(){wp.ccf.dispatcher.on("openEditField",this.openEditField,this)
|
2 |
+
},insertForm:function(){wp.ccf.utils.insertFormShortcode(this.model),wp.ccf.toggle()},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(),n=e.Deferred();wp.ccf.dispatcher.trigger("saveFormSettings",s),wp.ccf.dispatcher.trigger("saveFormNotifications",n),wp.ccf.dispatcher.trigger("saveField",c),e.when(s,c,n).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"}).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 n=s.el.querySelectorAll(".fields")[0];i.each(l.fieldLabels,function(e,t){n.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 o=s.el.querySelectorAll(".special-fields")[0];i.each(l.specialFieldLabels,function(e,t){o.appendChild(new wp.ccf.views.FieldRowPlaceholder({type:t}).render().el)}),e(s.el.querySelectorAll(".left-sidebar")[0].querySelectorAll(".field")).draggable({cursor:"move",zIndex:160001,scroll:!1,containment:".ccf-form-pane",appendTo:".ccf-main-modal",snap:!0,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:i.width(),height:i.height()})}});var a=s.model.get("fields"),d=s.el.querySelectorAll(".form-content")[0];return 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",handle:"h4",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),n=s.model.get("fields");n.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:i.template(document.getElementById("ccf-existing-form-table-row-template").innerHTML),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:i.template(document.getElementById("ccf-empty-form-table-row-template").innerHTML),render:function(){return this.$el.html(this.template()),this}}),wp.ccf.views.ExistingFormTable=wp.ccf.views.ExistingFormTable||t.View.extend({template:i.template(document.getElementById("ccf-existing-form-table-template").innerHTML),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.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:i.template(document.getElementById("ccf-existing-form-pane-template").innerHTML),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:i.template(document.getElementById("ccf-main-modal-template").innerHTML),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:i.template(document.getElementById("ccf-submission-row-template").innerHTML),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,isFieldAddress:wp.ccf.utils.isFieldAddress,getPrettyFieldDate:wp.ccf.utils.getPrettyFieldDate,getPrettyFieldAddress:wp.ccf.utils.getPrettyFieldAddress,getPrettyFieldName:wp.ccf.utils.getPrettyFieldName}})),this}}),wp.ccf.views.SubmissionsTable=wp.ccf.views.SubmissionsTable||t.View.extend({template:i.template(document.getElementById("ccf-submission-table-template").innerHTML),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.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.Pagination=wp.ccf.views.Pagination||t.View.extend({template:i.template(document.getElementById("ccf-pagination-template").innerHTML),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:i.template(document.getElementById("ccf-no-submissions-row-template").innerHTML),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:i.template(document.getElementById("ccf-submissions-controller-template").innerHTML),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,_currentFormDeferred:null,dispatcher:{},show:function(e){return this.switchToForm(e),this.instance.show(),this.instance},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;i.extend(this.dispatcher,t.Events),new wp.ccf.router;var c=!1,n=document.querySelectorAll(".ccf-open-form-manager")[0];if(l.single)if(c=!0,l.postId){var r=parseInt(l.postId);if(s.forms.formsFetching[r]===void 0){var o=new wp.ccf.models.Form({ID:r}),a=o.fetch();s.forms.formsFetching[r]=a,s._currentFormDeferred=a,a.done(function(){delete s.forms.formsFetching[r],s.forms.add(o),s.currentForm=o})}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),n.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-settings",i.setAttribute("data-icon","");var l=document.getElementById("show-settings-link");i.onclick=function(){l.click()},e.insertBefore(i,e.firstChild.nextSibling.nextSibling),wp.ccf.createSubmissionsTable(t)}})}else s._setupMainModal(!0),n.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)};n.addEventListener?n.addEventListener("click",d,!1):n.attachEvent("onclick",d)}}),wp.ccf.createManager()}(jQuery,Backbone,_,ccfSettings);
|
classes/class-ccf-api.php
CHANGED
@@ -228,6 +228,9 @@ class CCF_API extends WP_JSON_Posts {
|
|
228 |
$_post['completionMessage'] = esc_html( get_post_meta( $post['ID'], 'ccf_form_completion_message', true ) );
|
229 |
$_post['sendEmailNotifications'] = (bool) get_post_meta( $post['ID'], 'ccf_form_send_email_notifications', true );
|
230 |
$_post['emailNotificationAddresses'] = esc_html( get_post_meta( $post['ID'], 'ccf_form_email_notification_addresses', true ) );
|
|
|
|
|
|
|
231 |
|
232 |
$submissions = get_children( array( 'post_parent' => $post['ID'], 'numberposts' => array( 'ccf_max_submissions', 5000, $post ) ) );
|
233 |
$_post['submissions'] = esc_html( count( $submissions ) );
|
@@ -381,6 +384,18 @@ class CCF_API extends WP_JSON_Posts {
|
|
381 |
update_post_meta( $result, 'ccf_form_email_notification_addresses', sanitize_text_field( $data['emailNotificationAddresses'] ) );
|
382 |
}
|
383 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
384 |
$response = json_ensure_response( $this->get_post( $result ) );
|
385 |
$response->set_status( 201 );
|
386 |
$response->header( 'Location', json_url( '/ccf/forms/' . $result ) );
|
@@ -647,6 +662,18 @@ class CCF_API extends WP_JSON_Posts {
|
|
647 |
update_post_meta( $result, 'ccf_form_email_notification_addresses', sanitize_text_field( $data['emailNotificationAddresses'] ) );
|
648 |
}
|
649 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
650 |
$response = json_ensure_response( $this->get_post( $result ) );
|
651 |
|
652 |
$response->set_status( 201 );
|
228 |
$_post['completionMessage'] = esc_html( get_post_meta( $post['ID'], 'ccf_form_completion_message', true ) );
|
229 |
$_post['sendEmailNotifications'] = (bool) get_post_meta( $post['ID'], 'ccf_form_send_email_notifications', true );
|
230 |
$_post['emailNotificationAddresses'] = esc_html( get_post_meta( $post['ID'], 'ccf_form_email_notification_addresses', true ) );
|
231 |
+
$_post['emailNotificationFromType'] = esc_html( get_post_meta( $post['ID'], 'ccf_form_email_notification_from_type', true ) );
|
232 |
+
$_post['emailNotificationFromAddress'] = esc_html( get_post_meta( $post['ID'], 'ccf_form_email_notification_from_address', true ) );
|
233 |
+
$_post['emailNotificationFromField'] = esc_html( get_post_meta( $post['ID'], 'ccf_form_email_notification_from_field', true ) );
|
234 |
|
235 |
$submissions = get_children( array( 'post_parent' => $post['ID'], 'numberposts' => array( 'ccf_max_submissions', 5000, $post ) ) );
|
236 |
$_post['submissions'] = esc_html( count( $submissions ) );
|
384 |
update_post_meta( $result, 'ccf_form_email_notification_addresses', sanitize_text_field( $data['emailNotificationAddresses'] ) );
|
385 |
}
|
386 |
|
387 |
+
if ( isset( $data['emailNotificationFromType'] ) ) {
|
388 |
+
update_post_meta( $result, 'ccf_form_email_notification_from_type', sanitize_text_field( $data['emailNotificationFromType'] ) );
|
389 |
+
}
|
390 |
+
|
391 |
+
if ( isset( $data['emailNotificationFromAddress'] ) ) {
|
392 |
+
update_post_meta( $result, 'ccf_form_email_notification_from_address', sanitize_text_field( $data['emailNotificationFromAddress'] ) );
|
393 |
+
}
|
394 |
+
|
395 |
+
if ( isset( $data['emailNotificationFromField'] ) ) {
|
396 |
+
update_post_meta( $result, 'ccf_form_email_notification_from_field', sanitize_text_field( $data['emailNotificationFromField'] ) );
|
397 |
+
}
|
398 |
+
|
399 |
$response = json_ensure_response( $this->get_post( $result ) );
|
400 |
$response->set_status( 201 );
|
401 |
$response->header( 'Location', json_url( '/ccf/forms/' . $result ) );
|
662 |
update_post_meta( $result, 'ccf_form_email_notification_addresses', sanitize_text_field( $data['emailNotificationAddresses'] ) );
|
663 |
}
|
664 |
|
665 |
+
if ( isset( $data['emailNotificationFromType'] ) ) {
|
666 |
+
update_post_meta( $result, 'ccf_form_email_notification_from_type', sanitize_text_field( $data['emailNotificationFromType'] ) );
|
667 |
+
}
|
668 |
+
|
669 |
+
if ( isset( $data['emailNotificationFromAddress'] ) ) {
|
670 |
+
update_post_meta( $result, 'ccf_form_email_notification_from_address', sanitize_text_field( $data['emailNotificationFromAddress'] ) );
|
671 |
+
}
|
672 |
+
|
673 |
+
if ( isset( $data['emailNotificationFromField'] ) ) {
|
674 |
+
update_post_meta( $result, 'ccf_form_email_notification_from_field', sanitize_text_field( $data['emailNotificationFromField'] ) );
|
675 |
+
}
|
676 |
+
|
677 |
$response = json_ensure_response( $this->get_post( $result ) );
|
678 |
|
679 |
$response->set_status( 201 );
|
classes/class-ccf-form-cpt.php
CHANGED
@@ -257,7 +257,7 @@ class CCF_Form_CPT {
|
|
257 |
}
|
258 |
|
259 |
public function action_admin_enqueue_scripts() {
|
260 |
-
if ( defined( SCRIPT_DEBUG ) && SCRIPT_DEBUG ) {
|
261 |
$admin_css_path = '/build/css/admin.css';
|
262 |
$form_cpt_css_path = '/build/css/form-cpt.css';
|
263 |
$form_table_css_path = '/build/css/form-table.css';
|
257 |
}
|
258 |
|
259 |
public function action_admin_enqueue_scripts() {
|
260 |
+
if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) {
|
261 |
$admin_css_path = '/build/css/admin.css';
|
262 |
$form_cpt_css_path = '/build/css/form-cpt.css';
|
263 |
$form_table_css_path = '/build/css/form-table.css';
|
classes/class-ccf-form-handler.php
CHANGED
@@ -479,6 +479,7 @@ class CCF_Form_Handler {
|
|
479 |
}
|
480 |
|
481 |
$fields = get_post_meta( $form->ID, 'ccf_attached_fields', true );
|
|
|
482 |
|
483 |
$errors = array();
|
484 |
|
@@ -498,6 +499,9 @@ class CCF_Form_Handler {
|
|
498 |
|
499 |
$slug = get_post_meta( $field_id, 'ccf_field_slug', true );
|
500 |
|
|
|
|
|
|
|
501 |
$custom_value_mapping = array( 'recaptcha' => 'g-recaptcha-response' );
|
502 |
|
503 |
if ( in_array( $type, array_keys( $custom_value_mapping ) ) ) {
|
@@ -552,10 +556,16 @@ class CCF_Form_Handler {
|
|
552 |
ob_start();
|
553 |
|
554 |
foreach ( $submission as $slug => $field ) {
|
|
|
|
|
555 |
?>
|
556 |
|
557 |
<div>
|
558 |
-
|
|
|
|
|
|
|
|
|
559 |
</div>
|
560 |
<div style="margin-bottom: 10px;">
|
561 |
<?php if ( ! empty( $field ) ) { ?>
|
@@ -608,10 +618,28 @@ class CCF_Form_Handler {
|
|
608 |
|
609 |
$headers = array( 'MIME-Version: 1.0', 'Content-type: text/html; charset=iso-8859-1' );
|
610 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
611 |
foreach ( $email_addresses as $email ) {
|
612 |
$subject = sprintf( __( '%s: Form Submission to "%s"', 'custom-contact-forms' ), esc_html( get_bloginfo( 'name' ) ), esc_html( get_the_title( $form_id ) ) );
|
613 |
$subject = apply_filters( 'ccf_email_subject', $subject, $form_id, $email, $form_page );
|
614 |
-
wp_mail( $email, $subject, apply_filters( 'ccf_email_content', $message, $form_id, $email, $form_page ), $headers );
|
615 |
}
|
616 |
}
|
617 |
}
|
479 |
}
|
480 |
|
481 |
$fields = get_post_meta( $form->ID, 'ccf_attached_fields', true );
|
482 |
+
$field_slug_to_id = array();
|
483 |
|
484 |
$errors = array();
|
485 |
|
499 |
|
500 |
$slug = get_post_meta( $field_id, 'ccf_field_slug', true );
|
501 |
|
502 |
+
// We will use this later when emailing a submission
|
503 |
+
$field_slug_to_id[$slug] = $field_id;
|
504 |
+
|
505 |
$custom_value_mapping = array( 'recaptcha' => 'g-recaptcha-response' );
|
506 |
|
507 |
if ( in_array( $type, array_keys( $custom_value_mapping ) ) ) {
|
556 |
ob_start();
|
557 |
|
558 |
foreach ( $submission as $slug => $field ) {
|
559 |
+
$field_id = $field_slug_to_id[$slug];
|
560 |
+
$label = get_post_meta( $field_id, 'ccf_field_label', true );
|
561 |
?>
|
562 |
|
563 |
<div>
|
564 |
+
<?php if ( ! empty( $label ) ) : ?>
|
565 |
+
<b><?php echo esc_html( $label ); ?> (<?php echo esc_html( $slug ); ?>):</b>
|
566 |
+
<?php else : ?>
|
567 |
+
<b><?php echo esc_html( $slug ); ?>:</b>
|
568 |
+
<?php endif; ?>
|
569 |
</div>
|
570 |
<div style="margin-bottom: 10px;">
|
571 |
<?php if ( ! empty( $field ) ) { ?>
|
618 |
|
619 |
$headers = array( 'MIME-Version: 1.0', 'Content-type: text/html; charset=iso-8859-1' );
|
620 |
|
621 |
+
$email_notification_from_type = get_post_meta( $form_id, 'ccf_form_email_notification_from_type', true );
|
622 |
+
|
623 |
+
if ( 'custom' === $email_notification_from_type ) {
|
624 |
+
$custom_email = get_post_meta( $form_id, 'ccf_form_email_notification_from_address', true );
|
625 |
+
|
626 |
+
if ( ! empty( $custom_email ) ) {
|
627 |
+
$headers[] = 'From: ' . sanitize_email( $custom_email );
|
628 |
+
$headers[] = 'Reply-To: ' . sanitize_email( $custom_email );
|
629 |
+
}
|
630 |
+
} elseif ( 'field' === $email_notification_from_type ) {
|
631 |
+
$email_field = get_post_meta( $form_id, 'ccf_form_email_notification_from_field', true );
|
632 |
+
|
633 |
+
if ( ! empty( $email_field ) && ! empty( $submission[$email_field] ) ) {
|
634 |
+
$headers[] = 'From: ' . sanitize_email( $submission[$email_field] );
|
635 |
+
$headers[] = 'Reply-To: ' . sanitize_email( $submission[$email_field] );
|
636 |
+
}
|
637 |
+
}
|
638 |
+
|
639 |
foreach ( $email_addresses as $email ) {
|
640 |
$subject = sprintf( __( '%s: Form Submission to "%s"', 'custom-contact-forms' ), esc_html( get_bloginfo( 'name' ) ), esc_html( get_the_title( $form_id ) ) );
|
641 |
$subject = apply_filters( 'ccf_email_subject', $subject, $form_id, $email, $form_page );
|
642 |
+
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 ) );
|
643 |
}
|
644 |
}
|
645 |
}
|
classes/class-ccf-form-manager.php
CHANGED
@@ -32,7 +32,7 @@ class CCF_Form_Manager {
|
|
32 |
return $css;
|
33 |
}
|
34 |
|
35 |
-
if ( defined( SCRIPT_DEBUG ) && SCRIPT_DEBUG ) {
|
36 |
$css_path = '/build/css/form-mce.css';
|
37 |
} else {
|
38 |
$css_path = '/build/css/form-mce.min.css';
|
@@ -100,6 +100,7 @@ class CCF_Form_Manager {
|
|
100 |
</div>
|
101 |
</div>
|
102 |
<div class="accordion-section ccf-form-settings"></div>
|
|
|
103 |
</div>
|
104 |
|
105 |
<div class="form-content">
|
@@ -151,19 +152,55 @@ class CCF_Form_Manager {
|
|
151 |
<label for="ccf_form_completion_message"><?php esc_html_e( 'Completion Message:', 'custom-contact-forms' ); ?></label>
|
152 |
<textarea class="widefat form-completion-message" id="ccf_form_completion_message" name="completion-message"><%- form.completionMessage %></textarea>
|
153 |
</p>
|
|
|
|
|
154 |
|
|
|
|
|
|
|
155 |
<p>
|
156 |
-
<label for="ccf_form_send_email_notifications"><?php esc_html_e( 'Send
|
157 |
|
158 |
<select name="send_email_notifications" class="form-send-email-notifications" id="ccf_form_send_email_notifications">
|
159 |
<option value="1"><?php esc_html_e( 'Yes', 'custom-contact-forms' ); ?></option>
|
160 |
<option value="0" <% if ( ! form.sendEmailNotifications ) { %>selected<% } %>><?php esc_html_e( 'No', 'custom-contact-forms' ); ?></option>
|
161 |
</select>
|
162 |
</p>
|
163 |
-
|
164 |
-
|
|
|
165 |
<input class="widefat form-email-notification-addresses" id="ccf_form_email_notification_addresses" name="email-notification-addresses" value="<%- form.emailNotificationAddresses %>">
|
166 |
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
167 |
</div>
|
168 |
</script>
|
169 |
|
@@ -813,7 +850,7 @@ class CCF_Form_Manager {
|
|
813 |
<option><?php esc_html_e( 'An example choice', 'custom-contact-forms' ); ?></option>
|
814 |
<%} else { %>
|
815 |
<% field.choices.each( function( choice ) { %>
|
816 |
-
<option value="<%- choice.get( 'value' ) %>"><%- choice.get( 'label' ) %></option>
|
817 |
<% }); %>
|
818 |
<% } %>
|
819 |
</select>
|
@@ -1218,7 +1255,7 @@ class CCF_Form_Manager {
|
|
1218 |
|
1219 |
if ( 'post.php' == $pagenow || 'post-new.php' == $pagenow ) {
|
1220 |
|
1221 |
-
if ( defined( SCRIPT_DEBUG ) && SCRIPT_DEBUG ) {
|
1222 |
$js_manager_path = '/build/js/form-manager.js';
|
1223 |
$js_mce_path = '/js/form-mce.js';
|
1224 |
$css_path = '/build/css/form-manager.css';
|
32 |
return $css;
|
33 |
}
|
34 |
|
35 |
+
if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) {
|
36 |
$css_path = '/build/css/form-mce.css';
|
37 |
} else {
|
38 |
$css_path = '/build/css/form-mce.min.css';
|
100 |
</div>
|
101 |
</div>
|
102 |
<div class="accordion-section ccf-form-settings"></div>
|
103 |
+
<div class="accordion-section ccf-form-notifications"></div>
|
104 |
</div>
|
105 |
|
106 |
<div class="form-content">
|
152 |
<label for="ccf_form_completion_message"><?php esc_html_e( 'Completion Message:', 'custom-contact-forms' ); ?></label>
|
153 |
<textarea class="widefat form-completion-message" id="ccf_form_completion_message" name="completion-message"><%- form.completionMessage %></textarea>
|
154 |
</p>
|
155 |
+
</div>
|
156 |
+
</script>
|
157 |
|
158 |
+
<script type="text/html" id="ccf-form-notifications-template">
|
159 |
+
<h2 aria-hidden="true"><?php esc_html_e( 'Form Notifications', 'custom-contact-forms' ); ?></h2>
|
160 |
+
<div class="section-content">
|
161 |
<p>
|
162 |
+
<label for="ccf_form_send_email_notifications"><?php esc_html_e( 'Send Email Notifications:', 'custom-contact-forms' ); ?></label>
|
163 |
|
164 |
<select name="send_email_notifications" class="form-send-email-notifications" id="ccf_form_send_email_notifications">
|
165 |
<option value="1"><?php esc_html_e( 'Yes', 'custom-contact-forms' ); ?></option>
|
166 |
<option value="0" <% if ( ! form.sendEmailNotifications ) { %>selected<% } %>><?php esc_html_e( 'No', 'custom-contact-forms' ); ?></option>
|
167 |
</select>
|
168 |
</p>
|
169 |
+
|
170 |
+
<p class="email-notification-setting">
|
171 |
+
<label for="ccf_form_email_notification_addresses"><?php esc_html_e( '"To" Email Addresses (comma separated):', 'custom-contact-forms' ); ?></label>
|
172 |
<input class="widefat form-email-notification-addresses" id="ccf_form_email_notification_addresses" name="email-notification-addresses" value="<%- form.emailNotificationAddresses %>">
|
173 |
</p>
|
174 |
+
|
175 |
+
<p class="email-notification-setting">
|
176 |
+
<label for="ccf_form_email_notification_from_type"><?php esc_html_e( '"From" Email Address Type:', 'custom-contact-forms' ); ?></label>
|
177 |
+
<select name="email_notification_from_type" class="form-email-notification-from-type" id="ccf_form_email_notification_from_type">
|
178 |
+
<option value="default"><?php esc_html_e( 'WordPress Default', 'custom-contact-forms' ); ?></option>
|
179 |
+
<option value="custom" <% if ( 'custom' === form.emailNotificationFromType ) { %>selected<% } %>><?php esc_html_e( 'Custom Email', 'custom-contact-forms' ); ?></option>
|
180 |
+
<option value="field" <% if ( 'field' === form.emailNotificationFromType ) { %>selected<% } %>><?php esc_html_e( 'Form Field', 'custom-contact-forms' ); ?></option>
|
181 |
+
</select>
|
182 |
+
|
183 |
+
<div 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' ); ?></div>
|
184 |
+
</p>
|
185 |
+
|
186 |
+
<p class="email-notification-from-address">
|
187 |
+
<label for="ccf_form_email_notification_from_address"><?php esc_html_e( 'Custom "From" Email Address:', 'custom-contact-forms' ); ?></label>
|
188 |
+
<input class="widefat form-email-notification-from-address" id="ccf_form_email_notification_from_address" name="email-notification-from-address" value="<%- form.emailNotificationFromAddress %>">
|
189 |
+
</p>
|
190 |
+
|
191 |
+
<p class="email-notification-from-field">
|
192 |
+
<label for="ccf_form_email_notification_from_field"><?php esc_html_e( 'Pull "From" Email Dynamically from Field:', 'custom-contact-forms' ); ?></label>
|
193 |
+
<% if ( emailFields.length < 1 ) { %>
|
194 |
+
<strong><?php esc_html_e( 'There are no email fields in your form.', 'custom-contact-forms' ); ?></strong>
|
195 |
+
<input type="hidden" name="email_notification_from_field" value="" class="form-email-notification-from-field">
|
196 |
+
<% } else { %>
|
197 |
+
<select name="email_notification_from_field" class="form-email-notification-from-field" id="ccf_form_email_notification_from_field">
|
198 |
+
<% _.each( emailFields, function( field ) { %>
|
199 |
+
<option <% if ( field.get( 'slug' ) === form.emailNotificationFromField ) { %>selected<% }%>><%- field.get( 'slug' ) %></option>
|
200 |
+
<% }); %>
|
201 |
+
</select>
|
202 |
+
<% } %>
|
203 |
+
</p>
|
204 |
</div>
|
205 |
</script>
|
206 |
|
850 |
<option><?php esc_html_e( 'An example choice', 'custom-contact-forms' ); ?></option>
|
851 |
<%} else { %>
|
852 |
<% field.choices.each( function( choice ) { %>
|
853 |
+
<option <% if ( choice.get( 'selected' ) ) { %>selected<% } %> value="<%- choice.get( 'value' ) %>"><%- choice.get( 'label' ) %></option>
|
854 |
<% }); %>
|
855 |
<% } %>
|
856 |
</select>
|
1255 |
|
1256 |
if ( 'post.php' == $pagenow || 'post-new.php' == $pagenow ) {
|
1257 |
|
1258 |
+
if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) {
|
1259 |
$js_manager_path = '/build/js/form-manager.js';
|
1260 |
$js_mce_path = '/js/form-mce.js';
|
1261 |
$css_path = '/build/css/form-manager.css';
|
classes/class-ccf-form-renderer.php
CHANGED
@@ -34,7 +34,7 @@ class CCF_Form_Renderer {
|
|
34 |
}
|
35 |
}
|
36 |
|
37 |
-
if ( defined( SCRIPT_DEBUG ) && SCRIPT_DEBUG ) {
|
38 |
$css_form_path = '/build/css/form.css';
|
39 |
$js_path = '/js/form.js';
|
40 |
} else {
|
34 |
}
|
35 |
}
|
36 |
|
37 |
+
if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) {
|
38 |
$css_form_path = '/build/css/form.css';
|
39 |
$js_path = '/js/form.js';
|
40 |
} else {
|
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: 6.
|
8 |
* Author URI: http://www.taylorlovett.com
|
9 |
*/
|
10 |
|
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: 6.3
|
8 |
* Author URI: http://www.taylorlovett.com
|
9 |
*/
|
10 |
|
js/manager/models.js
CHANGED
@@ -83,7 +83,10 @@
|
|
83 |
completionRedirectUrl: '',
|
84 |
completionMessage: '',
|
85 |
sendEmailNotifications: false,
|
86 |
-
emailNotificationAddresses: ccfSettings.adminEmail
|
|
|
|
|
|
|
87 |
};
|
88 |
|
89 |
defaults = _.defaults( defaults, this.constructor.__super__.defaults );
|
83 |
completionRedirectUrl: '',
|
84 |
completionMessage: '',
|
85 |
sendEmailNotifications: false,
|
86 |
+
emailNotificationAddresses: ccfSettings.adminEmail,
|
87 |
+
emailNotificationFromType: 'default',
|
88 |
+
emailNotificationFromAddress: '',
|
89 |
+
emailNotificationFromField: ''
|
90 |
};
|
91 |
|
92 |
defaults = _.defaults( defaults, this.constructor.__super__.defaults );
|
js/manager/views.js
CHANGED
@@ -101,16 +101,33 @@
|
|
101 |
},
|
102 |
|
103 |
checkSlug: function() {
|
104 |
-
var slugSelection = this.el.querySelectorAll( '.field-slug'
|
105 |
|
106 |
if ( slugSelection.length > 0 ) {
|
107 |
var slug = slugSelection[0];
|
|
|
108 |
|
109 |
if ( slug.value && ! slug.value.match( /^[a-zA-Z0-9\-_]+$/ ) ) {
|
110 |
slug.parentNode.className = slug.parentNode.className.replace( / field-error/i, '' ) + ' field-error';
|
111 |
} else {
|
112 |
slug.parentNode.className = slug.parentNode.className.replace( / field-error/i, '' );
|
113 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
114 |
}
|
115 |
|
116 |
},
|
@@ -415,6 +432,8 @@
|
|
415 |
|
416 |
SELF.el.innerHTML = SELF.template( { field: SELF.model.toJSON() } );
|
417 |
|
|
|
|
|
418 |
var choicesCollection = SELF.model.get( 'choices' );
|
419 |
|
420 |
var choices = this.el.querySelectorAll( '.repeatable-choices' )[0];
|
@@ -524,7 +543,7 @@
|
|
524 |
}
|
525 |
}
|
526 |
|
527 |
-
this.currentFieldView = new wp.ccf.views.Fields[type]( { model: field } );
|
528 |
|
529 |
this.currentFieldView.render();
|
530 |
|
@@ -694,18 +713,6 @@
|
|
694 |
}
|
695 |
},
|
696 |
|
697 |
-
toggleNotificationFields: function() {
|
698 |
-
var sendEmailNotifications = this.el.querySelectorAll( '.form-send-email-notifications' )[0].value;
|
699 |
-
|
700 |
-
var emailNotificationAddresses = this.el.querySelectorAll( '.email-notification-addresses' )[0];
|
701 |
-
|
702 |
-
if ( parseInt( sendEmailNotifications ) ) {
|
703 |
-
emailNotificationAddresses.style.display = 'block';
|
704 |
-
} else {
|
705 |
-
emailNotificationAddresses.style.display = 'none';
|
706 |
-
}
|
707 |
-
},
|
708 |
-
|
709 |
save: function( $promise ) {
|
710 |
var SELF = this;
|
711 |
|
@@ -732,30 +739,135 @@
|
|
732 |
var completionActionType = this.el.querySelectorAll( '.form-completion-action-type' )[0].value;
|
733 |
this.model.set( 'completionActionType', completionActionType );
|
734 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
735 |
var sendEmailNotifications = this.el.querySelectorAll( '.form-send-email-notifications' )[0].value;
|
736 |
this.model.set( 'sendEmailNotifications', ( parseInt( sendEmailNotifications ) ) ? true : false );
|
737 |
|
738 |
var emailNotificationAddresses = this.el.querySelectorAll( '.form-email-notification-addresses' )[0].value;
|
739 |
this.model.set( 'emailNotificationAddresses', emailNotificationAddresses );
|
740 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
741 |
if ( typeof $promise !== 'undefined' && typeof $promise.promise !== 'undefined' ) {
|
742 |
$promise.resolve();
|
743 |
}
|
744 |
},
|
745 |
|
746 |
render: function() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
747 |
var context = {
|
748 |
-
form: this.model.toJSON()
|
|
|
749 |
};
|
750 |
|
751 |
this.el.innerHTML = this.template( context );
|
752 |
|
753 |
-
this.toggleCompletionFields();
|
754 |
-
|
755 |
this.toggleNotificationFields();
|
756 |
|
757 |
-
wp.ccf.dispatcher.on( '
|
758 |
wp.ccf.dispatcher.on( 'mainViewChange', this.save, this );
|
|
|
|
|
759 |
|
760 |
return this;
|
761 |
}
|
@@ -767,7 +879,8 @@
|
|
767 |
template: _.template( document.getElementById( 'ccf-form-pane-template' ).innerHTML ),
|
768 |
subViews: {
|
769 |
'field-sidebar': wp.ccf.views.FieldSidebar,
|
770 |
-
'form-settings': wp.ccf.views.FormSettings
|
|
|
771 |
},
|
772 |
|
773 |
events: {
|
@@ -827,11 +940,13 @@
|
|
827 |
|
828 |
var $settings = $.Deferred();
|
829 |
var $field = $.Deferred();
|
|
|
830 |
|
831 |
wp.ccf.dispatcher.trigger( 'saveFormSettings', $settings );
|
|
|
832 |
wp.ccf.dispatcher.trigger( 'saveField', $field );
|
833 |
|
834 |
-
$.when( $settings, $field ).then( function() {
|
835 |
var fields = SELF.model.get( 'fields' );
|
836 |
var allReqsMet = true;
|
837 |
var slugs = {};
|
101 |
},
|
102 |
|
103 |
checkSlug: function() {
|
104 |
+
var slugSelection = this.el.querySelectorAll( '.field-slug');
|
105 |
|
106 |
if ( slugSelection.length > 0 ) {
|
107 |
var slug = slugSelection[0];
|
108 |
+
var duplicate = false;
|
109 |
|
110 |
if ( slug.value && ! slug.value.match( /^[a-zA-Z0-9\-_]+$/ ) ) {
|
111 |
slug.parentNode.className = slug.parentNode.className.replace( / field-error/i, '' ) + ' field-error';
|
112 |
} else {
|
113 |
slug.parentNode.className = slug.parentNode.className.replace( / field-error/i, '' );
|
114 |
}
|
115 |
+
|
116 |
+
if ( this.collection.length > 0 && '' !== slug.value ) {
|
117 |
+
this.collection.each( function( field ) {
|
118 |
+
if ( field !== this.model && slug.value === field.get( 'slug' ) ) {
|
119 |
+
duplicate = true;
|
120 |
+
}
|
121 |
+
}, this );
|
122 |
+
|
123 |
+
if ( duplicate ) {
|
124 |
+
slug.parentNode.className = slug.parentNode.className.replace( / field-duplicate-slug/i, '' ) + ' field-duplicate-slug';
|
125 |
+
} else {
|
126 |
+
slug.parentNode.className = slug.parentNode.className.replace( / field-duplicate-slug/i, '' );
|
127 |
+
}
|
128 |
+
} else {
|
129 |
+
slug.parentNode.className = slug.parentNode.className.replace( / field-duplicate-slug/i, '' );
|
130 |
+
}
|
131 |
}
|
132 |
|
133 |
},
|
432 |
|
433 |
SELF.el.innerHTML = SELF.template( { field: SELF.model.toJSON() } );
|
434 |
|
435 |
+
SELF.checkSlug();
|
436 |
+
|
437 |
var choicesCollection = SELF.model.get( 'choices' );
|
438 |
|
439 |
var choices = this.el.querySelectorAll( '.repeatable-choices' )[0];
|
543 |
}
|
544 |
}
|
545 |
|
546 |
+
this.currentFieldView = new wp.ccf.views.Fields[type]( { model: field, collection: this.form.get( 'fields' ) } );
|
547 |
|
548 |
this.currentFieldView.render();
|
549 |
|
713 |
}
|
714 |
},
|
715 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
716 |
save: function( $promise ) {
|
717 |
var SELF = this;
|
718 |
|
739 |
var completionActionType = this.el.querySelectorAll( '.form-completion-action-type' )[0].value;
|
740 |
this.model.set( 'completionActionType', completionActionType );
|
741 |
|
742 |
+
if ( typeof $promise !== 'undefined' && typeof $promise.promise !== 'undefined' ) {
|
743 |
+
$promise.resolve();
|
744 |
+
}
|
745 |
+
},
|
746 |
+
|
747 |
+
render: function() {
|
748 |
+
var context = {
|
749 |
+
form: this.model.toJSON()
|
750 |
+
};
|
751 |
+
|
752 |
+
this.el.innerHTML = this.template( context );
|
753 |
+
|
754 |
+
this.toggleCompletionFields();
|
755 |
+
|
756 |
+
wp.ccf.dispatcher.on( 'saveFormSettings', this.save, this );
|
757 |
+
wp.ccf.dispatcher.on( 'mainViewChange', this.save, this );
|
758 |
+
|
759 |
+
return this;
|
760 |
+
}
|
761 |
+
}
|
762 |
+
);
|
763 |
+
|
764 |
+
wp.ccf.views.FormNotifications = wp.ccf.views.FormNotifications || Backbone.View.extend(
|
765 |
+
{
|
766 |
+
template: _.template( document.getElementById( 'ccf-form-notifications-template' ).innerHTML ),
|
767 |
+
|
768 |
+
events: {
|
769 |
+
'blur input': 'save',
|
770 |
+
'change select': 'save',
|
771 |
+
'change select.form-send-email-notifications': 'toggleNotificationFields',
|
772 |
+
'change select.form-email-notification-from-type': 'toggleNotificationFields'
|
773 |
+
},
|
774 |
+
|
775 |
+
initialize: function( options ) {
|
776 |
+
this.model = options.form;
|
777 |
+
},
|
778 |
+
|
779 |
+
destroy: function() {
|
780 |
+
wp.ccf.dispatcher.off( 'saveFormSettings', this.save );
|
781 |
+
wp.ccf.dispatcher.off( 'mainViewChange', this.save );
|
782 |
+
},
|
783 |
+
|
784 |
+
toggleNotificationFields: function() {
|
785 |
+
var i;
|
786 |
+
|
787 |
+
var sendEmailNotifications = this.el.querySelectorAll( '.form-send-email-notifications' )[0].value;
|
788 |
+
|
789 |
+
var emailNotificationSettings = this.el.querySelectorAll( '.email-notification-setting' );
|
790 |
+
|
791 |
+
var emailNotificationFromAddress = this.el.querySelectorAll( '.email-notification-from-address' )[0];
|
792 |
+
|
793 |
+
var emailNotificationFromField = this.el.querySelectorAll( '.email-notification-from-field' )[0];
|
794 |
+
|
795 |
+
var emailNotificationFromType = this.el.querySelectorAll( '.form-email-notification-from-type' )[0];
|
796 |
+
|
797 |
+
if ( parseInt( sendEmailNotifications ) ) {
|
798 |
+
for ( i = 0; i < emailNotificationSettings; i++ ) {
|
799 |
+
emailNotificationAddresses.style.display = 'block';
|
800 |
+
}
|
801 |
+
|
802 |
+
emailNotificationFromAddress.style.display = 'none';
|
803 |
+
emailNotificationFromField.style.display = 'none';
|
804 |
+
|
805 |
+
if ( 'custom' === emailNotificationFromType.value ) {
|
806 |
+
emailNotificationFromAddress.style.display = 'block';
|
807 |
+
} else if ( 'field' === emailNotificationFromType.value ) {
|
808 |
+
emailNotificationFromField.style.display = 'block';
|
809 |
+
}
|
810 |
+
} else {
|
811 |
+
for ( i = 0; i < emailNotificationSettings; i++ ) {
|
812 |
+
emailNotificationAddresses.style.display = 'none';
|
813 |
+
}
|
814 |
+
|
815 |
+
emailNotificationFromAddress.style.display = 'none';
|
816 |
+
emailNotificationFromField.style.display = 'none';
|
817 |
+
}
|
818 |
+
},
|
819 |
+
|
820 |
+
save: function( $promise ) {
|
821 |
+
var SELF = this;
|
822 |
+
|
823 |
+
if ( this.el.innerHTML === '' ) {
|
824 |
+
// @todo: for some reason this is needed for IE8
|
825 |
+
return;
|
826 |
+
}
|
827 |
+
|
828 |
var sendEmailNotifications = this.el.querySelectorAll( '.form-send-email-notifications' )[0].value;
|
829 |
this.model.set( 'sendEmailNotifications', ( parseInt( sendEmailNotifications ) ) ? true : false );
|
830 |
|
831 |
var emailNotificationAddresses = this.el.querySelectorAll( '.form-email-notification-addresses' )[0].value;
|
832 |
this.model.set( 'emailNotificationAddresses', emailNotificationAddresses );
|
833 |
|
834 |
+
var emailNotificationFromType = this.el.querySelectorAll( '.form-email-notification-from-type' )[0].value;
|
835 |
+
this.model.set( 'emailNotificationFromType', emailNotificationFromType );
|
836 |
+
|
837 |
+
var emailNotificationFromAddress = this.el.querySelectorAll( '.form-email-notification-from-address' )[0].value;
|
838 |
+
this.model.set( 'emailNotificationFromAddress', emailNotificationFromAddress );
|
839 |
+
|
840 |
+
var emailNotificationFromField = this.el.querySelectorAll( '.form-email-notification-from-field' )[0].value;
|
841 |
+
this.model.set( 'emailNotificationFromField', emailNotificationFromField );
|
842 |
+
|
843 |
if ( typeof $promise !== 'undefined' && typeof $promise.promise !== 'undefined' ) {
|
844 |
$promise.resolve();
|
845 |
}
|
846 |
},
|
847 |
|
848 |
render: function() {
|
849 |
+
var emailFields = [],
|
850 |
+
fields = this.model.get( 'fields' );
|
851 |
+
|
852 |
+
fields.each( function( field ) {
|
853 |
+
if ( 'email' === field.get( 'type' ) ) {
|
854 |
+
emailFields.push( field );
|
855 |
+
}
|
856 |
+
});
|
857 |
+
|
858 |
var context = {
|
859 |
+
form: this.model.toJSON(),
|
860 |
+
emailFields: emailFields
|
861 |
};
|
862 |
|
863 |
this.el.innerHTML = this.template( context );
|
864 |
|
|
|
|
|
865 |
this.toggleNotificationFields();
|
866 |
|
867 |
+
wp.ccf.dispatcher.on( 'saveFormNotifications', this.save, this );
|
868 |
wp.ccf.dispatcher.on( 'mainViewChange', this.save, this );
|
869 |
+
this.listenTo( fields, 'add', this.render, this );
|
870 |
+
this.listenTo( fields, 'remove', this.render, this );
|
871 |
|
872 |
return this;
|
873 |
}
|
879 |
template: _.template( document.getElementById( 'ccf-form-pane-template' ).innerHTML ),
|
880 |
subViews: {
|
881 |
'field-sidebar': wp.ccf.views.FieldSidebar,
|
882 |
+
'form-settings': wp.ccf.views.FormSettings,
|
883 |
+
'form-notifications': wp.ccf.views.FormNotifications
|
884 |
},
|
885 |
|
886 |
events: {
|
940 |
|
941 |
var $settings = $.Deferred();
|
942 |
var $field = $.Deferred();
|
943 |
+
var $notifications = $.Deferred();
|
944 |
|
945 |
wp.ccf.dispatcher.trigger( 'saveFormSettings', $settings );
|
946 |
+
wp.ccf.dispatcher.trigger( 'saveFormNotifications', $notifications );
|
947 |
wp.ccf.dispatcher.trigger( 'saveField', $field );
|
948 |
|
949 |
+
$.when( $settings, $field, $notifications ).then( function() {
|
950 |
var fields = SELF.model.get( 'fields' );
|
951 |
var allReqsMet = true;
|
952 |
var slugs = {};
|
languages/custom-contact-forms.mo
CHANGED
Binary file
|
languages/custom-contact-forms.po
CHANGED
@@ -5,8 +5,8 @@ msgstr ""
|
|
5 |
"Project-Id-Version: Custom Contact Forms\n"
|
6 |
"Report-Msgid-Bugs-To: https://github.com/tlovett1/editorial-access-manager/"
|
7 |
"issues\n"
|
8 |
-
"POT-Creation-Date: 2015-01-
|
9 |
-
"PO-Revision-Date: 2015-01-
|
10 |
"Last-Translator: Taylor Lovett <tlovett88@gmail.com>\n"
|
11 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
12 |
"Language: en\n"
|
@@ -23,34 +23,34 @@ msgstr ""
|
|
23 |
"X-Textdomain-Support: yes\n"
|
24 |
"X-Poedit-SearchPath-0: ..\n"
|
25 |
|
26 |
-
#: ../classes/class-ccf-api.php:
|
27 |
-
#: ../classes/class-ccf-api.php:
|
28 |
-
#: ../classes/class-ccf-api.php:
|
29 |
msgid "Invalid form ID."
|
30 |
msgstr ""
|
31 |
|
32 |
-
#: ../classes/class-ccf-api.php:
|
33 |
-
#: ../classes/class-ccf-api.php:
|
34 |
msgid "Sorry, you cannot view forms."
|
35 |
msgstr ""
|
36 |
|
37 |
-
#: ../classes/class-ccf-api.php:
|
38 |
msgid "Invalid form."
|
39 |
msgstr ""
|
40 |
|
41 |
-
#: ../classes/class-ccf-api.php:
|
42 |
msgid "Sorry, you cannot view this form."
|
43 |
msgstr ""
|
44 |
|
45 |
-
#: ../classes/class-ccf-api.php:
|
46 |
msgid "The form cannot be deleted."
|
47 |
msgstr ""
|
48 |
|
49 |
-
#: ../classes/class-ccf-api.php:
|
50 |
msgid "Permanently deleted form"
|
51 |
msgstr ""
|
52 |
|
53 |
-
#: ../classes/class-ccf-api.php:
|
54 |
#: ../vendor/wp-api/wp-api/lib/class-wp-json-posts.php:381
|
55 |
msgid "Deleted post"
|
56 |
msgstr ""
|
@@ -69,40 +69,40 @@ msgstr ""
|
|
69 |
|
70 |
#: ../classes/class-ccf-field-renderer.php:812
|
71 |
#: ../classes/class-ccf-field-renderer.php:832
|
72 |
-
#: ../classes/class-ccf-form-manager.php:
|
73 |
-
#: ../classes/class-ccf-form-manager.php:
|
74 |
msgid "HH"
|
75 |
msgstr ""
|
76 |
|
77 |
#: ../classes/class-ccf-field-renderer.php:816
|
78 |
#: ../classes/class-ccf-field-renderer.php:836
|
79 |
-
#: ../classes/class-ccf-form-manager.php:
|
80 |
-
#: ../classes/class-ccf-form-manager.php:
|
81 |
msgid "MM"
|
82 |
msgstr ""
|
83 |
|
84 |
#: ../classes/class-ccf-field-renderer.php:820
|
85 |
#: ../classes/class-ccf-field-renderer.php:840
|
86 |
-
#: ../classes/class-ccf-form-manager.php:
|
87 |
-
#: ../classes/class-ccf-form-manager.php:
|
88 |
msgid "AM"
|
89 |
msgstr ""
|
90 |
|
91 |
#: ../classes/class-ccf-field-renderer.php:821
|
92 |
#: ../classes/class-ccf-field-renderer.php:841
|
93 |
-
#: ../classes/class-ccf-form-manager.php:
|
94 |
-
#: ../classes/class-ccf-form-manager.php:
|
95 |
msgid "PM"
|
96 |
msgstr ""
|
97 |
|
98 |
#: ../classes/class-ccf-field-renderer.php:827
|
99 |
#: ../classes/class-ccf-form-cpt.php:306
|
100 |
-
#: ../classes/class-ccf-form-manager.php:
|
101 |
-
#: ../classes/class-ccf-form-manager.php:
|
102 |
-
#: ../classes/class-ccf-form-manager.php:
|
103 |
-
#: ../classes/class-ccf-form-manager.php:
|
104 |
-
#: ../classes/class-ccf-form-manager.php:
|
105 |
-
#: ../classes/class-ccf-form-manager.php:
|
106 |
msgid "Date"
|
107 |
msgstr ""
|
108 |
|
@@ -112,8 +112,8 @@ msgstr ""
|
|
112 |
|
113 |
#: ../classes/class-ccf-form-cpt.php:123 ../classes/class-ccf-form-cpt.php:141
|
114 |
#: ../classes/class-ccf-form-cpt.php:304
|
115 |
-
#: ../classes/class-ccf-form-manager.php:
|
116 |
-
#: ../classes/class-ccf-form-manager.php:
|
117 |
msgid "Submissions"
|
118 |
msgstr ""
|
119 |
|
@@ -162,14 +162,14 @@ msgid "Form Title"
|
|
162 |
msgstr ""
|
163 |
|
164 |
#: ../classes/class-ccf-form-cpt.php:303
|
165 |
-
#: ../classes/class-ccf-form-manager.php:
|
166 |
-
#: ../classes/class-ccf-form-manager.php:
|
167 |
msgid "Author"
|
168 |
msgstr ""
|
169 |
|
170 |
#: ../classes/class-ccf-form-cpt.php:305
|
171 |
-
#: ../classes/class-ccf-form-manager.php:
|
172 |
-
#: ../classes/class-ccf-form-manager.php:
|
173 |
msgid "Number of Fields"
|
174 |
msgstr ""
|
175 |
|
@@ -199,7 +199,7 @@ msgid "Form"
|
|
199 |
msgstr ""
|
200 |
|
201 |
#: ../classes/class-ccf-form-cpt.php:368 ../classes/class-ccf-form-cpt.php:371
|
202 |
-
#: ../classes/class-ccf-form-manager.php:
|
203 |
msgid "New Form"
|
204 |
msgstr ""
|
205 |
|
@@ -336,497 +336,535 @@ msgstr ""
|
|
336 |
msgid "AM/PM is required."
|
337 |
msgstr ""
|
338 |
|
339 |
-
#: ../classes/class-ccf-form-handler.php:
|
340 |
msgid "Form submitted from"
|
341 |
msgstr ""
|
342 |
|
343 |
-
#: ../classes/class-ccf-form-handler.php:
|
344 |
#, php-format
|
345 |
msgid "%s: Form Submission to \"%s\""
|
346 |
msgstr ""
|
347 |
|
348 |
-
#: ../classes/class-ccf-form-handler.php:
|
349 |
#: ../classes/class-ccf-form-renderer.php:120
|
350 |
msgid "Thank you for your submission."
|
351 |
msgstr ""
|
352 |
|
353 |
-
#: ../classes/class-ccf-form-manager.php:
|
354 |
msgid "Manage Forms"
|
355 |
msgstr ""
|
356 |
|
357 |
-
#: ../classes/class-ccf-form-manager.php:
|
358 |
msgid "Existing Forms"
|
359 |
msgstr ""
|
360 |
|
361 |
-
#: ../classes/class-ccf-form-manager.php:
|
362 |
msgid "Standard Fields"
|
363 |
msgstr ""
|
364 |
|
365 |
-
#: ../classes/class-ccf-form-manager.php:
|
366 |
msgid "Special Fields"
|
367 |
msgstr ""
|
368 |
|
369 |
-
#: ../classes/class-ccf-form-manager.php:
|
370 |
msgid "Structure"
|
371 |
msgstr ""
|
372 |
|
373 |
-
#: ../classes/class-ccf-form-manager.php:
|
374 |
msgid "→ Drag fields here to add them"
|
375 |
msgstr ""
|
376 |
|
377 |
-
#: ../classes/class-ccf-form-manager.php:
|
378 |
-
#: ../classes/class-ccf-form-manager.php:
|
379 |
msgid "Insert into post"
|
380 |
msgstr ""
|
381 |
|
382 |
-
#: ../classes/class-ccf-form-manager.php:
|
383 |
msgid "Save Form"
|
384 |
msgstr ""
|
385 |
|
386 |
-
#: ../classes/class-ccf-form-manager.php:
|
387 |
msgid "Form Settings"
|
388 |
msgstr ""
|
389 |
|
390 |
-
#: ../classes/class-ccf-form-manager.php:
|
391 |
msgid "Form Title:"
|
392 |
msgstr ""
|
393 |
|
394 |
-
#: ../classes/class-ccf-form-manager.php:
|
395 |
msgid "Form Description:"
|
396 |
msgstr ""
|
397 |
|
398 |
-
#: ../classes/class-ccf-form-manager.php:
|
399 |
msgid "Button Text:"
|
400 |
msgstr ""
|
401 |
|
402 |
-
#: ../classes/class-ccf-form-manager.php:
|
403 |
msgid "On form completion:"
|
404 |
msgstr ""
|
405 |
|
406 |
-
#: ../classes/class-ccf-form-manager.php:
|
407 |
msgid "Show text"
|
408 |
msgstr ""
|
409 |
|
410 |
-
#: ../classes/class-ccf-form-manager.php:
|
411 |
msgid "Redirect"
|
412 |
msgstr ""
|
413 |
|
414 |
-
#: ../classes/class-ccf-form-manager.php:
|
415 |
msgid "Redirect URL:"
|
416 |
msgstr ""
|
417 |
|
418 |
-
#: ../classes/class-ccf-form-manager.php:
|
419 |
msgid "Completion Message:"
|
420 |
msgstr ""
|
421 |
|
422 |
-
#: ../classes/class-ccf-form-manager.php:
|
423 |
-
msgid "
|
424 |
msgstr ""
|
425 |
|
426 |
-
#: ../classes/class-ccf-form-manager.php:
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
#: ../classes/class-ccf-form-manager.php:
|
431 |
-
#: ../classes/class-ccf-form-manager.php:
|
432 |
-
#: ../classes/class-ccf-form-manager.php:
|
433 |
-
#: ../classes/class-ccf-form-manager.php:
|
434 |
-
#: ../classes/class-ccf-form-manager.php:
|
435 |
-
#: ../classes/class-ccf-form-manager.php:
|
436 |
-
#: ../classes/class-ccf-form-manager.php:
|
437 |
-
#: ../classes/class-ccf-form-manager.php:
|
438 |
-
#: ../classes/class-ccf-form-manager.php:
|
|
|
|
|
|
|
|
|
439 |
msgid "Yes"
|
440 |
msgstr ""
|
441 |
|
442 |
-
#: ../classes/class-ccf-form-manager.php:
|
443 |
-
#: ../classes/class-ccf-form-manager.php:
|
444 |
-
#: ../classes/class-ccf-form-manager.php:
|
445 |
-
#: ../classes/class-ccf-form-manager.php:
|
446 |
-
#: ../classes/class-ccf-form-manager.php:
|
447 |
-
#: ../classes/class-ccf-form-manager.php:
|
448 |
-
#: ../classes/class-ccf-form-manager.php:
|
449 |
-
#: ../classes/class-ccf-form-manager.php:
|
450 |
-
#: ../classes/class-ccf-form-manager.php:
|
451 |
-
#: ../classes/class-ccf-form-manager.php:
|
452 |
-
#: ../classes/class-ccf-form-manager.php:
|
453 |
-
#: ../classes/class-ccf-form-manager.php:
|
454 |
-
#: ../classes/class-ccf-form-manager.php:
|
455 |
msgid "No"
|
456 |
msgstr ""
|
457 |
|
458 |
-
#: ../classes/class-ccf-form-manager.php:
|
459 |
-
msgid "Email Addresses (comma separated):"
|
460 |
msgstr ""
|
461 |
|
462 |
-
#: ../classes/class-ccf-form-manager.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
463 |
msgid "items"
|
464 |
msgstr ""
|
465 |
|
466 |
-
#: ../classes/class-ccf-form-manager.php:
|
467 |
-
#: ../classes/class-ccf-form-manager.php:
|
468 |
msgid "ID"
|
469 |
msgstr ""
|
470 |
|
471 |
-
#: ../classes/class-ccf-form-manager.php:
|
472 |
-
#: ../classes/class-ccf-form-manager.php:
|
473 |
msgid "Title"
|
474 |
msgstr ""
|
475 |
|
476 |
-
#: ../classes/class-ccf-form-manager.php:
|
477 |
msgid "<span>←</span> Click on a field to edit it."
|
478 |
msgstr ""
|
479 |
|
480 |
-
#: ../classes/class-ccf-form-manager.php:
|
481 |
-
#: ../classes/class-ccf-form-manager.php:
|
482 |
-
#: ../classes/class-ccf-form-manager.php:
|
483 |
msgid "Internal Unique Slug"
|
484 |
msgstr ""
|
485 |
|
486 |
-
#: ../classes/class-ccf-form-manager.php:
|
487 |
-
#: ../classes/class-ccf-form-manager.php:
|
488 |
-
#: ../classes/class-ccf-form-manager.php:
|
489 |
-
#: ../classes/class-ccf-form-manager.php:
|
490 |
-
#: ../classes/class-ccf-form-manager.php:
|
491 |
-
#: ../classes/class-ccf-form-manager.php:
|
492 |
-
#: ../classes/class-ccf-form-manager.php:
|
493 |
-
#: ../classes/class-ccf-form-manager.php:
|
494 |
-
#: ../classes/class-ccf-form-manager.php:
|
495 |
-
#: ../classes/class-ccf-form-manager.php:
|
496 |
-
#: ../classes/class-ccf-form-manager.php:
|
497 |
-
#: ../classes/class-ccf-form-manager.php:
|
498 |
msgid "Label:"
|
499 |
msgstr ""
|
500 |
|
501 |
-
#: ../classes/class-ccf-form-manager.php:
|
502 |
-
#: ../classes/class-ccf-form-manager.php:
|
503 |
-
#: ../classes/class-ccf-form-manager.php:
|
504 |
-
#: ../classes/class-ccf-form-manager.php:
|
505 |
-
#: ../classes/class-ccf-form-manager.php:
|
506 |
-
#: ../classes/class-ccf-form-manager.php:
|
507 |
-
#: ../classes/class-ccf-form-manager.php:
|
508 |
msgid "Initial Value:"
|
509 |
msgstr ""
|
510 |
|
511 |
-
#: ../classes/class-ccf-form-manager.php:
|
512 |
-
#: ../classes/class-ccf-form-manager.php:
|
513 |
-
#: ../classes/class-ccf-form-manager.php:
|
514 |
-
#: ../classes/class-ccf-form-manager.php:
|
515 |
-
#: ../classes/class-ccf-form-manager.php:
|
516 |
-
#: ../classes/class-ccf-form-manager.php:
|
517 |
-
#: ../classes/class-ccf-form-manager.php:
|
518 |
-
#: ../classes/class-ccf-form-manager.php:
|
519 |
-
#: ../classes/class-ccf-form-manager.php:
|
520 |
-
#: ../classes/class-ccf-form-manager.php:
|
521 |
-
#: ../classes/class-ccf-form-manager.php:
|
522 |
msgid "Required:"
|
523 |
msgstr ""
|
524 |
|
525 |
-
#: ../classes/class-ccf-form-manager.php:
|
526 |
-
#: ../classes/class-ccf-form-manager.php:
|
527 |
-
#: ../classes/class-ccf-form-manager.php:
|
528 |
-
#: ../classes/class-ccf-form-manager.php:
|
529 |
-
#: ../classes/class-ccf-form-manager.php:
|
530 |
-
#: ../classes/class-ccf-form-manager.php:
|
531 |
-
#: ../classes/class-ccf-form-manager.php:
|
532 |
-
#: ../classes/class-ccf-form-manager.php:
|
533 |
-
#: ../classes/class-ccf-form-manager.php:
|
534 |
-
#: ../classes/class-ccf-form-manager.php:
|
535 |
-
#: ../classes/class-ccf-form-manager.php:
|
536 |
-
#: ../classes/class-ccf-form-manager.php:
|
537 |
-
#: ../classes/class-ccf-form-manager.php:
|
538 |
-
#: ../classes/class-ccf-form-manager.php:
|
539 |
-
#: ../classes/class-ccf-form-manager.php:
|
540 |
msgid "Advanced"
|
541 |
msgstr ""
|
542 |
|
543 |
-
#: ../classes/class-ccf-form-manager.php:
|
544 |
-
#: ../classes/class-ccf-form-manager.php:
|
545 |
-
#: ../classes/class-ccf-form-manager.php:
|
546 |
-
#: ../classes/class-ccf-form-manager.php:
|
547 |
-
#: ../classes/class-ccf-form-manager.php:
|
548 |
-
#: ../classes/class-ccf-form-manager.php:
|
549 |
-
#: ../classes/class-ccf-form-manager.php:
|
550 |
-
#: ../classes/class-ccf-form-manager.php:
|
551 |
-
#: ../classes/class-ccf-form-manager.php:
|
552 |
-
#: ../classes/class-ccf-form-manager.php:
|
553 |
-
#: ../classes/class-ccf-form-manager.php:
|
554 |
-
#: ../classes/class-ccf-form-manager.php:
|
555 |
-
#: ../classes/class-ccf-form-manager.php:
|
556 |
-
#: ../classes/class-ccf-form-manager.php:
|
557 |
-
#: ../classes/class-ccf-form-manager.php:
|
558 |
msgid "Class Name:"
|
559 |
msgstr ""
|
560 |
|
561 |
-
#: ../classes/class-ccf-form-manager.php:
|
562 |
-
#: ../classes/class-ccf-form-manager.php:
|
563 |
-
#: ../classes/class-ccf-form-manager.php:
|
564 |
-
#: ../classes/class-ccf-form-manager.php:
|
565 |
-
#: ../classes/class-ccf-form-manager.php:
|
566 |
-
#: ../classes/class-ccf-form-manager.php:
|
567 |
msgid "Placeholder Text:"
|
568 |
msgstr ""
|
569 |
|
570 |
-
#: ../classes/class-ccf-form-manager.php:
|
571 |
msgid ""
|
572 |
"reCAPTCHA is a simple captcha service provided by Google. <a target=\"_blank"
|
573 |
"\" href=\"https://www.google.com/recaptcha/intro/index.html\">Learn more</a>"
|
574 |
msgstr ""
|
575 |
|
576 |
-
#: ../classes/class-ccf-form-manager.php:
|
577 |
msgid "Site Key:"
|
578 |
msgstr ""
|
579 |
|
580 |
-
#: ../classes/class-ccf-form-manager.php:
|
581 |
-
#: ../classes/class-ccf-form-manager.php:
|
582 |
msgid "Don't have one?"
|
583 |
msgstr ""
|
584 |
|
585 |
-
#: ../classes/class-ccf-form-manager.php:
|
586 |
msgid "Secret Key:"
|
587 |
msgstr ""
|
588 |
|
589 |
-
#: ../classes/class-ccf-form-manager.php:
|
590 |
-
#: ../classes/class-ccf-form-manager.php:
|
591 |
-
#: ../classes/class-ccf-form-manager.php:
|
592 |
-
#: ../classes/class-ccf-form-manager.php:
|
593 |
-
#: ../classes/class-ccf-form-manager.php:
|
594 |
-
#: ../classes/class-ccf-form-manager.php:
|
595 |
-
#: ../classes/class-ccf-form-manager.php:
|
596 |
-
#: ../classes/class-ccf-form-manager.php:
|
597 |
-
#: ../classes/class-ccf-form-manager.php:
|
598 |
-
#: ../classes/class-ccf-form-manager.php:
|
599 |
-
#: ../classes/class-ccf-form-manager.php:
|
600 |
-
#: ../classes/class-ccf-form-manager.php:
|
601 |
msgid "Basic"
|
602 |
msgstr ""
|
603 |
|
604 |
-
#: ../classes/class-ccf-form-manager.php:
|
605 |
msgid "HTML Content:"
|
606 |
msgstr ""
|
607 |
|
608 |
-
#: ../classes/class-ccf-form-manager.php:
|
609 |
msgid "Heading:"
|
610 |
msgstr ""
|
611 |
|
612 |
-
#: ../classes/class-ccf-form-manager.php:
|
613 |
msgid "Sub Heading:"
|
614 |
msgstr ""
|
615 |
|
616 |
-
#: ../classes/class-ccf-form-manager.php:
|
617 |
-
#: ../classes/class-ccf-form-manager.php:
|
618 |
-
#: ../classes/class-ccf-form-manager.php:
|
619 |
-
#: ../classes/class-ccf-form-manager.php:
|
620 |
-
#: ../classes/class-ccf-form-manager.php:
|
621 |
-
#: ../classes/class-ccf-form-manager.php:
|
622 |
-
#: ../classes/class-ccf-form-manager.php:
|
623 |
-
#: ../classes/class-ccf-form-manager.php:
|
624 |
-
#: ../classes/class-ccf-form-manager.php:
|
625 |
msgid "Internal Unique Slug (a-z, 0-9, -, _):"
|
626 |
msgstr ""
|
627 |
|
628 |
-
#: ../classes/class-ccf-form-manager.php:
|
629 |
msgid "Enable Date Select"
|
630 |
msgstr ""
|
631 |
|
632 |
-
#: ../classes/class-ccf-form-manager.php:
|
633 |
msgid "Enable Time Select"
|
634 |
msgstr ""
|
635 |
|
636 |
-
#: ../classes/class-ccf-form-manager.php:
|
637 |
msgid "Format:"
|
638 |
msgstr ""
|
639 |
|
640 |
-
#: ../classes/class-ccf-form-manager.php:
|
641 |
-
#: ../classes/class-ccf-form-manager.php:
|
642 |
msgid "International"
|
643 |
msgstr ""
|
644 |
|
645 |
-
#: ../classes/class-ccf-form-manager.php:
|
646 |
msgid "Type:"
|
647 |
msgstr ""
|
648 |
|
649 |
-
#: ../classes/class-ccf-form-manager.php:
|
650 |
msgid "United States"
|
651 |
msgstr ""
|
652 |
|
653 |
-
#: ../classes/class-ccf-form-manager.php:
|
654 |
msgid "Require Confirmation:"
|
655 |
msgstr ""
|
656 |
|
657 |
-
#: ../classes/class-ccf-form-manager.php:
|
658 |
msgid "Label"
|
659 |
msgstr ""
|
660 |
|
661 |
-
#: ../classes/class-ccf-form-manager.php:
|
662 |
msgid "Value"
|
663 |
msgstr ""
|
664 |
|
665 |
-
#: ../classes/class-ccf-form-manager.php:
|
666 |
-
#: ../classes/class-ccf-form-manager.php:
|
667 |
-
#: ../classes/class-ccf-form-manager.php:
|
668 |
msgid "Manage field choices:"
|
669 |
msgstr ""
|
670 |
|
671 |
-
#: ../classes/class-ccf-form-manager.php:
|
672 |
-
#: ../classes/class-ccf-form-manager.php:
|
673 |
-
#: ../classes/class-ccf-form-manager.php:
|
674 |
msgid "An example choice"
|
675 |
msgstr ""
|
676 |
|
677 |
-
#: ../classes/class-ccf-form-manager.php:
|
678 |
msgid "Arbitrary block of HTML."
|
679 |
msgstr ""
|
680 |
|
681 |
-
#: ../classes/class-ccf-form-manager.php:
|
682 |
msgid "Section Heading"
|
683 |
msgstr ""
|
684 |
|
685 |
-
#: ../classes/class-ccf-form-manager.php:
|
686 |
msgid "This is the sub-heading text."
|
687 |
msgstr ""
|
688 |
|
689 |
-
#: ../classes/class-ccf-form-manager.php:
|
690 |
msgid "First"
|
691 |
msgstr ""
|
692 |
|
693 |
-
#: ../classes/class-ccf-form-manager.php:
|
694 |
msgid "Last"
|
695 |
msgstr ""
|
696 |
|
697 |
-
#: ../classes/class-ccf-form-manager.php:
|
698 |
-
#: ../classes/class-ccf-form-manager.php:
|
699 |
msgid "Street Address"
|
700 |
msgstr ""
|
701 |
|
702 |
-
#: ../classes/class-ccf-form-manager.php:
|
703 |
-
#: ../classes/class-ccf-form-manager.php:
|
704 |
msgid "Address Line 2"
|
705 |
msgstr ""
|
706 |
|
707 |
-
#: ../classes/class-ccf-form-manager.php:
|
708 |
-
#: ../classes/class-ccf-form-manager.php:
|
709 |
msgid "City"
|
710 |
msgstr ""
|
711 |
|
712 |
-
#: ../classes/class-ccf-form-manager.php:
|
713 |
msgid "State"
|
714 |
msgstr ""
|
715 |
|
716 |
-
#: ../classes/class-ccf-form-manager.php:
|
717 |
msgid "ZIP Code"
|
718 |
msgstr ""
|
719 |
|
720 |
-
#: ../classes/class-ccf-form-manager.php:
|
721 |
msgid "State / Region / Province"
|
722 |
msgstr ""
|
723 |
|
724 |
-
#: ../classes/class-ccf-form-manager.php:
|
725 |
msgid "ZIP / Postal Code"
|
726 |
msgstr ""
|
727 |
|
728 |
-
#: ../classes/class-ccf-form-manager.php:
|
729 |
msgid "Country"
|
730 |
msgstr ""
|
731 |
|
732 |
-
#: ../classes/class-ccf-form-manager.php:
|
733 |
msgid "email@example.com"
|
734 |
msgstr ""
|
735 |
|
736 |
-
#: ../classes/class-ccf-form-manager.php:
|
737 |
-
#: ../classes/class-ccf-form-manager.php:
|
738 |
msgid "Email"
|
739 |
msgstr ""
|
740 |
|
741 |
-
#: ../classes/class-ccf-form-manager.php:
|
742 |
msgid "Confirm Email"
|
743 |
msgstr ""
|
744 |
|
745 |
-
#: ../classes/class-ccf-form-manager.php:
|
746 |
msgid "Edit"
|
747 |
msgstr ""
|
748 |
|
749 |
-
#: ../classes/class-ccf-form-manager.php:
|
750 |
msgid "Trash"
|
751 |
msgstr ""
|
752 |
|
753 |
-
#: ../classes/class-ccf-form-manager.php:
|
754 |
msgid "There is a problem with this form. Is it trashed or deleted?"
|
755 |
msgstr ""
|
756 |
|
757 |
-
#: ../classes/class-ccf-form-manager.php:
|
758 |
msgid "-"
|
759 |
msgstr ""
|
760 |
|
761 |
-
#: ../classes/class-ccf-form-manager.php:
|
762 |
msgid "There are no submissions."
|
763 |
msgstr ""
|
764 |
|
765 |
-
#: ../classes/class-ccf-form-manager.php:
|
766 |
msgid "Add Form"
|
767 |
msgstr ""
|
768 |
|
769 |
-
#: ../classes/class-ccf-form-manager.php:
|
770 |
msgid "Single Line Text"
|
771 |
msgstr ""
|
772 |
|
773 |
-
#: ../classes/class-ccf-form-manager.php:
|
774 |
msgid "Dropdown"
|
775 |
msgstr ""
|
776 |
|
777 |
-
#: ../classes/class-ccf-form-manager.php:
|
778 |
msgid "Checkboxes"
|
779 |
msgstr ""
|
780 |
|
781 |
-
#: ../classes/class-ccf-form-manager.php:
|
782 |
msgid "Radio Buttons"
|
783 |
msgstr ""
|
784 |
|
785 |
-
#: ../classes/class-ccf-form-manager.php:
|
786 |
msgid "Paragraph Text"
|
787 |
msgstr ""
|
788 |
|
789 |
-
#: ../classes/class-ccf-form-manager.php:
|
790 |
msgid "Hidden"
|
791 |
msgstr ""
|
792 |
|
793 |
-
#: ../classes/class-ccf-form-manager.php:
|
794 |
msgid "HTML"
|
795 |
msgstr ""
|
796 |
|
797 |
-
#: ../classes/class-ccf-form-manager.php:
|
798 |
msgid "Section Header"
|
799 |
msgstr ""
|
800 |
|
801 |
-
#: ../classes/class-ccf-form-manager.php:
|
802 |
msgid "Name"
|
803 |
msgstr ""
|
804 |
|
805 |
-
#: ../classes/class-ccf-form-manager.php:
|
806 |
msgid "Date/Time"
|
807 |
msgstr ""
|
808 |
|
809 |
-
#: ../classes/class-ccf-form-manager.php:
|
810 |
msgid "Website"
|
811 |
msgstr ""
|
812 |
|
813 |
-
#: ../classes/class-ccf-form-manager.php:
|
814 |
msgid "Address"
|
815 |
msgstr ""
|
816 |
|
817 |
-
#: ../classes/class-ccf-form-manager.php:
|
818 |
msgid "Phone"
|
819 |
msgstr ""
|
820 |
|
821 |
-
#: ../classes/class-ccf-form-manager.php:
|
822 |
msgid "reCAPTCHA"
|
823 |
msgstr ""
|
824 |
|
825 |
-
#: ../classes/class-ccf-form-manager.php:
|
826 |
msgid "Invalid date"
|
827 |
msgstr ""
|
828 |
|
829 |
-
#: ../classes/class-ccf-form-manager.php:
|
830 |
msgid "Form Submission"
|
831 |
msgstr ""
|
832 |
|
5 |
"Project-Id-Version: Custom Contact Forms\n"
|
6 |
"Report-Msgid-Bugs-To: https://github.com/tlovett1/editorial-access-manager/"
|
7 |
"issues\n"
|
8 |
+
"POT-Creation-Date: 2015-01-22 15:33-0000\n"
|
9 |
+
"PO-Revision-Date: 2015-01-22 15:33-0000\n"
|
10 |
"Last-Translator: Taylor Lovett <tlovett88@gmail.com>\n"
|
11 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
12 |
"Language: en\n"
|
23 |
"X-Textdomain-Support: yes\n"
|
24 |
"X-Poedit-SearchPath-0: ..\n"
|
25 |
|
26 |
+
#: ../classes/class-ccf-api.php:255 ../classes/class-ccf-api.php:550
|
27 |
+
#: ../classes/class-ccf-api.php:575 ../classes/class-ccf-api.php:604
|
28 |
+
#: ../classes/class-ccf-api.php:697
|
29 |
msgid "Invalid form ID."
|
30 |
msgstr ""
|
31 |
|
32 |
+
#: ../classes/class-ccf-api.php:260 ../classes/class-ccf-api.php:535
|
33 |
+
#: ../classes/class-ccf-api.php:555
|
34 |
msgid "Sorry, you cannot view forms."
|
35 |
msgstr ""
|
36 |
|
37 |
+
#: ../classes/class-ccf-api.php:581 ../classes/class-ccf-api.php:610
|
38 |
msgid "Invalid form."
|
39 |
msgstr ""
|
40 |
|
41 |
+
#: ../classes/class-ccf-api.php:585
|
42 |
msgid "Sorry, you cannot view this form."
|
43 |
msgstr ""
|
44 |
|
45 |
+
#: ../classes/class-ccf-api.php:708
|
46 |
msgid "The form cannot be deleted."
|
47 |
msgstr ""
|
48 |
|
49 |
+
#: ../classes/class-ccf-api.php:712
|
50 |
msgid "Permanently deleted form"
|
51 |
msgstr ""
|
52 |
|
53 |
+
#: ../classes/class-ccf-api.php:715
|
54 |
#: ../vendor/wp-api/wp-api/lib/class-wp-json-posts.php:381
|
55 |
msgid "Deleted post"
|
56 |
msgstr ""
|
69 |
|
70 |
#: ../classes/class-ccf-field-renderer.php:812
|
71 |
#: ../classes/class-ccf-field-renderer.php:832
|
72 |
+
#: ../classes/class-ccf-form-manager.php:924
|
73 |
+
#: ../classes/class-ccf-form-manager.php:945
|
74 |
msgid "HH"
|
75 |
msgstr ""
|
76 |
|
77 |
#: ../classes/class-ccf-field-renderer.php:816
|
78 |
#: ../classes/class-ccf-field-renderer.php:836
|
79 |
+
#: ../classes/class-ccf-form-manager.php:928
|
80 |
+
#: ../classes/class-ccf-form-manager.php:949
|
81 |
msgid "MM"
|
82 |
msgstr ""
|
83 |
|
84 |
#: ../classes/class-ccf-field-renderer.php:820
|
85 |
#: ../classes/class-ccf-field-renderer.php:840
|
86 |
+
#: ../classes/class-ccf-form-manager.php:932
|
87 |
+
#: ../classes/class-ccf-form-manager.php:953
|
88 |
msgid "AM"
|
89 |
msgstr ""
|
90 |
|
91 |
#: ../classes/class-ccf-field-renderer.php:821
|
92 |
#: ../classes/class-ccf-field-renderer.php:841
|
93 |
+
#: ../classes/class-ccf-form-manager.php:933
|
94 |
+
#: ../classes/class-ccf-form-manager.php:954
|
95 |
msgid "PM"
|
96 |
msgstr ""
|
97 |
|
98 |
#: ../classes/class-ccf-field-renderer.php:827
|
99 |
#: ../classes/class-ccf-form-cpt.php:306
|
100 |
+
#: ../classes/class-ccf-form-manager.php:231
|
101 |
+
#: ../classes/class-ccf-form-manager.php:244
|
102 |
+
#: ../classes/class-ccf-form-manager.php:940
|
103 |
+
#: ../classes/class-ccf-form-manager.php:1108
|
104 |
+
#: ../classes/class-ccf-form-manager.php:1122
|
105 |
+
#: ../classes/class-ccf-form-manager.php:1225
|
106 |
msgid "Date"
|
107 |
msgstr ""
|
108 |
|
112 |
|
113 |
#: ../classes/class-ccf-form-cpt.php:123 ../classes/class-ccf-form-cpt.php:141
|
114 |
#: ../classes/class-ccf-form-cpt.php:304
|
115 |
+
#: ../classes/class-ccf-form-manager.php:234
|
116 |
+
#: ../classes/class-ccf-form-manager.php:247
|
117 |
msgid "Submissions"
|
118 |
msgstr ""
|
119 |
|
162 |
msgstr ""
|
163 |
|
164 |
#: ../classes/class-ccf-form-cpt.php:303
|
165 |
+
#: ../classes/class-ccf-form-manager.php:232
|
166 |
+
#: ../classes/class-ccf-form-manager.php:245
|
167 |
msgid "Author"
|
168 |
msgstr ""
|
169 |
|
170 |
#: ../classes/class-ccf-form-cpt.php:305
|
171 |
+
#: ../classes/class-ccf-form-manager.php:233
|
172 |
+
#: ../classes/class-ccf-form-manager.php:246
|
173 |
msgid "Number of Fields"
|
174 |
msgstr ""
|
175 |
|
199 |
msgstr ""
|
200 |
|
201 |
#: ../classes/class-ccf-form-cpt.php:368 ../classes/class-ccf-form-cpt.php:371
|
202 |
+
#: ../classes/class-ccf-form-manager.php:60
|
203 |
msgid "New Form"
|
204 |
msgstr ""
|
205 |
|
336 |
msgid "AM/PM is required."
|
337 |
msgstr ""
|
338 |
|
339 |
+
#: ../classes/class-ccf-form-handler.php:611
|
340 |
msgid "Form submitted from"
|
341 |
msgstr ""
|
342 |
|
343 |
+
#: ../classes/class-ccf-form-handler.php:640
|
344 |
#, php-format
|
345 |
msgid "%s: Form Submission to \"%s\""
|
346 |
msgstr ""
|
347 |
|
348 |
+
#: ../classes/class-ccf-form-handler.php:653
|
349 |
#: ../classes/class-ccf-form-renderer.php:120
|
350 |
msgid "Thank you for your submission."
|
351 |
msgstr ""
|
352 |
|
353 |
+
#: ../classes/class-ccf-form-manager.php:57
|
354 |
msgid "Manage Forms"
|
355 |
msgstr ""
|
356 |
|
357 |
+
#: ../classes/class-ccf-form-manager.php:61
|
358 |
msgid "Existing Forms"
|
359 |
msgstr ""
|
360 |
|
361 |
+
#: ../classes/class-ccf-form-manager.php:85
|
362 |
msgid "Standard Fields"
|
363 |
msgstr ""
|
364 |
|
365 |
+
#: ../classes/class-ccf-form-manager.php:91
|
366 |
msgid "Special Fields"
|
367 |
msgstr ""
|
368 |
|
369 |
+
#: ../classes/class-ccf-form-manager.php:97
|
370 |
msgid "Structure"
|
371 |
msgstr ""
|
372 |
|
373 |
+
#: ../classes/class-ccf-form-manager.php:108
|
374 |
msgid "→ Drag fields here to add them"
|
375 |
msgstr ""
|
376 |
|
377 |
+
#: ../classes/class-ccf-form-manager.php:115
|
378 |
+
#: ../classes/class-ccf-form-manager.php:1053
|
379 |
msgid "Insert into post"
|
380 |
msgstr ""
|
381 |
|
382 |
+
#: ../classes/class-ccf-form-manager.php:116
|
383 |
msgid "Save Form"
|
384 |
msgstr ""
|
385 |
|
386 |
+
#: ../classes/class-ccf-form-manager.php:122
|
387 |
msgid "Form Settings"
|
388 |
msgstr ""
|
389 |
|
390 |
+
#: ../classes/class-ccf-form-manager.php:125
|
391 |
msgid "Form Title:"
|
392 |
msgstr ""
|
393 |
|
394 |
+
#: ../classes/class-ccf-form-manager.php:130
|
395 |
msgid "Form Description:"
|
396 |
msgstr ""
|
397 |
|
398 |
+
#: ../classes/class-ccf-form-manager.php:135
|
399 |
msgid "Button Text:"
|
400 |
msgstr ""
|
401 |
|
402 |
+
#: ../classes/class-ccf-form-manager.php:140
|
403 |
msgid "On form completion:"
|
404 |
msgstr ""
|
405 |
|
406 |
+
#: ../classes/class-ccf-form-manager.php:143
|
407 |
msgid "Show text"
|
408 |
msgstr ""
|
409 |
|
410 |
+
#: ../classes/class-ccf-form-manager.php:144
|
411 |
msgid "Redirect"
|
412 |
msgstr ""
|
413 |
|
414 |
+
#: ../classes/class-ccf-form-manager.php:148
|
415 |
msgid "Redirect URL:"
|
416 |
msgstr ""
|
417 |
|
418 |
+
#: ../classes/class-ccf-form-manager.php:152
|
419 |
msgid "Completion Message:"
|
420 |
msgstr ""
|
421 |
|
422 |
+
#: ../classes/class-ccf-form-manager.php:159
|
423 |
+
msgid "Form Notifications"
|
424 |
msgstr ""
|
425 |
|
426 |
+
#: ../classes/class-ccf-form-manager.php:162
|
427 |
+
msgid "Send Email Notifications:"
|
428 |
+
msgstr ""
|
429 |
+
|
430 |
+
#: ../classes/class-ccf-form-manager.php:165
|
431 |
+
#: ../classes/class-ccf-form-manager.php:280
|
432 |
+
#: ../classes/class-ccf-form-manager.php:352
|
433 |
+
#: ../classes/class-ccf-form-manager.php:438
|
434 |
+
#: ../classes/class-ccf-form-manager.php:499
|
435 |
+
#: ../classes/class-ccf-form-manager.php:537
|
436 |
+
#: ../classes/class-ccf-form-manager.php:594
|
437 |
+
#: ../classes/class-ccf-form-manager.php:637
|
438 |
+
#: ../classes/class-ccf-form-manager.php:675
|
439 |
+
#: ../classes/class-ccf-form-manager.php:682
|
440 |
+
#: ../classes/class-ccf-form-manager.php:729
|
441 |
+
#: ../classes/class-ccf-form-manager.php:766
|
442 |
+
#: ../classes/class-ccf-form-manager.php:803
|
443 |
msgid "Yes"
|
444 |
msgstr ""
|
445 |
|
446 |
+
#: ../classes/class-ccf-form-manager.php:166
|
447 |
+
#: ../classes/class-ccf-form-manager.php:281
|
448 |
+
#: ../classes/class-ccf-form-manager.php:353
|
449 |
+
#: ../classes/class-ccf-form-manager.php:439
|
450 |
+
#: ../classes/class-ccf-form-manager.php:500
|
451 |
+
#: ../classes/class-ccf-form-manager.php:538
|
452 |
+
#: ../classes/class-ccf-form-manager.php:595
|
453 |
+
#: ../classes/class-ccf-form-manager.php:638
|
454 |
+
#: ../classes/class-ccf-form-manager.php:676
|
455 |
+
#: ../classes/class-ccf-form-manager.php:683
|
456 |
+
#: ../classes/class-ccf-form-manager.php:730
|
457 |
+
#: ../classes/class-ccf-form-manager.php:767
|
458 |
+
#: ../classes/class-ccf-form-manager.php:804
|
459 |
msgid "No"
|
460 |
msgstr ""
|
461 |
|
462 |
+
#: ../classes/class-ccf-form-manager.php:171
|
463 |
+
msgid "\"To\" Email Addresses (comma separated):"
|
464 |
msgstr ""
|
465 |
|
466 |
+
#: ../classes/class-ccf-form-manager.php:176
|
467 |
+
msgid "\"From\" Email Address Type:"
|
468 |
+
msgstr ""
|
469 |
+
|
470 |
+
#: ../classes/class-ccf-form-manager.php:178
|
471 |
+
msgid "WordPress Default"
|
472 |
+
msgstr ""
|
473 |
+
|
474 |
+
#: ../classes/class-ccf-form-manager.php:179
|
475 |
+
msgid "Custom Email"
|
476 |
+
msgstr ""
|
477 |
+
|
478 |
+
#: ../classes/class-ccf-form-manager.php:180
|
479 |
+
msgid "Form Field"
|
480 |
+
msgstr ""
|
481 |
+
|
482 |
+
#: ../classes/class-ccf-form-manager.php:183
|
483 |
+
msgid ""
|
484 |
+
"You can set the notification emails from address to be the WP default, a "
|
485 |
+
"custom email address, or pull the address from a field in the form."
|
486 |
+
msgstr ""
|
487 |
+
|
488 |
+
#: ../classes/class-ccf-form-manager.php:187
|
489 |
+
msgid "Custom \"From\" Email Address:"
|
490 |
+
msgstr ""
|
491 |
+
|
492 |
+
#: ../classes/class-ccf-form-manager.php:192
|
493 |
+
msgid "Pull \"From\" Email Dynamically from Field:"
|
494 |
+
msgstr ""
|
495 |
+
|
496 |
+
#: ../classes/class-ccf-form-manager.php:194
|
497 |
+
msgid "There are no email fields in your form."
|
498 |
+
msgstr ""
|
499 |
+
|
500 |
+
#: ../classes/class-ccf-form-manager.php:214
|
501 |
msgid "items"
|
502 |
msgstr ""
|
503 |
|
504 |
+
#: ../classes/class-ccf-form-manager.php:229
|
505 |
+
#: ../classes/class-ccf-form-manager.php:242
|
506 |
msgid "ID"
|
507 |
msgstr ""
|
508 |
|
509 |
+
#: ../classes/class-ccf-form-manager.php:230
|
510 |
+
#: ../classes/class-ccf-form-manager.php:243
|
511 |
msgid "Title"
|
512 |
msgstr ""
|
513 |
|
514 |
+
#: ../classes/class-ccf-form-manager.php:257
|
515 |
msgid "<span>←</span> Click on a field to edit it."
|
516 |
msgstr ""
|
517 |
|
518 |
+
#: ../classes/class-ccf-form-manager.php:266
|
519 |
+
#: ../classes/class-ccf-form-manager.php:338
|
520 |
+
#: ../classes/class-ccf-form-manager.php:424
|
521 |
msgid "Internal Unique Slug"
|
522 |
msgstr ""
|
523 |
|
524 |
+
#: ../classes/class-ccf-form-manager.php:270
|
525 |
+
#: ../classes/class-ccf-form-manager.php:307
|
526 |
+
#: ../classes/class-ccf-form-manager.php:342
|
527 |
+
#: ../classes/class-ccf-form-manager.php:428
|
528 |
+
#: ../classes/class-ccf-form-manager.php:493
|
529 |
+
#: ../classes/class-ccf-form-manager.php:525
|
530 |
+
#: ../classes/class-ccf-form-manager.php:577
|
531 |
+
#: ../classes/class-ccf-form-manager.php:624
|
532 |
+
#: ../classes/class-ccf-form-manager.php:663
|
533 |
+
#: ../classes/class-ccf-form-manager.php:723
|
534 |
+
#: ../classes/class-ccf-form-manager.php:760
|
535 |
+
#: ../classes/class-ccf-form-manager.php:797
|
536 |
msgid "Label:"
|
537 |
msgstr ""
|
538 |
|
539 |
+
#: ../classes/class-ccf-form-manager.php:274
|
540 |
+
#: ../classes/class-ccf-form-manager.php:346
|
541 |
+
#: ../classes/class-ccf-form-manager.php:432
|
542 |
+
#: ../classes/class-ccf-form-manager.php:468
|
543 |
+
#: ../classes/class-ccf-form-manager.php:530
|
544 |
+
#: ../classes/class-ccf-form-manager.php:581
|
545 |
+
#: ../classes/class-ccf-form-manager.php:668
|
546 |
msgid "Initial Value:"
|
547 |
msgstr ""
|
548 |
|
549 |
+
#: ../classes/class-ccf-form-manager.php:278
|
550 |
+
#: ../classes/class-ccf-form-manager.php:350
|
551 |
+
#: ../classes/class-ccf-form-manager.php:436
|
552 |
+
#: ../classes/class-ccf-form-manager.php:497
|
553 |
+
#: ../classes/class-ccf-form-manager.php:535
|
554 |
+
#: ../classes/class-ccf-form-manager.php:592
|
555 |
+
#: ../classes/class-ccf-form-manager.php:635
|
556 |
+
#: ../classes/class-ccf-form-manager.php:673
|
557 |
+
#: ../classes/class-ccf-form-manager.php:727
|
558 |
+
#: ../classes/class-ccf-form-manager.php:764
|
559 |
+
#: ../classes/class-ccf-form-manager.php:801
|
560 |
msgid "Required:"
|
561 |
msgstr ""
|
562 |
|
563 |
+
#: ../classes/class-ccf-form-manager.php:287
|
564 |
+
#: ../classes/class-ccf-form-manager.php:323
|
565 |
+
#: ../classes/class-ccf-form-manager.php:359
|
566 |
+
#: ../classes/class-ccf-form-manager.php:384
|
567 |
+
#: ../classes/class-ccf-form-manager.php:409
|
568 |
+
#: ../classes/class-ccf-form-manager.php:445
|
569 |
+
#: ../classes/class-ccf-form-manager.php:474
|
570 |
+
#: ../classes/class-ccf-form-manager.php:506
|
571 |
+
#: ../classes/class-ccf-form-manager.php:552
|
572 |
+
#: ../classes/class-ccf-form-manager.php:601
|
573 |
+
#: ../classes/class-ccf-form-manager.php:644
|
574 |
+
#: ../classes/class-ccf-form-manager.php:689
|
575 |
+
#: ../classes/class-ccf-form-manager.php:741
|
576 |
+
#: ../classes/class-ccf-form-manager.php:778
|
577 |
+
#: ../classes/class-ccf-form-manager.php:815
|
578 |
msgid "Advanced"
|
579 |
msgstr ""
|
580 |
|
581 |
+
#: ../classes/class-ccf-form-manager.php:290
|
582 |
+
#: ../classes/class-ccf-form-manager.php:326
|
583 |
+
#: ../classes/class-ccf-form-manager.php:362
|
584 |
+
#: ../classes/class-ccf-form-manager.php:387
|
585 |
+
#: ../classes/class-ccf-form-manager.php:412
|
586 |
+
#: ../classes/class-ccf-form-manager.php:448
|
587 |
+
#: ../classes/class-ccf-form-manager.php:477
|
588 |
+
#: ../classes/class-ccf-form-manager.php:509
|
589 |
+
#: ../classes/class-ccf-form-manager.php:555
|
590 |
+
#: ../classes/class-ccf-form-manager.php:604
|
591 |
+
#: ../classes/class-ccf-form-manager.php:647
|
592 |
+
#: ../classes/class-ccf-form-manager.php:692
|
593 |
+
#: ../classes/class-ccf-form-manager.php:744
|
594 |
+
#: ../classes/class-ccf-form-manager.php:781
|
595 |
+
#: ../classes/class-ccf-form-manager.php:818
|
596 |
msgid "Class Name:"
|
597 |
msgstr ""
|
598 |
|
599 |
+
#: ../classes/class-ccf-form-manager.php:294
|
600 |
+
#: ../classes/class-ccf-form-manager.php:366
|
601 |
+
#: ../classes/class-ccf-form-manager.php:452
|
602 |
+
#: ../classes/class-ccf-form-manager.php:560
|
603 |
+
#: ../classes/class-ccf-form-manager.php:608
|
604 |
+
#: ../classes/class-ccf-form-manager.php:697
|
605 |
msgid "Placeholder Text:"
|
606 |
msgstr ""
|
607 |
|
608 |
+
#: ../classes/class-ccf-form-manager.php:305
|
609 |
msgid ""
|
610 |
"reCAPTCHA is a simple captcha service provided by Google. <a target=\"_blank"
|
611 |
"\" href=\"https://www.google.com/recaptcha/intro/index.html\">Learn more</a>"
|
612 |
msgstr ""
|
613 |
|
614 |
+
#: ../classes/class-ccf-form-manager.php:311
|
615 |
msgid "Site Key:"
|
616 |
msgstr ""
|
617 |
|
618 |
+
#: ../classes/class-ccf-form-manager.php:313
|
619 |
+
#: ../classes/class-ccf-form-manager.php:318
|
620 |
msgid "Don't have one?"
|
621 |
msgstr ""
|
622 |
|
623 |
+
#: ../classes/class-ccf-form-manager.php:316
|
624 |
msgid "Secret Key:"
|
625 |
msgstr ""
|
626 |
|
627 |
+
#: ../classes/class-ccf-form-manager.php:375
|
628 |
+
#: ../classes/class-ccf-form-manager.php:396
|
629 |
+
#: ../classes/class-ccf-form-manager.php:421
|
630 |
+
#: ../classes/class-ccf-form-manager.php:461
|
631 |
+
#: ../classes/class-ccf-form-manager.php:486
|
632 |
+
#: ../classes/class-ccf-form-manager.php:518
|
633 |
+
#: ../classes/class-ccf-form-manager.php:570
|
634 |
+
#: ../classes/class-ccf-form-manager.php:617
|
635 |
+
#: ../classes/class-ccf-form-manager.php:656
|
636 |
+
#: ../classes/class-ccf-form-manager.php:716
|
637 |
+
#: ../classes/class-ccf-form-manager.php:753
|
638 |
+
#: ../classes/class-ccf-form-manager.php:790
|
639 |
msgid "Basic"
|
640 |
msgstr ""
|
641 |
|
642 |
+
#: ../classes/class-ccf-form-manager.php:378
|
643 |
msgid "HTML Content:"
|
644 |
msgstr ""
|
645 |
|
646 |
+
#: ../classes/class-ccf-form-manager.php:399
|
647 |
msgid "Heading:"
|
648 |
msgstr ""
|
649 |
|
650 |
+
#: ../classes/class-ccf-form-manager.php:403
|
651 |
msgid "Sub Heading:"
|
652 |
msgstr ""
|
653 |
|
654 |
+
#: ../classes/class-ccf-form-manager.php:464
|
655 |
+
#: ../classes/class-ccf-form-manager.php:489
|
656 |
+
#: ../classes/class-ccf-form-manager.php:521
|
657 |
+
#: ../classes/class-ccf-form-manager.php:573
|
658 |
+
#: ../classes/class-ccf-form-manager.php:620
|
659 |
+
#: ../classes/class-ccf-form-manager.php:659
|
660 |
+
#: ../classes/class-ccf-form-manager.php:719
|
661 |
+
#: ../classes/class-ccf-form-manager.php:756
|
662 |
+
#: ../classes/class-ccf-form-manager.php:793
|
663 |
msgid "Internal Unique Slug (a-z, 0-9, -, _):"
|
664 |
msgstr ""
|
665 |
|
666 |
+
#: ../classes/class-ccf-form-manager.php:543
|
667 |
msgid "Enable Date Select"
|
668 |
msgstr ""
|
669 |
|
670 |
+
#: ../classes/class-ccf-form-manager.php:547
|
671 |
msgid "Enable Time Select"
|
672 |
msgstr ""
|
673 |
|
674 |
+
#: ../classes/class-ccf-form-manager.php:585
|
675 |
msgid "Format:"
|
676 |
msgstr ""
|
677 |
|
678 |
+
#: ../classes/class-ccf-form-manager.php:588
|
679 |
+
#: ../classes/class-ccf-form-manager.php:631
|
680 |
msgid "International"
|
681 |
msgstr ""
|
682 |
|
683 |
+
#: ../classes/class-ccf-form-manager.php:628
|
684 |
msgid "Type:"
|
685 |
msgstr ""
|
686 |
|
687 |
+
#: ../classes/class-ccf-form-manager.php:630
|
688 |
msgid "United States"
|
689 |
msgstr ""
|
690 |
|
691 |
+
#: ../classes/class-ccf-form-manager.php:680
|
692 |
msgid "Require Confirmation:"
|
693 |
msgstr ""
|
694 |
|
695 |
+
#: ../classes/class-ccf-form-manager.php:708
|
696 |
msgid "Label"
|
697 |
msgstr ""
|
698 |
|
699 |
+
#: ../classes/class-ccf-form-manager.php:709
|
700 |
msgid "Value"
|
701 |
msgstr ""
|
702 |
|
703 |
+
#: ../classes/class-ccf-form-manager.php:734
|
704 |
+
#: ../classes/class-ccf-form-manager.php:771
|
705 |
+
#: ../classes/class-ccf-form-manager.php:808
|
706 |
msgid "Manage field choices:"
|
707 |
msgstr ""
|
708 |
|
709 |
+
#: ../classes/class-ccf-form-manager.php:850
|
710 |
+
#: ../classes/class-ccf-form-manager.php:863
|
711 |
+
#: ../classes/class-ccf-form-manager.php:878
|
712 |
msgid "An example choice"
|
713 |
msgstr ""
|
714 |
|
715 |
+
#: ../classes/class-ccf-form-manager.php:893
|
716 |
msgid "Arbitrary block of HTML."
|
717 |
msgstr ""
|
718 |
|
719 |
+
#: ../classes/class-ccf-form-manager.php:899
|
720 |
msgid "Section Heading"
|
721 |
msgstr ""
|
722 |
|
723 |
+
#: ../classes/class-ccf-form-manager.php:901
|
724 |
msgid "This is the sub-heading text."
|
725 |
msgstr ""
|
726 |
|
727 |
+
#: ../classes/class-ccf-form-manager.php:908
|
728 |
msgid "First"
|
729 |
msgstr ""
|
730 |
|
731 |
+
#: ../classes/class-ccf-form-manager.php:912
|
732 |
msgid "Last"
|
733 |
msgstr ""
|
734 |
|
735 |
+
#: ../classes/class-ccf-form-manager.php:966
|
736 |
+
#: ../classes/class-ccf-form-manager.php:991
|
737 |
msgid "Street Address"
|
738 |
msgstr ""
|
739 |
|
740 |
+
#: ../classes/class-ccf-form-manager.php:970
|
741 |
+
#: ../classes/class-ccf-form-manager.php:995
|
742 |
msgid "Address Line 2"
|
743 |
msgstr ""
|
744 |
|
745 |
+
#: ../classes/class-ccf-form-manager.php:974
|
746 |
+
#: ../classes/class-ccf-form-manager.php:999
|
747 |
msgid "City"
|
748 |
msgstr ""
|
749 |
|
750 |
+
#: ../classes/class-ccf-form-manager.php:982
|
751 |
msgid "State"
|
752 |
msgstr ""
|
753 |
|
754 |
+
#: ../classes/class-ccf-form-manager.php:986
|
755 |
msgid "ZIP Code"
|
756 |
msgstr ""
|
757 |
|
758 |
+
#: ../classes/class-ccf-form-manager.php:1003
|
759 |
msgid "State / Region / Province"
|
760 |
msgstr ""
|
761 |
|
762 |
+
#: ../classes/class-ccf-form-manager.php:1007
|
763 |
msgid "ZIP / Postal Code"
|
764 |
msgstr ""
|
765 |
|
766 |
+
#: ../classes/class-ccf-form-manager.php:1015
|
767 |
msgid "Country"
|
768 |
msgstr ""
|
769 |
|
770 |
+
#: ../classes/class-ccf-form-manager.php:1023
|
771 |
msgid "email@example.com"
|
772 |
msgstr ""
|
773 |
|
774 |
+
#: ../classes/class-ccf-form-manager.php:1027
|
775 |
+
#: ../classes/class-ccf-form-manager.php:1283
|
776 |
msgid "Email"
|
777 |
msgstr ""
|
778 |
|
779 |
+
#: ../classes/class-ccf-form-manager.php:1031
|
780 |
msgid "Confirm Email"
|
781 |
msgstr ""
|
782 |
|
783 |
+
#: ../classes/class-ccf-form-manager.php:1052
|
784 |
msgid "Edit"
|
785 |
msgstr ""
|
786 |
|
787 |
+
#: ../classes/class-ccf-form-manager.php:1054
|
788 |
msgid "Trash"
|
789 |
msgstr ""
|
790 |
|
791 |
+
#: ../classes/class-ccf-form-manager.php:1097
|
792 |
msgid "There is a problem with this form. Is it trashed or deleted?"
|
793 |
msgstr ""
|
794 |
|
795 |
+
#: ../classes/class-ccf-form-manager.php:1172
|
796 |
msgid "-"
|
797 |
msgstr ""
|
798 |
|
799 |
+
#: ../classes/class-ccf-form-manager.php:1216
|
800 |
msgid "There are no submissions."
|
801 |
msgstr ""
|
802 |
|
803 |
+
#: ../classes/class-ccf-form-manager.php:1245
|
804 |
msgid "Add Form"
|
805 |
msgstr ""
|
806 |
|
807 |
+
#: ../classes/class-ccf-form-manager.php:1269
|
808 |
msgid "Single Line Text"
|
809 |
msgstr ""
|
810 |
|
811 |
+
#: ../classes/class-ccf-form-manager.php:1270
|
812 |
msgid "Dropdown"
|
813 |
msgstr ""
|
814 |
|
815 |
+
#: ../classes/class-ccf-form-manager.php:1271
|
816 |
msgid "Checkboxes"
|
817 |
msgstr ""
|
818 |
|
819 |
+
#: ../classes/class-ccf-form-manager.php:1272
|
820 |
msgid "Radio Buttons"
|
821 |
msgstr ""
|
822 |
|
823 |
+
#: ../classes/class-ccf-form-manager.php:1273
|
824 |
msgid "Paragraph Text"
|
825 |
msgstr ""
|
826 |
|
827 |
+
#: ../classes/class-ccf-form-manager.php:1274
|
828 |
msgid "Hidden"
|
829 |
msgstr ""
|
830 |
|
831 |
+
#: ../classes/class-ccf-form-manager.php:1278
|
832 |
msgid "HTML"
|
833 |
msgstr ""
|
834 |
|
835 |
+
#: ../classes/class-ccf-form-manager.php:1279
|
836 |
msgid "Section Header"
|
837 |
msgstr ""
|
838 |
|
839 |
+
#: ../classes/class-ccf-form-manager.php:1284
|
840 |
msgid "Name"
|
841 |
msgstr ""
|
842 |
|
843 |
+
#: ../classes/class-ccf-form-manager.php:1285
|
844 |
msgid "Date/Time"
|
845 |
msgstr ""
|
846 |
|
847 |
+
#: ../classes/class-ccf-form-manager.php:1286
|
848 |
msgid "Website"
|
849 |
msgstr ""
|
850 |
|
851 |
+
#: ../classes/class-ccf-form-manager.php:1287
|
852 |
msgid "Address"
|
853 |
msgstr ""
|
854 |
|
855 |
+
#: ../classes/class-ccf-form-manager.php:1288
|
856 |
msgid "Phone"
|
857 |
msgstr ""
|
858 |
|
859 |
+
#: ../classes/class-ccf-form-manager.php:1289
|
860 |
msgid "reCAPTCHA"
|
861 |
msgstr ""
|
862 |
|
863 |
+
#: ../classes/class-ccf-form-manager.php:1305
|
864 |
msgid "Invalid date"
|
865 |
msgstr ""
|
866 |
|
867 |
+
#: ../classes/class-ccf-form-manager.php:1307
|
868 |
msgid "Form Submission"
|
869 |
msgstr ""
|
870 |
|
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.1
|
7 |
-
Stable tag: 6.
|
8 |
|
9 |
Build beautiful custom forms the WordPress way. View live previews of your forms while you build them.
|
10 |
|
@@ -33,8 +33,16 @@ For questions, feature requests, and support concerning the Custom Contact Forms
|
|
33 |
|
34 |
= Changelog ==
|
35 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
= 6.2.3 =
|
37 |
* Fix form.min.js URL
|
|
|
38 |
= 6.2.2 =
|
39 |
* Properly conditionally enqueue JS/CSS with SCRIPT_DEBUG
|
40 |
* Make email message and subject filterable
|
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.1
|
7 |
+
Stable tag: 6.3
|
8 |
|
9 |
Build beautiful custom forms the WordPress way. View live previews of your forms while you build them.
|
10 |
|
33 |
|
34 |
= Changelog ==
|
35 |
|
36 |
+
= 6.3 =
|
37 |
+
* Add form notifications tab
|
38 |
+
* Make from address for email notifications configurable
|
39 |
+
* Properly check if SCRIPT_DEBUG is defined
|
40 |
+
* Fix dropdown preview bug
|
41 |
+
* Properly notify user of duplicate slugs
|
42 |
+
|
43 |
= 6.2.3 =
|
44 |
* Fix form.min.js URL
|
45 |
+
|
46 |
= 6.2.2 =
|
47 |
* Properly conditionally enqueue JS/CSS with SCRIPT_DEBUG
|
48 |
* Make email message and subject filterable
|
scss/form-manager.scss
CHANGED
@@ -411,6 +411,11 @@
|
|
411 |
display: none;
|
412 |
}
|
413 |
}
|
|
|
|
|
|
|
|
|
|
|
414 |
}
|
415 |
|
416 |
.form-content {
|
@@ -468,9 +473,15 @@
|
|
468 |
.field-error {
|
469 |
input {
|
470 |
border-color: #ff0000;
|
|
|
471 |
}
|
472 |
}
|
473 |
|
|
|
|
|
|
|
|
|
|
|
474 |
input[type=text] {
|
475 |
width: 100%;
|
476 |
display: block;
|
411 |
display: none;
|
412 |
}
|
413 |
}
|
414 |
+
|
415 |
+
.explain {
|
416 |
+
margin-top: 5px;
|
417 |
+
font-style: italic;
|
418 |
+
}
|
419 |
}
|
420 |
|
421 |
.form-content {
|
473 |
.field-error {
|
474 |
input {
|
475 |
border-color: #ff0000;
|
476 |
+
border-width: 2px;
|
477 |
}
|
478 |
}
|
479 |
|
480 |
+
.field-duplicate-slug input {
|
481 |
+
border-color: #ffe6a5;
|
482 |
+
border-width: 2px;
|
483 |
+
}
|
484 |
+
|
485 |
input[type=text] {
|
486 |
width: 100%;
|
487 |
display: block;
|