Custom Contact Forms - Version 7.3

Version Description

  • Add post creation functionality for when forms are submitted
Download this release

Release Info

Developer tlovett1
Plugin Icon 128x128 Custom Contact Forms
Version 7.3
Comparing to
See all releases

Code changes from version 7.2.3 to 7.3

README.md CHANGED
@@ -1,4 +1,4 @@
1
- Custom Contact Forms [![Build Status](https://travis-ci.org/tlovett1/custom-contact-forms.svg?branch=master)](https://travis-ci.org/tlovett1/custom-contact-forms) [![Dockunit Status](https://dockunit.io/svg/tlovett1/custom-contact-forms?master)](https://dockunit.io/projects/tlovett1/custom-contact-forms#master)
2
  ===============
3
 
4
  Build beautiful custom forms the WordPress way.
@@ -79,6 +79,21 @@ will use the CCF default subject. `Custom Subject` will allow you to manually ty
79
 
80
  __Note:__ In order for form notification changes to take affect, you will need to save the form.
81
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
82
 
83
 
84
  ### Fields
1
+ Custom Contact Forms [![Build Status](https://travis-ci.org/tlovett1/custom-contact-forms.svg?branch=master)](https://travis-ci.org/tlovett1/custom-contact-forms)
2
  ===============
3
 
4
  Build beautiful custom forms the WordPress way.
79
 
80
  __Note:__ In order for form notification changes to take affect, you will need to save the form.
81
 
82
+ #### Post Creation
83
+
84
+ For each of your forms, you can have a post (or custom post type) created every time someone submits the form. This is an extremely powerful feature.
85
+
86
+ * `Enable Post Creation` - Selecting `Yes` will enable post creation. Note that posts won't start creating until you map some fields.
87
+ * `Post Type` - You can choose the type of post type that will be created with each submission. This defaults to `post`.
88
+ * `Post Status` - You can choose the status (publish, draft, etc.) of the post that will be created with each submission. This defaults to `draft`.
89
+ * `Field Mappings` - You will need to map your form fields to the appropriate post fields. The available post fields are as possible:
90
+
91
+ * `Post Title` - Selecting this post field will map your form field to the title of the post.
92
+ * `Post Content` - Selecting this post field will map your form field to the content of the post.
93
+ * `Post Excerpt` - Selecting this post field will map your form field to the excerpt of the post.
94
+ * `Post Date` - Selecting this post field will map your form field to the publish date of the post.
95
+ * `Post Tags` - Selecting this post field will map your form field to the tags of the post.
96
+ * `Custom Field` - Selecting this post field will map your form field to a custom field of the post. If you use `Custom Field`, you will need to choose a custom field key.
97
 
98
 
99
  ### Fields
build/css/form-manager.css CHANGED
@@ -350,6 +350,14 @@
350
  color: inherit; }
351
  .ccf-main-modal .ccf-form-pane .ccf-form-settings .delete-notification {
352
  color: red; }
 
 
 
 
 
 
 
 
353
  .ccf-main-modal .ccf-form-pane .left-sidebar {
354
  box-sizing: border-box;
355
  background-color: #f3f3f3;
350
  color: inherit; }
351
  .ccf-main-modal .ccf-form-pane .ccf-form-settings .delete-notification {
352
  color: red; }
353
+ .ccf-main-modal .ccf-form-pane .ccf-form-settings .address .add,
354
+ .ccf-main-modal .ccf-form-pane .ccf-form-settings .address .delete,
355
+ .ccf-main-modal .ccf-form-pane .ccf-form-settings .field-mapping .add,
356
+ .ccf-main-modal .ccf-form-pane .ccf-form-settings .field-mapping .delete {
357
+ color: inherit;
358
+ vertical-align: middle; }
359
+ .ccf-main-modal .ccf-form-pane .ccf-form-settings .post-creation-mapping-wrapper {
360
+ margin-top: 1em; }
361
  .ccf-main-modal .ccf-form-pane .left-sidebar {
362
  box-sizing: border-box;
363
  background-color: #f3f3f3;
build/css/form-manager.css.map CHANGED
@@ -1,6 +1,6 @@
1
  {
2
  "version": 3,
3
- "mappings": ";AAAA,UASC;EARA,WAAW,EAAE,MAAM;EACnB,GAAG,EAAC,2BAA2B;EAC/B,GAAG,EAAC,mNAGkD;EACtD,WAAW,EAAE,MAAM;EACnB,UAAU,EAAE,MAAM;AAGnB,UASC;EARA,WAAW,EAAE,cAAc;EAC3B,GAAG,EAAC,mCAAmC;EACvC,GAAG,EAAC,mPAG0D;EAC9D,WAAW,EAAE,MAAM;EACnB,UAAU,EAAE,MAAM;AAGnB,6BAA8B;EAC7B,WAAW,EAAE,MAAM;EACnB,OAAO,EAAE,GAAG;EACZ,aAAa,EAAE,GAAG;EAClB,KAAK,EAAE,IAAI;EACX,WAAW,EAAE,MAAM;EACnB,YAAY,EA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AAE,KAAK;IACf,GAAG,EAAE,GAAG;IACR,IAAI,EAAE,GAAG;IACT,KAAK,EAAE,KAAK;IACZ,WAAW,EAAE,MAAM;IACnB,UAAU,EAAE,IAAI;IAChB,kBAAkB,EAAE,4BAA8B;IAClD,UAAU,EAAE,4BAA8B;IAC1C,WAAW,EAAE,GAAG;IAChB,OAAO,EAAE,OAAO;IAEhB,4CAAO;MACN,SAAS,EAAE,IAAI;MACf,QAAQ,EAAE,QAAQ;MAClB,KAAK,EAAE,IAAI;MACX,MAAM,EAAE,OAAO;IAGhB,8CAAS;MACR,MAAM,EAAE,IAAI;MAEZ,qDAAO;QACN,KAAK,EAAE,OAAO;QACd,SAAS,EAAE,KAAK;QAChB,MAAM,EAAE,SAAS;MAGlB,iDAAG;QACF,WAAW,EAAE,IAAI;MAGlB,oDAAM;QACL,eAAe,EAAE,IAAI",
4
  "sources": ["../../scss/form-manager.scss"],
5
  "names": [],
6
  "file": "form-manager.css"
build/css/form-manager.min.css CHANGED
@@ -1 +1 @@
1
- @charset "UTF-8";@font-face{font-family:menu;src:url(../../fonts/menu.eot);src:url(../../fonts/menu.eot?#iefix) format("embedded-opentype"),url(../../fonts/menu.woff) format("woff"),url(../../fonts/menu.ttf) format("truetype"),url(../../fonts/menu.svg#form-manager) format("svg");font-weight:400;font-style:normal}@font-face{font-family:form-manager;src:url(../../fonts/form-manager.eot);src:url(../../fonts/form-manager.eot?#iefix) format("embedded-opentype"),url(../../fonts/form-manager.woff) format("woff"),url(../../fonts/form-manager.ttf) format("truetype"),url(../../fonts/form-manager.svg#form-manager) format("svg");font-weight:400;font-style:normal}.ccf-open-form-manager:before{font-family:menu;content:"";padding-right:4px;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;cursor:pointer;-webkit-font-smoothing:antialiased}.ccf-main-modal{display:none;position:fixed;top:30px;left:30px;right:30px;bottom:30px;z-index:160000;overflow:hidden;background-color:#fff}.ccf-main-modal [data-icon]:before{font-family:form-manager;content:attr(data-icon);speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;cursor:pointer;-webkit-font-smoothing:antialiased}.ccf-main-modal .single .insert-form-button{display:none}.ccf-main-modal .hidden{display:block}.ccf-main-modal .field{margin-bottom:5px;overflow:auto}.ccf-main-modal .field.field-incomplete h4{background-color:#ffebe8}.ccf-main-modal .field.field-duplicate-slug h4{background-color:#ffe6a5}.ccf-main-modal .field.ccf-editing{border:#999 1px solid}.ccf-main-modal .field.ccf-editing h4:hover{border:1px solid #e5e5e5}.ccf-main-modal .field h4{-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);border:1px solid #e5e5e5;background:#fafafa;font-size:13px;margin:0;font-weight:600;color:#222;padding:13px;cursor:move}.ccf-main-modal .field h4:hover{border:#999 1px solid}.ccf-main-modal .field .right{float:right;display:block}.ccf-main-modal .field .right a{color:inherit;margin-left:3px}.ccf-main-modal .field .preview{clear:both;display:none;text-align:left;overflow:auto;float:none;background-color:#fff;border-left:1px solid #e5e5e5;border-right:1px solid #e5e5e5;border-bottom:1px solid #e5e5e5;padding:10px 20px}.ccf-main-modal .field .preview .recaptcha-preview-img{margin-top:7px}.ccf-main-modal .field .preview .field-description{margin-top:3px;clear:left}.ccf-main-modal .field .preview .left{float:left;clear:both;width:47%}.ccf-main-modal .field .preview .right{float:right;width:47%}.ccf-main-modal .field .preview .full input[type=text],.ccf-main-modal .field .preview .full select,.ccf-main-modal .field .preview .left input[type=text],.ccf-main-modal .field .preview .left select,.ccf-main-modal .field .preview .right input[type=text],.ccf-main-modal .field .preview .right select{width:100%;max-width:100%}.ccf-main-modal .field .preview .full .sub-label,.ccf-main-modal .field .preview .left .sub-label,.ccf-main-modal .field .preview .right .sub-label{margin:3px 0 3px 2px;font-size:90%}.ccf-main-modal .field .preview .full .hour,.ccf-main-modal .field .preview .full .minute,.ccf-main-modal .field .preview .left .hour,.ccf-main-modal .field .preview .left .minute,.ccf-main-modal .field .preview .right .hour,.ccf-main-modal .field .preview .right .minute{display:inline-block;margin-right:5px}.ccf-main-modal .field .preview .full .hour input,.ccf-main-modal .field .preview .full .minute input,.ccf-main-modal .field .preview .left .hour input,.ccf-main-modal .field .preview .left .minute input,.ccf-main-modal .field .preview .right .hour input,.ccf-main-modal .field .preview .right .minute input{width:35px}.ccf-main-modal .field .preview .full .am-pm,.ccf-main-modal .field .preview .left .am-pm,.ccf-main-modal .field .preview .right .am-pm{display:inline-block;vertical-align:top}.ccf-main-modal .field .preview .full .am-pm select,.ccf-main-modal .field .preview .left .am-pm select,.ccf-main-modal .field .preview .right .am-pm select{width:60px}.ccf-main-modal .field .preview .heading{font-size:125%;font-weight:700;border-bottom:1px solid #ccc;padding-bottom:9px;margin-bottom:9px}.ccf-main-modal .field .preview .subheading{font-style:italic}.ccf-main-modal .field .preview label{font-weight:700;margin-bottom:3px;cursor:inherit}.ccf-main-modal .field .preview label span{color:red}.ccf-main-modal .field .preview input[type=checkbox]+label,.ccf-main-modal .field .preview input[type=radio]+label{display:inline-block}.ccf-main-modal .field .preview input[type=text],.ccf-main-modal .field .preview textarea{width:100%;background-color:#fff;color:#333;border:1px solid #ddd;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.07);box-shadow:inset 0 1px 2px rgba(0,0,0,.07)}.ccf-main-modal .field .preview textarea{height:60px}.ccf-main-modal .close-icon{position:absolute;top:16px;right:16px;font-size:35px;cursor:pointer;color:#333;z-index:160001}.ccf-main-modal .main-menu{position:absolute;top:0;right:0;left:0;height:125px}.ccf-main-modal .main-menu h1{padding:16px}.ccf-main-modal .main-menu ul{height:40px;box-sizing:border-box;font-size:14px;margin:0;list-style-type:none;border-top:1px solid #ddd;background:#f3f3f3;padding:0 16px}.ccf-main-modal .main-menu ul li{margin:0;display:inline-block;height:38px;vertical-align:middle;line-height:40px;padding:0 8px}.ccf-main-modal .main-menu ul li a{text-decoration:none}.ccf-main-modal .main-menu ul li a :hover,.ccf-main-modal .main-menu ul li a.selected{color:#000}.ccf-main-modal .ccf-form-pane{display:none;position:absolute;top:125px;right:0;left:0;bottom:0}.ccf-main-modal .ccf-form-pane.single{top:85px;border-top:1px solid #e5e5e5}.ccf-main-modal .ccf-form-pane.single .form-content,.ccf-main-modal .ccf-form-pane.single .left-sidebar{border-top:0}.ccf-main-modal .ccf-form-pane .disabled-overlay{position:absolute;top:0;left:0;right:0;bottom:50px;background-color:#000;opacity:.1;-ms-filter:"alpha(Opacity=1)";filter:alpha(opacity=1);-moz-opacity:.1;-khtml-opacity:.1;z-index:3;display:none}.ccf-main-modal .ccf-form-pane .bottom{bottom:0;left:0;right:0;height:50px;padding:0 16px 0 0;position:absolute;text-align:right;line-height:50px;border-top:1px solid #e5e5e5}.ccf-main-modal .ccf-form-pane .bottom .left{float:left;background-color:#00a0d2;padding-left:16px;padding-right:16px;color:#fff}@media (max-width:830px){.ccf-main-modal .ccf-form-pane .bottom .left{display:none}}.ccf-main-modal .ccf-form-pane .bottom .left input{vertical-align:middle;margin-left:5px}.ccf-main-modal .ccf-form-pane .bottom .left button{vertical-align:middle}.ccf-main-modal .ccf-form-pane .bottom .left .signup-x{color:red;display:none;font-size:150%;vertical-align:middle;font-weight:700;margin-left:4px}.ccf-main-modal .ccf-form-pane .bottom .left .signup-check{color:green;display:none;vertical-align:middle;font-size:150%;font-weight:700;margin-left:4px}.ccf-main-modal .ccf-form-pane .bottom .left.signup-error .signup-x,.ccf-main-modal .ccf-form-pane .bottom .left.signup-success .signup-check{display:inline}.ccf-main-modal .ccf-form-pane .bottom .spinner{display:none;visibility:visible;float:right;width:16px;height:16px;margin-top:16px}.ccf-main-modal .ccf-form-pane .bottom input[type=button]{margin-top:11px;float:right;margin-left:6px}.ccf-main-modal .ccf-form-pane .accordion-section{background-color:#fff;border-bottom:0}.ccf-main-modal .ccf-form-pane .accordion-section:first-child{border-top:1px solid #e5e5e5}.ccf-main-modal .ccf-form-pane .accordion-section.expanded .section-content{display:block}.ccf-main-modal .ccf-form-pane .accordion-section.expanded .accordion-heading:before{content:""}.ccf-main-modal .ccf-form-pane .accordion-section.expanded .form-settings-heading:before{content:""}.ccf-main-modal .ccf-form-pane .accordion-section .accordion-heading,.ccf-main-modal .ccf-form-pane .accordion-section .form-settings-heading{cursor:pointer;display:block;line-height:29px;color:inherit;padding:10px 20px;border-bottom:1px solid #e5e5e5;font-size:150%;background-color:#fafafa;margin:0}.ccf-main-modal .ccf-form-pane .accordion-section .accordion-heading:before,.ccf-main-modal .ccf-form-pane .accordion-section .form-settings-heading:before{margin-right:8px;font-family:form-manager;content:"";speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;cursor:pointer;-webkit-font-smoothing:antialiased}.ccf-main-modal .ccf-form-pane .accordion-section .section-content{display:none;padding:10px 20px;border-bottom:1px solid #e5e5e5}.ccf-main-modal .ccf-form-pane label{display:block;margin-bottom:8px}.ccf-main-modal .ccf-form-pane .explain{margin-top:5px;font-style:italic;display:block}.ccf-main-modal .ccf-form-pane.show-form-settings .ccf-form-settings{display:block}.ccf-main-modal .ccf-form-pane .ccf-form-settings{display:none;position:absolute;width:75%;bottom:50px;left:25%;z-index:2;top:0;overflow:auto;background-color:#fff;border-top:1px solid #ddd;padding:21px;box-sizing:border-box}.ccf-main-modal .ccf-form-pane .ccf-form-settings h3:first-child,.ccf-main-modal .ccf-form-pane .ccf-form-settings p:first-child{margin-top:0}.ccf-main-modal .ccf-form-pane .ccf-form-settings h3{border-bottom:1px solid #ccc;padding-bottom:.75em;margin-top:2em}.ccf-main-modal .ccf-form-pane .ccf-form-settings .ccf-form-notifications td{position:relative}.ccf-main-modal .ccf-form-pane .ccf-form-settings .ccf-form-notifications .active{width:15%}.ccf-main-modal .ccf-form-pane .ccf-form-settings .ccf-form-notifications .active-indicator{color:#33CA33;font-size:40px}.ccf-main-modal .ccf-form-pane .ccf-form-settings .ccf-form-notifications .inactive-indicator{color:red;font-size:40px}.ccf-main-modal .ccf-form-pane .ccf-form-settings .ccf-form-notifications .add-notification{margin-top:1em;cursor:pointer}.ccf-main-modal .ccf-form-pane .ccf-form-settings .close-notification{position:absolute;top:10px;right:10px;cursor:pointer;font-size:200%;color:inherit}.ccf-main-modal .ccf-form-pane .ccf-form-settings .delete-notification{color:red}.ccf-main-modal .ccf-form-pane .left-sidebar{box-sizing:border-box;background-color:#f3f3f3;position:absolute;border-top:1px solid #ddd;border-right:1px solid #ddd;width:25%;top:0;padding:0;bottom:50px;left:0;overflow:auto}.ccf-main-modal .ccf-form-pane .left-sidebar .accordion-section:first-child{border-top:0}.ccf-main-modal .ccf-form-pane .left-sidebar .fields,.ccf-main-modal .ccf-form-pane .left-sidebar .special-fields,.ccf-main-modal .ccf-form-pane .left-sidebar .structure-fields{padding:5px}.ccf-main-modal .ccf-form-pane .left-sidebar .fields .field .preview,.ccf-main-modal .ccf-form-pane .left-sidebar .fields .field .right,.ccf-main-modal .ccf-form-pane .left-sidebar .special-fields .field .preview,.ccf-main-modal .ccf-form-pane .left-sidebar .special-fields .field .right,.ccf-main-modal .ccf-form-pane .left-sidebar .structure-fields .field .preview,.ccf-main-modal .ccf-form-pane .left-sidebar .structure-fields .field .right{display:none}.ccf-main-modal .ccf-form-pane .form-content{box-sizing:border-box;position:absolute;width:40%;bottom:50px;left:25%;right:35%;top:0;overflow:auto;border-top:1px solid #ddd;padding:21px}.ccf-main-modal .ccf-form-pane .form-content .field-placeholder{border:1px dashed #e5e5e5;height:46px;margin-bottom:5px}.ccf-main-modal .ccf-form-pane .form-content .no-fields{font-size:22px;padding:16px;font-style:italic}.ccf-main-modal .ccf-form-pane .form-content:after{width:100%;display:block;margin-top:5px;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;font-style:italic;font-size:22px;text-align:center;padding:1em .5em;border:4px dashed #e5e5e5;content:attr(data-drag-message)}.ccf-main-modal .ccf-form-pane .right-sidebar{box-sizing:border-box;padding:0;position:absolute;width:35%;top:0;overflow:auto;background-color:#f3f3f3;right:0;bottom:50px;border-left:1px solid #ddd}.ccf-main-modal .ccf-form-pane .right-sidebar .section-content>div{margin-bottom:6px}.ccf-main-modal .ccf-form-pane .right-sidebar .no-field{padding:16px;font-style:italic;font-size:22px}.ccf-main-modal .ccf-form-pane .right-sidebar label{display:inline-block;margin:0}.ccf-main-modal .ccf-form-pane .right-sidebar label .required{color:red}.ccf-main-modal .ccf-form-pane .right-sidebar .field-error input{border-color:red;border-width:2px}.ccf-main-modal .ccf-form-pane .right-sidebar .field-duplicate-slug input{border-color:#ffe6a5;border-width:2px}.ccf-main-modal .ccf-form-pane .right-sidebar input[type=text]{width:100%;display:block;margin-top:5px}.ccf-main-modal .ccf-form-pane .right-sidebar input[type=checkbox]+label{display:inline-block;vertical-align:middle}.ccf-main-modal .ccf-form-pane .right-sidebar label+select{display:inline-block}.ccf-main-modal .ccf-form-pane .right-sidebar textarea{width:100%;height:80px;margin-top:5px}.ccf-main-modal .ccf-form-pane .right-sidebar .field-html{height:150px;width:100%}.ccf-main-modal .ccf-form-pane .right-sidebar .repeatable-choices .choice input[type=text]{width:100px;display:inline-block}.ccf-main-modal .ccf-form-pane .right-sidebar .repeatable-choices .choice .move{color:inherit;cursor:move}.ccf-main-modal .ccf-form-pane .right-sidebar .repeatable-choices .choice .move:before{cursor:move}.ccf-main-modal .ccf-form-pane .right-sidebar .repeatable-choices .choice .add,.ccf-main-modal .ccf-form-pane .right-sidebar .repeatable-choices .choice .delete{cursor:pointer;color:inherit}.ccf-main-modal .ccf-existing-form-pane{display:none;position:absolute;overflow:scroll;top:125px;right:0;left:0;bottom:0;background-color:#fff;padding:16px}.ccf-main-modal .ccf-existing-form-pane table,.ccf-main-modal .ccf-form-notifications table{width:100%;border-collapse:collapse;table-layout:fixed;border:1px solid #ddd}.ccf-main-modal .ccf-existing-form-pane table .left,.ccf-main-modal .ccf-form-notifications table .left{float:left;width:50%;padding-right:10px;box-sizing:border-box}.ccf-main-modal .ccf-existing-form-pane table .left textarea,.ccf-main-modal .ccf-form-notifications table .left textarea{width:100%;height:300px}.ccf-main-modal .ccf-existing-form-pane table .right,.ccf-main-modal .ccf-form-notifications table .right{padding-left:10px;box-sizing:border-box;float:right;width:50%}.ccf-main-modal .ccf-existing-form-pane table td,.ccf-main-modal .ccf-form-notifications table td{margin:0;padding:14px 21px;text-align:left}.ccf-main-modal .ccf-existing-form-pane table .empty-form-table,.ccf-main-modal .ccf-existing-form-pane table .no-notifications,.ccf-main-modal .ccf-form-notifications table .empty-form-table,.ccf-main-modal .ccf-form-notifications table .no-notifications{text-align:center}.ccf-main-modal .ccf-existing-form-pane table tfoot,.ccf-main-modal .ccf-existing-form-pane table thead,.ccf-main-modal .ccf-form-notifications table tfoot,.ccf-main-modal .ccf-form-notifications table thead{background-color:#f0f0f0}.ccf-main-modal .ccf-existing-form-pane table tfoot tr,.ccf-main-modal .ccf-existing-form-pane table thead tr,.ccf-main-modal .ccf-form-notifications table tfoot tr,.ccf-main-modal .ccf-form-notifications table thead tr{border-bottom:1px solid #e5e5e5;border-top:1px solid #e5e5e5}.ccf-main-modal .ccf-existing-form-pane table tfoot th,.ccf-main-modal .ccf-existing-form-pane table thead th,.ccf-main-modal .ccf-form-notifications table tfoot th,.ccf-main-modal .ccf-form-notifications table thead th{margin:0;text-align:left;padding:14px 21px;box-sizing:border-box}.ccf-main-modal .ccf-existing-form-pane table tfoot .id,.ccf-main-modal .ccf-existing-form-pane table thead .id,.ccf-main-modal .ccf-form-notifications table tfoot .id,.ccf-main-modal .ccf-form-notifications table thead .id{width:5%}.ccf-main-modal .ccf-existing-form-pane table tfoot .title,.ccf-main-modal .ccf-existing-form-pane table thead .title,.ccf-main-modal .ccf-form-notifications table tfoot .title,.ccf-main-modal .ccf-form-notifications table thead .title{width:30%}.ccf-main-modal .ccf-existing-form-pane table tfoot .author,.ccf-main-modal .ccf-existing-form-pane table tfoot .entries,.ccf-main-modal .ccf-existing-form-pane table tfoot .submissions,.ccf-main-modal .ccf-existing-form-pane table thead .author,.ccf-main-modal .ccf-existing-form-pane table thead .entries,.ccf-main-modal .ccf-existing-form-pane table thead .submissions,.ccf-main-modal .ccf-form-notifications table tfoot .author,.ccf-main-modal .ccf-form-notifications table tfoot .entries,.ccf-main-modal .ccf-form-notifications table tfoot .submissions,.ccf-main-modal .ccf-form-notifications table thead .author,.ccf-main-modal .ccf-form-notifications table thead .entries,.ccf-main-modal .ccf-form-notifications table thead .submissions{width:10%}.ccf-main-modal .ccf-existing-form-pane table tfoot .number-of-fields,.ccf-main-modal .ccf-existing-form-pane table thead .number-of-fields,.ccf-main-modal .ccf-form-notifications table tfoot .number-of-fields,.ccf-main-modal .ccf-form-notifications table thead .number-of-fields{width:15%}.ccf-main-modal .ccf-existing-form-pane table tfoot .date,.ccf-main-modal .ccf-existing-form-pane table thead .date,.ccf-main-modal .ccf-form-notifications table tfoot .date,.ccf-main-modal .ccf-form-notifications table thead .date{width:20%}.ccf-main-modal .ccf-existing-form-pane table tbody tr:nth-child(odd),.ccf-main-modal .ccf-form-notifications table tbody tr:nth-child(odd){background-color:#fafafa;margin:0}.ccf-main-modal .ccf-existing-form-pane table tbody tr,.ccf-main-modal .ccf-form-notifications table tbody tr{background-color:#fff}.ccf-main-modal .ccf-existing-form-pane table tbody td,.ccf-main-modal .ccf-form-notifications table tbody td{vertical-align:top}.ccf-main-modal .ccf-existing-form-pane table tbody td a,.ccf-main-modal .ccf-form-notifications table tbody td a{text-decoration:none;cursor:pointer}.ccf-main-modal .ccf-existing-form-pane table tbody td .title,.ccf-main-modal .ccf-form-notifications table tbody td .title{font-weight:700;font-size:14px}.ccf-main-modal .ccf-existing-form-pane table tbody td .actions,.ccf-main-modal .ccf-form-notifications table tbody td .actions{visibility:hidden;margin-top:6px}.ccf-main-modal .ccf-existing-form-pane table tbody td .actions .delete,.ccf-main-modal .ccf-form-notifications table tbody td .actions .delete{color:red}.ccf-main-modal .ccf-existing-form-pane table tbody tr:hover td .actions,.ccf-main-modal .ccf-form-notifications table tbody tr:hover td .actions{visibility:visible}.ccf-main-modal-overlay{display:none;position:fixed;top:0;left:0;width:100%;height:100%;z-index:159900;opacity:.7;-ms-filter:"alpha(Opacity=70)";filter:alpha(opacity=70);-moz-opacity:.7;-khtml-opacity:.7;background-color:#000}.ccf-pagination{font-size:12px;margin-top:8px;text-align:right}.ccf-pagination .pages{padding:0 4px}.ccf-pagination .num-items{font-style:italic;padding-right:4px}.ccf-pagination a{cursor:pointer;color:#0074a2;background:#f0f0f0;text-decoration:none}.ccf-pagination a.first,.ccf-pagination a.last,.ccf-pagination a.next,.ccf-pagination a.prev{font-size:16px;line-height:22px;padding:0 7px 2px}.ccf-pagination a.first:hover,.ccf-pagination a.last:hover,.ccf-pagination a.next:hover,.ccf-pagination a.prev:hover{color:#fff;background-color:#2ea2cc}.ccf-pagination a.disabled{color:#aaa}.ccf-pagination a.disabled:hover{color:#aaa;background:#f0f0f0}.ccf-error-modal{display:none}.ccf-error-modal.show{display:block}.ccf-error-modal .ccf-notification-dialog-background{position:fixed;top:0;left:0;right:0;bottom:0;background:#000;opacity:.7;filter:alpha(opacity=70);z-index:1000000}.ccf-error-modal .notification-dialog{position:fixed;top:30%;left:50%;width:450px;margin-left:-225px;background:#fff;-webkit-box-shadow:0 3px 6px rgba(0,0,0,.3);box-shadow:0 3px 6px rgba(0,0,0,.3);line-height:1.5;z-index:1000005}.ccf-error-modal .notification-dialog .close{font-size:25px;position:absolute;right:10px;cursor:pointer}.ccf-error-modal .notification-dialog .message{margin:25px}.ccf-error-modal .notification-dialog .message .title{color:#23282d;font-size:1.3em;margin:0 0 1em}.ccf-error-modal .notification-dialog .message ul{margin-left:25px}.ccf-error-modal .notification-dialog .message ul li{list-style-type:disc}
1
+ @charset "UTF-8";@font-face{font-family:menu;src:url(../../fonts/menu.eot);src:url(../../fonts/menu.eot?#iefix) format("embedded-opentype"),url(../../fonts/menu.woff) format("woff"),url(../../fonts/menu.ttf) format("truetype"),url(../../fonts/menu.svg#form-manager) format("svg");font-weight:400;font-style:normal}@font-face{font-family:form-manager;src:url(../../fonts/form-manager.eot);src:url(../../fonts/form-manager.eot?#iefix) format("embedded-opentype"),url(../../fonts/form-manager.woff) format("woff"),url(../../fonts/form-manager.ttf) format("truetype"),url(../../fonts/form-manager.svg#form-manager) format("svg");font-weight:400;font-style:normal}.ccf-open-form-manager:before{font-family:menu;content:"";padding-right:4px;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;cursor:pointer;-webkit-font-smoothing:antialiased}.ccf-main-modal{display:none;position:fixed;top:30px;left:30px;right:30px;bottom:30px;z-index:160000;overflow:hidden;background-color:#fff}.ccf-main-modal [data-icon]:before{font-family:form-manager;content:attr(data-icon);speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;cursor:pointer;-webkit-font-smoothing:antialiased}.ccf-main-modal .single .insert-form-button{display:none}.ccf-main-modal .hidden{display:block}.ccf-main-modal .field{margin-bottom:5px;overflow:auto}.ccf-main-modal .field.field-incomplete h4{background-color:#ffebe8}.ccf-main-modal .field.field-duplicate-slug h4{background-color:#ffe6a5}.ccf-main-modal .field.ccf-editing{border:#999 1px solid}.ccf-main-modal .field.ccf-editing h4:hover{border:1px solid #e5e5e5}.ccf-main-modal .field h4{-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);border:1px solid #e5e5e5;background:#fafafa;font-size:13px;margin:0;font-weight:600;color:#222;padding:13px;cursor:move}.ccf-main-modal .field h4:hover{border:#999 1px solid}.ccf-main-modal .field .right{float:right;display:block}.ccf-main-modal .field .right a{color:inherit;margin-left:3px}.ccf-main-modal .field .preview{clear:both;display:none;text-align:left;overflow:auto;float:none;background-color:#fff;border-left:1px solid #e5e5e5;border-right:1px solid #e5e5e5;border-bottom:1px solid #e5e5e5;padding:10px 20px}.ccf-main-modal .field .preview .recaptcha-preview-img{margin-top:7px}.ccf-main-modal .field .preview .field-description{margin-top:3px;clear:left}.ccf-main-modal .field .preview .left{float:left;clear:both;width:47%}.ccf-main-modal .field .preview .right{float:right;width:47%}.ccf-main-modal .field .preview .full input[type=text],.ccf-main-modal .field .preview .full select,.ccf-main-modal .field .preview .left input[type=text],.ccf-main-modal .field .preview .left select,.ccf-main-modal .field .preview .right input[type=text],.ccf-main-modal .field .preview .right select{width:100%;max-width:100%}.ccf-main-modal .field .preview .full .sub-label,.ccf-main-modal .field .preview .left .sub-label,.ccf-main-modal .field .preview .right .sub-label{margin:3px 0 3px 2px;font-size:90%}.ccf-main-modal .field .preview .full .hour,.ccf-main-modal .field .preview .full .minute,.ccf-main-modal .field .preview .left .hour,.ccf-main-modal .field .preview .left .minute,.ccf-main-modal .field .preview .right .hour,.ccf-main-modal .field .preview .right .minute{display:inline-block;margin-right:5px}.ccf-main-modal .field .preview .full .hour input,.ccf-main-modal .field .preview .full .minute input,.ccf-main-modal .field .preview .left .hour input,.ccf-main-modal .field .preview .left .minute input,.ccf-main-modal .field .preview .right .hour input,.ccf-main-modal .field .preview .right .minute input{width:35px}.ccf-main-modal .field .preview .full .am-pm,.ccf-main-modal .field .preview .left .am-pm,.ccf-main-modal .field .preview .right .am-pm{display:inline-block;vertical-align:top}.ccf-main-modal .field .preview .full .am-pm select,.ccf-main-modal .field .preview .left .am-pm select,.ccf-main-modal .field .preview .right .am-pm select{width:60px}.ccf-main-modal .field .preview .heading{font-size:125%;font-weight:700;border-bottom:1px solid #ccc;padding-bottom:9px;margin-bottom:9px}.ccf-main-modal .field .preview .subheading{font-style:italic}.ccf-main-modal .field .preview label{font-weight:700;margin-bottom:3px;cursor:inherit}.ccf-main-modal .field .preview label span{color:red}.ccf-main-modal .field .preview input[type=checkbox]+label,.ccf-main-modal .field .preview input[type=radio]+label{display:inline-block}.ccf-main-modal .field .preview input[type=text],.ccf-main-modal .field .preview textarea{width:100%;background-color:#fff;color:#333;border:1px solid #ddd;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.07);box-shadow:inset 0 1px 2px rgba(0,0,0,.07)}.ccf-main-modal .field .preview textarea{height:60px}.ccf-main-modal .close-icon{position:absolute;top:16px;right:16px;font-size:35px;cursor:pointer;color:#333;z-index:160001}.ccf-main-modal .main-menu{position:absolute;top:0;right:0;left:0;height:125px}.ccf-main-modal .main-menu h1{padding:16px}.ccf-main-modal .main-menu ul{height:40px;box-sizing:border-box;font-size:14px;margin:0;list-style-type:none;border-top:1px solid #ddd;background:#f3f3f3;padding:0 16px}.ccf-main-modal .main-menu ul li{margin:0;display:inline-block;height:38px;vertical-align:middle;line-height:40px;padding:0 8px}.ccf-main-modal .main-menu ul li a{text-decoration:none}.ccf-main-modal .main-menu ul li a :hover,.ccf-main-modal .main-menu ul li a.selected{color:#000}.ccf-main-modal .ccf-form-pane{display:none;position:absolute;top:125px;right:0;left:0;bottom:0}.ccf-main-modal .ccf-form-pane.single{top:85px;border-top:1px solid #e5e5e5}.ccf-main-modal .ccf-form-pane.single .form-content,.ccf-main-modal .ccf-form-pane.single .left-sidebar{border-top:0}.ccf-main-modal .ccf-form-pane .disabled-overlay{position:absolute;top:0;left:0;right:0;bottom:50px;background-color:#000;opacity:.1;-ms-filter:"alpha(Opacity=1)";filter:alpha(opacity=1);-moz-opacity:.1;-khtml-opacity:.1;z-index:3;display:none}.ccf-main-modal .ccf-form-pane .bottom{bottom:0;left:0;right:0;height:50px;padding:0 16px 0 0;position:absolute;text-align:right;line-height:50px;border-top:1px solid #e5e5e5}.ccf-main-modal .ccf-form-pane .bottom .left{float:left;background-color:#00a0d2;padding-left:16px;padding-right:16px;color:#fff}@media (max-width:830px){.ccf-main-modal .ccf-form-pane .bottom .left{display:none}}.ccf-main-modal .ccf-form-pane .bottom .left input{vertical-align:middle;margin-left:5px}.ccf-main-modal .ccf-form-pane .bottom .left button{vertical-align:middle}.ccf-main-modal .ccf-form-pane .bottom .left .signup-x{color:red;display:none;font-size:150%;vertical-align:middle;font-weight:700;margin-left:4px}.ccf-main-modal .ccf-form-pane .bottom .left .signup-check{color:green;display:none;vertical-align:middle;font-size:150%;font-weight:700;margin-left:4px}.ccf-main-modal .ccf-form-pane .bottom .left.signup-error .signup-x,.ccf-main-modal .ccf-form-pane .bottom .left.signup-success .signup-check{display:inline}.ccf-main-modal .ccf-form-pane .bottom .spinner{display:none;visibility:visible;float:right;width:16px;height:16px;margin-top:16px}.ccf-main-modal .ccf-form-pane .bottom input[type=button]{margin-top:11px;float:right;margin-left:6px}.ccf-main-modal .ccf-form-pane .accordion-section{background-color:#fff;border-bottom:0}.ccf-main-modal .ccf-form-pane .accordion-section:first-child{border-top:1px solid #e5e5e5}.ccf-main-modal .ccf-form-pane .accordion-section.expanded .section-content{display:block}.ccf-main-modal .ccf-form-pane .accordion-section.expanded .accordion-heading:before{content:""}.ccf-main-modal .ccf-form-pane .accordion-section.expanded .form-settings-heading:before{content:""}.ccf-main-modal .ccf-form-pane .accordion-section .accordion-heading,.ccf-main-modal .ccf-form-pane .accordion-section .form-settings-heading{cursor:pointer;display:block;line-height:29px;color:inherit;padding:10px 20px;border-bottom:1px solid #e5e5e5;font-size:150%;background-color:#fafafa;margin:0}.ccf-main-modal .ccf-form-pane .accordion-section .accordion-heading:before,.ccf-main-modal .ccf-form-pane .accordion-section .form-settings-heading:before{margin-right:8px;font-family:form-manager;content:"";speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;cursor:pointer;-webkit-font-smoothing:antialiased}.ccf-main-modal .ccf-form-pane .accordion-section .section-content{display:none;padding:10px 20px;border-bottom:1px solid #e5e5e5}.ccf-main-modal .ccf-form-pane label{display:block;margin-bottom:8px}.ccf-main-modal .ccf-form-pane .explain{margin-top:5px;font-style:italic;display:block}.ccf-main-modal .ccf-form-pane.show-form-settings .ccf-form-settings{display:block}.ccf-main-modal .ccf-form-pane .ccf-form-settings{display:none;position:absolute;width:75%;bottom:50px;left:25%;z-index:2;top:0;overflow:auto;background-color:#fff;border-top:1px solid #ddd;padding:21px;box-sizing:border-box}.ccf-main-modal .ccf-form-pane .ccf-form-settings h3:first-child,.ccf-main-modal .ccf-form-pane .ccf-form-settings p:first-child{margin-top:0}.ccf-main-modal .ccf-form-pane .ccf-form-settings h3{border-bottom:1px solid #ccc;padding-bottom:.75em;margin-top:2em}.ccf-main-modal .ccf-form-pane .ccf-form-settings .ccf-form-notifications td{position:relative}.ccf-main-modal .ccf-form-pane .ccf-form-settings .ccf-form-notifications .active{width:15%}.ccf-main-modal .ccf-form-pane .ccf-form-settings .ccf-form-notifications .active-indicator{color:#33CA33;font-size:40px}.ccf-main-modal .ccf-form-pane .ccf-form-settings .ccf-form-notifications .inactive-indicator{color:red;font-size:40px}.ccf-main-modal .ccf-form-pane .ccf-form-settings .ccf-form-notifications .add-notification{margin-top:1em;cursor:pointer}.ccf-main-modal .ccf-form-pane .ccf-form-settings .close-notification{position:absolute;top:10px;right:10px;cursor:pointer;font-size:200%;color:inherit}.ccf-main-modal .ccf-form-pane .ccf-form-settings .delete-notification{color:red}.ccf-main-modal .ccf-form-pane .ccf-form-settings .address .add,.ccf-main-modal .ccf-form-pane .ccf-form-settings .address .delete,.ccf-main-modal .ccf-form-pane .ccf-form-settings .field-mapping .add,.ccf-main-modal .ccf-form-pane .ccf-form-settings .field-mapping .delete{color:inherit;vertical-align:middle}.ccf-main-modal .ccf-form-pane .ccf-form-settings .post-creation-mapping-wrapper{margin-top:1em}.ccf-main-modal .ccf-form-pane .left-sidebar{box-sizing:border-box;background-color:#f3f3f3;position:absolute;border-top:1px solid #ddd;border-right:1px solid #ddd;width:25%;top:0;padding:0;bottom:50px;left:0;overflow:auto}.ccf-main-modal .ccf-form-pane .left-sidebar .accordion-section:first-child{border-top:0}.ccf-main-modal .ccf-form-pane .left-sidebar .fields,.ccf-main-modal .ccf-form-pane .left-sidebar .special-fields,.ccf-main-modal .ccf-form-pane .left-sidebar .structure-fields{padding:5px}.ccf-main-modal .ccf-form-pane .left-sidebar .fields .field .preview,.ccf-main-modal .ccf-form-pane .left-sidebar .fields .field .right,.ccf-main-modal .ccf-form-pane .left-sidebar .special-fields .field .preview,.ccf-main-modal .ccf-form-pane .left-sidebar .special-fields .field .right,.ccf-main-modal .ccf-form-pane .left-sidebar .structure-fields .field .preview,.ccf-main-modal .ccf-form-pane .left-sidebar .structure-fields .field .right{display:none}.ccf-main-modal .ccf-form-pane .form-content{box-sizing:border-box;position:absolute;width:40%;bottom:50px;left:25%;right:35%;top:0;overflow:auto;border-top:1px solid #ddd;padding:21px}.ccf-main-modal .ccf-form-pane .form-content .field-placeholder{border:1px dashed #e5e5e5;height:46px;margin-bottom:5px}.ccf-main-modal .ccf-form-pane .form-content .no-fields{font-size:22px;padding:16px;font-style:italic}.ccf-main-modal .ccf-form-pane .form-content:after{width:100%;display:block;margin-top:5px;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;font-style:italic;font-size:22px;text-align:center;padding:1em .5em;border:4px dashed #e5e5e5;content:attr(data-drag-message)}.ccf-main-modal .ccf-form-pane .right-sidebar{box-sizing:border-box;padding:0;position:absolute;width:35%;top:0;overflow:auto;background-color:#f3f3f3;right:0;bottom:50px;border-left:1px solid #ddd}.ccf-main-modal .ccf-form-pane .right-sidebar .section-content>div{margin-bottom:6px}.ccf-main-modal .ccf-form-pane .right-sidebar .no-field{padding:16px;font-style:italic;font-size:22px}.ccf-main-modal .ccf-form-pane .right-sidebar label{display:inline-block;margin:0}.ccf-main-modal .ccf-form-pane .right-sidebar label .required{color:red}.ccf-main-modal .ccf-form-pane .right-sidebar .field-error input{border-color:red;border-width:2px}.ccf-main-modal .ccf-form-pane .right-sidebar .field-duplicate-slug input{border-color:#ffe6a5;border-width:2px}.ccf-main-modal .ccf-form-pane .right-sidebar input[type=text]{width:100%;display:block;margin-top:5px}.ccf-main-modal .ccf-form-pane .right-sidebar input[type=checkbox]+label{display:inline-block;vertical-align:middle}.ccf-main-modal .ccf-form-pane .right-sidebar label+select{display:inline-block}.ccf-main-modal .ccf-form-pane .right-sidebar textarea{width:100%;height:80px;margin-top:5px}.ccf-main-modal .ccf-form-pane .right-sidebar .field-html{height:150px;width:100%}.ccf-main-modal .ccf-form-pane .right-sidebar .repeatable-choices .choice input[type=text]{width:100px;display:inline-block}.ccf-main-modal .ccf-form-pane .right-sidebar .repeatable-choices .choice .move{color:inherit;cursor:move}.ccf-main-modal .ccf-form-pane .right-sidebar .repeatable-choices .choice .move:before{cursor:move}.ccf-main-modal .ccf-form-pane .right-sidebar .repeatable-choices .choice .add,.ccf-main-modal .ccf-form-pane .right-sidebar .repeatable-choices .choice .delete{cursor:pointer;color:inherit}.ccf-main-modal .ccf-existing-form-pane{display:none;position:absolute;overflow:scroll;top:125px;right:0;left:0;bottom:0;background-color:#fff;padding:16px}.ccf-main-modal .ccf-existing-form-pane table,.ccf-main-modal .ccf-form-notifications table{width:100%;border-collapse:collapse;table-layout:fixed;border:1px solid #ddd}.ccf-main-modal .ccf-existing-form-pane table .left,.ccf-main-modal .ccf-form-notifications table .left{float:left;width:50%;padding-right:10px;box-sizing:border-box}.ccf-main-modal .ccf-existing-form-pane table .left textarea,.ccf-main-modal .ccf-form-notifications table .left textarea{width:100%;height:300px}.ccf-main-modal .ccf-existing-form-pane table .right,.ccf-main-modal .ccf-form-notifications table .right{padding-left:10px;box-sizing:border-box;float:right;width:50%}.ccf-main-modal .ccf-existing-form-pane table td,.ccf-main-modal .ccf-form-notifications table td{margin:0;padding:14px 21px;text-align:left}.ccf-main-modal .ccf-existing-form-pane table .empty-form-table,.ccf-main-modal .ccf-existing-form-pane table .no-notifications,.ccf-main-modal .ccf-form-notifications table .empty-form-table,.ccf-main-modal .ccf-form-notifications table .no-notifications{text-align:center}.ccf-main-modal .ccf-existing-form-pane table tfoot,.ccf-main-modal .ccf-existing-form-pane table thead,.ccf-main-modal .ccf-form-notifications table tfoot,.ccf-main-modal .ccf-form-notifications table thead{background-color:#f0f0f0}.ccf-main-modal .ccf-existing-form-pane table tfoot tr,.ccf-main-modal .ccf-existing-form-pane table thead tr,.ccf-main-modal .ccf-form-notifications table tfoot tr,.ccf-main-modal .ccf-form-notifications table thead tr{border-bottom:1px solid #e5e5e5;border-top:1px solid #e5e5e5}.ccf-main-modal .ccf-existing-form-pane table tfoot th,.ccf-main-modal .ccf-existing-form-pane table thead th,.ccf-main-modal .ccf-form-notifications table tfoot th,.ccf-main-modal .ccf-form-notifications table thead th{margin:0;text-align:left;padding:14px 21px;box-sizing:border-box}.ccf-main-modal .ccf-existing-form-pane table tfoot .id,.ccf-main-modal .ccf-existing-form-pane table thead .id,.ccf-main-modal .ccf-form-notifications table tfoot .id,.ccf-main-modal .ccf-form-notifications table thead .id{width:5%}.ccf-main-modal .ccf-existing-form-pane table tfoot .title,.ccf-main-modal .ccf-existing-form-pane table thead .title,.ccf-main-modal .ccf-form-notifications table tfoot .title,.ccf-main-modal .ccf-form-notifications table thead .title{width:30%}.ccf-main-modal .ccf-existing-form-pane table tfoot .author,.ccf-main-modal .ccf-existing-form-pane table tfoot .entries,.ccf-main-modal .ccf-existing-form-pane table tfoot .submissions,.ccf-main-modal .ccf-existing-form-pane table thead .author,.ccf-main-modal .ccf-existing-form-pane table thead .entries,.ccf-main-modal .ccf-existing-form-pane table thead .submissions,.ccf-main-modal .ccf-form-notifications table tfoot .author,.ccf-main-modal .ccf-form-notifications table tfoot .entries,.ccf-main-modal .ccf-form-notifications table tfoot .submissions,.ccf-main-modal .ccf-form-notifications table thead .author,.ccf-main-modal .ccf-form-notifications table thead .entries,.ccf-main-modal .ccf-form-notifications table thead .submissions{width:10%}.ccf-main-modal .ccf-existing-form-pane table tfoot .number-of-fields,.ccf-main-modal .ccf-existing-form-pane table thead .number-of-fields,.ccf-main-modal .ccf-form-notifications table tfoot .number-of-fields,.ccf-main-modal .ccf-form-notifications table thead .number-of-fields{width:15%}.ccf-main-modal .ccf-existing-form-pane table tfoot .date,.ccf-main-modal .ccf-existing-form-pane table thead .date,.ccf-main-modal .ccf-form-notifications table tfoot .date,.ccf-main-modal .ccf-form-notifications table thead .date{width:20%}.ccf-main-modal .ccf-existing-form-pane table tbody tr:nth-child(odd),.ccf-main-modal .ccf-form-notifications table tbody tr:nth-child(odd){background-color:#fafafa;margin:0}.ccf-main-modal .ccf-existing-form-pane table tbody tr,.ccf-main-modal .ccf-form-notifications table tbody tr{background-color:#fff}.ccf-main-modal .ccf-existing-form-pane table tbody td,.ccf-main-modal .ccf-form-notifications table tbody td{vertical-align:top}.ccf-main-modal .ccf-existing-form-pane table tbody td a,.ccf-main-modal .ccf-form-notifications table tbody td a{text-decoration:none;cursor:pointer}.ccf-main-modal .ccf-existing-form-pane table tbody td .title,.ccf-main-modal .ccf-form-notifications table tbody td .title{font-weight:700;font-size:14px}.ccf-main-modal .ccf-existing-form-pane table tbody td .actions,.ccf-main-modal .ccf-form-notifications table tbody td .actions{visibility:hidden;margin-top:6px}.ccf-main-modal .ccf-existing-form-pane table tbody td .actions .delete,.ccf-main-modal .ccf-form-notifications table tbody td .actions .delete{color:red}.ccf-main-modal .ccf-existing-form-pane table tbody tr:hover td .actions,.ccf-main-modal .ccf-form-notifications table tbody tr:hover td .actions{visibility:visible}.ccf-main-modal-overlay{display:none;position:fixed;top:0;left:0;width:100%;height:100%;z-index:159900;opacity:.7;-ms-filter:"alpha(Opacity=70)";filter:alpha(opacity=70);-moz-opacity:.7;-khtml-opacity:.7;background-color:#000}.ccf-pagination{font-size:12px;margin-top:8px;text-align:right}.ccf-pagination .pages{padding:0 4px}.ccf-pagination .num-items{font-style:italic;padding-right:4px}.ccf-pagination a{cursor:pointer;color:#0074a2;background:#f0f0f0;text-decoration:none}.ccf-pagination a.first,.ccf-pagination a.last,.ccf-pagination a.next,.ccf-pagination a.prev{font-size:16px;line-height:22px;padding:0 7px 2px}.ccf-pagination a.first:hover,.ccf-pagination a.last:hover,.ccf-pagination a.next:hover,.ccf-pagination a.prev:hover{color:#fff;background-color:#2ea2cc}.ccf-pagination a.disabled{color:#aaa}.ccf-pagination a.disabled:hover{color:#aaa;background:#f0f0f0}.ccf-error-modal{display:none}.ccf-error-modal.show{display:block}.ccf-error-modal .ccf-notification-dialog-background{position:fixed;top:0;left:0;right:0;bottom:0;background:#000;opacity:.7;filter:alpha(opacity=70);z-index:1000000}.ccf-error-modal .notification-dialog{position:fixed;top:30%;left:50%;width:450px;margin-left:-225px;background:#fff;-webkit-box-shadow:0 3px 6px rgba(0,0,0,.3);box-shadow:0 3px 6px rgba(0,0,0,.3);line-height:1.5;z-index:1000005}.ccf-error-modal .notification-dialog .close{font-size:25px;position:absolute;right:10px;cursor:pointer}.ccf-error-modal .notification-dialog .message{margin:25px}.ccf-error-modal .notification-dialog .message .title{color:#23282d;font-size:1.3em;margin:0 0 1em}.ccf-error-modal .notification-dialog .message ul{margin-left:25px}.ccf-error-modal .notification-dialog .message ul li{list-style-type:disc}
build/js/form-manager.js CHANGED
@@ -333,6 +333,22 @@
333
  }
334
  );
335
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
336
  wp.ccf.models.FormNotificationAddress = wp.ccf.models.FormNotificationAddress || Backbone.Model.extend(
337
  {
338
  defaults: {
@@ -427,7 +443,10 @@
427
  completionActionType: 'text',
428
  completionRedirectUrl: '',
429
  completionMessage: '',
430
-
 
 
 
431
  notifications: new wp.ccf.collections.FormNotifications(),
432
  pause: false,
433
  pauseMessage: ccfSettings.pauseMessage
@@ -560,6 +579,38 @@
560
  }
561
  }
562
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
563
  return this.constructor.__super__.parse.call( this, response );
564
  },
565
 
@@ -990,6 +1041,12 @@
990
  }
991
  );
992
 
 
 
 
 
 
 
993
  wp.ccf.collections.FormNotificationAddresses = wp.ccf.collections.FormNotificationAddresses || Backbone.Collection.extend(
994
  {
995
  model: wp.ccf.models.FormNotificationAddress
@@ -2297,6 +2354,180 @@
2297
  }
2298
  );
2299
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2300
  wp.ccf.views.FormSettings = wp.ccf.views.FormSettings || Backbone.View.extend(
2301
  {
2302
  template: wp.ccf.utils.template( 'ccf-form-settings-template' ),
@@ -2306,17 +2537,41 @@
2306
  'change select': 'save',
2307
  'change select.form-completion-action-type': 'toggleCompletionFields',
2308
  'change select.form-pause': 'togglePauseFields',
 
2309
  'click .add-notification': 'triggerAddNotification'
2310
  },
2311
 
2312
  notificationViews: [],
 
2313
 
2314
  initialize: function( options ) {
2315
  this.model = options.form;
2316
  this.notificationViews = [];
 
2317
 
2318
  var notifications = this.model.get( 'notifications' );
2319
  this.listenTo( notifications, 'add', this.addNotification );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2320
  },
2321
 
2322
  triggerAddNotification: function() {
@@ -2375,6 +2630,18 @@
2375
  }
2376
  },
2377
 
 
 
 
 
 
 
 
 
 
 
 
 
2378
  save: function() {
2379
  if ( this.el.innerHTML === '' ) {
2380
  // @todo: for some reason this is needed for IE8
@@ -2393,6 +2660,15 @@
2393
  var pause = this.el.querySelectorAll( '.form-pause' )[0].value;
2394
  this.model.set( 'pause', ( parseInt( pause ) ) ? true : false );
2395
 
 
 
 
 
 
 
 
 
 
2396
  var pauseMessage = this.el.querySelectorAll( '.form-pause-message' )[0].value;
2397
  this.model.set( 'pauseMessage', pauseMessage );
2398
 
@@ -2418,6 +2694,10 @@
2418
  view.save();
2419
  } );
2420
 
 
 
 
 
2421
  if ( typeof $promise !== 'undefined' && typeof $promise.promise !== 'undefined' ) {
2422
  $promise.resolve();
2423
  }
@@ -2455,7 +2735,7 @@
2455
  this.el.innerHTML = this.template( context );
2456
 
2457
  this.toggleCompletionFields();
2458
-
2459
  this.togglePauseFields();
2460
 
2461
  var rowContainer = this.el.querySelectorAll( '.ccf-form-notifications .rows' )[0];
@@ -2475,6 +2755,20 @@
2475
 
2476
  rowContainer.parentNode.replaceChild( newRowContainer, rowContainer );
2477
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2478
  wp.ccf.dispatcher.on( 'mainViewChange', this.fullSave, this );
2479
  wp.ccf.dispatcher.on( 'saveFormSettings', this.fullSave, this );
2480
 
333
  }
334
  );
335
 
336
+ wp.ccf.models.PostFieldMapping = wp.ccf.models.PostFieldMapping || Backbone.Model.extend(
337
+ {
338
+ defaults: {
339
+ formField: '',
340
+ postField: '',
341
+ customFieldKey: ''
342
+ },
343
+
344
+ decode: function() {
345
+ return _modelDecode.call( this, [] );
346
+ },
347
+
348
+ set: _modelSet
349
+ }
350
+ );
351
+
352
  wp.ccf.models.FormNotificationAddress = wp.ccf.models.FormNotificationAddress || Backbone.Model.extend(
353
  {
354
  defaults: {
443
  completionActionType: 'text',
444
  completionRedirectUrl: '',
445
  completionMessage: '',
446
+ postCreation: false,
447
+ postCreationType: 'post',
448
+ postCreationStatus: 'draft',
449
+ postFieldMappings: new wp.ccf.collections.PostFieldMappings(),
450
  notifications: new wp.ccf.collections.FormNotifications(),
451
  pause: false,
452
  pauseMessage: ccfSettings.pauseMessage
579
  }
580
  }
581
 
582
+ if ( response.postFieldMappings ) {
583
+
584
+ var postFieldMappings = SELF.get( 'postFieldMappings' );
585
+
586
+ if ( postFieldMappings && postFieldMappings.length > 0 ) {
587
+
588
+ for ( i = 0; i < response.postFieldMappings.length; i++ ) {
589
+ var newPostFieldMapping = response.postFieldMappings[i];
590
+
591
+ var postFieldMapping = postFieldMappings.findWhere( { slug: newPostFieldMapping.slug } );
592
+
593
+ if ( postFieldMapping ) {
594
+ postFieldMapping.set( newPostFieldMapping );
595
+ postFieldMapping.decode();
596
+ }
597
+ }
598
+
599
+ delete response.postFieldMappings;
600
+ } else {
601
+ var newPostFieldMappings = [];
602
+
603
+ _.each( response.postFieldMappings, function( postFieldMapping ) {
604
+ var postFieldMappingModel = new wp.ccf.models.PostFieldMapping( postFieldMapping );
605
+ postFieldMappingModel.decode();
606
+
607
+ newPostFieldMappings.push( postFieldMappingModel );
608
+ });
609
+
610
+ response.postFieldMappings = new wp.ccf.collections.PostFieldMappings( newPostFieldMappings );
611
+ }
612
+ }
613
+
614
  return this.constructor.__super__.parse.call( this, response );
615
  },
616
 
1041
  }
1042
  );
1043
 
1044
+ wp.ccf.collections.PostFieldMappings = wp.ccf.collections.PostFieldMappings || Backbone.Collection.extend(
1045
+ {
1046
+ model: wp.ccf.models.PostFieldMapping
1047
+ }
1048
+ );
1049
+
1050
  wp.ccf.collections.FormNotificationAddresses = wp.ccf.collections.FormNotificationAddresses || Backbone.Collection.extend(
1051
  {
1052
  model: wp.ccf.models.FormNotificationAddress
2354
  }
2355
  );
2356
 
2357
+ wp.ccf.views.PostFieldMapping = Backbone.View.extend(
2358
+ {
2359
+ template: wp.ccf.utils.template( 'ccf-post-field-mapping' ),
2360
+ className: 'field-mapping',
2361
+
2362
+ events: {
2363
+ 'click .add': 'triggerAdd',
2364
+ 'click .delete': 'triggerDelete',
2365
+ 'blur input': 'save',
2366
+ 'change select': 'save'
2367
+ },
2368
+
2369
+ initialize: function( options ) {
2370
+ this.parent = options.parent;
2371
+ this.form = options.form;
2372
+ },
2373
+
2374
+ destroy: function() {
2375
+ this.unbind();
2376
+ },
2377
+
2378
+ save: function() {
2379
+ // @todo: fix this ie8 hack
2380
+ if ( this.el.innerHTML === '' ) {
2381
+ return;
2382
+ }
2383
+
2384
+ var formField = this.el.querySelectorAll( '.field-form-field' )[0].value;
2385
+ var postField = this.el.querySelectorAll( '.field-post-field' )[0].value;
2386
+ var customFieldKey = this.el.querySelectorAll( '.field-custom-field-key' );
2387
+
2388
+ var oldPostField = this.model.get( 'postField' );
2389
+
2390
+ this.model.set( 'formField', formField );
2391
+ this.model.set( 'postField', postField );
2392
+
2393
+ if ( customFieldKey.length ) {
2394
+ this.model.set( 'customFieldKey', customFieldKey[0].value );
2395
+ }
2396
+
2397
+ if ( oldPostField !== postField ) {
2398
+ this.render();
2399
+ }
2400
+
2401
+ return this;
2402
+
2403
+ },
2404
+
2405
+ updateFormFieldField: function() {
2406
+ var fieldFormField = this.el.querySelectorAll( '.field-form-field' )[0];
2407
+ fieldFormField.innerHTML = '';
2408
+ fieldFormField.disabled = false;
2409
+
2410
+ var fields = this.form.get( 'fields' ),
2411
+ fieldsAdded = 0;
2412
+
2413
+ var formField = this.model.get( 'formField' ),
2414
+ option;
2415
+
2416
+ if ( fields.length >= 1 ) {
2417
+ option = document.createElement( 'option' );
2418
+ option.innerHTML = ccfSettings.chooseFormField;
2419
+ option.value = '';
2420
+
2421
+ fieldFormField.appendChild( option );
2422
+
2423
+ fields.each( function( field ) {
2424
+ option = document.createElement( 'option' );
2425
+ option.innerHTML = field.get( 'slug' );
2426
+ option.value = field.get( 'slug' );
2427
+
2428
+ if ( field.get( 'slug' ) === formField ) {
2429
+ option.selected = true;
2430
+ }
2431
+
2432
+ fieldFormField.appendChild( option );
2433
+
2434
+ fieldsAdded++;
2435
+ });
2436
+ }
2437
+
2438
+ if ( 0 === fieldsAdded ) {
2439
+ option = document.createElement( 'option' );
2440
+ option.innerHTML = ccfSettings.noAvailableFields;
2441
+ option.value = '';
2442
+ fieldFormField.appendChild( option );
2443
+ fieldFormField.disabled = true;
2444
+ }
2445
+ },
2446
+
2447
+ updatePostFields: function() {
2448
+ var dropdown = this.el.querySelectorAll( '.field-post-field' )[0],
2449
+ option;
2450
+
2451
+ option = document.createElement( 'option' );
2452
+ option.value = '';
2453
+ option.innerText = ccfSettings.choosePostField;
2454
+ dropdown.appendChild( option );
2455
+
2456
+ var mappings = this.form.get( 'postFieldMappings' );
2457
+ var usedFields = [];
2458
+
2459
+ mappings.each( function( model ) {
2460
+ if ( model !== this.model ) {
2461
+ usedFields.push( model.get( 'postField' ) );
2462
+ }
2463
+ }, this );
2464
+
2465
+ _.each( ccfSettings.postFields.single, function( field, slug ) {
2466
+ if ( -1 === usedFields.indexOf( slug ) ) {
2467
+ option = document.createElement( 'option' );
2468
+ option.value = slug;
2469
+ option.innerText = field;
2470
+
2471
+ if ( this.model.get( 'postField' ) === slug ) {
2472
+ option.selected = true;
2473
+ }
2474
+
2475
+ dropdown.appendChild( option );
2476
+ }
2477
+ }, this );
2478
+
2479
+ _.each( ccfSettings.postFields.repeatable, function( field, slug ) {
2480
+
2481
+ option = document.createElement( 'option' );
2482
+ option.value = slug;
2483
+ option.innerText = field;
2484
+
2485
+ if ( this.model.get( 'postField' ) === slug ) {
2486
+ option.selected = true;
2487
+ }
2488
+
2489
+ dropdown.appendChild( option );
2490
+
2491
+ }, this );
2492
+ },
2493
+
2494
+ render: function() {
2495
+ var context = {};
2496
+ if ( this.model ) {
2497
+ context.mapping = this.model.toJSON();
2498
+ }
2499
+
2500
+ this.el.innerHTML = this.template( context );
2501
+
2502
+ var fields = this.form.get( 'fields' );
2503
+
2504
+ this.listenTo( fields, 'add', this.updateFormFieldField, this );
2505
+ this.listenTo( fields, 'remove', this.updateFormieldField, this );
2506
+
2507
+ this.updateFormFieldField();
2508
+ this.updatePostFields();
2509
+
2510
+ return this;
2511
+ },
2512
+
2513
+ triggerAdd: function() {
2514
+ this.form.get( 'postFieldMappings' ).add( new wp.ccf.models.PostFieldMapping() );
2515
+ },
2516
+
2517
+ triggerDelete: function() {
2518
+ var mappings = this.form.get( 'postFieldMappings' );
2519
+
2520
+ if ( mappings.length > 1 ) {
2521
+ this.parent.deletePostFieldMapping( this );
2522
+ } else {
2523
+ this.model.clear().set( wp.ccf.models.PostFieldMapping.prototype.defaults );
2524
+ this.destroy();
2525
+ this.render();
2526
+ }
2527
+ }
2528
+ }
2529
+ );
2530
+
2531
  wp.ccf.views.FormSettings = wp.ccf.views.FormSettings || Backbone.View.extend(
2532
  {
2533
  template: wp.ccf.utils.template( 'ccf-form-settings-template' ),
2537
  'change select': 'save',
2538
  'change select.form-completion-action-type': 'toggleCompletionFields',
2539
  'change select.form-pause': 'togglePauseFields',
2540
+ 'change select.form-post-creation': 'togglePostCreationFields',
2541
  'click .add-notification': 'triggerAddNotification'
2542
  },
2543
 
2544
  notificationViews: [],
2545
+ mappingViews: [],
2546
 
2547
  initialize: function( options ) {
2548
  this.model = options.form;
2549
  this.notificationViews = [];
2550
+ this.mappingViews = [];
2551
 
2552
  var notifications = this.model.get( 'notifications' );
2553
  this.listenTo( notifications, 'add', this.addNotification );
2554
+
2555
+ var mappings = this.model.get( 'postFieldMappings' );
2556
+ this.listenTo( mappings, 'add', this.addPostFieldMapping );
2557
+ },
2558
+
2559
+ deletePostFieldMapping: function( view ) {
2560
+ _.each( this.mappingViews, function( currentView ) {
2561
+ if ( view.cid === currentView.cid ) {
2562
+ var index = _.indexOf( this.mappingViews, currentView );
2563
+ this.model.get( 'postFieldMappings' ).remove( view.model );
2564
+ this.mappingViews[index].remove();
2565
+ this.mappingViews.splice( index, 1 );
2566
+ }
2567
+ }, this );
2568
+ },
2569
+
2570
+ addPostFieldMapping: function( model ) {
2571
+ var mappingContainer = this.el.querySelectorAll( '.post-creation-mapping' )[0];
2572
+ var view = new wp.ccf.views.PostFieldMapping( { model: model, parent: this, form: this.model } );
2573
+ this.mappingViews.push( view );
2574
+ mappingContainer.appendChild( view.render().el );
2575
  },
2576
 
2577
  triggerAddNotification: function() {
2630
  }
2631
  },
2632
 
2633
+ togglePostCreationFields: function() {
2634
+
2635
+ var postCreation = this.el.querySelectorAll( '.form-post-creation' )[0].value;
2636
+ var $postCreationMappingFields = $( this.el.querySelectorAll( '.post-creation-mapping-field' ) );
2637
+
2638
+ if ( parseInt( postCreation ) ) {
2639
+ $postCreationMappingFields.show();
2640
+ } else {
2641
+ $postCreationMappingFields.hide();
2642
+ }
2643
+ },
2644
+
2645
  save: function() {
2646
  if ( this.el.innerHTML === '' ) {
2647
  // @todo: for some reason this is needed for IE8
2660
  var pause = this.el.querySelectorAll( '.form-pause' )[0].value;
2661
  this.model.set( 'pause', ( parseInt( pause ) ) ? true : false );
2662
 
2663
+ var postCreation = this.el.querySelectorAll( '.form-post-creation' )[0].value;
2664
+ this.model.set( 'postCreation', ( parseInt( postCreation ) ) ? true : false );
2665
+
2666
+ var postCreationType = this.el.querySelectorAll( '.form-post-creation-type' )[0].value;
2667
+ this.model.set( 'postCreationType', postCreationType );
2668
+
2669
+ var postCreationStatus = this.el.querySelectorAll( '.form-post-creation-status' )[0].value;
2670
+ this.model.set( 'postCreationStatus', postCreationStatus );
2671
+
2672
  var pauseMessage = this.el.querySelectorAll( '.form-pause-message' )[0].value;
2673
  this.model.set( 'pauseMessage', pauseMessage );
2674
 
2694
  view.save();
2695
  } );
2696
 
2697
+ _.each( this.mappingViews, function( view ) {
2698
+ view.save();
2699
+ } );
2700
+
2701
  if ( typeof $promise !== 'undefined' && typeof $promise.promise !== 'undefined' ) {
2702
  $promise.resolve();
2703
  }
2735
  this.el.innerHTML = this.template( context );
2736
 
2737
  this.toggleCompletionFields();
2738
+ this.togglePostCreationFields();
2739
  this.togglePauseFields();
2740
 
2741
  var rowContainer = this.el.querySelectorAll( '.ccf-form-notifications .rows' )[0];
2755
 
2756
  rowContainer.parentNode.replaceChild( newRowContainer, rowContainer );
2757
 
2758
+ var mappingsContainer = this.el.querySelectorAll( '.post-creation-mapping' )[0];
2759
+ var mappings = this.model.get( 'postFieldMappings' );
2760
+
2761
+ if ( mappings.length >= 1 ) {
2762
+ mappings.each( function( model ) {
2763
+ var mapping = new wp.ccf.views.PostFieldMapping( { model: model, parent: this, form: this.model } ).render();
2764
+ mappingsContainer.appendChild( mapping.el );
2765
+ this.mappingViews.push( mapping );
2766
+ }, this );
2767
+ } else {
2768
+ var newMapping = new wp.ccf.models.PostFieldMapping();
2769
+ mappings.add( newMapping );
2770
+ }
2771
+
2772
  wp.ccf.dispatcher.on( 'mainViewChange', this.fullSave, this );
2773
  wp.ccf.dispatcher.on( 'saveFormSettings', this.fullSave, this );
2774
 
build/js/form-manager.min.js CHANGED
@@ -1,2 +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 c={el:this.$el.find(".ccf-"+s),parent:this};l&&i.extend(c,l),this.renderedSubViews[s]&&this.renderedSubViews[s].destroy&&this.renderedSubViews[s].destroy(),(t||!this.renderedSubViews[s])&&(this.renderedSubViews[s]=new this.subViews[s](c)),this.renderedSubViews[s].render(),e&&(this.renderedSubViews[s].el.style.display="block")}return this},showView:function(e,t,i){if(this.renderedSubViews!==void 0&&this.renderedSubViews[e]!==void 0){var l=this.renderedSubViews[e];i||l.render(t),l.el.style.display="block",this.currentView=e;for(var s in this.subViews)s!==e&&(this.renderedSubViews[s].el.style.display="none")}}}}(jQuery,Backbone,_,ccfSettings),function(e,t,i,l){"use strict";wp.ccf.models=wp.ccf.models||{},wp.ccf.models.Fields=wp.ccf.models.Fields||{};var s=function(e,i,l){return"object"!=typeof i&&""===i&&(i=""),t.Model.prototype.set.call(this,e,i,l)},c=function(e,t,i){return i=i||{},i.emulateHTTP=!0,this.constructor.__super__.sync.call(this,e,t,i)},o=function(e){for(var t in this.attributes)if(-1===i.indexOf(e,t)){var l=this.get(t);"string"==typeof l&&""!==l&&(l=(l+"").replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#8220;/g,"”").replace(/&#8221;/g,"”").replace(/&#8216;/g,"‘").replace(/&#038;/g,"&").replace(/&#039;/g,"'"),this.set(t,l))}return this};wp.ccf.models.FieldChoice=wp.ccf.models.FieldChoice||t.Model.extend({defaults:{label:"",value:"",selected:!1},decode:function(){return o.call(this,[])},set:s}),wp.ccf.models.FormNotificationAddress=wp.ccf.models.FormNotificationAddress||t.Model.extend({defaults:{type:"custom",field:"",email:""},decode:function(){return o.call(this,[])},set:s}),wp.ccf.models.FormNotification=wp.ccf.models.FormNotification||t.Model.extend({defaults:function(){return{title:"",content:"",active:!1,addresses:new wp.ccf.collections.FormNotificationAddresses,fromType:"default",fromAddress:"",fromField:"",subjectType:"default",subject:"",subjectField:"",fromNameType:"custom",fromName:"WordPress",fromNameField:""}},initialize:function(e){if("object"==typeof e&&e.addresses){var t=[];i.each(e.addresses,function(e){var i=new wp.ccf.models.FormNotificationAddress(e);i.decode(),t.push(i)}),this.set("addresses",new wp.ccf.collections.FormNotificationAddresses(t))}},decode:function(){return o.call(this,[])},toJSON:function(){var e=this.constructor.__super__.toJSON.call(this);return e.addresses&&(e.addresses=e.addresses.toJSON()),e},set:s}),wp.ccf.models.Form=wp.ccf.models.Form||wp.api.models.Post.extend({urlRoot:l.apiRoot.replace(/\/$/,"")+"/ccf/v1/forms",set:s,sync:c,idAttribute:"id",initialize:function(){this.on("sync",this.decode,this)},defaults:function(){var e={fields:new wp.ccf.collections.Fields,type:"ccf_form",status:"publish",description:"",buttonText:"Submit Form",completionActionType:"text",completionRedirectUrl:"",completionMessage:"",notifications:new wp.ccf.collections.FormNotifications,pause:!1,pauseMessage:l.pauseMessage};return e=i.defaults(e,this.constructor.__super__.defaults),wp.ccf.utils.cleanDateFields(e),e},decode:function(){var e=i.keys(wp.api.models.Post.prototype.defaults);return e=i.without(e,"title"),o.call(this,e)},getFieldSlugs:function(e){var t=wp.ccf.currentForm.get("fields"),i=[];return t.each(function(t){e&&t.isImmutable||i.push(t.get("slug"))}),i},parse:function(e){var t=this,l=0,s=0;if(e.fields){var c=t.get("fields");if(c&&c.length>0){for(l=0;e.fields.length>l;l++){var o=e.fields[l],r=c.findWhere({slug:o.slug});if(r){if(o.choices!==void 0){var n=t.get("choices");if(n&&n.length>0)for(s=0;o.choices>s;s++){var a=n.at(s);a.set(o.choices[s]),a.decode()}delete e.fields[l].choices}r.set(o),r.decode()}}delete e.fields}else{var d=[];i.each(e.fields,function(e){var t=new wp.ccf.models.Fields[e.type](e);t.decode(),d.push(t)}),e.fields=new wp.ccf.collections.Fields(d,{formId:e.id})}}if(e.notifications){var f=t.get("notifications");if(f&&f.length>0){for(l=0;e.notifications.length>l;l++){var u=e.notifications[l],m=f.findWhere({slug:u.slug});if(m){if(u.addresses!==void 0){var h=t.get("addresses");if(h&&h.length>0)for(s=0;u.addresses>s;s++){var p=h.at(s);p.set(u.addresses[s]),p.decode()}delete e.notifications[l].addresses}m.set(u),m.decode()}}delete e.notifications}else{var w=[];i.each(e.notifications,function(e){var t=new wp.ccf.models.FormNotification(e);t.decode(),w.push(t)}),e.notifications=new wp.ccf.collections.FormNotifications(w)}}return this.constructor.__super__.parse.call(this,e)},toJSON:function(){var e=this.constructor.__super__.toJSON.call(this);return e.fields&&(e.fields=e.fields.toJSON()),e.notifications&&(e.notifications=e.notifications.toJSON()),e.author&&(e.author=e.author.toJSON()),e}}),wp.ccf.models.Submission=wp.api.models.Submission||wp.api.models.Post.extend({defaults:{id:null,data:{}},sync:c,urlRoot:l.apiRoot.replace(/\/$/,"")+"/ccf/v1/submissions"}),wp.ccf.models.Field=wp.api.models.Field||wp.api.models.Post.extend({idAttribute:"id",defaults:{id:null},set:s,required:function(){return["slug"]},decode:function(){return o.call(this,i.keys(wp.api.models.Post.prototype.defaults))},hasRequiredAttributes:function(){var e=this,t=!0;return i.each(this.required(),function(i){(e.get(i)===void 0||""===e.get(i))&&(t=!1)}),t},sync:c}),wp.ccf.models.StandardField=wp.ccf.models.StandardField||wp.ccf.models.Field.extend({idAttribute:"id",defaults:function(){var e={label:l.fieldLabel,value:"",placeholder:"",slug:"",type:"",required:!1,className:"",description:""};return i.defaults(e,this.constructor.__super__.defaults)}}),wp.ccf.models.Fields["single-line-text"]=wp.ccf.models.Fields["single-line-text"]||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"single-line-text"};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.file=wp.ccf.models.Fields.file||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"file",fileExtensions:"",maxFileSize:l.maxFileSize};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields["paragraph-text"]=wp.ccf.models.Fields["paragraph-text"]||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"paragraph-text"};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.hidden=wp.ccf.models.Fields.hidden||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"hidden"};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.email=wp.ccf.models.Fields.email||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"email",emailConfirmation:!1};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.website=wp.ccf.models.Fields.website||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"website",placeholder:"http://"};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.phone=wp.ccf.models.Fields.phone||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"phone",phoneFormat:"us"};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.date=wp.ccf.models.Fields.date||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"date",showDate:!0,showTime:!0,dateFormat:"mm/dd/yyyy"};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.name=wp.ccf.models.Fields.name||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"name"};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.recaptcha=wp.ccf.models.Fields.recaptcha||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"recaptcha",siteKey:"",secretKey:""};return i.defaults(e,this.constructor.__super__.defaults())},required:function(){return["siteKey","secretKey"]},isImmutable:!0}),wp.ccf.models.Fields.address=wp.ccf.models.Fields.address||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"address",addressType:"us"};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields["section-header"]=wp.ccf.models.Fields["section-header"]||wp.ccf.models.Field.extend({defaults:function(){var e={type:"section-header",slug:"",heading:"",subheading:"",className:""};return i.defaults(e,this.constructor.__super__.defaults)},required:function(){return[]},isImmutable:!0}),wp.ccf.models.Fields.html=wp.ccf.models.Fields.html||wp.ccf.models.Field.extend({defaults:function(){var e={type:"html",slug:"",html:"",className:""};return i.defaults(e,this.constructor.__super__.defaults)},required:function(){return[]},isImmutable:!0}),wp.ccf.models.ChoiceableField=wp.ccf.models.ChoiceableField||wp.ccf.models.StandardField.extend({defaults:function(){var e={choices:new wp.ccf.collections.FieldChoices};return i.defaults(e,this.constructor.__super__.defaults())},initialize:function(e){if("object"==typeof e&&e.choices){var t=[];i.each(e.choices,function(e){var i=new wp.ccf.models.FieldChoice(e);i.decode(),t.push(i)}),this.set("choices",new wp.ccf.collections.FieldChoices(t))}}}),wp.ccf.models.Fields.radio=wp.ccf.models.Fields.radio||wp.ccf.models.ChoiceableField.extend({defaults:function(){var e={type:"radio"};return i.defaults(e,this.constructor.__super__.defaults())},initialize:function(){return this.constructor.__super__.initialize.apply(this,arguments)}}),wp.ccf.models.Fields.checkboxes=wp.ccf.models.Fields.checkboxes||wp.ccf.models.ChoiceableField.extend({defaults:function(){var e={type:"checkboxes"};return i.defaults(e,this.constructor.__super__.defaults())},initialize:function(){return this.constructor.__super__.initialize.apply(this,arguments)}}),wp.ccf.models.Fields.dropdown=wp.ccf.models.Fields.dropdown||wp.ccf.models.ChoiceableField.extend({defaults:function(){var e={type:"dropdown"};return i.defaults(e,this.constructor.__super__.defaults())},initialize:function(){return this.constructor.__super__.initialize.apply(this,arguments)}})}(jQuery,Backbone,_,ccfSettings),function(e,t,i,l){"use strict";var s=function(e,t,i){return i=i||{},i.emulateHTTP=!0,this.constructor.__super__.sync.call(this,e,t,i)};wp.ccf.collections=wp.ccf.collections||{},wp.ccf.collections.Forms=wp.ccf.collections.Forms||wp.api.collections.Posts.extend({model:wp.ccf.models.Form,url:l.apiRoot.replace(/\/$/,"")+"/ccf/v1/forms",formsFetching:{},initialize:function(){this.constructor.__super__.initialize(),this.formsFetching={}},sync:s,remove:function(e,t){t=t||{};var l=this.constructor.__super__.remove.call(this,e,t);return t.destroy&&(e instanceof Array?i.each(e,function(e){e.destroy()}):e.destroy()),l}}),wp.ccf.collections.Fields=wp.ccf.collections.Fields||wp.api.collections.Posts.extend({model:wp.ccf.models.Field,url:function(){return l.apiRoot+"/ccf/forms/"+this.formId+"/fields"},initialize:function(e,t){t&&t.formId&&(this.formId=t.formId)},sync:s}),wp.ccf.collections.FormNotificationAddresses=wp.ccf.collections.FormNotificationAddresses||t.Collection.extend({model:wp.ccf.models.FormNotificationAddress}),wp.ccf.collections.FormNotifications=wp.ccf.collections.FormNotifications||t.Collection.extend({model:wp.ccf.models.FormNotification}),wp.ccf.collections.Submissions=wp.ccf.collections.Submissions||wp.api.collections.Posts.extend({model:wp.ccf.models.Submission,url:function(){return l.apiRoot.replace(/\/$/,"")+"/ccf/v1/forms/"+this.formId+"/submissions"},initialize:function(e,t){this.constructor.__super__.initialize.apply(this,arguments),t&&t.formId&&(this.formId=t.formId)},sync:s}),wp.ccf.collections.FieldChoices=wp.ccf.collections.FieldChoices||t.Collection.extend({model:wp.ccf.models.FieldChoice})}(jQuery,Backbone,_,ccfSettings),function(e,t,i,l){"use strict";wp.ccf.views=wp.ccf.views||{},wp.ccf.views.Fields=wp.ccf.views.Fields||{},wp.ccf.views.FieldChoice=t.View.extend({template:wp.ccf.utils.template("ccf-field-choice-template"),className:"choice",events:{"click .add":"triggerAdd","click .delete":"triggerDelete","blur input":"saveChoice",saveChoice:"saveChoice",sorted:"triggerUpdateSort"},initialize:function(e){this.field=e.field},destroy:function(){wp.ccf.dispatcher.off("mainViewChange",this.saveChoice),this.unbind()},triggerUpdateSort:function(e,t){this.field.get("choices").remove(this.model,{silent:!0}),this.field.get("choices").add(this.model,{at:t,silent:!0})},saveChoice:function(){if(""!==this.el.innerHTML){var e=this.el.querySelectorAll(".choice-label")[0].value,t=this.el.querySelectorAll(".choice-value")[0].value;this.model.set("label",e),this.model.set("value",t);var i=this.el.querySelectorAll(".choice-selected")[0],l=i.checked?!0:!1;return this.model.set("selected",l),this}},render:function(){var e={};return this.model&&(e.choice=this.model.toJSON()),this.el.innerHTML=this.template(e),wp.ccf.dispatcher.on("mainViewChange",this.saveChoice,this),this},triggerAdd:function(){this.field.get("choices").add(new wp.ccf.models.FieldChoice)},triggerDelete:function(){var e=this.field.get("choices");if(e.length>1)e.remove(this.model),this.destroy(),this.remove();else{for(var t=this.el.querySelectorAll(".choice-label, .choice-value"),i=this.el.querySelectorAll(".choice-selected"),l=0;t.length>l;l++)t[l].value="";i[0].checked=!1}}}),wp.ccf.views.EmptyFormNotificationTableRow=wp.ccf.views.EmptyFormNotificationTableRow||t.View.extend({tagName:"tr",template:wp.ccf.utils.template("ccf-empty-form-notification-row-template"),events:{"click .add":"triggerAdd"},initialize:function(e){this.form=e.form},destroy:function(){this.unbind()},render:function(){return this.$el.html(this.template()),this},triggerAdd:function(){var e=this.form.get("notifications");this.destroy(),e.add(new wp.ccf.models.FormNotification)}}),wp.ccf.views.EmptyFormTableRow=wp.ccf.views.EmptyFormTableRow||t.View.extend({tagName:"tr",template:wp.ccf.utils.template("ccf-empty-form-table-row-template"),render:function(){return this.$el.html(this.template()),this}}),wp.ccf.views.FormNotificationAddress=t.View.extend({template:wp.ccf.utils.template("ccf-form-notification-address-template"),className:"address",events:{"click .add":"triggerAdd","click .delete":"triggerDelete","blur input":"save","change select":"save"},initialize:function(e){this.notification=e.notification,this.parent=e.parent,this.form=e.form},destroy:function(){this.unbind()},save:function(){if(""!==this.el.innerHTML){var e=this.el.querySelectorAll(".form-notification-address-type")[0].value,t=this.el.querySelectorAll(".form-notification-address-email"),i=this.el.querySelectorAll(".form-notification-address-field"),l=this.model.get("type");return t.length&&this.model.set("email",t[0].value),i.length&&this.model.set("field",i[0].value),this.model.set("type",e),l!==e&&this.render(),this}},updateFromFieldField:function(){if("edit"===this.parent.context&&"field"===this.model.get("type")){var e=this.el.querySelectorAll(".form-notification-address-field")[0];e.innerHTML="",e.disabled=!1;var t,i=this.form.get("fields"),s=0,c=this.model.get("field");i.length>=1&&i.each(function(i){"email"===i.get("type")&&(t=document.createElement("option"),t.innerHTML=i.get("slug"),t.value=i.get("slug"),i.get("slug")===c&&(t.selected=!0),e.appendChild(t),s++)}),0===s&&(t=document.createElement("option"),t.innerHTML=l.noEmailFields,t.value="",e.appendChild(t),e.disabled=!0)}},render:function(){var e={};this.model&&(e.address=this.model.toJSON()),this.el.innerHTML=this.template(e);var t=this.form.get("fields");return this.listenTo(t,"add",this.updateFromFieldField,this),this.listenTo(t,"remove",this.updateFromFieldField,this),"field"===this.model.get("type")&&this.updateFromFieldField(),this},triggerAdd:function(){this.notification.get("addresses").add(new wp.ccf.models.FormNotificationAddress)},triggerDelete:function(){var e=this.notification.get("addresses");e.length>1?this.parent.deleteAddress(this):(this.model.clear().set(wp.ccf.models.FormNotificationAddress.prototype.defaults),this.destroy(),this.render())}}),wp.ccf.views.ExistingFormNotificationRow=t.View.extend({template:wp.ccf.utils.template("ccf-existing-form-notification-table-row-template"),tagName:"tr",events:{"change select.form-email-notification-from-type":"toggleNotificationFields","change select.form-email-notification-from-name-type":"toggleNotificationFields","change select.form-email-notification-subject-type":"toggleNotificationFields","click .close-notification":"changeContext","click .edit-notification":"changeContext","click .delete-notification":"triggerDelete","blur input":"save","change select":"save"},addressViews:[],initialize:function(e){this.form=e.form,this.addressViews=[],this.parent=e.parent,this.context=e.context!==void 0?e.context:"view";var t=this.model.get("addresses");this.listenTo(t,"add",this.addAddress)},deleteAddress:function(e){i.each(this.addressViews,function(t){if(e.cid===t.cid){var l=i.indexOf(this.addressViews,t);this.model.get("addresses").remove(e.model),this.addressViews[l].remove(),this.addressViews.splice(l,1)}},this)},addAddress:function(e){var t=this.el.querySelectorAll(".addresses")[0],i=new wp.ccf.views.FormNotificationAddress({model:e,parent:this,notification:this.model,form:this.form});this.addressViews.push(i),t.appendChild(i.render().el)},destroy:function(){this.unbind()},changeContext:function(e,t){"edit"===this.context&&this.save(),t?this.context=t:("view"===this.context&&this.parent.closeAllNotifications(),this.context="edit"===this.context?"view":"edit"),this.destroy(),this.render()},updateFromFieldField:function(){if("edit"===this.context){var e=this.el.querySelectorAll(".form-email-notification-from-field")[0];e.innerHTML="",e.disabled=!1;var t=this.el.querySelectorAll(".form-email-notification-subject-field")[0];t.innerHTML="",t.disabled=!1;var i=this.el.querySelectorAll(".form-email-notification-from-name-field")[0];i.innerHTML="",i.disabled=!1;var s,c=this.form.get("fields"),o=0,r=0,n=0,a=this.model.get("emailNotificationFromField"),d=this.model.get("emailNotificationSubjectField"),f=this.model.get("emailNotificationFromNameField");c.length>=1&&c.each(function(l){"email"===l.get("type")?(s=document.createElement("option"),s.innerHTML=l.get("slug"),s.value=l.get("slug"),l.get("slug")===a&&(s.selected=!0),e.appendChild(s),o++):"name"===l.get("type")?(s=document.createElement("option"),s.innerHTML=l.get("slug"),s.value=l.get("slug"),l.get("slug")===f&&(s.selected=!0),i.appendChild(s),r++):"single-line-text"===l.get("type")&&(s=document.createElement("option"),s.innerHTML=l.get("slug"),s.value=l.get("slug"),l.get("slug")===d&&(s.selected=!0),t.appendChild(s),n++)}),0===o&&(s=document.createElement("option"),s.innerHTML=l.noEmailFields,s.value="",e.appendChild(s),e.disabled=!0),0===r&&(s=document.createElement("option"),s.innerHTML=l.noNameFields,s.value="",i.appendChild(s),i.disabled=!0),0===n&&(s=document.createElement("option"),s.innerHTML=l.noApplicableFields,s.value="",t.appendChild(s),t.disabled=!0)}},toggleNotificationFields:function(){var e=this.el.querySelectorAll(".email-notification-from-address")[0],t=this.el.querySelectorAll(".email-notification-from-field")[0],i=this.el.querySelectorAll(".form-email-notification-from-type")[0],l=this.el.querySelectorAll(".email-notification-subject")[0],s=this.el.querySelectorAll(".email-notification-subject-field")[0],c=this.el.querySelectorAll(".form-email-notification-subject-type")[0],o=this.el.querySelectorAll(".email-notification-from-name")[0],r=this.el.querySelectorAll(".email-notification-from-name-field")[0],n=this.el.querySelectorAll(".form-email-notification-from-name-type")[0];e.style.display="none",t.style.display="none","custom"===i.value?e.style.display="block":"field"===i.value&&(t.style.display="block"),l.style.display="none",s.style.display="none","custom"===c.value?l.style.display="block":"field"===c.value&&(s.style.display="block"),o.style.display="none",r.style.display="none","custom"===n.value?o.style.display="block":"field"===n.value&&(r.style.display="block")},save:function(){if(""!==this.el.innerHTML&&"edit"===this.context){var e=this.el.querySelectorAll(".form-email-notification-title")[0].value;this.model.set("title",e);var t=this.el.querySelectorAll(".form-email-notification-content")[0].value;this.model.set("content",t);var i=this.el.querySelectorAll(".form-email-notification-active")[0].value;this.model.set("active","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 c=this.el.querySelectorAll(".form-email-notification-from-field")[0].value;this.model.set("fromField",c);var o=this.el.querySelectorAll(".form-email-notification-from-name-type")[0].value;this.model.set("fromNameType",o);var r=this.el.querySelectorAll(".form-email-notification-from-name")[0].value;this.model.set("fromName",r);var n=this.el.querySelectorAll(".form-email-notification-from-name-field")[0].value;this.model.set("fromNameField",n);var a=this.el.querySelectorAll(".form-email-notification-subject-type")[0].value;this.model.set("subjectType",a);var d=this.el.querySelectorAll(".form-email-notification-subject")[0].value;this.model.set("subject",d);var f=this.el.querySelectorAll(".form-email-notification-subject-field")[0].value;this.model.set("subjectField",f);for(var u=0;this.addressViews.length>u;u++)this.addressViews[u].save();return this}},render:function(){var e={context:this.context,form:this.form.toJSON()};if(this.model&&(e.notification=this.model.toJSON()),this.el.innerHTML=this.template(e),"edit"===this.context){this.toggleNotificationFields(),this.updateFromFieldField();var t=this.el.querySelectorAll(".addresses")[0],i=this.model.get("addresses");if(i.length>=1)i.each(function(e){var i=new wp.ccf.views.FormNotificationAddress({model:e,parent:this,notification:this.model,form:this.form}).render();t.appendChild(i.el),this.addressViews.push(i)},this);else{var l=new wp.ccf.models.FormNotificationAddress;i.add(l)}}var s=this.form.get("fields");return this.listenTo(s,"add",this.updateFromFieldField,this),this.listenTo(s,"remove",this.updateFromFieldField,this),this},triggerDelete:function(){this.parent.deleteNotification(this)}}),wp.ccf.views.FieldBase=wp.ccf.views.FieldBase||t.View.extend({events:{"blur input":"saveField","blur input.field-slug":"checkSlug","blur textarea":"saveField","change select":"saveField",'change input[type="checkbox"]':"saveField"},checkSlug:function(){var e=this.el.querySelectorAll(".field-slug");if(e.length>0){var t=e[0],i=!1;t.parentNode.className=t.value&&!t.value.match(/^[a-zA-Z0-9\-_]+$/)?t.parentNode.className.replace(/ field-error/i,"")+" field-error":t.parentNode.className.replace(/ field-error/i,""),this.collection.length>0&&""!==t.value?(this.collection.each(function(e){e!==this.model&&t.value===e.get("slug")&&(i=!0)},this),t.parentNode.className=i?t.parentNode.className.replace(/ field-duplicate-slug/i,"")+" field-duplicate-slug":t.parentNode.className.replace(/ field-duplicate-slug/i,"")):t.parentNode.className=t.parentNode.className.replace(/ field-duplicate-slug/i,"")}},destroy:function(){this.unbind()},render:function(){return this.el.innerHTML=this.template({field:this.model.toJSON()}),this.checkSlug(),this}}),wp.ccf.views.Fields["single-line-text"]=wp.ccf.views.Fields["single-line-text"]||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-single-line-text-template"),initialize:function(){},saveField:function(){return""!==this.el.innerHTML?(this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("description",this.el.querySelectorAll(".field-description")[0].value),this.model.set("value",this.el.querySelectorAll(".field-value")[0].value),this.model.set("placeholder",this.el.querySelectorAll(".field-placeholder")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1),this):void 0}}),wp.ccf.views.Fields.file=wp.ccf.views.Fields.file||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-file-template"),initialize:function(){},saveField:function(){return""!==this.el.innerHTML?(this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("description",this.el.querySelectorAll(".field-description")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1),this.model.set("fileExtensions",this.el.querySelectorAll(".field-file-extensions")[0].value),this.model.set("maxFileSize",this.el.querySelectorAll(".field-max-file-size")[0].value),this):void 0}}),wp.ccf.views.Fields.recaptcha=wp.ccf.views.Fields.recaptcha||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-recaptcha-template"),initialize:function(){},saveField:function(){return""!==this.el.innerHTML?(this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("description",this.el.querySelectorAll(".field-description")[0].value),this.model.set("siteKey",this.el.querySelectorAll(".field-site-key")[0].value),this.model.set("secretKey",this.el.querySelectorAll(".field-secret-key")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this):void 0}}),wp.ccf.views.Fields["section-header"]=wp.ccf.views.Fields["section-header"]||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-section-header-template"),initialize:function(){},saveField:function(){return""!==this.el.innerHTML?(this.model.set("heading",this.el.querySelectorAll(".field-heading")[0].value),this.model.set("subheading",this.el.querySelectorAll(".field-subheading")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this):void 0}}),wp.ccf.views.Fields.html=wp.ccf.views.Fields.html||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-html-template"),initialize:function(){},saveField:function(){return""!==this.el.innerHTML?(this.model.set("html",this.el.querySelectorAll(".field-html")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this):void 0}}),wp.ccf.views.Fields["paragraph-text"]=wp.ccf.views.Fields["paragraph-text"]||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-paragraph-text-template"),saveField:function(){return""!==this.el.innerHTML?(this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("description",this.el.querySelectorAll(".field-description")[0].value),this.model.set("value",this.el.querySelectorAll(".field-value")[0].value),this.model.set("placeholder",this.el.querySelectorAll(".field-placeholder")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1),this):void 0}}),wp.ccf.views.Fields.hidden=wp.ccf.views.Fields.hidden||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-hidden-template"),saveField:function(){return""!==this.el.innerHTML?(this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("value",this.el.querySelectorAll(".field-value")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this):void 0}}),wp.ccf.views.Fields.date=wp.ccf.views.Fields.date||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-date-template"),saveField:function(){if(""!==this.el.innerHTML){this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("description",this.el.querySelectorAll(".field-description")[0].value);var e=this.el.querySelectorAll(".field-value");e.length>0&&this.model.set("value",e[0].value);var t=this.el.querySelectorAll(".field-date-format");t.length&&this.model.set("dateFormat",t[0].value);var i=this.model.get("showDate"),l=this.el.querySelectorAll(".field-show-date")[0].checked?!0:!1;this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("showDate",l);var s=this.model.get("showTime"),c=this.el.querySelectorAll(".field-show-time")[0].checked?!0:!1;return this.model.set("showTime",c),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1),(c!=s||l!=i)&&this.render(),this}}}),wp.ccf.views.Fields.name=wp.ccf.views.Fields.name||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-name-template"),saveField:function(){return""!==this.el.innerHTML?(this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("description",this.el.querySelectorAll(".field-description")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1),this):void 0}}),wp.ccf.views.Fields.website=wp.ccf.views.Fields.website||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-website-template"),saveField:function(){return""!==this.el.innerHTML?(this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("description",this.el.querySelectorAll(".field-description")[0].value),this.model.set("value",this.el.querySelectorAll(".field-value")[0].value),this.model.set("placeholder",this.el.querySelectorAll(".field-placeholder")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1),this):void 0
2
- }}),wp.ccf.views.Fields.phone=wp.ccf.views.Fields.phone||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-phone-template"),saveField:function(){return""!==this.el.innerHTML?(this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("description",this.el.querySelectorAll(".field-description")[0].value),this.model.set("value",this.el.querySelectorAll(".field-value")[0].value),this.model.set("placeholder",this.el.querySelectorAll(".field-placeholder")[0].value),this.model.set("phoneFormat",this.el.querySelectorAll(".field-phone-format")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1),this):void 0}}),wp.ccf.views.Fields.address=wp.ccf.views.Fields.address||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-address-template"),saveField:function(){return""!==this.el.innerHTML?(this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("description",this.el.querySelectorAll(".field-description")[0].value),this.model.set("addressType",this.el.querySelectorAll(".field-address-type")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1),this):void 0}}),wp.ccf.views.Fields.email=wp.ccf.views.Fields.email||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-email-template"),saveField:function(){if(""!==this.el.innerHTML){this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("description",this.el.querySelectorAll(".field-description")[0].value);var e=this.el.querySelectorAll(".field-value");e.length&&this.model.set("value",e[0].value);var t=this.el.querySelectorAll(".field-placeholder");t.length&&this.model.set("placeholder",t[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1);var i=1==this.el.querySelectorAll(".field-email-confirmation")[0].value?!0:!1,l=this.model.get("emailConfirmation");return this.model.set("emailConfirmation",i),l!=i&&this.render(),this}}}),wp.ccf.views.ChoiceableField=wp.ccf.views.ChoiceableField||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-dropdown-template"),initialize:function(){var e=this.model.get("choices");this.listenTo(e,"add",this.addChoice)},addChoice:function(e){var t=new wp.ccf.views.FieldChoice({model:e,field:this.model}).render(),i=this.el.querySelectorAll(".repeatable-choices")[0];i.appendChild(t.el)},saveField:function(){if(""!==this.el.innerHTML){this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("description",this.el.querySelectorAll(".field-description")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1);var t=this.el.querySelectorAll(".repeatable-choices")[0].querySelectorAll(".choice");return i.each(t,function(t){e(t).trigger("saveChoice")}),this}},render:function(){var t=this;t.el.innerHTML=t.template({field:t.model.toJSON()}),t.checkSlug();var i=t.model.get("choices"),l=this.el.querySelectorAll(".repeatable-choices")[0];if(i.length>=1)i.each(function(e){var i=new wp.ccf.views.FieldChoice({model:e,field:t.model}).render();l.appendChild(i.el)});else{var s=new wp.ccf.models.FieldChoice;i.add(s)}return l=this.el.querySelectorAll(".repeatable-choices")[0],e(l).sortable({handle:".move",axis:"y",stop:function(e,t){t.item.trigger("sorted",t.item.index())}}),t}}),wp.ccf.views.Fields.dropdown=wp.ccf.views.Fields.dropdown||wp.ccf.views.ChoiceableField.extend({template:wp.ccf.utils.template("ccf-dropdown-template"),events:function(){return this.constructor.__super__.events}}),wp.ccf.views.Fields.radio=wp.ccf.views.Fields.radio||wp.ccf.views.ChoiceableField.extend({template:wp.ccf.utils.template("ccf-radio-template"),events:function(){return this.constructor.__super__.events}}),wp.ccf.views.Fields.checkboxes=wp.ccf.views.Fields.checkboxes||wp.ccf.views.ChoiceableField.extend({template:wp.ccf.utils.template("ccf-checkboxes-template"),events:function(){return this.constructor.__super__.events}}),wp.ccf.views.FieldSidebar=wp.ccf.views.FieldSidebar||t.View.extend({initialize:function(e){this.currentFieldView=null,this.form=e.form},save:function(e){this.currentFieldView&&""!==this.currentFieldView.el.innerHTML&&this.currentFieldView.saveField(),e&&e instanceof Object&&e.resolve()},fieldRemoved:function(){this.currentFieldView&&(this.form.get("fields").get(this.currentFieldView.model)||this.render())},destroy:function(){wp.ccf.dispatcher.off("saveField",this.save),wp.ccf.dispatcher.off("mainViewChange",this.save),this.unbind()},render:function(e){var t={};if(e){var i=e.get("type");this.currentFieldView&&(this.currentFieldView.saveField(),this.currentFieldView.destroy&&this.currentFieldView.destroy()),this.currentFieldView=new wp.ccf.views.Fields[i]({model:e,collection:this.form.get("fields")}),this.currentFieldView.render(),this.el.innerHTML="",this.el.appendChild(this.currentFieldView.el);var l=this.form.get("fields");this.listenTo(l,"remove",this.fieldRemoved)}else{var s=wp.ccf.utils.template("ccf-empty-field-template");this.el.innerHTML=s(t)}return wp.ccf.dispatcher.on("saveField",this.save,this),wp.ccf.dispatcher.on("mainViewChange",this.save,this),this}}),wp.ccf.views.FieldRowPlaceholder=wp.ccf.views.FieldRowPlaceholder||t.View.extend({template:wp.ccf.utils.template("ccf-field-row-template"),tagName:"div",className:"field",initialize:function(e){this.type=e.type},render:function(){return this.el.innerHTML=this.template({label:l.allLabels[this.type]}),this.el.setAttribute("data-field-type",this.type),this.el.className+=" "+this.type,this}}),wp.ccf.views.FieldRow=wp.ccf.views.FieldRow||t.View.extend({template:wp.ccf.utils.template("ccf-field-row-template"),tagName:"div",className:"field",events:{"click .delete":"triggerDelete","click h4":"triggerEdit",sorted:"triggerUpdateSort"},initialize:function(e){i.bindAll(this,"triggerDelete"),this.form=e.form,this.listenTo(this.model,"change",this.handleChange,this),this.listenTo(this.model,"requirementsNotMet",this.requirementsNotMet,this),this.listenTo(this.model,"requirementsMet",this.requirementsMet,this),this.listenTo(this.model,"duplicateSlug",this.duplicateSlug,this),this.model.attributes.choices&&this.listenTo(this.model.attributes.choices,"change",this.handleChange,this)},duplicateSlug:function(){this.requirementsMet(),this.el.className+=" field-duplicate-slug"},requirementsNotMet:function(){this.requirementsMet(),this.el.className+=" field-incomplete"},requirementsMet:function(){this.el.className=this.el.className.replace(/(field-incomplete|field-duplicate-slug)/i,"")},triggerUpdateSort:function(e,t){this.form.get("fields").remove(this.model),this.form.get("fields").add(this.model,{at:t})},handleChange:function(){this.render()},triggerDelete:function(e){e.stopPropagation(),this.form.get("fields").remove(this.model),this.undelegateEvents(),this.remove()},triggerEdit:function(){var e=this.el.parentNode.querySelectorAll(".ccf-editing");i.each(e,function(e){e.className=e.className.replace(/ccf-editing/i,"")}),this.el.className=this.el.className.replace(/ccf-editing/i,"")+" ccf-editing",wp.ccf.dispatcher.trigger("openEditField",this.model)},render:function(e){this.el.innerHTML=this.template({label:l.allLabels[this.model.get("type")]}),this.el.setAttribute("data-field-type",this.model.get("type"));var t=RegExp(" "+this.model.get("type"),"i");this.el.className=this.el.className.replace(t,"")+" "+this.model.get("type"),e&&(this.el.className=this.el.className.replace(/ instantiated/i,"")+" instantiated");var i=document.getElementById("ccf-"+this.model.get("type")+"-preview-template");if(i){var s=this.el.querySelectorAll(".preview")[0];s.style.display="block",s.innerHTML=wp.ccf.utils.template("ccf-"+this.model.get("type")+"-preview-template")({field:this.model.toJSON()})}return this}}),wp.ccf.views.FormSettings=wp.ccf.views.FormSettings||t.View.extend({template:wp.ccf.utils.template("ccf-form-settings-template"),events:{"blur input":"save","change select":"save","change select.form-completion-action-type":"toggleCompletionFields","change select.form-pause":"togglePauseFields","click .add-notification":"triggerAddNotification"},notificationViews:[],initialize:function(e){this.model=e.form,this.notificationViews=[];var t=this.model.get("notifications");this.listenTo(t,"add",this.addNotification)},triggerAddNotification:function(){var e=this.model.get("notifications");e.add(new wp.ccf.models.FormNotification)},closeAllNotifications:function(){i.each(this.notificationViews,function(e){e.changeContext(null,"view")})},addNotification:function(e){var t=new wp.ccf.views.ExistingFormNotificationRow({model:e,form:this.model,context:"edit",parent:this}).render(),l=this.el.querySelectorAll(".ccf-form-notifications .rows")[0];l.querySelectorAll(".no-notifications").length>0&&l.removeChild(l.firstChild),i.each(this.notificationViews,function(e){e.changeContext(null,"view")}),this.notificationViews.push(t),l.appendChild(t.el)},toggleCompletionFields:function(){var e=this.el.querySelectorAll(".form-completion-action-type")[0].value,t=this.el.querySelectorAll(".completion-message")[0],i=this.el.querySelectorAll(".completion-redirect-url")[0];"text"===e?(t.style.display="block",i.style.display="none"):(t.style.display="none",i.style.display="block")},togglePauseFields:function(){var e=this.el.querySelectorAll(".form-pause")[0].value,t=this.el.querySelectorAll(".pause-message")[0];t.style.display=parseInt(e)?"block":"none"},save:function(){if(""!==this.el.innerHTML){var e=this.el.querySelectorAll(".form-title")[0].value;this.model.set("title",{raw:e});var t=this.el.querySelectorAll(".form-description")[0].value;this.model.set("description",t);var i=this.el.querySelectorAll(".form-button-text")[0].value;this.model.set("buttonText",i);var l=this.el.querySelectorAll(".form-pause")[0].value;this.model.set("pause",parseInt(l)?!0:!1);var s=this.el.querySelectorAll(".form-pause-message")[0].value;this.model.set("pauseMessage",s);var c=this.el.querySelectorAll(".form-completion-message")[0].value;this.model.set("completionMessage",c);var o=this.el.querySelectorAll(".form-completion-redirect-url")[0].value;this.model.set("completionRedirectUrl",o);var r=this.el.querySelectorAll(".form-completion-action-type")[0].value;this.model.set("completionActionType",r)}},fullSave:function(e){""!==this.el.innerHTML&&(this.save(),i.each(this.notificationViews,function(e){e.save()}),e!==void 0&&e.promise!==void 0&&e.resolve())},destroy:function(){wp.ccf.dispatcher.off("saveFormSettings",this.fullSave),wp.ccf.dispatcher.off("mainViewChange",this.fullSave)},deleteNotification:function(e){if(i.each(this.notificationViews,function(t){if(e.cid===t.cid){var l=i.indexOf(this.notificationViews,t);this.model.get("notifications").remove(e.model),this.notificationViews[l].remove(),this.notificationViews.splice(l,1)}},this),!this.notificationViews.length){var t=this.el.querySelectorAll(".ccf-form-notifications .rows")[0];t.appendChild(new wp.ccf.views.EmptyFormNotificationTableRow({form:this.model}).render().el)}},render:function(){var e={form:this.model.toJSON()};this.model.get("fields");var t=this.model.get("notifications");this.el.innerHTML=this.template(e),this.toggleCompletionFields(),this.togglePauseFields();var i=this.el.querySelectorAll(".ccf-form-notifications .rows")[0],l=document.createElement("tbody");return l.className="rows",t.length>=1?t.each(function(e){var t=new wp.ccf.views.ExistingFormNotificationRow({model:e,form:this.model,parent:this}).render();l.appendChild(t.el),this.notificationViews.push(t)},this):l.appendChild(new wp.ccf.views.EmptyFormNotificationTableRow({form:this.model}).render().el),i.parentNode.replaceChild(l,i),wp.ccf.dispatcher.on("mainViewChange",this.fullSave,this),wp.ccf.dispatcher.on("saveFormSettings",this.fullSave,this),this}}),wp.ccf.views.FormPane=wp.ccf.views.FormPane||t.View.extend(i.defaults({template:wp.ccf.utils.template("ccf-form-pane-template"),subViews:{"field-sidebar":wp.ccf.views.FieldSidebar,"form-settings":wp.ccf.views.FormSettings},events:{"click .save-button":"sync","click .signup-button":"signup","click .accordion-heading":"accordionClick","click .form-settings-heading":"accordionClick","click .insert-form-button":"insertForm"},initialize:function(){wp.ccf.dispatcher.on("openEditField",this.openEditField,this)},insertForm:function(){wp.ccf.utils.insertFormShortcode(this.model),wp.ccf.toggle()},signup:function(){var t=this.el.querySelectorAll(".email-signup-field")[0].value,i=this.el.querySelectorAll(".bottom .left.signup")[0];i.className="left signup",t?e.ajax({url:"//taylorlovett.us8.list-manage.com/subscribe/post-json?u=66118f9a5b0ab0414e83f043a&amp;id=b4ed816a24&c=?",method:"post",dataType:"jsonp",data:{EMAIL:t}}).done(function(){i.className="left signup signup-success"}):i.className="left signup signup-error"},accordionClick:function(t){var l=e(t.currentTarget).parents(".accordion-container")[0],s=l.querySelectorAll(".accordion-section");t.currentTarget.parentNode.className.match(/expanded/i)?t.currentTarget.parentNode.className=t.currentTarget.parentNode.className.replace(/expanded/i,""):t.currentTarget.parentNode.className+=" expanded",i.each(s,function(e){e!=t.currentTarget.parentNode&&e.className.match(/expanded/i)&&(e.className=e.className.replace(/expanded/i,""))}),t.currentTarget.className.match(/form-settings-heading/i)?this.el.className.match(/show-form-settings/i)?this.el.className=this.el.className.replace(/show-form-settings/i,""):this.el.className+=" show-form-settings":this.el.className=this.el.className.replace(/show-form-settings/i,"")},openEditField:function(e){this.renderedSubViews["field-sidebar"].render(e).el.style.display="block"},disable:function(){this.el.querySelectorAll(".save-button")[0].setAttribute("disabled","disabled"),this.el.querySelectorAll(".disabled-overlay")[0].style.display="block"},enable:function(){this.el.querySelectorAll(".save-button")[0].removeAttribute("disabled"),this.el.querySelectorAll(".disabled-overlay")[0].style.display="none"},sync:function(){var t=this,i=e(this.el.querySelectorAll(".spinner")[0]);i.fadeIn(),t.disable();var s=e.Deferred(),c=e.Deferred();wp.ccf.dispatcher.trigger("saveFormSettings",s),wp.ccf.dispatcher.trigger("saveField",c),e.when(s,c).then(function(){var e=t.model.get("fields"),s=!0,c={};e.each(function(e){var t=e.get("slug");e.hasRequiredAttributes()?t&&!t.match(/^[a-zA-Z0-9\-_]+$/)?(s=!1,e.trigger("requirementsNotMet")):c[e.get("slug")]!==void 0?(s=!1,e.trigger("duplicateSlug"),c[e.get("slug")].trigger("duplicateSlug")):e.trigger("requirementsMet"):(s=!1,e.trigger("requirementsNotMet")),e.get("slug")&&(c[e.get("slug")]=e)}),s?t.model.save({},{context:"edit"}).error(function(){var e="sync";wp.ccf.errorModal.render(e).show()}).done(function(){l.single&&!l.postId&&(window.location=l.adminUrl+"post.php?post="+t.model.get("id")+"&action=edit#ccf-form/"+t.model.get("id"))}).complete(function(){i.fadeOut(),t.enable(),wp.ccf.dispatcher.trigger("saveFormComplete",t.model)}):(t.enable(),i.fadeOut())})},enableDisableInsert:function(){var e=this.el.querySelectorAll(".insert-form-button")[0];this.model.get("id")?e.removeAttribute("disabled"):e.setAttribute("disabled","disabled")},getNextFieldOrd:function(){var e=this.model.get("fields"),t=e.length+1;return e.each(function(e){var i=e.get("slug"),l=/\-([0-9]+)$/g,s=l.exec(i);if(s&&s[1]){var c=parseInt(s[1]);c>=t&&(t=c+1)}}),t},render:function(t){var s=this;s.model=t?t:new wp.ccf.models.Form,this.listenTo(s.model,"change",this.enableDisableInsert,this);var c={labels:l.fieldLabels,form:s.model.toJSON()};window.form=s.model,s.el.innerHTML=this.template(c),s.el.className=s.el.className.replace(/show-form-settings/i,"");var o=s.el.querySelectorAll(".fields")[0];i.each(l.fieldLabels,function(e,t){o.appendChild(new wp.ccf.views.FieldRowPlaceholder({type:t}).render().el)});var r=s.el.querySelectorAll(".structure-fields")[0];i.each(l.structureFieldLabels,function(e,t){r.appendChild(new wp.ccf.views.FieldRowPlaceholder({type:t}).render().el)});var n=s.el.querySelectorAll(".special-fields")[0];i.each(l.specialFieldLabels,function(e,t){n.appendChild(new wp.ccf.views.FieldRowPlaceholder({type:t}).render().el)});var a=s.model.get("fields"),d=s.el.querySelectorAll(".form-content")[0],f=e(d);return e(s.el.querySelectorAll(".left-sidebar")[0].querySelectorAll(".field")).draggable({cursor:"move",distance:2,zIndex:160001,scroll:!1,containment:"document",appendTo:".ccf-main-modal",snap:!1,connectToSortable:".form-content",helper:function(t){var i=e(t.currentTarget),l=e('<div class="field" data-field-type="'+i.attr("data-field-type")+'"><h4>'+i.find(".label").html()+"</h4></div>");return l.css({width:f.width(),opacity:".75",height:i.height()})}}),a.length>=1&&(d.innerHTML="",a.each(function(e){var t=new wp.ccf.views.FieldRow({model:e,form:s.model}).render(!0).el;d.appendChild(t)})),e(d).sortable({axis:"y",distance:2,handle:"h4",placeholder:"field-placeholder",stop:function(e,t){if(!t.item.hasClass("instantiated")){var i=t.item.attr("data-field-type"),l={};wp.ccf.models.Fields[i].prototype.defaults().slug!==void 0&&(l.slug=i+"-"+s.getNextFieldOrd());var c=new wp.ccf.models.Fields[i](l),o=s.model.get("fields");o.add(c),new wp.ccf.views.FieldRow({model:c,el:t.item,form:s.model}).render(!0),t.item.attr("style","")}t.item.trigger("sorted",t.item.index())}}),s.initRenderSubViews(!1,!0,{form:s.model}),s.enableDisableInsert(),s}},wp.ccf.mixins.subViewable)),wp.ccf.views.ExistingFormTableRow=wp.ccf.views.ExistingFormTableRow||t.View.extend({tagName:"tr",template:wp.ccf.utils.template("ccf-existing-form-table-row-template"),events:{"click .edit":"triggerMainViewChange","click .delete":"triggerDelete","click .insert-form-button":"insertForm"},initialize:function(e){this.parent=e.parent},insertForm:function(){wp.ccf.utils.insertFormShortcode(this.model),wp.ccf.toggle()},triggerMainViewChange:function(){wp.ccf.switchToForm(this.model)},triggerDelete:function(){var e,t=this,i=t.parent.collection.state.currentPage;t.model.destroy().done(function(){e=i,e===t.parent.collection.state.totalPages&&e-1===(t.parent.collection.state.totalObjects-1)/l.postsPerPage&&e--,t.parent.showPage(e).done(function(){t.parent.renderPagination()})})},render:function(){return this.$el.html(this.template({form:this.model.toJSON(),utils:{getPrettyPostDate:wp.ccf.utils.getPrettyPostDate}})),this}}),wp.ccf.views.EmptyFormTableRow=wp.ccf.views.EmptyFormTableRow||t.View.extend({tagName:"tr",template:wp.ccf.utils.template("ccf-empty-form-table-row-template"),render:function(){return this.$el.html(this.template()),this}}),wp.ccf.views.ExistingFormTable=wp.ccf.views.ExistingFormTable||t.View.extend({template:wp.ccf.utils.template("ccf-existing-form-table-template"),initialize:function(){this.parent=arguments.parent,this.collection=new wp.ccf.collections.Forms,wp.ccf.dispatcher.on("changeFormTablePage",this.showPage,this),wp.ccf.dispatcher.on("saveFormComplete",this.render,this)},showPage:function(e){var t=this,i=this.collection.fetch({data:{page:e}});return i.error(function(){var e="sync";wp.ccf.errorModal.render(e).show()}),i.done(function(){var e=t.el.querySelectorAll(".rows")[0],i=document.createElement("tbody");i.className="rows",t.collection.length>=1?t.collection.each(function(e){var l=new wp.ccf.views.ExistingFormTableRow({model:e,parent:t}).render();i.appendChild(l.el)},t):i.appendChild((new wp.ccf.views.EmptyFormTableRow).render().el),e.parentNode.replaceChild(i,e)}),i},renderPagination:function(){var e=this.el.querySelectorAll(".ccf-pagination")[0];e.innerHTML="",this.collection.state.totalPages>1&&e.appendChild(new wp.ccf.views.Pagination({parent:this}).render(this.collection.state.totalPages,this.collection.state.currentPage).el)},render:function(){var e=this;return this.el.innerHTML=this.template(),this.el.querySelectorAll(".ccf-pagination")[0],this.showPage(1).done(function(){e.renderPagination()}),this}}),wp.ccf.views.ExistingFormPane=wp.ccf.views.ExistingFormPane||t.View.extend(i.defaults({template:wp.ccf.utils.template("ccf-existing-form-pane-template"),subViews:{"existing-form-table":wp.ccf.views.ExistingFormTable},render:function(){return this.rendered?this:(this.rendered=!0,this.el.innerHTML=this.template(),this.initRenderSubViews(!0),this)}},wp.ccf.mixins.subViewable)),wp.ccf.views.MainModal=wp.ccf.views.MainModal||t.View.extend(i.defaults({tagName:"div",className:"ccf-main-modal",template:wp.ccf.utils.template("ccf-main-modal-template"),events:{"click .close-icon":"hide","click .main-menu a":"menuClick"},subViews:{"form-pane":wp.ccf.views.FormPane},initialize:function(){l.single||(this.subViews["existing-form-pane"]=wp.ccf.views.ExistingFormPane),wp.ccf.dispatcher.on("mainViewChange",this.toggleView,this)},toggleView:function(e){this.showView(e,wp.ccf.currentForm);var t=e;"form-pane"===e&&wp.ccf.currentForm&&(t="existing-form-pane");var l=this.el.querySelectorAll(".menu-item");i.each(l,function(e){var i=e.getAttribute("data-view");e.className=i===t?e.className.replace("selected","")+" selected":e.className.replace("selected","")})},menuClick:function(e){var t=e.target.getAttribute("data-view");"form-pane"===t&&(wp.ccf.currentForm=null),wp.ccf.dispatcher.trigger("mainViewChange",t),e.preventDefault()},render:function(e){return e=e||!1,this.overlay(),this.el.innerHTML=this.template({single:e}),this.initRenderSubViews(),this.showView("form-pane",wp.ccf.currentForm,!0),this},overlay:function(){return this.overlayEl===void 0&&(this.overlayEl=document.createElement("div"),this.overlayEl.className="ccf-main-modal-overlay",document.body.appendChild(this.overlayEl)),this.overlayEl},remove:function(){return document.body.removeChild(this.overlay()),this},show:function(){e(this.overlay()).show(),this.$el.show()},hide:function(){e(this.overlay()).hide(),this.$el.hide()}},wp.ccf.mixins.subViewable)),wp.ccf.views.SubmissionRow=wp.ccf.views.SubmissionRow||t.View.extend({tagName:"tr",template:wp.ccf.utils.template("ccf-submission-row-template"),events:{"click .view":"view","click .delete":"delete"},initialize:function(e){this.parent=e.parent},"delete":function(){var e,t=this,i=t.parent.collection.state.currentPage;t.model.destroy().done(function(){e=i,e===t.parent.collection.state.totalPages&&e-1===(t.parent.collection.state.totalObjects-1)/l.postsPerPage&&e--,t.parent.showPage(e).done(function(){t.parent.renderPagination()})})},view:function(e){var t=e.currentTarget.getAttribute("data-submission-id"),i=e.currentTarget.getAttribute("data-submission-date");tb_show(l.thickboxTitle+" - "+wp.ccf.utils.getPrettyPostDate(i),"#TB_inline?height=500&amp;width=700&amp;inlineId=ccf-submission-content-"+parseInt(t),null)},render:function(){return this.$el.html(this.template({submission:this.model.toJSON(),currentColumns:this.parent.columns,columns:wp.ccf.currentForm.getFieldSlugs(!0),utils:{getPrettyPostDate:wp.ccf.utils.getPrettyPostDate,wordChop:wp.ccf.utils.wordChop,isFieldDate:wp.ccf.utils.isFieldDate,isFieldName:wp.ccf.utils.isFieldName,isFieldFile:wp.ccf.utils.isFieldFile,isFieldAddress:wp.ccf.utils.isFieldAddress,isFieldEmailConfirm:wp.ccf.utils.isFieldEmailConfirm,getPrettyFieldDate:wp.ccf.utils.getPrettyFieldDate,getPrettyFieldAddress:wp.ccf.utils.getPrettyFieldAddress,getPrettyFieldName:wp.ccf.utils.getPrettyFieldName,getPrettyFieldEmailConfirm:wp.ccf.utils.getPrettyFieldEmailConfirm}})),this}}),wp.ccf.views.SubmissionsTable=wp.ccf.views.SubmissionsTable||t.View.extend({template:wp.ccf.utils.template("ccf-submission-table-template"),events:{"click .prev:not(.disabled)":"previousPage","click .next:not(.disabled)":"nextPage","click .first:not(.disabled)":"firstPage","click .last:not(.disabled)":"lastPage"},initialize:function(){this.collection=new wp.ccf.collections.Submissions({},{formId:l.postId}),wp.ccf.dispatcher.on("submissionTableRebuild",this.render,this)},showPage:function(e){var t=this,i=this.collection.fetch({data:{page:e}});return i.error(function(){var e="sync";wp.ccf.errorModal.render(e).show()}),i.done(function(){var e=t.el.querySelectorAll(".submission-rows")[0],i=document.createElement("tbody");i.className="submission-rows",t.collection.length>=1?t.collection.each(function(e){var l=new wp.ccf.views.SubmissionRow({model:e,parent:t}).render();i.appendChild(l.el)},t):i.appendChild(new wp.ccf.views.EmptySubmissionTableRow({parent:t}).render(wp.ccf.currentForm.getFieldSlugs(!0).concat("date")).el),e.parentNode.replaceChild(i,e)}),i},renderPagination:function(){var e=this.el.querySelectorAll(".ccf-pagination")[0];e.innerHTML="",this.collection.state.totalPages>1&&e.appendChild(new wp.ccf.views.Pagination({parent:this}).render(this.collection.state.totalPages,this.collection.state.currentPage).el)},render:function(e){var t=this;return t.columns=e?e:wp.ccf.currentForm.getFieldSlugs(!0).slice(0,4).concat("date"),1>t.columns.length?t.el.innerHTML="":(t.el.innerHTML=t.template({columns:t.columns}),t.el.querySelectorAll(".ccf-pagination")[0],t.showPage(1).done(function(){t.renderPagination()})),t}}),wp.ccf.views.ErrorModal=wp.ccf.views.ErrorModal||t.View.extend({template:wp.ccf.utils.template("ccf-error-modal-template"),tagName:"div",className:"ccf-error-modal",events:{"click .close":"hide"},hide:function(){this.el.className=this.el.className.replace(" show","")},show:function(){this.el.className=this.el.className.replace(" show","")+" show"},toggle:function(){this.el.className.match(" show")?this.hide():this.show()},render:function(e){var t={messageType:""};return e&&(t.messageType=e),this.el.innerHTML=this.template(t),this}}),wp.ccf.views.Pagination=wp.ccf.views.Pagination||t.View.extend({template:wp.ccf.utils.template("ccf-pagination-template"),events:{"click .prev:not(.disabled)":"previousPage","click .next:not(.disabled)":"nextPage","click .first:not(.disabled)":"firstPage","click .last:not(.disabled)":"lastPage"},initialize:function(e){this.parent=e.parent},previousPage:function(){var e=this;e.parent.showPage(e.parent.collection.state.currentPage-1).done(function(){e.render()})},nextPage:function(){var e=this;e.parent.showPage(e.parent.collection.state.currentPage+1).done(function(){e.render()})},firstPage:function(){var e=this;e.parent.showPage(1).done(function(){e.render()})},lastPage:function(){var e=this;e.parent.showPage(e.parent.collection.state.totalPages).done(function(){e.render()})},render:function(){return this.el.innerHTML=this.template({totalPages:this.parent.collection.state.totalPages,currentPage:this.parent.collection.state.currentPage,totalObjects:this.parent.collection.state.totalObjects}),this}}),wp.ccf.views.EmptySubmissionTableRow=wp.ccf.views.EmptySubmissionTableRow||t.View.extend({tagName:"tr",template:wp.ccf.utils.template("ccf-no-submissions-row-template"),initialize:function(e){this.parent=e.parent},render:function(){return this.el.innerHTML=this.template({columns:this.parent.columns}),this}}),wp.ccf.views.SubmissionColumnController=wp.ccf.views.SubmissionColumnController||t.View.extend({template:wp.ccf.utils.template("ccf-submissions-controller-template"),events:{"click input[type=checkbox]":"triggerTableRebuild"},render:function(){this.el.innerHTML=this.template({columns:wp.ccf.currentForm.getFieldSlugs(!0).concat("date")})},triggerTableRebuild:function(){var e=[],t=document.querySelectorAll(".submission-column-checkbox");if(t.length>=1)for(var i=0;t.length>i;i++)t[i].checked&&e.push(t[i].value);wp.ccf.dispatcher.trigger("submissionTableRebuild",e)}})}(jQuery,Backbone,_,ccfSettings),function(e,t){"use strict";wp.ccf.router=wp.ccf.router||t.Router.extend({routes:{"ccf-form":"open","ccf-form/:formId":"open"},open:function(e){wp.ccf.show(e)}})}(jQuery,Backbone,_,ccfSettings),function(e,t,i,l){"use strict";wp.ccf=i.defaults(wp.ccf,{forms:new wp.ccf.collections.Forms,currentForm:null,errorModal:null,_currentFormDeferred:null,dispatcher:{},show:function(e){return this.switchToForm(e),this.instance.show(),this.instance},initErrorModal:function(){this.errorModal=(new wp.ccf.views.ErrorModal).render();var e=document.getElementsByTagName("body")[0];e.appendChild(this.errorModal.el)},switchToForm:function(e){var t=this;if(+e===parseInt(e)){var i=parseInt(e);if(e=t.forms.findWhere({id:parseInt(i)}),!e){var l;return t.forms.formsFetching[i]!==void 0?(l=t.forms.formsFetching[i],e=null):(e=new wp.ccf.models.Form({id:i}),l=e.fetch(),t.forms.formsFetching[i]=l),l.done(function(){e?(delete t.forms.formsFetching[i],t.forms.add(e)):e=t.forms.findWhere({id:i}),t.currentForm=e,wp.ccf.dispatcher.trigger("mainViewChange","form-pane")}),l}t.currentForm=e,wp.ccf.dispatcher.trigger("mainViewChange","form-pane")}else t.currentForm=e,wp.ccf.dispatcher.trigger("mainViewChange","form-pane");return!0},hide:function(){return this.instance.hide(),this.instance},toggle:function(e){return this.switchToForm(e),this.instance.$el.is(":visible")?this.instance.hide():this.instance.show(),this.instance},createSubmissionsTable:function(e){var t=document.querySelectorAll(".ccf-submission-column-controller"),i=new wp.ccf.views.SubmissionsTable({el:e});i.render(),t&&new wp.ccf.views.SubmissionColumnController({el:t}).render()},_setupMainModal:function(e){return this.instance=(new wp.ccf.views.MainModal).render(e),document.getElementsByTagName("body")[0].appendChild(this.instance.el),t.history.start(),this.instance},createManager:function(){var s=this,c=document.querySelectorAll(".ccf-open-form-manager")[0];if(!c)return!1;i.extend(this.dispatcher,t.Events),new wp.ccf.router,s.initErrorModal();var o=!1;if(l.single)if(o=!0,l.postId){var r=parseInt(l.postId);if(s.forms.formsFetching[r]===void 0){var n=new wp.ccf.models.Form({id:r}),a=n.fetch();s.forms.formsFetching[r]=a,s._currentFormDeferred=a,a.done(function(){delete s.forms.formsFetching[r],s.forms.add(n),s.currentForm=n})}else s._currentFormDeferred=s.forms.formsFetching[r],s._currentFormDeferred.done(function(){s.currentForm=s.forms.findWhere({id:r})});e.when(s._currentFormDeferred).then(function(){s._setupMainModal(!0),c.style.display="inline-block";var e=document.getElementById("ccf-submissions");if(e){var t=e.querySelectorAll(".inside")[0],i=document.createElement("div");i.className="ccf-submission-icon",i.setAttribute("data-icon","");var o=document.createElement("a");o.href="?action=edit&post="+parseInt(l.postId)+"&download_submissions=1&download_submissions_nonce="+l.downloadSubmissionsNonce,o.className="ccf-submission-icon",o.setAttribute("data-icon","");var r=document.getElementById("show-settings-link");i.onclick=function(){r.click()},e.insertBefore(i,e.firstChild.nextSibling.nextSibling),e.insertBefore(o,e.firstChild.nextSibling.nextSibling),wp.ccf.createSubmissionsTable(t)}})}else s._setupMainModal(!0),c.style.display="inline-block";else s._setupMainModal();var d=function(e){e=e||window.event;var t=e.currentTarget?e.currentTarget:e.srcElement,i=t.getAttribute("data-form-id");wp.ccf.toggle(i)};c.addEventListener?c.addEventListener("click",d,!1):c.attachEvent("onclick",d)}}),wp.ccf.createManager()}(jQuery,Backbone,_,ccfSettings);
 
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(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#8220;/g,"”").replace(/&#8221;/g,"”").replace(/&#8216;/g,"‘").replace(/&#038;/g,"&").replace(/&#039;/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],m=f.findWhere({slug:u.slug});if(m){if(u.addresses!==void 0){var p=t.get("addresses");if(p&&p.length>0)for(s=0;u.addresses>s;s++){var h=p.at(s);h.set(u.addresses[s]),h.decode()}delete e.notifications[l].addresses}m.set(u),m.decode()}}delete e.notifications}else{var w=[];i.each(e.notifications,function(e){var t=new wp.ccf.models.FormNotification(e);t.decode(),w.push(t)}),e.notifications=new wp.ccf.collections.FormNotifications(w)}}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()},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();var t=this.el.querySelectorAll(".addresses")[0],i=this.model.get("addresses");if(i.length>=1)i.each(function(e){var i=new wp.ccf.views.FormNotificationAddress({model:e,parent:this,notification:this.model,form:this.form}).render();t.appendChild(i.el),this.addressViews.push(i)},this);else{var l=new wp.ccf.models.FormNotificationAddress;i.add(l)}}var s=this.form.get("fields");return this.listenTo(s,"add",this.updateFromFieldField,this),this.listenTo(s,"remove",this.updateFromFieldField,this),this},triggerDelete:function(){this.parent.deleteNotification(this)}}),wp.ccf.views.FieldBase=wp.ccf.views.FieldBase||t.View.extend({events:{"blur input":"saveField","blur input.field-slug":"checkSlug","blur textarea":"saveField","change select":"saveField",'change input[type="checkbox"]':"saveField"},checkSlug:function(){var e=this.el.querySelectorAll(".field-slug");if(e.length>0){var t=e[0],i=!1;t.parentNode.className=t.value&&!t.value.match(/^[a-zA-Z0-9\-_]+$/)?t.parentNode.className.replace(/ field-error/i,"")+" field-error":t.parentNode.className.replace(/ field-error/i,""),this.collection.length>0&&""!==t.value?(this.collection.each(function(e){e!==this.model&&t.value===e.get("slug")&&(i=!0)},this),t.parentNode.className=i?t.parentNode.className.replace(/ field-duplicate-slug/i,"")+" field-duplicate-slug":t.parentNode.className.replace(/ field-duplicate-slug/i,"")):t.parentNode.className=t.parentNode.className.replace(/ field-duplicate-slug/i,"")}},destroy:function(){this.unbind()},render:function(){return this.el.innerHTML=this.template({field:this.model.toJSON()}),this.checkSlug(),this}}),wp.ccf.views.Fields["single-line-text"]=wp.ccf.views.Fields["single-line-text"]||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-single-line-text-template"),initialize:function(){},saveField:function(){return""!==this.el.innerHTML?(this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("description",this.el.querySelectorAll(".field-description")[0].value),this.model.set("value",this.el.querySelectorAll(".field-value")[0].value),this.model.set("placeholder",this.el.querySelectorAll(".field-placeholder")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1),this):void 0}}),wp.ccf.views.Fields.file=wp.ccf.views.Fields.file||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-file-template"),initialize:function(){},saveField:function(){return""!==this.el.innerHTML?(this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("description",this.el.querySelectorAll(".field-description")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1),this.model.set("fileExtensions",this.el.querySelectorAll(".field-file-extensions")[0].value),this.model.set("maxFileSize",this.el.querySelectorAll(".field-max-file-size")[0].value),this):void 0}}),wp.ccf.views.Fields.recaptcha=wp.ccf.views.Fields.recaptcha||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-recaptcha-template"),initialize:function(){},saveField:function(){return""!==this.el.innerHTML?(this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("description",this.el.querySelectorAll(".field-description")[0].value),this.model.set("siteKey",this.el.querySelectorAll(".field-site-key")[0].value),this.model.set("secretKey",this.el.querySelectorAll(".field-secret-key")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this):void 0}}),wp.ccf.views.Fields["section-header"]=wp.ccf.views.Fields["section-header"]||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-section-header-template"),initialize:function(){},saveField:function(){return""!==this.el.innerHTML?(this.model.set("heading",this.el.querySelectorAll(".field-heading")[0].value),this.model.set("subheading",this.el.querySelectorAll(".field-subheading")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this):void 0}}),wp.ccf.views.Fields.html=wp.ccf.views.Fields.html||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-html-template"),initialize:function(){},saveField:function(){return""!==this.el.innerHTML?(this.model.set("html",this.el.querySelectorAll(".field-html")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this):void 0}}),wp.ccf.views.Fields["paragraph-text"]=wp.ccf.views.Fields["paragraph-text"]||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-paragraph-text-template"),saveField:function(){return""!==this.el.innerHTML?(this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("description",this.el.querySelectorAll(".field-description")[0].value),this.model.set("value",this.el.querySelectorAll(".field-value")[0].value),this.model.set("placeholder",this.el.querySelectorAll(".field-placeholder")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1),this):void 0}}),wp.ccf.views.Fields.hidden=wp.ccf.views.Fields.hidden||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-hidden-template"),saveField:function(){return""!==this.el.innerHTML?(this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("value",this.el.querySelectorAll(".field-value")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this):void 0}}),wp.ccf.views.Fields.date=wp.ccf.views.Fields.date||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-date-template"),saveField:function(){if(""!==this.el.innerHTML){this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("description",this.el.querySelectorAll(".field-description")[0].value);var e=this.el.querySelectorAll(".field-value");e.length>0&&this.model.set("value",e[0].value);var t=this.el.querySelectorAll(".field-date-format");t.length&&this.model.set("dateFormat",t[0].value);var i=this.model.get("showDate"),l=this.el.querySelectorAll(".field-show-date")[0].checked?!0:!1;this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("showDate",l);var s=this.model.get("showTime"),o=this.el.querySelectorAll(".field-show-time")[0].checked?!0:!1;
2
+ 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&amp;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&amp;width=700&amp;inlineId=ccf-submission-content-"+parseInt(t),null)},render:function(){return this.$el.html(this.template({submission:this.model.toJSON(),currentColumns:this.parent.columns,columns:wp.ccf.currentForm.getFieldSlugs(!0),utils:{getPrettyPostDate:wp.ccf.utils.getPrettyPostDate,wordChop:wp.ccf.utils.wordChop,isFieldDate:wp.ccf.utils.isFieldDate,isFieldName:wp.ccf.utils.isFieldName,isFieldFile:wp.ccf.utils.isFieldFile,isFieldAddress:wp.ccf.utils.isFieldAddress,isFieldEmailConfirm:wp.ccf.utils.isFieldEmailConfirm,getPrettyFieldDate:wp.ccf.utils.getPrettyFieldDate,getPrettyFieldAddress:wp.ccf.utils.getPrettyFieldAddress,getPrettyFieldName:wp.ccf.utils.getPrettyFieldName,getPrettyFieldEmailConfirm:wp.ccf.utils.getPrettyFieldEmailConfirm}})),this}}),wp.ccf.views.SubmissionsTable=wp.ccf.views.SubmissionsTable||t.View.extend({template:wp.ccf.utils.template("ccf-submission-table-template"),events:{"click .prev:not(.disabled)":"previousPage","click .next:not(.disabled)":"nextPage","click .first:not(.disabled)":"firstPage","click .last:not(.disabled)":"lastPage"},initialize:function(){this.collection=new wp.ccf.collections.Submissions({},{formId:l.postId}),wp.ccf.dispatcher.on("submissionTableRebuild",this.render,this)},showPage:function(e){var t=this,i=this.collection.fetch({data:{page:e}});return i.error(function(){var e="sync";wp.ccf.errorModal.render(e).show()}),i.done(function(){var e=t.el.querySelectorAll(".submission-rows")[0],i=document.createElement("tbody");i.className="submission-rows",t.collection.length>=1?t.collection.each(function(e){var l=new wp.ccf.views.SubmissionRow({model:e,parent:t}).render();i.appendChild(l.el)},t):i.appendChild(new wp.ccf.views.EmptySubmissionTableRow({parent:t}).render(wp.ccf.currentForm.getFieldSlugs(!0).concat("date")).el),e.parentNode.replaceChild(i,e)}),i},renderPagination:function(){var e=this.el.querySelectorAll(".ccf-pagination")[0];e.innerHTML="",this.collection.state.totalPages>1&&e.appendChild(new wp.ccf.views.Pagination({parent:this}).render(this.collection.state.totalPages,this.collection.state.currentPage).el)},render:function(e){var t=this;return t.columns=e?e:wp.ccf.currentForm.getFieldSlugs(!0).slice(0,4).concat("date"),1>t.columns.length?t.el.innerHTML="":(t.el.innerHTML=t.template({columns:t.columns}),t.el.querySelectorAll(".ccf-pagination")[0],t.showPage(1).done(function(){t.renderPagination()})),t}}),wp.ccf.views.ErrorModal=wp.ccf.views.ErrorModal||t.View.extend({template:wp.ccf.utils.template("ccf-error-modal-template"),tagName:"div",className:"ccf-error-modal",events:{"click .close":"hide"},hide:function(){this.el.className=this.el.className.replace(" show","")},show:function(){this.el.className=this.el.className.replace(" show","")+" show"},toggle:function(){this.el.className.match(" show")?this.hide():this.show()},render:function(e){var t={messageType:""};return e&&(t.messageType=e),this.el.innerHTML=this.template(t),this}}),wp.ccf.views.Pagination=wp.ccf.views.Pagination||t.View.extend({template:wp.ccf.utils.template("ccf-pagination-template"),events:{"click .prev:not(.disabled)":"previousPage","click .next:not(.disabled)":"nextPage","click .first:not(.disabled)":"firstPage","click .last:not(.disabled)":"lastPage"},initialize:function(e){this.parent=e.parent
3
+ },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);
build/js/form.min.js CHANGED
@@ -1 +1 @@
1
- (function(e,t){"use strict";window.wp=window.wp||{},wp.ccf=wp.ccf||{},wp.ccf.validators=wp.ccf.validators||{};var i={},l={};window.ccfRecaptchaOnload=function(){for(var e=document.querySelectorAll(".ccf-recaptcha-wrapper"),l=function(l){grecaptcha.render(e[s],{sitekey:e[s].getAttribute("data-sitekey"),theme:t.recaptcha_theme,callback:function(){i[l]=!0}})},s=0;e.length>s;s++){var r=e[s].getAttribute("data-form-id");l(r)}};var s=function(e){if(this.wrapper=e,this.errors={},e.className.match(" field-required")){this.inputs=this.wrapper.querySelectorAll(".field-input");var i=this.wrapper.querySelectorAll(".error");i.length&&i[0].parentNode.removeChild(i[0]);var l=!1;if(_.each(this.inputs,function(e){(e.checked&&e.value||e.selected)&&(l=!0)}),!l){this.errors[this.inputs[this.inputs.length-1].getAttribute("name")]={required:!0};var s=document.createElement("div");s.className="error required-error",s.innerHTML=t.required,e.appendChild(s)}}},r=function(e,i){return function(l){this.wrapper=l,this.inputs=this.wrapper.querySelectorAll(".field-input"),this.errors={};for(var s=this.wrapper.querySelectorAll(".error"),r=s.length-1;r>=0;r--)s[r].parentNode.removeChild(s[r]);_.each(this.inputs,function(t){var i=t.getAttribute("name");this.errors[i]={},t.getAttribute("aria-required")&&""===t.value&&(this.errors[i].required=t),e&&e.call(this,t)},this),i&&i.call(this);var c;for(var o in this.errors)if(this.errors.hasOwnProperty(o))for(var n in this.errors[o])c=document.createElement("div"),c.className="error "+n+"-error",c.setAttribute("data-field-name",o),c.innerHTML=t[n],this.errors[o][n].parentNode.insertBefore(c,this.errors[o][n].nextSibling)}};wp.ccf.validators["single-line-text"]=wp.ccf.validators["single-line-text"]||r(),wp.ccf.validators["paragraph-text"]=wp.ccf.validators["paragraph-text"]||r(),wp.ccf.validators.name=wp.ccf.validators.name||r(),wp.ccf.validators.email=wp.ccf.validators.email||r(!1,function(){var e=this.inputs[0].value;if(e){2===this.inputs.length&&e!==this.inputs[1].value&&(this.errors[this.inputs[0].getAttribute("name")].match=this.wrapper.lastChild);var t=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;t.test(e)||(this.errors[this.inputs[0].getAttribute("name")].email=this.wrapper.lastChild)}}),wp.ccf.validators.recaptcha=wp.ccf.validators.recaptcha||function(e,l){this.wrapper=e,this.inputs=this.wrapper.querySelectorAll(".g-recaptcha-response"),this.errors={};for(var s=this.wrapper.querySelectorAll(".error"),r=s.length-1;r>=0;r--)s[r].parentNode.removeChild(s[r]);i[l]||(this.errors["g-recaptcha-response"]={},this.errors["g-recaptcha-response"].recaptcha=this.wrapper.lastChild);var c;for(var o in this.errors)if(this.errors.hasOwnProperty(o))for(var n in this.errors[o])c=document.createElement("div"),c.className="error "+n+"-error",c.setAttribute("data-field-name",o),c.innerHTML=t[n],this.errors[o][n].parentNode.insertBefore(c,this.errors[o][n].nextSibling)},wp.ccf.validators.phone=wp.ccf.validators.phone||r(!1,function(){var e=this.inputs[0].value;if(e){var t=/^[0-9+.)(\- ]+$/;if(t.test(e)){if("us"===this.wrapper.getAttribute("data-phone-format")){var i=e.replace(/[^0-9]/gi,"");10!==i.length&&(this.errors[this.inputs[0].getAttribute("name")].digits=this.wrapper.lastChild)}}else this.errors[this.inputs[0].getAttribute("name")].phone=this.wrapper.lastChild}}),wp.ccf.validators.date=wp.ccf.validators.date||function(e){this.wrapper=e,this.errors={},this.inputs=this.wrapper.querySelectorAll(".field-input");for(var i=this.wrapper.querySelectorAll(".error"),l=i.length-1;l>=0;l--)i[l].parentNode.removeChild(i[l]);var s;_.each(this.inputs,function(i){var l=i.getAttribute("name");if(this.errors[l]={},i.getAttribute("aria-required")&&""===i.value&&(this.errors[l].required=!0,s=document.createElement("div"),s.className="error required-error",1===this.inputs.length?(s.innerHTML=t.required,s.className+=" right-error",i.parentNode.insertBefore(s,i.nextSibling)):(s.innerHTML=t[l.replace(/.*\[(.*?)\]/i,"$1")+"_required"],e.appendChild(s))),""!==i.value){var r=l.replace(/^.*\[(.*?)\]$/,"$1");"date"===r?i.value.match(/^([0-9]|\/)+$/)||(s=document.createElement("div"),s.className="error date-error",s.innerHTML=t.date,e.appendChild(s)):"hour"===r?i.value.match(/^[0-9]+$/)||(s=document.createElement("div"),s.className="error hour-error",s.innerHTML=t.hour,e.appendChild(s)):"minute"===r&&(i.value.match(/^[0-9]+$/)||(s=document.createElement("div"),s.className="error minute-error",s.innerHTML=t.minute,e.appendChild(s)))}},this)},wp.ccf.validators.address=wp.ccf.validators.address||r(),wp.ccf.validators.file=wp.ccf.validators.file||function(e){this.wrapper=e,this.inputs=this.wrapper.querySelectorAll(".field-input"),this.errors={};for(var i=this.wrapper.querySelectorAll(".error"),l=i.length-1;l>=0;l--)i[l].parentNode.removeChild(i[l]);_.each(this.inputs,function(e){var t=e.getAttribute("name");this.errors[t]={},e.getAttribute("aria-required")&&""===e.value&&(this.errors[t].required=e)},this);var s=this.inputs[0],r=this.wrapper.getAttribute("data-max-file-size"),c=this.wrapper.getAttribute("data-file-extensions");if(s.value){if(r){var o=1e3*1e3*parseInt(r);if(s.files)s.files[0].size>o&&(this.errors[this.inputs[0].getAttribute("name")].fileSize=this.wrapper.lastChild);else if("undefined"!=typeof ActiveXObject)try{var n=new ActiveXObject("Scripting.FileSystemObject"),a=n.getFile(s.value);a.size>o&&(this.errors[this.inputs[0].getAttribute("name")].fileSize=this.wrapper.lastChild)}catch(d){}}if(c){var f=c.replace(";",",").toLowerCase();if(f=f.replace(/\s+/g,""),f=f.split(","),f.length){var u=s.value.replace(/^.*\.(.+)$/g,"$1").toLowerCase();-1===_.indexOf(f,u)&&(this.errors[this.inputs[0].getAttribute("name")].fileExtension=this.wrapper.lastChild)}}}var h;for(var m in this.errors)if(this.errors.hasOwnProperty(m))for(var p in this.errors[m])h=document.createElement("div"),h.className="error "+p+"-error",h.setAttribute("data-field-name",m),h.innerHTML=t[p],"fileExtension"===p&&c?h.innerHTML+=" ("+c+")":"fileSize"===p&&r&&(h.innerHTML+=" "+r+" MB"),this.errors[m][p].parentNode.insertBefore(h,this.errors[m][p].nextSibling)},wp.ccf.validators.website=wp.ccf.validators.website||r(function(e){if(e.value){var t=/^http(s?)\:\/\/(([a-zA-Z0-9\-\._]+(\.[a-zA-Z0-9\-\._]+)+)|localhost)(\/?)([a-zA-Z0-9\-\.\?\,\'\/\\\+&amp;%\$#_]*)?([\d\w\.\/\%\+\-\=\&amp;\?\:\\\&quot;\'\,\|\~\;]*)$/;t.test(e.value)||(this.errors[e.getAttribute("name")].website=e)}}),wp.ccf.validators.checkboxes=wp.ccf.validators.checkboxes||s,wp.ccf.validators.dropdown=wp.ccf.validators.dropdown||r(),wp.ccf.validators.radio=wp.ccf.validators.radio||s,wp.ccf.iframeOnload=function(e){l[e]&&l[e]()},wp.ccf.setupDOM=wp.ccf.setupDOM||function(){for(var s,r,c=document.querySelectorAll(".ccf-datepicker"),o=0;c.length>o;o++)s={},r=c[o].getAttribute("data-date-format"),r&&(s.dateFormat=r.replace(/yyyy/i,"yy")),e(c[o]).datepicker(s);var n=document.querySelectorAll(".ccf-form-wrapper");n.length>=1&&_.each(n,function(s){function r(t){var i=s.querySelectorAll(".field"),l=[];if(_.each(i,function(e){if(!e.className.match(/ skip-field/i)){var t=e.getAttribute("data-field-type"),i=e.getAttribute("data-field-slug");m[i]=e;var s=new wp.ccf.validators[t](e,n);if(_.size(s.errors)){var r=0;for(var c in s.errors)s.errors.hasOwnProperty(c)&&_.size(s.errors[c])&&r++;r>0&&l.push(s)}}}),!l.length)return o.trigger("ccfFormSuccess"),s.className=s.className.replace(/ loading/i,"")+" loading",f.animate({opacity:100}),!0;t.returnFalse=!1,t.preventDefault&&t.preventDefault(),o.trigger("ccfFormError",l);var r=e(window).scrollTop(),c=r+e(window).height(),a=e(l[0].wrapper),d=a.offset(),u=d.top,h=u+a.height();return u>=r&&c>=h||e("html, body").animate({scrollTop:a.offset().top},500),!1}var c=s.querySelectorAll(".ccf-form")[0],o=e(c),n=parseInt(s.getAttribute("data-form-id")),a=c.querySelectorAll(".ccf-submit-button")[0],d=document.getElementById("ccf_form_frame_"+n),f=e(c.querySelectorAll(".loading-img")[0]),u=e(d),h=e(a),m={};l[n]=function(){var l,s=u.contents().find("body").text();if(!s)return!1;c.className=c.className.replace(/ loading/i,""),f.animate({opacity:0}),i[n]=!1;try{l=e.parseJSON(s)}catch(r){var o=document.createElement("div");return o.className="error unknown-error",o.innerText=t.unknown,a.parentNode.appendChild(o),!1}var d=a.parentNode.querySelectorAll(".error");if(d.length&&d[0].parentNode.removeChild(d[0]),l.success)if("text"===l.action_type&&l.completion_message){c.innerHTML="";var h=document.createElement("div");h.innerHTML=l.completion_message,h.className="ccf-form-complete",c.appendChild(h),e("html, body").animate({scrollTop:e(c).offset().top},500)}else"redirect"===l.action_type&&l.completion_redirect_url&&(document.location=l.completion_redirect_url);else l.field_errors&&_.each(l.field_errors,function(e,t){var i=m[t].querySelectorAll(".field-input");for(var l in e)if(e.hasOwnProperty(l)){var s=document.createElement("div");s.className="error "+l+"-error",s.innerHTML=e[l],1===i.length?i[i.length-1].parentNode.insertBefore(s,i[i.length-1].nextSibling):m[t].appendChild(s)}})},h.on("click",function(e){return e.preventDefault(),c.target="ccf_form_frame_"+n,c.action=t.ajaxurl,o.submit(),!1}),o.on("submit",r)})},e(document).ready(wp.ccf.setupDOM)})(jQuery,ccfSettings);
1
+ (function(e,t){"use strict";window.wp=window.wp||{},wp.ccf=wp.ccf||{},wp.ccf.validators=wp.ccf.validators||{};var i={},l={};window.ccfRecaptchaOnload=function(){for(var e=document.querySelectorAll(".ccf-recaptcha-wrapper"),l=function(l){grecaptcha.render(e[s],{sitekey:e[s].getAttribute("data-sitekey"),theme:t.recaptcha_theme,callback:function(){i[l]=!0}})},s=0;e.length>s;s++){var r=e[s].getAttribute("data-form-id");l(r)}};var s=function(e){if(this.wrapper=e,this.errors={},e.className.match(" field-required")){this.inputs=this.wrapper.querySelectorAll(".field-input");var i=this.wrapper.querySelectorAll(".error");i.length&&i[0].parentNode.removeChild(i[0]);var l=!1;if(_.each(this.inputs,function(e){(e.checked&&e.value||e.selected)&&(l=!0)}),!l){this.errors[this.inputs[this.inputs.length-1].getAttribute("name")]={required:!0};var s=document.createElement("div");s.className="error required-error",s.innerHTML=t.required,e.appendChild(s)}}},r=function(e,i){return function(l){this.wrapper=l,this.inputs=this.wrapper.querySelectorAll(".field-input"),this.errors={};for(var s=this.wrapper.querySelectorAll(".error"),r=s.length-1;r>=0;r--)s[r].parentNode.removeChild(s[r]);_.each(this.inputs,function(t){var i=t.getAttribute("name");this.errors[i]={},t.getAttribute("aria-required")&&""===t.value&&(this.errors[i].required=t),e&&e.call(this,t)},this),i&&i.call(this);var o;for(var c in this.errors)if(this.errors.hasOwnProperty(c))for(var n in this.errors[c])o=document.createElement("div"),o.className="error "+n+"-error",o.setAttribute("data-field-name",c),o.innerHTML=t[n],this.errors[c][n].parentNode.insertBefore(o,this.errors[c][n].nextSibling)}};wp.ccf.validators["single-line-text"]=wp.ccf.validators["single-line-text"]||r(),wp.ccf.validators["paragraph-text"]=wp.ccf.validators["paragraph-text"]||r(),wp.ccf.validators.name=wp.ccf.validators.name||r(),wp.ccf.validators.email=wp.ccf.validators.email||r(!1,function(){var e=this.inputs[0].value;if(e){2===this.inputs.length&&e!==this.inputs[1].value&&(this.errors[this.inputs[0].getAttribute("name")].match=this.wrapper.lastChild);var t=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;t.test(e)||(this.errors[this.inputs[0].getAttribute("name")].email=this.wrapper.lastChild)}}),wp.ccf.validators.recaptcha=wp.ccf.validators.recaptcha||function(e,l){this.wrapper=e,this.inputs=this.wrapper.querySelectorAll(".g-recaptcha-response"),this.errors={};for(var s=this.wrapper.querySelectorAll(".error"),r=s.length-1;r>=0;r--)s[r].parentNode.removeChild(s[r]);i[l]||(this.errors["g-recaptcha-response"]={},this.errors["g-recaptcha-response"].recaptcha=this.wrapper.lastChild);var o;for(var c in this.errors)if(this.errors.hasOwnProperty(c))for(var n in this.errors[c])o=document.createElement("div"),o.className="error "+n+"-error",o.setAttribute("data-field-name",c),o.innerHTML=t[n],this.errors[c][n].parentNode.insertBefore(o,this.errors[c][n].nextSibling)},wp.ccf.validators.phone=wp.ccf.validators.phone||r(!1,function(){var e=this.inputs[0].value;if(e){var t=/^[0-9+.)(\- ]+$/;if(t.test(e)){if("us"===this.wrapper.getAttribute("data-phone-format")){var i=e.replace(/[^0-9]/gi,"");10!==i.length&&(this.errors[this.inputs[0].getAttribute("name")].digits=this.wrapper.lastChild)}}else this.errors[this.inputs[0].getAttribute("name")].phone=this.wrapper.lastChild}}),wp.ccf.validators.date=wp.ccf.validators.date||function(e){this.wrapper=e,this.errors={},this.inputs=this.wrapper.querySelectorAll(".field-input");for(var i=this.wrapper.querySelectorAll(".error"),l=i.length-1;l>=0;l--)i[l].parentNode.removeChild(i[l]);var s;_.each(this.inputs,function(i){var l=i.getAttribute("name");if(this.errors[l]={},i.getAttribute("aria-required")&&""===i.value&&(this.errors[l].required=!0,s=document.createElement("div"),s.className="error required-error",1===this.inputs.length?(s.innerHTML=t.required,s.className+=" right-error",i.parentNode.insertBefore(s,i.nextSibling)):(s.innerHTML=t[l.replace(/.*\[(.*?)\]/i,"$1")+"_required"],e.appendChild(s))),""!==i.value){var r=l.replace(/^.*\[(.*?)\]$/,"$1");"date"===r?i.value.match(/^([0-9]|\/)+$/)||(s=document.createElement("div"),s.className="error date-error",s.innerHTML=t.date,e.appendChild(s)):"hour"===r?i.value.match(/^[0-9]+$/)||(s=document.createElement("div"),s.className="error hour-error",s.innerHTML=t.hour,e.appendChild(s)):"minute"===r&&(i.value.match(/^[0-9]+$/)||(s=document.createElement("div"),s.className="error minute-error",s.innerHTML=t.minute,e.appendChild(s)))}},this)},wp.ccf.validators.address=wp.ccf.validators.address||r(),wp.ccf.validators.file=wp.ccf.validators.file||function(e){this.wrapper=e,this.inputs=this.wrapper.querySelectorAll(".field-input"),this.errors={};for(var i=this.wrapper.querySelectorAll(".error"),l=i.length-1;l>=0;l--)i[l].parentNode.removeChild(i[l]);_.each(this.inputs,function(e){var t=e.getAttribute("name");this.errors[t]={},e.getAttribute("aria-required")&&""===e.value&&(this.errors[t].required=e)},this);var s=this.inputs[0],r=this.wrapper.getAttribute("data-max-file-size"),o=this.wrapper.getAttribute("data-file-extensions");if(s.value){if(r){var c=1e3*1e3*parseInt(r);if(s.files)s.files[0].size>c&&(this.errors[this.inputs[0].getAttribute("name")].fileSize=this.wrapper.lastChild);else if("undefined"!=typeof ActiveXObject)try{var n=new ActiveXObject("Scripting.FileSystemObject"),a=n.getFile(s.value);a.size>c&&(this.errors[this.inputs[0].getAttribute("name")].fileSize=this.wrapper.lastChild)}catch(d){}}if(o){var f=o.replace(";",",").toLowerCase();if(f=f.replace(/\s+/g,""),f=f.split(","),f.length){var u=s.value.replace(/^.*\.(.+)$/g,"$1").toLowerCase();-1===_.indexOf(f,u)&&(this.errors[this.inputs[0].getAttribute("name")].fileExtension=this.wrapper.lastChild)}}}var p;for(var h in this.errors)if(this.errors.hasOwnProperty(h))for(var m in this.errors[h])p=document.createElement("div"),p.className="error "+m+"-error",p.setAttribute("data-field-name",h),p.innerHTML=t[m],"fileExtension"===m&&o?p.innerHTML+=" ("+o+")":"fileSize"===m&&r&&(p.innerHTML+=" "+r+" MB"),this.errors[h][m].parentNode.insertBefore(p,this.errors[h][m].nextSibling)},wp.ccf.validators.website=wp.ccf.validators.website||r(function(e){if(e.value){var t=/^http(s?)\:\/\/(([a-zA-Z0-9\-\._]+(\.[a-zA-Z0-9\-\._]+)+)|localhost)(\/?)([a-zA-Z0-9\-\.\?\,\'\/\\\+&amp;%\$#_]*)?([\d\w\.\/\%\+\-\=\&amp;\?\:\\\&quot;\'\,\|\~\;]*)$/;t.test(e.value)||(this.errors[e.getAttribute("name")].website=e)}}),wp.ccf.validators.checkboxes=wp.ccf.validators.checkboxes||s,wp.ccf.validators.dropdown=wp.ccf.validators.dropdown||r(),wp.ccf.validators.radio=wp.ccf.validators.radio||s,wp.ccf.iframeOnload=function(e){l[e]&&l[e]()},wp.ccf.setupDOM=wp.ccf.setupDOM||function(){for(var s,r,o=document.querySelectorAll(".ccf-datepicker"),c=0;o.length>c;c++)s={},r=o[c].getAttribute("data-date-format"),r&&(s.dateFormat=r.replace(/yyyy/i,"yy")),e(o[c]).datepicker(s);var n=document.querySelectorAll(".ccf-form-wrapper");n.length>=1&&_.each(n,function(s){function r(t){var i=s.querySelectorAll(".field"),l=[];if(_.each(i,function(e){if(!e.className.match(/ skip-field/i)){var t=e.getAttribute("data-field-type"),i=e.getAttribute("data-field-slug");h[i]=e;var s=new wp.ccf.validators[t](e,n);if(_.size(s.errors)){var r=0;for(var o in s.errors)s.errors.hasOwnProperty(o)&&_.size(s.errors[o])&&r++;r>0&&l.push(s)}}}),!l.length)return c.trigger("ccfFormSuccess"),s.className=s.className.replace(/ loading/i,"")+" loading",f.animate({opacity:100}),!0;t.returnFalse=!1,t.preventDefault&&t.preventDefault(),c.trigger("ccfFormError",l);var r=e(window).scrollTop(),o=r+e(window).height(),a=e(l[0].wrapper),d=a.offset(),u=d.top,p=u+a.height();return u>=r&&o>=p||e("html, body").animate({scrollTop:a.offset().top},500),!1}var o=s.querySelectorAll(".ccf-form")[0],c=e(o),n=parseInt(s.getAttribute("data-form-id")),a=o.querySelectorAll(".ccf-submit-button")[0],d=document.getElementById("ccf_form_frame_"+n),f=e(o.querySelectorAll(".loading-img")[0]),u=e(d),p=e(a),h={};l[n]=function(){var l,s=u.contents().find("body").text();if(!s)return!1;o.className=o.className.replace(/ loading/i,""),f.animate({opacity:0}),i[n]=!1;try{l=e.parseJSON(s)}catch(r){var c=document.createElement("div");return c.className="error unknown-error",c.innerText=t.unknown,a.parentNode.appendChild(c),!1}var d=a.parentNode.querySelectorAll(".error");if(d.length&&d[0].parentNode.removeChild(d[0]),l.success)if("text"===l.action_type&&l.completion_message){o.innerHTML="";var p=document.createElement("div");p.innerHTML=l.completion_message,p.className="ccf-form-complete",o.appendChild(p),e("html, body").animate({scrollTop:e(o).offset().top},500)}else"redirect"===l.action_type&&l.completion_redirect_url&&(document.location=l.completion_redirect_url);else l.field_errors&&_.each(l.field_errors,function(e,t){var i=h[t].querySelectorAll(".field-input");for(var l in e)if(e.hasOwnProperty(l)){var s=document.createElement("div");s.className="error "+l+"-error",s.innerHTML=e[l],1===i.length?i[i.length-1].parentNode.insertBefore(s,i[i.length-1].nextSibling):h[t].appendChild(s)}})},p.on("click",function(e){return e.preventDefault(),o.target="ccf_form_frame_"+n,o.action=t.ajaxurl,c.submit(),!1}),c.on("submit",r)})},e(document).ready(wp.ccf.setupDOM)})(jQuery,ccfSettings);
build/js/settings.min.js CHANGED
@@ -1 +1 @@
1
- (function(e){var t=e(document.querySelectorAll(".ccf-asset-restrictions")),i=document.querySelectorAll(".ccf-asset-loading-restrictions-wrap")[0],l=e(document.querySelectorAll(".ccf-asset-loading-restriction-enabled")),s=t.find(".asset").length;l.on("change",function(e){i.className="0"===e.target.value?"ccf-asset-loading-restrictions-wrap ccf-hide-field":"ccf-asset-loading-restrictions-wrap"}),t.on("click",".add",function(i){var l=i.target.parentNode.cloneNode(!0),r=l.querySelectorAll(".asset-location")[0],c=l.querySelectorAll(".restriction-type")[0];r.value="",c.value="url",r.name="ccf_settings[asset_loading_restrictions]["+s+"][location]",c.name="ccf_settings[asset_loading_restrictions]["+s+"][type]",s++,t.append(e(l))}),t.on("click",".delete",function(e){var t=document.querySelectorAll(".ccf-asset-restrictions .asset");2>t.length?(e.target.parentNode.querySelectorAll(".asset-location")[0].value="",e.target.parentNode.querySelectorAll(".restriction-type")[0].value="url"):e.target.parentNode.parentNode.removeChild(e.target.parentNode)})})(jQuery);
1
+ (function(e){var t=e(document.querySelectorAll(".ccf-asset-restrictions")),i=document.querySelectorAll(".ccf-asset-loading-restrictions-wrap")[0],l=e(document.querySelectorAll(".ccf-asset-loading-restriction-enabled")),s=t.find(".asset").length;l.on("change",function(e){i.className="0"===e.target.value?"ccf-asset-loading-restrictions-wrap ccf-hide-field":"ccf-asset-loading-restrictions-wrap"}),t.on("click",".add",function(i){var l=i.target.parentNode.cloneNode(!0),r=l.querySelectorAll(".asset-location")[0],o=l.querySelectorAll(".restriction-type")[0];r.value="",o.value="url",r.name="ccf_settings[asset_loading_restrictions]["+s+"][location]",o.name="ccf_settings[asset_loading_restrictions]["+s+"][type]",s++,t.append(e(l))}),t.on("click",".delete",function(e){var t=document.querySelectorAll(".ccf-asset-restrictions .asset");2>t.length?(e.target.parentNode.querySelectorAll(".asset-location")[0].value="",e.target.parentNode.querySelectorAll(".restriction-type")[0].value="url"):e.target.parentNode.parentNode.removeChild(e.target.parentNode)})})(jQuery);
classes/class-ccf-api-form-controller.php CHANGED
@@ -356,6 +356,25 @@ class CCF_API_Form_Controller extends WP_REST_Controller {
356
  update_post_meta( $form_id, 'ccf_form_notifications', $clean_notifications );
357
  }
358
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
359
  /**
360
  * Create/update a form
361
  *
@@ -386,6 +405,8 @@ class CCF_API_Form_Controller extends WP_REST_Controller {
386
 
387
  $this->_create_and_map_notifications( $data['notifications'], $result );
388
 
 
 
389
  if ( isset( $data['buttonText'] ) ) {
390
  update_post_meta( $result, 'ccf_form_buttonText', sanitize_text_field( $data['buttonText'] ) );
391
  }
@@ -414,6 +435,18 @@ class CCF_API_Form_Controller extends WP_REST_Controller {
414
  update_post_meta( $result, 'ccf_form_pause', (bool) $data['pause'] );
415
  }
416
 
 
 
 
 
 
 
 
 
 
 
 
 
417
  if ( isset( $data['pauseMessage'] ) ) {
418
  update_post_meta( $result, 'ccf_form_pause_message', sanitize_text_field( $data['pauseMessage'] ) );
419
  }
@@ -913,6 +946,9 @@ class CCF_API_Form_Controller extends WP_REST_Controller {
913
  $data['completionRedirectUrl'] = esc_url_raw( get_post_meta( $data['id'], 'ccf_form_completion_redirect_url', true ) );
914
  $data['completionMessage'] = esc_html( get_post_meta( $data['id'], 'ccf_form_completion_message', true ) );
915
  $data['pause'] = (bool) get_post_meta( $data['id'], 'ccf_form_pause', true );
 
 
 
916
  $data['pauseMessage'] = esc_html( get_post_meta( $data['id'], 'ccf_form_pause_message', true ) );
917
 
918
  // @Todo: escaping
@@ -923,6 +959,14 @@ class CCF_API_Form_Controller extends WP_REST_Controller {
923
 
924
  $data['notifications'] = $notifications;
925
 
 
 
 
 
 
 
 
 
926
  $submissions = get_children( array( 'post_type' => 'ccf_submission', 'post_parent' => $data['id'], 'numberposts' => apply_filters( 'ccf_max_submissions', 5000, $data ) ) );
927
 
928
  $data['submissions'] = count( $submissions );
356
  update_post_meta( $form_id, 'ccf_form_notifications', $clean_notifications );
357
  }
358
 
359
+ /**
360
+ * Create/update post field mappings
361
+ *
362
+ * @param array $post_field_mappings
363
+ * @param int $form_id
364
+ * @since 7.3
365
+ */
366
+ public function _create_and_map_post_field_mappings( $post_field_mappings, $form_id ) {
367
+ $clean_post_field_mappings = array();
368
+
369
+ foreach ( $post_field_mappings as $mapping ) {
370
+ if ( ! empty( $mapping['formField'] ) && ! empty( $mapping['postField'] ) ) {
371
+ $clean_post_field_mappings[] = array_map( 'sanitize_text_field', $mapping );
372
+ }
373
+ }
374
+
375
+ update_post_meta( $form_id, 'ccf_form_post_field_mappings', $clean_post_field_mappings );
376
+ }
377
+
378
  /**
379
  * Create/update a form
380
  *
405
 
406
  $this->_create_and_map_notifications( $data['notifications'], $result );
407
 
408
+ $this->_create_and_map_post_field_mappings( $data['postFieldMappings'], $result );
409
+
410
  if ( isset( $data['buttonText'] ) ) {
411
  update_post_meta( $result, 'ccf_form_buttonText', sanitize_text_field( $data['buttonText'] ) );
412
  }
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
+ }
441
+
442
+ if ( isset( $data['postCreationType'] ) ) {
443
+ update_post_meta( $result, 'ccf_form_post_creation_type', sanitize_text_field( $data['postCreationType'] ) );
444
+ }
445
+
446
+ if ( isset( $data['postCreationStatus'] ) ) {
447
+ update_post_meta( $result, 'ccf_form_post_creation_status', sanitize_text_field( $data['postCreationStatus'] ) );
448
+ }
449
+
450
  if ( isset( $data['pauseMessage'] ) ) {
451
  update_post_meta( $result, 'ccf_form_pause_message', sanitize_text_field( $data['pauseMessage'] ) );
452
  }
946
  $data['completionRedirectUrl'] = esc_url_raw( get_post_meta( $data['id'], 'ccf_form_completion_redirect_url', true ) );
947
  $data['completionMessage'] = esc_html( get_post_meta( $data['id'], 'ccf_form_completion_message', true ) );
948
  $data['pause'] = (bool) get_post_meta( $data['id'], 'ccf_form_pause', true );
949
+ $data['postCreation'] = (bool) get_post_meta( $data['id'], 'ccf_form_post_creation', true );
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
959
 
960
  $data['notifications'] = $notifications;
961
 
962
+ // @Todo: escaping
963
+ $post_field_mappings = get_post_meta( $data['id'], 'ccf_form_post_field_mappings', true );
964
+ if ( empty( $post_field_mappings ) ) {
965
+ $post_field_mappings = array();
966
+ }
967
+
968
+ $data['postFieldMappings'] = $post_field_mappings;
969
+
970
  $submissions = get_children( array( 'post_type' => 'ccf_submission', 'post_parent' => $data['id'], 'numberposts' => apply_filters( 'ccf_max_submissions', 5000, $data ) ) );
971
 
972
  $data['submissions'] = count( $submissions );
classes/class-ccf-form-handler.php CHANGED
@@ -684,6 +684,86 @@ class CCF_Form_Handler {
684
  return array( 'error' => 'could_not_create_submission', 'success' => false, );
685
  }
686
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
687
  $output = array(
688
  'success' => true,
689
  'action_type' => get_post_meta( $form_id, 'ccf_form_completion_action_type', true ),
@@ -958,6 +1038,31 @@ class CCF_Form_Handler {
958
  return $return;
959
  }
960
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
961
  /**
962
  * Return singleton instance of class
963
  *
684
  return array( 'error' => 'could_not_create_submission', 'success' => false, );
685
  }
686
 
687
+ // Post creation
688
+
689
+ $post_creation = get_post_meta( $form_id, 'ccf_form_post_creation', true );
690
+
691
+ if ( ! empty( $post_creation ) ) {
692
+ $post_creation_type = get_post_meta( $form_id, 'ccf_form_post_creation_type', true );
693
+ $post_creation_status = get_post_meta( $form_id, 'ccf_form_post_creation_status', true );
694
+
695
+ $mappings = get_post_meta( $form_id, 'ccf_form_post_field_mappings', true );
696
+
697
+ if ( ! empty( $mappings ) ) {
698
+
699
+ $args = array(
700
+ 'post_status' => ( ! empty( $post_creation_status ) ) ? $post_creation_status : 'draft',
701
+ 'post_type' => ( ! empty( $post_creation_type ) ) ? $post_creation_type : 'post',
702
+ );
703
+
704
+ $tags = array();
705
+ $custom_fields = array();
706
+
707
+ foreach ( $mappings as $mapping ) {
708
+ if ( ! empty( $mapping['formField'] ) && isset( $submission[$mapping['formField']] ) ) {
709
+ $field_id = $field_slug_to_id[$mapping['formField']]['id'];
710
+ $field_type = get_post_meta( $field_id, 'ccf_field_type', true );
711
+
712
+ $submission_value = $submission[$mapping['formField']];
713
+ if ( is_array( $submission_value ) && isset( $submission_value['email'] ) ) {
714
+ $submission_value = $submission_value['email'];
715
+ }
716
+
717
+ if ( 'post_title' === $mapping['postField'] ) {
718
+ $args['post_title'] = $this->_flatten_and_concat( $submission_value );
719
+ } elseif ( 'post_content' === $mapping['postField'] ) {
720
+ $args['post_content'] = $this->_flatten_and_concat( $submission_value );
721
+ } elseif ( 'post_date' === $mapping['postField'] ) {
722
+ $args['post_date'] = $this->_flatten_and_concat( $submission_value );
723
+ } elseif ( 'post_excerpt' === $mapping['postField'] ) {
724
+ $args['post_excerpt'] = $this->_flatten_and_concat( $submission_value );
725
+ } elseif ( 'post_tag' === $mapping['postField'] ) {
726
+ if ( 'checkboxes' === $field_type ) {
727
+ $tags = array_merge( $tags, $submission_value );
728
+ } elseif ( 'dropdown' == $field_type && is_array( $submission_value ) ) {
729
+ $tags = array_merge( $tags, $submission_value );
730
+ } else {
731
+ $tags[] = $this->_flatten_and_concat( $submission[$mapping['formField']] );
732
+ }
733
+ } elseif ( 'custom_field' === $mapping['postField'] && ! empty( $mapping['customFieldKey'] ) ) {
734
+ $custom_fields[] = array(
735
+ 'key' => $mapping['customFieldKey'],
736
+ 'value' => $this->_flatten_and_concat( $submission_value ),
737
+ );
738
+ }
739
+ }
740
+ }
741
+
742
+ if ( empty( $args['post_title'] ) ) {
743
+ $args['post_title'] = apply_filters( 'ccf_default_post_creation_title', esc_html__( 'Post created by form', 'custom-contact-forms' ), $args, $form_id, $submission_id, $submission );
744
+ }
745
+
746
+ $post_creation_id = wp_insert_post( apply_filters( 'ccf_post_creation_args', $args, $form_id, $submission_id, $submission ) );
747
+
748
+ if ( ! is_wp_error( $post_creation_id ) ) {
749
+ update_post_meta( $post_creation_id, 'ccf_created_by_form', (int) $form_id );
750
+
751
+ if ( ! empty( $tags ) ) {
752
+ wp_set_object_terms( $post_creation_id, $tags, 'post_tag', true );
753
+ }
754
+
755
+ if ( ! empty( $custom_fields ) ) {
756
+ foreach ( $custom_fields as $custom_field ) {
757
+ // Todo: sanitization?
758
+ add_post_meta( $post_creation_id, $custom_field['key'], $custom_field['value'] );
759
+ }
760
+ }
761
+ }
762
+
763
+ do_action( 'ccf_post_creation', $post_creation_id, $form_id, $submission_id, $submission );
764
+ }
765
+ }
766
+
767
  $output = array(
768
  'success' => true,
769
  'action_type' => get_post_meta( $form_id, 'ccf_form_completion_action_type', true ),
1038
  return $return;
1039
  }
1040
 
1041
+ /**
1042
+ * Flatten and concatentate potential array
1043
+ *
1044
+ * @since 7.3
1045
+ */
1046
+ public function _flatten_and_concat( $value, $delim = ' ' ) {
1047
+ if ( is_string( $value ) ) {
1048
+ return $value;
1049
+ }
1050
+
1051
+ $output = '';
1052
+
1053
+ if ( is_array( $value ) ) {
1054
+ foreach ( $value as $v ) {
1055
+ if ( '' !== $output ) {
1056
+ $output .= $delim;
1057
+ }
1058
+
1059
+ $output .= $v;
1060
+ }
1061
+ }
1062
+
1063
+ return $output;
1064
+ }
1065
+
1066
  /**
1067
  * Return singleton instance of class
1068
  *
classes/class-ccf-form-manager.php CHANGED
@@ -331,7 +331,7 @@ class CCF_Form_Manager {
331
  </script>
332
 
333
  <script type="text/html" id="ccf-form-settings-template">
334
- <h3>General</h3>
335
 
336
  <p>
337
  <label for="ccf_form_title"><?php esc_html_e( 'Form Title:', 'custom-contact-forms' ); ?></label>
@@ -408,6 +408,62 @@ class CCF_Form_Manager {
408
  <span class="explain"><?php esc_html_e( 'For notification changes to take affect (updating, adding, deleting, etc.), you will need to save the form.', 'custom-contact-forms' ); ?></span>
409
  </p>
410
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
411
  </script>
412
 
413
  <script type="text/html" id="ccf-existing-form-pane-template">
@@ -1724,14 +1780,29 @@ class CCF_Form_Manager {
1724
  'specialFieldLabels' => $special_field_labels,
1725
  'maxFileSize' => floor( wp_max_upload_size() / 1000 / 1000 ),
1726
  'noEmailFields' => esc_html__( 'You have no email fields', 'custom-contact-forms' ),
 
1727
  'noNameFields' => esc_html__( 'You have no name fields', 'custom-contact-forms' ),
1728
  'noApplicableFields' => esc_html__( 'You have no applicable fields', 'custom-contact-forms' ),
 
1729
  'invalidDate' => esc_html__( 'Invalid date', 'custom-contact-forms' ),
1730
  'allLabels' => array_merge( $field_labels, $structure_field_labels, $special_field_labels ),
1731
  'fieldLabel' => esc_html__( 'Field Label', 'custom-contact-forms' ),
1732
  'thickboxTitle' => esc_html__( 'Form Submission', 'custom-contact-forms' ),
1733
  'pauseMessage' => esc_html__( 'This form is paused right now. Check back later!', 'custom-contact-forms' ),
1734
  'skipFields' => apply_filters( 'ccf_no_submission_display_fields', array( 'html', 'section-header', 'recaptcha' ) ),
 
 
 
 
 
 
 
 
 
 
 
 
 
1735
  ) );
1736
 
1737
  wp_enqueue_style( 'ccf-form-manager', plugins_url( $css_path, dirname( __FILE__ ) ), array(), CCF_VERSION );
331
  </script>
332
 
333
  <script type="text/html" id="ccf-form-settings-template">
334
+ <h3><?php esc_html_e( 'General', 'custom-contact-forms' ); ?></h3>
335
 
336
  <p>
337
  <label for="ccf_form_title"><?php esc_html_e( 'Form Title:', 'custom-contact-forms' ); ?></label>
408
  <span class="explain"><?php esc_html_e( 'For notification changes to take affect (updating, adding, deleting, etc.), you will need to save the form.', 'custom-contact-forms' ); ?></span>
409
  </p>
410
  </div>
411
+
412
+ <h3><?php esc_html_e( 'Post Creation', 'custom-contact-forms' ); ?></h3>
413
+ <p><?php esc_html_e( 'You can have Custom Contact Forms create a post (or custom post type) whenever someone submits your form.', 'custom-contact-forms' ); ?></p>
414
+
415
+ <p>
416
+ <label for="ccf_form_post_creation"><?php esc_html_e( 'Enable Post Creation:', 'custom-contact-forms' ); ?></label>
417
+
418
+ <select name="form_post_creation" class="form-post-creation" id="ccf_form_post_creation">
419
+ <option value="0"><?php esc_html_e( 'No', 'custom-contact-forms' ); ?></option>
420
+ <option value="1" <# if ( form.postCreation ) { #>selected<# } #>><?php esc_html_e( 'Yes', 'custom-contact-forms' ); ?></option>
421
+ </select>
422
+ </p>
423
+
424
+ <p class="post-creation-mapping-field">
425
+ <label for="ccf_form_post_creation_type"><?php esc_html_e( 'Post Type:', 'custom-contact-forms' ); ?></label>
426
+
427
+ <select name="form_post_creation_type" class="form-post-creation-type" id="ccf_form_post_creation_type">
428
+ <?php $post_types = get_post_types( array(), 'objects' ); foreach ( $post_types as $post_type ) : ?>
429
+ <option <# if ( '<?php echo esc_attr( $post_type->name ); ?>' === form.postCreationType ) { #>selected<# } #> value="<?php echo esc_attr( $post_type->name ); ?>"><?php echo esc_html( $post_type->name ); ?></option>
430
+ <?php endforeach; ?>
431
+ </select>
432
+ </p>
433
+
434
+ <p class="post-creation-mapping-field">
435
+ <label for="ccf_form_post_creation_status"><?php esc_html_e( 'Post Status:', 'custom-contact-forms' ); ?></label>
436
+
437
+ <select name="form_post_creation_status" class="form-post-creation-status" id="ccf_form_post_creation_status">
438
+ <?php $post_statuses = get_post_statuses(); foreach ( $post_statuses as $post_status => $post_status_name ) : ?>
439
+ <option <# if ( '<?php echo esc_attr( $post_status ); ?>' === form.postCreationStatus ) { #>selected<# } #> value="<?php echo esc_attr( $post_status ); ?>"><?php echo esc_html( $post_status_name ); ?></option>
440
+ <?php endforeach; ?>
441
+ </select>
442
+ </p>
443
+
444
+ <div class="post-creation-mapping-field post-creation-mapping-wrapper">
445
+ <label for="ccf_form_post_creation_type"><?php esc_html_e( 'Field Mappings:', 'custom-contact-forms' ); ?></label>
446
+
447
+ <div class="post-creation-mapping">
448
+ </div>
449
+
450
+ <span class="explain"><?php esc_html_e( 'You can map as few or as many fields as you like. However, if no form fields are mapped, no post will be created. Mapping a field to post_title is required.', 'custom-contact-forms' ); ?></span>
451
+ </div>
452
+ </script>
453
+
454
+ <script type="text/html" id="ccf-post-field-mapping">
455
+ <select id="ccf_post_field_mapping_form_field" class="field-form-field">
456
+ </select>
457
+
458
+ <select id="ccf_post_field_mapping_post_field" class="field-post-field">
459
+ </select>
460
+
461
+ <# if ( 'custom_field' === mapping.postField ) { #>
462
+ <input class="field-custom-field-key" type="text" placeholder="<?php esc_html_e( 'Custom Field Key', 'custom-contact-forms' ); ?>" value="{{ mapping.customFieldKey }}">
463
+ <# } #>
464
+
465
+ <a aria-hidden="true" data-icon="&#xe605;" class="add"></a>
466
+ <a aria-hidden="true" data-icon="&#xe604;" class="delete"></a>
467
  </script>
468
 
469
  <script type="text/html" id="ccf-existing-form-pane-template">
1780
  'specialFieldLabels' => $special_field_labels,
1781
  'maxFileSize' => floor( wp_max_upload_size() / 1000 / 1000 ),
1782
  'noEmailFields' => esc_html__( 'You have no email fields', 'custom-contact-forms' ),
1783
+ 'noAvailableFields' => esc_html__( 'You have no available fields', 'custom-contact-forms' ),
1784
  'noNameFields' => esc_html__( 'You have no name fields', 'custom-contact-forms' ),
1785
  'noApplicableFields' => esc_html__( 'You have no applicable fields', 'custom-contact-forms' ),
1786
+ 'chooseFormField' => esc_html__( 'Choose a Form Field', 'custom-contact-forms' ),
1787
  'invalidDate' => esc_html__( 'Invalid date', 'custom-contact-forms' ),
1788
  'allLabels' => array_merge( $field_labels, $structure_field_labels, $special_field_labels ),
1789
  'fieldLabel' => esc_html__( 'Field Label', 'custom-contact-forms' ),
1790
  'thickboxTitle' => esc_html__( 'Form Submission', 'custom-contact-forms' ),
1791
  'pauseMessage' => esc_html__( 'This form is paused right now. Check back later!', 'custom-contact-forms' ),
1792
  'skipFields' => apply_filters( 'ccf_no_submission_display_fields', array( 'html', 'section-header', 'recaptcha' ) ),
1793
+ 'choosePostField' => esc_html__( 'Choose a Post Field', 'custom-contact-forms' ),
1794
+ 'postFields' => array(
1795
+ 'single' => array(
1796
+ 'post_title' => esc_html__( 'Post Title', 'custom-contact-forms' ),
1797
+ 'post_content' => esc_html__( 'Post Content', 'custom-contact-forms' ),
1798
+ 'post_excerpt' => esc_html__( 'Post Excerpt', 'custom-contact-forms' ),
1799
+ 'post_date' => esc_html__( 'Post Date', 'custom-contact-forms' ),
1800
+ ),
1801
+ 'repeatable' => array(
1802
+ 'post_tag' => esc_html__( 'Post Tags', 'custom-contact-forms' ),
1803
+ 'custom_field' => esc_html__( 'Custom Field', 'custom-contact-forms' ),
1804
+ ),
1805
+ )
1806
  ) );
1807
 
1808
  wp_enqueue_style( 'ccf-form-manager', plugins_url( $css_path, dirname( __FILE__ ) ), array(), CCF_VERSION );
custom-contact-forms.php CHANGED
@@ -2,9 +2,11 @@
2
  /**
3
  * Plugin Name: Custom Contact Forms
4
  * Plugin URI: http://www.taylorlovett.com
5
- * Description: Build beautiful custom forms the WordPress way. View live previews of your forms while you build them.
6
  * Author: Taylor Lovett
7
- * Version: 7.2.3
 
 
8
  * Author URI: http://www.taylorlovett.com
9
  */
10
 
@@ -12,7 +14,7 @@
12
  * Include plugin reqs
13
  */
14
 
15
- define( 'CCF_VERSION', '7.2.3' );
16
 
17
  require_once( dirname( __FILE__ ) . '/classes/class-ccf-constants.php' );
18
  require_once( dirname( __FILE__ ) . '/classes/class-ccf-custom-contact-forms.php' );
2
  /**
3
  * Plugin Name: Custom Contact Forms
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.3
8
+ * Text Domain: custom-contact-forms
9
+ * Domain Path: /languages
10
  * Author URI: http://www.taylorlovett.com
11
  */
12
 
14
  * Include plugin reqs
15
  */
16
 
17
+ define( 'CCF_VERSION', '7.3' );
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/collections.js CHANGED
@@ -68,6 +68,12 @@
68
  }
69
  );
70
 
 
 
 
 
 
 
71
  wp.ccf.collections.FormNotificationAddresses = wp.ccf.collections.FormNotificationAddresses || Backbone.Collection.extend(
72
  {
73
  model: wp.ccf.models.FormNotificationAddress
68
  }
69
  );
70
 
71
+ wp.ccf.collections.PostFieldMappings = wp.ccf.collections.PostFieldMappings || Backbone.Collection.extend(
72
+ {
73
+ model: wp.ccf.models.PostFieldMapping
74
+ }
75
+ );
76
+
77
  wp.ccf.collections.FormNotificationAddresses = wp.ccf.collections.FormNotificationAddresses || Backbone.Collection.extend(
78
  {
79
  model: wp.ccf.models.FormNotificationAddress
js/manager/models.js CHANGED
@@ -73,6 +73,22 @@
73
  }
74
  );
75
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
76
  wp.ccf.models.FormNotificationAddress = wp.ccf.models.FormNotificationAddress || Backbone.Model.extend(
77
  {
78
  defaults: {
@@ -167,7 +183,10 @@
167
  completionActionType: 'text',
168
  completionRedirectUrl: '',
169
  completionMessage: '',
170
-
 
 
 
171
  notifications: new wp.ccf.collections.FormNotifications(),
172
  pause: false,
173
  pauseMessage: ccfSettings.pauseMessage
@@ -300,6 +319,38 @@
300
  }
301
  }
302
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
303
  return this.constructor.__super__.parse.call( this, response );
304
  },
305
 
73
  }
74
  );
75
 
76
+ wp.ccf.models.PostFieldMapping = wp.ccf.models.PostFieldMapping || Backbone.Model.extend(
77
+ {
78
+ defaults: {
79
+ formField: '',
80
+ postField: '',
81
+ customFieldKey: ''
82
+ },
83
+
84
+ decode: function() {
85
+ return _modelDecode.call( this, [] );
86
+ },
87
+
88
+ set: _modelSet
89
+ }
90
+ );
91
+
92
  wp.ccf.models.FormNotificationAddress = wp.ccf.models.FormNotificationAddress || Backbone.Model.extend(
93
  {
94
  defaults: {
183
  completionActionType: 'text',
184
  completionRedirectUrl: '',
185
  completionMessage: '',
186
+ postCreation: false,
187
+ postCreationType: 'post',
188
+ postCreationStatus: 'draft',
189
+ postFieldMappings: new wp.ccf.collections.PostFieldMappings(),
190
  notifications: new wp.ccf.collections.FormNotifications(),
191
  pause: false,
192
  pauseMessage: ccfSettings.pauseMessage
319
  }
320
  }
321
 
322
+ if ( response.postFieldMappings ) {
323
+
324
+ var postFieldMappings = SELF.get( 'postFieldMappings' );
325
+
326
+ if ( postFieldMappings && postFieldMappings.length > 0 ) {
327
+
328
+ for ( i = 0; i < response.postFieldMappings.length; i++ ) {
329
+ var newPostFieldMapping = response.postFieldMappings[i];
330
+
331
+ var postFieldMapping = postFieldMappings.findWhere( { slug: newPostFieldMapping.slug } );
332
+
333
+ if ( postFieldMapping ) {
334
+ postFieldMapping.set( newPostFieldMapping );
335
+ postFieldMapping.decode();
336
+ }
337
+ }
338
+
339
+ delete response.postFieldMappings;
340
+ } else {
341
+ var newPostFieldMappings = [];
342
+
343
+ _.each( response.postFieldMappings, function( postFieldMapping ) {
344
+ var postFieldMappingModel = new wp.ccf.models.PostFieldMapping( postFieldMapping );
345
+ postFieldMappingModel.decode();
346
+
347
+ newPostFieldMappings.push( postFieldMappingModel );
348
+ });
349
+
350
+ response.postFieldMappings = new wp.ccf.collections.PostFieldMappings( newPostFieldMappings );
351
+ }
352
+ }
353
+
354
  return this.constructor.__super__.parse.call( this, response );
355
  },
356
 
js/manager/views.js CHANGED
@@ -1265,6 +1265,180 @@
1265
  }
1266
  );
1267
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1268
  wp.ccf.views.FormSettings = wp.ccf.views.FormSettings || Backbone.View.extend(
1269
  {
1270
  template: wp.ccf.utils.template( 'ccf-form-settings-template' ),
@@ -1274,17 +1448,41 @@
1274
  'change select': 'save',
1275
  'change select.form-completion-action-type': 'toggleCompletionFields',
1276
  'change select.form-pause': 'togglePauseFields',
 
1277
  'click .add-notification': 'triggerAddNotification'
1278
  },
1279
 
1280
  notificationViews: [],
 
1281
 
1282
  initialize: function( options ) {
1283
  this.model = options.form;
1284
  this.notificationViews = [];
 
1285
 
1286
  var notifications = this.model.get( 'notifications' );
1287
  this.listenTo( notifications, 'add', this.addNotification );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1288
  },
1289
 
1290
  triggerAddNotification: function() {
@@ -1343,6 +1541,18 @@
1343
  }
1344
  },
1345
 
 
 
 
 
 
 
 
 
 
 
 
 
1346
  save: function() {
1347
  if ( this.el.innerHTML === '' ) {
1348
  // @todo: for some reason this is needed for IE8
@@ -1361,6 +1571,15 @@
1361
  var pause = this.el.querySelectorAll( '.form-pause' )[0].value;
1362
  this.model.set( 'pause', ( parseInt( pause ) ) ? true : false );
1363
 
 
 
 
 
 
 
 
 
 
1364
  var pauseMessage = this.el.querySelectorAll( '.form-pause-message' )[0].value;
1365
  this.model.set( 'pauseMessage', pauseMessage );
1366
 
@@ -1386,6 +1605,10 @@
1386
  view.save();
1387
  } );
1388
 
 
 
 
 
1389
  if ( typeof $promise !== 'undefined' && typeof $promise.promise !== 'undefined' ) {
1390
  $promise.resolve();
1391
  }
@@ -1423,7 +1646,7 @@
1423
  this.el.innerHTML = this.template( context );
1424
 
1425
  this.toggleCompletionFields();
1426
-
1427
  this.togglePauseFields();
1428
 
1429
  var rowContainer = this.el.querySelectorAll( '.ccf-form-notifications .rows' )[0];
@@ -1443,6 +1666,20 @@
1443
 
1444
  rowContainer.parentNode.replaceChild( newRowContainer, rowContainer );
1445
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1446
  wp.ccf.dispatcher.on( 'mainViewChange', this.fullSave, this );
1447
  wp.ccf.dispatcher.on( 'saveFormSettings', this.fullSave, this );
1448
 
1265
  }
1266
  );
1267
 
1268
+ wp.ccf.views.PostFieldMapping = Backbone.View.extend(
1269
+ {
1270
+ template: wp.ccf.utils.template( 'ccf-post-field-mapping' ),
1271
+ className: 'field-mapping',
1272
+
1273
+ events: {
1274
+ 'click .add': 'triggerAdd',
1275
+ 'click .delete': 'triggerDelete',
1276
+ 'blur input': 'save',
1277
+ 'change select': 'save'
1278
+ },
1279
+
1280
+ initialize: function( options ) {
1281
+ this.parent = options.parent;
1282
+ this.form = options.form;
1283
+ },
1284
+
1285
+ destroy: function() {
1286
+ this.unbind();
1287
+ },
1288
+
1289
+ save: function() {
1290
+ // @todo: fix this ie8 hack
1291
+ if ( this.el.innerHTML === '' ) {
1292
+ return;
1293
+ }
1294
+
1295
+ var formField = this.el.querySelectorAll( '.field-form-field' )[0].value;
1296
+ var postField = this.el.querySelectorAll( '.field-post-field' )[0].value;
1297
+ var customFieldKey = this.el.querySelectorAll( '.field-custom-field-key' );
1298
+
1299
+ var oldPostField = this.model.get( 'postField' );
1300
+
1301
+ this.model.set( 'formField', formField );
1302
+ this.model.set( 'postField', postField );
1303
+
1304
+ if ( customFieldKey.length ) {
1305
+ this.model.set( 'customFieldKey', customFieldKey[0].value );
1306
+ }
1307
+
1308
+ if ( oldPostField !== postField ) {
1309
+ this.render();
1310
+ }
1311
+
1312
+ return this;
1313
+
1314
+ },
1315
+
1316
+ updateFormFieldField: function() {
1317
+ var fieldFormField = this.el.querySelectorAll( '.field-form-field' )[0];
1318
+ fieldFormField.innerHTML = '';
1319
+ fieldFormField.disabled = false;
1320
+
1321
+ var fields = this.form.get( 'fields' ),
1322
+ fieldsAdded = 0;
1323
+
1324
+ var formField = this.model.get( 'formField' ),
1325
+ option;
1326
+
1327
+ if ( fields.length >= 1 ) {
1328
+ option = document.createElement( 'option' );
1329
+ option.innerHTML = ccfSettings.chooseFormField;
1330
+ option.value = '';
1331
+
1332
+ fieldFormField.appendChild( option );
1333
+
1334
+ fields.each( function( field ) {
1335
+ option = document.createElement( 'option' );
1336
+ option.innerHTML = field.get( 'slug' );
1337
+ option.value = field.get( 'slug' );
1338
+
1339
+ if ( field.get( 'slug' ) === formField ) {
1340
+ option.selected = true;
1341
+ }
1342
+
1343
+ fieldFormField.appendChild( option );
1344
+
1345
+ fieldsAdded++;
1346
+ });
1347
+ }
1348
+
1349
+ if ( 0 === fieldsAdded ) {
1350
+ option = document.createElement( 'option' );
1351
+ option.innerHTML = ccfSettings.noAvailableFields;
1352
+ option.value = '';
1353
+ fieldFormField.appendChild( option );
1354
+ fieldFormField.disabled = true;
1355
+ }
1356
+ },
1357
+
1358
+ updatePostFields: function() {
1359
+ var dropdown = this.el.querySelectorAll( '.field-post-field' )[0],
1360
+ option;
1361
+
1362
+ option = document.createElement( 'option' );
1363
+ option.value = '';
1364
+ option.innerText = ccfSettings.choosePostField;
1365
+ dropdown.appendChild( option );
1366
+
1367
+ var mappings = this.form.get( 'postFieldMappings' );
1368
+ var usedFields = [];
1369
+
1370
+ mappings.each( function( model ) {
1371
+ if ( model !== this.model ) {
1372
+ usedFields.push( model.get( 'postField' ) );
1373
+ }
1374
+ }, this );
1375
+
1376
+ _.each( ccfSettings.postFields.single, function( field, slug ) {
1377
+ if ( -1 === usedFields.indexOf( slug ) ) {
1378
+ option = document.createElement( 'option' );
1379
+ option.value = slug;
1380
+ option.innerText = field;
1381
+
1382
+ if ( this.model.get( 'postField' ) === slug ) {
1383
+ option.selected = true;
1384
+ }
1385
+
1386
+ dropdown.appendChild( option );
1387
+ }
1388
+ }, this );
1389
+
1390
+ _.each( ccfSettings.postFields.repeatable, function( field, slug ) {
1391
+
1392
+ option = document.createElement( 'option' );
1393
+ option.value = slug;
1394
+ option.innerText = field;
1395
+
1396
+ if ( this.model.get( 'postField' ) === slug ) {
1397
+ option.selected = true;
1398
+ }
1399
+
1400
+ dropdown.appendChild( option );
1401
+
1402
+ }, this );
1403
+ },
1404
+
1405
+ render: function() {
1406
+ var context = {};
1407
+ if ( this.model ) {
1408
+ context.mapping = this.model.toJSON();
1409
+ }
1410
+
1411
+ this.el.innerHTML = this.template( context );
1412
+
1413
+ var fields = this.form.get( 'fields' );
1414
+
1415
+ this.listenTo( fields, 'add', this.updateFormFieldField, this );
1416
+ this.listenTo( fields, 'remove', this.updateFormieldField, this );
1417
+
1418
+ this.updateFormFieldField();
1419
+ this.updatePostFields();
1420
+
1421
+ return this;
1422
+ },
1423
+
1424
+ triggerAdd: function() {
1425
+ this.form.get( 'postFieldMappings' ).add( new wp.ccf.models.PostFieldMapping() );
1426
+ },
1427
+
1428
+ triggerDelete: function() {
1429
+ var mappings = this.form.get( 'postFieldMappings' );
1430
+
1431
+ if ( mappings.length > 1 ) {
1432
+ this.parent.deletePostFieldMapping( this );
1433
+ } else {
1434
+ this.model.clear().set( wp.ccf.models.PostFieldMapping.prototype.defaults );
1435
+ this.destroy();
1436
+ this.render();
1437
+ }
1438
+ }
1439
+ }
1440
+ );
1441
+
1442
  wp.ccf.views.FormSettings = wp.ccf.views.FormSettings || Backbone.View.extend(
1443
  {
1444
  template: wp.ccf.utils.template( 'ccf-form-settings-template' ),
1448
  'change select': 'save',
1449
  'change select.form-completion-action-type': 'toggleCompletionFields',
1450
  'change select.form-pause': 'togglePauseFields',
1451
+ 'change select.form-post-creation': 'togglePostCreationFields',
1452
  'click .add-notification': 'triggerAddNotification'
1453
  },
1454
 
1455
  notificationViews: [],
1456
+ mappingViews: [],
1457
 
1458
  initialize: function( options ) {
1459
  this.model = options.form;
1460
  this.notificationViews = [];
1461
+ this.mappingViews = [];
1462
 
1463
  var notifications = this.model.get( 'notifications' );
1464
  this.listenTo( notifications, 'add', this.addNotification );
1465
+
1466
+ var mappings = this.model.get( 'postFieldMappings' );
1467
+ this.listenTo( mappings, 'add', this.addPostFieldMapping );
1468
+ },
1469
+
1470
+ deletePostFieldMapping: function( view ) {
1471
+ _.each( this.mappingViews, function( currentView ) {
1472
+ if ( view.cid === currentView.cid ) {
1473
+ var index = _.indexOf( this.mappingViews, currentView );
1474
+ this.model.get( 'postFieldMappings' ).remove( view.model );
1475
+ this.mappingViews[index].remove();
1476
+ this.mappingViews.splice( index, 1 );
1477
+ }
1478
+ }, this );
1479
+ },
1480
+
1481
+ addPostFieldMapping: function( model ) {
1482
+ var mappingContainer = this.el.querySelectorAll( '.post-creation-mapping' )[0];
1483
+ var view = new wp.ccf.views.PostFieldMapping( { model: model, parent: this, form: this.model } );
1484
+ this.mappingViews.push( view );
1485
+ mappingContainer.appendChild( view.render().el );
1486
  },
1487
 
1488
  triggerAddNotification: function() {
1541
  }
1542
  },
1543
 
1544
+ togglePostCreationFields: function() {
1545
+
1546
+ var postCreation = this.el.querySelectorAll( '.form-post-creation' )[0].value;
1547
+ var $postCreationMappingFields = $( this.el.querySelectorAll( '.post-creation-mapping-field' ) );
1548
+
1549
+ if ( parseInt( postCreation ) ) {
1550
+ $postCreationMappingFields.show();
1551
+ } else {
1552
+ $postCreationMappingFields.hide();
1553
+ }
1554
+ },
1555
+
1556
  save: function() {
1557
  if ( this.el.innerHTML === '' ) {
1558
  // @todo: for some reason this is needed for IE8
1571
  var pause = this.el.querySelectorAll( '.form-pause' )[0].value;
1572
  this.model.set( 'pause', ( parseInt( pause ) ) ? true : false );
1573
 
1574
+ var postCreation = this.el.querySelectorAll( '.form-post-creation' )[0].value;
1575
+ this.model.set( 'postCreation', ( parseInt( postCreation ) ) ? true : false );
1576
+
1577
+ var postCreationType = this.el.querySelectorAll( '.form-post-creation-type' )[0].value;
1578
+ this.model.set( 'postCreationType', postCreationType );
1579
+
1580
+ var postCreationStatus = this.el.querySelectorAll( '.form-post-creation-status' )[0].value;
1581
+ this.model.set( 'postCreationStatus', postCreationStatus );
1582
+
1583
  var pauseMessage = this.el.querySelectorAll( '.form-pause-message' )[0].value;
1584
  this.model.set( 'pauseMessage', pauseMessage );
1585
 
1605
  view.save();
1606
  } );
1607
 
1608
+ _.each( this.mappingViews, function( view ) {
1609
+ view.save();
1610
+ } );
1611
+
1612
  if ( typeof $promise !== 'undefined' && typeof $promise.promise !== 'undefined' ) {
1613
  $promise.resolve();
1614
  }
1646
  this.el.innerHTML = this.template( context );
1647
 
1648
  this.toggleCompletionFields();
1649
+ this.togglePostCreationFields();
1650
  this.togglePauseFields();
1651
 
1652
  var rowContainer = this.el.querySelectorAll( '.ccf-form-notifications .rows' )[0];
1666
 
1667
  rowContainer.parentNode.replaceChild( newRowContainer, rowContainer );
1668
 
1669
+ var mappingsContainer = this.el.querySelectorAll( '.post-creation-mapping' )[0];
1670
+ var mappings = this.model.get( 'postFieldMappings' );
1671
+
1672
+ if ( mappings.length >= 1 ) {
1673
+ mappings.each( function( model ) {
1674
+ var mapping = new wp.ccf.views.PostFieldMapping( { model: model, parent: this, form: this.model } ).render();
1675
+ mappingsContainer.appendChild( mapping.el );
1676
+ this.mappingViews.push( mapping );
1677
+ }, this );
1678
+ } else {
1679
+ var newMapping = new wp.ccf.models.PostFieldMapping();
1680
+ mappings.add( newMapping );
1681
+ }
1682
+
1683
  wp.ccf.dispatcher.on( 'mainViewChange', this.fullSave, this );
1684
  wp.ccf.dispatcher.on( 'saveFormSettings', this.fullSave, this );
1685
 
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-03 19:48-0500\n"
9
- "PO-Revision-Date: 2016-01-03 19:48-0500\n"
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:578
27
  msgid "Form not found"
28
  msgstr ""
29
 
30
- #: ../classes/class-ccf-api-form-controller.php:604
31
  msgid "Could not create form"
32
  msgstr ""
33
 
34
- #: ../classes/class-ccf-api-form-controller.php:634
35
  msgid "Could not update form"
36
  msgstr ""
37
 
38
- #: ../classes/class-ccf-api-form-controller.php:662
39
  msgid "Could not delete form"
40
  msgstr ""
41
 
42
- #: ../classes/class-ccf-api-form-controller.php:691
43
  msgid "Could not delete submission"
44
  msgstr ""
45
 
@@ -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:1323
86
- #: ../classes/class-ccf-form-manager.php:1348
87
  msgid "Street Address"
88
  msgstr ""
89
 
90
  #: ../classes/class-ccf-field-renderer.php:559
91
- #: ../classes/class-ccf-form-manager.php:1327
92
- #: ../classes/class-ccf-form-manager.php:1352
93
  msgid "Address Line 2"
94
  msgstr ""
95
 
96
  #: ../classes/class-ccf-field-renderer.php:566
97
- #: ../classes/class-ccf-form-manager.php:1331
98
- #: ../classes/class-ccf-form-manager.php:1356
99
  msgid "City"
100
  msgstr ""
101
 
102
  #: ../classes/class-ccf-field-renderer.php:579
103
- #: ../classes/class-ccf-form-manager.php:1339
104
  msgid "State"
105
  msgstr ""
106
 
107
  #: ../classes/class-ccf-field-renderer.php:587
108
- #: ../classes/class-ccf-form-manager.php:1343
109
  msgid "ZIP Code"
110
  msgstr ""
111
 
112
  #: ../classes/class-ccf-field-renderer.php:597
113
- #: ../classes/class-ccf-form-manager.php:1360
114
  msgid "State / Region / Province"
115
  msgstr ""
116
 
117
  #: ../classes/class-ccf-field-renderer.php:605
118
- #: ../classes/class-ccf-form-manager.php:1364
119
  msgid "ZIP / Postal Code"
120
  msgstr ""
121
 
122
  #: ../classes/class-ccf-field-renderer.php:617
123
- #: ../classes/class-ccf-form-manager.php:1372
124
  msgid "Country"
125
  msgstr ""
126
 
127
  #: ../classes/class-ccf-field-renderer.php:792
128
- #: ../classes/class-ccf-form-manager.php:1383
129
  msgid "email@example.com"
130
  msgstr ""
131
 
132
  #: ../classes/class-ccf-field-renderer.php:802
133
  #: ../classes/class-ccf-form-manager.php:324
134
- #: ../classes/class-ccf-form-manager.php:1387
135
- #: ../classes/class-ccf-form-manager.php:1687
136
  msgid "Email"
137
  msgstr ""
138
 
139
  #: ../classes/class-ccf-field-renderer.php:809
140
- #: ../classes/class-ccf-form-manager.php:1391
141
  msgid "Confirm Email"
142
  msgstr ""
143
 
144
  #: ../classes/class-ccf-field-renderer.php:875
145
- #: ../classes/class-ccf-form-manager.php:1259
146
  msgid "First"
147
  msgstr ""
148
 
149
  #: ../classes/class-ccf-field-renderer.php:882
150
- #: ../classes/class-ccf-form-manager.php:1263
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:1278
157
- #: ../classes/class-ccf-form-manager.php:1299
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:1282
164
- #: ../classes/class-ccf-form-manager.php:1303
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:1286
171
- #: ../classes/class-ccf-form-manager.php:1307
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:1287
178
- #: ../classes/class-ccf-form-manager.php:1308
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:437
185
- #: ../classes/class-ccf-form-manager.php:450
186
- #: ../classes/class-ccf-form-manager.php:1294
187
- #: ../classes/class-ccf-form-manager.php:1477
188
- #: ../classes/class-ccf-form-manager.php:1491
189
- #: ../classes/class-ccf-form-manager.php:1629
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:440
200
- #: ../classes/class-ccf-form-manager.php:453
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:1419
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:438
255
- #: ../classes/class-ccf-form-manager.php:451
256
  msgid "Author"
257
  msgstr ""
258
 
259
  #: ../classes/class-ccf-form-cpt.php:512
260
- #: ../classes/class-ccf-form-manager.php:439
261
- #: ../classes/class-ccf-form-manager.php:452
262
  msgid "Number of Fields"
263
  msgstr ""
264
 
@@ -435,29 +435,33 @@ msgstr ""
435
  msgid "AM/PM is required."
436
  msgstr ""
437
 
438
- #: ../classes/class-ccf-form-handler.php:715
 
 
 
 
439
  msgid "*Hidden Field*"
440
  msgstr ""
441
 
442
- #: ../classes/class-ccf-form-handler.php:787
443
  msgid "Form submitted from"
444
  msgstr ""
445
 
446
- #: ../classes/class-ccf-form-handler.php:796
447
  msgid "Form submitter IP"
448
  msgstr ""
449
 
450
- #: ../classes/class-ccf-form-handler.php:849
451
  #, php-format
452
  msgid "%s: Form Submission"
453
  msgstr ""
454
 
455
- #: ../classes/class-ccf-form-handler.php:851
456
  #, php-format
457
  msgid " to \"%s\""
458
  msgstr ""
459
 
460
- #: ../classes/class-ccf-form-handler.php:907
461
  #: ../classes/class-ccf-form-renderer.php:188
462
  msgid "Thank you for your submission."
463
  msgstr ""
@@ -524,7 +528,7 @@ msgid "&larr; Drag fields from the left here."
524
  msgstr ""
525
 
526
  #: ../classes/class-ccf-form-manager.php:152
527
- #: ../classes/class-ccf-form-manager.php:1422
528
  msgid "Insert into post"
529
  msgstr ""
530
 
@@ -545,7 +549,7 @@ msgid "(Untitled)"
545
  msgstr ""
546
 
547
  #: ../classes/class-ccf-form-manager.php:172
548
- #: ../classes/class-ccf-form-manager.php:1421
549
  msgid "Edit"
550
  msgstr ""
551
 
@@ -554,7 +558,7 @@ msgid "Delete"
554
  msgstr ""
555
 
556
  #: ../classes/class-ccf-form-manager.php:179
557
- #: ../classes/class-ccf-form-manager.php:1732
558
  msgid "Form Submission"
559
  msgstr ""
560
 
@@ -603,38 +607,40 @@ msgstr ""
603
 
604
  #: ../classes/class-ccf-form-manager.php:241
605
  #: ../classes/class-ccf-form-manager.php:371
606
- #: ../classes/class-ccf-form-manager.php:491
607
- #: ../classes/class-ccf-form-manager.php:541
608
- #: ../classes/class-ccf-form-manager.php:617
609
- #: ../classes/class-ccf-form-manager.php:707
610
- #: ../classes/class-ccf-form-manager.php:772
611
- #: ../classes/class-ccf-form-manager.php:814
612
- #: ../classes/class-ccf-form-manager.php:884
613
- #: ../classes/class-ccf-form-manager.php:931
614
- #: ../classes/class-ccf-form-manager.php:973
615
- #: ../classes/class-ccf-form-manager.php:980
616
- #: ../classes/class-ccf-form-manager.php:1031
617
- #: ../classes/class-ccf-form-manager.php:1074
618
- #: ../classes/class-ccf-form-manager.php:1117
 
619
  #: ../classes/class-ccf-settings.php:104
620
  msgid "No"
621
  msgstr ""
622
 
623
  #: ../classes/class-ccf-form-manager.php:242
624
  #: ../classes/class-ccf-form-manager.php:372
625
- #: ../classes/class-ccf-form-manager.php:490
626
- #: ../classes/class-ccf-form-manager.php:540
627
- #: ../classes/class-ccf-form-manager.php:616
628
- #: ../classes/class-ccf-form-manager.php:706
629
- #: ../classes/class-ccf-form-manager.php:771
630
- #: ../classes/class-ccf-form-manager.php:813
631
- #: ../classes/class-ccf-form-manager.php:883
632
- #: ../classes/class-ccf-form-manager.php:930
633
- #: ../classes/class-ccf-form-manager.php:972
634
- #: ../classes/class-ccf-form-manager.php:979
635
- #: ../classes/class-ccf-form-manager.php:1030
636
- #: ../classes/class-ccf-form-manager.php:1073
637
- #: ../classes/class-ccf-form-manager.php:1116
 
638
  #: ../classes/class-ccf-settings.php:105
639
  msgid "Yes"
640
  msgstr ""
@@ -725,6 +731,10 @@ msgstr ""
725
  msgid "Pull Email Subject Dynamically from Field:"
726
  msgstr ""
727
 
 
 
 
 
728
  #: ../classes/class-ccf-form-manager.php:337
729
  msgid "Form Title:"
730
  msgstr ""
@@ -771,8 +781,8 @@ msgstr ""
771
 
772
  #: ../classes/class-ccf-form-manager.php:386
773
  #: ../classes/class-ccf-form-manager.php:397
774
- #: ../classes/class-ccf-form-manager.php:436
775
- #: ../classes/class-ccf-form-manager.php:449
776
  msgid "Title"
777
  msgstr ""
778
 
@@ -801,135 +811,172 @@ msgid ""
801
  "you will need to save the form."
802
  msgstr ""
803
 
804
- #: ../classes/class-ccf-form-manager.php:420
805
- msgid "items"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
806
  msgstr ""
807
 
808
  #: ../classes/class-ccf-form-manager.php:435
809
- #: ../classes/class-ccf-form-manager.php:448
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
810
  msgid "ID"
811
  msgstr ""
812
 
813
- #: ../classes/class-ccf-form-manager.php:463
814
  msgid "<span>&larr;</span> Click on a field to edit it."
815
  msgstr ""
816
 
817
- #: ../classes/class-ccf-form-manager.php:472
818
- #: ../classes/class-ccf-form-manager.php:516
819
- #: ../classes/class-ccf-form-manager.php:598
820
- #: ../classes/class-ccf-form-manager.php:688
821
  msgid "Internal Unique Slug"
822
  msgstr ""
823
 
824
- #: ../classes/class-ccf-form-manager.php:476
825
- #: ../classes/class-ccf-form-manager.php:520
826
- #: ../classes/class-ccf-form-manager.php:563
827
- #: ../classes/class-ccf-form-manager.php:602
828
- #: ../classes/class-ccf-form-manager.php:692
829
- #: ../classes/class-ccf-form-manager.php:761
830
- #: ../classes/class-ccf-form-manager.php:797
831
- #: ../classes/class-ccf-form-manager.php:862
832
- #: ../classes/class-ccf-form-manager.php:913
833
- #: ../classes/class-ccf-form-manager.php:956
834
- #: ../classes/class-ccf-form-manager.php:1020
835
- #: ../classes/class-ccf-form-manager.php:1063
836
- #: ../classes/class-ccf-form-manager.php:1106
837
  msgid "Label:"
838
  msgstr ""
839
 
840
- #: ../classes/class-ccf-form-manager.php:480
841
- #: ../classes/class-ccf-form-manager.php:524
842
- #: ../classes/class-ccf-form-manager.php:567
843
- #: ../classes/class-ccf-form-manager.php:606
844
- #: ../classes/class-ccf-form-manager.php:696
845
- #: ../classes/class-ccf-form-manager.php:765
846
- #: ../classes/class-ccf-form-manager.php:801
847
- #: ../classes/class-ccf-form-manager.php:866
848
- #: ../classes/class-ccf-form-manager.php:917
849
- #: ../classes/class-ccf-form-manager.php:960
850
- #: ../classes/class-ccf-form-manager.php:1024
851
- #: ../classes/class-ccf-form-manager.php:1067
852
- #: ../classes/class-ccf-form-manager.php:1110
853
  msgid "Description:"
854
  msgstr ""
855
 
856
- #: ../classes/class-ccf-form-manager.php:484
857
- #: ../classes/class-ccf-form-manager.php:610
858
- #: ../classes/class-ccf-form-manager.php:700
859
- #: ../classes/class-ccf-form-manager.php:736
860
- #: ../classes/class-ccf-form-manager.php:806
861
- #: ../classes/class-ccf-form-manager.php:870
862
- #: ../classes/class-ccf-form-manager.php:965
863
  msgid "Initial Value:"
864
  msgstr ""
865
 
866
- #: ../classes/class-ccf-form-manager.php:488
867
- #: ../classes/class-ccf-form-manager.php:538
868
- #: ../classes/class-ccf-form-manager.php:614
869
- #: ../classes/class-ccf-form-manager.php:704
870
- #: ../classes/class-ccf-form-manager.php:769
871
- #: ../classes/class-ccf-form-manager.php:811
872
- #: ../classes/class-ccf-form-manager.php:881
873
- #: ../classes/class-ccf-form-manager.php:928
874
- #: ../classes/class-ccf-form-manager.php:970
875
- #: ../classes/class-ccf-form-manager.php:1028
876
- #: ../classes/class-ccf-form-manager.php:1071
877
- #: ../classes/class-ccf-form-manager.php:1114
878
  msgid "Required:"
879
  msgstr ""
880
 
881
- #: ../classes/class-ccf-form-manager.php:497
882
- #: ../classes/class-ccf-form-manager.php:547
883
- #: ../classes/class-ccf-form-manager.php:583
884
- #: ../classes/class-ccf-form-manager.php:623
885
- #: ../classes/class-ccf-form-manager.php:648
886
- #: ../classes/class-ccf-form-manager.php:673
887
- #: ../classes/class-ccf-form-manager.php:713
888
- #: ../classes/class-ccf-form-manager.php:742
889
- #: ../classes/class-ccf-form-manager.php:778
890
- #: ../classes/class-ccf-form-manager.php:837
891
- #: ../classes/class-ccf-form-manager.php:890
892
- #: ../classes/class-ccf-form-manager.php:937
893
- #: ../classes/class-ccf-form-manager.php:986
894
- #: ../classes/class-ccf-form-manager.php:1044
895
- #: ../classes/class-ccf-form-manager.php:1087
896
- #: ../classes/class-ccf-form-manager.php:1130
897
  msgid "Advanced"
898
  msgstr ""
899
 
900
- #: ../classes/class-ccf-form-manager.php:500
901
- #: ../classes/class-ccf-form-manager.php:550
902
- #: ../classes/class-ccf-form-manager.php:586
903
- #: ../classes/class-ccf-form-manager.php:626
904
- #: ../classes/class-ccf-form-manager.php:651
905
- #: ../classes/class-ccf-form-manager.php:676
906
- #: ../classes/class-ccf-form-manager.php:716
907
- #: ../classes/class-ccf-form-manager.php:745
908
- #: ../classes/class-ccf-form-manager.php:781
909
- #: ../classes/class-ccf-form-manager.php:840
910
- #: ../classes/class-ccf-form-manager.php:893
911
- #: ../classes/class-ccf-form-manager.php:940
912
- #: ../classes/class-ccf-form-manager.php:989
913
- #: ../classes/class-ccf-form-manager.php:1047
914
- #: ../classes/class-ccf-form-manager.php:1090
915
- #: ../classes/class-ccf-form-manager.php:1133
916
  msgid "Class Name:"
917
  msgstr ""
918
 
919
- #: ../classes/class-ccf-form-manager.php:504
920
- #: ../classes/class-ccf-form-manager.php:630
921
- #: ../classes/class-ccf-form-manager.php:720
922
- #: ../classes/class-ccf-form-manager.php:845
923
- #: ../classes/class-ccf-form-manager.php:897
924
- #: ../classes/class-ccf-form-manager.php:994
925
  msgid "Placeholder Text:"
926
  msgstr ""
927
 
928
- #: ../classes/class-ccf-form-manager.php:528
929
  msgid "Allowed File Extensions (comma separate):"
930
  msgstr ""
931
 
932
- #: ../classes/class-ccf-form-manager.php:530
933
  msgid ""
934
  "If left blank, will default to all extensions registered by WordPress. If "
935
  "you use a file extension or mime type not <a href=\"http://codex.wordpress."
@@ -937,265 +984,301 @@ msgid ""
937
  "a>, you will need to filter and manually whitelist the new extension."
938
  msgstr ""
939
 
940
- #: ../classes/class-ccf-form-manager.php:533
941
  msgid "Max File Size (in MB):"
942
  msgstr ""
943
 
944
- #: ../classes/class-ccf-form-manager.php:535
945
  #, php-format
946
  msgid ""
947
  "If left blank, will default to %d MB. Maximum allowed by server is %d MB."
948
  msgstr ""
949
 
950
- #: ../classes/class-ccf-form-manager.php:561
951
  msgid ""
952
  "reCAPTCHA is a simple captcha service provided by Google. <a target=\"_blank"
953
  "\" href=\"https://www.google.com/recaptcha/intro/index.html\">Learn more</a>"
954
  msgstr ""
955
 
956
- #: ../classes/class-ccf-form-manager.php:571
957
  msgid "Site Key:"
958
  msgstr ""
959
 
960
- #: ../classes/class-ccf-form-manager.php:573
961
- #: ../classes/class-ccf-form-manager.php:578
962
  msgid "Don't have one?"
963
  msgstr ""
964
 
965
- #: ../classes/class-ccf-form-manager.php:576
966
  msgid "Secret Key:"
967
  msgstr ""
968
 
969
- #: ../classes/class-ccf-form-manager.php:639
970
- #: ../classes/class-ccf-form-manager.php:660
971
- #: ../classes/class-ccf-form-manager.php:685
972
- #: ../classes/class-ccf-form-manager.php:729
973
- #: ../classes/class-ccf-form-manager.php:754
974
- #: ../classes/class-ccf-form-manager.php:790
975
- #: ../classes/class-ccf-form-manager.php:855
976
- #: ../classes/class-ccf-form-manager.php:906
977
- #: ../classes/class-ccf-form-manager.php:949
978
- #: ../classes/class-ccf-form-manager.php:1013
979
- #: ../classes/class-ccf-form-manager.php:1056
980
- #: ../classes/class-ccf-form-manager.php:1099
981
  msgid "Basic"
982
  msgstr ""
983
 
984
- #: ../classes/class-ccf-form-manager.php:642
985
  msgid "HTML Content:"
986
  msgstr ""
987
 
988
- #: ../classes/class-ccf-form-manager.php:663
989
  msgid "Heading:"
990
  msgstr ""
991
 
992
- #: ../classes/class-ccf-form-manager.php:667
993
  msgid "Sub Heading:"
994
  msgstr ""
995
 
996
- #: ../classes/class-ccf-form-manager.php:732
997
- #: ../classes/class-ccf-form-manager.php:757
998
- #: ../classes/class-ccf-form-manager.php:793
999
- #: ../classes/class-ccf-form-manager.php:858
1000
- #: ../classes/class-ccf-form-manager.php:909
1001
- #: ../classes/class-ccf-form-manager.php:952
1002
- #: ../classes/class-ccf-form-manager.php:1016
1003
- #: ../classes/class-ccf-form-manager.php:1059
1004
- #: ../classes/class-ccf-form-manager.php:1102
1005
  msgid "Internal Unique Slug (a-z, 0-9, -, _):"
1006
  msgstr ""
1007
 
1008
- #: ../classes/class-ccf-form-manager.php:819
1009
  msgid "Enable Date Select"
1010
  msgstr ""
1011
 
1012
- #: ../classes/class-ccf-form-manager.php:823
1013
  msgid "Enable Time Select"
1014
  msgstr ""
1015
 
1016
- #: ../classes/class-ccf-form-manager.php:827
1017
  msgid "Date Format:"
1018
  msgstr ""
1019
 
1020
- #: ../classes/class-ccf-form-manager.php:874
1021
  msgid "Format:"
1022
  msgstr ""
1023
 
1024
- #: ../classes/class-ccf-form-manager.php:877
1025
- #: ../classes/class-ccf-form-manager.php:924
1026
  msgid "International"
1027
  msgstr ""
1028
 
1029
- #: ../classes/class-ccf-form-manager.php:921
1030
  msgid "Type:"
1031
  msgstr ""
1032
 
1033
- #: ../classes/class-ccf-form-manager.php:923
1034
  msgid "United States"
1035
  msgstr ""
1036
 
1037
- #: ../classes/class-ccf-form-manager.php:977
1038
  msgid "Require Confirmation:"
1039
  msgstr ""
1040
 
1041
- #: ../classes/class-ccf-form-manager.php:1005
1042
  msgid "Label"
1043
  msgstr ""
1044
 
1045
- #: ../classes/class-ccf-form-manager.php:1006
1046
  msgid "Value"
1047
  msgstr ""
1048
 
1049
- #: ../classes/class-ccf-form-manager.php:1035
1050
- #: ../classes/class-ccf-form-manager.php:1078
1051
- #: ../classes/class-ccf-form-manager.php:1121
1052
  msgid "Manage field choices:"
1053
  msgstr ""
1054
 
1055
- #: ../classes/class-ccf-form-manager.php:1039
1056
- #: ../classes/class-ccf-form-manager.php:1082
1057
- #: ../classes/class-ccf-form-manager.php:1125
1058
  msgid ""
1059
  "Note: If an option does not have a \"value\", it will not be considered a "
1060
  "valid selection if the field is required. The \"value\" is what's read, "
1061
  "stored, and displayed in the submission."
1062
  msgstr ""
1063
 
1064
- #: ../classes/class-ccf-form-manager.php:1142
1065
  msgid "You currently have no forms. Add some!"
1066
  msgstr ""
1067
 
1068
- #: ../classes/class-ccf-form-manager.php:1165
1069
  msgid "Allowed file extensions are {{ extensions }}. "
1070
  msgstr ""
1071
 
1072
- #: ../classes/class-ccf-form-manager.php:1167
1073
  msgid "Max file size is {{ file_size }} MB. "
1074
  msgstr ""
1075
 
1076
- #: ../classes/class-ccf-form-manager.php:1192
1077
- #: ../classes/class-ccf-form-manager.php:1208
1078
- #: ../classes/class-ccf-form-manager.php:1226
1079
  msgid "An example choice"
1080
  msgstr ""
1081
 
1082
- #: ../classes/class-ccf-form-manager.php:1244
1083
  msgid "Arbitrary block of HTML."
1084
  msgstr ""
1085
 
1086
- #: ../classes/class-ccf-form-manager.php:1250
1087
  msgid "Section Heading"
1088
  msgstr ""
1089
 
1090
- #: ../classes/class-ccf-form-manager.php:1252
1091
  msgid "This is the sub-heading text."
1092
  msgstr ""
1093
 
1094
- #: ../classes/class-ccf-form-manager.php:1423
1095
  msgid "Trash"
1096
  msgstr ""
1097
 
1098
- #: ../classes/class-ccf-form-manager.php:1466
1099
  msgid "There is a problem with this form. Is it trashed or deleted?"
1100
  msgstr ""
1101
 
1102
- #: ../classes/class-ccf-form-manager.php:1608
1103
  msgid "IP Address"
1104
  msgstr ""
1105
 
1106
- #: ../classes/class-ccf-form-manager.php:1620
1107
  msgid "There are no submissions."
1108
  msgstr ""
1109
 
1110
- #: ../classes/class-ccf-form-manager.php:1649
1111
  msgid "Add Form"
1112
  msgstr ""
1113
 
1114
- #: ../classes/class-ccf-form-manager.php:1672
1115
  msgid "Single Line Text"
1116
  msgstr ""
1117
 
1118
- #: ../classes/class-ccf-form-manager.php:1673
1119
  msgid "Dropdown"
1120
  msgstr ""
1121
 
1122
- #: ../classes/class-ccf-form-manager.php:1674
1123
  msgid "Checkboxes"
1124
  msgstr ""
1125
 
1126
- #: ../classes/class-ccf-form-manager.php:1675
1127
  msgid "Radio Buttons"
1128
  msgstr ""
1129
 
1130
- #: ../classes/class-ccf-form-manager.php:1676
1131
  msgid "Paragraph Text"
1132
  msgstr ""
1133
 
1134
- #: ../classes/class-ccf-form-manager.php:1677
1135
  msgid "Hidden"
1136
  msgstr ""
1137
 
1138
- #: ../classes/class-ccf-form-manager.php:1678
1139
  msgid "File Upload"
1140
  msgstr ""
1141
 
1142
- #: ../classes/class-ccf-form-manager.php:1682
1143
  msgid "HTML"
1144
  msgstr ""
1145
 
1146
- #: ../classes/class-ccf-form-manager.php:1683
1147
  msgid "Section Header"
1148
  msgstr ""
1149
 
1150
- #: ../classes/class-ccf-form-manager.php:1688
1151
  msgid "Name"
1152
  msgstr ""
1153
 
1154
- #: ../classes/class-ccf-form-manager.php:1689
1155
  msgid "Date/Time"
1156
  msgstr ""
1157
 
1158
- #: ../classes/class-ccf-form-manager.php:1690
1159
  msgid "Website"
1160
  msgstr ""
1161
 
1162
- #: ../classes/class-ccf-form-manager.php:1691
1163
  msgid "Address"
1164
  msgstr ""
1165
 
1166
- #: ../classes/class-ccf-form-manager.php:1692
1167
  msgid "Phone"
1168
  msgstr ""
1169
 
1170
- #: ../classes/class-ccf-form-manager.php:1693
1171
  msgid "reCAPTCHA"
1172
  msgstr ""
1173
 
1174
- #: ../classes/class-ccf-form-manager.php:1726
1175
  msgid "You have no email fields"
1176
  msgstr ""
1177
 
1178
- #: ../classes/class-ccf-form-manager.php:1727
 
 
 
 
1179
  msgid "You have no name fields"
1180
  msgstr ""
1181
 
1182
- #: ../classes/class-ccf-form-manager.php:1728
1183
  msgid "You have no applicable fields"
1184
  msgstr ""
1185
 
1186
- #: ../classes/class-ccf-form-manager.php:1729
 
 
 
 
1187
  msgid "Invalid date"
1188
  msgstr ""
1189
 
1190
- #: ../classes/class-ccf-form-manager.php:1731
1191
  msgid "Field Label"
1192
  msgstr ""
1193
 
1194
- #: ../classes/class-ccf-form-manager.php:1733
1195
  #: ../classes/class-ccf-form-renderer.php:174
1196
  msgid "This form is paused right now. Check back later!"
1197
  msgstr ""
1198
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1199
  #: ../classes/class-ccf-form-renderer.php:105
1200
  msgid "This is not a valid email address."
1201
  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-07 16:31-0500\n"
9
+ "PO-Revision-Date: 2016-01-07 16:31-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:611
27
  msgid "Form not found"
28
  msgstr ""
29
 
30
+ #: ../classes/class-ccf-api-form-controller.php:637
31
  msgid "Could not create form"
32
  msgstr ""
33
 
34
+ #: ../classes/class-ccf-api-form-controller.php:667
35
  msgid "Could not update form"
36
  msgstr ""
37
 
38
+ #: ../classes/class-ccf-api-form-controller.php:695
39
  msgid "Could not delete form"
40
  msgstr ""
41
 
42
+ #: ../classes/class-ccf-api-form-controller.php:724
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:1379
86
+ #: ../classes/class-ccf-form-manager.php:1404
87
  msgid "Street Address"
88
  msgstr ""
89
 
90
  #: ../classes/class-ccf-field-renderer.php:559
91
+ #: ../classes/class-ccf-form-manager.php:1383
92
+ #: ../classes/class-ccf-form-manager.php:1408
93
  msgid "Address Line 2"
94
  msgstr ""
95
 
96
  #: ../classes/class-ccf-field-renderer.php:566
97
+ #: ../classes/class-ccf-form-manager.php:1387
98
+ #: ../classes/class-ccf-form-manager.php:1412
99
  msgid "City"
100
  msgstr ""
101
 
102
  #: ../classes/class-ccf-field-renderer.php:579
103
+ #: ../classes/class-ccf-form-manager.php:1395
104
  msgid "State"
105
  msgstr ""
106
 
107
  #: ../classes/class-ccf-field-renderer.php:587
108
+ #: ../classes/class-ccf-form-manager.php:1399
109
  msgid "ZIP Code"
110
  msgstr ""
111
 
112
  #: ../classes/class-ccf-field-renderer.php:597
113
+ #: ../classes/class-ccf-form-manager.php:1416
114
  msgid "State / Region / Province"
115
  msgstr ""
116
 
117
  #: ../classes/class-ccf-field-renderer.php:605
118
+ #: ../classes/class-ccf-form-manager.php:1420
119
  msgid "ZIP / Postal Code"
120
  msgstr ""
121
 
122
  #: ../classes/class-ccf-field-renderer.php:617
123
+ #: ../classes/class-ccf-form-manager.php:1428
124
  msgid "Country"
125
  msgstr ""
126
 
127
  #: ../classes/class-ccf-field-renderer.php:792
128
+ #: ../classes/class-ccf-form-manager.php:1439
129
  msgid "email@example.com"
130
  msgstr ""
131
 
132
  #: ../classes/class-ccf-field-renderer.php:802
133
  #: ../classes/class-ccf-form-manager.php:324
134
+ #: ../classes/class-ccf-form-manager.php:1443
135
+ #: ../classes/class-ccf-form-manager.php:1743
136
  msgid "Email"
137
  msgstr ""
138
 
139
  #: ../classes/class-ccf-field-renderer.php:809
140
+ #: ../classes/class-ccf-form-manager.php:1447
141
  msgid "Confirm Email"
142
  msgstr ""
143
 
144
  #: ../classes/class-ccf-field-renderer.php:875
145
+ #: ../classes/class-ccf-form-manager.php:1315
146
  msgid "First"
147
  msgstr ""
148
 
149
  #: ../classes/class-ccf-field-renderer.php:882
150
+ #: ../classes/class-ccf-form-manager.php:1319
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:1334
157
+ #: ../classes/class-ccf-form-manager.php:1355
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:1338
164
+ #: ../classes/class-ccf-form-manager.php:1359
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:1342
171
+ #: ../classes/class-ccf-form-manager.php:1363
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:1343
178
+ #: ../classes/class-ccf-form-manager.php:1364
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:493
185
+ #: ../classes/class-ccf-form-manager.php:506
186
+ #: ../classes/class-ccf-form-manager.php:1350
187
+ #: ../classes/class-ccf-form-manager.php:1533
188
+ #: ../classes/class-ccf-form-manager.php:1547
189
+ #: ../classes/class-ccf-form-manager.php:1685
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:496
200
+ #: ../classes/class-ccf-form-manager.php:509
201
  msgid "Submissions"
202
  msgstr ""
203
 
238
  msgstr ""
239
 
240
  #: ../classes/class-ccf-form-cpt.php:449
241
+ #: ../classes/class-ccf-form-manager.php:1475
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:494
255
+ #: ../classes/class-ccf-form-manager.php:507
256
  msgid "Author"
257
  msgstr ""
258
 
259
  #: ../classes/class-ccf-form-cpt.php:512
260
+ #: ../classes/class-ccf-form-manager.php:495
261
+ #: ../classes/class-ccf-form-manager.php:508
262
  msgid "Number of Fields"
263
  msgstr ""
264
 
435
  msgid "AM/PM is required."
436
  msgstr ""
437
 
438
+ #: ../classes/class-ccf-form-handler.php:743
439
+ msgid "Post created by form"
440
+ msgstr ""
441
+
442
+ #: ../classes/class-ccf-form-handler.php:795
443
  msgid "*Hidden Field*"
444
  msgstr ""
445
 
446
+ #: ../classes/class-ccf-form-handler.php:867
447
  msgid "Form submitted from"
448
  msgstr ""
449
 
450
+ #: ../classes/class-ccf-form-handler.php:876
451
  msgid "Form submitter IP"
452
  msgstr ""
453
 
454
+ #: ../classes/class-ccf-form-handler.php:929
455
  #, php-format
456
  msgid "%s: Form Submission"
457
  msgstr ""
458
 
459
+ #: ../classes/class-ccf-form-handler.php:931
460
  #, php-format
461
  msgid " to \"%s\""
462
  msgstr ""
463
 
464
+ #: ../classes/class-ccf-form-handler.php:987
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:1478
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:1477
553
  msgid "Edit"
554
  msgstr ""
555
 
558
  msgstr ""
559
 
560
  #: ../classes/class-ccf-form-manager.php:179
561
+ #: ../classes/class-ccf-form-manager.php:1790
562
  msgid "Form Submission"
563
  msgstr ""
564
 
607
 
608
  #: ../classes/class-ccf-form-manager.php:241
609
  #: ../classes/class-ccf-form-manager.php:371
610
+ #: ../classes/class-ccf-form-manager.php:419
611
+ #: ../classes/class-ccf-form-manager.php:547
612
+ #: ../classes/class-ccf-form-manager.php:597
613
+ #: ../classes/class-ccf-form-manager.php:673
614
+ #: ../classes/class-ccf-form-manager.php:763
615
+ #: ../classes/class-ccf-form-manager.php:828
616
+ #: ../classes/class-ccf-form-manager.php:870
617
+ #: ../classes/class-ccf-form-manager.php:940
618
+ #: ../classes/class-ccf-form-manager.php:987
619
+ #: ../classes/class-ccf-form-manager.php:1029
620
+ #: ../classes/class-ccf-form-manager.php:1036
621
+ #: ../classes/class-ccf-form-manager.php:1087
622
+ #: ../classes/class-ccf-form-manager.php:1130
623
+ #: ../classes/class-ccf-form-manager.php:1173
624
  #: ../classes/class-ccf-settings.php:104
625
  msgid "No"
626
  msgstr ""
627
 
628
  #: ../classes/class-ccf-form-manager.php:242
629
  #: ../classes/class-ccf-form-manager.php:372
630
+ #: ../classes/class-ccf-form-manager.php:420
631
+ #: ../classes/class-ccf-form-manager.php:546
632
+ #: ../classes/class-ccf-form-manager.php:596
633
+ #: ../classes/class-ccf-form-manager.php:672
634
+ #: ../classes/class-ccf-form-manager.php:762
635
+ #: ../classes/class-ccf-form-manager.php:827
636
+ #: ../classes/class-ccf-form-manager.php:869
637
+ #: ../classes/class-ccf-form-manager.php:939
638
+ #: ../classes/class-ccf-form-manager.php:986
639
+ #: ../classes/class-ccf-form-manager.php:1028
640
+ #: ../classes/class-ccf-form-manager.php:1035
641
+ #: ../classes/class-ccf-form-manager.php:1086
642
+ #: ../classes/class-ccf-form-manager.php:1129
643
+ #: ../classes/class-ccf-form-manager.php:1172
644
  #: ../classes/class-ccf-settings.php:105
645
  msgid "Yes"
646
  msgstr ""
731
  msgid "Pull Email Subject Dynamically from Field:"
732
  msgstr ""
733
 
734
+ #: ../classes/class-ccf-form-manager.php:334
735
+ msgid "General"
736
+ msgstr ""
737
+
738
  #: ../classes/class-ccf-form-manager.php:337
739
  msgid "Form Title:"
740
  msgstr ""
781
 
782
  #: ../classes/class-ccf-form-manager.php:386
783
  #: ../classes/class-ccf-form-manager.php:397
784
+ #: ../classes/class-ccf-form-manager.php:492
785
+ #: ../classes/class-ccf-form-manager.php:505
786
  msgid "Title"
787
  msgstr ""
788
 
811
  "you will need to save the form."
812
  msgstr ""
813
 
814
+ #: ../classes/class-ccf-form-manager.php:412
815
+ msgid "Post Creation"
816
+ msgstr ""
817
+
818
+ #: ../classes/class-ccf-form-manager.php:413
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:416
825
+ msgid "Enable Post Creation:"
826
+ msgstr ""
827
+
828
+ #: ../classes/class-ccf-form-manager.php:425
829
+ msgid "Post Type:"
830
  msgstr ""
831
 
832
  #: ../classes/class-ccf-form-manager.php:435
833
+ msgid "Post Status:"
834
+ msgstr ""
835
+
836
+ #: ../classes/class-ccf-form-manager.php:445
837
+ msgid "Field Mappings:"
838
+ msgstr ""
839
+
840
+ #: ../classes/class-ccf-form-manager.php:450
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:462
848
+ msgid "Custom Field Key"
849
+ msgstr ""
850
+
851
+ #: ../classes/class-ccf-form-manager.php:476
852
+ msgid "items"
853
+ msgstr ""
854
+
855
+ #: ../classes/class-ccf-form-manager.php:491
856
+ #: ../classes/class-ccf-form-manager.php:504
857
  msgid "ID"
858
  msgstr ""
859
 
860
+ #: ../classes/class-ccf-form-manager.php:519
861
  msgid "<span>&larr;</span> Click on a field to edit it."
862
  msgstr ""
863
 
864
+ #: ../classes/class-ccf-form-manager.php:528
865
+ #: ../classes/class-ccf-form-manager.php:572
866
+ #: ../classes/class-ccf-form-manager.php:654
867
+ #: ../classes/class-ccf-form-manager.php:744
868
  msgid "Internal Unique Slug"
869
  msgstr ""
870
 
871
+ #: ../classes/class-ccf-form-manager.php:532
872
+ #: ../classes/class-ccf-form-manager.php:576
873
+ #: ../classes/class-ccf-form-manager.php:619
874
+ #: ../classes/class-ccf-form-manager.php:658
875
+ #: ../classes/class-ccf-form-manager.php:748
876
+ #: ../classes/class-ccf-form-manager.php:817
877
+ #: ../classes/class-ccf-form-manager.php:853
878
+ #: ../classes/class-ccf-form-manager.php:918
879
+ #: ../classes/class-ccf-form-manager.php:969
880
+ #: ../classes/class-ccf-form-manager.php:1012
881
+ #: ../classes/class-ccf-form-manager.php:1076
882
+ #: ../classes/class-ccf-form-manager.php:1119
883
+ #: ../classes/class-ccf-form-manager.php:1162
884
  msgid "Label:"
885
  msgstr ""
886
 
887
+ #: ../classes/class-ccf-form-manager.php:536
888
+ #: ../classes/class-ccf-form-manager.php:580
889
+ #: ../classes/class-ccf-form-manager.php:623
890
+ #: ../classes/class-ccf-form-manager.php:662
891
+ #: ../classes/class-ccf-form-manager.php:752
892
+ #: ../classes/class-ccf-form-manager.php:821
893
+ #: ../classes/class-ccf-form-manager.php:857
894
+ #: ../classes/class-ccf-form-manager.php:922
895
+ #: ../classes/class-ccf-form-manager.php:973
896
+ #: ../classes/class-ccf-form-manager.php:1016
897
+ #: ../classes/class-ccf-form-manager.php:1080
898
+ #: ../classes/class-ccf-form-manager.php:1123
899
+ #: ../classes/class-ccf-form-manager.php:1166
900
  msgid "Description:"
901
  msgstr ""
902
 
903
+ #: ../classes/class-ccf-form-manager.php:540
904
+ #: ../classes/class-ccf-form-manager.php:666
905
+ #: ../classes/class-ccf-form-manager.php:756
906
+ #: ../classes/class-ccf-form-manager.php:792
907
+ #: ../classes/class-ccf-form-manager.php:862
908
+ #: ../classes/class-ccf-form-manager.php:926
909
+ #: ../classes/class-ccf-form-manager.php:1021
910
  msgid "Initial Value:"
911
  msgstr ""
912
 
913
+ #: ../classes/class-ccf-form-manager.php:544
914
+ #: ../classes/class-ccf-form-manager.php:594
915
+ #: ../classes/class-ccf-form-manager.php:670
916
+ #: ../classes/class-ccf-form-manager.php:760
917
+ #: ../classes/class-ccf-form-manager.php:825
918
+ #: ../classes/class-ccf-form-manager.php:867
919
+ #: ../classes/class-ccf-form-manager.php:937
920
+ #: ../classes/class-ccf-form-manager.php:984
921
+ #: ../classes/class-ccf-form-manager.php:1026
922
+ #: ../classes/class-ccf-form-manager.php:1084
923
+ #: ../classes/class-ccf-form-manager.php:1127
924
+ #: ../classes/class-ccf-form-manager.php:1170
925
  msgid "Required:"
926
  msgstr ""
927
 
928
+ #: ../classes/class-ccf-form-manager.php:553
929
+ #: ../classes/class-ccf-form-manager.php:603
930
+ #: ../classes/class-ccf-form-manager.php:639
931
+ #: ../classes/class-ccf-form-manager.php:679
932
+ #: ../classes/class-ccf-form-manager.php:704
933
+ #: ../classes/class-ccf-form-manager.php:729
934
+ #: ../classes/class-ccf-form-manager.php:769
935
+ #: ../classes/class-ccf-form-manager.php:798
936
+ #: ../classes/class-ccf-form-manager.php:834
937
+ #: ../classes/class-ccf-form-manager.php:893
938
+ #: ../classes/class-ccf-form-manager.php:946
939
+ #: ../classes/class-ccf-form-manager.php:993
940
+ #: ../classes/class-ccf-form-manager.php:1042
941
+ #: ../classes/class-ccf-form-manager.php:1100
942
+ #: ../classes/class-ccf-form-manager.php:1143
943
+ #: ../classes/class-ccf-form-manager.php:1186
944
  msgid "Advanced"
945
  msgstr ""
946
 
947
+ #: ../classes/class-ccf-form-manager.php:556
948
+ #: ../classes/class-ccf-form-manager.php:606
949
+ #: ../classes/class-ccf-form-manager.php:642
950
+ #: ../classes/class-ccf-form-manager.php:682
951
+ #: ../classes/class-ccf-form-manager.php:707
952
+ #: ../classes/class-ccf-form-manager.php:732
953
+ #: ../classes/class-ccf-form-manager.php:772
954
+ #: ../classes/class-ccf-form-manager.php:801
955
+ #: ../classes/class-ccf-form-manager.php:837
956
+ #: ../classes/class-ccf-form-manager.php:896
957
+ #: ../classes/class-ccf-form-manager.php:949
958
+ #: ../classes/class-ccf-form-manager.php:996
959
+ #: ../classes/class-ccf-form-manager.php:1045
960
+ #: ../classes/class-ccf-form-manager.php:1103
961
+ #: ../classes/class-ccf-form-manager.php:1146
962
+ #: ../classes/class-ccf-form-manager.php:1189
963
  msgid "Class Name:"
964
  msgstr ""
965
 
966
+ #: ../classes/class-ccf-form-manager.php:560
967
+ #: ../classes/class-ccf-form-manager.php:686
968
+ #: ../classes/class-ccf-form-manager.php:776
969
+ #: ../classes/class-ccf-form-manager.php:901
970
+ #: ../classes/class-ccf-form-manager.php:953
971
+ #: ../classes/class-ccf-form-manager.php:1050
972
  msgid "Placeholder Text:"
973
  msgstr ""
974
 
975
+ #: ../classes/class-ccf-form-manager.php:584
976
  msgid "Allowed File Extensions (comma separate):"
977
  msgstr ""
978
 
979
+ #: ../classes/class-ccf-form-manager.php:586
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
  "a>, you will need to filter and manually whitelist the new extension."
985
  msgstr ""
986
 
987
+ #: ../classes/class-ccf-form-manager.php:589
988
  msgid "Max File Size (in MB):"
989
  msgstr ""
990
 
991
+ #: ../classes/class-ccf-form-manager.php:591
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:617
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:627
1004
  msgid "Site Key:"
1005
  msgstr ""
1006
 
1007
+ #: ../classes/class-ccf-form-manager.php:629
1008
+ #: ../classes/class-ccf-form-manager.php:634
1009
  msgid "Don't have one?"
1010
  msgstr ""
1011
 
1012
+ #: ../classes/class-ccf-form-manager.php:632
1013
  msgid "Secret Key:"
1014
  msgstr ""
1015
 
1016
+ #: ../classes/class-ccf-form-manager.php:695
1017
+ #: ../classes/class-ccf-form-manager.php:716
1018
+ #: ../classes/class-ccf-form-manager.php:741
1019
+ #: ../classes/class-ccf-form-manager.php:785
1020
+ #: ../classes/class-ccf-form-manager.php:810
1021
+ #: ../classes/class-ccf-form-manager.php:846
1022
+ #: ../classes/class-ccf-form-manager.php:911
1023
+ #: ../classes/class-ccf-form-manager.php:962
1024
+ #: ../classes/class-ccf-form-manager.php:1005
1025
+ #: ../classes/class-ccf-form-manager.php:1069
1026
+ #: ../classes/class-ccf-form-manager.php:1112
1027
+ #: ../classes/class-ccf-form-manager.php:1155
1028
  msgid "Basic"
1029
  msgstr ""
1030
 
1031
+ #: ../classes/class-ccf-form-manager.php:698
1032
  msgid "HTML Content:"
1033
  msgstr ""
1034
 
1035
+ #: ../classes/class-ccf-form-manager.php:719
1036
  msgid "Heading:"
1037
  msgstr ""
1038
 
1039
+ #: ../classes/class-ccf-form-manager.php:723
1040
  msgid "Sub Heading:"
1041
  msgstr ""
1042
 
1043
+ #: ../classes/class-ccf-form-manager.php:788
1044
+ #: ../classes/class-ccf-form-manager.php:813
1045
+ #: ../classes/class-ccf-form-manager.php:849
1046
+ #: ../classes/class-ccf-form-manager.php:914
1047
+ #: ../classes/class-ccf-form-manager.php:965
1048
+ #: ../classes/class-ccf-form-manager.php:1008
1049
+ #: ../classes/class-ccf-form-manager.php:1072
1050
+ #: ../classes/class-ccf-form-manager.php:1115
1051
+ #: ../classes/class-ccf-form-manager.php:1158
1052
  msgid "Internal Unique Slug (a-z, 0-9, -, _):"
1053
  msgstr ""
1054
 
1055
+ #: ../classes/class-ccf-form-manager.php:875
1056
  msgid "Enable Date Select"
1057
  msgstr ""
1058
 
1059
+ #: ../classes/class-ccf-form-manager.php:879
1060
  msgid "Enable Time Select"
1061
  msgstr ""
1062
 
1063
+ #: ../classes/class-ccf-form-manager.php:883
1064
  msgid "Date Format:"
1065
  msgstr ""
1066
 
1067
+ #: ../classes/class-ccf-form-manager.php:930
1068
  msgid "Format:"
1069
  msgstr ""
1070
 
1071
+ #: ../classes/class-ccf-form-manager.php:933
1072
+ #: ../classes/class-ccf-form-manager.php:980
1073
  msgid "International"
1074
  msgstr ""
1075
 
1076
+ #: ../classes/class-ccf-form-manager.php:977
1077
  msgid "Type:"
1078
  msgstr ""
1079
 
1080
+ #: ../classes/class-ccf-form-manager.php:979
1081
  msgid "United States"
1082
  msgstr ""
1083
 
1084
+ #: ../classes/class-ccf-form-manager.php:1033
1085
  msgid "Require Confirmation:"
1086
  msgstr ""
1087
 
1088
+ #: ../classes/class-ccf-form-manager.php:1061
1089
  msgid "Label"
1090
  msgstr ""
1091
 
1092
+ #: ../classes/class-ccf-form-manager.php:1062
1093
  msgid "Value"
1094
  msgstr ""
1095
 
1096
+ #: ../classes/class-ccf-form-manager.php:1091
1097
+ #: ../classes/class-ccf-form-manager.php:1134
1098
+ #: ../classes/class-ccf-form-manager.php:1177
1099
  msgid "Manage field choices:"
1100
  msgstr ""
1101
 
1102
+ #: ../classes/class-ccf-form-manager.php:1095
1103
+ #: ../classes/class-ccf-form-manager.php:1138
1104
+ #: ../classes/class-ccf-form-manager.php:1181
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:1198
1112
  msgid "You currently have no forms. Add some!"
1113
  msgstr ""
1114
 
1115
+ #: ../classes/class-ccf-form-manager.php:1221
1116
  msgid "Allowed file extensions are {{ extensions }}. "
1117
  msgstr ""
1118
 
1119
+ #: ../classes/class-ccf-form-manager.php:1223
1120
  msgid "Max file size is {{ file_size }} MB. "
1121
  msgstr ""
1122
 
1123
+ #: ../classes/class-ccf-form-manager.php:1248
1124
+ #: ../classes/class-ccf-form-manager.php:1264
1125
+ #: ../classes/class-ccf-form-manager.php:1282
1126
  msgid "An example choice"
1127
  msgstr ""
1128
 
1129
+ #: ../classes/class-ccf-form-manager.php:1300
1130
  msgid "Arbitrary block of HTML."
1131
  msgstr ""
1132
 
1133
+ #: ../classes/class-ccf-form-manager.php:1306
1134
  msgid "Section Heading"
1135
  msgstr ""
1136
 
1137
+ #: ../classes/class-ccf-form-manager.php:1308
1138
  msgid "This is the sub-heading text."
1139
  msgstr ""
1140
 
1141
+ #: ../classes/class-ccf-form-manager.php:1479
1142
  msgid "Trash"
1143
  msgstr ""
1144
 
1145
+ #: ../classes/class-ccf-form-manager.php:1522
1146
  msgid "There is a problem with this form. Is it trashed or deleted?"
1147
  msgstr ""
1148
 
1149
+ #: ../classes/class-ccf-form-manager.php:1664
1150
  msgid "IP Address"
1151
  msgstr ""
1152
 
1153
+ #: ../classes/class-ccf-form-manager.php:1676
1154
  msgid "There are no submissions."
1155
  msgstr ""
1156
 
1157
+ #: ../classes/class-ccf-form-manager.php:1705
1158
  msgid "Add Form"
1159
  msgstr ""
1160
 
1161
+ #: ../classes/class-ccf-form-manager.php:1728
1162
  msgid "Single Line Text"
1163
  msgstr ""
1164
 
1165
+ #: ../classes/class-ccf-form-manager.php:1729
1166
  msgid "Dropdown"
1167
  msgstr ""
1168
 
1169
+ #: ../classes/class-ccf-form-manager.php:1730
1170
  msgid "Checkboxes"
1171
  msgstr ""
1172
 
1173
+ #: ../classes/class-ccf-form-manager.php:1731
1174
  msgid "Radio Buttons"
1175
  msgstr ""
1176
 
1177
+ #: ../classes/class-ccf-form-manager.php:1732
1178
  msgid "Paragraph Text"
1179
  msgstr ""
1180
 
1181
+ #: ../classes/class-ccf-form-manager.php:1733
1182
  msgid "Hidden"
1183
  msgstr ""
1184
 
1185
+ #: ../classes/class-ccf-form-manager.php:1734
1186
  msgid "File Upload"
1187
  msgstr ""
1188
 
1189
+ #: ../classes/class-ccf-form-manager.php:1738
1190
  msgid "HTML"
1191
  msgstr ""
1192
 
1193
+ #: ../classes/class-ccf-form-manager.php:1739
1194
  msgid "Section Header"
1195
  msgstr ""
1196
 
1197
+ #: ../classes/class-ccf-form-manager.php:1744
1198
  msgid "Name"
1199
  msgstr ""
1200
 
1201
+ #: ../classes/class-ccf-form-manager.php:1745
1202
  msgid "Date/Time"
1203
  msgstr ""
1204
 
1205
+ #: ../classes/class-ccf-form-manager.php:1746
1206
  msgid "Website"
1207
  msgstr ""
1208
 
1209
+ #: ../classes/class-ccf-form-manager.php:1747
1210
  msgid "Address"
1211
  msgstr ""
1212
 
1213
+ #: ../classes/class-ccf-form-manager.php:1748
1214
  msgid "Phone"
1215
  msgstr ""
1216
 
1217
+ #: ../classes/class-ccf-form-manager.php:1749
1218
  msgid "reCAPTCHA"
1219
  msgstr ""
1220
 
1221
+ #: ../classes/class-ccf-form-manager.php:1782
1222
  msgid "You have no email fields"
1223
  msgstr ""
1224
 
1225
+ #: ../classes/class-ccf-form-manager.php:1783
1226
+ msgid "You have no available fields"
1227
+ msgstr ""
1228
+
1229
+ #: ../classes/class-ccf-form-manager.php:1784
1230
  msgid "You have no name fields"
1231
  msgstr ""
1232
 
1233
+ #: ../classes/class-ccf-form-manager.php:1785
1234
  msgid "You have no applicable fields"
1235
  msgstr ""
1236
 
1237
+ #: ../classes/class-ccf-form-manager.php:1786
1238
+ msgid "Choose a Form Field"
1239
+ msgstr ""
1240
+
1241
+ #: ../classes/class-ccf-form-manager.php:1787
1242
  msgid "Invalid date"
1243
  msgstr ""
1244
 
1245
+ #: ../classes/class-ccf-form-manager.php:1789
1246
  msgid "Field Label"
1247
  msgstr ""
1248
 
1249
+ #: ../classes/class-ccf-form-manager.php:1791
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:1793
1255
+ msgid "Choose a Post Field"
1256
+ msgstr ""
1257
+
1258
+ #: ../classes/class-ccf-form-manager.php:1796
1259
+ msgid "Post Title"
1260
+ msgstr ""
1261
+
1262
+ #: ../classes/class-ccf-form-manager.php:1797
1263
+ msgid "Post Content"
1264
+ msgstr ""
1265
+
1266
+ #: ../classes/class-ccf-form-manager.php:1798
1267
+ msgid "Post Excerpt"
1268
+ msgstr ""
1269
+
1270
+ #: ../classes/class-ccf-form-manager.php:1799
1271
+ msgid "Post Date"
1272
+ msgstr ""
1273
+
1274
+ #: ../classes/class-ccf-form-manager.php:1802
1275
+ msgid "Post Tags"
1276
+ msgstr ""
1277
+
1278
+ #: ../classes/class-ccf-form-manager.php:1803
1279
+ msgid "Custom Field"
1280
+ msgstr ""
1281
+
1282
  #: ../classes/class-ccf-form-renderer.php:105
1283
  msgid "This is not a valid email address."
1284
  msgstr ""
readme.txt CHANGED
@@ -4,20 +4,38 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
4
  Tags: contact form, web form, custom contact form, custom forms, captcha form, contact fields, form mailers, forms
5
  Requires at least: 3.9
6
  Tested up to: 4.5
7
- Stable tag: 7.2.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
- Build beautiful custom forms the WordPress way. View live previews of your forms while you build them.
12
 
13
  == Description ==
14
 
15
- __Note: Version 6.0 breaks backwards compatibility. You will need to perform a database update after upgrading from anything pre 6.0. You may also need to reconfigure some of your forms.__
16
-
17
- Custom Contact Forms enables you to build forms the WordPress way. User experience is at the top of the list for this plugin.
18
- Build forms in the media manager instead of going to separate areas of your site. Live previews of your forms are generated
19
- on the fly making your life much easier. Custom Contact Forms is a legacy name. The plugin is built for much more than
20
- just contact forms.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
 
22
  For detailed install and usage instructions, please visit [Github](http://github.com/tlovett1/custom-contact-forms).
23
 
@@ -31,9 +49,11 @@ Please refer to [Github](http://github.com/tlovett1/custom-contact-forms) for de
31
 
32
  == Support ==
33
 
34
- For questions, feature requests, and support concerning the Custom Contact Forms plugin, please refer to [Github](http://github.com/tlovett1/custom-contact-forms).
35
 
36
  == Changelog ==
 
 
37
 
38
  = 7.2.3 =
39
  * Fix non-English notification activation
@@ -41,6 +61,9 @@ For questions, feature requests, and support concerning the Custom Contact Forms
41
  = 7.2.2 =
42
  * Fix asset restriciton adding bug in Firefox
43
 
 
 
 
44
  = 7.2.1 =
45
  * Fix API json url bug
46
  * Update notification dialog
4
  Tags: contact form, web form, custom contact form, custom forms, captcha form, contact fields, form mailers, forms
5
  Requires at least: 3.9
6
  Tested up to: 4.5
7
+ Stable tag: 7.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
+ Build beautiful custom forms and manage submissions the WordPress way. Simple contact inquiries, sign ups, subscriptions, events, payments, etc.
12
 
13
  == Description ==
14
 
15
+ Custom Contact Forms enables you to build forms and manage submissions the WordPress way. User experience is at the top of the list for this plugin. Build forms in the media manager instead of going to separate areas of your site. Live previews of your forms are generated on the fly making your life much easier. Custom Contact Forms is a legacy name. The plugin is built for much more than just contact forms. Flexibility and extensible functionality allow you and your team to create forms to power subscriptions, payments, events, and more.
16
+
17
+ **Feature List (not exhaustive):**
18
+
19
+ * Create text fields, paragraph fields, first/last name fields, email fields (with optional confirmation), US address fields, international address fields, date fields (optional international format), time fields, checkbox fields, dropdown (optional multi-select), radio fields, hidden fields, file upload fields, phone fields (optional international number), website fields, and more.
20
+ * Add HTML and sections to your forms.
21
+ * Add help text, modify labels, mark required, add CSS classes, manage options, etc. for each of your form fields.
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.
28
+ * Create posts or custom post types when forms are submitted. For each form, you can configure the post type and status of the created post. You can also map form fields to post fields (as well as meta and taxonomies).
29
+ * View live previews for your forms. Live previews of your forms are shown in the post content. Make edits to forms and form fields without having to refresh the page in the media modal.
30
+ * Insert your forms in posts, custom post types, widgets, and themes.
31
+ * Customize form titles, submit button text, and form descriptions.
32
+ * Optionally only include CCF JavaScript and CSS on URLs that actually include forms improving page load times.
33
+ * Extensible code with many hooks and filters to allow for developer modifications.
34
+ * Translated in French, Chinese, German, and Danish. More translations on the way.
35
+ * Easily prevent spam with honey pots and [reCAPTCHA](https://www.google.com/recaptcha/intro/index.html).
36
+ * Import and export forms and form submissions with ease.
37
+ * Performant and scabable plugin built for enterprise.
38
+ * More!
39
 
40
  For detailed install and usage instructions, please visit [Github](http://github.com/tlovett1/custom-contact-forms).
41
 
49
 
50
  == Support ==
51
 
52
+ For full documentation, questions, feature requests, and support concerning the Custom Contact Forms plugin, please refer to [Github](http://github.com/tlovett1/custom-contact-forms).
53
 
54
  == Changelog ==
55
+ = 7.3 =
56
+ * Add post creation functionality for when forms are submitted
57
 
58
  = 7.2.3 =
59
  * Fix non-English notification activation
61
  = 7.2.2 =
62
  * Fix asset restriciton adding bug in Firefox
63
 
64
+ = 7.2.2 =
65
+ * Fix asset restriciton adding bug in Firefox
66
+
67
  = 7.2.1 =
68
  * Fix API json url bug
69
  * Update notification dialog