Version Description
- Themes and Bootstrap support
Download this release
Release Info
Developer | tlovett1 |
Plugin | Custom Contact Forms |
Version | 7.4 |
Comparing to | |
See all releases |
Code changes from version 7.3.2 to 7.4
- README.md +10 -1
- build/css/form.css +69 -10
- build/css/form.css.map +1 -1
- build/css/form.min.css +1 -1
- build/js/form-manager.js +5 -1
- build/js/form-manager.min.js +2 -2
- classes/class-ccf-api-form-controller.php +5 -0
- classes/class-ccf-field-renderer.php +85 -85
- classes/class-ccf-form-manager.php +13 -1
- classes/class-ccf-form-renderer.php +7 -2
- custom-contact-forms.php +2 -2
- js/manager/models.js +2 -1
- js/manager/views.js +3 -0
- languages/custom-contact-forms.mo +0 -0
- languages/custom-contact-forms.po +349 -329
- readme.txt +6 -1
README.md
CHANGED
@@ -41,6 +41,8 @@ if ( function_exists( 'ccf_output_form' ) ) {
|
|
41 |
}
|
42 |
```
|
43 |
|
|
|
|
|
44 |
### Form Settings
|
45 |
|
46 |
Each form has a number of settings that you should understand.
|
@@ -59,9 +61,16 @@ Each form has a number of settings that you should understand.
|
|
59 |
|
60 |
#### Form Notifications
|
61 |
|
62 |
-
For each of your
|
63 |
form is successfully filled out. Each notification contains the following configurable settings:
|
64 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
* `"To" Email Addresses` - You can send each notification to as many emails as you want. Addresses have two types: `custom` and
|
66 |
`field`. `custom` allows you to specify a specific email (such as your own). `field` will pull the email address dynamically from a form field.
|
67 |
* `"From" Email Address Type` - This allows you to set what email address the notification is sent from. `WordPress
|
41 |
}
|
42 |
```
|
43 |
|
44 |
+
In case you want to use the shortcode, it is: `[ccf_form id="FORMID"]`. You can find the form ID in the existing forms table of the form manager or in the URL when directly editing a form.
|
45 |
+
|
46 |
### Form Settings
|
47 |
|
48 |
Each form has a number of settings that you should understand.
|
61 |
|
62 |
#### Form Notifications
|
63 |
|
64 |
+
For each of your forms you can add email notifications (as many as you want). Email notifications will be sent when a
|
65 |
form is successfully filled out. Each notification contains the following configurable settings:
|
66 |
|
67 |
+
* `Notification Title` - This is just an internal name for keeping track of your notification.
|
68 |
+
* `Email Content (HTML)` - This is the body of the email that will be sent. The email must be written using HTML. The following variables are support:
|
69 |
+
|
70 |
+
* `[all_fields]` - Shows all your form fields
|
71 |
+
* `[ip_address]` - Shows the IP address of the submitter
|
72 |
+
* `[FIELD_SLUG]` - Each of your form fields can be inserted using their field slug.
|
73 |
+
|
74 |
* `"To" Email Addresses` - You can send each notification to as many emails as you want. Addresses have two types: `custom` and
|
75 |
`field`. `custom` allows you to specify a specific email (such as your own). `field` will pull the email address dynamically from a form field.
|
76 |
* `"From" Email Address Type` - This allows you to set what email address the notification is sent from. `WordPress
|
build/css/form.css
CHANGED
@@ -40,17 +40,24 @@
|
|
40 |
float: none; }
|
41 |
.ccf-form-wrapper .field .field-error-input {
|
42 |
border: 1px solid #ff0000; }
|
43 |
-
.ccf-form-wrapper .field label {
|
44 |
display: block;
|
45 |
clear: both;
|
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%;
|
53 |
box-sizing: border-box; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
.ccf-form-wrapper .field textarea {
|
55 |
min-height: 100px;
|
56 |
color: inherit;
|
@@ -71,25 +78,77 @@
|
|
71 |
font-size: 85%;
|
72 |
clear: none;
|
73 |
font-weight: normal; }
|
74 |
-
.ccf-form-wrapper .field.section-header .heading {
|
75 |
font-size: 125%;
|
76 |
border-bottom: 1px solid #ccc;
|
77 |
padding-bottom: 5px; }
|
78 |
-
.ccf-form-wrapper .field.section-header .subheading {
|
79 |
margin-top: 10px;
|
80 |
font-size: 85%;
|
81 |
font-style: italic; }
|
82 |
-
.ccf-form-wrapper .field.date .hour, .ccf-form-wrapper .field.date .minute {
|
83 |
display: inline-block;
|
84 |
margin-right: 5px; }
|
85 |
-
.ccf-form-wrapper .field.date .hour input, .ccf-form-wrapper .field.date .minute input {
|
86 |
-
width:
|
87 |
-
.ccf-form-wrapper .field.date .hour label, .ccf-form-wrapper .field.date .minute label {
|
88 |
font-weight: normal; }
|
89 |
-
.ccf-form-wrapper .field.date .am-pm {
|
90 |
display: inline-block;
|
91 |
vertical-align: top; }
|
92 |
-
.ccf-form-wrapper .field.date .am-pm select {
|
93 |
width: auto; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
|
95 |
/*# sourceMappingURL=form.css.map */
|
40 |
float: none; }
|
41 |
.ccf-form-wrapper .field .field-error-input {
|
42 |
border: 1px solid #ff0000; }
|
43 |
+
.ccf-form-wrapper .field label.main-label {
|
44 |
display: block;
|
45 |
clear: both;
|
46 |
margin-bottom: 6px;
|
47 |
font-weight: bold; }
|
48 |
+
.ccf-form-wrapper .field label.main-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%;
|
53 |
box-sizing: border-box; }
|
54 |
+
.ccf-form-wrapper .field select {
|
55 |
+
display: block;
|
56 |
+
width: auto; }
|
57 |
+
.ccf-form-wrapper .field input[type=file] {
|
58 |
+
background-color: inherit;
|
59 |
+
border: 0;
|
60 |
+
line-height: 0; }
|
61 |
.ccf-form-wrapper .field textarea {
|
62 |
min-height: 100px;
|
63 |
color: inherit;
|
78 |
font-size: 85%;
|
79 |
clear: none;
|
80 |
font-weight: normal; }
|
81 |
+
.ccf-form-wrapper .field.field-type-section-header .heading {
|
82 |
font-size: 125%;
|
83 |
border-bottom: 1px solid #ccc;
|
84 |
padding-bottom: 5px; }
|
85 |
+
.ccf-form-wrapper .field.field-type-section-header .subheading {
|
86 |
margin-top: 10px;
|
87 |
font-size: 85%;
|
88 |
font-style: italic; }
|
89 |
+
.ccf-form-wrapper .field.field-type-date .hour, .ccf-form-wrapper .field.field-type-date .minute {
|
90 |
display: inline-block;
|
91 |
margin-right: 5px; }
|
92 |
+
.ccf-form-wrapper .field.field-type-date .hour input, .ccf-form-wrapper .field.field-type-date .minute input {
|
93 |
+
width: 3.5em; }
|
94 |
+
.ccf-form-wrapper .field.field-type-date .hour label, .ccf-form-wrapper .field.field-type-date .minute label {
|
95 |
font-weight: normal; }
|
96 |
+
.ccf-form-wrapper .field.field-type-date .am-pm {
|
97 |
display: inline-block;
|
98 |
vertical-align: top; }
|
99 |
+
.ccf-form-wrapper .field.field-type-date .am-pm select {
|
100 |
width: auto; }
|
101 |
+
.ccf-form-wrapper .ccf-theme-dark {
|
102 |
+
font-size: 16px; }
|
103 |
+
.ccf-form-wrapper .ccf-theme-dark input[type=text], .ccf-form-wrapper .ccf-theme-dark input[type=submit], .ccf-form-wrapper .ccf-theme-dark select, .ccf-form-wrapper .ccf-theme-dark textarea, .ccf-form-wrapper .ccf-theme-dark dropdown {
|
104 |
+
border-radius: 4px;
|
105 |
+
background-color: #555;
|
106 |
+
color: #fff;
|
107 |
+
border: 1px solid #ccc;
|
108 |
+
padding: 8px; }
|
109 |
+
.ccf-form-wrapper .ccf-theme-dark input[type=text]::-webkit-input-placeholder, .ccf-form-wrapper .ccf-theme-dark input[type=submit]::-webkit-input-placeholder, .ccf-form-wrapper .ccf-theme-dark select::-webkit-input-placeholder, .ccf-form-wrapper .ccf-theme-dark textarea::-webkit-input-placeholder, .ccf-form-wrapper .ccf-theme-dark dropdown::-webkit-input-placeholder {
|
110 |
+
color: #ccc; }
|
111 |
+
.ccf-form-wrapper .ccf-theme-dark input[type=text]:-moz-placeholder, .ccf-form-wrapper .ccf-theme-dark input[type=submit]:-moz-placeholder, .ccf-form-wrapper .ccf-theme-dark select:-moz-placeholder, .ccf-form-wrapper .ccf-theme-dark textarea:-moz-placeholder, .ccf-form-wrapper .ccf-theme-dark dropdown:-moz-placeholder {
|
112 |
+
color: #ccc; }
|
113 |
+
.ccf-form-wrapper .ccf-theme-dark input[type=text]:-moz-placeholder, .ccf-form-wrapper .ccf-theme-dark input[type=submit]:-moz-placeholder, .ccf-form-wrapper .ccf-theme-dark select:-moz-placeholder, .ccf-form-wrapper .ccf-theme-dark textarea:-moz-placeholder, .ccf-form-wrapper .ccf-theme-dark dropdown:-moz-placeholder {
|
114 |
+
color: #ccc; }
|
115 |
+
.ccf-form-wrapper .ccf-theme-dark input[type=text]:-ms-input-placeholder, .ccf-form-wrapper .ccf-theme-dark input[type=submit]:-ms-input-placeholder, .ccf-form-wrapper .ccf-theme-dark select:-ms-input-placeholder, .ccf-form-wrapper .ccf-theme-dark textarea:-ms-input-placeholder, .ccf-form-wrapper .ccf-theme-dark dropdown:-ms-input-placeholder {
|
116 |
+
color: #ccc; }
|
117 |
+
.ccf-form-wrapper .ccf-theme-dark input.ccf-submit-button {
|
118 |
+
padding: 8px 14px;
|
119 |
+
background-color: #555555;
|
120 |
+
background-image: -webkit-gradient(linear, left top, left bottom, from(#555555), to(#222));
|
121 |
+
background-image: -webkit-linear-gradient(top, #555555, #222);
|
122 |
+
background-image: -moz-linear-gradient(top, #555555, #222);
|
123 |
+
background-image: -ms-linear-gradient(top, #555555, #222);
|
124 |
+
background-image: -o-linear-gradient(top, #555555, #222);
|
125 |
+
background-image: linear-gradient(to bottom, #555555, #222);
|
126 |
+
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=#555555, endColorstr=#222); }
|
127 |
+
.ccf-form-wrapper .ccf-theme-light {
|
128 |
+
font-size: 16px; }
|
129 |
+
.ccf-form-wrapper .ccf-theme-light input[type=text], .ccf-form-wrapper .ccf-theme-light input[type=submit], .ccf-form-wrapper .ccf-theme-light select, .ccf-form-wrapper .ccf-theme-light textarea, .ccf-form-wrapper .ccf-theme-light dropdown {
|
130 |
+
border-radius: 4px;
|
131 |
+
background-color: #fcfcfc;
|
132 |
+
color: #333;
|
133 |
+
border: 1px solid #e0e0e0;
|
134 |
+
padding: 8px; }
|
135 |
+
.ccf-form-wrapper .ccf-theme-light input[type=text]::-webkit-input-placeholder, .ccf-form-wrapper .ccf-theme-light input[type=submit]::-webkit-input-placeholder, .ccf-form-wrapper .ccf-theme-light select::-webkit-input-placeholder, .ccf-form-wrapper .ccf-theme-light textarea::-webkit-input-placeholder, .ccf-form-wrapper .ccf-theme-light dropdown::-webkit-input-placeholder {
|
136 |
+
color: #ccc; }
|
137 |
+
.ccf-form-wrapper .ccf-theme-light input[type=text]:-moz-placeholder, .ccf-form-wrapper .ccf-theme-light input[type=submit]:-moz-placeholder, .ccf-form-wrapper .ccf-theme-light select:-moz-placeholder, .ccf-form-wrapper .ccf-theme-light textarea:-moz-placeholder, .ccf-form-wrapper .ccf-theme-light dropdown:-moz-placeholder {
|
138 |
+
color: #ccc; }
|
139 |
+
.ccf-form-wrapper .ccf-theme-light input[type=text]:-moz-placeholder, .ccf-form-wrapper .ccf-theme-light input[type=submit]:-moz-placeholder, .ccf-form-wrapper .ccf-theme-light select:-moz-placeholder, .ccf-form-wrapper .ccf-theme-light textarea:-moz-placeholder, .ccf-form-wrapper .ccf-theme-light dropdown:-moz-placeholder {
|
140 |
+
color: #ccc; }
|
141 |
+
.ccf-form-wrapper .ccf-theme-light input[type=text]:-ms-input-placeholder, .ccf-form-wrapper .ccf-theme-light input[type=submit]:-ms-input-placeholder, .ccf-form-wrapper .ccf-theme-light select:-ms-input-placeholder, .ccf-form-wrapper .ccf-theme-light textarea:-ms-input-placeholder, .ccf-form-wrapper .ccf-theme-light dropdown:-ms-input-placeholder {
|
142 |
+
color: #ccc; }
|
143 |
+
.ccf-form-wrapper .ccf-theme-light input.ccf-submit-button {
|
144 |
+
padding: 8px 14px;
|
145 |
+
background-color: #f0f0f0;
|
146 |
+
background-image: -webkit-gradient(linear, left top, left bottom, from(#f0f0f0), to(#fcfcfc));
|
147 |
+
background-image: -webkit-linear-gradient(top, #f0f0f0, #fcfcfc);
|
148 |
+
background-image: -moz-linear-gradient(top, #f0f0f0, #fcfcfc);
|
149 |
+
background-image: -ms-linear-gradient(top, #f0f0f0, #fcfcfc);
|
150 |
+
background-image: -o-linear-gradient(top, #f0f0f0, #fcfcfc);
|
151 |
+
background-image: linear-gradient(to bottom, #f0f0f0, #fcfcfc);
|
152 |
+
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=#f0f0f0, endColorstr=#fcfcfc); }
|
153 |
|
154 |
/*# sourceMappingURL=form.css.map */
|
build/css/form.css.map
CHANGED
@@ -1,6 +1,6 @@
|
|
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,
|
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,yCAAiB;MAChB,OAAO,EAAE,KAAK;MACd,KAAK,EAAE,IAAI;MACX,aAAa,EAAE,GAAG;MAClB,WAAW,EAAE,IAAI;MAEjB,mDAAU;QACT,aAAa,EAAE,IAAI;QACnB,KAAK,EAAE,OAAO;IAIhB,8EAA6B;MAC5B,KAAK,EAAE,IAAI;MACX,UAAU,EAAE,UAAU;IAGvB,+BAAO;MACN,OAAO,EAAE,KAAK;MACd,KAAK,EAAE,IAAI;IAGZ,yCAAiB;MAChB,gBAAgB,EAAE,OAAO;MACzB,MAAM,EAAE,CAAC;MACT,WAAW,EAAE,CAAC;IAGf,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,2DAAS;MACR,SAAS,EAAE,IAAI;MACf,aAAa,EAAE,cAAc;MAC7B,cAAc,EAAE,GAAG;IAGpB,8DAAY;MACX,UAAU,EAAE,IAAI;MAChB,SAAS,EAAE,GAAG;MACd,UAAU,EAAE,MAAM;IAKnB,gGAAe;MACd,OAAO,EAAE,YAAY;MACrB,YAAY,EAAE,GAAG;MAEjB,4GAAM;QACL,KAAK,EAAE,KAAK;MAGb,4GAAM;QACL,WAAW,EAAE,MAAM;IAIrB,+CAAO;MACN,OAAO,EAAE,YAAY;MACrB,cAAc,EAAE,GAAG;MAEnB,sDAAO;QACN,KAAK,EAAE,IAAI;EAMf,iCAAgB;IACf,SAAS,EAAE,IAAI;IAEf,0OAAiE;MAChE,aAAa,EAAE,GAAG;MAClB,gBAAgB,EAAE,IAAI;MACtB,KAAK,EAAE,IAAI;MACX,MAAM,EAAE,cAAc;MACtB,OAAO,EAAE,GAAG;MAEZ,iXAA6B;QAC5B,KAAK,EAAK,IAAI;MAEf,+TAAmB;QAClB,KAAK,EAAK,IAAI;MAEf,+TAAmB;QAClB,KAAK,EAAK,IAAI;MAEf,wVAAwB;QACvB,KAAK,EAAK,IAAI;IAIhB,yDAAwB;MACvB,OAAO,EAAE,QAAQ;MACjB,gBAAgB,EAAE,OAAO;MAAE,gBAAgB,EAAE,wEAAwE;MACrH,gBAAgB,EAAE,2CAA2C;MAC7D,gBAAgB,EAAE,wCAAwC;MAC1D,gBAAgB,EAAE,uCAAuC;MACzD,gBAAgB,EAAE,sCAAsC;MACxD,gBAAgB,EAAE,yCAAyC;MAAC,MAAM,EAAC,kGAAkG;EAIvK,kCAAiB;IAChB,SAAS,EAAE,IAAI;IAEf,+OAAiE;MAChE,aAAa,EAAE,GAAG;MAClB,gBAAgB,EAAE,OAAO;MACzB,KAAK,EAAE,IAAI;MACX,MAAM,EAAE,iBAAiB;MACzB,OAAO,EAAE,GAAG;MAEZ,sXAA6B;QAC5B,KAAK,EAAK,IAAI;MAEf,oUAAmB;QAClB,KAAK,EAAK,IAAI;MAEf,oUAAmB;QAClB,KAAK,EAAK,IAAI;MAEf,6VAAwB;QACvB,KAAK,EAAK,IAAI;IAIhB,0DAAwB;MACvB,OAAO,EAAE,QAAQ;MACjB,gBAAgB,EAAE,OAAO;MAAE,gBAAgB,EAAE,2EAA2E;MACxH,gBAAgB,EAAE,8CAA8C;MAChE,gBAAgB,EAAE,2CAA2C;MAC7D,gBAAgB,EAAE,0CAA0C;MAC5D,gBAAgB,EAAE,yCAAyC;MAC3D,gBAAgB,EAAE,4CAA4C;MAAC,MAAM,EAAC,qGAAqG",
|
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-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:
|
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.main-label{display:block;clear:both;margin-bottom:6px;font-weight:700}.ccf-form-wrapper .field label.main-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 select{display:block;width:auto}.ccf-form-wrapper .field input[type=file]{background-color:inherit;border:0;line-height:0}.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.field-type-section-header .heading{font-size:125%;border-bottom:1px solid #ccc;padding-bottom:5px}.ccf-form-wrapper .field.field-type-section-header .subheading{margin-top:10px;font-size:85%;font-style:italic}.ccf-form-wrapper .field.field-type-date .hour,.ccf-form-wrapper .field.field-type-date .minute{display:inline-block;margin-right:5px}.ccf-form-wrapper .field.field-type-date .hour input,.ccf-form-wrapper .field.field-type-date .minute input{width:3.5em}.ccf-form-wrapper .field.field-type-date .hour label,.ccf-form-wrapper .field.field-type-date .minute label{font-weight:400}.ccf-form-wrapper .field.field-type-date .am-pm{display:inline-block;vertical-align:top}.ccf-form-wrapper .field.field-type-date .am-pm select{width:auto}.ccf-form-wrapper .ccf-theme-dark{font-size:16px}.ccf-form-wrapper .ccf-theme-dark dropdown,.ccf-form-wrapper .ccf-theme-dark input[type=submit],.ccf-form-wrapper .ccf-theme-dark input[type=text],.ccf-form-wrapper .ccf-theme-dark select,.ccf-form-wrapper .ccf-theme-dark textarea{border-radius:4px;background-color:#555;color:#fff;border:1px solid #ccc;padding:8px}.ccf-form-wrapper .ccf-theme-dark dropdown::-webkit-input-placeholder,.ccf-form-wrapper .ccf-theme-dark input[type=submit]::-webkit-input-placeholder,.ccf-form-wrapper .ccf-theme-dark input[type=text]::-webkit-input-placeholder,.ccf-form-wrapper .ccf-theme-dark select::-webkit-input-placeholder,.ccf-form-wrapper .ccf-theme-dark textarea::-webkit-input-placeholder{color:#ccc}.ccf-form-wrapper .ccf-theme-dark dropdown:-moz-placeholder,.ccf-form-wrapper .ccf-theme-dark input[type=submit]:-moz-placeholder,.ccf-form-wrapper .ccf-theme-dark input[type=text]:-moz-placeholder,.ccf-form-wrapper .ccf-theme-dark select:-moz-placeholder,.ccf-form-wrapper .ccf-theme-dark textarea:-moz-placeholder{color:#ccc}.ccf-form-wrapper .ccf-theme-dark dropdown:-ms-input-placeholder,.ccf-form-wrapper .ccf-theme-dark input[type=submit]:-ms-input-placeholder,.ccf-form-wrapper .ccf-theme-dark input[type=text]:-ms-input-placeholder,.ccf-form-wrapper .ccf-theme-dark select:-ms-input-placeholder,.ccf-form-wrapper .ccf-theme-dark textarea:-ms-input-placeholder{color:#ccc}.ccf-form-wrapper .ccf-theme-dark input.ccf-submit-button{padding:8px 14px;background-color:#555;background-image:-webkit-gradient(linear,left top,left bottom,from(#555),to(#222));background-image:-webkit-linear-gradient(top,#555,#222);background-image:-moz-linear-gradient(top,#555,#222);background-image:-ms-linear-gradient(top,#555,#222);background-image:-o-linear-gradient(top,#555,#222);background-image:linear-gradient(to bottom,#555,#222);filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr=#555555, endColorstr=#222)}.ccf-form-wrapper .ccf-theme-light{font-size:16px}.ccf-form-wrapper .ccf-theme-light dropdown,.ccf-form-wrapper .ccf-theme-light input[type=submit],.ccf-form-wrapper .ccf-theme-light input[type=text],.ccf-form-wrapper .ccf-theme-light select,.ccf-form-wrapper .ccf-theme-light textarea{border-radius:4px;background-color:#fcfcfc;color:#333;border:1px solid #e0e0e0;padding:8px}.ccf-form-wrapper .ccf-theme-light dropdown::-webkit-input-placeholder,.ccf-form-wrapper .ccf-theme-light input[type=submit]::-webkit-input-placeholder,.ccf-form-wrapper .ccf-theme-light input[type=text]::-webkit-input-placeholder,.ccf-form-wrapper .ccf-theme-light select::-webkit-input-placeholder,.ccf-form-wrapper .ccf-theme-light textarea::-webkit-input-placeholder{color:#ccc}.ccf-form-wrapper .ccf-theme-light dropdown:-moz-placeholder,.ccf-form-wrapper .ccf-theme-light input[type=submit]:-moz-placeholder,.ccf-form-wrapper .ccf-theme-light input[type=text]:-moz-placeholder,.ccf-form-wrapper .ccf-theme-light select:-moz-placeholder,.ccf-form-wrapper .ccf-theme-light textarea:-moz-placeholder{color:#ccc}.ccf-form-wrapper .ccf-theme-light dropdown:-ms-input-placeholder,.ccf-form-wrapper .ccf-theme-light input[type=submit]:-ms-input-placeholder,.ccf-form-wrapper .ccf-theme-light input[type=text]:-ms-input-placeholder,.ccf-form-wrapper .ccf-theme-light select:-ms-input-placeholder,.ccf-form-wrapper .ccf-theme-light textarea:-ms-input-placeholder{color:#ccc}.ccf-form-wrapper .ccf-theme-light input.ccf-submit-button{padding:8px 14px;background-color:#f0f0f0;background-image:-webkit-gradient(linear,left top,left bottom,from(#f0f0f0),to(#fcfcfc));background-image:-webkit-linear-gradient(top,#f0f0f0,#fcfcfc);background-image:-moz-linear-gradient(top,#f0f0f0,#fcfcfc);background-image:-ms-linear-gradient(top,#f0f0f0,#fcfcfc);background-image:-o-linear-gradient(top,#f0f0f0,#fcfcfc);background-image:linear-gradient(to bottom,#f0f0f0,#fcfcfc);filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr=#f0f0f0, endColorstr=#fcfcfc)}
|
build/js/form-manager.js
CHANGED
@@ -449,7 +449,8 @@
|
|
449 |
postFieldMappings: new wp.ccf.collections.PostFieldMappings(),
|
450 |
notifications: new wp.ccf.collections.FormNotifications(),
|
451 |
pause: false,
|
452 |
-
pauseMessage: ccfSettings.pauseMessage
|
|
|
453 |
};
|
454 |
|
455 |
defaults = _.defaults( defaults, this.constructor.__super__.defaults );
|
@@ -2704,6 +2705,9 @@
|
|
2704 |
|
2705 |
var completionActionType = this.el.querySelectorAll( '.form-completion-action-type' )[0].value;
|
2706 |
this.model.set( 'completionActionType', completionActionType );
|
|
|
|
|
|
|
2707 |
},
|
2708 |
|
2709 |
fullSave: function( $promise ) {
|
449 |
postFieldMappings: new wp.ccf.collections.PostFieldMappings(),
|
450 |
notifications: new wp.ccf.collections.FormNotifications(),
|
451 |
pause: false,
|
452 |
+
pauseMessage: ccfSettings.pauseMessage,
|
453 |
+
theme: 'none'
|
454 |
};
|
455 |
|
456 |
defaults = _.defaults( defaults, this.constructor.__super__.defaults );
|
2705 |
|
2706 |
var completionActionType = this.el.querySelectorAll( '.form-completion-action-type' )[0].value;
|
2707 |
this.model.set( 'completionActionType', completionActionType );
|
2708 |
+
|
2709 |
+
var theme = this.el.querySelectorAll( '.form-theme' )[0].value;
|
2710 |
+
this.model.set( 'theme', theme );
|
2711 |
},
|
2712 |
|
2713 |
fullSave: function( $promise ) {
|
build/js/form-manager.min.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
(function(e,t,i,l){"use strict";window.wp=window.wp||{},wp.ccf=wp.ccf||{},wp.ccf.utils=wp.ccf.utils||{},wp.ccf.utils.cleanDateFields=function(e){delete e.date,delete e.date_gmt,delete e.modified,delete e.modified_gmt,delete e.date_tz,delete e.modified_tz},wp.ccf.utils.template=i.memoize(function(e){var t={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g};return i.template(document.getElementById(e).innerHTML,null,t)}),wp.ccf.utils.insertFormShortcode=function(e){var t=wp.ccf.forms.findWhere({id:e.get("id")});t||wp.ccf.forms.add(e);var i=tinymce.get(wpActiveEditor),l='[ccf_form id="'+e.get("id")+'"]';i&&!i.isHidden()?tinymce.activeEditor.execCommand("mceInsertContent",!1,l):document.getElementById(wpActiveEditor).value+=l},wp.ccf.utils.getPrettyPostDate=function(e){return e=moment.utc(e),l.gmtOffset&&(e=e.utcOffset(60*parseInt(l.gmtOffset))),e.format("h:mm a M/D/YYYY")},wp.ccf.utils.wordChop=function(e,t){var i=e.substr(0,t);return i.substr(0,Math.min(i.length,i.lastIndexOf(" "))),i.length<e.length&&(i+="..."),i},wp.ccf.utils.isFieldDate=function(e){return e.date!==void 0||e.hour!==void 0&&e.minute!==void 0&&e["am-pm"]!==void 0?!0:!1},wp.ccf.utils.isFieldName=function(e){return e.name!==void 0||e.last!==void 0?!0:!1},wp.ccf.utils.isFieldEmailConfirm=function(e){return e.email!==void 0||e.confirm!==void 0?!0:!1},wp.ccf.utils.isFieldAddress=function(e){return e.street!==void 0&&e.city!==void 0&&e.zipcode!==void 0&&e.line_two!==void 0?!0:!1},wp.ccf.utils.isFieldFile=function(e){return e.id!==void 0&&e.url!==void 0&&e.file_name!==void 0?!0:!1},wp.ccf.utils.getPrettyFieldEmailConfirm=function(e){return e.email?e.email:e.confirm?e.confirm:"-"},wp.ccf.utils.getPrettyFieldDate=function(e){var t="",i="";if(e.hour&&e.minute&&e["am-pm"]&&(t+=e.hour+":"+e.minute+" "+e["am-pm"]),e.date&&(t+=" "+e.date),!t)return"-";var s=moment.utc(t);return s.isValid()?(e.hour&&e.minute&&e["am-pm"]&&(i+=s.format("h:mm a")),e.date&&(i&&(i+=" "),i+=s.format("M/D/YYYY")),i):l.invalidDate},wp.ccf.utils.getPrettyFieldName=function(e){var t=e.first;return t.length>0&&(t+=" "),e.last&&(t+=e.last),t||(t="-"),t},wp.ccf.utils.getPrettyFieldAddress=function(e){if(!e.street||!e.city)return"-";var t=e.street;return e.line_two&&(t+=" "+e.line_two),t+=", "+e.city,e.state&&(t+=", "+e.state),e.zipcode&&(t+=" "+e.zipcode),e.country&&(t+=" "+e.country),t}})(jQuery,Backbone,_,ccfSettings),function(e,t,i){"use strict";wp.ccf.mixins=wp.ccf.mixins||{},wp.ccf.mixins.subViewable=wp.ccf.mixins.subViewable||{subViews:{},initRenderSubViews:function(e,t,l){this.renderedSubViews||(this.renderedSubViews={});for(var s in this.subViews){var o={el:this.$el.find(".ccf-"+s),parent:this};l&&i.extend(o,l),this.renderedSubViews[s]&&this.renderedSubViews[s].destroy&&this.renderedSubViews[s].destroy(),(t||!this.renderedSubViews[s])&&(this.renderedSubViews[s]=new this.subViews[s](o)),this.renderedSubViews[s].render(),e&&(this.renderedSubViews[s].el.style.display="block")}return this},showView:function(e,t,i){if(this.renderedSubViews!==void 0&&this.renderedSubViews[e]!==void 0){var l=this.renderedSubViews[e];i||l.render(t),l.el.style.display="block",this.currentView=e;for(var s in this.subViews)s!==e&&(this.renderedSubViews[s].el.style.display="none")}}}}(jQuery,Backbone,_,ccfSettings),function(e,t,i,l){"use strict";wp.ccf.models=wp.ccf.models||{},wp.ccf.models.Fields=wp.ccf.models.Fields||{};var s=function(e,i,l){return"object"!=typeof i&&""===i&&(i=""),t.Model.prototype.set.call(this,e,i,l)},o=function(e,t,i){return i=i||{},i.emulateHTTP=!0,this.constructor.__super__.sync.call(this,e,t,i)},c=function(e){for(var t in this.attributes)if(-1===i.indexOf(e,t)){var l=this.get(t);"string"==typeof l&&""!==l&&(l=(l+"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/“/g,"”").replace(/”/g,"”").replace(/‘/g,"‘").replace(/&/g,"&").replace(/'/g,"'"),this.set(t,l))}return this};wp.ccf.models.FieldChoice=wp.ccf.models.FieldChoice||t.Model.extend({defaults:{label:"",value:"",selected:!1},decode:function(){return c.call(this,[])},set:s}),wp.ccf.models.PostFieldMapping=wp.ccf.models.PostFieldMapping||t.Model.extend({defaults:{formField:"",postField:"",customFieldKey:""},decode:function(){return c.call(this,[])},set:s}),wp.ccf.models.FormNotificationAddress=wp.ccf.models.FormNotificationAddress||t.Model.extend({defaults:{type:"custom",field:"",email:""},decode:function(){return c.call(this,[])},set:s}),wp.ccf.models.FormNotification=wp.ccf.models.FormNotification||t.Model.extend({defaults:function(){return{title:"",content:"",active:!1,addresses:new wp.ccf.collections.FormNotificationAddresses,fromType:"default",fromAddress:"",fromField:"",subjectType:"default",subject:"",subjectField:"",fromNameType:"custom",fromName:"WordPress",fromNameField:""}},initialize:function(e){if("object"==typeof e&&e.addresses){var t=[];i.each(e.addresses,function(e){var i=new wp.ccf.models.FormNotificationAddress(e);i.decode(),t.push(i)}),this.set("addresses",new wp.ccf.collections.FormNotificationAddresses(t))}},decode:function(){return c.call(this,[])},toJSON:function(){var e=this.constructor.__super__.toJSON.call(this);return e.addresses&&(e.addresses=e.addresses.toJSON()),e},set:s}),wp.ccf.models.Form=wp.ccf.models.Form||wp.api.models.Post.extend({urlRoot:l.apiRoot.replace(/\/$/,"")+"/ccf/v1/forms",set:s,sync:o,idAttribute:"id",initialize:function(){this.on("sync",this.decode,this)},defaults:function(){var e={fields:new wp.ccf.collections.Fields,type:"ccf_form",status:"publish",description:"",buttonText:"Submit Form",completionActionType:"text",completionRedirectUrl:"",completionMessage:"",postCreation:!1,postCreationType:"post",postCreationStatus:"draft",postFieldMappings:new wp.ccf.collections.PostFieldMappings,notifications:new wp.ccf.collections.FormNotifications,pause:!1,pauseMessage:l.pauseMessage};return e=i.defaults(e,this.constructor.__super__.defaults),wp.ccf.utils.cleanDateFields(e),e},decode:function(){var e=i.keys(wp.api.models.Post.prototype.defaults);return e=i.without(e,"title"),c.call(this,e)},getFieldSlugs:function(e){var t=wp.ccf.currentForm.get("fields"),i=[];return t.each(function(t){e&&t.isImmutable||i.push(t.get("slug"))}),i},parse:function(e){var t=this,l=0,s=0;if(e.fields){var o=t.get("fields");if(o&&o.length>0){for(l=0;e.fields.length>l;l++){var c=e.fields[l],n=o.findWhere({slug:c.slug});if(n){if(c.choices!==void 0){var r=t.get("choices");if(r&&r.length>0)for(s=0;c.choices>s;s++){var a=r.at(s);a.set(c.choices[s]),a.decode()}delete e.fields[l].choices}n.set(c),n.decode()}}delete e.fields}else{var d=[];i.each(e.fields,function(e){var t=new wp.ccf.models.Fields[e.type](e);t.decode(),d.push(t)}),e.fields=new wp.ccf.collections.Fields(d,{formId:e.id})}}if(e.notifications){var f=t.get("notifications");if(f&&f.length>0){for(l=0;e.notifications.length>l;l++){var u=e.notifications[l],h=f.findWhere({slug:u.slug});if(h){if(u.addresses!==void 0){var p=t.get("addresses");if(p&&p.length>0)for(s=0;u.addresses>s;s++){var m=p.at(s);m.set(u.addresses[s]),m.decode()}delete e.notifications[l].addresses}h.set(u),h.decode()}}delete e.notifications}else{var w=[];i.each(e.notifications,function(e){var t=new wp.ccf.models.FormNotification(e);t.decode(),w.push(t)}),e.notifications=new wp.ccf.collections.FormNotifications(w)}}if(e.postFieldMappings){var v=t.get("postFieldMappings");if(v&&v.length>0){for(l=0;e.postFieldMappings.length>l;l++){var g=e.postFieldMappings[l],y=v.findWhere({slug:g.slug});y&&(y.set(g),y.decode())}delete e.postFieldMappings}else{var F=[];i.each(e.postFieldMappings,function(e){var t=new wp.ccf.models.PostFieldMapping(e);t.decode(),F.push(t)}),e.postFieldMappings=new wp.ccf.collections.PostFieldMappings(F)}}return this.constructor.__super__.parse.call(this,e)},toJSON:function(){var e=this.constructor.__super__.toJSON.call(this);return e.fields&&(e.fields=e.fields.toJSON()),e.notifications&&(e.notifications=e.notifications.toJSON()),e.author&&(e.author=e.author.toJSON()),e}}),wp.ccf.models.Submission=wp.api.models.Submission||wp.api.models.Post.extend({defaults:{id:null,data:{}},sync:o,urlRoot:l.apiRoot.replace(/\/$/,"")+"/ccf/v1/submissions"}),wp.ccf.models.Field=wp.api.models.Field||wp.api.models.Post.extend({idAttribute:"id",defaults:{id:null},set:s,required:function(){return["slug"]},decode:function(){return c.call(this,i.keys(wp.api.models.Post.prototype.defaults))},hasRequiredAttributes:function(){var e=this,t=!0;return i.each(this.required(),function(i){(e.get(i)===void 0||""===e.get(i))&&(t=!1)}),t},sync:o}),wp.ccf.models.StandardField=wp.ccf.models.StandardField||wp.ccf.models.Field.extend({idAttribute:"id",defaults:function(){var e={label:l.fieldLabel,value:"",placeholder:"",slug:"",type:"",required:!1,className:"",description:""};return i.defaults(e,this.constructor.__super__.defaults)}}),wp.ccf.models.Fields["single-line-text"]=wp.ccf.models.Fields["single-line-text"]||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"single-line-text"};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.file=wp.ccf.models.Fields.file||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"file",fileExtensions:"",maxFileSize:l.maxFileSize};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields["paragraph-text"]=wp.ccf.models.Fields["paragraph-text"]||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"paragraph-text"};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.hidden=wp.ccf.models.Fields.hidden||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"hidden"};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.email=wp.ccf.models.Fields.email||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"email",emailConfirmation:!1};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.website=wp.ccf.models.Fields.website||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"website",placeholder:"http://"};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.phone=wp.ccf.models.Fields.phone||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"phone",phoneFormat:"us"};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.date=wp.ccf.models.Fields.date||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"date",showDate:!0,showTime:!0,dateFormat:"mm/dd/yyyy"};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.name=wp.ccf.models.Fields.name||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"name"};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.recaptcha=wp.ccf.models.Fields.recaptcha||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"recaptcha",siteKey:"",secretKey:""};return i.defaults(e,this.constructor.__super__.defaults())},required:function(){return["siteKey","secretKey"]},isImmutable:!0}),wp.ccf.models.Fields.address=wp.ccf.models.Fields.address||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"address",addressType:"us"};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields["section-header"]=wp.ccf.models.Fields["section-header"]||wp.ccf.models.Field.extend({defaults:function(){var e={type:"section-header",slug:"",heading:"",subheading:"",className:""};return i.defaults(e,this.constructor.__super__.defaults)},required:function(){return[]},isImmutable:!0}),wp.ccf.models.Fields.html=wp.ccf.models.Fields.html||wp.ccf.models.Field.extend({defaults:function(){var e={type:"html",slug:"",html:"",className:""};return i.defaults(e,this.constructor.__super__.defaults)},required:function(){return[]},isImmutable:!0}),wp.ccf.models.ChoiceableField=wp.ccf.models.ChoiceableField||wp.ccf.models.StandardField.extend({defaults:function(){var e={choices:new wp.ccf.collections.FieldChoices};return i.defaults(e,this.constructor.__super__.defaults())},initialize:function(e){if("object"==typeof e&&e.choices){var t=[];i.each(e.choices,function(e){var i=new wp.ccf.models.FieldChoice(e);i.decode(),t.push(i)}),this.set("choices",new wp.ccf.collections.FieldChoices(t))}}}),wp.ccf.models.Fields.radio=wp.ccf.models.Fields.radio||wp.ccf.models.ChoiceableField.extend({defaults:function(){var e={type:"radio"};return i.defaults(e,this.constructor.__super__.defaults())},initialize:function(){return this.constructor.__super__.initialize.apply(this,arguments)}}),wp.ccf.models.Fields.checkboxes=wp.ccf.models.Fields.checkboxes||wp.ccf.models.ChoiceableField.extend({defaults:function(){var e={type:"checkboxes"};return i.defaults(e,this.constructor.__super__.defaults())},initialize:function(){return this.constructor.__super__.initialize.apply(this,arguments)}}),wp.ccf.models.Fields.dropdown=wp.ccf.models.Fields.dropdown||wp.ccf.models.ChoiceableField.extend({defaults:function(){var e={type:"dropdown"};return i.defaults(e,this.constructor.__super__.defaults())},initialize:function(){return this.constructor.__super__.initialize.apply(this,arguments)}})}(jQuery,Backbone,_,ccfSettings),function(e,t,i,l){"use strict";var s=function(e,t,i){return i=i||{},i.emulateHTTP=!0,this.constructor.__super__.sync.call(this,e,t,i)};wp.ccf.collections=wp.ccf.collections||{},wp.ccf.collections.Forms=wp.ccf.collections.Forms||wp.api.collections.Posts.extend({model:wp.ccf.models.Form,url:l.apiRoot.replace(/\/$/,"")+"/ccf/v1/forms",formsFetching:{},initialize:function(){this.constructor.__super__.initialize(),this.formsFetching={}},sync:s,remove:function(e,t){t=t||{};var l=this.constructor.__super__.remove.call(this,e,t);return t.destroy&&(e instanceof Array?i.each(e,function(e){e.destroy()}):e.destroy()),l}}),wp.ccf.collections.Fields=wp.ccf.collections.Fields||wp.api.collections.Posts.extend({model:wp.ccf.models.Field,url:function(){return l.apiRoot+"/ccf/forms/"+this.formId+"/fields"},initialize:function(e,t){t&&t.formId&&(this.formId=t.formId)},sync:s}),wp.ccf.collections.PostFieldMappings=wp.ccf.collections.PostFieldMappings||t.Collection.extend({model:wp.ccf.models.PostFieldMapping}),wp.ccf.collections.FormNotificationAddresses=wp.ccf.collections.FormNotificationAddresses||t.Collection.extend({model:wp.ccf.models.FormNotificationAddress}),wp.ccf.collections.FormNotifications=wp.ccf.collections.FormNotifications||t.Collection.extend({model:wp.ccf.models.FormNotification}),wp.ccf.collections.Submissions=wp.ccf.collections.Submissions||wp.api.collections.Posts.extend({model:wp.ccf.models.Submission,url:function(){return l.apiRoot.replace(/\/$/,"")+"/ccf/v1/forms/"+this.formId+"/submissions"},initialize:function(e,t){this.constructor.__super__.initialize.apply(this,arguments),t&&t.formId&&(this.formId=t.formId)},sync:s}),wp.ccf.collections.FieldChoices=wp.ccf.collections.FieldChoices||t.Collection.extend({model:wp.ccf.models.FieldChoice})}(jQuery,Backbone,_,ccfSettings),function(e,t,i,l){"use strict";wp.ccf.views=wp.ccf.views||{},wp.ccf.views.Fields=wp.ccf.views.Fields||{},wp.ccf.views.FieldChoice=t.View.extend({template:wp.ccf.utils.template("ccf-field-choice-template"),className:"choice",events:{"click .add":"triggerAdd","click .delete":"triggerDelete","blur input":"saveChoice",saveChoice:"saveChoice",sorted:"triggerUpdateSort"},initialize:function(e){this.field=e.field},destroy:function(){wp.ccf.dispatcher.off("mainViewChange",this.saveChoice),this.unbind()},triggerUpdateSort:function(e,t){this.field.get("choices").remove(this.model,{silent:!0}),this.field.get("choices").add(this.model,{at:t,silent:!0})},saveChoice:function(){if(""!==this.el.innerHTML){var e=this.el.querySelectorAll(".choice-label")[0].value,t=this.el.querySelectorAll(".choice-value")[0].value;this.model.set("label",e),this.model.set("value",t);var i=this.el.querySelectorAll(".choice-selected")[0],l=i.checked?!0:!1;return this.model.set("selected",l),this}},render:function(){var e={};return this.model&&(e.choice=this.model.toJSON()),this.el.innerHTML=this.template(e),wp.ccf.dispatcher.on("mainViewChange",this.saveChoice,this),this},triggerAdd:function(){this.field.get("choices").add(new wp.ccf.models.FieldChoice)},triggerDelete:function(){var e=this.field.get("choices");if(e.length>1)e.remove(this.model),this.destroy(),this.remove();else{for(var t=this.el.querySelectorAll(".choice-label, .choice-value"),i=this.el.querySelectorAll(".choice-selected"),l=0;t.length>l;l++)t[l].value="";i[0].checked=!1}}}),wp.ccf.views.EmptyFormNotificationTableRow=wp.ccf.views.EmptyFormNotificationTableRow||t.View.extend({tagName:"tr",template:wp.ccf.utils.template("ccf-empty-form-notification-row-template"),events:{"click .add":"triggerAdd"},initialize:function(e){this.form=e.form},destroy:function(){this.unbind()},render:function(){return this.$el.html(this.template()),this},triggerAdd:function(){var e=this.form.get("notifications");this.destroy(),e.add(new wp.ccf.models.FormNotification)}}),wp.ccf.views.EmptyFormTableRow=wp.ccf.views.EmptyFormTableRow||t.View.extend({tagName:"tr",template:wp.ccf.utils.template("ccf-empty-form-table-row-template"),render:function(){return this.$el.html(this.template()),this}}),wp.ccf.views.FormNotificationAddress=t.View.extend({template:wp.ccf.utils.template("ccf-form-notification-address-template"),className:"address",events:{"click .add":"triggerAdd","click .delete":"triggerDelete","blur input":"save","change select":"save"},initialize:function(e){this.notification=e.notification,this.parent=e.parent,this.form=e.form},destroy:function(){this.unbind()},save:function(){if(""!==this.el.innerHTML){var e=this.el.querySelectorAll(".form-notification-address-type")[0].value,t=this.el.querySelectorAll(".form-notification-address-email"),i=this.el.querySelectorAll(".form-notification-address-field"),l=this.model.get("type");return t.length&&this.model.set("email",t[0].value),i.length&&this.model.set("field",i[0].value),this.model.set("type",e),l!==e&&this.render(),this}},updateFromFieldField:function(){if("edit"===this.parent.context&&"field"===this.model.get("type")){var e=this.el.querySelectorAll(".form-notification-address-field")[0];e.innerHTML="",e.disabled=!1;var t,i=this.form.get("fields"),s=0,o=this.model.get("field");i.length>=1&&i.each(function(i){"email"===i.get("type")&&(t=document.createElement("option"),t.innerHTML=i.get("slug"),t.value=i.get("slug"),i.get("slug")===o&&(t.selected=!0),e.appendChild(t),s++)}),0===s&&(t=document.createElement("option"),t.innerHTML=l.noEmailFields,t.value="",e.appendChild(t),e.disabled=!0)}},render:function(){var e={};this.model&&(e.address=this.model.toJSON()),this.el.innerHTML=this.template(e);var t=this.form.get("fields");return this.listenTo(t,"add",this.updateFromFieldField,this),this.listenTo(t,"remove",this.updateFromFieldField,this),"field"===this.model.get("type")&&this.updateFromFieldField(),this},triggerAdd:function(){this.notification.get("addresses").add(new wp.ccf.models.FormNotificationAddress)},triggerDelete:function(){var e=this.notification.get("addresses");e.length>1?this.parent.deleteAddress(this):(this.model.clear().set(wp.ccf.models.FormNotificationAddress.prototype.defaults),this.destroy(),this.render())}}),wp.ccf.views.ExistingFormNotificationRow=t.View.extend({template:wp.ccf.utils.template("ccf-existing-form-notification-table-row-template"),tagName:"tr",events:{"change select.form-email-notification-from-type":"toggleNotificationFields","change select.form-email-notification-from-name-type":"toggleNotificationFields","change select.form-email-notification-subject-type":"toggleNotificationFields","click .close-notification":"changeContext","click .edit-notification":"changeContext","click .delete-notification":"triggerDelete","blur input":"save","change select":"save"},addressViews:[],initialize:function(e){this.form=e.form,this.addressViews=[],this.parent=e.parent,this.context=e.context!==void 0?e.context:"view";var t=this.model.get("addresses");this.listenTo(t,"add",this.addAddress)},deleteAddress:function(e){i.each(this.addressViews,function(t){if(e.cid===t.cid){var l=i.indexOf(this.addressViews,t);this.model.get("addresses").remove(e.model),this.addressViews[l].remove(),this.addressViews.splice(l,1)}},this)},addAddress:function(e){var t=this.el.querySelectorAll(".addresses")[0],i=new wp.ccf.views.FormNotificationAddress({model:e,parent:this,notification:this.model,form:this.form});this.addressViews.push(i),t.appendChild(i.render().el)},destroy:function(){this.unbind()},changeContext:function(e,t){"edit"===this.context&&this.save(),t?this.context=t:("view"===this.context&&this.parent.closeAllNotifications(),this.context="edit"===this.context?"view":"edit"),this.destroy(),this.render()},updateFieldVariables:function(){if("edit"===this.context){var e,t=this.el.querySelectorAll(".field-variables")[0],i="",l=this.form.get("fields");l.each(function(t){e=t.get("type"),"html"!==e&&"section-header"!==e&&"recaptcha"!==e&&(i+="["+t.get("slug")+"] ")}),t.innerText=i}},updateFromFieldField:function(){if("edit"===this.context){var e=this.el.querySelectorAll(".form-email-notification-from-field")[0];e.innerHTML="",e.disabled=!1;var t=this.el.querySelectorAll(".form-email-notification-subject-field")[0];t.innerHTML="",t.disabled=!1;var i=this.el.querySelectorAll(".form-email-notification-from-name-field")[0];i.innerHTML="",i.disabled=!1;var s,o=this.form.get("fields"),c=0,n=0,r=0,a=this.model.get("emailNotificationFromField"),d=this.model.get("emailNotificationSubjectField"),f=this.model.get("emailNotificationFromNameField");o.length>=1&&o.each(function(l){"email"===l.get("type")?(s=document.createElement("option"),s.innerHTML=l.get("slug"),s.value=l.get("slug"),l.get("slug")===a&&(s.selected=!0),e.appendChild(s),c++):"name"===l.get("type")?(s=document.createElement("option"),s.innerHTML=l.get("slug"),s.value=l.get("slug"),l.get("slug")===f&&(s.selected=!0),i.appendChild(s),n++):"single-line-text"===l.get("type")&&(s=document.createElement("option"),s.innerHTML=l.get("slug"),s.value=l.get("slug"),l.get("slug")===d&&(s.selected=!0),t.appendChild(s),r++)}),0===c&&(s=document.createElement("option"),s.innerHTML=l.noEmailFields,s.value="",e.appendChild(s),e.disabled=!0),0===n&&(s=document.createElement("option"),s.innerHTML=l.noNameFields,s.value="",i.appendChild(s),i.disabled=!0),0===r&&(s=document.createElement("option"),s.innerHTML=l.noApplicableFields,s.value="",t.appendChild(s),t.disabled=!0)}},toggleNotificationFields:function(){var e=this.el.querySelectorAll(".email-notification-from-address")[0],t=this.el.querySelectorAll(".email-notification-from-field")[0],i=this.el.querySelectorAll(".form-email-notification-from-type")[0],l=this.el.querySelectorAll(".email-notification-subject")[0],s=this.el.querySelectorAll(".email-notification-subject-field")[0],o=this.el.querySelectorAll(".form-email-notification-subject-type")[0],c=this.el.querySelectorAll(".email-notification-from-name")[0],n=this.el.querySelectorAll(".email-notification-from-name-field")[0],r=this.el.querySelectorAll(".form-email-notification-from-name-type")[0];e.style.display="none",t.style.display="none","custom"===i.value?e.style.display="block":"field"===i.value&&(t.style.display="block"),l.style.display="none",s.style.display="none","custom"===o.value?l.style.display="block":"field"===o.value&&(s.style.display="block"),c.style.display="none",n.style.display="none","custom"===r.value?c.style.display="block":"field"===r.value&&(n.style.display="block")},save:function(){if(""!==this.el.innerHTML&&"edit"===this.context){var e=this.el.querySelectorAll(".form-email-notification-title")[0].value;this.model.set("title",e);var t=this.el.querySelectorAll(".form-email-notification-content")[0].value;this.model.set("content",t);var i=this.el.querySelectorAll(".form-email-notification-active")[0].value;this.model.set("active","1"===i?!0:!1);var l=this.el.querySelectorAll(".form-email-notification-from-type")[0].value;this.model.set("fromType",l);var s=this.el.querySelectorAll(".form-email-notification-from-address")[0].value;this.model.set("fromAddress",s);var o=this.el.querySelectorAll(".form-email-notification-from-field")[0].value;this.model.set("fromField",o);var c=this.el.querySelectorAll(".form-email-notification-from-name-type")[0].value;this.model.set("fromNameType",c);var n=this.el.querySelectorAll(".form-email-notification-from-name")[0].value;this.model.set("fromName",n);var r=this.el.querySelectorAll(".form-email-notification-from-name-field")[0].value;this.model.set("fromNameField",r);var a=this.el.querySelectorAll(".form-email-notification-subject-type")[0].value;this.model.set("subjectType",a);var d=this.el.querySelectorAll(".form-email-notification-subject")[0].value;this.model.set("subject",d);var f=this.el.querySelectorAll(".form-email-notification-subject-field")[0].value;this.model.set("subjectField",f);for(var u=0;this.addressViews.length>u;u++)this.addressViews[u].save();return this}},render:function(){var e={context:this.context,form:this.form.toJSON()};if(this.model&&(e.notification=this.model.toJSON()),this.el.innerHTML=this.template(e),"edit"===this.context){this.toggleNotificationFields(),this.updateFromFieldField(),this.updateFieldVariables();var t=this.el.querySelectorAll(".addresses")[0],i=this.model.get("addresses");if(i.length>=1)i.each(function(e){var i=new wp.ccf.views.FormNotificationAddress({model:e,parent:this,notification:this.model,form:this.form}).render();t.appendChild(i.el),this.addressViews.push(i)},this);else{var l=new wp.ccf.models.FormNotificationAddress;i.add(l)}}var s=this.form.get("fields");return this.listenTo(s,"add",this.updateFromFieldField,this),this.listenTo(s,"remove",this.updateFromFieldField,this),this.listenTo(s,"add",this.updateFieldVariables,this),this.listenTo(s,"remove",this.updateFieldVariables,this),this},triggerDelete:function(){this.parent.deleteNotification(this)}}),wp.ccf.views.FieldBase=wp.ccf.views.FieldBase||t.View.extend({events:{"blur input":"saveField","blur input.field-slug":"checkSlug","blur textarea":"saveField","change select":"saveField",'change input[type="checkbox"]':"saveField"},checkSlug:function(){var e=this.el.querySelectorAll(".field-slug");if(e.length>0){var t=e[0],i=!1;t.parentNode.className=t.value&&!t.value.match(/^[a-zA-Z0-9\-_]+$/)?t.parentNode.className.replace(/ field-error/i,"")+" field-error":t.parentNode.className.replace(/ field-error/i,""),this.collection.length>0&&""!==t.value?(this.collection.each(function(e){e!==this.model&&t.value===e.get("slug")&&(i=!0)},this),t.parentNode.className=i?t.parentNode.className.replace(/ field-duplicate-slug/i,"")+" field-duplicate-slug":t.parentNode.className.replace(/ field-duplicate-slug/i,"")):t.parentNode.className=t.parentNode.className.replace(/ field-duplicate-slug/i,"")}},destroy:function(){this.unbind()},render:function(){return this.el.innerHTML=this.template({field:this.model.toJSON()}),this.checkSlug(),this}}),wp.ccf.views.Fields["single-line-text"]=wp.ccf.views.Fields["single-line-text"]||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-single-line-text-template"),initialize:function(){},saveField:function(){return""!==this.el.innerHTML?(this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("description",this.el.querySelectorAll(".field-description")[0].value),this.model.set("value",this.el.querySelectorAll(".field-value")[0].value),this.model.set("placeholder",this.el.querySelectorAll(".field-placeholder")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1),this):void 0}}),wp.ccf.views.Fields.file=wp.ccf.views.Fields.file||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-file-template"),initialize:function(){},saveField:function(){return""!==this.el.innerHTML?(this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("description",this.el.querySelectorAll(".field-description")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1),this.model.set("fileExtensions",this.el.querySelectorAll(".field-file-extensions")[0].value),this.model.set("maxFileSize",this.el.querySelectorAll(".field-max-file-size")[0].value),this):void 0}}),wp.ccf.views.Fields.recaptcha=wp.ccf.views.Fields.recaptcha||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-recaptcha-template"),initialize:function(){},saveField:function(){return""!==this.el.innerHTML?(this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("description",this.el.querySelectorAll(".field-description")[0].value),this.model.set("siteKey",this.el.querySelectorAll(".field-site-key")[0].value),this.model.set("secretKey",this.el.querySelectorAll(".field-secret-key")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this):void 0}}),wp.ccf.views.Fields["section-header"]=wp.ccf.views.Fields["section-header"]||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-section-header-template"),initialize:function(){},saveField:function(){return""!==this.el.innerHTML?(this.model.set("heading",this.el.querySelectorAll(".field-heading")[0].value),this.model.set("subheading",this.el.querySelectorAll(".field-subheading")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this):void 0}}),wp.ccf.views.Fields.html=wp.ccf.views.Fields.html||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-html-template"),initialize:function(){},saveField:function(){return""!==this.el.innerHTML?(this.model.set("html",this.el.querySelectorAll(".field-html")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this):void 0}}),wp.ccf.views.Fields["paragraph-text"]=wp.ccf.views.Fields["paragraph-text"]||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-paragraph-text-template"),saveField:function(){return""!==this.el.innerHTML?(this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("description",this.el.querySelectorAll(".field-description")[0].value),this.model.set("value",this.el.querySelectorAll(".field-value")[0].value),this.model.set("placeholder",this.el.querySelectorAll(".field-placeholder")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1),this):void 0}}),wp.ccf.views.Fields.hidden=wp.ccf.views.Fields.hidden||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-hidden-template"),saveField:function(){return""!==this.el.innerHTML?(this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("value",this.el.querySelectorAll(".field-value")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this):void 0}}),wp.ccf.views.Fields.date=wp.ccf.views.Fields.date||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-date-template"),saveField:function(){if(""!==this.el.innerHTML){this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("description",this.el.querySelectorAll(".field-description")[0].value);var e=this.el.querySelectorAll(".field-value");
|
2 |
-
e.length>0&&this.model.set("value",e[0].value);var t=this.el.querySelectorAll(".field-date-format");t.length&&this.model.set("dateFormat",t[0].value);var i=this.model.get("showDate"),l=this.el.querySelectorAll(".field-show-date")[0].checked?!0:!1;this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("showDate",l);var s=this.model.get("showTime"),o=this.el.querySelectorAll(".field-show-time")[0].checked?!0:!1;return this.model.set("showTime",o),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1),(o!=s||l!=i)&&this.render(),this}}}),wp.ccf.views.Fields.name=wp.ccf.views.Fields.name||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-name-template"),saveField:function(){return""!==this.el.innerHTML?(this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("description",this.el.querySelectorAll(".field-description")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1),this):void 0}}),wp.ccf.views.Fields.website=wp.ccf.views.Fields.website||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-website-template"),saveField:function(){return""!==this.el.innerHTML?(this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("description",this.el.querySelectorAll(".field-description")[0].value),this.model.set("value",this.el.querySelectorAll(".field-value")[0].value),this.model.set("placeholder",this.el.querySelectorAll(".field-placeholder")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1),this):void 0}}),wp.ccf.views.Fields.phone=wp.ccf.views.Fields.phone||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-phone-template"),saveField:function(){return""!==this.el.innerHTML?(this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("description",this.el.querySelectorAll(".field-description")[0].value),this.model.set("value",this.el.querySelectorAll(".field-value")[0].value),this.model.set("placeholder",this.el.querySelectorAll(".field-placeholder")[0].value),this.model.set("phoneFormat",this.el.querySelectorAll(".field-phone-format")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1),this):void 0}}),wp.ccf.views.Fields.address=wp.ccf.views.Fields.address||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-address-template"),saveField:function(){return""!==this.el.innerHTML?(this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("description",this.el.querySelectorAll(".field-description")[0].value),this.model.set("addressType",this.el.querySelectorAll(".field-address-type")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1),this):void 0}}),wp.ccf.views.Fields.email=wp.ccf.views.Fields.email||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-email-template"),saveField:function(){if(""!==this.el.innerHTML){this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("description",this.el.querySelectorAll(".field-description")[0].value);var e=this.el.querySelectorAll(".field-value");e.length&&this.model.set("value",e[0].value);var t=this.el.querySelectorAll(".field-placeholder");t.length&&this.model.set("placeholder",t[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1);var i=1==this.el.querySelectorAll(".field-email-confirmation")[0].value?!0:!1,l=this.model.get("emailConfirmation");return this.model.set("emailConfirmation",i),l!=i&&this.render(),this}}}),wp.ccf.views.ChoiceableField=wp.ccf.views.ChoiceableField||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-dropdown-template"),initialize:function(){var e=this.model.get("choices");this.listenTo(e,"add",this.addChoice)},addChoice:function(e){var t=new wp.ccf.views.FieldChoice({model:e,field:this.model}).render(),i=this.el.querySelectorAll(".repeatable-choices")[0];i.appendChild(t.el)},saveField:function(){if(""!==this.el.innerHTML){this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("description",this.el.querySelectorAll(".field-description")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1);var t=this.el.querySelectorAll(".repeatable-choices")[0].querySelectorAll(".choice");return i.each(t,function(t){e(t).trigger("saveChoice")}),this}},render:function(){var t=this;t.el.innerHTML=t.template({field:t.model.toJSON()}),t.checkSlug();var i=t.model.get("choices"),l=this.el.querySelectorAll(".repeatable-choices")[0];if(i.length>=1)i.each(function(e){var i=new wp.ccf.views.FieldChoice({model:e,field:t.model}).render();l.appendChild(i.el)});else{var s=new wp.ccf.models.FieldChoice;i.add(s)}return l=this.el.querySelectorAll(".repeatable-choices")[0],e(l).sortable({handle:".move",axis:"y",stop:function(e,t){t.item.trigger("sorted",t.item.index())}}),t}}),wp.ccf.views.Fields.dropdown=wp.ccf.views.Fields.dropdown||wp.ccf.views.ChoiceableField.extend({template:wp.ccf.utils.template("ccf-dropdown-template"),events:function(){return this.constructor.__super__.events}}),wp.ccf.views.Fields.radio=wp.ccf.views.Fields.radio||wp.ccf.views.ChoiceableField.extend({template:wp.ccf.utils.template("ccf-radio-template"),events:function(){return this.constructor.__super__.events}}),wp.ccf.views.Fields.checkboxes=wp.ccf.views.Fields.checkboxes||wp.ccf.views.ChoiceableField.extend({template:wp.ccf.utils.template("ccf-checkboxes-template"),events:function(){return this.constructor.__super__.events}}),wp.ccf.views.FieldSidebar=wp.ccf.views.FieldSidebar||t.View.extend({initialize:function(e){this.currentFieldView=null,this.form=e.form},save:function(e){this.currentFieldView&&""!==this.currentFieldView.el.innerHTML&&this.currentFieldView.saveField(),e&&e instanceof Object&&e.resolve()},fieldRemoved:function(){this.currentFieldView&&(this.form.get("fields").get(this.currentFieldView.model)||this.render())},destroy:function(){wp.ccf.dispatcher.off("saveField",this.save),wp.ccf.dispatcher.off("mainViewChange",this.save),this.unbind()},render:function(e){var t={};if(e){var i=e.get("type");this.currentFieldView&&(this.currentFieldView.saveField(),this.currentFieldView.destroy&&this.currentFieldView.destroy()),this.currentFieldView=new wp.ccf.views.Fields[i]({model:e,collection:this.form.get("fields")}),this.currentFieldView.render(),this.el.innerHTML="",this.el.appendChild(this.currentFieldView.el);var l=this.form.get("fields");this.listenTo(l,"remove",this.fieldRemoved)}else{var s=wp.ccf.utils.template("ccf-empty-field-template");this.el.innerHTML=s(t)}return wp.ccf.dispatcher.on("saveField",this.save,this),wp.ccf.dispatcher.on("mainViewChange",this.save,this),this}}),wp.ccf.views.FieldRowPlaceholder=wp.ccf.views.FieldRowPlaceholder||t.View.extend({template:wp.ccf.utils.template("ccf-field-row-template"),tagName:"div",className:"field",initialize:function(e){this.type=e.type},render:function(){return this.el.innerHTML=this.template({label:l.allLabels[this.type]}),this.el.setAttribute("data-field-type",this.type),this.el.className+=" "+this.type,this}}),wp.ccf.views.FieldRow=wp.ccf.views.FieldRow||t.View.extend({template:wp.ccf.utils.template("ccf-field-row-template"),tagName:"div",className:"field",events:{"click .delete":"triggerDelete","click h4":"triggerEdit",sorted:"triggerUpdateSort"},initialize:function(e){i.bindAll(this,"triggerDelete"),this.form=e.form,this.listenTo(this.model,"change",this.handleChange,this),this.listenTo(this.model,"requirementsNotMet",this.requirementsNotMet,this),this.listenTo(this.model,"requirementsMet",this.requirementsMet,this),this.listenTo(this.model,"duplicateSlug",this.duplicateSlug,this),this.model.attributes.choices&&this.listenTo(this.model.attributes.choices,"change",this.handleChange,this)},duplicateSlug:function(){this.requirementsMet(),this.el.className+=" field-duplicate-slug"},requirementsNotMet:function(){this.requirementsMet(),this.el.className+=" field-incomplete"},requirementsMet:function(){this.el.className=this.el.className.replace(/(field-incomplete|field-duplicate-slug)/i,"")},triggerUpdateSort:function(e,t){this.form.get("fields").remove(this.model),this.form.get("fields").add(this.model,{at:t})},handleChange:function(){this.render()},triggerDelete:function(e){e.stopPropagation(),this.form.get("fields").remove(this.model),this.undelegateEvents(),this.remove()},triggerEdit:function(){var e=this.el.parentNode.querySelectorAll(".ccf-editing");i.each(e,function(e){e.className=e.className.replace(/ccf-editing/i,"")}),this.el.className=this.el.className.replace(/ccf-editing/i,"")+" ccf-editing",wp.ccf.dispatcher.trigger("openEditField",this.model)},render:function(e){this.el.innerHTML=this.template({label:l.allLabels[this.model.get("type")]}),this.el.setAttribute("data-field-type",this.model.get("type"));var t=RegExp(" "+this.model.get("type"),"i");this.el.className=this.el.className.replace(t,"")+" "+this.model.get("type"),e&&(this.el.className=this.el.className.replace(/ instantiated/i,"")+" instantiated");var i=document.getElementById("ccf-"+this.model.get("type")+"-preview-template");if(i){var s=this.el.querySelectorAll(".preview")[0];s.style.display="block",s.innerHTML=wp.ccf.utils.template("ccf-"+this.model.get("type")+"-preview-template")({field:this.model.toJSON()})}return this}}),wp.ccf.views.PostFieldMapping=t.View.extend({template:wp.ccf.utils.template("ccf-post-field-mapping"),className:"field-mapping",events:{"click .add":"triggerAdd","click .delete":"triggerDelete","blur input":"save","change select":"save"},initialize:function(e){this.parent=e.parent,this.form=e.form},destroy:function(){this.unbind()},save:function(){if(""!==this.el.innerHTML){var e=this.el.querySelectorAll(".field-form-field")[0].value,t=this.el.querySelectorAll(".field-post-field")[0].value,i=this.el.querySelectorAll(".field-custom-field-key"),l=this.model.get("postField");return this.model.set("formField",e),this.model.set("postField",t),i.length&&this.model.set("customFieldKey",i[0].value),l!==t&&this.render(),this}},updateFormFieldField:function(){var e=this.el.querySelectorAll(".field-form-field")[0];e.innerHTML="",e.disabled=!1;var t,i=this.form.get("fields"),s=0,o=this.model.get("formField");i.length>=1&&(t=document.createElement("option"),t.innerHTML=l.chooseFormField,t.value="",e.appendChild(t),i.each(function(i){t=document.createElement("option"),t.innerHTML=i.get("slug"),t.value=i.get("slug"),i.get("slug")===o&&(t.selected=!0),e.appendChild(t),s++})),0===s&&(t=document.createElement("option"),t.innerHTML=l.noAvailableFields,t.value="",e.appendChild(t),e.disabled=!0)},updatePostFields:function(){var e,t=this.el.querySelectorAll(".field-post-field")[0];e=document.createElement("option"),e.value="",e.innerText=l.choosePostField,t.appendChild(e);var s=this.form.get("postFieldMappings"),o=[];s.each(function(e){e!==this.model&&o.push(e.get("postField"))},this),i.each(l.postFields.single,function(i,l){-1===o.indexOf(l)&&(e=document.createElement("option"),e.value=l,e.innerText=i,this.model.get("postField")===l&&(e.selected=!0),t.appendChild(e))},this),i.each(l.postFields.repeatable,function(i,l){e=document.createElement("option"),e.value=l,e.innerText=i,this.model.get("postField")===l&&(e.selected=!0),t.appendChild(e)},this)},render:function(){var e={};this.model&&(e.mapping=this.model.toJSON()),this.el.innerHTML=this.template(e);var t=this.form.get("fields");return this.listenTo(t,"add",this.updateFormFieldField,this),this.listenTo(t,"remove",this.updateFormieldField,this),this.updateFormFieldField(),this.updatePostFields(),this},triggerAdd:function(){this.form.get("postFieldMappings").add(new wp.ccf.models.PostFieldMapping)},triggerDelete:function(){var e=this.form.get("postFieldMappings");e.length>1?this.parent.deletePostFieldMapping(this):(this.model.clear().set(wp.ccf.models.PostFieldMapping.prototype.defaults),this.destroy(),this.render())}}),wp.ccf.views.FormSettings=wp.ccf.views.FormSettings||t.View.extend({template:wp.ccf.utils.template("ccf-form-settings-template"),events:{"blur input":"save","change select":"save","change select.form-completion-action-type":"toggleCompletionFields","change select.form-pause":"togglePauseFields","change select.form-post-creation":"togglePostCreationFields","click .add-notification":"triggerAddNotification"},notificationViews:[],mappingViews:[],initialize:function(e){this.model=e.form,this.notificationViews=[],this.mappingViews=[];var t=this.model.get("notifications");this.listenTo(t,"add",this.addNotification);var i=this.model.get("postFieldMappings");this.listenTo(i,"add",this.addPostFieldMapping)},deletePostFieldMapping:function(e){i.each(this.mappingViews,function(t){if(e.cid===t.cid){var l=i.indexOf(this.mappingViews,t);this.model.get("postFieldMappings").remove(e.model),this.mappingViews[l].remove(),this.mappingViews.splice(l,1)}},this)},addPostFieldMapping:function(e){var t=this.el.querySelectorAll(".post-creation-mapping")[0],i=new wp.ccf.views.PostFieldMapping({model:e,parent:this,form:this.model});this.mappingViews.push(i),t.appendChild(i.render().el)},triggerAddNotification:function(){var e=this.model.get("notifications");e.add(new wp.ccf.models.FormNotification)},closeAllNotifications:function(){i.each(this.notificationViews,function(e){e.changeContext(null,"view")})},addNotification:function(e){var t=new wp.ccf.views.ExistingFormNotificationRow({model:e,form:this.model,context:"edit",parent:this}).render(),l=this.el.querySelectorAll(".ccf-form-notifications .rows")[0];l.querySelectorAll(".no-notifications").length>0&&l.removeChild(l.firstChild),i.each(this.notificationViews,function(e){e.changeContext(null,"view")}),this.notificationViews.push(t),l.appendChild(t.el)},toggleCompletionFields:function(){var e=this.el.querySelectorAll(".form-completion-action-type")[0].value,t=this.el.querySelectorAll(".completion-message")[0],i=this.el.querySelectorAll(".completion-redirect-url")[0];"text"===e?(t.style.display="block",i.style.display="none"):(t.style.display="none",i.style.display="block")},togglePauseFields:function(){var e=this.el.querySelectorAll(".form-pause")[0].value,t=this.el.querySelectorAll(".pause-message")[0];t.style.display=parseInt(e)?"block":"none"},togglePostCreationFields:function(){var t=this.el.querySelectorAll(".form-post-creation")[0].value,i=e(this.el.querySelectorAll(".post-creation-mapping-field"));parseInt(t)?i.show():i.hide()},save:function(){if(""!==this.el.innerHTML){var e=this.el.querySelectorAll(".form-title")[0].value;this.model.set("title",{raw:e});var t=this.el.querySelectorAll(".form-description")[0].value;this.model.set("description",t);var i=this.el.querySelectorAll(".form-button-text")[0].value;this.model.set("buttonText",i);var l=this.el.querySelectorAll(".form-pause")[0].value;this.model.set("pause",parseInt(l)?!0:!1);var s=this.el.querySelectorAll(".form-post-creation")[0].value;this.model.set("postCreation",parseInt(s)?!0:!1);var o=this.el.querySelectorAll(".form-post-creation-type")[0].value;this.model.set("postCreationType",o);var c=this.el.querySelectorAll(".form-post-creation-status")[0].value;this.model.set("postCreationStatus",c);var n=this.el.querySelectorAll(".form-pause-message")[0].value;this.model.set("pauseMessage",n);var r=this.el.querySelectorAll(".form-completion-message")[0].value;this.model.set("completionMessage",r);var a=this.el.querySelectorAll(".form-completion-redirect-url")[0].value;this.model.set("completionRedirectUrl",a);var d=this.el.querySelectorAll(".form-completion-action-type")[0].value;this.model.set("completionActionType",d)}},fullSave:function(e){""!==this.el.innerHTML&&(this.save(),i.each(this.notificationViews,function(e){e.save()}),i.each(this.mappingViews,function(e){e.save()}),e!==void 0&&e.promise!==void 0&&e.resolve())},destroy:function(){wp.ccf.dispatcher.off("saveFormSettings",this.fullSave),wp.ccf.dispatcher.off("mainViewChange",this.fullSave)},deleteNotification:function(e){if(i.each(this.notificationViews,function(t){if(e.cid===t.cid){var l=i.indexOf(this.notificationViews,t);this.model.get("notifications").remove(e.model),this.notificationViews[l].remove(),this.notificationViews.splice(l,1)}},this),!this.notificationViews.length){var t=this.el.querySelectorAll(".ccf-form-notifications .rows")[0];t.appendChild(new wp.ccf.views.EmptyFormNotificationTableRow({form:this.model}).render().el)}},render:function(){var e={form:this.model.toJSON()};this.model.get("fields");var t=this.model.get("notifications");this.el.innerHTML=this.template(e),this.toggleCompletionFields(),this.togglePostCreationFields(),this.togglePauseFields();var i=this.el.querySelectorAll(".ccf-form-notifications .rows")[0],l=document.createElement("tbody");l.className="rows",t.length>=1?t.each(function(e){var t=new wp.ccf.views.ExistingFormNotificationRow({model:e,form:this.model,parent:this}).render();l.appendChild(t.el),this.notificationViews.push(t)},this):l.appendChild(new wp.ccf.views.EmptyFormNotificationTableRow({form:this.model}).render().el),i.parentNode.replaceChild(l,i);var s=this.el.querySelectorAll(".post-creation-mapping")[0],o=this.model.get("postFieldMappings");if(o.length>=1)o.each(function(e){var t=new wp.ccf.views.PostFieldMapping({model:e,parent:this,form:this.model}).render();s.appendChild(t.el),this.mappingViews.push(t)},this);else{var c=new wp.ccf.models.PostFieldMapping;o.add(c)}return wp.ccf.dispatcher.on("mainViewChange",this.fullSave,this),wp.ccf.dispatcher.on("saveFormSettings",this.fullSave,this),this}}),wp.ccf.views.FormPane=wp.ccf.views.FormPane||t.View.extend(i.defaults({template:wp.ccf.utils.template("ccf-form-pane-template"),subViews:{"field-sidebar":wp.ccf.views.FieldSidebar,"form-settings":wp.ccf.views.FormSettings},events:{"click .save-button":"sync","click .signup-button":"signup","click .accordion-heading":"accordionClick","click .form-settings-heading":"accordionClick","click .insert-form-button":"insertForm"},initialize:function(){wp.ccf.dispatcher.on("openEditField",this.openEditField,this)},insertForm:function(){wp.ccf.utils.insertFormShortcode(this.model),wp.ccf.toggle()},signup:function(){var t=this.el.querySelectorAll(".email-signup-field")[0].value,i=this.el.querySelectorAll(".bottom .left.signup")[0];i.className="left signup",t?e.ajax({url:"//taylorlovett.us8.list-manage.com/subscribe/post-json?u=66118f9a5b0ab0414e83f043a&id=b4ed816a24&c=?",method:"post",dataType:"jsonp",data:{EMAIL:t}}).done(function(){i.className="left signup signup-success"}):i.className="left signup signup-error"},accordionClick:function(t){var l=e(t.currentTarget).parents(".accordion-container")[0],s=l.querySelectorAll(".accordion-section");t.currentTarget.parentNode.className.match(/expanded/i)?t.currentTarget.parentNode.className=t.currentTarget.parentNode.className.replace(/expanded/i,""):t.currentTarget.parentNode.className+=" expanded",i.each(s,function(e){e!=t.currentTarget.parentNode&&e.className.match(/expanded/i)&&(e.className=e.className.replace(/expanded/i,""))}),t.currentTarget.className.match(/form-settings-heading/i)?this.el.className.match(/show-form-settings/i)?this.el.className=this.el.className.replace(/show-form-settings/i,""):this.el.className+=" show-form-settings":this.el.className=this.el.className.replace(/show-form-settings/i,"")},openEditField:function(e){this.renderedSubViews["field-sidebar"].render(e).el.style.display="block"},disable:function(){this.el.querySelectorAll(".save-button")[0].setAttribute("disabled","disabled"),this.el.querySelectorAll(".disabled-overlay")[0].style.display="block"},enable:function(){this.el.querySelectorAll(".save-button")[0].removeAttribute("disabled"),this.el.querySelectorAll(".disabled-overlay")[0].style.display="none"},sync:function(){var t=this,i=e(this.el.querySelectorAll(".spinner")[0]);i.fadeIn(),t.disable();var s=e.Deferred(),o=e.Deferred();wp.ccf.dispatcher.trigger("saveFormSettings",s),wp.ccf.dispatcher.trigger("saveField",o),e.when(s,o).then(function(){var e=t.model.get("fields"),s=!0,o={};e.each(function(e){var t=e.get("slug");e.hasRequiredAttributes()?t&&!t.match(/^[a-zA-Z0-9\-_]+$/)?(s=!1,e.trigger("requirementsNotMet")):o[e.get("slug")]!==void 0?(s=!1,e.trigger("duplicateSlug"),o[e.get("slug")].trigger("duplicateSlug")):e.trigger("requirementsMet"):(s=!1,e.trigger("requirementsNotMet")),e.get("slug")&&(o[e.get("slug")]=e)}),s?t.model.save({},{context:"edit"}).error(function(){var e="sync";wp.ccf.errorModal.render(e).show()}).done(function(){l.single&&!l.postId&&(window.location=l.adminUrl+"post.php?post="+t.model.get("id")+"&action=edit#ccf-form/"+t.model.get("id"))}).complete(function(){i.fadeOut(),t.enable(),wp.ccf.dispatcher.trigger("saveFormComplete",t.model)}):(t.enable(),i.fadeOut())})},enableDisableInsert:function(){var e=this.el.querySelectorAll(".insert-form-button")[0];this.model.get("id")?e.removeAttribute("disabled"):e.setAttribute("disabled","disabled")},getNextFieldOrd:function(){var e=this.model.get("fields"),t=e.length+1;return e.each(function(e){var i=e.get("slug"),l=/\-([0-9]+)$/g,s=l.exec(i);if(s&&s[1]){var o=parseInt(s[1]);o>=t&&(t=o+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 o={labels:l.fieldLabels,form:s.model.toJSON()};window.form=s.model,s.el.innerHTML=this.template(o),s.el.className=s.el.className.replace(/show-form-settings/i,"");var c=s.el.querySelectorAll(".fields")[0];i.each(l.fieldLabels,function(e,t){c.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 r=s.el.querySelectorAll(".special-fields")[0];i.each(l.specialFieldLabels,function(e,t){r.appendChild(new wp.ccf.views.FieldRowPlaceholder({type:t}).render().el)});var a=s.model.get("fields"),d=s.el.querySelectorAll(".form-content")[0],f=e(d);return e(s.el.querySelectorAll(".left-sidebar")[0].querySelectorAll(".field")).draggable({cursor:"move",distance:2,zIndex:160001,scroll:!1,containment:"document",appendTo:".ccf-main-modal",snap:!1,connectToSortable:".form-content",helper:function(t){var i=e(t.currentTarget),l=e('<div class="field" data-field-type="'+i.attr("data-field-type")+'"><h4>'+i.find(".label").html()+"</h4></div>");return l.css({width:f.width(),opacity:".75",height:i.height()})}}),a.length>=1&&(d.innerHTML="",a.each(function(e){var t=new wp.ccf.views.FieldRow({model:e,form:s.model}).render(!0).el;d.appendChild(t)})),e(d).sortable({axis:"y",distance:2,handle:"h4",placeholder:"field-placeholder",stop:function(e,t){if(!t.item.hasClass("instantiated")){var i=t.item.attr("data-field-type"),l={};wp.ccf.models.Fields[i].prototype.defaults().slug!==void 0&&(l.slug=i+"-"+s.getNextFieldOrd());var o=new wp.ccf.models.Fields[i](l),c=s.model.get("fields");c.add(o),new wp.ccf.views.FieldRow({model:o,el:t.item,form:s.model}).render(!0),t.item.attr("style","")}t.item.trigger("sorted",t.item.index())}}),s.initRenderSubViews(!1,!0,{form:s.model}),s.enableDisableInsert(),s}},wp.ccf.mixins.subViewable)),wp.ccf.views.ExistingFormTableRow=wp.ccf.views.ExistingFormTableRow||t.View.extend({tagName:"tr",template:wp.ccf.utils.template("ccf-existing-form-table-row-template"),events:{"click .edit":"triggerMainViewChange","click .delete":"triggerDelete","click .insert-form-button":"insertForm"},initialize:function(e){this.parent=e.parent},insertForm:function(){wp.ccf.utils.insertFormShortcode(this.model),wp.ccf.toggle()},triggerMainViewChange:function(){wp.ccf.switchToForm(this.model)},triggerDelete:function(){var e,t=this,i=t.parent.collection.state.currentPage;t.model.destroy().done(function(){e=i,e===t.parent.collection.state.totalPages&&e-1===(t.parent.collection.state.totalObjects-1)/l.postsPerPage&&e--,t.parent.showPage(e).done(function(){t.parent.renderPagination()})})},render:function(){return this.$el.html(this.template({form:this.model.toJSON(),utils:{getPrettyPostDate:wp.ccf.utils.getPrettyPostDate}})),this}}),wp.ccf.views.EmptyFormTableRow=wp.ccf.views.EmptyFormTableRow||t.View.extend({tagName:"tr",template:wp.ccf.utils.template("ccf-empty-form-table-row-template"),render:function(){return this.$el.html(this.template()),this}}),wp.ccf.views.ExistingFormTable=wp.ccf.views.ExistingFormTable||t.View.extend({template:wp.ccf.utils.template("ccf-existing-form-table-template"),initialize:function(){this.parent=arguments.parent,this.collection=new wp.ccf.collections.Forms,wp.ccf.dispatcher.on("changeFormTablePage",this.showPage,this),wp.ccf.dispatcher.on("saveFormComplete",this.render,this)},showPage:function(e){var t=this,i=this.collection.fetch({data:{page:e}});return i.error(function(){var e="sync";wp.ccf.errorModal.render(e).show()}),i.done(function(){var e=t.el.querySelectorAll(".rows")[0],i=document.createElement("tbody");i.className="rows",t.collection.length>=1?t.collection.each(function(e){var l=new wp.ccf.views.ExistingFormTableRow({model:e,parent:t}).render();i.appendChild(l.el)},t):i.appendChild((new wp.ccf.views.EmptyFormTableRow).render().el),e.parentNode.replaceChild(i,e)}),i},renderPagination:function(){var e=this.el.querySelectorAll(".ccf-pagination")[0];e.innerHTML="",this.collection.state.totalPages>1&&e.appendChild(new wp.ccf.views.Pagination({parent:this}).render(this.collection.state.totalPages,this.collection.state.currentPage).el)},render:function(){var e=this;return this.el.innerHTML=this.template(),this.el.querySelectorAll(".ccf-pagination")[0],this.showPage(1).done(function(){e.renderPagination()}),this}}),wp.ccf.views.ExistingFormPane=wp.ccf.views.ExistingFormPane||t.View.extend(i.defaults({template:wp.ccf.utils.template("ccf-existing-form-pane-template"),subViews:{"existing-form-table":wp.ccf.views.ExistingFormTable},render:function(){return this.rendered?this:(this.rendered=!0,this.el.innerHTML=this.template(),this.initRenderSubViews(!0),this)}},wp.ccf.mixins.subViewable)),wp.ccf.views.MainModal=wp.ccf.views.MainModal||t.View.extend(i.defaults({tagName:"div",className:"ccf-main-modal",template:wp.ccf.utils.template("ccf-main-modal-template"),events:{"click .close-icon":"hide","click .main-menu a":"menuClick"},subViews:{"form-pane":wp.ccf.views.FormPane},initialize:function(){l.single||(this.subViews["existing-form-pane"]=wp.ccf.views.ExistingFormPane),wp.ccf.dispatcher.on("mainViewChange",this.toggleView,this)},toggleView:function(e){this.showView(e,wp.ccf.currentForm);var t=e;"form-pane"===e&&wp.ccf.currentForm&&(t="existing-form-pane");var l=this.el.querySelectorAll(".menu-item");i.each(l,function(e){var i=e.getAttribute("data-view");e.className=i===t?e.className.replace("selected","")+" selected":e.className.replace("selected","")})},menuClick:function(e){var t=e.target.getAttribute("data-view");"form-pane"===t&&(wp.ccf.currentForm=null),wp.ccf.dispatcher.trigger("mainViewChange",t),e.preventDefault()},render:function(e){return e=e||!1,this.overlay(),this.el.innerHTML=this.template({single:e}),this.initRenderSubViews(),this.showView("form-pane",wp.ccf.currentForm,!0),this},overlay:function(){return this.overlayEl===void 0&&(this.overlayEl=document.createElement("div"),this.overlayEl.className="ccf-main-modal-overlay",document.body.appendChild(this.overlayEl)),this.overlayEl},remove:function(){return document.body.removeChild(this.overlay()),this},show:function(){e(this.overlay()).show(),this.$el.show()},hide:function(){e(this.overlay()).hide(),this.$el.hide()}},wp.ccf.mixins.subViewable)),wp.ccf.views.SubmissionRow=wp.ccf.views.SubmissionRow||t.View.extend({tagName:"tr",template:wp.ccf.utils.template("ccf-submission-row-template"),events:{"click .view":"view","click .delete":"delete"},initialize:function(e){this.parent=e.parent},"delete":function(){var e,t=this,i=t.parent.collection.state.currentPage;t.model.destroy().done(function(){e=i,e===t.parent.collection.state.totalPages&&e-1===(t.parent.collection.state.totalObjects-1)/l.postsPerPage&&e--,t.parent.showPage(e).done(function(){t.parent.renderPagination()})})},view:function(e){var t=e.currentTarget.getAttribute("data-submission-id"),i=e.currentTarget.getAttribute("data-submission-date");tb_show(l.thickboxTitle+" - "+wp.ccf.utils.getPrettyPostDate(i),"#TB_inline?height=500&width=700&inlineId=ccf-submission-content-"+parseInt(t),null)},render:function(){return this.$el.html(this.template({submission:this.model.toJSON(),currentColumns:this.parent.columns,columns:wp.ccf.currentForm.getFieldSlugs(!0),utils:{getPrettyPostDate:wp.ccf.utils.getPrettyPostDate,wordChop:wp.ccf.utils.wordChop,isFieldDate:wp.ccf.utils.isFieldDate,isFieldName:wp.ccf.utils.isFieldName,isFieldFile:wp.ccf.utils.isFieldFile,isFieldAddress:wp.ccf.utils.isFieldAddress,isFieldEmailConfirm:wp.ccf.utils.isFieldEmailConfirm,getPrettyFieldDate:wp.ccf.utils.getPrettyFieldDate,getPrettyFieldAddress:wp.ccf.utils.getPrettyFieldAddress,getPrettyFieldName:wp.ccf.utils.getPrettyFieldName,getPrettyFieldEmailConfirm:wp.ccf.utils.getPrettyFieldEmailConfirm}})),this}}),wp.ccf.views.SubmissionsTable=wp.ccf.views.SubmissionsTable||t.View.extend({template:wp.ccf.utils.template("ccf-submission-table-template"),events:{"click .prev:not(.disabled)":"previousPage","click .next:not(.disabled)":"nextPage","click .first:not(.disabled)":"firstPage","click .last:not(.disabled)":"lastPage"},initialize:function(){this.collection=new wp.ccf.collections.Submissions({},{formId:l.postId}),wp.ccf.dispatcher.on("submissionTableRebuild",this.render,this)},showPage:function(e){var t=this,i=this.collection.fetch({data:{page:e}});return i.error(function(){var e="sync";wp.ccf.errorModal.render(e).show()}),i.done(function(){var e=t.el.querySelectorAll(".submission-rows")[0],i=document.createElement("tbody");i.className="submission-rows",t.collection.length>=1?t.collection.each(function(e){var l=new wp.ccf.views.SubmissionRow({model:e,parent:t}).render();i.appendChild(l.el)},t):i.appendChild(new wp.ccf.views.EmptySubmissionTableRow({parent:t}).render(wp.ccf.currentForm.getFieldSlugs(!0).concat("date")).el),e.parentNode.replaceChild(i,e)}),i},renderPagination:function(){var e=this.el.querySelectorAll(".ccf-pagination")[0];e.innerHTML="",this.collection.state.totalPages>1&&e.appendChild(new wp.ccf.views.Pagination({parent:this}).render(this.collection.state.totalPages,this.collection.state.currentPage).el)},render:function(e){var t=this;return t.columns=e?e:wp.ccf.currentForm.getFieldSlugs(!0).slice(0,4).concat("date"),1>t.columns.length?t.el.innerHTML="":(t.el.innerHTML=t.template({columns:t.columns}),t.el.querySelectorAll(".ccf-pagination")[0],t.showPage(1).done(function(){t.renderPagination()})),t}}),wp.ccf.views.ErrorModal=wp.ccf.views.ErrorModal||t.View.extend({template:wp.ccf.utils.template("ccf-error-modal-template"),tagName:"div",className:"ccf-error-modal",events:{"click .close":"hide"},hide:function(){this.el.className=this.el.className.replace(" show","")
|
3 |
},show:function(){this.el.className=this.el.className.replace(" show","")+" show"},toggle:function(){this.el.className.match(" show")?this.hide():this.show()},render:function(e){var t={messageType:""};return e&&(t.messageType=e),this.el.innerHTML=this.template(t),this}}),wp.ccf.views.Pagination=wp.ccf.views.Pagination||t.View.extend({template:wp.ccf.utils.template("ccf-pagination-template"),events:{"click .prev:not(.disabled)":"previousPage","click .next:not(.disabled)":"nextPage","click .first:not(.disabled)":"firstPage","click .last:not(.disabled)":"lastPage"},initialize:function(e){this.parent=e.parent},previousPage:function(){var e=this;e.parent.showPage(e.parent.collection.state.currentPage-1).done(function(){e.render()})},nextPage:function(){var e=this;e.parent.showPage(e.parent.collection.state.currentPage+1).done(function(){e.render()})},firstPage:function(){var e=this;e.parent.showPage(1).done(function(){e.render()})},lastPage:function(){var e=this;e.parent.showPage(e.parent.collection.state.totalPages).done(function(){e.render()})},render:function(){return this.el.innerHTML=this.template({totalPages:this.parent.collection.state.totalPages,currentPage:this.parent.collection.state.currentPage,totalObjects:this.parent.collection.state.totalObjects}),this}}),wp.ccf.views.EmptySubmissionTableRow=wp.ccf.views.EmptySubmissionTableRow||t.View.extend({tagName:"tr",template:wp.ccf.utils.template("ccf-no-submissions-row-template"),initialize:function(e){this.parent=e.parent},render:function(){return this.el.innerHTML=this.template({columns:this.parent.columns}),this}}),wp.ccf.views.SubmissionColumnController=wp.ccf.views.SubmissionColumnController||t.View.extend({template:wp.ccf.utils.template("ccf-submissions-controller-template"),events:{"click input[type=checkbox]":"triggerTableRebuild"},render:function(){this.el.innerHTML=this.template({columns:wp.ccf.currentForm.getFieldSlugs(!0).concat("date")})},triggerTableRebuild:function(){var e=[],t=document.querySelectorAll(".submission-column-checkbox");if(t.length>=1)for(var i=0;t.length>i;i++)t[i].checked&&e.push(t[i].value);wp.ccf.dispatcher.trigger("submissionTableRebuild",e)}})}(jQuery,Backbone,_,ccfSettings),function(e,t){"use strict";wp.ccf.router=wp.ccf.router||t.Router.extend({routes:{"ccf-form":"open","ccf-form/:formId":"open"},open:function(e){wp.ccf.show(e)}})}(jQuery,Backbone,_,ccfSettings),function(e,t,i,l){"use strict";wp.ccf=i.defaults(wp.ccf,{forms:new wp.ccf.collections.Forms,currentForm:null,errorModal:null,_currentFormDeferred:null,dispatcher:{},show:function(e){return this.switchToForm(e),this.instance.show(),this.instance},initErrorModal:function(){this.errorModal=(new wp.ccf.views.ErrorModal).render();var e=document.getElementsByTagName("body")[0];e.appendChild(this.errorModal.el)},switchToForm:function(e){var t=this;if(+e===parseInt(e)){var i=parseInt(e);if(e=t.forms.findWhere({id:parseInt(i)}),!e){var l;return t.forms.formsFetching[i]!==void 0?(l=t.forms.formsFetching[i],e=null):(e=new wp.ccf.models.Form({id:i}),l=e.fetch(),t.forms.formsFetching[i]=l),l.done(function(){e?(delete t.forms.formsFetching[i],t.forms.add(e)):e=t.forms.findWhere({id:i}),t.currentForm=e,wp.ccf.dispatcher.trigger("mainViewChange","form-pane")}),l}t.currentForm=e,wp.ccf.dispatcher.trigger("mainViewChange","form-pane")}else t.currentForm=e,wp.ccf.dispatcher.trigger("mainViewChange","form-pane");return!0},hide:function(){return this.instance.hide(),this.instance},toggle:function(e){return this.switchToForm(e),this.instance.$el.is(":visible")?this.instance.hide():this.instance.show(),this.instance},createSubmissionsTable:function(e){var t=document.querySelectorAll(".ccf-submission-column-controller"),i=new wp.ccf.views.SubmissionsTable({el:e});i.render(),t&&new wp.ccf.views.SubmissionColumnController({el:t}).render()},_setupMainModal:function(e){return this.instance=(new wp.ccf.views.MainModal).render(e),document.getElementsByTagName("body")[0].appendChild(this.instance.el),t.history.start(),this.instance},createManager:function(){var s=this,o=document.querySelectorAll(".ccf-open-form-manager")[0];if(!o)return!1;i.extend(this.dispatcher,t.Events),new wp.ccf.router,s.initErrorModal();var c=!1;if(l.single)if(c=!0,l.postId){var n=parseInt(l.postId);if(s.forms.formsFetching[n]===void 0){var r=new wp.ccf.models.Form({id:n}),a=r.fetch();s.forms.formsFetching[n]=a,s._currentFormDeferred=a,a.done(function(){delete s.forms.formsFetching[n],s.forms.add(r),s.currentForm=r})}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),o.style.display="inline-block";var e=document.getElementById("ccf-submissions");if(e){var t=e.querySelectorAll(".inside")[0],i=document.createElement("div");i.className="ccf-submission-icon",i.setAttribute("data-icon","");var c=document.createElement("a");c.href="?action=edit&post="+parseInt(l.postId)+"&download_submissions=1&download_submissions_nonce="+l.downloadSubmissionsNonce,c.className="ccf-submission-icon",c.setAttribute("data-icon","");var n=document.getElementById("show-settings-link");i.onclick=function(){n.click()},e.insertBefore(i,e.firstChild.nextSibling.nextSibling),e.insertBefore(c,e.firstChild.nextSibling.nextSibling),wp.ccf.createSubmissionsTable(t)}})}else s._setupMainModal(!0),o.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)};o.addEventListener?o.addEventListener("click",d,!1):o.attachEvent("onclick",d)}}),wp.ccf.createManager()}(jQuery,Backbone,_,ccfSettings);
|
1 |
+
(function(e,t,i,l){"use strict";window.wp=window.wp||{},wp.ccf=wp.ccf||{},wp.ccf.utils=wp.ccf.utils||{},wp.ccf.utils.cleanDateFields=function(e){delete e.date,delete e.date_gmt,delete e.modified,delete e.modified_gmt,delete e.date_tz,delete e.modified_tz},wp.ccf.utils.template=i.memoize(function(e){var t={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g};return i.template(document.getElementById(e).innerHTML,null,t)}),wp.ccf.utils.insertFormShortcode=function(e){var t=wp.ccf.forms.findWhere({id:e.get("id")});t||wp.ccf.forms.add(e);var i=tinymce.get(wpActiveEditor),l='[ccf_form id="'+e.get("id")+'"]';i&&!i.isHidden()?tinymce.activeEditor.execCommand("mceInsertContent",!1,l):document.getElementById(wpActiveEditor).value+=l},wp.ccf.utils.getPrettyPostDate=function(e){return e=moment.utc(e),l.gmtOffset&&(e=e.utcOffset(60*parseInt(l.gmtOffset))),e.format("h:mm a M/D/YYYY")},wp.ccf.utils.wordChop=function(e,t){var i=e.substr(0,t);return i.substr(0,Math.min(i.length,i.lastIndexOf(" "))),i.length<e.length&&(i+="..."),i},wp.ccf.utils.isFieldDate=function(e){return e.date!==void 0||e.hour!==void 0&&e.minute!==void 0&&e["am-pm"]!==void 0?!0:!1},wp.ccf.utils.isFieldName=function(e){return e.name!==void 0||e.last!==void 0?!0:!1},wp.ccf.utils.isFieldEmailConfirm=function(e){return e.email!==void 0||e.confirm!==void 0?!0:!1},wp.ccf.utils.isFieldAddress=function(e){return e.street!==void 0&&e.city!==void 0&&e.zipcode!==void 0&&e.line_two!==void 0?!0:!1},wp.ccf.utils.isFieldFile=function(e){return e.id!==void 0&&e.url!==void 0&&e.file_name!==void 0?!0:!1},wp.ccf.utils.getPrettyFieldEmailConfirm=function(e){return e.email?e.email:e.confirm?e.confirm:"-"},wp.ccf.utils.getPrettyFieldDate=function(e){var t="",i="";if(e.hour&&e.minute&&e["am-pm"]&&(t+=e.hour+":"+e.minute+" "+e["am-pm"]),e.date&&(t+=" "+e.date),!t)return"-";var s=moment.utc(t);return s.isValid()?(e.hour&&e.minute&&e["am-pm"]&&(i+=s.format("h:mm a")),e.date&&(i&&(i+=" "),i+=s.format("M/D/YYYY")),i):l.invalidDate},wp.ccf.utils.getPrettyFieldName=function(e){var t=e.first;return t.length>0&&(t+=" "),e.last&&(t+=e.last),t||(t="-"),t},wp.ccf.utils.getPrettyFieldAddress=function(e){if(!e.street||!e.city)return"-";var t=e.street;return e.line_two&&(t+=" "+e.line_two),t+=", "+e.city,e.state&&(t+=", "+e.state),e.zipcode&&(t+=" "+e.zipcode),e.country&&(t+=" "+e.country),t}})(jQuery,Backbone,_,ccfSettings),function(e,t,i){"use strict";wp.ccf.mixins=wp.ccf.mixins||{},wp.ccf.mixins.subViewable=wp.ccf.mixins.subViewable||{subViews:{},initRenderSubViews:function(e,t,l){this.renderedSubViews||(this.renderedSubViews={});for(var s in this.subViews){var o={el:this.$el.find(".ccf-"+s),parent:this};l&&i.extend(o,l),this.renderedSubViews[s]&&this.renderedSubViews[s].destroy&&this.renderedSubViews[s].destroy(),(t||!this.renderedSubViews[s])&&(this.renderedSubViews[s]=new this.subViews[s](o)),this.renderedSubViews[s].render(),e&&(this.renderedSubViews[s].el.style.display="block")}return this},showView:function(e,t,i){if(this.renderedSubViews!==void 0&&this.renderedSubViews[e]!==void 0){var l=this.renderedSubViews[e];i||l.render(t),l.el.style.display="block",this.currentView=e;for(var s in this.subViews)s!==e&&(this.renderedSubViews[s].el.style.display="none")}}}}(jQuery,Backbone,_,ccfSettings),function(e,t,i,l){"use strict";wp.ccf.models=wp.ccf.models||{},wp.ccf.models.Fields=wp.ccf.models.Fields||{};var s=function(e,i,l){return"object"!=typeof i&&""===i&&(i=""),t.Model.prototype.set.call(this,e,i,l)},o=function(e,t,i){return i=i||{},i.emulateHTTP=!0,this.constructor.__super__.sync.call(this,e,t,i)},c=function(e){for(var t in this.attributes)if(-1===i.indexOf(e,t)){var l=this.get(t);"string"==typeof l&&""!==l&&(l=(l+"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/“/g,"”").replace(/”/g,"”").replace(/‘/g,"‘").replace(/&/g,"&").replace(/'/g,"'"),this.set(t,l))}return this};wp.ccf.models.FieldChoice=wp.ccf.models.FieldChoice||t.Model.extend({defaults:{label:"",value:"",selected:!1},decode:function(){return c.call(this,[])},set:s}),wp.ccf.models.PostFieldMapping=wp.ccf.models.PostFieldMapping||t.Model.extend({defaults:{formField:"",postField:"",customFieldKey:""},decode:function(){return c.call(this,[])},set:s}),wp.ccf.models.FormNotificationAddress=wp.ccf.models.FormNotificationAddress||t.Model.extend({defaults:{type:"custom",field:"",email:""},decode:function(){return c.call(this,[])},set:s}),wp.ccf.models.FormNotification=wp.ccf.models.FormNotification||t.Model.extend({defaults:function(){return{title:"",content:"",active:!1,addresses:new wp.ccf.collections.FormNotificationAddresses,fromType:"default",fromAddress:"",fromField:"",subjectType:"default",subject:"",subjectField:"",fromNameType:"custom",fromName:"WordPress",fromNameField:""}},initialize:function(e){if("object"==typeof e&&e.addresses){var t=[];i.each(e.addresses,function(e){var i=new wp.ccf.models.FormNotificationAddress(e);i.decode(),t.push(i)}),this.set("addresses",new wp.ccf.collections.FormNotificationAddresses(t))}},decode:function(){return c.call(this,[])},toJSON:function(){var e=this.constructor.__super__.toJSON.call(this);return e.addresses&&(e.addresses=e.addresses.toJSON()),e},set:s}),wp.ccf.models.Form=wp.ccf.models.Form||wp.api.models.Post.extend({urlRoot:l.apiRoot.replace(/\/$/,"")+"/ccf/v1/forms",set:s,sync:o,idAttribute:"id",initialize:function(){this.on("sync",this.decode,this)},defaults:function(){var e={fields:new wp.ccf.collections.Fields,type:"ccf_form",status:"publish",description:"",buttonText:"Submit Form",completionActionType:"text",completionRedirectUrl:"",completionMessage:"",postCreation:!1,postCreationType:"post",postCreationStatus:"draft",postFieldMappings:new wp.ccf.collections.PostFieldMappings,notifications:new wp.ccf.collections.FormNotifications,pause:!1,pauseMessage:l.pauseMessage,theme:"none"};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"),c.call(this,e)},getFieldSlugs:function(e){var t=wp.ccf.currentForm.get("fields"),i=[];return t.each(function(t){e&&t.isImmutable||i.push(t.get("slug"))}),i},parse:function(e){var t=this,l=0,s=0;if(e.fields){var o=t.get("fields");if(o&&o.length>0){for(l=0;e.fields.length>l;l++){var c=e.fields[l],n=o.findWhere({slug:c.slug});if(n){if(c.choices!==void 0){var r=t.get("choices");if(r&&r.length>0)for(s=0;c.choices>s;s++){var a=r.at(s);a.set(c.choices[s]),a.decode()}delete e.fields[l].choices}n.set(c),n.decode()}}delete e.fields}else{var d=[];i.each(e.fields,function(e){var t=new wp.ccf.models.Fields[e.type](e);t.decode(),d.push(t)}),e.fields=new wp.ccf.collections.Fields(d,{formId:e.id})}}if(e.notifications){var f=t.get("notifications");if(f&&f.length>0){for(l=0;e.notifications.length>l;l++){var u=e.notifications[l],h=f.findWhere({slug:u.slug});if(h){if(u.addresses!==void 0){var m=t.get("addresses");if(m&&m.length>0)for(s=0;u.addresses>s;s++){var p=m.at(s);p.set(u.addresses[s]),p.decode()}delete e.notifications[l].addresses}h.set(u),h.decode()}}delete e.notifications}else{var w=[];i.each(e.notifications,function(e){var t=new wp.ccf.models.FormNotification(e);t.decode(),w.push(t)}),e.notifications=new wp.ccf.collections.FormNotifications(w)}}if(e.postFieldMappings){var v=t.get("postFieldMappings");if(v&&v.length>0){for(l=0;e.postFieldMappings.length>l;l++){var g=e.postFieldMappings[l],y=v.findWhere({slug:g.slug});y&&(y.set(g),y.decode())}delete e.postFieldMappings}else{var F=[];i.each(e.postFieldMappings,function(e){var t=new wp.ccf.models.PostFieldMapping(e);t.decode(),F.push(t)}),e.postFieldMappings=new wp.ccf.collections.PostFieldMappings(F)}}return this.constructor.__super__.parse.call(this,e)},toJSON:function(){var e=this.constructor.__super__.toJSON.call(this);return e.fields&&(e.fields=e.fields.toJSON()),e.notifications&&(e.notifications=e.notifications.toJSON()),e.author&&(e.author=e.author.toJSON()),e}}),wp.ccf.models.Submission=wp.api.models.Submission||wp.api.models.Post.extend({defaults:{id:null,data:{}},sync:o,urlRoot:l.apiRoot.replace(/\/$/,"")+"/ccf/v1/submissions"}),wp.ccf.models.Field=wp.api.models.Field||wp.api.models.Post.extend({idAttribute:"id",defaults:{id:null},set:s,required:function(){return["slug"]},decode:function(){return c.call(this,i.keys(wp.api.models.Post.prototype.defaults))},hasRequiredAttributes:function(){var e=this,t=!0;return i.each(this.required(),function(i){(e.get(i)===void 0||""===e.get(i))&&(t=!1)}),t},sync:o}),wp.ccf.models.StandardField=wp.ccf.models.StandardField||wp.ccf.models.Field.extend({idAttribute:"id",defaults:function(){var e={label:l.fieldLabel,value:"",placeholder:"",slug:"",type:"",required:!1,className:"",description:""};return i.defaults(e,this.constructor.__super__.defaults)}}),wp.ccf.models.Fields["single-line-text"]=wp.ccf.models.Fields["single-line-text"]||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"single-line-text"};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.file=wp.ccf.models.Fields.file||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"file",fileExtensions:"",maxFileSize:l.maxFileSize};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields["paragraph-text"]=wp.ccf.models.Fields["paragraph-text"]||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"paragraph-text"};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.hidden=wp.ccf.models.Fields.hidden||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"hidden"};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.email=wp.ccf.models.Fields.email||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"email",emailConfirmation:!1};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.website=wp.ccf.models.Fields.website||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"website",placeholder:"http://"};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.phone=wp.ccf.models.Fields.phone||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"phone",phoneFormat:"us"};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.date=wp.ccf.models.Fields.date||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"date",showDate:!0,showTime:!0,dateFormat:"mm/dd/yyyy"};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.name=wp.ccf.models.Fields.name||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"name"};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.recaptcha=wp.ccf.models.Fields.recaptcha||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"recaptcha",siteKey:"",secretKey:""};return i.defaults(e,this.constructor.__super__.defaults())},required:function(){return["siteKey","secretKey"]},isImmutable:!0}),wp.ccf.models.Fields.address=wp.ccf.models.Fields.address||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"address",addressType:"us"};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields["section-header"]=wp.ccf.models.Fields["section-header"]||wp.ccf.models.Field.extend({defaults:function(){var e={type:"section-header",slug:"",heading:"",subheading:"",className:""};return i.defaults(e,this.constructor.__super__.defaults)},required:function(){return[]},isImmutable:!0}),wp.ccf.models.Fields.html=wp.ccf.models.Fields.html||wp.ccf.models.Field.extend({defaults:function(){var e={type:"html",slug:"",html:"",className:""};return i.defaults(e,this.constructor.__super__.defaults)},required:function(){return[]},isImmutable:!0}),wp.ccf.models.ChoiceableField=wp.ccf.models.ChoiceableField||wp.ccf.models.StandardField.extend({defaults:function(){var e={choices:new wp.ccf.collections.FieldChoices};return i.defaults(e,this.constructor.__super__.defaults())},initialize:function(e){if("object"==typeof e&&e.choices){var t=[];i.each(e.choices,function(e){var i=new wp.ccf.models.FieldChoice(e);i.decode(),t.push(i)}),this.set("choices",new wp.ccf.collections.FieldChoices(t))}}}),wp.ccf.models.Fields.radio=wp.ccf.models.Fields.radio||wp.ccf.models.ChoiceableField.extend({defaults:function(){var e={type:"radio"};return i.defaults(e,this.constructor.__super__.defaults())},initialize:function(){return this.constructor.__super__.initialize.apply(this,arguments)}}),wp.ccf.models.Fields.checkboxes=wp.ccf.models.Fields.checkboxes||wp.ccf.models.ChoiceableField.extend({defaults:function(){var e={type:"checkboxes"};return i.defaults(e,this.constructor.__super__.defaults())},initialize:function(){return this.constructor.__super__.initialize.apply(this,arguments)}}),wp.ccf.models.Fields.dropdown=wp.ccf.models.Fields.dropdown||wp.ccf.models.ChoiceableField.extend({defaults:function(){var e={type:"dropdown"};return i.defaults(e,this.constructor.__super__.defaults())},initialize:function(){return this.constructor.__super__.initialize.apply(this,arguments)}})}(jQuery,Backbone,_,ccfSettings),function(e,t,i,l){"use strict";var s=function(e,t,i){return i=i||{},i.emulateHTTP=!0,this.constructor.__super__.sync.call(this,e,t,i)};wp.ccf.collections=wp.ccf.collections||{},wp.ccf.collections.Forms=wp.ccf.collections.Forms||wp.api.collections.Posts.extend({model:wp.ccf.models.Form,url:l.apiRoot.replace(/\/$/,"")+"/ccf/v1/forms",formsFetching:{},initialize:function(){this.constructor.__super__.initialize(),this.formsFetching={}},sync:s,remove:function(e,t){t=t||{};var l=this.constructor.__super__.remove.call(this,e,t);return t.destroy&&(e instanceof Array?i.each(e,function(e){e.destroy()}):e.destroy()),l}}),wp.ccf.collections.Fields=wp.ccf.collections.Fields||wp.api.collections.Posts.extend({model:wp.ccf.models.Field,url:function(){return l.apiRoot+"/ccf/forms/"+this.formId+"/fields"},initialize:function(e,t){t&&t.formId&&(this.formId=t.formId)},sync:s}),wp.ccf.collections.PostFieldMappings=wp.ccf.collections.PostFieldMappings||t.Collection.extend({model:wp.ccf.models.PostFieldMapping}),wp.ccf.collections.FormNotificationAddresses=wp.ccf.collections.FormNotificationAddresses||t.Collection.extend({model:wp.ccf.models.FormNotificationAddress}),wp.ccf.collections.FormNotifications=wp.ccf.collections.FormNotifications||t.Collection.extend({model:wp.ccf.models.FormNotification}),wp.ccf.collections.Submissions=wp.ccf.collections.Submissions||wp.api.collections.Posts.extend({model:wp.ccf.models.Submission,url:function(){return l.apiRoot.replace(/\/$/,"")+"/ccf/v1/forms/"+this.formId+"/submissions"},initialize:function(e,t){this.constructor.__super__.initialize.apply(this,arguments),t&&t.formId&&(this.formId=t.formId)},sync:s}),wp.ccf.collections.FieldChoices=wp.ccf.collections.FieldChoices||t.Collection.extend({model:wp.ccf.models.FieldChoice})}(jQuery,Backbone,_,ccfSettings),function(e,t,i,l){"use strict";wp.ccf.views=wp.ccf.views||{},wp.ccf.views.Fields=wp.ccf.views.Fields||{},wp.ccf.views.FieldChoice=t.View.extend({template:wp.ccf.utils.template("ccf-field-choice-template"),className:"choice",events:{"click .add":"triggerAdd","click .delete":"triggerDelete","blur input":"saveChoice",saveChoice:"saveChoice",sorted:"triggerUpdateSort"},initialize:function(e){this.field=e.field},destroy:function(){wp.ccf.dispatcher.off("mainViewChange",this.saveChoice),this.unbind()},triggerUpdateSort:function(e,t){this.field.get("choices").remove(this.model,{silent:!0}),this.field.get("choices").add(this.model,{at:t,silent:!0})},saveChoice:function(){if(""!==this.el.innerHTML){var e=this.el.querySelectorAll(".choice-label")[0].value,t=this.el.querySelectorAll(".choice-value")[0].value;this.model.set("label",e),this.model.set("value",t);var i=this.el.querySelectorAll(".choice-selected")[0],l=i.checked?!0:!1;return this.model.set("selected",l),this}},render:function(){var e={};return this.model&&(e.choice=this.model.toJSON()),this.el.innerHTML=this.template(e),wp.ccf.dispatcher.on("mainViewChange",this.saveChoice,this),this},triggerAdd:function(){this.field.get("choices").add(new wp.ccf.models.FieldChoice)},triggerDelete:function(){var e=this.field.get("choices");if(e.length>1)e.remove(this.model),this.destroy(),this.remove();else{for(var t=this.el.querySelectorAll(".choice-label, .choice-value"),i=this.el.querySelectorAll(".choice-selected"),l=0;t.length>l;l++)t[l].value="";i[0].checked=!1}}}),wp.ccf.views.EmptyFormNotificationTableRow=wp.ccf.views.EmptyFormNotificationTableRow||t.View.extend({tagName:"tr",template:wp.ccf.utils.template("ccf-empty-form-notification-row-template"),events:{"click .add":"triggerAdd"},initialize:function(e){this.form=e.form},destroy:function(){this.unbind()},render:function(){return this.$el.html(this.template()),this},triggerAdd:function(){var e=this.form.get("notifications");this.destroy(),e.add(new wp.ccf.models.FormNotification)}}),wp.ccf.views.EmptyFormTableRow=wp.ccf.views.EmptyFormTableRow||t.View.extend({tagName:"tr",template:wp.ccf.utils.template("ccf-empty-form-table-row-template"),render:function(){return this.$el.html(this.template()),this}}),wp.ccf.views.FormNotificationAddress=t.View.extend({template:wp.ccf.utils.template("ccf-form-notification-address-template"),className:"address",events:{"click .add":"triggerAdd","click .delete":"triggerDelete","blur input":"save","change select":"save"},initialize:function(e){this.notification=e.notification,this.parent=e.parent,this.form=e.form},destroy:function(){this.unbind()},save:function(){if(""!==this.el.innerHTML){var e=this.el.querySelectorAll(".form-notification-address-type")[0].value,t=this.el.querySelectorAll(".form-notification-address-email"),i=this.el.querySelectorAll(".form-notification-address-field"),l=this.model.get("type");return t.length&&this.model.set("email",t[0].value),i.length&&this.model.set("field",i[0].value),this.model.set("type",e),l!==e&&this.render(),this}},updateFromFieldField:function(){if("edit"===this.parent.context&&"field"===this.model.get("type")){var e=this.el.querySelectorAll(".form-notification-address-field")[0];e.innerHTML="",e.disabled=!1;var t,i=this.form.get("fields"),s=0,o=this.model.get("field");i.length>=1&&i.each(function(i){"email"===i.get("type")&&(t=document.createElement("option"),t.innerHTML=i.get("slug"),t.value=i.get("slug"),i.get("slug")===o&&(t.selected=!0),e.appendChild(t),s++)}),0===s&&(t=document.createElement("option"),t.innerHTML=l.noEmailFields,t.value="",e.appendChild(t),e.disabled=!0)}},render:function(){var e={};this.model&&(e.address=this.model.toJSON()),this.el.innerHTML=this.template(e);var t=this.form.get("fields");return this.listenTo(t,"add",this.updateFromFieldField,this),this.listenTo(t,"remove",this.updateFromFieldField,this),"field"===this.model.get("type")&&this.updateFromFieldField(),this},triggerAdd:function(){this.notification.get("addresses").add(new wp.ccf.models.FormNotificationAddress)},triggerDelete:function(){var e=this.notification.get("addresses");e.length>1?this.parent.deleteAddress(this):(this.model.clear().set(wp.ccf.models.FormNotificationAddress.prototype.defaults),this.destroy(),this.render())}}),wp.ccf.views.ExistingFormNotificationRow=t.View.extend({template:wp.ccf.utils.template("ccf-existing-form-notification-table-row-template"),tagName:"tr",events:{"change select.form-email-notification-from-type":"toggleNotificationFields","change select.form-email-notification-from-name-type":"toggleNotificationFields","change select.form-email-notification-subject-type":"toggleNotificationFields","click .close-notification":"changeContext","click .edit-notification":"changeContext","click .delete-notification":"triggerDelete","blur input":"save","change select":"save"},addressViews:[],initialize:function(e){this.form=e.form,this.addressViews=[],this.parent=e.parent,this.context=e.context!==void 0?e.context:"view";var t=this.model.get("addresses");this.listenTo(t,"add",this.addAddress)},deleteAddress:function(e){i.each(this.addressViews,function(t){if(e.cid===t.cid){var l=i.indexOf(this.addressViews,t);this.model.get("addresses").remove(e.model),this.addressViews[l].remove(),this.addressViews.splice(l,1)}},this)},addAddress:function(e){var t=this.el.querySelectorAll(".addresses")[0],i=new wp.ccf.views.FormNotificationAddress({model:e,parent:this,notification:this.model,form:this.form});this.addressViews.push(i),t.appendChild(i.render().el)},destroy:function(){this.unbind()},changeContext:function(e,t){"edit"===this.context&&this.save(),t?this.context=t:("view"===this.context&&this.parent.closeAllNotifications(),this.context="edit"===this.context?"view":"edit"),this.destroy(),this.render()},updateFieldVariables:function(){if("edit"===this.context){var e,t=this.el.querySelectorAll(".field-variables")[0],i="",l=this.form.get("fields");l.each(function(t){e=t.get("type"),"html"!==e&&"section-header"!==e&&"recaptcha"!==e&&(i+="["+t.get("slug")+"] ")}),t.innerText=i}},updateFromFieldField:function(){if("edit"===this.context){var e=this.el.querySelectorAll(".form-email-notification-from-field")[0];e.innerHTML="",e.disabled=!1;var t=this.el.querySelectorAll(".form-email-notification-subject-field")[0];t.innerHTML="",t.disabled=!1;var i=this.el.querySelectorAll(".form-email-notification-from-name-field")[0];i.innerHTML="",i.disabled=!1;var s,o=this.form.get("fields"),c=0,n=0,r=0,a=this.model.get("emailNotificationFromField"),d=this.model.get("emailNotificationSubjectField"),f=this.model.get("emailNotificationFromNameField");o.length>=1&&o.each(function(l){"email"===l.get("type")?(s=document.createElement("option"),s.innerHTML=l.get("slug"),s.value=l.get("slug"),l.get("slug")===a&&(s.selected=!0),e.appendChild(s),c++):"name"===l.get("type")?(s=document.createElement("option"),s.innerHTML=l.get("slug"),s.value=l.get("slug"),l.get("slug")===f&&(s.selected=!0),i.appendChild(s),n++):"single-line-text"===l.get("type")&&(s=document.createElement("option"),s.innerHTML=l.get("slug"),s.value=l.get("slug"),l.get("slug")===d&&(s.selected=!0),t.appendChild(s),r++)}),0===c&&(s=document.createElement("option"),s.innerHTML=l.noEmailFields,s.value="",e.appendChild(s),e.disabled=!0),0===n&&(s=document.createElement("option"),s.innerHTML=l.noNameFields,s.value="",i.appendChild(s),i.disabled=!0),0===r&&(s=document.createElement("option"),s.innerHTML=l.noApplicableFields,s.value="",t.appendChild(s),t.disabled=!0)}},toggleNotificationFields:function(){var e=this.el.querySelectorAll(".email-notification-from-address")[0],t=this.el.querySelectorAll(".email-notification-from-field")[0],i=this.el.querySelectorAll(".form-email-notification-from-type")[0],l=this.el.querySelectorAll(".email-notification-subject")[0],s=this.el.querySelectorAll(".email-notification-subject-field")[0],o=this.el.querySelectorAll(".form-email-notification-subject-type")[0],c=this.el.querySelectorAll(".email-notification-from-name")[0],n=this.el.querySelectorAll(".email-notification-from-name-field")[0],r=this.el.querySelectorAll(".form-email-notification-from-name-type")[0];e.style.display="none",t.style.display="none","custom"===i.value?e.style.display="block":"field"===i.value&&(t.style.display="block"),l.style.display="none",s.style.display="none","custom"===o.value?l.style.display="block":"field"===o.value&&(s.style.display="block"),c.style.display="none",n.style.display="none","custom"===r.value?c.style.display="block":"field"===r.value&&(n.style.display="block")},save:function(){if(""!==this.el.innerHTML&&"edit"===this.context){var e=this.el.querySelectorAll(".form-email-notification-title")[0].value;this.model.set("title",e);var t=this.el.querySelectorAll(".form-email-notification-content")[0].value;this.model.set("content",t);var i=this.el.querySelectorAll(".form-email-notification-active")[0].value;this.model.set("active","1"===i?!0:!1);var l=this.el.querySelectorAll(".form-email-notification-from-type")[0].value;this.model.set("fromType",l);var s=this.el.querySelectorAll(".form-email-notification-from-address")[0].value;this.model.set("fromAddress",s);var o=this.el.querySelectorAll(".form-email-notification-from-field")[0].value;this.model.set("fromField",o);var c=this.el.querySelectorAll(".form-email-notification-from-name-type")[0].value;this.model.set("fromNameType",c);var n=this.el.querySelectorAll(".form-email-notification-from-name")[0].value;this.model.set("fromName",n);var r=this.el.querySelectorAll(".form-email-notification-from-name-field")[0].value;this.model.set("fromNameField",r);var a=this.el.querySelectorAll(".form-email-notification-subject-type")[0].value;this.model.set("subjectType",a);var d=this.el.querySelectorAll(".form-email-notification-subject")[0].value;this.model.set("subject",d);var f=this.el.querySelectorAll(".form-email-notification-subject-field")[0].value;this.model.set("subjectField",f);for(var u=0;this.addressViews.length>u;u++)this.addressViews[u].save();return this}},render:function(){var e={context:this.context,form:this.form.toJSON()};if(this.model&&(e.notification=this.model.toJSON()),this.el.innerHTML=this.template(e),"edit"===this.context){this.toggleNotificationFields(),this.updateFromFieldField(),this.updateFieldVariables();var t=this.el.querySelectorAll(".addresses")[0],i=this.model.get("addresses");if(i.length>=1)i.each(function(e){var i=new wp.ccf.views.FormNotificationAddress({model:e,parent:this,notification:this.model,form:this.form}).render();t.appendChild(i.el),this.addressViews.push(i)},this);else{var l=new wp.ccf.models.FormNotificationAddress;i.add(l)}}var s=this.form.get("fields");return this.listenTo(s,"add",this.updateFromFieldField,this),this.listenTo(s,"remove",this.updateFromFieldField,this),this.listenTo(s,"add",this.updateFieldVariables,this),this.listenTo(s,"remove",this.updateFieldVariables,this),this},triggerDelete:function(){this.parent.deleteNotification(this)}}),wp.ccf.views.FieldBase=wp.ccf.views.FieldBase||t.View.extend({events:{"blur input":"saveField","blur input.field-slug":"checkSlug","blur textarea":"saveField","change select":"saveField",'change input[type="checkbox"]':"saveField"},checkSlug:function(){var e=this.el.querySelectorAll(".field-slug");if(e.length>0){var t=e[0],i=!1;t.parentNode.className=t.value&&!t.value.match(/^[a-zA-Z0-9\-_]+$/)?t.parentNode.className.replace(/ field-error/i,"")+" field-error":t.parentNode.className.replace(/ field-error/i,""),this.collection.length>0&&""!==t.value?(this.collection.each(function(e){e!==this.model&&t.value===e.get("slug")&&(i=!0)},this),t.parentNode.className=i?t.parentNode.className.replace(/ field-duplicate-slug/i,"")+" field-duplicate-slug":t.parentNode.className.replace(/ field-duplicate-slug/i,"")):t.parentNode.className=t.parentNode.className.replace(/ field-duplicate-slug/i,"")}},destroy:function(){this.unbind()},render:function(){return this.el.innerHTML=this.template({field:this.model.toJSON()}),this.checkSlug(),this}}),wp.ccf.views.Fields["single-line-text"]=wp.ccf.views.Fields["single-line-text"]||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-single-line-text-template"),initialize:function(){},saveField:function(){return""!==this.el.innerHTML?(this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("description",this.el.querySelectorAll(".field-description")[0].value),this.model.set("value",this.el.querySelectorAll(".field-value")[0].value),this.model.set("placeholder",this.el.querySelectorAll(".field-placeholder")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1),this):void 0}}),wp.ccf.views.Fields.file=wp.ccf.views.Fields.file||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-file-template"),initialize:function(){},saveField:function(){return""!==this.el.innerHTML?(this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("description",this.el.querySelectorAll(".field-description")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1),this.model.set("fileExtensions",this.el.querySelectorAll(".field-file-extensions")[0].value),this.model.set("maxFileSize",this.el.querySelectorAll(".field-max-file-size")[0].value),this):void 0}}),wp.ccf.views.Fields.recaptcha=wp.ccf.views.Fields.recaptcha||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-recaptcha-template"),initialize:function(){},saveField:function(){return""!==this.el.innerHTML?(this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("description",this.el.querySelectorAll(".field-description")[0].value),this.model.set("siteKey",this.el.querySelectorAll(".field-site-key")[0].value),this.model.set("secretKey",this.el.querySelectorAll(".field-secret-key")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this):void 0}}),wp.ccf.views.Fields["section-header"]=wp.ccf.views.Fields["section-header"]||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-section-header-template"),initialize:function(){},saveField:function(){return""!==this.el.innerHTML?(this.model.set("heading",this.el.querySelectorAll(".field-heading")[0].value),this.model.set("subheading",this.el.querySelectorAll(".field-subheading")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this):void 0}}),wp.ccf.views.Fields.html=wp.ccf.views.Fields.html||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-html-template"),initialize:function(){},saveField:function(){return""!==this.el.innerHTML?(this.model.set("html",this.el.querySelectorAll(".field-html")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this):void 0}}),wp.ccf.views.Fields["paragraph-text"]=wp.ccf.views.Fields["paragraph-text"]||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-paragraph-text-template"),saveField:function(){return""!==this.el.innerHTML?(this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("description",this.el.querySelectorAll(".field-description")[0].value),this.model.set("value",this.el.querySelectorAll(".field-value")[0].value),this.model.set("placeholder",this.el.querySelectorAll(".field-placeholder")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1),this):void 0}}),wp.ccf.views.Fields.hidden=wp.ccf.views.Fields.hidden||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-hidden-template"),saveField:function(){return""!==this.el.innerHTML?(this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("value",this.el.querySelectorAll(".field-value")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this):void 0}}),wp.ccf.views.Fields.date=wp.ccf.views.Fields.date||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-date-template"),saveField:function(){if(""!==this.el.innerHTML){this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("description",this.el.querySelectorAll(".field-description")[0].value);var e=this.el.querySelectorAll(".field-value");
|
2 |
+
e.length>0&&this.model.set("value",e[0].value);var t=this.el.querySelectorAll(".field-date-format");t.length&&this.model.set("dateFormat",t[0].value);var i=this.model.get("showDate"),l=this.el.querySelectorAll(".field-show-date")[0].checked?!0:!1;this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("showDate",l);var s=this.model.get("showTime"),o=this.el.querySelectorAll(".field-show-time")[0].checked?!0:!1;return this.model.set("showTime",o),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1),(o!=s||l!=i)&&this.render(),this}}}),wp.ccf.views.Fields.name=wp.ccf.views.Fields.name||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-name-template"),saveField:function(){return""!==this.el.innerHTML?(this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("description",this.el.querySelectorAll(".field-description")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1),this):void 0}}),wp.ccf.views.Fields.website=wp.ccf.views.Fields.website||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-website-template"),saveField:function(){return""!==this.el.innerHTML?(this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("description",this.el.querySelectorAll(".field-description")[0].value),this.model.set("value",this.el.querySelectorAll(".field-value")[0].value),this.model.set("placeholder",this.el.querySelectorAll(".field-placeholder")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1),this):void 0}}),wp.ccf.views.Fields.phone=wp.ccf.views.Fields.phone||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-phone-template"),saveField:function(){return""!==this.el.innerHTML?(this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("description",this.el.querySelectorAll(".field-description")[0].value),this.model.set("value",this.el.querySelectorAll(".field-value")[0].value),this.model.set("placeholder",this.el.querySelectorAll(".field-placeholder")[0].value),this.model.set("phoneFormat",this.el.querySelectorAll(".field-phone-format")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1),this):void 0}}),wp.ccf.views.Fields.address=wp.ccf.views.Fields.address||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-address-template"),saveField:function(){return""!==this.el.innerHTML?(this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("description",this.el.querySelectorAll(".field-description")[0].value),this.model.set("addressType",this.el.querySelectorAll(".field-address-type")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1),this):void 0}}),wp.ccf.views.Fields.email=wp.ccf.views.Fields.email||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-email-template"),saveField:function(){if(""!==this.el.innerHTML){this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("description",this.el.querySelectorAll(".field-description")[0].value);var e=this.el.querySelectorAll(".field-value");e.length&&this.model.set("value",e[0].value);var t=this.el.querySelectorAll(".field-placeholder");t.length&&this.model.set("placeholder",t[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1);var i=1==this.el.querySelectorAll(".field-email-confirmation")[0].value?!0:!1,l=this.model.get("emailConfirmation");return this.model.set("emailConfirmation",i),l!=i&&this.render(),this}}}),wp.ccf.views.ChoiceableField=wp.ccf.views.ChoiceableField||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-dropdown-template"),initialize:function(){var e=this.model.get("choices");this.listenTo(e,"add",this.addChoice)},addChoice:function(e){var t=new wp.ccf.views.FieldChoice({model:e,field:this.model}).render(),i=this.el.querySelectorAll(".repeatable-choices")[0];i.appendChild(t.el)},saveField:function(){if(""!==this.el.innerHTML){this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("description",this.el.querySelectorAll(".field-description")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1);var t=this.el.querySelectorAll(".repeatable-choices")[0].querySelectorAll(".choice");return i.each(t,function(t){e(t).trigger("saveChoice")}),this}},render:function(){var t=this;t.el.innerHTML=t.template({field:t.model.toJSON()}),t.checkSlug();var i=t.model.get("choices"),l=this.el.querySelectorAll(".repeatable-choices")[0];if(i.length>=1)i.each(function(e){var i=new wp.ccf.views.FieldChoice({model:e,field:t.model}).render();l.appendChild(i.el)});else{var s=new wp.ccf.models.FieldChoice;i.add(s)}return l=this.el.querySelectorAll(".repeatable-choices")[0],e(l).sortable({handle:".move",axis:"y",stop:function(e,t){t.item.trigger("sorted",t.item.index())}}),t}}),wp.ccf.views.Fields.dropdown=wp.ccf.views.Fields.dropdown||wp.ccf.views.ChoiceableField.extend({template:wp.ccf.utils.template("ccf-dropdown-template"),events:function(){return this.constructor.__super__.events}}),wp.ccf.views.Fields.radio=wp.ccf.views.Fields.radio||wp.ccf.views.ChoiceableField.extend({template:wp.ccf.utils.template("ccf-radio-template"),events:function(){return this.constructor.__super__.events}}),wp.ccf.views.Fields.checkboxes=wp.ccf.views.Fields.checkboxes||wp.ccf.views.ChoiceableField.extend({template:wp.ccf.utils.template("ccf-checkboxes-template"),events:function(){return this.constructor.__super__.events}}),wp.ccf.views.FieldSidebar=wp.ccf.views.FieldSidebar||t.View.extend({initialize:function(e){this.currentFieldView=null,this.form=e.form},save:function(e){this.currentFieldView&&""!==this.currentFieldView.el.innerHTML&&this.currentFieldView.saveField(),e&&e instanceof Object&&e.resolve()},fieldRemoved:function(){this.currentFieldView&&(this.form.get("fields").get(this.currentFieldView.model)||this.render())},destroy:function(){wp.ccf.dispatcher.off("saveField",this.save),wp.ccf.dispatcher.off("mainViewChange",this.save),this.unbind()},render:function(e){var t={};if(e){var i=e.get("type");this.currentFieldView&&(this.currentFieldView.saveField(),this.currentFieldView.destroy&&this.currentFieldView.destroy()),this.currentFieldView=new wp.ccf.views.Fields[i]({model:e,collection:this.form.get("fields")}),this.currentFieldView.render(),this.el.innerHTML="",this.el.appendChild(this.currentFieldView.el);var l=this.form.get("fields");this.listenTo(l,"remove",this.fieldRemoved)}else{var s=wp.ccf.utils.template("ccf-empty-field-template");this.el.innerHTML=s(t)}return wp.ccf.dispatcher.on("saveField",this.save,this),wp.ccf.dispatcher.on("mainViewChange",this.save,this),this}}),wp.ccf.views.FieldRowPlaceholder=wp.ccf.views.FieldRowPlaceholder||t.View.extend({template:wp.ccf.utils.template("ccf-field-row-template"),tagName:"div",className:"field",initialize:function(e){this.type=e.type},render:function(){return this.el.innerHTML=this.template({label:l.allLabels[this.type]}),this.el.setAttribute("data-field-type",this.type),this.el.className+=" "+this.type,this}}),wp.ccf.views.FieldRow=wp.ccf.views.FieldRow||t.View.extend({template:wp.ccf.utils.template("ccf-field-row-template"),tagName:"div",className:"field",events:{"click .delete":"triggerDelete","click h4":"triggerEdit",sorted:"triggerUpdateSort"},initialize:function(e){i.bindAll(this,"triggerDelete"),this.form=e.form,this.listenTo(this.model,"change",this.handleChange,this),this.listenTo(this.model,"requirementsNotMet",this.requirementsNotMet,this),this.listenTo(this.model,"requirementsMet",this.requirementsMet,this),this.listenTo(this.model,"duplicateSlug",this.duplicateSlug,this),this.model.attributes.choices&&this.listenTo(this.model.attributes.choices,"change",this.handleChange,this)},duplicateSlug:function(){this.requirementsMet(),this.el.className+=" field-duplicate-slug"},requirementsNotMet:function(){this.requirementsMet(),this.el.className+=" field-incomplete"},requirementsMet:function(){this.el.className=this.el.className.replace(/(field-incomplete|field-duplicate-slug)/i,"")},triggerUpdateSort:function(e,t){this.form.get("fields").remove(this.model),this.form.get("fields").add(this.model,{at:t})},handleChange:function(){this.render()},triggerDelete:function(e){e.stopPropagation(),this.form.get("fields").remove(this.model),this.undelegateEvents(),this.remove()},triggerEdit:function(){var e=this.el.parentNode.querySelectorAll(".ccf-editing");i.each(e,function(e){e.className=e.className.replace(/ccf-editing/i,"")}),this.el.className=this.el.className.replace(/ccf-editing/i,"")+" ccf-editing",wp.ccf.dispatcher.trigger("openEditField",this.model)},render:function(e){this.el.innerHTML=this.template({label:l.allLabels[this.model.get("type")]}),this.el.setAttribute("data-field-type",this.model.get("type"));var t=RegExp(" "+this.model.get("type"),"i");this.el.className=this.el.className.replace(t,"")+" "+this.model.get("type"),e&&(this.el.className=this.el.className.replace(/ instantiated/i,"")+" instantiated");var i=document.getElementById("ccf-"+this.model.get("type")+"-preview-template");if(i){var s=this.el.querySelectorAll(".preview")[0];s.style.display="block",s.innerHTML=wp.ccf.utils.template("ccf-"+this.model.get("type")+"-preview-template")({field:this.model.toJSON()})}return this}}),wp.ccf.views.PostFieldMapping=t.View.extend({template:wp.ccf.utils.template("ccf-post-field-mapping"),className:"field-mapping",events:{"click .add":"triggerAdd","click .delete":"triggerDelete","blur input":"save","change select":"save"},initialize:function(e){this.parent=e.parent,this.form=e.form},destroy:function(){this.unbind()},save:function(){if(""!==this.el.innerHTML){var e=this.el.querySelectorAll(".field-form-field")[0].value,t=this.el.querySelectorAll(".field-post-field")[0].value,i=this.el.querySelectorAll(".field-custom-field-key"),l=this.model.get("postField");return this.model.set("formField",e),this.model.set("postField",t),i.length&&this.model.set("customFieldKey",i[0].value),l!==t&&this.render(),this}},updateFormFieldField:function(){var e=this.el.querySelectorAll(".field-form-field")[0];e.innerHTML="",e.disabled=!1;var t,i=this.form.get("fields"),s=0,o=this.model.get("formField");i.length>=1&&(t=document.createElement("option"),t.innerHTML=l.chooseFormField,t.value="",e.appendChild(t),i.each(function(i){t=document.createElement("option"),t.innerHTML=i.get("slug"),t.value=i.get("slug"),i.get("slug")===o&&(t.selected=!0),e.appendChild(t),s++})),0===s&&(t=document.createElement("option"),t.innerHTML=l.noAvailableFields,t.value="",e.appendChild(t),e.disabled=!0)},updatePostFields:function(){var e,t=this.el.querySelectorAll(".field-post-field")[0];e=document.createElement("option"),e.value="",e.innerText=l.choosePostField,t.appendChild(e);var s=this.form.get("postFieldMappings"),o=[];s.each(function(e){e!==this.model&&o.push(e.get("postField"))},this),i.each(l.postFields.single,function(i,l){-1===o.indexOf(l)&&(e=document.createElement("option"),e.value=l,e.innerText=i,this.model.get("postField")===l&&(e.selected=!0),t.appendChild(e))},this),i.each(l.postFields.repeatable,function(i,l){e=document.createElement("option"),e.value=l,e.innerText=i,this.model.get("postField")===l&&(e.selected=!0),t.appendChild(e)},this)},render:function(){var e={};this.model&&(e.mapping=this.model.toJSON()),this.el.innerHTML=this.template(e);var t=this.form.get("fields");return this.listenTo(t,"add",this.updateFormFieldField,this),this.listenTo(t,"remove",this.updateFormieldField,this),this.updateFormFieldField(),this.updatePostFields(),this},triggerAdd:function(){this.form.get("postFieldMappings").add(new wp.ccf.models.PostFieldMapping)},triggerDelete:function(){var e=this.form.get("postFieldMappings");e.length>1?this.parent.deletePostFieldMapping(this):(this.model.clear().set(wp.ccf.models.PostFieldMapping.prototype.defaults),this.destroy(),this.render())}}),wp.ccf.views.FormSettings=wp.ccf.views.FormSettings||t.View.extend({template:wp.ccf.utils.template("ccf-form-settings-template"),events:{"blur input":"save","change select":"save","change select.form-completion-action-type":"toggleCompletionFields","change select.form-pause":"togglePauseFields","change select.form-post-creation":"togglePostCreationFields","click .add-notification":"triggerAddNotification"},notificationViews:[],mappingViews:[],initialize:function(e){this.model=e.form,this.notificationViews=[],this.mappingViews=[];var t=this.model.get("notifications");this.listenTo(t,"add",this.addNotification);var i=this.model.get("postFieldMappings");this.listenTo(i,"add",this.addPostFieldMapping)},deletePostFieldMapping:function(e){i.each(this.mappingViews,function(t){if(e.cid===t.cid){var l=i.indexOf(this.mappingViews,t);this.model.get("postFieldMappings").remove(e.model),this.mappingViews[l].remove(),this.mappingViews.splice(l,1)}},this)},addPostFieldMapping:function(e){var t=this.el.querySelectorAll(".post-creation-mapping")[0],i=new wp.ccf.views.PostFieldMapping({model:e,parent:this,form:this.model});this.mappingViews.push(i),t.appendChild(i.render().el)},triggerAddNotification:function(){var e=this.model.get("notifications");e.add(new wp.ccf.models.FormNotification)},closeAllNotifications:function(){i.each(this.notificationViews,function(e){e.changeContext(null,"view")})},addNotification:function(e){var t=new wp.ccf.views.ExistingFormNotificationRow({model:e,form:this.model,context:"edit",parent:this}).render(),l=this.el.querySelectorAll(".ccf-form-notifications .rows")[0];l.querySelectorAll(".no-notifications").length>0&&l.removeChild(l.firstChild),i.each(this.notificationViews,function(e){e.changeContext(null,"view")}),this.notificationViews.push(t),l.appendChild(t.el)},toggleCompletionFields:function(){var e=this.el.querySelectorAll(".form-completion-action-type")[0].value,t=this.el.querySelectorAll(".completion-message")[0],i=this.el.querySelectorAll(".completion-redirect-url")[0];"text"===e?(t.style.display="block",i.style.display="none"):(t.style.display="none",i.style.display="block")},togglePauseFields:function(){var e=this.el.querySelectorAll(".form-pause")[0].value,t=this.el.querySelectorAll(".pause-message")[0];t.style.display=parseInt(e)?"block":"none"},togglePostCreationFields:function(){var t=this.el.querySelectorAll(".form-post-creation")[0].value,i=e(this.el.querySelectorAll(".post-creation-mapping-field"));parseInt(t)?i.show():i.hide()},save:function(){if(""!==this.el.innerHTML){var e=this.el.querySelectorAll(".form-title")[0].value;this.model.set("title",{raw:e});var t=this.el.querySelectorAll(".form-description")[0].value;this.model.set("description",t);var i=this.el.querySelectorAll(".form-button-text")[0].value;this.model.set("buttonText",i);var l=this.el.querySelectorAll(".form-pause")[0].value;this.model.set("pause",parseInt(l)?!0:!1);var s=this.el.querySelectorAll(".form-post-creation")[0].value;this.model.set("postCreation",parseInt(s)?!0:!1);var o=this.el.querySelectorAll(".form-post-creation-type")[0].value;this.model.set("postCreationType",o);var c=this.el.querySelectorAll(".form-post-creation-status")[0].value;this.model.set("postCreationStatus",c);var n=this.el.querySelectorAll(".form-pause-message")[0].value;this.model.set("pauseMessage",n);var r=this.el.querySelectorAll(".form-completion-message")[0].value;this.model.set("completionMessage",r);var a=this.el.querySelectorAll(".form-completion-redirect-url")[0].value;this.model.set("completionRedirectUrl",a);var d=this.el.querySelectorAll(".form-completion-action-type")[0].value;this.model.set("completionActionType",d);var f=this.el.querySelectorAll(".form-theme")[0].value;this.model.set("theme",f)}},fullSave:function(e){""!==this.el.innerHTML&&(this.save(),i.each(this.notificationViews,function(e){e.save()}),i.each(this.mappingViews,function(e){e.save()}),e!==void 0&&e.promise!==void 0&&e.resolve())},destroy:function(){wp.ccf.dispatcher.off("saveFormSettings",this.fullSave),wp.ccf.dispatcher.off("mainViewChange",this.fullSave)},deleteNotification:function(e){if(i.each(this.notificationViews,function(t){if(e.cid===t.cid){var l=i.indexOf(this.notificationViews,t);this.model.get("notifications").remove(e.model),this.notificationViews[l].remove(),this.notificationViews.splice(l,1)}},this),!this.notificationViews.length){var t=this.el.querySelectorAll(".ccf-form-notifications .rows")[0];t.appendChild(new wp.ccf.views.EmptyFormNotificationTableRow({form:this.model}).render().el)}},render:function(){var e={form:this.model.toJSON()};this.model.get("fields");var t=this.model.get("notifications");this.el.innerHTML=this.template(e),this.toggleCompletionFields(),this.togglePostCreationFields(),this.togglePauseFields();var i=this.el.querySelectorAll(".ccf-form-notifications .rows")[0],l=document.createElement("tbody");l.className="rows",t.length>=1?t.each(function(e){var t=new wp.ccf.views.ExistingFormNotificationRow({model:e,form:this.model,parent:this}).render();l.appendChild(t.el),this.notificationViews.push(t)},this):l.appendChild(new wp.ccf.views.EmptyFormNotificationTableRow({form:this.model}).render().el),i.parentNode.replaceChild(l,i);var s=this.el.querySelectorAll(".post-creation-mapping")[0],o=this.model.get("postFieldMappings");if(o.length>=1)o.each(function(e){var t=new wp.ccf.views.PostFieldMapping({model:e,parent:this,form:this.model}).render();s.appendChild(t.el),this.mappingViews.push(t)},this);else{var c=new wp.ccf.models.PostFieldMapping;o.add(c)}return wp.ccf.dispatcher.on("mainViewChange",this.fullSave,this),wp.ccf.dispatcher.on("saveFormSettings",this.fullSave,this),this}}),wp.ccf.views.FormPane=wp.ccf.views.FormPane||t.View.extend(i.defaults({template:wp.ccf.utils.template("ccf-form-pane-template"),subViews:{"field-sidebar":wp.ccf.views.FieldSidebar,"form-settings":wp.ccf.views.FormSettings},events:{"click .save-button":"sync","click .signup-button":"signup","click .accordion-heading":"accordionClick","click .form-settings-heading":"accordionClick","click .insert-form-button":"insertForm"},initialize:function(){wp.ccf.dispatcher.on("openEditField",this.openEditField,this)},insertForm:function(){wp.ccf.utils.insertFormShortcode(this.model),wp.ccf.toggle()},signup:function(){var t=this.el.querySelectorAll(".email-signup-field")[0].value,i=this.el.querySelectorAll(".bottom .left.signup")[0];i.className="left signup",t?e.ajax({url:"//taylorlovett.us8.list-manage.com/subscribe/post-json?u=66118f9a5b0ab0414e83f043a&id=b4ed816a24&c=?",method:"post",dataType:"jsonp",data:{EMAIL:t}}).done(function(){i.className="left signup signup-success"}):i.className="left signup signup-error"},accordionClick:function(t){var l=e(t.currentTarget).parents(".accordion-container")[0],s=l.querySelectorAll(".accordion-section");t.currentTarget.parentNode.className.match(/expanded/i)?t.currentTarget.parentNode.className=t.currentTarget.parentNode.className.replace(/expanded/i,""):t.currentTarget.parentNode.className+=" expanded",i.each(s,function(e){e!=t.currentTarget.parentNode&&e.className.match(/expanded/i)&&(e.className=e.className.replace(/expanded/i,""))}),t.currentTarget.className.match(/form-settings-heading/i)?this.el.className.match(/show-form-settings/i)?this.el.className=this.el.className.replace(/show-form-settings/i,""):this.el.className+=" show-form-settings":this.el.className=this.el.className.replace(/show-form-settings/i,"")},openEditField:function(e){this.renderedSubViews["field-sidebar"].render(e).el.style.display="block"},disable:function(){this.el.querySelectorAll(".save-button")[0].setAttribute("disabled","disabled"),this.el.querySelectorAll(".disabled-overlay")[0].style.display="block"},enable:function(){this.el.querySelectorAll(".save-button")[0].removeAttribute("disabled"),this.el.querySelectorAll(".disabled-overlay")[0].style.display="none"},sync:function(){var t=this,i=e(this.el.querySelectorAll(".spinner")[0]);i.fadeIn(),t.disable();var s=e.Deferred(),o=e.Deferred();wp.ccf.dispatcher.trigger("saveFormSettings",s),wp.ccf.dispatcher.trigger("saveField",o),e.when(s,o).then(function(){var e=t.model.get("fields"),s=!0,o={};e.each(function(e){var t=e.get("slug");e.hasRequiredAttributes()?t&&!t.match(/^[a-zA-Z0-9\-_]+$/)?(s=!1,e.trigger("requirementsNotMet")):o[e.get("slug")]!==void 0?(s=!1,e.trigger("duplicateSlug"),o[e.get("slug")].trigger("duplicateSlug")):e.trigger("requirementsMet"):(s=!1,e.trigger("requirementsNotMet")),e.get("slug")&&(o[e.get("slug")]=e)}),s?t.model.save({},{context:"edit"}).error(function(){var e="sync";wp.ccf.errorModal.render(e).show()}).done(function(){l.single&&!l.postId&&(window.location=l.adminUrl+"post.php?post="+t.model.get("id")+"&action=edit#ccf-form/"+t.model.get("id"))}).complete(function(){i.fadeOut(),t.enable(),wp.ccf.dispatcher.trigger("saveFormComplete",t.model)}):(t.enable(),i.fadeOut())})},enableDisableInsert:function(){var e=this.el.querySelectorAll(".insert-form-button")[0];this.model.get("id")?e.removeAttribute("disabled"):e.setAttribute("disabled","disabled")},getNextFieldOrd:function(){var e=this.model.get("fields"),t=e.length+1;return e.each(function(e){var i=e.get("slug"),l=/\-([0-9]+)$/g,s=l.exec(i);if(s&&s[1]){var o=parseInt(s[1]);o>=t&&(t=o+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 o={labels:l.fieldLabels,form:s.model.toJSON()};window.form=s.model,s.el.innerHTML=this.template(o),s.el.className=s.el.className.replace(/show-form-settings/i,"");var c=s.el.querySelectorAll(".fields")[0];i.each(l.fieldLabels,function(e,t){c.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 r=s.el.querySelectorAll(".special-fields")[0];i.each(l.specialFieldLabels,function(e,t){r.appendChild(new wp.ccf.views.FieldRowPlaceholder({type:t}).render().el)});var a=s.model.get("fields"),d=s.el.querySelectorAll(".form-content")[0],f=e(d);return e(s.el.querySelectorAll(".left-sidebar")[0].querySelectorAll(".field")).draggable({cursor:"move",distance:2,zIndex:160001,scroll:!1,containment:"document",appendTo:".ccf-main-modal",snap:!1,connectToSortable:".form-content",helper:function(t){var i=e(t.currentTarget),l=e('<div class="field" data-field-type="'+i.attr("data-field-type")+'"><h4>'+i.find(".label").html()+"</h4></div>");return l.css({width:f.width(),opacity:".75",height:i.height()})}}),a.length>=1&&(d.innerHTML="",a.each(function(e){var t=new wp.ccf.views.FieldRow({model:e,form:s.model}).render(!0).el;d.appendChild(t)})),e(d).sortable({axis:"y",distance:2,handle:"h4",placeholder:"field-placeholder",stop:function(e,t){if(!t.item.hasClass("instantiated")){var i=t.item.attr("data-field-type"),l={};wp.ccf.models.Fields[i].prototype.defaults().slug!==void 0&&(l.slug=i+"-"+s.getNextFieldOrd());var o=new wp.ccf.models.Fields[i](l),c=s.model.get("fields");c.add(o),new wp.ccf.views.FieldRow({model:o,el:t.item,form:s.model}).render(!0),t.item.attr("style","")}t.item.trigger("sorted",t.item.index())}}),s.initRenderSubViews(!1,!0,{form:s.model}),s.enableDisableInsert(),s}},wp.ccf.mixins.subViewable)),wp.ccf.views.ExistingFormTableRow=wp.ccf.views.ExistingFormTableRow||t.View.extend({tagName:"tr",template:wp.ccf.utils.template("ccf-existing-form-table-row-template"),events:{"click .edit":"triggerMainViewChange","click .delete":"triggerDelete","click .insert-form-button":"insertForm"},initialize:function(e){this.parent=e.parent},insertForm:function(){wp.ccf.utils.insertFormShortcode(this.model),wp.ccf.toggle()},triggerMainViewChange:function(){wp.ccf.switchToForm(this.model)},triggerDelete:function(){var e,t=this,i=t.parent.collection.state.currentPage;t.model.destroy().done(function(){e=i,e===t.parent.collection.state.totalPages&&e-1===(t.parent.collection.state.totalObjects-1)/l.postsPerPage&&e--,t.parent.showPage(e).done(function(){t.parent.renderPagination()})})},render:function(){return this.$el.html(this.template({form:this.model.toJSON(),utils:{getPrettyPostDate:wp.ccf.utils.getPrettyPostDate}})),this}}),wp.ccf.views.EmptyFormTableRow=wp.ccf.views.EmptyFormTableRow||t.View.extend({tagName:"tr",template:wp.ccf.utils.template("ccf-empty-form-table-row-template"),render:function(){return this.$el.html(this.template()),this}}),wp.ccf.views.ExistingFormTable=wp.ccf.views.ExistingFormTable||t.View.extend({template:wp.ccf.utils.template("ccf-existing-form-table-template"),initialize:function(){this.parent=arguments.parent,this.collection=new wp.ccf.collections.Forms,wp.ccf.dispatcher.on("changeFormTablePage",this.showPage,this),wp.ccf.dispatcher.on("saveFormComplete",this.render,this)},showPage:function(e){var t=this,i=this.collection.fetch({data:{page:e}});return i.error(function(){var e="sync";wp.ccf.errorModal.render(e).show()}),i.done(function(){var e=t.el.querySelectorAll(".rows")[0],i=document.createElement("tbody");i.className="rows",t.collection.length>=1?t.collection.each(function(e){var l=new wp.ccf.views.ExistingFormTableRow({model:e,parent:t}).render();i.appendChild(l.el)},t):i.appendChild((new wp.ccf.views.EmptyFormTableRow).render().el),e.parentNode.replaceChild(i,e)}),i},renderPagination:function(){var e=this.el.querySelectorAll(".ccf-pagination")[0];e.innerHTML="",this.collection.state.totalPages>1&&e.appendChild(new wp.ccf.views.Pagination({parent:this}).render(this.collection.state.totalPages,this.collection.state.currentPage).el)},render:function(){var e=this;return this.el.innerHTML=this.template(),this.el.querySelectorAll(".ccf-pagination")[0],this.showPage(1).done(function(){e.renderPagination()}),this}}),wp.ccf.views.ExistingFormPane=wp.ccf.views.ExistingFormPane||t.View.extend(i.defaults({template:wp.ccf.utils.template("ccf-existing-form-pane-template"),subViews:{"existing-form-table":wp.ccf.views.ExistingFormTable},render:function(){return this.rendered?this:(this.rendered=!0,this.el.innerHTML=this.template(),this.initRenderSubViews(!0),this)}},wp.ccf.mixins.subViewable)),wp.ccf.views.MainModal=wp.ccf.views.MainModal||t.View.extend(i.defaults({tagName:"div",className:"ccf-main-modal",template:wp.ccf.utils.template("ccf-main-modal-template"),events:{"click .close-icon":"hide","click .main-menu a":"menuClick"},subViews:{"form-pane":wp.ccf.views.FormPane},initialize:function(){l.single||(this.subViews["existing-form-pane"]=wp.ccf.views.ExistingFormPane),wp.ccf.dispatcher.on("mainViewChange",this.toggleView,this)},toggleView:function(e){this.showView(e,wp.ccf.currentForm);var t=e;"form-pane"===e&&wp.ccf.currentForm&&(t="existing-form-pane");var l=this.el.querySelectorAll(".menu-item");i.each(l,function(e){var i=e.getAttribute("data-view");e.className=i===t?e.className.replace("selected","")+" selected":e.className.replace("selected","")})},menuClick:function(e){var t=e.target.getAttribute("data-view");"form-pane"===t&&(wp.ccf.currentForm=null),wp.ccf.dispatcher.trigger("mainViewChange",t),e.preventDefault()},render:function(e){return e=e||!1,this.overlay(),this.el.innerHTML=this.template({single:e}),this.initRenderSubViews(),this.showView("form-pane",wp.ccf.currentForm,!0),this},overlay:function(){return this.overlayEl===void 0&&(this.overlayEl=document.createElement("div"),this.overlayEl.className="ccf-main-modal-overlay",document.body.appendChild(this.overlayEl)),this.overlayEl},remove:function(){return document.body.removeChild(this.overlay()),this},show:function(){e(this.overlay()).show(),this.$el.show()},hide:function(){e(this.overlay()).hide(),this.$el.hide()}},wp.ccf.mixins.subViewable)),wp.ccf.views.SubmissionRow=wp.ccf.views.SubmissionRow||t.View.extend({tagName:"tr",template:wp.ccf.utils.template("ccf-submission-row-template"),events:{"click .view":"view","click .delete":"delete"},initialize:function(e){this.parent=e.parent},"delete":function(){var e,t=this,i=t.parent.collection.state.currentPage;t.model.destroy().done(function(){e=i,e===t.parent.collection.state.totalPages&&e-1===(t.parent.collection.state.totalObjects-1)/l.postsPerPage&&e--,t.parent.showPage(e).done(function(){t.parent.renderPagination()})})},view:function(e){var t=e.currentTarget.getAttribute("data-submission-id"),i=e.currentTarget.getAttribute("data-submission-date");tb_show(l.thickboxTitle+" - "+wp.ccf.utils.getPrettyPostDate(i),"#TB_inline?height=500&width=700&inlineId=ccf-submission-content-"+parseInt(t),null)},render:function(){return this.$el.html(this.template({submission:this.model.toJSON(),currentColumns:this.parent.columns,columns:wp.ccf.currentForm.getFieldSlugs(!0),utils:{getPrettyPostDate:wp.ccf.utils.getPrettyPostDate,wordChop:wp.ccf.utils.wordChop,isFieldDate:wp.ccf.utils.isFieldDate,isFieldName:wp.ccf.utils.isFieldName,isFieldFile:wp.ccf.utils.isFieldFile,isFieldAddress:wp.ccf.utils.isFieldAddress,isFieldEmailConfirm:wp.ccf.utils.isFieldEmailConfirm,getPrettyFieldDate:wp.ccf.utils.getPrettyFieldDate,getPrettyFieldAddress:wp.ccf.utils.getPrettyFieldAddress,getPrettyFieldName:wp.ccf.utils.getPrettyFieldName,getPrettyFieldEmailConfirm:wp.ccf.utils.getPrettyFieldEmailConfirm}})),this}}),wp.ccf.views.SubmissionsTable=wp.ccf.views.SubmissionsTable||t.View.extend({template:wp.ccf.utils.template("ccf-submission-table-template"),events:{"click .prev:not(.disabled)":"previousPage","click .next:not(.disabled)":"nextPage","click .first:not(.disabled)":"firstPage","click .last:not(.disabled)":"lastPage"},initialize:function(){this.collection=new wp.ccf.collections.Submissions({},{formId:l.postId}),wp.ccf.dispatcher.on("submissionTableRebuild",this.render,this)},showPage:function(e){var t=this,i=this.collection.fetch({data:{page:e}});return i.error(function(){var e="sync";wp.ccf.errorModal.render(e).show()}),i.done(function(){var e=t.el.querySelectorAll(".submission-rows")[0],i=document.createElement("tbody");i.className="submission-rows",t.collection.length>=1?t.collection.each(function(e){var l=new wp.ccf.views.SubmissionRow({model:e,parent:t}).render();i.appendChild(l.el)},t):i.appendChild(new wp.ccf.views.EmptySubmissionTableRow({parent:t}).render(wp.ccf.currentForm.getFieldSlugs(!0).concat("date")).el),e.parentNode.replaceChild(i,e)}),i},renderPagination:function(){var e=this.el.querySelectorAll(".ccf-pagination")[0];e.innerHTML="",this.collection.state.totalPages>1&&e.appendChild(new wp.ccf.views.Pagination({parent:this}).render(this.collection.state.totalPages,this.collection.state.currentPage).el)},render:function(e){var t=this;return t.columns=e?e:wp.ccf.currentForm.getFieldSlugs(!0).slice(0,4).concat("date"),1>t.columns.length?t.el.innerHTML="":(t.el.innerHTML=t.template({columns:t.columns}),t.el.querySelectorAll(".ccf-pagination")[0],t.showPage(1).done(function(){t.renderPagination()})),t}}),wp.ccf.views.ErrorModal=wp.ccf.views.ErrorModal||t.View.extend({template:wp.ccf.utils.template("ccf-error-modal-template"),tagName:"div",className:"ccf-error-modal",events:{"click .close":"hide"},hide:function(){this.el.className=this.el.className.replace(" show","")
|
3 |
},show:function(){this.el.className=this.el.className.replace(" show","")+" show"},toggle:function(){this.el.className.match(" show")?this.hide():this.show()},render:function(e){var t={messageType:""};return e&&(t.messageType=e),this.el.innerHTML=this.template(t),this}}),wp.ccf.views.Pagination=wp.ccf.views.Pagination||t.View.extend({template:wp.ccf.utils.template("ccf-pagination-template"),events:{"click .prev:not(.disabled)":"previousPage","click .next:not(.disabled)":"nextPage","click .first:not(.disabled)":"firstPage","click .last:not(.disabled)":"lastPage"},initialize:function(e){this.parent=e.parent},previousPage:function(){var e=this;e.parent.showPage(e.parent.collection.state.currentPage-1).done(function(){e.render()})},nextPage:function(){var e=this;e.parent.showPage(e.parent.collection.state.currentPage+1).done(function(){e.render()})},firstPage:function(){var e=this;e.parent.showPage(1).done(function(){e.render()})},lastPage:function(){var e=this;e.parent.showPage(e.parent.collection.state.totalPages).done(function(){e.render()})},render:function(){return this.el.innerHTML=this.template({totalPages:this.parent.collection.state.totalPages,currentPage:this.parent.collection.state.currentPage,totalObjects:this.parent.collection.state.totalObjects}),this}}),wp.ccf.views.EmptySubmissionTableRow=wp.ccf.views.EmptySubmissionTableRow||t.View.extend({tagName:"tr",template:wp.ccf.utils.template("ccf-no-submissions-row-template"),initialize:function(e){this.parent=e.parent},render:function(){return this.el.innerHTML=this.template({columns:this.parent.columns}),this}}),wp.ccf.views.SubmissionColumnController=wp.ccf.views.SubmissionColumnController||t.View.extend({template:wp.ccf.utils.template("ccf-submissions-controller-template"),events:{"click input[type=checkbox]":"triggerTableRebuild"},render:function(){this.el.innerHTML=this.template({columns:wp.ccf.currentForm.getFieldSlugs(!0).concat("date")})},triggerTableRebuild:function(){var e=[],t=document.querySelectorAll(".submission-column-checkbox");if(t.length>=1)for(var i=0;t.length>i;i++)t[i].checked&&e.push(t[i].value);wp.ccf.dispatcher.trigger("submissionTableRebuild",e)}})}(jQuery,Backbone,_,ccfSettings),function(e,t){"use strict";wp.ccf.router=wp.ccf.router||t.Router.extend({routes:{"ccf-form":"open","ccf-form/:formId":"open"},open:function(e){wp.ccf.show(e)}})}(jQuery,Backbone,_,ccfSettings),function(e,t,i,l){"use strict";wp.ccf=i.defaults(wp.ccf,{forms:new wp.ccf.collections.Forms,currentForm:null,errorModal:null,_currentFormDeferred:null,dispatcher:{},show:function(e){return this.switchToForm(e),this.instance.show(),this.instance},initErrorModal:function(){this.errorModal=(new wp.ccf.views.ErrorModal).render();var e=document.getElementsByTagName("body")[0];e.appendChild(this.errorModal.el)},switchToForm:function(e){var t=this;if(+e===parseInt(e)){var i=parseInt(e);if(e=t.forms.findWhere({id:parseInt(i)}),!e){var l;return t.forms.formsFetching[i]!==void 0?(l=t.forms.formsFetching[i],e=null):(e=new wp.ccf.models.Form({id:i}),l=e.fetch(),t.forms.formsFetching[i]=l),l.done(function(){e?(delete t.forms.formsFetching[i],t.forms.add(e)):e=t.forms.findWhere({id:i}),t.currentForm=e,wp.ccf.dispatcher.trigger("mainViewChange","form-pane")}),l}t.currentForm=e,wp.ccf.dispatcher.trigger("mainViewChange","form-pane")}else t.currentForm=e,wp.ccf.dispatcher.trigger("mainViewChange","form-pane");return!0},hide:function(){return this.instance.hide(),this.instance},toggle:function(e){return this.switchToForm(e),this.instance.$el.is(":visible")?this.instance.hide():this.instance.show(),this.instance},createSubmissionsTable:function(e){var t=document.querySelectorAll(".ccf-submission-column-controller"),i=new wp.ccf.views.SubmissionsTable({el:e});i.render(),t&&new wp.ccf.views.SubmissionColumnController({el:t}).render()},_setupMainModal:function(e){return this.instance=(new wp.ccf.views.MainModal).render(e),document.getElementsByTagName("body")[0].appendChild(this.instance.el),t.history.start(),this.instance},createManager:function(){var s=this,o=document.querySelectorAll(".ccf-open-form-manager")[0];if(!o)return!1;i.extend(this.dispatcher,t.Events),new wp.ccf.router,s.initErrorModal();var c=!1;if(l.single)if(c=!0,l.postId){var n=parseInt(l.postId);if(s.forms.formsFetching[n]===void 0){var r=new wp.ccf.models.Form({id:n}),a=r.fetch();s.forms.formsFetching[n]=a,s._currentFormDeferred=a,a.done(function(){delete s.forms.formsFetching[n],s.forms.add(r),s.currentForm=r})}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),o.style.display="inline-block";var e=document.getElementById("ccf-submissions");if(e){var t=e.querySelectorAll(".inside")[0],i=document.createElement("div");i.className="ccf-submission-icon",i.setAttribute("data-icon","");var c=document.createElement("a");c.href="?action=edit&post="+parseInt(l.postId)+"&download_submissions=1&download_submissions_nonce="+l.downloadSubmissionsNonce,c.className="ccf-submission-icon",c.setAttribute("data-icon","");var n=document.getElementById("show-settings-link");i.onclick=function(){n.click()},e.insertBefore(i,e.firstChild.nextSibling.nextSibling),e.insertBefore(c,e.firstChild.nextSibling.nextSibling),wp.ccf.createSubmissionsTable(t)}})}else s._setupMainModal(!0),o.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)};o.addEventListener?o.addEventListener("click",d,!1):o.attachEvent("onclick",d)}}),wp.ccf.createManager()}(jQuery,Backbone,_,ccfSettings);
|
classes/class-ccf-api-form-controller.php
CHANGED
@@ -435,6 +435,10 @@ class CCF_API_Form_Controller extends WP_REST_Controller {
|
|
435 |
update_post_meta( $result, 'ccf_form_pause', (bool) $data['pause'] );
|
436 |
}
|
437 |
|
|
|
|
|
|
|
|
|
438 |
if ( isset( $data['postCreation'] ) ) {
|
439 |
update_post_meta( $result, 'ccf_form_post_creation', (bool) $data['postCreation'] );
|
440 |
}
|
@@ -950,6 +954,7 @@ class CCF_API_Form_Controller extends WP_REST_Controller {
|
|
950 |
$data['postCreationType'] = esc_html( get_post_meta( $data['id'], 'ccf_form_post_creation_type', true ) );
|
951 |
$data['postCreationStatus'] = esc_html( get_post_meta( $data['id'], 'ccf_form_post_creation_status', true ) );
|
952 |
$data['pauseMessage'] = esc_html( get_post_meta( $data['id'], 'ccf_form_pause_message', true ) );
|
|
|
953 |
|
954 |
// @Todo: escaping
|
955 |
$notifications = get_post_meta( $data['id'], 'ccf_form_notifications', true );
|
435 |
update_post_meta( $result, 'ccf_form_pause', (bool) $data['pause'] );
|
436 |
}
|
437 |
|
438 |
+
if ( isset( $data['theme'] ) ) {
|
439 |
+
update_post_meta( $result, 'ccf_form_theme', sanitize_text_field( $data['theme'] ) );
|
440 |
+
}
|
441 |
+
|
442 |
if ( isset( $data['postCreation'] ) ) {
|
443 |
update_post_meta( $result, 'ccf_form_post_creation', (bool) $data['postCreation'] );
|
444 |
}
|
954 |
$data['postCreationType'] = esc_html( get_post_meta( $data['id'], 'ccf_form_post_creation_type', true ) );
|
955 |
$data['postCreationStatus'] = esc_html( get_post_meta( $data['id'], 'ccf_form_post_creation_status', true ) );
|
956 |
$data['pauseMessage'] = esc_html( get_post_meta( $data['id'], 'ccf_form_pause_message', true ) );
|
957 |
+
$data['theme'] = esc_html( get_post_meta( $data['id'], 'ccf_form_theme', true ) );
|
958 |
|
959 |
// @Todo: escaping
|
960 |
$notifications = get_post_meta( $data['id'], 'ccf_form_notifications', true );
|
classes/class-ccf-field-renderer.php
CHANGED
@@ -41,15 +41,15 @@ class CCF_Field_Renderer {
|
|
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; ?>
|
@@ -108,15 +108,15 @@ class CCF_Field_Renderer {
|
|
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 ); } ?>" accept="<?php echo esc_attr( preg_replace( '/([^,\s]+)/', '.$1', $file_extensions ) ); ?>">
|
118 |
|
119 |
-
<div class="field-description">
|
120 |
<?php if ( ! empty( $file_extensions ) ) : ?>
|
121 |
<?php echo sprintf( esc_html__( 'Allowed file extensions are %s. ', 'custom-contact-forms' ), implode( ', ', explode( ',', str_replace( ' ', '', $file_extensions ) ) ) ); ?>
|
122 |
<?php endif; ?>
|
@@ -155,15 +155,15 @@ class CCF_Field_Renderer {
|
|
155 |
ob_start();
|
156 |
?>
|
157 |
|
158 |
-
<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 ); ?> recaptcha field-<?php echo (int) $field_id; ?> <?php echo esc_attr( $class_name ); ?> <?php if ( ! empty( $required ) ) : ?>field-required<?php endif; ?>">
|
159 |
-
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>">
|
160 |
<span class="required">*</span>
|
161 |
<?php echo esc_html( $label ); ?>
|
162 |
</label>
|
163 |
<div class="ccf-recaptcha-wrapper" data-form-id="<?php echo (int) $form_id; ?>" data-sitekey="<?php echo esc_attr( $site_key ); ?>"></div>
|
164 |
|
165 |
<?php if ( ! empty( $description ) ) : ?>
|
166 |
-
<div class="field-description">
|
167 |
<?php echo esc_html( $description ); ?>
|
168 |
</div>
|
169 |
<?php endif; ?>
|
@@ -194,7 +194,7 @@ class CCF_Field_Renderer {
|
|
194 |
ob_start();
|
195 |
?>
|
196 |
|
197 |
-
<div class="field skip-field <?php echo esc_attr( $slug ); ?> section-header field-<?php echo (int) $field_id; ?> <?php echo esc_attr( $class_name ); ?>">
|
198 |
<div class="heading">
|
199 |
<?php echo esc_html( $heading ); ?>
|
200 |
</div>
|
@@ -223,7 +223,7 @@ class CCF_Field_Renderer {
|
|
223 |
ob_start();
|
224 |
?>
|
225 |
|
226 |
-
<div class="field skip-field <?php echo esc_attr( $slug ); ?> html field-<?php echo (int) $field_id; ?> <?php echo esc_attr( $class_name ); ?>">
|
227 |
<?php echo wp_kses_post( $html ); ?>
|
228 |
</div>
|
229 |
|
@@ -292,12 +292,12 @@ class CCF_Field_Renderer {
|
|
292 |
ob_start();
|
293 |
?>
|
294 |
|
295 |
-
<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; ?>">
|
296 |
-
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>">
|
297 |
<?php if ( ! empty( $required ) ) : ?><span class="required">*</span><?php endif; ?>
|
298 |
<?php echo esc_html( $label ); ?>
|
299 |
</label>
|
300 |
-
<select class="<?php if ( ! empty( $errors ) ) : ?>field-error-input<?php endif; ?> field-input" <?php if ( ! empty( $required ) ) : ?>required aria-required="true"<?php endif; ?> <?php if ( $selected > 1 ) : ?>multiple<?php endif; ?> name="ccf_field_<?php echo esc_attr( $slug ); ?>" id="ccf_field_<?php echo esc_attr( $slug ); ?>">
|
301 |
<?php foreach ( $choices as $choice ) :
|
302 |
$selected = '';
|
303 |
if ( ! empty( $post_value ) ) {
|
@@ -315,7 +315,7 @@ class CCF_Field_Renderer {
|
|
315 |
</select>
|
316 |
|
317 |
<?php if ( ! empty( $description ) ) : ?>
|
318 |
-
<div class="field-description">
|
319 |
<?php echo esc_html( $description ); ?>
|
320 |
</div>
|
321 |
<?php endif; ?>
|
@@ -373,8 +373,8 @@ class CCF_Field_Renderer {
|
|
373 |
ob_start();
|
374 |
?>
|
375 |
|
376 |
-
<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; ?>">
|
377 |
-
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>">
|
378 |
<?php if ( ! empty( $required ) ) : ?><span class="required">*</span><?php endif; ?>
|
379 |
<?php echo esc_html( $label ); ?>
|
380 |
</label>
|
@@ -390,13 +390,13 @@ class CCF_Field_Renderer {
|
|
390 |
}
|
391 |
}
|
392 |
?>
|
393 |
-
<div class="choice">
|
394 |
-
<input class="field-input" name="ccf_field_<?php echo esc_attr( $slug ); ?>[]" type="checkbox" <?php echo $checked; ?> value="<?php echo esc_attr( $choice['value'] ); ?>"> <span><?php echo esc_html( $choice['label'] ); ?></span>
|
395 |
</div>
|
396 |
<?php endforeach; ?>
|
397 |
|
398 |
<?php if ( ! empty( $description ) ) : ?>
|
399 |
-
<div class="field-description">
|
400 |
<?php echo esc_html( $description ); ?>
|
401 |
</div>
|
402 |
<?php endif; ?>
|
@@ -454,8 +454,8 @@ class CCF_Field_Renderer {
|
|
454 |
ob_start();
|
455 |
?>
|
456 |
|
457 |
-
<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 ); ?>
|
458 |
-
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>">
|
459 |
<?php if ( ! empty( $required ) ) : ?><span class="required">*</span><?php endif; ?>
|
460 |
<?php echo esc_html( $label ); ?>
|
461 |
</label>
|
@@ -471,13 +471,13 @@ class CCF_Field_Renderer {
|
|
471 |
}
|
472 |
}
|
473 |
?>
|
474 |
-
<div class="choice">
|
475 |
-
<input class="field-input" name="ccf_field_<?php echo esc_attr( $slug ); ?>" type="radio" <?php echo $checked; ?> value="<?php echo esc_attr( $choice['value'] ); ?>"> <span><?php echo esc_html( $choice['label'] ); ?></span>
|
476 |
</div>
|
477 |
<?php endforeach; ?>
|
478 |
|
479 |
<?php if ( ! empty( $description ) ) : ?>
|
480 |
-
<div class="field-description">
|
481 |
<?php echo esc_html( $description ); ?>
|
482 |
</div>
|
483 |
<?php endif; ?>
|
@@ -542,28 +542,28 @@ class CCF_Field_Renderer {
|
|
542 |
ob_start();
|
543 |
?>
|
544 |
|
545 |
-
<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; ?>">
|
546 |
-
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>">
|
547 |
<?php if ( ! empty( $required ) ) : ?><span class="required">*</span><?php endif; ?>
|
548 |
<?php echo esc_html( $label ); ?>
|
549 |
</label>
|
550 |
<div class="full">
|
551 |
-
<input value="<?php if ( ! empty( $street_post_value ) ) echo esc_attr( $street_post_value ); ?>" class="<?php if ( ! empty( $errors['street_required'] ) ) : ?>field-error-input<?php endif; ?> field-input" <?php if ( ! empty( $required ) ) : ?>required aria-required="true"<?php endif; ?> id="ccf_field_<?php echo esc_attr( $slug ); ?>-street" type="text" name="ccf_field_<?php echo esc_attr( $slug ); ?>[street]">
|
552 |
<?php if ( ! empty( $errors['street_required'] ) ) : ?>
|
553 |
<div class="error"><?php echo esc_html( $errors['street_required'] ); ?></div>
|
554 |
<?php endif; ?>
|
555 |
-
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>-street" class="sub-label"><?php esc_html_e( 'Street Address', 'custom-contact-forms' ); ?></label>
|
556 |
</div>
|
557 |
<div class="full">
|
558 |
-
<input value="<?php if ( ! empty( $line_two_post_value ) ) echo esc_attr( $line_two_post_value ); ?>" class="
|
559 |
-
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>-line_two" class="sub-label"><?php esc_html_e( 'Address Line 2', 'custom-contact-forms' ); ?></label>
|
560 |
</div>
|
561 |
<div class="left">
|
562 |
-
<input value="<?php if ( ! empty( $city_post_value ) ) echo esc_attr( $city_post_value ); ?>" class="<?php if ( ! empty( $errors['city_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 ); ?>[city]" id="ccf_field_<?php echo esc_attr( $slug ); ?>-city">
|
563 |
<?php if ( ! empty( $errors['city_required'] ) ) : ?>
|
564 |
<div class="error"><?php echo esc_html( $errors['city_required'] ); ?></div>
|
565 |
<?php endif; ?>
|
566 |
-
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>-city" class="sub-label"><?php esc_html_e( 'City', 'custom-contact-forms' ); ?></label>
|
567 |
|
568 |
</div>
|
569 |
<?php if ( $address_type === 'us' ) { ?>
|
@@ -576,33 +576,33 @@ class CCF_Field_Renderer {
|
|
576 |
<?php if ( ! empty( $errors['state_required'] ) ) : ?>
|
577 |
<div class="error"><?php echo esc_html( $errors['state_required'] ); ?></div>
|
578 |
<?php endif; ?>
|
579 |
-
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>-state" class="sub-label"><?php esc_html_e( 'State', 'custom-contact-forms' ); ?></label>
|
580 |
|
581 |
</div>
|
582 |
<div class="left">
|
583 |
-
<input value="<?php if ( ! empty( $zipcode_post_value ) ) echo esc_attr( $zipcode_post_value ); ?>" class="<?php if ( ! empty( $errors['zipcode_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 ); ?>[zipcode]" id="ccf_field_<?php echo esc_attr( $slug ); ?>-zipcode">
|
584 |
<?php if ( ! empty( $errors['zipcode_required'] ) ) : ?>
|
585 |
<div class="error"><?php echo esc_html( $errors['zipcode_required'] ); ?></div>
|
586 |
<?php endif; ?>
|
587 |
-
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>-zipcode" class="sub-label"><?php esc_html_e( 'ZIP Code', 'custom-contact-forms' ); ?></label>
|
588 |
|
589 |
</div>
|
590 |
<div class="ccf-clear"></div>
|
591 |
<?php } else if ( $address_type === 'international' ) { ?>
|
592 |
<div class="right">
|
593 |
-
<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">
|
594 |
<?php if ( ! empty( $errors['state_required'] ) ) : ?>
|
595 |
<div class="error"><?php echo esc_html( $errors['state_required'] ); ?></div>
|
596 |
<?php endif; ?>
|
597 |
-
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>-state" class="sub-label"><?php esc_html_e( 'State / Region / Province', 'custom-contact-forms' ); ?></label>
|
598 |
|
599 |
</div>
|
600 |
<div class="left">
|
601 |
-
<input value="<?php if ( ! empty( $zipcode_post_value ) ) echo esc_attr( $zipcode_post_value ); ?>" class="<?php if ( ! empty( $errors['zipcode_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 ); ?>[zipcode]" id="ccf_field_<?php echo esc_attr( $slug ); ?>-zipcode">
|
602 |
<?php if ( ! empty( $errors['zipcode_required'] ) ) : ?>
|
603 |
<div class="error"><?php echo esc_html( $errors['zipcode_required'] ); ?></div>
|
604 |
<?php endif; ?>
|
605 |
-
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>-zipcode" class="sub-label"><?php esc_html_e( 'ZIP / Postal Code', 'custom-contact-forms' ); ?></label>
|
606 |
|
607 |
</div>
|
608 |
<div class="right">
|
@@ -614,14 +614,14 @@ class CCF_Field_Renderer {
|
|
614 |
<?php if ( ! empty( $errors['country_required'] ) ) : ?>
|
615 |
<div class="error"><?php echo esc_html( $errors['country_required'] ); ?></div>
|
616 |
<?php endif; ?>
|
617 |
-
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>-country" class="sub-label"><?php esc_html_e( 'Country', 'custom-contact-forms' ); ?></label>
|
618 |
|
619 |
</div>
|
620 |
<div class="ccf-clear"></div>
|
621 |
<?php } ?>
|
622 |
|
623 |
<?php if ( ! empty( $description ) ) : ?>
|
624 |
-
<div class="field-description">
|
625 |
<?php echo esc_html( $description ); ?>
|
626 |
</div>
|
627 |
<?php endif; ?>
|
@@ -664,15 +664,15 @@ class CCF_Field_Renderer {
|
|
664 |
ob_start();
|
665 |
?>
|
666 |
|
667 |
-
<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; ?>">
|
668 |
-
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>">
|
669 |
<?php if ( ! empty( $required ) ) : ?><span class="required">*</span><?php endif; ?>
|
670 |
<?php echo esc_html( $label ); ?>
|
671 |
</label>
|
672 |
-
<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 ); } ?>">
|
673 |
|
674 |
<?php if ( ! empty( $description ) ) : ?>
|
675 |
-
<div class="field-description">
|
676 |
<?php echo esc_html( $description ); ?>
|
677 |
</div>
|
678 |
<?php endif; ?>
|
@@ -720,15 +720,15 @@ class CCF_Field_Renderer {
|
|
720 |
ob_start();
|
721 |
?>
|
722 |
|
723 |
-
<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; ?>">
|
724 |
-
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>">
|
725 |
<?php if ( ! empty( $required ) ) : ?><span class="required">*</span><?php endif; ?>
|
726 |
<?php echo esc_html( $label ); ?>
|
727 |
</label>
|
728 |
-
<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 ); } ?>">
|
729 |
|
730 |
<?php if ( ! empty( $description ) ) : ?>
|
731 |
-
<div class="field-description">
|
732 |
<?php echo esc_html( $description ); ?>
|
733 |
</div>
|
734 |
<?php endif; ?>
|
@@ -783,30 +783,30 @@ class CCF_Field_Renderer {
|
|
783 |
ob_start();
|
784 |
?>
|
785 |
|
786 |
-
<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; ?>">
|
787 |
-
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>">
|
788 |
<?php if ( ! empty( $required ) ) : ?><span class="required">*</span><?php endif; ?>
|
789 |
<?php echo esc_html( $label ); ?>
|
790 |
</label>
|
791 |
<?php if ( empty( $email_confirmation ) ) { ?>
|
792 |
-
<input 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 if ( ! empty( $placeholder ) ) { ?><?php echo esc_attr( $placeholder ) ?><?php } else { ?><?php esc_html_e( 'email@example.com', 'custom-contact-forms' ); ?><?php } ?>" type="text" value="<?php if ( ! empty( $email_post_value ) ) { echo esc_attr( $email_post_value ); } else { echo esc_attr( $value ); } ?>">
|
793 |
<?php if ( ! empty( $errors ) ) : foreach ( $errors as $error ) : ?>
|
794 |
<div class="error"><?php echo esc_html( $error ); ?></div>
|
795 |
<?php endforeach; endif; ?>
|
796 |
<?php } else { ?>
|
797 |
<div class="left">
|
798 |
-
<input class="field-input <?php if ( ! empty( $errors['email_required'] ) || ! empty( $errors['match'] ) || ! empty( $errors['email'] ) ) : ?>field-error-input<?php endif; ?>" <?php if ( ! empty( $required ) ) : ?>required aria-required="true"<?php endif; ?> name="ccf_field_<?php echo esc_attr( $slug ); ?>[email]" id="ccf_field_<?php echo esc_attr( $slug ); ?>" value="<?php if ( ! empty( $email_post_value ) ) { echo esc_attr( $email_post_value ); }?>" type="text">
|
799 |
<?php if ( ! empty( $errors['email_required'] ) ) : ?>
|
800 |
<div class="error"><?php echo esc_html( $errors['email_required'] ); ?></div>
|
801 |
<?php endif; ?>
|
802 |
-
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>" class="sub-label"><?php esc_html_e( 'Email', 'custom-contact-forms' ); ?></label>
|
803 |
</div>
|
804 |
<div class="right">
|
805 |
-
<input class="field-input <?php if ( ! empty( $errors['confirm_required'] ) || ! empty( $errors['match'] ) || ! empty( $errors['email'] ) ) : ?>field-error-input<?php endif; ?>" <?php if ( ! empty( $required ) ) : ?>required aria-required="true"<?php endif; ?> name="ccf_field_<?php echo esc_attr( $slug ); ?>[confirm]" id="ccf_field_<?php echo esc_attr( $slug ); ?>-confirm" value="<?php if ( ! empty( $confirm_post_value ) ) { echo esc_attr( $confirm_post_value ); } ?>" type="text">
|
806 |
<?php if ( ! empty( $errors['confirm_required'] ) ) : ?>
|
807 |
<div class="error"><?php echo esc_html( $errors['confirm_required'] ); ?></div>
|
808 |
<?php endif; ?>
|
809 |
-
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>-confirm" class="sub-label"><?php esc_html_e( 'Confirm Email', 'custom-contact-forms' ); ?></label>
|
810 |
</div>
|
811 |
<?php if ( ! empty( $errors['match'] ) ) : ?>
|
812 |
<div class="error"><?php echo esc_html( $errors['match'] ); ?></div>
|
@@ -818,7 +818,7 @@ class CCF_Field_Renderer {
|
|
818 |
<?php } ?>
|
819 |
|
820 |
<?php if ( ! empty( $description ) ) : ?>
|
821 |
-
<div class="field-description">
|
822 |
<?php echo esc_html( $description ); ?>
|
823 |
</div>
|
824 |
<?php endif; ?>
|
@@ -862,30 +862,30 @@ class CCF_Field_Renderer {
|
|
862 |
ob_start();
|
863 |
?>
|
864 |
|
865 |
-
<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; ?>">
|
866 |
-
<label>
|
867 |
<?php if ( ! empty( $required ) ) : ?><span class="required">*</span><?php endif; ?>
|
868 |
<?php echo esc_html( $label ); ?>
|
869 |
</label>
|
870 |
<div class="left">
|
871 |
-
<input value="<?php if ( ! empty( $first_post_value ) ) echo esc_attr( $first_post_value ); ?>" class="<?php if ( ! empty( $errors['first_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 ); ?>[first]" id="ccf_field_<?php echo esc_attr( $slug ); ?>-first">
|
872 |
<?php if ( ! empty( $errors['first_required'] ) ) : ?>
|
873 |
<div class="error"><?php echo esc_html( $errors['first_required'] ); ?></div>
|
874 |
<?php endif; ?>
|
875 |
-
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>-first" class="sub-label"><?php esc_html_e( 'First', 'custom-contact-forms' ); ?></label>
|
876 |
</div>
|
877 |
<div class="right">
|
878 |
-
<input value="<?php if ( ! empty( $last_post_value ) ) echo esc_attr( $last_post_value ); ?>" class="<?php if ( ! empty( $errors['last_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 ); ?>[last]" id="ccf_field_<?php echo esc_attr( $slug ); ?>-last">
|
879 |
<?php if ( ! empty( $errors['last_required'] ) ) : ?>
|
880 |
<div class="error"><?php echo esc_html( $errors['last_required'] ); ?></div>
|
881 |
<?php endif; ?>
|
882 |
-
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>-last" class="sub-label"><?php esc_html_e( 'Last', 'custom-contact-forms' ); ?></label>
|
883 |
</div>
|
884 |
|
885 |
<div class="ccf-clear"></div>
|
886 |
|
887 |
<?php if ( ! empty( $description ) ) : ?>
|
888 |
-
<div class="field-description">
|
889 |
<?php echo esc_html( $description ); ?>
|
890 |
</div>
|
891 |
<?php endif; ?>
|
@@ -942,21 +942,21 @@ class CCF_Field_Renderer {
|
|
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 ); ?>
|
949 |
</label>
|
950 |
<?php if ( ! empty( $show_date ) && empty( $show_time ) ) { ?>
|
951 |
-
<input data-date-format="<?php echo esc_attr( $date_format ); ?>" <?php if ( ! empty( $required ) ) : ?>required aria-required="true"<?php endif; ?> name="ccf_field_<?php echo esc_attr( $slug ); ?>[date]" value="<?php if ( ! empty( $date_post_value ) ) { echo esc_attr( $date_post_value ); } else { echo esc_attr( $value ); } ?>" class="<?php if ( ! empty( $errors ) ) : ?>field-error-input<?php endif; ?> ccf-datepicker field-input" id="ccf_field_<?php echo esc_attr( $slug ); ?>" type="text">
|
952 |
<?php } else if ( empty( $show_date ) && ! empty( $show_time ) ) { ?>
|
953 |
<div class="hour">
|
954 |
-
<input maxlength="2" class="<?php if ( ! empty( $errors['hour_required'] ) ) : ?>field-error-input<?php endif; ?> field-input" <?php if ( ! empty( $required ) ) : ?>required aria-required="true"<?php endif; ?> name="ccf_field_<?php echo esc_attr( $slug ); ?>[hour]" value="<?php if ( ! empty( $hour_post_value ) ) { echo esc_attr( $hour_post_value ); } ?>" id="ccf_field_<?php echo esc_attr( $slug ); ?>-hour" type="text">
|
955 |
-
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>-hour" class="sub-label"><?php esc_html_e( 'HH', 'custom-contact-forms' ); ?></label>
|
956 |
</div>
|
957 |
<div class="minute">
|
958 |
-
<input maxlength="2" class="<?php if ( ! empty( $errors['minutes_required'] ) ) : ?>field-error-input<?php endif; ?> field-input" <?php if ( ! empty( $required ) ) : ?>required aria-required="true"<?php endif; ?> name="ccf_field_<?php echo esc_attr( $slug ); ?>[minute]" value="<?php if ( ! empty( $minute_post_value ) ) { echo esc_attr( $minute_post_value ); } ?>" id="ccf_field_<?php echo esc_attr( $slug ); ?>-minute" type="text">
|
959 |
-
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>-minute" class="sub-label"><?php esc_html_e( 'MM', 'custom-contact-forms' ); ?></label>
|
960 |
</div>
|
961 |
<div class="am-pm">
|
962 |
<select class="<?php if ( ! empty( $errors['am-pm_required'] ) ) : ?>field-error-input<?php endif; ?> field-input" <?php if ( ! empty( $required ) ) : ?>required aria-required="true"<?php endif; ?> name="ccf_field_<?php echo esc_attr( $slug ); ?>[am-pm]" id="ccf_field_<?php echo esc_attr( $slug ); ?>-am-pm">
|
@@ -967,17 +967,17 @@ class CCF_Field_Renderer {
|
|
967 |
<div class="ccf-clear"></div>
|
968 |
<?php } else { ?>
|
969 |
<div class="left">
|
970 |
-
<input data-date-format="<?php echo esc_attr( $date_format ); ?>" value="<?php if ( ! empty( $date_post_value ) ) { echo esc_attr( $date_post_value ); } ?>" <?php if ( ! empty( $required ) ) : ?>required aria-required="true"<?php endif; ?> name="ccf_field_<?php echo esc_attr( $slug ); ?>[date]" class="<?php if ( ! empty( $errors['date_required'] ) ) : ?>field-error-input<?php endif; ?> ccf-datepicker field-input" id="ccf_field_<?php echo esc_attr( $slug ); ?>-date" type="text">
|
971 |
-
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>-date" class="sub-label"><?php esc_html_e( 'Date', 'custom-contact-forms' ); ?></label>
|
972 |
</div>
|
973 |
<div class="right">
|
974 |
<div class="hour">
|
975 |
-
<input class="<?php if ( ! empty( $errors['hour_required'] ) ) : ?>field-error-input<?php endif; ?> field-input" <?php if ( ! empty( $required ) ) : ?>required aria-required="true"<?php endif; ?> maxlength="2" name="ccf_field_<?php echo esc_attr( $slug ); ?>[hour]" value="<?php if ( ! empty( $hour_post_value ) ) { echo esc_attr( $hour_post_value ); } ?>" id="ccf_field_<?php echo esc_attr( $slug ); ?>-hour" type="text">
|
976 |
-
<label class="sub-label" for="ccf_field_<?php echo esc_attr( $slug ); ?>-hour"><?php esc_html_e( 'HH', 'custom-contact-forms' ); ?></label>
|
977 |
</div>
|
978 |
<div class="minute">
|
979 |
-
<input class="<?php if ( ! empty( $errors['minutes_required'] ) ) : ?>field-error-input<?php endif; ?> field-input" <?php if ( ! empty( $required ) ) : ?>required aria-required="true"<?php endif; ?> maxlength="2" name="ccf_field_<?php echo esc_attr( $slug ); ?>[minute]" value="<?php if ( ! empty( $minute_post_value ) ) { echo esc_attr( $minute_post_value ); } ?>" id="ccf_field_<?php echo esc_attr( $slug ); ?>-minute" type="text">
|
980 |
-
<label class="sub-label" for="ccf_field_<?php echo esc_attr( $slug ); ?>-minute"><?php esc_html_e( 'MM', 'custom-contact-forms' ); ?></label>
|
981 |
</div>
|
982 |
<div class="am-pm">
|
983 |
<select class="<?php if ( ! empty( $errors['am-pm_required'] ) ) : ?>field-error-input<?php endif; ?> field-input" <?php if ( ! empty( $required ) ) : ?>required aria-required="true"<?php endif; ?> name="ccf_field_<?php echo esc_attr( $slug ); ?>[am-pm]" id="ccf_field_<?php echo esc_attr( $slug ); ?>-am-pm">
|
@@ -990,7 +990,7 @@ class CCF_Field_Renderer {
|
|
990 |
<?php } ?>
|
991 |
|
992 |
<?php if ( ! empty( $description ) ) : ?>
|
993 |
-
<div class="field-description">
|
994 |
<?php echo esc_html( $description ); ?>
|
995 |
</div>
|
996 |
<?php endif; ?>
|
@@ -1036,15 +1036,15 @@ class CCF_Field_Renderer {
|
|
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; ?>
|
41 |
ob_start();
|
42 |
?>
|
43 |
|
44 |
+
<div data-field-type="single-line-text" data-field-slug="<?php echo esc_attr( $slug ); ?>" class="form-group <?php if ( ! empty( $errors ) ) : ?>field-error has-error<?php endif; ?> field <?php echo esc_attr( $slug ); ?> field-type-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 class="main-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="form-control <?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 help-block text-muted">
|
53 |
<?php echo esc_html( $description ); ?>
|
54 |
</div>
|
55 |
<?php endif; ?>
|
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="form-group <?php if ( ! empty( $errors ) ) : ?>field-error has-error<?php endif; ?> field <?php echo esc_attr( $slug ); ?> field-type-file field-<?php echo (int) $field_id; ?> <?php echo esc_attr( $class_name ); ?> <?php if ( ! empty( $required ) ) : ?>field-required<?php endif; ?>">
|
112 |
+
<label class="main-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="form-control <?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 ); } ?>" accept="<?php echo esc_attr( preg_replace( '/([^,\s]+)/', '.$1', $file_extensions ) ); ?>">
|
118 |
|
119 |
+
<div class="field-description help-block text-muted">
|
120 |
<?php if ( ! empty( $file_extensions ) ) : ?>
|
121 |
<?php echo sprintf( esc_html__( 'Allowed file extensions are %s. ', 'custom-contact-forms' ), implode( ', ', explode( ',', str_replace( ' ', '', $file_extensions ) ) ) ); ?>
|
122 |
<?php endif; ?>
|
155 |
ob_start();
|
156 |
?>
|
157 |
|
158 |
+
<div data-field-type="recaptcha" data-field-slug="<?php echo esc_attr( $slug ); ?>" class="form-group <?php if ( ! empty( $errors ) ) : ?>field-error has-error<?php endif; ?> field <?php echo esc_attr( $slug ); ?> field-type-recaptcha field-<?php echo (int) $field_id; ?> <?php echo esc_attr( $class_name ); ?> <?php if ( ! empty( $required ) ) : ?>field-required<?php endif; ?>">
|
159 |
+
<label class="main-label" for="ccf_field_<?php echo esc_attr( $slug ); ?>">
|
160 |
<span class="required">*</span>
|
161 |
<?php echo esc_html( $label ); ?>
|
162 |
</label>
|
163 |
<div class="ccf-recaptcha-wrapper" data-form-id="<?php echo (int) $form_id; ?>" data-sitekey="<?php echo esc_attr( $site_key ); ?>"></div>
|
164 |
|
165 |
<?php if ( ! empty( $description ) ) : ?>
|
166 |
+
<div class="field-description help-block text-muted">
|
167 |
<?php echo esc_html( $description ); ?>
|
168 |
</div>
|
169 |
<?php endif; ?>
|
194 |
ob_start();
|
195 |
?>
|
196 |
|
197 |
+
<div class="field skip-field <?php echo esc_attr( $slug ); ?> field-type-section-header field-<?php echo (int) $field_id; ?> <?php echo esc_attr( $class_name ); ?>">
|
198 |
<div class="heading">
|
199 |
<?php echo esc_html( $heading ); ?>
|
200 |
</div>
|
223 |
ob_start();
|
224 |
?>
|
225 |
|
226 |
+
<div class="field skip-field <?php echo esc_attr( $slug ); ?> field-type-html field-<?php echo (int) $field_id; ?> <?php echo esc_attr( $class_name ); ?>">
|
227 |
<?php echo wp_kses_post( $html ); ?>
|
228 |
</div>
|
229 |
|
292 |
ob_start();
|
293 |
?>
|
294 |
|
295 |
+
<div data-field-type="dropdown" data-field-slug="<?php echo esc_attr( $slug ); ?>" class="form-group <?php if ( ! empty( $errors ) ) : ?>field-error has-error<?php endif; ?> field <?php echo esc_attr( $slug ); ?> field-type-dropdown field-<?php echo (int) $field_id; ?> <?php echo esc_attr( $class_name ); ?> <?php if ( ! empty( $required ) ) : ?>field-required<?php endif; ?>">
|
296 |
+
<label class="main-label" for="ccf_field_<?php echo esc_attr( $slug ); ?>">
|
297 |
<?php if ( ! empty( $required ) ) : ?><span class="required">*</span><?php endif; ?>
|
298 |
<?php echo esc_html( $label ); ?>
|
299 |
</label>
|
300 |
+
<select class="form-control <?php if ( ! empty( $errors ) ) : ?>field-error-input<?php endif; ?> field-input" <?php if ( ! empty( $required ) ) : ?>required aria-required="true"<?php endif; ?> <?php if ( $selected > 1 ) : ?>multiple<?php endif; ?> name="ccf_field_<?php echo esc_attr( $slug ); ?>" id="ccf_field_<?php echo esc_attr( $slug ); ?>">
|
301 |
<?php foreach ( $choices as $choice ) :
|
302 |
$selected = '';
|
303 |
if ( ! empty( $post_value ) ) {
|
315 |
</select>
|
316 |
|
317 |
<?php if ( ! empty( $description ) ) : ?>
|
318 |
+
<div class="field-description help-block text-muted">
|
319 |
<?php echo esc_html( $description ); ?>
|
320 |
</div>
|
321 |
<?php endif; ?>
|
373 |
ob_start();
|
374 |
?>
|
375 |
|
376 |
+
<div data-field-type="checkboxes" data-field-slug="<?php echo esc_attr( $slug ); ?>" class="form-group <?php if ( ! empty( $errors ) ) : ?>field-error has-error<?php endif; ?> field <?php echo esc_attr( $slug ); ?> field-type-checkboxes field-<?php echo (int) $field_id; ?> <?php echo esc_attr( $class_name ); ?> <?php if ( ! empty( $required ) ) : ?>field-required<?php endif; ?>">
|
377 |
+
<label class="main-label" for="ccf_field_<?php echo esc_attr( $slug ); ?>">
|
378 |
<?php if ( ! empty( $required ) ) : ?><span class="required">*</span><?php endif; ?>
|
379 |
<?php echo esc_html( $label ); ?>
|
380 |
</label>
|
390 |
}
|
391 |
}
|
392 |
?>
|
393 |
+
<div class="choice checkbox">
|
394 |
+
<label><input class="field-input" name="ccf_field_<?php echo esc_attr( $slug ); ?>[]" type="checkbox" <?php echo $checked; ?> value="<?php echo esc_attr( $choice['value'] ); ?>"> <span><?php echo esc_html( $choice['label'] ); ?></span></label>
|
395 |
</div>
|
396 |
<?php endforeach; ?>
|
397 |
|
398 |
<?php if ( ! empty( $description ) ) : ?>
|
399 |
+
<div class="field-description help-block text-muted">
|
400 |
<?php echo esc_html( $description ); ?>
|
401 |
</div>
|
402 |
<?php endif; ?>
|
454 |
ob_start();
|
455 |
?>
|
456 |
|
457 |
+
<div data-field-type="radio" data-field-slug="<?php echo esc_attr( $slug ); ?>" class="form-group <?php if ( ! empty( $errors ) ) : ?>field-error has-error<?php endif; ?> field field-type-radio <?php echo esc_attr( $slug ); ?> field-<?php echo (int) $field_id; ?> <?php echo esc_attr( $class_name ); ?> <?php if ( ! empty( $required ) ) : ?>field-required<?php endif; ?>">
|
458 |
+
<label class="main-label" for="ccf_field_<?php echo esc_attr( $slug ); ?>">
|
459 |
<?php if ( ! empty( $required ) ) : ?><span class="required">*</span><?php endif; ?>
|
460 |
<?php echo esc_html( $label ); ?>
|
461 |
</label>
|
471 |
}
|
472 |
}
|
473 |
?>
|
474 |
+
<div class="choice radio">
|
475 |
+
<label><input class="field-input" name="ccf_field_<?php echo esc_attr( $slug ); ?>" type="radio" <?php echo $checked; ?> value="<?php echo esc_attr( $choice['value'] ); ?>"> <span><?php echo esc_html( $choice['label'] ); ?></span></label>
|
476 |
</div>
|
477 |
<?php endforeach; ?>
|
478 |
|
479 |
<?php if ( ! empty( $description ) ) : ?>
|
480 |
+
<div class="field-description help-block text-muted">
|
481 |
<?php echo esc_html( $description ); ?>
|
482 |
</div>
|
483 |
<?php endif; ?>
|
542 |
ob_start();
|
543 |
?>
|
544 |
|
545 |
+
<div data-field-type="address" data-field-slug="<?php echo esc_attr( $slug ); ?>" class="form-group <?php if ( ! empty( $errors ) ) : ?>field-error has-error<?php endif; ?> field <?php echo esc_attr( $slug ); ?> field-type-address field-<?php echo (int) $field_id; ?> <?php echo esc_attr( $class_name ); ?> <?php if ( ! empty( $required ) ) : ?>field-required<?php endif; ?>">
|
546 |
+
<label class="main-label" for="ccf_field_<?php echo esc_attr( $slug ); ?>">
|
547 |
<?php if ( ! empty( $required ) ) : ?><span class="required">*</span><?php endif; ?>
|
548 |
<?php echo esc_html( $label ); ?>
|
549 |
</label>
|
550 |
<div class="full">
|
551 |
+
<input value="<?php if ( ! empty( $street_post_value ) ) echo esc_attr( $street_post_value ); ?>" class="form-control <?php if ( ! empty( $errors['street_required'] ) ) : ?>field-error-input<?php endif; ?> field-input" <?php if ( ! empty( $required ) ) : ?>required aria-required="true"<?php endif; ?> id="ccf_field_<?php echo esc_attr( $slug ); ?>-street" type="text" name="ccf_field_<?php echo esc_attr( $slug ); ?>[street]">
|
552 |
<?php if ( ! empty( $errors['street_required'] ) ) : ?>
|
553 |
<div class="error"><?php echo esc_html( $errors['street_required'] ); ?></div>
|
554 |
<?php endif; ?>
|
555 |
+
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>-street" class="sub-label help-block text-muted"><?php esc_html_e( 'Street Address', 'custom-contact-forms' ); ?></label>
|
556 |
</div>
|
557 |
<div class="full">
|
558 |
+
<input value="<?php if ( ! empty( $line_two_post_value ) ) echo esc_attr( $line_two_post_value ); ?>" class="form-control field-input" id="ccf_field_<?php echo esc_attr( $slug ); ?>-line_two" type="text" name="ccf_field_<?php echo esc_attr( $slug ); ?>[line_two]">
|
559 |
+
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>-line_two" class="sub-label help-block text-muted"><?php esc_html_e( 'Address Line 2', 'custom-contact-forms' ); ?></label>
|
560 |
</div>
|
561 |
<div class="left">
|
562 |
+
<input value="<?php if ( ! empty( $city_post_value ) ) echo esc_attr( $city_post_value ); ?>" class="form-control <?php if ( ! empty( $errors['city_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 ); ?>[city]" id="ccf_field_<?php echo esc_attr( $slug ); ?>-city">
|
563 |
<?php if ( ! empty( $errors['city_required'] ) ) : ?>
|
564 |
<div class="error"><?php echo esc_html( $errors['city_required'] ); ?></div>
|
565 |
<?php endif; ?>
|
566 |
+
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>-city" class="sub-label help-block text-muted"><?php esc_html_e( 'City', 'custom-contact-forms' ); ?></label>
|
567 |
|
568 |
</div>
|
569 |
<?php if ( $address_type === 'us' ) { ?>
|
576 |
<?php if ( ! empty( $errors['state_required'] ) ) : ?>
|
577 |
<div class="error"><?php echo esc_html( $errors['state_required'] ); ?></div>
|
578 |
<?php endif; ?>
|
579 |
+
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>-state" class="sub-label help-block text-muted"><?php esc_html_e( 'State', 'custom-contact-forms' ); ?></label>
|
580 |
|
581 |
</div>
|
582 |
<div class="left">
|
583 |
+
<input value="<?php if ( ! empty( $zipcode_post_value ) ) echo esc_attr( $zipcode_post_value ); ?>" class="form-control <?php if ( ! empty( $errors['zipcode_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 ); ?>[zipcode]" id="ccf_field_<?php echo esc_attr( $slug ); ?>-zipcode">
|
584 |
<?php if ( ! empty( $errors['zipcode_required'] ) ) : ?>
|
585 |
<div class="error"><?php echo esc_html( $errors['zipcode_required'] ); ?></div>
|
586 |
<?php endif; ?>
|
587 |
+
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>-zipcode" class="sub-label help-block text-muted"><?php esc_html_e( 'ZIP Code', 'custom-contact-forms' ); ?></label>
|
588 |
|
589 |
</div>
|
590 |
<div class="ccf-clear"></div>
|
591 |
<?php } else if ( $address_type === 'international' ) { ?>
|
592 |
<div class="right">
|
593 |
+
<input value="<?php if ( ! empty( $state_post_value ) ) echo esc_attr( $state_post_value ); ?>" class="form-control <?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">
|
594 |
<?php if ( ! empty( $errors['state_required'] ) ) : ?>
|
595 |
<div class="error"><?php echo esc_html( $errors['state_required'] ); ?></div>
|
596 |
<?php endif; ?>
|
597 |
+
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>-state" class="sub-label help-block text-muted"><?php esc_html_e( 'State / Region / Province', 'custom-contact-forms' ); ?></label>
|
598 |
|
599 |
</div>
|
600 |
<div class="left">
|
601 |
+
<input value="<?php if ( ! empty( $zipcode_post_value ) ) echo esc_attr( $zipcode_post_value ); ?>" class="form-control <?php if ( ! empty( $errors['zipcode_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 ); ?>[zipcode]" id="ccf_field_<?php echo esc_attr( $slug ); ?>-zipcode">
|
602 |
<?php if ( ! empty( $errors['zipcode_required'] ) ) : ?>
|
603 |
<div class="error"><?php echo esc_html( $errors['zipcode_required'] ); ?></div>
|
604 |
<?php endif; ?>
|
605 |
+
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>-zipcode" class="sub-label help-block text-muted"><?php esc_html_e( 'ZIP / Postal Code', 'custom-contact-forms' ); ?></label>
|
606 |
|
607 |
</div>
|
608 |
<div class="right">
|
614 |
<?php if ( ! empty( $errors['country_required'] ) ) : ?>
|
615 |
<div class="error"><?php echo esc_html( $errors['country_required'] ); ?></div>
|
616 |
<?php endif; ?>
|
617 |
+
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>-country" class="sub-label help-block text-muted"><?php esc_html_e( 'Country', 'custom-contact-forms' ); ?></label>
|
618 |
|
619 |
</div>
|
620 |
<div class="ccf-clear"></div>
|
621 |
<?php } ?>
|
622 |
|
623 |
<?php if ( ! empty( $description ) ) : ?>
|
624 |
+
<div class="field-description help-block text-muted">
|
625 |
<?php echo esc_html( $description ); ?>
|
626 |
</div>
|
627 |
<?php endif; ?>
|
664 |
ob_start();
|
665 |
?>
|
666 |
|
667 |
+
<div data-phone-format="<?php echo esc_attr( $phone_format ); ?>" data-field-slug="<?php echo esc_attr( $slug ); ?>" data-field-type="phone" class="form-group <?php if ( ! empty( $errors ) ) : ?>field-error has-error<?php endif; ?> field <?php echo esc_attr( $slug ); ?> field-type-phone field-<?php echo (int) $field_id; ?> <?php echo esc_attr( $class_name ); ?> <?php if ( ! empty( $required ) ) : ?>field-required<?php endif; ?>">
|
668 |
+
<label class="main-label" for="ccf_field_<?php echo esc_attr( $slug ); ?>">
|
669 |
<?php if ( ! empty( $required ) ) : ?><span class="required">*</span><?php endif; ?>
|
670 |
<?php echo esc_html( $label ); ?>
|
671 |
</label>
|
672 |
+
<input class="form-control <?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 ); } ?>">
|
673 |
|
674 |
<?php if ( ! empty( $description ) ) : ?>
|
675 |
+
<div class="field-description help-block text-muted">
|
676 |
<?php echo esc_html( $description ); ?>
|
677 |
</div>
|
678 |
<?php endif; ?>
|
720 |
ob_start();
|
721 |
?>
|
722 |
|
723 |
+
<div data-field-type="website" data-field-slug="<?php echo esc_attr( $slug ); ?>" class="form-group <?php if ( ! empty( $errors ) ) : ?>field-error has-error<?php endif; ?> field <?php echo esc_attr( $slug ); ?> field-type-website field-<?php echo (int) $field_id; ?> <?php echo esc_attr( $class_name ); ?> <?php if ( ! empty( $required ) ) : ?>field-required<?php endif; ?>">
|
724 |
+
<label class="main-label" for="ccf_field_<?php echo esc_attr( $slug ); ?>">
|
725 |
<?php if ( ! empty( $required ) ) : ?><span class="required">*</span><?php endif; ?>
|
726 |
<?php echo esc_html( $label ); ?>
|
727 |
</label>
|
728 |
+
<input class="form-control <?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 ); } ?>">
|
729 |
|
730 |
<?php if ( ! empty( $description ) ) : ?>
|
731 |
+
<div class="field-description help-block text-muted">
|
732 |
<?php echo esc_html( $description ); ?>
|
733 |
</div>
|
734 |
<?php endif; ?>
|
783 |
ob_start();
|
784 |
?>
|
785 |
|
786 |
+
<div data-field-type="email" data-field-slug="<?php echo esc_attr( $slug ); ?>" class="form-group <?php if ( ! empty( $errors ) ) : ?>field-error has-error<?php endif; ?> field <?php echo esc_attr( $slug ); ?> field-type-email field-<?php echo (int) $field_id; ?> <?php echo esc_attr( $class_name ); ?> <?php if ( ! empty( $required ) ) : ?>field-required<?php endif; ?>">
|
787 |
+
<label class="main-label" for="ccf_field_<?php echo esc_attr( $slug ); ?>">
|
788 |
<?php if ( ! empty( $required ) ) : ?><span class="required">*</span><?php endif; ?>
|
789 |
<?php echo esc_html( $label ); ?>
|
790 |
</label>
|
791 |
<?php if ( empty( $email_confirmation ) ) { ?>
|
792 |
+
<input class="form-control <?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 if ( ! empty( $placeholder ) ) { ?><?php echo esc_attr( $placeholder ) ?><?php } else { ?><?php esc_html_e( 'email@example.com', 'custom-contact-forms' ); ?><?php } ?>" type="text" value="<?php if ( ! empty( $email_post_value ) ) { echo esc_attr( $email_post_value ); } else { echo esc_attr( $value ); } ?>">
|
793 |
<?php if ( ! empty( $errors ) ) : foreach ( $errors as $error ) : ?>
|
794 |
<div class="error"><?php echo esc_html( $error ); ?></div>
|
795 |
<?php endforeach; endif; ?>
|
796 |
<?php } else { ?>
|
797 |
<div class="left">
|
798 |
+
<input class="form-control field-input <?php if ( ! empty( $errors['email_required'] ) || ! empty( $errors['match'] ) || ! empty( $errors['email'] ) ) : ?>field-error-input<?php endif; ?>" <?php if ( ! empty( $required ) ) : ?>required aria-required="true"<?php endif; ?> name="ccf_field_<?php echo esc_attr( $slug ); ?>[email]" id="ccf_field_<?php echo esc_attr( $slug ); ?>" value="<?php if ( ! empty( $email_post_value ) ) { echo esc_attr( $email_post_value ); }?>" type="text">
|
799 |
<?php if ( ! empty( $errors['email_required'] ) ) : ?>
|
800 |
<div class="error"><?php echo esc_html( $errors['email_required'] ); ?></div>
|
801 |
<?php endif; ?>
|
802 |
+
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>" class="sub-label help-block text-muted"><?php esc_html_e( 'Email', 'custom-contact-forms' ); ?></label>
|
803 |
</div>
|
804 |
<div class="right">
|
805 |
+
<input class="form-control field-input <?php if ( ! empty( $errors['confirm_required'] ) || ! empty( $errors['match'] ) || ! empty( $errors['email'] ) ) : ?>field-error-input<?php endif; ?>" <?php if ( ! empty( $required ) ) : ?>required aria-required="true"<?php endif; ?> name="ccf_field_<?php echo esc_attr( $slug ); ?>[confirm]" id="ccf_field_<?php echo esc_attr( $slug ); ?>-confirm" value="<?php if ( ! empty( $confirm_post_value ) ) { echo esc_attr( $confirm_post_value ); } ?>" type="text">
|
806 |
<?php if ( ! empty( $errors['confirm_required'] ) ) : ?>
|
807 |
<div class="error"><?php echo esc_html( $errors['confirm_required'] ); ?></div>
|
808 |
<?php endif; ?>
|
809 |
+
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>-confirm" class="sub-label help-block text-muted"><?php esc_html_e( 'Confirm Email', 'custom-contact-forms' ); ?></label>
|
810 |
</div>
|
811 |
<?php if ( ! empty( $errors['match'] ) ) : ?>
|
812 |
<div class="error"><?php echo esc_html( $errors['match'] ); ?></div>
|
818 |
<?php } ?>
|
819 |
|
820 |
<?php if ( ! empty( $description ) ) : ?>
|
821 |
+
<div class="field-description help-block text-muted">
|
822 |
<?php echo esc_html( $description ); ?>
|
823 |
</div>
|
824 |
<?php endif; ?>
|
862 |
ob_start();
|
863 |
?>
|
864 |
|
865 |
+
<div data-field-type="name" data-field-slug="<?php echo esc_attr( $slug ); ?>" class="form-group <?php if ( ! empty( $errors ) ) : ?>field-error has-error<?php endif; ?> field <?php echo esc_attr( $slug ); ?> field-type-name field-<?php echo (int) $field_id; ?> <?php echo esc_attr( $class_name ); ?> <?php if ( ! empty( $required ) ) : ?>field-required<?php endif; ?>">
|
866 |
+
<label class="main-label">
|
867 |
<?php if ( ! empty( $required ) ) : ?><span class="required">*</span><?php endif; ?>
|
868 |
<?php echo esc_html( $label ); ?>
|
869 |
</label>
|
870 |
<div class="left">
|
871 |
+
<input value="<?php if ( ! empty( $first_post_value ) ) echo esc_attr( $first_post_value ); ?>" class="form-control <?php if ( ! empty( $errors['first_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 ); ?>[first]" id="ccf_field_<?php echo esc_attr( $slug ); ?>-first">
|
872 |
<?php if ( ! empty( $errors['first_required'] ) ) : ?>
|
873 |
<div class="error"><?php echo esc_html( $errors['first_required'] ); ?></div>
|
874 |
<?php endif; ?>
|
875 |
+
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>-first" class="sub-label help-block text-muted"><?php esc_html_e( 'First', 'custom-contact-forms' ); ?></label>
|
876 |
</div>
|
877 |
<div class="right">
|
878 |
+
<input value="<?php if ( ! empty( $last_post_value ) ) echo esc_attr( $last_post_value ); ?>" class="form-control <?php if ( ! empty( $errors['last_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 ); ?>[last]" id="ccf_field_<?php echo esc_attr( $slug ); ?>-last">
|
879 |
<?php if ( ! empty( $errors['last_required'] ) ) : ?>
|
880 |
<div class="error"><?php echo esc_html( $errors['last_required'] ); ?></div>
|
881 |
<?php endif; ?>
|
882 |
+
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>-last" class="sub-label help-block text-muted"><?php esc_html_e( 'Last', 'custom-contact-forms' ); ?></label>
|
883 |
</div>
|
884 |
|
885 |
<div class="ccf-clear"></div>
|
886 |
|
887 |
<?php if ( ! empty( $description ) ) : ?>
|
888 |
+
<div class="field-description help-block text-muted">
|
889 |
<?php echo esc_html( $description ); ?>
|
890 |
</div>
|
891 |
<?php endif; ?>
|
942 |
ob_start();
|
943 |
?>
|
944 |
|
945 |
+
<div data-field-type="date" data-field-slug="<?php echo esc_attr( $slug ); ?>" class="form-group <?php if ( ! empty( $errors ) ) : ?>field-error has-error<?php endif; ?> field <?php echo esc_attr( $slug ); ?> field-type-date field-<?php echo (int) $field_id; ?> <?php echo esc_attr( $class_name ); ?> <?php if ( ! empty( $required ) ) : ?>field-required<?php endif; ?>">
|
946 |
+
<label class="main-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 ); ?>
|
949 |
</label>
|
950 |
<?php if ( ! empty( $show_date ) && empty( $show_time ) ) { ?>
|
951 |
+
<input data-date-format="<?php echo esc_attr( $date_format ); ?>" <?php if ( ! empty( $required ) ) : ?>required aria-required="true"<?php endif; ?> name="ccf_field_<?php echo esc_attr( $slug ); ?>[date]" value="<?php if ( ! empty( $date_post_value ) ) { echo esc_attr( $date_post_value ); } else { echo esc_attr( $value ); } ?>" class="form-control <?php if ( ! empty( $errors ) ) : ?>field-error-input<?php endif; ?> ccf-datepicker field-input" id="ccf_field_<?php echo esc_attr( $slug ); ?>" type="text">
|
952 |
<?php } else if ( empty( $show_date ) && ! empty( $show_time ) ) { ?>
|
953 |
<div class="hour">
|
954 |
+
<input maxlength="2" class="form-control <?php if ( ! empty( $errors['hour_required'] ) ) : ?>field-error-input<?php endif; ?> field-input" <?php if ( ! empty( $required ) ) : ?>required aria-required="true"<?php endif; ?> name="ccf_field_<?php echo esc_attr( $slug ); ?>[hour]" value="<?php if ( ! empty( $hour_post_value ) ) { echo esc_attr( $hour_post_value ); } ?>" id="ccf_field_<?php echo esc_attr( $slug ); ?>-hour" type="text">
|
955 |
+
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>-hour" class="sub-label help-block text-muted"><?php esc_html_e( 'HH', 'custom-contact-forms' ); ?></label>
|
956 |
</div>
|
957 |
<div class="minute">
|
958 |
+
<input maxlength="2" class="form-control <?php if ( ! empty( $errors['minutes_required'] ) ) : ?>field-error-input<?php endif; ?> field-input" <?php if ( ! empty( $required ) ) : ?>required aria-required="true"<?php endif; ?> name="ccf_field_<?php echo esc_attr( $slug ); ?>[minute]" value="<?php if ( ! empty( $minute_post_value ) ) { echo esc_attr( $minute_post_value ); } ?>" id="ccf_field_<?php echo esc_attr( $slug ); ?>-minute" type="text">
|
959 |
+
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>-minute" class="sub-label help-block text-muted"><?php esc_html_e( 'MM', 'custom-contact-forms' ); ?></label>
|
960 |
</div>
|
961 |
<div class="am-pm">
|
962 |
<select class="<?php if ( ! empty( $errors['am-pm_required'] ) ) : ?>field-error-input<?php endif; ?> field-input" <?php if ( ! empty( $required ) ) : ?>required aria-required="true"<?php endif; ?> name="ccf_field_<?php echo esc_attr( $slug ); ?>[am-pm]" id="ccf_field_<?php echo esc_attr( $slug ); ?>-am-pm">
|
967 |
<div class="ccf-clear"></div>
|
968 |
<?php } else { ?>
|
969 |
<div class="left">
|
970 |
+
<input data-date-format="<?php echo esc_attr( $date_format ); ?>" value="<?php if ( ! empty( $date_post_value ) ) { echo esc_attr( $date_post_value ); } ?>" <?php if ( ! empty( $required ) ) : ?>required aria-required="true"<?php endif; ?> name="ccf_field_<?php echo esc_attr( $slug ); ?>[date]" class="form-control <?php if ( ! empty( $errors['date_required'] ) ) : ?>field-error-input<?php endif; ?> ccf-datepicker field-input" id="ccf_field_<?php echo esc_attr( $slug ); ?>-date" type="text">
|
971 |
+
<label for="ccf_field_<?php echo esc_attr( $slug ); ?>-date" class="sub-label help-block text-muted"><?php esc_html_e( 'Date', 'custom-contact-forms' ); ?></label>
|
972 |
</div>
|
973 |
<div class="right">
|
974 |
<div class="hour">
|
975 |
+
<input class="form-control <?php if ( ! empty( $errors['hour_required'] ) ) : ?>field-error-input<?php endif; ?> field-input" <?php if ( ! empty( $required ) ) : ?>required aria-required="true"<?php endif; ?> maxlength="2" name="ccf_field_<?php echo esc_attr( $slug ); ?>[hour]" value="<?php if ( ! empty( $hour_post_value ) ) { echo esc_attr( $hour_post_value ); } ?>" id="ccf_field_<?php echo esc_attr( $slug ); ?>-hour" type="text">
|
976 |
+
<label class="sub-label help-block text-muted" for="ccf_field_<?php echo esc_attr( $slug ); ?>-hour"><?php esc_html_e( 'HH', 'custom-contact-forms' ); ?></label>
|
977 |
</div>
|
978 |
<div class="minute">
|
979 |
+
<input class="form-control <?php if ( ! empty( $errors['minutes_required'] ) ) : ?>field-error-input<?php endif; ?> field-input" <?php if ( ! empty( $required ) ) : ?>required aria-required="true"<?php endif; ?> maxlength="2" name="ccf_field_<?php echo esc_attr( $slug ); ?>[minute]" value="<?php if ( ! empty( $minute_post_value ) ) { echo esc_attr( $minute_post_value ); } ?>" id="ccf_field_<?php echo esc_attr( $slug ); ?>-minute" type="text">
|
980 |
+
<label class="sub-label help-block text-muted" for="ccf_field_<?php echo esc_attr( $slug ); ?>-minute"><?php esc_html_e( 'MM', 'custom-contact-forms' ); ?></label>
|
981 |
</div>
|
982 |
<div class="am-pm">
|
983 |
<select class="<?php if ( ! empty( $errors['am-pm_required'] ) ) : ?>field-error-input<?php endif; ?> field-input" <?php if ( ! empty( $required ) ) : ?>required aria-required="true"<?php endif; ?> name="ccf_field_<?php echo esc_attr( $slug ); ?>[am-pm]" id="ccf_field_<?php echo esc_attr( $slug ); ?>-am-pm">
|
990 |
<?php } ?>
|
991 |
|
992 |
<?php if ( ! empty( $description ) ) : ?>
|
993 |
+
<div class="field-description help-block text-muted">
|
994 |
<?php echo esc_html( $description ); ?>
|
995 |
</div>
|
996 |
<?php endif; ?>
|
1036 |
ob_start();
|
1037 |
?>
|
1038 |
|
1039 |
+
<div data-field-type="paragraph-text" data-field-slug="<?php echo esc_attr( $slug ); ?>" class="form-group <?php if ( ! empty( $errors ) ) : ?>field-error has-error<?php endif; ?> field <?php echo esc_attr( $slug ); ?> field-type-paragraph-text field-<?php echo (int) $field_id; ?> <?php echo esc_attr( $class_name ); ?> <?php if ( ! empty( $required ) ) : ?>field-required<?php endif; ?>">
|
1040 |
+
<label class="main-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="form-control <?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 help-block text-muted">
|
1048 |
<?php echo esc_html( $description ); ?>
|
1049 |
</div>
|
1050 |
<?php endif; ?>
|
classes/class-ccf-form-manager.php
CHANGED
@@ -220,7 +220,7 @@ class CCF_Form_Manager {
|
|
220 |
<input class="widefat form-email-notification-title" id="ccf_form_email_notification_title" name="email-notification-title" value="{{ notification.title }}">
|
221 |
</p>
|
222 |
|
223 |
-
<label for="ccf_form_email_notification_content"><?php esc_html_e( 'Email
|
224 |
<textarea id="ccf_form_email_notification_content" class="form-email-notification-content">{{ notification.content }}</textarea><br />
|
225 |
<p class="variables">
|
226 |
<strong><?php esc_html_e( 'Variables:', 'custom-contact-forms' ); ?></strong> [all_fields] [ip_address]
|
@@ -351,6 +351,18 @@ class CCF_Form_Manager {
|
|
351 |
<input class="widefat form-button-text" id="ccf_form_button_text" name="text" type="text" value="{{ form.buttonText }}">
|
352 |
</p>
|
353 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
354 |
<p>
|
355 |
<label for="ccf_form_completion_action_type"><?php esc_html_e( 'On form completion:', 'custom-contact-forms' ); ?></label>
|
356 |
|
220 |
<input class="widefat form-email-notification-title" id="ccf_form_email_notification_title" name="email-notification-title" value="{{ notification.title }}">
|
221 |
</p>
|
222 |
|
223 |
+
<label for="ccf_form_email_notification_content"><?php esc_html_e( 'Email Content (HTML):', 'custom-contact-forms' ); ?></label>
|
224 |
<textarea id="ccf_form_email_notification_content" class="form-email-notification-content">{{ notification.content }}</textarea><br />
|
225 |
<p class="variables">
|
226 |
<strong><?php esc_html_e( 'Variables:', 'custom-contact-forms' ); ?></strong> [all_fields] [ip_address]
|
351 |
<input class="widefat form-button-text" id="ccf_form_button_text" name="text" type="text" value="{{ form.buttonText }}">
|
352 |
</p>
|
353 |
|
354 |
+
<p>
|
355 |
+
<label for="ccf_form_theme"><?php esc_html_e( 'Form Theme:', 'custom-contact-forms' ); ?></label>
|
356 |
+
|
357 |
+
<select name="theme" class="form-theme" id="ccf_form_theme">
|
358 |
+
<option value=""><?php esc_html_e( 'None', 'custom-contact-forms' ); ?></option>
|
359 |
+
<option value="light" <# if ( 'light' === form.theme ) { #>selected<# } #>><?php esc_html_e( 'Light', 'custom-contact-forms' ); ?></option>
|
360 |
+
<option value="dark" <# if ( 'dark' === form.theme ) { #>selected<# } #>><?php esc_html_e( 'Dark', 'custom-contact-forms' ); ?></option>
|
361 |
+
</select>
|
362 |
+
|
363 |
+
<span class="explain"><?php esc_html_e( '"None" will have your form inherit styles from your theme.', 'custom-contact-forms' ); ?></span>
|
364 |
+
</p>
|
365 |
+
|
366 |
<p>
|
367 |
<label for="ccf_form_completion_action_type"><?php esc_html_e( 'On form completion:', 'custom-contact-forms' ); ?></label>
|
368 |
|
classes/class-ccf-form-renderer.php
CHANGED
@@ -208,10 +208,15 @@ class CCF_Form_Renderer {
|
|
208 |
|
209 |
$fields_html .= apply_filters( 'ccf_field_html', CCF_Field_Renderer::factory()->render_router( $type, $field_id, $form_id ), $type, $field_id );
|
210 |
}
|
|
|
|
|
|
|
|
|
|
|
211 |
?>
|
212 |
|
213 |
<div class="ccf-form-wrapper form-id-<?php echo (int) $form_id; ?>" data-form-id="<?php echo (int) $form_id; ?>">
|
214 |
-
<form <?php if ( $contains_file ) : ?>enctype="multipart/form-data"<?php endif; ?> class="ccf-form" method="post" action="" data-form-id="<?php echo (int) $form_id; ?>">
|
215 |
|
216 |
<?php $title = get_the_title( $form_id ); if ( ! empty( $title ) && apply_filters( 'ccf_show_form_title', true, $form_id ) ) : ?>
|
217 |
<div class="form-title">
|
@@ -228,7 +233,7 @@ class CCF_Form_Renderer {
|
|
228 |
<?php echo $fields_html; ?>
|
229 |
|
230 |
<div class="form-submit">
|
231 |
-
<input type="submit" class="ccf-submit-button" value="<?php echo esc_attr( get_post_meta( $form_id, 'ccf_form_buttonText', true ) ); ?>">
|
232 |
<img class="loading-img" src="<?php echo esc_url( site_url( '/wp-admin/images/wpspin_light.gif' ) ); ?>">
|
233 |
</div>
|
234 |
|
208 |
|
209 |
$fields_html .= apply_filters( 'ccf_field_html', CCF_Field_Renderer::factory()->render_router( $type, $field_id, $form_id ), $type, $field_id );
|
210 |
}
|
211 |
+
|
212 |
+
$theme = get_post_meta( $form_id, 'ccf_form_theme', true );
|
213 |
+
if ( empty( $theme ) ) {
|
214 |
+
$theme = 'default';
|
215 |
+
}
|
216 |
?>
|
217 |
|
218 |
<div class="ccf-form-wrapper form-id-<?php echo (int) $form_id; ?>" data-form-id="<?php echo (int) $form_id; ?>">
|
219 |
+
<form <?php if ( $contains_file ) : ?>enctype="multipart/form-data"<?php endif; ?> class="ccf-form ccf-theme-<?php echo esc_attr( $theme ); ?>" method="post" action="" data-form-id="<?php echo (int) $form_id; ?>">
|
220 |
|
221 |
<?php $title = get_the_title( $form_id ); if ( ! empty( $title ) && apply_filters( 'ccf_show_form_title', true, $form_id ) ) : ?>
|
222 |
<div class="form-title">
|
233 |
<?php echo $fields_html; ?>
|
234 |
|
235 |
<div class="form-submit">
|
236 |
+
<input type="submit" class="btn btn-primary ccf-submit-button" value="<?php echo esc_attr( get_post_meta( $form_id, 'ccf_form_buttonText', true ) ); ?>">
|
237 |
<img class="loading-img" src="<?php echo esc_url( site_url( '/wp-admin/images/wpspin_light.gif' ) ); ?>">
|
238 |
</div>
|
239 |
|
custom-contact-forms.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
* Plugin URI: http://www.taylorlovett.com
|
5 |
* Description: Build beautiful custom forms and manage submissions the WordPress way. View live previews of your forms while you build them. Contact forms, subscription forms, payment forms, etc.
|
6 |
* Author: Taylor Lovett
|
7 |
-
* Version: 7.
|
8 |
* Text Domain: custom-contact-forms
|
9 |
* Domain Path: /languages
|
10 |
* Author URI: http://www.taylorlovett.com
|
@@ -14,7 +14,7 @@
|
|
14 |
* Include plugin reqs
|
15 |
*/
|
16 |
|
17 |
-
define( 'CCF_VERSION', '7.
|
18 |
|
19 |
require_once( dirname( __FILE__ ) . '/classes/class-ccf-constants.php' );
|
20 |
require_once( dirname( __FILE__ ) . '/classes/class-ccf-custom-contact-forms.php' );
|
4 |
* Plugin URI: http://www.taylorlovett.com
|
5 |
* Description: Build beautiful custom forms and manage submissions the WordPress way. View live previews of your forms while you build them. Contact forms, subscription forms, payment forms, etc.
|
6 |
* Author: Taylor Lovett
|
7 |
+
* Version: 7.4
|
8 |
* Text Domain: custom-contact-forms
|
9 |
* Domain Path: /languages
|
10 |
* Author URI: http://www.taylorlovett.com
|
14 |
* Include plugin reqs
|
15 |
*/
|
16 |
|
17 |
+
define( 'CCF_VERSION', '7.4' );
|
18 |
|
19 |
require_once( dirname( __FILE__ ) . '/classes/class-ccf-constants.php' );
|
20 |
require_once( dirname( __FILE__ ) . '/classes/class-ccf-custom-contact-forms.php' );
|
js/manager/models.js
CHANGED
@@ -189,7 +189,8 @@
|
|
189 |
postFieldMappings: new wp.ccf.collections.PostFieldMappings(),
|
190 |
notifications: new wp.ccf.collections.FormNotifications(),
|
191 |
pause: false,
|
192 |
-
pauseMessage: ccfSettings.pauseMessage
|
|
|
193 |
};
|
194 |
|
195 |
defaults = _.defaults( defaults, this.constructor.__super__.defaults );
|
189 |
postFieldMappings: new wp.ccf.collections.PostFieldMappings(),
|
190 |
notifications: new wp.ccf.collections.FormNotifications(),
|
191 |
pause: false,
|
192 |
+
pauseMessage: ccfSettings.pauseMessage,
|
193 |
+
theme: 'none'
|
194 |
};
|
195 |
|
196 |
defaults = _.defaults( defaults, this.constructor.__super__.defaults );
|
js/manager/views.js
CHANGED
@@ -1615,6 +1615,9 @@
|
|
1615 |
|
1616 |
var completionActionType = this.el.querySelectorAll( '.form-completion-action-type' )[0].value;
|
1617 |
this.model.set( 'completionActionType', completionActionType );
|
|
|
|
|
|
|
1618 |
},
|
1619 |
|
1620 |
fullSave: function( $promise ) {
|
1615 |
|
1616 |
var completionActionType = this.el.querySelectorAll( '.form-completion-action-type' )[0].value;
|
1617 |
this.model.set( 'completionActionType', completionActionType );
|
1618 |
+
|
1619 |
+
var theme = this.el.querySelectorAll( '.form-theme' )[0].value;
|
1620 |
+
this.model.set( 'theme', theme );
|
1621 |
},
|
1622 |
|
1623 |
fullSave: function( $promise ) {
|
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/custom-contact-forms/"
|
7 |
"issues\n"
|
8 |
-
"POT-Creation-Date: 2016-01-
|
9 |
-
"PO-Revision-Date: 2016-01-
|
10 |
"Last-Translator: Taylor Lovett <tlovett88@gmail.com>\n"
|
11 |
"Language-Team: \n"
|
12 |
"Language: en\n"
|
@@ -23,23 +23,23 @@ msgstr ""
|
|
23 |
"X-Textdomain-Support: yes\n"
|
24 |
"X-Poedit-SearchPath-0: ..\n"
|
25 |
|
26 |
-
#: ../classes/class-ccf-api-form-controller.php:
|
27 |
msgid "Form not found"
|
28 |
msgstr ""
|
29 |
|
30 |
-
#: ../classes/class-ccf-api-form-controller.php:
|
31 |
msgid "Could not create form"
|
32 |
msgstr ""
|
33 |
|
34 |
-
#: ../classes/class-ccf-api-form-controller.php:
|
35 |
msgid "Could not update form"
|
36 |
msgstr ""
|
37 |
|
38 |
-
#: ../classes/class-ccf-api-form-controller.php:
|
39 |
msgid "Could not delete form"
|
40 |
msgstr ""
|
41 |
|
42 |
-
#: ../classes/class-ccf-api-form-controller.php:
|
43 |
msgid "Could not delete submission"
|
44 |
msgstr ""
|
45 |
|
@@ -82,111 +82,111 @@ msgid "Max file size is %d MB. "
|
|
82 |
msgstr ""
|
83 |
|
84 |
#: ../classes/class-ccf-field-renderer.php:555
|
85 |
-
#: ../classes/class-ccf-form-manager.php:
|
86 |
-
#: ../classes/class-ccf-form-manager.php:
|
87 |
msgid "Street Address"
|
88 |
msgstr ""
|
89 |
|
90 |
#: ../classes/class-ccf-field-renderer.php:559
|
91 |
-
#: ../classes/class-ccf-form-manager.php:
|
92 |
-
#: ../classes/class-ccf-form-manager.php:
|
93 |
msgid "Address Line 2"
|
94 |
msgstr ""
|
95 |
|
96 |
#: ../classes/class-ccf-field-renderer.php:566
|
97 |
-
#: ../classes/class-ccf-form-manager.php:
|
98 |
-
#: ../classes/class-ccf-form-manager.php:
|
99 |
msgid "City"
|
100 |
msgstr ""
|
101 |
|
102 |
#: ../classes/class-ccf-field-renderer.php:579
|
103 |
-
#: ../classes/class-ccf-form-manager.php:
|
104 |
msgid "State"
|
105 |
msgstr ""
|
106 |
|
107 |
#: ../classes/class-ccf-field-renderer.php:587
|
108 |
-
#: ../classes/class-ccf-form-manager.php:
|
109 |
msgid "ZIP Code"
|
110 |
msgstr ""
|
111 |
|
112 |
#: ../classes/class-ccf-field-renderer.php:597
|
113 |
-
#: ../classes/class-ccf-form-manager.php:
|
114 |
msgid "State / Region / Province"
|
115 |
msgstr ""
|
116 |
|
117 |
#: ../classes/class-ccf-field-renderer.php:605
|
118 |
-
#: ../classes/class-ccf-form-manager.php:
|
119 |
msgid "ZIP / Postal Code"
|
120 |
msgstr ""
|
121 |
|
122 |
#: ../classes/class-ccf-field-renderer.php:617
|
123 |
-
#: ../classes/class-ccf-form-manager.php:
|
124 |
msgid "Country"
|
125 |
msgstr ""
|
126 |
|
127 |
#: ../classes/class-ccf-field-renderer.php:792
|
128 |
-
#: ../classes/class-ccf-form-manager.php:
|
129 |
msgid "email@example.com"
|
130 |
msgstr ""
|
131 |
|
132 |
#: ../classes/class-ccf-field-renderer.php:802
|
133 |
-
#: ../classes/class-ccf-form-manager.php:
|
134 |
-
#: ../classes/class-ccf-form-manager.php:
|
135 |
-
#: ../classes/class-ccf-form-manager.php:
|
136 |
msgid "Email"
|
137 |
msgstr ""
|
138 |
|
139 |
#: ../classes/class-ccf-field-renderer.php:809
|
140 |
-
#: ../classes/class-ccf-form-manager.php:
|
141 |
msgid "Confirm Email"
|
142 |
msgstr ""
|
143 |
|
144 |
#: ../classes/class-ccf-field-renderer.php:875
|
145 |
-
#: ../classes/class-ccf-form-manager.php:
|
146 |
msgid "First"
|
147 |
msgstr ""
|
148 |
|
149 |
#: ../classes/class-ccf-field-renderer.php:882
|
150 |
-
#: ../classes/class-ccf-form-manager.php:
|
151 |
msgid "Last"
|
152 |
msgstr ""
|
153 |
|
154 |
#: ../classes/class-ccf-field-renderer.php:955
|
155 |
#: ../classes/class-ccf-field-renderer.php:976
|
156 |
-
#: ../classes/class-ccf-form-manager.php:
|
157 |
-
#: ../classes/class-ccf-form-manager.php:
|
158 |
msgid "HH"
|
159 |
msgstr ""
|
160 |
|
161 |
#: ../classes/class-ccf-field-renderer.php:959
|
162 |
#: ../classes/class-ccf-field-renderer.php:980
|
163 |
-
#: ../classes/class-ccf-form-manager.php:
|
164 |
-
#: ../classes/class-ccf-form-manager.php:
|
165 |
msgid "MM"
|
166 |
msgstr ""
|
167 |
|
168 |
#: ../classes/class-ccf-field-renderer.php:963
|
169 |
#: ../classes/class-ccf-field-renderer.php:984
|
170 |
-
#: ../classes/class-ccf-form-manager.php:
|
171 |
-
#: ../classes/class-ccf-form-manager.php:
|
172 |
msgid "AM"
|
173 |
msgstr ""
|
174 |
|
175 |
#: ../classes/class-ccf-field-renderer.php:964
|
176 |
#: ../classes/class-ccf-field-renderer.php:985
|
177 |
-
#: ../classes/class-ccf-form-manager.php:
|
178 |
-
#: ../classes/class-ccf-form-manager.php:
|
179 |
msgid "PM"
|
180 |
msgstr ""
|
181 |
|
182 |
#: ../classes/class-ccf-field-renderer.php:971
|
183 |
#: ../classes/class-ccf-form-cpt.php:513
|
184 |
-
#: ../classes/class-ccf-form-manager.php:
|
185 |
-
#: ../classes/class-ccf-form-manager.php:
|
186 |
-
#: ../classes/class-ccf-form-manager.php:
|
187 |
-
#: ../classes/class-ccf-form-manager.php:
|
188 |
-
#: ../classes/class-ccf-form-manager.php:
|
189 |
-
#: ../classes/class-ccf-form-manager.php:
|
190 |
msgid "Date"
|
191 |
msgstr ""
|
192 |
|
@@ -196,8 +196,8 @@ msgstr ""
|
|
196 |
|
197 |
#: ../classes/class-ccf-form-cpt.php:329 ../classes/class-ccf-form-cpt.php:347
|
198 |
#: ../classes/class-ccf-form-cpt.php:511
|
199 |
-
#: ../classes/class-ccf-form-manager.php:
|
200 |
-
#: ../classes/class-ccf-form-manager.php:
|
201 |
msgid "Submissions"
|
202 |
msgstr ""
|
203 |
|
@@ -238,7 +238,7 @@ msgid "Export"
|
|
238 |
msgstr ""
|
239 |
|
240 |
#: ../classes/class-ccf-form-cpt.php:449
|
241 |
-
#: ../classes/class-ccf-form-manager.php:
|
242 |
msgid "(No title)"
|
243 |
msgstr ""
|
244 |
|
@@ -251,14 +251,14 @@ msgid "Form Title"
|
|
251 |
msgstr ""
|
252 |
|
253 |
#: ../classes/class-ccf-form-cpt.php:510
|
254 |
-
#: ../classes/class-ccf-form-manager.php:
|
255 |
-
#: ../classes/class-ccf-form-manager.php:
|
256 |
msgid "Author"
|
257 |
msgstr ""
|
258 |
|
259 |
#: ../classes/class-ccf-form-cpt.php:512
|
260 |
-
#: ../classes/class-ccf-form-manager.php:
|
261 |
-
#: ../classes/class-ccf-form-manager.php:
|
262 |
msgid "Number of Fields"
|
263 |
msgstr ""
|
264 |
|
@@ -451,17 +451,17 @@ msgstr ""
|
|
451 |
msgid "Form submitter IP"
|
452 |
msgstr ""
|
453 |
|
454 |
-
#: ../classes/class-ccf-form-handler.php:
|
455 |
#, php-format
|
456 |
msgid "%s: Form Submission"
|
457 |
msgstr ""
|
458 |
|
459 |
-
#: ../classes/class-ccf-form-handler.php:
|
460 |
#, php-format
|
461 |
msgid " to \"%s\""
|
462 |
msgstr ""
|
463 |
|
464 |
-
#: ../classes/class-ccf-form-handler.php:
|
465 |
#: ../classes/class-ccf-form-renderer.php:188
|
466 |
msgid "Thank you for your submission."
|
467 |
msgstr ""
|
@@ -528,7 +528,7 @@ msgid "← Drag fields from the left here."
|
|
528 |
msgstr ""
|
529 |
|
530 |
#: ../classes/class-ccf-form-manager.php:152
|
531 |
-
#: ../classes/class-ccf-form-manager.php:
|
532 |
msgid "Insert into post"
|
533 |
msgstr ""
|
534 |
|
@@ -549,7 +549,7 @@ msgid "(Untitled)"
|
|
549 |
msgstr ""
|
550 |
|
551 |
#: ../classes/class-ccf-form-manager.php:172
|
552 |
-
#: ../classes/class-ccf-form-manager.php:
|
553 |
msgid "Edit"
|
554 |
msgstr ""
|
555 |
|
@@ -558,7 +558,7 @@ msgid "Delete"
|
|
558 |
msgstr ""
|
559 |
|
560 |
#: ../classes/class-ccf-form-manager.php:179
|
561 |
-
#: ../classes/class-ccf-form-manager.php:
|
562 |
msgid "Form Submission"
|
563 |
msgstr ""
|
564 |
|
@@ -583,400 +583,420 @@ msgid "Notification Title:"
|
|
583 |
msgstr ""
|
584 |
|
585 |
#: ../classes/class-ccf-form-manager.php:223
|
586 |
-
msgid "Email
|
587 |
msgstr ""
|
588 |
|
589 |
-
#: ../classes/class-ccf-form-manager.php:
|
590 |
msgid "Variables:"
|
591 |
msgstr ""
|
592 |
|
593 |
-
#: ../classes/class-ccf-form-manager.php:
|
594 |
msgid "\"To\" Email Addresses:"
|
595 |
msgstr ""
|
596 |
|
597 |
-
#: ../classes/class-ccf-form-manager.php:
|
598 |
msgid ""
|
599 |
"If you are not receiving email notifications, we highly recommend installing "
|
600 |
"the <a href=\"https://wordpress.org/plugins/easy-wp-smtp/\">WP Easy SMTP</a> "
|
601 |
"plugin as there is probably an issue with emailing on your host."
|
602 |
msgstr ""
|
603 |
|
604 |
-
#: ../classes/class-ccf-form-manager.php:
|
605 |
msgid "Activate Notification:"
|
606 |
msgstr ""
|
607 |
|
608 |
-
#: ../classes/class-ccf-form-manager.php:
|
609 |
-
#: ../classes/class-ccf-form-manager.php:
|
610 |
-
#: ../classes/class-ccf-form-manager.php:
|
611 |
-
#: ../classes/class-ccf-form-manager.php:
|
612 |
-
#: ../classes/class-ccf-form-manager.php:
|
613 |
-
#: ../classes/class-ccf-form-manager.php:
|
614 |
-
#: ../classes/class-ccf-form-manager.php:
|
615 |
-
#: ../classes/class-ccf-form-manager.php:
|
616 |
-
#: ../classes/class-ccf-form-manager.php:
|
617 |
-
#: ../classes/class-ccf-form-manager.php:
|
618 |
-
#: ../classes/class-ccf-form-manager.php:
|
619 |
-
#: ../classes/class-ccf-form-manager.php:
|
620 |
-
#: ../classes/class-ccf-form-manager.php:
|
621 |
-
#: ../classes/class-ccf-form-manager.php:
|
622 |
-
#: ../classes/class-ccf-form-manager.php:
|
623 |
-
#: ../classes/class-ccf-form-manager.php:
|
624 |
#: ../classes/class-ccf-settings.php:104
|
625 |
msgid "No"
|
626 |
msgstr ""
|
627 |
|
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 |
-
#: ../classes/class-ccf-form-manager.php:
|
637 |
-
#: ../classes/class-ccf-form-manager.php:
|
638 |
-
#: ../classes/class-ccf-form-manager.php:
|
639 |
-
#: ../classes/class-ccf-form-manager.php:
|
640 |
-
#: ../classes/class-ccf-form-manager.php:
|
641 |
-
#: ../classes/class-ccf-form-manager.php:
|
642 |
-
#: ../classes/class-ccf-form-manager.php:
|
643 |
-
#: ../classes/class-ccf-form-manager.php:
|
644 |
#: ../classes/class-ccf-settings.php:105
|
645 |
msgid "Yes"
|
646 |
msgstr ""
|
647 |
|
648 |
-
#: ../classes/class-ccf-form-manager.php:
|
649 |
msgid "Only active notifications will be sent."
|
650 |
msgstr ""
|
651 |
|
652 |
-
#: ../classes/class-ccf-form-manager.php:
|
653 |
msgid "\"From\" Email Address Type:"
|
654 |
msgstr ""
|
655 |
|
656 |
-
#: ../classes/class-ccf-form-manager.php:
|
657 |
msgid "WordPress Default"
|
658 |
msgstr ""
|
659 |
|
660 |
-
#: ../classes/class-ccf-form-manager.php:
|
661 |
-
#: ../classes/class-ccf-form-manager.php:
|
662 |
msgid "Custom Email"
|
663 |
msgstr ""
|
664 |
|
665 |
-
#: ../classes/class-ccf-form-manager.php:
|
666 |
-
#: ../classes/class-ccf-form-manager.php:
|
667 |
-
#: ../classes/class-ccf-form-manager.php:
|
668 |
-
#: ../classes/class-ccf-form-manager.php:
|
669 |
msgid "Form Field"
|
670 |
msgstr ""
|
671 |
|
672 |
-
#: ../classes/class-ccf-form-manager.php:
|
673 |
msgid ""
|
674 |
"You can set the notification emails from address to be the WP default, a "
|
675 |
"custom email address, or pull the address from a field in the form."
|
676 |
msgstr ""
|
677 |
|
678 |
-
#: ../classes/class-ccf-form-manager.php:
|
679 |
msgid "Custom \"From\" Email Address:"
|
680 |
msgstr ""
|
681 |
|
682 |
-
#: ../classes/class-ccf-form-manager.php:
|
683 |
msgid "Pull \"From\" Email Dynamically from Field:"
|
684 |
msgstr ""
|
685 |
|
686 |
-
#: ../classes/class-ccf-form-manager.php:
|
687 |
msgid "\"From\" Name Type:"
|
688 |
msgstr ""
|
689 |
|
690 |
-
#: ../classes/class-ccf-form-manager.php:
|
691 |
msgid "Custom Name"
|
692 |
msgstr ""
|
693 |
|
694 |
-
#: ../classes/class-ccf-form-manager.php:
|
695 |
msgid ""
|
696 |
"You can set the notification emails from name to be a custom name or pull "
|
697 |
"the name from a field in the form."
|
698 |
msgstr ""
|
699 |
|
700 |
-
#: ../classes/class-ccf-form-manager.php:
|
701 |
msgid "Custom \"From\" Name:"
|
702 |
msgstr ""
|
703 |
|
704 |
-
#: ../classes/class-ccf-form-manager.php:
|
705 |
msgid "Pull \"From\" Name Dynamically from Field:"
|
706 |
msgstr ""
|
707 |
|
708 |
-
#: ../classes/class-ccf-form-manager.php:
|
709 |
msgid "Email Subject Type:"
|
710 |
msgstr ""
|
711 |
|
712 |
-
#: ../classes/class-ccf-form-manager.php:
|
713 |
msgid "Default"
|
714 |
msgstr ""
|
715 |
|
716 |
-
#: ../classes/class-ccf-form-manager.php:
|
717 |
msgid "Custom Subject"
|
718 |
msgstr ""
|
719 |
|
720 |
-
#: ../classes/class-ccf-form-manager.php:
|
721 |
msgid ""
|
722 |
"You can set the notification emails subject line to be the CCF default, "
|
723 |
"custom text, or pull the subject from a field in the form."
|
724 |
msgstr ""
|
725 |
|
726 |
-
#: ../classes/class-ccf-form-manager.php:
|
727 |
msgid "Custom Email Subject:"
|
728 |
msgstr ""
|
729 |
|
730 |
-
#: ../classes/class-ccf-form-manager.php:
|
731 |
msgid "Pull Email Subject Dynamically from Field:"
|
732 |
msgstr ""
|
733 |
|
734 |
-
#: ../classes/class-ccf-form-manager.php:
|
735 |
msgid "General"
|
736 |
msgstr ""
|
737 |
|
738 |
-
#: ../classes/class-ccf-form-manager.php:
|
739 |
msgid "Form Title:"
|
740 |
msgstr ""
|
741 |
|
742 |
-
#: ../classes/class-ccf-form-manager.php:
|
743 |
msgid "Form Description:"
|
744 |
msgstr ""
|
745 |
|
746 |
-
#: ../classes/class-ccf-form-manager.php:
|
747 |
msgid "Button Text:"
|
748 |
msgstr ""
|
749 |
|
750 |
-
#: ../classes/class-ccf-form-manager.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
751 |
msgid "On form completion:"
|
752 |
msgstr ""
|
753 |
|
754 |
-
#: ../classes/class-ccf-form-manager.php:
|
755 |
msgid "Show text"
|
756 |
msgstr ""
|
757 |
|
758 |
-
#: ../classes/class-ccf-form-manager.php:
|
759 |
msgid "Redirect"
|
760 |
msgstr ""
|
761 |
|
762 |
-
#: ../classes/class-ccf-form-manager.php:
|
763 |
msgid "Redirect URL:"
|
764 |
msgstr ""
|
765 |
|
766 |
-
#: ../classes/class-ccf-form-manager.php:
|
767 |
msgid "Completion Message:"
|
768 |
msgstr ""
|
769 |
|
770 |
-
#: ../classes/class-ccf-form-manager.php:
|
771 |
msgid "Pause form:"
|
772 |
msgstr ""
|
773 |
|
774 |
-
#: ../classes/class-ccf-form-manager.php:
|
775 |
msgid "Pause Message:"
|
776 |
msgstr ""
|
777 |
|
778 |
-
#: ../classes/class-ccf-form-manager.php:
|
779 |
msgid "Email Notifications"
|
780 |
msgstr ""
|
781 |
|
782 |
-
#: ../classes/class-ccf-form-manager.php:
|
783 |
-
#: ../classes/class-ccf-form-manager.php:
|
784 |
-
#: ../classes/class-ccf-form-manager.php:
|
785 |
-
#: ../classes/class-ccf-form-manager.php:
|
786 |
msgid "Title"
|
787 |
msgstr ""
|
788 |
|
789 |
-
#: ../classes/class-ccf-form-manager.php:
|
790 |
-
#: ../classes/class-ccf-form-manager.php:
|
791 |
msgid "Subject"
|
792 |
msgstr ""
|
793 |
|
794 |
-
#: ../classes/class-ccf-form-manager.php:
|
795 |
-
#: ../classes/class-ccf-form-manager.php:
|
796 |
msgid "To"
|
797 |
msgstr ""
|
798 |
|
799 |
-
#: ../classes/class-ccf-form-manager.php:
|
800 |
-
#: ../classes/class-ccf-form-manager.php:
|
801 |
msgid "Active"
|
802 |
msgstr ""
|
803 |
|
804 |
-
#: ../classes/class-ccf-form-manager.php:
|
805 |
msgid "New Notification"
|
806 |
msgstr ""
|
807 |
|
808 |
-
#: ../classes/class-ccf-form-manager.php:
|
809 |
msgid ""
|
810 |
"For notification changes to take affect (updating, adding, deleting, etc.), "
|
811 |
"you will need to save the form."
|
812 |
msgstr ""
|
813 |
|
814 |
-
#: ../classes/class-ccf-form-manager.php:
|
815 |
msgid "Post Creation"
|
816 |
msgstr ""
|
817 |
|
818 |
-
#: ../classes/class-ccf-form-manager.php:
|
819 |
msgid ""
|
820 |
"You can have Custom Contact Forms create a post (or custom post type) "
|
821 |
"whenever someone submits your form."
|
822 |
msgstr ""
|
823 |
|
824 |
-
#: ../classes/class-ccf-form-manager.php:
|
825 |
msgid "Enable Post Creation:"
|
826 |
msgstr ""
|
827 |
|
828 |
-
#: ../classes/class-ccf-form-manager.php:
|
829 |
msgid "Post Type:"
|
830 |
msgstr ""
|
831 |
|
832 |
-
#: ../classes/class-ccf-form-manager.php:
|
833 |
msgid "Post Status:"
|
834 |
msgstr ""
|
835 |
|
836 |
-
#: ../classes/class-ccf-form-manager.php:
|
837 |
msgid "Field Mappings:"
|
838 |
msgstr ""
|
839 |
|
840 |
-
#: ../classes/class-ccf-form-manager.php:
|
841 |
msgid ""
|
842 |
"You can map as few or as many fields as you like. However, if no form fields "
|
843 |
"are mapped, no post will be created. Mapping a field to post_title is "
|
844 |
"required."
|
845 |
msgstr ""
|
846 |
|
847 |
-
#: ../classes/class-ccf-form-manager.php:
|
848 |
msgid "Custom Field Key"
|
849 |
msgstr ""
|
850 |
|
851 |
-
#: ../classes/class-ccf-form-manager.php:
|
852 |
msgid "items"
|
853 |
msgstr ""
|
854 |
|
855 |
-
#: ../classes/class-ccf-form-manager.php:
|
856 |
-
#: ../classes/class-ccf-form-manager.php:
|
857 |
msgid "ID"
|
858 |
msgstr ""
|
859 |
|
860 |
-
#: ../classes/class-ccf-form-manager.php:
|
861 |
msgid "<span>←</span> Click on a field to edit it."
|
862 |
msgstr ""
|
863 |
|
864 |
-
#: ../classes/class-ccf-form-manager.php:
|
865 |
-
#: ../classes/class-ccf-form-manager.php:
|
866 |
-
#: ../classes/class-ccf-form-manager.php:
|
867 |
-
#: ../classes/class-ccf-form-manager.php:
|
868 |
msgid "Internal Unique Slug"
|
869 |
msgstr ""
|
870 |
|
871 |
-
#: ../classes/class-ccf-form-manager.php:
|
872 |
-
#: ../classes/class-ccf-form-manager.php:
|
873 |
-
#: ../classes/class-ccf-form-manager.php:
|
874 |
-
#: ../classes/class-ccf-form-manager.php:
|
875 |
-
#: ../classes/class-ccf-form-manager.php:
|
876 |
-
#: ../classes/class-ccf-form-manager.php:
|
877 |
-
#: ../classes/class-ccf-form-manager.php:
|
878 |
-
#: ../classes/class-ccf-form-manager.php:
|
879 |
-
#: ../classes/class-ccf-form-manager.php:
|
880 |
-
#: ../classes/class-ccf-form-manager.php:
|
881 |
-
#: ../classes/class-ccf-form-manager.php:
|
882 |
-
#: ../classes/class-ccf-form-manager.php:
|
883 |
-
#: ../classes/class-ccf-form-manager.php:
|
884 |
msgid "Label:"
|
885 |
msgstr ""
|
886 |
|
887 |
-
#: ../classes/class-ccf-form-manager.php:
|
888 |
-
#: ../classes/class-ccf-form-manager.php:
|
889 |
-
#: ../classes/class-ccf-form-manager.php:
|
890 |
-
#: ../classes/class-ccf-form-manager.php:
|
891 |
-
#: ../classes/class-ccf-form-manager.php:
|
892 |
-
#: ../classes/class-ccf-form-manager.php:
|
893 |
-
#: ../classes/class-ccf-form-manager.php:
|
894 |
-
#: ../classes/class-ccf-form-manager.php:
|
895 |
-
#: ../classes/class-ccf-form-manager.php:
|
896 |
-
#: ../classes/class-ccf-form-manager.php:
|
897 |
-
#: ../classes/class-ccf-form-manager.php:
|
898 |
-
#: ../classes/class-ccf-form-manager.php:
|
899 |
-
#: ../classes/class-ccf-form-manager.php:
|
900 |
msgid "Description:"
|
901 |
msgstr ""
|
902 |
|
903 |
-
#: ../classes/class-ccf-form-manager.php:
|
904 |
-
#: ../classes/class-ccf-form-manager.php:
|
905 |
-
#: ../classes/class-ccf-form-manager.php:
|
906 |
-
#: ../classes/class-ccf-form-manager.php:
|
907 |
-
#: ../classes/class-ccf-form-manager.php:
|
908 |
-
#: ../classes/class-ccf-form-manager.php:
|
909 |
-
#: ../classes/class-ccf-form-manager.php:
|
910 |
msgid "Initial Value:"
|
911 |
msgstr ""
|
912 |
|
913 |
-
#: ../classes/class-ccf-form-manager.php:
|
914 |
-
#: ../classes/class-ccf-form-manager.php:
|
915 |
-
#: ../classes/class-ccf-form-manager.php:
|
916 |
-
#: ../classes/class-ccf-form-manager.php:
|
917 |
-
#: ../classes/class-ccf-form-manager.php:
|
918 |
-
#: ../classes/class-ccf-form-manager.php:
|
919 |
-
#: ../classes/class-ccf-form-manager.php:
|
920 |
-
#: ../classes/class-ccf-form-manager.php:
|
921 |
-
#: ../classes/class-ccf-form-manager.php:
|
922 |
-
#: ../classes/class-ccf-form-manager.php:
|
923 |
-
#: ../classes/class-ccf-form-manager.php:
|
924 |
-
#: ../classes/class-ccf-form-manager.php:
|
925 |
msgid "Required:"
|
926 |
msgstr ""
|
927 |
|
928 |
-
#: ../classes/class-ccf-form-manager.php:
|
929 |
-
#: ../classes/class-ccf-form-manager.php:
|
930 |
-
#: ../classes/class-ccf-form-manager.php:
|
931 |
-
#: ../classes/class-ccf-form-manager.php:
|
932 |
-
#: ../classes/class-ccf-form-manager.php:
|
933 |
-
#: ../classes/class-ccf-form-manager.php:
|
934 |
-
#: ../classes/class-ccf-form-manager.php:
|
935 |
-
#: ../classes/class-ccf-form-manager.php:
|
936 |
-
#: ../classes/class-ccf-form-manager.php:
|
937 |
-
#: ../classes/class-ccf-form-manager.php:
|
938 |
-
#: ../classes/class-ccf-form-manager.php:
|
939 |
-
#: ../classes/class-ccf-form-manager.php:
|
940 |
-
#: ../classes/class-ccf-form-manager.php:
|
941 |
-
#: ../classes/class-ccf-form-manager.php:
|
942 |
-
#: ../classes/class-ccf-form-manager.php:
|
943 |
-
#: ../classes/class-ccf-form-manager.php:
|
944 |
msgid "Advanced"
|
945 |
msgstr ""
|
946 |
|
947 |
-
#: ../classes/class-ccf-form-manager.php:
|
948 |
-
#: ../classes/class-ccf-form-manager.php:
|
949 |
-
#: ../classes/class-ccf-form-manager.php:
|
950 |
-
#: ../classes/class-ccf-form-manager.php:
|
951 |
-
#: ../classes/class-ccf-form-manager.php:
|
952 |
-
#: ../classes/class-ccf-form-manager.php:
|
953 |
-
#: ../classes/class-ccf-form-manager.php:
|
954 |
-
#: ../classes/class-ccf-form-manager.php:
|
955 |
-
#: ../classes/class-ccf-form-manager.php:
|
956 |
-
#: ../classes/class-ccf-form-manager.php:
|
957 |
-
#: ../classes/class-ccf-form-manager.php:
|
958 |
-
#: ../classes/class-ccf-form-manager.php:
|
959 |
-
#: ../classes/class-ccf-form-manager.php:
|
960 |
-
#: ../classes/class-ccf-form-manager.php:
|
961 |
-
#: ../classes/class-ccf-form-manager.php:
|
962 |
-
#: ../classes/class-ccf-form-manager.php:
|
963 |
msgid "Class Name:"
|
964 |
msgstr ""
|
965 |
|
966 |
-
#: ../classes/class-ccf-form-manager.php:
|
967 |
-
#: ../classes/class-ccf-form-manager.php:
|
968 |
-
#: ../classes/class-ccf-form-manager.php:
|
969 |
-
#: ../classes/class-ccf-form-manager.php:
|
970 |
-
#: ../classes/class-ccf-form-manager.php:
|
971 |
-
#: ../classes/class-ccf-form-manager.php:
|
972 |
msgid "Placeholder Text:"
|
973 |
msgstr ""
|
974 |
|
975 |
-
#: ../classes/class-ccf-form-manager.php:
|
976 |
msgid "Allowed File Extensions (comma separate):"
|
977 |
msgstr ""
|
978 |
|
979 |
-
#: ../classes/class-ccf-form-manager.php:
|
980 |
msgid ""
|
981 |
"If left blank, will default to all extensions registered by WordPress. If "
|
982 |
"you use a file extension or mime type not <a href=\"http://codex.wordpress."
|
@@ -984,298 +1004,298 @@ msgid ""
|
|
984 |
"a>, you will need to filter and manually whitelist the new extension."
|
985 |
msgstr ""
|
986 |
|
987 |
-
#: ../classes/class-ccf-form-manager.php:
|
988 |
msgid "Max File Size (in MB):"
|
989 |
msgstr ""
|
990 |
|
991 |
-
#: ../classes/class-ccf-form-manager.php:
|
992 |
#, php-format
|
993 |
msgid ""
|
994 |
"If left blank, will default to %d MB. Maximum allowed by server is %d MB."
|
995 |
msgstr ""
|
996 |
|
997 |
-
#: ../classes/class-ccf-form-manager.php:
|
998 |
msgid ""
|
999 |
"reCAPTCHA is a simple captcha service provided by Google. <a target=\"_blank"
|
1000 |
"\" href=\"https://www.google.com/recaptcha/intro/index.html\">Learn more</a>"
|
1001 |
msgstr ""
|
1002 |
|
1003 |
-
#: ../classes/class-ccf-form-manager.php:
|
1004 |
msgid "Site Key:"
|
1005 |
msgstr ""
|
1006 |
|
1007 |
-
#: ../classes/class-ccf-form-manager.php:
|
1008 |
-
#: ../classes/class-ccf-form-manager.php:
|
1009 |
msgid "Don't have one?"
|
1010 |
msgstr ""
|
1011 |
|
1012 |
-
#: ../classes/class-ccf-form-manager.php:
|
1013 |
msgid "Secret Key:"
|
1014 |
msgstr ""
|
1015 |
|
1016 |
-
#: ../classes/class-ccf-form-manager.php:
|
1017 |
-
#: ../classes/class-ccf-form-manager.php:
|
1018 |
-
#: ../classes/class-ccf-form-manager.php:
|
1019 |
-
#: ../classes/class-ccf-form-manager.php:
|
1020 |
-
#: ../classes/class-ccf-form-manager.php:
|
1021 |
-
#: ../classes/class-ccf-form-manager.php:
|
1022 |
-
#: ../classes/class-ccf-form-manager.php:
|
1023 |
-
#: ../classes/class-ccf-form-manager.php:
|
1024 |
-
#: ../classes/class-ccf-form-manager.php:
|
1025 |
-
#: ../classes/class-ccf-form-manager.php:
|
1026 |
-
#: ../classes/class-ccf-form-manager.php:
|
1027 |
-
#: ../classes/class-ccf-form-manager.php:
|
1028 |
msgid "Basic"
|
1029 |
msgstr ""
|
1030 |
|
1031 |
-
#: ../classes/class-ccf-form-manager.php:
|
1032 |
msgid "HTML Content:"
|
1033 |
msgstr ""
|
1034 |
|
1035 |
-
#: ../classes/class-ccf-form-manager.php:
|
1036 |
msgid "Heading:"
|
1037 |
msgstr ""
|
1038 |
|
1039 |
-
#: ../classes/class-ccf-form-manager.php:
|
1040 |
msgid "Sub Heading:"
|
1041 |
msgstr ""
|
1042 |
|
1043 |
-
#: ../classes/class-ccf-form-manager.php:
|
1044 |
-
#: ../classes/class-ccf-form-manager.php:
|
1045 |
-
#: ../classes/class-ccf-form-manager.php:
|
1046 |
-
#: ../classes/class-ccf-form-manager.php:
|
1047 |
-
#: ../classes/class-ccf-form-manager.php:
|
1048 |
-
#: ../classes/class-ccf-form-manager.php:
|
1049 |
-
#: ../classes/class-ccf-form-manager.php:
|
1050 |
-
#: ../classes/class-ccf-form-manager.php:
|
1051 |
-
#: ../classes/class-ccf-form-manager.php:
|
1052 |
msgid "Internal Unique Slug (a-z, 0-9, -, _):"
|
1053 |
msgstr ""
|
1054 |
|
1055 |
-
#: ../classes/class-ccf-form-manager.php:
|
1056 |
msgid "Enable Date Select"
|
1057 |
msgstr ""
|
1058 |
|
1059 |
-
#: ../classes/class-ccf-form-manager.php:
|
1060 |
msgid "Enable Time Select"
|
1061 |
msgstr ""
|
1062 |
|
1063 |
-
#: ../classes/class-ccf-form-manager.php:
|
1064 |
msgid "Date Format:"
|
1065 |
msgstr ""
|
1066 |
|
1067 |
-
#: ../classes/class-ccf-form-manager.php:
|
1068 |
msgid "Format:"
|
1069 |
msgstr ""
|
1070 |
|
1071 |
-
#: ../classes/class-ccf-form-manager.php:
|
1072 |
-
#: ../classes/class-ccf-form-manager.php:
|
1073 |
msgid "International"
|
1074 |
msgstr ""
|
1075 |
|
1076 |
-
#: ../classes/class-ccf-form-manager.php:
|
1077 |
msgid "Type:"
|
1078 |
msgstr ""
|
1079 |
|
1080 |
-
#: ../classes/class-ccf-form-manager.php:
|
1081 |
msgid "United States"
|
1082 |
msgstr ""
|
1083 |
|
1084 |
-
#: ../classes/class-ccf-form-manager.php:
|
1085 |
msgid "Require Confirmation:"
|
1086 |
msgstr ""
|
1087 |
|
1088 |
-
#: ../classes/class-ccf-form-manager.php:
|
1089 |
msgid "Label"
|
1090 |
msgstr ""
|
1091 |
|
1092 |
-
#: ../classes/class-ccf-form-manager.php:
|
1093 |
msgid "Value"
|
1094 |
msgstr ""
|
1095 |
|
1096 |
-
#: ../classes/class-ccf-form-manager.php:
|
1097 |
-
#: ../classes/class-ccf-form-manager.php:
|
1098 |
-
#: ../classes/class-ccf-form-manager.php:
|
1099 |
msgid "Manage field choices:"
|
1100 |
msgstr ""
|
1101 |
|
1102 |
-
#: ../classes/class-ccf-form-manager.php:
|
1103 |
-
#: ../classes/class-ccf-form-manager.php:
|
1104 |
-
#: ../classes/class-ccf-form-manager.php:
|
1105 |
msgid ""
|
1106 |
"Note: If an option does not have a \"value\", it will not be considered a "
|
1107 |
"valid selection if the field is required. The \"value\" is what's read, "
|
1108 |
"stored, and displayed in the submission."
|
1109 |
msgstr ""
|
1110 |
|
1111 |
-
#: ../classes/class-ccf-form-manager.php:
|
1112 |
msgid "You currently have no forms. Add some!"
|
1113 |
msgstr ""
|
1114 |
|
1115 |
-
#: ../classes/class-ccf-form-manager.php:
|
1116 |
msgid "Allowed file extensions are {{ extensions }}. "
|
1117 |
msgstr ""
|
1118 |
|
1119 |
-
#: ../classes/class-ccf-form-manager.php:
|
1120 |
msgid "Max file size is {{ file_size }} MB. "
|
1121 |
msgstr ""
|
1122 |
|
1123 |
-
#: ../classes/class-ccf-form-manager.php:
|
1124 |
-
#: ../classes/class-ccf-form-manager.php:
|
1125 |
-
#: ../classes/class-ccf-form-manager.php:
|
1126 |
msgid "An example choice"
|
1127 |
msgstr ""
|
1128 |
|
1129 |
-
#: ../classes/class-ccf-form-manager.php:
|
1130 |
msgid "Arbitrary block of HTML."
|
1131 |
msgstr ""
|
1132 |
|
1133 |
-
#: ../classes/class-ccf-form-manager.php:
|
1134 |
msgid "Section Heading"
|
1135 |
msgstr ""
|
1136 |
|
1137 |
-
#: ../classes/class-ccf-form-manager.php:
|
1138 |
msgid "This is the sub-heading text."
|
1139 |
msgstr ""
|
1140 |
|
1141 |
-
#: ../classes/class-ccf-form-manager.php:
|
1142 |
msgid "Trash"
|
1143 |
msgstr ""
|
1144 |
|
1145 |
-
#: ../classes/class-ccf-form-manager.php:
|
1146 |
msgid "There is a problem with this form. Is it trashed or deleted?"
|
1147 |
msgstr ""
|
1148 |
|
1149 |
-
#: ../classes/class-ccf-form-manager.php:
|
1150 |
msgid "IP Address"
|
1151 |
msgstr ""
|
1152 |
|
1153 |
-
#: ../classes/class-ccf-form-manager.php:
|
1154 |
msgid "There are no submissions."
|
1155 |
msgstr ""
|
1156 |
|
1157 |
-
#: ../classes/class-ccf-form-manager.php:
|
1158 |
msgid "Add Form"
|
1159 |
msgstr ""
|
1160 |
|
1161 |
-
#: ../classes/class-ccf-form-manager.php:
|
1162 |
msgid "Single Line Text"
|
1163 |
msgstr ""
|
1164 |
|
1165 |
-
#: ../classes/class-ccf-form-manager.php:
|
1166 |
msgid "Dropdown"
|
1167 |
msgstr ""
|
1168 |
|
1169 |
-
#: ../classes/class-ccf-form-manager.php:
|
1170 |
msgid "Checkboxes"
|
1171 |
msgstr ""
|
1172 |
|
1173 |
-
#: ../classes/class-ccf-form-manager.php:
|
1174 |
msgid "Radio Buttons"
|
1175 |
msgstr ""
|
1176 |
|
1177 |
-
#: ../classes/class-ccf-form-manager.php:
|
1178 |
msgid "Paragraph Text"
|
1179 |
msgstr ""
|
1180 |
|
1181 |
-
#: ../classes/class-ccf-form-manager.php:
|
1182 |
msgid "Hidden"
|
1183 |
msgstr ""
|
1184 |
|
1185 |
-
#: ../classes/class-ccf-form-manager.php:
|
1186 |
msgid "File Upload"
|
1187 |
msgstr ""
|
1188 |
|
1189 |
-
#: ../classes/class-ccf-form-manager.php:
|
1190 |
msgid "HTML"
|
1191 |
msgstr ""
|
1192 |
|
1193 |
-
#: ../classes/class-ccf-form-manager.php:
|
1194 |
msgid "Section Header"
|
1195 |
msgstr ""
|
1196 |
|
1197 |
-
#: ../classes/class-ccf-form-manager.php:
|
1198 |
msgid "Name"
|
1199 |
msgstr ""
|
1200 |
|
1201 |
-
#: ../classes/class-ccf-form-manager.php:
|
1202 |
msgid "Date/Time"
|
1203 |
msgstr ""
|
1204 |
|
1205 |
-
#: ../classes/class-ccf-form-manager.php:
|
1206 |
msgid "Website"
|
1207 |
msgstr ""
|
1208 |
|
1209 |
-
#: ../classes/class-ccf-form-manager.php:
|
1210 |
msgid "Address"
|
1211 |
msgstr ""
|
1212 |
|
1213 |
-
#: ../classes/class-ccf-form-manager.php:
|
1214 |
msgid "Phone"
|
1215 |
msgstr ""
|
1216 |
|
1217 |
-
#: ../classes/class-ccf-form-manager.php:
|
1218 |
msgid "reCAPTCHA"
|
1219 |
msgstr ""
|
1220 |
|
1221 |
-
#: ../classes/class-ccf-form-manager.php:
|
1222 |
msgid "You have no email fields"
|
1223 |
msgstr ""
|
1224 |
|
1225 |
-
#: ../classes/class-ccf-form-manager.php:
|
1226 |
msgid "You have no available fields"
|
1227 |
msgstr ""
|
1228 |
|
1229 |
-
#: ../classes/class-ccf-form-manager.php:
|
1230 |
msgid "You have no name fields"
|
1231 |
msgstr ""
|
1232 |
|
1233 |
-
#: ../classes/class-ccf-form-manager.php:
|
1234 |
msgid "You have no applicable fields"
|
1235 |
msgstr ""
|
1236 |
|
1237 |
-
#: ../classes/class-ccf-form-manager.php:
|
1238 |
msgid "Choose a Form Field"
|
1239 |
msgstr ""
|
1240 |
|
1241 |
-
#: ../classes/class-ccf-form-manager.php:
|
1242 |
msgid "Invalid date"
|
1243 |
msgstr ""
|
1244 |
|
1245 |
-
#: ../classes/class-ccf-form-manager.php:
|
1246 |
msgid "Field Label"
|
1247 |
msgstr ""
|
1248 |
|
1249 |
-
#: ../classes/class-ccf-form-manager.php:
|
1250 |
#: ../classes/class-ccf-form-renderer.php:174
|
1251 |
msgid "This form is paused right now. Check back later!"
|
1252 |
msgstr ""
|
1253 |
|
1254 |
-
#: ../classes/class-ccf-form-manager.php:
|
1255 |
msgid "Choose a Post Field"
|
1256 |
msgstr ""
|
1257 |
|
1258 |
-
#: ../classes/class-ccf-form-manager.php:
|
1259 |
msgid "Post Title"
|
1260 |
msgstr ""
|
1261 |
|
1262 |
-
#: ../classes/class-ccf-form-manager.php:
|
1263 |
msgid "Post Content"
|
1264 |
msgstr ""
|
1265 |
|
1266 |
-
#: ../classes/class-ccf-form-manager.php:
|
1267 |
msgid "Post Excerpt"
|
1268 |
msgstr ""
|
1269 |
|
1270 |
-
#: ../classes/class-ccf-form-manager.php:
|
1271 |
msgid "Post Date"
|
1272 |
msgstr ""
|
1273 |
|
1274 |
-
#: ../classes/class-ccf-form-manager.php:
|
1275 |
msgid "Post Tags"
|
1276 |
msgstr ""
|
1277 |
|
1278 |
-
#: ../classes/class-ccf-form-manager.php:
|
1279 |
msgid "Custom Field"
|
1280 |
msgstr ""
|
1281 |
|
5 |
"Project-Id-Version: Custom Contact Forms\n"
|
6 |
"Report-Msgid-Bugs-To: https://github.com/tlovett1/custom-contact-forms/"
|
7 |
"issues\n"
|
8 |
+
"POT-Creation-Date: 2016-01-14 00:39-0500\n"
|
9 |
+
"PO-Revision-Date: 2016-01-14 00:39-0500\n"
|
10 |
"Last-Translator: Taylor Lovett <tlovett88@gmail.com>\n"
|
11 |
"Language-Team: \n"
|
12 |
"Language: en\n"
|
23 |
"X-Textdomain-Support: yes\n"
|
24 |
"X-Poedit-SearchPath-0: ..\n"
|
25 |
|
26 |
+
#: ../classes/class-ccf-api-form-controller.php:615
|
27 |
msgid "Form not found"
|
28 |
msgstr ""
|
29 |
|
30 |
+
#: ../classes/class-ccf-api-form-controller.php:641
|
31 |
msgid "Could not create form"
|
32 |
msgstr ""
|
33 |
|
34 |
+
#: ../classes/class-ccf-api-form-controller.php:671
|
35 |
msgid "Could not update form"
|
36 |
msgstr ""
|
37 |
|
38 |
+
#: ../classes/class-ccf-api-form-controller.php:699
|
39 |
msgid "Could not delete form"
|
40 |
msgstr ""
|
41 |
|
42 |
+
#: ../classes/class-ccf-api-form-controller.php:728
|
43 |
msgid "Could not delete submission"
|
44 |
msgstr ""
|
45 |
|
82 |
msgstr ""
|
83 |
|
84 |
#: ../classes/class-ccf-field-renderer.php:555
|
85 |
+
#: ../classes/class-ccf-form-manager.php:1394
|
86 |
+
#: ../classes/class-ccf-form-manager.php:1419
|
87 |
msgid "Street Address"
|
88 |
msgstr ""
|
89 |
|
90 |
#: ../classes/class-ccf-field-renderer.php:559
|
91 |
+
#: ../classes/class-ccf-form-manager.php:1398
|
92 |
+
#: ../classes/class-ccf-form-manager.php:1423
|
93 |
msgid "Address Line 2"
|
94 |
msgstr ""
|
95 |
|
96 |
#: ../classes/class-ccf-field-renderer.php:566
|
97 |
+
#: ../classes/class-ccf-form-manager.php:1402
|
98 |
+
#: ../classes/class-ccf-form-manager.php:1427
|
99 |
msgid "City"
|
100 |
msgstr ""
|
101 |
|
102 |
#: ../classes/class-ccf-field-renderer.php:579
|
103 |
+
#: ../classes/class-ccf-form-manager.php:1410
|
104 |
msgid "State"
|
105 |
msgstr ""
|
106 |
|
107 |
#: ../classes/class-ccf-field-renderer.php:587
|
108 |
+
#: ../classes/class-ccf-form-manager.php:1414
|
109 |
msgid "ZIP Code"
|
110 |
msgstr ""
|
111 |
|
112 |
#: ../classes/class-ccf-field-renderer.php:597
|
113 |
+
#: ../classes/class-ccf-form-manager.php:1431
|
114 |
msgid "State / Region / Province"
|
115 |
msgstr ""
|
116 |
|
117 |
#: ../classes/class-ccf-field-renderer.php:605
|
118 |
+
#: ../classes/class-ccf-form-manager.php:1435
|
119 |
msgid "ZIP / Postal Code"
|
120 |
msgstr ""
|
121 |
|
122 |
#: ../classes/class-ccf-field-renderer.php:617
|
123 |
+
#: ../classes/class-ccf-form-manager.php:1443
|
124 |
msgid "Country"
|
125 |
msgstr ""
|
126 |
|
127 |
#: ../classes/class-ccf-field-renderer.php:792
|
128 |
+
#: ../classes/class-ccf-form-manager.php:1454
|
129 |
msgid "email@example.com"
|
130 |
msgstr ""
|
131 |
|
132 |
#: ../classes/class-ccf-field-renderer.php:802
|
133 |
+
#: ../classes/class-ccf-form-manager.php:327
|
134 |
+
#: ../classes/class-ccf-form-manager.php:1458
|
135 |
+
#: ../classes/class-ccf-form-manager.php:1758
|
136 |
msgid "Email"
|
137 |
msgstr ""
|
138 |
|
139 |
#: ../classes/class-ccf-field-renderer.php:809
|
140 |
+
#: ../classes/class-ccf-form-manager.php:1462
|
141 |
msgid "Confirm Email"
|
142 |
msgstr ""
|
143 |
|
144 |
#: ../classes/class-ccf-field-renderer.php:875
|
145 |
+
#: ../classes/class-ccf-form-manager.php:1330
|
146 |
msgid "First"
|
147 |
msgstr ""
|
148 |
|
149 |
#: ../classes/class-ccf-field-renderer.php:882
|
150 |
+
#: ../classes/class-ccf-form-manager.php:1334
|
151 |
msgid "Last"
|
152 |
msgstr ""
|
153 |
|
154 |
#: ../classes/class-ccf-field-renderer.php:955
|
155 |
#: ../classes/class-ccf-field-renderer.php:976
|
156 |
+
#: ../classes/class-ccf-form-manager.php:1349
|
157 |
+
#: ../classes/class-ccf-form-manager.php:1370
|
158 |
msgid "HH"
|
159 |
msgstr ""
|
160 |
|
161 |
#: ../classes/class-ccf-field-renderer.php:959
|
162 |
#: ../classes/class-ccf-field-renderer.php:980
|
163 |
+
#: ../classes/class-ccf-form-manager.php:1353
|
164 |
+
#: ../classes/class-ccf-form-manager.php:1374
|
165 |
msgid "MM"
|
166 |
msgstr ""
|
167 |
|
168 |
#: ../classes/class-ccf-field-renderer.php:963
|
169 |
#: ../classes/class-ccf-field-renderer.php:984
|
170 |
+
#: ../classes/class-ccf-form-manager.php:1357
|
171 |
+
#: ../classes/class-ccf-form-manager.php:1378
|
172 |
msgid "AM"
|
173 |
msgstr ""
|
174 |
|
175 |
#: ../classes/class-ccf-field-renderer.php:964
|
176 |
#: ../classes/class-ccf-field-renderer.php:985
|
177 |
+
#: ../classes/class-ccf-form-manager.php:1358
|
178 |
+
#: ../classes/class-ccf-form-manager.php:1379
|
179 |
msgid "PM"
|
180 |
msgstr ""
|
181 |
|
182 |
#: ../classes/class-ccf-field-renderer.php:971
|
183 |
#: ../classes/class-ccf-form-cpt.php:513
|
184 |
+
#: ../classes/class-ccf-form-manager.php:508
|
185 |
+
#: ../classes/class-ccf-form-manager.php:521
|
186 |
+
#: ../classes/class-ccf-form-manager.php:1365
|
187 |
+
#: ../classes/class-ccf-form-manager.php:1548
|
188 |
+
#: ../classes/class-ccf-form-manager.php:1562
|
189 |
+
#: ../classes/class-ccf-form-manager.php:1700
|
190 |
msgid "Date"
|
191 |
msgstr ""
|
192 |
|
196 |
|
197 |
#: ../classes/class-ccf-form-cpt.php:329 ../classes/class-ccf-form-cpt.php:347
|
198 |
#: ../classes/class-ccf-form-cpt.php:511
|
199 |
+
#: ../classes/class-ccf-form-manager.php:511
|
200 |
+
#: ../classes/class-ccf-form-manager.php:524
|
201 |
msgid "Submissions"
|
202 |
msgstr ""
|
203 |
|
238 |
msgstr ""
|
239 |
|
240 |
#: ../classes/class-ccf-form-cpt.php:449
|
241 |
+
#: ../classes/class-ccf-form-manager.php:1490
|
242 |
msgid "(No title)"
|
243 |
msgstr ""
|
244 |
|
251 |
msgstr ""
|
252 |
|
253 |
#: ../classes/class-ccf-form-cpt.php:510
|
254 |
+
#: ../classes/class-ccf-form-manager.php:509
|
255 |
+
#: ../classes/class-ccf-form-manager.php:522
|
256 |
msgid "Author"
|
257 |
msgstr ""
|
258 |
|
259 |
#: ../classes/class-ccf-form-cpt.php:512
|
260 |
+
#: ../classes/class-ccf-form-manager.php:510
|
261 |
+
#: ../classes/class-ccf-form-manager.php:523
|
262 |
msgid "Number of Fields"
|
263 |
msgstr ""
|
264 |
|
451 |
msgid "Form submitter IP"
|
452 |
msgstr ""
|
453 |
|
454 |
+
#: ../classes/class-ccf-form-handler.php:946
|
455 |
#, php-format
|
456 |
msgid "%s: Form Submission"
|
457 |
msgstr ""
|
458 |
|
459 |
+
#: ../classes/class-ccf-form-handler.php:948
|
460 |
#, php-format
|
461 |
msgid " to \"%s\""
|
462 |
msgstr ""
|
463 |
|
464 |
+
#: ../classes/class-ccf-form-handler.php:1004
|
465 |
#: ../classes/class-ccf-form-renderer.php:188
|
466 |
msgid "Thank you for your submission."
|
467 |
msgstr ""
|
528 |
msgstr ""
|
529 |
|
530 |
#: ../classes/class-ccf-form-manager.php:152
|
531 |
+
#: ../classes/class-ccf-form-manager.php:1493
|
532 |
msgid "Insert into post"
|
533 |
msgstr ""
|
534 |
|
549 |
msgstr ""
|
550 |
|
551 |
#: ../classes/class-ccf-form-manager.php:172
|
552 |
+
#: ../classes/class-ccf-form-manager.php:1492
|
553 |
msgid "Edit"
|
554 |
msgstr ""
|
555 |
|
558 |
msgstr ""
|
559 |
|
560 |
#: ../classes/class-ccf-form-manager.php:179
|
561 |
+
#: ../classes/class-ccf-form-manager.php:1805
|
562 |
msgid "Form Submission"
|
563 |
msgstr ""
|
564 |
|
583 |
msgstr ""
|
584 |
|
585 |
#: ../classes/class-ccf-form-manager.php:223
|
586 |
+
msgid "Email Content (HTML):"
|
587 |
msgstr ""
|
588 |
|
589 |
+
#: ../classes/class-ccf-form-manager.php:226
|
590 |
msgid "Variables:"
|
591 |
msgstr ""
|
592 |
|
593 |
+
#: ../classes/class-ccf-form-manager.php:231
|
594 |
msgid "\"To\" Email Addresses:"
|
595 |
msgstr ""
|
596 |
|
597 |
+
#: ../classes/class-ccf-form-manager.php:237
|
598 |
msgid ""
|
599 |
"If you are not receiving email notifications, we highly recommend installing "
|
600 |
"the <a href=\"https://wordpress.org/plugins/easy-wp-smtp/\">WP Easy SMTP</a> "
|
601 |
"plugin as there is probably an issue with emailing on your host."
|
602 |
msgstr ""
|
603 |
|
604 |
+
#: ../classes/class-ccf-form-manager.php:241
|
605 |
msgid "Activate Notification:"
|
606 |
msgstr ""
|
607 |
|
608 |
+
#: ../classes/class-ccf-form-manager.php:244
|
609 |
+
#: ../classes/class-ccf-form-manager.php:386
|
610 |
+
#: ../classes/class-ccf-form-manager.php:434
|
611 |
+
#: ../classes/class-ccf-form-manager.php:562
|
612 |
+
#: ../classes/class-ccf-form-manager.php:612
|
613 |
+
#: ../classes/class-ccf-form-manager.php:688
|
614 |
+
#: ../classes/class-ccf-form-manager.php:778
|
615 |
+
#: ../classes/class-ccf-form-manager.php:843
|
616 |
+
#: ../classes/class-ccf-form-manager.php:885
|
617 |
+
#: ../classes/class-ccf-form-manager.php:955
|
618 |
+
#: ../classes/class-ccf-form-manager.php:1002
|
619 |
+
#: ../classes/class-ccf-form-manager.php:1044
|
620 |
+
#: ../classes/class-ccf-form-manager.php:1051
|
621 |
+
#: ../classes/class-ccf-form-manager.php:1102
|
622 |
+
#: ../classes/class-ccf-form-manager.php:1145
|
623 |
+
#: ../classes/class-ccf-form-manager.php:1188
|
624 |
#: ../classes/class-ccf-settings.php:104
|
625 |
msgid "No"
|
626 |
msgstr ""
|
627 |
|
628 |
+
#: ../classes/class-ccf-form-manager.php:245
|
629 |
+
#: ../classes/class-ccf-form-manager.php:387
|
630 |
+
#: ../classes/class-ccf-form-manager.php:435
|
631 |
+
#: ../classes/class-ccf-form-manager.php:561
|
632 |
+
#: ../classes/class-ccf-form-manager.php:611
|
633 |
+
#: ../classes/class-ccf-form-manager.php:687
|
634 |
+
#: ../classes/class-ccf-form-manager.php:777
|
635 |
+
#: ../classes/class-ccf-form-manager.php:842
|
636 |
+
#: ../classes/class-ccf-form-manager.php:884
|
637 |
+
#: ../classes/class-ccf-form-manager.php:954
|
638 |
+
#: ../classes/class-ccf-form-manager.php:1001
|
639 |
+
#: ../classes/class-ccf-form-manager.php:1043
|
640 |
+
#: ../classes/class-ccf-form-manager.php:1050
|
641 |
+
#: ../classes/class-ccf-form-manager.php:1101
|
642 |
+
#: ../classes/class-ccf-form-manager.php:1144
|
643 |
+
#: ../classes/class-ccf-form-manager.php:1187
|
644 |
#: ../classes/class-ccf-settings.php:105
|
645 |
msgid "Yes"
|
646 |
msgstr ""
|
647 |
|
648 |
+
#: ../classes/class-ccf-form-manager.php:248
|
649 |
msgid "Only active notifications will be sent."
|
650 |
msgstr ""
|
651 |
|
652 |
+
#: ../classes/class-ccf-form-manager.php:252
|
653 |
msgid "\"From\" Email Address Type:"
|
654 |
msgstr ""
|
655 |
|
656 |
+
#: ../classes/class-ccf-form-manager.php:254
|
657 |
msgid "WordPress Default"
|
658 |
msgstr ""
|
659 |
|
660 |
+
#: ../classes/class-ccf-form-manager.php:255
|
661 |
+
#: ../classes/class-ccf-form-manager.php:322
|
662 |
msgid "Custom Email"
|
663 |
msgstr ""
|
664 |
|
665 |
+
#: ../classes/class-ccf-form-manager.php:256
|
666 |
+
#: ../classes/class-ccf-form-manager.php:277
|
667 |
+
#: ../classes/class-ccf-form-manager.php:299
|
668 |
+
#: ../classes/class-ccf-form-manager.php:323
|
669 |
msgid "Form Field"
|
670 |
msgstr ""
|
671 |
|
672 |
+
#: ../classes/class-ccf-form-manager.php:259
|
673 |
msgid ""
|
674 |
"You can set the notification emails from address to be the WP default, a "
|
675 |
"custom email address, or pull the address from a field in the form."
|
676 |
msgstr ""
|
677 |
|
678 |
+
#: ../classes/class-ccf-form-manager.php:263
|
679 |
msgid "Custom \"From\" Email Address:"
|
680 |
msgstr ""
|
681 |
|
682 |
+
#: ../classes/class-ccf-form-manager.php:268
|
683 |
msgid "Pull \"From\" Email Dynamically from Field:"
|
684 |
msgstr ""
|
685 |
|
686 |
+
#: ../classes/class-ccf-form-manager.php:274
|
687 |
msgid "\"From\" Name Type:"
|
688 |
msgstr ""
|
689 |
|
690 |
+
#: ../classes/class-ccf-form-manager.php:276
|
691 |
msgid "Custom Name"
|
692 |
msgstr ""
|
693 |
|
694 |
+
#: ../classes/class-ccf-form-manager.php:280
|
695 |
msgid ""
|
696 |
"You can set the notification emails from name to be a custom name or pull "
|
697 |
"the name from a field in the form."
|
698 |
msgstr ""
|
699 |
|
700 |
+
#: ../classes/class-ccf-form-manager.php:284
|
701 |
msgid "Custom \"From\" Name:"
|
702 |
msgstr ""
|
703 |
|
704 |
+
#: ../classes/class-ccf-form-manager.php:289
|
705 |
msgid "Pull \"From\" Name Dynamically from Field:"
|
706 |
msgstr ""
|
707 |
|
708 |
+
#: ../classes/class-ccf-form-manager.php:295
|
709 |
msgid "Email Subject Type:"
|
710 |
msgstr ""
|
711 |
|
712 |
+
#: ../classes/class-ccf-form-manager.php:297
|
713 |
msgid "Default"
|
714 |
msgstr ""
|
715 |
|
716 |
+
#: ../classes/class-ccf-form-manager.php:298
|
717 |
msgid "Custom Subject"
|
718 |
msgstr ""
|
719 |
|
720 |
+
#: ../classes/class-ccf-form-manager.php:302
|
721 |
msgid ""
|
722 |
"You can set the notification emails subject line to be the CCF default, "
|
723 |
"custom text, or pull the subject from a field in the form."
|
724 |
msgstr ""
|
725 |
|
726 |
+
#: ../classes/class-ccf-form-manager.php:306
|
727 |
msgid "Custom Email Subject:"
|
728 |
msgstr ""
|
729 |
|
730 |
+
#: ../classes/class-ccf-form-manager.php:311
|
731 |
msgid "Pull Email Subject Dynamically from Field:"
|
732 |
msgstr ""
|
733 |
|
734 |
+
#: ../classes/class-ccf-form-manager.php:337
|
735 |
msgid "General"
|
736 |
msgstr ""
|
737 |
|
738 |
+
#: ../classes/class-ccf-form-manager.php:340
|
739 |
msgid "Form Title:"
|
740 |
msgstr ""
|
741 |
|
742 |
+
#: ../classes/class-ccf-form-manager.php:345
|
743 |
msgid "Form Description:"
|
744 |
msgstr ""
|
745 |
|
746 |
+
#: ../classes/class-ccf-form-manager.php:350
|
747 |
msgid "Button Text:"
|
748 |
msgstr ""
|
749 |
|
750 |
+
#: ../classes/class-ccf-form-manager.php:355
|
751 |
+
msgid "Form Theme:"
|
752 |
+
msgstr ""
|
753 |
+
|
754 |
+
#: ../classes/class-ccf-form-manager.php:358
|
755 |
+
msgid "None"
|
756 |
+
msgstr ""
|
757 |
+
|
758 |
+
#: ../classes/class-ccf-form-manager.php:359
|
759 |
+
msgid "Light"
|
760 |
+
msgstr ""
|
761 |
+
|
762 |
+
#: ../classes/class-ccf-form-manager.php:360
|
763 |
+
msgid "Dark"
|
764 |
+
msgstr ""
|
765 |
+
|
766 |
+
#: ../classes/class-ccf-form-manager.php:363
|
767 |
+
msgid "\"None\" will have your form inherit styles from your theme."
|
768 |
+
msgstr ""
|
769 |
+
|
770 |
+
#: ../classes/class-ccf-form-manager.php:367
|
771 |
msgid "On form completion:"
|
772 |
msgstr ""
|
773 |
|
774 |
+
#: ../classes/class-ccf-form-manager.php:370
|
775 |
msgid "Show text"
|
776 |
msgstr ""
|
777 |
|
778 |
+
#: ../classes/class-ccf-form-manager.php:371
|
779 |
msgid "Redirect"
|
780 |
msgstr ""
|
781 |
|
782 |
+
#: ../classes/class-ccf-form-manager.php:375
|
783 |
msgid "Redirect URL:"
|
784 |
msgstr ""
|
785 |
|
786 |
+
#: ../classes/class-ccf-form-manager.php:379
|
787 |
msgid "Completion Message:"
|
788 |
msgstr ""
|
789 |
|
790 |
+
#: ../classes/class-ccf-form-manager.php:383
|
791 |
msgid "Pause form:"
|
792 |
msgstr ""
|
793 |
|
794 |
+
#: ../classes/class-ccf-form-manager.php:391
|
795 |
msgid "Pause Message:"
|
796 |
msgstr ""
|
797 |
|
798 |
+
#: ../classes/class-ccf-form-manager.php:395
|
799 |
msgid "Email Notifications"
|
800 |
msgstr ""
|
801 |
|
802 |
+
#: ../classes/class-ccf-form-manager.php:401
|
803 |
+
#: ../classes/class-ccf-form-manager.php:412
|
804 |
+
#: ../classes/class-ccf-form-manager.php:507
|
805 |
+
#: ../classes/class-ccf-form-manager.php:520
|
806 |
msgid "Title"
|
807 |
msgstr ""
|
808 |
|
809 |
+
#: ../classes/class-ccf-form-manager.php:402
|
810 |
+
#: ../classes/class-ccf-form-manager.php:413
|
811 |
msgid "Subject"
|
812 |
msgstr ""
|
813 |
|
814 |
+
#: ../classes/class-ccf-form-manager.php:403
|
815 |
+
#: ../classes/class-ccf-form-manager.php:414
|
816 |
msgid "To"
|
817 |
msgstr ""
|
818 |
|
819 |
+
#: ../classes/class-ccf-form-manager.php:404
|
820 |
+
#: ../classes/class-ccf-form-manager.php:415
|
821 |
msgid "Active"
|
822 |
msgstr ""
|
823 |
|
824 |
+
#: ../classes/class-ccf-form-manager.php:420
|
825 |
msgid "New Notification"
|
826 |
msgstr ""
|
827 |
|
828 |
+
#: ../classes/class-ccf-form-manager.php:423
|
829 |
msgid ""
|
830 |
"For notification changes to take affect (updating, adding, deleting, etc.), "
|
831 |
"you will need to save the form."
|
832 |
msgstr ""
|
833 |
|
834 |
+
#: ../classes/class-ccf-form-manager.php:427
|
835 |
msgid "Post Creation"
|
836 |
msgstr ""
|
837 |
|
838 |
+
#: ../classes/class-ccf-form-manager.php:428
|
839 |
msgid ""
|
840 |
"You can have Custom Contact Forms create a post (or custom post type) "
|
841 |
"whenever someone submits your form."
|
842 |
msgstr ""
|
843 |
|
844 |
+
#: ../classes/class-ccf-form-manager.php:431
|
845 |
msgid "Enable Post Creation:"
|
846 |
msgstr ""
|
847 |
|
848 |
+
#: ../classes/class-ccf-form-manager.php:440
|
849 |
msgid "Post Type:"
|
850 |
msgstr ""
|
851 |
|
852 |
+
#: ../classes/class-ccf-form-manager.php:450
|
853 |
msgid "Post Status:"
|
854 |
msgstr ""
|
855 |
|
856 |
+
#: ../classes/class-ccf-form-manager.php:460
|
857 |
msgid "Field Mappings:"
|
858 |
msgstr ""
|
859 |
|
860 |
+
#: ../classes/class-ccf-form-manager.php:465
|
861 |
msgid ""
|
862 |
"You can map as few or as many fields as you like. However, if no form fields "
|
863 |
"are mapped, no post will be created. Mapping a field to post_title is "
|
864 |
"required."
|
865 |
msgstr ""
|
866 |
|
867 |
+
#: ../classes/class-ccf-form-manager.php:477
|
868 |
msgid "Custom Field Key"
|
869 |
msgstr ""
|
870 |
|
871 |
+
#: ../classes/class-ccf-form-manager.php:491
|
872 |
msgid "items"
|
873 |
msgstr ""
|
874 |
|
875 |
+
#: ../classes/class-ccf-form-manager.php:506
|
876 |
+
#: ../classes/class-ccf-form-manager.php:519
|
877 |
msgid "ID"
|
878 |
msgstr ""
|
879 |
|
880 |
+
#: ../classes/class-ccf-form-manager.php:534
|
881 |
msgid "<span>←</span> Click on a field to edit it."
|
882 |
msgstr ""
|
883 |
|
884 |
+
#: ../classes/class-ccf-form-manager.php:543
|
885 |
+
#: ../classes/class-ccf-form-manager.php:587
|
886 |
+
#: ../classes/class-ccf-form-manager.php:669
|
887 |
+
#: ../classes/class-ccf-form-manager.php:759
|
888 |
msgid "Internal Unique Slug"
|
889 |
msgstr ""
|
890 |
|
891 |
+
#: ../classes/class-ccf-form-manager.php:547
|
892 |
+
#: ../classes/class-ccf-form-manager.php:591
|
893 |
+
#: ../classes/class-ccf-form-manager.php:634
|
894 |
+
#: ../classes/class-ccf-form-manager.php:673
|
895 |
+
#: ../classes/class-ccf-form-manager.php:763
|
896 |
+
#: ../classes/class-ccf-form-manager.php:832
|
897 |
+
#: ../classes/class-ccf-form-manager.php:868
|
898 |
+
#: ../classes/class-ccf-form-manager.php:933
|
899 |
+
#: ../classes/class-ccf-form-manager.php:984
|
900 |
+
#: ../classes/class-ccf-form-manager.php:1027
|
901 |
+
#: ../classes/class-ccf-form-manager.php:1091
|
902 |
+
#: ../classes/class-ccf-form-manager.php:1134
|
903 |
+
#: ../classes/class-ccf-form-manager.php:1177
|
904 |
msgid "Label:"
|
905 |
msgstr ""
|
906 |
|
907 |
+
#: ../classes/class-ccf-form-manager.php:551
|
908 |
+
#: ../classes/class-ccf-form-manager.php:595
|
909 |
+
#: ../classes/class-ccf-form-manager.php:638
|
910 |
+
#: ../classes/class-ccf-form-manager.php:677
|
911 |
+
#: ../classes/class-ccf-form-manager.php:767
|
912 |
+
#: ../classes/class-ccf-form-manager.php:836
|
913 |
+
#: ../classes/class-ccf-form-manager.php:872
|
914 |
+
#: ../classes/class-ccf-form-manager.php:937
|
915 |
+
#: ../classes/class-ccf-form-manager.php:988
|
916 |
+
#: ../classes/class-ccf-form-manager.php:1031
|
917 |
+
#: ../classes/class-ccf-form-manager.php:1095
|
918 |
+
#: ../classes/class-ccf-form-manager.php:1138
|
919 |
+
#: ../classes/class-ccf-form-manager.php:1181
|
920 |
msgid "Description:"
|
921 |
msgstr ""
|
922 |
|
923 |
+
#: ../classes/class-ccf-form-manager.php:555
|
924 |
+
#: ../classes/class-ccf-form-manager.php:681
|
925 |
+
#: ../classes/class-ccf-form-manager.php:771
|
926 |
+
#: ../classes/class-ccf-form-manager.php:807
|
927 |
+
#: ../classes/class-ccf-form-manager.php:877
|
928 |
+
#: ../classes/class-ccf-form-manager.php:941
|
929 |
+
#: ../classes/class-ccf-form-manager.php:1036
|
930 |
msgid "Initial Value:"
|
931 |
msgstr ""
|
932 |
|
933 |
+
#: ../classes/class-ccf-form-manager.php:559
|
934 |
+
#: ../classes/class-ccf-form-manager.php:609
|
935 |
+
#: ../classes/class-ccf-form-manager.php:685
|
936 |
+
#: ../classes/class-ccf-form-manager.php:775
|
937 |
+
#: ../classes/class-ccf-form-manager.php:840
|
938 |
+
#: ../classes/class-ccf-form-manager.php:882
|
939 |
+
#: ../classes/class-ccf-form-manager.php:952
|
940 |
+
#: ../classes/class-ccf-form-manager.php:999
|
941 |
+
#: ../classes/class-ccf-form-manager.php:1041
|
942 |
+
#: ../classes/class-ccf-form-manager.php:1099
|
943 |
+
#: ../classes/class-ccf-form-manager.php:1142
|
944 |
+
#: ../classes/class-ccf-form-manager.php:1185
|
945 |
msgid "Required:"
|
946 |
msgstr ""
|
947 |
|
948 |
+
#: ../classes/class-ccf-form-manager.php:568
|
949 |
+
#: ../classes/class-ccf-form-manager.php:618
|
950 |
+
#: ../classes/class-ccf-form-manager.php:654
|
951 |
+
#: ../classes/class-ccf-form-manager.php:694
|
952 |
+
#: ../classes/class-ccf-form-manager.php:719
|
953 |
+
#: ../classes/class-ccf-form-manager.php:744
|
954 |
+
#: ../classes/class-ccf-form-manager.php:784
|
955 |
+
#: ../classes/class-ccf-form-manager.php:813
|
956 |
+
#: ../classes/class-ccf-form-manager.php:849
|
957 |
+
#: ../classes/class-ccf-form-manager.php:908
|
958 |
+
#: ../classes/class-ccf-form-manager.php:961
|
959 |
+
#: ../classes/class-ccf-form-manager.php:1008
|
960 |
+
#: ../classes/class-ccf-form-manager.php:1057
|
961 |
+
#: ../classes/class-ccf-form-manager.php:1115
|
962 |
+
#: ../classes/class-ccf-form-manager.php:1158
|
963 |
+
#: ../classes/class-ccf-form-manager.php:1201
|
964 |
msgid "Advanced"
|
965 |
msgstr ""
|
966 |
|
967 |
+
#: ../classes/class-ccf-form-manager.php:571
|
968 |
+
#: ../classes/class-ccf-form-manager.php:621
|
969 |
+
#: ../classes/class-ccf-form-manager.php:657
|
970 |
+
#: ../classes/class-ccf-form-manager.php:697
|
971 |
+
#: ../classes/class-ccf-form-manager.php:722
|
972 |
+
#: ../classes/class-ccf-form-manager.php:747
|
973 |
+
#: ../classes/class-ccf-form-manager.php:787
|
974 |
+
#: ../classes/class-ccf-form-manager.php:816
|
975 |
+
#: ../classes/class-ccf-form-manager.php:852
|
976 |
+
#: ../classes/class-ccf-form-manager.php:911
|
977 |
+
#: ../classes/class-ccf-form-manager.php:964
|
978 |
+
#: ../classes/class-ccf-form-manager.php:1011
|
979 |
+
#: ../classes/class-ccf-form-manager.php:1060
|
980 |
+
#: ../classes/class-ccf-form-manager.php:1118
|
981 |
+
#: ../classes/class-ccf-form-manager.php:1161
|
982 |
+
#: ../classes/class-ccf-form-manager.php:1204
|
983 |
msgid "Class Name:"
|
984 |
msgstr ""
|
985 |
|
986 |
+
#: ../classes/class-ccf-form-manager.php:575
|
987 |
+
#: ../classes/class-ccf-form-manager.php:701
|
988 |
+
#: ../classes/class-ccf-form-manager.php:791
|
989 |
+
#: ../classes/class-ccf-form-manager.php:916
|
990 |
+
#: ../classes/class-ccf-form-manager.php:968
|
991 |
+
#: ../classes/class-ccf-form-manager.php:1065
|
992 |
msgid "Placeholder Text:"
|
993 |
msgstr ""
|
994 |
|
995 |
+
#: ../classes/class-ccf-form-manager.php:599
|
996 |
msgid "Allowed File Extensions (comma separate):"
|
997 |
msgstr ""
|
998 |
|
999 |
+
#: ../classes/class-ccf-form-manager.php:601
|
1000 |
msgid ""
|
1001 |
"If left blank, will default to all extensions registered by WordPress. If "
|
1002 |
"you use a file extension or mime type not <a href=\"http://codex.wordpress."
|
1004 |
"a>, you will need to filter and manually whitelist the new extension."
|
1005 |
msgstr ""
|
1006 |
|
1007 |
+
#: ../classes/class-ccf-form-manager.php:604
|
1008 |
msgid "Max File Size (in MB):"
|
1009 |
msgstr ""
|
1010 |
|
1011 |
+
#: ../classes/class-ccf-form-manager.php:606
|
1012 |
#, php-format
|
1013 |
msgid ""
|
1014 |
"If left blank, will default to %d MB. Maximum allowed by server is %d MB."
|
1015 |
msgstr ""
|
1016 |
|
1017 |
+
#: ../classes/class-ccf-form-manager.php:632
|
1018 |
msgid ""
|
1019 |
"reCAPTCHA is a simple captcha service provided by Google. <a target=\"_blank"
|
1020 |
"\" href=\"https://www.google.com/recaptcha/intro/index.html\">Learn more</a>"
|
1021 |
msgstr ""
|
1022 |
|
1023 |
+
#: ../classes/class-ccf-form-manager.php:642
|
1024 |
msgid "Site Key:"
|
1025 |
msgstr ""
|
1026 |
|
1027 |
+
#: ../classes/class-ccf-form-manager.php:644
|
1028 |
+
#: ../classes/class-ccf-form-manager.php:649
|
1029 |
msgid "Don't have one?"
|
1030 |
msgstr ""
|
1031 |
|
1032 |
+
#: ../classes/class-ccf-form-manager.php:647
|
1033 |
msgid "Secret Key:"
|
1034 |
msgstr ""
|
1035 |
|
1036 |
+
#: ../classes/class-ccf-form-manager.php:710
|
1037 |
+
#: ../classes/class-ccf-form-manager.php:731
|
1038 |
+
#: ../classes/class-ccf-form-manager.php:756
|
1039 |
+
#: ../classes/class-ccf-form-manager.php:800
|
1040 |
+
#: ../classes/class-ccf-form-manager.php:825
|
1041 |
+
#: ../classes/class-ccf-form-manager.php:861
|
1042 |
+
#: ../classes/class-ccf-form-manager.php:926
|
1043 |
+
#: ../classes/class-ccf-form-manager.php:977
|
1044 |
+
#: ../classes/class-ccf-form-manager.php:1020
|
1045 |
+
#: ../classes/class-ccf-form-manager.php:1084
|
1046 |
+
#: ../classes/class-ccf-form-manager.php:1127
|
1047 |
+
#: ../classes/class-ccf-form-manager.php:1170
|
1048 |
msgid "Basic"
|
1049 |
msgstr ""
|
1050 |
|
1051 |
+
#: ../classes/class-ccf-form-manager.php:713
|
1052 |
msgid "HTML Content:"
|
1053 |
msgstr ""
|
1054 |
|
1055 |
+
#: ../classes/class-ccf-form-manager.php:734
|
1056 |
msgid "Heading:"
|
1057 |
msgstr ""
|
1058 |
|
1059 |
+
#: ../classes/class-ccf-form-manager.php:738
|
1060 |
msgid "Sub Heading:"
|
1061 |
msgstr ""
|
1062 |
|
1063 |
+
#: ../classes/class-ccf-form-manager.php:803
|
1064 |
+
#: ../classes/class-ccf-form-manager.php:828
|
1065 |
+
#: ../classes/class-ccf-form-manager.php:864
|
1066 |
+
#: ../classes/class-ccf-form-manager.php:929
|
1067 |
+
#: ../classes/class-ccf-form-manager.php:980
|
1068 |
+
#: ../classes/class-ccf-form-manager.php:1023
|
1069 |
+
#: ../classes/class-ccf-form-manager.php:1087
|
1070 |
+
#: ../classes/class-ccf-form-manager.php:1130
|
1071 |
+
#: ../classes/class-ccf-form-manager.php:1173
|
1072 |
msgid "Internal Unique Slug (a-z, 0-9, -, _):"
|
1073 |
msgstr ""
|
1074 |
|
1075 |
+
#: ../classes/class-ccf-form-manager.php:890
|
1076 |
msgid "Enable Date Select"
|
1077 |
msgstr ""
|
1078 |
|
1079 |
+
#: ../classes/class-ccf-form-manager.php:894
|
1080 |
msgid "Enable Time Select"
|
1081 |
msgstr ""
|
1082 |
|
1083 |
+
#: ../classes/class-ccf-form-manager.php:898
|
1084 |
msgid "Date Format:"
|
1085 |
msgstr ""
|
1086 |
|
1087 |
+
#: ../classes/class-ccf-form-manager.php:945
|
1088 |
msgid "Format:"
|
1089 |
msgstr ""
|
1090 |
|
1091 |
+
#: ../classes/class-ccf-form-manager.php:948
|
1092 |
+
#: ../classes/class-ccf-form-manager.php:995
|
1093 |
msgid "International"
|
1094 |
msgstr ""
|
1095 |
|
1096 |
+
#: ../classes/class-ccf-form-manager.php:992
|
1097 |
msgid "Type:"
|
1098 |
msgstr ""
|
1099 |
|
1100 |
+
#: ../classes/class-ccf-form-manager.php:994
|
1101 |
msgid "United States"
|
1102 |
msgstr ""
|
1103 |
|
1104 |
+
#: ../classes/class-ccf-form-manager.php:1048
|
1105 |
msgid "Require Confirmation:"
|
1106 |
msgstr ""
|
1107 |
|
1108 |
+
#: ../classes/class-ccf-form-manager.php:1076
|
1109 |
msgid "Label"
|
1110 |
msgstr ""
|
1111 |
|
1112 |
+
#: ../classes/class-ccf-form-manager.php:1077
|
1113 |
msgid "Value"
|
1114 |
msgstr ""
|
1115 |
|
1116 |
+
#: ../classes/class-ccf-form-manager.php:1106
|
1117 |
+
#: ../classes/class-ccf-form-manager.php:1149
|
1118 |
+
#: ../classes/class-ccf-form-manager.php:1192
|
1119 |
msgid "Manage field choices:"
|
1120 |
msgstr ""
|
1121 |
|
1122 |
+
#: ../classes/class-ccf-form-manager.php:1110
|
1123 |
+
#: ../classes/class-ccf-form-manager.php:1153
|
1124 |
+
#: ../classes/class-ccf-form-manager.php:1196
|
1125 |
msgid ""
|
1126 |
"Note: If an option does not have a \"value\", it will not be considered a "
|
1127 |
"valid selection if the field is required. The \"value\" is what's read, "
|
1128 |
"stored, and displayed in the submission."
|
1129 |
msgstr ""
|
1130 |
|
1131 |
+
#: ../classes/class-ccf-form-manager.php:1213
|
1132 |
msgid "You currently have no forms. Add some!"
|
1133 |
msgstr ""
|
1134 |
|
1135 |
+
#: ../classes/class-ccf-form-manager.php:1236
|
1136 |
msgid "Allowed file extensions are {{ extensions }}. "
|
1137 |
msgstr ""
|
1138 |
|
1139 |
+
#: ../classes/class-ccf-form-manager.php:1238
|
1140 |
msgid "Max file size is {{ file_size }} MB. "
|
1141 |
msgstr ""
|
1142 |
|
1143 |
+
#: ../classes/class-ccf-form-manager.php:1263
|
1144 |
+
#: ../classes/class-ccf-form-manager.php:1279
|
1145 |
+
#: ../classes/class-ccf-form-manager.php:1297
|
1146 |
msgid "An example choice"
|
1147 |
msgstr ""
|
1148 |
|
1149 |
+
#: ../classes/class-ccf-form-manager.php:1315
|
1150 |
msgid "Arbitrary block of HTML."
|
1151 |
msgstr ""
|
1152 |
|
1153 |
+
#: ../classes/class-ccf-form-manager.php:1321
|
1154 |
msgid "Section Heading"
|
1155 |
msgstr ""
|
1156 |
|
1157 |
+
#: ../classes/class-ccf-form-manager.php:1323
|
1158 |
msgid "This is the sub-heading text."
|
1159 |
msgstr ""
|
1160 |
|
1161 |
+
#: ../classes/class-ccf-form-manager.php:1494
|
1162 |
msgid "Trash"
|
1163 |
msgstr ""
|
1164 |
|
1165 |
+
#: ../classes/class-ccf-form-manager.php:1537
|
1166 |
msgid "There is a problem with this form. Is it trashed or deleted?"
|
1167 |
msgstr ""
|
1168 |
|
1169 |
+
#: ../classes/class-ccf-form-manager.php:1679
|
1170 |
msgid "IP Address"
|
1171 |
msgstr ""
|
1172 |
|
1173 |
+
#: ../classes/class-ccf-form-manager.php:1691
|
1174 |
msgid "There are no submissions."
|
1175 |
msgstr ""
|
1176 |
|
1177 |
+
#: ../classes/class-ccf-form-manager.php:1720
|
1178 |
msgid "Add Form"
|
1179 |
msgstr ""
|
1180 |
|
1181 |
+
#: ../classes/class-ccf-form-manager.php:1743
|
1182 |
msgid "Single Line Text"
|
1183 |
msgstr ""
|
1184 |
|
1185 |
+
#: ../classes/class-ccf-form-manager.php:1744
|
1186 |
msgid "Dropdown"
|
1187 |
msgstr ""
|
1188 |
|
1189 |
+
#: ../classes/class-ccf-form-manager.php:1745
|
1190 |
msgid "Checkboxes"
|
1191 |
msgstr ""
|
1192 |
|
1193 |
+
#: ../classes/class-ccf-form-manager.php:1746
|
1194 |
msgid "Radio Buttons"
|
1195 |
msgstr ""
|
1196 |
|
1197 |
+
#: ../classes/class-ccf-form-manager.php:1747
|
1198 |
msgid "Paragraph Text"
|
1199 |
msgstr ""
|
1200 |
|
1201 |
+
#: ../classes/class-ccf-form-manager.php:1748
|
1202 |
msgid "Hidden"
|
1203 |
msgstr ""
|
1204 |
|
1205 |
+
#: ../classes/class-ccf-form-manager.php:1749
|
1206 |
msgid "File Upload"
|
1207 |
msgstr ""
|
1208 |
|
1209 |
+
#: ../classes/class-ccf-form-manager.php:1753
|
1210 |
msgid "HTML"
|
1211 |
msgstr ""
|
1212 |
|
1213 |
+
#: ../classes/class-ccf-form-manager.php:1754
|
1214 |
msgid "Section Header"
|
1215 |
msgstr ""
|
1216 |
|
1217 |
+
#: ../classes/class-ccf-form-manager.php:1759
|
1218 |
msgid "Name"
|
1219 |
msgstr ""
|
1220 |
|
1221 |
+
#: ../classes/class-ccf-form-manager.php:1760
|
1222 |
msgid "Date/Time"
|
1223 |
msgstr ""
|
1224 |
|
1225 |
+
#: ../classes/class-ccf-form-manager.php:1761
|
1226 |
msgid "Website"
|
1227 |
msgstr ""
|
1228 |
|
1229 |
+
#: ../classes/class-ccf-form-manager.php:1762
|
1230 |
msgid "Address"
|
1231 |
msgstr ""
|
1232 |
|
1233 |
+
#: ../classes/class-ccf-form-manager.php:1763
|
1234 |
msgid "Phone"
|
1235 |
msgstr ""
|
1236 |
|
1237 |
+
#: ../classes/class-ccf-form-manager.php:1764
|
1238 |
msgid "reCAPTCHA"
|
1239 |
msgstr ""
|
1240 |
|
1241 |
+
#: ../classes/class-ccf-form-manager.php:1797
|
1242 |
msgid "You have no email fields"
|
1243 |
msgstr ""
|
1244 |
|
1245 |
+
#: ../classes/class-ccf-form-manager.php:1798
|
1246 |
msgid "You have no available fields"
|
1247 |
msgstr ""
|
1248 |
|
1249 |
+
#: ../classes/class-ccf-form-manager.php:1799
|
1250 |
msgid "You have no name fields"
|
1251 |
msgstr ""
|
1252 |
|
1253 |
+
#: ../classes/class-ccf-form-manager.php:1800
|
1254 |
msgid "You have no applicable fields"
|
1255 |
msgstr ""
|
1256 |
|
1257 |
+
#: ../classes/class-ccf-form-manager.php:1801
|
1258 |
msgid "Choose a Form Field"
|
1259 |
msgstr ""
|
1260 |
|
1261 |
+
#: ../classes/class-ccf-form-manager.php:1802
|
1262 |
msgid "Invalid date"
|
1263 |
msgstr ""
|
1264 |
|
1265 |
+
#: ../classes/class-ccf-form-manager.php:1804
|
1266 |
msgid "Field Label"
|
1267 |
msgstr ""
|
1268 |
|
1269 |
+
#: ../classes/class-ccf-form-manager.php:1806
|
1270 |
#: ../classes/class-ccf-form-renderer.php:174
|
1271 |
msgid "This form is paused right now. Check back later!"
|
1272 |
msgstr ""
|
1273 |
|
1274 |
+
#: ../classes/class-ccf-form-manager.php:1808
|
1275 |
msgid "Choose a Post Field"
|
1276 |
msgstr ""
|
1277 |
|
1278 |
+
#: ../classes/class-ccf-form-manager.php:1811
|
1279 |
msgid "Post Title"
|
1280 |
msgstr ""
|
1281 |
|
1282 |
+
#: ../classes/class-ccf-form-manager.php:1812
|
1283 |
msgid "Post Content"
|
1284 |
msgstr ""
|
1285 |
|
1286 |
+
#: ../classes/class-ccf-form-manager.php:1813
|
1287 |
msgid "Post Excerpt"
|
1288 |
msgstr ""
|
1289 |
|
1290 |
+
#: ../classes/class-ccf-form-manager.php:1814
|
1291 |
msgid "Post Date"
|
1292 |
msgstr ""
|
1293 |
|
1294 |
+
#: ../classes/class-ccf-form-manager.php:1817
|
1295 |
msgid "Post Tags"
|
1296 |
msgstr ""
|
1297 |
|
1298 |
+
#: ../classes/class-ccf-form-manager.php:1818
|
1299 |
msgid "Custom Field"
|
1300 |
msgstr ""
|
1301 |
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
|
|
4 |
Tags: contact form, web form, custom contact form, custom forms, captcha form, contact fields, form mailers, forms
|
5 |
Requires at least: 3.9
|
6 |
Tested up to: 4.5
|
7 |
-
Stable tag:
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -22,6 +22,8 @@ Custom Contact Forms enables you to build forms and manage submissions the WordP
|
|
22 |
* Forms use AJAX so no page reloads are necessary. Stylish error messages are shown without page reload.
|
23 |
* All form submissions shown in an easy to view format within the WordPress admin.
|
24 |
* Export form submissions to CSV.
|
|
|
|
|
25 |
* Forms can show customizable completion text or redirect to a URL.
|
26 |
* Temporarily pause forms with a customizable pause message.
|
27 |
* Create and manage multiple notifications for each form. Notifications can send emails to one or more administrators or form submittors. Customize notification email subject, from email address, from email name, and email body. Map form fields to email subject, from name, and from email address. Easily activate and deactivate notifications.
|
@@ -53,6 +55,9 @@ For full documentation, questions, feature requests, and support concerning the
|
|
53 |
|
54 |
== Changelog ==
|
55 |
|
|
|
|
|
|
|
56 |
= 7.3.2 =
|
57 |
* Fix field delete variable error message
|
58 |
|
4 |
Tags: contact form, web form, custom contact form, custom forms, captcha form, contact fields, form mailers, forms
|
5 |
Requires at least: 3.9
|
6 |
Tested up to: 4.5
|
7 |
+
Stable tag: trunk
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
22 |
* Forms use AJAX so no page reloads are necessary. Stylish error messages are shown without page reload.
|
23 |
* All form submissions shown in an easy to view format within the WordPress admin.
|
24 |
* Export form submissions to CSV.
|
25 |
+
* Pre-setup for Twitter Bootstrap
|
26 |
+
* Multiple themes to choose from
|
27 |
* Forms can show customizable completion text or redirect to a URL.
|
28 |
* Temporarily pause forms with a customizable pause message.
|
29 |
* Create and manage multiple notifications for each form. Notifications can send emails to one or more administrators or form submittors. Customize notification email subject, from email address, from email name, and email body. Map form fields to email subject, from name, and from email address. Easily activate and deactivate notifications.
|
55 |
|
56 |
== Changelog ==
|
57 |
|
58 |
+
= 7.4 =
|
59 |
+
* Themes and Bootstrap support
|
60 |
+
|
61 |
= 7.3.2 =
|
62 |
* Fix field delete variable error message
|
63 |
|