Custom Contact Forms - Version 6.4.11

Version Description

  • Fix title special character formatting
Download this release

Release Info

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

Code changes from version 6.4.10 to 6.4.11

build/js/form-manager.js CHANGED
@@ -306,6 +306,7 @@
306
  .replace( /“/g, '”' )
307
  .replace( /”/g, '”' )
308
  .replace( /‘/g, "‘" )
 
309
  .replace( /'/g, "'" );
310
 
311
  this.set( key, value );
306
  .replace( /“/g, '”' )
307
  .replace( /”/g, '”' )
308
  .replace( /‘/g, "‘" )
309
+ .replace( /&/g, "&" )
310
  .replace( /'/g, "'" );
311
 
312
  this.set( key, value );
build/js/form-manager.min.js CHANGED
@@ -1,2 +1,2 @@
1
- (function(e,t,i,l){"use strict";window.wp=window.wp||{},wp.ccf=wp.ccf||{},wp.ccf.utils=wp.ccf.utils||{},wp.ccf.utils.cleanDateFields=function(e){delete e.date,delete e.date_gmt,delete e.modified,delete e.modified_gmt,delete e.date_tz,delete e.modified_tz},wp.ccf.utils.template=i.memoize(function(e){var t={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g};return i.template(document.getElementById(e).innerHTML,null,t)}),wp.ccf.utils.insertFormShortcode=function(e){var t=wp.ccf.forms.findWhere({ID:e.get("ID")});t||wp.ccf.forms.add(e);var i=tinymce.get(wpActiveEditor),l='[ccf_form id="'+e.get("ID")+'"]';i&&!i.isHidden()?tinymce.activeEditor.execCommand("mceInsertContent",!1,l):document.getElementById(wpActiveEditor).value+=l},wp.ccf.utils.getPrettyPostDate=function(e){return e=moment.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,s){"use strict";wp.ccf.models=wp.ccf.models||{},wp.ccf.models.Fields=wp.ccf.models.Fields||{};var c=function(e,i,l){return"object"!=typeof i&&""===i&&(i=""),t.Model.prototype.set.call(this,e,i,l)},r=function(e,t,i){return i=i||{},i.emulateHTTP=!0,this.constructor.__super__.sync.call(this,e,t,i)},n=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(/&#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 n.call(this,[])},set:c}),wp.ccf.models.Form=wp.ccf.models.Form||wp.api.models.Post.extend({urlRoot:s.root+"/ccf/forms",set:c,sync:r,initialize:function(){this.on("sync",this.decode,this)},defaults:function(){var e={fields:new wp.ccf.collections.Fields,type:"ccf_form",status:"publish",description:"",buttonText:"Submit Form",completionActionType:"text",completionRedirectUrl:"",completionMessage:"",sendEmailNotifications:!1,emailNotificationAddresses:l.adminEmail,emailNotificationFromType:"default",emailNotificationFromAddress:"",emailNotificationFromField:""};return e=i.defaults(e,this.constructor.__super__.defaults),wp.ccf.utils.cleanDateFields(e),e},decode:function(){var e=i.keys(wp.api.models.Post.prototype.defaults);return e=i.without(e,"title"),n.call(this,e)},getFieldSlugs:function(e){var t=wp.ccf.currentForm.get("fields"),i=[];return t.each(function(t){e&&t.isImmutable||i.push(t.get("slug"))}),i},parse:function(e){var t=this;if(e.fields){var l=t.get("fields");if(l&&l.length>0){for(var s=0;e.fields.length>s;s++){var c=e.fields[s],r=l.findWhere({slug:c.slug});if(r){if(c.choices!==void 0){var n=t.get("choices");if(n&&n.length>0)for(var o=0;c.choices>o;o++){var a=n.at(o);a.set(c.choices[o]),a.decode()}delete e.fields[s].choices}r.set(c),r.decode()}}delete e.fields}else{var d=[];i.each(e.fields,function(e){var t=new wp.ccf.models.Fields[e.type](e);t.decode(),d.push(t)}),e.fields=new wp.ccf.collections.Fields(d,{formId:e.ID})}}return this.constructor.__super__.parse.call(this,e)},toJSON:function(){var e=this.constructor.__super__.toJSON.call(this);return e.fields&&(e.fields=e.fields.toJSON()),e.author&&(e.author=e.author.toJSON()),e}}),wp.ccf.models.Submission=wp.api.models.Submission||wp.api.models.Post.extend({idAttribute:"ID",defaults:{ID:null,data:{}},sync:r}),wp.ccf.models.Field=wp.api.models.Field||wp.api.models.Post.extend({idAttribute:"ID",defaults:{ID:null},set:c,required:function(){return["slug"]},decode:function(){return n.call(this,i.keys(wp.api.models.Post.prototype.defaults))},hasRequiredAttributes:function(){var e=this,t=!0;return i.each(this.required(),function(i){(e.get(i)===void 0||""===e.get(i))&&(t=!1)}),t},sync:r}),wp.ccf.models.StandardField=wp.ccf.models.StandardField||wp.ccf.models.Field.extend({idAttribute:"ID",defaults:function(){var e={label:"Field Label",value:"",placeholder:"",slug:"",type:"",required:!1,className:"",description:""};return i.defaults(e,this.constructor.__super__.defaults)}}),wp.ccf.models.Fields["single-line-text"]=wp.ccf.models.Fields["single-line-text"]||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"single-line-text"};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.file=wp.ccf.models.Fields.file||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"file",fileExtensions:"",maxFileSize:l.maxFileSize};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields["paragraph-text"]=wp.ccf.models.Fields["paragraph-text"]||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"paragraph-text"};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.hidden=wp.ccf.models.Fields.hidden||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"hidden"};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.email=wp.ccf.models.Fields.email||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"email",emailConfirmation:!1};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.website=wp.ccf.models.Fields.website||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"website",placeholder:"http://"};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.phone=wp.ccf.models.Fields.phone||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"phone",phoneFormat:"us"};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.date=wp.ccf.models.Fields.date||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"date",showDate:!0,showTime:!0};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.name=wp.ccf.models.Fields.name||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"name"};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.recaptcha=wp.ccf.models.Fields.recaptcha||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"recaptcha",siteKey:"",secretKey:""};return i.defaults(e,this.constructor.__super__.defaults())},required:function(){return["siteKey","secretKey"]},isImmutable:!0}),wp.ccf.models.Fields.address=wp.ccf.models.Fields.address||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"address",addressType:"us"};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields["section-header"]=wp.ccf.models.Fields["section-header"]||wp.ccf.models.Field.extend({defaults:function(){var e={type:"section-header",slug:"",heading:"",subheading:"",className:""};return i.defaults(e,this.constructor.__super__.defaults)},required:function(){return[]},isImmutable:!0}),wp.ccf.models.Fields.html=wp.ccf.models.Fields.html||wp.ccf.models.Field.extend({defaults:function(){var e={type:"html",slug:"",html:"",className:""};return i.defaults(e,this.constructor.__super__.defaults)},required:function(){return[]},isImmutable:!0}),wp.ccf.models.ChoiceableField=wp.ccf.models.ChoiceableField||wp.ccf.models.StandardField.extend({defaults:function(){var e={choices:new wp.ccf.collections.FieldChoices};return i.defaults(e,this.constructor.__super__.defaults())},initialize:function(e){if("object"==typeof e&&e.choices){var t=[];i.each(e.choices,function(e){var i=new wp.ccf.models.FieldChoice(e);i.decode(),t.push(i)}),this.set("choices",new wp.ccf.collections.FieldChoices(t))}}}),wp.ccf.models.Fields.radio=wp.ccf.models.Fields.radio||wp.ccf.models.ChoiceableField.extend({defaults:function(){var e={type:"radio"};return i.defaults(e,this.constructor.__super__.defaults())},initialize:function(){return this.constructor.__super__.initialize.apply(this,arguments)}}),wp.ccf.models.Fields.checkboxes=wp.ccf.models.Fields.checkboxes||wp.ccf.models.ChoiceableField.extend({defaults:function(){var e={type:"checkboxes"};return i.defaults(e,this.constructor.__super__.defaults())},initialize:function(){return this.constructor.__super__.initialize.apply(this,arguments)}}),wp.ccf.models.Fields.dropdown=wp.ccf.models.Fields.dropdown||wp.ccf.models.ChoiceableField.extend({defaults:function(){var e={type:"dropdown"};return i.defaults(e,this.constructor.__super__.defaults())},initialize:function(){return this.constructor.__super__.initialize.apply(this,arguments)}})}(jQuery,Backbone,_,ccfSettings,WP_API_Settings),function(e,t,i){"use strict";var l=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:WP_API_Settings.root+"/ccf/forms",formsFetching:{},initialize:function(){this.constructor.__super__.initialize(),this.formsFetching={}},sync:l,remove:function(e,t){t=t||{};var l=this.constructor.__super__.remove.call(this,e,t);return t.destroy&&(e instanceof Array?i.each(e,function(e){e.destroy()}):e.destroy()),l}}),wp.ccf.collections.Fields=wp.ccf.collections.Fields||wp.api.collections.Posts.extend({model:wp.ccf.models.Field,url:function(){return WP_API_Settings.root+"/ccf/forms/"+this.formId+"/fields"},initialize:function(e,t){t&&t.formId&&(this.formId=t.formId)},sync:l}),wp.ccf.collections.Submissions=wp.ccf.collections.Submissions||wp.api.collections.Posts.extend({model:wp.ccf.models.Submission,url:function(){return WP_API_Settings.root+"/ccf/forms/"+this.formId+"/submissions"},initialize:function(e,t){this.constructor.__super__.initialize.apply(this,arguments),t&&t.formId&&(this.formId=t.formId)},sync:l}),wp.ccf.collections.FieldChoices=wp.ccf.collections.FieldChoices||t.Collection.extend({model:wp.ccf.models.FieldChoice})}(jQuery,Backbone,_,ccfSettings),function(e,t,i,l){"use strict";wp.ccf.views=wp.ccf.views||{},wp.ccf.views.Fields=wp.ccf.views.Fields||{},wp.ccf.views.FieldChoice=t.View.extend({template:wp.ccf.utils.template("ccf-field-choice-template"),className:"choice",events:{"click .add":"triggerAdd","click .delete":"triggerDelete","blur input":"saveChoice",saveChoice:"saveChoice",sorted:"triggerUpdateSort"},initialize:function(e){this.field=e.field},destroy:function(){wp.ccf.dispatcher.off("mainViewChange",this.saveChoice),this.unbind()},triggerUpdateSort:function(e,t){this.field.get("choices").remove(this.model,{silent:!0}),this.field.get("choices").add(this.model,{at:t,silent:!0})},saveChoice:function(){if(""!==this.el.innerHTML){var e=this.el.querySelectorAll(".choice-label")[0].value,t=this.el.querySelectorAll(".choice-value")[0].value;this.model.set("label",e),this.model.set("value",t);var i=this.el.querySelectorAll(".choice-selected")[0],l=i.checked?!0:!1;return this.model.set("selected",l),this}},render:function(){var e={};return this.model&&(e.choice=this.model.toJSON()),this.el.innerHTML=this.template(e),wp.ccf.dispatcher.on("mainViewChange",this.saveChoice,this),this},triggerAdd:function(){this.field.get("choices").add(new wp.ccf.models.FieldChoice)},triggerDelete:function(){var e=this.field.get("choices");if(e.length>1)e.remove(this.model),this.destroy(),this.remove();else{for(var t=this.el.querySelectorAll(".choice-label, .choice-value"),i=this.el.querySelectorAll(".choice-selected"),l=0;t.length>l;l++)t[l].value="";i[0].checked=!1}}}),wp.ccf.views.FieldBase=wp.ccf.views.FieldBase||t.View.extend({events:{"blur input":"saveField","blur input.field-slug":"checkSlug","blur textarea":"saveField","change select":"saveField",'change input[type="checkbox"]':"saveField"},checkSlug:function(){var e=this.el.querySelectorAll(".field-slug");if(e.length>0){var t=e[0],i=!1;t.parentNode.className=t.value&&!t.value.match(/^[a-zA-Z0-9\-_]+$/)?t.parentNode.className.replace(/ field-error/i,"")+" field-error":t.parentNode.className.replace(/ field-error/i,""),this.collection.length>0&&""!==t.value?(this.collection.each(function(e){e!==this.model&&t.value===e.get("slug")&&(i=!0)},this),t.parentNode.className=i?t.parentNode.className.replace(/ field-duplicate-slug/i,"")+" field-duplicate-slug":t.parentNode.className.replace(/ field-duplicate-slug/i,"")):t.parentNode.className=t.parentNode.className.replace(/ field-duplicate-slug/i,"")}},destroy:function(){this.unbind()},render:function(){return this.el.innerHTML=this.template({field:this.model.toJSON()}),this.checkSlug(),this}}),wp.ccf.views.Fields["single-line-text"]=wp.ccf.views.Fields["single-line-text"]||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-single-line-text-template"),initialize:function(){},saveField:function(){return""!==this.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),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("showDate",this.el.querySelectorAll(".field-show-date")[0].checked?!0:!1);var t=this.model.get("showTime"),i=this.el.querySelectorAll(".field-show-time")[0].checked?!0:!1;return this.model.set("showTime",i),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1),i!=t&&this.render(),this}}}),wp.ccf.views.Fields.name=wp.ccf.views.Fields.name||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-name-template"),saveField:function(){return""!==this.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.FormSettings=wp.ccf.views.FormSettings||t.View.extend({template:wp.ccf.utils.template("ccf-form-settings-template"),events:{"blur input":"save","change select":"save","change select.form-completion-action-type":"toggleCompletionFields","change select.form-send-email-notifications":"toggleNotificationFields"},initialize:function(e){this.model=e.form},destroy:function(){wp.ccf.dispatcher.off("saveFormSettings",this.save),wp.ccf.dispatcher.off("mainViewChange",this.save)},toggleCompletionFields:function(){var e=this.el.querySelectorAll(".form-completion-action-type")[0].value,t=this.el.querySelectorAll(".completion-message")[0],i=this.el.querySelectorAll(".completion-redirect-url")[0];"text"===e?(t.style.display="block",i.style.display="none"):(t.style.display="none",i.style.display="block")},save:function(e){if(""!==this.el.innerHTML){var t=this.el.querySelectorAll(".form-title")[0].value;this.model.set("title",t);var i=this.el.querySelectorAll(".form-description")[0].value;this.model.set("description",i);var l=this.el.querySelectorAll(".form-button-text")[0].value;this.model.set("buttonText",l);var s=this.el.querySelectorAll(".form-completion-message")[0].value;this.model.set("completionMessage",s);var c=this.el.querySelectorAll(".form-completion-redirect-url")[0].value;this.model.set("completionRedirectUrl",c);var r=this.el.querySelectorAll(".form-completion-action-type")[0].value;this.model.set("completionActionType",r),e!==void 0&&e.promise!==void 0&&e.resolve()}},render:function(){var e={form:this.model.toJSON()};return this.el.innerHTML=this.template(e),this.toggleCompletionFields(),wp.ccf.dispatcher.on("saveFormSettings",this.save,this),wp.ccf.dispatcher.on("mainViewChange",this.save,this),this}}),wp.ccf.views.FormNotifications=wp.ccf.views.FormNotifications||t.View.extend({template:wp.ccf.utils.template("ccf-form-notifications-template"),events:{"blur input":"save","change select":"save","change select.form-send-email-notifications":"toggleNotificationFields","change select.form-email-notification-from-type":"toggleNotificationFields"},initialize:function(e){this.model=e.form
2
  },destroy:function(){wp.ccf.dispatcher.off("saveFormNotifications",this.save),wp.ccf.dispatcher.off("mainViewChange",this.save),this.undelegateEvents(),this.unbind()},updateFromAddressFieldField:function(){var e=this.el.querySelectorAll(".form-email-notification-from-field")[0];e.innerHTML="",e.disabled=!1;var t=this.model.get("fields"),i=0,s=this.model.get("emailNotificationFromField");if(t.length>=1&&t.each(function(t){if("email"===t.get("type")){var l=document.createElement("option");l.innerHTML=t.get("slug"),l.value=t.get("slug"),t.get("slug")===s&&(l.selected=!0),e.appendChild(l),i++}}),0===i){var c=document.createElement("option");c.innerHTML=l.noEmailFields,e.appendChild(c),e.disabled=!0}},toggleNotificationFields:function(){var e,t=this.el.querySelectorAll(".form-send-email-notifications")[0].value,i=this.el.querySelectorAll(".email-notification-setting"),l=this.el.querySelectorAll(".email-notification-from-address")[0],s=this.el.querySelectorAll(".email-notification-from-field")[0],c=this.el.querySelectorAll(".form-email-notification-from-type")[0];if(parseInt(t)){for(e=0;i.length>e;e++)i[e].style.display="block";l.style.display="none",s.style.display="none","custom"===c.value?l.style.display="block":"field"===c.value&&(s.style.display="block")}else{for(e=0;i.length>e;e++)i[e].style.display="none";l.style.display="none",s.style.display="none"}},save:function(e){if(""!==this.el.innerHTML){var t=this.el.querySelectorAll(".form-send-email-notifications")[0].value;this.model.set("sendEmailNotifications",parseInt(t)?!0:!1);var i=this.el.querySelectorAll(".form-email-notification-addresses")[0].value;this.model.set("emailNotificationAddresses",i);var l=this.el.querySelectorAll(".form-email-notification-from-type")[0].value;this.model.set("emailNotificationFromType",l);var s=this.el.querySelectorAll(".form-email-notification-from-address")[0].value;this.model.set("emailNotificationFromAddress",s);var c=this.el.querySelectorAll(".form-email-notification-from-field")[0].value;this.model.set("emailNotificationFromField",c),e!==void 0&&e.promise!==void 0&&e.resolve()}},render:function(){var e={form:this.model.toJSON()},t=this.model.get("fields");return this.el.innerHTML=this.template(e),this.toggleNotificationFields(),this.updateFromAddressFieldField(),wp.ccf.dispatcher.on("saveFormNotifications",this.save,this),wp.ccf.dispatcher.on("mainViewChange",this.save,this),this.listenTo(t,"add",this.updateFromAddressFieldField,this),this.listenTo(t,"remove",this.updateFromAddressFieldField,this),this}}),wp.ccf.views.FormPane=wp.ccf.views.FormPane||t.View.extend(i.defaults({template:wp.ccf.utils.template("ccf-form-pane-template"),subViews:{"field-sidebar":wp.ccf.views.FieldSidebar,"form-settings":wp.ccf.views.FormSettings,"form-notifications":wp.ccf.views.FormNotifications},events:{"click .save-button":"sync","click h2":"accordionClick","click .insert-form-button":"insertForm"},initialize:function(){wp.ccf.dispatcher.on("openEditField",this.openEditField,this)},insertForm:function(){wp.ccf.utils.insertFormShortcode(this.model),wp.ccf.toggle()},accordionClick:function(t){var l=e(t.currentTarget).parents(".accordion-container")[0],s=l.querySelectorAll(".accordion-section");t.currentTarget.parentNode.className.match(/expanded/i)?t.currentTarget.parentNode.className=t.currentTarget.parentNode.className.replace(/expanded/i,""):t.currentTarget.parentNode.className+=" expanded",i.each(s,function(e){e!=t.currentTarget.parentNode&&e.className.match(/expanded/i)&&(e.className=e.className.replace(/expanded/i,""))})},openEditField:function(e){this.renderedSubViews["field-sidebar"].render(e).el.style.display="block"},disable:function(){this.el.querySelectorAll(".save-button")[0].setAttribute("disabled","disabled"),this.el.querySelectorAll(".disabled-overlay")[0].style.display="block"},enable:function(){this.el.querySelectorAll(".save-button")[0].removeAttribute("disabled"),this.el.querySelectorAll(".disabled-overlay")[0].style.display="none"},sync:function(){var t=this,i=e(this.el.querySelectorAll(".spinner")[0]);i.fadeIn(),t.disable();var s=e.Deferred(),c=e.Deferred(),r=e.Deferred();wp.ccf.dispatcher.trigger("saveFormSettings",s),wp.ccf.dispatcher.trigger("saveFormNotifications",r),wp.ccf.dispatcher.trigger("saveField",c),e.when(s,c,r).then(function(){var e=t.model.get("fields"),s=!0,c={};e.each(function(e){var t=e.get("slug");e.hasRequiredAttributes()?t&&!t.match(/^[a-zA-Z0-9\-_]+$/)?(s=!1,e.trigger("requirementsNotMet")):c[e.get("slug")]!==void 0?(s=!1,e.trigger("duplicateSlug"),c[e.get("slug")].trigger("duplicateSlug")):e.trigger("requirementsMet"):(s=!1,e.trigger("requirementsNotMet")),e.get("slug")&&(c[e.get("slug")]=e)}),s?t.model.save({},{context:"edit"}).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);var r=s.el.querySelectorAll(".fields")[0];i.each(l.fieldLabels,function(e,t){r.appendChild(new wp.ccf.views.FieldRowPlaceholder({type:t}).render().el)});var n=s.el.querySelectorAll(".structure-fields")[0];i.each(l.structureFieldLabels,function(e,t){n.appendChild(new wp.ccf.views.FieldRowPlaceholder({type:t}).render().el)});var o=s.el.querySelectorAll(".special-fields")[0];i.each(l.specialFieldLabels,function(e,t){o.appendChild(new wp.ccf.views.FieldRowPlaceholder({type:t}).render().el)}),e(s.el.querySelectorAll(".left-sidebar")[0].querySelectorAll(".field")).draggable({cursor:"move",zIndex:160001,scroll:!1,containment:".ccf-form-pane",appendTo:".ccf-main-modal",snap:!0,connectToSortable:".form-content",helper:function(t){var i=e(t.currentTarget),l=e('<div class="field" data-field-type="'+i.attr("data-field-type")+'"><h4>'+i.find(".label").html()+"</h4></div>");return l.css({width:i.width(),height:i.height()})}});var a=s.model.get("fields"),d=s.el.querySelectorAll(".form-content")[0];return a.length>=1&&(d.innerHTML="",a.each(function(e){var t=new wp.ccf.views.FieldRow({model:e,form:s.model}).render(!0).el;d.appendChild(t)})),e(d).sortable({axis:"y",handle:"h4",stop:function(e,t){if(!t.item.hasClass("instantiated")){var i=t.item.attr("data-field-type"),l={};wp.ccf.models.Fields[i].prototype.defaults().slug!==void 0&&(l.slug=i+"-"+s.getNextFieldOrd());var c=new wp.ccf.models.Fields[i](l),r=s.model.get("fields");r.add(c),new wp.ccf.views.FieldRow({model:c,el:t.item,form:s.model}).render(!0),t.item.attr("style","")}t.item.trigger("sorted",t.item.index())}}),s.initRenderSubViews(!0,!0,{form:s.model}),s.enableDisableInsert(),s}},wp.ccf.mixins.subViewable)),wp.ccf.views.ExistingFormTableRow=wp.ccf.views.ExistingFormTableRow||t.View.extend({tagName:"tr",template:wp.ccf.utils.template("ccf-existing-form-table-row-template"),events:{"click .edit":"triggerMainViewChange","click .delete":"triggerDelete","click .insert-form-button":"insertForm"},initialize:function(e){this.parent=e.parent},insertForm:function(){wp.ccf.utils.insertFormShortcode(this.model),wp.ccf.toggle()},triggerMainViewChange:function(){wp.ccf.switchToForm(this.model)},triggerDelete:function(){var e,t=this,i=t.parent.collection.state.currentPage;t.model.destroy().done(function(){e=i,e===t.parent.collection.state.totalPages&&e-1===(t.parent.collection.state.totalObjects-1)/l.postsPerPage&&e--,t.parent.showPage(e).done(function(){t.parent.renderPagination()})})},render:function(){return this.$el.html(this.template({form:this.model.toJSON(),utils:{getPrettyPostDate:wp.ccf.utils.getPrettyPostDate}})),this}}),wp.ccf.views.EmptyFormTableRow=wp.ccf.views.EmptyFormTableRow||t.View.extend({tagName:"tr",template:wp.ccf.utils.template("ccf-empty-form-table-row-template"),render:function(){return this.$el.html(this.template()),this}}),wp.ccf.views.ExistingFormTable=wp.ccf.views.ExistingFormTable||t.View.extend({template:wp.ccf.utils.template("ccf-existing-form-table-template"),initialize:function(){this.parent=arguments.parent,this.collection=new wp.ccf.collections.Forms,wp.ccf.dispatcher.on("changeFormTablePage",this.showPage,this),wp.ccf.dispatcher.on("saveFormComplete",this.render,this)},showPage:function(e){var t=this,i=this.collection.fetch({data:{page:e}});return i.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 r=!1;if(l.single)if(r=!0,l.postId){var n=parseInt(l.postId);if(s.forms.formsFetching[n]===void 0){var o=new wp.ccf.models.Form({ID:n}),a=o.fetch();s.forms.formsFetching[n]=a,s._currentFormDeferred=a,a.done(function(){delete s.forms.formsFetching[n],s.forms.add(o),s.currentForm=o})}else s._currentFormDeferred=s.forms.formsFetching[n],s._currentFormDeferred.done(function(){s.currentForm=s.forms.findWhere({ID:n})});e.when(s._currentFormDeferred).then(function(){s._setupMainModal(!0),c.style.display="inline-block";var e=document.getElementById("ccf-submissions");if(e){var t=e.querySelectorAll(".inside")[0],i=document.createElement("div");i.className="ccf-submission-settings",i.setAttribute("data-icon","");var l=document.getElementById("show-settings-link");i.onclick=function(){l.click()},e.insertBefore(i,e.firstChild.nextSibling.nextSibling),wp.ccf.createSubmissionsTable(t)}})}else s._setupMainModal(!0),c.style.display="inline-block";else s._setupMainModal();var d=function(e){e=e||window.event;var t=e.currentTarget?e.currentTarget:e.srcElement,i=t.getAttribute("data-form-id");wp.ccf.toggle(i)};c.addEventListener?c.addEventListener("click",d,!1):c.attachEvent("onclick",d)}}),wp.ccf.createManager()}(jQuery,Backbone,_,ccfSettings);
1
+ (function(e,t,i,l){"use strict";window.wp=window.wp||{},wp.ccf=wp.ccf||{},wp.ccf.utils=wp.ccf.utils||{},wp.ccf.utils.cleanDateFields=function(e){delete e.date,delete e.date_gmt,delete e.modified,delete e.modified_gmt,delete e.date_tz,delete e.modified_tz},wp.ccf.utils.template=i.memoize(function(e){var t={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g};return i.template(document.getElementById(e).innerHTML,null,t)}),wp.ccf.utils.insertFormShortcode=function(e){var t=wp.ccf.forms.findWhere({ID:e.get("ID")});t||wp.ccf.forms.add(e);var i=tinymce.get(wpActiveEditor),l='[ccf_form id="'+e.get("ID")+'"]';i&&!i.isHidden()?tinymce.activeEditor.execCommand("mceInsertContent",!1,l):document.getElementById(wpActiveEditor).value+=l},wp.ccf.utils.getPrettyPostDate=function(e){return e=moment.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,s){"use strict";wp.ccf.models=wp.ccf.models||{},wp.ccf.models.Fields=wp.ccf.models.Fields||{};var c=function(e,i,l){return"object"!=typeof i&&""===i&&(i=""),t.Model.prototype.set.call(this,e,i,l)},r=function(e,t,i){return i=i||{},i.emulateHTTP=!0,this.constructor.__super__.sync.call(this,e,t,i)},n=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 n.call(this,[])},set:c}),wp.ccf.models.Form=wp.ccf.models.Form||wp.api.models.Post.extend({urlRoot:s.root+"/ccf/forms",set:c,sync:r,initialize:function(){this.on("sync",this.decode,this)},defaults:function(){var e={fields:new wp.ccf.collections.Fields,type:"ccf_form",status:"publish",description:"",buttonText:"Submit Form",completionActionType:"text",completionRedirectUrl:"",completionMessage:"",sendEmailNotifications:!1,emailNotificationAddresses:l.adminEmail,emailNotificationFromType:"default",emailNotificationFromAddress:"",emailNotificationFromField:""};return e=i.defaults(e,this.constructor.__super__.defaults),wp.ccf.utils.cleanDateFields(e),e},decode:function(){var e=i.keys(wp.api.models.Post.prototype.defaults);return e=i.without(e,"title"),n.call(this,e)},getFieldSlugs:function(e){var t=wp.ccf.currentForm.get("fields"),i=[];return t.each(function(t){e&&t.isImmutable||i.push(t.get("slug"))}),i},parse:function(e){var t=this;if(e.fields){var l=t.get("fields");if(l&&l.length>0){for(var s=0;e.fields.length>s;s++){var c=e.fields[s],r=l.findWhere({slug:c.slug});if(r){if(c.choices!==void 0){var n=t.get("choices");if(n&&n.length>0)for(var o=0;c.choices>o;o++){var a=n.at(o);a.set(c.choices[o]),a.decode()}delete e.fields[s].choices}r.set(c),r.decode()}}delete e.fields}else{var d=[];i.each(e.fields,function(e){var t=new wp.ccf.models.Fields[e.type](e);t.decode(),d.push(t)}),e.fields=new wp.ccf.collections.Fields(d,{formId:e.ID})}}return this.constructor.__super__.parse.call(this,e)},toJSON:function(){var e=this.constructor.__super__.toJSON.call(this);return e.fields&&(e.fields=e.fields.toJSON()),e.author&&(e.author=e.author.toJSON()),e}}),wp.ccf.models.Submission=wp.api.models.Submission||wp.api.models.Post.extend({idAttribute:"ID",defaults:{ID:null,data:{}},sync:r}),wp.ccf.models.Field=wp.api.models.Field||wp.api.models.Post.extend({idAttribute:"ID",defaults:{ID:null},set:c,required:function(){return["slug"]},decode:function(){return n.call(this,i.keys(wp.api.models.Post.prototype.defaults))},hasRequiredAttributes:function(){var e=this,t=!0;return i.each(this.required(),function(i){(e.get(i)===void 0||""===e.get(i))&&(t=!1)}),t},sync:r}),wp.ccf.models.StandardField=wp.ccf.models.StandardField||wp.ccf.models.Field.extend({idAttribute:"ID",defaults:function(){var e={label:"Field Label",value:"",placeholder:"",slug:"",type:"",required:!1,className:"",description:""};return i.defaults(e,this.constructor.__super__.defaults)}}),wp.ccf.models.Fields["single-line-text"]=wp.ccf.models.Fields["single-line-text"]||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"single-line-text"};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.file=wp.ccf.models.Fields.file||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"file",fileExtensions:"",maxFileSize:l.maxFileSize};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields["paragraph-text"]=wp.ccf.models.Fields["paragraph-text"]||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"paragraph-text"};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.hidden=wp.ccf.models.Fields.hidden||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"hidden"};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.email=wp.ccf.models.Fields.email||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"email",emailConfirmation:!1};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.website=wp.ccf.models.Fields.website||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"website",placeholder:"http://"};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.phone=wp.ccf.models.Fields.phone||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"phone",phoneFormat:"us"};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.date=wp.ccf.models.Fields.date||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"date",showDate:!0,showTime:!0};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.name=wp.ccf.models.Fields.name||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"name"};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.recaptcha=wp.ccf.models.Fields.recaptcha||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"recaptcha",siteKey:"",secretKey:""};return i.defaults(e,this.constructor.__super__.defaults())},required:function(){return["siteKey","secretKey"]},isImmutable:!0}),wp.ccf.models.Fields.address=wp.ccf.models.Fields.address||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"address",addressType:"us"};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields["section-header"]=wp.ccf.models.Fields["section-header"]||wp.ccf.models.Field.extend({defaults:function(){var e={type:"section-header",slug:"",heading:"",subheading:"",className:""};return i.defaults(e,this.constructor.__super__.defaults)},required:function(){return[]},isImmutable:!0}),wp.ccf.models.Fields.html=wp.ccf.models.Fields.html||wp.ccf.models.Field.extend({defaults:function(){var e={type:"html",slug:"",html:"",className:""};return i.defaults(e,this.constructor.__super__.defaults)},required:function(){return[]},isImmutable:!0}),wp.ccf.models.ChoiceableField=wp.ccf.models.ChoiceableField||wp.ccf.models.StandardField.extend({defaults:function(){var e={choices:new wp.ccf.collections.FieldChoices};return i.defaults(e,this.constructor.__super__.defaults())},initialize:function(e){if("object"==typeof e&&e.choices){var t=[];i.each(e.choices,function(e){var i=new wp.ccf.models.FieldChoice(e);i.decode(),t.push(i)}),this.set("choices",new wp.ccf.collections.FieldChoices(t))}}}),wp.ccf.models.Fields.radio=wp.ccf.models.Fields.radio||wp.ccf.models.ChoiceableField.extend({defaults:function(){var e={type:"radio"};return i.defaults(e,this.constructor.__super__.defaults())},initialize:function(){return this.constructor.__super__.initialize.apply(this,arguments)}}),wp.ccf.models.Fields.checkboxes=wp.ccf.models.Fields.checkboxes||wp.ccf.models.ChoiceableField.extend({defaults:function(){var e={type:"checkboxes"};return i.defaults(e,this.constructor.__super__.defaults())},initialize:function(){return this.constructor.__super__.initialize.apply(this,arguments)}}),wp.ccf.models.Fields.dropdown=wp.ccf.models.Fields.dropdown||wp.ccf.models.ChoiceableField.extend({defaults:function(){var e={type:"dropdown"};return i.defaults(e,this.constructor.__super__.defaults())},initialize:function(){return this.constructor.__super__.initialize.apply(this,arguments)}})}(jQuery,Backbone,_,ccfSettings,WP_API_Settings),function(e,t,i){"use strict";var l=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:WP_API_Settings.root+"/ccf/forms",formsFetching:{},initialize:function(){this.constructor.__super__.initialize(),this.formsFetching={}},sync:l,remove:function(e,t){t=t||{};var l=this.constructor.__super__.remove.call(this,e,t);return t.destroy&&(e instanceof Array?i.each(e,function(e){e.destroy()}):e.destroy()),l}}),wp.ccf.collections.Fields=wp.ccf.collections.Fields||wp.api.collections.Posts.extend({model:wp.ccf.models.Field,url:function(){return WP_API_Settings.root+"/ccf/forms/"+this.formId+"/fields"},initialize:function(e,t){t&&t.formId&&(this.formId=t.formId)},sync:l}),wp.ccf.collections.Submissions=wp.ccf.collections.Submissions||wp.api.collections.Posts.extend({model:wp.ccf.models.Submission,url:function(){return WP_API_Settings.root+"/ccf/forms/"+this.formId+"/submissions"},initialize:function(e,t){this.constructor.__super__.initialize.apply(this,arguments),t&&t.formId&&(this.formId=t.formId)},sync:l}),wp.ccf.collections.FieldChoices=wp.ccf.collections.FieldChoices||t.Collection.extend({model:wp.ccf.models.FieldChoice})}(jQuery,Backbone,_,ccfSettings),function(e,t,i,l){"use strict";wp.ccf.views=wp.ccf.views||{},wp.ccf.views.Fields=wp.ccf.views.Fields||{},wp.ccf.views.FieldChoice=t.View.extend({template:wp.ccf.utils.template("ccf-field-choice-template"),className:"choice",events:{"click .add":"triggerAdd","click .delete":"triggerDelete","blur input":"saveChoice",saveChoice:"saveChoice",sorted:"triggerUpdateSort"},initialize:function(e){this.field=e.field},destroy:function(){wp.ccf.dispatcher.off("mainViewChange",this.saveChoice),this.unbind()},triggerUpdateSort:function(e,t){this.field.get("choices").remove(this.model,{silent:!0}),this.field.get("choices").add(this.model,{at:t,silent:!0})},saveChoice:function(){if(""!==this.el.innerHTML){var e=this.el.querySelectorAll(".choice-label")[0].value,t=this.el.querySelectorAll(".choice-value")[0].value;this.model.set("label",e),this.model.set("value",t);var i=this.el.querySelectorAll(".choice-selected")[0],l=i.checked?!0:!1;return this.model.set("selected",l),this}},render:function(){var e={};return this.model&&(e.choice=this.model.toJSON()),this.el.innerHTML=this.template(e),wp.ccf.dispatcher.on("mainViewChange",this.saveChoice,this),this},triggerAdd:function(){this.field.get("choices").add(new wp.ccf.models.FieldChoice)},triggerDelete:function(){var e=this.field.get("choices");if(e.length>1)e.remove(this.model),this.destroy(),this.remove();else{for(var t=this.el.querySelectorAll(".choice-label, .choice-value"),i=this.el.querySelectorAll(".choice-selected"),l=0;t.length>l;l++)t[l].value="";i[0].checked=!1}}}),wp.ccf.views.FieldBase=wp.ccf.views.FieldBase||t.View.extend({events:{"blur input":"saveField","blur input.field-slug":"checkSlug","blur textarea":"saveField","change select":"saveField",'change input[type="checkbox"]':"saveField"},checkSlug:function(){var e=this.el.querySelectorAll(".field-slug");if(e.length>0){var t=e[0],i=!1;t.parentNode.className=t.value&&!t.value.match(/^[a-zA-Z0-9\-_]+$/)?t.parentNode.className.replace(/ field-error/i,"")+" field-error":t.parentNode.className.replace(/ field-error/i,""),this.collection.length>0&&""!==t.value?(this.collection.each(function(e){e!==this.model&&t.value===e.get("slug")&&(i=!0)},this),t.parentNode.className=i?t.parentNode.className.replace(/ field-duplicate-slug/i,"")+" field-duplicate-slug":t.parentNode.className.replace(/ field-duplicate-slug/i,"")):t.parentNode.className=t.parentNode.className.replace(/ field-duplicate-slug/i,"")}},destroy:function(){this.unbind()},render:function(){return this.el.innerHTML=this.template({field:this.model.toJSON()}),this.checkSlug(),this}}),wp.ccf.views.Fields["single-line-text"]=wp.ccf.views.Fields["single-line-text"]||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-single-line-text-template"),initialize:function(){},saveField:function(){return""!==this.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),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("showDate",this.el.querySelectorAll(".field-show-date")[0].checked?!0:!1);var t=this.model.get("showTime"),i=this.el.querySelectorAll(".field-show-time")[0].checked?!0:!1;return this.model.set("showTime",i),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1),i!=t&&this.render(),this}}}),wp.ccf.views.Fields.name=wp.ccf.views.Fields.name||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-name-template"),saveField:function(){return""!==this.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.FormSettings=wp.ccf.views.FormSettings||t.View.extend({template:wp.ccf.utils.template("ccf-form-settings-template"),events:{"blur input":"save","change select":"save","change select.form-completion-action-type":"toggleCompletionFields","change select.form-send-email-notifications":"toggleNotificationFields"},initialize:function(e){this.model=e.form},destroy:function(){wp.ccf.dispatcher.off("saveFormSettings",this.save),wp.ccf.dispatcher.off("mainViewChange",this.save)},toggleCompletionFields:function(){var e=this.el.querySelectorAll(".form-completion-action-type")[0].value,t=this.el.querySelectorAll(".completion-message")[0],i=this.el.querySelectorAll(".completion-redirect-url")[0];"text"===e?(t.style.display="block",i.style.display="none"):(t.style.display="none",i.style.display="block")},save:function(e){if(""!==this.el.innerHTML){var t=this.el.querySelectorAll(".form-title")[0].value;this.model.set("title",t);var i=this.el.querySelectorAll(".form-description")[0].value;this.model.set("description",i);var l=this.el.querySelectorAll(".form-button-text")[0].value;this.model.set("buttonText",l);var s=this.el.querySelectorAll(".form-completion-message")[0].value;this.model.set("completionMessage",s);var c=this.el.querySelectorAll(".form-completion-redirect-url")[0].value;this.model.set("completionRedirectUrl",c);var r=this.el.querySelectorAll(".form-completion-action-type")[0].value;this.model.set("completionActionType",r),e!==void 0&&e.promise!==void 0&&e.resolve()}},render:function(){var e={form:this.model.toJSON()};return this.el.innerHTML=this.template(e),this.toggleCompletionFields(),wp.ccf.dispatcher.on("saveFormSettings",this.save,this),wp.ccf.dispatcher.on("mainViewChange",this.save,this),this}}),wp.ccf.views.FormNotifications=wp.ccf.views.FormNotifications||t.View.extend({template:wp.ccf.utils.template("ccf-form-notifications-template"),events:{"blur input":"save","change select":"save","change select.form-send-email-notifications":"toggleNotificationFields","change select.form-email-notification-from-type":"toggleNotificationFields"},initialize:function(e){this.model=e.form
2
  },destroy:function(){wp.ccf.dispatcher.off("saveFormNotifications",this.save),wp.ccf.dispatcher.off("mainViewChange",this.save),this.undelegateEvents(),this.unbind()},updateFromAddressFieldField:function(){var e=this.el.querySelectorAll(".form-email-notification-from-field")[0];e.innerHTML="",e.disabled=!1;var t=this.model.get("fields"),i=0,s=this.model.get("emailNotificationFromField");if(t.length>=1&&t.each(function(t){if("email"===t.get("type")){var l=document.createElement("option");l.innerHTML=t.get("slug"),l.value=t.get("slug"),t.get("slug")===s&&(l.selected=!0),e.appendChild(l),i++}}),0===i){var c=document.createElement("option");c.innerHTML=l.noEmailFields,e.appendChild(c),e.disabled=!0}},toggleNotificationFields:function(){var e,t=this.el.querySelectorAll(".form-send-email-notifications")[0].value,i=this.el.querySelectorAll(".email-notification-setting"),l=this.el.querySelectorAll(".email-notification-from-address")[0],s=this.el.querySelectorAll(".email-notification-from-field")[0],c=this.el.querySelectorAll(".form-email-notification-from-type")[0];if(parseInt(t)){for(e=0;i.length>e;e++)i[e].style.display="block";l.style.display="none",s.style.display="none","custom"===c.value?l.style.display="block":"field"===c.value&&(s.style.display="block")}else{for(e=0;i.length>e;e++)i[e].style.display="none";l.style.display="none",s.style.display="none"}},save:function(e){if(""!==this.el.innerHTML){var t=this.el.querySelectorAll(".form-send-email-notifications")[0].value;this.model.set("sendEmailNotifications",parseInt(t)?!0:!1);var i=this.el.querySelectorAll(".form-email-notification-addresses")[0].value;this.model.set("emailNotificationAddresses",i);var l=this.el.querySelectorAll(".form-email-notification-from-type")[0].value;this.model.set("emailNotificationFromType",l);var s=this.el.querySelectorAll(".form-email-notification-from-address")[0].value;this.model.set("emailNotificationFromAddress",s);var c=this.el.querySelectorAll(".form-email-notification-from-field")[0].value;this.model.set("emailNotificationFromField",c),e!==void 0&&e.promise!==void 0&&e.resolve()}},render:function(){var e={form:this.model.toJSON()},t=this.model.get("fields");return this.el.innerHTML=this.template(e),this.toggleNotificationFields(),this.updateFromAddressFieldField(),wp.ccf.dispatcher.on("saveFormNotifications",this.save,this),wp.ccf.dispatcher.on("mainViewChange",this.save,this),this.listenTo(t,"add",this.updateFromAddressFieldField,this),this.listenTo(t,"remove",this.updateFromAddressFieldField,this),this}}),wp.ccf.views.FormPane=wp.ccf.views.FormPane||t.View.extend(i.defaults({template:wp.ccf.utils.template("ccf-form-pane-template"),subViews:{"field-sidebar":wp.ccf.views.FieldSidebar,"form-settings":wp.ccf.views.FormSettings,"form-notifications":wp.ccf.views.FormNotifications},events:{"click .save-button":"sync","click h2":"accordionClick","click .insert-form-button":"insertForm"},initialize:function(){wp.ccf.dispatcher.on("openEditField",this.openEditField,this)},insertForm:function(){wp.ccf.utils.insertFormShortcode(this.model),wp.ccf.toggle()},accordionClick:function(t){var l=e(t.currentTarget).parents(".accordion-container")[0],s=l.querySelectorAll(".accordion-section");t.currentTarget.parentNode.className.match(/expanded/i)?t.currentTarget.parentNode.className=t.currentTarget.parentNode.className.replace(/expanded/i,""):t.currentTarget.parentNode.className+=" expanded",i.each(s,function(e){e!=t.currentTarget.parentNode&&e.className.match(/expanded/i)&&(e.className=e.className.replace(/expanded/i,""))})},openEditField:function(e){this.renderedSubViews["field-sidebar"].render(e).el.style.display="block"},disable:function(){this.el.querySelectorAll(".save-button")[0].setAttribute("disabled","disabled"),this.el.querySelectorAll(".disabled-overlay")[0].style.display="block"},enable:function(){this.el.querySelectorAll(".save-button")[0].removeAttribute("disabled"),this.el.querySelectorAll(".disabled-overlay")[0].style.display="none"},sync:function(){var t=this,i=e(this.el.querySelectorAll(".spinner")[0]);i.fadeIn(),t.disable();var s=e.Deferred(),c=e.Deferred(),r=e.Deferred();wp.ccf.dispatcher.trigger("saveFormSettings",s),wp.ccf.dispatcher.trigger("saveFormNotifications",r),wp.ccf.dispatcher.trigger("saveField",c),e.when(s,c,r).then(function(){var e=t.model.get("fields"),s=!0,c={};e.each(function(e){var t=e.get("slug");e.hasRequiredAttributes()?t&&!t.match(/^[a-zA-Z0-9\-_]+$/)?(s=!1,e.trigger("requirementsNotMet")):c[e.get("slug")]!==void 0?(s=!1,e.trigger("duplicateSlug"),c[e.get("slug")].trigger("duplicateSlug")):e.trigger("requirementsMet"):(s=!1,e.trigger("requirementsNotMet")),e.get("slug")&&(c[e.get("slug")]=e)}),s?t.model.save({},{context:"edit"}).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);var r=s.el.querySelectorAll(".fields")[0];i.each(l.fieldLabels,function(e,t){r.appendChild(new wp.ccf.views.FieldRowPlaceholder({type:t}).render().el)});var n=s.el.querySelectorAll(".structure-fields")[0];i.each(l.structureFieldLabels,function(e,t){n.appendChild(new wp.ccf.views.FieldRowPlaceholder({type:t}).render().el)});var o=s.el.querySelectorAll(".special-fields")[0];i.each(l.specialFieldLabels,function(e,t){o.appendChild(new wp.ccf.views.FieldRowPlaceholder({type:t}).render().el)}),e(s.el.querySelectorAll(".left-sidebar")[0].querySelectorAll(".field")).draggable({cursor:"move",zIndex:160001,scroll:!1,containment:".ccf-form-pane",appendTo:".ccf-main-modal",snap:!0,connectToSortable:".form-content",helper:function(t){var i=e(t.currentTarget),l=e('<div class="field" data-field-type="'+i.attr("data-field-type")+'"><h4>'+i.find(".label").html()+"</h4></div>");return l.css({width:i.width(),height:i.height()})}});var a=s.model.get("fields"),d=s.el.querySelectorAll(".form-content")[0];return a.length>=1&&(d.innerHTML="",a.each(function(e){var t=new wp.ccf.views.FieldRow({model:e,form:s.model}).render(!0).el;d.appendChild(t)})),e(d).sortable({axis:"y",handle:"h4",stop:function(e,t){if(!t.item.hasClass("instantiated")){var i=t.item.attr("data-field-type"),l={};wp.ccf.models.Fields[i].prototype.defaults().slug!==void 0&&(l.slug=i+"-"+s.getNextFieldOrd());var c=new wp.ccf.models.Fields[i](l),r=s.model.get("fields");r.add(c),new wp.ccf.views.FieldRow({model:c,el:t.item,form:s.model}).render(!0),t.item.attr("style","")}t.item.trigger("sorted",t.item.index())}}),s.initRenderSubViews(!0,!0,{form:s.model}),s.enableDisableInsert(),s}},wp.ccf.mixins.subViewable)),wp.ccf.views.ExistingFormTableRow=wp.ccf.views.ExistingFormTableRow||t.View.extend({tagName:"tr",template:wp.ccf.utils.template("ccf-existing-form-table-row-template"),events:{"click .edit":"triggerMainViewChange","click .delete":"triggerDelete","click .insert-form-button":"insertForm"},initialize:function(e){this.parent=e.parent},insertForm:function(){wp.ccf.utils.insertFormShortcode(this.model),wp.ccf.toggle()},triggerMainViewChange:function(){wp.ccf.switchToForm(this.model)},triggerDelete:function(){var e,t=this,i=t.parent.collection.state.currentPage;t.model.destroy().done(function(){e=i,e===t.parent.collection.state.totalPages&&e-1===(t.parent.collection.state.totalObjects-1)/l.postsPerPage&&e--,t.parent.showPage(e).done(function(){t.parent.renderPagination()})})},render:function(){return this.$el.html(this.template({form:this.model.toJSON(),utils:{getPrettyPostDate:wp.ccf.utils.getPrettyPostDate}})),this}}),wp.ccf.views.EmptyFormTableRow=wp.ccf.views.EmptyFormTableRow||t.View.extend({tagName:"tr",template:wp.ccf.utils.template("ccf-empty-form-table-row-template"),render:function(){return this.$el.html(this.template()),this}}),wp.ccf.views.ExistingFormTable=wp.ccf.views.ExistingFormTable||t.View.extend({template:wp.ccf.utils.template("ccf-existing-form-table-template"),initialize:function(){this.parent=arguments.parent,this.collection=new wp.ccf.collections.Forms,wp.ccf.dispatcher.on("changeFormTablePage",this.showPage,this),wp.ccf.dispatcher.on("saveFormComplete",this.render,this)},showPage:function(e){var t=this,i=this.collection.fetch({data:{page:e}});return i.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 r=!1;if(l.single)if(r=!0,l.postId){var n=parseInt(l.postId);if(s.forms.formsFetching[n]===void 0){var o=new wp.ccf.models.Form({ID:n}),a=o.fetch();s.forms.formsFetching[n]=a,s._currentFormDeferred=a,a.done(function(){delete s.forms.formsFetching[n],s.forms.add(o),s.currentForm=o})}else s._currentFormDeferred=s.forms.formsFetching[n],s._currentFormDeferred.done(function(){s.currentForm=s.forms.findWhere({ID:n})});e.when(s._currentFormDeferred).then(function(){s._setupMainModal(!0),c.style.display="inline-block";var e=document.getElementById("ccf-submissions");if(e){var t=e.querySelectorAll(".inside")[0],i=document.createElement("div");i.className="ccf-submission-settings",i.setAttribute("data-icon","");var l=document.getElementById("show-settings-link");i.onclick=function(){l.click()},e.insertBefore(i,e.firstChild.nextSibling.nextSibling),wp.ccf.createSubmissionsTable(t)}})}else s._setupMainModal(!0),c.style.display="inline-block";else s._setupMainModal();var d=function(e){e=e||window.event;var t=e.currentTarget?e.currentTarget:e.srcElement,i=t.getAttribute("data-form-id");wp.ccf.toggle(i)};c.addEventListener?c.addEventListener("click",d,!1):c.attachEvent("onclick",d)}}),wp.ccf.createManager()}(jQuery,Backbone,_,ccfSettings);
build/js/form.min.js CHANGED
@@ -1 +1 @@
1
- (function(e,t){"use strict";window.wp=window.wp||{},wp.ccf=wp.ccf||{},wp.ccf.validators=wp.ccf.validators||{};var i={},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 p;for(var h in this.errors)if(this.errors.hasOwnProperty(h))for(var m in this.errors[h])p=document.createElement("div"),p.className="error "+m+"-error",p.setAttribute("data-field-name",h),p.innerHTML=t[m],"fileExtension"===m&&c?p.innerHTML+=" ("+c+")":"fileSize"===m&&r&&(p.innerHTML+=" "+r+" MB"),this.errors[h][m].parentNode.insertBefore(p,this.errors[h][m].nextSibling)},wp.ccf.validators.website=wp.ccf.validators.website||r(function(e){if(e.value){var t=/^http(s?)\:\/\/(([a-zA-Z0-9\-\._]+(\.[a-zA-Z0-9\-\._]+)+)|localhost)(\/?)([a-zA-Z0-9\-\.\?\,\'\/\\\+&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=document.querySelectorAll(".ccf-datepicker"),r=0;s.length>r;r++)e(s[r]).datepicker();var c=document.querySelectorAll(".ccf-form-wrapper");c.length>=1&&_.each(c,function(s){function r(t){var i=s.querySelectorAll(".field"),l=[];if(_.each(i,function(e){if(!e.className.match(/ skip-field/i)){var t=e.getAttribute("data-field-type"),i=e.getAttribute("data-field-slug");h[i]=e;var s=new wp.ccf.validators[t](e,n);if(_.size(s.errors)){var r=0;for(var c in s.errors)s.errors.hasOwnProperty(c)&&_.size(s.errors[c])&&r++;r>0&&l.push(s)}}}),!l.length)return o.trigger("ccfFormSuccess"),s.className=s.className.replace(/ loading/i,"")+" loading",f.animate({opacity:100}),!0;t.returnFalse=!1,t.preventDefault&&t.preventDefault(),o.trigger("ccfFormError",l);var r=e(window).scrollTop(),c=r+e(window).height(),a=e(l[0].wrapper),d=a.offset(),u=d.top,p=u+a.height();return u>=r&&c>=p||e("html, body").animate({scrollTop:a.offset().top},500),!1}var c=s.querySelectorAll(".ccf-form")[0],o=e(c),n=parseInt(s.getAttribute("data-form-id")),a=c.querySelectorAll(".ccf-submit-button")[0],d=document.getElementById("ccf_form_frame_"+n),f=e(c.querySelectorAll(".loading-img")[0]),u=e(d),p=e(a),h={};l[n]=function(){var l,s=u.contents().find("body").text();if(!s)return!1;c.className=c.className.replace(/ loading/i,""),f.animate({opacity:0}),i[n]=!1;try{l=e.parseJSON(s)}catch(r){var o=document.createElement("div");return o.className="error unknown-error",o.innerText=t.unknown,a.parentNode.appendChild(o),!1}var d=a.parentNode.querySelectorAll(".error");d.length&&d[0].parentNode.removeChild(d[0]),l.success?"text"===l.action_type&&l.completion_message?(c.innerHTML=l.completion_message,e("html, body").animate({scrollTop:e(c).offset().top},500)):"redirect"===l.action_type&&l.completion_redirect_url&&(document.location=l.completion_redirect_url):l.field_errors&&_.each(l.field_errors,function(e,t){var i=h[t].querySelectorAll(".field-input");for(var l in e)if(e.hasOwnProperty(l)){var s=document.createElement("div");s.className="error "+l+"-error",s.innerHTML=e[l],1===i.length?i[i.length-1].parentNode.insertBefore(s,i[i.length-1].nextSibling):h[t].appendChild(s)}})},p.on("click",function(e){return e.preventDefault(),c.target="ccf_form_frame_"+n,c.action=t.ajaxurl,o.submit(),!1}),o.on("submit",r)})},e(document).ready(wp.ccf.setupDOM)})(jQuery,ccfSettings);
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 p;for(var h in this.errors)if(this.errors.hasOwnProperty(h))for(var m in this.errors[h])p=document.createElement("div"),p.className="error "+m+"-error",p.setAttribute("data-field-name",h),p.innerHTML=t[m],"fileExtension"===m&&c?p.innerHTML+=" ("+c+")":"fileSize"===m&&r&&(p.innerHTML+=" "+r+" MB"),this.errors[h][m].parentNode.insertBefore(p,this.errors[h][m].nextSibling)},wp.ccf.validators.website=wp.ccf.validators.website||r(function(e){if(e.value){var t=/^http(s?)\:\/\/(([a-zA-Z0-9\-\._]+(\.[a-zA-Z0-9\-\._]+)+)|localhost)(\/?)([a-zA-Z0-9\-\.\?\,\'\/\\\+&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=document.querySelectorAll(".ccf-datepicker"),r=0;s.length>r;r++)e(s[r]).datepicker();var c=document.querySelectorAll(".ccf-form-wrapper");c.length>=1&&_.each(c,function(s){function r(t){var i=s.querySelectorAll(".field"),l=[];if(_.each(i,function(e){if(!e.className.match(/ skip-field/i)){var t=e.getAttribute("data-field-type"),i=e.getAttribute("data-field-slug");h[i]=e;var s=new wp.ccf.validators[t](e,n);if(_.size(s.errors)){var r=0;for(var c in s.errors)s.errors.hasOwnProperty(c)&&_.size(s.errors[c])&&r++;r>0&&l.push(s)}}}),!l.length)return o.trigger("ccfFormSuccess"),s.className=s.className.replace(/ loading/i,"")+" loading",f.animate({opacity:100}),!0;t.returnFalse=!1,t.preventDefault&&t.preventDefault(),o.trigger("ccfFormError",l);var r=e(window).scrollTop(),c=r+e(window).height(),a=e(l[0].wrapper),d=a.offset(),u=d.top,p=u+a.height();return u>=r&&c>=p||e("html, body").animate({scrollTop:a.offset().top},500),!1}var c=s.querySelectorAll(".ccf-form")[0],o=e(c),n=parseInt(s.getAttribute("data-form-id")),a=c.querySelectorAll(".ccf-submit-button")[0],d=document.getElementById("ccf_form_frame_"+n),f=e(c.querySelectorAll(".loading-img")[0]),u=e(d),p=e(a),h={};l[n]=function(){var l,s=u.contents().find("body").text();if(!s)return!1;c.className=c.className.replace(/ loading/i,""),f.animate({opacity:0}),i[n]=!1;try{l=e.parseJSON(s)}catch(r){var o=document.createElement("div");return o.className="error unknown-error",o.innerText=t.unknown,a.parentNode.appendChild(o),!1}var d=a.parentNode.querySelectorAll(".error");d.length&&d[0].parentNode.removeChild(d[0]),l.success?"text"===l.action_type&&l.completion_message?(c.innerHTML=l.completion_message,e("html, body").animate({scrollTop:e(c).offset().top},500)):"redirect"===l.action_type&&l.completion_redirect_url&&(document.location=l.completion_redirect_url):l.field_errors&&_.each(l.field_errors,function(e,t){var i=h[t].querySelectorAll(".field-input");for(var l in e)if(e.hasOwnProperty(l)){var s=document.createElement("div");s.className="error "+l+"-error",s.innerHTML=e[l],1===i.length?i[i.length-1].parentNode.insertBefore(s,i[i.length-1].nextSibling):h[t].appendChild(s)}})},p.on("click",function(e){return e.preventDefault(),c.target="ccf_form_frame_"+n,c.action=t.ajaxurl,o.submit(),!1}),o.on("submit",r)})},e(document).ready(wp.ccf.setupDOM)})(jQuery,ccfSettings);
classes/class-ccf-form-handler.php CHANGED
@@ -287,7 +287,7 @@ class CCF_Form_Handler {
287
 
288
  $format = get_post_meta( $field_id, esc_html__( 'ccf_field_phoneFormat', 'custom-contact-forms' ), true );
289
 
290
- if ( ! empty( $value ) && preg_match( '#[^0-9+.)(\-]#', $value ) ) {
291
  $errors['chars'] = esc_html__( 'This phone number contains invalid characters.', 'custom-contact-forms' );
292
  }
293
 
@@ -810,7 +810,7 @@ class CCF_Form_Handler {
810
  }
811
 
812
  foreach ( $email_addresses as $email ) {
813
- $subject = sprintf( __( '%s: Form Submission to "%s"', 'custom-contact-forms' ), esc_html( get_bloginfo( 'name' ) ), esc_html( get_the_title( $form_id ) ) );
814
  $subject = apply_filters( 'ccf_email_subject', $subject, $form_id, $email, $form_page );
815
  wp_mail( $email, $subject, apply_filters( 'ccf_email_content', $message, $form_id, $email, $form_page ), apply_filters( 'ccf_email_headers', $headers, $form_id, $email, $form_page ) );
816
  }
287
 
288
  $format = get_post_meta( $field_id, esc_html__( 'ccf_field_phoneFormat', 'custom-contact-forms' ), true );
289
 
290
+ if ( ! empty( $value ) && preg_match( '#[^0-9+.)(\- ]#', $value ) ) {
291
  $errors['chars'] = esc_html__( 'This phone number contains invalid characters.', 'custom-contact-forms' );
292
  }
293
 
810
  }
811
 
812
  foreach ( $email_addresses as $email ) {
813
+ $subject = sprintf( __( '%s: Form Submission to "%s"', 'custom-contact-forms' ), wp_specialchars_decode( get_bloginfo( 'name' ) ), wp_specialchars_decode( $form->post_title ) );
814
  $subject = apply_filters( 'ccf_email_subject', $subject, $form_id, $email, $form_page );
815
  wp_mail( $email, $subject, apply_filters( 'ccf_email_content', $message, $form_id, $email, $form_page ), apply_filters( 'ccf_email_headers', $headers, $form_id, $email, $form_page ) );
816
  }
custom-contact-forms.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin URI: http://www.taylorlovett.com
5
  * Description: Build beautiful custom forms the WordPress way. View live previews of your forms while you build them.
6
  * Author: Taylor Lovett
7
- * Version: 6.4.10
8
  * Author URI: http://www.taylorlovett.com
9
  */
10
 
4
  * Plugin URI: http://www.taylorlovett.com
5
  * Description: Build beautiful custom forms the WordPress way. View live previews of your forms while you build them.
6
  * Author: Taylor Lovett
7
+ * Version: 6.4.11
8
  * Author URI: http://www.taylorlovett.com
9
  */
10
 
js/form.js CHANGED
@@ -171,14 +171,13 @@
171
  var phone = this.inputs[0].value;
172
 
173
  if ( phone ) {
174
- var re = /^[0-9+.)(\-]+$/;
175
 
176
  if ( ! re.test( phone ) ) {
177
  this.errors[this.inputs[0].getAttribute( 'name' )].phone = this.wrapper.lastChild;
178
  } else {
179
  if ( 'us' === this.wrapper.getAttribute( 'data-phone-format' ) ) {
180
  var strippedPhone = phone.replace( /[^0-9]/ig, '' );
181
-
182
  if ( strippedPhone.length !== 10 ) {
183
  this.errors[this.inputs[0].getAttribute( 'name' )].digits = this.wrapper.lastChild;
184
  }
171
  var phone = this.inputs[0].value;
172
 
173
  if ( phone ) {
174
+ var re = /^[0-9+.)(\- ]+$/;
175
 
176
  if ( ! re.test( phone ) ) {
177
  this.errors[this.inputs[0].getAttribute( 'name' )].phone = this.wrapper.lastChild;
178
  } else {
179
  if ( 'us' === this.wrapper.getAttribute( 'data-phone-format' ) ) {
180
  var strippedPhone = phone.replace( /[^0-9]/ig, '' );
 
181
  if ( strippedPhone.length !== 10 ) {
182
  this.errors[this.inputs[0].getAttribute( 'name' )].digits = this.wrapper.lastChild;
183
  }
js/manager/models.js CHANGED
@@ -46,6 +46,7 @@
46
  .replace( /&#8220;/g, '”' )
47
  .replace( /&#8221;/g, '”' )
48
  .replace( /&#8216;/g, "‘" )
 
49
  .replace( /&#039;/g, "'" );
50
 
51
  this.set( key, value );
46
  .replace( /&#8220;/g, '”' )
47
  .replace( /&#8221;/g, '”' )
48
  .replace( /&#8216;/g, "‘" )
49
+ .replace( /&#038;/g, "&" )
50
  .replace( /&#039;/g, "'" );
51
 
52
  this.set( key, value );
languages/custom-contact-forms.mo CHANGED
Binary file
languages/custom-contact-forms.po CHANGED
@@ -5,8 +5,8 @@ msgstr ""
5
  "Project-Id-Version: Custom Contact Forms\n"
6
  "Report-Msgid-Bugs-To: https://github.com/tlovett1/editorial-access-manager/"
7
  "issues\n"
8
- "POT-Creation-Date: 2015-03-03 23:47-0500\n"
9
- "PO-Revision-Date: 2015-03-03 23:47-0500\n"
10
  "Last-Translator: Taylor Lovett <tlovett88@gmail.com>\n"
11
  "Language-Team: LANGUAGE <LL@li.org>\n"
12
  "Language: en\n"
@@ -23,71 +23,34 @@ msgstr ""
23
  "X-Textdomain-Support: yes\n"
24
  "X-Poedit-SearchPath-0: ..\n"
25
 
26
- #: ../classes/class-ccf-api.php:146
27
- #: ../vendor/wp-api/wp-api/lib/class-wp-json-comments.php:82
28
- #: ../vendor/wp-api/wp-api/lib/class-wp-json-customposttype.php:130
29
- #: ../vendor/wp-api/wp-api/lib/class-wp-json-customposttype.php:151
30
- #: ../vendor/wp-api/wp-api/lib/class-wp-json-customposttype.php:157
31
- #: ../vendor/wp-api/wp-api/lib/class-wp-json-customposttype.php:176
32
- #: ../vendor/wp-api/wp-api/lib/class-wp-json-media.php:72
33
- #: ../vendor/wp-api/wp-api/lib/class-wp-json-media.php:143
34
- #: ../vendor/wp-api/wp-api/lib/class-wp-json-media.php:149
35
- #: ../vendor/wp-api/wp-api/lib/class-wp-json-media.php:168
36
- #: ../vendor/wp-api/wp-api/lib/class-wp-json-meta-posts.php:30
37
- #: ../vendor/wp-api/wp-api/lib/class-wp-json-pages.php:69
38
- #: ../vendor/wp-api/wp-api/lib/class-wp-json-pages.php:88
39
- #: ../vendor/wp-api/wp-api/lib/class-wp-json-pages.php:106
40
- #: ../vendor/wp-api/wp-api/lib/class-wp-json-posts.php:74
41
- #: ../vendor/wp-api/wp-api/lib/class-wp-json-posts.php:271
42
- #: ../vendor/wp-api/wp-api/lib/class-wp-json-posts.php:319
43
- #: ../vendor/wp-api/wp-api/lib/class-wp-json-posts.php:364
44
- #: ../vendor/wp-api/wp-api/lib/class-wp-json-posts.php:730
45
- #: ../vendor/wp-api/wp-api/lib/class-wp-json-posts.php:758
46
- msgid "Invalid post ID."
47
- msgstr ""
48
-
49
- #: ../classes/class-ccf-api.php:150
50
- #: ../vendor/wp-api/wp-api/lib/class-wp-json-comments.php:86
51
- #: ../vendor/wp-api/wp-api/lib/class-wp-json-posts.php:275
52
- #: ../vendor/wp-api/wp-api/lib/class-wp-json-posts.php:517
53
- #: ../vendor/wp-api/wp-api/lib/class-wp-json-posts.php:529
54
- msgid "Sorry, you cannot read this post."
55
- msgstr ""
56
-
57
- #: ../classes/class-ccf-api.php:206
58
- #: ../vendor/wp-api/wp-api/lib/class-wp-json-posts.php:122
59
- #, php-format
60
- msgid "The post type \"%s\" is not valid"
61
- msgstr ""
62
-
63
- #: ../classes/class-ccf-api.php:427 ../classes/class-ccf-api.php:722
64
- #: ../classes/class-ccf-api.php:747 ../classes/class-ccf-api.php:776
65
- #: ../classes/class-ccf-api.php:869
66
  msgid "Invalid form ID."
67
  msgstr ""
68
 
69
- #: ../classes/class-ccf-api.php:432 ../classes/class-ccf-api.php:707
70
- #: ../classes/class-ccf-api.php:727
71
  msgid "Sorry, you cannot view forms."
72
  msgstr ""
73
 
74
- #: ../classes/class-ccf-api.php:753 ../classes/class-ccf-api.php:782
75
  msgid "Invalid form."
76
  msgstr ""
77
 
78
- #: ../classes/class-ccf-api.php:757
79
  msgid "Sorry, you cannot view this form."
80
  msgstr ""
81
 
82
- #: ../classes/class-ccf-api.php:880
83
  msgid "The form cannot be deleted."
84
  msgstr ""
85
 
86
- #: ../classes/class-ccf-api.php:884
87
  msgid "Permanently deleted form"
88
  msgstr ""
89
 
90
- #: ../classes/class-ccf-api.php:887
91
  #: ../vendor/wp-api/wp-api/lib/class-wp-json-posts.php:381
92
  msgid "Deleted post"
93
  msgstr ""
@@ -116,40 +79,40 @@ msgstr ""
116
 
117
  #: ../classes/class-ccf-field-renderer.php:955
118
  #: ../classes/class-ccf-field-renderer.php:976
119
- #: ../classes/class-ccf-form-manager.php:1076
120
- #: ../classes/class-ccf-form-manager.php:1097
121
  msgid "HH"
122
  msgstr ""
123
 
124
  #: ../classes/class-ccf-field-renderer.php:959
125
  #: ../classes/class-ccf-field-renderer.php:980
126
- #: ../classes/class-ccf-form-manager.php:1080
127
- #: ../classes/class-ccf-form-manager.php:1101
128
  msgid "MM"
129
  msgstr ""
130
 
131
  #: ../classes/class-ccf-field-renderer.php:963
132
  #: ../classes/class-ccf-field-renderer.php:984
133
- #: ../classes/class-ccf-form-manager.php:1084
134
- #: ../classes/class-ccf-form-manager.php:1105
135
  msgid "AM"
136
  msgstr ""
137
 
138
  #: ../classes/class-ccf-field-renderer.php:964
139
  #: ../classes/class-ccf-field-renderer.php:985
140
- #: ../classes/class-ccf-form-manager.php:1085
141
- #: ../classes/class-ccf-form-manager.php:1106
142
  msgid "PM"
143
  msgstr ""
144
 
145
  #: ../classes/class-ccf-field-renderer.php:971
146
  #: ../classes/class-ccf-form-cpt.php:306
147
- #: ../classes/class-ccf-form-manager.php:244
148
- #: ../classes/class-ccf-form-manager.php:257
149
- #: ../classes/class-ccf-form-manager.php:1092
150
- #: ../classes/class-ccf-form-manager.php:1275
151
- #: ../classes/class-ccf-form-manager.php:1289
152
- #: ../classes/class-ccf-form-manager.php:1427
153
  msgid "Date"
154
  msgstr ""
155
 
@@ -159,8 +122,8 @@ msgstr ""
159
 
160
  #: ../classes/class-ccf-form-cpt.php:123 ../classes/class-ccf-form-cpt.php:141
161
  #: ../classes/class-ccf-form-cpt.php:304
162
- #: ../classes/class-ccf-form-manager.php:247
163
- #: ../classes/class-ccf-form-manager.php:260
164
  msgid "Submissions"
165
  msgstr ""
166
 
@@ -197,7 +160,7 @@ msgid "Move to Trash"
197
  msgstr ""
198
 
199
  #: ../classes/class-ccf-form-cpt.php:247
200
- #: ../classes/class-ccf-form-manager.php:1217
201
  msgid "(No title)"
202
  msgstr ""
203
 
@@ -210,14 +173,14 @@ msgid "Form Title"
210
  msgstr ""
211
 
212
  #: ../classes/class-ccf-form-cpt.php:303
213
- #: ../classes/class-ccf-form-manager.php:245
214
- #: ../classes/class-ccf-form-manager.php:258
215
  msgid "Author"
216
  msgstr ""
217
 
218
  #: ../classes/class-ccf-form-cpt.php:305
219
- #: ../classes/class-ccf-form-manager.php:246
220
- #: ../classes/class-ccf-form-manager.php:259
221
  msgid "Number of Fields"
222
  msgstr ""
223
 
@@ -247,7 +210,7 @@ msgid "Form"
247
  msgstr ""
248
 
249
  #: ../classes/class-ccf-form-cpt.php:368 ../classes/class-ccf-form-cpt.php:371
250
- #: ../classes/class-ccf-form-manager.php:81
251
  msgid "New Form"
252
  msgstr ""
253
 
@@ -398,24 +361,20 @@ msgstr ""
398
  msgid "AM/PM is required."
399
  msgstr ""
400
 
401
- #: ../classes/class-ccf-form-handler.php:698
402
  msgid "*Hidden Field*"
403
  msgstr ""
404
 
405
- #: ../classes/class-ccf-form-handler.php:772
406
  msgid "Form submitted from"
407
  msgstr ""
408
 
409
- #: ../classes/class-ccf-form-handler.php:780
410
- msgid "Form submitter IP"
411
- msgstr ""
412
-
413
- #: ../classes/class-ccf-form-handler.php:813
414
  #, php-format
415
  msgid "%s: Form Submission to \"%s\""
416
  msgstr ""
417
 
418
- #: ../classes/class-ccf-form-handler.php:826
419
  #: ../classes/class-ccf-form-renderer.php:119
420
  msgid "Thank you for your submission."
421
  msgstr ""
@@ -433,285 +392,291 @@ msgid ""
433
  "href=\"%s\">support forums</a> or <a href=\"%s\">Github</a>."
434
  msgstr ""
435
 
436
- #: ../classes/class-ccf-form-manager.php:78
 
 
 
 
 
 
437
  msgid "Manage Forms"
438
  msgstr ""
439
 
440
- #: ../classes/class-ccf-form-manager.php:82
441
  msgid "Existing Forms"
442
  msgstr ""
443
 
444
- #: ../classes/class-ccf-form-manager.php:106
445
  msgid "Standard Fields"
446
  msgstr ""
447
 
448
- #: ../classes/class-ccf-form-manager.php:112
449
  msgid "Special Fields"
450
  msgstr ""
451
 
452
- #: ../classes/class-ccf-form-manager.php:118
453
  msgid "Structure"
454
  msgstr ""
455
 
456
- #: ../classes/class-ccf-form-manager.php:129
457
  msgid "&rarr; Drag fields here to add them"
458
  msgstr ""
459
 
460
- #: ../classes/class-ccf-form-manager.php:136
461
- #: ../classes/class-ccf-form-manager.php:1220
462
  msgid "Insert into post"
463
  msgstr ""
464
 
465
- #: ../classes/class-ccf-form-manager.php:137
466
  msgid "Save Form"
467
  msgstr ""
468
 
469
- #: ../classes/class-ccf-form-manager.php:143
470
  msgid "Form Settings"
471
  msgstr ""
472
 
473
- #: ../classes/class-ccf-form-manager.php:146
474
  msgid "Form Title:"
475
  msgstr ""
476
 
477
- #: ../classes/class-ccf-form-manager.php:151
478
  msgid "Form Description:"
479
  msgstr ""
480
 
481
- #: ../classes/class-ccf-form-manager.php:156
482
  msgid "Button Text:"
483
  msgstr ""
484
 
485
- #: ../classes/class-ccf-form-manager.php:161
486
  msgid "On form completion:"
487
  msgstr ""
488
 
489
- #: ../classes/class-ccf-form-manager.php:164
490
  msgid "Show text"
491
  msgstr ""
492
 
493
- #: ../classes/class-ccf-form-manager.php:165
494
  msgid "Redirect"
495
  msgstr ""
496
 
497
- #: ../classes/class-ccf-form-manager.php:169
498
  msgid "Redirect URL:"
499
  msgstr ""
500
 
501
- #: ../classes/class-ccf-form-manager.php:173
502
  msgid "Completion Message:"
503
  msgstr ""
504
 
505
- #: ../classes/class-ccf-form-manager.php:180
506
  msgid "Form Notifications"
507
  msgstr ""
508
 
509
- #: ../classes/class-ccf-form-manager.php:183
510
  msgid "Send Email Notifications:"
511
  msgstr ""
512
 
513
- #: ../classes/class-ccf-form-manager.php:186
514
- #: ../classes/class-ccf-form-manager.php:297
515
- #: ../classes/class-ccf-form-manager.php:347
516
- #: ../classes/class-ccf-form-manager.php:423
517
- #: ../classes/class-ccf-form-manager.php:513
518
- #: ../classes/class-ccf-form-manager.php:578
519
- #: ../classes/class-ccf-form-manager.php:620
520
- #: ../classes/class-ccf-form-manager.php:681
521
- #: ../classes/class-ccf-form-manager.php:728
522
- #: ../classes/class-ccf-form-manager.php:770
523
- #: ../classes/class-ccf-form-manager.php:777
524
- #: ../classes/class-ccf-form-manager.php:828
525
- #: ../classes/class-ccf-form-manager.php:871
526
- #: ../classes/class-ccf-form-manager.php:914
527
  msgid "Yes"
528
  msgstr ""
529
 
530
- #: ../classes/class-ccf-form-manager.php:187
531
- #: ../classes/class-ccf-form-manager.php:298
532
- #: ../classes/class-ccf-form-manager.php:348
533
- #: ../classes/class-ccf-form-manager.php:424
534
- #: ../classes/class-ccf-form-manager.php:514
535
- #: ../classes/class-ccf-form-manager.php:579
536
- #: ../classes/class-ccf-form-manager.php:621
537
- #: ../classes/class-ccf-form-manager.php:682
538
- #: ../classes/class-ccf-form-manager.php:729
539
- #: ../classes/class-ccf-form-manager.php:771
540
- #: ../classes/class-ccf-form-manager.php:778
541
- #: ../classes/class-ccf-form-manager.php:829
542
- #: ../classes/class-ccf-form-manager.php:872
543
- #: ../classes/class-ccf-form-manager.php:915
544
  msgid "No"
545
  msgstr ""
546
 
547
- #: ../classes/class-ccf-form-manager.php:192
548
  msgid "\"To\" Email Addresses (comma separated):"
549
  msgstr ""
550
 
551
- #: ../classes/class-ccf-form-manager.php:197
552
  msgid "\"From\" Email Address Type:"
553
  msgstr ""
554
 
555
- #: ../classes/class-ccf-form-manager.php:199
556
  msgid "WordPress Default"
557
  msgstr ""
558
 
559
- #: ../classes/class-ccf-form-manager.php:200
560
  msgid "Custom Email"
561
  msgstr ""
562
 
563
- #: ../classes/class-ccf-form-manager.php:201
564
  msgid "Form Field"
565
  msgstr ""
566
 
567
- #: ../classes/class-ccf-form-manager.php:204
568
  msgid ""
569
  "You can set the notification emails from address to be the WP default, a "
570
  "custom email address, or pull the address from a field in the form."
571
  msgstr ""
572
 
573
- #: ../classes/class-ccf-form-manager.php:208
574
  msgid "Custom \"From\" Email Address:"
575
  msgstr ""
576
 
577
- #: ../classes/class-ccf-form-manager.php:213
578
  msgid "Pull \"From\" Email Dynamically from Field:"
579
  msgstr ""
580
 
581
- #: ../classes/class-ccf-form-manager.php:227
582
  msgid "items"
583
  msgstr ""
584
 
585
- #: ../classes/class-ccf-form-manager.php:242
586
- #: ../classes/class-ccf-form-manager.php:255
587
  msgid "ID"
588
  msgstr ""
589
 
590
- #: ../classes/class-ccf-form-manager.php:243
591
- #: ../classes/class-ccf-form-manager.php:256
592
  msgid "Title"
593
  msgstr ""
594
 
595
- #: ../classes/class-ccf-form-manager.php:270
596
  msgid "<span>&larr;</span> Click on a field to edit it."
597
  msgstr ""
598
 
599
- #: ../classes/class-ccf-form-manager.php:279
600
- #: ../classes/class-ccf-form-manager.php:323
601
- #: ../classes/class-ccf-form-manager.php:405
602
- #: ../classes/class-ccf-form-manager.php:495
603
  msgid "Internal Unique Slug"
604
  msgstr ""
605
 
606
- #: ../classes/class-ccf-form-manager.php:283
607
- #: ../classes/class-ccf-form-manager.php:327
608
- #: ../classes/class-ccf-form-manager.php:370
609
- #: ../classes/class-ccf-form-manager.php:409
610
- #: ../classes/class-ccf-form-manager.php:499
611
- #: ../classes/class-ccf-form-manager.php:568
612
- #: ../classes/class-ccf-form-manager.php:604
613
- #: ../classes/class-ccf-form-manager.php:660
614
- #: ../classes/class-ccf-form-manager.php:711
615
- #: ../classes/class-ccf-form-manager.php:754
616
- #: ../classes/class-ccf-form-manager.php:818
617
- #: ../classes/class-ccf-form-manager.php:861
618
- #: ../classes/class-ccf-form-manager.php:904
619
  msgid "Label:"
620
  msgstr ""
621
 
622
- #: ../classes/class-ccf-form-manager.php:287
623
- #: ../classes/class-ccf-form-manager.php:331
624
- #: ../classes/class-ccf-form-manager.php:374
625
- #: ../classes/class-ccf-form-manager.php:413
626
- #: ../classes/class-ccf-form-manager.php:503
627
- #: ../classes/class-ccf-form-manager.php:572
628
- #: ../classes/class-ccf-form-manager.php:608
629
- #: ../classes/class-ccf-form-manager.php:664
630
- #: ../classes/class-ccf-form-manager.php:715
631
- #: ../classes/class-ccf-form-manager.php:758
632
- #: ../classes/class-ccf-form-manager.php:822
633
- #: ../classes/class-ccf-form-manager.php:865
634
- #: ../classes/class-ccf-form-manager.php:908
635
  msgid "Description:"
636
  msgstr ""
637
 
638
- #: ../classes/class-ccf-form-manager.php:291
639
- #: ../classes/class-ccf-form-manager.php:417
640
- #: ../classes/class-ccf-form-manager.php:507
641
- #: ../classes/class-ccf-form-manager.php:543
642
- #: ../classes/class-ccf-form-manager.php:613
643
- #: ../classes/class-ccf-form-manager.php:668
644
- #: ../classes/class-ccf-form-manager.php:763
645
  msgid "Initial Value:"
646
  msgstr ""
647
 
648
- #: ../classes/class-ccf-form-manager.php:295
649
- #: ../classes/class-ccf-form-manager.php:345
650
- #: ../classes/class-ccf-form-manager.php:421
651
- #: ../classes/class-ccf-form-manager.php:511
652
- #: ../classes/class-ccf-form-manager.php:576
653
- #: ../classes/class-ccf-form-manager.php:618
654
- #: ../classes/class-ccf-form-manager.php:679
655
- #: ../classes/class-ccf-form-manager.php:726
656
- #: ../classes/class-ccf-form-manager.php:768
657
- #: ../classes/class-ccf-form-manager.php:826
658
- #: ../classes/class-ccf-form-manager.php:869
659
- #: ../classes/class-ccf-form-manager.php:912
660
  msgid "Required:"
661
  msgstr ""
662
 
663
- #: ../classes/class-ccf-form-manager.php:304
664
- #: ../classes/class-ccf-form-manager.php:354
665
- #: ../classes/class-ccf-form-manager.php:390
666
- #: ../classes/class-ccf-form-manager.php:430
667
- #: ../classes/class-ccf-form-manager.php:455
668
- #: ../classes/class-ccf-form-manager.php:480
669
- #: ../classes/class-ccf-form-manager.php:520
670
- #: ../classes/class-ccf-form-manager.php:549
671
- #: ../classes/class-ccf-form-manager.php:585
672
- #: ../classes/class-ccf-form-manager.php:635
673
- #: ../classes/class-ccf-form-manager.php:688
674
- #: ../classes/class-ccf-form-manager.php:735
675
- #: ../classes/class-ccf-form-manager.php:784
676
- #: ../classes/class-ccf-form-manager.php:842
677
- #: ../classes/class-ccf-form-manager.php:885
678
- #: ../classes/class-ccf-form-manager.php:928
679
  msgid "Advanced"
680
  msgstr ""
681
 
682
- #: ../classes/class-ccf-form-manager.php:307
683
- #: ../classes/class-ccf-form-manager.php:357
684
- #: ../classes/class-ccf-form-manager.php:393
685
- #: ../classes/class-ccf-form-manager.php:433
686
- #: ../classes/class-ccf-form-manager.php:458
687
- #: ../classes/class-ccf-form-manager.php:483
688
- #: ../classes/class-ccf-form-manager.php:523
689
- #: ../classes/class-ccf-form-manager.php:552
690
- #: ../classes/class-ccf-form-manager.php:588
691
- #: ../classes/class-ccf-form-manager.php:638
692
- #: ../classes/class-ccf-form-manager.php:691
693
- #: ../classes/class-ccf-form-manager.php:738
694
- #: ../classes/class-ccf-form-manager.php:787
695
- #: ../classes/class-ccf-form-manager.php:845
696
- #: ../classes/class-ccf-form-manager.php:888
697
- #: ../classes/class-ccf-form-manager.php:931
698
  msgid "Class Name:"
699
  msgstr ""
700
 
701
- #: ../classes/class-ccf-form-manager.php:311
702
- #: ../classes/class-ccf-form-manager.php:437
703
- #: ../classes/class-ccf-form-manager.php:527
704
- #: ../classes/class-ccf-form-manager.php:643
705
- #: ../classes/class-ccf-form-manager.php:695
706
- #: ../classes/class-ccf-form-manager.php:792
707
  msgid "Placeholder Text:"
708
  msgstr ""
709
 
710
- #: ../classes/class-ccf-form-manager.php:335
711
  msgid "Allowed File Extensions (comma separate):"
712
  msgstr ""
713
 
714
- #: ../classes/class-ccf-form-manager.php:337
715
  msgid ""
716
  "If left blank, will default to all extensions registered by WordPress. If "
717
  "you use a file extension or mime type not <a href=\"http://codex.wordpress."
@@ -719,305 +684,301 @@ msgid ""
719
  "a>, you will need to filter and manually whitelist the new extension."
720
  msgstr ""
721
 
722
- #: ../classes/class-ccf-form-manager.php:340
723
  msgid "Max File Size (in MB):"
724
  msgstr ""
725
 
726
- #: ../classes/class-ccf-form-manager.php:342
727
  #, php-format
728
  msgid ""
729
  "If left blank, will default to %d MB. Maximum allowed by server is %d MB."
730
  msgstr ""
731
 
732
- #: ../classes/class-ccf-form-manager.php:368
733
  msgid ""
734
  "reCAPTCHA is a simple captcha service provided by Google. <a target=\"_blank"
735
  "\" href=\"https://www.google.com/recaptcha/intro/index.html\">Learn more</a>"
736
  msgstr ""
737
 
738
- #: ../classes/class-ccf-form-manager.php:378
739
  msgid "Site Key:"
740
  msgstr ""
741
 
742
- #: ../classes/class-ccf-form-manager.php:380
743
- #: ../classes/class-ccf-form-manager.php:385
744
  msgid "Don't have one?"
745
  msgstr ""
746
 
747
- #: ../classes/class-ccf-form-manager.php:383
748
  msgid "Secret Key:"
749
  msgstr ""
750
 
751
- #: ../classes/class-ccf-form-manager.php:446
752
- #: ../classes/class-ccf-form-manager.php:467
753
- #: ../classes/class-ccf-form-manager.php:492
754
- #: ../classes/class-ccf-form-manager.php:536
755
- #: ../classes/class-ccf-form-manager.php:561
756
- #: ../classes/class-ccf-form-manager.php:597
757
- #: ../classes/class-ccf-form-manager.php:653
758
- #: ../classes/class-ccf-form-manager.php:704
759
- #: ../classes/class-ccf-form-manager.php:747
760
- #: ../classes/class-ccf-form-manager.php:811
761
- #: ../classes/class-ccf-form-manager.php:854
762
- #: ../classes/class-ccf-form-manager.php:897
763
  msgid "Basic"
764
  msgstr ""
765
 
766
- #: ../classes/class-ccf-form-manager.php:449
767
  msgid "HTML Content:"
768
  msgstr ""
769
 
770
- #: ../classes/class-ccf-form-manager.php:470
771
  msgid "Heading:"
772
  msgstr ""
773
 
774
- #: ../classes/class-ccf-form-manager.php:474
775
  msgid "Sub Heading:"
776
  msgstr ""
777
 
778
- #: ../classes/class-ccf-form-manager.php:539
779
- #: ../classes/class-ccf-form-manager.php:564
780
- #: ../classes/class-ccf-form-manager.php:600
781
- #: ../classes/class-ccf-form-manager.php:656
782
- #: ../classes/class-ccf-form-manager.php:707
783
- #: ../classes/class-ccf-form-manager.php:750
784
- #: ../classes/class-ccf-form-manager.php:814
785
- #: ../classes/class-ccf-form-manager.php:857
786
- #: ../classes/class-ccf-form-manager.php:900
787
  msgid "Internal Unique Slug (a-z, 0-9, -, _):"
788
  msgstr ""
789
 
790
- #: ../classes/class-ccf-form-manager.php:626
791
  msgid "Enable Date Select"
792
  msgstr ""
793
 
794
- #: ../classes/class-ccf-form-manager.php:630
795
  msgid "Enable Time Select"
796
  msgstr ""
797
 
798
- #: ../classes/class-ccf-form-manager.php:672
799
  msgid "Format:"
800
  msgstr ""
801
 
802
- #: ../classes/class-ccf-form-manager.php:675
803
- #: ../classes/class-ccf-form-manager.php:722
804
  msgid "International"
805
  msgstr ""
806
 
807
- #: ../classes/class-ccf-form-manager.php:719
808
  msgid "Type:"
809
  msgstr ""
810
 
811
- #: ../classes/class-ccf-form-manager.php:721
812
  msgid "United States"
813
  msgstr ""
814
 
815
- #: ../classes/class-ccf-form-manager.php:775
816
  msgid "Require Confirmation:"
817
  msgstr ""
818
 
819
- #: ../classes/class-ccf-form-manager.php:803
820
  msgid "Label"
821
  msgstr ""
822
 
823
- #: ../classes/class-ccf-form-manager.php:804
824
  msgid "Value"
825
  msgstr ""
826
 
827
- #: ../classes/class-ccf-form-manager.php:833
828
- #: ../classes/class-ccf-form-manager.php:876
829
- #: ../classes/class-ccf-form-manager.php:919
830
  msgid "Manage field choices:"
831
  msgstr ""
832
 
833
- #: ../classes/class-ccf-form-manager.php:837
834
- #: ../classes/class-ccf-form-manager.php:880
835
- #: ../classes/class-ccf-form-manager.php:923
836
  msgid ""
837
  "Note: If an option does not have a \"value\", it will not be considered a "
838
  "valid selection if the field is required. The \"value\" is what's read, "
839
  "stored, and displayed in the submission."
840
  msgstr ""
841
 
842
- #: ../classes/class-ccf-form-manager.php:940
843
  msgid "You currently have no forms. Add some!"
844
  msgstr ""
845
 
846
- #: ../classes/class-ccf-form-manager.php:963
847
  msgid "Allowed file extensions are {{ extensions }}. "
848
  msgstr ""
849
 
850
- #: ../classes/class-ccf-form-manager.php:965
851
  msgid "Max file size is {{ file_size }} MB. "
852
  msgstr ""
853
 
854
- #: ../classes/class-ccf-form-manager.php:990
855
- #: ../classes/class-ccf-form-manager.php:1006
856
- #: ../classes/class-ccf-form-manager.php:1024
857
  msgid "An example choice"
858
  msgstr ""
859
 
860
- #: ../classes/class-ccf-form-manager.php:1042
861
  msgid "Arbitrary block of HTML."
862
  msgstr ""
863
 
864
- #: ../classes/class-ccf-form-manager.php:1048
865
  msgid "Section Heading"
866
  msgstr ""
867
 
868
- #: ../classes/class-ccf-form-manager.php:1050
869
  msgid "This is the sub-heading text."
870
  msgstr ""
871
 
872
- #: ../classes/class-ccf-form-manager.php:1057
873
  msgid "First"
874
  msgstr ""
875
 
876
- #: ../classes/class-ccf-form-manager.php:1061
877
  msgid "Last"
878
  msgstr ""
879
 
880
- #: ../classes/class-ccf-form-manager.php:1121
881
- #: ../classes/class-ccf-form-manager.php:1146
882
  msgid "Street Address"
883
  msgstr ""
884
 
885
- #: ../classes/class-ccf-form-manager.php:1125
886
- #: ../classes/class-ccf-form-manager.php:1150
887
  msgid "Address Line 2"
888
  msgstr ""
889
 
890
- #: ../classes/class-ccf-form-manager.php:1129
891
- #: ../classes/class-ccf-form-manager.php:1154
892
  msgid "City"
893
  msgstr ""
894
 
895
- #: ../classes/class-ccf-form-manager.php:1137
896
  msgid "State"
897
  msgstr ""
898
 
899
- #: ../classes/class-ccf-form-manager.php:1141
900
  msgid "ZIP Code"
901
  msgstr ""
902
 
903
- #: ../classes/class-ccf-form-manager.php:1158
904
  msgid "State / Region / Province"
905
  msgstr ""
906
 
907
- #: ../classes/class-ccf-form-manager.php:1162
908
  msgid "ZIP / Postal Code"
909
  msgstr ""
910
 
911
- #: ../classes/class-ccf-form-manager.php:1170
912
  msgid "Country"
913
  msgstr ""
914
 
915
- #: ../classes/class-ccf-form-manager.php:1181
916
  msgid "email@example.com"
917
  msgstr ""
918
 
919
- #: ../classes/class-ccf-form-manager.php:1185
920
- #: ../classes/class-ccf-form-manager.php:1486
921
  msgid "Email"
922
  msgstr ""
923
 
924
- #: ../classes/class-ccf-form-manager.php:1189
925
  msgid "Confirm Email"
926
  msgstr ""
927
 
928
- #: ../classes/class-ccf-form-manager.php:1219
929
  msgid "Edit"
930
  msgstr ""
931
 
932
- #: ../classes/class-ccf-form-manager.php:1221
933
  msgid "Trash"
934
  msgstr ""
935
 
936
- #: ../classes/class-ccf-form-manager.php:1264
937
  msgid "There is a problem with this form. Is it trashed or deleted?"
938
  msgstr ""
939
 
940
- #: ../classes/class-ccf-form-manager.php:1406
941
- msgid "IP Address"
942
- msgstr ""
943
-
944
- #: ../classes/class-ccf-form-manager.php:1418
945
  msgid "There are no submissions."
946
  msgstr ""
947
 
948
- #: ../classes/class-ccf-form-manager.php:1447
949
  msgid "Add Form"
950
  msgstr ""
951
 
952
- #: ../classes/class-ccf-form-manager.php:1471
953
  msgid "Single Line Text"
954
  msgstr ""
955
 
956
- #: ../classes/class-ccf-form-manager.php:1472
957
  msgid "Dropdown"
958
  msgstr ""
959
 
960
- #: ../classes/class-ccf-form-manager.php:1473
961
  msgid "Checkboxes"
962
  msgstr ""
963
 
964
- #: ../classes/class-ccf-form-manager.php:1474
965
  msgid "Radio Buttons"
966
  msgstr ""
967
 
968
- #: ../classes/class-ccf-form-manager.php:1475
969
  msgid "Paragraph Text"
970
  msgstr ""
971
 
972
- #: ../classes/class-ccf-form-manager.php:1476
973
  msgid "Hidden"
974
  msgstr ""
975
 
976
- #: ../classes/class-ccf-form-manager.php:1477
977
  msgid "File Upload"
978
  msgstr ""
979
 
980
- #: ../classes/class-ccf-form-manager.php:1481
981
  msgid "HTML"
982
  msgstr ""
983
 
984
- #: ../classes/class-ccf-form-manager.php:1482
985
  msgid "Section Header"
986
  msgstr ""
987
 
988
- #: ../classes/class-ccf-form-manager.php:1487
989
  msgid "Name"
990
  msgstr ""
991
 
992
- #: ../classes/class-ccf-form-manager.php:1488
993
  msgid "Date/Time"
994
  msgstr ""
995
 
996
- #: ../classes/class-ccf-form-manager.php:1489
997
  msgid "Website"
998
  msgstr ""
999
 
1000
- #: ../classes/class-ccf-form-manager.php:1490
1001
  msgid "Address"
1002
  msgstr ""
1003
 
1004
- #: ../classes/class-ccf-form-manager.php:1491
1005
  msgid "Phone"
1006
  msgstr ""
1007
 
1008
- #: ../classes/class-ccf-form-manager.php:1492
1009
  msgid "reCAPTCHA"
1010
  msgstr ""
1011
 
1012
- #: ../classes/class-ccf-form-manager.php:1510
1013
  msgid "You have no email fields"
1014
  msgstr ""
1015
 
1016
- #: ../classes/class-ccf-form-manager.php:1511
1017
  msgid "Invalid date"
1018
  msgstr ""
1019
 
1020
- #: ../classes/class-ccf-form-manager.php:1513
1021
  msgid "Form Submission"
1022
  msgstr ""
1023
 
@@ -1106,6 +1067,35 @@ msgstr ""
1106
  msgid "Deleted comment"
1107
  msgstr ""
1108
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1109
  #: ../vendor/wp-api/wp-api/lib/class-wp-json-customposttype.php:33
1110
  #: ../vendor/wp-api/wp-api/lib/class-wp-json-meta.php:29
1111
  msgid "The route base must be overridden"
@@ -1247,6 +1237,11 @@ msgstr ""
1247
  msgid "Sorry, you cannot view the revisions for this post."
1248
  msgstr ""
1249
 
 
 
 
 
 
1250
  #: ../vendor/wp-api/wp-api/lib/class-wp-json-posts.php:337
1251
  msgid "There is a revision of this post that is more recent."
1252
  msgstr ""
@@ -1325,19 +1320,19 @@ msgstr ""
1325
  msgid "The JSONP callback function is invalid."
1326
  msgstr ""
1327
 
1328
- #: ../vendor/wp-api/wp-api/lib/class-wp-json-server.php:374
1329
  msgid "Unsupported request method"
1330
  msgstr ""
1331
 
1332
- #: ../vendor/wp-api/wp-api/lib/class-wp-json-server.php:393
1333
  msgid "The handler for the route is invalid"
1334
  msgstr ""
1335
 
1336
- #: ../vendor/wp-api/wp-api/lib/class-wp-json-server.php:453
1337
  msgid "No route was found matching the URL and request method"
1338
  msgstr ""
1339
 
1340
- #: ../vendor/wp-api/wp-api/lib/class-wp-json-server.php:505
1341
  #: ../vendor/wp-api/wp-api/lib/class-wp-json-users.php:252
1342
  #, php-format
1343
  msgid "Missing parameter %s"
5
  "Project-Id-Version: Custom Contact Forms\n"
6
  "Report-Msgid-Bugs-To: https://github.com/tlovett1/editorial-access-manager/"
7
  "issues\n"
8
+ "POT-Creation-Date: 2015-02-24 00:27-0500\n"
9
+ "PO-Revision-Date: 2015-02-24 00:27-0500\n"
10
  "Last-Translator: Taylor Lovett <tlovett88@gmail.com>\n"
11
  "Language-Team: LANGUAGE <LL@li.org>\n"
12
  "Language: en\n"
23
  "X-Textdomain-Support: yes\n"
24
  "X-Poedit-SearchPath-0: ..\n"
25
 
26
+ #: ../classes/class-ccf-api.php:268 ../classes/class-ccf-api.php:563
27
+ #: ../classes/class-ccf-api.php:588 ../classes/class-ccf-api.php:617
28
+ #: ../classes/class-ccf-api.php:710
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
  msgid "Invalid form ID."
30
  msgstr ""
31
 
32
+ #: ../classes/class-ccf-api.php:273 ../classes/class-ccf-api.php:548
33
+ #: ../classes/class-ccf-api.php:568
34
  msgid "Sorry, you cannot view forms."
35
  msgstr ""
36
 
37
+ #: ../classes/class-ccf-api.php:594 ../classes/class-ccf-api.php:623
38
  msgid "Invalid form."
39
  msgstr ""
40
 
41
+ #: ../classes/class-ccf-api.php:598
42
  msgid "Sorry, you cannot view this form."
43
  msgstr ""
44
 
45
+ #: ../classes/class-ccf-api.php:721
46
  msgid "The form cannot be deleted."
47
  msgstr ""
48
 
49
+ #: ../classes/class-ccf-api.php:725
50
  msgid "Permanently deleted form"
51
  msgstr ""
52
 
53
+ #: ../classes/class-ccf-api.php:728
54
  #: ../vendor/wp-api/wp-api/lib/class-wp-json-posts.php:381
55
  msgid "Deleted post"
56
  msgstr ""
79
 
80
  #: ../classes/class-ccf-field-renderer.php:955
81
  #: ../classes/class-ccf-field-renderer.php:976
82
+ #: ../classes/class-ccf-form-manager.php:1078
83
+ #: ../classes/class-ccf-form-manager.php:1099
84
  msgid "HH"
85
  msgstr ""
86
 
87
  #: ../classes/class-ccf-field-renderer.php:959
88
  #: ../classes/class-ccf-field-renderer.php:980
89
+ #: ../classes/class-ccf-form-manager.php:1082
90
+ #: ../classes/class-ccf-form-manager.php:1103
91
  msgid "MM"
92
  msgstr ""
93
 
94
  #: ../classes/class-ccf-field-renderer.php:963
95
  #: ../classes/class-ccf-field-renderer.php:984
96
+ #: ../classes/class-ccf-form-manager.php:1086
97
+ #: ../classes/class-ccf-form-manager.php:1107
98
  msgid "AM"
99
  msgstr ""
100
 
101
  #: ../classes/class-ccf-field-renderer.php:964
102
  #: ../classes/class-ccf-field-renderer.php:985
103
+ #: ../classes/class-ccf-form-manager.php:1087
104
+ #: ../classes/class-ccf-form-manager.php:1108
105
  msgid "PM"
106
  msgstr ""
107
 
108
  #: ../classes/class-ccf-field-renderer.php:971
109
  #: ../classes/class-ccf-form-cpt.php:306
110
+ #: ../classes/class-ccf-form-manager.php:246
111
+ #: ../classes/class-ccf-form-manager.php:259
112
+ #: ../classes/class-ccf-form-manager.php:1094
113
+ #: ../classes/class-ccf-form-manager.php:1277
114
+ #: ../classes/class-ccf-form-manager.php:1291
115
+ #: ../classes/class-ccf-form-manager.php:1423
116
  msgid "Date"
117
  msgstr ""
118
 
122
 
123
  #: ../classes/class-ccf-form-cpt.php:123 ../classes/class-ccf-form-cpt.php:141
124
  #: ../classes/class-ccf-form-cpt.php:304
125
+ #: ../classes/class-ccf-form-manager.php:249
126
+ #: ../classes/class-ccf-form-manager.php:262
127
  msgid "Submissions"
128
  msgstr ""
129
 
160
  msgstr ""
161
 
162
  #: ../classes/class-ccf-form-cpt.php:247
163
+ #: ../classes/class-ccf-form-manager.php:1219
164
  msgid "(No title)"
165
  msgstr ""
166
 
173
  msgstr ""
174
 
175
  #: ../classes/class-ccf-form-cpt.php:303
176
+ #: ../classes/class-ccf-form-manager.php:247
177
+ #: ../classes/class-ccf-form-manager.php:260
178
  msgid "Author"
179
  msgstr ""
180
 
181
  #: ../classes/class-ccf-form-cpt.php:305
182
+ #: ../classes/class-ccf-form-manager.php:248
183
+ #: ../classes/class-ccf-form-manager.php:261
184
  msgid "Number of Fields"
185
  msgstr ""
186
 
210
  msgstr ""
211
 
212
  #: ../classes/class-ccf-form-cpt.php:368 ../classes/class-ccf-form-cpt.php:371
213
+ #: ../classes/class-ccf-form-manager.php:83
214
  msgid "New Form"
215
  msgstr ""
216
 
361
  msgid "AM/PM is required."
362
  msgstr ""
363
 
364
+ #: ../classes/class-ccf-form-handler.php:697
365
  msgid "*Hidden Field*"
366
  msgstr ""
367
 
368
+ #: ../classes/class-ccf-form-handler.php:771
369
  msgid "Form submitted from"
370
  msgstr ""
371
 
372
+ #: ../classes/class-ccf-form-handler.php:805
 
 
 
 
373
  #, php-format
374
  msgid "%s: Form Submission to \"%s\""
375
  msgstr ""
376
 
377
+ #: ../classes/class-ccf-form-handler.php:818
378
  #: ../classes/class-ccf-form-renderer.php:119
379
  msgid "Thank you for your submission."
380
  msgstr ""
392
  "href=\"%s\">support forums</a> or <a href=\"%s\">Github</a>."
393
  msgstr ""
394
 
395
+ #: ../classes/class-ccf-form-manager.php:69
396
+ msgid ""
397
+ "Your web server does not support either PUT, PATCH, or DELETE HTTP methods. "
398
+ "Please contact your host to resolve the issue."
399
+ msgstr ""
400
+
401
+ #: ../classes/class-ccf-form-manager.php:80
402
  msgid "Manage Forms"
403
  msgstr ""
404
 
405
+ #: ../classes/class-ccf-form-manager.php:84
406
  msgid "Existing Forms"
407
  msgstr ""
408
 
409
+ #: ../classes/class-ccf-form-manager.php:108
410
  msgid "Standard Fields"
411
  msgstr ""
412
 
413
+ #: ../classes/class-ccf-form-manager.php:114
414
  msgid "Special Fields"
415
  msgstr ""
416
 
417
+ #: ../classes/class-ccf-form-manager.php:120
418
  msgid "Structure"
419
  msgstr ""
420
 
421
+ #: ../classes/class-ccf-form-manager.php:131
422
  msgid "&rarr; Drag fields here to add them"
423
  msgstr ""
424
 
425
+ #: ../classes/class-ccf-form-manager.php:138
426
+ #: ../classes/class-ccf-form-manager.php:1222
427
  msgid "Insert into post"
428
  msgstr ""
429
 
430
+ #: ../classes/class-ccf-form-manager.php:139
431
  msgid "Save Form"
432
  msgstr ""
433
 
434
+ #: ../classes/class-ccf-form-manager.php:145
435
  msgid "Form Settings"
436
  msgstr ""
437
 
438
+ #: ../classes/class-ccf-form-manager.php:148
439
  msgid "Form Title:"
440
  msgstr ""
441
 
442
+ #: ../classes/class-ccf-form-manager.php:153
443
  msgid "Form Description:"
444
  msgstr ""
445
 
446
+ #: ../classes/class-ccf-form-manager.php:158
447
  msgid "Button Text:"
448
  msgstr ""
449
 
450
+ #: ../classes/class-ccf-form-manager.php:163
451
  msgid "On form completion:"
452
  msgstr ""
453
 
454
+ #: ../classes/class-ccf-form-manager.php:166
455
  msgid "Show text"
456
  msgstr ""
457
 
458
+ #: ../classes/class-ccf-form-manager.php:167
459
  msgid "Redirect"
460
  msgstr ""
461
 
462
+ #: ../classes/class-ccf-form-manager.php:171
463
  msgid "Redirect URL:"
464
  msgstr ""
465
 
466
+ #: ../classes/class-ccf-form-manager.php:175
467
  msgid "Completion Message:"
468
  msgstr ""
469
 
470
+ #: ../classes/class-ccf-form-manager.php:182
471
  msgid "Form Notifications"
472
  msgstr ""
473
 
474
+ #: ../classes/class-ccf-form-manager.php:185
475
  msgid "Send Email Notifications:"
476
  msgstr ""
477
 
478
+ #: ../classes/class-ccf-form-manager.php:188
479
+ #: ../classes/class-ccf-form-manager.php:299
480
+ #: ../classes/class-ccf-form-manager.php:349
481
+ #: ../classes/class-ccf-form-manager.php:425
482
+ #: ../classes/class-ccf-form-manager.php:515
483
+ #: ../classes/class-ccf-form-manager.php:580
484
+ #: ../classes/class-ccf-form-manager.php:622
485
+ #: ../classes/class-ccf-form-manager.php:683
486
+ #: ../classes/class-ccf-form-manager.php:730
487
+ #: ../classes/class-ccf-form-manager.php:772
488
+ #: ../classes/class-ccf-form-manager.php:779
489
+ #: ../classes/class-ccf-form-manager.php:830
490
+ #: ../classes/class-ccf-form-manager.php:873
491
+ #: ../classes/class-ccf-form-manager.php:916
492
  msgid "Yes"
493
  msgstr ""
494
 
495
+ #: ../classes/class-ccf-form-manager.php:189
496
+ #: ../classes/class-ccf-form-manager.php:300
497
+ #: ../classes/class-ccf-form-manager.php:350
498
+ #: ../classes/class-ccf-form-manager.php:426
499
+ #: ../classes/class-ccf-form-manager.php:516
500
+ #: ../classes/class-ccf-form-manager.php:581
501
+ #: ../classes/class-ccf-form-manager.php:623
502
+ #: ../classes/class-ccf-form-manager.php:684
503
+ #: ../classes/class-ccf-form-manager.php:731
504
+ #: ../classes/class-ccf-form-manager.php:773
505
+ #: ../classes/class-ccf-form-manager.php:780
506
+ #: ../classes/class-ccf-form-manager.php:831
507
+ #: ../classes/class-ccf-form-manager.php:874
508
+ #: ../classes/class-ccf-form-manager.php:917
509
  msgid "No"
510
  msgstr ""
511
 
512
+ #: ../classes/class-ccf-form-manager.php:194
513
  msgid "\"To\" Email Addresses (comma separated):"
514
  msgstr ""
515
 
516
+ #: ../classes/class-ccf-form-manager.php:199
517
  msgid "\"From\" Email Address Type:"
518
  msgstr ""
519
 
520
+ #: ../classes/class-ccf-form-manager.php:201
521
  msgid "WordPress Default"
522
  msgstr ""
523
 
524
+ #: ../classes/class-ccf-form-manager.php:202
525
  msgid "Custom Email"
526
  msgstr ""
527
 
528
+ #: ../classes/class-ccf-form-manager.php:203
529
  msgid "Form Field"
530
  msgstr ""
531
 
532
+ #: ../classes/class-ccf-form-manager.php:206
533
  msgid ""
534
  "You can set the notification emails from address to be the WP default, a "
535
  "custom email address, or pull the address from a field in the form."
536
  msgstr ""
537
 
538
+ #: ../classes/class-ccf-form-manager.php:210
539
  msgid "Custom \"From\" Email Address:"
540
  msgstr ""
541
 
542
+ #: ../classes/class-ccf-form-manager.php:215
543
  msgid "Pull \"From\" Email Dynamically from Field:"
544
  msgstr ""
545
 
546
+ #: ../classes/class-ccf-form-manager.php:229
547
  msgid "items"
548
  msgstr ""
549
 
550
+ #: ../classes/class-ccf-form-manager.php:244
551
+ #: ../classes/class-ccf-form-manager.php:257
552
  msgid "ID"
553
  msgstr ""
554
 
555
+ #: ../classes/class-ccf-form-manager.php:245
556
+ #: ../classes/class-ccf-form-manager.php:258
557
  msgid "Title"
558
  msgstr ""
559
 
560
+ #: ../classes/class-ccf-form-manager.php:272
561
  msgid "<span>&larr;</span> Click on a field to edit it."
562
  msgstr ""
563
 
564
+ #: ../classes/class-ccf-form-manager.php:281
565
+ #: ../classes/class-ccf-form-manager.php:325
566
+ #: ../classes/class-ccf-form-manager.php:407
567
+ #: ../classes/class-ccf-form-manager.php:497
568
  msgid "Internal Unique Slug"
569
  msgstr ""
570
 
571
+ #: ../classes/class-ccf-form-manager.php:285
572
+ #: ../classes/class-ccf-form-manager.php:329
573
+ #: ../classes/class-ccf-form-manager.php:372
574
+ #: ../classes/class-ccf-form-manager.php:411
575
+ #: ../classes/class-ccf-form-manager.php:501
576
+ #: ../classes/class-ccf-form-manager.php:570
577
+ #: ../classes/class-ccf-form-manager.php:606
578
+ #: ../classes/class-ccf-form-manager.php:662
579
+ #: ../classes/class-ccf-form-manager.php:713
580
+ #: ../classes/class-ccf-form-manager.php:756
581
+ #: ../classes/class-ccf-form-manager.php:820
582
+ #: ../classes/class-ccf-form-manager.php:863
583
+ #: ../classes/class-ccf-form-manager.php:906
584
  msgid "Label:"
585
  msgstr ""
586
 
587
+ #: ../classes/class-ccf-form-manager.php:289
588
+ #: ../classes/class-ccf-form-manager.php:333
589
+ #: ../classes/class-ccf-form-manager.php:376
590
+ #: ../classes/class-ccf-form-manager.php:415
591
+ #: ../classes/class-ccf-form-manager.php:505
592
+ #: ../classes/class-ccf-form-manager.php:574
593
+ #: ../classes/class-ccf-form-manager.php:610
594
+ #: ../classes/class-ccf-form-manager.php:666
595
+ #: ../classes/class-ccf-form-manager.php:717
596
+ #: ../classes/class-ccf-form-manager.php:760
597
+ #: ../classes/class-ccf-form-manager.php:824
598
+ #: ../classes/class-ccf-form-manager.php:867
599
+ #: ../classes/class-ccf-form-manager.php:910
600
  msgid "Description:"
601
  msgstr ""
602
 
603
+ #: ../classes/class-ccf-form-manager.php:293
604
+ #: ../classes/class-ccf-form-manager.php:419
605
+ #: ../classes/class-ccf-form-manager.php:509
606
+ #: ../classes/class-ccf-form-manager.php:545
607
+ #: ../classes/class-ccf-form-manager.php:615
608
+ #: ../classes/class-ccf-form-manager.php:670
609
+ #: ../classes/class-ccf-form-manager.php:765
610
  msgid "Initial Value:"
611
  msgstr ""
612
 
613
+ #: ../classes/class-ccf-form-manager.php:297
614
+ #: ../classes/class-ccf-form-manager.php:347
615
+ #: ../classes/class-ccf-form-manager.php:423
616
+ #: ../classes/class-ccf-form-manager.php:513
617
+ #: ../classes/class-ccf-form-manager.php:578
618
+ #: ../classes/class-ccf-form-manager.php:620
619
+ #: ../classes/class-ccf-form-manager.php:681
620
+ #: ../classes/class-ccf-form-manager.php:728
621
+ #: ../classes/class-ccf-form-manager.php:770
622
+ #: ../classes/class-ccf-form-manager.php:828
623
+ #: ../classes/class-ccf-form-manager.php:871
624
+ #: ../classes/class-ccf-form-manager.php:914
625
  msgid "Required:"
626
  msgstr ""
627
 
628
+ #: ../classes/class-ccf-form-manager.php:306
629
+ #: ../classes/class-ccf-form-manager.php:356
630
+ #: ../classes/class-ccf-form-manager.php:392
631
+ #: ../classes/class-ccf-form-manager.php:432
632
+ #: ../classes/class-ccf-form-manager.php:457
633
+ #: ../classes/class-ccf-form-manager.php:482
634
+ #: ../classes/class-ccf-form-manager.php:522
635
+ #: ../classes/class-ccf-form-manager.php:551
636
+ #: ../classes/class-ccf-form-manager.php:587
637
+ #: ../classes/class-ccf-form-manager.php:637
638
+ #: ../classes/class-ccf-form-manager.php:690
639
+ #: ../classes/class-ccf-form-manager.php:737
640
+ #: ../classes/class-ccf-form-manager.php:786
641
+ #: ../classes/class-ccf-form-manager.php:844
642
+ #: ../classes/class-ccf-form-manager.php:887
643
+ #: ../classes/class-ccf-form-manager.php:930
644
  msgid "Advanced"
645
  msgstr ""
646
 
647
+ #: ../classes/class-ccf-form-manager.php:309
648
+ #: ../classes/class-ccf-form-manager.php:359
649
+ #: ../classes/class-ccf-form-manager.php:395
650
+ #: ../classes/class-ccf-form-manager.php:435
651
+ #: ../classes/class-ccf-form-manager.php:460
652
+ #: ../classes/class-ccf-form-manager.php:485
653
+ #: ../classes/class-ccf-form-manager.php:525
654
+ #: ../classes/class-ccf-form-manager.php:554
655
+ #: ../classes/class-ccf-form-manager.php:590
656
+ #: ../classes/class-ccf-form-manager.php:640
657
+ #: ../classes/class-ccf-form-manager.php:693
658
+ #: ../classes/class-ccf-form-manager.php:740
659
+ #: ../classes/class-ccf-form-manager.php:789
660
+ #: ../classes/class-ccf-form-manager.php:847
661
+ #: ../classes/class-ccf-form-manager.php:890
662
+ #: ../classes/class-ccf-form-manager.php:933
663
  msgid "Class Name:"
664
  msgstr ""
665
 
666
+ #: ../classes/class-ccf-form-manager.php:313
667
+ #: ../classes/class-ccf-form-manager.php:439
668
+ #: ../classes/class-ccf-form-manager.php:529
669
+ #: ../classes/class-ccf-form-manager.php:645
670
+ #: ../classes/class-ccf-form-manager.php:697
671
+ #: ../classes/class-ccf-form-manager.php:794
672
  msgid "Placeholder Text:"
673
  msgstr ""
674
 
675
+ #: ../classes/class-ccf-form-manager.php:337
676
  msgid "Allowed File Extensions (comma separate):"
677
  msgstr ""
678
 
679
+ #: ../classes/class-ccf-form-manager.php:339
680
  msgid ""
681
  "If left blank, will default to all extensions registered by WordPress. If "
682
  "you use a file extension or mime type not <a href=\"http://codex.wordpress."
684
  "a>, you will need to filter and manually whitelist the new extension."
685
  msgstr ""
686
 
687
+ #: ../classes/class-ccf-form-manager.php:342
688
  msgid "Max File Size (in MB):"
689
  msgstr ""
690
 
691
+ #: ../classes/class-ccf-form-manager.php:344
692
  #, php-format
693
  msgid ""
694
  "If left blank, will default to %d MB. Maximum allowed by server is %d MB."
695
  msgstr ""
696
 
697
+ #: ../classes/class-ccf-form-manager.php:370
698
  msgid ""
699
  "reCAPTCHA is a simple captcha service provided by Google. <a target=\"_blank"
700
  "\" href=\"https://www.google.com/recaptcha/intro/index.html\">Learn more</a>"
701
  msgstr ""
702
 
703
+ #: ../classes/class-ccf-form-manager.php:380
704
  msgid "Site Key:"
705
  msgstr ""
706
 
707
+ #: ../classes/class-ccf-form-manager.php:382
708
+ #: ../classes/class-ccf-form-manager.php:387
709
  msgid "Don't have one?"
710
  msgstr ""
711
 
712
+ #: ../classes/class-ccf-form-manager.php:385
713
  msgid "Secret Key:"
714
  msgstr ""
715
 
716
+ #: ../classes/class-ccf-form-manager.php:448
717
+ #: ../classes/class-ccf-form-manager.php:469
718
+ #: ../classes/class-ccf-form-manager.php:494
719
+ #: ../classes/class-ccf-form-manager.php:538
720
+ #: ../classes/class-ccf-form-manager.php:563
721
+ #: ../classes/class-ccf-form-manager.php:599
722
+ #: ../classes/class-ccf-form-manager.php:655
723
+ #: ../classes/class-ccf-form-manager.php:706
724
+ #: ../classes/class-ccf-form-manager.php:749
725
+ #: ../classes/class-ccf-form-manager.php:813
726
+ #: ../classes/class-ccf-form-manager.php:856
727
+ #: ../classes/class-ccf-form-manager.php:899
728
  msgid "Basic"
729
  msgstr ""
730
 
731
+ #: ../classes/class-ccf-form-manager.php:451
732
  msgid "HTML Content:"
733
  msgstr ""
734
 
735
+ #: ../classes/class-ccf-form-manager.php:472
736
  msgid "Heading:"
737
  msgstr ""
738
 
739
+ #: ../classes/class-ccf-form-manager.php:476
740
  msgid "Sub Heading:"
741
  msgstr ""
742
 
743
+ #: ../classes/class-ccf-form-manager.php:541
744
+ #: ../classes/class-ccf-form-manager.php:566
745
+ #: ../classes/class-ccf-form-manager.php:602
746
+ #: ../classes/class-ccf-form-manager.php:658
747
+ #: ../classes/class-ccf-form-manager.php:709
748
+ #: ../classes/class-ccf-form-manager.php:752
749
+ #: ../classes/class-ccf-form-manager.php:816
750
+ #: ../classes/class-ccf-form-manager.php:859
751
+ #: ../classes/class-ccf-form-manager.php:902
752
  msgid "Internal Unique Slug (a-z, 0-9, -, _):"
753
  msgstr ""
754
 
755
+ #: ../classes/class-ccf-form-manager.php:628
756
  msgid "Enable Date Select"
757
  msgstr ""
758
 
759
+ #: ../classes/class-ccf-form-manager.php:632
760
  msgid "Enable Time Select"
761
  msgstr ""
762
 
763
+ #: ../classes/class-ccf-form-manager.php:674
764
  msgid "Format:"
765
  msgstr ""
766
 
767
+ #: ../classes/class-ccf-form-manager.php:677
768
+ #: ../classes/class-ccf-form-manager.php:724
769
  msgid "International"
770
  msgstr ""
771
 
772
+ #: ../classes/class-ccf-form-manager.php:721
773
  msgid "Type:"
774
  msgstr ""
775
 
776
+ #: ../classes/class-ccf-form-manager.php:723
777
  msgid "United States"
778
  msgstr ""
779
 
780
+ #: ../classes/class-ccf-form-manager.php:777
781
  msgid "Require Confirmation:"
782
  msgstr ""
783
 
784
+ #: ../classes/class-ccf-form-manager.php:805
785
  msgid "Label"
786
  msgstr ""
787
 
788
+ #: ../classes/class-ccf-form-manager.php:806
789
  msgid "Value"
790
  msgstr ""
791
 
792
+ #: ../classes/class-ccf-form-manager.php:835
793
+ #: ../classes/class-ccf-form-manager.php:878
794
+ #: ../classes/class-ccf-form-manager.php:921
795
  msgid "Manage field choices:"
796
  msgstr ""
797
 
798
+ #: ../classes/class-ccf-form-manager.php:839
799
+ #: ../classes/class-ccf-form-manager.php:882
800
+ #: ../classes/class-ccf-form-manager.php:925
801
  msgid ""
802
  "Note: If an option does not have a \"value\", it will not be considered a "
803
  "valid selection if the field is required. The \"value\" is what's read, "
804
  "stored, and displayed in the submission."
805
  msgstr ""
806
 
807
+ #: ../classes/class-ccf-form-manager.php:942
808
  msgid "You currently have no forms. Add some!"
809
  msgstr ""
810
 
811
+ #: ../classes/class-ccf-form-manager.php:965
812
  msgid "Allowed file extensions are {{ extensions }}. "
813
  msgstr ""
814
 
815
+ #: ../classes/class-ccf-form-manager.php:967
816
  msgid "Max file size is {{ file_size }} MB. "
817
  msgstr ""
818
 
819
+ #: ../classes/class-ccf-form-manager.php:992
820
+ #: ../classes/class-ccf-form-manager.php:1008
821
+ #: ../classes/class-ccf-form-manager.php:1026
822
  msgid "An example choice"
823
  msgstr ""
824
 
825
+ #: ../classes/class-ccf-form-manager.php:1044
826
  msgid "Arbitrary block of HTML."
827
  msgstr ""
828
 
829
+ #: ../classes/class-ccf-form-manager.php:1050
830
  msgid "Section Heading"
831
  msgstr ""
832
 
833
+ #: ../classes/class-ccf-form-manager.php:1052
834
  msgid "This is the sub-heading text."
835
  msgstr ""
836
 
837
+ #: ../classes/class-ccf-form-manager.php:1059
838
  msgid "First"
839
  msgstr ""
840
 
841
+ #: ../classes/class-ccf-form-manager.php:1063
842
  msgid "Last"
843
  msgstr ""
844
 
845
+ #: ../classes/class-ccf-form-manager.php:1123
846
+ #: ../classes/class-ccf-form-manager.php:1148
847
  msgid "Street Address"
848
  msgstr ""
849
 
850
+ #: ../classes/class-ccf-form-manager.php:1127
851
+ #: ../classes/class-ccf-form-manager.php:1152
852
  msgid "Address Line 2"
853
  msgstr ""
854
 
855
+ #: ../classes/class-ccf-form-manager.php:1131
856
+ #: ../classes/class-ccf-form-manager.php:1156
857
  msgid "City"
858
  msgstr ""
859
 
860
+ #: ../classes/class-ccf-form-manager.php:1139
861
  msgid "State"
862
  msgstr ""
863
 
864
+ #: ../classes/class-ccf-form-manager.php:1143
865
  msgid "ZIP Code"
866
  msgstr ""
867
 
868
+ #: ../classes/class-ccf-form-manager.php:1160
869
  msgid "State / Region / Province"
870
  msgstr ""
871
 
872
+ #: ../classes/class-ccf-form-manager.php:1164
873
  msgid "ZIP / Postal Code"
874
  msgstr ""
875
 
876
+ #: ../classes/class-ccf-form-manager.php:1172
877
  msgid "Country"
878
  msgstr ""
879
 
880
+ #: ../classes/class-ccf-form-manager.php:1183
881
  msgid "email@example.com"
882
  msgstr ""
883
 
884
+ #: ../classes/class-ccf-form-manager.php:1187
885
+ #: ../classes/class-ccf-form-manager.php:1482
886
  msgid "Email"
887
  msgstr ""
888
 
889
+ #: ../classes/class-ccf-form-manager.php:1191
890
  msgid "Confirm Email"
891
  msgstr ""
892
 
893
+ #: ../classes/class-ccf-form-manager.php:1221
894
  msgid "Edit"
895
  msgstr ""
896
 
897
+ #: ../classes/class-ccf-form-manager.php:1223
898
  msgid "Trash"
899
  msgstr ""
900
 
901
+ #: ../classes/class-ccf-form-manager.php:1266
902
  msgid "There is a problem with this form. Is it trashed or deleted?"
903
  msgstr ""
904
 
905
+ #: ../classes/class-ccf-form-manager.php:1414
 
 
 
 
906
  msgid "There are no submissions."
907
  msgstr ""
908
 
909
+ #: ../classes/class-ccf-form-manager.php:1443
910
  msgid "Add Form"
911
  msgstr ""
912
 
913
+ #: ../classes/class-ccf-form-manager.php:1467
914
  msgid "Single Line Text"
915
  msgstr ""
916
 
917
+ #: ../classes/class-ccf-form-manager.php:1468
918
  msgid "Dropdown"
919
  msgstr ""
920
 
921
+ #: ../classes/class-ccf-form-manager.php:1469
922
  msgid "Checkboxes"
923
  msgstr ""
924
 
925
+ #: ../classes/class-ccf-form-manager.php:1470
926
  msgid "Radio Buttons"
927
  msgstr ""
928
 
929
+ #: ../classes/class-ccf-form-manager.php:1471
930
  msgid "Paragraph Text"
931
  msgstr ""
932
 
933
+ #: ../classes/class-ccf-form-manager.php:1472
934
  msgid "Hidden"
935
  msgstr ""
936
 
937
+ #: ../classes/class-ccf-form-manager.php:1473
938
  msgid "File Upload"
939
  msgstr ""
940
 
941
+ #: ../classes/class-ccf-form-manager.php:1477
942
  msgid "HTML"
943
  msgstr ""
944
 
945
+ #: ../classes/class-ccf-form-manager.php:1478
946
  msgid "Section Header"
947
  msgstr ""
948
 
949
+ #: ../classes/class-ccf-form-manager.php:1483
950
  msgid "Name"
951
  msgstr ""
952
 
953
+ #: ../classes/class-ccf-form-manager.php:1484
954
  msgid "Date/Time"
955
  msgstr ""
956
 
957
+ #: ../classes/class-ccf-form-manager.php:1485
958
  msgid "Website"
959
  msgstr ""
960
 
961
+ #: ../classes/class-ccf-form-manager.php:1486
962
  msgid "Address"
963
  msgstr ""
964
 
965
+ #: ../classes/class-ccf-form-manager.php:1487
966
  msgid "Phone"
967
  msgstr ""
968
 
969
+ #: ../classes/class-ccf-form-manager.php:1488
970
  msgid "reCAPTCHA"
971
  msgstr ""
972
 
973
+ #: ../classes/class-ccf-form-manager.php:1505
974
  msgid "You have no email fields"
975
  msgstr ""
976
 
977
+ #: ../classes/class-ccf-form-manager.php:1506
978
  msgid "Invalid date"
979
  msgstr ""
980
 
981
+ #: ../classes/class-ccf-form-manager.php:1508
982
  msgid "Form Submission"
983
  msgstr ""
984
 
1067
  msgid "Deleted comment"
1068
  msgstr ""
1069
 
1070
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-comments.php:82
1071
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-customposttype.php:130
1072
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-customposttype.php:151
1073
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-customposttype.php:157
1074
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-customposttype.php:176
1075
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-media.php:72
1076
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-media.php:143
1077
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-media.php:149
1078
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-media.php:168
1079
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-meta-posts.php:30
1080
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-pages.php:69
1081
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-pages.php:88
1082
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-pages.php:106
1083
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-posts.php:74
1084
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-posts.php:271
1085
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-posts.php:319
1086
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-posts.php:364
1087
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-posts.php:730
1088
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-posts.php:758
1089
+ msgid "Invalid post ID."
1090
+ msgstr ""
1091
+
1092
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-comments.php:86
1093
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-posts.php:275
1094
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-posts.php:517
1095
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-posts.php:529
1096
+ msgid "Sorry, you cannot read this post."
1097
+ msgstr ""
1098
+
1099
  #: ../vendor/wp-api/wp-api/lib/class-wp-json-customposttype.php:33
1100
  #: ../vendor/wp-api/wp-api/lib/class-wp-json-meta.php:29
1101
  msgid "The route base must be overridden"
1237
  msgid "Sorry, you cannot view the revisions for this post."
1238
  msgstr ""
1239
 
1240
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-posts.php:122
1241
+ #, php-format
1242
+ msgid "The post type \"%s\" is not valid"
1243
+ msgstr ""
1244
+
1245
  #: ../vendor/wp-api/wp-api/lib/class-wp-json-posts.php:337
1246
  msgid "There is a revision of this post that is more recent."
1247
  msgstr ""
1320
  msgid "The JSONP callback function is invalid."
1321
  msgstr ""
1322
 
1323
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-server.php:369
1324
  msgid "Unsupported request method"
1325
  msgstr ""
1326
 
1327
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-server.php:388
1328
  msgid "The handler for the route is invalid"
1329
  msgstr ""
1330
 
1331
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-server.php:448
1332
  msgid "No route was found matching the URL and request method"
1333
  msgstr ""
1334
 
1335
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-server.php:500
1336
  #: ../vendor/wp-api/wp-api/lib/class-wp-json-users.php:252
1337
  #, php-format
1338
  msgid "Missing parameter %s"
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
4
  Tags: contact form, web form, custom contact form, custom forms, captcha form, contact fields, form mailers, forms
5
  Requires at least: 3.9
6
  Tested up to: 4.2
7
- Stable tag: 6.4.10
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -35,6 +35,9 @@ For questions, feature requests, and support concerning the Custom Contact Forms
35
 
36
  == Changelog ==
37
 
 
 
 
38
  = 6.4.10 =
39
  * Only use GET and POST HTTP methods. Remove 505 error message modal text.
40
  * Add IP address to submission
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.2
7
+ Stable tag: 6.4.11
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
35
 
36
  == Changelog ==
37
 
38
+ = 6.4.11 =
39
+ * Fix title special character formatting
40
+
41
  = 6.4.10 =
42
  * Only use GET and POST HTTP methods. Remove 505 error message modal text.
43
  * Add IP address to submission