Custom Contact Forms - Version 6.8.2

Version Description

  • Fix non-translateable strings
  • Include French translation. Props pyrog
Download this release

Release Info

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

Code changes from version 6.8.1 to 6.8.2

README.md CHANGED
@@ -1,5 +1,5 @@
1
- Custom Contact Forms [![Build Status](https://travis-ci.org/tlovett1/custom-contact-forms.svg?branch=master)](https://travis-ci.org/tlovett1/custom-contact-forms)
2
- ==============
3
 
4
  Build beautiful custom forms the WordPress way.
5
 
@@ -259,7 +259,7 @@ phpunit
259
 
260
  ##### Dockunit
261
 
262
- This plugin contains a valid [Dockunit](https://www.npmjs.com/package/dockunit) file for running unit tests across a variety of environments locally (PHP 5.2 and 5.5). You can use Dockunit (after installing it via npm) by running:
263
 
264
  ```bash
265
  dockunit
@@ -277,4 +277,4 @@ If you identify any errors or have an idea for improving the plugin, please
277
 
278
  Custom Contact Forms is free software; you can redistribute it and/or modify it under the terms of the [GNU General
279
  Public License](http://www.gnu.org/licenses/gpl-2.0.html) as published by the Free Software Foundation; either version 2 of the License, or (at your option) any
280
- later version.
1
+ Custom Contact Forms [![Build Status](https://travis-ci.org/tlovett1/custom-contact-forms.svg?branch=master)](https://travis-ci.org/tlovett1/custom-contact-forms) [![Dockunit Status](https://dockunit.io/svg/tlovett1/custom-contact-forms?master)](https://dockunit.io/projects/tlovett1/custom-contact-forms#master)
2
+ ===============
3
 
4
  Build beautiful custom forms the WordPress way.
5
 
259
 
260
  ##### Dockunit
261
 
262
+ This plugin contains a valid [Dockunit](https://www.npmjs.com/package/dockunit) file for running unit tests across a variety of environments locally (PHP 5.2 and 5.6). You can use Dockunit (after installing it via npm) by running:
263
 
264
  ```bash
265
  dockunit
277
 
278
  Custom Contact Forms is free software; you can redistribute it and/or modify it under the terms of the [GNU General
279
  Public License](http://www.gnu.org/licenses/gpl-2.0.html) as published by the Free Software Foundation; either version 2 of the License, or (at your option) any
280
+ later version.
bin/production-ready.sh ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env bash
2
+
3
+ echo "Are you sure you want to do this? Uncommitted work could be lost. [y/n]"
4
+ read input_variable
5
+
6
+ if [ "$input_variable" == "y" ]; then
7
+ DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
8
+
9
+ cd "$DIR/../"
10
+
11
+ rm bin/install-wp-tests.sh > /dev/null 2>&1
12
+
13
+ rm -rf bower_components > /dev/null 2>&1
14
+ rm -rf node_modules > /dev/null 2>&1
15
+ rm -rf scss > /dev/null 2>&1
16
+ rm -rf tests > /dev/null 2>&1
17
+ rm -rf .sass-cache > /dev/null 2>&1
18
+ rm -rf vendor/wp-api/wp-api/.git > /dev/null 2>&1
19
+
20
+ rm .travis.yml > /dev/null 2>&1
21
+ rm Gruntfile.js > /dev/null 2>&1
22
+ rm Dockunit.json > /dev/null 2>&1
23
+ rm phpunit.xml > /dev/null 2>&1
24
+ rm .jshintrc > /dev/null 2>&1
25
+
26
+ bower install --production > /dev/null 2>&1
27
+
28
+ echo "Done! Custom Contact Forms is cleaned up and production ready."
29
+ fi
build/js/form-manager.js CHANGED
@@ -520,7 +520,7 @@
520
 
521
  defaults: function() {
522
  var defaults = {
523
- label: 'Field Label',
524
  value: '',
525
  placeholder: '',
526
  slug: '',
520
 
521
  defaults: function() {
522
  var defaults = {
523
+ label: ccfSettings.fieldLabel,
524
  value: '',
525
  placeholder: '',
526
  slug: '',
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)},o=function(e){for(var t in this.attributes)if(-1===i.indexOf(e,t)){var l=this.get(t);"string"==typeof l&&""!==l&&(l=(l+"").replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#8220;/g,"”").replace(/&#8221;/g,"”").replace(/&#8216;/g,"‘").replace(/&#038;/g,"&").replace(/&#039;/g,"'"),this.set(t,l))}return this};wp.ccf.models.FieldChoice=wp.ccf.models.FieldChoice||t.Model.extend({defaults:{label:"",value:"",selected:!1},decode:function(){return o.call(this,[])},set: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:"",emailNotificationFromNameType:"custom",emailNotificationFromName:"WordPress",emailNotificationFromNameField:"",pause:!1,pauseMessage:l.pauseMessage};return e=i.defaults(e,this.constructor.__super__.defaults),wp.ccf.utils.cleanDateFields(e),e},decode:function(){var e=i.keys(wp.api.models.Post.prototype.defaults);return e=i.without(e,"title"),o.call(this,e)},getFieldSlugs:function(e){var t=wp.ccf.currentForm.get("fields"),i=[];return t.each(function(t){e&&t.isImmutable||i.push(t.get("slug"))}),i},parse:function(e){var t=this;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 o=t.get("choices");if(o&&o.length>0)for(var n=0;c.choices>n;n++){var a=o.at(n);a.set(c.choices[n]),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 o.call(this,i.keys(wp.api.models.Post.prototype.defaults))},hasRequiredAttributes:function(){var e=this,t=!0;return i.each(this.required(),function(i){(e.get(i)===void 0||""===e.get(i))&&(t=!1)}),t},sync: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-pause":"togglePauseFields","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")},togglePauseFields:function(){var e=this.el.querySelectorAll(".form-pause")[0].value,t=this.el.querySelectorAll(".pause-message")[0];t.style.display=parseInt(e)?"block":"none"},save:function(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-pause")[0].value;this.model.set("pause",parseInt(s)?!0:!1);var c=this.el.querySelectorAll(".form-pause-message")[0].value;this.model.set("pauseMessage",c);var r=this.el.querySelectorAll(".form-completion-message")[0].value;this.model.set("completionMessage",r);var o=this.el.querySelectorAll(".form-completion-redirect-url")[0].value;
2
  this.model.set("completionRedirectUrl",o);var n=this.el.querySelectorAll(".form-completion-action-type")[0].value;this.model.set("completionActionType",n),e!==void 0&&e.promise!==void 0&&e.resolve()}},render:function(){var e={form:this.model.toJSON()};return this.el.innerHTML=this.template(e),this.toggleCompletionFields(),this.togglePauseFields(),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","change select.form-email-notification-from-name-type":"toggleNotificationFields"},initialize:function(e){this.model=e.form},destroy:function(){wp.ccf.dispatcher.off("saveFormNotifications",this.save),wp.ccf.dispatcher.off("mainViewChange",this.save),this.undelegateEvents(),this.unbind()},updateFromFieldField:function(){var e=this.el.querySelectorAll(".form-email-notification-from-field")[0];e.innerHTML="",e.disabled=!1;var t=this.el.querySelectorAll(".form-email-notification-from-name-field")[0];t.innerHTML="",t.disabled=!1;var i=this.model.get("fields"),s=0,c=0,r=this.model.get("emailNotificationFromField"),o=this.model.get("emailNotificationFromNameField");if(i.length>=1&&i.each(function(i){if("email"===i.get("type")){var l=document.createElement("option");l.innerHTML=i.get("slug"),l.value=i.get("slug"),i.get("slug")===r&&(l.selected=!0),e.appendChild(l),s++}else if("name"===i.get("type")){var l=document.createElement("option");l.innerHTML=i.get("slug"),l.value=i.get("slug"),i.get("slug")===o&&(l.selected=!0),t.appendChild(l),c++}}),0===s){var n=document.createElement("option");n.innerHTML=l.noEmailFields,e.appendChild(n),e.disabled=!0}if(0===c){var n=document.createElement("option");n.innerHTML=l.noNameFields,t.appendChild(n),t.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],r=this.el.querySelectorAll(".email-notification-from-name")[0],o=this.el.querySelectorAll(".email-notification-from-name-field")[0],n=this.el.querySelectorAll(".form-email-notification-from-name-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"),r.style.display="none",o.style.display="none","custom"===n.value?r.style.display="block":"field"===n.value&&(o.style.display="block")}else{for(e=0;i.length>e;e++)i[e].style.display="none";l.style.display="none",s.style.display="none",r.style.display="none",o.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);var r=this.el.querySelectorAll(".form-email-notification-from-name-type")[0].value;this.model.set("emailNotificationFromNameType",r);var o=this.el.querySelectorAll(".form-email-notification-from-name")[0].value;this.model.set("emailNotificationFromName",o);var n=this.el.querySelectorAll(".form-email-notification-from-name-field")[0].value;this.model.set("emailNotificationFromNameField",n),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.updateFromFieldField(),wp.ccf.dispatcher.on("saveFormNotifications",this.save,this),wp.ccf.dispatcher.on("mainViewChange",this.save,this),this.listenTo(t,"add",this.updateFromFieldField,this),this.listenTo(t,"remove",this.updateFromFieldField,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 o=s.el.querySelectorAll(".structure-fields")[0];i.each(l.structureFieldLabels,function(e,t){o.appendChild(new wp.ccf.views.FieldRowPlaceholder({type:t}).render().el)});var n=s.el.querySelectorAll(".special-fields")[0];i.each(l.specialFieldLabels,function(e,t){n.appendChild(new wp.ccf.views.FieldRowPlaceholder({type:t}).render().el)});var a=s.model.get("fields"),d=s.el.querySelectorAll(".form-content")[0],u=e(d);return e(s.el.querySelectorAll(".left-sidebar")[0].querySelectorAll(".field")).draggable({cursor:"move",distance:2,zIndex:160001,scroll:!1,containment:"document",appendTo:".ccf-main-modal",snap:!1,connectToSortable:".form-content",helper:function(t){var i=e(t.currentTarget),l=e('<div class="field" data-field-type="'+i.attr("data-field-type")+'"><h4>'+i.find(".label").html()+"</h4></div>");return l.css({width:u.width(),opacity:".75",height:i.height()})}}),a.length>=1&&(d.innerHTML="",a.each(function(e){var t=new wp.ccf.views.FieldRow({model:e,form:s.model}).render(!0).el;d.appendChild(t)})),e(d).sortable({axis:"y",distance:2,handle:"h4",placeholder:"field-placeholder",stop:function(e,t){if(!t.item.hasClass("instantiated")){var i=t.item.attr("data-field-type"),l={};wp.ccf.models.Fields[i].prototype.defaults().slug!==void 0&&(l.slug=i+"-"+s.getNextFieldOrd());var c=new wp.ccf.models.Fields[i](l),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 o=parseInt(l.postId);if(s.forms.formsFetching[o]===void 0){var n=new wp.ccf.models.Form({ID:o}),a=n.fetch();s.forms.formsFetching[o]=a,s._currentFormDeferred=a,a.done(function(){delete s.forms.formsFetching[o],s.forms.add(n),s.currentForm=n})}else s._currentFormDeferred=s.forms.formsFetching[o],s._currentFormDeferred.done(function(){s.currentForm=s.forms.findWhere({ID:o})});e.when(s._currentFormDeferred).then(function(){s._setupMainModal(!0),c.style.display="inline-block";var e=document.getElementById("ccf-submissions");if(e){var t=e.querySelectorAll(".inside")[0],i=document.createElement("div");i.className="ccf-submission-icon",i.setAttribute("data-icon","");var r=document.createElement("a");r.href="?action=edit&post="+parseInt(l.postId)+"&download_submissions=1&download_submissions_nonce="+l.downloadSubmissionsNonce,r.className="ccf-submission-icon",r.setAttribute("data-icon","");var o=document.getElementById("show-settings-link");i.onclick=function(){o.click()},e.insertBefore(i,e.firstChild.nextSibling.nextSibling),e.insertBefore(r,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)},o=function(e){for(var t in this.attributes)if(-1===i.indexOf(e,t)){var l=this.get(t);"string"==typeof l&&""!==l&&(l=(l+"").replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#8220;/g,"”").replace(/&#8221;/g,"”").replace(/&#8216;/g,"‘").replace(/&#038;/g,"&").replace(/&#039;/g,"'"),this.set(t,l))}return this};wp.ccf.models.FieldChoice=wp.ccf.models.FieldChoice||t.Model.extend({defaults:{label:"",value:"",selected:!1},decode:function(){return o.call(this,[])},set: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:"",emailNotificationFromNameType:"custom",emailNotificationFromName:"WordPress",emailNotificationFromNameField:"",pause:!1,pauseMessage:l.pauseMessage};return e=i.defaults(e,this.constructor.__super__.defaults),wp.ccf.utils.cleanDateFields(e),e},decode:function(){var e=i.keys(wp.api.models.Post.prototype.defaults);return e=i.without(e,"title"),o.call(this,e)},getFieldSlugs:function(e){var t=wp.ccf.currentForm.get("fields"),i=[];return t.each(function(t){e&&t.isImmutable||i.push(t.get("slug"))}),i},parse:function(e){var t=this;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 o=t.get("choices");if(o&&o.length>0)for(var n=0;c.choices>n;n++){var a=o.at(n);a.set(c.choices[n]),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 o.call(this,i.keys(wp.api.models.Post.prototype.defaults))},hasRequiredAttributes:function(){var e=this,t=!0;return i.each(this.required(),function(i){(e.get(i)===void 0||""===e.get(i))&&(t=!1)}),t},sync:r}),wp.ccf.models.StandardField=wp.ccf.models.StandardField||wp.ccf.models.Field.extend({idAttribute:"ID",defaults:function(){var e={label:l.fieldLabel,value:"",placeholder:"",slug:"",type:"",required:!1,className:"",description:""};return i.defaults(e,this.constructor.__super__.defaults)}}),wp.ccf.models.Fields["single-line-text"]=wp.ccf.models.Fields["single-line-text"]||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"single-line-text"};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.file=wp.ccf.models.Fields.file||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"file",fileExtensions:"",maxFileSize:l.maxFileSize};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields["paragraph-text"]=wp.ccf.models.Fields["paragraph-text"]||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"paragraph-text"};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.hidden=wp.ccf.models.Fields.hidden||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"hidden"};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.email=wp.ccf.models.Fields.email||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"email",emailConfirmation:!1};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.website=wp.ccf.models.Fields.website||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"website",placeholder:"http://"};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.phone=wp.ccf.models.Fields.phone||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"phone",phoneFormat:"us"};return i.defaults(e,this.constructor.__super__.defaults())}}),wp.ccf.models.Fields.date=wp.ccf.models.Fields.date||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"date",showDate:!0,showTime:!0};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-pause":"togglePauseFields","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")},togglePauseFields:function(){var e=this.el.querySelectorAll(".form-pause")[0].value,t=this.el.querySelectorAll(".pause-message")[0];t.style.display=parseInt(e)?"block":"none"},save:function(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-pause")[0].value;this.model.set("pause",parseInt(s)?!0:!1);var c=this.el.querySelectorAll(".form-pause-message")[0].value;this.model.set("pauseMessage",c);var r=this.el.querySelectorAll(".form-completion-message")[0].value;this.model.set("completionMessage",r);var o=this.el.querySelectorAll(".form-completion-redirect-url")[0].value;
2
  this.model.set("completionRedirectUrl",o);var n=this.el.querySelectorAll(".form-completion-action-type")[0].value;this.model.set("completionActionType",n),e!==void 0&&e.promise!==void 0&&e.resolve()}},render:function(){var e={form:this.model.toJSON()};return this.el.innerHTML=this.template(e),this.toggleCompletionFields(),this.togglePauseFields(),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","change select.form-email-notification-from-name-type":"toggleNotificationFields"},initialize:function(e){this.model=e.form},destroy:function(){wp.ccf.dispatcher.off("saveFormNotifications",this.save),wp.ccf.dispatcher.off("mainViewChange",this.save),this.undelegateEvents(),this.unbind()},updateFromFieldField:function(){var e=this.el.querySelectorAll(".form-email-notification-from-field")[0];e.innerHTML="",e.disabled=!1;var t=this.el.querySelectorAll(".form-email-notification-from-name-field")[0];t.innerHTML="",t.disabled=!1;var i=this.model.get("fields"),s=0,c=0,r=this.model.get("emailNotificationFromField"),o=this.model.get("emailNotificationFromNameField");if(i.length>=1&&i.each(function(i){if("email"===i.get("type")){var l=document.createElement("option");l.innerHTML=i.get("slug"),l.value=i.get("slug"),i.get("slug")===r&&(l.selected=!0),e.appendChild(l),s++}else if("name"===i.get("type")){var l=document.createElement("option");l.innerHTML=i.get("slug"),l.value=i.get("slug"),i.get("slug")===o&&(l.selected=!0),t.appendChild(l),c++}}),0===s){var n=document.createElement("option");n.innerHTML=l.noEmailFields,e.appendChild(n),e.disabled=!0}if(0===c){var n=document.createElement("option");n.innerHTML=l.noNameFields,t.appendChild(n),t.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],r=this.el.querySelectorAll(".email-notification-from-name")[0],o=this.el.querySelectorAll(".email-notification-from-name-field")[0],n=this.el.querySelectorAll(".form-email-notification-from-name-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"),r.style.display="none",o.style.display="none","custom"===n.value?r.style.display="block":"field"===n.value&&(o.style.display="block")}else{for(e=0;i.length>e;e++)i[e].style.display="none";l.style.display="none",s.style.display="none",r.style.display="none",o.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);var r=this.el.querySelectorAll(".form-email-notification-from-name-type")[0].value;this.model.set("emailNotificationFromNameType",r);var o=this.el.querySelectorAll(".form-email-notification-from-name")[0].value;this.model.set("emailNotificationFromName",o);var n=this.el.querySelectorAll(".form-email-notification-from-name-field")[0].value;this.model.set("emailNotificationFromNameField",n),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.updateFromFieldField(),wp.ccf.dispatcher.on("saveFormNotifications",this.save,this),wp.ccf.dispatcher.on("mainViewChange",this.save,this),this.listenTo(t,"add",this.updateFromFieldField,this),this.listenTo(t,"remove",this.updateFromFieldField,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 o=s.el.querySelectorAll(".structure-fields")[0];i.each(l.structureFieldLabels,function(e,t){o.appendChild(new wp.ccf.views.FieldRowPlaceholder({type:t}).render().el)});var n=s.el.querySelectorAll(".special-fields")[0];i.each(l.specialFieldLabels,function(e,t){n.appendChild(new wp.ccf.views.FieldRowPlaceholder({type:t}).render().el)});var a=s.model.get("fields"),d=s.el.querySelectorAll(".form-content")[0],u=e(d);return e(s.el.querySelectorAll(".left-sidebar")[0].querySelectorAll(".field")).draggable({cursor:"move",distance:2,zIndex:160001,scroll:!1,containment:"document",appendTo:".ccf-main-modal",snap:!1,connectToSortable:".form-content",helper:function(t){var i=e(t.currentTarget),l=e('<div class="field" data-field-type="'+i.attr("data-field-type")+'"><h4>'+i.find(".label").html()+"</h4></div>");return l.css({width:u.width(),opacity:".75",height:i.height()})}}),a.length>=1&&(d.innerHTML="",a.each(function(e){var t=new wp.ccf.views.FieldRow({model:e,form:s.model}).render(!0).el;d.appendChild(t)})),e(d).sortable({axis:"y",distance:2,handle:"h4",placeholder:"field-placeholder",stop:function(e,t){if(!t.item.hasClass("instantiated")){var i=t.item.attr("data-field-type"),l={};wp.ccf.models.Fields[i].prototype.defaults().slug!==void 0&&(l.slug=i+"-"+s.getNextFieldOrd());var c=new wp.ccf.models.Fields[i](l),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 o=parseInt(l.postId);if(s.forms.formsFetching[o]===void 0){var n=new wp.ccf.models.Form({ID:o}),a=n.fetch();s.forms.formsFetching[o]=a,s._currentFormDeferred=a,a.done(function(){delete s.forms.formsFetching[o],s.forms.add(n),s.currentForm=n})}else s._currentFormDeferred=s.forms.formsFetching[o],s._currentFormDeferred.done(function(){s.currentForm=s.forms.findWhere({ID:o})});e.when(s._currentFormDeferred).then(function(){s._setupMainModal(!0),c.style.display="inline-block";var e=document.getElementById("ccf-submissions");if(e){var t=e.querySelectorAll(".inside")[0],i=document.createElement("div");i.className="ccf-submission-icon",i.setAttribute("data-icon","");var r=document.createElement("a");r.href="?action=edit&post="+parseInt(l.postId)+"&download_submissions=1&download_submissions_nonce="+l.downloadSubmissionsNonce,r.className="ccf-submission-icon",r.setAttribute("data-icon","");var o=document.getElementById("show-settings-link");i.onclick=function(){o.click()},e.insertBefore(i,e.firstChild.nextSibling.nextSibling),e.insertBefore(r,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);
classes/class-ccf-field-renderer.php CHANGED
@@ -790,7 +790,7 @@ class CCF_Field_Renderer {
790
  <?php echo esc_html( $label ); ?>
791
  </label>
792
  <?php if ( empty( $email_confirmation ) ) { ?>
793
- <input class="<?php if ( ! empty( $errors ) ) : ?>field-error-input<?php endif; ?> field-input" <?php if ( ! empty( $required ) ) : ?>required aria-required="true"<?php endif; ?> name="ccf_field_<?php echo esc_attr( $slug ); ?>" id="ccf_field_<?php echo esc_attr( $slug ); ?>" placeholder="<?php if ( ! empty( $placeholder ) ) { ?><?php echo esc_attr( $placeholder ) ?><?php } else { ?>email@example.com<?php } ?>" type="text" value="<?php if ( ! empty( $email_post_value ) ) { echo esc_attr( $email_post_value ); } else { echo esc_attr( $value ); } ?>">
794
  <?php if ( ! empty( $errors ) ) : foreach ( $errors as $error ) : ?>
795
  <div class="error"><?php echo esc_html( $error ); ?></div>
796
  <?php endforeach; endif; ?>
790
  <?php echo esc_html( $label ); ?>
791
  </label>
792
  <?php if ( empty( $email_confirmation ) ) { ?>
793
+ <input class="<?php if ( ! empty( $errors ) ) : ?>field-error-input<?php endif; ?> field-input" <?php if ( ! empty( $required ) ) : ?>required aria-required="true"<?php endif; ?> name="ccf_field_<?php echo esc_attr( $slug ); ?>" id="ccf_field_<?php echo esc_attr( $slug ); ?>" placeholder="<?php if ( ! empty( $placeholder ) ) { ?><?php echo esc_attr( $placeholder ) ?><?php } else { ?><?php esc_html_e( 'email@example.com', 'custom-contact-forms' ); ?><?php } ?>" type="text" value="<?php if ( ! empty( $email_post_value ) ) { echo esc_attr( $email_post_value ); } else { echo esc_attr( $value ); } ?>">
794
  <?php if ( ! empty( $errors ) ) : foreach ( $errors as $error ) : ?>
795
  <div class="error"><?php echo esc_html( $error ); ?></div>
796
  <?php endforeach; endif; ?>
classes/class-ccf-form-manager.php CHANGED
@@ -1542,6 +1542,7 @@ class CCF_Form_Manager {
1542
  'noNameFields' => esc_html__( 'You have no name fields', 'custom-contact-forms' ),
1543
  'invalidDate' => esc_html__( 'Invalid date', 'custom-contact-forms' ),
1544
  'allLabels' => array_merge( $field_labels, $structure_field_labels, $special_field_labels ),
 
1545
  'thickboxTitle' => esc_html__( 'Form Submission', 'custom-contact-forms' ),
1546
  'pauseMessage' => esc_html__( 'This form is paused right now. Check back later!', 'custom-contact-forms' ),
1547
  'skipFields' => apply_filters( 'ccf_no_submission_display_fields', array( 'html', 'section-header', 'recaptcha' ) ),
1542
  'noNameFields' => esc_html__( 'You have no name fields', 'custom-contact-forms' ),
1543
  'invalidDate' => esc_html__( 'Invalid date', 'custom-contact-forms' ),
1544
  'allLabels' => array_merge( $field_labels, $structure_field_labels, $special_field_labels ),
1545
+ 'fieldLabel' => esc_html__( 'Field Label', 'custom-contact-forms' ),
1546
  'thickboxTitle' => esc_html__( 'Form Submission', 'custom-contact-forms' ),
1547
  'pauseMessage' => esc_html__( 'This form is paused right now. Check back later!', 'custom-contact-forms' ),
1548
  'skipFields' => apply_filters( 'ccf_no_submission_display_fields', array( 'html', 'section-header', 'recaptcha' ) ),
custom-contact-forms.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin URI: http://www.taylorlovett.com
5
  * Description: Build beautiful custom forms the WordPress way. View live previews of your forms while you build them.
6
  * Author: Taylor Lovett
7
- * Version: 6.8.1
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.8.2
8
  * Author URI: http://www.taylorlovett.com
9
  */
10
 
js/manager/models.js CHANGED
@@ -260,7 +260,7 @@
260
 
261
  defaults: function() {
262
  var defaults = {
263
- label: 'Field Label',
264
  value: '',
265
  placeholder: '',
266
  slug: '',
260
 
261
  defaults: function() {
262
  var defaults = {
263
+ label: ccfSettings.fieldLabel,
264
  value: '',
265
  placeholder: '',
266
  slug: '',
languages/custom-contact-forms-fr_FR.mo ADDED
Binary file
languages/custom-contact-forms-fr_FR.po ADDED
@@ -0,0 +1,1400 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2014 Taylor Lovett
2
+ # This file is distributed under the same license as the Editorial Access Manager package.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: Custom Contact Forms\n"
6
+ "Report-Msgid-Bugs-To: https://github.com/tlovett1/custom-contact-forms/issues\n"
7
+ "POT-Creation-Date: 2015-06-29 10:27-0500\n"
8
+ "PO-Revision-Date: 2015-08-27 18:12+0200\n"
9
+ "Last-Translator: Pyrog <pyrog@laposte.net>\n"
10
+ "Language: fr\n"
11
+ "MIME-Version: 1.0\n"
12
+ "Content-Type: text/plain; charset=UTF-8\n"
13
+ "Content-Transfer-Encoding: 8bit\n"
14
+ "X-Generator: Poedit 1.8.4\n"
15
+ "Plural-Forms: nplurals=2; plural=n != 1;\n"
16
+ "X-Poedit-Basepath: .\n"
17
+ "X-Poedit-SourceCharset: UTF-8\n"
18
+ "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;_c,"
19
+ "_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;esc_html_e;esc_html__;esc_attr__;"
20
+ "esc_attr_e\n"
21
+ "X-Textdomain-Support: yes\n"
22
+ "Language-Team: \n"
23
+ "X-Poedit-SearchPath-0: ..\n"
24
+
25
+ #: ../classes/class-ccf-api.php:160
26
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-comments.php:82
27
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-customposttype.php:130
28
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-customposttype.php:151
29
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-customposttype.php:157
30
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-customposttype.php:176
31
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-media.php:72
32
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-media.php:143
33
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-media.php:149
34
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-media.php:168
35
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-meta-posts.php:30
36
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-pages.php:69
37
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-pages.php:88
38
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-pages.php:106
39
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-posts.php:74
40
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-posts.php:271
41
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-posts.php:329
42
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-posts.php:374
43
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-posts.php:749
44
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-posts.php:777
45
+ msgid "Invalid post ID."
46
+ msgstr "Identifiant d'article invalide."
47
+
48
+ #: ../classes/class-ccf-api.php:164
49
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-comments.php:86
50
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-posts.php:285
51
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-posts.php:527
52
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-posts.php:539
53
+ msgid "Sorry, you cannot read this post."
54
+ msgstr "Désolé, vous ne pouvez-pas lire cet article."
55
+
56
+ #: ../classes/class-ccf-api.php:220
57
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-posts.php:122
58
+ #, php-format
59
+ msgid "The post type \"%s\" is not valid"
60
+ msgstr "Le type d’article « %s » est invalide"
61
+
62
+ #: ../classes/class-ccf-api.php:447 ../classes/class-ccf-api.php:762
63
+ #: ../classes/class-ccf-api.php:787 ../classes/class-ccf-api.php:816
64
+ #: ../classes/class-ccf-api.php:933
65
+ msgid "Invalid form ID."
66
+ msgstr "Identifiant de formulaire invalide."
67
+
68
+ #: ../classes/class-ccf-api.php:452 ../classes/class-ccf-api.php:747
69
+ #: ../classes/class-ccf-api.php:767
70
+ msgid "Sorry, you cannot view forms."
71
+ msgstr "Désolé, vous ne pouvez pas voir les formulaires."
72
+
73
+ #: ../classes/class-ccf-api.php:793 ../classes/class-ccf-api.php:822
74
+ msgid "Invalid form."
75
+ msgstr "Formulaire invalide."
76
+
77
+ #: ../classes/class-ccf-api.php:797
78
+ msgid "Sorry, you cannot view this form."
79
+ msgstr "Désolé, vous ne pouvez pas voir ce formulaire."
80
+
81
+ #: ../classes/class-ccf-api.php:944
82
+ msgid "The form cannot be deleted."
83
+ msgstr "Ce formulaire ne peut-être effacé."
84
+
85
+ #: ../classes/class-ccf-api.php:948
86
+ msgid "Permanently deleted form"
87
+ msgstr "Formulaire effacé définitivement"
88
+
89
+ #: ../classes/class-ccf-api.php:951
90
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-posts.php:391
91
+ msgid "Deleted post"
92
+ msgstr "Article effacé"
93
+
94
+ #: ../classes/class-ccf-choice-cpt.php:29
95
+ msgid "Form Field Choices"
96
+ msgstr ""
97
+
98
+ #: ../classes/class-ccf-custom-contact-forms.php:49
99
+ #, php-format
100
+ msgid ""
101
+ "Custom Contact Forms will not work unless pretty permalinks (not default) are enabled. "
102
+ "Please update your <a href=\"%s\">permalinks settings</a>."
103
+ msgstr ""
104
+
105
+ #: ../classes/class-ccf-custom-contact-forms.php:67
106
+ #, php-format
107
+ msgid "<a href=\"%s\">Forms and Submissions</a>"
108
+ msgstr "<a href=\"%s\">Formulaires et soumissions</a>"
109
+
110
+ #: ../classes/class-ccf-export.php:58 ../classes/class-ccf-form-cpt.php:576
111
+ msgid "Forms and Submissions"
112
+ msgstr "Formulaires et soumissions"
113
+
114
+ #: ../classes/class-ccf-export.php:90
115
+ msgid "Import"
116
+ msgstr "Importer"
117
+
118
+ #: ../classes/class-ccf-field-cpt.php:30
119
+ msgid "Form Fields"
120
+ msgstr "Champs de formulaire"
121
+
122
+ #: ../classes/class-ccf-field-renderer.php:122
123
+ #, php-format
124
+ msgid "Allowed file extensions are %s. "
125
+ msgstr ""
126
+
127
+ #: ../classes/class-ccf-field-renderer.php:124
128
+ #, php-format
129
+ msgid "Max file size is %d MB. "
130
+ msgstr ""
131
+
132
+ #: ../classes/class-ccf-field-renderer.php:556 ../classes/class-ccf-form-manager.php:1151
133
+ #: ../classes/class-ccf-form-manager.php:1176
134
+ msgid "Street Address"
135
+ msgstr "Adresse"
136
+
137
+ #: ../classes/class-ccf-field-renderer.php:560 ../classes/class-ccf-form-manager.php:1155
138
+ #: ../classes/class-ccf-form-manager.php:1180
139
+ msgid "Address Line 2"
140
+ msgstr "Complément"
141
+
142
+ #: ../classes/class-ccf-field-renderer.php:567 ../classes/class-ccf-form-manager.php:1159
143
+ #: ../classes/class-ccf-form-manager.php:1184
144
+ msgid "City"
145
+ msgstr "Ville"
146
+
147
+ #: ../classes/class-ccf-field-renderer.php:580 ../classes/class-ccf-form-manager.php:1167
148
+ msgid "State"
149
+ msgstr "Etat"
150
+
151
+ #: ../classes/class-ccf-field-renderer.php:588 ../classes/class-ccf-form-manager.php:1171
152
+ msgid "ZIP Code"
153
+ msgstr "Code postal"
154
+
155
+ #: ../classes/class-ccf-field-renderer.php:598 ../classes/class-ccf-form-manager.php:1188
156
+ msgid "State / Region / Province"
157
+ msgstr "Etat / Région / Province"
158
+
159
+ #: ../classes/class-ccf-field-renderer.php:606 ../classes/class-ccf-form-manager.php:1192
160
+ msgid "ZIP / Postal Code"
161
+ msgstr "Code postal"
162
+
163
+ #: ../classes/class-ccf-field-renderer.php:618 ../classes/class-ccf-form-manager.php:1200
164
+ msgid "Country"
165
+ msgstr "Pays"
166
+
167
+ #: ../classes/class-ccf-field-renderer.php:803 ../classes/class-ccf-form-manager.php:1215
168
+ #: ../classes/class-ccf-form-manager.php:1516
169
+ msgid "Email"
170
+ msgstr "Mél"
171
+
172
+ #: ../classes/class-ccf-field-renderer.php:810 ../classes/class-ccf-form-manager.php:1219
173
+ msgid "Confirm Email"
174
+ msgstr "Confirmez l’adresse mél"
175
+
176
+ #: ../classes/class-ccf-field-renderer.php:876 ../classes/class-ccf-form-manager.php:1087
177
+ msgid "First"
178
+ msgstr "Prénom"
179
+
180
+ #: ../classes/class-ccf-field-renderer.php:883 ../classes/class-ccf-form-manager.php:1091
181
+ msgid "Last"
182
+ msgstr "Nom"
183
+
184
+ #: ../classes/class-ccf-field-renderer.php:955 ../classes/class-ccf-field-renderer.php:976
185
+ #: ../classes/class-ccf-form-manager.php:1106 ../classes/class-ccf-form-manager.php:1127
186
+ msgid "HH"
187
+ msgstr ""
188
+
189
+ #: ../classes/class-ccf-field-renderer.php:959 ../classes/class-ccf-field-renderer.php:980
190
+ #: ../classes/class-ccf-form-manager.php:1110 ../classes/class-ccf-form-manager.php:1131
191
+ msgid "MM"
192
+ msgstr ""
193
+
194
+ #: ../classes/class-ccf-field-renderer.php:963 ../classes/class-ccf-field-renderer.php:984
195
+ #: ../classes/class-ccf-form-manager.php:1114 ../classes/class-ccf-form-manager.php:1135
196
+ msgid "AM"
197
+ msgstr ""
198
+
199
+ #: ../classes/class-ccf-field-renderer.php:964 ../classes/class-ccf-field-renderer.php:985
200
+ #: ../classes/class-ccf-form-manager.php:1115 ../classes/class-ccf-form-manager.php:1136
201
+ msgid "PM"
202
+ msgstr ""
203
+
204
+ #: ../classes/class-ccf-field-renderer.php:971 ../classes/class-ccf-form-cpt.php:510
205
+ #: ../classes/class-ccf-form-manager.php:274 ../classes/class-ccf-form-manager.php:287
206
+ #: ../classes/class-ccf-form-manager.php:1122 ../classes/class-ccf-form-manager.php:1305
207
+ #: ../classes/class-ccf-form-manager.php:1319 ../classes/class-ccf-form-manager.php:1457
208
+ msgid "Date"
209
+ msgstr ""
210
+
211
+ #: ../classes/class-ccf-form-cpt.php:277
212
+ msgid "Form Submission Columns"
213
+ msgstr "Colonnes de soumissions de formulaire"
214
+
215
+ #: ../classes/class-ccf-form-cpt.php:326 ../classes/class-ccf-form-cpt.php:344
216
+ #: ../classes/class-ccf-form-cpt.php:508 ../classes/class-ccf-form-manager.php:277
217
+ #: ../classes/class-ccf-form-manager.php:290
218
+ msgid "Submissions"
219
+ msgstr "Soumissions"
220
+
221
+ #: ../classes/class-ccf-form-cpt.php:340
222
+ msgid "At a Glance"
223
+ msgstr "En bref"
224
+
225
+ #: ../classes/class-ccf-form-cpt.php:341
226
+ msgid "Preview"
227
+ msgstr "Aperçu"
228
+
229
+ #: ../classes/class-ccf-form-cpt.php:361
230
+ msgid "Save your new form to see a preview."
231
+ msgstr "Enregistrer votre nouveau formulaire pour voir l’aperçu."
232
+
233
+ #: ../classes/class-ccf-form-cpt.php:398
234
+ msgid "Created on:"
235
+ msgstr "Créé le :"
236
+
237
+ #: ../classes/class-ccf-form-cpt.php:401
238
+ msgid "Author:"
239
+ msgstr "Auteur :"
240
+
241
+ #: ../classes/class-ccf-form-cpt.php:404
242
+ msgid "Number of fields:"
243
+ msgstr "Nombre de champs :"
244
+
245
+ #: ../classes/class-ccf-form-cpt.php:407
246
+ msgid "Number of submissions:"
247
+ msgstr "Nombre de soumissions :"
248
+
249
+ #: ../classes/class-ccf-form-cpt.php:413
250
+ msgid "Move to Trash"
251
+ msgstr "Déplacer dans la corbeille"
252
+
253
+ #: ../classes/class-ccf-form-cpt.php:417
254
+ msgid "Export"
255
+ msgstr "Exporter"
256
+
257
+ #: ../classes/class-ccf-form-cpt.php:446 ../classes/class-ccf-form-manager.php:1247
258
+ msgid "(No title)"
259
+ msgstr "(Sans titre)"
260
+
261
+ #: ../classes/class-ccf-form-cpt.php:451
262
+ msgid "Manage Form"
263
+ msgstr "Gérer les formulaires"
264
+
265
+ #: ../classes/class-ccf-form-cpt.php:506
266
+ msgid "Form Title"
267
+ msgstr "Titre du formulaire"
268
+
269
+ #: ../classes/class-ccf-form-cpt.php:507 ../classes/class-ccf-form-manager.php:275
270
+ #: ../classes/class-ccf-form-manager.php:288
271
+ msgid "Author"
272
+ msgstr "Auteur"
273
+
274
+ #: ../classes/class-ccf-form-cpt.php:509 ../classes/class-ccf-form-manager.php:276
275
+ #: ../classes/class-ccf-form-manager.php:289
276
+ msgid "Number of Fields"
277
+ msgstr "Nombre de champs"
278
+
279
+ #: ../classes/class-ccf-form-cpt.php:543
280
+ msgid "Unpublished"
281
+ msgstr "Brouillon"
282
+
283
+ #: ../classes/class-ccf-form-cpt.php:545
284
+ msgid "Y/m/d g:i:s A"
285
+ msgstr ""
286
+
287
+ #: ../classes/class-ccf-form-cpt.php:552
288
+ #, php-format
289
+ msgid "%s ago"
290
+ msgstr ""
291
+
292
+ #: ../classes/class-ccf-form-cpt.php:554
293
+ msgid "Y/m/d"
294
+ msgstr ""
295
+
296
+ #: ../classes/class-ccf-form-cpt.php:570 ../classes/class-ccf-form-cpt.php:582
297
+ msgid "Forms"
298
+ msgstr "Formulaires"
299
+
300
+ #: ../classes/class-ccf-form-cpt.php:571
301
+ msgid "Form"
302
+ msgstr "Formulaire"
303
+
304
+ #: ../classes/class-ccf-form-cpt.php:572 ../classes/class-ccf-form-cpt.php:575
305
+ #: ../classes/class-ccf-form-manager.php:81
306
+ msgid "New Form"
307
+ msgstr "Nouveau formulaire"
308
+
309
+ #: ../classes/class-ccf-form-cpt.php:573
310
+ msgid "Add New Form"
311
+ msgstr "Ajouter un formulaire"
312
+
313
+ #: ../classes/class-ccf-form-cpt.php:574
314
+ msgid "Edit Form"
315
+ msgstr "Modifier le formulaire"
316
+
317
+ #: ../classes/class-ccf-form-cpt.php:577
318
+ msgid "View Form"
319
+ msgstr "Voir le formulaire"
320
+
321
+ #: ../classes/class-ccf-form-cpt.php:578
322
+ msgid "Search Forms"
323
+ msgstr "Recherchez un formulaire"
324
+
325
+ #: ../classes/class-ccf-form-cpt.php:579
326
+ msgid "No forms found."
327
+ msgstr "Pas de formulaire trouvé."
328
+
329
+ #: ../classes/class-ccf-form-cpt.php:580
330
+ msgid "No forms found in trash."
331
+ msgstr "Pas de formulaires trouvés dans la corbeille."
332
+
333
+ #: ../classes/class-ccf-form-handler.php:127 ../classes/class-ccf-form-handler.php:208
334
+ #: ../classes/class-ccf-form-handler.php:245 ../classes/class-ccf-form-handler.php:323
335
+ #: ../classes/class-ccf-form-handler.php:327 ../classes/class-ccf-form-handler.php:331
336
+ #: ../classes/class-ccf-form-handler.php:335 ../classes/class-ccf-form-handler.php:340
337
+ #: ../classes/class-ccf-form-handler.php:365 ../classes/class-ccf-form-handler.php:373
338
+ #: ../classes/class-ccf-form-handler.php:381 ../classes/class-ccf-form-handler.php:435
339
+ #: ../classes/class-ccf-form-renderer.php:49
340
+ msgid "This field is required."
341
+ msgstr "Ce champ est obligatoire."
342
+
343
+ #: ../classes/class-ccf-form-handler.php:138
344
+ #, php-format
345
+ msgid "This file is too big (%d MB max)"
346
+ msgstr ""
347
+
348
+ #: ../classes/class-ccf-form-handler.php:142
349
+ msgid "An upload error occurred."
350
+ msgstr "Il y a eu une erreur pendant le téléchargement."
351
+
352
+ #: ../classes/class-ccf-form-handler.php:164
353
+ msgid "File contains an invalid extension."
354
+ msgstr "Extension de fichier invalide."
355
+
356
+ #: ../classes/class-ccf-form-handler.php:261 ../classes/class-ccf-form-renderer.php:56
357
+ msgid "Your reCAPTCHA response was incorrect."
358
+ msgstr "Votre réponse reCAPTCHA était erronée."
359
+
360
+ #: ../classes/class-ccf-form-handler.php:280
361
+ msgid "This field is required"
362
+ msgstr "Ce champ est obligatoire"
363
+
364
+ #: ../classes/class-ccf-form-handler.php:285
365
+ msgid "This phone number is too short"
366
+ msgstr "Ce numéro de téléphone est trop court"
367
+
368
+ #: ../classes/class-ccf-form-handler.php:288
369
+ msgid "ccf_field_phoneFormat"
370
+ msgstr ""
371
+
372
+ #: ../classes/class-ccf-form-handler.php:291
373
+ msgid "This phone number contains invalid characters."
374
+ msgstr "Ce numéro de téléphone contient des caractères invalides."
375
+
376
+ #: ../classes/class-ccf-form-handler.php:297
377
+ msgid "This phone number is not 10 digits."
378
+ msgstr "Ce n’est pas un numéro de téléphone à 10 chiffres"
379
+
380
+ #: ../classes/class-ccf-form-handler.php:368 ../classes/class-ccf-form-handler.php:384
381
+ msgid "This is not a valid email"
382
+ msgstr "Ce n’est pas une adresse mél valide"
383
+
384
+ #: ../classes/class-ccf-form-handler.php:376 ../classes/class-ccf-form-renderer.php:54
385
+ msgid "Emails do not match."
386
+ msgstr "Les adresses mél ne correspondent pas."
387
+
388
+ #: ../classes/class-ccf-form-handler.php:409
389
+ msgid "First name is required."
390
+ msgstr "Prénom obligatoire."
391
+
392
+ #: ../classes/class-ccf-form-handler.php:413
393
+ msgid "Last name is required."
394
+ msgstr "Nom obligatoire."
395
+
396
+ #: ../classes/class-ccf-form-handler.php:438 ../classes/class-ccf-form-renderer.php:66
397
+ msgid "This is not a valid URL. URL's must start with http(s)://"
398
+ msgstr "URL invalide. Les URLs doivent commencer par http:// ou https://"
399
+
400
+ #: ../classes/class-ccf-form-handler.php:466 ../classes/class-ccf-form-handler.php:498
401
+ #: ../classes/class-ccf-form-renderer.php:50
402
+ msgid "Date is required."
403
+ msgstr "La date est obligatoire."
404
+
405
+ #: ../classes/class-ccf-form-handler.php:469 ../classes/class-ccf-form-handler.php:501
406
+ #: ../classes/class-ccf-form-renderer.php:61
407
+ msgid "This date is not valid."
408
+ msgstr "Cette date est invalide."
409
+
410
+ #: ../classes/class-ccf-form-handler.php:474 ../classes/class-ccf-form-handler.php:506
411
+ #: ../classes/class-ccf-form-renderer.php:51
412
+ msgid "Hour is required."
413
+ msgstr "L’heure est obligatoire."
414
+
415
+ #: ../classes/class-ccf-form-handler.php:477 ../classes/class-ccf-form-handler.php:509
416
+ #: ../classes/class-ccf-form-renderer.php:60
417
+ msgid "This is not a valid hour."
418
+ msgstr "Ce n’est une heure valide."
419
+
420
+ #: ../classes/class-ccf-form-handler.php:482 ../classes/class-ccf-form-handler.php:514
421
+ #: ../classes/class-ccf-form-renderer.php:52
422
+ msgid "Minute is required."
423
+ msgstr "Les minutes sont obligatoires."
424
+
425
+ #: ../classes/class-ccf-form-handler.php:485 ../classes/class-ccf-form-handler.php:517
426
+ #: ../classes/class-ccf-form-renderer.php:62
427
+ msgid "This is not a valid minute."
428
+ msgstr "Cette minute est invalide."
429
+
430
+ #: ../classes/class-ccf-form-handler.php:490 ../classes/class-ccf-form-handler.php:522
431
+ #: ../classes/class-ccf-form-renderer.php:53
432
+ msgid "AM/PM is required."
433
+ msgstr "AM/PM est obligatoire."
434
+
435
+ #: ../classes/class-ccf-form-handler.php:708
436
+ msgid "*Hidden Field*"
437
+ msgstr "*Champ caché*"
438
+
439
+ #: ../classes/class-ccf-form-handler.php:782
440
+ msgid "Form submitted from"
441
+ msgstr "Formulaire soumis depuis"
442
+
443
+ #: ../classes/class-ccf-form-handler.php:791
444
+ msgid "Form submitter IP"
445
+ msgstr "Adresse IP de soumission"
446
+
447
+ #: ../classes/class-ccf-form-handler.php:846
448
+ #, php-format
449
+ msgid "%s: Form Submission"
450
+ msgstr "%s: Soumissions de formulaire"
451
+
452
+ #: ../classes/class-ccf-form-handler.php:848
453
+ #, php-format
454
+ msgid " to \"%s\""
455
+ msgstr ""
456
+
457
+ #: ../classes/class-ccf-form-handler.php:863 ../classes/class-ccf-form-renderer.php:134
458
+ msgid "Thank you for your submission."
459
+ msgstr "Merci pour votre soumission"
460
+
461
+ #: ../classes/class-ccf-form-manager.php:63
462
+ msgid "Custom Contact Forms is experiencing issues."
463
+ msgstr ""
464
+
465
+ #: ../classes/class-ccf-form-manager.php:67
466
+ #, php-format
467
+ msgid ""
468
+ "There is an issue with synchronizing data. Please try deactivating all other plugins "
469
+ "and activating the TwentyFifteen theme. If this fixes the problem, you have a plugin or "
470
+ "theme conflict. If it does not, please post in the <a href=\"%s\">support forums</a> or "
471
+ "<a href=\"%s\">Github</a>."
472
+ msgstr ""
473
+
474
+ #: ../classes/class-ccf-form-manager.php:78
475
+ msgid "Manage Forms"
476
+ msgstr "Gérer les formulaires"
477
+
478
+ #: ../classes/class-ccf-form-manager.php:82
479
+ msgid "Existing Forms"
480
+ msgstr "Formulaires existants"
481
+
482
+ #: ../classes/class-ccf-form-manager.php:106
483
+ msgid "Standard Fields"
484
+ msgstr "Champs standards"
485
+
486
+ #: ../classes/class-ccf-form-manager.php:112
487
+ msgid "Special Fields"
488
+ msgstr "Champs spéciaux"
489
+
490
+ #: ../classes/class-ccf-form-manager.php:118
491
+ msgid "Structure"
492
+ msgstr ""
493
+
494
+ #: ../classes/class-ccf-form-manager.php:127
495
+ msgid "&larr; Drag fields from the left here."
496
+ msgstr "&larr; Déplacer les champs à gauche jusqu’ici."
497
+
498
+ #: ../classes/class-ccf-form-manager.php:133 ../classes/class-ccf-form-manager.php:1250
499
+ msgid "Insert into post"
500
+ msgstr "Insérer dans l’article"
501
+
502
+ #: ../classes/class-ccf-form-manager.php:134
503
+ msgid "Save Form"
504
+ msgstr "Enregistrer le formulaire"
505
+
506
+ #: ../classes/class-ccf-form-manager.php:140
507
+ msgid "Form Settings"
508
+ msgstr "Paramètres du formulaire"
509
+
510
+ #: ../classes/class-ccf-form-manager.php:143
511
+ msgid "Form Title:"
512
+ msgstr "Titre du formulaire :"
513
+
514
+ #: ../classes/class-ccf-form-manager.php:148
515
+ msgid "Form Description:"
516
+ msgstr "Description du formulaire :"
517
+
518
+ #: ../classes/class-ccf-form-manager.php:153
519
+ msgid "Button Text:"
520
+ msgstr "Texte du bouton :"
521
+
522
+ #: ../classes/class-ccf-form-manager.php:158
523
+ msgid "On form completion:"
524
+ msgstr "A la validation du formulaire :"
525
+
526
+ #: ../classes/class-ccf-form-manager.php:161
527
+ msgid "Show text"
528
+ msgstr "Afficher un message"
529
+
530
+ #: ../classes/class-ccf-form-manager.php:162
531
+ msgid "Redirect"
532
+ msgstr "Rediriger"
533
+
534
+ #: ../classes/class-ccf-form-manager.php:166
535
+ msgid "Redirect URL:"
536
+ msgstr "URL de redirection"
537
+
538
+ #: ../classes/class-ccf-form-manager.php:170
539
+ msgid "Completion Message:"
540
+ msgstr "Message de validation :"
541
+
542
+ #: ../classes/class-ccf-form-manager.php:174
543
+ msgid "Pause form:"
544
+ msgstr "Bloquer ce formulaire :"
545
+
546
+ #: ../classes/class-ccf-form-manager.php:177 ../classes/class-ccf-form-manager.php:196
547
+ #: ../classes/class-ccf-form-manager.php:328 ../classes/class-ccf-form-manager.php:378
548
+ #: ../classes/class-ccf-form-manager.php:454 ../classes/class-ccf-form-manager.php:544
549
+ #: ../classes/class-ccf-form-manager.php:609 ../classes/class-ccf-form-manager.php:651
550
+ #: ../classes/class-ccf-form-manager.php:712 ../classes/class-ccf-form-manager.php:759
551
+ #: ../classes/class-ccf-form-manager.php:801 ../classes/class-ccf-form-manager.php:808
552
+ #: ../classes/class-ccf-form-manager.php:859 ../classes/class-ccf-form-manager.php:902
553
+ #: ../classes/class-ccf-form-manager.php:945
554
+ msgid "No"
555
+ msgstr "Non"
556
+
557
+ #: ../classes/class-ccf-form-manager.php:178 ../classes/class-ccf-form-manager.php:195
558
+ #: ../classes/class-ccf-form-manager.php:327 ../classes/class-ccf-form-manager.php:377
559
+ #: ../classes/class-ccf-form-manager.php:453 ../classes/class-ccf-form-manager.php:543
560
+ #: ../classes/class-ccf-form-manager.php:608 ../classes/class-ccf-form-manager.php:650
561
+ #: ../classes/class-ccf-form-manager.php:711 ../classes/class-ccf-form-manager.php:758
562
+ #: ../classes/class-ccf-form-manager.php:800 ../classes/class-ccf-form-manager.php:807
563
+ #: ../classes/class-ccf-form-manager.php:858 ../classes/class-ccf-form-manager.php:901
564
+ #: ../classes/class-ccf-form-manager.php:944
565
+ msgid "Yes"
566
+ msgstr "Oui"
567
+
568
+ #: ../classes/class-ccf-form-manager.php:182
569
+ msgid "Pause Message:"
570
+ msgstr "Message de blocage :"
571
+
572
+ #: ../classes/class-ccf-form-manager.php:189
573
+ msgid "Form Notifications"
574
+ msgstr "Notifications du formulaire"
575
+
576
+ #: ../classes/class-ccf-form-manager.php:192
577
+ msgid "Send Email Notifications:"
578
+ msgstr "Envoyer un mél de notification :"
579
+
580
+ #: ../classes/class-ccf-form-manager.php:201
581
+ msgid "\"To\" Email Addresses (comma separated):"
582
+ msgstr "Adresses mél de destination (séparée par une virgule) :"
583
+
584
+ #: ../classes/class-ccf-form-manager.php:206
585
+ msgid "\"From\" Email Address Type:"
586
+ msgstr "Type d’adresse mél d’origine"
587
+
588
+ #: ../classes/class-ccf-form-manager.php:208
589
+ msgid "WordPress Default"
590
+ msgstr "Wordpress par défaut"
591
+
592
+ #: ../classes/class-ccf-form-manager.php:209
593
+ msgid "Custom Email"
594
+ msgstr "Mél personnalisé"
595
+
596
+ #: ../classes/class-ccf-form-manager.php:210 ../classes/class-ccf-form-manager.php:231
597
+ msgid "Form Field"
598
+ msgstr "Champ du formulaire"
599
+
600
+ #: ../classes/class-ccf-form-manager.php:213
601
+ msgid ""
602
+ "You can set the notification emails from address to be the WP default, a custom email "
603
+ "address, or pull the address from a field in the form."
604
+ msgstr ""
605
+
606
+ #: ../classes/class-ccf-form-manager.php:217
607
+ msgid "Custom \"From\" Email Address:"
608
+ msgstr ""
609
+
610
+ #: ../classes/class-ccf-form-manager.php:222
611
+ msgid "Pull \"From\" Email Dynamically from Field:"
612
+ msgstr ""
613
+
614
+ #: ../classes/class-ccf-form-manager.php:228
615
+ msgid "\"From\" Name Type:"
616
+ msgstr ""
617
+
618
+ #: ../classes/class-ccf-form-manager.php:230
619
+ msgid "Custom Name"
620
+ msgstr "Nom personnalisé"
621
+
622
+ #: ../classes/class-ccf-form-manager.php:234
623
+ msgid ""
624
+ "You can set the notification emails from name to be a custom name or pull the name from "
625
+ "a field in the form."
626
+ msgstr ""
627
+
628
+ #: ../classes/class-ccf-form-manager.php:238
629
+ msgid "Custom \"From\" Name:"
630
+ msgstr ""
631
+
632
+ #: ../classes/class-ccf-form-manager.php:243
633
+ msgid "Pull \"From\" Name Dynamically from Field:"
634
+ msgstr ""
635
+
636
+ #: ../classes/class-ccf-form-manager.php:257
637
+ msgid "items"
638
+ msgstr ""
639
+
640
+ #: ../classes/class-ccf-form-manager.php:272 ../classes/class-ccf-form-manager.php:285
641
+ msgid "ID"
642
+ msgstr ""
643
+
644
+ #: ../classes/class-ccf-form-manager.php:273 ../classes/class-ccf-form-manager.php:286
645
+ msgid "Title"
646
+ msgstr "Titre"
647
+
648
+ #: ../classes/class-ccf-form-manager.php:300
649
+ msgid "<span>&larr;</span> Click on a field to edit it."
650
+ msgstr "<span>&larr;</span> Cliquez sur un champ pour le modifier."
651
+
652
+ #: ../classes/class-ccf-form-manager.php:309 ../classes/class-ccf-form-manager.php:353
653
+ #: ../classes/class-ccf-form-manager.php:435 ../classes/class-ccf-form-manager.php:525
654
+ msgid "Internal Unique Slug"
655
+ msgstr ""
656
+
657
+ #: ../classes/class-ccf-form-manager.php:313 ../classes/class-ccf-form-manager.php:357
658
+ #: ../classes/class-ccf-form-manager.php:400 ../classes/class-ccf-form-manager.php:439
659
+ #: ../classes/class-ccf-form-manager.php:529 ../classes/class-ccf-form-manager.php:598
660
+ #: ../classes/class-ccf-form-manager.php:634 ../classes/class-ccf-form-manager.php:690
661
+ #: ../classes/class-ccf-form-manager.php:741 ../classes/class-ccf-form-manager.php:784
662
+ #: ../classes/class-ccf-form-manager.php:848 ../classes/class-ccf-form-manager.php:891
663
+ #: ../classes/class-ccf-form-manager.php:934
664
+ msgid "Label:"
665
+ msgstr "Libellé:"
666
+
667
+ #: ../classes/class-ccf-form-manager.php:317 ../classes/class-ccf-form-manager.php:361
668
+ #: ../classes/class-ccf-form-manager.php:404 ../classes/class-ccf-form-manager.php:443
669
+ #: ../classes/class-ccf-form-manager.php:533 ../classes/class-ccf-form-manager.php:602
670
+ #: ../classes/class-ccf-form-manager.php:638 ../classes/class-ccf-form-manager.php:694
671
+ #: ../classes/class-ccf-form-manager.php:745 ../classes/class-ccf-form-manager.php:788
672
+ #: ../classes/class-ccf-form-manager.php:852 ../classes/class-ccf-form-manager.php:895
673
+ #: ../classes/class-ccf-form-manager.php:938
674
+ msgid "Description:"
675
+ msgstr "Description :"
676
+
677
+ #: ../classes/class-ccf-form-manager.php:321 ../classes/class-ccf-form-manager.php:447
678
+ #: ../classes/class-ccf-form-manager.php:537 ../classes/class-ccf-form-manager.php:573
679
+ #: ../classes/class-ccf-form-manager.php:643 ../classes/class-ccf-form-manager.php:698
680
+ #: ../classes/class-ccf-form-manager.php:793
681
+ msgid "Initial Value:"
682
+ msgstr "Valeur par défaut :"
683
+
684
+ #: ../classes/class-ccf-form-manager.php:325 ../classes/class-ccf-form-manager.php:375
685
+ #: ../classes/class-ccf-form-manager.php:451 ../classes/class-ccf-form-manager.php:541
686
+ #: ../classes/class-ccf-form-manager.php:606 ../classes/class-ccf-form-manager.php:648
687
+ #: ../classes/class-ccf-form-manager.php:709 ../classes/class-ccf-form-manager.php:756
688
+ #: ../classes/class-ccf-form-manager.php:798 ../classes/class-ccf-form-manager.php:856
689
+ #: ../classes/class-ccf-form-manager.php:899 ../classes/class-ccf-form-manager.php:942
690
+ msgid "Required:"
691
+ msgstr "Obligatoire :"
692
+
693
+ #: ../classes/class-ccf-form-manager.php:334 ../classes/class-ccf-form-manager.php:384
694
+ #: ../classes/class-ccf-form-manager.php:420 ../classes/class-ccf-form-manager.php:460
695
+ #: ../classes/class-ccf-form-manager.php:485 ../classes/class-ccf-form-manager.php:510
696
+ #: ../classes/class-ccf-form-manager.php:550 ../classes/class-ccf-form-manager.php:579
697
+ #: ../classes/class-ccf-form-manager.php:615 ../classes/class-ccf-form-manager.php:665
698
+ #: ../classes/class-ccf-form-manager.php:718 ../classes/class-ccf-form-manager.php:765
699
+ #: ../classes/class-ccf-form-manager.php:814 ../classes/class-ccf-form-manager.php:872
700
+ #: ../classes/class-ccf-form-manager.php:915 ../classes/class-ccf-form-manager.php:958
701
+ msgid "Advanced"
702
+ msgstr "Avancé"
703
+
704
+ #: ../classes/class-ccf-form-manager.php:337 ../classes/class-ccf-form-manager.php:387
705
+ #: ../classes/class-ccf-form-manager.php:423 ../classes/class-ccf-form-manager.php:463
706
+ #: ../classes/class-ccf-form-manager.php:488 ../classes/class-ccf-form-manager.php:513
707
+ #: ../classes/class-ccf-form-manager.php:553 ../classes/class-ccf-form-manager.php:582
708
+ #: ../classes/class-ccf-form-manager.php:618 ../classes/class-ccf-form-manager.php:668
709
+ #: ../classes/class-ccf-form-manager.php:721 ../classes/class-ccf-form-manager.php:768
710
+ #: ../classes/class-ccf-form-manager.php:817 ../classes/class-ccf-form-manager.php:875
711
+ #: ../classes/class-ccf-form-manager.php:918 ../classes/class-ccf-form-manager.php:961
712
+ msgid "Class Name:"
713
+ msgstr "Nom de la classe :"
714
+
715
+ #: ../classes/class-ccf-form-manager.php:341 ../classes/class-ccf-form-manager.php:467
716
+ #: ../classes/class-ccf-form-manager.php:557 ../classes/class-ccf-form-manager.php:673
717
+ #: ../classes/class-ccf-form-manager.php:725 ../classes/class-ccf-form-manager.php:822
718
+ msgid "Placeholder Text:"
719
+ msgstr "Texte de substitution :"
720
+
721
+ #: ../classes/class-ccf-form-manager.php:365
722
+ msgid "Allowed File Extensions (comma separate):"
723
+ msgstr "Extensions de fichier autorisées (séparées par une virgule) :"
724
+
725
+ #: ../classes/class-ccf-form-manager.php:367
726
+ msgid ""
727
+ "If left blank, will default to all extensions registered by WordPress. If you use a "
728
+ "file extension or mime type not <a href=\"http://codex.wordpress.org/Function_Reference/"
729
+ "get_allowed_mime_types\">whitelisted by WordPress</a>, you will need to filter and "
730
+ "manually whitelist the new extension."
731
+ msgstr ""
732
+
733
+ #: ../classes/class-ccf-form-manager.php:370
734
+ msgid "Max File Size (in MB):"
735
+ msgstr ""
736
+
737
+ #: ../classes/class-ccf-form-manager.php:372
738
+ #, php-format
739
+ msgid "If left blank, will default to %d MB. Maximum allowed by server is %d MB."
740
+ msgstr ""
741
+
742
+ #: ../classes/class-ccf-form-manager.php:398
743
+ msgid ""
744
+ "reCAPTCHA is a simple captcha service provided by Google. <a target=\"_blank\" href="
745
+ "\"https://www.google.com/recaptcha/intro/index.html\">Learn more</a>"
746
+ msgstr ""
747
+ "reCAPTCHA est un service simple de <abbr title=‘Tests permettant de différencier de "
748
+ "manière automatisée un utilisateur humain d'un ordinateur’>captcha</abbr> fourni par "
749
+ "Gooogle. <a target=\"_blank\" href=\"https://www.google.com/recaptcha/intro/index.html"
750
+ "\">En savoir plus</a>"
751
+
752
+ #: ../classes/class-ccf-form-manager.php:408
753
+ msgid "Site Key:"
754
+ msgstr "Clé du site :"
755
+
756
+ #: ../classes/class-ccf-form-manager.php:410 ../classes/class-ccf-form-manager.php:415
757
+ msgid "Don't have one?"
758
+ msgstr "Vous n’en avez pas ?"
759
+
760
+ #: ../classes/class-ccf-form-manager.php:413
761
+ msgid "Secret Key:"
762
+ msgstr "Clé secrète :"
763
+
764
+ #: ../classes/class-ccf-form-manager.php:476 ../classes/class-ccf-form-manager.php:497
765
+ #: ../classes/class-ccf-form-manager.php:522 ../classes/class-ccf-form-manager.php:566
766
+ #: ../classes/class-ccf-form-manager.php:591 ../classes/class-ccf-form-manager.php:627
767
+ #: ../classes/class-ccf-form-manager.php:683 ../classes/class-ccf-form-manager.php:734
768
+ #: ../classes/class-ccf-form-manager.php:777 ../classes/class-ccf-form-manager.php:841
769
+ #: ../classes/class-ccf-form-manager.php:884 ../classes/class-ccf-form-manager.php:927
770
+ msgid "Basic"
771
+ msgstr "Basique"
772
+
773
+ #: ../classes/class-ccf-form-manager.php:479
774
+ msgid "HTML Content:"
775
+ msgstr ""
776
+
777
+ #: ../classes/class-ccf-form-manager.php:500
778
+ msgid "Heading:"
779
+ msgstr "Titre :"
780
+
781
+ #: ../classes/class-ccf-form-manager.php:504
782
+ msgid "Sub Heading:"
783
+ msgstr "Sous-titre :"
784
+
785
+ #: ../classes/class-ccf-form-manager.php:569 ../classes/class-ccf-form-manager.php:594
786
+ #: ../classes/class-ccf-form-manager.php:630 ../classes/class-ccf-form-manager.php:686
787
+ #: ../classes/class-ccf-form-manager.php:737 ../classes/class-ccf-form-manager.php:780
788
+ #: ../classes/class-ccf-form-manager.php:844 ../classes/class-ccf-form-manager.php:887
789
+ #: ../classes/class-ccf-form-manager.php:930
790
+ msgid "Internal Unique Slug (a-z, 0-9, -, _):"
791
+ msgstr ""
792
+
793
+ #: ../classes/class-ccf-form-manager.php:656
794
+ msgid "Enable Date Select"
795
+ msgstr "Autoriser la sélection de la date"
796
+
797
+ #: ../classes/class-ccf-form-manager.php:660
798
+ msgid "Enable Time Select"
799
+ msgstr "Autoriser la sélection de l’heure"
800
+
801
+ #: ../classes/class-ccf-form-manager.php:702
802
+ msgid "Format:"
803
+ msgstr "Format :"
804
+
805
+ #: ../classes/class-ccf-form-manager.php:705 ../classes/class-ccf-form-manager.php:752
806
+ msgid "International"
807
+ msgstr ""
808
+
809
+ #: ../classes/class-ccf-form-manager.php:749
810
+ msgid "Type:"
811
+ msgstr "Type :"
812
+
813
+ #: ../classes/class-ccf-form-manager.php:751
814
+ msgid "United States"
815
+ msgstr "Etats-Unis"
816
+
817
+ #: ../classes/class-ccf-form-manager.php:805
818
+ msgid "Require Confirmation:"
819
+ msgstr "Confirmation obligatoire :"
820
+
821
+ #: ../classes/class-ccf-form-manager.php:833
822
+ msgid "Label"
823
+ msgstr "Libellé"
824
+
825
+ #: ../classes/class-ccf-form-manager.php:834
826
+ msgid "Value"
827
+ msgstr "Valeur"
828
+
829
+ #: ../classes/class-ccf-form-manager.php:863 ../classes/class-ccf-form-manager.php:906
830
+ #: ../classes/class-ccf-form-manager.php:949
831
+ msgid "Manage field choices:"
832
+ msgstr "Gérer les valeurs du champ :"
833
+
834
+ #: ../classes/class-ccf-form-manager.php:867 ../classes/class-ccf-form-manager.php:910
835
+ #: ../classes/class-ccf-form-manager.php:953
836
+ msgid ""
837
+ "Note: If an option does not have a \"value\", it will not be considered a valid "
838
+ "selection if the field is required. The \"value\" is what's read, stored, and displayed "
839
+ "in the submission."
840
+ msgstr ""
841
+
842
+ #: ../classes/class-ccf-form-manager.php:970
843
+ msgid "You currently have no forms. Add some!"
844
+ msgstr ""
845
+
846
+ #: ../classes/class-ccf-form-manager.php:993
847
+ msgid "Allowed file extensions are {{ extensions }}. "
848
+ msgstr ""
849
+
850
+ #: ../classes/class-ccf-form-manager.php:995
851
+ msgid "Max file size is {{ file_size }} MB. "
852
+ msgstr "La taille maximum du fichier est de {{file_size}} Mo. "
853
+
854
+ #: ../classes/class-ccf-form-manager.php:1020 ../classes/class-ccf-form-manager.php:1036
855
+ #: ../classes/class-ccf-form-manager.php:1054
856
+ msgid "An example choice"
857
+ msgstr ""
858
+
859
+ #: ../classes/class-ccf-form-manager.php:1072
860
+ msgid "Arbitrary block of HTML."
861
+ msgstr "Bloc de code HTML"
862
+
863
+ #: ../classes/class-ccf-form-manager.php:1078
864
+ msgid "Section Heading"
865
+ msgstr "Titre de section"
866
+
867
+ #: ../classes/class-ccf-form-manager.php:1080
868
+ msgid "This is the sub-heading text."
869
+ msgstr "C’est un texte de sous-titre."
870
+
871
+ #: ../classes/class-ccf-form-manager.php:1211
872
+ msgid "email@example.com"
873
+ msgstr "nom@exemple.fr"
874
+
875
+ #: ../classes/class-ccf-form-manager.php:1249
876
+ msgid "Edit"
877
+ msgstr "Modifier"
878
+
879
+ #: ../classes/class-ccf-form-manager.php:1251
880
+ msgid "Trash"
881
+ msgstr "Corbeille"
882
+
883
+ #: ../classes/class-ccf-form-manager.php:1294
884
+ msgid "There is a problem with this form. Is it trashed or deleted?"
885
+ msgstr ""
886
+
887
+ #: ../classes/class-ccf-form-manager.php:1436
888
+ msgid "IP Address"
889
+ msgstr "Adresse IP"
890
+
891
+ #: ../classes/class-ccf-form-manager.php:1448
892
+ msgid "There are no submissions."
893
+ msgstr ""
894
+
895
+ #: ../classes/class-ccf-form-manager.php:1477
896
+ msgid "Add Form"
897
+ msgstr "Ajouter un formulaire"
898
+
899
+ #: ../classes/class-ccf-form-manager.php:1501
900
+ msgid "Single Line Text"
901
+ msgstr "Texte"
902
+
903
+ #: ../classes/class-ccf-form-manager.php:1502
904
+ msgid "Dropdown"
905
+ msgstr "Liste déroulante"
906
+
907
+ #: ../classes/class-ccf-form-manager.php:1503
908
+ msgid "Checkboxes"
909
+ msgstr "Case à cocher"
910
+
911
+ #: ../classes/class-ccf-form-manager.php:1504
912
+ msgid "Radio Buttons"
913
+ msgstr "Boutons radio"
914
+
915
+ #: ../classes/class-ccf-form-manager.php:1505
916
+ msgid "Paragraph Text"
917
+ msgstr "Zone de texte"
918
+
919
+ #: ../classes/class-ccf-form-manager.php:1506
920
+ msgid "Hidden"
921
+ msgstr "Caché"
922
+
923
+ #: ../classes/class-ccf-form-manager.php:1507
924
+ msgid "File Upload"
925
+ msgstr "Envoi de fichier"
926
+
927
+ #: ../classes/class-ccf-form-manager.php:1511
928
+ msgid "HTML"
929
+ msgstr ""
930
+
931
+ #: ../classes/class-ccf-form-manager.php:1512
932
+ msgid "Section Header"
933
+ msgstr "Entête de section"
934
+
935
+ #: ../classes/class-ccf-form-manager.php:1517
936
+ msgid "Name"
937
+ msgstr "Nom"
938
+
939
+ #: ../classes/class-ccf-form-manager.php:1518
940
+ msgid "Date/Time"
941
+ msgstr "Date/Heure"
942
+
943
+ #: ../classes/class-ccf-form-manager.php:1519
944
+ msgid "Website"
945
+ msgstr "Site internet"
946
+
947
+ #: ../classes/class-ccf-form-manager.php:1520
948
+ msgid "Address"
949
+ msgstr "Adresse"
950
+
951
+ #: ../classes/class-ccf-form-manager.php:1521
952
+ msgid "Phone"
953
+ msgstr "Téléphone"
954
+
955
+ #: ../classes/class-ccf-form-manager.php:1522
956
+ msgid "reCAPTCHA"
957
+ msgstr ""
958
+
959
+ #: ../classes/class-ccf-form-manager.php:1541
960
+ msgid "You have no email fields"
961
+ msgstr "Vous n’avez pas de champ mél"
962
+
963
+ #: ../classes/class-ccf-form-manager.php:1542
964
+ msgid "You have no name fields"
965
+ msgstr "Vous n’avez pas de champ nom"
966
+
967
+ #: ../classes/class-ccf-form-manager.php:1543
968
+ msgid "Invalid date"
969
+ msgstr "Date invalide"
970
+
971
+ #: ../classes/class-ccf-form-manager.php:1545
972
+ msgid "Form Submission"
973
+ msgstr "Soumission du formulaire"
974
+
975
+ #: ../classes/class-ccf-form-manager.php:1546 ../classes/class-ccf-form-renderer.php:120
976
+ msgid "This form is paused right now. Check back later!"
977
+ msgstr "Ce formulaire est bloqué. Ressayer plus tard !"
978
+
979
+ #: ../classes/class-ccf-form-renderer.php:55
980
+ msgid "This is not a valid email address."
981
+ msgstr "Ce n’est pas une adresse mél valide."
982
+
983
+ #: ../classes/class-ccf-form-renderer.php:58
984
+ msgid "This is not a valid phone number."
985
+ msgstr "Ce n’est pas un numéro de téléphone valide."
986
+
987
+ #: ../classes/class-ccf-form-renderer.php:59
988
+ msgid "This phone number is not 10 digits"
989
+ msgstr "Ce n’est pas un numéro de téléphone à 10 chiffres"
990
+
991
+ #: ../classes/class-ccf-form-renderer.php:63
992
+ msgid "This is not an allowed file extension"
993
+ msgstr "Ce n’est pas une extension de fichier autorisée"
994
+
995
+ #: ../classes/class-ccf-form-renderer.php:64
996
+ msgid "This file is bigger than"
997
+ msgstr "Ce fichier est plus grand que"
998
+
999
+ #: ../classes/class-ccf-form-renderer.php:65
1000
+ msgid "An unknown error occured."
1001
+ msgstr ""
1002
+
1003
+ #: ../classes/class-ccf-submission-cpt.php:41
1004
+ msgid "Form Submissions"
1005
+ msgstr "Soumissions de formulaire"
1006
+
1007
+ #: ../classes/class-ccf-upgrader.php:37
1008
+ msgid ""
1009
+ "Did you just upgrade to a post 6.0 version of Custom Contact Forms? If so, you might "
1010
+ "need to upgrade your database to use your old forms. Please backup your database before "
1011
+ "running the upgrade."
1012
+ msgstr ""
1013
+
1014
+ #: ../classes/class-ccf-upgrader.php:38
1015
+ msgid "Upgrade"
1016
+ msgstr ""
1017
+
1018
+ #: ../classes/class-ccf-upgrader.php:39
1019
+ msgid "Dismiss"
1020
+ msgstr ""
1021
+
1022
+ #: ../classes/class-ccf-upgrader.php:61
1023
+ msgid "Database update complete."
1024
+ msgstr ""
1025
+
1026
+ #: ../classes/class-ccf-widget.php:17
1027
+ msgid "Add a custom contact form to a sidebar."
1028
+ msgstr ""
1029
+
1030
+ #: ../classes/class-ccf-widget.php:18
1031
+ msgid "Custom Contact Form"
1032
+ msgstr ""
1033
+
1034
+ #: ../classes/class-ccf-widget.php:64
1035
+ msgid "Title:"
1036
+ msgstr "Titre :"
1037
+
1038
+ #: ../classes/class-ccf-widget.php:71
1039
+ msgid "Choose a form:"
1040
+ msgstr ""
1041
+
1042
+ #: ../classes/class-ccf-widget.php:80
1043
+ msgid "Untitled"
1044
+ msgstr "Sans titre"
1045
+
1046
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-comments.php:42
1047
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-comments.php:48
1048
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-comments.php:108
1049
+ msgid "Invalid comment ID."
1050
+ msgstr ""
1051
+
1052
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-comments.php:52
1053
+ msgid "Sorry, you are not allowed to delete this comment."
1054
+ msgstr ""
1055
+
1056
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-comments.php:58
1057
+ msgid "The comment cannot be deleted."
1058
+ msgstr ""
1059
+
1060
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-comments.php:62
1061
+ msgid "Permanently deleted comment"
1062
+ msgstr ""
1063
+
1064
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-comments.php:65
1065
+ msgid "Deleted comment"
1066
+ msgstr ""
1067
+
1068
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-customposttype.php:33
1069
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-meta.php:29
1070
+ msgid "The route base must be overridden"
1071
+ msgstr ""
1072
+
1073
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-customposttype.php:37
1074
+ msgid "The post type must be overridden"
1075
+ msgstr ""
1076
+
1077
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-customposttype.php:115
1078
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-customposttype.php:136
1079
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-customposttype.php:161
1080
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-customposttype.php:182
1081
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-media.php:35
1082
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-media.php:78
1083
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-media.php:153
1084
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-media.php:174
1085
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-media.php:205
1086
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-posts.php:768
1087
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-posts.php:788
1088
+ msgid "Invalid post type"
1089
+ msgstr ""
1090
+
1091
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-media.php:210
1092
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-posts.php:803
1093
+ msgid "Sorry, you are not allowed to post on this site."
1094
+ msgstr ""
1095
+
1096
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-media.php:215
1097
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-posts.php:795
1098
+ msgid "Sorry, you are not allowed to edit this post."
1099
+ msgstr ""
1100
+
1101
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-media.php:288
1102
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-media.php:371
1103
+ msgid "No data supplied"
1104
+ msgstr ""
1105
+
1106
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-media.php:292
1107
+ msgid "No Content-Type supplied"
1108
+ msgstr ""
1109
+
1110
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-media.php:296
1111
+ msgid "No Content-Disposition supplied"
1112
+ msgstr ""
1113
+
1114
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-media.php:315
1115
+ msgid "Invalid Content-Disposition supplied"
1116
+ msgstr ""
1117
+
1118
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-media.php:323
1119
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-media.php:378
1120
+ msgid "Content hash did not match expected"
1121
+ msgstr ""
1122
+
1123
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-media.php:336
1124
+ msgid "Could not open file handle"
1125
+ msgstr ""
1126
+
1127
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-media.php:414
1128
+ msgid "Invalid featured image."
1129
+ msgstr ""
1130
+
1131
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-meta-posts.php:34
1132
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-posts.php:655
1133
+ msgid "Sorry, you cannot edit this post"
1134
+ msgstr ""
1135
+
1136
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-meta.php:33
1137
+ msgid "The object type must be overridden"
1138
+ msgstr ""
1139
+
1140
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-meta.php:134
1141
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-meta.php:241
1142
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-meta.php:388
1143
+ msgid "Invalid meta ID."
1144
+ msgstr ""
1145
+
1146
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-meta.php:138
1147
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-meta.php:245
1148
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-meta.php:392
1149
+ msgid "Meta does not belong to this object"
1150
+ msgstr ""
1151
+
1152
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-meta.php:159
1153
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-meta.php:272
1154
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-meta.php:276
1155
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-meta.php:349
1156
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-meta.php:402
1157
+ #, php-format
1158
+ msgid "%s is marked as a protected field."
1159
+ msgstr ""
1160
+
1161
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-meta.php:169
1162
+ #, php-format
1163
+ msgid "%s contains serialized data."
1164
+ msgstr ""
1165
+
1166
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-meta.php:257
1167
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-meta.php:338
1168
+ msgid "Invalid meta key."
1169
+ msgstr ""
1170
+
1171
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-meta.php:263
1172
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-meta.php:398
1173
+ msgid "Invalid existing meta data for action."
1174
+ msgstr ""
1175
+
1176
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-meta.php:268
1177
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-meta.php:345
1178
+ msgid "Invalid provided meta data for action."
1179
+ msgstr ""
1180
+
1181
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-meta.php:289
1182
+ msgid "Could not update meta."
1183
+ msgstr ""
1184
+
1185
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-meta.php:330
1186
+ msgid "Missing meta key."
1187
+ msgstr ""
1188
+
1189
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-meta.php:334
1190
+ msgid "Missing meta value."
1191
+ msgstr ""
1192
+
1193
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-meta.php:358
1194
+ msgid "Could not add meta."
1195
+ msgstr ""
1196
+
1197
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-meta.php:406
1198
+ msgid "Could not delete meta."
1199
+ msgstr ""
1200
+
1201
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-meta.php:409
1202
+ msgid "Deleted meta"
1203
+ msgstr ""
1204
+
1205
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-posts.php:78
1206
+ msgid "Sorry, you cannot view the revisions for this post."
1207
+ msgstr ""
1208
+
1209
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-posts.php:347
1210
+ msgid "There is a revision of this post that is more recent."
1211
+ msgstr ""
1212
+
1213
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-posts.php:378
1214
+ msgid "Sorry, you are not allowed to delete this post."
1215
+ msgstr ""
1216
+
1217
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-posts.php:384
1218
+ msgid "The post cannot be deleted."
1219
+ msgstr ""
1220
+
1221
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-posts.php:388
1222
+ msgid "Permanently deleted post"
1223
+ msgstr ""
1224
+
1225
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-posts.php:431
1226
+ msgid "Cannot view post type"
1227
+ msgstr ""
1228
+
1229
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-posts.php:665
1230
+ msgid "Sorry, you cannot view this revision"
1231
+ msgstr ""
1232
+
1233
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-posts.php:701
1234
+ msgid "There is no excerpt because this is a protected post."
1235
+ msgstr ""
1236
+
1237
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-posts.php:799
1238
+ msgid "The post type may not be changed."
1239
+ msgstr ""
1240
+
1241
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-posts.php:817
1242
+ msgid "Sorry, you are not allowed to create private posts in this post type"
1243
+ msgstr ""
1244
+
1245
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-posts.php:823
1246
+ msgid "Sorry, you are not allowed to publish posts in this post type"
1247
+ msgstr ""
1248
+
1249
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-posts.php:864
1250
+ msgid "Invalid author object."
1251
+ msgstr ""
1252
+
1253
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-posts.php:874
1254
+ msgid "You are not allowed to edit posts as this user."
1255
+ msgstr ""
1256
+
1257
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-posts.php:880
1258
+ msgid "Invalid author ID."
1259
+ msgstr ""
1260
+
1261
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-posts.php:892
1262
+ msgid "Sorry, you are not allowed to create password protected posts in this post type"
1263
+ msgstr ""
1264
+
1265
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-posts.php:909
1266
+ msgid "Invalid post parent ID."
1267
+ msgstr ""
1268
+
1269
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-posts.php:935
1270
+ msgid "Invalid post format."
1271
+ msgstr ""
1272
+
1273
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-server.php:196
1274
+ msgid "The JSON API is disabled on this site."
1275
+ msgstr ""
1276
+
1277
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-server.php:201
1278
+ msgid "JSONP support is disabled on this site."
1279
+ msgstr ""
1280
+
1281
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-server.php:207
1282
+ msgid "The JSONP callback function is invalid."
1283
+ msgstr ""
1284
+
1285
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-server.php:371
1286
+ msgid "Unsupported request method"
1287
+ msgstr ""
1288
+
1289
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-server.php:390
1290
+ msgid "The handler for the route is invalid"
1291
+ msgstr ""
1292
+
1293
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-server.php:450
1294
+ msgid "No route was found matching the URL and request method"
1295
+ msgstr ""
1296
+
1297
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-server.php:502
1298
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-users.php:252
1299
+ #, php-format
1300
+ msgid "Missing parameter %s"
1301
+ msgstr ""
1302
+
1303
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-taxonomies.php:106
1304
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-taxonomies.php:212
1305
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-taxonomies.php:288
1306
+ msgid "Invalid taxonomy ID."
1307
+ msgstr ""
1308
+
1309
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-taxonomies.php:138
1310
+ msgid "Cannot view taxonomy"
1311
+ msgstr ""
1312
+
1313
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-taxonomies.php:294
1314
+ msgid "Invalid term ID."
1315
+ msgstr ""
1316
+
1317
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-users.php:56
1318
+ msgid "Sorry, you are not allowed to list users."
1319
+ msgstr ""
1320
+
1321
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-users.php:97
1322
+ msgid "You are not currently logged in."
1323
+ msgstr ""
1324
+
1325
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-users.php:130
1326
+ msgid "Sorry, you are not allowed to view this user."
1327
+ msgstr ""
1328
+
1329
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-users.php:136
1330
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-users.php:234
1331
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-users.php:433
1332
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-users.php:444
1333
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-users.php:452
1334
+ msgid "Invalid user ID."
1335
+ msgstr ""
1336
+
1337
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-users.php:238
1338
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-users.php:355
1339
+ msgid "Sorry, you are not allowed to edit this user."
1340
+ msgstr ""
1341
+
1342
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-users.php:245
1343
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-users.php:383
1344
+ msgid "Sorry, you are not allowed to create users."
1345
+ msgstr ""
1346
+
1347
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-users.php:294
1348
+ msgid "Invalid user URL."
1349
+ msgstr ""
1350
+
1351
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-users.php:350
1352
+ msgid "User ID must be supplied."
1353
+ msgstr ""
1354
+
1355
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-users.php:360
1356
+ msgid "User ID is invalid."
1357
+ msgstr ""
1358
+
1359
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-users.php:387
1360
+ msgid "Cannot create existing user."
1361
+ msgstr ""
1362
+
1363
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-users.php:438
1364
+ msgid "Sorry, you are not allowed to delete this user."
1365
+ msgstr ""
1366
+
1367
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-users.php:461
1368
+ msgid "The user cannot be deleted."
1369
+ msgstr ""
1370
+
1371
+ #: ../vendor/wp-api/wp-api/lib/class-wp-json-users.php:463
1372
+ msgid "Deleted user"
1373
+ msgstr ""
1374
+
1375
+ #: ../vendor/wp-api/wp-api/plugin.php:375
1376
+ msgid "Cookie nonce is invalid"
1377
+ msgstr ""
1378
+
1379
+ #: ../vendor/wp-api/wp-api/plugin.php:686
1380
+ #, php-format
1381
+ msgid "%1$s (since %2$s; use %3$s instead)"
1382
+ msgstr ""
1383
+
1384
+ #: ../vendor/wp-api/wp-api/plugin.php:689 ../vendor/wp-api/wp-api/plugin.php:707
1385
+ #, php-format
1386
+ msgid "%1$s (since %2$s; no alternative available)"
1387
+ msgstr ""
1388
+
1389
+ #: ../vendor/wp-api/wp-api/plugin.php:704
1390
+ #, php-format
1391
+ msgid "%1$s (since %2$s; %3$s)"
1392
+ msgstr ""
1393
+
1394
+ #: ../vendor/wp-api/wp-api/tests/helper.php:61
1395
+ msgid "No report data available"
1396
+ msgstr ""
1397
+
1398
+ #: ../vendor/wp-api/wp-api/tests/helper.php:65
1399
+ msgid "The CodeCoverage classes are missing"
1400
+ msgstr ""
languages/custom-contact-forms.mo CHANGED
Binary file
languages/custom-contact-forms.po CHANGED
@@ -5,8 +5,8 @@ msgstr ""
5
  "Project-Id-Version: Custom Contact Forms\n"
6
  "Report-Msgid-Bugs-To: https://github.com/tlovett1/custom-contact-forms/"
7
  "issues\n"
8
- "POT-Creation-Date: 2015-06-29 10:27-0500\n"
9
- "PO-Revision-Date: 2015-06-29 10:27-0500\n"
10
  "Last-Translator: Taylor Lovett <tlovett88@gmail.com>\n"
11
  "Language-Team: LANGUAGE <LL@li.org>\n"
12
  "Language: en\n"
@@ -96,14 +96,14 @@ msgstr ""
96
  msgid "Form Field Choices"
97
  msgstr ""
98
 
99
- #: ../classes/class-ccf-custom-contact-forms.php:49
100
  #, php-format
101
  msgid ""
102
  "Custom Contact Forms will not work unless pretty permalinks (not default) "
103
  "are enabled. Please update your <a href=\"%s\">permalinks settings</a>."
104
  msgstr ""
105
 
106
- #: ../classes/class-ccf-custom-contact-forms.php:67
107
  #, php-format
108
  msgid "<a href=\"%s\">Forms and Submissions</a>"
109
  msgstr ""
@@ -173,6 +173,11 @@ msgstr ""
173
  msgid "Country"
174
  msgstr ""
175
 
 
 
 
 
 
176
  #: ../classes/class-ccf-field-renderer.php:803
177
  #: ../classes/class-ccf-form-manager.php:1215
178
  #: ../classes/class-ccf-form-manager.php:1516
@@ -987,10 +992,6 @@ msgstr ""
987
  msgid "This is the sub-heading text."
988
  msgstr ""
989
 
990
- #: ../classes/class-ccf-form-manager.php:1211
991
- msgid "email@example.com"
992
- msgstr ""
993
-
994
  #: ../classes/class-ccf-form-manager.php:1249
995
  msgid "Edit"
996
  msgstr ""
@@ -1088,10 +1089,14 @@ msgid "Invalid date"
1088
  msgstr ""
1089
 
1090
  #: ../classes/class-ccf-form-manager.php:1545
1091
- msgid "Form Submission"
1092
  msgstr ""
1093
 
1094
  #: ../classes/class-ccf-form-manager.php:1546
 
 
 
 
1095
  #: ../classes/class-ccf-form-renderer.php:120
1096
  msgid "This form is paused right now. Check back later!"
1097
  msgstr ""
5
  "Project-Id-Version: Custom Contact Forms\n"
6
  "Report-Msgid-Bugs-To: https://github.com/tlovett1/custom-contact-forms/"
7
  "issues\n"
8
+ "POT-Creation-Date: 2015-08-31 09:26-0500\n"
9
+ "PO-Revision-Date: 2015-08-31 09:26-0500\n"
10
  "Last-Translator: Taylor Lovett <tlovett88@gmail.com>\n"
11
  "Language-Team: LANGUAGE <LL@li.org>\n"
12
  "Language: en\n"
96
  msgid "Form Field Choices"
97
  msgstr ""
98
 
99
+ #: ../classes/class-ccf-custom-contact-forms.php:71
100
  #, php-format
101
  msgid ""
102
  "Custom Contact Forms will not work unless pretty permalinks (not default) "
103
  "are enabled. Please update your <a href=\"%s\">permalinks settings</a>."
104
  msgstr ""
105
 
106
+ #: ../classes/class-ccf-custom-contact-forms.php:89
107
  #, php-format
108
  msgid "<a href=\"%s\">Forms and Submissions</a>"
109
  msgstr ""
173
  msgid "Country"
174
  msgstr ""
175
 
176
+ #: ../classes/class-ccf-field-renderer.php:793
177
+ #: ../classes/class-ccf-form-manager.php:1211
178
+ msgid "email@example.com"
179
+ msgstr ""
180
+
181
  #: ../classes/class-ccf-field-renderer.php:803
182
  #: ../classes/class-ccf-form-manager.php:1215
183
  #: ../classes/class-ccf-form-manager.php:1516
992
  msgid "This is the sub-heading text."
993
  msgstr ""
994
 
 
 
 
 
995
  #: ../classes/class-ccf-form-manager.php:1249
996
  msgid "Edit"
997
  msgstr ""
1089
  msgstr ""
1090
 
1091
  #: ../classes/class-ccf-form-manager.php:1545
1092
+ msgid "Field Label"
1093
  msgstr ""
1094
 
1095
  #: ../classes/class-ccf-form-manager.php:1546
1096
+ msgid "Form Submission"
1097
+ msgstr ""
1098
+
1099
+ #: ../classes/class-ccf-form-manager.php:1547
1100
  #: ../classes/class-ccf-form-renderer.php:120
1101
  msgid "This form is paused right now. Check back later!"
1102
  msgstr ""
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: tlovett1
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=HR34W94MM53RQ
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.3
7
- Stable tag: 6.8
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -21,6 +21,8 @@ just contact forms.
21
 
22
  For detailed install and usage instructions, please visit [Github](http://github.com/tlovett1/custom-contact-forms).
23
 
 
 
24
  == Installation ==
25
 
26
  Please refer to [Github](http://github.com/tlovett1/custom-contact-forms) for detailed installation instructions.
@@ -35,6 +37,10 @@ For questions, feature requests, and support concerning the Custom Contact Forms
35
 
36
  == Changelog ==
37
 
 
 
 
 
38
  = 6.8.1 =
39
  * Tighten post type permissions so submissions and forms don't have archives and single views.
40
 
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=HR34W94MM53RQ
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.4
7
+ Stable tag: 6.8.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
21
 
22
  For detailed install and usage instructions, please visit [Github](http://github.com/tlovett1/custom-contact-forms).
23
 
24
+ __Software integrity proudly assured by [Dockunit.io](https://dockunit.io).__
25
+
26
  == Installation ==
27
 
28
  Please refer to [Github](http://github.com/tlovett1/custom-contact-forms) for detailed installation instructions.
37
 
38
  == Changelog ==
39
 
40
+ = 6.8.2 =
41
+ * Fix non-translateable strings
42
+ * Include French translation. Props [pyrog](https://github.com/pyrog)
43
+
44
  = 6.8.1 =
45
  * Tighten post type permissions so submissions and forms don't have archives and single views.
46