Version Description
- Add reCAPTCHA field
- Fix some localization of date field
- Fix spinner for non-root WP installs
- Strip slashes off of email field values
Download this release
Release Info
Developer | tlovett1 |
Plugin | Custom Contact Forms |
Version | 6.2 |
Comparing to | |
See all releases |
Code changes from version 6.1.4 to 6.2
- build/css/form-manager.css +2 -1
- build/css/form-manager.css.map +1 -1
- build/css/form-manager.min.css +1 -1
- build/css/form.css +1 -1
- build/css/form.css.map +1 -1
- build/css/form.min.css +1 -1
- build/js/form-manager.js +39 -0
- build/js/form-manager.min.js +2 -2
- build/js/form.min.js +1 -1
- classes/class-ccf-api.php +8 -0
- classes/class-ccf-field-renderer.php +46 -9
- classes/class-ccf-form-handler.php +43 -10
- classes/class-ccf-form-manager.php +53 -15
- classes/class-ccf-form-renderer.php +6 -3
- custom-contact-forms.php +1 -1
- img/recaptcha.png +0 -0
- js/form.js +141 -78
- js/manager/models.js +20 -0
- js/manager/views.js +19 -0
- languages/custom-contact-forms.mo +0 -0
- languages/custom-contact-forms.po +304 -259
- readme.txt +7 -1
- scss/form-manager.scss +4 -1
- scss/form.scss +1 -1
build/css/form-manager.css
CHANGED
@@ -87,6 +87,8 @@
|
|
87 |
border-right: 1px solid #e5e5e5;
|
88 |
border-bottom: 1px solid #e5e5e5;
|
89 |
padding: 10px 20px; }
|
|
|
|
|
90 |
.ccf-main-modal .field .preview .left {
|
91 |
float: left;
|
92 |
clear: both;
|
@@ -215,7 +217,6 @@
|
|
215 |
line-height: 50px;
|
216 |
border-top: 1px solid #e5e5e5; }
|
217 |
.ccf-main-modal .ccf-form-pane .bottom .spinner {
|
218 |
-
background: url("/wp-admin/images/wpspin_light.gif") no-repeat;
|
219 |
display: none;
|
220 |
float: right;
|
221 |
width: 16px;
|
87 |
border-right: 1px solid #e5e5e5;
|
88 |
border-bottom: 1px solid #e5e5e5;
|
89 |
padding: 10px 20px; }
|
90 |
+
.ccf-main-modal .field .preview .recaptcha-preview-img {
|
91 |
+
margin-top: 7px; }
|
92 |
.ccf-main-modal .field .preview .left {
|
93 |
float: left;
|
94 |
clear: both;
|
217 |
line-height: 50px;
|
218 |
border-top: 1px solid #e5e5e5; }
|
219 |
.ccf-main-modal .ccf-form-pane .bottom .spinner {
|
|
|
220 |
display: none;
|
221 |
float: right;
|
222 |
width: 16px;
|
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 .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{background:url(/wp-admin/images/wpspin_light.gif) no-repeat;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 .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}
|
build/css/form.css
CHANGED
@@ -20,7 +20,7 @@
|
|
20 |
margin-bottom: 24px;
|
21 |
clear: both;
|
22 |
overflow: auto; }
|
23 |
-
.ccf-form-wrapper .field[data-field-type="dropdown"] .error, .ccf-form-wrapper .field[data-field-type="radio"] .error, .ccf-form-wrapper .field[data-field-type="checkboxes"] .error, .ccf-form-wrapper .field[data-field-type="date"] .error {
|
24 |
float: none; }
|
25 |
.ccf-form-wrapper .field .error {
|
26 |
color: #ff0000;
|
20 |
margin-bottom: 24px;
|
21 |
clear: both;
|
22 |
overflow: auto; }
|
23 |
+
.ccf-form-wrapper .field[data-field-type="recaptcha"] .error, .ccf-form-wrapper .field[data-field-type="dropdown"] .error, .ccf-form-wrapper .field[data-field-type="radio"] .error, .ccf-form-wrapper .field[data-field-type="checkboxes"] .error, .ccf-form-wrapper .field[data-field-type="date"] .error {
|
24 |
float: none; }
|
25 |
.ccf-form-wrapper .field .error {
|
26 |
color: #ff0000;
|
build/css/form.css.map
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
{
|
2 |
"version": 3,
|
3 |
-
"mappings": "AAAA,iBAAkB;EACjB,MAAM,EAAE,MAAM;EAEd,6BAAY;IACX,SAAS,EAAE,IAAI;IACf,OAAO,EAAE,MAAM;EAGhB,mCAAkB;IACjB,OAAO,EAAE,UAAU;EAInB,kCAAI;IACH,cAAc,EAAE,MAAM;IACtB,OAAO,EAAE,YAAY;IACrB,MAAM,EAAE,CAAC;IACT,UAAU,EAAE,oDAAoD;IAChE,MAAM,EAAE,gBAAgB;IACxB,YAAY,EAAE,CAAC;IACf,cAAc,EAAE,CAAC;IACjB,OAAO,EAAE,CAAC;IACV,KAAK,EAAE,IAAI;IACX,MAAM,EAAE,SAAS;EAInB,wBAAO;IACN,aAAa,EAAE,IAAI;IACnB,KAAK,EAAE,IAAI;IACX,QAAQ,EAAE,IAAI;IAGb,
|
4 |
"sources": ["../../scss/form.scss"],
|
5 |
"names": [],
|
6 |
"file": "form.css"
|
1 |
{
|
2 |
"version": 3,
|
3 |
+
"mappings": "AAAA,iBAAkB;EACjB,MAAM,EAAE,MAAM;EAEd,6BAAY;IACX,SAAS,EAAE,IAAI;IACf,OAAO,EAAE,MAAM;EAGhB,mCAAkB;IACjB,OAAO,EAAE,UAAU;EAInB,kCAAI;IACH,cAAc,EAAE,MAAM;IACtB,OAAO,EAAE,YAAY;IACrB,MAAM,EAAE,CAAC;IACT,UAAU,EAAE,oDAAoD;IAChE,MAAM,EAAE,gBAAgB;IACxB,YAAY,EAAE,CAAC;IACf,cAAc,EAAE,CAAC;IACjB,OAAO,EAAE,CAAC;IACV,KAAK,EAAE,IAAI;IACX,MAAM,EAAE,SAAS;EAInB,wBAAO;IACN,aAAa,EAAE,IAAI;IACnB,KAAK,EAAE,IAAI;IACX,QAAQ,EAAE,IAAI;IAGb,2SAAO;MACN,KAAK,EAAE,IAAI;IAIb,+BAAO;MACN,KAAK,EAAE,OAAO;MACd,KAAK,EAAE,KAAK;MACZ,SAAS,EAAE,GAAG;MACd,UAAU,EAAE,GAAG;MAEf,wFAA6B;QAC5B,KAAK,EAAE,IAAI;MAGZ,2CAAc;QACb,KAAK,EAAE,KAAK;IAId,2CAAmB;MAClB,MAAM,EAAE,iBAAiB;IAG1B,8BAAM;MACL,OAAO,EAAE,KAAK;MACd,KAAK,EAAE,IAAI;MACX,aAAa,EAAE,GAAG;MAClB,WAAW,EAAE,IAAI;MAEjB,wCAAU;QACT,KAAK,EAAE,OAAO;IAIhB,8EAA6B;MAC5B,KAAK,EAAE,IAAI;MACX,UAAU,EAAE,UAAU;IAGvB,iCAAS;MACR,UAAU,EAAE,KAAK;MACjB,KAAK,EAAE,OAAO;MACd,WAAW,EAAE,OAAO;IAGrB,8BAAM;MACL,KAAK,EAAE,GAAG;MACV,KAAK,EAAE,IAAI;MACX,UAAU,EAAE,UAAU;MACtB,aAAa,EAAE,IAAI;MACnB,KAAK,EAAE,IAAI;IAGZ,+BAAO;MACN,KAAK,EAAE,GAAG;MACV,KAAK,EAAE,KAAK;MACZ,UAAU,EAAE,UAAU;MACtB,YAAY,EAAE,IAAI;IAGnB,mCAAW;MACV,UAAU,EAAE,GAAG;MACf,SAAS,EAAE,GAAG;MACd,KAAK,EAAE,IAAI;MACX,WAAW,EAAE,MAAM;IAKnB,gDAAS;MACR,SAAS,EAAE,IAAI;MACf,aAAa,EAAE,cAAc;MAC7B,cAAc,EAAE,GAAG;IAGpB,mDAAY;MACX,UAAU,EAAE,IAAI;MAChB,SAAS,EAAE,GAAG;MACd,UAAU,EAAE,MAAM;IAKnB,0EAAe;MACd,OAAO,EAAE,YAAY;MACrB,YAAY,EAAE,GAAG;MAEjB,sFAAM;QACL,KAAK,EAAE,KAAK;MAGb,sFAAM;QACL,WAAW,EAAE,MAAM;IAIrB,oCAAO;MACN,OAAO,EAAE,YAAY;MACrB,cAAc,EAAE,GAAG;MAEnB,2CAAO;QACN,KAAK,EAAE,IAAI",
|
4 |
"sources": ["../../scss/form.scss"],
|
5 |
"names": [],
|
6 |
"file": "form.css"
|
build/css/form.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.ccf-form-wrapper{margin:20px 0}.ccf-form-wrapper .form-title{font-size:150%;padding:20px 0}.ccf-form-wrapper .form-description{padding:0 0 20px}.ccf-form-wrapper .form-submit img{vertical-align:middle;display:inline-block;border:0;-ms-filter:"alpha(Opacity=0)";filter:alpha(opacity=0);-moz-opacity:0;-khtml-opacity:0;opacity:0;float:none;margin:0 0 0 6px}.ccf-form-wrapper .field{margin-bottom:24px;clear:both;overflow:auto}.ccf-form-wrapper .field[data-field-type=checkboxes] .error,.ccf-form-wrapper .field[data-field-type=date] .error,.ccf-form-wrapper .field[data-field-type=dropdown] .error,.ccf-form-wrapper .field[data-field-type=radio] .error{float:none}.ccf-form-wrapper .field .error{color:red;float:right;font-size:85%;margin-top:3px}.ccf-form-wrapper .field .error.email-error,.ccf-form-wrapper .field .error.match-error{float:none}.ccf-form-wrapper .field .error.right-error{float:right}.ccf-form-wrapper .field .field-error-input{border:1px solid red}.ccf-form-wrapper .field label{display:block;clear:both;margin-bottom:6px;font-weight:700}.ccf-form-wrapper .field label .required{color:red}.ccf-form-wrapper .field input[type=text],.ccf-form-wrapper .field textarea{width:100%;box-sizing:border-box}.ccf-form-wrapper .field textarea{min-height:100px;color:inherit;font-family:inherit}.ccf-form-wrapper .field .left{width:50%;float:left;box-sizing:border-box;padding-right:10px;clear:both}.ccf-form-wrapper .field .right{width:50%;float:right;box-sizing:border-box;padding-left:10px}.ccf-form-wrapper .field .sub-label{margin-top:3px;font-size:85%;clear:none;font-weight:400}.ccf-form-wrapper .field.section-header .heading{font-size:125%;border-bottom:1px solid #ccc;padding-bottom:5px}.ccf-form-wrapper .field.section-header .subheading{margin-top:10px;font-size:85%;font-style:italic}.ccf-form-wrapper .field.date .hour,.ccf-form-wrapper .field.date .minute{display:inline-block;margin-right:5px}.ccf-form-wrapper .field.date .hour input,.ccf-form-wrapper .field.date .minute input{width:2.5em}.ccf-form-wrapper .field.date .hour label,.ccf-form-wrapper .field.date .minute label{font-weight:400}.ccf-form-wrapper .field.date .am-pm{display:inline-block;vertical-align:top}.ccf-form-wrapper .field.date .am-pm select{width:auto}
|
1 |
+
.ccf-form-wrapper{margin:20px 0}.ccf-form-wrapper .form-title{font-size:150%;padding:20px 0}.ccf-form-wrapper .form-description{padding:0 0 20px}.ccf-form-wrapper .form-submit img{vertical-align:middle;display:inline-block;border:0;-ms-filter:"alpha(Opacity=0)";filter:alpha(opacity=0);-moz-opacity:0;-khtml-opacity:0;opacity:0;float:none;margin:0 0 0 6px}.ccf-form-wrapper .field{margin-bottom:24px;clear:both;overflow:auto}.ccf-form-wrapper .field[data-field-type=checkboxes] .error,.ccf-form-wrapper .field[data-field-type=date] .error,.ccf-form-wrapper .field[data-field-type=dropdown] .error,.ccf-form-wrapper .field[data-field-type=radio] .error,.ccf-form-wrapper .field[data-field-type=recaptcha] .error{float:none}.ccf-form-wrapper .field .error{color:red;float:right;font-size:85%;margin-top:3px}.ccf-form-wrapper .field .error.email-error,.ccf-form-wrapper .field .error.match-error{float:none}.ccf-form-wrapper .field .error.right-error{float:right}.ccf-form-wrapper .field .field-error-input{border:1px solid red}.ccf-form-wrapper .field label{display:block;clear:both;margin-bottom:6px;font-weight:700}.ccf-form-wrapper .field label .required{color:red}.ccf-form-wrapper .field input[type=text],.ccf-form-wrapper .field textarea{width:100%;box-sizing:border-box}.ccf-form-wrapper .field textarea{min-height:100px;color:inherit;font-family:inherit}.ccf-form-wrapper .field .left{width:50%;float:left;box-sizing:border-box;padding-right:10px;clear:both}.ccf-form-wrapper .field .right{width:50%;float:right;box-sizing:border-box;padding-left:10px}.ccf-form-wrapper .field .sub-label{margin-top:3px;font-size:85%;clear:none;font-weight:400}.ccf-form-wrapper .field.section-header .heading{font-size:125%;border-bottom:1px solid #ccc;padding-bottom:5px}.ccf-form-wrapper .field.section-header .subheading{margin-top:10px;font-size:85%;font-style:italic}.ccf-form-wrapper .field.date .hour,.ccf-form-wrapper .field.date .minute{display:inline-block;margin-right:5px}.ccf-form-wrapper .field.date .hour input,.ccf-form-wrapper .field.date .minute input{width:2.5em}.ccf-form-wrapper .field.date .hour label,.ccf-form-wrapper .field.date .minute label{font-weight:400}.ccf-form-wrapper .field.date .am-pm{display:inline-block;vertical-align:top}.ccf-form-wrapper .field.date .am-pm select{width:auto}
|
build/js/form-manager.js
CHANGED
@@ -565,6 +565,26 @@
|
|
565 |
}
|
566 |
);
|
567 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
568 |
wp.ccf.models.Fields.address = wp.ccf.models.Fields.address || wp.ccf.models.StandardField.extend(
|
569 |
{
|
570 |
defaults: function() {
|
@@ -929,6 +949,25 @@
|
|
929 |
}
|
930 |
);
|
931 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
932 |
wp.ccf.views.Fields['section-header'] = wp.ccf.views.Fields['section-header'] || wp.ccf.views.FieldBase.extend(
|
933 |
{
|
934 |
template: _.template( document.getElementById( 'ccf-section-header-template' ).innerHTML ),
|
565 |
}
|
566 |
);
|
567 |
|
568 |
+
wp.ccf.models.Fields.recaptcha = wp.ccf.models.Fields.recaptcha || wp.ccf.models.StandardField.extend(
|
569 |
+
{
|
570 |
+
defaults: function() {
|
571 |
+
var defaults = {
|
572 |
+
type: 'recaptcha',
|
573 |
+
siteKey: '',
|
574 |
+
secretKey: ''
|
575 |
+
};
|
576 |
+
|
577 |
+
return _.defaults( defaults, this.constructor.__super__.defaults() );
|
578 |
+
},
|
579 |
+
|
580 |
+
required: function() {
|
581 |
+
return [ 'siteKey', 'secretKey' ];
|
582 |
+
},
|
583 |
+
|
584 |
+
isImmutable: true
|
585 |
+
}
|
586 |
+
);
|
587 |
+
|
588 |
wp.ccf.models.Fields.address = wp.ccf.models.Fields.address || wp.ccf.models.StandardField.extend(
|
589 |
{
|
590 |
defaults: function() {
|
949 |
}
|
950 |
);
|
951 |
|
952 |
+
wp.ccf.views.Fields.recaptcha = wp.ccf.views.Fields.recaptcha || wp.ccf.views.FieldBase.extend(
|
953 |
+
{
|
954 |
+
template: _.template( document.getElementById( 'ccf-recaptcha-template' ).innerHTML ),
|
955 |
+
|
956 |
+
initialize: function() {
|
957 |
+
|
958 |
+
},
|
959 |
+
|
960 |
+
saveField: function() {
|
961 |
+
this.model.set( 'label', this.el.querySelectorAll( '.field-label' )[0].value );
|
962 |
+
this.model.set( 'siteKey', this.el.querySelectorAll( '.field-site-key' )[0].value );
|
963 |
+
this.model.set( 'secretKey', this.el.querySelectorAll( '.field-secret-key' )[0].value );
|
964 |
+
this.model.set( 'className', this.el.querySelectorAll( '.field-class-name' )[0].value );
|
965 |
+
|
966 |
+
return this;
|
967 |
+
}
|
968 |
+
}
|
969 |
+
);
|
970 |
+
|
971 |
wp.ccf.views.Fields['section-header'] = wp.ccf.views.Fields['section-header'] || wp.ccf.views.FieldBase.extend(
|
972 |
{
|
973 |
template: _.template( document.getElementById( 'ccf-section-header-template' ).innerHTML ),
|
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.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["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")},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];
|
2 |
-
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={};if(wp.ccf.models.Fields[i].prototype.defaults().slug!==void 0){var c=s.model.get("fields").where({type:i}).length+1;l.slug=i+"-"+c}var n=new wp.ccf.models.Fields[i](l),r=s.model.get("fields");r.add(n),new wp.ccf.views.FieldRow({model:n,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};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")},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)
|
2 |
+
});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={};if(wp.ccf.models.Fields[i].prototype.defaults().slug!==void 0){var c=s.model.get("fields").where({type:i}).length+1;l.slug=i+"-"+c}var n=new wp.ccf.models.Fields[i](l),r=s.model.get("fields");r.add(n),new wp.ccf.views.FieldRow({model:n,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);
|
build/js/form.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
(function(e,t){"use strict";window.wp=window.wp||{};for(var
|
1 |
+
(function(e,t){"use strict";window.wp=window.wp||{},wp.ccf=wp.ccf||{},wp.ccf.validators=wp.ccf.validators||{};var i={};window.ccfRecaptchaOnload=function(){for(var e=document.querySelectorAll(".ccf-recaptcha-wrapper"),l=function(l){grecaptcha.render(e[s],{sitekey:e[s].getAttribute("data-sitekey"),theme:t.recaptcha_theme,callback:function(){i[l]=!0}})},s=0;e.length>s;s++){var r=e[s].getAttribute("data-form-id");l(r)}};var l=function(e){if(this.wrapper=e,this.errors={},e.className.match(" field-required")){this.inputs=this.wrapper.querySelectorAll(".field-input");var i=this.wrapper.querySelectorAll(".error");i.length&&i[0].parentNode.removeChild(i[0]);var l=!1;if(_.each(this.inputs,function(e){(e.checked||e.selected)&&(l=!0)}),!l){this.errors.required=!0;var s=document.createElement("div");s.className="error required-error",s.innerHTML=t.required,e.appendChild(s)}}},s=function(e,i){return function(l){this.wrapper=l,this.inputs=this.wrapper.querySelectorAll(".field-input"),this.errors={};for(var s=this.wrapper.querySelectorAll(".error"),r=s.length-1;r>=0;r--)s[r].parentNode.removeChild(s[r]);_.each(this.inputs,function(t){var i=t.getAttribute("name");this.errors[i]={},t.getAttribute("aria-required")&&""===t.value&&(this.errors[i].required=t),e&&e.call(this,t)},this),i&&i.call(this);var c;for(var n in this.errors)if(this.errors.hasOwnProperty(n))for(var o in this.errors[n])c=document.createElement("div"),c.className="error "+o+"-error",c.setAttribute("data-field-name",n),c.innerHTML=t[o],this.errors[n][o].parentNode.insertBefore(c,this.errors[n][o].nextSibling)}};wp.ccf.validators["single-line-text"]=wp.ccf.validators["single-line-text"]||s(),wp.ccf.validators["paragraph-text"]=wp.ccf.validators["paragraph-text"]||s(),wp.ccf.validators.name=wp.ccf.validators.name||s(),wp.ccf.validators.email=wp.ccf.validators.email||s(!1,function(){var e=this.inputs[0].value;if(e){2===this.inputs.length&&e!==this.inputs[1].value&&(this.errors[this.inputs[0].getAttribute("name")].match=this.wrapper.lastChild);var t=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;t.test(e)||(this.errors[this.inputs[0].getAttribute("name")].email=this.wrapper.lastChild)}}),wp.ccf.validators.recaptcha=wp.ccf.validators.recaptcha||function(e,l){this.wrapper=e,this.inputs=this.wrapper.querySelectorAll(".g-recaptcha-response"),this.errors={};for(var s=this.wrapper.querySelectorAll(".error"),r=s.length-1;r>=0;r--)s[r].parentNode.removeChild(s[r]);i[l]||(this.errors["g-recaptcha-response"]={},this.errors["g-recaptcha-response"].recaptcha=this.wrapper.lastChild);var c;for(var n in this.errors)if(this.errors.hasOwnProperty(n))for(var o in this.errors[n])c=document.createElement("div"),c.className="error "+o+"-error",c.setAttribute("data-field-name",n),c.innerHTML=t[o],this.errors[n][o].parentNode.insertBefore(c,this.errors[n][o].nextSibling)},wp.ccf.validators.phone=wp.ccf.validators.phone||s(!1,function(){var e=this.inputs[0].value;if(e){var t=/^[0-9+.)(\-]+$/;if(t.test(e)){if("us"===this.wrapper.getAttribute("data-phone-format")){var i=e.replace(/[^0-9]/,"");10!==i.length&&(this.errors[this.inputs[0].getAttribute("name")].digits=this.wrapper.lastChild)}}else this.errors[this.inputs[0].getAttribute("name")].phone=this.wrapper.lastChild}}),wp.ccf.validators.date=wp.ccf.validators.date||function(e){this.wrapper=e,this.errors={},this.inputs=this.wrapper.querySelectorAll(".field-input");for(var i=this.wrapper.querySelectorAll(".error"),l=i.length-1;l>=0;l--)i[l].parentNode.removeChild(i[l]);var s;_.each(this.inputs,function(i){var l=i.getAttribute("name");if(this.errors[l]={},i.getAttribute("aria-required")&&""===i.value&&(this.errors[l].required=!0,s=document.createElement("div"),s.className="error required-error",1===this.inputs.length?(s.innerHTML=t.required,s.className+=" right-error",i.parentNode.insertBefore(s,i.nextSibling)):(s.innerHTML=t[l.replace(/.*\[(.*?)\]/i,"$1")+"_required"],e.appendChild(s))),""!==i.value){var r=l.replace(/^.*\[(.*?)\]$/,"$1");"date"===r?i.value.match(/^([0-9]|\/)+$/)||(s=document.createElement("div"),s.className="error date-error",s.innerHTML=t.date,e.appendChild(s)):"hour"===r?i.value.match(/^[0-9]+$/)||(s=document.createElement("div"),s.className="error hour-error",s.innerHTML=t.hour,e.appendChild(s)):"minute"===r&&(i.value.match(/^[0-9]+$/)||(s=document.createElement("div"),s.className="error minute-error",s.innerHTML=t.minute,e.appendChild(s)))}},this)},wp.ccf.validators.address=wp.ccf.validators.address||s(),wp.ccf.validators.website=wp.ccf.validators.website||s(function(e){if(e.value){var t=/^http(s?)\:\/\/(([a-zA-Z0-9\-\._]+(\.[a-zA-Z0-9\-\._]+)+)|localhost)(\/?)([a-zA-Z0-9\-\.\?\,\'\/\\\+&%\$#_]*)?([\d\w\.\/\%\+\-\=\&\?\:\\\"\'\,\|\~\;]*)$/;t.test(e.value)||(this.errors[e.getAttribute("name")].website=e)}}),wp.ccf.validators.checkboxes=wp.ccf.validators.checkboxes||l,wp.ccf.validators.dropdown=wp.ccf.validators.dropdown||s(),wp.ccf.validators.radio=wp.ccf.validators.radio||l,e(document).ready(function(){for(var l=document.querySelectorAll(".ccf-datepicker"),s=0;l.length>s;s++)e(l[s]).datepicker();var r=document.querySelectorAll(".ccf-form-wrapper");r.length>=1&&_.each(r,function(l){var s=parseInt(l.getAttribute("data-form-id")),r=function(r){r.returnFalse=!1,r.preventDefault&&r.preventDefault();var c=l.querySelectorAll(".field"),n=[];if(_.each(c,function(e){if(!e.className.match(/ skip-field/i)){var t=e.getAttribute("data-field-type"),i=new wp.ccf.validators[t](e,s);if(_.size(i.errors)){var l=0;for(var r in i.errors)i.errors.hasOwnProperty(r)&&_.size(i.errors[r])&&l++;l>0&&n.push(i)}}}),n.length){var o=e(window).scrollTop(),a=o+e(window).height(),d=e(n[0].wrapper),u=d.offset(),f=u.top,m=f+d.height();f>=o&&a>=m||e("html, body").animate({scrollTop:d.offset().top},500)}else{var h=e(this.querySelectorAll(".ccf-form")[0]);l.className=l.className.replace(/ loading/i,"")+" loading";var p=e(l.querySelectorAll(".loading-img")[0]);p.animate({opacity:100}),e.ajax({url:t.ajaxurl,type:"post",data:h.serialize()}).done(function(t){t.success&&("text"===t.action_type&&t.completion_message?(l.innerHTML=t.completion_message,e("html, body").animate({scrollTop:e(l).offset().top},500)):"redirect"===t.action_type&&t.completion_redirect_url&&(document.location=t.completion_redirect_url))}).complete(function(){l.className=l.className.replace(/ loading/i,""),p.animate({opacity:0}),i[s]=!1})}return!1};e(l).on("submit",r)})})})(jQuery,ccfSettings);
|
classes/class-ccf-api.php
CHANGED
@@ -66,6 +66,14 @@ class CCF_API extends WP_JSON_Posts {
|
|
66 |
'sanitize' => 'esc_attr',
|
67 |
'escape' => 'esc_attr',
|
68 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
'phoneFormat' => array(
|
70 |
'sanitize' => 'esc_attr',
|
71 |
'escape' => 'esc_attr',
|
66 |
'sanitize' => 'esc_attr',
|
67 |
'escape' => 'esc_attr',
|
68 |
),
|
69 |
+
'siteKey' => array(
|
70 |
+
'sanitize' => 'esc_attr',
|
71 |
+
'escape' => 'esc_attr',
|
72 |
+
),
|
73 |
+
'secretKey' => array(
|
74 |
+
'sanitize' => 'esc_attr',
|
75 |
+
'escape' => 'esc_attr',
|
76 |
+
),
|
77 |
'phoneFormat' => array(
|
78 |
'sanitize' => 'esc_attr',
|
79 |
'escape' => 'esc_attr',
|
classes/class-ccf-field-renderer.php
CHANGED
@@ -55,6 +55,40 @@ class CCF_Field_Renderer {
|
|
55 |
return ob_get_clean();
|
56 |
}
|
57 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
/**
|
59 |
* Get section header layout field HTML
|
60 |
*
|
@@ -775,36 +809,36 @@ class CCF_Field_Renderer {
|
|
775 |
<?php } else if ( empty( $show_date ) && ! empty( $show_time ) ) { ?>
|
776 |
<div class="hour">
|
777 |
<input maxlength="2" class="<?php if ( ! empty( $errors['hour_required'] ) ) : ?>field-error-input<?php endif; ?> field-input" <?php if ( ! empty( $required ) ) : ?>required aria-required="true"<?php endif; ?> name="ccf_field_<?php echo esc_attr( $slug ); ?>[hour]" value="<?php if ( ! empty( $hour_post_value ) ) { echo esc_attr( $hour_post_value ); } ?>" id="ccf_field_<?php echo esc_attr( $slug ); ?>-hour" type="text">
|
778 |
-
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>-hour" class="sub-label"
|
779 |
</div>
|
780 |
<div class="minute">
|
781 |
<input maxlength="2" class="<?php if ( ! empty( $errors['minutes_required'] ) ) : ?>field-error-input<?php endif; ?> field-input" <?php if ( ! empty( $required ) ) : ?>required aria-required="true"<?php endif; ?> name="ccf_field_<?php echo esc_attr( $slug ); ?>[minute]" value="<?php if ( ! empty( $minute_post_value ) ) { echo esc_attr( $minute_post_value ); } ?>" id="ccf_field_<?php echo esc_attr( $slug ); ?>-minute" type="text">
|
782 |
-
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>-minute" class="sub-label"
|
783 |
</div>
|
784 |
<div class="am-pm">
|
785 |
<select class="<?php if ( ! empty( $errors['am-pm_required'] ) ) : ?>field-error-input<?php endif; ?> field-input" <?php if ( ! empty( $required ) ) : ?>required aria-required="true"<?php endif; ?> name="ccf_field_<?php echo esc_attr( $slug ); ?>[am-pm]" id="ccf_field_<?php echo esc_attr( $slug ); ?>-am-pm">
|
786 |
-
<option <?php if ( ! empty( $am_pm_post_value ) ) { selected( 'am', $am_pm_post_value ); } ?> value="am"
|
787 |
-
<option <?php if ( ! empty( $am_pm_post_value ) ) { selected( 'pm', $am_pm_post_value ); } ?> value="pm"
|
788 |
</select>
|
789 |
</div>
|
790 |
<?php } else { ?>
|
791 |
<div class="left">
|
792 |
<input value="<?php if ( ! empty( $date_post_value ) ) { echo esc_attr( $date_post_value ); } ?>" <?php if ( ! empty( $required ) ) : ?>required aria-required="true"<?php endif; ?> name="ccf_field_<?php echo esc_attr( $slug ); ?>[date]" class="<?php if ( ! empty( $errors['date_required'] ) ) : ?>field-error-input<?php endif; ?> ccf-datepicker field-input" id="ccf_field_<?php echo esc_attr( $slug ); ?>-date" type="text">
|
793 |
-
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>-date" class="sub-label"
|
794 |
</div>
|
795 |
<div class="right">
|
796 |
<div class="hour">
|
797 |
<input class="<?php if ( ! empty( $errors['hour_required'] ) ) : ?>field-error-input<?php endif; ?> field-input" <?php if ( ! empty( $required ) ) : ?>required aria-required="true"<?php endif; ?> maxlength="2" name="ccf_field_<?php echo esc_attr( $slug ); ?>[hour]" value="<?php if ( ! empty( $hour_post_value ) ) { echo esc_attr( $hour_post_value ); } ?>" id="ccf_field_<?php echo esc_attr( $slug ); ?>-hour" type="text">
|
798 |
-
<label class="sub-label" for="ccf_field_<?php echo esc_attr( $slug ); ?>-hour"
|
799 |
</div>
|
800 |
<div class="minute">
|
801 |
<input class="<?php if ( ! empty( $errors['minutes_required'] ) ) : ?>field-error-input<?php endif; ?> field-input" <?php if ( ! empty( $required ) ) : ?>required aria-required="true"<?php endif; ?> maxlength="2" name="ccf_field_<?php echo esc_attr( $slug ); ?>[minute]" value="<?php if ( ! empty( $minute_post_value ) ) { echo esc_attr( $minute_post_value ); } ?>" id="ccf_field_<?php echo esc_attr( $slug ); ?>-minute" type="text">
|
802 |
-
<label class="sub-label" for="ccf_field_<?php echo esc_attr( $slug ); ?>-minute"
|
803 |
</div>
|
804 |
<div class="am-pm">
|
805 |
<select class="<?php if ( ! empty( $errors['am-pm_required'] ) ) : ?>field-error-input<?php endif; ?> field-input" <?php if ( ! empty( $required ) ) : ?>required aria-required="true"<?php endif; ?> name="ccf_field_<?php echo esc_attr( $slug ); ?>[am-pm]" id="ccf_field_<?php echo esc_attr( $slug ); ?>-am-pm">
|
806 |
-
<option <?php if ( ! empty( $am_pm_post_value ) ) { selected( 'am', $am_pm_post_value ); } ?> value="am"
|
807 |
-
<option <?php if ( ! empty( $am_pm_post_value ) ) { selected( 'pm', $am_pm_post_value ); } ?> value="pm"
|
808 |
</select>
|
809 |
</div>
|
810 |
</div>
|
@@ -917,6 +951,9 @@ class CCF_Field_Renderer {
|
|
917 |
case 'radio':
|
918 |
$field_html = $this->radio( $field_id, $form_id );
|
919 |
break;
|
|
|
|
|
|
|
920 |
case 'html':
|
921 |
$field_html = $this->html( $field_id, $form_id );
|
922 |
break;
|
55 |
return ob_get_clean();
|
56 |
}
|
57 |
|
58 |
+
/**
|
59 |
+
* Get reCAPTCHA field HTML, including any errors from the last form submission.
|
60 |
+
*
|
61 |
+
* @param int $field_id
|
62 |
+
* @param int $form_id
|
63 |
+
* @since 6..2
|
64 |
+
* @return string
|
65 |
+
*/
|
66 |
+
public function recaptcha( $field_id, $form_id ) {
|
67 |
+
$slug = get_post_meta( $field_id, 'ccf_field_slug', true );
|
68 |
+
$label = get_post_meta( $field_id, 'ccf_field_label', true );
|
69 |
+
$class_name = get_post_meta( $field_id, 'ccf_field_className', true );
|
70 |
+
$site_key = get_post_meta( $field_id, 'ccf_field_siteKey', true );
|
71 |
+
|
72 |
+
$errors = CCF_Form_Handler::factory()->get_errors( $form_id, $slug );
|
73 |
+
|
74 |
+
ob_start();
|
75 |
+
?>
|
76 |
+
|
77 |
+
<div data-field-type="recaptcha" class="<?php if ( ! empty( $errors ) ) : ?>field-error<?php endif; ?> field <?php echo esc_attr( $slug ); ?> single-line-text field-<?php echo (int) $field_id; ?> <?php echo esc_attr( $class_name ); ?> <?php if ( ! empty( $required ) ) : ?>field-required<?php endif; ?>">
|
78 |
+
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>">
|
79 |
+
<span class="required">*</span>
|
80 |
+
<?php echo esc_html( $label ); ?>
|
81 |
+
</label>
|
82 |
+
<div class="ccf-recaptcha-wrapper" data-form-id="<?php echo (int) $form_id; ?>" data-sitekey="<?php echo esc_attr( $site_key ); ?>"></div>
|
83 |
+
<?php if ( ! empty( $errors ) ) : ?>
|
84 |
+
<div class="error"><?php echo esc_html( $errors['recaptcha'] ); ?></div>
|
85 |
+
<?php endif; ?>
|
86 |
+
</div>
|
87 |
+
|
88 |
+
<?php
|
89 |
+
return ob_get_clean();
|
90 |
+
}
|
91 |
+
|
92 |
/**
|
93 |
* Get section header layout field HTML
|
94 |
*
|
809 |
<?php } else if ( empty( $show_date ) && ! empty( $show_time ) ) { ?>
|
810 |
<div class="hour">
|
811 |
<input maxlength="2" class="<?php if ( ! empty( $errors['hour_required'] ) ) : ?>field-error-input<?php endif; ?> field-input" <?php if ( ! empty( $required ) ) : ?>required aria-required="true"<?php endif; ?> name="ccf_field_<?php echo esc_attr( $slug ); ?>[hour]" value="<?php if ( ! empty( $hour_post_value ) ) { echo esc_attr( $hour_post_value ); } ?>" id="ccf_field_<?php echo esc_attr( $slug ); ?>-hour" type="text">
|
812 |
+
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>-hour" class="sub-label"><?php esc_html_e( 'HH', 'custom-contact-forms' ); ?></label>
|
813 |
</div>
|
814 |
<div class="minute">
|
815 |
<input maxlength="2" class="<?php if ( ! empty( $errors['minutes_required'] ) ) : ?>field-error-input<?php endif; ?> field-input" <?php if ( ! empty( $required ) ) : ?>required aria-required="true"<?php endif; ?> name="ccf_field_<?php echo esc_attr( $slug ); ?>[minute]" value="<?php if ( ! empty( $minute_post_value ) ) { echo esc_attr( $minute_post_value ); } ?>" id="ccf_field_<?php echo esc_attr( $slug ); ?>-minute" type="text">
|
816 |
+
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>-minute" class="sub-label"><?php esc_html_e( 'MM', 'custom-contact-forms' ); ?></label>
|
817 |
</div>
|
818 |
<div class="am-pm">
|
819 |
<select class="<?php if ( ! empty( $errors['am-pm_required'] ) ) : ?>field-error-input<?php endif; ?> field-input" <?php if ( ! empty( $required ) ) : ?>required aria-required="true"<?php endif; ?> name="ccf_field_<?php echo esc_attr( $slug ); ?>[am-pm]" id="ccf_field_<?php echo esc_attr( $slug ); ?>-am-pm">
|
820 |
+
<option <?php if ( ! empty( $am_pm_post_value ) ) { selected( 'am', $am_pm_post_value ); } ?> value="am"><?php esc_html_e( 'AM', 'custom-contact-forms' ); ?></option>
|
821 |
+
<option <?php if ( ! empty( $am_pm_post_value ) ) { selected( 'pm', $am_pm_post_value ); } ?> value="pm"><?php esc_html_e( 'PM', 'custom-contact-forms' ); ?></option>
|
822 |
</select>
|
823 |
</div>
|
824 |
<?php } else { ?>
|
825 |
<div class="left">
|
826 |
<input value="<?php if ( ! empty( $date_post_value ) ) { echo esc_attr( $date_post_value ); } ?>" <?php if ( ! empty( $required ) ) : ?>required aria-required="true"<?php endif; ?> name="ccf_field_<?php echo esc_attr( $slug ); ?>[date]" class="<?php if ( ! empty( $errors['date_required'] ) ) : ?>field-error-input<?php endif; ?> ccf-datepicker field-input" id="ccf_field_<?php echo esc_attr( $slug ); ?>-date" type="text">
|
827 |
+
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>-date" class="sub-label"><?php esc_html_e( 'Date', 'custom-contact-forms' ); ?></label>
|
828 |
</div>
|
829 |
<div class="right">
|
830 |
<div class="hour">
|
831 |
<input class="<?php if ( ! empty( $errors['hour_required'] ) ) : ?>field-error-input<?php endif; ?> field-input" <?php if ( ! empty( $required ) ) : ?>required aria-required="true"<?php endif; ?> maxlength="2" name="ccf_field_<?php echo esc_attr( $slug ); ?>[hour]" value="<?php if ( ! empty( $hour_post_value ) ) { echo esc_attr( $hour_post_value ); } ?>" id="ccf_field_<?php echo esc_attr( $slug ); ?>-hour" type="text">
|
832 |
+
<label class="sub-label" for="ccf_field_<?php echo esc_attr( $slug ); ?>-hour"><?php esc_html_e( 'HH', 'custom-contact-forms' ); ?></label>
|
833 |
</div>
|
834 |
<div class="minute">
|
835 |
<input class="<?php if ( ! empty( $errors['minutes_required'] ) ) : ?>field-error-input<?php endif; ?> field-input" <?php if ( ! empty( $required ) ) : ?>required aria-required="true"<?php endif; ?> maxlength="2" name="ccf_field_<?php echo esc_attr( $slug ); ?>[minute]" value="<?php if ( ! empty( $minute_post_value ) ) { echo esc_attr( $minute_post_value ); } ?>" id="ccf_field_<?php echo esc_attr( $slug ); ?>-minute" type="text">
|
836 |
+
<label class="sub-label" for="ccf_field_<?php echo esc_attr( $slug ); ?>-minute"><?php esc_html_e( 'MM', 'custom-contact-forms' ); ?></label>
|
837 |
</div>
|
838 |
<div class="am-pm">
|
839 |
<select class="<?php if ( ! empty( $errors['am-pm_required'] ) ) : ?>field-error-input<?php endif; ?> field-input" <?php if ( ! empty( $required ) ) : ?>required aria-required="true"<?php endif; ?> name="ccf_field_<?php echo esc_attr( $slug ); ?>[am-pm]" id="ccf_field_<?php echo esc_attr( $slug ); ?>-am-pm">
|
840 |
+
<option <?php if ( ! empty( $am_pm_post_value ) ) { selected( 'am', $am_pm_post_value ); } ?> value="am"><?php esc_html_e( 'AM', 'custom-contact-forms' ); ?></option>
|
841 |
+
<option <?php if ( ! empty( $am_pm_post_value ) ) { selected( 'pm', $am_pm_post_value ); } ?> value="pm"><?php esc_html_e( 'PM', 'custom-contact-forms' ); ?></option>
|
842 |
</select>
|
843 |
</div>
|
844 |
</div>
|
951 |
case 'radio':
|
952 |
$field_html = $this->radio( $field_id, $form_id );
|
953 |
break;
|
954 |
+
case 'recaptcha':
|
955 |
+
$field_html = $this->recaptcha( $field_id, $form_id );
|
956 |
+
break;
|
957 |
case 'html':
|
958 |
$field_html = $this->html( $field_id, $form_id );
|
959 |
break;
|
classes/class-ccf-form-handler.php
CHANGED
@@ -29,6 +29,9 @@ class CCF_Form_Handler {
|
|
29 |
'sanitizer' => 'sanitize_text_field',
|
30 |
'validator' => array( $this, 'not_empty' ),
|
31 |
),
|
|
|
|
|
|
|
32 |
'paragraph-text' => array(
|
33 |
'sanitizer' => 'sanitize_text_field',
|
34 |
'validator' => array( $this, 'not_empty' ),
|
@@ -114,6 +117,22 @@ class CCF_Form_Handler {
|
|
114 |
return true;
|
115 |
}
|
116 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
117 |
/**
|
118 |
* Simple callback to determine if a phone number is valid
|
119 |
*
|
@@ -466,25 +485,35 @@ class CCF_Form_Handler {
|
|
466 |
$submission = array();
|
467 |
|
468 |
$skip_fields = apply_filters( 'ccf_skip_fields', array( 'html', 'section-header' ), $form->ID );
|
|
|
469 |
|
470 |
foreach ( $fields as $field_id ) {
|
471 |
$field_id = (int) $field_id;
|
472 |
|
473 |
$type = get_post_meta( $field_id, 'ccf_field_type', true );
|
|
|
474 |
if ( in_array( $type, $skip_fields ) ) {
|
475 |
continue;
|
476 |
}
|
477 |
|
478 |
$slug = get_post_meta( $field_id, 'ccf_field_slug', true );
|
479 |
|
480 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
481 |
|
482 |
$validation = $this->process_field( $field_id, $value );
|
483 |
|
484 |
if ( $validation['error'] !== null ) {
|
485 |
$errors[$slug] = $validation['error'];
|
486 |
} else {
|
487 |
-
$
|
|
|
|
|
488 |
}
|
489 |
}
|
490 |
|
@@ -532,28 +561,28 @@ class CCF_Form_Handler {
|
|
532 |
<?php if ( is_array( $field ) ) { ?>
|
533 |
<?php if ( CCF_Submission_CPT::factory()->is_field_date( $field ) ) { ?>
|
534 |
|
535 |
-
<?php echo esc_html( CCF_Submission_CPT::factory()->get_pretty_field_date( $field ) ); ?>
|
536 |
|
537 |
<?php } elseif ( CCF_Submission_CPT::factory()->is_field_name( $field ) ) { ?>
|
538 |
|
539 |
-
<?php echo esc_html( CCF_Submission_CPT::factory()->get_pretty_field_name( $field ) ); ?>
|
540 |
|
541 |
<?php } elseif ( CCF_Submission_CPT::factory()->is_field_address( $field ) ) { ?>
|
542 |
|
543 |
-
<?php echo esc_html( CCF_Submission_CPT::factory()->get_pretty_field_address( $field ) ); ?>
|
544 |
|
545 |
<?php } else { ?>
|
546 |
|
547 |
<?php foreach ( $field as $key => $value ) { ?>
|
548 |
<?php if ( is_int( $key ) ) { ?>
|
549 |
-
<strong><?php echo esc_html( $key ); ?>:</strong>
|
550 |
<?php } ?>
|
551 |
-
<?php echo esc_html( $value ); ?><br>
|
552 |
<?php } ?>
|
553 |
|
554 |
<?php } ?>
|
555 |
<?php } else { ?>
|
556 |
-
<?php echo esc_html( $field ); ?>
|
557 |
<?php } ?>
|
558 |
<?php } else { ?>
|
559 |
<span>-</span>
|
@@ -626,10 +655,14 @@ class CCF_Form_Handler {
|
|
626 |
$return['sanitized_value'] = array();
|
627 |
|
628 |
foreach ( $value as $key => $single_value ) {
|
629 |
-
|
|
|
|
|
630 |
}
|
631 |
} else {
|
632 |
-
|
|
|
|
|
633 |
}
|
634 |
}
|
635 |
|
29 |
'sanitizer' => 'sanitize_text_field',
|
30 |
'validator' => array( $this, 'not_empty' ),
|
31 |
),
|
32 |
+
'recaptcha' => array(
|
33 |
+
'validator' => array( $this, 'valid_recaptcha' ),
|
34 |
+
),
|
35 |
'paragraph-text' => array(
|
36 |
'sanitizer' => 'sanitize_text_field',
|
37 |
'validator' => array( $this, 'not_empty' ),
|
117 |
return true;
|
118 |
}
|
119 |
|
120 |
+
public function valid_recaptcha( $value, $field_id, $required ) {
|
121 |
+
$secret = get_post_meta( $field_id, 'ccf_field_secretKey', true );
|
122 |
+
|
123 |
+
$response = wp_remote_get( 'https://www.google.com/recaptcha/api/siteverify?secret=' . $secret . '&response=' . $value );
|
124 |
+
|
125 |
+
$data = wp_remote_retrieve_body( $response );
|
126 |
+
|
127 |
+
$data = json_decode( $data );
|
128 |
+
|
129 |
+
if ( empty( $data->success ) ) {
|
130 |
+
return array( 'recaptcha' => esc_html__( 'Your reCAPTCHA response was incorrect.', 'custom-contact-forms' ) );
|
131 |
+
}
|
132 |
+
|
133 |
+
return true;
|
134 |
+
}
|
135 |
+
|
136 |
/**
|
137 |
* Simple callback to determine if a phone number is valid
|
138 |
*
|
485 |
$submission = array();
|
486 |
|
487 |
$skip_fields = apply_filters( 'ccf_skip_fields', array( 'html', 'section-header' ), $form->ID );
|
488 |
+
$save_skip_fields = apply_filters( 'ccf_save_skip_fields', array( 'recaptcha' ), $form->ID );
|
489 |
|
490 |
foreach ( $fields as $field_id ) {
|
491 |
$field_id = (int) $field_id;
|
492 |
|
493 |
$type = get_post_meta( $field_id, 'ccf_field_type', true );
|
494 |
+
|
495 |
if ( in_array( $type, $skip_fields ) ) {
|
496 |
continue;
|
497 |
}
|
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 ) ) ) {
|
504 |
+
$value = ( isset( $_POST[$custom_value_mapping[$type]] ) ) ? $_POST[$custom_value_mapping[$type]] : '';
|
505 |
+
} else {
|
506 |
+
$value = ( isset( $_POST['ccf_field_' . $slug] ) ) ? $_POST['ccf_field_' . $slug] : '';
|
507 |
+
}
|
508 |
|
509 |
$validation = $this->process_field( $field_id, $value );
|
510 |
|
511 |
if ( $validation['error'] !== null ) {
|
512 |
$errors[$slug] = $validation['error'];
|
513 |
} else {
|
514 |
+
if ( ! in_array( $type, $save_skip_fields ) ) {
|
515 |
+
$submission[$slug] = $validation['sanitized_value'];
|
516 |
+
}
|
517 |
}
|
518 |
}
|
519 |
|
561 |
<?php if ( is_array( $field ) ) { ?>
|
562 |
<?php if ( CCF_Submission_CPT::factory()->is_field_date( $field ) ) { ?>
|
563 |
|
564 |
+
<?php echo esc_html( stripslashes( CCF_Submission_CPT::factory()->get_pretty_field_date( $field ) ) ); ?>
|
565 |
|
566 |
<?php } elseif ( CCF_Submission_CPT::factory()->is_field_name( $field ) ) { ?>
|
567 |
|
568 |
+
<?php echo esc_html( stripslashes( CCF_Submission_CPT::factory()->get_pretty_field_name( $field ) ) ); ?>
|
569 |
|
570 |
<?php } elseif ( CCF_Submission_CPT::factory()->is_field_address( $field ) ) { ?>
|
571 |
|
572 |
+
<?php echo esc_html( stripslashes( CCF_Submission_CPT::factory()->get_pretty_field_address( $field ) ) ); ?>
|
573 |
|
574 |
<?php } else { ?>
|
575 |
|
576 |
<?php foreach ( $field as $key => $value ) { ?>
|
577 |
<?php if ( is_int( $key ) ) { ?>
|
578 |
+
<strong><?php echo esc_html( stripslashes( $key ) ); ?>:</strong>
|
579 |
<?php } ?>
|
580 |
+
<?php echo esc_html( stripslashes( $value ) ); ?><br>
|
581 |
<?php } ?>
|
582 |
|
583 |
<?php } ?>
|
584 |
<?php } else { ?>
|
585 |
+
<?php echo esc_html( stripslashes( $field ) ); ?>
|
586 |
<?php } ?>
|
587 |
<?php } else { ?>
|
588 |
<span>-</span>
|
655 |
$return['sanitized_value'] = array();
|
656 |
|
657 |
foreach ( $value as $key => $single_value ) {
|
658 |
+
if ( ! empty( $this->field_callbacks[$type]['sanitizer'] ) ) {
|
659 |
+
$return['sanitized_value'][$key] = call_user_func( apply_filters( 'ccf_field_sanitizer', $this->field_callbacks[$type]['sanitizer'], $single_value, $field_id, $type ), $single_value, $field_id );
|
660 |
+
}
|
661 |
}
|
662 |
} else {
|
663 |
+
if ( ! empty( $this->field_callbacks[$type]['sanitizer'] ) ) {
|
664 |
+
$return['sanitized_value'] = call_user_func( apply_filters( 'ccf_field_sanitizer', $this->field_callbacks[$type]['sanitizer'], $value, $field_id, $type ), $value, $field_id );
|
665 |
+
}
|
666 |
}
|
667 |
}
|
668 |
|
classes/class-ccf-form-manager.php
CHANGED
@@ -109,7 +109,7 @@ class CCF_Form_Manager {
|
|
109 |
<div class="bottom">
|
110 |
<input type="button" class="button insert-form-button" value="<?php esc_html_e( 'Insert into post', 'custom-contact-forms' ); ?>">
|
111 |
<input type="button" class="button button-primary save-button" value="<?php esc_html_e( 'Save Form', 'custom-contact-forms' ); ?>">
|
112 |
-
<div class="spinner"></div>
|
113 |
</div>
|
114 |
</script>
|
115 |
|
@@ -222,7 +222,7 @@ class CCF_Form_Manager {
|
|
222 |
<h2 aria-hidden="true">Basic</h2>
|
223 |
<div class="section-content">
|
224 |
<div>
|
225 |
-
<label for="ccf-field-slug"><span class="required">*</span> <?php esc_html_e( 'Internal Slug', 'custom-contact-forms' ); ?> (a-z, 0-9, -, _):</label>
|
226 |
<input id="ccf-field-slug" class="field-slug" type="text" value="<%- field.slug %>">
|
227 |
</div>
|
228 |
<div>
|
@@ -257,12 +257,44 @@ class CCF_Form_Manager {
|
|
257 |
</div>
|
258 |
</script>
|
259 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
260 |
<script type="text/html" id="ccf-website-template">
|
261 |
<div class="accordion-section expanded">
|
262 |
<h2 aria-hidden="true">Basic</h2>
|
263 |
<div class="section-content">
|
264 |
<div>
|
265 |
-
<label for="ccf-field-slug"><span class="required">*</span> <?php esc_html_e( 'Internal Slug', 'custom-contact-forms' ); ?> (a-z, 0-9, -, _):</label>
|
266 |
<input id="ccf-field-slug" class="field-slug" type="text" value="<%- field.slug %>">
|
267 |
</div>
|
268 |
<div>
|
@@ -348,7 +380,7 @@ class CCF_Form_Manager {
|
|
348 |
<h2 aria-hidden="true"><?php esc_html_e( 'Basic', 'custom-contact-forms' ); ?></h2>
|
349 |
<div class="section-content">
|
350 |
<div>
|
351 |
-
<label for="ccf-field-slug"><span class="required">*</span> <?php esc_html_e( 'Internal Slug', 'custom-contact-forms' ); ?> (a-z, 0-9, -, _):</label>
|
352 |
<input id="ccf-field-slug" class="field-slug" type="text" value="<%- field.slug %>">
|
353 |
</div>
|
354 |
<div>
|
@@ -388,7 +420,7 @@ class CCF_Form_Manager {
|
|
388 |
<h2 aria-hidden="true"><?php esc_html_e( 'Basic', 'custom-contact-forms' ); ?></h2>
|
389 |
<div class="section-content">
|
390 |
<div>
|
391 |
-
<label for="ccf-field-slug"><span class="required">*</span> <?php esc_html_e( 'Internal Slug (a-z, 0-9, -, _):', 'custom-contact-forms' ); ?></label>
|
392 |
<input id="ccf-field-slug" class="field-slug" type="text" value="<%- field.slug %>">
|
393 |
</div>
|
394 |
<div>
|
@@ -413,7 +445,7 @@ class CCF_Form_Manager {
|
|
413 |
<h2 aria-hidden="true"><?php esc_html_e( 'Basic', 'custom-contact-forms' ); ?></h2>
|
414 |
<div class="section-content">
|
415 |
<div>
|
416 |
-
<label for="ccf-field-slug"><span class="required">*</span> <?php esc_html_e( 'Internal Slug (a-z, 0-9, -, _):', 'custom-contact-forms' ); ?></label>
|
417 |
<input id="ccf-field-slug" class="field-slug" type="text" value="<%- field.slug %>">
|
418 |
</div>
|
419 |
<div>
|
@@ -445,7 +477,7 @@ class CCF_Form_Manager {
|
|
445 |
<h2 aria-hidden="true"><?php esc_html_e( 'Basic', 'custom-contact-forms' ); ?></h2>
|
446 |
<div class="section-content">
|
447 |
<div>
|
448 |
-
<label for="ccf-field-slug"><span class="required">*</span> <?php esc_html_e( 'Internal Slug (a-z, 0-9, -, _):', 'custom-contact-forms' ); ?></label>
|
449 |
<input id="ccf-field-slug" class="field-slug" type="text" value="<%- field.slug %>">
|
450 |
</div>
|
451 |
<div>
|
@@ -497,7 +529,7 @@ class CCF_Form_Manager {
|
|
497 |
<h2 aria-hidden="true"><?php esc_html_e( 'Basic', 'custom-contact-forms' ); ?></h2>
|
498 |
<div class="section-content">
|
499 |
<div>
|
500 |
-
<label for="ccf-field-slug"><span class="required">*</span> <?php esc_html_e( 'Internal Slug (a-z, 0-9, -, _):', 'custom-contact-forms' ); ?></label>
|
501 |
<input id="ccf-field-slug" class="field-slug" type="text" value="<%- field.slug %>">
|
502 |
</div>
|
503 |
<div>
|
@@ -544,7 +576,7 @@ class CCF_Form_Manager {
|
|
544 |
<h2 aria-hidden="true"><?php esc_html_e( 'Basic', 'custom-contact-forms' ); ?></h2>
|
545 |
<div class="section-content">
|
546 |
<div>
|
547 |
-
<label for="ccf-field-slug"><span class="required">*</span> <?php esc_html_e( 'Internal Slug (a-z, 0-9, -, _):', 'custom-contact-forms' ); ?></label>
|
548 |
<input id="ccf-field-slug" class="field-slug" type="text" value="<%- field.slug %>">
|
549 |
</div>
|
550 |
<div>
|
@@ -583,7 +615,7 @@ class CCF_Form_Manager {
|
|
583 |
<h2 aria-hidden="true"><?php esc_html_e( 'Basic', 'custom-contact-forms' ); ?></h2>
|
584 |
<div class="section-content">
|
585 |
<div>
|
586 |
-
<label for="ccf-field-slug"><span class="required">*</span> <?php esc_html_e( 'Internal Slug (a-z, 0-9, -, _):', 'custom-contact-forms' ); ?></label>
|
587 |
<input id="ccf-field-slug" class="field-slug" type="text" value="<%- field.slug %>">
|
588 |
</div>
|
589 |
<div>
|
@@ -643,7 +675,7 @@ class CCF_Form_Manager {
|
|
643 |
<h2 aria-hidden="true"><?php esc_html_e( 'Basic', 'custom-contact-forms' ); ?></h2>
|
644 |
<div class="section-content">
|
645 |
<div>
|
646 |
-
<label for="ccf-field-slug"><span class="required">*</span> <?php esc_html_e( 'Internal Slug (a-z, 0-9, -, _):', 'custom-contact-forms' ); ?></label>
|
647 |
<input id="ccf-field-slug" class="field-slug" type="text" value="<%- field.slug %>">
|
648 |
</div>
|
649 |
<div>
|
@@ -680,7 +712,7 @@ class CCF_Form_Manager {
|
|
680 |
<h2 aria-hidden="true"><?php esc_html_e( 'Basic', 'custom-contact-forms' ); ?></h2>
|
681 |
<div class="section-content">
|
682 |
<div>
|
683 |
-
<label for="ccf-field-slug"><span class="required">*</span> <?php esc_html_e( 'Internal Slug (a-z, 0-9, -, _):', 'custom-contact-forms' ); ?></label>
|
684 |
<input id="ccf-field-slug" class="field-slug" type="text" value="<%- field.slug %>">
|
685 |
</div>
|
686 |
<div>
|
@@ -717,7 +749,7 @@ class CCF_Form_Manager {
|
|
717 |
<h2 aria-hidden="true"><?php esc_html_e( 'Basic', 'custom-contact-forms' ); ?></h2>
|
718 |
<div class="section-content">
|
719 |
<div>
|
720 |
-
<label for="ccf-field-slug"><span class="required">*</span> <?php esc_html_e( 'Internal Slug (a-z, 0-9, -, _):', 'custom-contact-forms' ); ?></label>
|
721 |
<input id="ccf-field-slug" class="field-slug" type="text" value="<%- field.slug %>">
|
722 |
</div>
|
723 |
<div>
|
@@ -760,6 +792,11 @@ class CCF_Form_Manager {
|
|
760 |
<input disabled type="text" placeholder="<%- field.placeholder %>" value="<%- field.value %>">
|
761 |
</script>
|
762 |
|
|
|
|
|
|
|
|
|
|
|
763 |
<script type="text/html" id="ccf-paragraph-text-preview-template">
|
764 |
<label><%- field.label %> <% if ( field.required ) { %><span>*</span><% } %></label>
|
765 |
<textarea placeholder="<%- field.placeholder %>" disabled><%- field.value %></textarea>
|
@@ -1054,7 +1091,7 @@ class CCF_Form_Manager {
|
|
1054 |
<tbody class="submission-rows">
|
1055 |
<tr>
|
1056 |
<td colspan="<%- columns.length + 1 %>">
|
1057 |
-
<div class="spinner"></div>
|
1058 |
</td>
|
1059 |
</tr>
|
1060 |
</tbody>
|
@@ -1208,6 +1245,7 @@ class CCF_Form_Manager {
|
|
1208 |
'website' => __( 'Website', 'custom-contact-forms' ),
|
1209 |
'address' => __( 'Address', 'custom-contact-forms' ),
|
1210 |
'phone' => __( 'Phone', 'custom-contact-forms' ),
|
|
|
1211 |
));
|
1212 |
|
1213 |
wp_register_script( 'moment', plugins_url( '/bower_components/moment/moment.js', dirname( __FILE__ ) ) );
|
@@ -1226,7 +1264,7 @@ class CCF_Form_Manager {
|
|
1226 |
'invalidDate' => esc_html__( 'Invalid date', 'custom-contact-forms' ),
|
1227 |
'allLabels' => array_merge( $field_labels, $structure_field_labels, $special_field_labels ),
|
1228 |
'thickboxTitle' => esc_html__( 'Form Submission', 'custom-contact-forms' ),
|
1229 |
-
'skipFields' => apply_filters( 'ccf_no_submission_display_fields', array( 'html', 'section-header' ) ),
|
1230 |
) );
|
1231 |
|
1232 |
wp_enqueue_style( 'ccf-form-manager', plugins_url( $css_path, dirname( __FILE__ ) ) );
|
109 |
<div class="bottom">
|
110 |
<input type="button" class="button insert-form-button" value="<?php esc_html_e( 'Insert into post', 'custom-contact-forms' ); ?>">
|
111 |
<input type="button" class="button button-primary save-button" value="<?php esc_html_e( 'Save Form', 'custom-contact-forms' ); ?>">
|
112 |
+
<div class="spinner" style="background: url( '<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>' ) no-repeat;"></div>
|
113 |
</div>
|
114 |
</script>
|
115 |
|
222 |
<h2 aria-hidden="true">Basic</h2>
|
223 |
<div class="section-content">
|
224 |
<div>
|
225 |
+
<label for="ccf-field-slug"><span class="required">*</span> <?php esc_html_e( 'Internal Unique Slug', 'custom-contact-forms' ); ?> (a-z, 0-9, -, _):</label>
|
226 |
<input id="ccf-field-slug" class="field-slug" type="text" value="<%- field.slug %>">
|
227 |
</div>
|
228 |
<div>
|
257 |
</div>
|
258 |
</script>
|
259 |
|
260 |
+
<script type="text/html" id="ccf-recaptcha-template">
|
261 |
+
<div class="accordion-section expanded">
|
262 |
+
<h2 aria-hidden="true">Basic</h2>
|
263 |
+
<div class="section-content">
|
264 |
+
<p><?php _e( 'reCAPTCHA is a simple captcha service provided by Google. <a target="_blank" href="https://www.google.com/recaptcha/intro/index.html">Learn more</a>', 'custom-contact-forms' ); ?></p>
|
265 |
+
<div>
|
266 |
+
<label for="ccf-field-label"><?php esc_html_e( 'Label:', 'custom-contact-forms' ); ?></label>
|
267 |
+
<input id="ccf-field-label" class="field-label" type="text" value="<%- field.label %>">
|
268 |
+
</div>
|
269 |
+
<div>
|
270 |
+
<label for="ccf-field-site-key"><?php esc_html_e( 'Site Key:', 'custom-contact-forms' ); ?></label>
|
271 |
+
<input id="ccf-field-site-key" class="field-site-key" type="text" value="<%- field.siteKey %>">
|
272 |
+
<a href="http://google.com/recaptcha/" target="_blank"><?php _e( "Don't have one?", 'custom-contact-forms' ); ?></a>
|
273 |
+
</div>
|
274 |
+
<div>
|
275 |
+
<label for="ccf-field-secret-key"><?php esc_html_e( 'Secret Key:', 'custom-contact-forms' ); ?></label>
|
276 |
+
<input id="ccf-field-secret-key" class="field-secret-key" type="text" value="<%- field.secretKey %>">
|
277 |
+
<a href="http://google.com/recaptcha/" target="_blank"><?php _e( "Don't have one?", 'custom-contact-forms' ); ?></a>
|
278 |
+
</div>
|
279 |
+
</div>
|
280 |
+
</div>
|
281 |
+
<div class="accordion-section">
|
282 |
+
<h2 aria-hidden="true"><?php esc_html_e( 'Advanced', 'custom-contact-forms' ); ?></h2>
|
283 |
+
<div class="section-content">
|
284 |
+
<div>
|
285 |
+
<label for="ccf-field-class-name"><?php esc_html_e( 'Class Name:', 'custom-contact-forms' ); ?></label>
|
286 |
+
<input id="ccf-field-class-name" class="field-class-name" type="text" value="<%- field.className %>">
|
287 |
+
</div>
|
288 |
+
</div>
|
289 |
+
</div>
|
290 |
+
</script>
|
291 |
+
|
292 |
<script type="text/html" id="ccf-website-template">
|
293 |
<div class="accordion-section expanded">
|
294 |
<h2 aria-hidden="true">Basic</h2>
|
295 |
<div class="section-content">
|
296 |
<div>
|
297 |
+
<label for="ccf-field-slug"><span class="required">*</span> <?php esc_html_e( 'Internal Unique Slug', 'custom-contact-forms' ); ?> (a-z, 0-9, -, _):</label>
|
298 |
<input id="ccf-field-slug" class="field-slug" type="text" value="<%- field.slug %>">
|
299 |
</div>
|
300 |
<div>
|
380 |
<h2 aria-hidden="true"><?php esc_html_e( 'Basic', 'custom-contact-forms' ); ?></h2>
|
381 |
<div class="section-content">
|
382 |
<div>
|
383 |
+
<label for="ccf-field-slug"><span class="required">*</span> <?php esc_html_e( 'Internal Unique Slug', 'custom-contact-forms' ); ?> (a-z, 0-9, -, _):</label>
|
384 |
<input id="ccf-field-slug" class="field-slug" type="text" value="<%- field.slug %>">
|
385 |
</div>
|
386 |
<div>
|
420 |
<h2 aria-hidden="true"><?php esc_html_e( 'Basic', 'custom-contact-forms' ); ?></h2>
|
421 |
<div class="section-content">
|
422 |
<div>
|
423 |
+
<label for="ccf-field-slug"><span class="required">*</span> <?php esc_html_e( 'Internal Unique Slug (a-z, 0-9, -, _):', 'custom-contact-forms' ); ?></label>
|
424 |
<input id="ccf-field-slug" class="field-slug" type="text" value="<%- field.slug %>">
|
425 |
</div>
|
426 |
<div>
|
445 |
<h2 aria-hidden="true"><?php esc_html_e( 'Basic', 'custom-contact-forms' ); ?></h2>
|
446 |
<div class="section-content">
|
447 |
<div>
|
448 |
+
<label for="ccf-field-slug"><span class="required">*</span> <?php esc_html_e( 'Internal Unique Slug (a-z, 0-9, -, _):', 'custom-contact-forms' ); ?></label>
|
449 |
<input id="ccf-field-slug" class="field-slug" type="text" value="<%- field.slug %>">
|
450 |
</div>
|
451 |
<div>
|
477 |
<h2 aria-hidden="true"><?php esc_html_e( 'Basic', 'custom-contact-forms' ); ?></h2>
|
478 |
<div class="section-content">
|
479 |
<div>
|
480 |
+
<label for="ccf-field-slug"><span class="required">*</span> <?php esc_html_e( 'Internal Unique Slug (a-z, 0-9, -, _):', 'custom-contact-forms' ); ?></label>
|
481 |
<input id="ccf-field-slug" class="field-slug" type="text" value="<%- field.slug %>">
|
482 |
</div>
|
483 |
<div>
|
529 |
<h2 aria-hidden="true"><?php esc_html_e( 'Basic', 'custom-contact-forms' ); ?></h2>
|
530 |
<div class="section-content">
|
531 |
<div>
|
532 |
+
<label for="ccf-field-slug"><span class="required">*</span> <?php esc_html_e( 'Internal Unique Slug (a-z, 0-9, -, _):', 'custom-contact-forms' ); ?></label>
|
533 |
<input id="ccf-field-slug" class="field-slug" type="text" value="<%- field.slug %>">
|
534 |
</div>
|
535 |
<div>
|
576 |
<h2 aria-hidden="true"><?php esc_html_e( 'Basic', 'custom-contact-forms' ); ?></h2>
|
577 |
<div class="section-content">
|
578 |
<div>
|
579 |
+
<label for="ccf-field-slug"><span class="required">*</span> <?php esc_html_e( 'Internal Unique Slug (a-z, 0-9, -, _):', 'custom-contact-forms' ); ?></label>
|
580 |
<input id="ccf-field-slug" class="field-slug" type="text" value="<%- field.slug %>">
|
581 |
</div>
|
582 |
<div>
|
615 |
<h2 aria-hidden="true"><?php esc_html_e( 'Basic', 'custom-contact-forms' ); ?></h2>
|
616 |
<div class="section-content">
|
617 |
<div>
|
618 |
+
<label for="ccf-field-slug"><span class="required">*</span> <?php esc_html_e( 'Internal Unique Slug (a-z, 0-9, -, _):', 'custom-contact-forms' ); ?></label>
|
619 |
<input id="ccf-field-slug" class="field-slug" type="text" value="<%- field.slug %>">
|
620 |
</div>
|
621 |
<div>
|
675 |
<h2 aria-hidden="true"><?php esc_html_e( 'Basic', 'custom-contact-forms' ); ?></h2>
|
676 |
<div class="section-content">
|
677 |
<div>
|
678 |
+
<label for="ccf-field-slug"><span class="required">*</span> <?php esc_html_e( 'Internal Unique Slug (a-z, 0-9, -, _):', 'custom-contact-forms' ); ?></label>
|
679 |
<input id="ccf-field-slug" class="field-slug" type="text" value="<%- field.slug %>">
|
680 |
</div>
|
681 |
<div>
|
712 |
<h2 aria-hidden="true"><?php esc_html_e( 'Basic', 'custom-contact-forms' ); ?></h2>
|
713 |
<div class="section-content">
|
714 |
<div>
|
715 |
+
<label for="ccf-field-slug"><span class="required">*</span> <?php esc_html_e( 'Internal Unique Slug (a-z, 0-9, -, _):', 'custom-contact-forms' ); ?></label>
|
716 |
<input id="ccf-field-slug" class="field-slug" type="text" value="<%- field.slug %>">
|
717 |
</div>
|
718 |
<div>
|
749 |
<h2 aria-hidden="true"><?php esc_html_e( 'Basic', 'custom-contact-forms' ); ?></h2>
|
750 |
<div class="section-content">
|
751 |
<div>
|
752 |
+
<label for="ccf-field-slug"><span class="required">*</span> <?php esc_html_e( 'Internal Unique Slug (a-z, 0-9, -, _):', 'custom-contact-forms' ); ?></label>
|
753 |
<input id="ccf-field-slug" class="field-slug" type="text" value="<%- field.slug %>">
|
754 |
</div>
|
755 |
<div>
|
792 |
<input disabled type="text" placeholder="<%- field.placeholder %>" value="<%- field.value %>">
|
793 |
</script>
|
794 |
|
795 |
+
<script type="text/html" id="ccf-recaptcha-preview-template">
|
796 |
+
<label><%- field.label %> <% if ( field.required ) { %><span>*</span><% } %></label>
|
797 |
+
<img class="recaptcha-preview-img" src="<?php echo plugins_url( 'img/recaptcha.png', dirname( __FILE__ )); ?>">
|
798 |
+
</script>
|
799 |
+
|
800 |
<script type="text/html" id="ccf-paragraph-text-preview-template">
|
801 |
<label><%- field.label %> <% if ( field.required ) { %><span>*</span><% } %></label>
|
802 |
<textarea placeholder="<%- field.placeholder %>" disabled><%- field.value %></textarea>
|
1091 |
<tbody class="submission-rows">
|
1092 |
<tr>
|
1093 |
<td colspan="<%- columns.length + 1 %>">
|
1094 |
+
<div class="spinner" style="background: url( '<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>' ) no-repeat;"></div>
|
1095 |
</td>
|
1096 |
</tr>
|
1097 |
</tbody>
|
1245 |
'website' => __( 'Website', 'custom-contact-forms' ),
|
1246 |
'address' => __( 'Address', 'custom-contact-forms' ),
|
1247 |
'phone' => __( 'Phone', 'custom-contact-forms' ),
|
1248 |
+
'recaptcha' => __( 'reCAPTCHA', 'custom-contact-forms' ),
|
1249 |
));
|
1250 |
|
1251 |
wp_register_script( 'moment', plugins_url( '/bower_components/moment/moment.js', dirname( __FILE__ ) ) );
|
1264 |
'invalidDate' => esc_html__( 'Invalid date', 'custom-contact-forms' ),
|
1265 |
'allLabels' => array_merge( $field_labels, $structure_field_labels, $special_field_labels ),
|
1266 |
'thickboxTitle' => esc_html__( 'Form Submission', 'custom-contact-forms' ),
|
1267 |
+
'skipFields' => apply_filters( 'ccf_no_submission_display_fields', array( 'html', 'section-header', 'recaptcha' ) ),
|
1268 |
) );
|
1269 |
|
1270 |
wp_enqueue_style( 'ccf-form-manager', plugins_url( $css_path, dirname( __FILE__ ) ) );
|
classes/class-ccf-form-renderer.php
CHANGED
@@ -43,9 +43,10 @@ class CCF_Form_Renderer {
|
|
43 |
}
|
44 |
|
45 |
wp_enqueue_style('ccf-jquery-ui', '//ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/smoothness/jquery-ui.css');
|
|
|
46 |
wp_enqueue_style( 'ccf-form', plugins_url( $css_form_path, dirname( __FILE__ ) ) );
|
47 |
|
48 |
-
wp_enqueue_script( 'ccf-form', plugins_url( $js_path, dirname( __FILE__ ) ), array( 'jquery-ui-datepicker', 'underscore' ), '1.1',
|
49 |
|
50 |
$localized = array(
|
51 |
'ajaxurl' => esc_url_raw( admin_url( 'admin-ajax.php' ) ),
|
@@ -56,6 +57,8 @@ class CCF_Form_Renderer {
|
|
56 |
'am-pm_required' => esc_html__( 'AM/PM is required.', 'custom-contact-forms' ),
|
57 |
'match' => esc_html__( 'Emails do not match.', 'custom-contact-forms' ),
|
58 |
'email' => esc_html__( 'This is not a valid email address.', 'custom-contact-forms' ),
|
|
|
|
|
59 |
'phone' => esc_html__( 'This is not a valid phone number.', 'custom-contact-forms' ),
|
60 |
'digits' => esc_html__( 'This phone number is not 10 digits', 'custom-contact-forms' ),
|
61 |
'hour' => esc_html__( 'This is not a valid hour.', 'custom-contact-forms' ),
|
@@ -124,8 +127,8 @@ class CCF_Form_Renderer {
|
|
124 |
} else {
|
125 |
?>
|
126 |
|
127 |
-
<div class="ccf-form-wrapper form-id-<?php echo (int) $form_id; ?>">
|
128 |
-
<form class="ccf-form" method="post" action="">
|
129 |
|
130 |
<?php $title = get_the_title( $form_id ); if ( ! empty( $title ) && apply_filters( 'ccf_show_form_title', true, $form_id ) ) : ?>
|
131 |
<div class="form-title">
|
43 |
}
|
44 |
|
45 |
wp_enqueue_style('ccf-jquery-ui', '//ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/smoothness/jquery-ui.css');
|
46 |
+
wp_enqueue_script( 'ccf-google-recaptcha', '//www.google.com/recaptcha/api.js?onload=ccfRecaptchaOnload&render=explicit' );
|
47 |
wp_enqueue_style( 'ccf-form', plugins_url( $css_form_path, dirname( __FILE__ ) ) );
|
48 |
|
49 |
+
wp_enqueue_script( 'ccf-form', plugins_url( $js_path, dirname( __FILE__ ) ), array( 'jquery-ui-datepicker', 'underscore', 'ccf-google-recaptcha' ), '1.1', false );
|
50 |
|
51 |
$localized = array(
|
52 |
'ajaxurl' => esc_url_raw( admin_url( 'admin-ajax.php' ) ),
|
57 |
'am-pm_required' => esc_html__( 'AM/PM is required.', 'custom-contact-forms' ),
|
58 |
'match' => esc_html__( 'Emails do not match.', 'custom-contact-forms' ),
|
59 |
'email' => esc_html__( 'This is not a valid email address.', 'custom-contact-forms' ),
|
60 |
+
'recaptcha' => esc_html__( 'Your reCAPTCHA response was incorrect.', 'custom-contact-forms' ),
|
61 |
+
'recaptcha_theme' => apply_filters( 'ccf_recaptcha_theme', 'light' ),
|
62 |
'phone' => esc_html__( 'This is not a valid phone number.', 'custom-contact-forms' ),
|
63 |
'digits' => esc_html__( 'This phone number is not 10 digits', 'custom-contact-forms' ),
|
64 |
'hour' => esc_html__( 'This is not a valid hour.', 'custom-contact-forms' ),
|
127 |
} else {
|
128 |
?>
|
129 |
|
130 |
+
<div class="ccf-form-wrapper form-id-<?php echo (int) $form_id; ?>" data-form-id="<?php echo (int) $form_id; ?>">
|
131 |
+
<form class="ccf-form" method="post" action="" data-form-id="<?php echo (int) $form_id; ?>">
|
132 |
|
133 |
<?php $title = get_the_title( $form_id ); if ( ! empty( $title ) && apply_filters( 'ccf_show_form_title', true, $form_id ) ) : ?>
|
134 |
<div class="form-title">
|
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.2
|
8 |
* Author URI: http://www.taylorlovett.com
|
9 |
*/
|
10 |
|
img/recaptcha.png
ADDED
Binary file
|
js/form.js
CHANGED
@@ -3,15 +3,32 @@
|
|
3 |
|
4 |
window.wp = window.wp || {};
|
5 |
|
6 |
-
var datepickers = document.querySelectorAll( '.ccf-datepicker' );
|
7 |
-
|
8 |
-
for ( var i = 0; i < datepickers.length; i++ ) {
|
9 |
-
$( datepickers[i] ).datepicker();
|
10 |
-
}
|
11 |
-
|
12 |
wp.ccf = wp.ccf || {};
|
13 |
wp.ccf.validators = wp.ccf.validators || {};
|
14 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
var choiceValidator = function( fieldWrapperElement ) {
|
16 |
this.wrapper = fieldWrapperElement;
|
17 |
this.errors = {};
|
@@ -115,6 +132,38 @@
|
|
115 |
}
|
116 |
});
|
117 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
118 |
wp.ccf.validators.phone = wp.ccf.validators.phone || validator( false, function() {
|
119 |
var phone = this.inputs[0].value;
|
120 |
|
@@ -216,98 +265,112 @@
|
|
216 |
|
217 |
wp.ccf.validators.radio = wp.ccf.validators.radio || choiceValidator;
|
218 |
|
219 |
-
|
|
|
|
|
|
|
|
|
220 |
|
221 |
-
|
222 |
-
|
|
|
223 |
|
224 |
-
|
225 |
-
event.returnFalse = false;
|
226 |
|
227 |
-
|
228 |
-
|
229 |
-
}
|
230 |
|
231 |
-
var
|
232 |
|
233 |
-
var
|
|
|
234 |
|
235 |
-
|
236 |
-
|
237 |
-
return;
|
238 |
}
|
239 |
|
240 |
-
var
|
241 |
|
242 |
-
var
|
243 |
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
250 |
}
|
251 |
}
|
252 |
-
}
|
253 |
|
254 |
-
|
255 |
-
|
|
|
256 |
}
|
257 |
-
}
|
258 |
-
});
|
259 |
-
|
260 |
-
if ( errors.length ) {
|
261 |
-
var docViewTop = $( window ).scrollTop();
|
262 |
-
var docViewBottom = docViewTop + $( window ).height();
|
263 |
|
264 |
-
|
265 |
-
|
|
|
266 |
|
267 |
-
|
268 |
-
|
269 |
|
270 |
-
|
271 |
-
|
272 |
-
scrollTop: $firstError.offset().top
|
273 |
-
}, 500 );
|
274 |
-
}
|
275 |
-
} else {
|
276 |
-
var $form = $( this.querySelectorAll( '.ccf-form' )[0] );
|
277 |
-
|
278 |
-
form.className = form.className.replace( / loading/i, '' ) + ' loading';
|
279 |
-
|
280 |
-
var $loading = $( form.querySelectorAll( '.loading-img' )[0] );
|
281 |
-
$loading.animate( { opacity: 100 } );
|
282 |
-
|
283 |
-
$.ajax( {
|
284 |
-
url: ccfSettings.ajaxurl,
|
285 |
-
type: 'post',
|
286 |
-
data: $form.serialize()
|
287 |
-
}).done( function( data ) {
|
288 |
-
if ( data.success ) {
|
289 |
-
if ( 'text' === data.action_type && data.completion_message ) {
|
290 |
-
form.innerHTML = data.completion_message;
|
291 |
-
|
292 |
-
$( 'html, body' ).animate( {
|
293 |
-
scrollTop: $( form ).offset().top
|
294 |
-
}, 500 );
|
295 |
-
} else if ( 'redirect' === data.action_type && data.completion_redirect_url ) {
|
296 |
-
document.location = data.completion_redirect_url;
|
297 |
-
}
|
298 |
|
|
|
|
|
|
|
|
|
299 |
}
|
300 |
-
}
|
301 |
-
form
|
302 |
-
|
303 |
-
|
304 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
305 |
|
306 |
-
|
307 |
-
|
308 |
|
309 |
-
|
310 |
|
311 |
-
|
312 |
-
|
|
|
313 |
})( jQuery, ccfSettings );
|
3 |
|
4 |
window.wp = window.wp || {};
|
5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
wp.ccf = wp.ccf || {};
|
7 |
wp.ccf.validators = wp.ccf.validators || {};
|
8 |
|
9 |
+
|
10 |
+
var _verifiedRecaptcha = {};
|
11 |
+
|
12 |
+
window.ccfRecaptchaOnload = function() {
|
13 |
+
var recaptchas = document.querySelectorAll( '.ccf-recaptcha-wrapper' );
|
14 |
+
|
15 |
+
var setupCaptcha = function( formId ) {
|
16 |
+
grecaptcha.render( recaptchas[i], {
|
17 |
+
sitekey: recaptchas[i].getAttribute( 'data-sitekey' ),
|
18 |
+
theme: ccfSettings.recaptcha_theme,
|
19 |
+
callback: function() {
|
20 |
+
_verifiedRecaptcha[formId] = true;
|
21 |
+
}
|
22 |
+
});
|
23 |
+
};
|
24 |
+
|
25 |
+
for ( var i = 0; i < recaptchas.length; i++ ) {
|
26 |
+
var formId = recaptchas[i].getAttribute( 'data-form-id' );
|
27 |
+
|
28 |
+
setupCaptcha( formId );
|
29 |
+
}
|
30 |
+
};
|
31 |
+
|
32 |
var choiceValidator = function( fieldWrapperElement ) {
|
33 |
this.wrapper = fieldWrapperElement;
|
34 |
this.errors = {};
|
132 |
}
|
133 |
});
|
134 |
|
135 |
+
wp.ccf.validators.recaptcha = wp.ccf.validators.recaptcha || function( fieldWrapperElement, formId ) {
|
136 |
+
this.wrapper = fieldWrapperElement;
|
137 |
+
this.inputs = this.wrapper.querySelectorAll( '.g-recaptcha-response' );
|
138 |
+
this.errors = {};
|
139 |
+
|
140 |
+
var oldErrorNodes = this.wrapper.querySelectorAll( '.error' );
|
141 |
+
for ( var i = oldErrorNodes.length - 1; i >= 0; i-- ) {
|
142 |
+
oldErrorNodes[i].parentNode.removeChild( oldErrorNodes[i] );
|
143 |
+
}
|
144 |
+
|
145 |
+
if ( ! _verifiedRecaptcha[formId] ) {
|
146 |
+
this.errors['g-recaptcha-response'] = {};
|
147 |
+
this.errors['g-recaptcha-response'].recaptcha = this.wrapper.lastChild;
|
148 |
+
}
|
149 |
+
|
150 |
+
var newErrorNode;
|
151 |
+
|
152 |
+
for ( var field in this.errors ) {
|
153 |
+
if ( this.errors.hasOwnProperty( field ) ) {
|
154 |
+
|
155 |
+
for ( var errorKey in this.errors[field] ) {
|
156 |
+
newErrorNode = document.createElement( 'div' );
|
157 |
+
newErrorNode.className = 'error ' + errorKey + '-error';
|
158 |
+
newErrorNode.setAttribute( 'data-field-name', field );
|
159 |
+
newErrorNode.innerHTML = ccfSettings[errorKey];
|
160 |
+
|
161 |
+
this.errors[field][errorKey].parentNode.insertBefore( newErrorNode, this.errors[field][errorKey].nextSibling );
|
162 |
+
}
|
163 |
+
}
|
164 |
+
}
|
165 |
+
};
|
166 |
+
|
167 |
wp.ccf.validators.phone = wp.ccf.validators.phone || validator( false, function() {
|
168 |
var phone = this.inputs[0].value;
|
169 |
|
265 |
|
266 |
wp.ccf.validators.radio = wp.ccf.validators.radio || choiceValidator;
|
267 |
|
268 |
+
/**
|
269 |
+
* Register listeners on DOM
|
270 |
+
*/
|
271 |
+
$( document ).ready( function() {
|
272 |
+
var datepickers = document.querySelectorAll( '.ccf-datepicker' );
|
273 |
|
274 |
+
for ( var i = 0; i < datepickers.length; i++ ) {
|
275 |
+
$( datepickers[i] ).datepicker();
|
276 |
+
}
|
277 |
|
278 |
+
var forms = document.querySelectorAll( '.ccf-form-wrapper' );
|
|
|
279 |
|
280 |
+
if ( forms.length >= 1 ) {
|
281 |
+
_.each( forms, function( form ) {
|
|
|
282 |
|
283 |
+
var formId = parseInt( form.getAttribute( 'data-form-id' ) );
|
284 |
|
285 |
+
var formSubmit = function( event ) {
|
286 |
+
event.returnFalse = false;
|
287 |
|
288 |
+
if ( event.preventDefault ) {
|
289 |
+
event.preventDefault();
|
|
|
290 |
}
|
291 |
|
292 |
+
var fields = form.querySelectorAll( '.field' );
|
293 |
|
294 |
+
var errors = [];
|
295 |
|
296 |
+
_.each( fields, function( field ) {
|
297 |
+
if ( field.className.match( / skip-field/i ) ) {
|
298 |
+
return;
|
299 |
+
}
|
300 |
+
|
301 |
+
var type = field.getAttribute( 'data-field-type' );
|
302 |
+
|
303 |
+
var validation = new ( wp.ccf.validators[type] )( field, formId );
|
304 |
+
|
305 |
+
if ( _.size( validation.errors ) ) {
|
306 |
+
var validationErrors = 0;
|
307 |
+
for ( var key in validation.errors ) {
|
308 |
+
if ( validation.errors.hasOwnProperty( key ) ) {
|
309 |
+
if (_.size( validation.errors[key] ) ) {
|
310 |
+
validationErrors++;
|
311 |
+
}
|
312 |
}
|
313 |
}
|
|
|
314 |
|
315 |
+
if ( validationErrors > 0 ) {
|
316 |
+
errors.push( validation );
|
317 |
+
}
|
318 |
}
|
319 |
+
});
|
|
|
|
|
|
|
|
|
|
|
320 |
|
321 |
+
if ( errors.length ) {
|
322 |
+
var docViewTop = $( window ).scrollTop();
|
323 |
+
var docViewBottom = docViewTop + $( window ).height();
|
324 |
|
325 |
+
var $firstError = $( errors[0].wrapper );
|
326 |
+
var $firstErrorOffset = $firstError.offset();
|
327 |
|
328 |
+
var top = $firstErrorOffset.top;
|
329 |
+
var bottom = top + $firstError.height();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
330 |
|
331 |
+
if ( ! ( docViewTop <= top && docViewBottom >= bottom ) ) {
|
332 |
+
$( 'html, body' ).animate( {
|
333 |
+
scrollTop: $firstError.offset().top
|
334 |
+
}, 500 );
|
335 |
}
|
336 |
+
} else {
|
337 |
+
var $form = $( this.querySelectorAll( '.ccf-form' )[0] );
|
338 |
+
|
339 |
+
form.className = form.className.replace( / loading/i, '' ) + ' loading';
|
340 |
+
|
341 |
+
var $loading = $( form.querySelectorAll( '.loading-img' )[0] );
|
342 |
+
$loading.animate( { opacity: 100 } );
|
343 |
+
|
344 |
+
$.ajax( {
|
345 |
+
url: ccfSettings.ajaxurl,
|
346 |
+
type: 'post',
|
347 |
+
data: $form.serialize()
|
348 |
+
}).done( function( data ) {
|
349 |
+
if ( data.success ) {
|
350 |
+
if ( 'text' === data.action_type && data.completion_message ) {
|
351 |
+
form.innerHTML = data.completion_message;
|
352 |
+
|
353 |
+
$( 'html, body' ).animate( {
|
354 |
+
scrollTop: $( form ).offset().top
|
355 |
+
}, 500 );
|
356 |
+
} else if ( 'redirect' === data.action_type && data.completion_redirect_url ) {
|
357 |
+
document.location = data.completion_redirect_url;
|
358 |
+
}
|
359 |
+
|
360 |
+
}
|
361 |
+
}).complete( function() {
|
362 |
+
form.className = form.className.replace( / loading/i, '' );
|
363 |
+
$loading.animate( { opacity: 0 } );
|
364 |
+
_verifiedRecaptcha[formId] = false;
|
365 |
+
});
|
366 |
+
}
|
367 |
|
368 |
+
return false;
|
369 |
+
};
|
370 |
|
371 |
+
$( form ).on( 'submit', formSubmit );
|
372 |
|
373 |
+
});
|
374 |
+
}
|
375 |
+
});
|
376 |
})( jQuery, ccfSettings );
|
js/manager/models.js
CHANGED
@@ -348,6 +348,26 @@
|
|
348 |
}
|
349 |
);
|
350 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
351 |
wp.ccf.models.Fields.address = wp.ccf.models.Fields.address || wp.ccf.models.StandardField.extend(
|
352 |
{
|
353 |
defaults: function() {
|
348 |
}
|
349 |
);
|
350 |
|
351 |
+
wp.ccf.models.Fields.recaptcha = wp.ccf.models.Fields.recaptcha || wp.ccf.models.StandardField.extend(
|
352 |
+
{
|
353 |
+
defaults: function() {
|
354 |
+
var defaults = {
|
355 |
+
type: 'recaptcha',
|
356 |
+
siteKey: '',
|
357 |
+
secretKey: ''
|
358 |
+
};
|
359 |
+
|
360 |
+
return _.defaults( defaults, this.constructor.__super__.defaults() );
|
361 |
+
},
|
362 |
+
|
363 |
+
required: function() {
|
364 |
+
return [ 'siteKey', 'secretKey' ];
|
365 |
+
},
|
366 |
+
|
367 |
+
isImmutable: true
|
368 |
+
}
|
369 |
+
);
|
370 |
+
|
371 |
wp.ccf.models.Fields.address = wp.ccf.models.Fields.address || wp.ccf.models.StandardField.extend(
|
372 |
{
|
373 |
defaults: function() {
|
js/manager/views.js
CHANGED
@@ -151,6 +151,25 @@
|
|
151 |
}
|
152 |
);
|
153 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
154 |
wp.ccf.views.Fields['section-header'] = wp.ccf.views.Fields['section-header'] || wp.ccf.views.FieldBase.extend(
|
155 |
{
|
156 |
template: _.template( document.getElementById( 'ccf-section-header-template' ).innerHTML ),
|
151 |
}
|
152 |
);
|
153 |
|
154 |
+
wp.ccf.views.Fields.recaptcha = wp.ccf.views.Fields.recaptcha || wp.ccf.views.FieldBase.extend(
|
155 |
+
{
|
156 |
+
template: _.template( document.getElementById( 'ccf-recaptcha-template' ).innerHTML ),
|
157 |
+
|
158 |
+
initialize: function() {
|
159 |
+
|
160 |
+
},
|
161 |
+
|
162 |
+
saveField: function() {
|
163 |
+
this.model.set( 'label', this.el.querySelectorAll( '.field-label' )[0].value );
|
164 |
+
this.model.set( 'siteKey', this.el.querySelectorAll( '.field-site-key' )[0].value );
|
165 |
+
this.model.set( 'secretKey', this.el.querySelectorAll( '.field-secret-key' )[0].value );
|
166 |
+
this.model.set( 'className', this.el.querySelectorAll( '.field-class-name' )[0].value );
|
167 |
+
|
168 |
+
return this;
|
169 |
+
}
|
170 |
+
}
|
171 |
+
);
|
172 |
+
|
173 |
wp.ccf.views.Fields['section-header'] = wp.ccf.views.Fields['section-header'] || wp.ccf.views.FieldBase.extend(
|
174 |
{
|
175 |
template: _.template( document.getElementById( 'ccf-section-header-template' ).innerHTML ),
|
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 ""
|
@@ -62,11 +62,50 @@ msgid ""
|
|
62 |
"are enabled. Please update your <a href=\"%s\">permalinks settings</a>."
|
63 |
msgstr ""
|
64 |
|
65 |
-
#: ../classes/class-ccf-custom-contact-forms.php:
|
66 |
#, php-format
|
67 |
msgid "<a href=\"%s\">Forms and Submissions</a>"
|
68 |
msgstr ""
|
69 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
#: ../classes/class-ccf-form-cpt.php:74
|
71 |
msgid "Form Submission Columns"
|
72 |
msgstr ""
|
@@ -134,16 +173,6 @@ msgstr ""
|
|
134 |
msgid "Number of Fields"
|
135 |
msgstr ""
|
136 |
|
137 |
-
#: ../classes/class-ccf-form-cpt.php:306
|
138 |
-
#: ../classes/class-ccf-form-manager.php:190
|
139 |
-
#: ../classes/class-ccf-form-manager.php:203
|
140 |
-
#: ../classes/class-ccf-form-manager.php:862
|
141 |
-
#: ../classes/class-ccf-form-manager.php:1030
|
142 |
-
#: ../classes/class-ccf-form-manager.php:1044
|
143 |
-
#: ../classes/class-ccf-form-manager.php:1147
|
144 |
-
msgid "Date"
|
145 |
-
msgstr ""
|
146 |
-
|
147 |
#: ../classes/class-ccf-form-cpt.php:339
|
148 |
msgid "Unpublished"
|
149 |
msgstr ""
|
@@ -202,113 +231,122 @@ msgstr ""
|
|
202 |
msgid "No forms found in trash."
|
203 |
msgstr ""
|
204 |
|
205 |
-
#: ../classes/class-ccf-form-handler.php:
|
206 |
-
#: ../classes/class-ccf-form-handler.php:
|
207 |
-
#: ../classes/class-ccf-form-handler.php:
|
208 |
-
#: ../classes/class-ccf-form-handler.php:
|
209 |
-
#: ../classes/class-ccf-form-handler.php:
|
210 |
-
#: ../classes/class-ccf-form-handler.php:
|
211 |
-
#: ../classes/class-ccf-form-handler.php:
|
212 |
-
#: ../classes/class-ccf-form-handler.php:
|
213 |
-
#: ../classes/class-ccf-form-handler.php:
|
214 |
-
#: ../classes/class-ccf-form-handler.php:
|
215 |
-
#: ../classes/class-ccf-form-handler.php:
|
216 |
-
#: ../classes/class-ccf-form-renderer.php:
|
217 |
msgid "This field is required."
|
218 |
msgstr ""
|
219 |
|
220 |
#: ../classes/class-ccf-form-handler.php:130
|
|
|
|
|
|
|
|
|
|
|
221 |
msgid "This field is required"
|
222 |
msgstr ""
|
223 |
|
224 |
-
#: ../classes/class-ccf-form-handler.php:
|
225 |
msgid "This phone number is too short"
|
226 |
msgstr ""
|
227 |
|
228 |
-
#: ../classes/class-ccf-form-handler.php:
|
229 |
msgid "ccf_field_phoneFormat"
|
230 |
msgstr ""
|
231 |
|
232 |
-
#: ../classes/class-ccf-form-handler.php:
|
233 |
msgid "This phone number contains invalid characters."
|
234 |
msgstr ""
|
235 |
|
236 |
-
#: ../classes/class-ccf-form-handler.php:
|
237 |
msgid "This phone number is not 10 digits."
|
238 |
msgstr ""
|
239 |
|
240 |
-
#: ../classes/class-ccf-form-handler.php:
|
241 |
-
#: ../classes/class-ccf-form-handler.php:
|
242 |
msgid "This is not a valid email"
|
243 |
msgstr ""
|
244 |
|
245 |
-
#: ../classes/class-ccf-form-handler.php:
|
246 |
-
#: ../classes/class-ccf-form-renderer.php:
|
247 |
msgid "Emails do not match."
|
248 |
msgstr ""
|
249 |
|
250 |
-
#: ../classes/class-ccf-form-handler.php:
|
251 |
msgid "First name is required."
|
252 |
msgstr ""
|
253 |
|
254 |
-
#: ../classes/class-ccf-form-handler.php:
|
255 |
msgid "Last name is required."
|
256 |
msgstr ""
|
257 |
|
258 |
-
#: ../classes/class-ccf-form-handler.php:
|
259 |
-
#: ../classes/class-ccf-form-renderer.php:
|
260 |
msgid "This is not a valid URL. URL's must start with http(s)://"
|
261 |
msgstr ""
|
262 |
|
263 |
-
#: ../classes/class-ccf-form-handler.php:
|
264 |
-
#: ../classes/class-ccf-form-handler.php:
|
265 |
-
#: ../classes/class-ccf-form-renderer.php:
|
266 |
msgid "Date is required."
|
267 |
msgstr ""
|
268 |
|
269 |
-
#: ../classes/class-ccf-form-handler.php:
|
270 |
-
#: ../classes/class-ccf-form-handler.php:
|
271 |
-
#: ../classes/class-ccf-form-renderer.php:
|
272 |
msgid "This date is not valid."
|
273 |
msgstr ""
|
274 |
|
275 |
-
#: ../classes/class-ccf-form-handler.php:
|
276 |
-
#: ../classes/class-ccf-form-handler.php:
|
277 |
-
#: ../classes/class-ccf-form-renderer.php:
|
278 |
msgid "Hour is required."
|
279 |
msgstr ""
|
280 |
|
281 |
-
#: ../classes/class-ccf-form-handler.php:
|
282 |
-
#: ../classes/class-ccf-form-handler.php:
|
283 |
-
#: ../classes/class-ccf-form-renderer.php:
|
284 |
msgid "This is not a valid hour."
|
285 |
msgstr ""
|
286 |
|
287 |
-
#: ../classes/class-ccf-form-handler.php:
|
288 |
-
#: ../classes/class-ccf-form-handler.php:
|
289 |
-
#: ../classes/class-ccf-form-renderer.php:
|
290 |
msgid "Minute is required."
|
291 |
msgstr ""
|
292 |
|
293 |
-
#: ../classes/class-ccf-form-handler.php:
|
294 |
-
#: ../classes/class-ccf-form-handler.php:
|
295 |
-
#: ../classes/class-ccf-form-renderer.php:
|
296 |
msgid "This is not a valid minute."
|
297 |
msgstr ""
|
298 |
|
299 |
-
#: ../classes/class-ccf-form-handler.php:
|
300 |
-
#: ../classes/class-ccf-form-handler.php:
|
301 |
-
#: ../classes/class-ccf-form-renderer.php:
|
302 |
msgid "AM/PM is required."
|
303 |
msgstr ""
|
304 |
|
305 |
-
#: ../classes/class-ccf-form-handler.php:
|
|
|
|
|
|
|
|
|
306 |
#, php-format
|
307 |
msgid "%s: Form Submission to \"%s\""
|
308 |
msgstr ""
|
309 |
|
310 |
-
#: ../classes/class-ccf-form-handler.php:
|
311 |
-
#: ../classes/class-ccf-form-renderer.php:
|
312 |
msgid "Thank you for your submission."
|
313 |
msgstr ""
|
314 |
|
@@ -337,7 +375,7 @@ msgid "→ Drag fields here to add them"
|
|
337 |
msgstr ""
|
338 |
|
339 |
#: ../classes/class-ccf-form-manager.php:110
|
340 |
-
#: ../classes/class-ccf-form-manager.php:
|
341 |
msgid "Insert into post"
|
342 |
msgstr ""
|
343 |
|
@@ -387,33 +425,33 @@ msgstr ""
|
|
387 |
|
388 |
#: ../classes/class-ccf-form-manager.php:155
|
389 |
#: ../classes/class-ccf-form-manager.php:239
|
390 |
-
#: ../classes/class-ccf-form-manager.php:
|
391 |
-
#: ../classes/class-ccf-form-manager.php:
|
392 |
-
#: ../classes/class-ccf-form-manager.php:
|
393 |
-
#: ../classes/class-ccf-form-manager.php:
|
394 |
-
#: ../classes/class-ccf-form-manager.php:
|
395 |
-
#: ../classes/class-ccf-form-manager.php:
|
396 |
-
#: ../classes/class-ccf-form-manager.php:
|
397 |
-
#: ../classes/class-ccf-form-manager.php:
|
398 |
-
#: ../classes/class-ccf-form-manager.php:
|
399 |
-
#: ../classes/class-ccf-form-manager.php:
|
400 |
-
#: ../classes/class-ccf-form-manager.php:
|
401 |
msgid "Yes"
|
402 |
msgstr ""
|
403 |
|
404 |
#: ../classes/class-ccf-form-manager.php:156
|
405 |
#: ../classes/class-ccf-form-manager.php:240
|
406 |
-
#: ../classes/class-ccf-form-manager.php:
|
407 |
-
#: ../classes/class-ccf-form-manager.php:
|
408 |
-
#: ../classes/class-ccf-form-manager.php:
|
409 |
-
#: ../classes/class-ccf-form-manager.php:
|
410 |
-
#: ../classes/class-ccf-form-manager.php:
|
411 |
-
#: ../classes/class-ccf-form-manager.php:
|
412 |
-
#: ../classes/class-ccf-form-manager.php:
|
413 |
-
#: ../classes/class-ccf-form-manager.php:
|
414 |
-
#: ../classes/class-ccf-form-manager.php:
|
415 |
-
#: ../classes/class-ccf-form-manager.php:
|
416 |
-
#: ../classes/class-ccf-form-manager.php:
|
417 |
msgid "No"
|
418 |
msgstr ""
|
419 |
|
@@ -440,379 +478,386 @@ msgid "<span>←</span> Click on a field to edit it."
|
|
440 |
msgstr ""
|
441 |
|
442 |
#: ../classes/class-ccf-form-manager.php:225
|
443 |
-
#: ../classes/class-ccf-form-manager.php:
|
444 |
-
#: ../classes/class-ccf-form-manager.php:
|
445 |
-
msgid "Internal Slug"
|
446 |
msgstr ""
|
447 |
|
448 |
#: ../classes/class-ccf-form-manager.php:229
|
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:452
|
453 |
-
#: ../classes/class-ccf-form-manager.php:
|
454 |
-
#: ../classes/class-ccf-form-manager.php:
|
455 |
-
#: ../classes/class-ccf-form-manager.php:
|
456 |
-
#: ../classes/class-ccf-form-manager.php:
|
457 |
-
#: ../classes/class-ccf-form-manager.php:
|
458 |
-
#: ../classes/class-ccf-form-manager.php:
|
|
|
459 |
msgid "Label:"
|
460 |
msgstr ""
|
461 |
|
462 |
#: ../classes/class-ccf-form-manager.php:233
|
463 |
-
#: ../classes/class-ccf-form-manager.php:
|
464 |
-
#: ../classes/class-ccf-form-manager.php:
|
465 |
-
#: ../classes/class-ccf-form-manager.php:
|
466 |
-
#: ../classes/class-ccf-form-manager.php:
|
467 |
-
#: ../classes/class-ccf-form-manager.php:
|
468 |
-
#: ../classes/class-ccf-form-manager.php:
|
469 |
msgid "Initial Value:"
|
470 |
msgstr ""
|
471 |
|
472 |
#: ../classes/class-ccf-form-manager.php:237
|
473 |
-
#: ../classes/class-ccf-form-manager.php:
|
474 |
-
#: ../classes/class-ccf-form-manager.php:
|
475 |
-
#: ../classes/class-ccf-form-manager.php:
|
476 |
-
#: ../classes/class-ccf-form-manager.php:
|
477 |
-
#: ../classes/class-ccf-form-manager.php:
|
478 |
-
#: ../classes/class-ccf-form-manager.php:
|
479 |
-
#: ../classes/class-ccf-form-manager.php:
|
480 |
-
#: ../classes/class-ccf-form-manager.php:
|
481 |
-
#: ../classes/class-ccf-form-manager.php:
|
482 |
-
#: ../classes/class-ccf-form-manager.php:
|
483 |
msgid "Required:"
|
484 |
msgstr ""
|
485 |
|
486 |
#: ../classes/class-ccf-form-manager.php:246
|
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:433
|
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 |
-
#: ../classes/class-ccf-form-manager.php:
|
499 |
-
#: ../classes/class-ccf-form-manager.php:
|
|
|
500 |
msgid "Advanced"
|
501 |
msgstr ""
|
502 |
|
503 |
#: ../classes/class-ccf-form-manager.php:249
|
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 |
-
#: ../classes/class-ccf-form-manager.php:
|
509 |
#: ../classes/class-ccf-form-manager.php:436
|
510 |
-
#: ../classes/class-ccf-form-manager.php:
|
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 |
msgid "Class Name:"
|
518 |
msgstr ""
|
519 |
|
520 |
#: ../classes/class-ccf-form-manager.php:253
|
521 |
-
#: ../classes/class-ccf-form-manager.php:
|
522 |
-
#: ../classes/class-ccf-form-manager.php:
|
523 |
-
#: ../classes/class-ccf-form-manager.php:
|
524 |
-
#: ../classes/class-ccf-form-manager.php:
|
525 |
-
#: ../classes/class-ccf-form-manager.php:
|
526 |
msgid "Placeholder Text:"
|
527 |
msgstr ""
|
528 |
|
529 |
-
#: ../classes/class-ccf-form-manager.php:
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
534 |
#: ../classes/class-ccf-form-manager.php:445
|
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 |
-
#: ../classes/class-ccf-form-manager.php:
|
|
|
541 |
msgid "Basic"
|
542 |
msgstr ""
|
543 |
|
544 |
-
#: ../classes/class-ccf-form-manager.php:
|
545 |
msgid "HTML Content:"
|
546 |
msgstr ""
|
547 |
|
548 |
-
#: ../classes/class-ccf-form-manager.php:
|
549 |
msgid "Heading:"
|
550 |
msgstr ""
|
551 |
|
552 |
-
#: ../classes/class-ccf-form-manager.php:
|
553 |
msgid "Sub Heading:"
|
554 |
msgstr ""
|
555 |
|
556 |
-
#: ../classes/class-ccf-form-manager.php:
|
557 |
-
#: ../classes/class-ccf-form-manager.php:416
|
558 |
#: ../classes/class-ccf-form-manager.php:448
|
559 |
-
#: ../classes/class-ccf-form-manager.php:
|
560 |
-
#: ../classes/class-ccf-form-manager.php:
|
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 |
-
|
|
|
566 |
msgstr ""
|
567 |
|
568 |
-
#: ../classes/class-ccf-form-manager.php:
|
569 |
msgid "Enable Date Select"
|
570 |
msgstr ""
|
571 |
|
572 |
-
#: ../classes/class-ccf-form-manager.php:
|
573 |
msgid "Enable Time Select"
|
574 |
msgstr ""
|
575 |
|
576 |
-
#: ../classes/class-ccf-form-manager.php:
|
577 |
msgid "Format:"
|
578 |
msgstr ""
|
579 |
|
580 |
-
#: ../classes/class-ccf-form-manager.php:
|
581 |
-
#: ../classes/class-ccf-form-manager.php:
|
582 |
msgid "International"
|
583 |
msgstr ""
|
584 |
|
585 |
-
#: ../classes/class-ccf-form-manager.php:
|
586 |
msgid "Type:"
|
587 |
msgstr ""
|
588 |
|
589 |
-
#: ../classes/class-ccf-form-manager.php:
|
590 |
msgid "United States"
|
591 |
msgstr ""
|
592 |
|
593 |
-
#: ../classes/class-ccf-form-manager.php:
|
594 |
msgid "Require Confirmation:"
|
595 |
msgstr ""
|
596 |
|
597 |
-
#: ../classes/class-ccf-form-manager.php:
|
598 |
msgid "Label"
|
599 |
msgstr ""
|
600 |
|
601 |
-
#: ../classes/class-ccf-form-manager.php:
|
602 |
msgid "Value"
|
603 |
msgstr ""
|
604 |
|
605 |
-
#: ../classes/class-ccf-form-manager.php:
|
606 |
-
#: ../classes/class-ccf-form-manager.php:
|
607 |
-
#: ../classes/class-ccf-form-manager.php:
|
608 |
msgid "Manage field choices:"
|
609 |
msgstr ""
|
610 |
|
611 |
-
#: ../classes/class-ccf-form-manager.php:
|
612 |
-
#: ../classes/class-ccf-form-manager.php:
|
613 |
-
#: ../classes/class-ccf-form-manager.php:
|
614 |
msgid "An example choice"
|
615 |
msgstr ""
|
616 |
|
617 |
-
#: ../classes/class-ccf-form-manager.php:
|
618 |
msgid "Arbitrary block of HTML."
|
619 |
msgstr ""
|
620 |
|
621 |
-
#: ../classes/class-ccf-form-manager.php:
|
622 |
msgid "Section Heading"
|
623 |
msgstr ""
|
624 |
|
625 |
-
#: ../classes/class-ccf-form-manager.php:
|
626 |
msgid "This is the sub-heading text."
|
627 |
msgstr ""
|
628 |
|
629 |
-
#: ../classes/class-ccf-form-manager.php:830
|
630 |
-
msgid "First"
|
631 |
-
msgstr ""
|
632 |
-
|
633 |
-
#: ../classes/class-ccf-form-manager.php:834
|
634 |
-
msgid "Last"
|
635 |
-
msgstr ""
|
636 |
-
|
637 |
-
#: ../classes/class-ccf-form-manager.php:846
|
638 |
#: ../classes/class-ccf-form-manager.php:867
|
639 |
-
msgid "
|
640 |
msgstr ""
|
641 |
|
642 |
-
#: ../classes/class-ccf-form-manager.php:850
|
643 |
#: ../classes/class-ccf-form-manager.php:871
|
644 |
-
msgid "
|
645 |
-
msgstr ""
|
646 |
-
|
647 |
-
#: ../classes/class-ccf-form-manager.php:854
|
648 |
-
#: ../classes/class-ccf-form-manager.php:875
|
649 |
-
msgid "AM"
|
650 |
-
msgstr ""
|
651 |
-
|
652 |
-
#: ../classes/class-ccf-form-manager.php:855
|
653 |
-
#: ../classes/class-ccf-form-manager.php:876
|
654 |
-
msgid "PM"
|
655 |
msgstr ""
|
656 |
|
657 |
-
#: ../classes/class-ccf-form-manager.php:
|
658 |
-
#: ../classes/class-ccf-form-manager.php:
|
659 |
msgid "Street Address"
|
660 |
msgstr ""
|
661 |
|
662 |
-
#: ../classes/class-ccf-form-manager.php:
|
663 |
-
#: ../classes/class-ccf-form-manager.php:
|
664 |
msgid "Address Line 2"
|
665 |
msgstr ""
|
666 |
|
667 |
-
#: ../classes/class-ccf-form-manager.php:
|
668 |
-
#: ../classes/class-ccf-form-manager.php:
|
669 |
msgid "City"
|
670 |
msgstr ""
|
671 |
|
672 |
-
#: ../classes/class-ccf-form-manager.php:
|
673 |
msgid "State"
|
674 |
msgstr ""
|
675 |
|
676 |
-
#: ../classes/class-ccf-form-manager.php:
|
677 |
msgid "ZIP Code"
|
678 |
msgstr ""
|
679 |
|
680 |
-
#: ../classes/class-ccf-form-manager.php:
|
681 |
msgid "State / Region / Province"
|
682 |
msgstr ""
|
683 |
|
684 |
-
#: ../classes/class-ccf-form-manager.php:
|
685 |
msgid "ZIP / Postal Code"
|
686 |
msgstr ""
|
687 |
|
688 |
-
#: ../classes/class-ccf-form-manager.php:
|
689 |
msgid "Country"
|
690 |
msgstr ""
|
691 |
|
692 |
-
#: ../classes/class-ccf-form-manager.php:
|
693 |
msgid "email@example.com"
|
694 |
msgstr ""
|
695 |
|
696 |
-
#: ../classes/class-ccf-form-manager.php:
|
697 |
-
#: ../classes/class-ccf-form-manager.php:
|
698 |
msgid "Email"
|
699 |
msgstr ""
|
700 |
|
701 |
-
#: ../classes/class-ccf-form-manager.php:
|
702 |
msgid "Confirm Email"
|
703 |
msgstr ""
|
704 |
|
705 |
-
#: ../classes/class-ccf-form-manager.php:
|
706 |
msgid "Edit"
|
707 |
msgstr ""
|
708 |
|
709 |
-
#: ../classes/class-ccf-form-manager.php:
|
710 |
msgid "Trash"
|
711 |
msgstr ""
|
712 |
|
713 |
-
#: ../classes/class-ccf-form-manager.php:
|
714 |
msgid "There is a problem with this form. Is it trashed or deleted?"
|
715 |
msgstr ""
|
716 |
|
717 |
-
#: ../classes/class-ccf-form-manager.php:
|
718 |
msgid "-"
|
719 |
msgstr ""
|
720 |
|
721 |
-
#: ../classes/class-ccf-form-manager.php:
|
722 |
msgid "There are no submissions."
|
723 |
msgstr ""
|
724 |
|
725 |
-
#: ../classes/class-ccf-form-manager.php:
|
726 |
msgid "Add Form"
|
727 |
msgstr ""
|
728 |
|
729 |
-
#: ../classes/class-ccf-form-manager.php:
|
730 |
msgid "Single Line Text"
|
731 |
msgstr ""
|
732 |
|
733 |
-
#: ../classes/class-ccf-form-manager.php:
|
734 |
msgid "Dropdown"
|
735 |
msgstr ""
|
736 |
|
737 |
-
#: ../classes/class-ccf-form-manager.php:
|
738 |
msgid "Checkboxes"
|
739 |
msgstr ""
|
740 |
|
741 |
-
#: ../classes/class-ccf-form-manager.php:
|
742 |
msgid "Radio Buttons"
|
743 |
msgstr ""
|
744 |
|
745 |
-
#: ../classes/class-ccf-form-manager.php:
|
746 |
msgid "Paragraph Text"
|
747 |
msgstr ""
|
748 |
|
749 |
-
#: ../classes/class-ccf-form-manager.php:
|
750 |
msgid "Hidden"
|
751 |
msgstr ""
|
752 |
|
753 |
-
#: ../classes/class-ccf-form-manager.php:
|
754 |
msgid "HTML"
|
755 |
msgstr ""
|
756 |
|
757 |
-
#: ../classes/class-ccf-form-manager.php:
|
758 |
msgid "Section Header"
|
759 |
msgstr ""
|
760 |
|
761 |
-
#: ../classes/class-ccf-form-manager.php:
|
762 |
msgid "Name"
|
763 |
msgstr ""
|
764 |
|
765 |
-
#: ../classes/class-ccf-form-manager.php:
|
766 |
msgid "Date/Time"
|
767 |
msgstr ""
|
768 |
|
769 |
-
#: ../classes/class-ccf-form-manager.php:
|
770 |
msgid "Website"
|
771 |
msgstr ""
|
772 |
|
773 |
-
#: ../classes/class-ccf-form-manager.php:
|
774 |
msgid "Address"
|
775 |
msgstr ""
|
776 |
|
777 |
-
#: ../classes/class-ccf-form-manager.php:
|
778 |
msgid "Phone"
|
779 |
msgstr ""
|
780 |
|
781 |
-
#: ../classes/class-ccf-form-manager.php:
|
|
|
|
|
|
|
|
|
782 |
msgid "Invalid date"
|
783 |
msgstr ""
|
784 |
|
785 |
-
#: ../classes/class-ccf-form-manager.php:
|
786 |
msgid "Form Submission"
|
787 |
msgstr ""
|
788 |
|
789 |
-
#: ../classes/class-ccf-form-renderer.php:
|
790 |
msgid "This is not a valid email address."
|
791 |
msgstr ""
|
792 |
|
793 |
-
#: ../classes/class-ccf-form-renderer.php:
|
794 |
msgid "This is not a valid phone number."
|
795 |
msgstr ""
|
796 |
|
797 |
-
#: ../classes/class-ccf-form-renderer.php:
|
798 |
msgid "This phone number is not 10 digits"
|
799 |
msgstr ""
|
800 |
|
801 |
-
#: ../classes/class-ccf-upgrader.php:
|
802 |
msgid ""
|
803 |
"Did you just upgrade to a post 6.0 version of Custom Contact Forms? If so, "
|
804 |
-
"you might need to upgrade your database to use your old forms."
|
|
|
805 |
msgstr ""
|
806 |
|
807 |
-
#: ../classes/class-ccf-upgrader.php:
|
808 |
msgid "Upgrade"
|
809 |
msgstr ""
|
810 |
|
811 |
-
#: ../classes/class-ccf-upgrader.php:
|
812 |
msgid "Dismiss"
|
813 |
msgstr ""
|
814 |
|
815 |
-
#: ../classes/class-ccf-upgrader.php:
|
816 |
msgid "Database update complete."
|
817 |
msgstr ""
|
818 |
|
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-19 17:41-0500\n"
|
9 |
+
"PO-Revision-Date: 2015-01-19 17:41-0500\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:252 ../classes/class-ccf-api.php:535
|
27 |
+
#: ../classes/class-ccf-api.php:560 ../classes/class-ccf-api.php:589
|
28 |
+
#: ../classes/class-ccf-api.php:670
|
29 |
msgid "Invalid form ID."
|
30 |
msgstr ""
|
31 |
|
32 |
+
#: ../classes/class-ccf-api.php:257 ../classes/class-ccf-api.php:520
|
33 |
+
#: ../classes/class-ccf-api.php:540
|
34 |
msgid "Sorry, you cannot view forms."
|
35 |
msgstr ""
|
36 |
|
37 |
+
#: ../classes/class-ccf-api.php:566 ../classes/class-ccf-api.php:595
|
38 |
msgid "Invalid form."
|
39 |
msgstr ""
|
40 |
|
41 |
+
#: ../classes/class-ccf-api.php:570
|
42 |
msgid "Sorry, you cannot view this form."
|
43 |
msgstr ""
|
44 |
|
45 |
+
#: ../classes/class-ccf-api.php:681
|
46 |
msgid "The form cannot be deleted."
|
47 |
msgstr ""
|
48 |
|
49 |
+
#: ../classes/class-ccf-api.php:685
|
50 |
msgid "Permanently deleted form"
|
51 |
msgstr ""
|
52 |
|
53 |
+
#: ../classes/class-ccf-api.php:688
|
54 |
#: ../vendor/wp-api/wp-api/lib/class-wp-json-posts.php:381
|
55 |
msgid "Deleted post"
|
56 |
msgstr ""
|
62 |
"are enabled. Please update your <a href=\"%s\">permalinks settings</a>."
|
63 |
msgstr ""
|
64 |
|
65 |
+
#: ../classes/class-ccf-custom-contact-forms.php:64
|
66 |
#, php-format
|
67 |
msgid "<a href=\"%s\">Forms and Submissions</a>"
|
68 |
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:883
|
73 |
+
#: ../classes/class-ccf-form-manager.php:904
|
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:887
|
80 |
+
#: ../classes/class-ccf-form-manager.php:908
|
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:891
|
87 |
+
#: ../classes/class-ccf-form-manager.php:912
|
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:892
|
94 |
+
#: ../classes/class-ccf-form-manager.php:913
|
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:190
|
101 |
+
#: ../classes/class-ccf-form-manager.php:203
|
102 |
+
#: ../classes/class-ccf-form-manager.php:899
|
103 |
+
#: ../classes/class-ccf-form-manager.php:1067
|
104 |
+
#: ../classes/class-ccf-form-manager.php:1081
|
105 |
+
#: ../classes/class-ccf-form-manager.php:1184
|
106 |
+
msgid "Date"
|
107 |
+
msgstr ""
|
108 |
+
|
109 |
#: ../classes/class-ccf-form-cpt.php:74
|
110 |
msgid "Form Submission Columns"
|
111 |
msgstr ""
|
173 |
msgid "Number of Fields"
|
174 |
msgstr ""
|
175 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
176 |
#: ../classes/class-ccf-form-cpt.php:339
|
177 |
msgid "Unpublished"
|
178 |
msgstr ""
|
231 |
msgid "No forms found in trash."
|
232 |
msgstr ""
|
233 |
|
234 |
+
#: ../classes/class-ccf-form-handler.php:114
|
235 |
+
#: ../classes/class-ccf-form-handler.php:192
|
236 |
+
#: ../classes/class-ccf-form-handler.php:196
|
237 |
+
#: ../classes/class-ccf-form-handler.php:200
|
238 |
+
#: ../classes/class-ccf-form-handler.php:204
|
239 |
+
#: ../classes/class-ccf-form-handler.php:208
|
240 |
+
#: ../classes/class-ccf-form-handler.php:213
|
241 |
+
#: ../classes/class-ccf-form-handler.php:238
|
242 |
+
#: ../classes/class-ccf-form-handler.php:246
|
243 |
+
#: ../classes/class-ccf-form-handler.php:254
|
244 |
+
#: ../classes/class-ccf-form-handler.php:308
|
245 |
+
#: ../classes/class-ccf-form-renderer.php:53
|
246 |
msgid "This field is required."
|
247 |
msgstr ""
|
248 |
|
249 |
#: ../classes/class-ccf-form-handler.php:130
|
250 |
+
#: ../classes/class-ccf-form-renderer.php:60
|
251 |
+
msgid "Your reCAPTCHA response was incorrect."
|
252 |
+
msgstr ""
|
253 |
+
|
254 |
+
#: ../classes/class-ccf-form-handler.php:149
|
255 |
msgid "This field is required"
|
256 |
msgstr ""
|
257 |
|
258 |
+
#: ../classes/class-ccf-form-handler.php:154
|
259 |
msgid "This phone number is too short"
|
260 |
msgstr ""
|
261 |
|
262 |
+
#: ../classes/class-ccf-form-handler.php:157
|
263 |
msgid "ccf_field_phoneFormat"
|
264 |
msgstr ""
|
265 |
|
266 |
+
#: ../classes/class-ccf-form-handler.php:160
|
267 |
msgid "This phone number contains invalid characters."
|
268 |
msgstr ""
|
269 |
|
270 |
+
#: ../classes/class-ccf-form-handler.php:166
|
271 |
msgid "This phone number is not 10 digits."
|
272 |
msgstr ""
|
273 |
|
274 |
+
#: ../classes/class-ccf-form-handler.php:241
|
275 |
+
#: ../classes/class-ccf-form-handler.php:257
|
276 |
msgid "This is not a valid email"
|
277 |
msgstr ""
|
278 |
|
279 |
+
#: ../classes/class-ccf-form-handler.php:249
|
280 |
+
#: ../classes/class-ccf-form-renderer.php:58
|
281 |
msgid "Emails do not match."
|
282 |
msgstr ""
|
283 |
|
284 |
+
#: ../classes/class-ccf-form-handler.php:282
|
285 |
msgid "First name is required."
|
286 |
msgstr ""
|
287 |
|
288 |
+
#: ../classes/class-ccf-form-handler.php:286
|
289 |
msgid "Last name is required."
|
290 |
msgstr ""
|
291 |
|
292 |
+
#: ../classes/class-ccf-form-handler.php:311
|
293 |
+
#: ../classes/class-ccf-form-renderer.php:67
|
294 |
msgid "This is not a valid URL. URL's must start with http(s)://"
|
295 |
msgstr ""
|
296 |
|
297 |
+
#: ../classes/class-ccf-form-handler.php:339
|
298 |
+
#: ../classes/class-ccf-form-handler.php:371
|
299 |
+
#: ../classes/class-ccf-form-renderer.php:54
|
300 |
msgid "Date is required."
|
301 |
msgstr ""
|
302 |
|
303 |
+
#: ../classes/class-ccf-form-handler.php:342
|
304 |
+
#: ../classes/class-ccf-form-handler.php:374
|
305 |
+
#: ../classes/class-ccf-form-renderer.php:65
|
306 |
msgid "This date is not valid."
|
307 |
msgstr ""
|
308 |
|
309 |
+
#: ../classes/class-ccf-form-handler.php:347
|
310 |
+
#: ../classes/class-ccf-form-handler.php:379
|
311 |
+
#: ../classes/class-ccf-form-renderer.php:55
|
312 |
msgid "Hour is required."
|
313 |
msgstr ""
|
314 |
|
315 |
+
#: ../classes/class-ccf-form-handler.php:350
|
316 |
+
#: ../classes/class-ccf-form-handler.php:382
|
317 |
+
#: ../classes/class-ccf-form-renderer.php:64
|
318 |
msgid "This is not a valid hour."
|
319 |
msgstr ""
|
320 |
|
321 |
+
#: ../classes/class-ccf-form-handler.php:355
|
322 |
+
#: ../classes/class-ccf-form-handler.php:387
|
323 |
+
#: ../classes/class-ccf-form-renderer.php:56
|
324 |
msgid "Minute is required."
|
325 |
msgstr ""
|
326 |
|
327 |
+
#: ../classes/class-ccf-form-handler.php:358
|
328 |
+
#: ../classes/class-ccf-form-handler.php:390
|
329 |
+
#: ../classes/class-ccf-form-renderer.php:66
|
330 |
msgid "This is not a valid minute."
|
331 |
msgstr ""
|
332 |
|
333 |
+
#: ../classes/class-ccf-form-handler.php:363
|
334 |
+
#: ../classes/class-ccf-form-handler.php:395
|
335 |
+
#: ../classes/class-ccf-form-renderer.php:57
|
336 |
msgid "AM/PM is required."
|
337 |
msgstr ""
|
338 |
|
339 |
+
#: ../classes/class-ccf-form-handler.php:598
|
340 |
+
msgid "Form submitted from"
|
341 |
+
msgstr ""
|
342 |
+
|
343 |
+
#: ../classes/class-ccf-form-handler.php:609
|
344 |
#, php-format
|
345 |
msgid "%s: Form Submission to \"%s\""
|
346 |
msgstr ""
|
347 |
|
348 |
+
#: ../classes/class-ccf-form-handler.php:620
|
349 |
+
#: ../classes/class-ccf-form-renderer.php:120
|
350 |
msgid "Thank you for your submission."
|
351 |
msgstr ""
|
352 |
|
375 |
msgstr ""
|
376 |
|
377 |
#: ../classes/class-ccf-form-manager.php:110
|
378 |
+
#: ../classes/class-ccf-form-manager.php:1012
|
379 |
msgid "Insert into post"
|
380 |
msgstr ""
|
381 |
|
425 |
|
426 |
#: ../classes/class-ccf-form-manager.php:155
|
427 |
#: ../classes/class-ccf-form-manager.php:239
|
428 |
+
#: ../classes/class-ccf-form-manager.php:311
|
429 |
+
#: ../classes/class-ccf-form-manager.php:397
|
430 |
+
#: ../classes/class-ccf-form-manager.php:458
|
431 |
+
#: ../classes/class-ccf-form-manager.php:496
|
432 |
+
#: ../classes/class-ccf-form-manager.php:553
|
433 |
+
#: ../classes/class-ccf-form-manager.php:596
|
434 |
+
#: ../classes/class-ccf-form-manager.php:634
|
435 |
+
#: ../classes/class-ccf-form-manager.php:641
|
436 |
+
#: ../classes/class-ccf-form-manager.php:688
|
437 |
+
#: ../classes/class-ccf-form-manager.php:725
|
438 |
+
#: ../classes/class-ccf-form-manager.php:762
|
439 |
msgid "Yes"
|
440 |
msgstr ""
|
441 |
|
442 |
#: ../classes/class-ccf-form-manager.php:156
|
443 |
#: ../classes/class-ccf-form-manager.php:240
|
444 |
+
#: ../classes/class-ccf-form-manager.php:312
|
445 |
+
#: ../classes/class-ccf-form-manager.php:398
|
446 |
+
#: ../classes/class-ccf-form-manager.php:459
|
447 |
+
#: ../classes/class-ccf-form-manager.php:497
|
448 |
+
#: ../classes/class-ccf-form-manager.php:554
|
449 |
+
#: ../classes/class-ccf-form-manager.php:597
|
450 |
+
#: ../classes/class-ccf-form-manager.php:635
|
451 |
+
#: ../classes/class-ccf-form-manager.php:642
|
452 |
+
#: ../classes/class-ccf-form-manager.php:689
|
453 |
+
#: ../classes/class-ccf-form-manager.php:726
|
454 |
+
#: ../classes/class-ccf-form-manager.php:763
|
455 |
msgid "No"
|
456 |
msgstr ""
|
457 |
|
478 |
msgstr ""
|
479 |
|
480 |
#: ../classes/class-ccf-form-manager.php:225
|
481 |
+
#: ../classes/class-ccf-form-manager.php:297
|
482 |
+
#: ../classes/class-ccf-form-manager.php:383
|
483 |
+
msgid "Internal Unique Slug"
|
484 |
msgstr ""
|
485 |
|
486 |
#: ../classes/class-ccf-form-manager.php:229
|
487 |
+
#: ../classes/class-ccf-form-manager.php:266
|
488 |
+
#: ../classes/class-ccf-form-manager.php:301
|
489 |
+
#: ../classes/class-ccf-form-manager.php:387
|
490 |
#: ../classes/class-ccf-form-manager.php:452
|
491 |
+
#: ../classes/class-ccf-form-manager.php:484
|
492 |
+
#: ../classes/class-ccf-form-manager.php:536
|
493 |
+
#: ../classes/class-ccf-form-manager.php:583
|
494 |
+
#: ../classes/class-ccf-form-manager.php:622
|
495 |
+
#: ../classes/class-ccf-form-manager.php:682
|
496 |
+
#: ../classes/class-ccf-form-manager.php:719
|
497 |
+
#: ../classes/class-ccf-form-manager.php:756
|
498 |
msgid "Label:"
|
499 |
msgstr ""
|
500 |
|
501 |
#: ../classes/class-ccf-form-manager.php:233
|
502 |
+
#: ../classes/class-ccf-form-manager.php:305
|
503 |
+
#: ../classes/class-ccf-form-manager.php:391
|
504 |
+
#: ../classes/class-ccf-form-manager.php:427
|
505 |
+
#: ../classes/class-ccf-form-manager.php:489
|
506 |
+
#: ../classes/class-ccf-form-manager.php:540
|
507 |
+
#: ../classes/class-ccf-form-manager.php:627
|
508 |
msgid "Initial Value:"
|
509 |
msgstr ""
|
510 |
|
511 |
#: ../classes/class-ccf-form-manager.php:237
|
512 |
+
#: ../classes/class-ccf-form-manager.php:309
|
513 |
+
#: ../classes/class-ccf-form-manager.php:395
|
514 |
+
#: ../classes/class-ccf-form-manager.php:456
|
515 |
+
#: ../classes/class-ccf-form-manager.php:494
|
516 |
+
#: ../classes/class-ccf-form-manager.php:551
|
517 |
+
#: ../classes/class-ccf-form-manager.php:594
|
518 |
+
#: ../classes/class-ccf-form-manager.php:632
|
519 |
+
#: ../classes/class-ccf-form-manager.php:686
|
520 |
+
#: ../classes/class-ccf-form-manager.php:723
|
521 |
+
#: ../classes/class-ccf-form-manager.php:760
|
522 |
msgid "Required:"
|
523 |
msgstr ""
|
524 |
|
525 |
#: ../classes/class-ccf-form-manager.php:246
|
526 |
+
#: ../classes/class-ccf-form-manager.php:282
|
527 |
+
#: ../classes/class-ccf-form-manager.php:318
|
528 |
+
#: ../classes/class-ccf-form-manager.php:343
|
529 |
+
#: ../classes/class-ccf-form-manager.php:368
|
530 |
+
#: ../classes/class-ccf-form-manager.php:404
|
531 |
#: ../classes/class-ccf-form-manager.php:433
|
532 |
+
#: ../classes/class-ccf-form-manager.php:465
|
533 |
+
#: ../classes/class-ccf-form-manager.php:511
|
534 |
+
#: ../classes/class-ccf-form-manager.php:560
|
535 |
+
#: ../classes/class-ccf-form-manager.php:603
|
536 |
+
#: ../classes/class-ccf-form-manager.php:648
|
537 |
+
#: ../classes/class-ccf-form-manager.php:700
|
538 |
+
#: ../classes/class-ccf-form-manager.php:737
|
539 |
+
#: ../classes/class-ccf-form-manager.php:774
|
540 |
msgid "Advanced"
|
541 |
msgstr ""
|
542 |
|
543 |
#: ../classes/class-ccf-form-manager.php:249
|
544 |
+
#: ../classes/class-ccf-form-manager.php:285
|
545 |
+
#: ../classes/class-ccf-form-manager.php:321
|
546 |
+
#: ../classes/class-ccf-form-manager.php:346
|
547 |
+
#: ../classes/class-ccf-form-manager.php:371
|
548 |
+
#: ../classes/class-ccf-form-manager.php:407
|
549 |
#: ../classes/class-ccf-form-manager.php:436
|
550 |
+
#: ../classes/class-ccf-form-manager.php:468
|
551 |
+
#: ../classes/class-ccf-form-manager.php:514
|
552 |
+
#: ../classes/class-ccf-form-manager.php:563
|
553 |
+
#: ../classes/class-ccf-form-manager.php:606
|
554 |
+
#: ../classes/class-ccf-form-manager.php:651
|
555 |
+
#: ../classes/class-ccf-form-manager.php:703
|
556 |
+
#: ../classes/class-ccf-form-manager.php:740
|
557 |
+
#: ../classes/class-ccf-form-manager.php:777
|
558 |
msgid "Class Name:"
|
559 |
msgstr ""
|
560 |
|
561 |
#: ../classes/class-ccf-form-manager.php:253
|
562 |
+
#: ../classes/class-ccf-form-manager.php:325
|
563 |
+
#: ../classes/class-ccf-form-manager.php:411
|
564 |
+
#: ../classes/class-ccf-form-manager.php:519
|
565 |
+
#: ../classes/class-ccf-form-manager.php:567
|
566 |
+
#: ../classes/class-ccf-form-manager.php:656
|
567 |
msgid "Placeholder Text:"
|
568 |
msgstr ""
|
569 |
|
570 |
+
#: ../classes/class-ccf-form-manager.php:264
|
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:270
|
577 |
+
msgid "Site Key:"
|
578 |
+
msgstr ""
|
579 |
+
|
580 |
+
#: ../classes/class-ccf-form-manager.php:272
|
581 |
+
#: ../classes/class-ccf-form-manager.php:277
|
582 |
+
msgid "Don't have one?"
|
583 |
+
msgstr ""
|
584 |
+
|
585 |
+
#: ../classes/class-ccf-form-manager.php:275
|
586 |
+
msgid "Secret Key:"
|
587 |
+
msgstr ""
|
588 |
+
|
589 |
+
#: ../classes/class-ccf-form-manager.php:334
|
590 |
+
#: ../classes/class-ccf-form-manager.php:355
|
591 |
+
#: ../classes/class-ccf-form-manager.php:380
|
592 |
+
#: ../classes/class-ccf-form-manager.php:420
|
593 |
#: ../classes/class-ccf-form-manager.php:445
|
594 |
+
#: ../classes/class-ccf-form-manager.php:477
|
595 |
+
#: ../classes/class-ccf-form-manager.php:529
|
596 |
+
#: ../classes/class-ccf-form-manager.php:576
|
597 |
+
#: ../classes/class-ccf-form-manager.php:615
|
598 |
+
#: ../classes/class-ccf-form-manager.php:675
|
599 |
+
#: ../classes/class-ccf-form-manager.php:712
|
600 |
+
#: ../classes/class-ccf-form-manager.php:749
|
601 |
msgid "Basic"
|
602 |
msgstr ""
|
603 |
|
604 |
+
#: ../classes/class-ccf-form-manager.php:337
|
605 |
msgid "HTML Content:"
|
606 |
msgstr ""
|
607 |
|
608 |
+
#: ../classes/class-ccf-form-manager.php:358
|
609 |
msgid "Heading:"
|
610 |
msgstr ""
|
611 |
|
612 |
+
#: ../classes/class-ccf-form-manager.php:362
|
613 |
msgid "Sub Heading:"
|
614 |
msgstr ""
|
615 |
|
616 |
+
#: ../classes/class-ccf-form-manager.php:423
|
|
|
617 |
#: ../classes/class-ccf-form-manager.php:448
|
618 |
+
#: ../classes/class-ccf-form-manager.php:480
|
619 |
+
#: ../classes/class-ccf-form-manager.php:532
|
620 |
+
#: ../classes/class-ccf-form-manager.php:579
|
621 |
+
#: ../classes/class-ccf-form-manager.php:618
|
622 |
+
#: ../classes/class-ccf-form-manager.php:678
|
623 |
+
#: ../classes/class-ccf-form-manager.php:715
|
624 |
+
#: ../classes/class-ccf-form-manager.php:752
|
625 |
+
msgid "Internal Unique Slug (a-z, 0-9, -, _):"
|
626 |
msgstr ""
|
627 |
|
628 |
+
#: ../classes/class-ccf-form-manager.php:502
|
629 |
msgid "Enable Date Select"
|
630 |
msgstr ""
|
631 |
|
632 |
+
#: ../classes/class-ccf-form-manager.php:506
|
633 |
msgid "Enable Time Select"
|
634 |
msgstr ""
|
635 |
|
636 |
+
#: ../classes/class-ccf-form-manager.php:544
|
637 |
msgid "Format:"
|
638 |
msgstr ""
|
639 |
|
640 |
+
#: ../classes/class-ccf-form-manager.php:547
|
641 |
+
#: ../classes/class-ccf-form-manager.php:590
|
642 |
msgid "International"
|
643 |
msgstr ""
|
644 |
|
645 |
+
#: ../classes/class-ccf-form-manager.php:587
|
646 |
msgid "Type:"
|
647 |
msgstr ""
|
648 |
|
649 |
+
#: ../classes/class-ccf-form-manager.php:589
|
650 |
msgid "United States"
|
651 |
msgstr ""
|
652 |
|
653 |
+
#: ../classes/class-ccf-form-manager.php:639
|
654 |
msgid "Require Confirmation:"
|
655 |
msgstr ""
|
656 |
|
657 |
+
#: ../classes/class-ccf-form-manager.php:667
|
658 |
msgid "Label"
|
659 |
msgstr ""
|
660 |
|
661 |
+
#: ../classes/class-ccf-form-manager.php:668
|
662 |
msgid "Value"
|
663 |
msgstr ""
|
664 |
|
665 |
+
#: ../classes/class-ccf-form-manager.php:693
|
666 |
+
#: ../classes/class-ccf-form-manager.php:730
|
667 |
+
#: ../classes/class-ccf-form-manager.php:767
|
668 |
msgid "Manage field choices:"
|
669 |
msgstr ""
|
670 |
|
671 |
+
#: ../classes/class-ccf-form-manager.php:809
|
672 |
+
#: ../classes/class-ccf-form-manager.php:822
|
673 |
+
#: ../classes/class-ccf-form-manager.php:837
|
674 |
msgid "An example choice"
|
675 |
msgstr ""
|
676 |
|
677 |
+
#: ../classes/class-ccf-form-manager.php:852
|
678 |
msgid "Arbitrary block of HTML."
|
679 |
msgstr ""
|
680 |
|
681 |
+
#: ../classes/class-ccf-form-manager.php:858
|
682 |
msgid "Section Heading"
|
683 |
msgstr ""
|
684 |
|
685 |
+
#: ../classes/class-ccf-form-manager.php:860
|
686 |
msgid "This is the sub-heading text."
|
687 |
msgstr ""
|
688 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
689 |
#: ../classes/class-ccf-form-manager.php:867
|
690 |
+
msgid "First"
|
691 |
msgstr ""
|
692 |
|
|
|
693 |
#: ../classes/class-ccf-form-manager.php:871
|
694 |
+
msgid "Last"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
695 |
msgstr ""
|
696 |
|
697 |
+
#: ../classes/class-ccf-form-manager.php:925
|
698 |
+
#: ../classes/class-ccf-form-manager.php:950
|
699 |
msgid "Street Address"
|
700 |
msgstr ""
|
701 |
|
702 |
+
#: ../classes/class-ccf-form-manager.php:929
|
703 |
+
#: ../classes/class-ccf-form-manager.php:954
|
704 |
msgid "Address Line 2"
|
705 |
msgstr ""
|
706 |
|
707 |
+
#: ../classes/class-ccf-form-manager.php:933
|
708 |
+
#: ../classes/class-ccf-form-manager.php:958
|
709 |
msgid "City"
|
710 |
msgstr ""
|
711 |
|
712 |
+
#: ../classes/class-ccf-form-manager.php:941
|
713 |
msgid "State"
|
714 |
msgstr ""
|
715 |
|
716 |
+
#: ../classes/class-ccf-form-manager.php:945
|
717 |
msgid "ZIP Code"
|
718 |
msgstr ""
|
719 |
|
720 |
+
#: ../classes/class-ccf-form-manager.php:962
|
721 |
msgid "State / Region / Province"
|
722 |
msgstr ""
|
723 |
|
724 |
+
#: ../classes/class-ccf-form-manager.php:966
|
725 |
msgid "ZIP / Postal Code"
|
726 |
msgstr ""
|
727 |
|
728 |
+
#: ../classes/class-ccf-form-manager.php:974
|
729 |
msgid "Country"
|
730 |
msgstr ""
|
731 |
|
732 |
+
#: ../classes/class-ccf-form-manager.php:982
|
733 |
msgid "email@example.com"
|
734 |
msgstr ""
|
735 |
|
736 |
+
#: ../classes/class-ccf-form-manager.php:986
|
737 |
+
#: ../classes/class-ccf-form-manager.php:1242
|
738 |
msgid "Email"
|
739 |
msgstr ""
|
740 |
|
741 |
+
#: ../classes/class-ccf-form-manager.php:990
|
742 |
msgid "Confirm Email"
|
743 |
msgstr ""
|
744 |
|
745 |
+
#: ../classes/class-ccf-form-manager.php:1011
|
746 |
msgid "Edit"
|
747 |
msgstr ""
|
748 |
|
749 |
+
#: ../classes/class-ccf-form-manager.php:1013
|
750 |
msgid "Trash"
|
751 |
msgstr ""
|
752 |
|
753 |
+
#: ../classes/class-ccf-form-manager.php:1056
|
754 |
msgid "There is a problem with this form. Is it trashed or deleted?"
|
755 |
msgstr ""
|
756 |
|
757 |
+
#: ../classes/class-ccf-form-manager.php:1131
|
758 |
msgid "-"
|
759 |
msgstr ""
|
760 |
|
761 |
+
#: ../classes/class-ccf-form-manager.php:1175
|
762 |
msgid "There are no submissions."
|
763 |
msgstr ""
|
764 |
|
765 |
+
#: ../classes/class-ccf-form-manager.php:1204
|
766 |
msgid "Add Form"
|
767 |
msgstr ""
|
768 |
|
769 |
+
#: ../classes/class-ccf-form-manager.php:1228
|
770 |
msgid "Single Line Text"
|
771 |
msgstr ""
|
772 |
|
773 |
+
#: ../classes/class-ccf-form-manager.php:1229
|
774 |
msgid "Dropdown"
|
775 |
msgstr ""
|
776 |
|
777 |
+
#: ../classes/class-ccf-form-manager.php:1230
|
778 |
msgid "Checkboxes"
|
779 |
msgstr ""
|
780 |
|
781 |
+
#: ../classes/class-ccf-form-manager.php:1231
|
782 |
msgid "Radio Buttons"
|
783 |
msgstr ""
|
784 |
|
785 |
+
#: ../classes/class-ccf-form-manager.php:1232
|
786 |
msgid "Paragraph Text"
|
787 |
msgstr ""
|
788 |
|
789 |
+
#: ../classes/class-ccf-form-manager.php:1233
|
790 |
msgid "Hidden"
|
791 |
msgstr ""
|
792 |
|
793 |
+
#: ../classes/class-ccf-form-manager.php:1237
|
794 |
msgid "HTML"
|
795 |
msgstr ""
|
796 |
|
797 |
+
#: ../classes/class-ccf-form-manager.php:1238
|
798 |
msgid "Section Header"
|
799 |
msgstr ""
|
800 |
|
801 |
+
#: ../classes/class-ccf-form-manager.php:1243
|
802 |
msgid "Name"
|
803 |
msgstr ""
|
804 |
|
805 |
+
#: ../classes/class-ccf-form-manager.php:1244
|
806 |
msgid "Date/Time"
|
807 |
msgstr ""
|
808 |
|
809 |
+
#: ../classes/class-ccf-form-manager.php:1245
|
810 |
msgid "Website"
|
811 |
msgstr ""
|
812 |
|
813 |
+
#: ../classes/class-ccf-form-manager.php:1246
|
814 |
msgid "Address"
|
815 |
msgstr ""
|
816 |
|
817 |
+
#: ../classes/class-ccf-form-manager.php:1247
|
818 |
msgid "Phone"
|
819 |
msgstr ""
|
820 |
|
821 |
+
#: ../classes/class-ccf-form-manager.php:1248
|
822 |
+
msgid "reCAPTCHA"
|
823 |
+
msgstr ""
|
824 |
+
|
825 |
+
#: ../classes/class-ccf-form-manager.php:1264
|
826 |
msgid "Invalid date"
|
827 |
msgstr ""
|
828 |
|
829 |
+
#: ../classes/class-ccf-form-manager.php:1266
|
830 |
msgid "Form Submission"
|
831 |
msgstr ""
|
832 |
|
833 |
+
#: ../classes/class-ccf-form-renderer.php:59
|
834 |
msgid "This is not a valid email address."
|
835 |
msgstr ""
|
836 |
|
837 |
+
#: ../classes/class-ccf-form-renderer.php:62
|
838 |
msgid "This is not a valid phone number."
|
839 |
msgstr ""
|
840 |
|
841 |
+
#: ../classes/class-ccf-form-renderer.php:63
|
842 |
msgid "This phone number is not 10 digits"
|
843 |
msgstr ""
|
844 |
|
845 |
+
#: ../classes/class-ccf-upgrader.php:37
|
846 |
msgid ""
|
847 |
"Did you just upgrade to a post 6.0 version of Custom Contact Forms? If so, "
|
848 |
+
"you might need to upgrade your database to use your old forms. Please backup "
|
849 |
+
"your database before running the upgrade."
|
850 |
msgstr ""
|
851 |
|
852 |
+
#: ../classes/class-ccf-upgrader.php:38
|
853 |
msgid "Upgrade"
|
854 |
msgstr ""
|
855 |
|
856 |
+
#: ../classes/class-ccf-upgrader.php:39
|
857 |
msgid "Dismiss"
|
858 |
msgstr ""
|
859 |
|
860 |
+
#: ../classes/class-ccf-upgrader.php:61
|
861 |
msgid "Database update complete."
|
862 |
msgstr ""
|
863 |
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.taylorlovett.com
|
|
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,6 +33,12 @@ For questions, feature requests, and support concerning the Custom Contact Forms
|
|
33 |
|
34 |
= Changelog ==
|
35 |
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
= 6.1.4 =
|
37 |
* Decode html entities on model sync. Escape entities on output.
|
38 |
|
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.2
|
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.2 =
|
37 |
+
* Add reCAPTCHA field
|
38 |
+
* Fix some localization of date field
|
39 |
+
* Fix spinner for non-root WP installs
|
40 |
+
* Strip slashes off of email field values
|
41 |
+
|
42 |
= 6.1.4 =
|
43 |
* Decode html entities on model sync. Escape entities on output.
|
44 |
|
scss/form-manager.scss
CHANGED
@@ -125,6 +125,10 @@
|
|
125 |
border-bottom: 1px solid #e5e5e5;
|
126 |
padding: 10px 20px;
|
127 |
|
|
|
|
|
|
|
|
|
128 |
.left {
|
129 |
float: left;
|
130 |
clear: both;
|
@@ -316,7 +320,6 @@
|
|
316 |
border-top: 1px solid #e5e5e5;
|
317 |
|
318 |
.spinner {
|
319 |
-
background: url('/wp-admin/images/wpspin_light.gif') no-repeat;
|
320 |
display: none;
|
321 |
float: right;
|
322 |
width: 16px;
|
125 |
border-bottom: 1px solid #e5e5e5;
|
126 |
padding: 10px 20px;
|
127 |
|
128 |
+
.recaptcha-preview-img {
|
129 |
+
margin-top: 7px;
|
130 |
+
}
|
131 |
+
|
132 |
.left {
|
133 |
float: left;
|
134 |
clear: both;
|
320 |
border-top: 1px solid #e5e5e5;
|
321 |
|
322 |
.spinner {
|
|
|
323 |
display: none;
|
324 |
float: right;
|
325 |
width: 16px;
|
scss/form.scss
CHANGED
@@ -30,7 +30,7 @@
|
|
30 |
clear: both;
|
31 |
overflow: auto;
|
32 |
|
33 |
-
&[data-field-type="dropdown"], &[data-field-type="radio"], &[data-field-type="checkboxes"], &[data-field-type="date"] {
|
34 |
.error {
|
35 |
float: none;
|
36 |
}
|
30 |
clear: both;
|
31 |
overflow: auto;
|
32 |
|
33 |
+
&[data-field-type="recaptcha"],&[data-field-type="dropdown"], &[data-field-type="radio"], &[data-field-type="checkboxes"], &[data-field-type="date"] {
|
34 |
.error {
|
35 |
float: none;
|
36 |
}
|