Version Description
- File upload field
- Description field added to each field type
- Improved unit testing
- CCF widget
Download this release
Release Info
Developer | tlovett1 |
Plugin | Custom Contact Forms |
Version | 6.4 |
Comparing to | |
See all releases |
Code changes from version 6.3.6 to 6.4
- README.md +5 -0
- bower.json +1 -3
- build/css/form-manager.css +9 -5
- build/css/form-manager.css.map +1 -1
- build/css/form-manager.min.css +1 -1
- build/css/form-mce.css +3 -0
- build/css/form-mce.css.map +1 -1
- build/css/form-mce.min.css +1 -1
- build/css/form.css +17 -10
- build/css/form.css.map +1 -1
- build/css/form.min.css +1 -1
- build/js/form-manager.js +59 -2
- build/js/form-manager.min.js +2 -2
- build/js/form.min.js +1 -1
- classes/class-ccf-api.php +14 -1
- classes/class-ccf-field-renderer.php +178 -12
- classes/class-ccf-form-handler.php +120 -22
- classes/class-ccf-form-manager.php +160 -1
- classes/class-ccf-form-renderer.php +22 -13
- classes/class-ccf-submission-cpt.php +19 -0
- classes/class-ccf-widget.php +101 -0
- custom-contact-forms.php +12 -1
- js/form.js +188 -36
- js/manager/models.js +17 -2
- js/manager/utils.js +8 -0
- js/manager/views.js +34 -0
- languages/custom-contact-forms.mo +0 -0
- languages/custom-contact-forms.po +421 -304
- readme.txt +7 -1
README.md
CHANGED
@@ -80,6 +80,7 @@ per-field basis.
|
|
80 |
* `Internal Slug` - Every field in a form must have a unique slug. Slugs are auto-generated to make your life
|
81 |
easier. This makes it easier to develop with CCF.
|
82 |
* `Label` - A label shows up above a field and is visible to the form user.
|
|
|
83 |
* `Initial Value` - A fields value upon loading the form.
|
84 |
* `Required` - Required fields must be filled out for a form to be submitted.
|
85 |
* `Class Name` - You can manually add classes to a fields wrapper element.
|
@@ -98,6 +99,10 @@ described below:
|
|
98 |
* `Checkboxes` - A list of checkable choices.
|
99 |
* `Radio Buttons` - A list of choices where only one can be chosen.
|
100 |
* `Hidden` - A hidden field.
|
|
|
|
|
|
|
|
|
101 |
|
102 |
__Note__: Choiceable fields all handle choices the same way. Choices can be set with a `value` and a `label`. Values
|
103 |
are internal, and labels are visible to the end form user. If a choice does not have a `value`, the choice will not
|
80 |
* `Internal Slug` - Every field in a form must have a unique slug. Slugs are auto-generated to make your life
|
81 |
easier. This makes it easier to develop with CCF.
|
82 |
* `Label` - A label shows up above a field and is visible to the form user.
|
83 |
+
* `Description` - A description shows up below a field and is visible to the form user.
|
84 |
* `Initial Value` - A fields value upon loading the form.
|
85 |
* `Required` - Required fields must be filled out for a form to be submitted.
|
86 |
* `Class Name` - You can manually add classes to a fields wrapper element.
|
99 |
* `Checkboxes` - A list of checkable choices.
|
100 |
* `Radio Buttons` - A list of choices where only one can be chosen.
|
101 |
* `Hidden` - A hidden field.
|
102 |
+
* `File Upload` - Allow users to upload a file.
|
103 |
+
|
104 |
+
* __Allowed Files Types__ - Restrict the file extensions that can be uploaded. If left blank, this will default to whatever is allowed by WordPress.
|
105 |
+
* __Max File Size__ - Restrict the max file size allowed to be uploaded. If left blank, will default to whatever is allowed by WordPress and your server.
|
106 |
|
107 |
__Note__: Choiceable fields all handle choices the same way. Choices can be set with a `value` and a `label`. Values
|
108 |
are internal, and labels are visible to the end form user. If a choice does not have a `value`, the choice will not
|
bower.json
CHANGED
@@ -8,8 +8,6 @@
|
|
8 |
"underscore": "~1.6.0",
|
9 |
"jquery-migrate": "~1.2.1",
|
10 |
"qunit": "~1.17.1",
|
11 |
-
"moment": "~2.9.0"
|
12 |
-
"sinon-1.9.1": "http://sinonjs.org/releases/sinon-1.9.1.js",
|
13 |
-
"sinon-qunit-1.0.0": "http://sinonjs.org/releases/sinon-qunit-1.0.0.js"
|
14 |
}
|
15 |
}
|
8 |
"underscore": "~1.6.0",
|
9 |
"jquery-migrate": "~1.2.1",
|
10 |
"qunit": "~1.17.1",
|
11 |
+
"moment": "~2.9.0"
|
|
|
|
|
12 |
}
|
13 |
}
|
build/css/form-manager.css
CHANGED
@@ -89,6 +89,9 @@
|
|
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;
|
@@ -260,6 +263,10 @@
|
|
260 |
.ccf-main-modal .ccf-form-pane label {
|
261 |
display: block;
|
262 |
margin-bottom: 8px; }
|
|
|
|
|
|
|
|
|
263 |
.ccf-main-modal .ccf-form-pane .left-sidebar {
|
264 |
box-sizing: border-box;
|
265 |
background-color: #f3f3f3;
|
@@ -279,10 +286,6 @@
|
|
279 |
padding: 5px; }
|
280 |
.ccf-main-modal .ccf-form-pane .left-sidebar .fields .field .right, .ccf-main-modal .ccf-form-pane .left-sidebar .fields .field .preview, .ccf-main-modal .ccf-form-pane .left-sidebar .structure-fields .field .right, .ccf-main-modal .ccf-form-pane .left-sidebar .structure-fields .field .preview, .ccf-main-modal .ccf-form-pane .left-sidebar .special-fields .field .right, .ccf-main-modal .ccf-form-pane .left-sidebar .special-fields .field .preview {
|
281 |
display: none; }
|
282 |
-
.ccf-main-modal .ccf-form-pane .left-sidebar .explain {
|
283 |
-
margin-top: 5px;
|
284 |
-
font-style: italic;
|
285 |
-
display: block; }
|
286 |
.ccf-main-modal .ccf-form-pane .form-content {
|
287 |
box-sizing: border-box;
|
288 |
position: absolute;
|
@@ -339,7 +342,8 @@
|
|
339 |
display: inline-block; }
|
340 |
.ccf-main-modal .ccf-form-pane .right-sidebar textarea {
|
341 |
width: 100%;
|
342 |
-
height: 80px;
|
|
|
343 |
.ccf-main-modal .ccf-form-pane .right-sidebar .field-html {
|
344 |
height: 150px;
|
345 |
width: 100%; }
|
89 |
padding: 10px 20px; }
|
90 |
.ccf-main-modal .field .preview .recaptcha-preview-img {
|
91 |
margin-top: 7px; }
|
92 |
+
.ccf-main-modal .field .preview .field-description {
|
93 |
+
margin-top: 3px;
|
94 |
+
clear: left; }
|
95 |
.ccf-main-modal .field .preview .left {
|
96 |
float: left;
|
97 |
clear: both;
|
263 |
.ccf-main-modal .ccf-form-pane label {
|
264 |
display: block;
|
265 |
margin-bottom: 8px; }
|
266 |
+
.ccf-main-modal .ccf-form-pane .explain {
|
267 |
+
margin-top: 5px;
|
268 |
+
font-style: italic;
|
269 |
+
display: block; }
|
270 |
.ccf-main-modal .ccf-form-pane .left-sidebar {
|
271 |
box-sizing: border-box;
|
272 |
background-color: #f3f3f3;
|
286 |
padding: 5px; }
|
287 |
.ccf-main-modal .ccf-form-pane .left-sidebar .fields .field .right, .ccf-main-modal .ccf-form-pane .left-sidebar .fields .field .preview, .ccf-main-modal .ccf-form-pane .left-sidebar .structure-fields .field .right, .ccf-main-modal .ccf-form-pane .left-sidebar .structure-fields .field .preview, .ccf-main-modal .ccf-form-pane .left-sidebar .special-fields .field .right, .ccf-main-modal .ccf-form-pane .left-sidebar .special-fields .field .preview {
|
288 |
display: none; }
|
|
|
|
|
|
|
|
|
289 |
.ccf-main-modal .ccf-form-pane .form-content {
|
290 |
box-sizing: border-box;
|
291 |
position: absolute;
|
342 |
display: inline-block; }
|
343 |
.ccf-main-modal .ccf-form-pane .right-sidebar textarea {
|
344 |
width: 100%;
|
345 |
+
height: 80px;
|
346 |
+
margin-top: 5px; }
|
347 |
.ccf-main-modal .ccf-form-pane .right-sidebar .field-html {
|
348 |
height: 150px;
|
349 |
width: 100%; }
|
build/css/form-manager.css.map
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
{
|
2 |
"version": 3,
|
3 |
-
"mappings": ";AAAA,UASC;EARA,WAAW,EAAE,MAAM;EACnB,GAAG,EAAC,2BAA2B;EAC/B,GAAG,EAAC,mNAA8D;EAIlE,WAAW,EAAE,MAAM;EACnB,UAAU,EAAE,MAAM;AAGnB,UASC;EARA,WAAW,EAAE,cAAc;EAC3B,GAAG,EAAC,mCAAmC;EACvC,GAAG,EAAC,mPAAsE;EAI1E,WAAW,EAAE,MAAM;EACnB,UAAU,EAAE,MAAM;AAGnB,6BAA8B;EAC7B,WAAW,EAAE,MAAM;EACnB,OAAO,EAAE,GAAG;EACZ,aAAa,EAAE,GAAG;EAClB,KAAK,EAAE,IAAI;EACX,WAAW,EAAE,MAAM;EACnB,YAAY,EAAE,MAAM;EACpB,cAAc,EAAE,IAAI;EACpB,WAAW,EAAE,CAAC;EACd,MAAM,EAAE,OAAO;EACf,sBAAsB,EAAE,WAAW;;AAGpC,eAAgB;EAqBf,OAAO,EAAE,IAAI;EACb,QAAQ,EAAE,KAAK;EACf,GAAG,EAAE,IAAI;EACT,IAAI,EAAE,IAAI;EACV,KAAK,EAAE,IAAI;EACX,MAAM,EAAE,IAAI;EACZ,OAAO,EAAE,MAAM;EACf,QAAQ,EAAE,MAAM;EAChB,gBAAgB,EAAE,IAAI;EA5BtB,kCAAmB;IAClB,WAAW,EAAE,cAAc;IAC3B,OAAO,EAAE,eAAe;IACxB,KAAK,EAAE,IAAI;IACX,WAAW,EAAE,MAAM;IACnB,YAAY,EAAE,MAAM;IACpB,cAAc,EAAE,IAAI;IACpB,WAAW,EAAE,CAAC;IACd,MAAM,EAAE,OAAO;IACf,sBAAsB,EAAE,WAAW;EAGpC,2CAA4B;IAC3B,OAAO,EAAE,IAAI;EAGd,uBAAQ;IACP,OAAO,EAAE,KAAK;EAaf,sBAAO;IACN,aAAa,EAAE,GAAG;IAClB,QAAQ,EAAE,IAAI;IAGb,0CAAG;MACF,gBAAgB,EAAE,OAAO;IAK1B,8CAAG;MACF,gBAAgB,EAAE,OAAO;IAI3B,kCAAc;MACb,MAAM,EAAE,cAAc;MAEtB,2CAAS;QACR,MAAM,EAAE,iBAAiB;IAI3B,yBAAG;MACF,kBAAkB,EAAE,6BAAyB;MAC7C,UAAU,EAAE,6BAAyB;MACrC,MAAM,EAAE,iBAAiB;MACzB,UAAU,EAAE,OAAO;MACnB,SAAS,EAAE,IAAI;MACf,MAAM,EAAE,CAAC;MACT,WAAW,EAAE,GAAG;MAChB,KAAK,EAAE,IAAI;MACX,OAAO,EAAE,IAAI;MACb,MAAM,EAAE,IAAI;MAEZ,+BAAQ;QACP,MAAM,EAAE,cAAc;IAIxB,6BAAO;MACN,KAAK,EAAE,KAAK;MACZ,+BAAE;QACD,KAAK,EAAE,OAAO;QACd,WAAW,EAAE,GAAG;IAIlB,+BAAS;MACR,KAAK,EAAE,IAAI;MACX,OAAO,EAAE,IAAI;MACb,UAAU,EAAE,IAAI;MAChB,QAAQ,EAAE,IAAI;MACd,KAAK,EAAE,IAAI;MACX,gBAAgB,EAAE,IAAI;MACtB,WAAW,EAAE,iBAAiB;MAC9B,YAAY,EAAE,iBAAiB;MAC/B,aAAa,EAAE,iBAAiB;MAChC,OAAO,EAAE,SAAS;MAElB,sDAAuB;QACtB,UAAU,EAAE,GAAG;MAGhB,qCAAM;QACL,KAAK,EAAE,IAAI;QACX,KAAK,EAAE,IAAI;QACX,KAAK,EAAE,GAAG;MAGX,sCAAO;QACN,KAAK,EAAE,KAAK;QACZ,KAAK,EAAE,GAAG;MAKV,wTAA2B;QAC1B,KAAK,EAAE,IAAI;QACX,SAAS,EAAE,IAAI;MAGhB,qJAAW;QACV,MAAM,EAAE,aAAa;QACrB,SAAS,EAAE,GAAG;MAGf,oRAAe;QACd,OAAO,EAAE,YAAY;QACrB,YAAY,EAAE,GAAG;QAEjB,wTAAM;UACL,KAAK,EAAE,IAAI;MAIb,yIAAO;QACN,OAAO,EAAE,YAAY;QACrB,cAAc,EAAE,GAAG;QAEnB,8JAAO;UACN,KAAK,EAAE,IAAI;MAMd,wCAAS;QACR,SAAS,EAAE,IAAI;QACf,WAAW,EAAE,IAAI;QACjB,aAAa,EAAE,cAAc;QAC7B,cAAc,EAAE,GAAG;QACnB,aAAa,EAAE,GAAG;MAGnB,2CAAY;QACX,UAAU,EAAE,MAAM;MAGnB,qCAAM;QACL,WAAW,EAAE,IAAI;QACjB,aAAa,EAAE,GAAG;QAClB,MAAM,EAAE,OAAO;QAEf,0CAAK;UACJ,KAAK,EAAE,GAAG;MAIZ,8DAA+B;QAC9B,OAAO,EAAE,YAAY;MAGtB,2DAA4B;QAC3B,OAAO,EAAE,YAAY;MAGtB,4FAA6B;QAC5B,MAAM,EAAE,OAAO;QACf,KAAK,EAAE,IAAI;QACX,gBAAgB,EAAE,IAAI;QACtB,KAAK,EAAE,IAAI;QACX,MAAM,EAAE,cAAc;QACtB,kBAAkB,EAAE,mCAAqC;QACzD,UAAU,EAAE,mCAAqC;MAGlD,wCAAS;QACR,MAAM,EAAE,IAAI;EAKf,2BAAY;IACX,QAAQ,EAAE,QAAQ;IAClB,GAAG,EAAE,IAAI;IACT,KAAK,EAAE,IAAI;IACX,SAAS,EAAE,IAAI;IACf,MAAM,EAAE,OAAO;IACf,KAAK,EAAE,IAAI;IACX,OAAO,EAAE,MAAM;EAGhB,0BAAW;IACV,QAAQ,EAAE,QAAQ;IAClB,GAAG,EAAE,CAAC;IACN,KAAK,EAAE,CAAC;IACR,IAAI,EAAE,CAAC;IACP,MAAM,EAAE,KAAK;IAEb,6BAAG;MACF,OAAO,EAAE,IAAI;IAGd,6BAAG;MACF,MAAM,EAAE,IAAI;MACZ,UAAU,EAAE,UAAU;MACtB,SAAS,EAAE,IAAI;MACf,MAAM,EAAE,CAAC;MACT,eAAe,EAAE,IAAI;MACrB,UAAU,EAAE,cAAc;MAC1B,UAAU,EAAE,OAAO;MACnB,OAAO,EAAE,MAAM;MAEf,gCAAG;QACF,OAAO,EAAE,YAAY;QACrB,MAAM,EAAE,CAAC;QACT,OAAO,EAAE,CAAC;QACV,OAAO,EAAE,YAAY;QACrB,MAAM,EAAE,IAAI;QACZ,cAAc,EAAE,MAAM;QACtB,WAAW,EAAE,IAAI;QACjB,OAAO,EAAE,KAAK;QAEd,kCAAE;UACD,eAAe,EAAE,IAAI;UAErB,yCAAO;YACN,KAAK,EAAE,IAAI;UAGZ,2CAAW;YACV,KAAK,EAAE,IAAI;EAOhB,8BAAe;IACd,OAAO,EAAE,IAAI;IACb,QAAQ,EAAE,QAAQ;IAClB,GAAG,EAAE,KAAK;IACV,KAAK,EAAE,CAAC;IACR,IAAI,EAAE,CAAC;IACP,MAAM,EAAE,CAAC;IAET,qCAAS;MACR,GAAG,EAAE,IAAI;MACT,UAAU,EAAE,iBAAiB;MAE7B,wGAA6B;QAC5B,UAAU,EAAE,CAAC;IAIf,gDAAkB;MACjB,QAAQ,EAAE,QAAQ;MAClB,GAAG,EAAE,CAAC;MACN,IAAI,EAAE,CAAC;MACP,KAAK,EAAE,CAAC;MACR,MAAM,EAAE,IAAI;MACZ,gBAAgB,EAAE,IAAI;MACtB,OAAO,EAAE,EAAE;MACX,UAAU,EAAE,oDAAoD;MAChE,MAAM,EAAE,gBAAgB;MACxB,YAAY,EAAE,GAAG;MACjB,cAAc,EAAE,GAAG;MAEnB,OAAO,EAAE,CAAC;MACV,OAAO,EAAE,IAAI;IAGd,sCAAQ;MACP,MAAM,EAAE,CAAC;MACT,IAAI,EAAE,CAAC;MACP,KAAK,EAAE,CAAC;MACR,MAAM,EAAE,IAAI;MACZ,OAAO,EAAE,MAAM;MACf,QAAQ,EAAE,QAAQ;MAClB,UAAU,EAAE,KAAK;MACjB,WAAW,EAAE,IAAI;MACjB,UAAU,EAAE,iBAAiB;MAE7B,+CAAS;QACR,OAAO,EAAE,IAAI;QACb,KAAK,EAAE,KAAK;QACZ,KAAK,EAAE,IAAI;QACX,MAAM,EAAE,IAAI;QACZ,UAAU,EAAE,IAAI;MAGjB,4CAAM;QACL,UAAU,EAAE,IAAI;QAChB,KAAK,EAAE,KAAK;QACZ,WAAW,EAAE,GAAG;IAIlB,iDAAmB;MAClB,gBAAgB,EAAE,IAAI;MACtB,aAAa,EAAE,CAAC;MAEhB,6DAAc;QACb,UAAU,EAAE,iBAAiB;MAI7B,2EAAiB;QAChB,OAAO,EAAE,KAAK;MAGf,oEAAU;QACT,OAAO,EAAE,GAAG;MAId,oDAAG;QAcF,MAAM,EAAE,OAAO;QACf,OAAO,EAAE,SAAS;QAClB,aAAa,EAAE,iBAAiB;QAChC,SAAS,EAAE,IAAI;QACf,gBAAgB,EAAE,OAAO;QACzB,MAAM,EAAE,CAAC;QAlBT,2DAAS;UACR,YAAY,EAAE,GAAG;UACjB,WAAW,EAAE,cAAc;UAC3B,OAAO,EAAE,GAAG;UACZ,KAAK,EAAE,IAAI;UACX,WAAW,EAAE,MAAM;UACnB,YAAY,EAAE,MAAM;UACpB,cAAc,EAAE,IAAI;UACpB,WAAW,EAAE,CAAC;UACd,MAAM,EAAE,OAAO;UACf,sBAAsB,EAAE,WAAW;MAWrC,kEAAiB;QAChB,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,SAAS;QAClB,aAAa,EAAE,iBAAiB;IAIlC,oCAAM;MACL,OAAO,EAAE,KAAK;MACd,aAAa,EAAE,GAAG;IAGnB,4CAAc;MACb,UAAU,EAAE,UAAU;MACtB,gBAAgB,EAAE,OAAO;MACzB,QAAQ,EAAE,QAAQ;MAClB,UAAU,EAAE,cAAc;MAC1B,YAAY,EAAE,cAAc;MAC5B,QAAQ,EAAE,MAAM;MAChB,KAAK,EAAE,GAAG;MACV,GAAG,EAAE,CAAC;MACN,OAAO,EAAE,CAAC;MACV,MAAM,EAAE,IAAI;MACZ,IAAI,EAAE,CAAC;MACP,QAAQ,EAAE,IAAI;MAEd,2EAA+B;QAC9B,UAAU,EAAE,CAAC;MAGd,kLAA4C;QAC3C,OAAO,EAAE,GAAG;QAEZ,gcAA+B;UAC9B,OAAO,EAAE,IAAI;
|
4 |
"sources": ["../../scss/form-manager.scss"],
|
5 |
"names": [],
|
6 |
"file": "form-manager.css"
|
1 |
{
|
2 |
"version": 3,
|
3 |
+
"mappings": "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",
|
4 |
"sources": ["../../scss/form-manager.scss"],
|
5 |
"names": [],
|
6 |
"file": "form-manager.css"
|
build/css/form-manager.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
@charset "UTF-8";@font-face{font-family:menu;src:url(../../fonts/menu.eot);src:url(../../fonts/menu.eot?#iefix) format("embedded-opentype"),url(../../fonts/menu.woff) format("woff"),url(../../fonts/menu.ttf) format("truetype"),url(../../fonts/menu.svg#form-manager) format("svg");font-weight:400;font-style:normal}@font-face{font-family:form-manager;src:url(../../fonts/form-manager.eot);src:url(../../fonts/form-manager.eot?#iefix) format("embedded-opentype"),url(../../fonts/form-manager.woff) format("woff"),url(../../fonts/form-manager.ttf) format("truetype"),url(../../fonts/form-manager.svg#form-manager) format("svg");font-weight:400;font-style:normal}.ccf-open-form-manager:before{font-family:menu;content:"";padding-right:4px;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;cursor:pointer;-webkit-font-smoothing:antialiased}.ccf-main-modal{display:none;position:fixed;top:30px;left:30px;right:30px;bottom:30px;z-index:160000;overflow:hidden;background-color:#fff}.ccf-main-modal [data-icon]:before{font-family:form-manager;content:attr(data-icon);speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;cursor:pointer;-webkit-font-smoothing:antialiased}.ccf-main-modal .single .insert-form-button{display:none}.ccf-main-modal .hidden{display:block}.ccf-main-modal .field{margin-bottom:5px;overflow:auto}.ccf-main-modal .field.field-incomplete h4{background-color:#ffebe8}.ccf-main-modal .field.field-duplicate-slug h4{background-color:#ffe6a5}.ccf-main-modal .field.ccf-editing{border:#999 1px solid}.ccf-main-modal .field.ccf-editing h4:hover{border:1px solid #e5e5e5}.ccf-main-modal .field h4{-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);border:1px solid #e5e5e5;background:#fafafa;font-size:13px;margin:0;font-weight:600;color:#222;padding:13px;cursor:move}.ccf-main-modal .field h4:hover{border:#999 1px solid}.ccf-main-modal .field .right{float:right}.ccf-main-modal .field .right a{color:inherit;margin-left:3px}.ccf-main-modal .field .preview{clear:both;display:none;text-align:left;overflow:auto;float:none;background-color:#fff;border-left:1px solid #e5e5e5;border-right:1px solid #e5e5e5;border-bottom:1px solid #e5e5e5;padding:10px 20px}.ccf-main-modal .field .preview .recaptcha-preview-img{margin-top:7px}.ccf-main-modal .field .preview .left{float:left;clear:both;width:47%}.ccf-main-modal .field .preview .right{float:right;width:47%}.ccf-main-modal .field .preview .full input[type=text],.ccf-main-modal .field .preview .full select,.ccf-main-modal .field .preview .left input[type=text],.ccf-main-modal .field .preview .left select,.ccf-main-modal .field .preview .right input[type=text],.ccf-main-modal .field .preview .right select{width:100%;max-width:100%}.ccf-main-modal .field .preview .full .sub-label,.ccf-main-modal .field .preview .left .sub-label,.ccf-main-modal .field .preview .right .sub-label{margin:3px 0 3px 2px;font-size:90%}.ccf-main-modal .field .preview .full .hour,.ccf-main-modal .field .preview .full .minute,.ccf-main-modal .field .preview .left .hour,.ccf-main-modal .field .preview .left .minute,.ccf-main-modal .field .preview .right .hour,.ccf-main-modal .field .preview .right .minute{display:inline-block;margin-right:5px}.ccf-main-modal .field .preview .full .hour input,.ccf-main-modal .field .preview .full .minute input,.ccf-main-modal .field .preview .left .hour input,.ccf-main-modal .field .preview .left .minute input,.ccf-main-modal .field .preview .right .hour input,.ccf-main-modal .field .preview .right .minute input{width:35px}.ccf-main-modal .field .preview .full .am-pm,.ccf-main-modal .field .preview .left .am-pm,.ccf-main-modal .field .preview .right .am-pm{display:inline-block;vertical-align:top}.ccf-main-modal .field .preview .full .am-pm select,.ccf-main-modal .field .preview .left .am-pm select,.ccf-main-modal .field .preview .right .am-pm select{width:60px}.ccf-main-modal .field .preview .heading{font-size:125%;font-weight:700;border-bottom:1px solid #ccc;padding-bottom:9px;margin-bottom:9px}.ccf-main-modal .field .preview .subheading{font-style:italic}.ccf-main-modal .field .preview label{font-weight:700;margin-bottom:3px;cursor:inherit}.ccf-main-modal .field .preview label span{color:red}.ccf-main-modal .field .preview input[type=checkbox]+label,.ccf-main-modal .field .preview input[type=radio]+label{display:inline-block}.ccf-main-modal .field .preview input[type=text],.ccf-main-modal .field .preview textarea{width:100%;background-color:#fff;color:#333;border:1px solid #ddd;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.07);box-shadow:inset 0 1px 2px rgba(0,0,0,.07)}.ccf-main-modal .field .preview textarea{height:60px}.ccf-main-modal .close-icon{position:absolute;top:16px;right:16px;font-size:35px;cursor:pointer;color:#333;z-index:160001}.ccf-main-modal .main-menu{position:absolute;top:0;right:0;left:0;height:125px}.ccf-main-modal .main-menu h1{padding:16px}.ccf-main-modal .main-menu ul{height:40px;box-sizing:border-box;font-size:14px;margin:0;list-style-type:none;border-top:1px solid #ddd;background:#f3f3f3;padding:0 16px}.ccf-main-modal .main-menu ul li{margin:0;display:inline-block;height:38px;vertical-align:middle;line-height:40px;padding:0 8px}.ccf-main-modal .main-menu ul li a{text-decoration:none}.ccf-main-modal .main-menu ul li a :hover,.ccf-main-modal .main-menu ul li a.selected{color:#000}.ccf-main-modal .ccf-form-pane{display:none;position:absolute;top:125px;right:0;left:0;bottom:0}.ccf-main-modal .ccf-form-pane.single{top:85px;border-top:1px solid #e5e5e5}.ccf-main-modal .ccf-form-pane.single .form-content,.ccf-main-modal .ccf-form-pane.single .left-sidebar{border-top:0}.ccf-main-modal .ccf-form-pane .disabled-overlay{position:absolute;top:0;left:0;right:0;bottom:50px;background-color:#000;opacity:.1;-ms-filter:"alpha(Opacity=1)";filter:alpha(opacity=1);-moz-opacity:.1;-khtml-opacity:.1;z-index:1;display:none}.ccf-main-modal .ccf-form-pane .bottom{bottom:0;left:0;right:0;height:50px;padding:0 16px;position:absolute;text-align:right;line-height:50px;border-top:1px solid #e5e5e5}.ccf-main-modal .ccf-form-pane .bottom .spinner{display:none;float:right;width:16px;height:16px;margin-top:16px}.ccf-main-modal .ccf-form-pane .bottom input{margin-top:11px;float:right;margin-left:6px}.ccf-main-modal .ccf-form-pane .accordion-section{background-color:#fff;border-bottom:0}.ccf-main-modal .ccf-form-pane .accordion-section:first-child{border-top:1px solid #e5e5e5}.ccf-main-modal .ccf-form-pane .accordion-section.expanded .section-content{display:block}.ccf-main-modal .ccf-form-pane .accordion-section.expanded h2:before{content:""}.ccf-main-modal .ccf-form-pane .accordion-section h2{cursor:pointer;padding:10px 20px;border-bottom:1px solid #e5e5e5;font-size:150%;background-color:#fafafa;margin:0}.ccf-main-modal .ccf-form-pane .accordion-section h2:before{margin-right:8px;font-family:form-manager;content:"";speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;cursor:pointer;-webkit-font-smoothing:antialiased}.ccf-main-modal .ccf-form-pane .accordion-section .section-content{display:none;padding:10px 20px;border-bottom:1px solid #e5e5e5}.ccf-main-modal .ccf-form-pane label{display:block;margin-bottom:8px}.ccf-main-modal .ccf-form-pane .left-sidebar{box-sizing:border-box;background-color:#f3f3f3;position:absolute;border-top:1px solid #ddd;border-right:1px solid #ddd;width:25%;top:0;padding:0;bottom:50px;left:0;overflow:auto}.ccf-main-modal .ccf-form-pane .left-sidebar .accordion-section:first-child{border-top:0}.ccf-main-modal .ccf-form-pane .left-sidebar .fields,.ccf-main-modal .ccf-form-pane .left-sidebar .special-fields,.ccf-main-modal .ccf-form-pane .left-sidebar .structure-fields{padding:5px}.ccf-main-modal .ccf-form-pane .left-sidebar .fields .field .preview,.ccf-main-modal .ccf-form-pane .left-sidebar .fields .field .right,.ccf-main-modal .ccf-form-pane .left-sidebar .special-fields .field .preview,.ccf-main-modal .ccf-form-pane .left-sidebar .special-fields .field .right,.ccf-main-modal .ccf-form-pane .left-sidebar .structure-fields .field .preview,.ccf-main-modal .ccf-form-pane .left-sidebar .structure-fields .field .right{display:none}.ccf-main-modal .ccf-form-pane .left-sidebar .explain{margin-top:5px;font-style:italic;display:block}.ccf-main-modal .ccf-form-pane .form-content{box-sizing:border-box;position:absolute;width:40%;bottom:50px;left:25%;right:35%;top:0;overflow:auto;border-top:1px solid #ddd;padding:21px}.ccf-main-modal .ccf-form-pane .form-content .no-fields{font-size:22px;padding:16px;font-style:italic}.ccf-main-modal .ccf-form-pane .right-sidebar{box-sizing:border-box;padding:0;position:absolute;width:35%;top:0;overflow:auto;background-color:#f3f3f3;right:0;bottom:50px;border-left:1px solid #ddd}.ccf-main-modal .ccf-form-pane .right-sidebar .section-content>div{margin-bottom:6px}.ccf-main-modal .ccf-form-pane .right-sidebar .no-field{padding:16px;font-style:italic;font-size:22px}.ccf-main-modal .ccf-form-pane .right-sidebar label{display:inline-block;margin:0}.ccf-main-modal .ccf-form-pane .right-sidebar label .required{color:red}.ccf-main-modal .ccf-form-pane .right-sidebar .field-error input{border-color:red;border-width:2px}.ccf-main-modal .ccf-form-pane .right-sidebar .field-duplicate-slug input{border-color:#ffe6a5;border-width:2px}.ccf-main-modal .ccf-form-pane .right-sidebar input[type=text]{width:100%;display:block;margin-top:5px}.ccf-main-modal .ccf-form-pane .right-sidebar input[type=checkbox]+label{display:inline-block;vertical-align:middle}.ccf-main-modal .ccf-form-pane .right-sidebar label+select{display:inline-block}.ccf-main-modal .ccf-form-pane .right-sidebar textarea{width:100%;height:80px}.ccf-main-modal .ccf-form-pane .right-sidebar .field-html{height:150px;width:100%}.ccf-main-modal .ccf-form-pane .right-sidebar .repeatable-choices .choice input[type=text]{width:100px;display:inline-block}.ccf-main-modal .ccf-form-pane .right-sidebar .repeatable-choices .choice .move{color:inherit;cursor:move}.ccf-main-modal .ccf-form-pane .right-sidebar .repeatable-choices .choice .move:before{cursor:move}.ccf-main-modal .ccf-form-pane .right-sidebar .repeatable-choices .choice .add,.ccf-main-modal .ccf-form-pane .right-sidebar .repeatable-choices .choice .delete{cursor:pointer;color:inherit}.ccf-main-modal .ccf-existing-form-pane{display:none;position:absolute;overflow:scroll;top:125px;right:0;left:0;bottom:0;background-color:#fff;padding:16px}.ccf-main-modal .ccf-existing-form-pane table{width:100%;border-collapse:collapse;table-layout:fixed;border:1px solid #ddd}.ccf-main-modal .ccf-existing-form-pane table td{margin:0;padding:14px 21px;text-align:left}.ccf-main-modal .ccf-existing-form-pane table .empty-form-table{text-align:center}.ccf-main-modal .ccf-existing-form-pane table tfoot,.ccf-main-modal .ccf-existing-form-pane table thead{background-color:#f0f0f0}.ccf-main-modal .ccf-existing-form-pane table tfoot tr,.ccf-main-modal .ccf-existing-form-pane table thead tr{border-bottom:1px solid #e5e5e5;border-top:1px solid #e5e5e5}.ccf-main-modal .ccf-existing-form-pane table tfoot th,.ccf-main-modal .ccf-existing-form-pane table thead th{margin:0;text-align:left;padding:14px 21px;box-sizing:border-box}.ccf-main-modal .ccf-existing-form-pane table tfoot .id,.ccf-main-modal .ccf-existing-form-pane table thead .id{width:5%}.ccf-main-modal .ccf-existing-form-pane table tfoot .title,.ccf-main-modal .ccf-existing-form-pane table thead .title{width:30%}.ccf-main-modal .ccf-existing-form-pane table tfoot .author,.ccf-main-modal .ccf-existing-form-pane table tfoot .entries,.ccf-main-modal .ccf-existing-form-pane table tfoot .submissions,.ccf-main-modal .ccf-existing-form-pane table thead .author,.ccf-main-modal .ccf-existing-form-pane table thead .entries,.ccf-main-modal .ccf-existing-form-pane table thead .submissions{width:10%}.ccf-main-modal .ccf-existing-form-pane table tfoot .number-of-fields,.ccf-main-modal .ccf-existing-form-pane table thead .number-of-fields{width:15%}.ccf-main-modal .ccf-existing-form-pane table tfoot .date,.ccf-main-modal .ccf-existing-form-pane table thead .date{width:20%}.ccf-main-modal .ccf-existing-form-pane table tbody tr:nth-child(odd){background-color:#fafafa;margin:0}.ccf-main-modal .ccf-existing-form-pane table tbody tr{background-color:#fff}.ccf-main-modal .ccf-existing-form-pane table tbody td{vertical-align:top}.ccf-main-modal .ccf-existing-form-pane table tbody td a{text-decoration:none;cursor:pointer}.ccf-main-modal .ccf-existing-form-pane table tbody td .title{font-weight:700;font-size:14px}.ccf-main-modal .ccf-existing-form-pane table tbody td .actions{visibility:hidden;margin-top:6px}.ccf-main-modal .ccf-existing-form-pane table tbody td .actions .delete{color:red}.ccf-main-modal .ccf-existing-form-pane table tbody tr:hover td .actions{visibility:visible}.ccf-main-modal-overlay{display:none;position:fixed;top:0;left:0;width:100%;height:100%;z-index:159900;opacity:.7;-ms-filter:"alpha(Opacity=70)";filter:alpha(opacity=70);-moz-opacity:.7;-khtml-opacity:.7;background-color:#000}.ccf-pagination{font-size:12px;margin-top:8px;text-align:right}.ccf-pagination .pages{padding:0 4px}.ccf-pagination .num-items{font-style:italic;padding-right:4px}.ccf-pagination a{cursor:pointer;color:#0074a2;background:#f0f0f0;text-decoration:none}.ccf-pagination a.first,.ccf-pagination a.last,.ccf-pagination a.next,.ccf-pagination a.prev{font-size:16px;line-height:22px;padding:0 7px 2px}.ccf-pagination a.first:hover,.ccf-pagination a.last:hover,.ccf-pagination a.next:hover,.ccf-pagination a.prev:hover{color:#fff;background-color:#2ea2cc}.ccf-pagination a.disabled{color:#aaa}.ccf-pagination a.disabled:hover{color:#aaa;background:#f0f0f0}
|
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 .field-description{margin-top:3px;clear:left}.ccf-main-modal .field .preview .left{float:left;clear:both;width:47%}.ccf-main-modal .field .preview .right{float:right;width:47%}.ccf-main-modal .field .preview .full input[type=text],.ccf-main-modal .field .preview .full select,.ccf-main-modal .field .preview .left input[type=text],.ccf-main-modal .field .preview .left select,.ccf-main-modal .field .preview .right input[type=text],.ccf-main-modal .field .preview .right select{width:100%;max-width:100%}.ccf-main-modal .field .preview .full .sub-label,.ccf-main-modal .field .preview .left .sub-label,.ccf-main-modal .field .preview .right .sub-label{margin:3px 0 3px 2px;font-size:90%}.ccf-main-modal .field .preview .full .hour,.ccf-main-modal .field .preview .full .minute,.ccf-main-modal .field .preview .left .hour,.ccf-main-modal .field .preview .left .minute,.ccf-main-modal .field .preview .right .hour,.ccf-main-modal .field .preview .right .minute{display:inline-block;margin-right:5px}.ccf-main-modal .field .preview .full .hour input,.ccf-main-modal .field .preview .full .minute input,.ccf-main-modal .field .preview .left .hour input,.ccf-main-modal .field .preview .left .minute input,.ccf-main-modal .field .preview .right .hour input,.ccf-main-modal .field .preview .right .minute input{width:35px}.ccf-main-modal .field .preview .full .am-pm,.ccf-main-modal .field .preview .left .am-pm,.ccf-main-modal .field .preview .right .am-pm{display:inline-block;vertical-align:top}.ccf-main-modal .field .preview .full .am-pm select,.ccf-main-modal .field .preview .left .am-pm select,.ccf-main-modal .field .preview .right .am-pm select{width:60px}.ccf-main-modal .field .preview .heading{font-size:125%;font-weight:700;border-bottom:1px solid #ccc;padding-bottom:9px;margin-bottom:9px}.ccf-main-modal .field .preview .subheading{font-style:italic}.ccf-main-modal .field .preview label{font-weight:700;margin-bottom:3px;cursor:inherit}.ccf-main-modal .field .preview label span{color:red}.ccf-main-modal .field .preview input[type=checkbox]+label,.ccf-main-modal .field .preview input[type=radio]+label{display:inline-block}.ccf-main-modal .field .preview input[type=text],.ccf-main-modal .field .preview textarea{width:100%;background-color:#fff;color:#333;border:1px solid #ddd;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.07);box-shadow:inset 0 1px 2px rgba(0,0,0,.07)}.ccf-main-modal .field .preview textarea{height:60px}.ccf-main-modal .close-icon{position:absolute;top:16px;right:16px;font-size:35px;cursor:pointer;color:#333;z-index:160001}.ccf-main-modal .main-menu{position:absolute;top:0;right:0;left:0;height:125px}.ccf-main-modal .main-menu h1{padding:16px}.ccf-main-modal .main-menu ul{height:40px;box-sizing:border-box;font-size:14px;margin:0;list-style-type:none;border-top:1px solid #ddd;background:#f3f3f3;padding:0 16px}.ccf-main-modal .main-menu ul li{margin:0;display:inline-block;height:38px;vertical-align:middle;line-height:40px;padding:0 8px}.ccf-main-modal .main-menu ul li a{text-decoration:none}.ccf-main-modal .main-menu ul li a :hover,.ccf-main-modal .main-menu ul li a.selected{color:#000}.ccf-main-modal .ccf-form-pane{display:none;position:absolute;top:125px;right:0;left:0;bottom:0}.ccf-main-modal .ccf-form-pane.single{top:85px;border-top:1px solid #e5e5e5}.ccf-main-modal .ccf-form-pane.single .form-content,.ccf-main-modal .ccf-form-pane.single .left-sidebar{border-top:0}.ccf-main-modal .ccf-form-pane .disabled-overlay{position:absolute;top:0;left:0;right:0;bottom:50px;background-color:#000;opacity:.1;-ms-filter:"alpha(Opacity=1)";filter:alpha(opacity=1);-moz-opacity:.1;-khtml-opacity:.1;z-index:1;display:none}.ccf-main-modal .ccf-form-pane .bottom{bottom:0;left:0;right:0;height:50px;padding:0 16px;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 .explain{margin-top:5px;font-style:italic;display:block}.ccf-main-modal .ccf-form-pane .left-sidebar{box-sizing:border-box;background-color:#f3f3f3;position:absolute;border-top:1px solid #ddd;border-right:1px solid #ddd;width:25%;top:0;padding:0;bottom:50px;left:0;overflow:auto}.ccf-main-modal .ccf-form-pane .left-sidebar .accordion-section:first-child{border-top:0}.ccf-main-modal .ccf-form-pane .left-sidebar .fields,.ccf-main-modal .ccf-form-pane .left-sidebar .special-fields,.ccf-main-modal .ccf-form-pane .left-sidebar .structure-fields{padding:5px}.ccf-main-modal .ccf-form-pane .left-sidebar .fields .field .preview,.ccf-main-modal .ccf-form-pane .left-sidebar .fields .field .right,.ccf-main-modal .ccf-form-pane .left-sidebar .special-fields .field .preview,.ccf-main-modal .ccf-form-pane .left-sidebar .special-fields .field .right,.ccf-main-modal .ccf-form-pane .left-sidebar .structure-fields .field .preview,.ccf-main-modal .ccf-form-pane .left-sidebar .structure-fields .field .right{display:none}.ccf-main-modal .ccf-form-pane .form-content{box-sizing:border-box;position:absolute;width:40%;bottom:50px;left:25%;right:35%;top:0;overflow:auto;border-top:1px solid #ddd;padding:21px}.ccf-main-modal .ccf-form-pane .form-content .no-fields{font-size:22px;padding:16px;font-style:italic}.ccf-main-modal .ccf-form-pane .right-sidebar{box-sizing:border-box;padding:0;position:absolute;width:35%;top:0;overflow:auto;background-color:#f3f3f3;right:0;bottom:50px;border-left:1px solid #ddd}.ccf-main-modal .ccf-form-pane .right-sidebar .section-content>div{margin-bottom:6px}.ccf-main-modal .ccf-form-pane .right-sidebar .no-field{padding:16px;font-style:italic;font-size:22px}.ccf-main-modal .ccf-form-pane .right-sidebar label{display:inline-block;margin:0}.ccf-main-modal .ccf-form-pane .right-sidebar label .required{color:red}.ccf-main-modal .ccf-form-pane .right-sidebar .field-error input{border-color:red;border-width:2px}.ccf-main-modal .ccf-form-pane .right-sidebar .field-duplicate-slug input{border-color:#ffe6a5;border-width:2px}.ccf-main-modal .ccf-form-pane .right-sidebar input[type=text]{width:100%;display:block;margin-top:5px}.ccf-main-modal .ccf-form-pane .right-sidebar input[type=checkbox]+label{display:inline-block;vertical-align:middle}.ccf-main-modal .ccf-form-pane .right-sidebar label+select{display:inline-block}.ccf-main-modal .ccf-form-pane .right-sidebar textarea{width:100%;height:80px;margin-top:5px}.ccf-main-modal .ccf-form-pane .right-sidebar .field-html{height:150px;width:100%}.ccf-main-modal .ccf-form-pane .right-sidebar .repeatable-choices .choice input[type=text]{width:100px;display:inline-block}.ccf-main-modal .ccf-form-pane .right-sidebar .repeatable-choices .choice .move{color:inherit;cursor:move}.ccf-main-modal .ccf-form-pane .right-sidebar .repeatable-choices .choice .move:before{cursor:move}.ccf-main-modal .ccf-form-pane .right-sidebar .repeatable-choices .choice .add,.ccf-main-modal .ccf-form-pane .right-sidebar .repeatable-choices .choice .delete{cursor:pointer;color:inherit}.ccf-main-modal .ccf-existing-form-pane{display:none;position:absolute;overflow:scroll;top:125px;right:0;left:0;bottom:0;background-color:#fff;padding:16px}.ccf-main-modal .ccf-existing-form-pane table{width:100%;border-collapse:collapse;table-layout:fixed;border:1px solid #ddd}.ccf-main-modal .ccf-existing-form-pane table td{margin:0;padding:14px 21px;text-align:left}.ccf-main-modal .ccf-existing-form-pane table .empty-form-table{text-align:center}.ccf-main-modal .ccf-existing-form-pane table tfoot,.ccf-main-modal .ccf-existing-form-pane table thead{background-color:#f0f0f0}.ccf-main-modal .ccf-existing-form-pane table tfoot tr,.ccf-main-modal .ccf-existing-form-pane table thead tr{border-bottom:1px solid #e5e5e5;border-top:1px solid #e5e5e5}.ccf-main-modal .ccf-existing-form-pane table tfoot th,.ccf-main-modal .ccf-existing-form-pane table thead th{margin:0;text-align:left;padding:14px 21px;box-sizing:border-box}.ccf-main-modal .ccf-existing-form-pane table tfoot .id,.ccf-main-modal .ccf-existing-form-pane table thead .id{width:5%}.ccf-main-modal .ccf-existing-form-pane table tfoot .title,.ccf-main-modal .ccf-existing-form-pane table thead .title{width:30%}.ccf-main-modal .ccf-existing-form-pane table tfoot .author,.ccf-main-modal .ccf-existing-form-pane table tfoot .entries,.ccf-main-modal .ccf-existing-form-pane table tfoot .submissions,.ccf-main-modal .ccf-existing-form-pane table thead .author,.ccf-main-modal .ccf-existing-form-pane table thead .entries,.ccf-main-modal .ccf-existing-form-pane table thead .submissions{width:10%}.ccf-main-modal .ccf-existing-form-pane table tfoot .number-of-fields,.ccf-main-modal .ccf-existing-form-pane table thead .number-of-fields{width:15%}.ccf-main-modal .ccf-existing-form-pane table tfoot .date,.ccf-main-modal .ccf-existing-form-pane table thead .date{width:20%}.ccf-main-modal .ccf-existing-form-pane table tbody tr:nth-child(odd){background-color:#fafafa;margin:0}.ccf-main-modal .ccf-existing-form-pane table tbody tr{background-color:#fff}.ccf-main-modal .ccf-existing-form-pane table tbody td{vertical-align:top}.ccf-main-modal .ccf-existing-form-pane table tbody td a{text-decoration:none;cursor:pointer}.ccf-main-modal .ccf-existing-form-pane table tbody td .title{font-weight:700;font-size:14px}.ccf-main-modal .ccf-existing-form-pane table tbody td .actions{visibility:hidden;margin-top:6px}.ccf-main-modal .ccf-existing-form-pane table tbody td .actions .delete{color:red}.ccf-main-modal .ccf-existing-form-pane table tbody tr:hover td .actions{visibility:visible}.ccf-main-modal-overlay{display:none;position:fixed;top:0;left:0;width:100%;height:100%;z-index:159900;opacity:.7;-ms-filter:"alpha(Opacity=70)";filter:alpha(opacity=70);-moz-opacity:.7;-khtml-opacity:.7;background-color:#000}.ccf-pagination{font-size:12px;margin-top:8px;text-align:right}.ccf-pagination .pages{padding:0 4px}.ccf-pagination .num-items{font-style:italic;padding-right:4px}.ccf-pagination a{cursor:pointer;color:#0074a2;background:#f0f0f0;text-decoration:none}.ccf-pagination a.first,.ccf-pagination a.last,.ccf-pagination a.next,.ccf-pagination a.prev{font-size:16px;line-height:22px;padding:0 7px 2px}.ccf-pagination a.first:hover,.ccf-pagination a.last:hover,.ccf-pagination a.next:hover,.ccf-pagination a.prev:hover{color:#fff;background-color:#2ea2cc}.ccf-pagination a.disabled{color:#aaa}.ccf-pagination a.disabled:hover{color:#aaa;background:#f0f0f0}
|
build/css/form-mce.css
CHANGED
@@ -54,6 +54,9 @@
|
|
54 |
.ccf-form-preview .field .right {
|
55 |
float: right;
|
56 |
width: 47%; }
|
|
|
|
|
|
|
57 |
.ccf-form-preview .field .left input[type="text"], .ccf-form-preview .field .left select, .ccf-form-preview .field .right input[type="text"], .ccf-form-preview .field .right select, .ccf-form-preview .field .full input[type="text"], .ccf-form-preview .field .full select {
|
58 |
width: 100%;
|
59 |
max-width: 100%; }
|
54 |
.ccf-form-preview .field .right {
|
55 |
float: right;
|
56 |
width: 47%; }
|
57 |
+
.ccf-form-preview .field .field-description {
|
58 |
+
margin-top: 3px;
|
59 |
+
clear: left; }
|
60 |
.ccf-form-preview .field .left input[type="text"], .ccf-form-preview .field .left select, .ccf-form-preview .field .right input[type="text"], .ccf-form-preview .field .right select, .ccf-form-preview .field .full input[type="text"], .ccf-form-preview .field .full select {
|
61 |
width: 100%;
|
62 |
max-width: 100%; }
|
build/css/form-mce.css.map
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
{
|
2 |
"version": 3,
|
3 |
-
"mappings": "AAAA,iBAAkB;EACjB,MAAM,EAAE,iBAAiB;EACzB,gBAAgB,EAAE,OAAO;EACzB,OAAO,EAAE,SAAS;EAClB,SAAS,EAAE,IAAI;EACf,WAAW,EAAE,sBAAsB;EAEnC,+BAAgB;IACf,UAAU,EAAE,MAAM;EAGnB,oBAAG;IACF,MAAM,EAAE,UAAU;IAClB,OAAO,EAAE,CAAC;EAGX,+BAAc;IACb,UAAU,EAAE,IAAI;IAEhB,qCAAM;MACL,KAAK,EAAE,IAAI;MACX,YAAY,EAAE,IAAI;MAClB,UAAU,EAAE,OAAO;MACnB,kBAAkB,EAAE,+CAAkB;MACtC,UAAU,EAAE,+CAAkB;MAC9B,cAAc,EAAE,GAAG;MACnB,OAAO,EAAE,YAAY;MACrB,eAAe,EAAE,IAAI;MACrB,SAAS,EAAE,IAAI;MACf,WAAW,EAAE,IAAI;MACjB,MAAM,EAAE,IAAI;MACZ,MAAM,EAAE,CAAC;MACT,OAAO,EAAE,UAAU;MACnB,MAAM,EAAE,OAAO;MACf,YAAY,EAAE,GAAG;MACjB,YAAY,EAAE,KAAK;MACnB,kBAAkB,EAAE,IAAI;MACxB,qBAAqB,EAAE,GAAG;MAC1B,aAAa,EAAE,GAAG;MAClB,WAAW,EAAE,MAAM;MACnB,kBAAkB,EAAE,UAAU;MAC9B,eAAe,EAAE,UAAU;MAC3B,UAAU,EAAE,UAAU;EAIxB,wBAAO;IACN,KAAK,EAAE,IAAI;IACX,UAAU,EAAE,IAAI;IAChB,KAAK,EAAE,IAAI;IACX,OAAO,EAAE,MAAM;IAEf,8BAAQ;MACP,OAAO,EAAE,GAAG;MACZ,KAAK,EAAE,IAAI;MACX,MAAM,EAAE,CAAC;MACT,OAAO,EAAE,KAAK;IAGf,8BAAM;MACL,OAAO,EAAE,KAAK;IAGf,8BAAM;MACL,KAAK,EAAE,IAAI;MACX,KAAK,EAAE,IAAI;MACX,KAAK,EAAE,GAAG;IAGX,+BAAO;MACN,KAAK,EAAE,KAAK;MACZ,KAAK,EAAE,GAAG;
|
4 |
"sources": ["../../scss/form-mce.scss"],
|
5 |
"names": [],
|
6 |
"file": "form-mce.css"
|
1 |
{
|
2 |
"version": 3,
|
3 |
+
"mappings": "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",
|
4 |
"sources": ["../../scss/form-mce.scss"],
|
5 |
"names": [],
|
6 |
"file": "form-mce.css"
|
build/css/form-mce.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.ccf-form-preview{border:1px solid #e5e5e5;background-color:#fcfcfc;padding:3.5% 7.5%;font-size:14px;font-family:"Open Sans",sans-serif}.ccf-form-preview.preview-error{text-align:center}.ccf-form-preview h2{margin:0 0 10px;padding:0}.ccf-form-preview .field-submit{margin-top:15px}.ccf-form-preview .field-submit input{color:#555;border-color:#ccc;background:#f7f7f7;-webkit-box-shadow:inset 0 1px 0 #fff,0 1px 0 rgba(0,0,0,.08);box-shadow:inset 0 1px 0 #fff,0 1px 0 rgba(0,0,0,.08);vertical-align:top;display:inline-block;text-decoration:none;font-size:13px;line-height:26px;height:28px;margin:0;padding:0 10px 1px;cursor:pointer;border-width:1px;border-style:solid;-webkit-appearance:none;-webkit-border-radius:3px;border-radius:3px;white-space:nowrap;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.ccf-form-preview .field{clear:both;text-align:left;float:none;padding:15px 0}.ccf-form-preview .field:after{content:' ';clear:both;height:0;display:block}.ccf-form-preview .field label{display:block}.ccf-form-preview .field .left{float:left;clear:both;width:47%}.ccf-form-preview .field .right{float:right;width:47%}.ccf-form-preview .field .full input[type=text],.ccf-form-preview .field .full select,.ccf-form-preview .field .left input[type=text],.ccf-form-preview .field .left select,.ccf-form-preview .field .right input[type=text],.ccf-form-preview .field .right select{width:100%;max-width:100%}.ccf-form-preview .field .full .sub-label,.ccf-form-preview .field .left .sub-label,.ccf-form-preview .field .right .sub-label{margin:3px 0 3px 2px;font-size:90%}.ccf-form-preview .field .heading{font-size:125%;font-weight:700;border-bottom:1px solid #ccc;padding-bottom:9px;margin-bottom:9px}.ccf-form-preview .field .subheading{font-style:italic}.ccf-form-preview .field label{font-weight:700;margin-bottom:7px;cursor:inherit}.ccf-form-preview .field label span{color:red}.ccf-form-preview .field .choice{padding-left:15px}.ccf-form-preview .field .choice label{font-weight:400}.ccf-form-preview .field input[type=checkbox]+label,.ccf-form-preview .field input[type=radio]+label{display:inline-block}.ccf-form-preview .field input[type=text],.ccf-form-preview .field textarea{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);background-color:#fff;color:#333;height:28px;box-sizing:border-box;width:100%;display:block}.ccf-form-preview .field input[type=text],.ccf-form-preview .field select,.ccf-form-preview .field textarea{padding:3px 6px;font-size:14px}.ccf-form-preview .field textarea{height:80px}.ccf-form-preview .field select{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);background-color:#fff;color:#333;outline:0;padding:2px;line-height:28px;height:28px;vertical-align:middle;font-size:14px}.ccf-form-preview .field.date .hour,.ccf-form-preview .field.date .minute{display:inline-block;margin-right:5px}.ccf-form-preview .field.date .hour input,.ccf-form-preview .field.date .minute input{width:35px}.ccf-form-preview .field.date .hour label,.ccf-form-preview .field.date .minute label{font-weight:400}.ccf-form-preview .field.date .am-pm{display:inline-block;vertical-align:top}.ccf-form-preview .field.date .am-pm select{width:60px}
|
1 |
+
.ccf-form-preview{border:1px solid #e5e5e5;background-color:#fcfcfc;padding:3.5% 7.5%;font-size:14px;font-family:"Open Sans",sans-serif}.ccf-form-preview.preview-error{text-align:center}.ccf-form-preview h2{margin:0 0 10px;padding:0}.ccf-form-preview .field-submit{margin-top:15px}.ccf-form-preview .field-submit input{color:#555;border-color:#ccc;background:#f7f7f7;-webkit-box-shadow:inset 0 1px 0 #fff,0 1px 0 rgba(0,0,0,.08);box-shadow:inset 0 1px 0 #fff,0 1px 0 rgba(0,0,0,.08);vertical-align:top;display:inline-block;text-decoration:none;font-size:13px;line-height:26px;height:28px;margin:0;padding:0 10px 1px;cursor:pointer;border-width:1px;border-style:solid;-webkit-appearance:none;-webkit-border-radius:3px;border-radius:3px;white-space:nowrap;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.ccf-form-preview .field{clear:both;text-align:left;float:none;padding:15px 0}.ccf-form-preview .field:after{content:' ';clear:both;height:0;display:block}.ccf-form-preview .field label{display:block}.ccf-form-preview .field .left{float:left;clear:both;width:47%}.ccf-form-preview .field .right{float:right;width:47%}.ccf-form-preview .field .field-description{margin-top:3px;clear:left}.ccf-form-preview .field .full input[type=text],.ccf-form-preview .field .full select,.ccf-form-preview .field .left input[type=text],.ccf-form-preview .field .left select,.ccf-form-preview .field .right input[type=text],.ccf-form-preview .field .right select{width:100%;max-width:100%}.ccf-form-preview .field .full .sub-label,.ccf-form-preview .field .left .sub-label,.ccf-form-preview .field .right .sub-label{margin:3px 0 3px 2px;font-size:90%}.ccf-form-preview .field .heading{font-size:125%;font-weight:700;border-bottom:1px solid #ccc;padding-bottom:9px;margin-bottom:9px}.ccf-form-preview .field .subheading{font-style:italic}.ccf-form-preview .field label{font-weight:700;margin-bottom:7px;cursor:inherit}.ccf-form-preview .field label span{color:red}.ccf-form-preview .field .choice{padding-left:15px}.ccf-form-preview .field .choice label{font-weight:400}.ccf-form-preview .field input[type=checkbox]+label,.ccf-form-preview .field input[type=radio]+label{display:inline-block}.ccf-form-preview .field input[type=text],.ccf-form-preview .field textarea{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);background-color:#fff;color:#333;height:28px;box-sizing:border-box;width:100%;display:block}.ccf-form-preview .field input[type=text],.ccf-form-preview .field select,.ccf-form-preview .field textarea{padding:3px 6px;font-size:14px}.ccf-form-preview .field textarea{height:80px}.ccf-form-preview .field select{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);background-color:#fff;color:#333;outline:0;padding:2px;line-height:28px;height:28px;vertical-align:middle;font-size:14px}.ccf-form-preview .field.date .hour,.ccf-form-preview .field.date .minute{display:inline-block;margin-right:5px}.ccf-form-preview .field.date .hour input,.ccf-form-preview .field.date .minute input{width:35px}.ccf-form-preview .field.date .hour label,.ccf-form-preview .field.date .minute label{font-weight:400}.ccf-form-preview .field.date .am-pm{display:inline-block;vertical-align:top}.ccf-form-preview .field.date .am-pm select{width:60px}
|
build/css/form.css
CHANGED
@@ -1,5 +1,7 @@
|
|
1 |
.ccf-form-wrapper {
|
2 |
margin: 20px 0; }
|
|
|
|
|
3 |
.ccf-form-wrapper .ccf-clear {
|
4 |
clear: both; }
|
5 |
.ccf-form-wrapper .form-title {
|
@@ -18,20 +20,24 @@
|
|
18 |
opacity: 0;
|
19 |
float: none;
|
20 |
margin: 0 0 0 6px; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
.ccf-form-wrapper .field {
|
22 |
margin-bottom: 24px;
|
23 |
clear: both; }
|
24 |
-
.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 {
|
25 |
float: none; }
|
26 |
-
.ccf-form-wrapper .field .error {
|
27 |
-
color: #ff0000;
|
28 |
-
float: right;
|
29 |
-
font-size: 85%;
|
30 |
-
margin-top: 3px; }
|
31 |
-
.ccf-form-wrapper .field .error.match-error, .ccf-form-wrapper .field .error.email-error {
|
32 |
-
float: none; }
|
33 |
-
.ccf-form-wrapper .field .error.right-error {
|
34 |
-
float: right; }
|
35 |
.ccf-form-wrapper .field .field-error-input {
|
36 |
border: 1px solid #ff0000; }
|
37 |
.ccf-form-wrapper .field label {
|
@@ -40,6 +46,7 @@
|
|
40 |
margin-bottom: 6px;
|
41 |
font-weight: bold; }
|
42 |
.ccf-form-wrapper .field label .required {
|
|
|
43 |
color: #ff0000; }
|
44 |
.ccf-form-wrapper .field input[type="text"], .ccf-form-wrapper .field textarea {
|
45 |
width: 100%;
|
1 |
.ccf-form-wrapper {
|
2 |
margin: 20px 0; }
|
3 |
+
.ccf-form-wrapper .ccf-form-frame {
|
4 |
+
display: none; }
|
5 |
.ccf-form-wrapper .ccf-clear {
|
6 |
clear: both; }
|
7 |
.ccf-form-wrapper .form-title {
|
20 |
opacity: 0;
|
21 |
float: none;
|
22 |
margin: 0 0 0 6px; }
|
23 |
+
.ccf-form-wrapper .field-description {
|
24 |
+
font-size: 85%;
|
25 |
+
clear: left;
|
26 |
+
margin-top: 6px; }
|
27 |
+
.ccf-form-wrapper .error {
|
28 |
+
color: #ff0000;
|
29 |
+
float: right;
|
30 |
+
font-size: 85%;
|
31 |
+
margin-top: 3px; }
|
32 |
+
.ccf-form-wrapper .error.match-error, .ccf-form-wrapper .error.email-error, .ccf-form-wrapper .error.unknown-error {
|
33 |
+
float: none; }
|
34 |
+
.ccf-form-wrapper .error.right-error {
|
35 |
+
float: right; }
|
36 |
.ccf-form-wrapper .field {
|
37 |
margin-bottom: 24px;
|
38 |
clear: both; }
|
39 |
+
.ccf-form-wrapper .field[data-field-type="recaptcha"] .error, .ccf-form-wrapper .field[data-field-type="file"] .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 {
|
40 |
float: none; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
.ccf-form-wrapper .field .field-error-input {
|
42 |
border: 1px solid #ff0000; }
|
43 |
.ccf-form-wrapper .field label {
|
46 |
margin-bottom: 6px;
|
47 |
font-weight: bold; }
|
48 |
.ccf-form-wrapper .field label .required {
|
49 |
+
padding-right: .3em;
|
50 |
color: #ff0000; }
|
51 |
.ccf-form-wrapper .field input[type="text"], .ccf-form-wrapper .field textarea {
|
52 |
width: 100%;
|
build/css/form.css.map
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
{
|
2 |
"version": 3,
|
3 |
-
"mappings": "AAAA,iBAAkB;EACjB,MAAM,EAAE,MAAM;EAEd,4BAAW;IACV,KAAK,EAAE,IAAI;EAGZ,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,
|
4 |
"sources": ["../../scss/form.scss"],
|
5 |
"names": [],
|
6 |
"file": "form.css"
|
1 |
{
|
2 |
"version": 3,
|
3 |
+
"mappings": "AAAA,iBAAkB;EACjB,MAAM,EAAE,MAAM;EAEd,iCAAgB;IACf,OAAO,EAAE,IAAI;EAGd,4BAAW;IACV,KAAK,EAAE,IAAI;EAGZ,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,oCAAmB;IAClB,SAAS,EAAE,GAAG;IACd,KAAK,EAAE,IAAI;IACX,UAAU,EAAE,GAAG;EAGhB,wBAAO;IACN,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,KAAK;IACZ,SAAS,EAAE,GAAG;IACd,UAAU,EAAE,GAAG;IAEf,kHAA8C;MAC7C,KAAK,EAAE,IAAI;IAGZ,oCAAc;MACb,KAAK,EAAE,KAAK;EAId,wBAAO;IACN,aAAa,EAAE,IAAI;IACnB,KAAK,EAAE,IAAI;IAGV,oWAAO;MACN,KAAK,EAAE,IAAI;IAIb,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,aAAa,EAAE,IAAI;QACnB,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 .ccf-clear{clear:both}.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}.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=
|
1 |
+
.ccf-form-wrapper{margin:20px 0}.ccf-form-wrapper .ccf-form-frame{display:none}.ccf-form-wrapper .ccf-clear{clear:both}.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-description{font-size:85%;clear:left;margin-top:6px}.ccf-form-wrapper .error{color:red;float:right;font-size:85%;margin-top:3px}.ccf-form-wrapper .error.email-error,.ccf-form-wrapper .error.match-error,.ccf-form-wrapper .error.unknown-error{float:none}.ccf-form-wrapper .error.right-error{float:right}.ccf-form-wrapper .field{margin-bottom:24px;clear:both}.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=file] .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 .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{padding-right:.3em;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
@@ -90,6 +90,14 @@
|
|
90 |
return false;
|
91 |
};
|
92 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
93 |
wp.ccf.utils.getPrettyFieldEmailConfirm = function( value ) {
|
94 |
if ( value.email ) {
|
95 |
return value.email;
|
@@ -271,7 +279,7 @@
|
|
271 |
*/
|
272 |
var _modelDecode = function( excludeKeys ) {
|
273 |
for ( var key in this.attributes ) {
|
274 |
-
if (
|
275 |
var value = this.get( key );
|
276 |
|
277 |
if ( typeof value === 'string' && value !== '' ) {
|
@@ -491,7 +499,8 @@
|
|
491 |
slug: '',
|
492 |
type: '',
|
493 |
required: false,
|
494 |
-
className: ''
|
|
|
495 |
};
|
496 |
|
497 |
return _.defaults( defaults, this.constructor.__super__.defaults );
|
@@ -511,6 +520,20 @@
|
|
511 |
}
|
512 |
);
|
513 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
514 |
wp.ccf.models.Fields['paragraph-text'] = wp.ccf.models.Fields['paragraph-text'] || wp.ccf.models.StandardField.extend(
|
515 |
{
|
516 |
defaults: function() {
|
@@ -991,6 +1014,7 @@
|
|
991 |
|
992 |
this.model.set( 'slug', this.el.querySelectorAll( '.field-slug' )[0].value );
|
993 |
this.model.set( 'label', this.el.querySelectorAll( '.field-label' )[0].value );
|
|
|
994 |
this.model.set( 'value', this.el.querySelectorAll( '.field-value' )[0].value );
|
995 |
this.model.set( 'placeholder', this.el.querySelectorAll( '.field-placeholder' )[0].value );
|
996 |
this.model.set( 'className', this.el.querySelectorAll( '.field-class-name' )[0].value );
|
@@ -1001,6 +1025,29 @@
|
|
1001 |
}
|
1002 |
);
|
1003 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1004 |
wp.ccf.views.Fields.recaptcha = wp.ccf.views.Fields.recaptcha || wp.ccf.views.FieldBase.extend(
|
1005 |
{
|
1006 |
template: wp.ccf.utils.template( 'ccf-recaptcha-template' ),
|
@@ -1011,6 +1058,7 @@
|
|
1011 |
|
1012 |
saveField: function() {
|
1013 |
this.model.set( 'label', this.el.querySelectorAll( '.field-label' )[0].value );
|
|
|
1014 |
this.model.set( 'siteKey', this.el.querySelectorAll( '.field-site-key' )[0].value );
|
1015 |
this.model.set( 'secretKey', this.el.querySelectorAll( '.field-secret-key' )[0].value );
|
1016 |
this.model.set( 'className', this.el.querySelectorAll( '.field-class-name' )[0].value );
|
@@ -1063,6 +1111,7 @@
|
|
1063 |
|
1064 |
this.model.set( 'slug', this.el.querySelectorAll( '.field-slug' )[0].value );
|
1065 |
this.model.set( 'label', this.el.querySelectorAll( '.field-label' )[0].value );
|
|
|
1066 |
this.model.set( 'value', this.el.querySelectorAll( '.field-value' )[0].value );
|
1067 |
this.model.set( 'placeholder', this.el.querySelectorAll( '.field-placeholder' )[0].value );
|
1068 |
this.model.set( 'className', this.el.querySelectorAll( '.field-class-name' )[0].value );
|
@@ -1096,6 +1145,7 @@
|
|
1096 |
|
1097 |
this.model.set( 'slug', this.el.querySelectorAll( '.field-slug' )[0].value );
|
1098 |
this.model.set( 'label', this.el.querySelectorAll( '.field-label' )[0].value );
|
|
|
1099 |
|
1100 |
var value = this.el.querySelectorAll( '.field-value' );
|
1101 |
if ( value.length > 0 ) {
|
@@ -1128,6 +1178,7 @@
|
|
1128 |
|
1129 |
this.model.set( 'slug', this.el.querySelectorAll( '.field-slug' )[0].value );
|
1130 |
this.model.set( 'label', this.el.querySelectorAll( '.field-label' )[0].value );
|
|
|
1131 |
this.model.set( 'className', this.el.querySelectorAll( '.field-class-name' )[0].value );
|
1132 |
this.model.set( 'required', ( this.el.querySelectorAll( '.field-required' )[0].value == 1 ) ? true : false );
|
1133 |
|
@@ -1144,6 +1195,7 @@
|
|
1144 |
|
1145 |
this.model.set( 'slug', this.el.querySelectorAll( '.field-slug' )[0].value );
|
1146 |
this.model.set( 'label', this.el.querySelectorAll( '.field-label' )[0].value );
|
|
|
1147 |
this.model.set( 'value', this.el.querySelectorAll( '.field-value' )[0].value );
|
1148 |
this.model.set( 'placeholder', this.el.querySelectorAll( '.field-placeholder' )[0].value );
|
1149 |
this.model.set( 'className', this.el.querySelectorAll( '.field-class-name' )[0].value );
|
@@ -1162,6 +1214,7 @@
|
|
1162 |
|
1163 |
this.model.set( 'slug', this.el.querySelectorAll( '.field-slug' )[0].value );
|
1164 |
this.model.set( 'label', this.el.querySelectorAll( '.field-label' )[0].value );
|
|
|
1165 |
this.model.set( 'value', this.el.querySelectorAll( '.field-value' )[0].value );
|
1166 |
this.model.set( 'placeholder', this.el.querySelectorAll( '.field-placeholder' )[0].value );
|
1167 |
this.model.set( 'phoneFormat', this.el.querySelectorAll( '.field-phone-format' )[0].value );
|
@@ -1181,6 +1234,7 @@
|
|
1181 |
|
1182 |
this.model.set( 'slug', this.el.querySelectorAll( '.field-slug' )[0].value );
|
1183 |
this.model.set( 'label', this.el.querySelectorAll( '.field-label' )[0].value );
|
|
|
1184 |
this.model.set( 'addressType', this.el.querySelectorAll( '.field-address-type' )[0].value );
|
1185 |
this.model.set( 'className', this.el.querySelectorAll( '.field-class-name' )[0].value );
|
1186 |
this.model.set( 'required', ( this.el.querySelectorAll( '.field-required' )[0].value == 1 ) ? true : false );
|
@@ -1198,6 +1252,7 @@
|
|
1198 |
|
1199 |
this.model.set( 'slug', this.el.querySelectorAll( '.field-slug' )[0].value );
|
1200 |
this.model.set( 'label', this.el.querySelectorAll( '.field-label' )[0].value );
|
|
|
1201 |
|
1202 |
var value = this.el.querySelectorAll( '.field-value' );
|
1203 |
if ( value.length ) {
|
@@ -1246,6 +1301,7 @@
|
|
1246 |
|
1247 |
this.model.set( 'slug', this.el.querySelectorAll( '.field-slug' )[0].value );
|
1248 |
this.model.set( 'label', this.el.querySelectorAll( '.field-label' )[0].value );
|
|
|
1249 |
this.model.set( 'className', this.el.querySelectorAll( '.field-class-name' )[0].value );
|
1250 |
this.model.set( 'required', ( this.el.querySelectorAll( '.field-required' )[0].value == 1 ) ? true : false );
|
1251 |
|
@@ -2285,6 +2341,7 @@
|
|
2285 |
wordChop: wp.ccf.utils.wordChop,
|
2286 |
isFieldDate: wp.ccf.utils.isFieldDate,
|
2287 |
isFieldName: wp.ccf.utils.isFieldName,
|
|
|
2288 |
isFieldAddress: wp.ccf.utils.isFieldAddress,
|
2289 |
isFieldEmailConfirm: wp.ccf.utils.isFieldEmailConfirm,
|
2290 |
getPrettyFieldDate: wp.ccf.utils.getPrettyFieldDate,
|
90 |
return false;
|
91 |
};
|
92 |
|
93 |
+
wp.ccf.utils.isFieldFile = function( value ) {
|
94 |
+
if ( typeof value.id !== 'undefined' && typeof value.url !== 'undefined' && typeof value.file_name !== 'undefined' ) {
|
95 |
+
return true;
|
96 |
+
}
|
97 |
+
|
98 |
+
return false;
|
99 |
+
};
|
100 |
+
|
101 |
wp.ccf.utils.getPrettyFieldEmailConfirm = function( value ) {
|
102 |
if ( value.email ) {
|
103 |
return value.email;
|
279 |
*/
|
280 |
var _modelDecode = function( excludeKeys ) {
|
281 |
for ( var key in this.attributes ) {
|
282 |
+
if ( _.indexOf( excludeKeys, key ) === -1 ) {
|
283 |
var value = this.get( key );
|
284 |
|
285 |
if ( typeof value === 'string' && value !== '' ) {
|
499 |
slug: '',
|
500 |
type: '',
|
501 |
required: false,
|
502 |
+
className: '',
|
503 |
+
description: ''
|
504 |
};
|
505 |
|
506 |
return _.defaults( defaults, this.constructor.__super__.defaults );
|
520 |
}
|
521 |
);
|
522 |
|
523 |
+
wp.ccf.models.Fields.file = wp.ccf.models.Fields.file || wp.ccf.models.StandardField.extend(
|
524 |
+
{
|
525 |
+
defaults: function() {
|
526 |
+
var defaults = {
|
527 |
+
type: 'file',
|
528 |
+
fileExtensions: '',
|
529 |
+
maxFileSize: ccfSettings.maxFileSize
|
530 |
+
};
|
531 |
+
|
532 |
+
return _.defaults( defaults, this.constructor.__super__.defaults() );
|
533 |
+
}
|
534 |
+
}
|
535 |
+
);
|
536 |
+
|
537 |
wp.ccf.models.Fields['paragraph-text'] = wp.ccf.models.Fields['paragraph-text'] || wp.ccf.models.StandardField.extend(
|
538 |
{
|
539 |
defaults: function() {
|
1014 |
|
1015 |
this.model.set( 'slug', this.el.querySelectorAll( '.field-slug' )[0].value );
|
1016 |
this.model.set( 'label', this.el.querySelectorAll( '.field-label' )[0].value );
|
1017 |
+
this.model.set( 'description', this.el.querySelectorAll( '.field-description' )[0].value );
|
1018 |
this.model.set( 'value', this.el.querySelectorAll( '.field-value' )[0].value );
|
1019 |
this.model.set( 'placeholder', this.el.querySelectorAll( '.field-placeholder' )[0].value );
|
1020 |
this.model.set( 'className', this.el.querySelectorAll( '.field-class-name' )[0].value );
|
1025 |
}
|
1026 |
);
|
1027 |
|
1028 |
+
wp.ccf.views.Fields.file = wp.ccf.views.Fields.file || wp.ccf.views.FieldBase.extend(
|
1029 |
+
{
|
1030 |
+
template: wp.ccf.utils.template( 'ccf-file-template' ),
|
1031 |
+
|
1032 |
+
initialize: function() {
|
1033 |
+
|
1034 |
+
},
|
1035 |
+
|
1036 |
+
saveField: function() {
|
1037 |
+
|
1038 |
+
this.model.set( 'slug', this.el.querySelectorAll( '.field-slug' )[0].value );
|
1039 |
+
this.model.set( 'label', this.el.querySelectorAll( '.field-label' )[0].value );
|
1040 |
+
this.model.set( 'description', this.el.querySelectorAll( '.field-description' )[0].value );
|
1041 |
+
this.model.set( 'className', this.el.querySelectorAll( '.field-class-name' )[0].value );
|
1042 |
+
this.model.set( 'required', ( this.el.querySelectorAll( '.field-required' )[0].value == 1 ) ? true : false );
|
1043 |
+
this.model.set( 'fileExtensions', this.el.querySelectorAll( '.field-file-extensions' )[0].value );
|
1044 |
+
this.model.set( 'maxFileSize', this.el.querySelectorAll( '.field-max-file-size' )[0].value );
|
1045 |
+
|
1046 |
+
return this;
|
1047 |
+
}
|
1048 |
+
}
|
1049 |
+
);
|
1050 |
+
|
1051 |
wp.ccf.views.Fields.recaptcha = wp.ccf.views.Fields.recaptcha || wp.ccf.views.FieldBase.extend(
|
1052 |
{
|
1053 |
template: wp.ccf.utils.template( 'ccf-recaptcha-template' ),
|
1058 |
|
1059 |
saveField: function() {
|
1060 |
this.model.set( 'label', this.el.querySelectorAll( '.field-label' )[0].value );
|
1061 |
+
this.model.set( 'description', this.el.querySelectorAll( '.field-description' )[0].value );
|
1062 |
this.model.set( 'siteKey', this.el.querySelectorAll( '.field-site-key' )[0].value );
|
1063 |
this.model.set( 'secretKey', this.el.querySelectorAll( '.field-secret-key' )[0].value );
|
1064 |
this.model.set( 'className', this.el.querySelectorAll( '.field-class-name' )[0].value );
|
1111 |
|
1112 |
this.model.set( 'slug', this.el.querySelectorAll( '.field-slug' )[0].value );
|
1113 |
this.model.set( 'label', this.el.querySelectorAll( '.field-label' )[0].value );
|
1114 |
+
this.model.set( 'description', this.el.querySelectorAll( '.field-description' )[0].value );
|
1115 |
this.model.set( 'value', this.el.querySelectorAll( '.field-value' )[0].value );
|
1116 |
this.model.set( 'placeholder', this.el.querySelectorAll( '.field-placeholder' )[0].value );
|
1117 |
this.model.set( 'className', this.el.querySelectorAll( '.field-class-name' )[0].value );
|
1145 |
|
1146 |
this.model.set( 'slug', this.el.querySelectorAll( '.field-slug' )[0].value );
|
1147 |
this.model.set( 'label', this.el.querySelectorAll( '.field-label' )[0].value );
|
1148 |
+
this.model.set( 'description', this.el.querySelectorAll( '.field-description' )[0].value );
|
1149 |
|
1150 |
var value = this.el.querySelectorAll( '.field-value' );
|
1151 |
if ( value.length > 0 ) {
|
1178 |
|
1179 |
this.model.set( 'slug', this.el.querySelectorAll( '.field-slug' )[0].value );
|
1180 |
this.model.set( 'label', this.el.querySelectorAll( '.field-label' )[0].value );
|
1181 |
+
this.model.set( 'description', this.el.querySelectorAll( '.field-description' )[0].value );
|
1182 |
this.model.set( 'className', this.el.querySelectorAll( '.field-class-name' )[0].value );
|
1183 |
this.model.set( 'required', ( this.el.querySelectorAll( '.field-required' )[0].value == 1 ) ? true : false );
|
1184 |
|
1195 |
|
1196 |
this.model.set( 'slug', this.el.querySelectorAll( '.field-slug' )[0].value );
|
1197 |
this.model.set( 'label', this.el.querySelectorAll( '.field-label' )[0].value );
|
1198 |
+
this.model.set( 'description', this.el.querySelectorAll( '.field-description' )[0].value );
|
1199 |
this.model.set( 'value', this.el.querySelectorAll( '.field-value' )[0].value );
|
1200 |
this.model.set( 'placeholder', this.el.querySelectorAll( '.field-placeholder' )[0].value );
|
1201 |
this.model.set( 'className', this.el.querySelectorAll( '.field-class-name' )[0].value );
|
1214 |
|
1215 |
this.model.set( 'slug', this.el.querySelectorAll( '.field-slug' )[0].value );
|
1216 |
this.model.set( 'label', this.el.querySelectorAll( '.field-label' )[0].value );
|
1217 |
+
this.model.set( 'description', this.el.querySelectorAll( '.field-description' )[0].value );
|
1218 |
this.model.set( 'value', this.el.querySelectorAll( '.field-value' )[0].value );
|
1219 |
this.model.set( 'placeholder', this.el.querySelectorAll( '.field-placeholder' )[0].value );
|
1220 |
this.model.set( 'phoneFormat', this.el.querySelectorAll( '.field-phone-format' )[0].value );
|
1234 |
|
1235 |
this.model.set( 'slug', this.el.querySelectorAll( '.field-slug' )[0].value );
|
1236 |
this.model.set( 'label', this.el.querySelectorAll( '.field-label' )[0].value );
|
1237 |
+
this.model.set( 'description', this.el.querySelectorAll( '.field-description' )[0].value );
|
1238 |
this.model.set( 'addressType', this.el.querySelectorAll( '.field-address-type' )[0].value );
|
1239 |
this.model.set( 'className', this.el.querySelectorAll( '.field-class-name' )[0].value );
|
1240 |
this.model.set( 'required', ( this.el.querySelectorAll( '.field-required' )[0].value == 1 ) ? true : false );
|
1252 |
|
1253 |
this.model.set( 'slug', this.el.querySelectorAll( '.field-slug' )[0].value );
|
1254 |
this.model.set( 'label', this.el.querySelectorAll( '.field-label' )[0].value );
|
1255 |
+
this.model.set( 'description', this.el.querySelectorAll( '.field-description' )[0].value );
|
1256 |
|
1257 |
var value = this.el.querySelectorAll( '.field-value' );
|
1258 |
if ( value.length ) {
|
1301 |
|
1302 |
this.model.set( 'slug', this.el.querySelectorAll( '.field-slug' )[0].value );
|
1303 |
this.model.set( 'label', this.el.querySelectorAll( '.field-label' )[0].value );
|
1304 |
+
this.model.set( 'description', this.el.querySelectorAll( '.field-description' )[0].value );
|
1305 |
this.model.set( 'className', this.el.querySelectorAll( '.field-class-name' )[0].value );
|
1306 |
this.model.set( 'required', ( this.el.querySelectorAll( '.field-required' )[0].value == 1 ) ? true : false );
|
1307 |
|
2341 |
wordChop: wp.ccf.utils.wordChop,
|
2342 |
isFieldDate: wp.ccf.utils.isFieldDate,
|
2343 |
isFieldName: wp.ccf.utils.isFieldName,
|
2344 |
+
isFieldFile: wp.ccf.utils.isFieldFile,
|
2345 |
isFieldAddress: wp.ccf.utils.isFieldAddress,
|
2346 |
isFieldEmailConfirm: wp.ccf.utils.isFieldEmailConfirm,
|
2347 |
getPrettyFieldDate: wp.ccf.utils.getPrettyFieldDate,
|
build/js/form-manager.min.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
(function(e,t,i,l){"use strict";window.wp=window.wp||{},wp.ccf=wp.ccf||{},wp.ccf.utils=wp.ccf.utils||{},wp.ccf.utils.cleanDateFields=function(e){delete e.date,delete e.date_gmt,delete e.modified,delete e.modified_gmt,delete e.date_tz,delete e.modified_tz},wp.ccf.utils.template=i.memoize(function(e){var t={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g};return i.template(document.getElementById(e).innerHTML,null,t)}),wp.ccf.utils.insertFormShortcode=function(e){var t=wp.ccf.forms.findWhere({ID:e.get("ID")});t||wp.ccf.forms.add(e);var i=tinymce.get(wpActiveEditor),l='[ccf_form id="'+e.get("ID")+'"]';i&&!i.isHidden()?tinymce.activeEditor.execCommand("mceInsertContent",!1,l):document.getElementById(wpActiveEditor).value+=l},wp.ccf.utils.getPrettyPostDate=function(e){return e=moment(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.isFieldEmailConfirm=function(e){return e.email!==void 0||e.confirm!==void 0?!0:!1},wp.ccf.utils.isFieldAddress=function(e){return e.street!==void 0&&e.city!==void 0&&e.zipcode!==void 0&&e.line_two!==void 0?!0:!1},wp.ccf.utils.getPrettyFieldEmailConfirm=function(e){return e.email?e.email:e.confirm?e.confirm:"-"},wp.ccf.utils.getPrettyFieldDate=function(e){var t="",i="";if(e.hour&&e.minute&&e["am-pm"]&&(t+=e.hour+":"+e.minute+" "+e["am-pm"]),e.date&&(t+=" "+e.date),!t)return"-";var s=moment(t);return s.isValid()?(e.hour&&e.minute&&e["am-pm"]&&(i+=s.format("h:mm a")),e.date&&(i&&(i+=" "),i+=s.format("M/D/YYYY")),i):l.invalidDate},wp.ccf.utils.getPrettyFieldName=function(e){var t=e.first;return t.length>0&&(t+=" "),e.last&&(t+=e.last),t||(t="-"),t},wp.ccf.utils.getPrettyFieldAddress=function(e){if(!e.street||!e.city)return"-";var t=e.street;return e.line_two&&(t+=" "+e.line_two),t+=", "+e.city,e.state&&(t+=", "+e.state),e.zipcode&&(t+=" "+e.zipcode),e.country&&(t+=" "+e.country),t}})(jQuery,Backbone,_,ccfSettings),function(e,t,i){"use strict";wp.ccf.mixins=wp.ccf.mixins||{},wp.ccf.mixins.subViewable=wp.ccf.mixins.subViewable||{subViews:{},initRenderSubViews:function(e,t,l){this.renderedSubViews||(this.renderedSubViews={});for(var s in this.subViews){var c={el:this.$el.find(".ccf-"+s),parent:this};l&&i.extend(c,l),this.renderedSubViews[s]&&this.renderedSubViews[s].destroy&&this.renderedSubViews[s].destroy(),(t||!this.renderedSubViews[s])&&(this.renderedSubViews[s]=new this.subViews[s](c)),this.renderedSubViews[s].render(),e&&(this.renderedSubViews[s].el.style.display="block")}return this},showView:function(e,t,i){if(this.renderedSubViews!==void 0&&this.renderedSubViews[e]!==void 0){var l=this.renderedSubViews[e];i||l.render(t),l.el.style.display="block",this.currentView=e;for(var s in this.subViews)s!==e&&(this.renderedSubViews[s].el.style.display="none")}}}}(jQuery,Backbone,_,ccfSettings),function(e,t,i,l,s){"use strict";wp.ccf.models=wp.ccf.models||{},wp.ccf.models.Fields=wp.ccf.models.Fields||{};var c=function(e,i,l){return"object"!=typeof i&&""===i&&(i=""),t.Model.prototype.set.call(this,e,i,l)},r=function(e){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 r.call(this,[])},set:c}),wp.ccf.models.Form=wp.ccf.models.Form||wp.api.models.Post.extend({urlRoot:s.root+"/ccf/forms",set:c,initialize:function(){this.on("sync",this.decode,this)},defaults:function(){var e={fields:new wp.ccf.collections.Fields,type:"ccf_form",status:"publish",description:"",buttonText:"Submit Form",completionActionType:"text",completionRedirectUrl:"",completionMessage:"",sendEmailNotifications:!1,emailNotificationAddresses:l.adminEmail,emailNotificationFromType:"default",emailNotificationFromAddress:"",emailNotificationFromField:""};return e=i.defaults(e,this.constructor.__super__.defaults),wp.ccf.utils.cleanDateFields(e),e},decode:function(){var e=i.keys(wp.api.models.Post.prototype.defaults);return e=i.without(e,"title"),r.call(this,e)},getFieldSlugs:function(e){var t=wp.ccf.currentForm.get("fields"),i=[];return t.each(function(t){e&&t.isImmutable||i.push(t.get("slug"))}),i},parse:function(e){var t=this;if(e.fields){var l=t.get("fields");if(l&&l.length>0){for(var s=0;e.fields.length>s;s++){var c=e.fields[s],r=l.findWhere({slug:c.slug});if(r){if(c.choices!==void 0){var n=t.get("choices");if(n&&n.length>0)for(var o=0;c.choices>o;o++){var a=n.at(o);a.set(c.choices[o]),a.decode()}delete e.fields[s].choices}r.set(c),r.decode()}}delete e.fields}else{var d=[];i.each(e.fields,function(e){var t=new wp.ccf.models.Fields[e.type](e);t.decode(),d.push(t)}),e.fields=new wp.ccf.collections.Fields(d,{formId:e.ID})}}return this.constructor.__super__.parse.call(this,e)},toJSON:function(){var e=this.constructor.__super__.toJSON.call(this);return e.fields&&(e.fields=e.fields.toJSON()),e.author&&(e.author=e.author.toJSON()),e}}),wp.ccf.models.Submission=wp.api.models.Submission||wp.api.models.Post.extend({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 r.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",placeholder:"http://"};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.phone=wp.ccf.models.Fields.phone||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"phone",phoneFormat:"us"};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.date=wp.ccf.models.Fields.date||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"date",showDate:!0,showTime:!0};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.name=wp.ccf.models.Fields.name||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"name"};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.recaptcha=wp.ccf.models.Fields.recaptcha||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"recaptcha",siteKey:"",secretKey:""};return i.defaults(e,this.constructor.__super__.defaults())},required:function(){return["siteKey","secretKey"]},isImmutable:!0}),wp.ccf.models.Fields.address=wp.ccf.models.Fields.address||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"address",addressType:"us"};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields["section-header"]=wp.ccf.models.Fields["section-header"]||wp.ccf.models.Field.extend({defaults:function(){var e={type:"section-header",slug:"",heading:"",subheading:"",className:""};return i.defaults(e,this.constructor.__super__.defaults)},required:function(){return[]},isImmutable:!0}),wp.ccf.models.Fields.html=wp.ccf.models.Fields.html||wp.ccf.models.Field.extend({defaults:function(){var e={type:"html",slug:"",html:"",className:""};return i.defaults(e,this.constructor.__super__.defaults)},required:function(){return[]},isImmutable:!0}),wp.ccf.models.ChoiceableField=wp.ccf.models.ChoiceableField||wp.ccf.models.StandardField.extend({defaults:function(){var e={choices:new wp.ccf.collections.FieldChoices};return i.defaults(e,this.constructor.__super__.defaults())},initialize:function(e){if("object"==typeof e&&e.choices){var t=[];i.each(e.choices,function(e){var i=new wp.ccf.models.FieldChoice(e);i.decode(),t.push(i)}),this.set("choices",new wp.ccf.collections.FieldChoices(t))}}}),wp.ccf.models.Fields.radio=wp.ccf.models.Fields.radio||wp.ccf.models.ChoiceableField.extend({defaults:function(){var e={type:"radio"};return i.defaults(e,this.constructor.__super__.defaults())},initialize:function(){return this.constructor.__super__.initialize.apply(this,arguments)}}),wp.ccf.models.Fields.checkboxes=wp.ccf.models.Fields.checkboxes||wp.ccf.models.ChoiceableField.extend({defaults:function(){var e={type:"checkboxes"};return i.defaults(e,this.constructor.__super__.defaults())},initialize:function(){return this.constructor.__super__.initialize.apply(this,arguments)}}),wp.ccf.models.Fields.dropdown=wp.ccf.models.Fields.dropdown||wp.ccf.models.ChoiceableField.extend({defaults:function(){var e={type:"dropdown"};return i.defaults(e,this.constructor.__super__.defaults())},initialize:function(){return this.constructor.__super__.initialize.apply(this,arguments)}})}(jQuery,Backbone,_,ccfSettings,WP_API_Settings),function(e,t,i){"use strict";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:wp.ccf.utils.template("ccf-field-choice-template"),className:"choice",events:{"click .add":"triggerAdd","click .delete":"triggerDelete","blur input":"saveChoice",saveChoice:"saveChoice",sorted:"triggerUpdateSort"},initialize:function(e){this.field=e.field},destroy:function(){wp.ccf.dispatcher.off("mainViewChange",this.saveChoice),this.unbind()},triggerUpdateSort:function(e,t){this.field.get("choices").remove(this.model,{silent:!0}),this.field.get("choices").add(this.model,{at:t,silent:!0})},saveChoice:function(){if(""!==this.el.innerHTML){var e=this.el.querySelectorAll(".choice-label")[0].value,t=this.el.querySelectorAll(".choice-value")[0].value;this.model.set("label",e),this.model.set("value",t);var i=this.el.querySelectorAll(".choice-selected")[0],l=i.checked?!0:!1;return this.model.set("selected",l),this}},render:function(){var e={};return this.model&&(e.choice=this.model.toJSON()),this.el.innerHTML=this.template(e),wp.ccf.dispatcher.on("mainViewChange",this.saveChoice,this),this},triggerAdd:function(){this.field.get("choices").add(new wp.ccf.models.FieldChoice)},triggerDelete:function(){var e=this.field.get("choices");if(e.length>1)e.remove(this.model),this.destroy(),this.remove();else{for(var t=this.el.querySelectorAll(".choice-label, .choice-value"),i=this.el.querySelectorAll(".choice-selected"),l=0;t.length>l;l++)t[l].value="";i[0].checked=!1}}}),wp.ccf.views.FieldBase=wp.ccf.views.FieldBase||t.View.extend({events:{"blur input":"saveField","blur input.field-slug":"checkSlug","blur textarea":"saveField","change select":"saveField",'change input[type="checkbox"]':"saveField"},checkSlug:function(){var e=this.el.querySelectorAll(".field-slug");if(e.length>0){var t=e[0],i=!1;t.parentNode.className=t.value&&!t.value.match(/^[a-zA-Z0-9\-_]+$/)?t.parentNode.className.replace(/ field-error/i,"")+" field-error":t.parentNode.className.replace(/ field-error/i,""),this.collection.length>0&&""!==t.value?(this.collection.each(function(e){e!==this.model&&t.value===e.get("slug")&&(i=!0)},this),t.parentNode.className=i?t.parentNode.className.replace(/ field-duplicate-slug/i,"")+" field-duplicate-slug":t.parentNode.className.replace(/ field-duplicate-slug/i,"")):t.parentNode.className=t.parentNode.className.replace(/ field-duplicate-slug/i,"")}},destroy:function(){this.unbind()},render:function(){return this.el.innerHTML=this.template({field:this.model.toJSON()}),this.checkSlug(),this}}),wp.ccf.views.Fields["single-line-text"]=wp.ccf.views.Fields["single-line-text"]||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-single-line-text-template"),initialize:function(){},saveField:function(){return this.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:wp.ccf.utils.template("ccf-recaptcha-template"),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:wp.ccf.utils.template("ccf-section-header-template"),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:wp.ccf.utils.template("ccf-html-template"),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:wp.ccf.utils.template("ccf-paragraph-text-template"),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:wp.ccf.utils.template("ccf-hidden-template"),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:wp.ccf.utils.template("ccf-date-template"),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:wp.ccf.utils.template("ccf-name-template"),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:wp.ccf.utils.template("ccf-website-template"),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:wp.ccf.utils.template("ccf-phone-template"),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:wp.ccf.utils.template("ccf-address-template"),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:wp.ccf.utils.template("ccf-email-template"),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:wp.ccf.utils.template("ccf-dropdown-template"),initialize:function(){var e=this.model.get("choices");this.listenTo(e,"add",this.addChoice)},addChoice:function(e){var t=new wp.ccf.views.FieldChoice({model:e,field:this.model}).render(),i=this.el.querySelectorAll(".repeatable-choices")[0];i.appendChild(t.el)},saveField:function(){this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1);var t=this.el.querySelectorAll(".repeatable-choices")[0].querySelectorAll(".choice");return i.each(t,function(t){e(t).trigger("saveChoice")}),this},render:function(){var t=this;t.el.innerHTML=t.template({field:t.model.toJSON()}),t.checkSlug();var i=t.model.get("choices"),l=this.el.querySelectorAll(".repeatable-choices")[0];if(i.length>=1)i.each(function(e){var i=new wp.ccf.views.FieldChoice({model:e,field:t.model}).render();l.appendChild(i.el)});else{var s=new wp.ccf.models.FieldChoice;i.add(s)}return l=this.el.querySelectorAll(".repeatable-choices")[0],e(l).sortable({handle:".move",axis:"y",stop:function(e,t){t.item.trigger("sorted",t.item.index())}}),t}}),wp.ccf.views.Fields.dropdown=wp.ccf.views.Fields.dropdown||wp.ccf.views.ChoiceableField.extend({template:wp.ccf.utils.template("ccf-dropdown-template"),events:function(){return this.constructor.__super__.events}}),wp.ccf.views.Fields.radio=wp.ccf.views.Fields.radio||wp.ccf.views.ChoiceableField.extend({template:wp.ccf.utils.template("ccf-radio-template"),events:function(){return this.constructor.__super__.events}}),wp.ccf.views.Fields.checkboxes=wp.ccf.views.Fields.checkboxes||wp.ccf.views.ChoiceableField.extend({template:wp.ccf.utils.template("ccf-checkboxes-template"),events:function(){return this.constructor.__super__.events}}),wp.ccf.views.FieldSidebar=wp.ccf.views.FieldSidebar||t.View.extend({initialize:function(e){this.currentFieldView=null,this.form=e.form},save:function(e){this.currentFieldView&&""!==this.currentFieldView.el.innerHTML&&this.currentFieldView.saveField(),e&&e instanceof Object&&e.resolve()},fieldRemoved:function(){this.currentFieldView&&(this.form.get("fields").get(this.currentFieldView.model)||this.render())},destroy:function(){wp.ccf.dispatcher.off("saveField",this.save),wp.ccf.dispatcher.off("mainViewChange",this.save),this.unbind()},render:function(e){var t={};if(e){var i=e.get("type");this.currentFieldView&&(this.currentFieldView.saveField(),this.currentFieldView.destroy&&this.currentFieldView.destroy()),this.currentFieldView=new wp.ccf.views.Fields[i]({model:e,collection:this.form.get("fields")}),this.currentFieldView.render(),this.el.innerHTML="",this.el.appendChild(this.currentFieldView.el);var l=this.form.get("fields");this.listenTo(l,"remove",this.fieldRemoved)}else{var s=wp.ccf.utils.template("ccf-empty-field-template");this.el.innerHTML=s(t)}return wp.ccf.dispatcher.on("saveField",this.save,this),wp.ccf.dispatcher.on("mainViewChange",this.save,this),this}}),wp.ccf.views.FieldRowPlaceholder=wp.ccf.views.FieldRowPlaceholder||t.View.extend({template:wp.ccf.utils.template("ccf-field-row-template"),tagName:"div",className:"field",initialize:function(e){this.type=e.type},render:function(){return this.el.innerHTML=this.template({label:l.allLabels[this.type]}),this.el.setAttribute("data-field-type",this.type),this.el.className+=" "+this.type,this}}),wp.ccf.views.FieldRow=wp.ccf.views.FieldRow||t.View.extend({template:wp.ccf.utils.template("ccf-field-row-template"),tagName:"div",className:"field",events:{"click .delete":"triggerDelete","click h4":"triggerEdit",sorted:"triggerUpdateSort"},initialize:function(e){i.bindAll(this,"triggerDelete"),this.form=e.form,this.listenTo(this.model,"change",this.handleChange,this),this.listenTo(this.model,"requirementsNotMet",this.requirementsNotMet,this),this.listenTo(this.model,"requirementsMet",this.requirementsMet,this),this.listenTo(this.model,"duplicateSlug",this.duplicateSlug,this),this.model.attributes.choices&&this.listenTo(this.model.attributes.choices,"change",this.handleChange,this)},duplicateSlug:function(){this.requirementsMet(),this.el.className+=" field-duplicate-slug"},requirementsNotMet:function(){this.requirementsMet(),this.el.className+=" field-incomplete"},requirementsMet:function(){this.el.className=this.el.className.replace(/(field-incomplete|field-duplicate-slug)/i,"")},triggerUpdateSort:function(e,t){this.form.get("fields").remove(this.model),this.form.get("fields").add(this.model,{at:t})},handleChange:function(){this.render()},triggerDelete:function(e){e.stopPropagation(),this.form.get("fields").remove(this.model),this.undelegateEvents(),this.remove()},triggerEdit:function(){var e=this.el.parentNode.querySelectorAll(".ccf-editing");i.each(e,function(e){e.className=e.className.replace(/ccf-editing/i,"")}),this.el.className=this.el.className.replace(/ccf-editing/i,"")+" ccf-editing",wp.ccf.dispatcher.trigger("openEditField",this.model)},render:function(e){this.el.innerHTML=this.template({label:l.allLabels[this.model.get("type")]}),this.el.setAttribute("data-field-type",this.model.get("type"));var t=RegExp(" "+this.model.get("type"),"i");this.el.className=this.el.className.replace(t,"")+" "+this.model.get("type"),e&&(this.el.className=this.el.className.replace(/ instantiated/i,"")+" instantiated");var i=document.getElementById("ccf-"+this.model.get("type")+"-preview-template");if(i){var s=this.el.querySelectorAll(".preview")[0];s.style.display="block",s.innerHTML=wp.ccf.utils.template("ccf-"+this.model.get("type")+"-preview-template")({field:this.model.toJSON()})}return this}}),wp.ccf.views.FormSettings=wp.ccf.views.FormSettings||t.View.extend({template:wp.ccf.utils.template("ccf-form-settings-template"),events:{"blur input":"save","change select":"save","change select.form-completion-action-type":"toggleCompletionFields","change select.form-send-email-notifications":"toggleNotificationFields"},initialize:function(e){this.model=e.form},destroy:function(){wp.ccf.dispatcher.off("saveFormSettings",this.save),wp.ccf.dispatcher.off("mainViewChange",this.save)},toggleCompletionFields:function(){var e=this.el.querySelectorAll(".form-completion-action-type")[0].value,t=this.el.querySelectorAll(".completion-message")[0],i=this.el.querySelectorAll(".completion-redirect-url")[0];"text"===e?(t.style.display="block",i.style.display="none"):(t.style.display="none",i.style.display="block")},save:function(e){if(""!==this.el.innerHTML){var t=this.el.querySelectorAll(".form-title")[0].value;this.model.set("title",t);var i=this.el.querySelectorAll(".form-description")[0].value;this.model.set("description",i);var l=this.el.querySelectorAll(".form-button-text")[0].value;this.model.set("buttonText",l);var s=this.el.querySelectorAll(".form-completion-message")[0].value;this.model.set("completionMessage",s);var c=this.el.querySelectorAll(".form-completion-redirect-url")[0].value;this.model.set("completionRedirectUrl",c);var r=this.el.querySelectorAll(".form-completion-action-type")[0].value;this.model.set("completionActionType",r),e!==void 0&&e.promise!==void 0&&e.resolve()}},render:function(){var e={form:this.model.toJSON()};return this.el.innerHTML=this.template(e),this.toggleCompletionFields(),wp.ccf.dispatcher.on("saveFormSettings",this.save,this),wp.ccf.dispatcher.on("mainViewChange",this.save,this),this}}),wp.ccf.views.FormNotifications=wp.ccf.views.FormNotifications||t.View.extend({template:wp.ccf.utils.template("ccf-form-notifications-template"),events:{"blur input":"save","change select":"save","change select.form-send-email-notifications":"toggleNotificationFields","change select.form-email-notification-from-type":"toggleNotificationFields"},initialize:function(e){this.model=e.form},destroy:function(){wp.ccf.dispatcher.off("saveFormNotifications",this.save),wp.ccf.dispatcher.off("mainViewChange",this.save),this.undelegateEvents(),this.unbind()},updateFromAddressFieldField:function(){var e=this.el.querySelectorAll(".form-email-notification-from-field")[0];e.innerHTML="",e.disabled=!1;var t=this.model.get("fields"),i=0,s=this.model.get("emailNotificationFromField");if(t.length>=1&&t.each(function(t){if("email"===t.get("type")){var l=document.createElement("option");l.innerHTML=t.get("slug"),l.value=t.get("slug"),t.get("slug")===s&&(l.selected=!0),e.appendChild(l),i++}}),0===i){var c=document.createElement("option");c.innerHTML=l.noEmailFields,e.appendChild(c),e.disabled=!0}},toggleNotificationFields:function(){var e,t=this.el.querySelectorAll(".form-send-email-notifications")[0].value,i=this.el.querySelectorAll(".email-notification-setting"),l=this.el.querySelectorAll(".email-notification-from-address")[0],s=this.el.querySelectorAll(".email-notification-from-field")[0],c=this.el.querySelectorAll(".form-email-notification-from-type")[0];if(parseInt(t)){for(e=0;i.length>e;e++)i[e].style.display="block";l.style.display="none",s.style.display="none","custom"===c.value?l.style.display="block":"field"===c.value&&(s.style.display="block")}else{for(e=0;i.length>e;e++)i[e].style.display="none";l.style.display="none",s.style.display="none"}},save:function(e){if(""!==this.el.innerHTML){var t=this.el.querySelectorAll(".form-send-email-notifications")[0].value;this.model.set("sendEmailNotifications",parseInt(t)?!0:!1);var i=this.el.querySelectorAll(".form-email-notification-addresses")[0].value;this.model.set("emailNotificationAddresses",i);var l=this.el.querySelectorAll(".form-email-notification-from-type")[0].value;this.model.set("emailNotificationFromType",l);var s=this.el.querySelectorAll(".form-email-notification-from-address")[0].value;this.model.set("emailNotificationFromAddress",s);var c=this.el.querySelectorAll(".form-email-notification-from-field")[0].value;this.model.set("emailNotificationFromField",c),e!==void 0&&e.promise!==void 0&&e.resolve()}},render:function(){var e={form:this.model.toJSON()},t=this.model.get("fields");return this.el.innerHTML=this.template(e),this.toggleNotificationFields(),this.updateFromAddressFieldField(),wp.ccf.dispatcher.on("saveFormNotifications",this.save,this),wp.ccf.dispatcher.on("mainViewChange",this.save,this),this.listenTo(t,"add",this.updateFromAddressFieldField,this),this.listenTo(t,"remove",this.updateFromAddressFieldField,this),this
|
2 |
-
}}),wp.ccf.views.FormPane=wp.ccf.views.FormPane||t.View.extend(i.defaults({template:wp.ccf.utils.template("ccf-form-pane-template"),subViews:{"field-sidebar":wp.ccf.views.FieldSidebar,"form-settings":wp.ccf.views.FormSettings,"form-notifications":wp.ccf.views.FormNotifications},events:{"click .save-button":"sync","click 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(),r=e.Deferred();wp.ccf.dispatcher.trigger("saveFormSettings",s),wp.ccf.dispatcher.trigger("saveFormNotifications",r),wp.ccf.dispatcher.trigger("saveField",c),e.when(s,c,r).then(function(){var e=t.model.get("fields"),s=!0,c={};e.each(function(e){var t=e.get("slug");e.hasRequiredAttributes()?t&&!t.match(/^[a-zA-Z0-9\-_]+$/)?(s=!1,e.trigger("requirementsNotMet")):c[e.get("slug")]!==void 0?(s=!1,e.trigger("duplicateSlug"),c[e.get("slug")].trigger("duplicateSlug")):e.trigger("requirementsMet"):(s=!1,e.trigger("requirementsNotMet")),e.get("slug")&&(c[e.get("slug")]=e)}),s?t.model.save({},{context:"edit"}).done(function(){l.single&&!l.postId&&(window.location=l.adminUrl+"post.php?post="+t.model.get("ID")+"&action=edit#ccf-form/"+t.model.get("ID"))}).complete(function(){i.fadeOut(),t.enable(),wp.ccf.dispatcher.trigger("saveFormComplete",t.model)}):(t.enable(),i.fadeOut())})},enableDisableInsert:function(){var e=this.el.querySelectorAll(".insert-form-button")[0];this.model.get("ID")?e.removeAttribute("disabled"):e.setAttribute("disabled","disabled")},getNextFieldOrd:function(){var e=this.model.get("fields"),t=e.length+1;return e.each(function(e){var i=e.get("slug"),l=/\-([0-9]+)$/g,s=l.exec(i);if(s&&s[1]){var c=parseInt(s[1]);c>=t&&(t=c+1)}}),t},render:function(t){var s=this;s.model=t?t:new wp.ccf.models.Form,this.listenTo(s.model,"change",this.enableDisableInsert,this);var c={labels:l.fieldLabels,form:s.model.toJSON()};window.form=s.model,s.el.innerHTML=this.template(c);var r=s.el.querySelectorAll(".fields")[0];i.each(l.fieldLabels,function(e,t){r.appendChild(new wp.ccf.views.FieldRowPlaceholder({type:t}).render().el)});var n=s.el.querySelectorAll(".structure-fields")[0];i.each(l.structureFieldLabels,function(e,t){n.appendChild(new wp.ccf.views.FieldRowPlaceholder({type:t}).render().el)});var o=s.el.querySelectorAll(".special-fields")[0];i.each(l.specialFieldLabels,function(e,t){o.appendChild(new wp.ccf.views.FieldRowPlaceholder({type:t}).render().el)}),e(s.el.querySelectorAll(".left-sidebar")[0].querySelectorAll(".field")).draggable({cursor:"move",zIndex:160001,scroll:!1,containment:".ccf-form-pane",appendTo:".ccf-main-modal",snap:!0,connectToSortable:".form-content",helper:function(t){var i=e(t.currentTarget),l=e('<div class="field" data-field-type="'+i.attr("data-field-type")+'"><h4>'+i.find(".label").html()+"</h4></div>");return l.css({width:i.width(),height:i.height()})}});var a=s.model.get("fields"),d=s.el.querySelectorAll(".form-content")[0];return a.length>=1&&(d.innerHTML="",a.each(function(e){var t=new wp.ccf.views.FieldRow({model:e,form:s.model}).render(!0).el;d.appendChild(t)})),e(d).sortable({axis:"y",handle:"h4",stop:function(e,t){if(!t.item.hasClass("instantiated")){var i=t.item.attr("data-field-type"),l={};wp.ccf.models.Fields[i].prototype.defaults().slug!==void 0&&(l.slug=i+"-"+s.getNextFieldOrd());var c=new wp.ccf.models.Fields[i](l),r=s.model.get("fields");r.add(c),new wp.ccf.views.FieldRow({model:c,el:t.item,form:s.model}).render(!0),t.item.attr("style","")}t.item.trigger("sorted",t.item.index())}}),s.initRenderSubViews(!0,!0,{form:s.model}),s.enableDisableInsert(),s}},wp.ccf.mixins.subViewable)),wp.ccf.views.ExistingFormTableRow=wp.ccf.views.ExistingFormTableRow||t.View.extend({tagName:"tr",template:wp.ccf.utils.template("ccf-existing-form-table-row-template"),events:{"click .edit":"triggerMainViewChange","click .delete":"triggerDelete","click .insert-form-button":"insertForm"},initialize:function(e){this.parent=e.parent},insertForm:function(){wp.ccf.utils.insertFormShortcode(this.model),wp.ccf.toggle()},triggerMainViewChange:function(){wp.ccf.switchToForm(this.model)},triggerDelete:function(){var e,t=this,i=t.parent.collection.state.currentPage;t.model.destroy().done(function(){e=i,e===t.parent.collection.state.totalPages&&e-1===(t.parent.collection.state.totalObjects-1)/l.postsPerPage&&e--,t.parent.showPage(e).done(function(){t.parent.renderPagination()})})},render:function(){return this.$el.html(this.template({form:this.model.toJSON(),utils:{getPrettyPostDate:wp.ccf.utils.getPrettyPostDate}})),this}}),wp.ccf.views.EmptyFormTableRow=wp.ccf.views.EmptyFormTableRow||t.View.extend({tagName:"tr",template:wp.ccf.utils.template("ccf-empty-form-table-row-template"),render:function(){return this.$el.html(this.template()),this}}),wp.ccf.views.ExistingFormTable=wp.ccf.views.ExistingFormTable||t.View.extend({template:wp.ccf.utils.template("ccf-existing-form-table-template"),initialize:function(){this.parent=arguments.parent,this.collection=new wp.ccf.collections.Forms,wp.ccf.dispatcher.on("changeFormTablePage",this.showPage,this),wp.ccf.dispatcher.on("saveFormComplete",this.render,this)},showPage:function(e){var t=this,i=this.collection.fetch({data:{page:e}});return i.done(function(){var e=t.el.querySelectorAll(".rows")[0],i=document.createElement("tbody");i.className="rows",t.collection.length>=1?t.collection.each(function(e){var l=new wp.ccf.views.ExistingFormTableRow({model:e,parent:t}).render();i.appendChild(l.el)},t):i.appendChild((new wp.ccf.views.EmptyFormTableRow).render().el),e.parentNode.replaceChild(i,e)}),i},renderPagination:function(){var e=this.el.querySelectorAll(".ccf-pagination")[0];e.innerHTML="",this.collection.state.totalPages>1&&e.appendChild(new wp.ccf.views.Pagination({parent:this}).render(this.collection.state.totalPages,this.collection.state.currentPage).el)},render:function(){var e=this;return this.el.innerHTML=this.template(),this.el.querySelectorAll(".ccf-pagination")[0],this.showPage(1).done(function(){e.renderPagination()}),this}}),wp.ccf.views.ExistingFormPane=wp.ccf.views.ExistingFormPane||t.View.extend(i.defaults({template:wp.ccf.utils.template("ccf-existing-form-pane-template"),subViews:{"existing-form-table":wp.ccf.views.ExistingFormTable},render:function(){return this.rendered?this:(this.rendered=!0,this.el.innerHTML=this.template(),this.initRenderSubViews(!0),this)}},wp.ccf.mixins.subViewable)),wp.ccf.views.MainModal=wp.ccf.views.MainModal||t.View.extend(i.defaults({tagName:"div",className:"ccf-main-modal",template:wp.ccf.utils.template("ccf-main-modal-template"),events:{"click .close-icon":"hide","click .main-menu a":"menuClick"},subViews:{"form-pane":wp.ccf.views.FormPane},initialize:function(){l.single||(this.subViews["existing-form-pane"]=wp.ccf.views.ExistingFormPane),wp.ccf.dispatcher.on("mainViewChange",this.toggleView,this)},toggleView:function(e){this.showView(e,wp.ccf.currentForm);var t=e;"form-pane"===e&&wp.ccf.currentForm&&(t="existing-form-pane");var l=this.el.querySelectorAll(".menu-item");i.each(l,function(e){var i=e.getAttribute("data-view");e.className=i===t?e.className.replace("selected","")+" selected":e.className.replace("selected","")})},menuClick:function(e){var t=e.target.getAttribute("data-view");"form-pane"===t&&(wp.ccf.currentForm=null),wp.ccf.dispatcher.trigger("mainViewChange",t),e.preventDefault()},render:function(e){return e=e||!1,this.overlay(),this.el.innerHTML=this.template({single:e}),this.initRenderSubViews(),this.showView("form-pane",wp.ccf.currentForm,!0),this},overlay:function(){return this.overlayEl===void 0&&(this.overlayEl=document.createElement("div"),this.overlayEl.className="ccf-main-modal-overlay",document.body.appendChild(this.overlayEl)),this.overlayEl},remove:function(){return document.body.removeChild(this.overlay()),this},show:function(){e(this.overlay()).show(),this.$el.show()},hide:function(){e(this.overlay()).hide(),this.$el.hide()}},wp.ccf.mixins.subViewable)),wp.ccf.views.SubmissionRow=wp.ccf.views.SubmissionRow||t.View.extend({tagName:"tr",template:wp.ccf.utils.template("ccf-submission-row-template"),events:{"click .view":"view","click .delete":"delete"},initialize:function(e){this.parent=e.parent},"delete":function(){var e,t=this,i=t.parent.collection.state.currentPage;t.model.destroy().done(function(){e=i,e===t.parent.collection.state.totalPages&&e-1===(t.parent.collection.state.totalObjects-1)/l.postsPerPage&&e--,t.parent.showPage(e).done(function(){t.parent.renderPagination()})})},view:function(e){var t=e.currentTarget.getAttribute("data-submission-id"),i=e.currentTarget.getAttribute("data-submission-date");tb_show(l.thickboxTitle+" - "+wp.ccf.utils.getPrettyPostDate(i),"#TB_inline?height=500&width=700&inlineId=ccf-submission-content-"+parseInt(t),null)},render:function(){return this.$el.html(this.template({submission:this.model.toJSON(),currentColumns:this.parent.columns,columns:wp.ccf.currentForm.getFieldSlugs(!0),utils:{getPrettyPostDate:wp.ccf.utils.getPrettyPostDate,wordChop:wp.ccf.utils.wordChop,isFieldDate:wp.ccf.utils.isFieldDate,isFieldName:wp.ccf.utils.isFieldName,isFieldAddress:wp.ccf.utils.isFieldAddress,isFieldEmailConfirm:wp.ccf.utils.isFieldEmailConfirm,getPrettyFieldDate:wp.ccf.utils.getPrettyFieldDate,getPrettyFieldAddress:wp.ccf.utils.getPrettyFieldAddress,getPrettyFieldName:wp.ccf.utils.getPrettyFieldName,getPrettyFieldEmailConfirm:wp.ccf.utils.getPrettyFieldEmailConfirm}})),this}}),wp.ccf.views.SubmissionsTable=wp.ccf.views.SubmissionsTable||t.View.extend({template:wp.ccf.utils.template("ccf-submission-table-template"),events:{"click .prev:not(.disabled)":"previousPage","click .next:not(.disabled)":"nextPage","click .first:not(.disabled)":"firstPage","click .last:not(.disabled)":"lastPage"},initialize:function(){this.collection=new wp.ccf.collections.Submissions({},{formId:l.postId}),wp.ccf.dispatcher.on("submissionTableRebuild",this.render,this)},showPage:function(e){var t=this,i=this.collection.fetch({data:{page:e}});return i.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:wp.ccf.utils.template("ccf-pagination-template"),events:{"click .prev:not(.disabled)":"previousPage","click .next:not(.disabled)":"nextPage","click .first:not(.disabled)":"firstPage","click .last:not(.disabled)":"lastPage"},initialize:function(e){this.parent=e.parent},previousPage:function(){var e=this;e.parent.showPage(e.parent.collection.state.currentPage-1).done(function(){e.render()})},nextPage:function(){var e=this;e.parent.showPage(e.parent.collection.state.currentPage+1).done(function(){e.render()})},firstPage:function(){var e=this;e.parent.showPage(1).done(function(){e.render()})},lastPage:function(){var e=this;e.parent.showPage(e.parent.collection.state.totalPages).done(function(){e.render()})},render:function(){return this.el.innerHTML=this.template({totalPages:this.parent.collection.state.totalPages,currentPage:this.parent.collection.state.currentPage,totalObjects:this.parent.collection.state.totalObjects}),this}}),wp.ccf.views.EmptySubmissionTableRow=wp.ccf.views.EmptySubmissionTableRow||t.View.extend({tagName:"tr",template:wp.ccf.utils.template("ccf-no-submissions-row-template"),initialize:function(e){this.parent=e.parent},render:function(){return this.el.innerHTML=this.template({columns:this.parent.columns}),this}}),wp.ccf.views.SubmissionColumnController=wp.ccf.views.SubmissionColumnController||t.View.extend({template:wp.ccf.utils.template("ccf-submissions-controller-template"),events:{"click input[type=checkbox]":"triggerTableRebuild"},render:function(){this.el.innerHTML=this.template({columns:wp.ccf.currentForm.getFieldSlugs(!0).concat("date")})},triggerTableRebuild:function(){var e=[],t=document.querySelectorAll(".submission-column-checkbox");if(t.length>=1)for(var i=0;t.length>i;i++)t[i].checked&&e.push(t[i].value);wp.ccf.dispatcher.trigger("submissionTableRebuild",e)}})}(jQuery,Backbone,_,ccfSettings),function(e,t){"use strict";wp.ccf.router=wp.ccf.router||t.Router.extend({routes:{"ccf-form":"open","ccf-form/:formId":"open"},open:function(e){wp.ccf.show(e)}})}(jQuery,Backbone,_,ccfSettings),function(e,t,i,l){"use strict";wp.ccf=i.defaults(wp.ccf,{forms:new wp.ccf.collections.Forms,currentForm:null,_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,c=document.querySelectorAll(".ccf-open-form-manager")[0];if(!c)return!1;i.extend(this.dispatcher,t.Events),new wp.ccf.router;var r=!1;if(l.single)if(r=!0,l.postId){var n=parseInt(l.postId);if(s.forms.formsFetching[n]===void 0){var o=new wp.ccf.models.Form({ID:n}),a=o.fetch();s.forms.formsFetching[n]=a,s._currentFormDeferred=a,a.done(function(){delete s.forms.formsFetching[n],s.forms.add(o),s.currentForm=o})}else s._currentFormDeferred=s.forms.formsFetching[n],s._currentFormDeferred.done(function(){s.currentForm=s.forms.findWhere({ID:n})});e.when(s._currentFormDeferred).then(function(){s._setupMainModal(!0),c.style.display="inline-block";var e=document.getElementById("ccf-submissions");if(e){var t=e.querySelectorAll(".inside")[0],i=document.createElement("div");i.className="ccf-submission-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),c.style.display="inline-block";else s._setupMainModal();var d=function(e){e=e||window.event;var t=e.currentTarget?e.currentTarget:e.srcElement,i=t.getAttribute("data-form-id");wp.ccf.toggle(i)};c.addEventListener?c.addEventListener("click",d,!1):c.attachEvent("onclick",d)}}),wp.ccf.createManager()}(jQuery,Backbone,_,ccfSettings);
|
1 |
+
(function(e,t,i,l){"use strict";window.wp=window.wp||{},wp.ccf=wp.ccf||{},wp.ccf.utils=wp.ccf.utils||{},wp.ccf.utils.cleanDateFields=function(e){delete e.date,delete e.date_gmt,delete e.modified,delete e.modified_gmt,delete e.date_tz,delete e.modified_tz},wp.ccf.utils.template=i.memoize(function(e){var t={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g};return i.template(document.getElementById(e).innerHTML,null,t)}),wp.ccf.utils.insertFormShortcode=function(e){var t=wp.ccf.forms.findWhere({ID:e.get("ID")});t||wp.ccf.forms.add(e);var i=tinymce.get(wpActiveEditor),l='[ccf_form id="'+e.get("ID")+'"]';i&&!i.isHidden()?tinymce.activeEditor.execCommand("mceInsertContent",!1,l):document.getElementById(wpActiveEditor).value+=l},wp.ccf.utils.getPrettyPostDate=function(e){return e=moment(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.isFieldEmailConfirm=function(e){return e.email!==void 0||e.confirm!==void 0?!0:!1},wp.ccf.utils.isFieldAddress=function(e){return e.street!==void 0&&e.city!==void 0&&e.zipcode!==void 0&&e.line_two!==void 0?!0:!1},wp.ccf.utils.isFieldFile=function(e){return e.id!==void 0&&e.url!==void 0&&e.file_name!==void 0?!0:!1},wp.ccf.utils.getPrettyFieldEmailConfirm=function(e){return e.email?e.email:e.confirm?e.confirm:"-"},wp.ccf.utils.getPrettyFieldDate=function(e){var t="",i="";if(e.hour&&e.minute&&e["am-pm"]&&(t+=e.hour+":"+e.minute+" "+e["am-pm"]),e.date&&(t+=" "+e.date),!t)return"-";var s=moment(t);return s.isValid()?(e.hour&&e.minute&&e["am-pm"]&&(i+=s.format("h:mm a")),e.date&&(i&&(i+=" "),i+=s.format("M/D/YYYY")),i):l.invalidDate},wp.ccf.utils.getPrettyFieldName=function(e){var t=e.first;return t.length>0&&(t+=" "),e.last&&(t+=e.last),t||(t="-"),t},wp.ccf.utils.getPrettyFieldAddress=function(e){if(!e.street||!e.city)return"-";var t=e.street;return e.line_two&&(t+=" "+e.line_two),t+=", "+e.city,e.state&&(t+=", "+e.state),e.zipcode&&(t+=" "+e.zipcode),e.country&&(t+=" "+e.country),t}})(jQuery,Backbone,_,ccfSettings),function(e,t,i){"use strict";wp.ccf.mixins=wp.ccf.mixins||{},wp.ccf.mixins.subViewable=wp.ccf.mixins.subViewable||{subViews:{},initRenderSubViews:function(e,t,l){this.renderedSubViews||(this.renderedSubViews={});for(var s in this.subViews){var c={el:this.$el.find(".ccf-"+s),parent:this};l&&i.extend(c,l),this.renderedSubViews[s]&&this.renderedSubViews[s].destroy&&this.renderedSubViews[s].destroy(),(t||!this.renderedSubViews[s])&&(this.renderedSubViews[s]=new this.subViews[s](c)),this.renderedSubViews[s].render(),e&&(this.renderedSubViews[s].el.style.display="block")}return this},showView:function(e,t,i){if(this.renderedSubViews!==void 0&&this.renderedSubViews[e]!==void 0){var l=this.renderedSubViews[e];i||l.render(t),l.el.style.display="block",this.currentView=e;for(var s in this.subViews)s!==e&&(this.renderedSubViews[s].el.style.display="none")}}}}(jQuery,Backbone,_,ccfSettings),function(e,t,i,l,s){"use strict";wp.ccf.models=wp.ccf.models||{},wp.ccf.models.Fields=wp.ccf.models.Fields||{};var c=function(e,i,l){return"object"!=typeof i&&""===i&&(i=""),t.Model.prototype.set.call(this,e,i,l)},r=function(e){for(var t in this.attributes)if(-1===i.indexOf(e,t)){var l=this.get(t);"string"==typeof l&&""!==l&&(l=(l+"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/“/g,"”").replace(/”/g,"”").replace(/‘/g,"‘").replace(/'/g,"'"),this.set(t,l))}return this};wp.ccf.models.FieldChoice=wp.ccf.models.FieldChoice||t.Model.extend({defaults:{label:"",value:"",selected:!1},decode:function(){return r.call(this,[])},set:c}),wp.ccf.models.Form=wp.ccf.models.Form||wp.api.models.Post.extend({urlRoot:s.root+"/ccf/forms",set:c,initialize:function(){this.on("sync",this.decode,this)},defaults:function(){var e={fields:new wp.ccf.collections.Fields,type:"ccf_form",status:"publish",description:"",buttonText:"Submit Form",completionActionType:"text",completionRedirectUrl:"",completionMessage:"",sendEmailNotifications:!1,emailNotificationAddresses:l.adminEmail,emailNotificationFromType:"default",emailNotificationFromAddress:"",emailNotificationFromField:""};return e=i.defaults(e,this.constructor.__super__.defaults),wp.ccf.utils.cleanDateFields(e),e},decode:function(){var e=i.keys(wp.api.models.Post.prototype.defaults);return e=i.without(e,"title"),r.call(this,e)},getFieldSlugs:function(e){var t=wp.ccf.currentForm.get("fields"),i=[];return t.each(function(t){e&&t.isImmutable||i.push(t.get("slug"))}),i},parse:function(e){var t=this;if(e.fields){var l=t.get("fields");if(l&&l.length>0){for(var s=0;e.fields.length>s;s++){var c=e.fields[s],r=l.findWhere({slug:c.slug});if(r){if(c.choices!==void 0){var n=t.get("choices");if(n&&n.length>0)for(var o=0;c.choices>o;o++){var a=n.at(o);a.set(c.choices[o]),a.decode()}delete e.fields[s].choices}r.set(c),r.decode()}}delete e.fields}else{var d=[];i.each(e.fields,function(e){var t=new wp.ccf.models.Fields[e.type](e);t.decode(),d.push(t)}),e.fields=new wp.ccf.collections.Fields(d,{formId:e.ID})}}return this.constructor.__super__.parse.call(this,e)},toJSON:function(){var e=this.constructor.__super__.toJSON.call(this);return e.fields&&(e.fields=e.fields.toJSON()),e.author&&(e.author=e.author.toJSON()),e}}),wp.ccf.models.Submission=wp.api.models.Submission||wp.api.models.Post.extend({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 r.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:"",description:""};return i.defaults(e,this.constructor.__super__.defaults)}}),wp.ccf.models.Fields["single-line-text"]=wp.ccf.models.Fields["single-line-text"]||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"single-line-text"};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.file=wp.ccf.models.Fields.file||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"file",fileExtensions:"",maxFileSize:l.maxFileSize};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields["paragraph-text"]=wp.ccf.models.Fields["paragraph-text"]||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"paragraph-text"};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.hidden=wp.ccf.models.Fields.hidden||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"hidden"};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.email=wp.ccf.models.Fields.email||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"email",emailConfirmation:!1};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.website=wp.ccf.models.Fields.website||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"website",placeholder:"http://"};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.phone=wp.ccf.models.Fields.phone||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"phone",phoneFormat:"us"};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.date=wp.ccf.models.Fields.date||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"date",showDate:!0,showTime:!0};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.name=wp.ccf.models.Fields.name||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"name"};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.recaptcha=wp.ccf.models.Fields.recaptcha||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"recaptcha",siteKey:"",secretKey:""};return i.defaults(e,this.constructor.__super__.defaults())},required:function(){return["siteKey","secretKey"]},isImmutable:!0}),wp.ccf.models.Fields.address=wp.ccf.models.Fields.address||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"address",addressType:"us"};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields["section-header"]=wp.ccf.models.Fields["section-header"]||wp.ccf.models.Field.extend({defaults:function(){var e={type:"section-header",slug:"",heading:"",subheading:"",className:""};return i.defaults(e,this.constructor.__super__.defaults)},required:function(){return[]},isImmutable:!0}),wp.ccf.models.Fields.html=wp.ccf.models.Fields.html||wp.ccf.models.Field.extend({defaults:function(){var e={type:"html",slug:"",html:"",className:""};return i.defaults(e,this.constructor.__super__.defaults)},required:function(){return[]},isImmutable:!0}),wp.ccf.models.ChoiceableField=wp.ccf.models.ChoiceableField||wp.ccf.models.StandardField.extend({defaults:function(){var e={choices:new wp.ccf.collections.FieldChoices};return i.defaults(e,this.constructor.__super__.defaults())},initialize:function(e){if("object"==typeof e&&e.choices){var t=[];i.each(e.choices,function(e){var i=new wp.ccf.models.FieldChoice(e);i.decode(),t.push(i)}),this.set("choices",new wp.ccf.collections.FieldChoices(t))}}}),wp.ccf.models.Fields.radio=wp.ccf.models.Fields.radio||wp.ccf.models.ChoiceableField.extend({defaults:function(){var e={type:"radio"};return i.defaults(e,this.constructor.__super__.defaults())},initialize:function(){return this.constructor.__super__.initialize.apply(this,arguments)}}),wp.ccf.models.Fields.checkboxes=wp.ccf.models.Fields.checkboxes||wp.ccf.models.ChoiceableField.extend({defaults:function(){var e={type:"checkboxes"};return i.defaults(e,this.constructor.__super__.defaults())},initialize:function(){return this.constructor.__super__.initialize.apply(this,arguments)}}),wp.ccf.models.Fields.dropdown=wp.ccf.models.Fields.dropdown||wp.ccf.models.ChoiceableField.extend({defaults:function(){var e={type:"dropdown"};return i.defaults(e,this.constructor.__super__.defaults())},initialize:function(){return this.constructor.__super__.initialize.apply(this,arguments)}})}(jQuery,Backbone,_,ccfSettings,WP_API_Settings),function(e,t,i){"use strict";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:wp.ccf.utils.template("ccf-field-choice-template"),className:"choice",events:{"click .add":"triggerAdd","click .delete":"triggerDelete","blur input":"saveChoice",saveChoice:"saveChoice",sorted:"triggerUpdateSort"},initialize:function(e){this.field=e.field},destroy:function(){wp.ccf.dispatcher.off("mainViewChange",this.saveChoice),this.unbind()},triggerUpdateSort:function(e,t){this.field.get("choices").remove(this.model,{silent:!0}),this.field.get("choices").add(this.model,{at:t,silent:!0})},saveChoice:function(){if(""!==this.el.innerHTML){var e=this.el.querySelectorAll(".choice-label")[0].value,t=this.el.querySelectorAll(".choice-value")[0].value;this.model.set("label",e),this.model.set("value",t);var i=this.el.querySelectorAll(".choice-selected")[0],l=i.checked?!0:!1;return this.model.set("selected",l),this}},render:function(){var e={};return this.model&&(e.choice=this.model.toJSON()),this.el.innerHTML=this.template(e),wp.ccf.dispatcher.on("mainViewChange",this.saveChoice,this),this},triggerAdd:function(){this.field.get("choices").add(new wp.ccf.models.FieldChoice)},triggerDelete:function(){var e=this.field.get("choices");if(e.length>1)e.remove(this.model),this.destroy(),this.remove();else{for(var t=this.el.querySelectorAll(".choice-label, .choice-value"),i=this.el.querySelectorAll(".choice-selected"),l=0;t.length>l;l++)t[l].value="";i[0].checked=!1}}}),wp.ccf.views.FieldBase=wp.ccf.views.FieldBase||t.View.extend({events:{"blur input":"saveField","blur input.field-slug":"checkSlug","blur textarea":"saveField","change select":"saveField",'change input[type="checkbox"]':"saveField"},checkSlug:function(){var e=this.el.querySelectorAll(".field-slug");if(e.length>0){var t=e[0],i=!1;t.parentNode.className=t.value&&!t.value.match(/^[a-zA-Z0-9\-_]+$/)?t.parentNode.className.replace(/ field-error/i,"")+" field-error":t.parentNode.className.replace(/ field-error/i,""),this.collection.length>0&&""!==t.value?(this.collection.each(function(e){e!==this.model&&t.value===e.get("slug")&&(i=!0)},this),t.parentNode.className=i?t.parentNode.className.replace(/ field-duplicate-slug/i,"")+" field-duplicate-slug":t.parentNode.className.replace(/ field-duplicate-slug/i,"")):t.parentNode.className=t.parentNode.className.replace(/ field-duplicate-slug/i,"")}},destroy:function(){this.unbind()},render:function(){return this.el.innerHTML=this.template({field:this.model.toJSON()}),this.checkSlug(),this}}),wp.ccf.views.Fields["single-line-text"]=wp.ccf.views.Fields["single-line-text"]||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-single-line-text-template"),initialize:function(){},saveField:function(){return this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("description",this.el.querySelectorAll(".field-description")[0].value),this.model.set("value",this.el.querySelectorAll(".field-value")[0].value),this.model.set("placeholder",this.el.querySelectorAll(".field-placeholder")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1),this}}),wp.ccf.views.Fields.file=wp.ccf.views.Fields.file||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-file-template"),initialize:function(){},saveField:function(){return this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("description",this.el.querySelectorAll(".field-description")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1),this.model.set("fileExtensions",this.el.querySelectorAll(".field-file-extensions")[0].value),this.model.set("maxFileSize",this.el.querySelectorAll(".field-max-file-size")[0].value),this}}),wp.ccf.views.Fields.recaptcha=wp.ccf.views.Fields.recaptcha||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-recaptcha-template"),initialize:function(){},saveField:function(){return this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("description",this.el.querySelectorAll(".field-description")[0].value),this.model.set("siteKey",this.el.querySelectorAll(".field-site-key")[0].value),this.model.set("secretKey",this.el.querySelectorAll(".field-secret-key")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this}}),wp.ccf.views.Fields["section-header"]=wp.ccf.views.Fields["section-header"]||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-section-header-template"),initialize:function(){},saveField:function(){return this.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:wp.ccf.utils.template("ccf-html-template"),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:wp.ccf.utils.template("ccf-paragraph-text-template"),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("description",this.el.querySelectorAll(".field-description")[0].value),this.model.set("value",this.el.querySelectorAll(".field-value")[0].value),this.model.set("placeholder",this.el.querySelectorAll(".field-placeholder")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1),this}}),wp.ccf.views.Fields.hidden=wp.ccf.views.Fields.hidden||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-hidden-template"),saveField:function(){return this.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:wp.ccf.utils.template("ccf-date-template"),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("description",this.el.querySelectorAll(".field-description")[0].value);var e=this.el.querySelectorAll(".field-value");e.length>0&&this.model.set("value",e[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("showDate",this.el.querySelectorAll(".field-show-date")[0].checked?!0:!1);var t=this.model.get("showTime"),i=this.el.querySelectorAll(".field-show-time")[0].checked?!0:!1;return this.model.set("showTime",i),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1),i!=t&&this.render(),this}}),wp.ccf.views.Fields.name=wp.ccf.views.Fields.name||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-name-template"),saveField:function(){return this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("description",this.el.querySelectorAll(".field-description")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1),this}}),wp.ccf.views.Fields.website=wp.ccf.views.Fields.website||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-website-template"),saveField:function(){return this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("description",this.el.querySelectorAll(".field-description")[0].value),this.model.set("value",this.el.querySelectorAll(".field-value")[0].value),this.model.set("placeholder",this.el.querySelectorAll(".field-placeholder")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1),this}}),wp.ccf.views.Fields.phone=wp.ccf.views.Fields.phone||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-phone-template"),saveField:function(){return this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("description",this.el.querySelectorAll(".field-description")[0].value),this.model.set("value",this.el.querySelectorAll(".field-value")[0].value),this.model.set("placeholder",this.el.querySelectorAll(".field-placeholder")[0].value),this.model.set("phoneFormat",this.el.querySelectorAll(".field-phone-format")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1),this}}),wp.ccf.views.Fields.address=wp.ccf.views.Fields.address||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-address-template"),saveField:function(){return this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("description",this.el.querySelectorAll(".field-description")[0].value),this.model.set("addressType",this.el.querySelectorAll(".field-address-type")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1),this}}),wp.ccf.views.Fields.email=wp.ccf.views.Fields.email||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-email-template"),saveField:function(){this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("description",this.el.querySelectorAll(".field-description")[0].value);var e=this.el.querySelectorAll(".field-value");e.length&&this.model.set("value",e[0].value);var t=this.el.querySelectorAll(".field-placeholder");t.length&&this.model.set("placeholder",t[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1);var i=1==this.el.querySelectorAll(".field-email-confirmation")[0].value?!0:!1,l=this.model.get("emailConfirmation");return this.model.set("emailConfirmation",i),l!=i&&this.render(),this}}),wp.ccf.views.ChoiceableField=wp.ccf.views.ChoiceableField||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-dropdown-template"),initialize:function(){var e=this.model.get("choices");this.listenTo(e,"add",this.addChoice)},addChoice:function(e){var t=new wp.ccf.views.FieldChoice({model:e,field:this.model}).render(),i=this.el.querySelectorAll(".repeatable-choices")[0];i.appendChild(t.el)},saveField:function(){this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("description",this.el.querySelectorAll(".field-description")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1);var t=this.el.querySelectorAll(".repeatable-choices")[0].querySelectorAll(".choice");return i.each(t,function(t){e(t).trigger("saveChoice")}),this},render:function(){var t=this;t.el.innerHTML=t.template({field:t.model.toJSON()}),t.checkSlug();var i=t.model.get("choices"),l=this.el.querySelectorAll(".repeatable-choices")[0];if(i.length>=1)i.each(function(e){var i=new wp.ccf.views.FieldChoice({model:e,field:t.model}).render();l.appendChild(i.el)});else{var s=new wp.ccf.models.FieldChoice;i.add(s)}return l=this.el.querySelectorAll(".repeatable-choices")[0],e(l).sortable({handle:".move",axis:"y",stop:function(e,t){t.item.trigger("sorted",t.item.index())}}),t}}),wp.ccf.views.Fields.dropdown=wp.ccf.views.Fields.dropdown||wp.ccf.views.ChoiceableField.extend({template:wp.ccf.utils.template("ccf-dropdown-template"),events:function(){return this.constructor.__super__.events}}),wp.ccf.views.Fields.radio=wp.ccf.views.Fields.radio||wp.ccf.views.ChoiceableField.extend({template:wp.ccf.utils.template("ccf-radio-template"),events:function(){return this.constructor.__super__.events}}),wp.ccf.views.Fields.checkboxes=wp.ccf.views.Fields.checkboxes||wp.ccf.views.ChoiceableField.extend({template:wp.ccf.utils.template("ccf-checkboxes-template"),events:function(){return this.constructor.__super__.events}}),wp.ccf.views.FieldSidebar=wp.ccf.views.FieldSidebar||t.View.extend({initialize:function(e){this.currentFieldView=null,this.form=e.form},save:function(e){this.currentFieldView&&""!==this.currentFieldView.el.innerHTML&&this.currentFieldView.saveField(),e&&e instanceof Object&&e.resolve()},fieldRemoved:function(){this.currentFieldView&&(this.form.get("fields").get(this.currentFieldView.model)||this.render())},destroy:function(){wp.ccf.dispatcher.off("saveField",this.save),wp.ccf.dispatcher.off("mainViewChange",this.save),this.unbind()},render:function(e){var t={};if(e){var i=e.get("type");this.currentFieldView&&(this.currentFieldView.saveField(),this.currentFieldView.destroy&&this.currentFieldView.destroy()),this.currentFieldView=new wp.ccf.views.Fields[i]({model:e,collection:this.form.get("fields")}),this.currentFieldView.render(),this.el.innerHTML="",this.el.appendChild(this.currentFieldView.el);var l=this.form.get("fields");this.listenTo(l,"remove",this.fieldRemoved)}else{var s=wp.ccf.utils.template("ccf-empty-field-template");this.el.innerHTML=s(t)}return wp.ccf.dispatcher.on("saveField",this.save,this),wp.ccf.dispatcher.on("mainViewChange",this.save,this),this}}),wp.ccf.views.FieldRowPlaceholder=wp.ccf.views.FieldRowPlaceholder||t.View.extend({template:wp.ccf.utils.template("ccf-field-row-template"),tagName:"div",className:"field",initialize:function(e){this.type=e.type},render:function(){return this.el.innerHTML=this.template({label:l.allLabels[this.type]}),this.el.setAttribute("data-field-type",this.type),this.el.className+=" "+this.type,this}}),wp.ccf.views.FieldRow=wp.ccf.views.FieldRow||t.View.extend({template:wp.ccf.utils.template("ccf-field-row-template"),tagName:"div",className:"field",events:{"click .delete":"triggerDelete","click h4":"triggerEdit",sorted:"triggerUpdateSort"},initialize:function(e){i.bindAll(this,"triggerDelete"),this.form=e.form,this.listenTo(this.model,"change",this.handleChange,this),this.listenTo(this.model,"requirementsNotMet",this.requirementsNotMet,this),this.listenTo(this.model,"requirementsMet",this.requirementsMet,this),this.listenTo(this.model,"duplicateSlug",this.duplicateSlug,this),this.model.attributes.choices&&this.listenTo(this.model.attributes.choices,"change",this.handleChange,this)},duplicateSlug:function(){this.requirementsMet(),this.el.className+=" field-duplicate-slug"},requirementsNotMet:function(){this.requirementsMet(),this.el.className+=" field-incomplete"},requirementsMet:function(){this.el.className=this.el.className.replace(/(field-incomplete|field-duplicate-slug)/i,"")},triggerUpdateSort:function(e,t){this.form.get("fields").remove(this.model),this.form.get("fields").add(this.model,{at:t})},handleChange:function(){this.render()},triggerDelete:function(e){e.stopPropagation(),this.form.get("fields").remove(this.model),this.undelegateEvents(),this.remove()},triggerEdit:function(){var e=this.el.parentNode.querySelectorAll(".ccf-editing");i.each(e,function(e){e.className=e.className.replace(/ccf-editing/i,"")}),this.el.className=this.el.className.replace(/ccf-editing/i,"")+" ccf-editing",wp.ccf.dispatcher.trigger("openEditField",this.model)},render:function(e){this.el.innerHTML=this.template({label:l.allLabels[this.model.get("type")]}),this.el.setAttribute("data-field-type",this.model.get("type"));var t=RegExp(" "+this.model.get("type"),"i");this.el.className=this.el.className.replace(t,"")+" "+this.model.get("type"),e&&(this.el.className=this.el.className.replace(/ instantiated/i,"")+" instantiated");var i=document.getElementById("ccf-"+this.model.get("type")+"-preview-template");if(i){var s=this.el.querySelectorAll(".preview")[0];s.style.display="block",s.innerHTML=wp.ccf.utils.template("ccf-"+this.model.get("type")+"-preview-template")({field:this.model.toJSON()})}return this}}),wp.ccf.views.FormSettings=wp.ccf.views.FormSettings||t.View.extend({template:wp.ccf.utils.template("ccf-form-settings-template"),events:{"blur input":"save","change select":"save","change select.form-completion-action-type":"toggleCompletionFields","change select.form-send-email-notifications":"toggleNotificationFields"},initialize:function(e){this.model=e.form},destroy:function(){wp.ccf.dispatcher.off("saveFormSettings",this.save),wp.ccf.dispatcher.off("mainViewChange",this.save)},toggleCompletionFields:function(){var e=this.el.querySelectorAll(".form-completion-action-type")[0].value,t=this.el.querySelectorAll(".completion-message")[0],i=this.el.querySelectorAll(".completion-redirect-url")[0];"text"===e?(t.style.display="block",i.style.display="none"):(t.style.display="none",i.style.display="block")},save:function(e){if(""!==this.el.innerHTML){var t=this.el.querySelectorAll(".form-title")[0].value;this.model.set("title",t);var i=this.el.querySelectorAll(".form-description")[0].value;this.model.set("description",i);var l=this.el.querySelectorAll(".form-button-text")[0].value;this.model.set("buttonText",l);var s=this.el.querySelectorAll(".form-completion-message")[0].value;this.model.set("completionMessage",s);var c=this.el.querySelectorAll(".form-completion-redirect-url")[0].value;this.model.set("completionRedirectUrl",c);var r=this.el.querySelectorAll(".form-completion-action-type")[0].value;this.model.set("completionActionType",r),e!==void 0&&e.promise!==void 0&&e.resolve()}},render:function(){var e={form:this.model.toJSON()};return this.el.innerHTML=this.template(e),this.toggleCompletionFields(),wp.ccf.dispatcher.on("saveFormSettings",this.save,this),wp.ccf.dispatcher.on("mainViewChange",this.save,this),this}}),wp.ccf.views.FormNotifications=wp.ccf.views.FormNotifications||t.View.extend({template:wp.ccf.utils.template("ccf-form-notifications-template"),events:{"blur input":"save","change select":"save","change select.form-send-email-notifications":"toggleNotificationFields","change select.form-email-notification-from-type":"toggleNotificationFields"},initialize:function(e){this.model=e.form},destroy:function(){wp.ccf.dispatcher.off("saveFormNotifications",this.save),wp.ccf.dispatcher.off("mainViewChange",this.save),this.undelegateEvents(),this.unbind()},updateFromAddressFieldField:function(){var e=this.el.querySelectorAll(".form-email-notification-from-field")[0];e.innerHTML="",e.disabled=!1;var t=this.model.get("fields"),i=0,s=this.model.get("emailNotificationFromField");if(t.length>=1&&t.each(function(t){if("email"===t.get("type")){var l=document.createElement("option");
|
2 |
+
l.innerHTML=t.get("slug"),l.value=t.get("slug"),t.get("slug")===s&&(l.selected=!0),e.appendChild(l),i++}}),0===i){var c=document.createElement("option");c.innerHTML=l.noEmailFields,e.appendChild(c),e.disabled=!0}},toggleNotificationFields:function(){var e,t=this.el.querySelectorAll(".form-send-email-notifications")[0].value,i=this.el.querySelectorAll(".email-notification-setting"),l=this.el.querySelectorAll(".email-notification-from-address")[0],s=this.el.querySelectorAll(".email-notification-from-field")[0],c=this.el.querySelectorAll(".form-email-notification-from-type")[0];if(parseInt(t)){for(e=0;i.length>e;e++)i[e].style.display="block";l.style.display="none",s.style.display="none","custom"===c.value?l.style.display="block":"field"===c.value&&(s.style.display="block")}else{for(e=0;i.length>e;e++)i[e].style.display="none";l.style.display="none",s.style.display="none"}},save:function(e){if(""!==this.el.innerHTML){var t=this.el.querySelectorAll(".form-send-email-notifications")[0].value;this.model.set("sendEmailNotifications",parseInt(t)?!0:!1);var i=this.el.querySelectorAll(".form-email-notification-addresses")[0].value;this.model.set("emailNotificationAddresses",i);var l=this.el.querySelectorAll(".form-email-notification-from-type")[0].value;this.model.set("emailNotificationFromType",l);var s=this.el.querySelectorAll(".form-email-notification-from-address")[0].value;this.model.set("emailNotificationFromAddress",s);var c=this.el.querySelectorAll(".form-email-notification-from-field")[0].value;this.model.set("emailNotificationFromField",c),e!==void 0&&e.promise!==void 0&&e.resolve()}},render:function(){var e={form:this.model.toJSON()},t=this.model.get("fields");return this.el.innerHTML=this.template(e),this.toggleNotificationFields(),this.updateFromAddressFieldField(),wp.ccf.dispatcher.on("saveFormNotifications",this.save,this),wp.ccf.dispatcher.on("mainViewChange",this.save,this),this.listenTo(t,"add",this.updateFromAddressFieldField,this),this.listenTo(t,"remove",this.updateFromAddressFieldField,this),this}}),wp.ccf.views.FormPane=wp.ccf.views.FormPane||t.View.extend(i.defaults({template:wp.ccf.utils.template("ccf-form-pane-template"),subViews:{"field-sidebar":wp.ccf.views.FieldSidebar,"form-settings":wp.ccf.views.FormSettings,"form-notifications":wp.ccf.views.FormNotifications},events:{"click .save-button":"sync","click 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(),r=e.Deferred();wp.ccf.dispatcher.trigger("saveFormSettings",s),wp.ccf.dispatcher.trigger("saveFormNotifications",r),wp.ccf.dispatcher.trigger("saveField",c),e.when(s,c,r).then(function(){var e=t.model.get("fields"),s=!0,c={};e.each(function(e){var t=e.get("slug");e.hasRequiredAttributes()?t&&!t.match(/^[a-zA-Z0-9\-_]+$/)?(s=!1,e.trigger("requirementsNotMet")):c[e.get("slug")]!==void 0?(s=!1,e.trigger("duplicateSlug"),c[e.get("slug")].trigger("duplicateSlug")):e.trigger("requirementsMet"):(s=!1,e.trigger("requirementsNotMet")),e.get("slug")&&(c[e.get("slug")]=e)}),s?t.model.save({},{context:"edit"}).done(function(){l.single&&!l.postId&&(window.location=l.adminUrl+"post.php?post="+t.model.get("ID")+"&action=edit#ccf-form/"+t.model.get("ID"))}).complete(function(){i.fadeOut(),t.enable(),wp.ccf.dispatcher.trigger("saveFormComplete",t.model)}):(t.enable(),i.fadeOut())})},enableDisableInsert:function(){var e=this.el.querySelectorAll(".insert-form-button")[0];this.model.get("ID")?e.removeAttribute("disabled"):e.setAttribute("disabled","disabled")},getNextFieldOrd:function(){var e=this.model.get("fields"),t=e.length+1;return e.each(function(e){var i=e.get("slug"),l=/\-([0-9]+)$/g,s=l.exec(i);if(s&&s[1]){var c=parseInt(s[1]);c>=t&&(t=c+1)}}),t},render:function(t){var s=this;s.model=t?t:new wp.ccf.models.Form,this.listenTo(s.model,"change",this.enableDisableInsert,this);var c={labels:l.fieldLabels,form:s.model.toJSON()};window.form=s.model,s.el.innerHTML=this.template(c);var r=s.el.querySelectorAll(".fields")[0];i.each(l.fieldLabels,function(e,t){r.appendChild(new wp.ccf.views.FieldRowPlaceholder({type:t}).render().el)});var n=s.el.querySelectorAll(".structure-fields")[0];i.each(l.structureFieldLabels,function(e,t){n.appendChild(new wp.ccf.views.FieldRowPlaceholder({type:t}).render().el)});var o=s.el.querySelectorAll(".special-fields")[0];i.each(l.specialFieldLabels,function(e,t){o.appendChild(new wp.ccf.views.FieldRowPlaceholder({type:t}).render().el)}),e(s.el.querySelectorAll(".left-sidebar")[0].querySelectorAll(".field")).draggable({cursor:"move",zIndex:160001,scroll:!1,containment:".ccf-form-pane",appendTo:".ccf-main-modal",snap:!0,connectToSortable:".form-content",helper:function(t){var i=e(t.currentTarget),l=e('<div class="field" data-field-type="'+i.attr("data-field-type")+'"><h4>'+i.find(".label").html()+"</h4></div>");return l.css({width:i.width(),height:i.height()})}});var a=s.model.get("fields"),d=s.el.querySelectorAll(".form-content")[0];return a.length>=1&&(d.innerHTML="",a.each(function(e){var t=new wp.ccf.views.FieldRow({model:e,form:s.model}).render(!0).el;d.appendChild(t)})),e(d).sortable({axis:"y",handle:"h4",stop:function(e,t){if(!t.item.hasClass("instantiated")){var i=t.item.attr("data-field-type"),l={};wp.ccf.models.Fields[i].prototype.defaults().slug!==void 0&&(l.slug=i+"-"+s.getNextFieldOrd());var c=new wp.ccf.models.Fields[i](l),r=s.model.get("fields");r.add(c),new wp.ccf.views.FieldRow({model:c,el:t.item,form:s.model}).render(!0),t.item.attr("style","")}t.item.trigger("sorted",t.item.index())}}),s.initRenderSubViews(!0,!0,{form:s.model}),s.enableDisableInsert(),s}},wp.ccf.mixins.subViewable)),wp.ccf.views.ExistingFormTableRow=wp.ccf.views.ExistingFormTableRow||t.View.extend({tagName:"tr",template:wp.ccf.utils.template("ccf-existing-form-table-row-template"),events:{"click .edit":"triggerMainViewChange","click .delete":"triggerDelete","click .insert-form-button":"insertForm"},initialize:function(e){this.parent=e.parent},insertForm:function(){wp.ccf.utils.insertFormShortcode(this.model),wp.ccf.toggle()},triggerMainViewChange:function(){wp.ccf.switchToForm(this.model)},triggerDelete:function(){var e,t=this,i=t.parent.collection.state.currentPage;t.model.destroy().done(function(){e=i,e===t.parent.collection.state.totalPages&&e-1===(t.parent.collection.state.totalObjects-1)/l.postsPerPage&&e--,t.parent.showPage(e).done(function(){t.parent.renderPagination()})})},render:function(){return this.$el.html(this.template({form:this.model.toJSON(),utils:{getPrettyPostDate:wp.ccf.utils.getPrettyPostDate}})),this}}),wp.ccf.views.EmptyFormTableRow=wp.ccf.views.EmptyFormTableRow||t.View.extend({tagName:"tr",template:wp.ccf.utils.template("ccf-empty-form-table-row-template"),render:function(){return this.$el.html(this.template()),this}}),wp.ccf.views.ExistingFormTable=wp.ccf.views.ExistingFormTable||t.View.extend({template:wp.ccf.utils.template("ccf-existing-form-table-template"),initialize:function(){this.parent=arguments.parent,this.collection=new wp.ccf.collections.Forms,wp.ccf.dispatcher.on("changeFormTablePage",this.showPage,this),wp.ccf.dispatcher.on("saveFormComplete",this.render,this)},showPage:function(e){var t=this,i=this.collection.fetch({data:{page:e}});return i.done(function(){var e=t.el.querySelectorAll(".rows")[0],i=document.createElement("tbody");i.className="rows",t.collection.length>=1?t.collection.each(function(e){var l=new wp.ccf.views.ExistingFormTableRow({model:e,parent:t}).render();i.appendChild(l.el)},t):i.appendChild((new wp.ccf.views.EmptyFormTableRow).render().el),e.parentNode.replaceChild(i,e)}),i},renderPagination:function(){var e=this.el.querySelectorAll(".ccf-pagination")[0];e.innerHTML="",this.collection.state.totalPages>1&&e.appendChild(new wp.ccf.views.Pagination({parent:this}).render(this.collection.state.totalPages,this.collection.state.currentPage).el)},render:function(){var e=this;return this.el.innerHTML=this.template(),this.el.querySelectorAll(".ccf-pagination")[0],this.showPage(1).done(function(){e.renderPagination()}),this}}),wp.ccf.views.ExistingFormPane=wp.ccf.views.ExistingFormPane||t.View.extend(i.defaults({template:wp.ccf.utils.template("ccf-existing-form-pane-template"),subViews:{"existing-form-table":wp.ccf.views.ExistingFormTable},render:function(){return this.rendered?this:(this.rendered=!0,this.el.innerHTML=this.template(),this.initRenderSubViews(!0),this)}},wp.ccf.mixins.subViewable)),wp.ccf.views.MainModal=wp.ccf.views.MainModal||t.View.extend(i.defaults({tagName:"div",className:"ccf-main-modal",template:wp.ccf.utils.template("ccf-main-modal-template"),events:{"click .close-icon":"hide","click .main-menu a":"menuClick"},subViews:{"form-pane":wp.ccf.views.FormPane},initialize:function(){l.single||(this.subViews["existing-form-pane"]=wp.ccf.views.ExistingFormPane),wp.ccf.dispatcher.on("mainViewChange",this.toggleView,this)},toggleView:function(e){this.showView(e,wp.ccf.currentForm);var t=e;"form-pane"===e&&wp.ccf.currentForm&&(t="existing-form-pane");var l=this.el.querySelectorAll(".menu-item");i.each(l,function(e){var i=e.getAttribute("data-view");e.className=i===t?e.className.replace("selected","")+" selected":e.className.replace("selected","")})},menuClick:function(e){var t=e.target.getAttribute("data-view");"form-pane"===t&&(wp.ccf.currentForm=null),wp.ccf.dispatcher.trigger("mainViewChange",t),e.preventDefault()},render:function(e){return e=e||!1,this.overlay(),this.el.innerHTML=this.template({single:e}),this.initRenderSubViews(),this.showView("form-pane",wp.ccf.currentForm,!0),this},overlay:function(){return this.overlayEl===void 0&&(this.overlayEl=document.createElement("div"),this.overlayEl.className="ccf-main-modal-overlay",document.body.appendChild(this.overlayEl)),this.overlayEl},remove:function(){return document.body.removeChild(this.overlay()),this},show:function(){e(this.overlay()).show(),this.$el.show()},hide:function(){e(this.overlay()).hide(),this.$el.hide()}},wp.ccf.mixins.subViewable)),wp.ccf.views.SubmissionRow=wp.ccf.views.SubmissionRow||t.View.extend({tagName:"tr",template:wp.ccf.utils.template("ccf-submission-row-template"),events:{"click .view":"view","click .delete":"delete"},initialize:function(e){this.parent=e.parent},"delete":function(){var e,t=this,i=t.parent.collection.state.currentPage;t.model.destroy().done(function(){e=i,e===t.parent.collection.state.totalPages&&e-1===(t.parent.collection.state.totalObjects-1)/l.postsPerPage&&e--,t.parent.showPage(e).done(function(){t.parent.renderPagination()})})},view:function(e){var t=e.currentTarget.getAttribute("data-submission-id"),i=e.currentTarget.getAttribute("data-submission-date");tb_show(l.thickboxTitle+" - "+wp.ccf.utils.getPrettyPostDate(i),"#TB_inline?height=500&width=700&inlineId=ccf-submission-content-"+parseInt(t),null)},render:function(){return this.$el.html(this.template({submission:this.model.toJSON(),currentColumns:this.parent.columns,columns:wp.ccf.currentForm.getFieldSlugs(!0),utils:{getPrettyPostDate:wp.ccf.utils.getPrettyPostDate,wordChop:wp.ccf.utils.wordChop,isFieldDate:wp.ccf.utils.isFieldDate,isFieldName:wp.ccf.utils.isFieldName,isFieldFile:wp.ccf.utils.isFieldFile,isFieldAddress:wp.ccf.utils.isFieldAddress,isFieldEmailConfirm:wp.ccf.utils.isFieldEmailConfirm,getPrettyFieldDate:wp.ccf.utils.getPrettyFieldDate,getPrettyFieldAddress:wp.ccf.utils.getPrettyFieldAddress,getPrettyFieldName:wp.ccf.utils.getPrettyFieldName,getPrettyFieldEmailConfirm:wp.ccf.utils.getPrettyFieldEmailConfirm}})),this}}),wp.ccf.views.SubmissionsTable=wp.ccf.views.SubmissionsTable||t.View.extend({template:wp.ccf.utils.template("ccf-submission-table-template"),events:{"click .prev:not(.disabled)":"previousPage","click .next:not(.disabled)":"nextPage","click .first:not(.disabled)":"firstPage","click .last:not(.disabled)":"lastPage"},initialize:function(){this.collection=new wp.ccf.collections.Submissions({},{formId:l.postId}),wp.ccf.dispatcher.on("submissionTableRebuild",this.render,this)},showPage:function(e){var t=this,i=this.collection.fetch({data:{page:e}});return i.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:wp.ccf.utils.template("ccf-pagination-template"),events:{"click .prev:not(.disabled)":"previousPage","click .next:not(.disabled)":"nextPage","click .first:not(.disabled)":"firstPage","click .last:not(.disabled)":"lastPage"},initialize:function(e){this.parent=e.parent},previousPage:function(){var e=this;e.parent.showPage(e.parent.collection.state.currentPage-1).done(function(){e.render()})},nextPage:function(){var e=this;e.parent.showPage(e.parent.collection.state.currentPage+1).done(function(){e.render()})},firstPage:function(){var e=this;e.parent.showPage(1).done(function(){e.render()})},lastPage:function(){var e=this;e.parent.showPage(e.parent.collection.state.totalPages).done(function(){e.render()})},render:function(){return this.el.innerHTML=this.template({totalPages:this.parent.collection.state.totalPages,currentPage:this.parent.collection.state.currentPage,totalObjects:this.parent.collection.state.totalObjects}),this}}),wp.ccf.views.EmptySubmissionTableRow=wp.ccf.views.EmptySubmissionTableRow||t.View.extend({tagName:"tr",template:wp.ccf.utils.template("ccf-no-submissions-row-template"),initialize:function(e){this.parent=e.parent},render:function(){return this.el.innerHTML=this.template({columns:this.parent.columns}),this}}),wp.ccf.views.SubmissionColumnController=wp.ccf.views.SubmissionColumnController||t.View.extend({template:wp.ccf.utils.template("ccf-submissions-controller-template"),events:{"click input[type=checkbox]":"triggerTableRebuild"},render:function(){this.el.innerHTML=this.template({columns:wp.ccf.currentForm.getFieldSlugs(!0).concat("date")})},triggerTableRebuild:function(){var e=[],t=document.querySelectorAll(".submission-column-checkbox");if(t.length>=1)for(var i=0;t.length>i;i++)t[i].checked&&e.push(t[i].value);wp.ccf.dispatcher.trigger("submissionTableRebuild",e)}})}(jQuery,Backbone,_,ccfSettings),function(e,t){"use strict";wp.ccf.router=wp.ccf.router||t.Router.extend({routes:{"ccf-form":"open","ccf-form/:formId":"open"},open:function(e){wp.ccf.show(e)}})}(jQuery,Backbone,_,ccfSettings),function(e,t,i,l){"use strict";wp.ccf=i.defaults(wp.ccf,{forms:new wp.ccf.collections.Forms,currentForm:null,_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,c=document.querySelectorAll(".ccf-open-form-manager")[0];if(!c)return!1;i.extend(this.dispatcher,t.Events),new wp.ccf.router;var r=!1;if(l.single)if(r=!0,l.postId){var n=parseInt(l.postId);if(s.forms.formsFetching[n]===void 0){var o=new wp.ccf.models.Form({ID:n}),a=o.fetch();s.forms.formsFetching[n]=a,s._currentFormDeferred=a,a.done(function(){delete s.forms.formsFetching[n],s.forms.add(o),s.currentForm=o})}else s._currentFormDeferred=s.forms.formsFetching[n],s._currentFormDeferred.done(function(){s.currentForm=s.forms.findWhere({ID:n})});e.when(s._currentFormDeferred).then(function(){s._setupMainModal(!0),c.style.display="inline-block";var e=document.getElementById("ccf-submissions");if(e){var t=e.querySelectorAll(".inside")[0],i=document.createElement("div");i.className="ccf-submission-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),c.style.display="inline-block";else s._setupMainModal();var d=function(e){e=e||window.event;var t=e.currentTarget?e.currentTarget:e.srcElement,i=t.getAttribute("data-form-id");wp.ccf.toggle(i)};c.addEventListener?c.addEventListener("click",d,!1):c.attachEvent("onclick",d)}}),wp.ccf.createManager()}(jQuery,Backbone,_,ccfSettings);
|
build/js/form.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
(function(e,t){"use strict";window.wp=window.wp||{},wp.ccf=wp.ccf||{},wp.ccf.validators=wp.ccf.validators||{};var i={};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
|
1 |
+
(function(e,t){"use strict";window.wp=window.wp||{},wp.ccf=wp.ccf||{},wp.ccf.validators=wp.ccf.validators||{};var i={},l={};window.ccfRecaptchaOnload=function(){for(var e=document.querySelectorAll(".ccf-recaptcha-wrapper"),l=function(l){grecaptcha.render(e[s],{sitekey:e[s].getAttribute("data-sitekey"),theme:t.recaptcha_theme,callback:function(){i[l]=!0}})},s=0;e.length>s;s++){var r=e[s].getAttribute("data-form-id");l(r)}};var s=function(e){if(this.wrapper=e,this.errors={},e.className.match(" field-required")){this.inputs=this.wrapper.querySelectorAll(".field-input");var i=this.wrapper.querySelectorAll(".error");i.length&&i[0].parentNode.removeChild(i[0]);var l=!1;if(_.each(this.inputs,function(e){(e.checked&&e.value||e.selected)&&(l=!0)}),!l){this.errors[this.inputs[this.inputs.length-1].getAttribute("name")]={required:!0};var s=document.createElement("div");s.className="error required-error",s.innerHTML=t.required,e.appendChild(s)}}},r=function(e,i){return function(l){this.wrapper=l,this.inputs=this.wrapper.querySelectorAll(".field-input"),this.errors={};for(var s=this.wrapper.querySelectorAll(".error"),r=s.length-1;r>=0;r--)s[r].parentNode.removeChild(s[r]);_.each(this.inputs,function(t){var i=t.getAttribute("name");this.errors[i]={},t.getAttribute("aria-required")&&""===t.value&&(this.errors[i].required=t),e&&e.call(this,t)},this),i&&i.call(this);var c;for(var o in this.errors)if(this.errors.hasOwnProperty(o))for(var n in this.errors[o])c=document.createElement("div"),c.className="error "+n+"-error",c.setAttribute("data-field-name",o),c.innerHTML=t[n],this.errors[o][n].parentNode.insertBefore(c,this.errors[o][n].nextSibling)}};wp.ccf.validators["single-line-text"]=wp.ccf.validators["single-line-text"]||r(),wp.ccf.validators["paragraph-text"]=wp.ccf.validators["paragraph-text"]||r(),wp.ccf.validators.name=wp.ccf.validators.name||r(),wp.ccf.validators.email=wp.ccf.validators.email||r(!1,function(){var e=this.inputs[0].value;if(e){2===this.inputs.length&&e!==this.inputs[1].value&&(this.errors[this.inputs[0].getAttribute("name")].match=this.wrapper.lastChild);var t=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;t.test(e)||(this.errors[this.inputs[0].getAttribute("name")].email=this.wrapper.lastChild)}}),wp.ccf.validators.recaptcha=wp.ccf.validators.recaptcha||function(e,l){this.wrapper=e,this.inputs=this.wrapper.querySelectorAll(".g-recaptcha-response"),this.errors={};for(var s=this.wrapper.querySelectorAll(".error"),r=s.length-1;r>=0;r--)s[r].parentNode.removeChild(s[r]);i[l]||(this.errors["g-recaptcha-response"]={},this.errors["g-recaptcha-response"].recaptcha=this.wrapper.lastChild);var c;for(var o in this.errors)if(this.errors.hasOwnProperty(o))for(var n in this.errors[o])c=document.createElement("div"),c.className="error "+n+"-error",c.setAttribute("data-field-name",o),c.innerHTML=t[n],this.errors[o][n].parentNode.insertBefore(c,this.errors[o][n].nextSibling)},wp.ccf.validators.phone=wp.ccf.validators.phone||r(!1,function(){var e=this.inputs[0].value;if(e){var t=/^[0-9+.)(\-]+$/;if(t.test(e)){if("us"===this.wrapper.getAttribute("data-phone-format")){var i=e.replace(/[^0-9]/,"");10!==i.length&&(this.errors[this.inputs[0].getAttribute("name")].digits=this.wrapper.lastChild)}}else this.errors[this.inputs[0].getAttribute("name")].phone=this.wrapper.lastChild}}),wp.ccf.validators.date=wp.ccf.validators.date||function(e){this.wrapper=e,this.errors={},this.inputs=this.wrapper.querySelectorAll(".field-input");for(var i=this.wrapper.querySelectorAll(".error"),l=i.length-1;l>=0;l--)i[l].parentNode.removeChild(i[l]);var s;_.each(this.inputs,function(i){var l=i.getAttribute("name");if(this.errors[l]={},i.getAttribute("aria-required")&&""===i.value&&(this.errors[l].required=!0,s=document.createElement("div"),s.className="error required-error",1===this.inputs.length?(s.innerHTML=t.required,s.className+=" right-error",i.parentNode.insertBefore(s,i.nextSibling)):(s.innerHTML=t[l.replace(/.*\[(.*?)\]/i,"$1")+"_required"],e.appendChild(s))),""!==i.value){var r=l.replace(/^.*\[(.*?)\]$/,"$1");"date"===r?i.value.match(/^([0-9]|\/)+$/)||(s=document.createElement("div"),s.className="error date-error",s.innerHTML=t.date,e.appendChild(s)):"hour"===r?i.value.match(/^[0-9]+$/)||(s=document.createElement("div"),s.className="error hour-error",s.innerHTML=t.hour,e.appendChild(s)):"minute"===r&&(i.value.match(/^[0-9]+$/)||(s=document.createElement("div"),s.className="error minute-error",s.innerHTML=t.minute,e.appendChild(s)))}},this)},wp.ccf.validators.address=wp.ccf.validators.address||r(),wp.ccf.validators.file=wp.ccf.validators.file||function(e){this.wrapper=e,this.inputs=this.wrapper.querySelectorAll(".field-input"),this.errors={};for(var i=this.wrapper.querySelectorAll(".error"),l=i.length-1;l>=0;l--)i[l].parentNode.removeChild(i[l]);_.each(this.inputs,function(e){var t=e.getAttribute("name");this.errors[t]={},e.getAttribute("aria-required")&&""===e.value&&(this.errors[t].required=e)},this);var s=this.inputs[0],r=this.wrapper.getAttribute("data-max-file-size"),c=this.wrapper.getAttribute("data-file-extensions");if(s.value){if(r){var o=1e3*1e3*parseInt(r);if(s.files)s.files[0].size>o&&(this.errors[this.inputs[0].getAttribute("name")].fileSize=this.wrapper.lastChild);else if("undefined"!=typeof ActiveXObject)try{var n=new ActiveXObject("Scripting.FileSystemObject"),a=n.getFile(s.value);a.size>o&&(this.errors[this.inputs[0].getAttribute("name")].fileSize=this.wrapper.lastChild)}catch(d){}}if(c){var f=c.replace(";",",").toLowerCase();if(f=f.replace(/\s+/g,""),f=f.split(","),f.length){var u=s.value.replace(/^.*\.(.+)$/g,"$1").toLowerCase();-1===_.indexOf(f,u)&&(this.errors[this.inputs[0].getAttribute("name")].fileExtension=this.wrapper.lastChild)}}}var p;for(var h in this.errors)if(this.errors.hasOwnProperty(h))for(var m in this.errors[h])p=document.createElement("div"),p.className="error "+m+"-error",p.setAttribute("data-field-name",h),p.innerHTML=t[m],"fileExtension"===m&&c?p.innerHTML+=" ("+c+")":"fileSize"===m&&r&&(p.innerHTML+=" "+r+" MB"),this.errors[h][m].parentNode.insertBefore(p,this.errors[h][m].nextSibling)},wp.ccf.validators.website=wp.ccf.validators.website||r(function(e){if(e.value){var t=/^http(s?)\:\/\/(([a-zA-Z0-9\-\._]+(\.[a-zA-Z0-9\-\._]+)+)|localhost)(\/?)([a-zA-Z0-9\-\.\?\,\'\/\\\+&%\$#_]*)?([\d\w\.\/\%\+\-\=\&\?\:\\\"\'\,\|\~\;]*)$/;t.test(e.value)||(this.errors[e.getAttribute("name")].website=e)}}),wp.ccf.validators.checkboxes=wp.ccf.validators.checkboxes||s,wp.ccf.validators.dropdown=wp.ccf.validators.dropdown||r(),wp.ccf.validators.radio=wp.ccf.validators.radio||s,wp.ccf.iframeOnload=function(e){l[e]&&l[e]()},wp.ccf.setupDOM=wp.ccf.setupDOM||function(){for(var s=document.querySelectorAll(".ccf-datepicker"),r=0;s.length>r;r++)e(s[r]).datepicker();var c=document.querySelectorAll(".ccf-form-wrapper");c.length>=1&&_.each(c,function(s){function r(t){var i=s.querySelectorAll(".field"),l=[];if(_.each(i,function(e){if(!e.className.match(/ skip-field/i)){var t=e.getAttribute("data-field-type"),i=e.getAttribute("data-field-slug");h[i]=e;var s=new wp.ccf.validators[t](e,n);if(_.size(s.errors)){var r=0;for(var c in s.errors)s.errors.hasOwnProperty(c)&&_.size(s.errors[c])&&r++;r>0&&l.push(s)}}}),!l.length)return o.trigger("ccfFormSuccess"),s.className=s.className.replace(/ loading/i,"")+" loading",f.animate({opacity:100}),!0;t.returnFalse=!1,t.preventDefault&&t.preventDefault(),o.trigger("ccfFormError",l);var r=e(window).scrollTop(),c=r+e(window).height(),a=e(l[0].wrapper),d=a.offset(),u=d.top,p=u+a.height();return u>=r&&c>=p||e("html, body").animate({scrollTop:a.offset().top},500),!1}var c=s.querySelectorAll(".ccf-form")[0],o=e(c),n=parseInt(s.getAttribute("data-form-id")),a=c.querySelectorAll(".ccf-submit-button")[0],d=document.getElementById("ccf_form_frame_"+n),f=e(c.querySelectorAll(".loading-img")[0]),u=e(d),p=e(a),h={};l[n]=function(){var l,s=u.contents().find("body").text();if(!s)return!1;c.className=c.className.replace(/ loading/i,""),f.animate({opacity:0}),i[n]=!1;try{l=e.parseJSON(s)}catch(r){var o=document.createElement("div");return o.className="error unknown-error",o.innerText=t.unknown,a.parentNode.appendChild(o),!1}var d=a.parentNode.querySelectorAll(".error");d.length&&d[0].parentNode.removeChild(d[0]),l.success?"text"===l.action_type&&l.completion_message?(c.innerHTML=l.completion_message,e("html, body").animate({scrollTop:e(c).offset().top},500)):"redirect"===l.action_type&&l.completion_redirect_url&&(document.location=l.completion_redirect_url):l.field_errors&&_.each(l.field_errors,function(e,t){var i=h[t].querySelectorAll(".field-input");for(var l in e)if(e.hasOwnProperty(l)){var s=document.createElement("div");s.className="error "+l+"-error",s.innerHTML=e[l],1===i.length?i[i.length-1].parentNode.insertBefore(s,i[i.length-1].nextSibling):h[t].appendChild(s)}})},p.on("click",function(e){return e.preventDefault(),c.target="ccf_form_frame_"+n,c.action=t.ajaxurl,o.submit(),!1}),o.on("submit",r)})},e(document).ready(wp.ccf.setupDOM)})(jQuery,ccfSettings);
|
classes/class-ccf-api.php
CHANGED
@@ -50,6 +50,10 @@ class CCF_API extends WP_JSON_Posts {
|
|
50 |
'sanitize' => 'sanitize_text_field',
|
51 |
'escape' => 'esc_html',
|
52 |
),
|
|
|
|
|
|
|
|
|
53 |
'value' => array(
|
54 |
'sanitize' => 'sanitize_text_field',
|
55 |
'escape' => 'esc_html',
|
@@ -98,6 +102,14 @@ class CCF_API extends WP_JSON_Posts {
|
|
98 |
'sanitize' => 'wp_kses_post',
|
99 |
'escape' => 'wp_kses_post',
|
100 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
) );
|
102 |
|
103 |
$this->choice_attribute_keys = apply_filters( 'ccf_choice_attributes', array(
|
@@ -177,13 +189,14 @@ class CCF_API extends WP_JSON_Posts {
|
|
177 |
}
|
178 |
|
179 |
/**
|
180 |
-
* Delete all
|
181 |
*
|
182 |
* @param int $form_id
|
183 |
* @since 6.0
|
184 |
*/
|
185 |
public function delete_submission( $form_id ) {
|
186 |
$submissions = get_children( array( 'post_parent' => $form_id, 'numberposts' => apply_filters( 'ccf_max_submissions', 5000, get_post( $form_id ) ) ) );
|
|
|
187 |
if ( ! empty( $submissions ) ) {
|
188 |
foreach ( $submissions as $submission ) {
|
189 |
wp_delete_post( $submission->ID, true );
|
50 |
'sanitize' => 'sanitize_text_field',
|
51 |
'escape' => 'esc_html',
|
52 |
),
|
53 |
+
'description' => array(
|
54 |
+
'sanitize' => 'sanitize_text_field',
|
55 |
+
'escape' => 'esc_html',
|
56 |
+
),
|
57 |
'value' => array(
|
58 |
'sanitize' => 'sanitize_text_field',
|
59 |
'escape' => 'esc_html',
|
102 |
'sanitize' => 'wp_kses_post',
|
103 |
'escape' => 'wp_kses_post',
|
104 |
),
|
105 |
+
'maxFileSize' => array(
|
106 |
+
'sanitize' => 'intval',
|
107 |
+
'escape' => 'intval',
|
108 |
+
),
|
109 |
+
'fileExtensions' => array(
|
110 |
+
'sanitize' => 'sanitize_text_field',
|
111 |
+
'escape' => 'esc_html',
|
112 |
+
),
|
113 |
) );
|
114 |
|
115 |
$this->choice_attribute_keys = apply_filters( 'ccf_choice_attributes', array(
|
189 |
}
|
190 |
|
191 |
/**
|
192 |
+
* Delete all submissionws associated with a post.
|
193 |
*
|
194 |
* @param int $form_id
|
195 |
* @since 6.0
|
196 |
*/
|
197 |
public function delete_submission( $form_id ) {
|
198 |
$submissions = get_children( array( 'post_parent' => $form_id, 'numberposts' => apply_filters( 'ccf_max_submissions', 5000, get_post( $form_id ) ) ) );
|
199 |
+
|
200 |
if ( ! empty( $submissions ) ) {
|
201 |
foreach ( $submissions as $submission ) {
|
202 |
wp_delete_post( $submission->ID, true );
|
classes/class-ccf-field-renderer.php
CHANGED
@@ -25,6 +25,7 @@ class CCF_Field_Renderer {
|
|
25 |
$placeholder = get_post_meta( $field_id, 'ccf_field_placeholder', true );
|
26 |
$required = get_post_meta( $field_id, 'ccf_field_required', true );
|
27 |
$class_name = get_post_meta( $field_id, 'ccf_field_className', true );
|
|
|
28 |
|
29 |
$errors = CCF_Form_Handler::factory()->get_errors( $form_id, $slug );
|
30 |
$all_errors = CCF_Form_Handler::factory()->get_errors( $form_id );
|
@@ -40,12 +41,19 @@ class CCF_Field_Renderer {
|
|
40 |
ob_start();
|
41 |
?>
|
42 |
|
43 |
-
<div data-field-type="single-line-text" 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; ?>">
|
44 |
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>">
|
45 |
<?php if ( ! empty( $required ) ) : ?><span class="required">*</span><?php endif; ?>
|
46 |
<?php echo esc_html( $label ); ?>
|
47 |
</label>
|
48 |
<input class="<?php if ( ! empty( $errors ) ) : ?>field-error-input<?php endif; ?> field-input" <?php if ( ! empty( $required ) ) : ?>required aria-required="true"<?php endif; ?> type="text" name="ccf_field_<?php echo esc_attr( $slug ); ?>" id="ccf_field_<?php echo esc_attr( $slug ); ?>" placeholder="<?php echo esc_attr( $placeholder ); ?>" value="<?php if ( ! empty( $post_value ) ) { echo esc_attr( $post_value ); } else { echo esc_attr( $value ); } ?>">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
<?php if ( ! empty( $errors ) ) : ?>
|
50 |
<div class="error"><?php echo esc_html( $errors['required'] ); ?></div>
|
51 |
<?php endif; ?>
|
@@ -55,6 +63,79 @@ class CCF_Field_Renderer {
|
|
55 |
return ob_get_clean();
|
56 |
}
|
57 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
/**
|
59 |
* Get reCAPTCHA field HTML, including any errors from the last form submission.
|
60 |
*
|
@@ -68,18 +149,26 @@ class CCF_Field_Renderer {
|
|
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; ?>
|
@@ -188,6 +277,7 @@ class CCF_Field_Renderer {
|
|
188 |
$label = get_post_meta( $field_id, 'ccf_field_label', true );
|
189 |
$class_name = get_post_meta( $field_id, 'ccf_field_className', true );
|
190 |
$required = get_post_meta( $field_id, 'ccf_field_required', true );
|
|
|
191 |
|
192 |
$errors = CCF_Form_Handler::factory()->get_errors( $form_id, $slug );
|
193 |
$all_errors = CCF_Form_Handler::factory()->get_errors( $form_id );
|
@@ -203,7 +293,7 @@ class CCF_Field_Renderer {
|
|
203 |
ob_start();
|
204 |
?>
|
205 |
|
206 |
-
<div data-field-type="dropdown" class="<?php if ( ! empty( $errors ) ) : ?>field-error<?php endif; ?> field <?php echo esc_attr( $slug ); ?> dropdown field-<?php echo (int) $field_id; ?> <?php echo esc_attr( $class_name ); ?> <?php if ( ! empty( $required ) ) : ?>field-required<?php endif; ?>">
|
207 |
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>">
|
208 |
<?php if ( ! empty( $required ) ) : ?><span class="required">*</span><?php endif; ?>
|
209 |
<?php echo esc_html( $label ); ?>
|
@@ -225,6 +315,12 @@ class CCF_Field_Renderer {
|
|
225 |
<?php endforeach; ?>
|
226 |
</select>
|
227 |
|
|
|
|
|
|
|
|
|
|
|
|
|
228 |
<?php if ( ! empty( $errors['required'] ) ) : ?>
|
229 |
<div class="error"><?php echo esc_html( $errors['required'] ); ?></div>
|
230 |
<?php endif; ?>
|
@@ -262,6 +358,7 @@ class CCF_Field_Renderer {
|
|
262 |
$label = get_post_meta( $field_id, 'ccf_field_label', true );;
|
263 |
$required = get_post_meta( $field_id, 'ccf_field_required', true );
|
264 |
$class_name = get_post_meta( $field_id, 'ccf_field_className', true );
|
|
|
265 |
|
266 |
$errors = CCF_Form_Handler::factory()->get_errors( $form_id, $slug );
|
267 |
$all_errors = CCF_Form_Handler::factory()->get_errors( $form_id );
|
@@ -277,7 +374,7 @@ class CCF_Field_Renderer {
|
|
277 |
ob_start();
|
278 |
?>
|
279 |
|
280 |
-
<div data-field-type="checkboxes" class="<?php if ( ! empty( $errors ) ) : ?>field-error<?php endif; ?> field <?php echo esc_attr( $slug ); ?> checkboxes field-<?php echo (int) $field_id; ?> <?php echo esc_attr( $class_name ); ?> <?php if ( ! empty( $required ) ) : ?>field-required<?php endif; ?>">
|
281 |
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>">
|
282 |
<?php if ( ! empty( $required ) ) : ?><span class="required">*</span><?php endif; ?>
|
283 |
<?php echo esc_html( $label ); ?>
|
@@ -299,6 +396,12 @@ class CCF_Field_Renderer {
|
|
299 |
</div>
|
300 |
<?php endforeach; ?>
|
301 |
|
|
|
|
|
|
|
|
|
|
|
|
|
302 |
<?php if ( ! empty( $errors ) ) : ?>
|
303 |
<div class="error"><?php echo esc_html( $errors['required'] ); ?></div>
|
304 |
<?php endif; ?>
|
@@ -336,6 +439,7 @@ class CCF_Field_Renderer {
|
|
336 |
$label = get_post_meta( $field_id, 'ccf_field_label', true );;
|
337 |
$required = get_post_meta( $field_id, 'ccf_field_required', true );
|
338 |
$class_name = get_post_meta( $field_id, 'ccf_field_className', true );
|
|
|
339 |
|
340 |
$errors = CCF_Form_Handler::factory()->get_errors( $form_id, $slug );
|
341 |
$all_errors = CCF_Form_Handler::factory()->get_errors( $form_id );
|
@@ -351,7 +455,7 @@ class CCF_Field_Renderer {
|
|
351 |
ob_start();
|
352 |
?>
|
353 |
|
354 |
-
<div data-field-type="radio" class="<?php if ( ! empty( $errors ) ) : ?>field-error<?php endif; ?> field <?php echo esc_attr( $slug ); ?> radio field-<?php echo (int) $field_id; ?> <?php echo esc_attr( $class_name ); ?> <?php if ( ! empty( $required ) ) : ?>field-required<?php endif; ?>">
|
355 |
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>">
|
356 |
<?php if ( ! empty( $required ) ) : ?><span class="required">*</span><?php endif; ?>
|
357 |
<?php echo esc_html( $label ); ?>
|
@@ -373,6 +477,12 @@ class CCF_Field_Renderer {
|
|
373 |
</div>
|
374 |
<?php endforeach; ?>
|
375 |
|
|
|
|
|
|
|
|
|
|
|
|
|
376 |
<?php if ( ! empty( $errors ) ) : ?>
|
377 |
<div class="error"><?php echo esc_html( $errors['required'] ); ?></div>
|
378 |
<?php endif; ?>
|
@@ -397,6 +507,7 @@ class CCF_Field_Renderer {
|
|
397 |
$address_type = get_post_meta( $field_id, 'ccf_field_addressType', true );
|
398 |
$required = get_post_meta( $field_id, 'ccf_field_required', true );
|
399 |
$class_name = get_post_meta( $field_id, 'ccf_field_className', true );
|
|
|
400 |
|
401 |
$errors = CCF_Form_Handler::factory()->get_errors( $form_id, $slug );
|
402 |
$all_errors = CCF_Form_Handler::factory()->get_errors( $form_id );
|
@@ -432,7 +543,7 @@ class CCF_Field_Renderer {
|
|
432 |
ob_start();
|
433 |
?>
|
434 |
|
435 |
-
<div data-field-type="address" class="<?php if ( ! empty( $errors ) ) : ?>field-error<?php endif; ?> field <?php echo esc_attr( $slug ); ?> address field-<?php echo (int) $field_id; ?> <?php echo esc_attr( $class_name ); ?> <?php if ( ! empty( $required ) ) : ?>field-required<?php endif; ?>">
|
436 |
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>">
|
437 |
<?php if ( ! empty( $required ) ) : ?><span class="required">*</span><?php endif; ?>
|
438 |
<?php echo esc_html( $label ); ?>
|
@@ -477,6 +588,7 @@ class CCF_Field_Renderer {
|
|
477 |
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>-zipcode" class="sub-label">ZIP Code</label>
|
478 |
|
479 |
</div>
|
|
|
480 |
<?php } else if ( $address_type === 'international' ) { ?>
|
481 |
<div class="right">
|
482 |
<input value="<?php if ( ! empty( $state_post_value ) ) echo esc_attr( $state_post_value ); ?>" class="<?php if ( ! empty( $errors['state_required'] ) ) : ?>field-error-input<?php endif; ?> field-input" <?php if ( ! empty( $required ) ) : ?>required aria-required="true"<?php endif; ?> type="text" name="ccf_field_<?php echo esc_attr( $slug ); ?>[state]" id="ccf_field_<?php echo esc_attr( $slug ); ?>-state">
|
@@ -506,7 +618,14 @@ class CCF_Field_Renderer {
|
|
506 |
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>-country" class="sub-label">Country</label>
|
507 |
|
508 |
</div>
|
|
|
509 |
<?php } ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
510 |
</div>
|
511 |
|
512 |
<?php
|
@@ -530,6 +649,7 @@ class CCF_Field_Renderer {
|
|
530 |
$required = get_post_meta( $field_id, 'ccf_field_required', true );
|
531 |
$class_name = get_post_meta( $field_id, 'ccf_field_className', true );
|
532 |
$phone_format = get_post_meta( $field_id, 'ccf_field_phoneFormat', true );
|
|
|
533 |
|
534 |
$errors = CCF_Form_Handler::factory()->get_errors( $form_id, $slug );
|
535 |
$all_errors = CCF_Form_Handler::factory()->get_errors( $form_id );
|
@@ -545,13 +665,19 @@ class CCF_Field_Renderer {
|
|
545 |
ob_start();
|
546 |
?>
|
547 |
|
548 |
-
<div data-phone-format="<?php echo esc_attr( $phone_format ); ?>" data-field-type="phone" class="<?php if ( ! empty( $errors ) ) : ?>field-error<?php endif; ?> field <?php echo esc_attr( $slug ); ?> phone field-<?php echo (int) $field_id; ?> <?php echo esc_attr( $class_name ); ?> <?php if ( ! empty( $required ) ) : ?>field-required<?php endif; ?>">
|
549 |
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>">
|
550 |
<?php if ( ! empty( $required ) ) : ?><span class="required">*</span><?php endif; ?>
|
551 |
<?php echo esc_html( $label ); ?>
|
552 |
</label>
|
553 |
<input class="<?php if ( ! empty( $errors ) ) : ?>field-error-input<?php endif; ?> field-input" <?php if ( ! empty( $required ) ) : ?>required aria-required="true"<?php endif; ?> type="text" name="ccf_field_<?php echo esc_attr( $slug ); ?>" id="ccf_field_<?php echo esc_attr( $slug ); ?>" placeholder="<?php echo esc_attr( $placeholder ); ?>" value="<?php if ( ! empty( $post_value ) ) { echo esc_attr( $post_value ); } else { echo esc_attr( $value ); } ?>">
|
554 |
|
|
|
|
|
|
|
|
|
|
|
|
|
555 |
<?php if ( ! empty( $errors ) ) : ?>
|
556 |
<?php foreach ( $errors as $error ) : ?>
|
557 |
<div class="error"><?php echo esc_html( $error ); ?></div>
|
@@ -579,6 +705,7 @@ class CCF_Field_Renderer {
|
|
579 |
$placeholder = get_post_meta( $field_id, 'ccf_field_placeholder', true );
|
580 |
$required = get_post_meta( $field_id, 'ccf_field_required', true );
|
581 |
$class_name = get_post_meta( $field_id, 'ccf_field_className', true );
|
|
|
582 |
|
583 |
$errors = CCF_Form_Handler::factory()->get_errors( $form_id, $slug );
|
584 |
$all_errors = CCF_Form_Handler::factory()->get_errors( $form_id );
|
@@ -594,13 +721,19 @@ class CCF_Field_Renderer {
|
|
594 |
ob_start();
|
595 |
?>
|
596 |
|
597 |
-
<div data-field-type="website" class="<?php if ( ! empty( $errors ) ) : ?>field-error<?php endif; ?> field <?php echo esc_attr( $slug ); ?> website field-<?php echo (int) $field_id; ?> <?php echo esc_attr( $class_name ); ?> <?php if ( ! empty( $required ) ) : ?>field-required<?php endif; ?>">
|
598 |
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>">
|
599 |
<?php if ( ! empty( $required ) ) : ?><span class="required">*</span><?php endif; ?>
|
600 |
<?php echo esc_html( $label ); ?>
|
601 |
</label>
|
602 |
<input class="<?php if ( ! empty( $errors ) ) : ?>field-error-input<?php endif; ?> field-input" <?php if ( ! empty( $required ) ) : ?>required aria-required="true"<?php endif; ?> type="text" name="ccf_field_<?php echo esc_attr( $slug ); ?>" id="ccf_field_<?php echo esc_attr( $slug ); ?>" placeholder="<?php echo esc_attr( $placeholder ); ?>" value="<?php if ( ! empty( $post_value ) ) { echo esc_attr( $post_value ); } else { echo esc_attr( $value ); } ?>">
|
603 |
|
|
|
|
|
|
|
|
|
|
|
|
|
604 |
<?php if ( ! empty( $errors ) ) : foreach ( $errors as $error ) : ?>
|
605 |
<div class="error"><?php echo esc_html( $error ); ?></div>
|
606 |
<?php endforeach; endif; ?>
|
@@ -627,6 +760,7 @@ class CCF_Field_Renderer {
|
|
627 |
$email_confirmation = get_post_meta( $field_id, 'ccf_field_emailConfirmation', true );
|
628 |
$required = get_post_meta( $field_id, 'ccf_field_required', true );
|
629 |
$class_name = get_post_meta( $field_id, 'ccf_field_className', true );
|
|
|
630 |
|
631 |
$errors = CCF_Form_Handler::factory()->get_errors( $form_id, $slug );
|
632 |
$all_errors = CCF_Form_Handler::factory()->get_errors( $form_id );
|
@@ -650,7 +784,7 @@ class CCF_Field_Renderer {
|
|
650 |
ob_start();
|
651 |
?>
|
652 |
|
653 |
-
<div data-field-type="email" class="<?php if ( ! empty( $errors ) ) : ?>field-error<?php endif; ?> field <?php echo esc_attr( $slug ); ?> email field-<?php echo (int) $field_id; ?> <?php echo esc_attr( $class_name ); ?> <?php if ( ! empty( $required ) ) : ?>field-required<?php endif; ?>">
|
654 |
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>">
|
655 |
<?php if ( ! empty( $required ) ) : ?><span class="required">*</span><?php endif; ?>
|
656 |
<?php echo esc_html( $label ); ?>
|
@@ -683,6 +817,12 @@ class CCF_Field_Renderer {
|
|
683 |
<?php endif; ?>
|
684 |
<div class="ccf-clear"></div>
|
685 |
<?php } ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
686 |
</div>
|
687 |
|
688 |
<?php
|
@@ -703,6 +843,7 @@ class CCF_Field_Renderer {
|
|
703 |
$label = get_post_meta( $field_id, 'ccf_field_label', true );
|
704 |
$required = get_post_meta( $field_id, 'ccf_field_required', true );
|
705 |
$class_name = get_post_meta( $field_id, 'ccf_field_className', true );
|
|
|
706 |
|
707 |
$errors = CCF_Form_Handler::factory()->get_errors( $form_id, $slug );
|
708 |
$all_errors = CCF_Form_Handler::factory()->get_errors( $form_id );
|
@@ -722,7 +863,7 @@ class CCF_Field_Renderer {
|
|
722 |
ob_start();
|
723 |
?>
|
724 |
|
725 |
-
<div data-field-type="name" class="<?php if ( ! empty( $errors ) ) : ?>field-error<?php endif; ?> field <?php echo esc_attr( $slug ); ?> name field-<?php echo (int) $field_id; ?> <?php echo esc_attr( $class_name ); ?> <?php if ( ! empty( $required ) ) : ?>field-required<?php endif; ?>">
|
726 |
<label>
|
727 |
<?php if ( ! empty( $required ) ) : ?><span class="required">*</span><?php endif; ?>
|
728 |
<?php echo esc_html( $label ); ?>
|
@@ -741,7 +882,14 @@ class CCF_Field_Renderer {
|
|
741 |
<?php endif; ?>
|
742 |
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>-last" class="sub-label">Last</label>
|
743 |
</div>
|
|
|
744 |
<div class="ccf-clear"></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
745 |
</div>
|
746 |
|
747 |
<?php
|
@@ -764,6 +912,7 @@ class CCF_Field_Renderer {
|
|
764 |
$class_name = get_post_meta( $field_id, 'ccf_field_className', true );
|
765 |
$show_date = get_post_meta( $field_id, 'ccf_field_showDate', true );
|
766 |
$show_time = get_post_meta( $field_id, 'ccf_field_showTime', true );
|
|
|
767 |
|
768 |
$errors = CCF_Form_Handler::factory()->get_errors( $form_id, $slug );
|
769 |
$all_errors = CCF_Form_Handler::factory()->get_errors( $form_id );
|
@@ -793,7 +942,7 @@ class CCF_Field_Renderer {
|
|
793 |
ob_start();
|
794 |
?>
|
795 |
|
796 |
-
<div data-field-type="date" class="<?php if ( ! empty( $errors ) ) : ?>field-error<?php endif; ?> field <?php echo esc_attr( $slug ); ?> date field-<?php echo (int) $field_id; ?> <?php echo esc_attr( $class_name ); ?> <?php if ( ! empty( $required ) ) : ?>field-required<?php endif; ?>">
|
797 |
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>">
|
798 |
<?php if ( ! empty( $required ) ) : ?><span class="required">*</span><?php endif; ?>
|
799 |
<?php echo esc_html( $label ); ?>
|
@@ -839,6 +988,13 @@ class CCF_Field_Renderer {
|
|
839 |
</div>
|
840 |
<div class="ccf-clear"></div>
|
841 |
<?php } ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
842 |
<?php if ( ! empty( $errors ) ) : foreach ( $errors as $error ) : ?>
|
843 |
<div class="error"><?php echo esc_html( $error ); ?></div>
|
844 |
<?php endforeach; endif; ?>
|
@@ -864,6 +1020,7 @@ class CCF_Field_Renderer {
|
|
864 |
$placeholder = get_post_meta( $field_id, 'ccf_field_placeholder', true );
|
865 |
$required = get_post_meta( $field_id, 'ccf_field_required', true );
|
866 |
$class_name = get_post_meta( $field_id, 'ccf_field_className', true );
|
|
|
867 |
|
868 |
$errors = CCF_Form_Handler::factory()->get_errors( $form_id, $slug );
|
869 |
$all_errors = CCF_Form_Handler::factory()->get_errors( $form_id );
|
@@ -879,13 +1036,19 @@ class CCF_Field_Renderer {
|
|
879 |
ob_start();
|
880 |
?>
|
881 |
|
882 |
-
<div data-field-type="paragraph-text" class="<?php if ( ! empty( $errors ) ) : ?>field-error<?php endif; ?> field <?php echo esc_attr( $slug ); ?> paragraph-text field-<?php echo (int) $field_id; ?> <?php echo esc_attr( $class_name ); ?> <?php if ( ! empty( $required ) ) : ?>field-required<?php endif; ?>">
|
883 |
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>">
|
884 |
<?php if ( ! empty( $required ) ) : ?><span class="required">*</span><?php endif; ?>
|
885 |
<?php echo esc_html( $label ); ?>
|
886 |
</label>
|
887 |
<textarea class="<?php if ( ! empty( $errors ) ) : ?>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 ); ?>" id="ccf_field_<?php echo esc_attr( $slug ); ?>" placeholder="<?php echo esc_attr( $placeholder ); ?>"><?php if ( ! empty( $post_value ) ) { echo esc_attr( $post_value ); } else { echo esc_attr( $value ); } ?></textarea>
|
888 |
|
|
|
|
|
|
|
|
|
|
|
|
|
889 |
<?php if ( ! empty( $errors ) ) : ?>
|
890 |
<div class="error"><?php echo esc_html( $errors['required'] ); ?></div>
|
891 |
<?php endif; ?>
|
@@ -962,6 +1125,9 @@ class CCF_Field_Renderer {
|
|
962 |
case 'date':
|
963 |
$field_html = $this->date( $field_id, $form_id );
|
964 |
break;
|
|
|
|
|
|
|
965 |
case 'address':
|
966 |
$field_html = $this->address( $field_id, $form_id );
|
967 |
break;
|
25 |
$placeholder = get_post_meta( $field_id, 'ccf_field_placeholder', true );
|
26 |
$required = get_post_meta( $field_id, 'ccf_field_required', true );
|
27 |
$class_name = get_post_meta( $field_id, 'ccf_field_className', true );
|
28 |
+
$description = get_post_meta( $field_id, 'ccf_field_description', true );
|
29 |
|
30 |
$errors = CCF_Form_Handler::factory()->get_errors( $form_id, $slug );
|
31 |
$all_errors = CCF_Form_Handler::factory()->get_errors( $form_id );
|
41 |
ob_start();
|
42 |
?>
|
43 |
|
44 |
+
<div data-field-type="single-line-text" data-field-slug="<?php echo esc_attr( $slug ); ?>" 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; ?>">
|
45 |
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>">
|
46 |
<?php if ( ! empty( $required ) ) : ?><span class="required">*</span><?php endif; ?>
|
47 |
<?php echo esc_html( $label ); ?>
|
48 |
</label>
|
49 |
<input class="<?php if ( ! empty( $errors ) ) : ?>field-error-input<?php endif; ?> field-input" <?php if ( ! empty( $required ) ) : ?>required aria-required="true"<?php endif; ?> type="text" name="ccf_field_<?php echo esc_attr( $slug ); ?>" id="ccf_field_<?php echo esc_attr( $slug ); ?>" placeholder="<?php echo esc_attr( $placeholder ); ?>" value="<?php if ( ! empty( $post_value ) ) { echo esc_attr( $post_value ); } else { echo esc_attr( $value ); } ?>">
|
50 |
+
|
51 |
+
<?php if ( ! empty( $description ) ) : ?>
|
52 |
+
<div class="field-description">
|
53 |
+
<?php echo esc_html( $description ); ?>
|
54 |
+
</div>
|
55 |
+
<?php endif; ?>
|
56 |
+
|
57 |
<?php if ( ! empty( $errors ) ) : ?>
|
58 |
<div class="error"><?php echo esc_html( $errors['required'] ); ?></div>
|
59 |
<?php endif; ?>
|
63 |
return ob_get_clean();
|
64 |
}
|
65 |
|
66 |
+
/**
|
67 |
+
* Get file field HTML, including any errors from the last form submission. if there is an
|
68 |
+
* error the field will remember it's last submitted value.
|
69 |
+
*
|
70 |
+
* @param int $field_id
|
71 |
+
* @param int $form_id
|
72 |
+
* @since 6.4
|
73 |
+
* @return string
|
74 |
+
*/
|
75 |
+
public function file( $field_id, $form_id ) {
|
76 |
+
$slug = get_post_meta( $field_id, 'ccf_field_slug', true );
|
77 |
+
$label = get_post_meta( $field_id, 'ccf_field_label', true );
|
78 |
+
$value = get_post_meta( $field_id, 'ccf_field_value', true );
|
79 |
+
$placeholder = get_post_meta( $field_id, 'ccf_field_placeholder', true );
|
80 |
+
$required = get_post_meta( $field_id, 'ccf_field_required', true );
|
81 |
+
$class_name = get_post_meta( $field_id, 'ccf_field_className', true );
|
82 |
+
$max_file_size = get_post_meta( $field_id, 'ccf_field_maxFileSize', true );
|
83 |
+
$file_extensions = get_post_meta( $field_id, 'ccf_field_fileExtensions', true );
|
84 |
+
$description = get_post_meta( $field_id, 'ccf_field_description', true );
|
85 |
+
|
86 |
+
$errors = CCF_Form_Handler::factory()->get_errors( $form_id, $slug );
|
87 |
+
$all_errors = CCF_Form_Handler::factory()->get_errors( $form_id );
|
88 |
+
|
89 |
+
if ( ! empty( $all_errors ) ) {
|
90 |
+
if ( apply_filters( 'ccf_show_last_field_value', true, $field_id ) ) {
|
91 |
+
if ( ! empty( $_POST['ccf_field_' . $slug] ) ) {
|
92 |
+
$post_value = $_POST['ccf_field_' . $slug];
|
93 |
+
}
|
94 |
+
}
|
95 |
+
}
|
96 |
+
|
97 |
+
$max_upload_size = wp_max_upload_size();
|
98 |
+
if ( ! $max_upload_size ) {
|
99 |
+
$max_upload_size = 0;
|
100 |
+
}
|
101 |
+
|
102 |
+
$formatted_file_size = size_format( $max_upload_size );
|
103 |
+
|
104 |
+
if ( $max_file_size ) {
|
105 |
+
$formatted_file_size = $max_file_size;
|
106 |
+
}
|
107 |
+
|
108 |
+
ob_start();
|
109 |
+
?>
|
110 |
+
|
111 |
+
<div data-max-file-size="<?php echo esc_attr( $max_file_size ); ?>" data-file-extensions="<?php echo esc_attr( $file_extensions ); ?>" data-field-type="file" data-field-slug="<?php echo esc_attr( $slug ); ?>" class="<?php if ( ! empty( $errors ) ) : ?>field-error<?php endif; ?> field <?php echo esc_attr( $slug ); ?> file field-<?php echo (int) $field_id; ?> <?php echo esc_attr( $class_name ); ?> <?php if ( ! empty( $required ) ) : ?>field-required<?php endif; ?>">
|
112 |
+
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>">
|
113 |
+
<?php if ( ! empty( $required ) ) : ?><span class="required">*</span><?php endif; ?>
|
114 |
+
<?php echo esc_html( $label ); ?>
|
115 |
+
</label>
|
116 |
+
|
117 |
+
<input class="<?php if ( ! empty( $errors ) ) : ?>field-error-input<?php endif; ?> field-input" <?php if ( ! empty( $required ) ) : ?>required aria-required="true"<?php endif; ?> type="file" name="ccf_field_<?php echo esc_attr( $slug ); ?>" id="ccf_field_<?php echo esc_attr( $slug ); ?>" placeholder="<?php echo esc_attr( $placeholder ); ?>" value="<?php if ( ! empty( $post_value ) ) { echo esc_attr( $post_value ); } else { echo esc_attr( $value ); } ?>">
|
118 |
+
|
119 |
+
|
120 |
+
<div class="field-description">
|
121 |
+
<?php if ( ! empty( $file_extensions ) ) : ?>
|
122 |
+
<?php echo sprintf( esc_html__( 'Allowed file extensions are %s. ', 'custom-contact-forms' ), implode( ', ', explode( ',', str_replace( ' ', '', $file_extensions ) ) ) ); ?>
|
123 |
+
<?php endif; ?>
|
124 |
+
<?php echo sprintf( esc_html__( 'Max file size is %d MB. ', 'custom-contact-forms' ), (int) $formatted_file_size ); ?>
|
125 |
+
<?php echo esc_html( $description ); ?>
|
126 |
+
</div>
|
127 |
+
|
128 |
+
<?php if ( ! empty( $errors ) ) : ?>
|
129 |
+
<?php foreach ( $errors as $error ) : ?>
|
130 |
+
<div class="error"><?php echo esc_html( $error ); ?></div>
|
131 |
+
<?php endforeach; ?>
|
132 |
+
<?php endif; ?>
|
133 |
+
</div>
|
134 |
+
|
135 |
+
<?php
|
136 |
+
return ob_get_clean();
|
137 |
+
}
|
138 |
+
|
139 |
/**
|
140 |
* Get reCAPTCHA field HTML, including any errors from the last form submission.
|
141 |
*
|
149 |
$label = get_post_meta( $field_id, 'ccf_field_label', true );
|
150 |
$class_name = get_post_meta( $field_id, 'ccf_field_className', true );
|
151 |
$site_key = get_post_meta( $field_id, 'ccf_field_siteKey', true );
|
152 |
+
$description = get_post_meta( $field_id, 'ccf_field_description', true );
|
153 |
|
154 |
$errors = CCF_Form_Handler::factory()->get_errors( $form_id, $slug );
|
155 |
|
156 |
ob_start();
|
157 |
?>
|
158 |
|
159 |
+
<div data-field-type="recaptcha" data-field-slug="<?php echo esc_attr( $slug ); ?>" 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; ?>">
|
160 |
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>">
|
161 |
<span class="required">*</span>
|
162 |
<?php echo esc_html( $label ); ?>
|
163 |
</label>
|
164 |
<div class="ccf-recaptcha-wrapper" data-form-id="<?php echo (int) $form_id; ?>" data-sitekey="<?php echo esc_attr( $site_key ); ?>"></div>
|
165 |
+
|
166 |
+
<?php if ( ! empty( $description ) ) : ?>
|
167 |
+
<div class="field-description">
|
168 |
+
<?php echo esc_html( $description ); ?>
|
169 |
+
</div>
|
170 |
+
<?php endif; ?>
|
171 |
+
|
172 |
<?php if ( ! empty( $errors ) ) : ?>
|
173 |
<div class="error"><?php echo esc_html( $errors['recaptcha'] ); ?></div>
|
174 |
<?php endif; ?>
|
277 |
$label = get_post_meta( $field_id, 'ccf_field_label', true );
|
278 |
$class_name = get_post_meta( $field_id, 'ccf_field_className', true );
|
279 |
$required = get_post_meta( $field_id, 'ccf_field_required', true );
|
280 |
+
$description = get_post_meta( $field_id, 'ccf_field_description', true );
|
281 |
|
282 |
$errors = CCF_Form_Handler::factory()->get_errors( $form_id, $slug );
|
283 |
$all_errors = CCF_Form_Handler::factory()->get_errors( $form_id );
|
293 |
ob_start();
|
294 |
?>
|
295 |
|
296 |
+
<div data-field-type="dropdown" data-field-slug="<?php echo esc_attr( $slug ); ?>" class="<?php if ( ! empty( $errors ) ) : ?>field-error<?php endif; ?> field <?php echo esc_attr( $slug ); ?> dropdown field-<?php echo (int) $field_id; ?> <?php echo esc_attr( $class_name ); ?> <?php if ( ! empty( $required ) ) : ?>field-required<?php endif; ?>">
|
297 |
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>">
|
298 |
<?php if ( ! empty( $required ) ) : ?><span class="required">*</span><?php endif; ?>
|
299 |
<?php echo esc_html( $label ); ?>
|
315 |
<?php endforeach; ?>
|
316 |
</select>
|
317 |
|
318 |
+
<?php if ( ! empty( $description ) ) : ?>
|
319 |
+
<div class="field-description">
|
320 |
+
<?php echo esc_html( $description ); ?>
|
321 |
+
</div>
|
322 |
+
<?php endif; ?>
|
323 |
+
|
324 |
<?php if ( ! empty( $errors['required'] ) ) : ?>
|
325 |
<div class="error"><?php echo esc_html( $errors['required'] ); ?></div>
|
326 |
<?php endif; ?>
|
358 |
$label = get_post_meta( $field_id, 'ccf_field_label', true );;
|
359 |
$required = get_post_meta( $field_id, 'ccf_field_required', true );
|
360 |
$class_name = get_post_meta( $field_id, 'ccf_field_className', true );
|
361 |
+
$description = get_post_meta( $field_id, 'ccf_field_description', true );
|
362 |
|
363 |
$errors = CCF_Form_Handler::factory()->get_errors( $form_id, $slug );
|
364 |
$all_errors = CCF_Form_Handler::factory()->get_errors( $form_id );
|
374 |
ob_start();
|
375 |
?>
|
376 |
|
377 |
+
<div data-field-type="checkboxes" data-field-slug="<?php echo esc_attr( $slug ); ?>" class="<?php if ( ! empty( $errors ) ) : ?>field-error<?php endif; ?> field <?php echo esc_attr( $slug ); ?> checkboxes field-<?php echo (int) $field_id; ?> <?php echo esc_attr( $class_name ); ?> <?php if ( ! empty( $required ) ) : ?>field-required<?php endif; ?>">
|
378 |
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>">
|
379 |
<?php if ( ! empty( $required ) ) : ?><span class="required">*</span><?php endif; ?>
|
380 |
<?php echo esc_html( $label ); ?>
|
396 |
</div>
|
397 |
<?php endforeach; ?>
|
398 |
|
399 |
+
<?php if ( ! empty( $description ) ) : ?>
|
400 |
+
<div class="field-description">
|
401 |
+
<?php echo esc_html( $description ); ?>
|
402 |
+
</div>
|
403 |
+
<?php endif; ?>
|
404 |
+
|
405 |
<?php if ( ! empty( $errors ) ) : ?>
|
406 |
<div class="error"><?php echo esc_html( $errors['required'] ); ?></div>
|
407 |
<?php endif; ?>
|
439 |
$label = get_post_meta( $field_id, 'ccf_field_label', true );;
|
440 |
$required = get_post_meta( $field_id, 'ccf_field_required', true );
|
441 |
$class_name = get_post_meta( $field_id, 'ccf_field_className', true );
|
442 |
+
$description = get_post_meta( $field_id, 'ccf_field_description', true );
|
443 |
|
444 |
$errors = CCF_Form_Handler::factory()->get_errors( $form_id, $slug );
|
445 |
$all_errors = CCF_Form_Handler::factory()->get_errors( $form_id );
|
455 |
ob_start();
|
456 |
?>
|
457 |
|
458 |
+
<div data-field-type="radio" data-field-slug="<?php echo esc_attr( $slug ); ?>" class="<?php if ( ! empty( $errors ) ) : ?>field-error<?php endif; ?> field <?php echo esc_attr( $slug ); ?> radio field-<?php echo (int) $field_id; ?> <?php echo esc_attr( $class_name ); ?> <?php if ( ! empty( $required ) ) : ?>field-required<?php endif; ?>">
|
459 |
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>">
|
460 |
<?php if ( ! empty( $required ) ) : ?><span class="required">*</span><?php endif; ?>
|
461 |
<?php echo esc_html( $label ); ?>
|
477 |
</div>
|
478 |
<?php endforeach; ?>
|
479 |
|
480 |
+
<?php if ( ! empty( $description ) ) : ?>
|
481 |
+
<div class="field-description">
|
482 |
+
<?php echo esc_html( $description ); ?>
|
483 |
+
</div>
|
484 |
+
<?php endif; ?>
|
485 |
+
|
486 |
<?php if ( ! empty( $errors ) ) : ?>
|
487 |
<div class="error"><?php echo esc_html( $errors['required'] ); ?></div>
|
488 |
<?php endif; ?>
|
507 |
$address_type = get_post_meta( $field_id, 'ccf_field_addressType', true );
|
508 |
$required = get_post_meta( $field_id, 'ccf_field_required', true );
|
509 |
$class_name = get_post_meta( $field_id, 'ccf_field_className', true );
|
510 |
+
$description = get_post_meta( $field_id, 'ccf_field_description', true );
|
511 |
|
512 |
$errors = CCF_Form_Handler::factory()->get_errors( $form_id, $slug );
|
513 |
$all_errors = CCF_Form_Handler::factory()->get_errors( $form_id );
|
543 |
ob_start();
|
544 |
?>
|
545 |
|
546 |
+
<div data-field-type="address" data-field-slug="<?php echo esc_attr( $slug ); ?>" class="<?php if ( ! empty( $errors ) ) : ?>field-error<?php endif; ?> field <?php echo esc_attr( $slug ); ?> address field-<?php echo (int) $field_id; ?> <?php echo esc_attr( $class_name ); ?> <?php if ( ! empty( $required ) ) : ?>field-required<?php endif; ?>">
|
547 |
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>">
|
548 |
<?php if ( ! empty( $required ) ) : ?><span class="required">*</span><?php endif; ?>
|
549 |
<?php echo esc_html( $label ); ?>
|
588 |
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>-zipcode" class="sub-label">ZIP Code</label>
|
589 |
|
590 |
</div>
|
591 |
+
<div class="ccf-clear"></div>
|
592 |
<?php } else if ( $address_type === 'international' ) { ?>
|
593 |
<div class="right">
|
594 |
<input value="<?php if ( ! empty( $state_post_value ) ) echo esc_attr( $state_post_value ); ?>" class="<?php if ( ! empty( $errors['state_required'] ) ) : ?>field-error-input<?php endif; ?> field-input" <?php if ( ! empty( $required ) ) : ?>required aria-required="true"<?php endif; ?> type="text" name="ccf_field_<?php echo esc_attr( $slug ); ?>[state]" id="ccf_field_<?php echo esc_attr( $slug ); ?>-state">
|
618 |
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>-country" class="sub-label">Country</label>
|
619 |
|
620 |
</div>
|
621 |
+
<div class="ccf-clear"></div>
|
622 |
<?php } ?>
|
623 |
+
|
624 |
+
<?php if ( ! empty( $description ) ) : ?>
|
625 |
+
<div class="field-description">
|
626 |
+
<?php echo esc_html( $description ); ?>
|
627 |
+
</div>
|
628 |
+
<?php endif; ?>
|
629 |
</div>
|
630 |
|
631 |
<?php
|
649 |
$required = get_post_meta( $field_id, 'ccf_field_required', true );
|
650 |
$class_name = get_post_meta( $field_id, 'ccf_field_className', true );
|
651 |
$phone_format = get_post_meta( $field_id, 'ccf_field_phoneFormat', true );
|
652 |
+
$description = get_post_meta( $field_id, 'ccf_field_description', true );
|
653 |
|
654 |
$errors = CCF_Form_Handler::factory()->get_errors( $form_id, $slug );
|
655 |
$all_errors = CCF_Form_Handler::factory()->get_errors( $form_id );
|
665 |
ob_start();
|
666 |
?>
|
667 |
|
668 |
+
<div data-phone-format="<?php echo esc_attr( $phone_format ); ?>" data-field-slug="<?php echo esc_attr( $slug ); ?>" data-field-type="phone" class="<?php if ( ! empty( $errors ) ) : ?>field-error<?php endif; ?> field <?php echo esc_attr( $slug ); ?> phone field-<?php echo (int) $field_id; ?> <?php echo esc_attr( $class_name ); ?> <?php if ( ! empty( $required ) ) : ?>field-required<?php endif; ?>">
|
669 |
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>">
|
670 |
<?php if ( ! empty( $required ) ) : ?><span class="required">*</span><?php endif; ?>
|
671 |
<?php echo esc_html( $label ); ?>
|
672 |
</label>
|
673 |
<input class="<?php if ( ! empty( $errors ) ) : ?>field-error-input<?php endif; ?> field-input" <?php if ( ! empty( $required ) ) : ?>required aria-required="true"<?php endif; ?> type="text" name="ccf_field_<?php echo esc_attr( $slug ); ?>" id="ccf_field_<?php echo esc_attr( $slug ); ?>" placeholder="<?php echo esc_attr( $placeholder ); ?>" value="<?php if ( ! empty( $post_value ) ) { echo esc_attr( $post_value ); } else { echo esc_attr( $value ); } ?>">
|
674 |
|
675 |
+
<?php if ( ! empty( $description ) ) : ?>
|
676 |
+
<div class="field-description">
|
677 |
+
<?php echo esc_html( $description ); ?>
|
678 |
+
</div>
|
679 |
+
<?php endif; ?>
|
680 |
+
|
681 |
<?php if ( ! empty( $errors ) ) : ?>
|
682 |
<?php foreach ( $errors as $error ) : ?>
|
683 |
<div class="error"><?php echo esc_html( $error ); ?></div>
|
705 |
$placeholder = get_post_meta( $field_id, 'ccf_field_placeholder', true );
|
706 |
$required = get_post_meta( $field_id, 'ccf_field_required', true );
|
707 |
$class_name = get_post_meta( $field_id, 'ccf_field_className', true );
|
708 |
+
$description = get_post_meta( $field_id, 'ccf_field_description', true );
|
709 |
|
710 |
$errors = CCF_Form_Handler::factory()->get_errors( $form_id, $slug );
|
711 |
$all_errors = CCF_Form_Handler::factory()->get_errors( $form_id );
|
721 |
ob_start();
|
722 |
?>
|
723 |
|
724 |
+
<div data-field-type="website" data-field-slug="<?php echo esc_attr( $slug ); ?>" class="<?php if ( ! empty( $errors ) ) : ?>field-error<?php endif; ?> field <?php echo esc_attr( $slug ); ?> website field-<?php echo (int) $field_id; ?> <?php echo esc_attr( $class_name ); ?> <?php if ( ! empty( $required ) ) : ?>field-required<?php endif; ?>">
|
725 |
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>">
|
726 |
<?php if ( ! empty( $required ) ) : ?><span class="required">*</span><?php endif; ?>
|
727 |
<?php echo esc_html( $label ); ?>
|
728 |
</label>
|
729 |
<input class="<?php if ( ! empty( $errors ) ) : ?>field-error-input<?php endif; ?> field-input" <?php if ( ! empty( $required ) ) : ?>required aria-required="true"<?php endif; ?> type="text" name="ccf_field_<?php echo esc_attr( $slug ); ?>" id="ccf_field_<?php echo esc_attr( $slug ); ?>" placeholder="<?php echo esc_attr( $placeholder ); ?>" value="<?php if ( ! empty( $post_value ) ) { echo esc_attr( $post_value ); } else { echo esc_attr( $value ); } ?>">
|
730 |
|
731 |
+
<?php if ( ! empty( $description ) ) : ?>
|
732 |
+
<div class="field-description">
|
733 |
+
<?php echo esc_html( $description ); ?>
|
734 |
+
</div>
|
735 |
+
<?php endif; ?>
|
736 |
+
|
737 |
<?php if ( ! empty( $errors ) ) : foreach ( $errors as $error ) : ?>
|
738 |
<div class="error"><?php echo esc_html( $error ); ?></div>
|
739 |
<?php endforeach; endif; ?>
|
760 |
$email_confirmation = get_post_meta( $field_id, 'ccf_field_emailConfirmation', true );
|
761 |
$required = get_post_meta( $field_id, 'ccf_field_required', true );
|
762 |
$class_name = get_post_meta( $field_id, 'ccf_field_className', true );
|
763 |
+
$description = get_post_meta( $field_id, 'ccf_field_description', true );
|
764 |
|
765 |
$errors = CCF_Form_Handler::factory()->get_errors( $form_id, $slug );
|
766 |
$all_errors = CCF_Form_Handler::factory()->get_errors( $form_id );
|
784 |
ob_start();
|
785 |
?>
|
786 |
|
787 |
+
<div data-field-type="email" data-field-slug="<?php echo esc_attr( $slug ); ?>" class="<?php if ( ! empty( $errors ) ) : ?>field-error<?php endif; ?> field <?php echo esc_attr( $slug ); ?> email field-<?php echo (int) $field_id; ?> <?php echo esc_attr( $class_name ); ?> <?php if ( ! empty( $required ) ) : ?>field-required<?php endif; ?>">
|
788 |
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>">
|
789 |
<?php if ( ! empty( $required ) ) : ?><span class="required">*</span><?php endif; ?>
|
790 |
<?php echo esc_html( $label ); ?>
|
817 |
<?php endif; ?>
|
818 |
<div class="ccf-clear"></div>
|
819 |
<?php } ?>
|
820 |
+
|
821 |
+
<?php if ( ! empty( $description ) ) : ?>
|
822 |
+
<div class="field-description">
|
823 |
+
<?php echo esc_html( $description ); ?>
|
824 |
+
</div>
|
825 |
+
<?php endif; ?>
|
826 |
</div>
|
827 |
|
828 |
<?php
|
843 |
$label = get_post_meta( $field_id, 'ccf_field_label', true );
|
844 |
$required = get_post_meta( $field_id, 'ccf_field_required', true );
|
845 |
$class_name = get_post_meta( $field_id, 'ccf_field_className', true );
|
846 |
+
$description = get_post_meta( $field_id, 'ccf_field_description', true );
|
847 |
|
848 |
$errors = CCF_Form_Handler::factory()->get_errors( $form_id, $slug );
|
849 |
$all_errors = CCF_Form_Handler::factory()->get_errors( $form_id );
|
863 |
ob_start();
|
864 |
?>
|
865 |
|
866 |
+
<div data-field-type="name" data-field-slug="<?php echo esc_attr( $slug ); ?>" class="<?php if ( ! empty( $errors ) ) : ?>field-error<?php endif; ?> field <?php echo esc_attr( $slug ); ?> name field-<?php echo (int) $field_id; ?> <?php echo esc_attr( $class_name ); ?> <?php if ( ! empty( $required ) ) : ?>field-required<?php endif; ?>">
|
867 |
<label>
|
868 |
<?php if ( ! empty( $required ) ) : ?><span class="required">*</span><?php endif; ?>
|
869 |
<?php echo esc_html( $label ); ?>
|
882 |
<?php endif; ?>
|
883 |
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>-last" class="sub-label">Last</label>
|
884 |
</div>
|
885 |
+
|
886 |
<div class="ccf-clear"></div>
|
887 |
+
|
888 |
+
<?php if ( ! empty( $description ) ) : ?>
|
889 |
+
<div class="field-description">
|
890 |
+
<?php echo esc_html( $description ); ?>
|
891 |
+
</div>
|
892 |
+
<?php endif; ?>
|
893 |
</div>
|
894 |
|
895 |
<?php
|
912 |
$class_name = get_post_meta( $field_id, 'ccf_field_className', true );
|
913 |
$show_date = get_post_meta( $field_id, 'ccf_field_showDate', true );
|
914 |
$show_time = get_post_meta( $field_id, 'ccf_field_showTime', true );
|
915 |
+
$description = get_post_meta( $field_id, 'ccf_field_description', true );
|
916 |
|
917 |
$errors = CCF_Form_Handler::factory()->get_errors( $form_id, $slug );
|
918 |
$all_errors = CCF_Form_Handler::factory()->get_errors( $form_id );
|
942 |
ob_start();
|
943 |
?>
|
944 |
|
945 |
+
<div data-field-type="date" data-field-slug="<?php echo esc_attr( $slug ); ?>" class="<?php if ( ! empty( $errors ) ) : ?>field-error<?php endif; ?> field <?php echo esc_attr( $slug ); ?> date field-<?php echo (int) $field_id; ?> <?php echo esc_attr( $class_name ); ?> <?php if ( ! empty( $required ) ) : ?>field-required<?php endif; ?>">
|
946 |
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>">
|
947 |
<?php if ( ! empty( $required ) ) : ?><span class="required">*</span><?php endif; ?>
|
948 |
<?php echo esc_html( $label ); ?>
|
988 |
</div>
|
989 |
<div class="ccf-clear"></div>
|
990 |
<?php } ?>
|
991 |
+
|
992 |
+
<?php if ( ! empty( $description ) ) : ?>
|
993 |
+
<div class="field-description">
|
994 |
+
<?php echo esc_html( $description ); ?>
|
995 |
+
</div>
|
996 |
+
<?php endif; ?>
|
997 |
+
|
998 |
<?php if ( ! empty( $errors ) ) : foreach ( $errors as $error ) : ?>
|
999 |
<div class="error"><?php echo esc_html( $error ); ?></div>
|
1000 |
<?php endforeach; endif; ?>
|
1020 |
$placeholder = get_post_meta( $field_id, 'ccf_field_placeholder', true );
|
1021 |
$required = get_post_meta( $field_id, 'ccf_field_required', true );
|
1022 |
$class_name = get_post_meta( $field_id, 'ccf_field_className', true );
|
1023 |
+
$description = get_post_meta( $field_id, 'ccf_field_description', true );
|
1024 |
|
1025 |
$errors = CCF_Form_Handler::factory()->get_errors( $form_id, $slug );
|
1026 |
$all_errors = CCF_Form_Handler::factory()->get_errors( $form_id );
|
1036 |
ob_start();
|
1037 |
?>
|
1038 |
|
1039 |
+
<div data-field-type="paragraph-text" data-field-slug="<?php echo esc_attr( $slug ); ?>" class="<?php if ( ! empty( $errors ) ) : ?>field-error<?php endif; ?> field <?php echo esc_attr( $slug ); ?> paragraph-text field-<?php echo (int) $field_id; ?> <?php echo esc_attr( $class_name ); ?> <?php if ( ! empty( $required ) ) : ?>field-required<?php endif; ?>">
|
1040 |
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>">
|
1041 |
<?php if ( ! empty( $required ) ) : ?><span class="required">*</span><?php endif; ?>
|
1042 |
<?php echo esc_html( $label ); ?>
|
1043 |
</label>
|
1044 |
<textarea class="<?php if ( ! empty( $errors ) ) : ?>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 ); ?>" id="ccf_field_<?php echo esc_attr( $slug ); ?>" placeholder="<?php echo esc_attr( $placeholder ); ?>"><?php if ( ! empty( $post_value ) ) { echo esc_attr( $post_value ); } else { echo esc_attr( $value ); } ?></textarea>
|
1045 |
|
1046 |
+
<?php if ( ! empty( $description ) ) : ?>
|
1047 |
+
<div class="field-description">
|
1048 |
+
<?php echo esc_html( $description ); ?>
|
1049 |
+
</div>
|
1050 |
+
<?php endif; ?>
|
1051 |
+
|
1052 |
<?php if ( ! empty( $errors ) ) : ?>
|
1053 |
<div class="error"><?php echo esc_html( $errors['required'] ); ?></div>
|
1054 |
<?php endif; ?>
|
1125 |
case 'date':
|
1126 |
$field_html = $this->date( $field_id, $form_id );
|
1127 |
break;
|
1128 |
+
case 'file':
|
1129 |
+
$field_html = $this->file( $field_id, $form_id );
|
1130 |
+
break;
|
1131 |
case 'address':
|
1132 |
$field_html = $this->address( $field_id, $form_id );
|
1133 |
break;
|
classes/class-ccf-form-handler.php
CHANGED
@@ -59,6 +59,10 @@ class CCF_Form_Handler {
|
|
59 |
'sanitizer' => 'sanitize_text_field',
|
60 |
'validator' => array( $this, 'is_address' ),
|
61 |
),
|
|
|
|
|
|
|
|
|
62 |
'date' => array(
|
63 |
'sanitizer' => 'sanitize_text_field',
|
64 |
'validator' => array( $this, 'is_date' ),
|
@@ -78,6 +82,96 @@ class CCF_Form_Handler {
|
|
78 |
) );
|
79 |
}
|
80 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
/**
|
82 |
* Get errors for a form. Optional slug allows you to get errors from a specific field within a form
|
83 |
*
|
@@ -380,7 +474,7 @@ class CCF_Form_Handler {
|
|
380 |
$errors['hour_required'] = esc_html__( 'Hour is required.', 'custom-contact-forms' );
|
381 |
} else {
|
382 |
if ( ! empty( $value['hour'] ) && ! preg_match( '#^([0-9]|/)+$#', $value['hour'] ) ) {
|
383 |
-
$errors['
|
384 |
}
|
385 |
}
|
386 |
|
@@ -388,7 +482,7 @@ class CCF_Form_Handler {
|
|
388 |
$errors['minutes_required'] = esc_html__( 'Minute is required.', 'custom-contact-forms' );
|
389 |
} else {
|
390 |
if ( ! empty( $value['minute'] ) && ! preg_match( '#^[0-9]+$#', $value['minute'] ) ) {
|
391 |
-
$errors['
|
392 |
}
|
393 |
}
|
394 |
|
@@ -467,23 +561,14 @@ class CCF_Form_Handler {
|
|
467 |
return;
|
468 |
}
|
469 |
|
470 |
-
$
|
471 |
|
472 |
if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
|
473 |
-
$
|
474 |
-
|
475 |
-
if ( is_array( $submission ) ) {
|
476 |
-
$response = $submission;
|
477 |
-
$response['success'] = true;
|
478 |
-
}
|
479 |
-
|
480 |
-
wp_send_json( $response );
|
481 |
} else {
|
482 |
-
if (
|
483 |
-
|
484 |
-
|
485 |
-
exit;
|
486 |
-
}
|
487 |
}
|
488 |
}
|
489 |
}
|
@@ -491,16 +576,16 @@ class CCF_Form_Handler {
|
|
491 |
/**
|
492 |
* Process a form submission
|
493 |
*
|
494 |
-
* @return array
|
495 |
*/
|
496 |
function process_submission() {
|
497 |
if ( ! empty( $_POST['my_information'] ) ) {
|
498 |
// Honeypot
|
499 |
-
return false;
|
500 |
}
|
501 |
|
502 |
if ( empty( $_POST['form_nonce'] ) || ! wp_verify_nonce( $_POST['form_nonce'], 'ccf_form' ) ) {
|
503 |
-
return false;
|
504 |
}
|
505 |
|
506 |
$form_id = (int) $_POST['form_id'];
|
@@ -508,7 +593,7 @@ class CCF_Form_Handler {
|
|
508 |
$form = get_post( $form_id );
|
509 |
|
510 |
if ( empty( $form ) ) {
|
511 |
-
return false;
|
512 |
}
|
513 |
|
514 |
$fields = get_post_meta( $form->ID, 'ccf_attached_fields', true );
|
@@ -520,6 +605,7 @@ class CCF_Form_Handler {
|
|
520 |
|
521 |
$skip_fields = apply_filters( 'ccf_skip_fields', array( 'html', 'section-header' ), $form->ID );
|
522 |
$save_skip_fields = apply_filters( 'ccf_save_skip_fields', array( 'recaptcha' ), $form->ID );
|
|
|
523 |
|
524 |
foreach ( $fields as $field_id ) {
|
525 |
$field_id = (int) $field_id;
|
@@ -550,13 +636,17 @@ class CCF_Form_Handler {
|
|
550 |
} else {
|
551 |
if ( ! in_array( $type, $save_skip_fields ) ) {
|
552 |
$submission[$slug] = $validation['sanitized_value'];
|
|
|
|
|
|
|
|
|
553 |
}
|
554 |
}
|
555 |
}
|
556 |
|
557 |
if ( ! empty( $errors ) ) {
|
558 |
$this->errors_by_form[$form_id] = $errors;
|
559 |
-
return false;
|
560 |
} else {
|
561 |
$submission_id = wp_insert_post( array(
|
562 |
'post_status' => 'publish',
|
@@ -567,11 +657,19 @@ class CCF_Form_Handler {
|
|
567 |
|
568 |
if ( ! is_wp_error( $submission_id ) ) {
|
569 |
update_post_meta( $submission_id, 'ccf_submission_data', $submission );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
570 |
} else {
|
571 |
-
return false;
|
572 |
}
|
573 |
|
574 |
$output = array(
|
|
|
575 |
'action_type' => get_post_meta( $form_id, 'ccf_form_completion_action_type', true ),
|
576 |
);
|
577 |
|
59 |
'sanitizer' => 'sanitize_text_field',
|
60 |
'validator' => array( $this, 'is_address' ),
|
61 |
),
|
62 |
+
'file' => array(
|
63 |
+
'sanitizer' => array( $this, 'handle_file' ),
|
64 |
+
'validator' => array( $this, 'is_file' ),
|
65 |
+
),
|
66 |
'date' => array(
|
67 |
'sanitizer' => 'sanitize_text_field',
|
68 |
'validator' => array( $this, 'is_date' ),
|
82 |
) );
|
83 |
}
|
84 |
|
85 |
+
/**
|
86 |
+
* Upload file and return relevant attachment info
|
87 |
+
*
|
88 |
+
* @param string $value
|
89 |
+
* @param int $field_id
|
90 |
+
* @since 6.4
|
91 |
+
* @return array|int
|
92 |
+
*/
|
93 |
+
public function handle_file( $value, $field_id ) {
|
94 |
+
|
95 |
+
$slug = get_post_meta( $field_id, 'ccf_field_slug', true );
|
96 |
+
|
97 |
+
$file_id = media_handle_upload( 'ccf_field_' . $slug, 0 );
|
98 |
+
|
99 |
+
if ( is_wp_error( $file_id ) ) {
|
100 |
+
return 0;
|
101 |
+
}
|
102 |
+
|
103 |
+
$url = wp_get_attachment_url( $file_id );
|
104 |
+
|
105 |
+
return array(
|
106 |
+
'id' => $file_id,
|
107 |
+
'url' => $url,
|
108 |
+
'file_name' => basename( $url ),
|
109 |
+
);
|
110 |
+
}
|
111 |
+
|
112 |
+
/**
|
113 |
+
* Validate a file upload.
|
114 |
+
*
|
115 |
+
* @param $value
|
116 |
+
* @param $field_id
|
117 |
+
* @param $required
|
118 |
+
* @since 6.4
|
119 |
+
* @return array|bool
|
120 |
+
*/
|
121 |
+
public function is_file( $value, $field_id, $required ) {
|
122 |
+
$slug = get_post_meta( $field_id, 'ccf_field_slug', true );
|
123 |
+
$errors = array();
|
124 |
+
|
125 |
+
if ( $required ) {
|
126 |
+
if ( empty( $_FILES['ccf_field_' . $slug] ) || 4 === $_FILES['ccf_field_' . $slug]['error'] ) {
|
127 |
+
return array( 'required' => esc_html__( 'This field is required.', 'custom-contact-forms' ) );
|
128 |
+
}
|
129 |
+
} else {
|
130 |
+
if ( ! empty( $_FILES['ccf_field_' . $slug] ) && 4 === $_FILES['ccf_field_' . $slug]['error'] ) {
|
131 |
+
return true;
|
132 |
+
}
|
133 |
+
}
|
134 |
+
|
135 |
+
$max_file_size = get_post_meta( $field_id, 'ccf_field_maxFileSize', true );
|
136 |
+
|
137 |
+
if ( ! empty( $max_file_size ) && $_FILES['ccf_field_' . $slug]['size'] > ( $max_file_size * 1000 * 1000 ) || 1 === $_FILES['ccf_field_' . $slug]['error'] ) {
|
138 |
+
$errors['file_size'] = sprintf( esc_html__( 'This file is too big (%d MB max)', 'custom-contact-forms' ), (int) $max_file_size );
|
139 |
+
}
|
140 |
+
|
141 |
+
if ( ! empty( $_FILES['ccf_field_' . $slug]['error'] ) || empty( $_FILES['ccf_field_' . $slug]['size'] ) ) {
|
142 |
+
return array( 'file_upload' => esc_html__( 'An upload error occurred.', 'custom-contact-forms' ) );
|
143 |
+
}
|
144 |
+
|
145 |
+
$extension = strtolower( pathinfo( $_FILES['ccf_field_' . $slug]['name'], PATHINFO_EXTENSION ) );
|
146 |
+
|
147 |
+
$valid_extensions = get_post_meta( $field_id, 'ccf_field_fileExtensions', true );
|
148 |
+
|
149 |
+
if ( ! empty( $valid_extensions ) ) {
|
150 |
+
$valid_extensions = strtolower( str_replace( ';', ',', $valid_extensions ) );
|
151 |
+
$valid_extensions = explode( ',', $valid_extensions );
|
152 |
+
|
153 |
+
foreach ( $valid_extensions as $key => $ext ) {
|
154 |
+
$ext = trim( $ext );
|
155 |
+
|
156 |
+
if ( empty( $ext ) ) {
|
157 |
+
unset( $valid_extensions[$key] );
|
158 |
+
} else {
|
159 |
+
$valid_extensions[$key] = $ext;
|
160 |
+
}
|
161 |
+
}
|
162 |
+
|
163 |
+
if ( ! empty( $valid_extensions ) && ! in_array( $extension, $valid_extensions ) ) {
|
164 |
+
$errors['file_extension'] = esc_html__( 'File contains an invalid extension.', 'custom-contact-forms' );
|
165 |
+
}
|
166 |
+
}
|
167 |
+
|
168 |
+
if ( ! empty( $errors ) ) {
|
169 |
+
return $errors;
|
170 |
+
}
|
171 |
+
|
172 |
+
return true;
|
173 |
+
}
|
174 |
+
|
175 |
/**
|
176 |
* Get errors for a form. Optional slug allows you to get errors from a specific field within a form
|
177 |
*
|
474 |
$errors['hour_required'] = esc_html__( 'Hour is required.', 'custom-contact-forms' );
|
475 |
} else {
|
476 |
if ( ! empty( $value['hour'] ) && ! preg_match( '#^([0-9]|/)+$#', $value['hour'] ) ) {
|
477 |
+
$errors['hour'] = esc_html__( 'This is not a valid hour.', 'custom-contact-forms' );
|
478 |
}
|
479 |
}
|
480 |
|
482 |
$errors['minutes_required'] = esc_html__( 'Minute is required.', 'custom-contact-forms' );
|
483 |
} else {
|
484 |
if ( ! empty( $value['minute'] ) && ! preg_match( '#^[0-9]+$#', $value['minute'] ) ) {
|
485 |
+
$errors['minute'] = esc_html__( 'This is not a valid minute.', 'custom-contact-forms' );
|
486 |
}
|
487 |
}
|
488 |
|
561 |
return;
|
562 |
}
|
563 |
|
564 |
+
$submission_response = $this->process_submission();
|
565 |
|
566 |
if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
|
567 |
+
wp_send_json( $submission_response );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
568 |
} else {
|
569 |
+
if ( ! empty( $submission_response['completion_redirect_url'] ) ) {
|
570 |
+
wp_redirect( esc_url_raw( $submission_response['completion_redirect_url'] ) );
|
571 |
+
exit;
|
|
|
|
|
572 |
}
|
573 |
}
|
574 |
}
|
576 |
/**
|
577 |
* Process a form submission
|
578 |
*
|
579 |
+
* @return array
|
580 |
*/
|
581 |
function process_submission() {
|
582 |
if ( ! empty( $_POST['my_information'] ) ) {
|
583 |
// Honeypot
|
584 |
+
return array( 'error' => 'honeypot', 'success' => false, );
|
585 |
}
|
586 |
|
587 |
if ( empty( $_POST['form_nonce'] ) || ! wp_verify_nonce( $_POST['form_nonce'], 'ccf_form' ) ) {
|
588 |
+
return array( 'error' => 'nonce', 'success' => false, );
|
589 |
}
|
590 |
|
591 |
$form_id = (int) $_POST['form_id'];
|
593 |
$form = get_post( $form_id );
|
594 |
|
595 |
if ( empty( $form ) ) {
|
596 |
+
return array( 'error' => 'missing_form', 'success' => false, );
|
597 |
}
|
598 |
|
599 |
$fields = get_post_meta( $form->ID, 'ccf_attached_fields', true );
|
605 |
|
606 |
$skip_fields = apply_filters( 'ccf_skip_fields', array( 'html', 'section-header' ), $form->ID );
|
607 |
$save_skip_fields = apply_filters( 'ccf_save_skip_fields', array( 'recaptcha' ), $form->ID );
|
608 |
+
$file_ids = array();
|
609 |
|
610 |
foreach ( $fields as $field_id ) {
|
611 |
$field_id = (int) $field_id;
|
636 |
} else {
|
637 |
if ( ! in_array( $type, $save_skip_fields ) ) {
|
638 |
$submission[$slug] = $validation['sanitized_value'];
|
639 |
+
|
640 |
+
if ( 'file' === $type ) {
|
641 |
+
$file_ids[] = $submission[$slug]['id'];
|
642 |
+
}
|
643 |
}
|
644 |
}
|
645 |
}
|
646 |
|
647 |
if ( ! empty( $errors ) ) {
|
648 |
$this->errors_by_form[$form_id] = $errors;
|
649 |
+
return array( 'error' => 'invalid_fields', 'field_errors' => $errors, 'success' => false, );
|
650 |
} else {
|
651 |
$submission_id = wp_insert_post( array(
|
652 |
'post_status' => 'publish',
|
657 |
|
658 |
if ( ! is_wp_error( $submission_id ) ) {
|
659 |
update_post_meta( $submission_id, 'ccf_submission_data', $submission );
|
660 |
+
|
661 |
+
foreach ( $file_ids as $file_id ) {
|
662 |
+
wp_update_post( array(
|
663 |
+
'ID' => $file_id,
|
664 |
+
'post_parent' => $submission_id,
|
665 |
+
) );
|
666 |
+
}
|
667 |
} else {
|
668 |
+
return array( 'error' => 'could_not_create_submission', 'success' => false, );
|
669 |
}
|
670 |
|
671 |
$output = array(
|
672 |
+
'success' => true,
|
673 |
'action_type' => get_post_meta( $form_id, 'ccf_form_completion_action_type', true ),
|
674 |
);
|
675 |
|
classes/class-ccf-form-manager.php
CHANGED
@@ -48,6 +48,11 @@ class CCF_Form_Manager {
|
|
48 |
* @since 6.0
|
49 |
*/
|
50 |
public function print_templates() {
|
|
|
|
|
|
|
|
|
|
|
51 |
?>
|
52 |
|
53 |
<script type="text/html" id="ccf-main-modal-template">
|
@@ -262,6 +267,10 @@ class CCF_Form_Manager {
|
|
262 |
<label for="ccf-field-label"><?php esc_html_e( 'Label:', 'custom-contact-forms' ); ?></label>
|
263 |
<input id="ccf-field-label" class="field-label" type="text" value="{{ field.label }}">
|
264 |
</div>
|
|
|
|
|
|
|
|
|
265 |
<div>
|
266 |
<label for="ccf-field-value"><?php esc_html_e( 'Initial Value:', 'custom-contact-forms' ); ?></label>
|
267 |
<input id="ccf-field-value" class="field-value" type="text" value="{{ field.value }}">
|
@@ -290,6 +299,52 @@ class CCF_Form_Manager {
|
|
290 |
</div>
|
291 |
</script>
|
292 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
293 |
<script type="text/html" id="ccf-recaptcha-template">
|
294 |
<div class="accordion-section expanded">
|
295 |
<h2 aria-hidden="true">Basic</h2>
|
@@ -299,6 +354,10 @@ class CCF_Form_Manager {
|
|
299 |
<label for="ccf-field-label"><?php esc_html_e( 'Label:', 'custom-contact-forms' ); ?></label>
|
300 |
<input id="ccf-field-label" class="field-label" type="text" value="{{ field.label }}">
|
301 |
</div>
|
|
|
|
|
|
|
|
|
302 |
<div>
|
303 |
<label for="ccf-field-site-key"><span class="required">*</span> <?php esc_html_e( 'Site Key:', 'custom-contact-forms' ); ?></label>
|
304 |
<input id="ccf-field-site-key" class="field-site-key" type="text" value="{{ field.siteKey }}">
|
@@ -334,6 +393,10 @@ class CCF_Form_Manager {
|
|
334 |
<label for="ccf-field-label"><?php esc_html_e( 'Label:', 'custom-contact-forms' ); ?></label>
|
335 |
<input id="ccf-field-label" class="field-label" type="text" value="{{ field.label }}">
|
336 |
</div>
|
|
|
|
|
|
|
|
|
337 |
<div>
|
338 |
<label for="ccf-field-value"><?php esc_html_e( 'Initial Value:', 'custom-contact-forms' ); ?></label>
|
339 |
<input id="ccf-field-value" class="field-value" type="text" value="{{ field.value }}">
|
@@ -420,6 +483,10 @@ class CCF_Form_Manager {
|
|
420 |
<label for="ccf-field-label"><?php esc_html_e( 'Label:', 'custom-contact-forms' ); ?></label>
|
421 |
<input id="ccf-field-label" class="field-label" type="text" value="{{ field.label }}">
|
422 |
</div>
|
|
|
|
|
|
|
|
|
423 |
<div>
|
424 |
<label for="ccf-field-value"><?php esc_html_e( 'Initial Value:', 'custom-contact-forms' ); ?></label>
|
425 |
<input id="ccf-field-value" class="field-value" type="text" value="{{ field.value }}">
|
@@ -485,6 +552,10 @@ class CCF_Form_Manager {
|
|
485 |
<label for="ccf-field-label"><?php esc_html_e( 'Label:', 'custom-contact-forms' ); ?></label>
|
486 |
<input id="ccf-field-label" class="field-label" type="text" value="{{ field.label }}">
|
487 |
</div>
|
|
|
|
|
|
|
|
|
488 |
<div>
|
489 |
<label for="ccf-field-required"><?php esc_html_e( 'Required:', 'custom-contact-forms' ); ?></label>
|
490 |
<select id="ccf-field-required" class="field-required">
|
@@ -517,6 +588,10 @@ class CCF_Form_Manager {
|
|
517 |
<label for="ccf-field-label"><?php esc_html_e( 'Label:', 'custom-contact-forms' ); ?></label>
|
518 |
<input id="ccf-field-label" class="field-label" type="text" value="{{ field.label }}">
|
519 |
</div>
|
|
|
|
|
|
|
|
|
520 |
<# if ( ! field.showTime ) { #>
|
521 |
<div>
|
522 |
<label for="ccf-field-value"><?php esc_html_e( 'Initial Value:', 'custom-contact-forms' ); ?></label>
|
@@ -569,6 +644,10 @@ class CCF_Form_Manager {
|
|
569 |
<label for="ccf-field-label"><?php esc_html_e( 'Label:', 'custom-contact-forms' ); ?></label>
|
570 |
<input id="ccf-field-label" class="field-label" type="text" value="{{ field.label }}">
|
571 |
</div>
|
|
|
|
|
|
|
|
|
572 |
<div>
|
573 |
<label for="ccf-field-value"><?php esc_html_e( 'Initial Value:', 'custom-contact-forms' ); ?></label>
|
574 |
<input id="ccf-field-value" class="field-value" type="text" value="{{ field.value }}">
|
@@ -616,6 +695,10 @@ class CCF_Form_Manager {
|
|
616 |
<label for="ccf-field-label"><?php esc_html_e( 'Label:', 'custom-contact-forms' ); ?></label>
|
617 |
<input id="ccf-field-label" class="field-label" type="text" value="{{ field.label }}">
|
618 |
</div>
|
|
|
|
|
|
|
|
|
619 |
<div>
|
620 |
<label for="ccf-field-address-type"><?php esc_html_e( 'Type:', 'custom-contact-forms' ); ?></label>
|
621 |
<select id="ccf-field-address-type" class="field-address-type">
|
@@ -655,6 +738,10 @@ class CCF_Form_Manager {
|
|
655 |
<label for="ccf-field-label"><?php esc_html_e( 'Label:', 'custom-contact-forms' ); ?></label>
|
656 |
<input id="ccf-field-label" class="field-label" type="text" value="{{ field.label }}">
|
657 |
</div>
|
|
|
|
|
|
|
|
|
658 |
<# if ( ! field.emailConfirmation ) { #>
|
659 |
<div>
|
660 |
<label for="ccf-field-value"><?php esc_html_e( 'Initial Value:', 'custom-contact-forms' ); ?></label>
|
@@ -715,6 +802,10 @@ class CCF_Form_Manager {
|
|
715 |
<label for="ccf-field-label"><?php esc_html_e( 'Label:', 'custom-contact-forms' ); ?></label>
|
716 |
<input id="ccf-field-label" class="field-label" type="text" value="{{ field.label }}">
|
717 |
</div>
|
|
|
|
|
|
|
|
|
718 |
<div>
|
719 |
<label for="ccf-field-required"><?php esc_html_e( 'Required:', 'custom-contact-forms' ); ?></label>
|
720 |
<select id="ccf-field-required" class="field-required">
|
@@ -754,6 +845,10 @@ class CCF_Form_Manager {
|
|
754 |
<label for="ccf-field-label"><?php esc_html_e( 'Label:', 'custom-contact-forms' ); ?></label>
|
755 |
<input id="ccf-field-label" class="field-label" type="text" value="{{ field.label }}">
|
756 |
</div>
|
|
|
|
|
|
|
|
|
757 |
<div>
|
758 |
<label for="ccf-field-required"><?php esc_html_e( 'Required:', 'custom-contact-forms' ); ?></label>
|
759 |
<select id="ccf-field-required" class="field-required">
|
@@ -793,6 +888,10 @@ class CCF_Form_Manager {
|
|
793 |
<label for="ccf-field-label"><?php esc_html_e( 'Label:', 'custom-contact-forms' ); ?></label>
|
794 |
<input id="ccf-field-label" class="field-label" type="text" value="{{ field.label }}">
|
795 |
</div>
|
|
|
|
|
|
|
|
|
796 |
<div>
|
797 |
<label for="ccf-field-required"><?php esc_html_e( 'Required:', 'custom-contact-forms' ); ?></label>
|
798 |
<select id="ccf-field-required" class="field-required">
|
@@ -822,23 +921,50 @@ class CCF_Form_Manager {
|
|
822 |
|
823 |
<script type="text/html" id="ccf-empty-form-table-row-template">
|
824 |
<td class="empty-form-table" colspan="6">
|
825 |
-
You currently have no forms. Add some!
|
826 |
</td>
|
827 |
</script>
|
828 |
|
829 |
<script type="text/html" id="ccf-single-line-text-preview-template">
|
830 |
<label>{{ field.label }} <# if ( field.required ) { #><span>*</span><# } #></label>
|
831 |
<input disabled type="text" placeholder="{{ field.placeholder }}" value="{{ field.value }}">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
832 |
</script>
|
833 |
|
834 |
<script type="text/html" id="ccf-recaptcha-preview-template">
|
835 |
<label>{{ field.label }} <# if ( field.required ) { #><span>*</span><# } #></label>
|
836 |
<img class="recaptcha-preview-img" src="<?php echo plugins_url( 'img/recaptcha.png', dirname( __FILE__ )); ?>">
|
|
|
|
|
|
|
837 |
</script>
|
838 |
|
839 |
<script type="text/html" id="ccf-paragraph-text-preview-template">
|
840 |
<label>{{ field.label }} <# if ( field.required ) { #><span>*</span><# } #></label>
|
841 |
<textarea placeholder="{{ field.placeholder }}" disabled>{{ field.value }}</textarea>
|
|
|
|
|
|
|
842 |
</script>
|
843 |
|
844 |
<script type="text/html" id="ccf-dropdown-preview-template">
|
@@ -852,6 +978,9 @@ class CCF_Form_Manager {
|
|
852 |
<# }); #>
|
853 |
<# } #>
|
854 |
</select>
|
|
|
|
|
|
|
855 |
</script>
|
856 |
|
857 |
<script type="text/html" id="ccf-radio-preview-template">
|
@@ -867,6 +996,9 @@ class CCF_Form_Manager {
|
|
867 |
</div>
|
868 |
<# }); #>
|
869 |
<# } #>
|
|
|
|
|
|
|
870 |
</script>
|
871 |
|
872 |
<script type="text/html" id="ccf-checkboxes-preview-template">
|
@@ -882,6 +1014,9 @@ class CCF_Form_Manager {
|
|
882 |
</div>
|
883 |
<# }); #>
|
884 |
<# } #>
|
|
|
|
|
|
|
885 |
</script>
|
886 |
|
887 |
<script type="text/html" id="ccf-html-preview-template">
|
@@ -909,6 +1044,9 @@ class CCF_Form_Manager {
|
|
909 |
<input type="text">
|
910 |
<label class="sub-label"><?php esc_html_e( 'Last', 'custom-contact-forms' ); ?></label>
|
911 |
</div>
|
|
|
|
|
|
|
912 |
</script>
|
913 |
|
914 |
<script type="text/html" id="ccf-date-preview-template">
|
@@ -954,6 +1092,9 @@ class CCF_Form_Manager {
|
|
954 |
</div>
|
955 |
</div>
|
956 |
<# } #>
|
|
|
|
|
|
|
957 |
</script>
|
958 |
|
959 |
<script type="text/html" id="ccf-address-preview-template">
|
@@ -1013,6 +1154,9 @@ class CCF_Form_Manager {
|
|
1013 |
<label class="sub-label"><?php esc_html_e( 'Country', 'custom-contact-forms' ); ?></label>
|
1014 |
</div>
|
1015 |
<# } #>
|
|
|
|
|
|
|
1016 |
</script>
|
1017 |
|
1018 |
<script type="text/html" id="ccf-email-preview-template">
|
@@ -1029,16 +1173,25 @@ class CCF_Form_Manager {
|
|
1029 |
<div class="sub-label"><?php esc_html_e( 'Confirm Email', 'custom-contact-forms' ); ?></div>
|
1030 |
</div>
|
1031 |
<# } #>
|
|
|
|
|
|
|
1032 |
</script>
|
1033 |
|
1034 |
<script type="text/html" id="ccf-website-preview-template">
|
1035 |
<label>{{ field.label }} <# if ( field.required ) { #><span>*</span><# } #></label>
|
1036 |
<input placeholder="<# if ( field.placeholder ) { #>{{ field.placeholder }}<# } else { #>http://<# } #>" disabled type="text" value="{{ field.value }}">
|
|
|
|
|
|
|
1037 |
</script>
|
1038 |
|
1039 |
<script type="text/html" id="ccf-phone-preview-template">
|
1040 |
<label>{{ field.label }} <# if ( field.required ) { #><span>*</span><# } #></label>
|
1041 |
<input placeholder="<# if ( field.placeholder ) { #>{{ field.placeholder }}<# } else { #>(301) 101-8976<# } #>" disabled type="text" value="{{ field.value }}">
|
|
|
|
|
|
|
1042 |
</script>
|
1043 |
|
1044 |
<script type="text/html" id="ccf-existing-form-table-row-template">
|
@@ -1154,6 +1307,8 @@ class CCF_Form_Manager {
|
|
1154 |
{{ utils.wordChop( utils.getPrettyFieldAddress( submission.data[column] ), 30 ) }}
|
1155 |
<# } else if ( utils.isFieldEmailConfirm( submission.data[column] ) ) { #>
|
1156 |
{{ utils.wordChop( utils.getPrettyFieldEmailConfirm( submission.data[column] ), 30 ) }}
|
|
|
|
|
1157 |
<# } else { #>
|
1158 |
<# for ( var key in submission.data[column] ) { if ( submission.data[column].hasOwnProperty( key ) ) {
|
1159 |
if ( submission.data[column][key] !== '' ) {
|
@@ -1203,6 +1358,8 @@ class CCF_Form_Manager {
|
|
1203 |
{{ utils.getPrettyFieldAddress( submission.data[column] ) }}
|
1204 |
<# } else if ( utils.isFieldEmailConfirm( submission.data[column] ) ) { #>
|
1205 |
{{ utils.getPrettyFieldEmailConfirm( submission.data[column] ) }}
|
|
|
|
|
1206 |
<# } else { #>
|
1207 |
<# for ( var key in submission.data[column] ) { if ( submission.data[column].hasOwnProperty( key ) ) {
|
1208 |
if ( submission.data[column][key] !== '' ) {
|
@@ -1295,6 +1452,7 @@ class CCF_Form_Manager {
|
|
1295 |
'radio' => __( 'Radio Buttons', 'custom-contact-forms' ),
|
1296 |
'paragraph-text' => __( 'Paragraph Text', 'custom-contact-forms' ),
|
1297 |
'hidden' => __( 'Hidden', 'custom-contact-forms' ),
|
|
|
1298 |
));
|
1299 |
|
1300 |
$structure_field_labels = apply_filters( 'ccf_structure_field_labels', array(
|
@@ -1325,6 +1483,7 @@ class CCF_Form_Manager {
|
|
1325 |
'postsPerPage' => (int) get_option( 'posts_per_page' ),
|
1326 |
'structureFieldLabels' => $structure_field_labels,
|
1327 |
'specialFieldLabels' => $special_field_labels,
|
|
|
1328 |
'noEmailFields' => esc_html__( 'You have no email fields', 'custom-contact-forms' ),
|
1329 |
'invalidDate' => esc_html__( 'Invalid date', 'custom-contact-forms' ),
|
1330 |
'allLabels' => array_merge( $field_labels, $structure_field_labels, $special_field_labels ),
|
48 |
* @since 6.0
|
49 |
*/
|
50 |
public function print_templates() {
|
51 |
+
$max_upload_size = wp_max_upload_size();
|
52 |
+
if ( ! $max_upload_size ) {
|
53 |
+
$max_upload_size = 0;
|
54 |
+
}
|
55 |
+
|
56 |
?>
|
57 |
|
58 |
<script type="text/html" id="ccf-main-modal-template">
|
267 |
<label for="ccf-field-label"><?php esc_html_e( 'Label:', 'custom-contact-forms' ); ?></label>
|
268 |
<input id="ccf-field-label" class="field-label" type="text" value="{{ field.label }}">
|
269 |
</div>
|
270 |
+
<div>
|
271 |
+
<label for="ccf-field-description"><?php esc_html_e( 'Description:', 'custom-contact-forms' ); ?></label>
|
272 |
+
<textarea id="ccf-field-description" class="field-description">{{ field.description }}</textarea>
|
273 |
+
</div>
|
274 |
<div>
|
275 |
<label for="ccf-field-value"><?php esc_html_e( 'Initial Value:', 'custom-contact-forms' ); ?></label>
|
276 |
<input id="ccf-field-value" class="field-value" type="text" value="{{ field.value }}">
|
299 |
</div>
|
300 |
</script>
|
301 |
|
302 |
+
<script type="text/html" id="ccf-file-template">
|
303 |
+
<div class="accordion-section expanded">
|
304 |
+
<h2 aria-hidden="true">Basic</h2>
|
305 |
+
<div class="section-content">
|
306 |
+
<div>
|
307 |
+
<label for="ccf-field-slug"><span class="required">*</span> <?php esc_html_e( 'Internal Unique Slug', 'custom-contact-forms' ); ?> (a-z, 0-9, -, _):</label>
|
308 |
+
<input id="ccf-field-slug" class="field-slug" type="text" value="{{ field.slug }}">
|
309 |
+
</div>
|
310 |
+
<div>
|
311 |
+
<label for="ccf-field-label"><?php esc_html_e( 'Label:', 'custom-contact-forms' ); ?></label>
|
312 |
+
<input id="ccf-field-label" class="field-label" type="text" value="{{ field.label }}">
|
313 |
+
</div>
|
314 |
+
<div>
|
315 |
+
<label for="ccf-field-description"><?php esc_html_e( 'Description:', 'custom-contact-forms' ); ?></label>
|
316 |
+
<textarea id="ccf-field-description" class="field-description">{{ field.description }}</textarea>
|
317 |
+
</div>
|
318 |
+
<div>
|
319 |
+
<label for="ccf-field-file-extensions"><?php esc_html_e( 'Allowed File Extensions (comma separate):', 'custom-contact-forms' ); ?></label>
|
320 |
+
<input id="ccf-field-file-extensions" class="field-file-extensions" type="text" value="{{ field.fileExtensions }}">
|
321 |
+
<span class="explain"><?php _e( 'If left blank, will default to all extensions registered by WordPress. If you use a file extension or mime type not <a href="http://codex.wordpress.org/Function_Reference/get_allowed_mime_types">whitelisted by WordPress</a>, you will need to filter and manually whitelist the new extension.', 'custom-contact-forms' ); ?></span>
|
322 |
+
</div>
|
323 |
+
<div>
|
324 |
+
<label for="ccf-field-max-file-size"><?php esc_html_e( 'Max File Size (in MB):', 'custom-contact-forms' ); ?></label>
|
325 |
+
<input id="ccf-field-max-file-size" class="field-max-file-size" type="text" value="{{ field.maxFileSize }}">
|
326 |
+
<span class="explain"><?php printf( esc_html__( 'If left blank, will default to %d MB. Maximum allowed by server is %d MB.', 'custom-contact-forms' ), (double) size_format( $max_upload_size ), (double) size_format( $max_upload_size ) ); ?></span>
|
327 |
+
</div>
|
328 |
+
<div>
|
329 |
+
<label for="ccf-field-required"><?php esc_html_e( 'Required:', 'custom-contact-forms' ); ?></label>
|
330 |
+
<select id="ccf-field-required" class="field-required">
|
331 |
+
<option value="1"><?php esc_html_e( 'Yes', 'custom-contact-forms' ); ?></option>
|
332 |
+
<option value="0" <# if ( ! field.required ) { #>selected="selected"<# } #>><?php esc_html_e( 'No', 'custom-contact-forms' ); ?></option>
|
333 |
+
</select>
|
334 |
+
</div>
|
335 |
+
</div>
|
336 |
+
</div>
|
337 |
+
<div class="accordion-section">
|
338 |
+
<h2 aria-hidden="true"><?php esc_html_e( 'Advanced', 'custom-contact-forms' ); ?></h2>
|
339 |
+
<div class="section-content">
|
340 |
+
<div>
|
341 |
+
<label for="ccf-field-class-name"><?php esc_html_e( 'Class Name:', 'custom-contact-forms' ); ?></label>
|
342 |
+
<input id="ccf-field-class-name" class="field-class-name" type="text" value="{{ field.className }}">
|
343 |
+
</div>
|
344 |
+
</div>
|
345 |
+
</div>
|
346 |
+
</script>
|
347 |
+
|
348 |
<script type="text/html" id="ccf-recaptcha-template">
|
349 |
<div class="accordion-section expanded">
|
350 |
<h2 aria-hidden="true">Basic</h2>
|
354 |
<label for="ccf-field-label"><?php esc_html_e( 'Label:', 'custom-contact-forms' ); ?></label>
|
355 |
<input id="ccf-field-label" class="field-label" type="text" value="{{ field.label }}">
|
356 |
</div>
|
357 |
+
<div>
|
358 |
+
<label for="ccf-field-description"><?php esc_html_e( 'Description:', 'custom-contact-forms' ); ?></label>
|
359 |
+
<textarea id="ccf-field-description" class="field-description">{{ field.description }}</textarea>
|
360 |
+
</div>
|
361 |
<div>
|
362 |
<label for="ccf-field-site-key"><span class="required">*</span> <?php esc_html_e( 'Site Key:', 'custom-contact-forms' ); ?></label>
|
363 |
<input id="ccf-field-site-key" class="field-site-key" type="text" value="{{ field.siteKey }}">
|
393 |
<label for="ccf-field-label"><?php esc_html_e( 'Label:', 'custom-contact-forms' ); ?></label>
|
394 |
<input id="ccf-field-label" class="field-label" type="text" value="{{ field.label }}">
|
395 |
</div>
|
396 |
+
<div>
|
397 |
+
<label for="ccf-field-description"><?php esc_html_e( 'Description:', 'custom-contact-forms' ); ?></label>
|
398 |
+
<textarea id="ccf-field-description" class="field-description">{{ field.description }}</textarea>
|
399 |
+
</div>
|
400 |
<div>
|
401 |
<label for="ccf-field-value"><?php esc_html_e( 'Initial Value:', 'custom-contact-forms' ); ?></label>
|
402 |
<input id="ccf-field-value" class="field-value" type="text" value="{{ field.value }}">
|
483 |
<label for="ccf-field-label"><?php esc_html_e( 'Label:', 'custom-contact-forms' ); ?></label>
|
484 |
<input id="ccf-field-label" class="field-label" type="text" value="{{ field.label }}">
|
485 |
</div>
|
486 |
+
<div>
|
487 |
+
<label for="ccf-field-description"><?php esc_html_e( 'Description:', 'custom-contact-forms' ); ?></label>
|
488 |
+
<textarea id="ccf-field-description" class="field-description">{{ field.description }}</textarea>
|
489 |
+
</div>
|
490 |
<div>
|
491 |
<label for="ccf-field-value"><?php esc_html_e( 'Initial Value:', 'custom-contact-forms' ); ?></label>
|
492 |
<input id="ccf-field-value" class="field-value" type="text" value="{{ field.value }}">
|
552 |
<label for="ccf-field-label"><?php esc_html_e( 'Label:', 'custom-contact-forms' ); ?></label>
|
553 |
<input id="ccf-field-label" class="field-label" type="text" value="{{ field.label }}">
|
554 |
</div>
|
555 |
+
<div>
|
556 |
+
<label for="ccf-field-description"><?php esc_html_e( 'Description:', 'custom-contact-forms' ); ?></label>
|
557 |
+
<textarea id="ccf-field-description" class="field-description">{{ field.description }}</textarea>
|
558 |
+
</div>
|
559 |
<div>
|
560 |
<label for="ccf-field-required"><?php esc_html_e( 'Required:', 'custom-contact-forms' ); ?></label>
|
561 |
<select id="ccf-field-required" class="field-required">
|
588 |
<label for="ccf-field-label"><?php esc_html_e( 'Label:', 'custom-contact-forms' ); ?></label>
|
589 |
<input id="ccf-field-label" class="field-label" type="text" value="{{ field.label }}">
|
590 |
</div>
|
591 |
+
<div>
|
592 |
+
<label for="ccf-field-description"><?php esc_html_e( 'Description:', 'custom-contact-forms' ); ?></label>
|
593 |
+
<textarea id="ccf-field-description" class="field-description">{{ field.description }}</textarea>
|
594 |
+
</div>
|
595 |
<# if ( ! field.showTime ) { #>
|
596 |
<div>
|
597 |
<label for="ccf-field-value"><?php esc_html_e( 'Initial Value:', 'custom-contact-forms' ); ?></label>
|
644 |
<label for="ccf-field-label"><?php esc_html_e( 'Label:', 'custom-contact-forms' ); ?></label>
|
645 |
<input id="ccf-field-label" class="field-label" type="text" value="{{ field.label }}">
|
646 |
</div>
|
647 |
+
<div>
|
648 |
+
<label for="ccf-field-description"><?php esc_html_e( 'Description:', 'custom-contact-forms' ); ?></label>
|
649 |
+
<textarea id="ccf-field-description" class="field-description">{{ field.description }}</textarea>
|
650 |
+
</div>
|
651 |
<div>
|
652 |
<label for="ccf-field-value"><?php esc_html_e( 'Initial Value:', 'custom-contact-forms' ); ?></label>
|
653 |
<input id="ccf-field-value" class="field-value" type="text" value="{{ field.value }}">
|
695 |
<label for="ccf-field-label"><?php esc_html_e( 'Label:', 'custom-contact-forms' ); ?></label>
|
696 |
<input id="ccf-field-label" class="field-label" type="text" value="{{ field.label }}">
|
697 |
</div>
|
698 |
+
<div>
|
699 |
+
<label for="ccf-field-description"><?php esc_html_e( 'Description:', 'custom-contact-forms' ); ?></label>
|
700 |
+
<textarea id="ccf-field-description" class="field-description">{{ field.description }}</textarea>
|
701 |
+
</div>
|
702 |
<div>
|
703 |
<label for="ccf-field-address-type"><?php esc_html_e( 'Type:', 'custom-contact-forms' ); ?></label>
|
704 |
<select id="ccf-field-address-type" class="field-address-type">
|
738 |
<label for="ccf-field-label"><?php esc_html_e( 'Label:', 'custom-contact-forms' ); ?></label>
|
739 |
<input id="ccf-field-label" class="field-label" type="text" value="{{ field.label }}">
|
740 |
</div>
|
741 |
+
<div>
|
742 |
+
<label for="ccf-field-description"><?php esc_html_e( 'Description:', 'custom-contact-forms' ); ?></label>
|
743 |
+
<textarea id="ccf-field-description" class="field-description">{{ field.description }}</textarea>
|
744 |
+
</div>
|
745 |
<# if ( ! field.emailConfirmation ) { #>
|
746 |
<div>
|
747 |
<label for="ccf-field-value"><?php esc_html_e( 'Initial Value:', 'custom-contact-forms' ); ?></label>
|
802 |
<label for="ccf-field-label"><?php esc_html_e( 'Label:', 'custom-contact-forms' ); ?></label>
|
803 |
<input id="ccf-field-label" class="field-label" type="text" value="{{ field.label }}">
|
804 |
</div>
|
805 |
+
<div>
|
806 |
+
<label for="ccf-field-description"><?php esc_html_e( 'Description:', 'custom-contact-forms' ); ?></label>
|
807 |
+
<textarea id="ccf-field-description" class="field-description">{{ field.description }}</textarea>
|
808 |
+
</div>
|
809 |
<div>
|
810 |
<label for="ccf-field-required"><?php esc_html_e( 'Required:', 'custom-contact-forms' ); ?></label>
|
811 |
<select id="ccf-field-required" class="field-required">
|
845 |
<label for="ccf-field-label"><?php esc_html_e( 'Label:', 'custom-contact-forms' ); ?></label>
|
846 |
<input id="ccf-field-label" class="field-label" type="text" value="{{ field.label }}">
|
847 |
</div>
|
848 |
+
<div>
|
849 |
+
<label for="ccf-field-description"><?php esc_html_e( 'Description:', 'custom-contact-forms' ); ?></label>
|
850 |
+
<textarea id="ccf-field-description" class="field-description">{{ field.description }}</textarea>
|
851 |
+
</div>
|
852 |
<div>
|
853 |
<label for="ccf-field-required"><?php esc_html_e( 'Required:', 'custom-contact-forms' ); ?></label>
|
854 |
<select id="ccf-field-required" class="field-required">
|
888 |
<label for="ccf-field-label"><?php esc_html_e( 'Label:', 'custom-contact-forms' ); ?></label>
|
889 |
<input id="ccf-field-label" class="field-label" type="text" value="{{ field.label }}">
|
890 |
</div>
|
891 |
+
<div>
|
892 |
+
<label for="ccf-field-description"><?php esc_html_e( 'Description:', 'custom-contact-forms' ); ?></label>
|
893 |
+
<textarea id="ccf-field-description" class="field-description">{{ field.description }}</textarea>
|
894 |
+
</div>
|
895 |
<div>
|
896 |
<label for="ccf-field-required"><?php esc_html_e( 'Required:', 'custom-contact-forms' ); ?></label>
|
897 |
<select id="ccf-field-required" class="field-required">
|
921 |
|
922 |
<script type="text/html" id="ccf-empty-form-table-row-template">
|
923 |
<td class="empty-form-table" colspan="6">
|
924 |
+
<?php esc_html_e( 'You currently have no forms. Add some!', 'custom-contact-forms' ); ?>
|
925 |
</td>
|
926 |
</script>
|
927 |
|
928 |
<script type="text/html" id="ccf-single-line-text-preview-template">
|
929 |
<label>{{ field.label }} <# if ( field.required ) { #><span>*</span><# } #></label>
|
930 |
<input disabled type="text" placeholder="{{ field.placeholder }}" value="{{ field.value }}">
|
931 |
+
<# if ( field.description ) { #>
|
932 |
+
<div class="field-description">{{ field.description }}</div>
|
933 |
+
<# } #>
|
934 |
+
</script>
|
935 |
+
|
936 |
+
<script type="text/html" id="ccf-file-preview-template">
|
937 |
+
<label>{{ field.label }} <# if ( field.required ) { #><span>*</span><# } #></label>
|
938 |
+
<input disabled type="file" placeholder="{{ field.placeholder }}" value="{{ field.value }}">
|
939 |
+
<div class="field-description">
|
940 |
+
<# if ( field.fileExtensions ) {
|
941 |
+
var extensions = field.fileExtensions.toLowerCase().replace( /\s/g, '' ).split( ',' ).join( ', ' );
|
942 |
+
var file_size = <?php echo floor( $max_upload_size / 1000 / 1000 ); ?>;
|
943 |
+
if ( field.maxFileSize ) {
|
944 |
+
file_size = field.maxFileSize;
|
945 |
+
}
|
946 |
+
#>
|
947 |
+
<?php esc_html_e( 'Allowed file extensions are {{ extensions }}. ', 'custom-contact-forms' ); ?>
|
948 |
+
<# } #>
|
949 |
+
<?php esc_html_e( 'Max file size is {{ file_size }} MB. ', 'custom-contact-forms' ); ?>
|
950 |
+
{{ field.description }}
|
951 |
+
</div>
|
952 |
</script>
|
953 |
|
954 |
<script type="text/html" id="ccf-recaptcha-preview-template">
|
955 |
<label>{{ field.label }} <# if ( field.required ) { #><span>*</span><# } #></label>
|
956 |
<img class="recaptcha-preview-img" src="<?php echo plugins_url( 'img/recaptcha.png', dirname( __FILE__ )); ?>">
|
957 |
+
<# if ( field.description ) { #>
|
958 |
+
<div class="field-description">{{ field.description }}</div>
|
959 |
+
<# } #>
|
960 |
</script>
|
961 |
|
962 |
<script type="text/html" id="ccf-paragraph-text-preview-template">
|
963 |
<label>{{ field.label }} <# if ( field.required ) { #><span>*</span><# } #></label>
|
964 |
<textarea placeholder="{{ field.placeholder }}" disabled>{{ field.value }}</textarea>
|
965 |
+
<# if ( field.description ) { #>
|
966 |
+
<div class="field-description">{{ field.description }}</div>
|
967 |
+
<# } #>
|
968 |
</script>
|
969 |
|
970 |
<script type="text/html" id="ccf-dropdown-preview-template">
|
978 |
<# }); #>
|
979 |
<# } #>
|
980 |
</select>
|
981 |
+
<# if ( field.description ) { #>
|
982 |
+
<div class="field-description">{{ field.description }}</div>
|
983 |
+
<# } #>
|
984 |
</script>
|
985 |
|
986 |
<script type="text/html" id="ccf-radio-preview-template">
|
996 |
</div>
|
997 |
<# }); #>
|
998 |
<# } #>
|
999 |
+
<# if ( field.description ) { #>
|
1000 |
+
<div class="field-description">{{ field.description }}</div>
|
1001 |
+
<# } #>
|
1002 |
</script>
|
1003 |
|
1004 |
<script type="text/html" id="ccf-checkboxes-preview-template">
|
1014 |
</div>
|
1015 |
<# }); #>
|
1016 |
<# } #>
|
1017 |
+
<# if ( field.description ) { #>
|
1018 |
+
<div class="field-description">{{ field.description }}</div>
|
1019 |
+
<# } #>
|
1020 |
</script>
|
1021 |
|
1022 |
<script type="text/html" id="ccf-html-preview-template">
|
1044 |
<input type="text">
|
1045 |
<label class="sub-label"><?php esc_html_e( 'Last', 'custom-contact-forms' ); ?></label>
|
1046 |
</div>
|
1047 |
+
<# if ( field.description ) { #>
|
1048 |
+
<div class="field-description">{{ field.description }}</div>
|
1049 |
+
<# } #>
|
1050 |
</script>
|
1051 |
|
1052 |
<script type="text/html" id="ccf-date-preview-template">
|
1092 |
</div>
|
1093 |
</div>
|
1094 |
<# } #>
|
1095 |
+
<# if ( field.description ) { #>
|
1096 |
+
<div class="field-description">{{ field.description }}</div>
|
1097 |
+
<# } #>
|
1098 |
</script>
|
1099 |
|
1100 |
<script type="text/html" id="ccf-address-preview-template">
|
1154 |
<label class="sub-label"><?php esc_html_e( 'Country', 'custom-contact-forms' ); ?></label>
|
1155 |
</div>
|
1156 |
<# } #>
|
1157 |
+
<# if ( field.description ) { #>
|
1158 |
+
<div class="field-description">{{ field.description }}</div>
|
1159 |
+
<# } #>
|
1160 |
</script>
|
1161 |
|
1162 |
<script type="text/html" id="ccf-email-preview-template">
|
1173 |
<div class="sub-label"><?php esc_html_e( 'Confirm Email', 'custom-contact-forms' ); ?></div>
|
1174 |
</div>
|
1175 |
<# } #>
|
1176 |
+
<# if ( field.description ) { #>
|
1177 |
+
<div class="field-description">{{ field.description }}</div>
|
1178 |
+
<# } #>
|
1179 |
</script>
|
1180 |
|
1181 |
<script type="text/html" id="ccf-website-preview-template">
|
1182 |
<label>{{ field.label }} <# if ( field.required ) { #><span>*</span><# } #></label>
|
1183 |
<input placeholder="<# if ( field.placeholder ) { #>{{ field.placeholder }}<# } else { #>http://<# } #>" disabled type="text" value="{{ field.value }}">
|
1184 |
+
<# if ( field.description ) { #>
|
1185 |
+
<div class="field-description">{{ field.description }}</div>
|
1186 |
+
<# } #>
|
1187 |
</script>
|
1188 |
|
1189 |
<script type="text/html" id="ccf-phone-preview-template">
|
1190 |
<label>{{ field.label }} <# if ( field.required ) { #><span>*</span><# } #></label>
|
1191 |
<input placeholder="<# if ( field.placeholder ) { #>{{ field.placeholder }}<# } else { #>(301) 101-8976<# } #>" disabled type="text" value="{{ field.value }}">
|
1192 |
+
<# if ( field.description ) { #>
|
1193 |
+
<div class="field-description">{{ field.description }}</div>
|
1194 |
+
<# } #>
|
1195 |
</script>
|
1196 |
|
1197 |
<script type="text/html" id="ccf-existing-form-table-row-template">
|
1307 |
{{ utils.wordChop( utils.getPrettyFieldAddress( submission.data[column] ), 30 ) }}
|
1308 |
<# } else if ( utils.isFieldEmailConfirm( submission.data[column] ) ) { #>
|
1309 |
{{ utils.wordChop( utils.getPrettyFieldEmailConfirm( submission.data[column] ), 30 ) }}
|
1310 |
+
<# } else if ( utils.isFieldFile( submission.data[column] ) ) { #>
|
1311 |
+
<a href="{{ submission.data[column].url }}">{{ submission.data[column].file_name }}</a>
|
1312 |
<# } else { #>
|
1313 |
<# for ( var key in submission.data[column] ) { if ( submission.data[column].hasOwnProperty( key ) ) {
|
1314 |
if ( submission.data[column][key] !== '' ) {
|
1358 |
{{ utils.getPrettyFieldAddress( submission.data[column] ) }}
|
1359 |
<# } else if ( utils.isFieldEmailConfirm( submission.data[column] ) ) { #>
|
1360 |
{{ utils.getPrettyFieldEmailConfirm( submission.data[column] ) }}
|
1361 |
+
<# } else if ( utils.isFieldFile( submission.data[column] ) ) { #>
|
1362 |
+
<a href="{{ submission.data[column].url }}">{{ submission.data[column].file_name }}</a>
|
1363 |
<# } else { #>
|
1364 |
<# for ( var key in submission.data[column] ) { if ( submission.data[column].hasOwnProperty( key ) ) {
|
1365 |
if ( submission.data[column][key] !== '' ) {
|
1452 |
'radio' => __( 'Radio Buttons', 'custom-contact-forms' ),
|
1453 |
'paragraph-text' => __( 'Paragraph Text', 'custom-contact-forms' ),
|
1454 |
'hidden' => __( 'Hidden', 'custom-contact-forms' ),
|
1455 |
+
'file' => __( 'File Upload', 'custom-contact-forms' ),
|
1456 |
));
|
1457 |
|
1458 |
$structure_field_labels = apply_filters( 'ccf_structure_field_labels', array(
|
1483 |
'postsPerPage' => (int) get_option( 'posts_per_page' ),
|
1484 |
'structureFieldLabels' => $structure_field_labels,
|
1485 |
'specialFieldLabels' => $special_field_labels,
|
1486 |
+
'maxFileSize' => floor( wp_max_upload_size() / 1000 / 1000 ),
|
1487 |
'noEmailFields' => esc_html__( 'You have no email fields', 'custom-contact-forms' ),
|
1488 |
'invalidDate' => esc_html__( 'Invalid date', 'custom-contact-forms' ),
|
1489 |
'allLabels' => array_merge( $field_labels, $structure_field_labels, $special_field_labels ),
|
classes/class-ccf-form-renderer.php
CHANGED
@@ -60,6 +60,9 @@ class CCF_Form_Renderer {
|
|
60 |
'hour' => esc_html__( 'This is not a valid hour.', 'custom-contact-forms' ),
|
61 |
'date' => esc_html__( 'This date is not valid.', 'custom-contact-forms' ),
|
62 |
'minute' => esc_html__( 'This is not a valid minute.', 'custom-contact-forms' ),
|
|
|
|
|
|
|
63 |
'website' => esc_html__( "This is not a valid URL. URL's must start with http(s)://", 'custom-contact-forms' ),
|
64 |
);
|
65 |
wp_localize_script( 'ccf-form', 'ccfSettings', apply_filters( 'ccf_localized_form_messages', $localized ) );
|
@@ -121,10 +124,25 @@ class CCF_Form_Renderer {
|
|
121 |
|
122 |
<?php
|
123 |
} else {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
124 |
?>
|
125 |
|
126 |
<div class="ccf-form-wrapper form-id-<?php echo (int) $form_id; ?>" data-form-id="<?php echo (int) $form_id; ?>">
|
127 |
-
<form class="ccf-form" method="post" action="" data-form-id="<?php echo (int) $form_id; ?>">
|
128 |
|
129 |
<?php $title = get_the_title( $form_id ); if ( ! empty( $title ) && apply_filters( 'ccf_show_form_title', true, $form_id ) ) : ?>
|
130 |
<div class="form-title">
|
@@ -138,19 +156,8 @@ class CCF_Form_Renderer {
|
|
138 |
</div>
|
139 |
<?php endif; ?>
|
140 |
|
141 |
-
<?php
|
142 |
|
143 |
-
foreach ( $fields as $field_id ) {
|
144 |
-
$field_id = (int) $field_id;
|
145 |
-
|
146 |
-
$type = esc_attr( get_post_meta( $field_id, 'ccf_field_type', true ) );
|
147 |
-
|
148 |
-
$field_html = apply_filters( 'ccf_field_html', CCF_Field_Renderer::factory()->render_router( $type, $field_id, $form_id ), $type, $field_id );
|
149 |
-
|
150 |
-
echo $field_html;
|
151 |
-
}
|
152 |
-
|
153 |
-
?>
|
154 |
<div class="form-submit">
|
155 |
<input type="submit" class="ccf-submit-button" value="<?php echo esc_attr( get_post_meta( $form_id, 'ccf_form_buttonText', true ) ); ?>">
|
156 |
<img class="loading-img" src="<?php echo esc_url( site_url( '/wp-admin/images/wpspin_light.gif' ) ); ?>">
|
@@ -162,6 +169,8 @@ class CCF_Form_Renderer {
|
|
162 |
<input type="hidden" name="ccf_form" value="1">
|
163 |
<input type="hidden" name="form_nonce" value="<?php echo wp_create_nonce( 'ccf_form' ); ?>">
|
164 |
</form>
|
|
|
|
|
165 |
</div>
|
166 |
|
167 |
<?php
|
60 |
'hour' => esc_html__( 'This is not a valid hour.', 'custom-contact-forms' ),
|
61 |
'date' => esc_html__( 'This date is not valid.', 'custom-contact-forms' ),
|
62 |
'minute' => esc_html__( 'This is not a valid minute.', 'custom-contact-forms' ),
|
63 |
+
'fileExtension' => esc_html__( 'This is not an allowed file extension', 'custom-contact-forms' ),
|
64 |
+
'fileSize' => esc_html__( 'This file is bigger than', 'custom-contact-forms' ),
|
65 |
+
'unknown' => esc_html__( 'An unknown error occured.', 'custom-contact-forms' ),
|
66 |
'website' => esc_html__( "This is not a valid URL. URL's must start with http(s)://", 'custom-contact-forms' ),
|
67 |
);
|
68 |
wp_localize_script( 'ccf-form', 'ccfSettings', apply_filters( 'ccf_localized_form_messages', $localized ) );
|
124 |
|
125 |
<?php
|
126 |
} else {
|
127 |
+
$contains_file = false;
|
128 |
+
|
129 |
+
$fields_html = '';
|
130 |
+
|
131 |
+
foreach ( $fields as $field_id ) {
|
132 |
+
$field_id = (int) $field_id;
|
133 |
+
|
134 |
+
$type = esc_attr( get_post_meta( $field_id, 'ccf_field_type', true ) );
|
135 |
+
|
136 |
+
if ( 'file' === $type ) {
|
137 |
+
$contains_file = true;
|
138 |
+
}
|
139 |
+
|
140 |
+
$fields_html .= apply_filters( 'ccf_field_html', CCF_Field_Renderer::factory()->render_router( $type, $field_id, $form_id ), $type, $field_id );
|
141 |
+
}
|
142 |
?>
|
143 |
|
144 |
<div class="ccf-form-wrapper form-id-<?php echo (int) $form_id; ?>" data-form-id="<?php echo (int) $form_id; ?>">
|
145 |
+
<form <?php if ( $contains_file ) : ?>enctype="multipart/form-data"<?php endif; ?> novalidate class="ccf-form" method="post" action="" data-form-id="<?php echo (int) $form_id; ?>">
|
146 |
|
147 |
<?php $title = get_the_title( $form_id ); if ( ! empty( $title ) && apply_filters( 'ccf_show_form_title', true, $form_id ) ) : ?>
|
148 |
<div class="form-title">
|
156 |
</div>
|
157 |
<?php endif; ?>
|
158 |
|
159 |
+
<?php echo $fields_html; ?>
|
160 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
161 |
<div class="form-submit">
|
162 |
<input type="submit" class="ccf-submit-button" value="<?php echo esc_attr( get_post_meta( $form_id, 'ccf_form_buttonText', true ) ); ?>">
|
163 |
<img class="loading-img" src="<?php echo esc_url( site_url( '/wp-admin/images/wpspin_light.gif' ) ); ?>">
|
169 |
<input type="hidden" name="ccf_form" value="1">
|
170 |
<input type="hidden" name="form_nonce" value="<?php echo wp_create_nonce( 'ccf_form' ); ?>">
|
171 |
</form>
|
172 |
+
|
173 |
+
<iframe onload="wp.ccf.iframeOnload( <?php echo (int) $form_id; ?> );" class="ccf-form-frame" id="ccf_form_frame_<?php echo (int) $form_id; ?>" name="ccf_form_frame_<?php echo (int) $form_id; ?>"></iframe>
|
174 |
</div>
|
175 |
|
176 |
<?php
|
classes/class-ccf-submission-cpt.php
CHANGED
@@ -10,6 +10,25 @@ class CCF_Submission_CPT {
|
|
10 |
*/
|
11 |
public function setup() {
|
12 |
add_action( 'init', array( $this, 'setup_cpt' ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
}
|
14 |
|
15 |
/**
|
10 |
*/
|
11 |
public function setup() {
|
12 |
add_action( 'init', array( $this, 'setup_cpt' ) );
|
13 |
+
add_action( 'before_delete_post', array( $this, 'action_before_delete_post' ) );
|
14 |
+
}
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Clean up attachments when we delete a submission
|
18 |
+
*
|
19 |
+
* @param int $post_id
|
20 |
+
* @since 6.4
|
21 |
+
*/
|
22 |
+
public function action_before_delete_post( $post_id ) {
|
23 |
+
if ( 'ccf_submission' === get_post_type( $post_id ) ) {
|
24 |
+
$attachments = get_children( array( 'post_parent' => $post_id, 'numberposts' => apply_filters( 'ccf_max_submission_attachments', 5000, get_post( $post_id ) ) ) );
|
25 |
+
|
26 |
+
if ( ! empty( $attachments ) ) {
|
27 |
+
foreach ( $attachments as $attachment ) {
|
28 |
+
wp_delete_attachment( $attachment->ID, true );
|
29 |
+
}
|
30 |
+
}
|
31 |
+
}
|
32 |
}
|
33 |
|
34 |
/**
|
classes/class-ccf-widget.php
ADDED
@@ -0,0 +1,101 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Class CCF_Widget
|
4 |
+
*
|
5 |
+
* This widget simply lets you display a form in a sidebar.
|
6 |
+
*
|
7 |
+
* @since 6.4
|
8 |
+
*/
|
9 |
+
class CCF_Widget extends WP_Widget {
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Initialize the widget
|
13 |
+
*
|
14 |
+
* @since 6.4
|
15 |
+
*/
|
16 |
+
public function __construct() {
|
17 |
+
$options = array( 'description' => esc_html__( 'Add a custom contact form to a sidebar.', 'custom-contact-forms' ) );
|
18 |
+
parent::__construct( 'custom-contact-forms', esc_html__( 'Custom Contact Form', 'custom-contact-forms' ), $options );
|
19 |
+
}
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Display widget
|
23 |
+
*
|
24 |
+
* @param array $args
|
25 |
+
* @param array $instance
|
26 |
+
*/
|
27 |
+
public function widget( $args, $instance ) {
|
28 |
+
if ( empty( $instance['form_id'] ) ) {
|
29 |
+
return;
|
30 |
+
}
|
31 |
+
|
32 |
+
echo $args['before_widget'];
|
33 |
+
|
34 |
+
if ( ! empty( $instance['title'] ) ) {
|
35 |
+
echo $args['before_title'] . apply_filters( 'widget_title', $instance['title'] ) . $args['after_title'];
|
36 |
+
}
|
37 |
+
|
38 |
+
ccf_output_form( $instance['form_id'] );
|
39 |
+
|
40 |
+
echo $args['after_widget'];
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Display widget management form
|
45 |
+
*
|
46 |
+
* @param array $instance
|
47 |
+
* @return string|void
|
48 |
+
*/
|
49 |
+
public function form( $instance ) {
|
50 |
+
$title = ( ! empty( $instance['title'] ) ) ? $instance['title'] : '';
|
51 |
+
$current_form_id = ( ! empty( $instance['form_id'] ) ) ? $instance['form_id'] : 0;
|
52 |
+
|
53 |
+
$forms_query = new WP_Query( array(
|
54 |
+
'post_type' => 'ccf_form',
|
55 |
+
'posts_per_page' => apply_filters( 'ccf_max_widget_forms', 5000 ),
|
56 |
+
'no_found_rows' => true,
|
57 |
+
'post_status' => 'publish',
|
58 |
+
'fields' => 'ids',
|
59 |
+
|
60 |
+
) );
|
61 |
+
?>
|
62 |
+
<p>
|
63 |
+
<label for="<?php echo $this->get_field_id( 'title' ); ?>">
|
64 |
+
<?php esc_html_e( 'Title:', 'custom-contact-forms' ); ?>
|
65 |
+
</label>
|
66 |
+
<input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" />
|
67 |
+
</p>
|
68 |
+
|
69 |
+
<p>
|
70 |
+
<label for="<?php echo $this->get_field_id( 'form_id' ); ?>">
|
71 |
+
<?php esc_html_e( 'Choose a form:', 'custom-contact-forms' ); ?>
|
72 |
+
</label><br>
|
73 |
+
<select id="<?php echo $this->get_field_id( 'form_id' ); ?>" name="<?php echo $this->get_field_name( 'form_id' ); ?>">
|
74 |
+
<?php if ( $forms_query->have_posts() ) : ?>
|
75 |
+
<?php foreach ( $forms_query->posts as $form_id ) : ?>
|
76 |
+
<option <?php selected( $current_form_id, $form_id ); ?> value="<?php echo (int) $form_id; ?>">
|
77 |
+
<?php
|
78 |
+
$title = get_the_title( $form_id );
|
79 |
+
if ( empty( $title ) ) {
|
80 |
+
esc_html_e( 'Untitled', 'custom-contact-forms' );
|
81 |
+
} else {
|
82 |
+
echo esc_html( $title );
|
83 |
+
}
|
84 |
+
?>
|
85 |
+
(ID: <?php echo (int) $form_id; ?>)
|
86 |
+
</option>
|
87 |
+
<?php endforeach; ?>
|
88 |
+
<?php endif; ?>
|
89 |
+
</select>
|
90 |
+
</p>
|
91 |
+
<?php
|
92 |
+
}
|
93 |
+
|
94 |
+
public function update( $new_instance, $old_instance ) {
|
95 |
+
$instance = array();
|
96 |
+
$instance['title'] = sanitize_text_field( $new_instance['title'] );
|
97 |
+
$instance['form_id'] = absint( $new_instance['form_id'] );
|
98 |
+
|
99 |
+
return $instance;
|
100 |
+
}
|
101 |
+
}
|
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 |
|
@@ -24,6 +24,7 @@ require_once( dirname( __FILE__ ) . '/classes/class-ccf-field-renderer.php' );
|
|
24 |
require_once( dirname( __FILE__ ) . '/classes/class-ccf-form-renderer.php' );
|
25 |
require_once( dirname( __FILE__ ) . '/classes/class-ccf-form-handler.php' );
|
26 |
require_once( dirname( __FILE__ ) . '/classes/class-ccf-upgrader.php' );
|
|
|
27 |
|
28 |
CCF_Custom_Contact_Forms::factory();
|
29 |
CCF_Constants::factory();
|
@@ -37,6 +38,16 @@ CCF_Field_Renderer::factory();
|
|
37 |
CCF_Form_Handler::factory();
|
38 |
CCF_Upgrader::factory();
|
39 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
/**
|
41 |
* Flush the rewrites at the end of init after the plugin is been activated.
|
42 |
*
|
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.4
|
8 |
* Author URI: http://www.taylorlovett.com
|
9 |
*/
|
10 |
|
24 |
require_once( dirname( __FILE__ ) . '/classes/class-ccf-form-renderer.php' );
|
25 |
require_once( dirname( __FILE__ ) . '/classes/class-ccf-form-handler.php' );
|
26 |
require_once( dirname( __FILE__ ) . '/classes/class-ccf-upgrader.php' );
|
27 |
+
require_once( dirname( __FILE__ ) . '/classes/class-ccf-widget.php' );
|
28 |
|
29 |
CCF_Custom_Contact_Forms::factory();
|
30 |
CCF_Constants::factory();
|
38 |
CCF_Form_Handler::factory();
|
39 |
CCF_Upgrader::factory();
|
40 |
|
41 |
+
/**
|
42 |
+
* Setup the widget
|
43 |
+
*
|
44 |
+
* @since 6.4
|
45 |
+
*/
|
46 |
+
function ccf_register_widget() {
|
47 |
+
register_widget( 'CCF_Widget' );
|
48 |
+
}
|
49 |
+
add_action( 'widgets_init', 'ccf_register_widget' );
|
50 |
+
|
51 |
/**
|
52 |
* Flush the rewrites at the end of init after the plugin is been activated.
|
53 |
*
|
js/form.js
CHANGED
@@ -6,9 +6,10 @@
|
|
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 |
|
@@ -251,6 +252,92 @@
|
|
251 |
|
252 |
wp.ccf.validators.address = wp.ccf.validators.address || validator();
|
253 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
254 |
wp.ccf.validators.website = wp.ccf.validators.website || validator( function( input ) {
|
255 |
if ( input.value ) {
|
256 |
var re = /^http(s?)\:\/\/(([a-zA-Z0-9\-\._]+(\.[a-zA-Z0-9\-\._]+)+)|localhost)(\/?)([a-zA-Z0-9\-\.\?\,\'\/\\\+&%\$#_]*)?([\d\w\.\/\%\+\-\=\&\?\:\\\"\'\,\|\~\;]*)$/;
|
@@ -267,6 +354,12 @@
|
|
267 |
|
268 |
wp.ccf.validators.radio = wp.ccf.validators.radio || choiceValidator;
|
269 |
|
|
|
|
|
|
|
|
|
|
|
|
|
270 |
wp.ccf.setupDOM = wp.ccf.setupDOM || function() {
|
271 |
var datepickers = document.querySelectorAll( '.ccf-datepicker' );
|
272 |
|
@@ -277,18 +370,92 @@
|
|
277 |
var forms = document.querySelectorAll( '.ccf-form-wrapper' );
|
278 |
|
279 |
if ( forms.length >= 1 ) {
|
280 |
-
_.each( forms, function(
|
281 |
|
282 |
-
var
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
283 |
|
284 |
-
|
285 |
-
|
|
|
286 |
|
287 |
-
|
288 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
289 |
}
|
290 |
|
291 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
292 |
|
293 |
var errors = [];
|
294 |
|
@@ -298,6 +465,9 @@
|
|
298 |
}
|
299 |
|
300 |
var type = field.getAttribute( 'data-field-type' );
|
|
|
|
|
|
|
301 |
|
302 |
var validation = new ( wp.ccf.validators[type] )( field, formId );
|
303 |
|
@@ -317,9 +487,13 @@
|
|
317 |
}
|
318 |
});
|
319 |
|
320 |
-
var $form = $( this.querySelectorAll( '.ccf-form' )[0] );
|
321 |
-
|
322 |
if ( errors.length ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
323 |
// Trigger errors, mostly for unit testing
|
324 |
$form.trigger( 'ccfFormError', errors );
|
325 |
|
@@ -341,39 +515,17 @@
|
|
341 |
// Notify form complete, mostly for unit testing
|
342 |
$form.trigger( 'ccfFormSuccess' );
|
343 |
|
344 |
-
|
345 |
|
346 |
-
var $loading = $( form.querySelectorAll( '.loading-img' )[0] );
|
347 |
$loading.animate( { opacity: 100 } );
|
348 |
|
349 |
-
|
350 |
-
url: ccfSettings.ajaxurl,
|
351 |
-
type: 'post',
|
352 |
-
data: $form.serialize()
|
353 |
-
}).done( function( data ) {
|
354 |
-
if ( data.success ) {
|
355 |
-
if ( 'text' === data.action_type && data.completion_message ) {
|
356 |
-
form.innerHTML = data.completion_message;
|
357 |
-
|
358 |
-
$( 'html, body' ).animate( {
|
359 |
-
scrollTop: $( form ).offset().top
|
360 |
-
}, 500 );
|
361 |
-
} else if ( 'redirect' === data.action_type && data.completion_redirect_url ) {
|
362 |
-
document.location = data.completion_redirect_url;
|
363 |
-
}
|
364 |
-
|
365 |
-
}
|
366 |
-
}).complete( function() {
|
367 |
-
form.className = form.className.replace( / loading/i, '' );
|
368 |
-
$loading.animate( { opacity: 0 } );
|
369 |
-
_verifiedRecaptcha[formId] = false;
|
370 |
-
});
|
371 |
}
|
372 |
|
373 |
return false;
|
374 |
-
}
|
375 |
|
376 |
-
$
|
377 |
|
378 |
});
|
379 |
}
|
6 |
wp.ccf = wp.ccf || {};
|
7 |
wp.ccf.validators = wp.ccf.validators || {};
|
8 |
|
|
|
9 |
var _verifiedRecaptcha = {};
|
10 |
|
11 |
+
var _formFrameOnload = {};
|
12 |
+
|
13 |
window.ccfRecaptchaOnload = function() {
|
14 |
var recaptchas = document.querySelectorAll( '.ccf-recaptcha-wrapper' );
|
15 |
|
252 |
|
253 |
wp.ccf.validators.address = wp.ccf.validators.address || validator();
|
254 |
|
255 |
+
wp.ccf.validators.file = wp.ccf.validators.file || function( fieldWrapperElement ) {
|
256 |
+
this.wrapper = fieldWrapperElement;
|
257 |
+
this.inputs = this.wrapper.querySelectorAll( '.field-input' );
|
258 |
+
this.errors = {};
|
259 |
+
|
260 |
+
var oldErrorNodes = this.wrapper.querySelectorAll( '.error' );
|
261 |
+
for ( var i = oldErrorNodes.length - 1; i >= 0; i-- ) {
|
262 |
+
oldErrorNodes[i].parentNode.removeChild( oldErrorNodes[i] );
|
263 |
+
}
|
264 |
+
|
265 |
+
_.each( this.inputs, function( input ) {
|
266 |
+
var name = input.getAttribute( 'name' );
|
267 |
+
this.errors[name] = {};
|
268 |
+
|
269 |
+
if ( input.getAttribute( 'aria-required' ) ) {
|
270 |
+
if ( input.value === '' ) {
|
271 |
+
this.errors[name].required = input;
|
272 |
+
}
|
273 |
+
}
|
274 |
+
}, this );
|
275 |
+
|
276 |
+
var file = this.inputs[0];
|
277 |
+
var maxFileSize = this.wrapper.getAttribute( 'data-max-file-size' );
|
278 |
+
var fileExtensions = this.wrapper.getAttribute( 'data-file-extensions' );
|
279 |
+
|
280 |
+
if ( file.value ) {
|
281 |
+
|
282 |
+
if ( maxFileSize ) {
|
283 |
+
var maxFileSizeBytes = parseInt( maxFileSize ) * 1000 * 1000;
|
284 |
+
|
285 |
+
if ( file.files ) {
|
286 |
+
if ( maxFileSizeBytes < file.files[0].size ) {
|
287 |
+
this.errors[this.inputs[0].getAttribute( 'name' )].fileSize = this.wrapper.lastChild;
|
288 |
+
}
|
289 |
+
} else if ( typeof ActiveXObject !== 'undefined' ) {
|
290 |
+
try {
|
291 |
+
var fso = new ActiveXObject( 'Scripting.FileSystemObject' );
|
292 |
+
var ieFile = fso.getFile( file.value );
|
293 |
+
|
294 |
+
if ( maxFileSizeBytes < ieFile.size ) {
|
295 |
+
this.errors[this.inputs[0].getAttribute( 'name' )].fileSize = this.wrapper.lastChild;
|
296 |
+
}
|
297 |
+
} catch ( error ) {
|
298 |
+
// Just move on
|
299 |
+
}
|
300 |
+
}
|
301 |
+
}
|
302 |
+
|
303 |
+
if ( fileExtensions ) {
|
304 |
+
var fileExtensionsArray = fileExtensions.replace( ';', ',' ).toLowerCase();
|
305 |
+
fileExtensionsArray = fileExtensionsArray.replace( /\s+/g, '' );
|
306 |
+
fileExtensionsArray = fileExtensionsArray.split( ',' );
|
307 |
+
|
308 |
+
if ( fileExtensionsArray.length ) {
|
309 |
+
var extension = file.value.replace( /^.*\.(.+)$/g, '$1' ).toLowerCase();
|
310 |
+
|
311 |
+
if ( _.indexOf( fileExtensionsArray, extension ) === -1 ) {
|
312 |
+
this.errors[this.inputs[0].getAttribute( 'name' )].fileExtension = this.wrapper.lastChild;
|
313 |
+
}
|
314 |
+
}
|
315 |
+
}
|
316 |
+
}
|
317 |
+
|
318 |
+
var newErrorNode;
|
319 |
+
|
320 |
+
for ( var field in this.errors ) {
|
321 |
+
if ( this.errors.hasOwnProperty( field ) ) {
|
322 |
+
|
323 |
+
for ( var errorKey in this.errors[field] ) {
|
324 |
+
newErrorNode = document.createElement( 'div' );
|
325 |
+
newErrorNode.className = 'error ' + errorKey + '-error';
|
326 |
+
newErrorNode.setAttribute( 'data-field-name', field );
|
327 |
+
newErrorNode.innerHTML = ccfSettings[errorKey];
|
328 |
+
|
329 |
+
if ( 'fileExtension' === errorKey && fileExtensions ) {
|
330 |
+
newErrorNode.innerHTML += ' (' + fileExtensions + ')';
|
331 |
+
} else if ( 'fileSize' === errorKey && maxFileSize ) {
|
332 |
+
newErrorNode.innerHTML += ' ' + maxFileSize + ' MB';
|
333 |
+
}
|
334 |
+
|
335 |
+
this.errors[field][errorKey].parentNode.insertBefore( newErrorNode, this.errors[field][errorKey].nextSibling );
|
336 |
+
}
|
337 |
+
}
|
338 |
+
}
|
339 |
+
};
|
340 |
+
|
341 |
wp.ccf.validators.website = wp.ccf.validators.website || validator( function( input ) {
|
342 |
if ( input.value ) {
|
343 |
var re = /^http(s?)\:\/\/(([a-zA-Z0-9\-\._]+(\.[a-zA-Z0-9\-\._]+)+)|localhost)(\/?)([a-zA-Z0-9\-\.\?\,\'\/\\\+&%\$#_]*)?([\d\w\.\/\%\+\-\=\&\?\:\\\"\'\,\|\~\;]*)$/;
|
354 |
|
355 |
wp.ccf.validators.radio = wp.ccf.validators.radio || choiceValidator;
|
356 |
|
357 |
+
wp.ccf.iframeOnload = function( formId ) {
|
358 |
+
if ( _formFrameOnload[formId] ) {
|
359 |
+
_formFrameOnload[formId]();
|
360 |
+
}
|
361 |
+
};
|
362 |
+
|
363 |
wp.ccf.setupDOM = wp.ccf.setupDOM || function() {
|
364 |
var datepickers = document.querySelectorAll( '.ccf-datepicker' );
|
365 |
|
370 |
var forms = document.querySelectorAll( '.ccf-form-wrapper' );
|
371 |
|
372 |
if ( forms.length >= 1 ) {
|
373 |
+
_.each( forms, function( formWrapper ) {
|
374 |
|
375 |
+
var form = formWrapper.querySelectorAll( '.ccf-form' )[0];
|
376 |
+
var $form = $( form );
|
377 |
+
var formId = parseInt( formWrapper.getAttribute( 'data-form-id' ) );
|
378 |
+
var button = form.querySelectorAll( '.ccf-submit-button' )[0];
|
379 |
+
var frame = document.getElementById( 'ccf_form_frame_' + formId );
|
380 |
+
var $loading = $( form.querySelectorAll( '.loading-img' )[0] );
|
381 |
+
var $frame = $( frame );
|
382 |
+
var $button = $( button );
|
383 |
+
|
384 |
+
var fieldsBySlug = {};
|
385 |
+
|
386 |
+
_formFrameOnload[formId] = function() {
|
387 |
+
var data,
|
388 |
+
content = $frame.contents().find( 'body' ).text();
|
389 |
+
|
390 |
+
if ( ! content ) {
|
391 |
+
return false;
|
392 |
+
}
|
393 |
+
|
394 |
+
form.className = form.className.replace( / loading/i, '' );
|
395 |
+
$loading.animate( { opacity: 0 } );
|
396 |
+
_verifiedRecaptcha[formId] = false;
|
397 |
+
|
398 |
+
try {
|
399 |
+
data = $.parseJSON( content );
|
400 |
+
} catch ( error ) {
|
401 |
+
var errorNode = document.createElement( 'div' );
|
402 |
+
errorNode.className = 'error unknown-error';
|
403 |
+
errorNode.innerText = ccfSettings.unknown;
|
404 |
+
|
405 |
+
button.parentNode.appendChild( errorNode );
|
406 |
+
|
407 |
+
return false;
|
408 |
+
}
|
409 |
+
|
410 |
+
var errors = button.parentNode.querySelectorAll( '.error' );
|
411 |
+
if ( errors.length ) {
|
412 |
+
errors[0].parentNode.removeChild( errors[0] );
|
413 |
+
}
|
414 |
|
415 |
+
if ( data.success ) {
|
416 |
+
if ( 'text' === data.action_type && data.completion_message ) {
|
417 |
+
form.innerHTML = data.completion_message;
|
418 |
|
419 |
+
$( 'html, body' ).animate( {
|
420 |
+
scrollTop: $( form ).offset().top
|
421 |
+
}, 500 );
|
422 |
+
} else if ( 'redirect' === data.action_type && data.completion_redirect_url ) {
|
423 |
+
document.location = data.completion_redirect_url;
|
424 |
+
}
|
425 |
+
} else if ( data.field_errors ) {
|
426 |
+
_.each( data.field_errors, function( errors, slug ) {
|
427 |
+
var inputs = fieldsBySlug[slug].querySelectorAll( '.field-input' );
|
428 |
+
|
429 |
+
for ( var error in errors ) {
|
430 |
+
if ( errors.hasOwnProperty( error ) ) {
|
431 |
+
var newErrorNode = document.createElement( 'div' );
|
432 |
+
newErrorNode.className = 'error ' + error + '-error';
|
433 |
+
newErrorNode.innerHTML = errors[error];
|
434 |
+
|
435 |
+
if ( inputs.length === 1 ) {
|
436 |
+
inputs[inputs.length - 1].parentNode.insertBefore( newErrorNode, inputs[inputs.length - 1].nextSibling );
|
437 |
+
} else {
|
438 |
+
fieldsBySlug[slug].appendChild( newErrorNode );
|
439 |
+
}
|
440 |
+
}
|
441 |
+
}
|
442 |
+
});
|
443 |
}
|
444 |
|
445 |
+
};
|
446 |
+
|
447 |
+
$button.on( 'click', function( event ) {
|
448 |
+
event.preventDefault();
|
449 |
+
|
450 |
+
form.target = 'ccf_form_frame_' + formId;
|
451 |
+
form.action = ccfSettings.ajaxurl;
|
452 |
+
$form.submit();
|
453 |
+
|
454 |
+
return false;
|
455 |
+
});
|
456 |
+
|
457 |
+
function formSubmit( event ) {
|
458 |
+
var fields = formWrapper.querySelectorAll( '.field' );
|
459 |
|
460 |
var errors = [];
|
461 |
|
465 |
}
|
466 |
|
467 |
var type = field.getAttribute( 'data-field-type' );
|
468 |
+
var slug = field.getAttribute( 'data-field-slug' );
|
469 |
+
|
470 |
+
fieldsBySlug[slug] = field;
|
471 |
|
472 |
var validation = new ( wp.ccf.validators[type] )( field, formId );
|
473 |
|
487 |
}
|
488 |
});
|
489 |
|
|
|
|
|
490 |
if ( errors.length ) {
|
491 |
+
event.returnFalse = false;
|
492 |
+
|
493 |
+
if ( event.preventDefault ) {
|
494 |
+
event.preventDefault();
|
495 |
+
}
|
496 |
+
|
497 |
// Trigger errors, mostly for unit testing
|
498 |
$form.trigger( 'ccfFormError', errors );
|
499 |
|
515 |
// Notify form complete, mostly for unit testing
|
516 |
$form.trigger( 'ccfFormSuccess' );
|
517 |
|
518 |
+
formWrapper.className = formWrapper.className.replace( / loading/i, '' ) + ' loading';
|
519 |
|
|
|
520 |
$loading.animate( { opacity: 100 } );
|
521 |
|
522 |
+
return true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
523 |
}
|
524 |
|
525 |
return false;
|
526 |
+
}
|
527 |
|
528 |
+
$form.on( 'submit', formSubmit );
|
529 |
|
530 |
});
|
531 |
}
|
js/manager/models.js
CHANGED
@@ -23,7 +23,7 @@
|
|
23 |
*/
|
24 |
var _modelDecode = function( excludeKeys ) {
|
25 |
for ( var key in this.attributes ) {
|
26 |
-
if (
|
27 |
var value = this.get( key );
|
28 |
|
29 |
if ( typeof value === 'string' && value !== '' ) {
|
@@ -243,7 +243,8 @@
|
|
243 |
slug: '',
|
244 |
type: '',
|
245 |
required: false,
|
246 |
-
className: ''
|
|
|
247 |
};
|
248 |
|
249 |
return _.defaults( defaults, this.constructor.__super__.defaults );
|
@@ -263,6 +264,20 @@
|
|
263 |
}
|
264 |
);
|
265 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
266 |
wp.ccf.models.Fields['paragraph-text'] = wp.ccf.models.Fields['paragraph-text'] || wp.ccf.models.StandardField.extend(
|
267 |
{
|
268 |
defaults: function() {
|
23 |
*/
|
24 |
var _modelDecode = function( excludeKeys ) {
|
25 |
for ( var key in this.attributes ) {
|
26 |
+
if ( _.indexOf( excludeKeys, key ) === -1 ) {
|
27 |
var value = this.get( key );
|
28 |
|
29 |
if ( typeof value === 'string' && value !== '' ) {
|
243 |
slug: '',
|
244 |
type: '',
|
245 |
required: false,
|
246 |
+
className: '',
|
247 |
+
description: ''
|
248 |
};
|
249 |
|
250 |
return _.defaults( defaults, this.constructor.__super__.defaults );
|
264 |
}
|
265 |
);
|
266 |
|
267 |
+
wp.ccf.models.Fields.file = wp.ccf.models.Fields.file || wp.ccf.models.StandardField.extend(
|
268 |
+
{
|
269 |
+
defaults: function() {
|
270 |
+
var defaults = {
|
271 |
+
type: 'file',
|
272 |
+
fileExtensions: '',
|
273 |
+
maxFileSize: ccfSettings.maxFileSize
|
274 |
+
};
|
275 |
+
|
276 |
+
return _.defaults( defaults, this.constructor.__super__.defaults() );
|
277 |
+
}
|
278 |
+
}
|
279 |
+
);
|
280 |
+
|
281 |
wp.ccf.models.Fields['paragraph-text'] = wp.ccf.models.Fields['paragraph-text'] || wp.ccf.models.StandardField.extend(
|
282 |
{
|
283 |
defaults: function() {
|
js/manager/utils.js
CHANGED
@@ -90,6 +90,14 @@
|
|
90 |
return false;
|
91 |
};
|
92 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
93 |
wp.ccf.utils.getPrettyFieldEmailConfirm = function( value ) {
|
94 |
if ( value.email ) {
|
95 |
return value.email;
|
90 |
return false;
|
91 |
};
|
92 |
|
93 |
+
wp.ccf.utils.isFieldFile = function( value ) {
|
94 |
+
if ( typeof value.id !== 'undefined' && typeof value.url !== 'undefined' && typeof value.file_name !== 'undefined' ) {
|
95 |
+
return true;
|
96 |
+
}
|
97 |
+
|
98 |
+
return false;
|
99 |
+
};
|
100 |
+
|
101 |
wp.ccf.utils.getPrettyFieldEmailConfirm = function( value ) {
|
102 |
if ( value.email ) {
|
103 |
return value.email;
|
js/manager/views.js
CHANGED
@@ -158,6 +158,7 @@
|
|
158 |
|
159 |
this.model.set( 'slug', this.el.querySelectorAll( '.field-slug' )[0].value );
|
160 |
this.model.set( 'label', this.el.querySelectorAll( '.field-label' )[0].value );
|
|
|
161 |
this.model.set( 'value', this.el.querySelectorAll( '.field-value' )[0].value );
|
162 |
this.model.set( 'placeholder', this.el.querySelectorAll( '.field-placeholder' )[0].value );
|
163 |
this.model.set( 'className', this.el.querySelectorAll( '.field-class-name' )[0].value );
|
@@ -168,6 +169,29 @@
|
|
168 |
}
|
169 |
);
|
170 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
171 |
wp.ccf.views.Fields.recaptcha = wp.ccf.views.Fields.recaptcha || wp.ccf.views.FieldBase.extend(
|
172 |
{
|
173 |
template: wp.ccf.utils.template( 'ccf-recaptcha-template' ),
|
@@ -178,6 +202,7 @@
|
|
178 |
|
179 |
saveField: function() {
|
180 |
this.model.set( 'label', this.el.querySelectorAll( '.field-label' )[0].value );
|
|
|
181 |
this.model.set( 'siteKey', this.el.querySelectorAll( '.field-site-key' )[0].value );
|
182 |
this.model.set( 'secretKey', this.el.querySelectorAll( '.field-secret-key' )[0].value );
|
183 |
this.model.set( 'className', this.el.querySelectorAll( '.field-class-name' )[0].value );
|
@@ -230,6 +255,7 @@
|
|
230 |
|
231 |
this.model.set( 'slug', this.el.querySelectorAll( '.field-slug' )[0].value );
|
232 |
this.model.set( 'label', this.el.querySelectorAll( '.field-label' )[0].value );
|
|
|
233 |
this.model.set( 'value', this.el.querySelectorAll( '.field-value' )[0].value );
|
234 |
this.model.set( 'placeholder', this.el.querySelectorAll( '.field-placeholder' )[0].value );
|
235 |
this.model.set( 'className', this.el.querySelectorAll( '.field-class-name' )[0].value );
|
@@ -263,6 +289,7 @@
|
|
263 |
|
264 |
this.model.set( 'slug', this.el.querySelectorAll( '.field-slug' )[0].value );
|
265 |
this.model.set( 'label', this.el.querySelectorAll( '.field-label' )[0].value );
|
|
|
266 |
|
267 |
var value = this.el.querySelectorAll( '.field-value' );
|
268 |
if ( value.length > 0 ) {
|
@@ -295,6 +322,7 @@
|
|
295 |
|
296 |
this.model.set( 'slug', this.el.querySelectorAll( '.field-slug' )[0].value );
|
297 |
this.model.set( 'label', this.el.querySelectorAll( '.field-label' )[0].value );
|
|
|
298 |
this.model.set( 'className', this.el.querySelectorAll( '.field-class-name' )[0].value );
|
299 |
this.model.set( 'required', ( this.el.querySelectorAll( '.field-required' )[0].value == 1 ) ? true : false );
|
300 |
|
@@ -311,6 +339,7 @@
|
|
311 |
|
312 |
this.model.set( 'slug', this.el.querySelectorAll( '.field-slug' )[0].value );
|
313 |
this.model.set( 'label', this.el.querySelectorAll( '.field-label' )[0].value );
|
|
|
314 |
this.model.set( 'value', this.el.querySelectorAll( '.field-value' )[0].value );
|
315 |
this.model.set( 'placeholder', this.el.querySelectorAll( '.field-placeholder' )[0].value );
|
316 |
this.model.set( 'className', this.el.querySelectorAll( '.field-class-name' )[0].value );
|
@@ -329,6 +358,7 @@
|
|
329 |
|
330 |
this.model.set( 'slug', this.el.querySelectorAll( '.field-slug' )[0].value );
|
331 |
this.model.set( 'label', this.el.querySelectorAll( '.field-label' )[0].value );
|
|
|
332 |
this.model.set( 'value', this.el.querySelectorAll( '.field-value' )[0].value );
|
333 |
this.model.set( 'placeholder', this.el.querySelectorAll( '.field-placeholder' )[0].value );
|
334 |
this.model.set( 'phoneFormat', this.el.querySelectorAll( '.field-phone-format' )[0].value );
|
@@ -348,6 +378,7 @@
|
|
348 |
|
349 |
this.model.set( 'slug', this.el.querySelectorAll( '.field-slug' )[0].value );
|
350 |
this.model.set( 'label', this.el.querySelectorAll( '.field-label' )[0].value );
|
|
|
351 |
this.model.set( 'addressType', this.el.querySelectorAll( '.field-address-type' )[0].value );
|
352 |
this.model.set( 'className', this.el.querySelectorAll( '.field-class-name' )[0].value );
|
353 |
this.model.set( 'required', ( this.el.querySelectorAll( '.field-required' )[0].value == 1 ) ? true : false );
|
@@ -365,6 +396,7 @@
|
|
365 |
|
366 |
this.model.set( 'slug', this.el.querySelectorAll( '.field-slug' )[0].value );
|
367 |
this.model.set( 'label', this.el.querySelectorAll( '.field-label' )[0].value );
|
|
|
368 |
|
369 |
var value = this.el.querySelectorAll( '.field-value' );
|
370 |
if ( value.length ) {
|
@@ -413,6 +445,7 @@
|
|
413 |
|
414 |
this.model.set( 'slug', this.el.querySelectorAll( '.field-slug' )[0].value );
|
415 |
this.model.set( 'label', this.el.querySelectorAll( '.field-label' )[0].value );
|
|
|
416 |
this.model.set( 'className', this.el.querySelectorAll( '.field-class-name' )[0].value );
|
417 |
this.model.set( 'required', ( this.el.querySelectorAll( '.field-required' )[0].value == 1 ) ? true : false );
|
418 |
|
@@ -1452,6 +1485,7 @@
|
|
1452 |
wordChop: wp.ccf.utils.wordChop,
|
1453 |
isFieldDate: wp.ccf.utils.isFieldDate,
|
1454 |
isFieldName: wp.ccf.utils.isFieldName,
|
|
|
1455 |
isFieldAddress: wp.ccf.utils.isFieldAddress,
|
1456 |
isFieldEmailConfirm: wp.ccf.utils.isFieldEmailConfirm,
|
1457 |
getPrettyFieldDate: wp.ccf.utils.getPrettyFieldDate,
|
158 |
|
159 |
this.model.set( 'slug', this.el.querySelectorAll( '.field-slug' )[0].value );
|
160 |
this.model.set( 'label', this.el.querySelectorAll( '.field-label' )[0].value );
|
161 |
+
this.model.set( 'description', this.el.querySelectorAll( '.field-description' )[0].value );
|
162 |
this.model.set( 'value', this.el.querySelectorAll( '.field-value' )[0].value );
|
163 |
this.model.set( 'placeholder', this.el.querySelectorAll( '.field-placeholder' )[0].value );
|
164 |
this.model.set( 'className', this.el.querySelectorAll( '.field-class-name' )[0].value );
|
169 |
}
|
170 |
);
|
171 |
|
172 |
+
wp.ccf.views.Fields.file = wp.ccf.views.Fields.file || wp.ccf.views.FieldBase.extend(
|
173 |
+
{
|
174 |
+
template: wp.ccf.utils.template( 'ccf-file-template' ),
|
175 |
+
|
176 |
+
initialize: function() {
|
177 |
+
|
178 |
+
},
|
179 |
+
|
180 |
+
saveField: function() {
|
181 |
+
|
182 |
+
this.model.set( 'slug', this.el.querySelectorAll( '.field-slug' )[0].value );
|
183 |
+
this.model.set( 'label', this.el.querySelectorAll( '.field-label' )[0].value );
|
184 |
+
this.model.set( 'description', this.el.querySelectorAll( '.field-description' )[0].value );
|
185 |
+
this.model.set( 'className', this.el.querySelectorAll( '.field-class-name' )[0].value );
|
186 |
+
this.model.set( 'required', ( this.el.querySelectorAll( '.field-required' )[0].value == 1 ) ? true : false );
|
187 |
+
this.model.set( 'fileExtensions', this.el.querySelectorAll( '.field-file-extensions' )[0].value );
|
188 |
+
this.model.set( 'maxFileSize', this.el.querySelectorAll( '.field-max-file-size' )[0].value );
|
189 |
+
|
190 |
+
return this;
|
191 |
+
}
|
192 |
+
}
|
193 |
+
);
|
194 |
+
|
195 |
wp.ccf.views.Fields.recaptcha = wp.ccf.views.Fields.recaptcha || wp.ccf.views.FieldBase.extend(
|
196 |
{
|
197 |
template: wp.ccf.utils.template( 'ccf-recaptcha-template' ),
|
202 |
|
203 |
saveField: function() {
|
204 |
this.model.set( 'label', this.el.querySelectorAll( '.field-label' )[0].value );
|
205 |
+
this.model.set( 'description', this.el.querySelectorAll( '.field-description' )[0].value );
|
206 |
this.model.set( 'siteKey', this.el.querySelectorAll( '.field-site-key' )[0].value );
|
207 |
this.model.set( 'secretKey', this.el.querySelectorAll( '.field-secret-key' )[0].value );
|
208 |
this.model.set( 'className', this.el.querySelectorAll( '.field-class-name' )[0].value );
|
255 |
|
256 |
this.model.set( 'slug', this.el.querySelectorAll( '.field-slug' )[0].value );
|
257 |
this.model.set( 'label', this.el.querySelectorAll( '.field-label' )[0].value );
|
258 |
+
this.model.set( 'description', this.el.querySelectorAll( '.field-description' )[0].value );
|
259 |
this.model.set( 'value', this.el.querySelectorAll( '.field-value' )[0].value );
|
260 |
this.model.set( 'placeholder', this.el.querySelectorAll( '.field-placeholder' )[0].value );
|
261 |
this.model.set( 'className', this.el.querySelectorAll( '.field-class-name' )[0].value );
|
289 |
|
290 |
this.model.set( 'slug', this.el.querySelectorAll( '.field-slug' )[0].value );
|
291 |
this.model.set( 'label', this.el.querySelectorAll( '.field-label' )[0].value );
|
292 |
+
this.model.set( 'description', this.el.querySelectorAll( '.field-description' )[0].value );
|
293 |
|
294 |
var value = this.el.querySelectorAll( '.field-value' );
|
295 |
if ( value.length > 0 ) {
|
322 |
|
323 |
this.model.set( 'slug', this.el.querySelectorAll( '.field-slug' )[0].value );
|
324 |
this.model.set( 'label', this.el.querySelectorAll( '.field-label' )[0].value );
|
325 |
+
this.model.set( 'description', this.el.querySelectorAll( '.field-description' )[0].value );
|
326 |
this.model.set( 'className', this.el.querySelectorAll( '.field-class-name' )[0].value );
|
327 |
this.model.set( 'required', ( this.el.querySelectorAll( '.field-required' )[0].value == 1 ) ? true : false );
|
328 |
|
339 |
|
340 |
this.model.set( 'slug', this.el.querySelectorAll( '.field-slug' )[0].value );
|
341 |
this.model.set( 'label', this.el.querySelectorAll( '.field-label' )[0].value );
|
342 |
+
this.model.set( 'description', this.el.querySelectorAll( '.field-description' )[0].value );
|
343 |
this.model.set( 'value', this.el.querySelectorAll( '.field-value' )[0].value );
|
344 |
this.model.set( 'placeholder', this.el.querySelectorAll( '.field-placeholder' )[0].value );
|
345 |
this.model.set( 'className', this.el.querySelectorAll( '.field-class-name' )[0].value );
|
358 |
|
359 |
this.model.set( 'slug', this.el.querySelectorAll( '.field-slug' )[0].value );
|
360 |
this.model.set( 'label', this.el.querySelectorAll( '.field-label' )[0].value );
|
361 |
+
this.model.set( 'description', this.el.querySelectorAll( '.field-description' )[0].value );
|
362 |
this.model.set( 'value', this.el.querySelectorAll( '.field-value' )[0].value );
|
363 |
this.model.set( 'placeholder', this.el.querySelectorAll( '.field-placeholder' )[0].value );
|
364 |
this.model.set( 'phoneFormat', this.el.querySelectorAll( '.field-phone-format' )[0].value );
|
378 |
|
379 |
this.model.set( 'slug', this.el.querySelectorAll( '.field-slug' )[0].value );
|
380 |
this.model.set( 'label', this.el.querySelectorAll( '.field-label' )[0].value );
|
381 |
+
this.model.set( 'description', this.el.querySelectorAll( '.field-description' )[0].value );
|
382 |
this.model.set( 'addressType', this.el.querySelectorAll( '.field-address-type' )[0].value );
|
383 |
this.model.set( 'className', this.el.querySelectorAll( '.field-class-name' )[0].value );
|
384 |
this.model.set( 'required', ( this.el.querySelectorAll( '.field-required' )[0].value == 1 ) ? true : false );
|
396 |
|
397 |
this.model.set( 'slug', this.el.querySelectorAll( '.field-slug' )[0].value );
|
398 |
this.model.set( 'label', this.el.querySelectorAll( '.field-label' )[0].value );
|
399 |
+
this.model.set( 'description', this.el.querySelectorAll( '.field-description' )[0].value );
|
400 |
|
401 |
var value = this.el.querySelectorAll( '.field-value' );
|
402 |
if ( value.length ) {
|
445 |
|
446 |
this.model.set( 'slug', this.el.querySelectorAll( '.field-slug' )[0].value );
|
447 |
this.model.set( 'label', this.el.querySelectorAll( '.field-label' )[0].value );
|
448 |
+
this.model.set( 'description', this.el.querySelectorAll( '.field-description' )[0].value );
|
449 |
this.model.set( 'className', this.el.querySelectorAll( '.field-class-name' )[0].value );
|
450 |
this.model.set( 'required', ( this.el.querySelectorAll( '.field-required' )[0].value == 1 ) ? true : false );
|
451 |
|
1485 |
wordChop: wp.ccf.utils.wordChop,
|
1486 |
isFieldDate: wp.ccf.utils.isFieldDate,
|
1487 |
isFieldName: wp.ccf.utils.isFieldName,
|
1488 |
+
isFieldFile: wp.ccf.utils.isFieldFile,
|
1489 |
isFieldAddress: wp.ccf.utils.isFieldAddress,
|
1490 |
isFieldEmailConfirm: wp.ccf.utils.isFieldEmailConfirm,
|
1491 |
getPrettyFieldDate: wp.ccf.utils.getPrettyFieldDate,
|
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-
|
9 |
-
"PO-Revision-Date: 2015-
|
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 ""
|
@@ -67,42 +67,52 @@ msgstr ""
|
|
67 |
msgid "<a href=\"%s\">Forms and Submissions</a>"
|
68 |
msgstr ""
|
69 |
|
70 |
-
#: ../classes/class-ccf-field-renderer.php:
|
71 |
-
|
72 |
-
|
73 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
msgid "HH"
|
75 |
msgstr ""
|
76 |
|
77 |
-
#: ../classes/class-ccf-field-renderer.php:
|
78 |
-
#: ../classes/class-ccf-field-renderer.php:
|
79 |
-
#: ../classes/class-ccf-form-manager.php:
|
80 |
-
#: ../classes/class-ccf-form-manager.php:
|
81 |
msgid "MM"
|
82 |
msgstr ""
|
83 |
|
84 |
-
#: ../classes/class-ccf-field-renderer.php:
|
85 |
-
#: ../classes/class-ccf-field-renderer.php:
|
86 |
-
#: ../classes/class-ccf-form-manager.php:
|
87 |
-
#: ../classes/class-ccf-form-manager.php:
|
88 |
msgid "AM"
|
89 |
msgstr ""
|
90 |
|
91 |
-
#: ../classes/class-ccf-field-renderer.php:
|
92 |
-
#: ../classes/class-ccf-field-renderer.php:
|
93 |
-
#: ../classes/class-ccf-form-manager.php:
|
94 |
-
#: ../classes/class-ccf-form-manager.php:
|
95 |
msgid "PM"
|
96 |
msgstr ""
|
97 |
|
98 |
-
#: ../classes/class-ccf-field-renderer.php:
|
99 |
#: ../classes/class-ccf-form-cpt.php:306
|
100 |
-
#: ../classes/class-ccf-form-manager.php:
|
101 |
-
#: ../classes/class-ccf-form-manager.php:
|
102 |
-
#: ../classes/class-ccf-form-manager.php:
|
103 |
-
#: ../classes/class-ccf-form-manager.php:
|
104 |
-
#: ../classes/class-ccf-form-manager.php:
|
105 |
-
#: ../classes/class-ccf-form-manager.php:
|
106 |
msgid "Date"
|
107 |
msgstr ""
|
108 |
|
@@ -112,8 +122,8 @@ msgstr ""
|
|
112 |
|
113 |
#: ../classes/class-ccf-form-cpt.php:123 ../classes/class-ccf-form-cpt.php:141
|
114 |
#: ../classes/class-ccf-form-cpt.php:304
|
115 |
-
#: ../classes/class-ccf-form-manager.php:
|
116 |
-
#: ../classes/class-ccf-form-manager.php:
|
117 |
msgid "Submissions"
|
118 |
msgstr ""
|
119 |
|
@@ -150,7 +160,7 @@ msgid "Move to Trash"
|
|
150 |
msgstr ""
|
151 |
|
152 |
#: ../classes/class-ccf-form-cpt.php:247
|
153 |
-
#: ../classes/class-ccf-form-manager.php:
|
154 |
msgid "(No title)"
|
155 |
msgstr ""
|
156 |
|
@@ -163,14 +173,14 @@ msgid "Form Title"
|
|
163 |
msgstr ""
|
164 |
|
165 |
#: ../classes/class-ccf-form-cpt.php:303
|
166 |
-
#: ../classes/class-ccf-form-manager.php:
|
167 |
-
#: ../classes/class-ccf-form-manager.php:
|
168 |
msgid "Author"
|
169 |
msgstr ""
|
170 |
|
171 |
#: ../classes/class-ccf-form-cpt.php:305
|
172 |
-
#: ../classes/class-ccf-form-manager.php:
|
173 |
-
#: ../classes/class-ccf-form-manager.php:
|
174 |
msgid "Number of Fields"
|
175 |
msgstr ""
|
176 |
|
@@ -200,7 +210,7 @@ msgid "Form"
|
|
200 |
msgstr ""
|
201 |
|
202 |
#: ../classes/class-ccf-form-cpt.php:368 ../classes/class-ccf-form-cpt.php:371
|
203 |
-
#: ../classes/class-ccf-form-manager.php:
|
204 |
msgid "New Form"
|
205 |
msgstr ""
|
206 |
|
@@ -232,645 +242,720 @@ msgstr ""
|
|
232 |
msgid "No forms found in trash."
|
233 |
msgstr ""
|
234 |
|
235 |
-
#: ../classes/class-ccf-form-handler.php:
|
236 |
-
#: ../classes/class-ccf-form-handler.php:
|
237 |
-
#: ../classes/class-ccf-form-handler.php:
|
238 |
-
#: ../classes/class-ccf-form-handler.php:
|
239 |
-
#: ../classes/class-ccf-form-handler.php:
|
240 |
-
#: ../classes/class-ccf-form-handler.php:
|
241 |
-
#: ../classes/class-ccf-form-handler.php:
|
242 |
-
#: ../classes/class-ccf-form-handler.php:
|
243 |
-
#: ../classes/class-ccf-form-handler.php:
|
244 |
-
#: ../classes/class-ccf-form-handler.php:
|
245 |
-
#: ../classes/class-ccf-form-handler.php:
|
|
|
246 |
#: ../classes/class-ccf-form-renderer.php:49
|
247 |
msgid "This field is required."
|
248 |
msgstr ""
|
249 |
|
250 |
-
#: ../classes/class-ccf-form-handler.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
251 |
#: ../classes/class-ccf-form-renderer.php:56
|
252 |
msgid "Your reCAPTCHA response was incorrect."
|
253 |
msgstr ""
|
254 |
|
255 |
-
#: ../classes/class-ccf-form-handler.php:
|
256 |
msgid "This field is required"
|
257 |
msgstr ""
|
258 |
|
259 |
-
#: ../classes/class-ccf-form-handler.php:
|
260 |
msgid "This phone number is too short"
|
261 |
msgstr ""
|
262 |
|
263 |
-
#: ../classes/class-ccf-form-handler.php:
|
264 |
msgid "ccf_field_phoneFormat"
|
265 |
msgstr ""
|
266 |
|
267 |
-
#: ../classes/class-ccf-form-handler.php:
|
268 |
msgid "This phone number contains invalid characters."
|
269 |
msgstr ""
|
270 |
|
271 |
-
#: ../classes/class-ccf-form-handler.php:
|
272 |
msgid "This phone number is not 10 digits."
|
273 |
msgstr ""
|
274 |
|
275 |
-
#: ../classes/class-ccf-form-handler.php:
|
276 |
-
#: ../classes/class-ccf-form-handler.php:
|
277 |
msgid "This is not a valid email"
|
278 |
msgstr ""
|
279 |
|
280 |
-
#: ../classes/class-ccf-form-handler.php:
|
281 |
#: ../classes/class-ccf-form-renderer.php:54
|
282 |
msgid "Emails do not match."
|
283 |
msgstr ""
|
284 |
|
285 |
-
#: ../classes/class-ccf-form-handler.php:
|
286 |
msgid "First name is required."
|
287 |
msgstr ""
|
288 |
|
289 |
-
#: ../classes/class-ccf-form-handler.php:
|
290 |
msgid "Last name is required."
|
291 |
msgstr ""
|
292 |
|
293 |
-
#: ../classes/class-ccf-form-handler.php:
|
294 |
-
#: ../classes/class-ccf-form-renderer.php:
|
295 |
msgid "This is not a valid URL. URL's must start with http(s)://"
|
296 |
msgstr ""
|
297 |
|
298 |
-
#: ../classes/class-ccf-form-handler.php:
|
299 |
-
#: ../classes/class-ccf-form-handler.php:
|
300 |
#: ../classes/class-ccf-form-renderer.php:50
|
301 |
msgid "Date is required."
|
302 |
msgstr ""
|
303 |
|
304 |
-
#: ../classes/class-ccf-form-handler.php:
|
305 |
-
#: ../classes/class-ccf-form-handler.php:
|
306 |
#: ../classes/class-ccf-form-renderer.php:61
|
307 |
msgid "This date is not valid."
|
308 |
msgstr ""
|
309 |
|
310 |
-
#: ../classes/class-ccf-form-handler.php:
|
311 |
-
#: ../classes/class-ccf-form-handler.php:
|
312 |
#: ../classes/class-ccf-form-renderer.php:51
|
313 |
msgid "Hour is required."
|
314 |
msgstr ""
|
315 |
|
316 |
-
#: ../classes/class-ccf-form-handler.php:
|
317 |
-
#: ../classes/class-ccf-form-handler.php:
|
318 |
#: ../classes/class-ccf-form-renderer.php:60
|
319 |
msgid "This is not a valid hour."
|
320 |
msgstr ""
|
321 |
|
322 |
-
#: ../classes/class-ccf-form-handler.php:
|
323 |
-
#: ../classes/class-ccf-form-handler.php:
|
324 |
#: ../classes/class-ccf-form-renderer.php:52
|
325 |
msgid "Minute is required."
|
326 |
msgstr ""
|
327 |
|
328 |
-
#: ../classes/class-ccf-form-handler.php:
|
329 |
-
#: ../classes/class-ccf-form-handler.php:
|
330 |
#: ../classes/class-ccf-form-renderer.php:62
|
331 |
msgid "This is not a valid minute."
|
332 |
msgstr ""
|
333 |
|
334 |
-
#: ../classes/class-ccf-form-handler.php:
|
335 |
-
#: ../classes/class-ccf-form-handler.php:
|
336 |
#: ../classes/class-ccf-form-renderer.php:53
|
337 |
msgid "AM/PM is required."
|
338 |
msgstr ""
|
339 |
|
340 |
-
#: ../classes/class-ccf-form-handler.php:
|
341 |
msgid "Form submitted from"
|
342 |
msgstr ""
|
343 |
|
344 |
-
#: ../classes/class-ccf-form-handler.php:
|
345 |
#, php-format
|
346 |
msgid "%s: Form Submission to \"%s\""
|
347 |
msgstr ""
|
348 |
|
349 |
-
#: ../classes/class-ccf-form-handler.php:
|
350 |
-
#: ../classes/class-ccf-form-renderer.php:
|
351 |
msgid "Thank you for your submission."
|
352 |
msgstr ""
|
353 |
|
354 |
-
#: ../classes/class-ccf-form-manager.php:
|
355 |
msgid "Manage Forms"
|
356 |
msgstr ""
|
357 |
|
358 |
-
#: ../classes/class-ccf-form-manager.php:
|
359 |
msgid "Existing Forms"
|
360 |
msgstr ""
|
361 |
|
362 |
-
#: ../classes/class-ccf-form-manager.php:
|
363 |
msgid "Standard Fields"
|
364 |
msgstr ""
|
365 |
|
366 |
-
#: ../classes/class-ccf-form-manager.php:
|
367 |
msgid "Special Fields"
|
368 |
msgstr ""
|
369 |
|
370 |
-
#: ../classes/class-ccf-form-manager.php:
|
371 |
msgid "Structure"
|
372 |
msgstr ""
|
373 |
|
374 |
-
#: ../classes/class-ccf-form-manager.php:
|
375 |
msgid "→ Drag fields here to add them"
|
376 |
msgstr ""
|
377 |
|
378 |
-
#: ../classes/class-ccf-form-manager.php:
|
379 |
-
#: ../classes/class-ccf-form-manager.php:
|
380 |
msgid "Insert into post"
|
381 |
msgstr ""
|
382 |
|
383 |
-
#: ../classes/class-ccf-form-manager.php:
|
384 |
msgid "Save Form"
|
385 |
msgstr ""
|
386 |
|
387 |
-
#: ../classes/class-ccf-form-manager.php:
|
388 |
msgid "Form Settings"
|
389 |
msgstr ""
|
390 |
|
391 |
-
#: ../classes/class-ccf-form-manager.php:
|
392 |
msgid "Form Title:"
|
393 |
msgstr ""
|
394 |
|
395 |
-
#: ../classes/class-ccf-form-manager.php:
|
396 |
msgid "Form Description:"
|
397 |
msgstr ""
|
398 |
|
399 |
-
#: ../classes/class-ccf-form-manager.php:
|
400 |
msgid "Button Text:"
|
401 |
msgstr ""
|
402 |
|
403 |
-
#: ../classes/class-ccf-form-manager.php:
|
404 |
msgid "On form completion:"
|
405 |
msgstr ""
|
406 |
|
407 |
-
#: ../classes/class-ccf-form-manager.php:
|
408 |
msgid "Show text"
|
409 |
msgstr ""
|
410 |
|
411 |
-
#: ../classes/class-ccf-form-manager.php:
|
412 |
msgid "Redirect"
|
413 |
msgstr ""
|
414 |
|
415 |
-
#: ../classes/class-ccf-form-manager.php:
|
416 |
msgid "Redirect URL:"
|
417 |
msgstr ""
|
418 |
|
419 |
-
#: ../classes/class-ccf-form-manager.php:
|
420 |
msgid "Completion Message:"
|
421 |
msgstr ""
|
422 |
|
423 |
-
#: ../classes/class-ccf-form-manager.php:
|
424 |
msgid "Form Notifications"
|
425 |
msgstr ""
|
426 |
|
427 |
-
#: ../classes/class-ccf-form-manager.php:
|
428 |
msgid "Send Email Notifications:"
|
429 |
msgstr ""
|
430 |
|
431 |
-
#: ../classes/class-ccf-form-manager.php:
|
432 |
-
#: ../classes/class-ccf-form-manager.php:
|
433 |
-
#: ../classes/class-ccf-form-manager.php:
|
434 |
-
#: ../classes/class-ccf-form-manager.php:
|
435 |
-
#: ../classes/class-ccf-form-manager.php:
|
436 |
-
#: ../classes/class-ccf-form-manager.php:
|
437 |
-
#: ../classes/class-ccf-form-manager.php:
|
438 |
-
#: ../classes/class-ccf-form-manager.php:
|
439 |
-
#: ../classes/class-ccf-form-manager.php:
|
440 |
-
#: ../classes/class-ccf-form-manager.php:
|
441 |
-
#: ../classes/class-ccf-form-manager.php:
|
442 |
-
#: ../classes/class-ccf-form-manager.php:
|
443 |
-
#: ../classes/class-ccf-form-manager.php:
|
|
|
444 |
msgid "Yes"
|
445 |
msgstr ""
|
446 |
|
447 |
-
#: ../classes/class-ccf-form-manager.php:
|
448 |
-
#: ../classes/class-ccf-form-manager.php:
|
449 |
-
#: ../classes/class-ccf-form-manager.php:
|
450 |
-
#: ../classes/class-ccf-form-manager.php:
|
451 |
-
#: ../classes/class-ccf-form-manager.php:
|
452 |
-
#: ../classes/class-ccf-form-manager.php:
|
453 |
-
#: ../classes/class-ccf-form-manager.php:
|
454 |
-
#: ../classes/class-ccf-form-manager.php:
|
455 |
-
#: ../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 |
-
#: ../classes/class-ccf-form-manager.php:
|
|
|
460 |
msgid "No"
|
461 |
msgstr ""
|
462 |
|
463 |
-
#: ../classes/class-ccf-form-manager.php:
|
464 |
msgid "\"To\" Email Addresses (comma separated):"
|
465 |
msgstr ""
|
466 |
|
467 |
-
#: ../classes/class-ccf-form-manager.php:
|
468 |
msgid "\"From\" Email Address Type:"
|
469 |
msgstr ""
|
470 |
|
471 |
-
#: ../classes/class-ccf-form-manager.php:
|
472 |
msgid "WordPress Default"
|
473 |
msgstr ""
|
474 |
|
475 |
-
#: ../classes/class-ccf-form-manager.php:
|
476 |
msgid "Custom Email"
|
477 |
msgstr ""
|
478 |
|
479 |
-
#: ../classes/class-ccf-form-manager.php:
|
480 |
msgid "Form Field"
|
481 |
msgstr ""
|
482 |
|
483 |
-
#: ../classes/class-ccf-form-manager.php:
|
484 |
msgid ""
|
485 |
"You can set the notification emails from address to be the WP default, a "
|
486 |
"custom email address, or pull the address from a field in the form."
|
487 |
msgstr ""
|
488 |
|
489 |
-
#: ../classes/class-ccf-form-manager.php:
|
490 |
msgid "Custom \"From\" Email Address:"
|
491 |
msgstr ""
|
492 |
|
493 |
-
#: ../classes/class-ccf-form-manager.php:
|
494 |
msgid "Pull \"From\" Email Dynamically from Field:"
|
495 |
msgstr ""
|
496 |
|
497 |
-
#: ../classes/class-ccf-form-manager.php:
|
498 |
msgid "items"
|
499 |
msgstr ""
|
500 |
|
501 |
-
#: ../classes/class-ccf-form-manager.php:
|
502 |
-
#: ../classes/class-ccf-form-manager.php:
|
503 |
msgid "ID"
|
504 |
msgstr ""
|
505 |
|
506 |
-
#: ../classes/class-ccf-form-manager.php:
|
507 |
-
#: ../classes/class-ccf-form-manager.php:
|
508 |
msgid "Title"
|
509 |
msgstr ""
|
510 |
|
511 |
-
#: ../classes/class-ccf-form-manager.php:
|
512 |
msgid "<span>←</span> Click on a field to edit it."
|
513 |
msgstr ""
|
514 |
|
515 |
-
#: ../classes/class-ccf-form-manager.php:
|
516 |
-
#: ../classes/class-ccf-form-manager.php:
|
517 |
-
#: ../classes/class-ccf-form-manager.php:
|
|
|
518 |
msgid "Internal Unique Slug"
|
519 |
msgstr ""
|
520 |
|
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 |
-
#: ../classes/class-ccf-form-manager.php:
|
527 |
-
#: ../classes/class-ccf-form-manager.php:
|
528 |
-
#: ../classes/class-ccf-form-manager.php:
|
529 |
-
#: ../classes/class-ccf-form-manager.php:
|
530 |
-
#: ../classes/class-ccf-form-manager.php:
|
531 |
-
#: ../classes/class-ccf-form-manager.php:
|
532 |
-
#: ../classes/class-ccf-form-manager.php:
|
|
|
533 |
msgid "Label:"
|
534 |
msgstr ""
|
535 |
|
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 |
-
#: ../classes/class-ccf-form-manager.php:
|
542 |
-
#: ../classes/class-ccf-form-manager.php:
|
543 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
544 |
msgstr ""
|
545 |
|
546 |
-
#: ../classes/class-ccf-form-manager.php:
|
547 |
-
#: ../classes/class-ccf-form-manager.php:
|
548 |
-
#: ../classes/class-ccf-form-manager.php:
|
549 |
-
#: ../classes/class-ccf-form-manager.php:489
|
550 |
#: ../classes/class-ccf-form-manager.php:527
|
551 |
-
#: ../classes/class-ccf-form-manager.php:
|
552 |
-
#: ../classes/class-ccf-form-manager.php:
|
553 |
-
#: ../classes/class-ccf-form-manager.php:
|
554 |
-
|
555 |
-
#: ../classes/class-ccf-form-manager.php:758
|
556 |
-
#: ../classes/class-ccf-form-manager.php:797
|
557 |
-
msgid "Required:"
|
558 |
msgstr ""
|
559 |
|
560 |
#: ../classes/class-ccf-form-manager.php:279
|
561 |
-
#: ../classes/class-ccf-form-manager.php:
|
562 |
-
#: ../classes/class-ccf-form-manager.php:
|
563 |
-
#: ../classes/class-ccf-form-manager.php:
|
564 |
-
#: ../classes/class-ccf-form-manager.php:
|
565 |
-
#: ../classes/class-ccf-form-manager.php:
|
566 |
-
#: ../classes/class-ccf-form-manager.php:
|
567 |
-
#: ../classes/class-ccf-form-manager.php:
|
568 |
-
#: ../classes/class-ccf-form-manager.php:
|
569 |
-
#: ../classes/class-ccf-form-manager.php:
|
570 |
-
#: ../classes/class-ccf-form-manager.php:
|
571 |
-
#: ../classes/class-ccf-form-manager.php:
|
572 |
-
|
573 |
-
|
574 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
575 |
msgid "Advanced"
|
576 |
msgstr ""
|
577 |
|
578 |
-
#: ../classes/class-ccf-form-manager.php:
|
579 |
-
#: ../classes/class-ccf-form-manager.php:
|
580 |
-
#: ../classes/class-ccf-form-manager.php:
|
581 |
-
#: ../classes/class-ccf-form-manager.php:
|
582 |
-
#: ../classes/class-ccf-form-manager.php:
|
583 |
-
#: ../classes/class-ccf-form-manager.php:
|
584 |
-
#: ../classes/class-ccf-form-manager.php:
|
585 |
-
#: ../classes/class-ccf-form-manager.php:
|
586 |
-
#: ../classes/class-ccf-form-manager.php:
|
587 |
-
#: ../classes/class-ccf-form-manager.php:
|
588 |
-
#: ../classes/class-ccf-form-manager.php:
|
589 |
-
#: ../classes/class-ccf-form-manager.php:
|
590 |
-
#: ../classes/class-ccf-form-manager.php:
|
591 |
-
#: ../classes/class-ccf-form-manager.php:
|
592 |
-
#: ../classes/class-ccf-form-manager.php:
|
|
|
593 |
msgid "Class Name:"
|
594 |
msgstr ""
|
595 |
|
596 |
-
#: ../classes/class-ccf-form-manager.php:
|
597 |
-
#: ../classes/class-ccf-form-manager.php:
|
598 |
-
#: ../classes/class-ccf-form-manager.php:
|
599 |
-
#: ../classes/class-ccf-form-manager.php:
|
600 |
-
#: ../classes/class-ccf-form-manager.php:
|
601 |
-
#: ../classes/class-ccf-form-manager.php:
|
602 |
msgid "Placeholder Text:"
|
603 |
msgstr ""
|
604 |
|
605 |
-
#: ../classes/class-ccf-form-manager.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
606 |
msgid ""
|
607 |
"reCAPTCHA is a simple captcha service provided by Google. <a target=\"_blank"
|
608 |
"\" href=\"https://www.google.com/recaptcha/intro/index.html\">Learn more</a>"
|
609 |
msgstr ""
|
610 |
|
611 |
-
#: ../classes/class-ccf-form-manager.php:
|
612 |
msgid "Site Key:"
|
613 |
msgstr ""
|
614 |
|
615 |
-
#: ../classes/class-ccf-form-manager.php:
|
616 |
-
#: ../classes/class-ccf-form-manager.php:
|
617 |
msgid "Don't have one?"
|
618 |
msgstr ""
|
619 |
|
620 |
-
#: ../classes/class-ccf-form-manager.php:
|
621 |
msgid "Secret Key:"
|
622 |
msgstr ""
|
623 |
|
624 |
-
#: ../classes/class-ccf-form-manager.php:
|
625 |
-
#: ../classes/class-ccf-form-manager.php:
|
626 |
-
#: ../classes/class-ccf-form-manager.php:
|
627 |
-
#: ../classes/class-ccf-form-manager.php:
|
628 |
-
#: ../classes/class-ccf-form-manager.php:
|
629 |
-
#: ../classes/class-ccf-form-manager.php:
|
630 |
-
#: ../classes/class-ccf-form-manager.php:
|
631 |
-
#: ../classes/class-ccf-form-manager.php:
|
632 |
-
#: ../classes/class-ccf-form-manager.php:
|
633 |
-
#: ../classes/class-ccf-form-manager.php:
|
634 |
-
#: ../classes/class-ccf-form-manager.php:
|
635 |
-
#: ../classes/class-ccf-form-manager.php:
|
636 |
msgid "Basic"
|
637 |
msgstr ""
|
638 |
|
639 |
-
#: ../classes/class-ccf-form-manager.php:
|
640 |
msgid "HTML Content:"
|
641 |
msgstr ""
|
642 |
|
643 |
-
#: ../classes/class-ccf-form-manager.php:
|
644 |
msgid "Heading:"
|
645 |
msgstr ""
|
646 |
|
647 |
-
#: ../classes/class-ccf-form-manager.php:
|
648 |
msgid "Sub Heading:"
|
649 |
msgstr ""
|
650 |
|
651 |
-
#: ../classes/class-ccf-form-manager.php:
|
652 |
-
#: ../classes/class-ccf-form-manager.php:
|
653 |
-
#: ../classes/class-ccf-form-manager.php:
|
654 |
-
#: ../classes/class-ccf-form-manager.php:
|
655 |
-
#: ../classes/class-ccf-form-manager.php:
|
656 |
-
#: ../classes/class-ccf-form-manager.php:
|
657 |
-
#: ../classes/class-ccf-form-manager.php:
|
658 |
-
#: ../classes/class-ccf-form-manager.php:
|
659 |
-
#: ../classes/class-ccf-form-manager.php:
|
660 |
msgid "Internal Unique Slug (a-z, 0-9, -, _):"
|
661 |
msgstr ""
|
662 |
|
663 |
-
#: ../classes/class-ccf-form-manager.php:
|
664 |
msgid "Enable Date Select"
|
665 |
msgstr ""
|
666 |
|
667 |
-
#: ../classes/class-ccf-form-manager.php:
|
668 |
msgid "Enable Time Select"
|
669 |
msgstr ""
|
670 |
|
671 |
-
#: ../classes/class-ccf-form-manager.php:
|
672 |
msgid "Format:"
|
673 |
msgstr ""
|
674 |
|
675 |
-
#: ../classes/class-ccf-form-manager.php:
|
676 |
-
#: ../classes/class-ccf-form-manager.php:
|
677 |
msgid "International"
|
678 |
msgstr ""
|
679 |
|
680 |
-
#: ../classes/class-ccf-form-manager.php:
|
681 |
msgid "Type:"
|
682 |
msgstr ""
|
683 |
|
684 |
-
#: ../classes/class-ccf-form-manager.php:
|
685 |
msgid "United States"
|
686 |
msgstr ""
|
687 |
|
688 |
-
#: ../classes/class-ccf-form-manager.php:
|
689 |
msgid "Require Confirmation:"
|
690 |
msgstr ""
|
691 |
|
692 |
-
#: ../classes/class-ccf-form-manager.php:
|
693 |
msgid "Label"
|
694 |
msgstr ""
|
695 |
|
696 |
-
#: ../classes/class-ccf-form-manager.php:
|
697 |
msgid "Value"
|
698 |
msgstr ""
|
699 |
|
700 |
-
#: ../classes/class-ccf-form-manager.php:
|
701 |
-
#: ../classes/class-ccf-form-manager.php:
|
702 |
-
#: ../classes/class-ccf-form-manager.php:
|
703 |
msgid "Manage field choices:"
|
704 |
msgstr ""
|
705 |
|
706 |
-
#: ../classes/class-ccf-form-manager.php:
|
707 |
-
#: ../classes/class-ccf-form-manager.php:
|
708 |
-
#: ../classes/class-ccf-form-manager.php:
|
709 |
msgid ""
|
710 |
"Note: If an option does not have a \"value\", it will not be considered a "
|
711 |
"valid selection if the field is required. The \"value\" is what's read, "
|
712 |
"stored, and displayed in the submission."
|
713 |
msgstr ""
|
714 |
|
715 |
-
#: ../classes/class-ccf-form-manager.php:
|
716 |
-
|
717 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
718 |
msgid "An example choice"
|
719 |
msgstr ""
|
720 |
|
721 |
-
#: ../classes/class-ccf-form-manager.php:
|
722 |
msgid "Arbitrary block of HTML."
|
723 |
msgstr ""
|
724 |
|
725 |
-
#: ../classes/class-ccf-form-manager.php:
|
726 |
msgid "Section Heading"
|
727 |
msgstr ""
|
728 |
|
729 |
-
#: ../classes/class-ccf-form-manager.php:
|
730 |
msgid "This is the sub-heading text."
|
731 |
msgstr ""
|
732 |
|
733 |
-
#: ../classes/class-ccf-form-manager.php:
|
734 |
msgid "First"
|
735 |
msgstr ""
|
736 |
|
737 |
-
#: ../classes/class-ccf-form-manager.php:
|
738 |
msgid "Last"
|
739 |
msgstr ""
|
740 |
|
741 |
-
#: ../classes/class-ccf-form-manager.php:
|
742 |
-
#: ../classes/class-ccf-form-manager.php:
|
743 |
msgid "Street Address"
|
744 |
msgstr ""
|
745 |
|
746 |
-
#: ../classes/class-ccf-form-manager.php:
|
747 |
-
#: ../classes/class-ccf-form-manager.php:
|
748 |
msgid "Address Line 2"
|
749 |
msgstr ""
|
750 |
|
751 |
-
#: ../classes/class-ccf-form-manager.php:
|
752 |
-
#: ../classes/class-ccf-form-manager.php:
|
753 |
msgid "City"
|
754 |
msgstr ""
|
755 |
|
756 |
-
#: ../classes/class-ccf-form-manager.php:
|
757 |
msgid "State"
|
758 |
msgstr ""
|
759 |
|
760 |
-
#: ../classes/class-ccf-form-manager.php:
|
761 |
msgid "ZIP Code"
|
762 |
msgstr ""
|
763 |
|
764 |
-
#: ../classes/class-ccf-form-manager.php:
|
765 |
msgid "State / Region / Province"
|
766 |
msgstr ""
|
767 |
|
768 |
-
#: ../classes/class-ccf-form-manager.php:
|
769 |
msgid "ZIP / Postal Code"
|
770 |
msgstr ""
|
771 |
|
772 |
-
#: ../classes/class-ccf-form-manager.php:
|
773 |
msgid "Country"
|
774 |
msgstr ""
|
775 |
|
776 |
-
#: ../classes/class-ccf-form-manager.php:
|
777 |
msgid "email@example.com"
|
778 |
msgstr ""
|
779 |
|
780 |
-
#: ../classes/class-ccf-form-manager.php:
|
781 |
-
#: ../classes/class-ccf-form-manager.php:
|
782 |
msgid "Email"
|
783 |
msgstr ""
|
784 |
|
785 |
-
#: ../classes/class-ccf-form-manager.php:
|
786 |
msgid "Confirm Email"
|
787 |
msgstr ""
|
788 |
|
789 |
-
#: ../classes/class-ccf-form-manager.php:
|
790 |
msgid "Edit"
|
791 |
msgstr ""
|
792 |
|
793 |
-
#: ../classes/class-ccf-form-manager.php:
|
794 |
msgid "Trash"
|
795 |
msgstr ""
|
796 |
|
797 |
-
#: ../classes/class-ccf-form-manager.php:
|
798 |
msgid "There is a problem with this form. Is it trashed or deleted?"
|
799 |
msgstr ""
|
800 |
|
801 |
-
#: ../classes/class-ccf-form-manager.php:
|
802 |
msgid "There are no submissions."
|
803 |
msgstr ""
|
804 |
|
805 |
-
#: ../classes/class-ccf-form-manager.php:
|
806 |
msgid "Add Form"
|
807 |
msgstr ""
|
808 |
|
809 |
-
#: ../classes/class-ccf-form-manager.php:
|
810 |
msgid "Single Line Text"
|
811 |
msgstr ""
|
812 |
|
813 |
-
#: ../classes/class-ccf-form-manager.php:
|
814 |
msgid "Dropdown"
|
815 |
msgstr ""
|
816 |
|
817 |
-
#: ../classes/class-ccf-form-manager.php:
|
818 |
msgid "Checkboxes"
|
819 |
msgstr ""
|
820 |
|
821 |
-
#: ../classes/class-ccf-form-manager.php:
|
822 |
msgid "Radio Buttons"
|
823 |
msgstr ""
|
824 |
|
825 |
-
#: ../classes/class-ccf-form-manager.php:
|
826 |
msgid "Paragraph Text"
|
827 |
msgstr ""
|
828 |
|
829 |
-
#: ../classes/class-ccf-form-manager.php:
|
830 |
msgid "Hidden"
|
831 |
msgstr ""
|
832 |
|
833 |
-
#: ../classes/class-ccf-form-manager.php:
|
|
|
|
|
|
|
|
|
834 |
msgid "HTML"
|
835 |
msgstr ""
|
836 |
|
837 |
-
#: ../classes/class-ccf-form-manager.php:
|
838 |
msgid "Section Header"
|
839 |
msgstr ""
|
840 |
|
841 |
-
#: ../classes/class-ccf-form-manager.php:
|
842 |
msgid "Name"
|
843 |
msgstr ""
|
844 |
|
845 |
-
#: ../classes/class-ccf-form-manager.php:
|
846 |
msgid "Date/Time"
|
847 |
msgstr ""
|
848 |
|
849 |
-
#: ../classes/class-ccf-form-manager.php:
|
850 |
msgid "Website"
|
851 |
msgstr ""
|
852 |
|
853 |
-
#: ../classes/class-ccf-form-manager.php:
|
854 |
msgid "Address"
|
855 |
msgstr ""
|
856 |
|
857 |
-
#: ../classes/class-ccf-form-manager.php:
|
858 |
msgid "Phone"
|
859 |
msgstr ""
|
860 |
|
861 |
-
#: ../classes/class-ccf-form-manager.php:
|
862 |
msgid "reCAPTCHA"
|
863 |
msgstr ""
|
864 |
|
865 |
-
#: ../classes/class-ccf-form-manager.php:
|
866 |
msgid "You have no email fields"
|
867 |
msgstr ""
|
868 |
|
869 |
-
#: ../classes/class-ccf-form-manager.php:
|
870 |
msgid "Invalid date"
|
871 |
msgstr ""
|
872 |
|
873 |
-
#: ../classes/class-ccf-form-manager.php:
|
874 |
msgid "Form Submission"
|
875 |
msgstr ""
|
876 |
|
@@ -886,6 +971,18 @@ msgstr ""
|
|
886 |
msgid "This phone number is not 10 digits"
|
887 |
msgstr ""
|
888 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
889 |
#: ../classes/class-ccf-upgrader.php:37
|
890 |
msgid ""
|
891 |
"Did you just upgrade to a post 6.0 version of Custom Contact Forms? If so, "
|
@@ -905,6 +1002,26 @@ msgstr ""
|
|
905 |
msgid "Database update complete."
|
906 |
msgstr ""
|
907 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
908 |
#: ../vendor/wp-api/wp-api/lib/class-wp-json-comments.php:42
|
909 |
#: ../vendor/wp-api/wp-api/lib/class-wp-json-comments.php:48
|
910 |
#: ../vendor/wp-api/wp-api/lib/class-wp-json-comments.php:108
|
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-02-10 22:46-0500\n"
|
9 |
+
"PO-Revision-Date: 2015-02-10 22:46-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:268 ../classes/class-ccf-api.php:563
|
27 |
+
#: ../classes/class-ccf-api.php:588 ../classes/class-ccf-api.php:617
|
28 |
+
#: ../classes/class-ccf-api.php:710
|
29 |
msgid "Invalid form ID."
|
30 |
msgstr ""
|
31 |
|
32 |
+
#: ../classes/class-ccf-api.php:273 ../classes/class-ccf-api.php:548
|
33 |
+
#: ../classes/class-ccf-api.php:568
|
34 |
msgid "Sorry, you cannot view forms."
|
35 |
msgstr ""
|
36 |
|
37 |
+
#: ../classes/class-ccf-api.php:594 ../classes/class-ccf-api.php:623
|
38 |
msgid "Invalid form."
|
39 |
msgstr ""
|
40 |
|
41 |
+
#: ../classes/class-ccf-api.php:598
|
42 |
msgid "Sorry, you cannot view this form."
|
43 |
msgstr ""
|
44 |
|
45 |
+
#: ../classes/class-ccf-api.php:721
|
46 |
msgid "The form cannot be deleted."
|
47 |
msgstr ""
|
48 |
|
49 |
+
#: ../classes/class-ccf-api.php:725
|
50 |
msgid "Permanently deleted form"
|
51 |
msgstr ""
|
52 |
|
53 |
+
#: ../classes/class-ccf-api.php:728
|
54 |
#: ../vendor/wp-api/wp-api/lib/class-wp-json-posts.php:381
|
55 |
msgid "Deleted post"
|
56 |
msgstr ""
|
67 |
msgid "<a href=\"%s\">Forms and Submissions</a>"
|
68 |
msgstr ""
|
69 |
|
70 |
+
#: ../classes/class-ccf-field-renderer.php:122
|
71 |
+
#, php-format
|
72 |
+
msgid "Allowed file extensions are %s. "
|
73 |
+
msgstr ""
|
74 |
+
|
75 |
+
#: ../classes/class-ccf-field-renderer.php:124
|
76 |
+
#, php-format
|
77 |
+
msgid "Max file size is %d MB. "
|
78 |
+
msgstr ""
|
79 |
+
|
80 |
+
#: ../classes/class-ccf-field-renderer.php:955
|
81 |
+
#: ../classes/class-ccf-field-renderer.php:976
|
82 |
+
#: ../classes/class-ccf-form-manager.php:1060
|
83 |
+
#: ../classes/class-ccf-form-manager.php:1081
|
84 |
msgid "HH"
|
85 |
msgstr ""
|
86 |
|
87 |
+
#: ../classes/class-ccf-field-renderer.php:959
|
88 |
+
#: ../classes/class-ccf-field-renderer.php:980
|
89 |
+
#: ../classes/class-ccf-form-manager.php:1064
|
90 |
+
#: ../classes/class-ccf-form-manager.php:1085
|
91 |
msgid "MM"
|
92 |
msgstr ""
|
93 |
|
94 |
+
#: ../classes/class-ccf-field-renderer.php:963
|
95 |
+
#: ../classes/class-ccf-field-renderer.php:984
|
96 |
+
#: ../classes/class-ccf-form-manager.php:1068
|
97 |
+
#: ../classes/class-ccf-form-manager.php:1089
|
98 |
msgid "AM"
|
99 |
msgstr ""
|
100 |
|
101 |
+
#: ../classes/class-ccf-field-renderer.php:964
|
102 |
+
#: ../classes/class-ccf-field-renderer.php:985
|
103 |
+
#: ../classes/class-ccf-form-manager.php:1069
|
104 |
+
#: ../classes/class-ccf-form-manager.php:1090
|
105 |
msgid "PM"
|
106 |
msgstr ""
|
107 |
|
108 |
+
#: ../classes/class-ccf-field-renderer.php:971
|
109 |
#: ../classes/class-ccf-form-cpt.php:306
|
110 |
+
#: ../classes/class-ccf-form-manager.php:228
|
111 |
+
#: ../classes/class-ccf-form-manager.php:241
|
112 |
+
#: ../classes/class-ccf-form-manager.php:1076
|
113 |
+
#: ../classes/class-ccf-form-manager.php:1259
|
114 |
+
#: ../classes/class-ccf-form-manager.php:1273
|
115 |
+
#: ../classes/class-ccf-form-manager.php:1405
|
116 |
msgid "Date"
|
117 |
msgstr ""
|
118 |
|
122 |
|
123 |
#: ../classes/class-ccf-form-cpt.php:123 ../classes/class-ccf-form-cpt.php:141
|
124 |
#: ../classes/class-ccf-form-cpt.php:304
|
125 |
+
#: ../classes/class-ccf-form-manager.php:231
|
126 |
+
#: ../classes/class-ccf-form-manager.php:244
|
127 |
msgid "Submissions"
|
128 |
msgstr ""
|
129 |
|
160 |
msgstr ""
|
161 |
|
162 |
#: ../classes/class-ccf-form-cpt.php:247
|
163 |
+
#: ../classes/class-ccf-form-manager.php:1201
|
164 |
msgid "(No title)"
|
165 |
msgstr ""
|
166 |
|
173 |
msgstr ""
|
174 |
|
175 |
#: ../classes/class-ccf-form-cpt.php:303
|
176 |
+
#: ../classes/class-ccf-form-manager.php:229
|
177 |
+
#: ../classes/class-ccf-form-manager.php:242
|
178 |
msgid "Author"
|
179 |
msgstr ""
|
180 |
|
181 |
#: ../classes/class-ccf-form-cpt.php:305
|
182 |
+
#: ../classes/class-ccf-form-manager.php:230
|
183 |
+
#: ../classes/class-ccf-form-manager.php:243
|
184 |
msgid "Number of Fields"
|
185 |
msgstr ""
|
186 |
|
210 |
msgstr ""
|
211 |
|
212 |
#: ../classes/class-ccf-form-cpt.php:368 ../classes/class-ccf-form-cpt.php:371
|
213 |
+
#: ../classes/class-ccf-form-manager.php:65
|
214 |
msgid "New Form"
|
215 |
msgstr ""
|
216 |
|
242 |
msgid "No forms found in trash."
|
243 |
msgstr ""
|
244 |
|
245 |
+
#: ../classes/class-ccf-form-handler.php:127
|
246 |
+
#: ../classes/class-ccf-form-handler.php:208
|
247 |
+
#: ../classes/class-ccf-form-handler.php:245
|
248 |
+
#: ../classes/class-ccf-form-handler.php:323
|
249 |
+
#: ../classes/class-ccf-form-handler.php:327
|
250 |
+
#: ../classes/class-ccf-form-handler.php:331
|
251 |
+
#: ../classes/class-ccf-form-handler.php:335
|
252 |
+
#: ../classes/class-ccf-form-handler.php:340
|
253 |
+
#: ../classes/class-ccf-form-handler.php:365
|
254 |
+
#: ../classes/class-ccf-form-handler.php:373
|
255 |
+
#: ../classes/class-ccf-form-handler.php:381
|
256 |
+
#: ../classes/class-ccf-form-handler.php:435
|
257 |
#: ../classes/class-ccf-form-renderer.php:49
|
258 |
msgid "This field is required."
|
259 |
msgstr ""
|
260 |
|
261 |
+
#: ../classes/class-ccf-form-handler.php:138
|
262 |
+
#, php-format
|
263 |
+
msgid "This file is too big (%d MB max)"
|
264 |
+
msgstr ""
|
265 |
+
|
266 |
+
#: ../classes/class-ccf-form-handler.php:142
|
267 |
+
msgid "An upload error occurred."
|
268 |
+
msgstr ""
|
269 |
+
|
270 |
+
#: ../classes/class-ccf-form-handler.php:164
|
271 |
+
msgid "File contains an invalid extension."
|
272 |
+
msgstr ""
|
273 |
+
|
274 |
+
#: ../classes/class-ccf-form-handler.php:261
|
275 |
#: ../classes/class-ccf-form-renderer.php:56
|
276 |
msgid "Your reCAPTCHA response was incorrect."
|
277 |
msgstr ""
|
278 |
|
279 |
+
#: ../classes/class-ccf-form-handler.php:280
|
280 |
msgid "This field is required"
|
281 |
msgstr ""
|
282 |
|
283 |
+
#: ../classes/class-ccf-form-handler.php:285
|
284 |
msgid "This phone number is too short"
|
285 |
msgstr ""
|
286 |
|
287 |
+
#: ../classes/class-ccf-form-handler.php:288
|
288 |
msgid "ccf_field_phoneFormat"
|
289 |
msgstr ""
|
290 |
|
291 |
+
#: ../classes/class-ccf-form-handler.php:291
|
292 |
msgid "This phone number contains invalid characters."
|
293 |
msgstr ""
|
294 |
|
295 |
+
#: ../classes/class-ccf-form-handler.php:297
|
296 |
msgid "This phone number is not 10 digits."
|
297 |
msgstr ""
|
298 |
|
299 |
+
#: ../classes/class-ccf-form-handler.php:368
|
300 |
+
#: ../classes/class-ccf-form-handler.php:384
|
301 |
msgid "This is not a valid email"
|
302 |
msgstr ""
|
303 |
|
304 |
+
#: ../classes/class-ccf-form-handler.php:376
|
305 |
#: ../classes/class-ccf-form-renderer.php:54
|
306 |
msgid "Emails do not match."
|
307 |
msgstr ""
|
308 |
|
309 |
+
#: ../classes/class-ccf-form-handler.php:409
|
310 |
msgid "First name is required."
|
311 |
msgstr ""
|
312 |
|
313 |
+
#: ../classes/class-ccf-form-handler.php:413
|
314 |
msgid "Last name is required."
|
315 |
msgstr ""
|
316 |
|
317 |
+
#: ../classes/class-ccf-form-handler.php:438
|
318 |
+
#: ../classes/class-ccf-form-renderer.php:66
|
319 |
msgid "This is not a valid URL. URL's must start with http(s)://"
|
320 |
msgstr ""
|
321 |
|
322 |
+
#: ../classes/class-ccf-form-handler.php:466
|
323 |
+
#: ../classes/class-ccf-form-handler.php:498
|
324 |
#: ../classes/class-ccf-form-renderer.php:50
|
325 |
msgid "Date is required."
|
326 |
msgstr ""
|
327 |
|
328 |
+
#: ../classes/class-ccf-form-handler.php:469
|
329 |
+
#: ../classes/class-ccf-form-handler.php:501
|
330 |
#: ../classes/class-ccf-form-renderer.php:61
|
331 |
msgid "This date is not valid."
|
332 |
msgstr ""
|
333 |
|
334 |
+
#: ../classes/class-ccf-form-handler.php:474
|
335 |
+
#: ../classes/class-ccf-form-handler.php:506
|
336 |
#: ../classes/class-ccf-form-renderer.php:51
|
337 |
msgid "Hour is required."
|
338 |
msgstr ""
|
339 |
|
340 |
+
#: ../classes/class-ccf-form-handler.php:477
|
341 |
+
#: ../classes/class-ccf-form-handler.php:509
|
342 |
#: ../classes/class-ccf-form-renderer.php:60
|
343 |
msgid "This is not a valid hour."
|
344 |
msgstr ""
|
345 |
|
346 |
+
#: ../classes/class-ccf-form-handler.php:482
|
347 |
+
#: ../classes/class-ccf-form-handler.php:514
|
348 |
#: ../classes/class-ccf-form-renderer.php:52
|
349 |
msgid "Minute is required."
|
350 |
msgstr ""
|
351 |
|
352 |
+
#: ../classes/class-ccf-form-handler.php:485
|
353 |
+
#: ../classes/class-ccf-form-handler.php:517
|
354 |
#: ../classes/class-ccf-form-renderer.php:62
|
355 |
msgid "This is not a valid minute."
|
356 |
msgstr ""
|
357 |
|
358 |
+
#: ../classes/class-ccf-form-handler.php:490
|
359 |
+
#: ../classes/class-ccf-form-handler.php:522
|
360 |
#: ../classes/class-ccf-form-renderer.php:53
|
361 |
msgid "AM/PM is required."
|
362 |
msgstr ""
|
363 |
|
364 |
+
#: ../classes/class-ccf-form-handler.php:761
|
365 |
msgid "Form submitted from"
|
366 |
msgstr ""
|
367 |
|
368 |
+
#: ../classes/class-ccf-form-handler.php:795
|
369 |
#, php-format
|
370 |
msgid "%s: Form Submission to \"%s\""
|
371 |
msgstr ""
|
372 |
|
373 |
+
#: ../classes/class-ccf-form-handler.php:808
|
374 |
+
#: ../classes/class-ccf-form-renderer.php:119
|
375 |
msgid "Thank you for your submission."
|
376 |
msgstr ""
|
377 |
|
378 |
+
#: ../classes/class-ccf-form-manager.php:62
|
379 |
msgid "Manage Forms"
|
380 |
msgstr ""
|
381 |
|
382 |
+
#: ../classes/class-ccf-form-manager.php:66
|
383 |
msgid "Existing Forms"
|
384 |
msgstr ""
|
385 |
|
386 |
+
#: ../classes/class-ccf-form-manager.php:90
|
387 |
msgid "Standard Fields"
|
388 |
msgstr ""
|
389 |
|
390 |
+
#: ../classes/class-ccf-form-manager.php:96
|
391 |
msgid "Special Fields"
|
392 |
msgstr ""
|
393 |
|
394 |
+
#: ../classes/class-ccf-form-manager.php:102
|
395 |
msgid "Structure"
|
396 |
msgstr ""
|
397 |
|
398 |
+
#: ../classes/class-ccf-form-manager.php:113
|
399 |
msgid "→ Drag fields here to add them"
|
400 |
msgstr ""
|
401 |
|
402 |
+
#: ../classes/class-ccf-form-manager.php:120
|
403 |
+
#: ../classes/class-ccf-form-manager.php:1204
|
404 |
msgid "Insert into post"
|
405 |
msgstr ""
|
406 |
|
407 |
+
#: ../classes/class-ccf-form-manager.php:121
|
408 |
msgid "Save Form"
|
409 |
msgstr ""
|
410 |
|
411 |
+
#: ../classes/class-ccf-form-manager.php:127
|
412 |
msgid "Form Settings"
|
413 |
msgstr ""
|
414 |
|
415 |
+
#: ../classes/class-ccf-form-manager.php:130
|
416 |
msgid "Form Title:"
|
417 |
msgstr ""
|
418 |
|
419 |
+
#: ../classes/class-ccf-form-manager.php:135
|
420 |
msgid "Form Description:"
|
421 |
msgstr ""
|
422 |
|
423 |
+
#: ../classes/class-ccf-form-manager.php:140
|
424 |
msgid "Button Text:"
|
425 |
msgstr ""
|
426 |
|
427 |
+
#: ../classes/class-ccf-form-manager.php:145
|
428 |
msgid "On form completion:"
|
429 |
msgstr ""
|
430 |
|
431 |
+
#: ../classes/class-ccf-form-manager.php:148
|
432 |
msgid "Show text"
|
433 |
msgstr ""
|
434 |
|
435 |
+
#: ../classes/class-ccf-form-manager.php:149
|
436 |
msgid "Redirect"
|
437 |
msgstr ""
|
438 |
|
439 |
+
#: ../classes/class-ccf-form-manager.php:153
|
440 |
msgid "Redirect URL:"
|
441 |
msgstr ""
|
442 |
|
443 |
+
#: ../classes/class-ccf-form-manager.php:157
|
444 |
msgid "Completion Message:"
|
445 |
msgstr ""
|
446 |
|
447 |
+
#: ../classes/class-ccf-form-manager.php:164
|
448 |
msgid "Form Notifications"
|
449 |
msgstr ""
|
450 |
|
451 |
+
#: ../classes/class-ccf-form-manager.php:167
|
452 |
msgid "Send Email Notifications:"
|
453 |
msgstr ""
|
454 |
|
455 |
+
#: ../classes/class-ccf-form-manager.php:170
|
456 |
+
#: ../classes/class-ccf-form-manager.php:281
|
457 |
+
#: ../classes/class-ccf-form-manager.php:331
|
458 |
+
#: ../classes/class-ccf-form-manager.php:407
|
459 |
+
#: ../classes/class-ccf-form-manager.php:497
|
460 |
+
#: ../classes/class-ccf-form-manager.php:562
|
461 |
+
#: ../classes/class-ccf-form-manager.php:604
|
462 |
+
#: ../classes/class-ccf-form-manager.php:665
|
463 |
+
#: ../classes/class-ccf-form-manager.php:712
|
464 |
+
#: ../classes/class-ccf-form-manager.php:754
|
465 |
+
#: ../classes/class-ccf-form-manager.php:761
|
466 |
+
#: ../classes/class-ccf-form-manager.php:812
|
467 |
+
#: ../classes/class-ccf-form-manager.php:855
|
468 |
+
#: ../classes/class-ccf-form-manager.php:898
|
469 |
msgid "Yes"
|
470 |
msgstr ""
|
471 |
|
472 |
+
#: ../classes/class-ccf-form-manager.php:171
|
473 |
+
#: ../classes/class-ccf-form-manager.php:282
|
474 |
+
#: ../classes/class-ccf-form-manager.php:332
|
475 |
+
#: ../classes/class-ccf-form-manager.php:408
|
476 |
+
#: ../classes/class-ccf-form-manager.php:498
|
477 |
+
#: ../classes/class-ccf-form-manager.php:563
|
478 |
+
#: ../classes/class-ccf-form-manager.php:605
|
479 |
+
#: ../classes/class-ccf-form-manager.php:666
|
480 |
+
#: ../classes/class-ccf-form-manager.php:713
|
481 |
+
#: ../classes/class-ccf-form-manager.php:755
|
482 |
+
#: ../classes/class-ccf-form-manager.php:762
|
483 |
+
#: ../classes/class-ccf-form-manager.php:813
|
484 |
+
#: ../classes/class-ccf-form-manager.php:856
|
485 |
+
#: ../classes/class-ccf-form-manager.php:899
|
486 |
msgid "No"
|
487 |
msgstr ""
|
488 |
|
489 |
+
#: ../classes/class-ccf-form-manager.php:176
|
490 |
msgid "\"To\" Email Addresses (comma separated):"
|
491 |
msgstr ""
|
492 |
|
493 |
+
#: ../classes/class-ccf-form-manager.php:181
|
494 |
msgid "\"From\" Email Address Type:"
|
495 |
msgstr ""
|
496 |
|
497 |
+
#: ../classes/class-ccf-form-manager.php:183
|
498 |
msgid "WordPress Default"
|
499 |
msgstr ""
|
500 |
|
501 |
+
#: ../classes/class-ccf-form-manager.php:184
|
502 |
msgid "Custom Email"
|
503 |
msgstr ""
|
504 |
|
505 |
+
#: ../classes/class-ccf-form-manager.php:185
|
506 |
msgid "Form Field"
|
507 |
msgstr ""
|
508 |
|
509 |
+
#: ../classes/class-ccf-form-manager.php:188
|
510 |
msgid ""
|
511 |
"You can set the notification emails from address to be the WP default, a "
|
512 |
"custom email address, or pull the address from a field in the form."
|
513 |
msgstr ""
|
514 |
|
515 |
+
#: ../classes/class-ccf-form-manager.php:192
|
516 |
msgid "Custom \"From\" Email Address:"
|
517 |
msgstr ""
|
518 |
|
519 |
+
#: ../classes/class-ccf-form-manager.php:197
|
520 |
msgid "Pull \"From\" Email Dynamically from Field:"
|
521 |
msgstr ""
|
522 |
|
523 |
+
#: ../classes/class-ccf-form-manager.php:211
|
524 |
msgid "items"
|
525 |
msgstr ""
|
526 |
|
527 |
+
#: ../classes/class-ccf-form-manager.php:226
|
528 |
+
#: ../classes/class-ccf-form-manager.php:239
|
529 |
msgid "ID"
|
530 |
msgstr ""
|
531 |
|
532 |
+
#: ../classes/class-ccf-form-manager.php:227
|
533 |
+
#: ../classes/class-ccf-form-manager.php:240
|
534 |
msgid "Title"
|
535 |
msgstr ""
|
536 |
|
537 |
+
#: ../classes/class-ccf-form-manager.php:254
|
538 |
msgid "<span>←</span> Click on a field to edit it."
|
539 |
msgstr ""
|
540 |
|
541 |
+
#: ../classes/class-ccf-form-manager.php:263
|
542 |
+
#: ../classes/class-ccf-form-manager.php:307
|
543 |
+
#: ../classes/class-ccf-form-manager.php:389
|
544 |
+
#: ../classes/class-ccf-form-manager.php:479
|
545 |
msgid "Internal Unique Slug"
|
546 |
msgstr ""
|
547 |
|
548 |
+
#: ../classes/class-ccf-form-manager.php:267
|
549 |
+
#: ../classes/class-ccf-form-manager.php:311
|
550 |
+
#: ../classes/class-ccf-form-manager.php:354
|
551 |
+
#: ../classes/class-ccf-form-manager.php:393
|
552 |
+
#: ../classes/class-ccf-form-manager.php:483
|
553 |
+
#: ../classes/class-ccf-form-manager.php:552
|
554 |
+
#: ../classes/class-ccf-form-manager.php:588
|
555 |
+
#: ../classes/class-ccf-form-manager.php:644
|
556 |
+
#: ../classes/class-ccf-form-manager.php:695
|
557 |
+
#: ../classes/class-ccf-form-manager.php:738
|
558 |
+
#: ../classes/class-ccf-form-manager.php:802
|
559 |
+
#: ../classes/class-ccf-form-manager.php:845
|
560 |
+
#: ../classes/class-ccf-form-manager.php:888
|
561 |
msgid "Label:"
|
562 |
msgstr ""
|
563 |
|
564 |
+
#: ../classes/class-ccf-form-manager.php:271
|
565 |
+
#: ../classes/class-ccf-form-manager.php:315
|
566 |
+
#: ../classes/class-ccf-form-manager.php:358
|
567 |
+
#: ../classes/class-ccf-form-manager.php:397
|
568 |
+
#: ../classes/class-ccf-form-manager.php:487
|
569 |
+
#: ../classes/class-ccf-form-manager.php:556
|
570 |
+
#: ../classes/class-ccf-form-manager.php:592
|
571 |
+
#: ../classes/class-ccf-form-manager.php:648
|
572 |
+
#: ../classes/class-ccf-form-manager.php:699
|
573 |
+
#: ../classes/class-ccf-form-manager.php:742
|
574 |
+
#: ../classes/class-ccf-form-manager.php:806
|
575 |
+
#: ../classes/class-ccf-form-manager.php:849
|
576 |
+
#: ../classes/class-ccf-form-manager.php:892
|
577 |
+
msgid "Description:"
|
578 |
msgstr ""
|
579 |
|
580 |
+
#: ../classes/class-ccf-form-manager.php:275
|
581 |
+
#: ../classes/class-ccf-form-manager.php:401
|
582 |
+
#: ../classes/class-ccf-form-manager.php:491
|
|
|
583 |
#: ../classes/class-ccf-form-manager.php:527
|
584 |
+
#: ../classes/class-ccf-form-manager.php:597
|
585 |
+
#: ../classes/class-ccf-form-manager.php:652
|
586 |
+
#: ../classes/class-ccf-form-manager.php:747
|
587 |
+
msgid "Initial Value:"
|
|
|
|
|
|
|
588 |
msgstr ""
|
589 |
|
590 |
#: ../classes/class-ccf-form-manager.php:279
|
591 |
+
#: ../classes/class-ccf-form-manager.php:329
|
592 |
+
#: ../classes/class-ccf-form-manager.php:405
|
593 |
+
#: ../classes/class-ccf-form-manager.php:495
|
594 |
+
#: ../classes/class-ccf-form-manager.php:560
|
595 |
+
#: ../classes/class-ccf-form-manager.php:602
|
596 |
+
#: ../classes/class-ccf-form-manager.php:663
|
597 |
+
#: ../classes/class-ccf-form-manager.php:710
|
598 |
+
#: ../classes/class-ccf-form-manager.php:752
|
599 |
+
#: ../classes/class-ccf-form-manager.php:810
|
600 |
+
#: ../classes/class-ccf-form-manager.php:853
|
601 |
+
#: ../classes/class-ccf-form-manager.php:896
|
602 |
+
msgid "Required:"
|
603 |
+
msgstr ""
|
604 |
+
|
605 |
+
#: ../classes/class-ccf-form-manager.php:288
|
606 |
+
#: ../classes/class-ccf-form-manager.php:338
|
607 |
+
#: ../classes/class-ccf-form-manager.php:374
|
608 |
+
#: ../classes/class-ccf-form-manager.php:414
|
609 |
+
#: ../classes/class-ccf-form-manager.php:439
|
610 |
+
#: ../classes/class-ccf-form-manager.php:464
|
611 |
+
#: ../classes/class-ccf-form-manager.php:504
|
612 |
+
#: ../classes/class-ccf-form-manager.php:533
|
613 |
+
#: ../classes/class-ccf-form-manager.php:569
|
614 |
+
#: ../classes/class-ccf-form-manager.php:619
|
615 |
+
#: ../classes/class-ccf-form-manager.php:672
|
616 |
+
#: ../classes/class-ccf-form-manager.php:719
|
617 |
+
#: ../classes/class-ccf-form-manager.php:768
|
618 |
+
#: ../classes/class-ccf-form-manager.php:826
|
619 |
+
#: ../classes/class-ccf-form-manager.php:869
|
620 |
+
#: ../classes/class-ccf-form-manager.php:912
|
621 |
msgid "Advanced"
|
622 |
msgstr ""
|
623 |
|
624 |
+
#: ../classes/class-ccf-form-manager.php:291
|
625 |
+
#: ../classes/class-ccf-form-manager.php:341
|
626 |
+
#: ../classes/class-ccf-form-manager.php:377
|
627 |
+
#: ../classes/class-ccf-form-manager.php:417
|
628 |
+
#: ../classes/class-ccf-form-manager.php:442
|
629 |
+
#: ../classes/class-ccf-form-manager.php:467
|
630 |
+
#: ../classes/class-ccf-form-manager.php:507
|
631 |
+
#: ../classes/class-ccf-form-manager.php:536
|
632 |
+
#: ../classes/class-ccf-form-manager.php:572
|
633 |
+
#: ../classes/class-ccf-form-manager.php:622
|
634 |
+
#: ../classes/class-ccf-form-manager.php:675
|
635 |
+
#: ../classes/class-ccf-form-manager.php:722
|
636 |
+
#: ../classes/class-ccf-form-manager.php:771
|
637 |
+
#: ../classes/class-ccf-form-manager.php:829
|
638 |
+
#: ../classes/class-ccf-form-manager.php:872
|
639 |
+
#: ../classes/class-ccf-form-manager.php:915
|
640 |
msgid "Class Name:"
|
641 |
msgstr ""
|
642 |
|
643 |
+
#: ../classes/class-ccf-form-manager.php:295
|
644 |
+
#: ../classes/class-ccf-form-manager.php:421
|
645 |
+
#: ../classes/class-ccf-form-manager.php:511
|
646 |
+
#: ../classes/class-ccf-form-manager.php:627
|
647 |
+
#: ../classes/class-ccf-form-manager.php:679
|
648 |
+
#: ../classes/class-ccf-form-manager.php:776
|
649 |
msgid "Placeholder Text:"
|
650 |
msgstr ""
|
651 |
|
652 |
+
#: ../classes/class-ccf-form-manager.php:319
|
653 |
+
msgid "Allowed File Extensions (comma separate):"
|
654 |
+
msgstr ""
|
655 |
+
|
656 |
+
#: ../classes/class-ccf-form-manager.php:321
|
657 |
+
msgid ""
|
658 |
+
"If left blank, will default to all extensions registered by WordPress. If "
|
659 |
+
"you use a file extension or mime type not <a href=\"http://codex.wordpress."
|
660 |
+
"org/Function_Reference/get_allowed_mime_types\">whitelisted by WordPress</"
|
661 |
+
"a>, you will need to filter and manually whitelist the new extension."
|
662 |
+
msgstr ""
|
663 |
+
|
664 |
+
#: ../classes/class-ccf-form-manager.php:324
|
665 |
+
msgid "Max File Size (in MB):"
|
666 |
+
msgstr ""
|
667 |
+
|
668 |
+
#: ../classes/class-ccf-form-manager.php:326
|
669 |
+
#, php-format
|
670 |
+
msgid ""
|
671 |
+
"If left blank, will default to %d MB. Maximum allowed by server is %d MB."
|
672 |
+
msgstr ""
|
673 |
+
|
674 |
+
#: ../classes/class-ccf-form-manager.php:352
|
675 |
msgid ""
|
676 |
"reCAPTCHA is a simple captcha service provided by Google. <a target=\"_blank"
|
677 |
"\" href=\"https://www.google.com/recaptcha/intro/index.html\">Learn more</a>"
|
678 |
msgstr ""
|
679 |
|
680 |
+
#: ../classes/class-ccf-form-manager.php:362
|
681 |
msgid "Site Key:"
|
682 |
msgstr ""
|
683 |
|
684 |
+
#: ../classes/class-ccf-form-manager.php:364
|
685 |
+
#: ../classes/class-ccf-form-manager.php:369
|
686 |
msgid "Don't have one?"
|
687 |
msgstr ""
|
688 |
|
689 |
+
#: ../classes/class-ccf-form-manager.php:367
|
690 |
msgid "Secret Key:"
|
691 |
msgstr ""
|
692 |
|
693 |
+
#: ../classes/class-ccf-form-manager.php:430
|
694 |
+
#: ../classes/class-ccf-form-manager.php:451
|
695 |
+
#: ../classes/class-ccf-form-manager.php:476
|
696 |
+
#: ../classes/class-ccf-form-manager.php:520
|
697 |
+
#: ../classes/class-ccf-form-manager.php:545
|
698 |
+
#: ../classes/class-ccf-form-manager.php:581
|
699 |
+
#: ../classes/class-ccf-form-manager.php:637
|
700 |
+
#: ../classes/class-ccf-form-manager.php:688
|
701 |
+
#: ../classes/class-ccf-form-manager.php:731
|
702 |
+
#: ../classes/class-ccf-form-manager.php:795
|
703 |
+
#: ../classes/class-ccf-form-manager.php:838
|
704 |
+
#: ../classes/class-ccf-form-manager.php:881
|
705 |
msgid "Basic"
|
706 |
msgstr ""
|
707 |
|
708 |
+
#: ../classes/class-ccf-form-manager.php:433
|
709 |
msgid "HTML Content:"
|
710 |
msgstr ""
|
711 |
|
712 |
+
#: ../classes/class-ccf-form-manager.php:454
|
713 |
msgid "Heading:"
|
714 |
msgstr ""
|
715 |
|
716 |
+
#: ../classes/class-ccf-form-manager.php:458
|
717 |
msgid "Sub Heading:"
|
718 |
msgstr ""
|
719 |
|
720 |
+
#: ../classes/class-ccf-form-manager.php:523
|
721 |
+
#: ../classes/class-ccf-form-manager.php:548
|
722 |
+
#: ../classes/class-ccf-form-manager.php:584
|
723 |
+
#: ../classes/class-ccf-form-manager.php:640
|
724 |
+
#: ../classes/class-ccf-form-manager.php:691
|
725 |
+
#: ../classes/class-ccf-form-manager.php:734
|
726 |
+
#: ../classes/class-ccf-form-manager.php:798
|
727 |
+
#: ../classes/class-ccf-form-manager.php:841
|
728 |
+
#: ../classes/class-ccf-form-manager.php:884
|
729 |
msgid "Internal Unique Slug (a-z, 0-9, -, _):"
|
730 |
msgstr ""
|
731 |
|
732 |
+
#: ../classes/class-ccf-form-manager.php:610
|
733 |
msgid "Enable Date Select"
|
734 |
msgstr ""
|
735 |
|
736 |
+
#: ../classes/class-ccf-form-manager.php:614
|
737 |
msgid "Enable Time Select"
|
738 |
msgstr ""
|
739 |
|
740 |
+
#: ../classes/class-ccf-form-manager.php:656
|
741 |
msgid "Format:"
|
742 |
msgstr ""
|
743 |
|
744 |
+
#: ../classes/class-ccf-form-manager.php:659
|
745 |
+
#: ../classes/class-ccf-form-manager.php:706
|
746 |
msgid "International"
|
747 |
msgstr ""
|
748 |
|
749 |
+
#: ../classes/class-ccf-form-manager.php:703
|
750 |
msgid "Type:"
|
751 |
msgstr ""
|
752 |
|
753 |
+
#: ../classes/class-ccf-form-manager.php:705
|
754 |
msgid "United States"
|
755 |
msgstr ""
|
756 |
|
757 |
+
#: ../classes/class-ccf-form-manager.php:759
|
758 |
msgid "Require Confirmation:"
|
759 |
msgstr ""
|
760 |
|
761 |
+
#: ../classes/class-ccf-form-manager.php:787
|
762 |
msgid "Label"
|
763 |
msgstr ""
|
764 |
|
765 |
+
#: ../classes/class-ccf-form-manager.php:788
|
766 |
msgid "Value"
|
767 |
msgstr ""
|
768 |
|
769 |
+
#: ../classes/class-ccf-form-manager.php:817
|
770 |
+
#: ../classes/class-ccf-form-manager.php:860
|
771 |
+
#: ../classes/class-ccf-form-manager.php:903
|
772 |
msgid "Manage field choices:"
|
773 |
msgstr ""
|
774 |
|
775 |
+
#: ../classes/class-ccf-form-manager.php:821
|
776 |
+
#: ../classes/class-ccf-form-manager.php:864
|
777 |
+
#: ../classes/class-ccf-form-manager.php:907
|
778 |
msgid ""
|
779 |
"Note: If an option does not have a \"value\", it will not be considered a "
|
780 |
"valid selection if the field is required. The \"value\" is what's read, "
|
781 |
"stored, and displayed in the submission."
|
782 |
msgstr ""
|
783 |
|
784 |
+
#: ../classes/class-ccf-form-manager.php:924
|
785 |
+
msgid "You currently have no forms. Add some!"
|
786 |
+
msgstr ""
|
787 |
+
|
788 |
+
#: ../classes/class-ccf-form-manager.php:947
|
789 |
+
msgid "Allowed file extensions are {{ extensions }}. "
|
790 |
+
msgstr ""
|
791 |
+
|
792 |
+
#: ../classes/class-ccf-form-manager.php:949
|
793 |
+
msgid "Max file size is {{ file_size }} MB. "
|
794 |
+
msgstr ""
|
795 |
+
|
796 |
+
#: ../classes/class-ccf-form-manager.php:974
|
797 |
+
#: ../classes/class-ccf-form-manager.php:990
|
798 |
+
#: ../classes/class-ccf-form-manager.php:1008
|
799 |
msgid "An example choice"
|
800 |
msgstr ""
|
801 |
|
802 |
+
#: ../classes/class-ccf-form-manager.php:1026
|
803 |
msgid "Arbitrary block of HTML."
|
804 |
msgstr ""
|
805 |
|
806 |
+
#: ../classes/class-ccf-form-manager.php:1032
|
807 |
msgid "Section Heading"
|
808 |
msgstr ""
|
809 |
|
810 |
+
#: ../classes/class-ccf-form-manager.php:1034
|
811 |
msgid "This is the sub-heading text."
|
812 |
msgstr ""
|
813 |
|
814 |
+
#: ../classes/class-ccf-form-manager.php:1041
|
815 |
msgid "First"
|
816 |
msgstr ""
|
817 |
|
818 |
+
#: ../classes/class-ccf-form-manager.php:1045
|
819 |
msgid "Last"
|
820 |
msgstr ""
|
821 |
|
822 |
+
#: ../classes/class-ccf-form-manager.php:1105
|
823 |
+
#: ../classes/class-ccf-form-manager.php:1130
|
824 |
msgid "Street Address"
|
825 |
msgstr ""
|
826 |
|
827 |
+
#: ../classes/class-ccf-form-manager.php:1109
|
828 |
+
#: ../classes/class-ccf-form-manager.php:1134
|
829 |
msgid "Address Line 2"
|
830 |
msgstr ""
|
831 |
|
832 |
+
#: ../classes/class-ccf-form-manager.php:1113
|
833 |
+
#: ../classes/class-ccf-form-manager.php:1138
|
834 |
msgid "City"
|
835 |
msgstr ""
|
836 |
|
837 |
+
#: ../classes/class-ccf-form-manager.php:1121
|
838 |
msgid "State"
|
839 |
msgstr ""
|
840 |
|
841 |
+
#: ../classes/class-ccf-form-manager.php:1125
|
842 |
msgid "ZIP Code"
|
843 |
msgstr ""
|
844 |
|
845 |
+
#: ../classes/class-ccf-form-manager.php:1142
|
846 |
msgid "State / Region / Province"
|
847 |
msgstr ""
|
848 |
|
849 |
+
#: ../classes/class-ccf-form-manager.php:1146
|
850 |
msgid "ZIP / Postal Code"
|
851 |
msgstr ""
|
852 |
|
853 |
+
#: ../classes/class-ccf-form-manager.php:1154
|
854 |
msgid "Country"
|
855 |
msgstr ""
|
856 |
|
857 |
+
#: ../classes/class-ccf-form-manager.php:1165
|
858 |
msgid "email@example.com"
|
859 |
msgstr ""
|
860 |
|
861 |
+
#: ../classes/class-ccf-form-manager.php:1169
|
862 |
+
#: ../classes/class-ccf-form-manager.php:1464
|
863 |
msgid "Email"
|
864 |
msgstr ""
|
865 |
|
866 |
+
#: ../classes/class-ccf-form-manager.php:1173
|
867 |
msgid "Confirm Email"
|
868 |
msgstr ""
|
869 |
|
870 |
+
#: ../classes/class-ccf-form-manager.php:1203
|
871 |
msgid "Edit"
|
872 |
msgstr ""
|
873 |
|
874 |
+
#: ../classes/class-ccf-form-manager.php:1205
|
875 |
msgid "Trash"
|
876 |
msgstr ""
|
877 |
|
878 |
+
#: ../classes/class-ccf-form-manager.php:1248
|
879 |
msgid "There is a problem with this form. Is it trashed or deleted?"
|
880 |
msgstr ""
|
881 |
|
882 |
+
#: ../classes/class-ccf-form-manager.php:1396
|
883 |
msgid "There are no submissions."
|
884 |
msgstr ""
|
885 |
|
886 |
+
#: ../classes/class-ccf-form-manager.php:1425
|
887 |
msgid "Add Form"
|
888 |
msgstr ""
|
889 |
|
890 |
+
#: ../classes/class-ccf-form-manager.php:1449
|
891 |
msgid "Single Line Text"
|
892 |
msgstr ""
|
893 |
|
894 |
+
#: ../classes/class-ccf-form-manager.php:1450
|
895 |
msgid "Dropdown"
|
896 |
msgstr ""
|
897 |
|
898 |
+
#: ../classes/class-ccf-form-manager.php:1451
|
899 |
msgid "Checkboxes"
|
900 |
msgstr ""
|
901 |
|
902 |
+
#: ../classes/class-ccf-form-manager.php:1452
|
903 |
msgid "Radio Buttons"
|
904 |
msgstr ""
|
905 |
|
906 |
+
#: ../classes/class-ccf-form-manager.php:1453
|
907 |
msgid "Paragraph Text"
|
908 |
msgstr ""
|
909 |
|
910 |
+
#: ../classes/class-ccf-form-manager.php:1454
|
911 |
msgid "Hidden"
|
912 |
msgstr ""
|
913 |
|
914 |
+
#: ../classes/class-ccf-form-manager.php:1455
|
915 |
+
msgid "File Upload"
|
916 |
+
msgstr ""
|
917 |
+
|
918 |
+
#: ../classes/class-ccf-form-manager.php:1459
|
919 |
msgid "HTML"
|
920 |
msgstr ""
|
921 |
|
922 |
+
#: ../classes/class-ccf-form-manager.php:1460
|
923 |
msgid "Section Header"
|
924 |
msgstr ""
|
925 |
|
926 |
+
#: ../classes/class-ccf-form-manager.php:1465
|
927 |
msgid "Name"
|
928 |
msgstr ""
|
929 |
|
930 |
+
#: ../classes/class-ccf-form-manager.php:1466
|
931 |
msgid "Date/Time"
|
932 |
msgstr ""
|
933 |
|
934 |
+
#: ../classes/class-ccf-form-manager.php:1467
|
935 |
msgid "Website"
|
936 |
msgstr ""
|
937 |
|
938 |
+
#: ../classes/class-ccf-form-manager.php:1468
|
939 |
msgid "Address"
|
940 |
msgstr ""
|
941 |
|
942 |
+
#: ../classes/class-ccf-form-manager.php:1469
|
943 |
msgid "Phone"
|
944 |
msgstr ""
|
945 |
|
946 |
+
#: ../classes/class-ccf-form-manager.php:1470
|
947 |
msgid "reCAPTCHA"
|
948 |
msgstr ""
|
949 |
|
950 |
+
#: ../classes/class-ccf-form-manager.php:1487
|
951 |
msgid "You have no email fields"
|
952 |
msgstr ""
|
953 |
|
954 |
+
#: ../classes/class-ccf-form-manager.php:1488
|
955 |
msgid "Invalid date"
|
956 |
msgstr ""
|
957 |
|
958 |
+
#: ../classes/class-ccf-form-manager.php:1490
|
959 |
msgid "Form Submission"
|
960 |
msgstr ""
|
961 |
|
971 |
msgid "This phone number is not 10 digits"
|
972 |
msgstr ""
|
973 |
|
974 |
+
#: ../classes/class-ccf-form-renderer.php:63
|
975 |
+
msgid "This is not an allowed file extension"
|
976 |
+
msgstr ""
|
977 |
+
|
978 |
+
#: ../classes/class-ccf-form-renderer.php:64
|
979 |
+
msgid "This file is bigger than"
|
980 |
+
msgstr ""
|
981 |
+
|
982 |
+
#: ../classes/class-ccf-form-renderer.php:65
|
983 |
+
msgid "An unknown error occured."
|
984 |
+
msgstr ""
|
985 |
+
|
986 |
#: ../classes/class-ccf-upgrader.php:37
|
987 |
msgid ""
|
988 |
"Did you just upgrade to a post 6.0 version of Custom Contact Forms? If so, "
|
1002 |
msgid "Database update complete."
|
1003 |
msgstr ""
|
1004 |
|
1005 |
+
#: ../classes/class-ccf-widget.php:17
|
1006 |
+
msgid "Add a custom contact form to a sidebar."
|
1007 |
+
msgstr ""
|
1008 |
+
|
1009 |
+
#: ../classes/class-ccf-widget.php:18
|
1010 |
+
msgid "Custom Contact Form"
|
1011 |
+
msgstr ""
|
1012 |
+
|
1013 |
+
#: ../classes/class-ccf-widget.php:64
|
1014 |
+
msgid "Title:"
|
1015 |
+
msgstr ""
|
1016 |
+
|
1017 |
+
#: ../classes/class-ccf-widget.php:71
|
1018 |
+
msgid "Choose a form:"
|
1019 |
+
msgstr ""
|
1020 |
+
|
1021 |
+
#: ../classes/class-ccf-widget.php:80
|
1022 |
+
msgid "Untitled"
|
1023 |
+
msgstr ""
|
1024 |
+
|
1025 |
#: ../vendor/wp-api/wp-api/lib/class-wp-json-comments.php:42
|
1026 |
#: ../vendor/wp-api/wp-api/lib/class-wp-json-comments.php:48
|
1027 |
#: ../vendor/wp-api/wp-api/lib/class-wp-json-comments.php:108
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
|
|
4 |
Tags: contact form, web form, custom contact form, custom forms, captcha form, contact fields, form mailers, forms
|
5 |
Requires at least: 3.9
|
6 |
Tested up to: 4.1
|
7 |
-
Stable tag: 6.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -35,6 +35,12 @@ For questions, feature requests, and support concerning the Custom Contact Forms
|
|
35 |
|
36 |
== Changelog ==
|
37 |
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
= 6.3.5 =
|
39 |
* Encode notification emails in UTF-8
|
40 |
|
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.4
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
35 |
|
36 |
== Changelog ==
|
37 |
|
38 |
+
= 6.4 =
|
39 |
+
* File upload field
|
40 |
+
* Description field added to each field type
|
41 |
+
* Improved unit testing
|
42 |
+
* CCF widget
|
43 |
+
|
44 |
= 6.3.5 =
|
45 |
* Encode notification emails in UTF-8
|
46 |
|