Custom Contact Forms - Version 7.6

Version Description

  • Form duplication
  • Fix multiple section header bug
Download this release

Release Info

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

Code changes from version 7.5 to 7.6

assets/build/css/form-cpt.css CHANGED
@@ -53,6 +53,8 @@
53
  color: #a00;
54
  text-decoration: none;
55
  padding: 1px 2px; }
 
 
56
  #ccf-at-a-glance .inside #major-publishing-actions .export-button {
57
  float: right; }
58
 
53
  color: #a00;
54
  text-decoration: none;
55
  padding: 1px 2px; }
56
+ #ccf-at-a-glance .inside #major-publishing-actions .submitdelete.duplicate {
57
+ color: #0073aa; }
58
  #ccf-at-a-glance .inside #major-publishing-actions .export-button {
59
  float: right; }
60
 
assets/build/css/form-cpt.css.map CHANGED
@@ -1,6 +1,6 @@
1
  {
2
  "version": 3,
3
- "mappings": "AAAA,SAAU;EACT,OAAO,EAAE,IAAI;;AAGd,UAAW;EACV,OAAO,EAAE,IAAI;;AAGd,kBAAmB;EAClB,OAAO,EAAE,IAAI;;AAIb,aAAG;EACF,MAAM,EAAE,CAAC;EAET,qBAAQ;IACP,cAAc,EAAE,MAAM;IACtB,GAAG,EAAE,IAAI;IACT,QAAQ,EAAE,QAAQ;IAClB,WAAW,EAAE,GAAG;;AAKnB,yCAA0C;EACzC,OAAO,EAAE,IAAI;;AAGd,WAAY;EACX,OAAO,EAAE,IAAI;;AAIb,wBAAQ;EACP,MAAM,EAAE,CAAC;EACT,OAAO,EAAE,CAAC;EAEV,8BAAM;IACL,OAAO,EAAE,KAAK;EAGf,kCAAU;IACT,OAAO,EAAE,KAAK;IAEd,yCAAS;MACR,IAAI,EAAE,yBAAyB;MAC/B,KAAK,EAAE,IAAI;MACX,OAAO,EAAE,YAAY;MACrB,OAAO,EAAE,SAAS;MAClB,IAAI,EAAE,IAAI;MACV,QAAQ,EAAE,QAAQ;MAClB,cAAc,EAAE,GAAG;MACnB,sBAAsB,EAAE,WAAW;MACnC,uBAAuB,EAAE,SAAS;MAClC,eAAe,EAAE,eAAe;MAChC,GAAG,EAAE,IAAI;MACT,KAAK,EAAE,IAAI;EAIb,+CAAuB;IACtB,OAAO,EAAE,OAAO;EAGjB,mDAA2B;IAC1B,OAAO,EAAE,OAAO;EAGjB,8CAAsB;IACrB,OAAO,EAAE,OAAO;EAGjB,kDAA0B;IACzB,QAAQ,EAAE,IAAI;IAEd,gEAAc;MACb,KAAK,EAAE,IAAI;MACX,eAAe,EAAE,IAAI;MACrB,OAAO,EAAE,OAAO;IAGjB,iEAAe;MACd,KAAK,EAAE,KAAK;;AAOf,uCAAkB;EACjB,MAAM,EAAE,CAAC;EACT,OAAO,EAAE,CAAC;EACV,gBAAgB,EAAE,OAAO;AAG1B,8BAAS;EACR,OAAO,EAAE,KAAK;EACd,KAAK,EAAE,IAAI;;AAKZ,0CAAS;EACR,OAAO,EAAE,KAAK;EACd,KAAK,EAAE,IAAI;;AAKZ,mCAAmB;EAClB,WAAW,EAAE,cAAc;EAC3B,OAAO,EAAE,eAAe;EACxB,KAAK,EAAE,IAAI;EACX,WAAW,EAAE,MAAM;EACnB,YAAY,EAAE,MAAM;EACpB,cAAc,EAAE,IAAI;EACpB,WAAW,EAAE,CAAC;EACd,MAAM,EAAE,OAAO;EACf,sBAAsB,EAAE,WAAW;AAGpC,qCAAqB;EACpB,IAAI,EAAE,aAAa;EACnB,KAAK,EAAE,IAAI;EACX,OAAO,EAAE,YAAY;EACrB,OAAO,EAAE,iBAAiB;EAC1B,GAAG,EAAE,CAAC;EACN,QAAQ,EAAE,QAAQ;EAClB,KAAK,EAAE,KAAK;EACZ,KAAK,EAAE,IAAI;EACX,MAAM,EAAE,IAAI;EACZ,MAAM,EAAE,OAAO;EACf,KAAK,EAAE,OAAO;AAGf,wBAAQ;EACP,OAAO,EAAE,CAAC;EACV,MAAM,EAAE,CAAC;EAIT,8BAAM;IACL,MAAM,EAAE,CAAC;IACT,eAAe,EAAE,QAAQ;IACzB,YAAY,EAAE,IAAI;IAClB,KAAK,EAAE,IAAI;IAEX,oEAAO;MACN,OAAO,EAAE,QAAQ;IAGlB,uCAAS;MACR,MAAM,EAAE,CAAC;IAIT,uCAAG;MACF,gBAAgB,EAAE,OAAO;MAEzB,0CAAG;QACF,KAAK,EAAE,IAAI;MAGZ,gDAAS;QACR,KAAK,EAAE,IAAI;QACX,OAAO,EAAE,KAAK;MAGf,gDAAS;QACR,UAAU,EAAE,KAAK;QAEjB,kDAAE;UACD,MAAM,EAAE,OAAO;UACf,KAAK,EAAE,OAAO;UACd,YAAY,EAAE,GAAG;MAInB,2DAAoB;QACnB,OAAO,EAAE,IAAI;MAGd,uDAAkB;QACjB,gBAAgB,EAAE,IAAI;MAGvB,yDAAkB;QACjB,UAAU,EAAE,MAAM;QAClB,KAAK,EAAE,IAAI;QACX,cAAc,EAAE,GAAG;EAMvB,wCAAgB;IACf,UAAU,EAAE,cAAc;IAC1B,UAAU,EAAE,CAAC;IACb,OAAO,EAAE,GAAG;;AAMd,mCAAY;EACX,WAAW,EAAE,IAAI;EACjB,SAAS,EAAE,IAAI;EACf,OAAO,EAAE,GAAG;AAGb,sCAAe;EACd,OAAO,EAAE,GAAG;EACZ,gBAAgB,EAAE,OAAO;EAEzB,2CAAK;IACJ,UAAU,EAAE,MAAM",
4
  "sources": ["../../scss/form-cpt.scss"],
5
  "names": [],
6
  "file": "form-cpt.css"
1
  {
2
  "version": 3,
3
+ "mappings": "AAAA,SAAU;EACT,OAAO,EAAE,IAAI;;AAGd,UAAW;EACV,OAAO,EAAE,IAAI;;AAGd,kBAAmB;EAClB,OAAO,EAAE,IAAI;;AAIb,aAAG;EACF,MAAM,EAAE,CAAC;EAET,qBAAQ;IACP,cAAc,EAAE,MAAM;IACtB,GAAG,EAAE,IAAI;IACT,QAAQ,EAAE,QAAQ;IAClB,WAAW,EAAE,GAAG;;AAKnB,yCAA0C;EACzC,OAAO,EAAE,IAAI;;AAGd,WAAY;EACX,OAAO,EAAE,IAAI;;AAIb,wBAAQ;EACP,MAAM,EAAE,CAAC;EACT,OAAO,EAAE,CAAC;EAEV,8BAAM;IACL,OAAO,EAAE,KAAK;EAGf,kCAAU;IACT,OAAO,EAAE,KAAK;IAEd,yCAAS;MACR,IAAI,EAAE,yBAAyB;MAC/B,KAAK,EAAE,IAAI;MACX,OAAO,EAAE,YAAY;MACrB,OAAO,EAAE,SAAS;MAClB,IAAI,EAAE,IAAI;MACV,QAAQ,EAAE,QAAQ;MAClB,cAAc,EAAE,GAAG;MACnB,sBAAsB,EAAE,WAAW;MACnC,uBAAuB,EAAE,SAAS;MAClC,eAAe,EAAE,eAAe;MAChC,GAAG,EAAE,IAAI;MACT,KAAK,EAAE,IAAI;EAIb,+CAAuB;IACtB,OAAO,EAAE,OAAO;EAGjB,mDAA2B;IAC1B,OAAO,EAAE,OAAO;EAGjB,8CAAsB;IACrB,OAAO,EAAE,OAAO;EAGjB,kDAA0B;IACzB,QAAQ,EAAE,IAAI;IAEd,gEAAc;MACb,KAAK,EAAE,IAAI;MACX,eAAe,EAAE,IAAI;MACrB,OAAO,EAAE,OAAO;MAEhB,0EAAY;QACX,KAAK,EAAE,OAAO;IAIhB,iEAAe;MACd,KAAK,EAAE,KAAK;;AAOf,uCAAkB;EACjB,MAAM,EAAE,CAAC;EACT,OAAO,EAAE,CAAC;EACV,gBAAgB,EAAE,OAAO;AAG1B,8BAAS;EACR,OAAO,EAAE,KAAK;EACd,KAAK,EAAE,IAAI;;AAKZ,0CAAS;EACR,OAAO,EAAE,KAAK;EACd,KAAK,EAAE,IAAI;;AAKZ,mCAAmB;EAClB,WAAW,EAAE,cAAc;EAC3B,OAAO,EAAE,eAAe;EACxB,KAAK,EAAE,IAAI;EACX,WAAW,EAAE,MAAM;EACnB,YAAY,EAAE,MAAM;EACpB,cAAc,EAAE,IAAI;EACpB,WAAW,EAAE,CAAC;EACd,MAAM,EAAE,OAAO;EACf,sBAAsB,EAAE,WAAW;AAGpC,qCAAqB;EACpB,IAAI,EAAE,aAAa;EACnB,KAAK,EAAE,IAAI;EACX,OAAO,EAAE,YAAY;EACrB,OAAO,EAAE,iBAAiB;EAC1B,GAAG,EAAE,CAAC;EACN,QAAQ,EAAE,QAAQ;EAClB,KAAK,EAAE,KAAK;EACZ,KAAK,EAAE,IAAI;EACX,MAAM,EAAE,IAAI;EACZ,MAAM,EAAE,OAAO;EACf,KAAK,EAAE,OAAO;AAGf,wBAAQ;EACP,OAAO,EAAE,CAAC;EACV,MAAM,EAAE,CAAC;EAIT,8BAAM;IACL,MAAM,EAAE,CAAC;IACT,eAAe,EAAE,QAAQ;IACzB,YAAY,EAAE,IAAI;IAClB,KAAK,EAAE,IAAI;IAEX,oEAAO;MACN,OAAO,EAAE,QAAQ;IAGlB,uCAAS;MACR,MAAM,EAAE,CAAC;IAIT,uCAAG;MACF,gBAAgB,EAAE,OAAO;MAEzB,0CAAG;QACF,KAAK,EAAE,IAAI;MAGZ,gDAAS;QACR,KAAK,EAAE,IAAI;QACX,OAAO,EAAE,KAAK;MAGf,gDAAS;QACR,UAAU,EAAE,KAAK;QAEjB,kDAAE;UACD,MAAM,EAAE,OAAO;UACf,KAAK,EAAE,OAAO;UACd,YAAY,EAAE,GAAG;MAInB,2DAAoB;QACnB,OAAO,EAAE,IAAI;MAGd,uDAAkB;QACjB,gBAAgB,EAAE,IAAI;MAGvB,yDAAkB;QACjB,UAAU,EAAE,MAAM;QAClB,KAAK,EAAE,IAAI;QACX,cAAc,EAAE,GAAG;EAMvB,wCAAgB;IACf,UAAU,EAAE,cAAc;IAC1B,UAAU,EAAE,CAAC;IACb,OAAO,EAAE,GAAG;;AAMd,mCAAY;EACX,WAAW,EAAE,IAAI;EACjB,SAAS,EAAE,IAAI;EACf,OAAO,EAAE,GAAG;AAGb,sCAAe;EACd,OAAO,EAAE,GAAG;EACZ,gBAAgB,EAAE,OAAO;EAEzB,2CAAK;IACJ,UAAU,EAAE,MAAM",
4
  "sources": ["../../scss/form-cpt.scss"],
5
  "names": [],
6
  "file": "form-cpt.css"
assets/build/css/form-cpt.min.css CHANGED
@@ -1 +1 @@
1
- #submitdiv,#titlediv,#wp-admin-bar-view{display:none}.ccf-title h1{margin:0}.ccf-title h1 .button{vertical-align:middle;top:-2px;position:relative;margin-left:8px}#post-body-content .ccf-open-form-manager,.add-new-h2{display:none}#ccf-at-a-glance .inside{margin:0;padding:0}#ccf-at-a-glance .inside .has-icon,#ccf-at-a-glance .inside .line{display:block}#ccf-at-a-glance .inside .has-icon:before{font:400 20px/1 dashicons;speak:none;display:inline-block;padding:0 5px 0 0;left:-1px;position:relative;vertical-align:top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important;top:-1px;color:#888}#ccf-at-a-glance .inside #ccf-created-by:before{content:"\f110"}#ccf-at-a-glance .inside #ccf-submission-num:before{content:"\f226"}#ccf-at-a-glance .inside #ccf-field-num:before{content:"\f175"}#ccf-at-a-glance .inside #major-publishing-actions{overflow:auto}#ccf-at-a-glance .inside #major-publishing-actions .submitdelete{color:#a00;text-decoration:none;padding:1px 2px}#ccf-at-a-glance .inside #major-publishing-actions .export-button{float:right}.ccf-form-cpt-preview .ccf-form-preview{border:0;padding:0;background-color:inherit}.ccf-form-cpt-preview .spinner,.ccf-submission-column-controller .spinner{display:block;float:none}#ccf-submissions [data-icon]:before{font-family:form-manager;content:attr(data-icon);speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;cursor:pointer;-webkit-font-smoothing:antialiased}#ccf-submissions .ccf-submission-icon{font:400 20px/1;speak:none;display:inline-block;padding:12px 0 4px 10px;top:0;position:relative;float:right;width:23px;height:30px;cursor:pointer;color:inherit}#ccf-submissions .inside{padding:0;margin:0}#ccf-submissions .inside table{border:0;border-collapse:collapse;table-layout:auto;width:100%}#ccf-submissions .inside table td,#ccf-submissions .inside table th{padding:8px 10px}#ccf-submissions .inside table th input{margin:0}#ccf-submissions .inside table tbody tr{background-color:#f9f9f9}#ccf-submissions .inside table tbody tr td{width:auto}#ccf-submissions .inside table tbody tr .spinner{float:none;display:block}#ccf-submissions .inside table tbody tr .actions{text-align:right}#ccf-submissions .inside table tbody tr .actions a{cursor:pointer;color:inherit;padding-left:4px}#ccf-submissions .inside table tbody tr .submission-wrapper{display:none}#ccf-submissions .inside table tbody tr:nth-child(2n-1){background-color:#fff}#ccf-submissions .inside table tbody tr td.no-submissions{text-align:center;width:auto;padding-bottom:8px}#ccf-submissions .inside .ccf-pagination{border-top:1px solid #eee;margin-top:0;padding:8px}.ccf-submission-content .field-slug{font-weight:700;font-size:15px;padding:7px}.ccf-submission-content .field-content{padding:7px;background-color:#f9f9f9}.ccf-submission-content .field-content span{font-style:italic}
1
+ #submitdiv,#titlediv,#wp-admin-bar-view{display:none}.ccf-title h1{margin:0}.ccf-title h1 .button{vertical-align:middle;top:-2px;position:relative;margin-left:8px}#post-body-content .ccf-open-form-manager,.add-new-h2{display:none}#ccf-at-a-glance .inside{margin:0;padding:0}#ccf-at-a-glance .inside .has-icon,#ccf-at-a-glance .inside .line{display:block}#ccf-at-a-glance .inside .has-icon:before{font:400 20px/1 dashicons;speak:none;display:inline-block;padding:0 5px 0 0;left:-1px;position:relative;vertical-align:top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important;top:-1px;color:#888}#ccf-at-a-glance .inside #ccf-created-by:before{content:"\f110"}#ccf-at-a-glance .inside #ccf-submission-num:before{content:"\f226"}#ccf-at-a-glance .inside #ccf-field-num:before{content:"\f175"}#ccf-at-a-glance .inside #major-publishing-actions{overflow:auto}#ccf-at-a-glance .inside #major-publishing-actions .submitdelete{color:#a00;text-decoration:none;padding:1px 2px}#ccf-at-a-glance .inside #major-publishing-actions .submitdelete.duplicate{color:#0073aa}#ccf-at-a-glance .inside #major-publishing-actions .export-button{float:right}.ccf-form-cpt-preview .ccf-form-preview{border:0;padding:0;background-color:inherit}.ccf-form-cpt-preview .spinner,.ccf-submission-column-controller .spinner{display:block;float:none}#ccf-submissions [data-icon]:before{font-family:form-manager;content:attr(data-icon);speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;cursor:pointer;-webkit-font-smoothing:antialiased}#ccf-submissions .ccf-submission-icon{font:400 20px/1;speak:none;display:inline-block;padding:12px 0 4px 10px;top:0;position:relative;float:right;width:23px;height:30px;cursor:pointer;color:inherit}#ccf-submissions .inside{padding:0;margin:0}#ccf-submissions .inside table{border:0;border-collapse:collapse;table-layout:auto;width:100%}#ccf-submissions .inside table td,#ccf-submissions .inside table th{padding:8px 10px}#ccf-submissions .inside table th input{margin:0}#ccf-submissions .inside table tbody tr{background-color:#f9f9f9}#ccf-submissions .inside table tbody tr td{width:auto}#ccf-submissions .inside table tbody tr .spinner{float:none;display:block}#ccf-submissions .inside table tbody tr .actions{text-align:right}#ccf-submissions .inside table tbody tr .actions a{cursor:pointer;color:inherit;padding-left:4px}#ccf-submissions .inside table tbody tr .submission-wrapper{display:none}#ccf-submissions .inside table tbody tr:nth-child(2n-1){background-color:#fff}#ccf-submissions .inside table tbody tr td.no-submissions{text-align:center;width:auto;padding-bottom:8px}#ccf-submissions .inside .ccf-pagination{border-top:1px solid #eee;margin-top:0;padding:8px}.ccf-submission-content .field-slug{font-weight:700;font-size:15px;padding:7px}.ccf-submission-content .field-content{padding:7px;background-color:#f9f9f9}.ccf-submission-content .field-content span{font-style:italic}
assets/build/js/form-manager.js CHANGED
@@ -461,6 +461,7 @@
461
  status: 'publish',
462
  description: '',
463
  buttonText: 'Submit Form',
 
464
  completionActionType: 'text',
465
  completionRedirectUrl: '',
466
  completionMessage: '',
@@ -3022,6 +3023,9 @@
3022
  var buttonText = this.el.querySelectorAll( '.form-button-text' )[0].value;
3023
  this.model.set( 'buttonText', buttonText );
3024
 
 
 
 
3025
  var pause = this.el.querySelectorAll( '.form-pause' )[0].value;
3026
  this.model.set( 'pause', ( parseInt( pause ) ) ? true : false );
3027
 
@@ -3444,6 +3448,7 @@
3444
  events: {
3445
  'click .edit': 'triggerMainViewChange',
3446
  'click .delete': 'triggerDelete',
 
3447
  'click .insert-form-button': 'insertForm'
3448
  },
3449
 
@@ -3479,6 +3484,22 @@
3479
  });
3480
  },
3481
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3482
  render: function() {
3483
  this.$el.html( this.template( { form: this.model.toJSON(), utils: { getPrettyPostDate: wp.ccf.utils.getPrettyPostDate } } ) );
3484
  return this;
@@ -4184,6 +4205,27 @@
4184
  metabox.insertBefore( download, metabox.firstChild.nextSibling.nextSibling );
4185
 
4186
  wp.ccf.createSubmissionsTable( container );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4187
  }
4188
  });
4189
  } else {
461
  status: 'publish',
462
  description: '',
463
  buttonText: 'Submit Form',
464
+ buttonClass: '',
465
  completionActionType: 'text',
466
  completionRedirectUrl: '',
467
  completionMessage: '',
3023
  var buttonText = this.el.querySelectorAll( '.form-button-text' )[0].value;
3024
  this.model.set( 'buttonText', buttonText );
3025
 
3026
+ var buttonClass = this.el.querySelectorAll( '.form-button-class' )[0].value;
3027
+ this.model.set( 'buttonClass', buttonClass );
3028
+
3029
  var pause = this.el.querySelectorAll( '.form-pause' )[0].value;
3030
  this.model.set( 'pause', ( parseInt( pause ) ) ? true : false );
3031
 
3448
  events: {
3449
  'click .edit': 'triggerMainViewChange',
3450
  'click .delete': 'triggerDelete',
3451
+ 'click .duplicate': 'triggerDuplicate',
3452
  'click .insert-form-button': 'insertForm'
3453
  },
3454
 
3484
  });
3485
  },
3486
 
3487
+ triggerDuplicate: function() {
3488
+ var SELF = this,
3489
+ currentPage = SELF.parent.collection.state.currentPage;
3490
+
3491
+ SELF.model
3492
+ .clone()
3493
+ .set( 'title', { raw: SELF.model.get( 'title' ).raw + ' (Duplicate)' } )
3494
+ .unset( 'id' )
3495
+ .save()
3496
+ .done( function() {
3497
+ SELF.parent.showPage( currentPage ).done( function() {
3498
+ SELF.parent.renderPagination();
3499
+ });
3500
+ });
3501
+ },
3502
+
3503
  render: function() {
3504
  this.$el.html( this.template( { form: this.model.toJSON(), utils: { getPrettyPostDate: wp.ccf.utils.getPrettyPostDate } } ) );
3505
  return this;
4205
  metabox.insertBefore( download, metabox.firstChild.nextSibling.nextSibling );
4206
 
4207
  wp.ccf.createSubmissionsTable( container );
4208
+
4209
+ var duplicateButton = document.querySelectorAll( '#major-publishing-actions .duplicate')[0];
4210
+
4211
+ var duplicateClick = function( evnt ) {
4212
+ evnt = evnt || window.event;
4213
+ evnt.preventDefault();
4214
+
4215
+ SELF.currentForm.clone()
4216
+ .set( 'title', { raw: SELF.currentForm.get( 'title' ).raw + ' (duplicate)' } )
4217
+ .unset( 'id' )
4218
+ .save()
4219
+ .done( function( newForm ) {
4220
+ document.location = ccfSettings.adminUrl + '/post.php?action=edit&post=' + newForm.id;
4221
+ });
4222
+ };
4223
+
4224
+ if ( duplicateButton.addEventListener ) {
4225
+ duplicateButton.addEventListener( 'click', duplicateClick, false );
4226
+ } else {
4227
+ duplicateButton.attachEvent( 'onclick', duplicateClick );
4228
+ }
4229
  }
4230
  });
4231
  } else {
assets/build/js/form-manager.min.js CHANGED
@@ -1,3 +1,3 @@
1
- (function(e,t,i,l){"use strict";window.wp=window.wp||{},wp.ccf=wp.ccf||{},wp.ccf.utils=wp.ccf.utils||{},wp.ccf.utils.cleanDateFields=function(e){delete e.date,delete e.date_gmt,delete e.modified,delete e.modified_gmt,delete e.date_tz,delete e.modified_tz},wp.ccf.utils.template=i.memoize(function(e){var t={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g};return i.template(document.getElementById(e).innerHTML,null,t)}),wp.ccf.utils.insertFormShortcode=function(e){var t=wp.ccf.forms.findWhere({id:e.get("id")});t||wp.ccf.forms.add(e);var i=tinymce.get(wpActiveEditor),l='[ccf_form id="'+e.get("id")+'"]';i&&!i.isHidden()?tinymce.activeEditor.execCommand("mceInsertContent",!1,l):document.getElementById(wpActiveEditor).value+=l},wp.ccf.utils.getPrettyPostDate=function(e){return e=moment.utc(e),l.gmtOffset&&(e=e.utcOffset(60*parseInt(l.gmtOffset))),e.format("h:mm a M/D/YYYY")},wp.ccf.utils.wordChop=function(e,t){var i=e.substr(0,t);return i.substr(0,Math.min(i.length,i.lastIndexOf(" "))),i.length<e.length&&(i+="..."),i},wp.ccf.utils.isFieldDate=function(e){return e.date!==void 0||e.hour!==void 0&&e.minute!==void 0&&e["am-pm"]!==void 0?!0:!1},wp.ccf.utils.isFieldName=function(e){return e.name!==void 0||e.last!==void 0?!0:!1},wp.ccf.utils.isFieldEmailConfirm=function(e){return e.email!==void 0||e.confirm!==void 0?!0:!1},wp.ccf.utils.isFieldAddress=function(e){return e.street!==void 0&&e.city!==void 0&&e.zipcode!==void 0&&e.line_two!==void 0?!0:!1},wp.ccf.utils.isFieldFile=function(e){return e.id!==void 0&&e.url!==void 0&&e.file_name!==void 0?!0:!1},wp.ccf.utils.getPrettyFieldEmailConfirm=function(e){return e.email?e.email:e.confirm?e.confirm:"-"},wp.ccf.utils.getPrettyFieldDate=function(e,t){var i="",s="",o="HH:mm MM/DD/YY";if(t&&t.ccf_field_dateFormat&&"dd/mm/yyyy"===t.ccf_field_dateFormat&&(o="HH:mm DD/MM/YY"),e.hour&&e.minute&&e["am-pm"]&&(i+=e.hour+":"+e.minute+" "+e["am-pm"]),e.date&&(i+=" "+e.date),!i)return"-";var n=moment(i,o);return n.isValid()?(e.hour&&e.minute&&e["am-pm"]&&(s+=n.format("h:mm a")),e.date&&(s&&(s+=" "),s+=e.date),s):l.invalidDate},wp.ccf.utils.getPrettyFieldName=function(e){var t=e.first;return t.length>0&&(t+=" "),e.last&&(t+=e.last),t||(t="-"),t},wp.ccf.utils.getPrettyFieldAddress=function(e){if(!e.street||!e.city)return"-";var t=e.street;return e.line_two&&(t+=" "+e.line_two),t+=", "+e.city,e.state&&(t+=", "+e.state),e.zipcode&&(t+=" "+e.zipcode),e.country&&(t+=" "+e.country),t}})(jQuery,Backbone,_,ccfSettings),function(e,t,i){"use strict";wp.ccf.mixins=wp.ccf.mixins||{},wp.ccf.mixins.subViewable=wp.ccf.mixins.subViewable||{subViews:{},initRenderSubViews:function(e,t,l){this.renderedSubViews||(this.renderedSubViews={});for(var s in this.subViews){var o={el:this.$el.find(".ccf-"+s),parent:this};l&&i.extend(o,l),this.renderedSubViews[s]&&this.renderedSubViews[s].destroy&&this.renderedSubViews[s].destroy(),(t||!this.renderedSubViews[s])&&(this.renderedSubViews[s]=new this.subViews[s](o)),this.renderedSubViews[s].render(),e&&(this.renderedSubViews[s].el.style.display="block")}return this},showView:function(e,t,i){if(this.renderedSubViews!==void 0&&this.renderedSubViews[e]!==void 0){var l=this.renderedSubViews[e];i||l.render(t),l.el.style.display="block",this.currentView=e;for(var s in this.subViews)s!==e&&(this.renderedSubViews[s].el.style.display="none")}}}}(jQuery,Backbone,_,ccfSettings),function(e,t,i,l){"use strict";wp.ccf.models=wp.ccf.models||{},wp.ccf.models.Fields=wp.ccf.models.Fields||{};var s=function(e,i,l){return"object"!=typeof i&&""===i&&(i=""),t.Model.prototype.set.call(this,e,i,l)},o=function(e,t,i){return i=i||{},i.emulateHTTP=!0,this.constructor.__super__.sync.call(this,e,t,i)},n=function(e){for(var t in this.attributes)if(-1===i.indexOf(e,t)){var l=this.get(t);"string"==typeof l&&""!==l&&(l=(l+"").replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#8220;/g,"”").replace(/&#8221;/g,"”").replace(/&#8216;/g,"‘").replace(/&#038;/g,"&").replace(/&#039;/g,"'"),this.set(t,l))}return this};wp.ccf.models.FieldConditional=wp.ccf.models.FieldConditional||t.Model.extend({defaults:{field:"",compare:"is",value:""},decode:function(){return n.call(this,[])},set:s}),wp.ccf.models.FieldChoice=wp.ccf.models.FieldChoice||t.Model.extend({defaults:{label:"",value:"",selected:!1},decode:function(){return n.call(this,[])},set:s}),wp.ccf.models.PostFieldMapping=wp.ccf.models.PostFieldMapping||t.Model.extend({defaults:{formField:"",postField:"",customFieldKey:""},decode:function(){return n.call(this,[])},set:s}),wp.ccf.models.FormNotificationAddress=wp.ccf.models.FormNotificationAddress||t.Model.extend({defaults:{type:"custom",field:"",email:""},decode:function(){return n.call(this,[])},set:s}),wp.ccf.models.FormNotification=wp.ccf.models.FormNotification||t.Model.extend({defaults:function(){return{title:"",content:"[all_fields]",active:!1,addresses:new wp.ccf.collections.FormNotificationAddresses,fromType:"default",fromAddress:"",fromField:"",subjectType:"default",subject:"",subjectField:"",fromNameType:"custom",fromName:"WordPress",fromNameField:""}},initialize:function(e){if("object"==typeof e&&e.addresses){var t=[];i.each(e.addresses,function(e){var i=new wp.ccf.models.FormNotificationAddress(e);i.decode(),t.push(i)}),this.set("addresses",new wp.ccf.collections.FormNotificationAddresses(t))}},decode:function(){return n.call(this,[])},toJSON:function(){var e=this.constructor.__super__.toJSON.call(this);return e.addresses&&(e.addresses=e.addresses.toJSON()),e},set:s}),wp.ccf.models.Form=wp.ccf.models.Form||wp.api.models.Post.extend({urlRoot:l.apiRoot.replace(/\/$/,"")+"/ccf/v1/forms",set:s,sync:o,idAttribute:"id",initialize:function(){this.on("sync",this.decode,this)},defaults:function(){var e={fields:new wp.ccf.collections.Fields,type:"ccf_form",status:"publish",description:"",buttonText:"Submit Form",completionActionType:"text",completionRedirectUrl:"",completionMessage:"",postCreation:!1,postCreationType:"post",postCreationStatus:"draft",postFieldMappings:new wp.ccf.collections.PostFieldMappings,notifications:new wp.ccf.collections.FormNotifications,pause:!1,pauseMessage:l.pauseMessage,theme:"none"};return e=i.defaults(e,this.constructor.__super__.defaults),wp.ccf.utils.cleanDateFields(e),e},decode:function(){var e=i.keys(wp.api.models.Post.prototype.defaults);return e=i.without(e,"title"),n.call(this,e)},getFieldSlugs:function(e){var t=wp.ccf.currentForm.get("fields"),i=[];return t.each(function(t){e&&t.isImmutable||i.push(t.get("slug"))}),i},parse:function(e){var t=this,l=0,s=0;if(e.fields){var o=t.get("fields");if(o&&o.length>0){for(l=0;e.fields.length>l;l++){var n=e.fields[l],c=o.findWhere({slug:n.slug});if(c){if(n.choices!==void 0){var r=t.get("choices");if(r&&r.length>0)for(s=0;n.choices>s;s++){var a=r.at(s);a.set(n.choices[s]),a.decode()}delete e.fields[l].choices}if(n.conditionals!==void 0){var d=t.get("conditionals");if(d&&d.length>0)for(s=0;n.conditionals>s;s++){var u=d.at(s);u.set(n.conditionals[s]),u.decode()}delete e.fields[l].conditionals}c.set(n),c.decode()}}delete e.fields}else{var f=[];i.each(e.fields,function(e){var t=new wp.ccf.models.Fields[e.type](e);t.decode(),f.push(t)}),e.fields=new wp.ccf.collections.Fields(f,{formId:e.id}),o?(o.add(f),delete e.fields):e.fields=new wp.ccf.collections.Fields(f,{formId:e.id})}}if(e.notifications){var p=t.get("notifications");if(p&&p.length>0){for(l=0;e.notifications.length>l;l++){var h=e.notifications[l],m=p.at(l);if(m){if(h.addresses!==void 0){var w=m.get("addresses");if(w&&w.length>0)for(s=0;h.addresses>s;s++){var g=w.at(s);g.set(h.addresses[s]),g.decode()}delete e.notifications[l].addresses}m.set(h),m.decode()}}delete e.notifications}else{var v=[];i.each(e.notifications,function(e){var t=new wp.ccf.models.FormNotification(e);t.decode(),v.push(t)}),p?(p.add(v),delete e.notifications):e.notifications=new wp.ccf.collections.FormNotifications(v)}}if(e.postFieldMappings){var y=t.get("postFieldMappings");if(y&&y.length>0){for(l=0;e.postFieldMappings.length>l;l++){var F=e.postFieldMappings[l],b=y.at(l);b&&(b.set(F),b.decode())}delete e.postFieldMappings}else{var S=[];i.each(e.postFieldMappings,function(e){var t=new wp.ccf.models.PostFieldMapping(e);t.decode(),S.push(t)}),y?(y.add(S),e.postFieldMappings=y):e.postFieldMappings=new wp.ccf.collections.PostFieldMappings(S)}}return this.constructor.__super__.parse.call(this,e)},toJSON:function(){var e=this.constructor.__super__.toJSON.call(this);return e.fields&&(e.fields=e.fields.toJSON()),e.notifications&&(e.notifications=e.notifications.toJSON()),e.postFieldMappings&&(e.postFieldMappings=e.postFieldMappings.toJSON()),e.author&&(e.author=e.author.toJSON()),e}}),wp.ccf.models.Submission=wp.api.models.Submission||wp.api.models.Post.extend({defaults:{id:null,data:{},fields:{}},sync:o,urlRoot:l.apiRoot.replace(/\/$/,"")+"/ccf/v1/submissions"}),wp.ccf.models.Field=wp.api.models.Field||wp.api.models.Post.extend({idAttribute:"id",defaults:function(){return{id:null,conditionalsEnabled:!1,conditionalType:"show",conditionalFieldsRequired:"all",conditionals:new wp.ccf.collections.FieldConditionals}},set:s,initialize:function(e){if("object"==typeof e&&e.conditionals){var t=[];i.each(e.conditionals,function(e){var i=new wp.ccf.models.FieldConditional(e);i.decode(),t.push(i)}),this.set("conditionals",new wp.ccf.collections.FieldConditionals(t))}},required:function(){return["slug"]},decode:function(){return n.call(this,i.keys(wp.api.models.Post.prototype.defaults))},hasRequiredAttributes:function(){var e=this,t=!0;return i.each(this.required(),function(i){(e.get(i)===void 0||""===e.get(i))&&(t=!1)}),t},sync:o}),wp.ccf.models.StandardField=wp.ccf.models.StandardField||wp.ccf.models.Field.extend({idAttribute:"id",defaults:function(){var e={label:l.fieldLabel,value:"",placeholder:"",slug:"",type:"",required:!1,className:"",description:""};return i.defaults(e,this.constructor.__super__.defaults())},initialize:function(){return wp.ccf.models.StandardField.__super__.initialize.apply(this,arguments)}}),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())},initialize:function(){return this.constructor.__super__.initialize.apply(this,arguments)}}),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())},initialize:function(){return this.constructor.__super__.initialize.apply(this,arguments)}}),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())},initialize:function(){return this.constructor.__super__.initialize.apply(this,arguments)}}),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())},initialize:function(){return this.constructor.__super__.initialize.apply(this,arguments)}}),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())},initialize:function(){return this.constructor.__super__.initialize.apply(this,arguments)}}),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())},initialize:function(){return this.constructor.__super__.initialize.apply(this,arguments)}}),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())},initialize:function(){return this.constructor.__super__.initialize.apply(this,arguments)}}),wp.ccf.models.Fields.date=wp.ccf.models.Fields.date||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"date",showDate:!0,showTime:!0,dateFormat:"mm/dd/yyyy"};return i.defaults(e,this.constructor.__super__.defaults())},initialize:function(){return this.constructor.__super__.initialize.apply(this,arguments)}}),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())},initialize:function(){return this.constructor.__super__.initialize.apply(this,arguments)}}),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,initialize:function(){return this.constructor.__super__.initialize.apply(this,arguments)}}),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())},initialize:function(){return this.constructor.__super__.initialize.apply(this,arguments)}}),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,initialize:function(){return this.constructor.__super__.initialize.apply(this,arguments)}}),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,initialize:function(){return this.constructor.__super__.initialize.apply(this,arguments)}}),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))}return wp.ccf.models.ChoiceableField.__super__.initialize.apply(this,arguments)}}),wp.ccf.models.Fields.radio=wp.ccf.models.Fields.radio||wp.ccf.models.ChoiceableField.extend({defaults:function(){var e={type:"radio"};return i.defaults(e,this.constructor.__super__.defaults())},initialize:function(){return this.constructor.__super__.initialize.apply(this,arguments)}}),wp.ccf.models.Fields.checkboxes=wp.ccf.models.Fields.checkboxes||wp.ccf.models.ChoiceableField.extend({defaults:function(){var e={type:"checkboxes"};return i.defaults(e,this.constructor.__super__.defaults())},initialize:function(){return this.constructor.__super__.initialize.apply(this,arguments)}}),wp.ccf.models.Fields.dropdown=wp.ccf.models.Fields.dropdown||wp.ccf.models.ChoiceableField.extend({defaults:function(){var e={type:"dropdown"};return i.defaults(e,this.constructor.__super__.defaults())},initialize:function(){return this.constructor.__super__.initialize.apply(this,arguments)}})}(jQuery,Backbone,_,ccfSettings),function(e,t,i,l){"use strict";var s=function(e,t,i){return i=i||{},i.emulateHTTP=!0,this.constructor.__super__.sync.call(this,e,t,i)};wp.ccf.collections=wp.ccf.collections||{},wp.ccf.collections.Forms=wp.ccf.collections.Forms||wp.api.collections.Posts.extend({model:wp.ccf.models.Form,url:l.apiRoot.replace(/\/$/,"")+"/ccf/v1/forms",formsFetching:{},initialize:function(){this.constructor.__super__.initialize(),this.formsFetching={}},sync:s,remove:function(e,t){t=t||{};var l=this.constructor.__super__.remove.call(this,e,t);return t.destroy&&(e instanceof Array?i.each(e,function(e){e.destroy()}):e.destroy()),l}}),wp.ccf.collections.Fields=wp.ccf.collections.Fields||wp.api.collections.Posts.extend({model:wp.ccf.models.Field,url:function(){return l.apiRoot+"/ccf/forms/"+this.formId+"/fields"},initialize:function(e,t){t&&t.formId&&(this.formId=t.formId)},sync:s}),wp.ccf.collections.PostFieldMappings=wp.ccf.collections.PostFieldMappings||t.Collection.extend({model:wp.ccf.models.PostFieldMapping}),wp.ccf.collections.FormNotificationAddresses=wp.ccf.collections.FormNotificationAddresses||t.Collection.extend({model:wp.ccf.models.FormNotificationAddress}),wp.ccf.collections.FormNotifications=wp.ccf.collections.FormNotifications||t.Collection.extend({model:wp.ccf.models.FormNotification}),wp.ccf.collections.Submissions=wp.ccf.collections.Submissions||wp.api.collections.Posts.extend({model:wp.ccf.models.Submission,url:function(){return l.apiRoot.replace(/\/$/,"")+"/ccf/v1/forms/"+this.formId+"/submissions"},initialize:function(e,t){this.constructor.__super__.initialize.apply(this,arguments),t&&t.formId&&(this.formId=t.formId)},sync:s}),wp.ccf.collections.FieldChoices=wp.ccf.collections.FieldChoices||t.Collection.extend({model:wp.ccf.models.FieldChoice}),wp.ccf.collections.FieldConditionals=wp.ccf.collections.FieldConditionals||t.Collection.extend({model:wp.ccf.models.FieldConditional})}(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",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.FieldConditional=t.View.extend({template:wp.ccf.utils.template("ccf-field-conditional-template"),className:"conditional",events:{"click .add":"triggerAdd","click .delete":"triggerDelete",saveConditional:"saveConditional"},initialize:function(e){this.field=e.field,this.fieldCollection=e.fieldCollection},destroy:function(){wp.ccf.dispatcher.off("mainViewChange",this.saveConditional),this.unbind()},saveConditional:function(){if(""!==this.el.innerHTML){var e=this.el.querySelectorAll(".conditional-field")[0].value,t=this.el.querySelectorAll(".conditional-value")[0].value,i=this.el.querySelectorAll(".conditional-compare")[0].value;return this.model.set("field",e),this.model.set("value",t),this.model.set("compare",i),this}},updateFields:function(){var e=this.el.querySelectorAll(".conditional-field")[0];e.innerHTML="",e.disabled=!1;var t,i=0,s=this.model.get("field");this.fieldCollection.length>=1&&(t=document.createElement("option"),t.innerHTML=l.chooseFormField,t.value="",e.appendChild(t),this.fieldCollection.each(function(l){if(this.field.get("slug")!==l.get("slug")){var o=l.get("type");"address"!==o&&"checkboxes"!==o&&"date"!==o&&"name"!==o&&"file"!==o&&"recaptcha"!==o&&"section-header"!==o&&"html"!==o&&(t=document.createElement("option"),t.innerHTML=l.get("slug"),t.value=l.get("slug"),l.get("slug")===s&&(t.selected=!0),e.appendChild(t),i++)}},this)),0===i&&(e.innerHTML="",t=document.createElement("option"),t.innerHTML=l.noAvailableFields,t.value="",e.appendChild(t),e.disabled=!0)},render:function(){var e={};return this.model&&(e.conditional=this.model.toJSON()),this.el.innerHTML=this.template(e),wp.ccf.dispatcher.on("mainViewChange",this.saveConditional,this),this.listenTo(this.fieldCollection,"add",this.updateFields,this),this.listenTo(this.fieldCollection,"remove",this.updateFields,this),this.updateFields(),this},triggerAdd:function(){this.field.get("conditionals").add(new wp.ccf.models.FieldConditional)},triggerDelete:function(){var e=this.field.get("conditionals");if(e.length>1)e.remove(this.model),this.destroy(),this.remove();else{var t=this.el.querySelectorAll(".conditional-value")[0],i=this.el.querySelectorAll(".conditional-field")[0];t.value="";for(var l=0;i.childNodes.length>l;l++)i.childNodes[l].selected=!1}}}),wp.ccf.views.EmptyFormNotificationTableRow=wp.ccf.views.EmptyFormNotificationTableRow||t.View.extend({tagName:"tr",template:wp.ccf.utils.template("ccf-empty-form-notification-row-template"),events:{"click .add":"triggerAdd"},initialize:function(e){this.form=e.form},destroy:function(){this.unbind()},render:function(){return this.$el.html(this.template()),this},triggerAdd:function(){var e=this.form.get("notifications");this.destroy(),e.add(new wp.ccf.models.FormNotification)}}),wp.ccf.views.EmptyFormTableRow=wp.ccf.views.EmptyFormTableRow||t.View.extend({tagName:"tr",template:wp.ccf.utils.template("ccf-empty-form-table-row-template"),render:function(){return this.$el.html(this.template()),this}}),wp.ccf.views.FormNotificationAddress=t.View.extend({template:wp.ccf.utils.template("ccf-form-notification-address-template"),className:"address",events:{"click .add":"triggerAdd","click .delete":"triggerDelete","blur input":"save","change select":"save"},initialize:function(e){this.notification=e.notification,this.parent=e.parent,this.form=e.form},destroy:function(){this.unbind()},save:function(){if(""!==this.el.innerHTML){var e=this.el.querySelectorAll(".form-notification-address-type")[0].value,t=this.el.querySelectorAll(".form-notification-address-email"),i=this.el.querySelectorAll(".form-notification-address-field"),l=this.model.get("type");return t.length&&this.model.set("email",t[0].value),i.length&&this.model.set("field",i[0].value),this.model.set("type",e),l!==e&&this.render(),this}},updateFromFieldField:function(){if("edit"===this.parent.context&&"field"===this.model.get("type")){var e=this.el.querySelectorAll(".form-notification-address-field")[0];e.innerHTML="",e.disabled=!1;var t,i=this.form.get("fields"),s=0,o=this.model.get("field");i.length>=1&&i.each(function(i){("email"===i.get("type")||"dropdown"===i.get("type")||"radio"===i.get("type")||"single-line-text"===i.get("type"))&&(t=document.createElement("option"),t.innerHTML=i.get("slug"),t.value=i.get("slug"),i.get("slug")===o&&(t.selected=!0),e.appendChild(t),s++)}),0===s&&(t=document.createElement("option"),t.innerHTML=l.noApplicableFields,t.value="",e.appendChild(t),e.disabled=!0)}},render:function(){var e={};this.model&&(e.address=this.model.toJSON()),this.el.innerHTML=this.template(e);var t=this.form.get("fields");return this.listenTo(t,"add",this.updateFromFieldField,this),this.listenTo(t,"remove",this.updateFromFieldField,this),"field"===this.model.get("type")&&this.updateFromFieldField(),this},triggerAdd:function(){this.notification.get("addresses").add(new wp.ccf.models.FormNotificationAddress)},triggerDelete:function(){var e=this.notification.get("addresses");e.length>1?this.parent.deleteAddress(this):(this.model.clear().set(wp.ccf.models.FormNotificationAddress.prototype.defaults),this.destroy(),this.render())}}),wp.ccf.views.ExistingFormNotificationRow=t.View.extend({template:wp.ccf.utils.template("ccf-existing-form-notification-table-row-template"),tagName:"tr",events:{"change select.form-email-notification-from-type":"toggleNotificationFields","change select.form-email-notification-from-name-type":"toggleNotificationFields","change select.form-email-notification-subject-type":"toggleNotificationFields","click .close-notification":"changeContext","click .edit-notification":"changeContext","click .delete-notification":"triggerDelete","blur input":"save","change select":"save"},addressViews:[],initialize:function(e){this.form=e.form,this.addressViews=[],this.parent=e.parent,this.context=e.context!==void 0?e.context:"view";var t=this.model.get("addresses");this.listenTo(t,"add",this.addAddress)},deleteAddress:function(e){i.each(this.addressViews,function(t){if(e.cid===t.cid){var l=i.indexOf(this.addressViews,t);this.model.get("addresses").remove(e.model),this.addressViews[l].remove(),this.addressViews.splice(l,1)}},this)},addAddress:function(e){var t=this.el.querySelectorAll(".addresses")[0],i=new wp.ccf.views.FormNotificationAddress({model:e,parent:this,notification:this.model,form:this.form});this.addressViews.push(i),t.appendChild(i.render().el)},destroy:function(){this.unbind()},changeContext:function(e,t){"edit"===this.context&&this.save(),t?this.context=t:("view"===this.context&&this.parent.closeAllNotifications(),this.context="edit"===this.context?"view":"edit"),this.destroy(),this.render()},updateFieldVariables:function(){if("edit"===this.context){var e,t=this.el.querySelectorAll(".field-variables")[0],i="",l=this.form.get("fields");l.each(function(t){e=t.get("type"),"html"!==e&&"section-header"!==e&&"recaptcha"!==e&&(i+="["+t.get("slug")+"] ")}),t.innerText=i}},updateFromFieldField:function(){if("edit"===this.context){var e=this.el.querySelectorAll(".form-email-notification-from-field")[0];e.innerHTML="",e.disabled=!1;var t=this.el.querySelectorAll(".form-email-notification-subject-field")[0];t.innerHTML="",t.disabled=!1;var i=this.el.querySelectorAll(".form-email-notification-from-name-field")[0];i.innerHTML="",i.disabled=!1;var s,o=this.form.get("fields"),n=0,c=0,r=0,a=this.model.get("emailNotificationFromField"),d=this.model.get("emailNotificationSubjectField"),u=this.model.get("emailNotificationFromNameField");o.length>=1&&o.each(function(l){("email"===l.get("type")||"dropdown"===l.get("type")||"radio"===l.get("type")||"single-line-text"===l.get("type"))&&(s=document.createElement("option"),s.innerHTML=l.get("slug"),s.value=l.get("slug"),l.get("slug")===a&&(s.selected=!0),e.appendChild(s),n++),("name"===l.get("type")||"single-line-text"===l.get("type")||"radio"===l.get("type")||"dropdown"===l.get("type"))&&(s=document.createElement("option"),s.innerHTML=l.get("slug"),s.value=l.get("slug"),l.get("slug")===u&&(s.selected=!0),i.appendChild(s),c++),("single-line-text"===l.get("type")||"radio"===l.get("type")||"dropdown"===l.get("type"))&&(s=document.createElement("option"),s.innerHTML=l.get("slug"),s.value=l.get("slug"),l.get("slug")===d&&(s.selected=!0),t.appendChild(s),r++)}),0===n&&(s=document.createElement("option"),s.innerHTML=l.noEmailFields,s.value="",e.appendChild(s),e.disabled=!0),0===c&&(s=document.createElement("option"),s.innerHTML=l.noNameFields,s.value="",i.appendChild(s),i.disabled=!0),0===r&&(s=document.createElement("option"),s.innerHTML=l.noApplicableFields,s.value="",t.appendChild(s),t.disabled=!0)}},toggleNotificationFields:function(){var e=this.el.querySelectorAll(".email-notification-from-address")[0],t=this.el.querySelectorAll(".email-notification-from-field")[0],i=this.el.querySelectorAll(".form-email-notification-from-type")[0],l=this.el.querySelectorAll(".email-notification-subject")[0],s=this.el.querySelectorAll(".email-notification-subject-field")[0],o=this.el.querySelectorAll(".form-email-notification-subject-type")[0],n=this.el.querySelectorAll(".email-notification-from-name")[0],c=this.el.querySelectorAll(".email-notification-from-name-field")[0],r=this.el.querySelectorAll(".form-email-notification-from-name-type")[0];e.style.display="none",t.style.display="none","custom"===i.value?e.style.display="block":"field"===i.value&&(t.style.display="block"),l.style.display="none",s.style.display="none","custom"===o.value?l.style.display="block":"field"===o.value&&(s.style.display="block"),n.style.display="none",c.style.display="none","custom"===r.value?n.style.display="block":"field"===r.value&&(c.style.display="block")},save:function(){if(""!==this.el.innerHTML&&"edit"===this.context){var e=this.el.querySelectorAll(".form-email-notification-title")[0].value;this.model.set("title",e);var t=this.el.querySelectorAll(".form-email-notification-content")[0].value;this.model.set("content",t);var i=this.el.querySelectorAll(".form-email-notification-active")[0].value;this.model.set("active","1"===i?!0:!1);var l=this.el.querySelectorAll(".form-email-notification-from-type")[0].value;this.model.set("fromType",l);var s=this.el.querySelectorAll(".form-email-notification-from-address")[0].value;this.model.set("fromAddress",s);var o=this.el.querySelectorAll(".form-email-notification-from-field")[0].value;this.model.set("fromField",o);var n=this.el.querySelectorAll(".form-email-notification-from-name-type")[0].value;this.model.set("fromNameType",n);var c=this.el.querySelectorAll(".form-email-notification-from-name")[0].value;this.model.set("fromName",c);var r=this.el.querySelectorAll(".form-email-notification-from-name-field")[0].value;this.model.set("fromNameField",r);var a=this.el.querySelectorAll(".form-email-notification-subject-type")[0].value;this.model.set("subjectType",a);var d=this.el.querySelectorAll(".form-email-notification-subject")[0].value;this.model.set("subject",d);var u=this.el.querySelectorAll(".form-email-notification-subject-field")[0].value;this.model.set("subjectField",u);for(var f=0;this.addressViews.length>f;f++)this.addressViews[f].save();return this}},render:function(){var e={context:this.context,form:this.form.toJSON()};if(this.model&&(e.notification=this.model.toJSON()),this.el.innerHTML=this.template(e),"edit"===this.context){this.toggleNotificationFields(),this.updateFromFieldField(),this.updateFieldVariables();var t=this.el.querySelectorAll(".addresses")[0],i=this.model.get("addresses");if(i.length>=1)i.each(function(e){var i=new wp.ccf.views.FormNotificationAddress({model:e,parent:this,notification:this.model,form:this.form}).render();t.appendChild(i.el),this.addressViews.push(i)},this);else{var l=new wp.ccf.models.FormNotificationAddress;i.add(l)}}var s=this.form.get("fields");return this.listenTo(s,"add",this.updateFromFieldField,this),this.listenTo(s,"remove",this.updateFromFieldField,this),this.listenTo(s,"add",this.updateFieldVariables,this),this.listenTo(s,"remove",this.updateFieldVariables,this),this},triggerDelete:function(){this.parent.deleteNotification(this)}}),wp.ccf.views.FieldBase=wp.ccf.views.FieldBase||t.View.extend({events:{"blur input":"saveField","blur input.field-slug":"checkSlug","blur textarea":"saveField","change select":"saveField",'change input[type="checkbox"]':"saveField"},initialize:function(){var e=this.model.get("conditionals");this.listenTo(e,"add",this.addConditional)},addConditional:function(e){var t=new wp.ccf.views.FieldConditional({model:e,field:this.model,fieldCollection:this.collection}).render(),i=this.el.querySelectorAll(".conditionals")[0];i.appendChild(t.el)},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)
2
- },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()},saveField:function(){var t=this.el.querySelectorAll(".conditionals")[0].querySelectorAll(".conditional");i.each(t,function(t){e(t).trigger("saveConditional")}),this.model.set("conditionalType",this.el.querySelectorAll(".field-conditional-type")[0].value),this.model.set("conditionalFieldsRequired",this.el.querySelectorAll(".field-conditional-fields-required")[0].value);var l=this.model.get("conditionalsEnabled");this.model.set("conditionalsEnabled",1==this.el.querySelectorAll(".field-conditionals-enabled")[0].value?!0:!1),l!==this.model.get("conditionalsEnabled")&&this.render("advanced")},render:function(e){e=e?e:"basic",this.el.innerHTML=this.template({field:this.model.toJSON(),startPanel:e}),this.checkSlug();var t=this.model.get("conditionals"),i=this.el.querySelectorAll(".conditionals")[0];if(t.length>=1)t.each(function(e){var t=new wp.ccf.views.FieldConditional({model:e,field:this.model,fieldCollection:this.collection}).render();i.appendChild(t.el)},this);else{var l=new wp.ccf.models.FieldConditional;t.add(l)}return 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"),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.constructor.__super__.saveField.apply(this,arguments),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"),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.constructor.__super__.saveField.apply(this,arguments),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"),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.constructor.__super__.saveField.apply(this,arguments),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"),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.constructor.__super__.saveField.apply(this,arguments),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"),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.constructor.__super__.saveField.apply(this,arguments),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.constructor.__super__.saveField.apply(this,arguments),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.constructor.__super__.saveField.apply(this,arguments),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),this.constructor.__super__.saveField.apply(this,arguments);var e=this.el.querySelectorAll(".field-value");e.length>0&&this.model.set("value",e[0].value);var t=this.el.querySelectorAll(".field-date-format");t.length&&this.model.set("dateFormat",t[0].value);var i=this.model.get("showDate"),l=this.el.querySelectorAll(".field-show-date")[0].checked?!0:!1;this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("showDate",l);var s=this.model.get("showTime"),o=this.el.querySelectorAll(".field-show-time")[0].checked?!0:!1;return this.model.set("showTime",o),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1),(o!=s||l!=i)&&this.render(),this}}}),wp.ccf.views.Fields.name=wp.ccf.views.Fields.name||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-name-template"),saveField:function(){return""!==this.el.innerHTML?(this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("description",this.el.querySelectorAll(".field-description")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1),this.constructor.__super__.saveField.apply(this,arguments),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.constructor.__super__.saveField.apply(this,arguments),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.constructor.__super__.saveField.apply(this,arguments),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.constructor.__super__.saveField.apply(this,arguments),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),this.constructor.__super__.saveField.apply(this,arguments);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),wp.ccf.views.ChoiceableField.__super__.saveField.apply(this,arguments);var t=this.el.querySelectorAll(".repeatable-choices")[0].querySelectorAll(".choice");return i.each(t,function(t){e(t).trigger("saveChoice")}),this}},render:function(t){var i=this;t=t?t:"basic",i.el.innerHTML=i.template({field:i.model.toJSON(),startPanel:t}),i.checkSlug();var l=i.model.get("choices"),s=this.el.querySelectorAll(".repeatable-choices")[0];if(l.length>=1)l.each(function(e){var t=new wp.ccf.views.FieldChoice({model:e,field:i.model}).render();s.appendChild(t.el)});else{var o=new wp.ccf.models.FieldChoice;l.add(o)}s=this.el.querySelectorAll(".repeatable-choices")[0],e(s).sortable({handle:".move",axis:"y",stop:function(e,t){t.item.trigger("sorted",t.item.index())}});var n=this.model.get("conditionals"),c=this.el.querySelectorAll(".conditionals")[0];if(n.length>=1)n.each(function(e){var t=new wp.ccf.views.FieldConditional({model:e,field:this.model,fieldCollection:this.collection}).render();c.appendChild(t.el)},this);else{var r=new wp.ccf.models.FieldConditional;n.add(r)}return i}}),wp.ccf.views.Fields.dropdown=wp.ccf.views.Fields.dropdown||wp.ccf.views.ChoiceableField.extend({template:wp.ccf.utils.template("ccf-dropdown-template"),events:function(){return this.constructor.__super__.events}}),wp.ccf.views.Fields.radio=wp.ccf.views.Fields.radio||wp.ccf.views.ChoiceableField.extend({template:wp.ccf.utils.template("ccf-radio-template"),events:function(){return this.constructor.__super__.events}}),wp.ccf.views.Fields.checkboxes=wp.ccf.views.Fields.checkboxes||wp.ccf.views.ChoiceableField.extend({template:wp.ccf.utils.template("ccf-checkboxes-template"),events:function(){return this.constructor.__super__.events}}),wp.ccf.views.FieldSidebar=wp.ccf.views.FieldSidebar||t.View.extend({initialize:function(e){this.currentFieldView=null,this.form=e.form},save:function(e){this.currentFieldView&&""!==this.currentFieldView.el.innerHTML&&this.currentFieldView.saveField(),e&&e instanceof Object&&e.resolve()},fieldRemoved:function(){this.currentFieldView&&(this.form.get("fields").get(this.currentFieldView.model)||this.render())},destroy:function(){wp.ccf.dispatcher.off("saveField",this.save),wp.ccf.dispatcher.off("mainViewChange",this.save),this.unbind()},render:function(e){var t={};if(e){var i=e.get("type");this.currentFieldView&&(this.currentFieldView.saveField(),this.currentFieldView.destroy&&this.currentFieldView.destroy()),this.currentFieldView=new wp.ccf.views.Fields[i]({model:e,collection:this.form.get("fields")}),this.currentFieldView.render(),this.el.innerHTML="",this.el.appendChild(this.currentFieldView.el);var l=this.form.get("fields");this.listenTo(l,"remove",this.fieldRemoved)}else{var s=wp.ccf.utils.template("ccf-empty-field-template");this.el.innerHTML=s(t)}return wp.ccf.dispatcher.on("saveField",this.save,this),wp.ccf.dispatcher.on("mainViewChange",this.save,this),this}}),wp.ccf.views.FieldRowPlaceholder=wp.ccf.views.FieldRowPlaceholder||t.View.extend({template:wp.ccf.utils.template("ccf-field-row-template"),tagName:"div",className:"field",initialize:function(e){this.type=e.type},render:function(){return this.el.innerHTML=this.template({label:l.allLabels[this.type]}),this.el.setAttribute("data-field-type",this.type),this.el.className+=" "+this.type,this}}),wp.ccf.views.FieldRow=wp.ccf.views.FieldRow||t.View.extend({template:wp.ccf.utils.template("ccf-field-row-template"),tagName:"div",className:"field",events:{"click .delete":"triggerDelete","click h4":"triggerEdit",sorted:"triggerUpdateSort"},initialize:function(e){i.bindAll(this,"triggerDelete"),this.form=e.form,this.listenTo(this.model,"change",this.handleChange,this),this.listenTo(this.model,"requirementsNotMet",this.requirementsNotMet,this),this.listenTo(this.model,"requirementsMet",this.requirementsMet,this),this.listenTo(this.model,"duplicateSlug",this.duplicateSlug,this),this.model.attributes.choices&&this.listenTo(this.model.attributes.choices,"change",this.handleChange,this)},duplicateSlug:function(){this.requirementsMet(),this.el.className+=" field-duplicate-slug"},requirementsNotMet:function(){this.requirementsMet(),this.el.className+=" field-incomplete"},requirementsMet:function(){this.el.className=this.el.className.replace(/(field-incomplete|field-duplicate-slug)/i,"")},triggerUpdateSort:function(e,t){this.form.get("fields").remove(this.model),this.form.get("fields").add(this.model,{at:t})},handleChange:function(){this.render()},triggerDelete:function(e){e.stopPropagation(),this.form.get("fields").remove(this.model),this.undelegateEvents(),this.remove()},triggerEdit:function(){var e=this.el.parentNode.querySelectorAll(".ccf-editing");i.each(e,function(e){e.className=e.className.replace(/ccf-editing/i,"")}),this.el.className=this.el.className.replace(/ccf-editing/i,"")+" ccf-editing",wp.ccf.dispatcher.trigger("openEditField",this.model)},render:function(e){this.el.innerHTML=this.template({label:l.allLabels[this.model.get("type")]}),this.el.setAttribute("data-field-type",this.model.get("type"));var t=RegExp(" "+this.model.get("type"),"i");this.el.className=this.el.className.replace(t,"")+" "+this.model.get("type"),e&&(this.el.className=this.el.className.replace(/ instantiated/i,"")+" instantiated");var i=document.getElementById("ccf-"+this.model.get("type")+"-preview-template");if(i){var s=this.el.querySelectorAll(".preview")[0];s.style.display="block",s.innerHTML=wp.ccf.utils.template("ccf-"+this.model.get("type")+"-preview-template")({field:this.model.toJSON()})}return this}}),wp.ccf.views.PostFieldMapping=t.View.extend({template:wp.ccf.utils.template("ccf-post-field-mapping"),className:"field-mapping",events:{"click .add":"triggerAdd","click .delete":"triggerDelete","blur input":"save","change select":"save"},initialize:function(e){this.parent=e.parent,this.form=e.form},destroy:function(){this.unbind()},save:function(){if(""!==this.el.innerHTML){var e=this.el.querySelectorAll(".field-form-field")[0].value,t=this.el.querySelectorAll(".field-post-field")[0].value,i=this.el.querySelectorAll(".field-custom-field-key"),l=this.model.get("postField");return this.model.set("formField",e),this.model.set("postField",t),i.length&&this.model.set("customFieldKey",i[0].value),l!==t&&this.render(),this}},updateFormFieldField:function(){var e=this.el.querySelectorAll(".field-form-field")[0];e.innerHTML="",e.disabled=!1;var t,i=this.form.get("fields"),s=0,o=this.model.get("formField");i.length>=1&&(t=document.createElement("option"),t.innerHTML=l.chooseFormField,t.value="",e.appendChild(t),i.each(function(i){t=document.createElement("option"),t.innerHTML=i.get("slug"),t.value=i.get("slug"),i.get("slug")===o&&(t.selected=!0),e.appendChild(t),s++})),0===s&&(t=document.createElement("option"),t.innerHTML=l.noAvailableFields,t.value="",e.appendChild(t),e.disabled=!0)},updatePostFields:function(){var e,t=this.el.querySelectorAll(".field-post-field")[0];e=document.createElement("option"),e.value="",e.innerText=l.choosePostField,t.appendChild(e);var s=this.form.get("postFieldMappings"),o=[];s.each(function(e){e!==this.model&&o.push(e.get("postField"))},this),i.each(l.postFields.single,function(i,l){-1===o.indexOf(l)&&(e=document.createElement("option"),e.value=l,e.innerText=i,this.model.get("postField")===l&&(e.selected=!0),t.appendChild(e))},this),i.each(l.postFields.repeatable,function(i,l){e=document.createElement("option"),e.value=l,e.innerText=i,this.model.get("postField")===l&&(e.selected=!0),t.appendChild(e)},this)},render:function(){var e={};this.model&&(e.mapping=this.model.toJSON()),this.el.innerHTML=this.template(e);var t=this.form.get("fields");return this.listenTo(t,"add",this.updateFormFieldField,this),this.listenTo(t,"remove",this.updateFormFieldField,this),this.updateFormFieldField(),this.updatePostFields(),this},triggerAdd:function(){this.form.get("postFieldMappings").add(new wp.ccf.models.PostFieldMapping)},triggerDelete:function(){var e=this.form.get("postFieldMappings");e.length>1?this.parent.deletePostFieldMapping(this):(this.model.clear().set(wp.ccf.models.PostFieldMapping.prototype.defaults),this.destroy(),this.render())}}),wp.ccf.views.FormSettings=wp.ccf.views.FormSettings||t.View.extend({template:wp.ccf.utils.template("ccf-form-settings-template"),events:{"blur input":"save","change select":"save","change select.form-completion-action-type":"toggleCompletionFields","change select.form-pause":"togglePauseFields","change select.form-post-creation":"togglePostCreationFields","click .add-notification":"triggerAddNotification"},notificationViews:[],mappingViews:[],initialize:function(e){this.model=e.form,this.notificationViews=[],this.mappingViews=[];var t=this.model.get("notifications");this.listenTo(t,"add",this.addNotification);var i=this.model.get("postFieldMappings");this.listenTo(i,"add",this.addPostFieldMapping)},deletePostFieldMapping:function(e){i.each(this.mappingViews,function(t){if(e.cid===t.cid){var l=i.indexOf(this.mappingViews,t);this.model.get("postFieldMappings").remove(e.model),this.mappingViews[l].remove(),this.mappingViews.splice(l,1)}},this)},addPostFieldMapping:function(e){var t=this.el.querySelectorAll(".post-creation-mapping")[0],i=new wp.ccf.views.PostFieldMapping({model:e,parent:this,form:this.model});this.mappingViews.push(i),t.appendChild(i.render().el)},triggerAddNotification:function(){var e=this.model.get("notifications");e.add(new wp.ccf.models.FormNotification)},closeAllNotifications:function(){i.each(this.notificationViews,function(e){e.changeContext(null,"view")})},addNotification:function(e){var t=new wp.ccf.views.ExistingFormNotificationRow({model:e,form:this.model,context:"edit",parent:this}).render(),l=this.el.querySelectorAll(".ccf-form-notifications .rows")[0];l.querySelectorAll(".no-notifications").length>0&&l.removeChild(l.firstChild),i.each(this.notificationViews,function(e){e.changeContext(null,"view")}),this.notificationViews.push(t),l.appendChild(t.el)},toggleCompletionFields:function(){var e=this.el.querySelectorAll(".form-completion-action-type")[0].value,t=this.el.querySelectorAll(".completion-message")[0],i=this.el.querySelectorAll(".completion-redirect-url")[0];"text"===e?(t.style.display="block",i.style.display="none"):(t.style.display="none",i.style.display="block")},togglePauseFields:function(){var e=this.el.querySelectorAll(".form-pause")[0].value,t=this.el.querySelectorAll(".pause-message")[0];t.style.display=parseInt(e)?"block":"none"},togglePostCreationFields:function(){var t=this.el.querySelectorAll(".form-post-creation")[0].value,i=e(this.el.querySelectorAll(".post-creation-mapping-field"));parseInt(t)?i.show():i.hide()},save:function(){if(""!==this.el.innerHTML){var e=this.el.querySelectorAll(".form-title")[0].value;this.model.set("title",{raw:e});var t=this.el.querySelectorAll(".form-description")[0].value;this.model.set("description",t);var i=this.el.querySelectorAll(".form-button-text")[0].value;this.model.set("buttonText",i);var l=this.el.querySelectorAll(".form-pause")[0].value;this.model.set("pause",parseInt(l)?!0:!1);var s=this.el.querySelectorAll(".form-post-creation")[0].value;this.model.set("postCreation",parseInt(s)?!0:!1);var o=this.el.querySelectorAll(".form-post-creation-type")[0].value;this.model.set("postCreationType",o);var n=this.el.querySelectorAll(".form-post-creation-status")[0].value;this.model.set("postCreationStatus",n);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 a=this.el.querySelectorAll(".form-completion-redirect-url")[0].value;this.model.set("completionRedirectUrl",a);var d=this.el.querySelectorAll(".form-completion-action-type")[0].value;this.model.set("completionActionType",d);var u=this.el.querySelectorAll(".form-theme")[0].value;this.model.set("theme",u)}},fullSave:function(e){""!==this.el.innerHTML&&(this.save(),i.each(this.notificationViews,function(e){e.save()}),i.each(this.mappingViews,function(e){e.save()}),e!==void 0&&e.promise!==void 0&&e.resolve())},destroy:function(){wp.ccf.dispatcher.off("saveFormSettings",this.fullSave),wp.ccf.dispatcher.off("mainViewChange",this.fullSave)},deleteNotification:function(e){if(i.each(this.notificationViews,function(t){if(e.cid===t.cid){var l=i.indexOf(this.notificationViews,t);this.model.get("notifications").remove(e.model),this.notificationViews[l].remove(),this.notificationViews.splice(l,1)}},this),!this.notificationViews.length){var t=this.el.querySelectorAll(".ccf-form-notifications .rows")[0];t.appendChild(new wp.ccf.views.EmptyFormNotificationTableRow({form:this.model}).render().el)}},render:function(){var e={form:this.model.toJSON()};this.model.get("fields");var t=this.model.get("notifications");this.el.innerHTML=this.template(e),this.toggleCompletionFields(),this.togglePostCreationFields(),this.togglePauseFields();var i=this.el.querySelectorAll(".ccf-form-notifications .rows")[0],l=document.createElement("tbody");l.className="rows",t.length>=1?t.each(function(e){var t=new wp.ccf.views.ExistingFormNotificationRow({model:e,form:this.model,parent:this}).render();l.appendChild(t.el),this.notificationViews.push(t)},this):l.appendChild(new wp.ccf.views.EmptyFormNotificationTableRow({form:this.model}).render().el),i.parentNode.replaceChild(l,i);var s=this.el.querySelectorAll(".post-creation-mapping")[0],o=this.model.get("postFieldMappings");if(o.length>=1)o.each(function(e){var t=new wp.ccf.views.PostFieldMapping({model:e,parent:this,form:this.model}).render();s.appendChild(t.el),this.mappingViews.push(t)},this);else{var n=new wp.ccf.models.PostFieldMapping;o.add(n)}return wp.ccf.dispatcher.on("mainViewChange",this.fullSave,this),wp.ccf.dispatcher.on("saveFormSettings",this.fullSave,this),this}}),wp.ccf.views.FormPane=wp.ccf.views.FormPane||t.View.extend(i.defaults({template:wp.ccf.utils.template("ccf-form-pane-template"),subViews:{"field-sidebar":wp.ccf.views.FieldSidebar,"form-settings":wp.ccf.views.FormSettings},events:{"click .save-button":"sync","click .signup-button":"signup","click .accordion-heading":"accordionClick","click .form-settings-heading":"accordionClick","click .insert-form-button":"insertForm"},initialize:function(){wp.ccf.dispatcher.on("openEditField",this.openEditField,this)},insertForm:function(){wp.ccf.utils.insertFormShortcode(this.model),wp.ccf.toggle()},signup:function(){var t=this.el.querySelectorAll(".email-signup-field")[0].value,i=this.el.querySelectorAll(".bottom .left.signup")[0];i.className="left signup",t?e.ajax({url:"//taylorlovett.us8.list-manage.com/subscribe/post-json?u=66118f9a5b0ab0414e83f043a&amp;id=b4ed816a24&c=?",method:"post",dataType:"jsonp",data:{EMAIL:t}}).done(function(){i.className="left signup signup-success"}):i.className="left signup signup-error"},accordionClick:function(t){var l=e(t.currentTarget).parents(".accordion-container")[0],s=l.querySelectorAll(".accordion-section");t.currentTarget.parentNode.className.match(/expanded/i)?t.currentTarget.parentNode.className=t.currentTarget.parentNode.className.replace(/expanded/i,""):t.currentTarget.parentNode.className+=" expanded",i.each(s,function(e){e!=t.currentTarget.parentNode&&e.className.match(/expanded/i)&&(e.className=e.className.replace(/expanded/i,""))}),t.currentTarget.className.match(/form-settings-heading/i)?this.el.className.match(/show-form-settings/i)?this.el.className=this.el.className.replace(/show-form-settings/i,""):this.el.className+=" show-form-settings":this.el.className=this.el.className.replace(/show-form-settings/i,"")},openEditField:function(e){this.renderedSubViews["field-sidebar"].render(e).el.style.display="block"},disable:function(){this.el.querySelectorAll(".save-button")[0].setAttribute("disabled","disabled"),this.el.querySelectorAll(".disabled-overlay")[0].style.display="block"},enable:function(){this.el.querySelectorAll(".save-button")[0].removeAttribute("disabled"),this.el.querySelectorAll(".disabled-overlay")[0].style.display="none"},sync:function(){var t=this,i=e(this.el.querySelectorAll(".spinner")[0]);i.fadeIn(),t.disable();var s=e.Deferred(),o=e.Deferred();wp.ccf.dispatcher.trigger("saveFormSettings",s),wp.ccf.dispatcher.trigger("saveField",o),e.when(s,o).then(function(){var e=t.model.get("fields"),s=!0,o={};e.each(function(e){var t=e.get("slug");e.hasRequiredAttributes()?t&&!t.match(/^[a-zA-Z0-9\-_]+$/)?(s=!1,e.trigger("requirementsNotMet")):o[e.get("slug")]!==void 0?(s=!1,e.trigger("duplicateSlug"),o[e.get("slug")].trigger("duplicateSlug")):e.trigger("requirementsMet"):(s=!1,e.trigger("requirementsNotMet")),e.get("slug")&&(o[e.get("slug")]=e)}),s?t.model.save({},{context:"edit"}).error(function(){var e="sync";wp.ccf.errorModal.render(e).show()}).done(function(){l.single&&!l.postId&&(window.location=l.adminUrl+"post.php?post="+t.model.get("id")+"&action=edit#ccf-form/"+t.model.get("id"))}).complete(function(){i.fadeOut(),t.enable(),wp.ccf.dispatcher.trigger("saveFormComplete",t.model)}):(t.enable(),i.fadeOut())})},enableDisableInsert:function(){var e=this.el.querySelectorAll(".insert-form-button")[0];this.model.get("id")?e.removeAttribute("disabled"):e.setAttribute("disabled","disabled")},getNextFieldOrd:function(){var e=this.model.get("fields"),t=e.length+1;return e.each(function(e){var i=e.get("slug"),l=/\-([0-9]+)$/g,s=l.exec(i);if(s&&s[1]){var o=parseInt(s[1]);o>=t&&(t=o+1)}}),t},render:function(t){var s=this;s.model=t?t:new wp.ccf.models.Form,this.listenTo(s.model,"change",this.enableDisableInsert,this);var o={labels:l.fieldLabels,form:s.model.toJSON()};window.form=s.model,s.el.innerHTML=this.template(o),s.el.className=s.el.className.replace(/show-form-settings/i,"");var n=s.el.querySelectorAll(".fields")[0];i.each(l.fieldLabels,function(e,t){n.appendChild(new wp.ccf.views.FieldRowPlaceholder({type:t}).render().el)});var c=s.el.querySelectorAll(".structure-fields")[0];i.each(l.structureFieldLabels,function(e,t){c.appendChild(new wp.ccf.views.FieldRowPlaceholder({type:t}).render().el)});var r=s.el.querySelectorAll(".special-fields")[0];i.each(l.specialFieldLabels,function(e,t){r.appendChild(new wp.ccf.views.FieldRowPlaceholder({type:t}).render().el)});var a=s.model.get("fields"),d=s.el.querySelectorAll(".form-content")[0],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 o=new wp.ccf.models.Fields[i](l),n=s.model.get("fields");n.add(o),new wp.ccf.views.FieldRow({model:o,el:t.item,form:s.model}).render(!0),t.item.attr("style","")}t.item.trigger("sorted",t.item.index())}}),s.initRenderSubViews(!1,!0,{form:s.model}),s.enableDisableInsert(),s}},wp.ccf.mixins.subViewable)),wp.ccf.views.ExistingFormTableRow=wp.ccf.views.ExistingFormTableRow||t.View.extend({tagName:"tr",template:wp.ccf.utils.template("ccf-existing-form-table-row-template"),events:{"click .edit":"triggerMainViewChange","click .delete":"triggerDelete","click .insert-form-button":"insertForm"},initialize:function(e){this.parent=e.parent
3
- },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,o=document.querySelectorAll(".ccf-open-form-manager")[0];if(!o)return!1;i.extend(this.dispatcher,t.Events),new wp.ccf.router,s.initErrorModal();var n=!1;if(l.single)if(n=!0,l.postId){var c=parseInt(l.postId);if(s.forms.formsFetching[c]===void 0){var r=new wp.ccf.models.Form({id:c}),a=r.fetch();s.forms.formsFetching[c]=a,s._currentFormDeferred=a,a.done(function(){delete s.forms.formsFetching[c],s.forms.add(r),s.currentForm=r})}else s._currentFormDeferred=s.forms.formsFetching[c],s._currentFormDeferred.done(function(){s.currentForm=s.forms.findWhere({id:c})});e.when(s._currentFormDeferred).then(function(){s._setupMainModal(!0),o.style.display="inline-block";var e=document.getElementById("ccf-submissions");if(e){var t=e.querySelectorAll(".inside")[0],i=document.createElement("div");i.className="ccf-submission-icon",i.setAttribute("data-icon","");var n=document.createElement("a");n.href="?action=edit&post="+parseInt(l.postId)+"&download_submissions=1&download_submissions_nonce="+l.downloadSubmissionsNonce,n.className="ccf-submission-icon",n.setAttribute("data-icon","");var c=document.getElementById("show-settings-link");i.onclick=function(){c.click()},e.insertBefore(i,e.firstChild.nextSibling.nextSibling),e.insertBefore(n,e.firstChild.nextSibling.nextSibling),wp.ccf.createSubmissionsTable(t)}})}else s._setupMainModal(!0),o.style.display="inline-block";else s._setupMainModal();var d=function(e){e=e||window.event;var t=e.currentTarget?e.currentTarget:e.srcElement,i=t.getAttribute("data-form-id");wp.ccf.toggle(i)};o.addEventListener?o.addEventListener("click",d,!1):o.attachEvent("onclick",d)}}),wp.ccf.createManager()}(jQuery,Backbone,_,ccfSettings);
1
+ (function(e,t,i,l){"use strict";window.wp=window.wp||{},wp.ccf=wp.ccf||{},wp.ccf.utils=wp.ccf.utils||{},wp.ccf.utils.cleanDateFields=function(e){delete e.date,delete e.date_gmt,delete e.modified,delete e.modified_gmt,delete e.date_tz,delete e.modified_tz},wp.ccf.utils.template=i.memoize(function(e){var t={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g};return i.template(document.getElementById(e).innerHTML,null,t)}),wp.ccf.utils.insertFormShortcode=function(e){var t=wp.ccf.forms.findWhere({id:e.get("id")});t||wp.ccf.forms.add(e);var i=tinymce.get(wpActiveEditor),l='[ccf_form id="'+e.get("id")+'"]';i&&!i.isHidden()?tinymce.activeEditor.execCommand("mceInsertContent",!1,l):document.getElementById(wpActiveEditor).value+=l},wp.ccf.utils.getPrettyPostDate=function(e){return e=moment.utc(e),l.gmtOffset&&(e=e.utcOffset(60*parseInt(l.gmtOffset))),e.format("h:mm a M/D/YYYY")},wp.ccf.utils.wordChop=function(e,t){var i=e.substr(0,t);return i.substr(0,Math.min(i.length,i.lastIndexOf(" "))),i.length<e.length&&(i+="..."),i},wp.ccf.utils.isFieldDate=function(e){return e.date!==void 0||e.hour!==void 0&&e.minute!==void 0&&e["am-pm"]!==void 0?!0:!1},wp.ccf.utils.isFieldName=function(e){return e.name!==void 0||e.last!==void 0?!0:!1},wp.ccf.utils.isFieldEmailConfirm=function(e){return e.email!==void 0||e.confirm!==void 0?!0:!1},wp.ccf.utils.isFieldAddress=function(e){return e.street!==void 0&&e.city!==void 0&&e.zipcode!==void 0&&e.line_two!==void 0?!0:!1},wp.ccf.utils.isFieldFile=function(e){return e.id!==void 0&&e.url!==void 0&&e.file_name!==void 0?!0:!1},wp.ccf.utils.getPrettyFieldEmailConfirm=function(e){return e.email?e.email:e.confirm?e.confirm:"-"},wp.ccf.utils.getPrettyFieldDate=function(e,t){var i="",s="",o="HH:mm MM/DD/YY";if(t&&t.ccf_field_dateFormat&&"dd/mm/yyyy"===t.ccf_field_dateFormat&&(o="HH:mm DD/MM/YY"),e.hour&&e.minute&&e["am-pm"]&&(i+=e.hour+":"+e.minute+" "+e["am-pm"]),e.date&&(i+=" "+e.date),!i)return"-";var n=moment(i,o);return n.isValid()?(e.hour&&e.minute&&e["am-pm"]&&(s+=n.format("h:mm a")),e.date&&(s&&(s+=" "),s+=e.date),s):l.invalidDate},wp.ccf.utils.getPrettyFieldName=function(e){var t=e.first;return t.length>0&&(t+=" "),e.last&&(t+=e.last),t||(t="-"),t},wp.ccf.utils.getPrettyFieldAddress=function(e){if(!e.street||!e.city)return"-";var t=e.street;return e.line_two&&(t+=" "+e.line_two),t+=", "+e.city,e.state&&(t+=", "+e.state),e.zipcode&&(t+=" "+e.zipcode),e.country&&(t+=" "+e.country),t}})(jQuery,Backbone,_,ccfSettings),function(e,t,i){"use strict";wp.ccf.mixins=wp.ccf.mixins||{},wp.ccf.mixins.subViewable=wp.ccf.mixins.subViewable||{subViews:{},initRenderSubViews:function(e,t,l){this.renderedSubViews||(this.renderedSubViews={});for(var s in this.subViews){var o={el:this.$el.find(".ccf-"+s),parent:this};l&&i.extend(o,l),this.renderedSubViews[s]&&this.renderedSubViews[s].destroy&&this.renderedSubViews[s].destroy(),(t||!this.renderedSubViews[s])&&(this.renderedSubViews[s]=new this.subViews[s](o)),this.renderedSubViews[s].render(),e&&(this.renderedSubViews[s].el.style.display="block")}return this},showView:function(e,t,i){if(this.renderedSubViews!==void 0&&this.renderedSubViews[e]!==void 0){var l=this.renderedSubViews[e];i||l.render(t),l.el.style.display="block",this.currentView=e;for(var s in this.subViews)s!==e&&(this.renderedSubViews[s].el.style.display="none")}}}}(jQuery,Backbone,_,ccfSettings),function(e,t,i,l){"use strict";wp.ccf.models=wp.ccf.models||{},wp.ccf.models.Fields=wp.ccf.models.Fields||{};var s=function(e,i,l){return"object"!=typeof i&&""===i&&(i=""),t.Model.prototype.set.call(this,e,i,l)},o=function(e,t,i){return i=i||{},i.emulateHTTP=!0,this.constructor.__super__.sync.call(this,e,t,i)},n=function(e){for(var t in this.attributes)if(-1===i.indexOf(e,t)){var l=this.get(t);"string"==typeof l&&""!==l&&(l=(l+"").replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#8220;/g,"”").replace(/&#8221;/g,"”").replace(/&#8216;/g,"‘").replace(/&#038;/g,"&").replace(/&#039;/g,"'"),this.set(t,l))}return this};wp.ccf.models.FieldConditional=wp.ccf.models.FieldConditional||t.Model.extend({defaults:{field:"",compare:"is",value:""},decode:function(){return n.call(this,[])},set:s}),wp.ccf.models.FieldChoice=wp.ccf.models.FieldChoice||t.Model.extend({defaults:{label:"",value:"",selected:!1},decode:function(){return n.call(this,[])},set:s}),wp.ccf.models.PostFieldMapping=wp.ccf.models.PostFieldMapping||t.Model.extend({defaults:{formField:"",postField:"",customFieldKey:""},decode:function(){return n.call(this,[])},set:s}),wp.ccf.models.FormNotificationAddress=wp.ccf.models.FormNotificationAddress||t.Model.extend({defaults:{type:"custom",field:"",email:""},decode:function(){return n.call(this,[])},set:s}),wp.ccf.models.FormNotification=wp.ccf.models.FormNotification||t.Model.extend({defaults:function(){return{title:"",content:"[all_fields]",active:!1,addresses:new wp.ccf.collections.FormNotificationAddresses,fromType:"default",fromAddress:"",fromField:"",subjectType:"default",subject:"",subjectField:"",fromNameType:"custom",fromName:"WordPress",fromNameField:""}},initialize:function(e){if("object"==typeof e&&e.addresses){var t=[];i.each(e.addresses,function(e){var i=new wp.ccf.models.FormNotificationAddress(e);i.decode(),t.push(i)}),this.set("addresses",new wp.ccf.collections.FormNotificationAddresses(t))}},decode:function(){return n.call(this,[])},toJSON:function(){var e=this.constructor.__super__.toJSON.call(this);return e.addresses&&(e.addresses=e.addresses.toJSON()),e},set:s}),wp.ccf.models.Form=wp.ccf.models.Form||wp.api.models.Post.extend({urlRoot:l.apiRoot.replace(/\/$/,"")+"/ccf/v1/forms",set:s,sync:o,idAttribute:"id",initialize:function(){this.on("sync",this.decode,this)},defaults:function(){var e={fields:new wp.ccf.collections.Fields,type:"ccf_form",status:"publish",description:"",buttonText:"Submit Form",buttonClass:"",completionActionType:"text",completionRedirectUrl:"",completionMessage:"",postCreation:!1,postCreationType:"post",postCreationStatus:"draft",postFieldMappings:new wp.ccf.collections.PostFieldMappings,notifications:new wp.ccf.collections.FormNotifications,pause:!1,pauseMessage:l.pauseMessage,theme:"none"};return e=i.defaults(e,this.constructor.__super__.defaults),wp.ccf.utils.cleanDateFields(e),e},decode:function(){var e=i.keys(wp.api.models.Post.prototype.defaults);return e=i.without(e,"title"),n.call(this,e)},getFieldSlugs:function(e){var t=wp.ccf.currentForm.get("fields"),i=[];return t.each(function(t){e&&t.isImmutable||i.push(t.get("slug"))}),i},parse:function(e){var t=this,l=0,s=0;if(e.fields){var o=t.get("fields");if(o&&o.length>0){for(l=0;e.fields.length>l;l++){var n=e.fields[l],c=o.findWhere({slug:n.slug});if(c){if(n.choices!==void 0){var r=t.get("choices");if(r&&r.length>0)for(s=0;n.choices>s;s++){var a=r.at(s);a.set(n.choices[s]),a.decode()}delete e.fields[l].choices}if(n.conditionals!==void 0){var d=t.get("conditionals");if(d&&d.length>0)for(s=0;n.conditionals>s;s++){var u=d.at(s);u.set(n.conditionals[s]),u.decode()}delete e.fields[l].conditionals}c.set(n),c.decode()}}delete e.fields}else{var f=[];i.each(e.fields,function(e){var t=new wp.ccf.models.Fields[e.type](e);t.decode(),f.push(t)}),e.fields=new wp.ccf.collections.Fields(f,{formId:e.id}),o?(o.add(f),delete e.fields):e.fields=new wp.ccf.collections.Fields(f,{formId:e.id})}}if(e.notifications){var p=t.get("notifications");if(p&&p.length>0){for(l=0;e.notifications.length>l;l++){var h=e.notifications[l],m=p.at(l);if(m){if(h.addresses!==void 0){var w=m.get("addresses");if(w&&w.length>0)for(s=0;h.addresses>s;s++){var g=w.at(s);g.set(h.addresses[s]),g.decode()}delete e.notifications[l].addresses}m.set(h),m.decode()}}delete e.notifications}else{var v=[];i.each(e.notifications,function(e){var t=new wp.ccf.models.FormNotification(e);t.decode(),v.push(t)}),p?(p.add(v),delete e.notifications):e.notifications=new wp.ccf.collections.FormNotifications(v)}}if(e.postFieldMappings){var y=t.get("postFieldMappings");if(y&&y.length>0){for(l=0;e.postFieldMappings.length>l;l++){var F=e.postFieldMappings[l],b=y.at(l);b&&(b.set(F),b.decode())}delete e.postFieldMappings}else{var S=[];i.each(e.postFieldMappings,function(e){var t=new wp.ccf.models.PostFieldMapping(e);t.decode(),S.push(t)}),y?(y.add(S),e.postFieldMappings=y):e.postFieldMappings=new wp.ccf.collections.PostFieldMappings(S)}}return this.constructor.__super__.parse.call(this,e)},toJSON:function(){var e=this.constructor.__super__.toJSON.call(this);return e.fields&&(e.fields=e.fields.toJSON()),e.notifications&&(e.notifications=e.notifications.toJSON()),e.postFieldMappings&&(e.postFieldMappings=e.postFieldMappings.toJSON()),e.author&&(e.author=e.author.toJSON()),e}}),wp.ccf.models.Submission=wp.api.models.Submission||wp.api.models.Post.extend({defaults:{id:null,data:{},fields:{}},sync:o,urlRoot:l.apiRoot.replace(/\/$/,"")+"/ccf/v1/submissions"}),wp.ccf.models.Field=wp.api.models.Field||wp.api.models.Post.extend({idAttribute:"id",defaults:function(){return{id:null,conditionalsEnabled:!1,conditionalType:"show",conditionalFieldsRequired:"all",conditionals:new wp.ccf.collections.FieldConditionals}},set:s,initialize:function(e){if("object"==typeof e&&e.conditionals){var t=[];i.each(e.conditionals,function(e){var i=new wp.ccf.models.FieldConditional(e);i.decode(),t.push(i)}),this.set("conditionals",new wp.ccf.collections.FieldConditionals(t))}},required:function(){return["slug"]},decode:function(){return n.call(this,i.keys(wp.api.models.Post.prototype.defaults))},hasRequiredAttributes:function(){var e=this,t=!0;return i.each(this.required(),function(i){(e.get(i)===void 0||""===e.get(i))&&(t=!1)}),t},sync:o}),wp.ccf.models.StandardField=wp.ccf.models.StandardField||wp.ccf.models.Field.extend({idAttribute:"id",defaults:function(){var e={label:l.fieldLabel,value:"",placeholder:"",slug:"",type:"",required:!1,className:"",description:""};return i.defaults(e,this.constructor.__super__.defaults())},initialize:function(){return wp.ccf.models.StandardField.__super__.initialize.apply(this,arguments)}}),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())},initialize:function(){return this.constructor.__super__.initialize.apply(this,arguments)}}),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())},initialize:function(){return this.constructor.__super__.initialize.apply(this,arguments)}}),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())},initialize:function(){return this.constructor.__super__.initialize.apply(this,arguments)}}),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())},initialize:function(){return this.constructor.__super__.initialize.apply(this,arguments)}}),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())},initialize:function(){return this.constructor.__super__.initialize.apply(this,arguments)}}),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())},initialize:function(){return this.constructor.__super__.initialize.apply(this,arguments)}}),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())},initialize:function(){return this.constructor.__super__.initialize.apply(this,arguments)}}),wp.ccf.models.Fields.date=wp.ccf.models.Fields.date||wp.ccf.models.StandardField.extend({defaults:function(){var e={type:"date",showDate:!0,showTime:!0,dateFormat:"mm/dd/yyyy"};return i.defaults(e,this.constructor.__super__.defaults())},initialize:function(){return this.constructor.__super__.initialize.apply(this,arguments)}}),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())},initialize:function(){return this.constructor.__super__.initialize.apply(this,arguments)}}),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,initialize:function(){return this.constructor.__super__.initialize.apply(this,arguments)}}),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())},initialize:function(){return this.constructor.__super__.initialize.apply(this,arguments)}}),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,initialize:function(){return this.constructor.__super__.initialize.apply(this,arguments)}}),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,initialize:function(){return this.constructor.__super__.initialize.apply(this,arguments)}}),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))}return wp.ccf.models.ChoiceableField.__super__.initialize.apply(this,arguments)}}),wp.ccf.models.Fields.radio=wp.ccf.models.Fields.radio||wp.ccf.models.ChoiceableField.extend({defaults:function(){var e={type:"radio"};return i.defaults(e,this.constructor.__super__.defaults())},initialize:function(){return this.constructor.__super__.initialize.apply(this,arguments)}}),wp.ccf.models.Fields.checkboxes=wp.ccf.models.Fields.checkboxes||wp.ccf.models.ChoiceableField.extend({defaults:function(){var e={type:"checkboxes"};return i.defaults(e,this.constructor.__super__.defaults())},initialize:function(){return this.constructor.__super__.initialize.apply(this,arguments)}}),wp.ccf.models.Fields.dropdown=wp.ccf.models.Fields.dropdown||wp.ccf.models.ChoiceableField.extend({defaults:function(){var e={type:"dropdown"};return i.defaults(e,this.constructor.__super__.defaults())},initialize:function(){return this.constructor.__super__.initialize.apply(this,arguments)}})}(jQuery,Backbone,_,ccfSettings),function(e,t,i,l){"use strict";var s=function(e,t,i){return i=i||{},i.emulateHTTP=!0,this.constructor.__super__.sync.call(this,e,t,i)};wp.ccf.collections=wp.ccf.collections||{},wp.ccf.collections.Forms=wp.ccf.collections.Forms||wp.api.collections.Posts.extend({model:wp.ccf.models.Form,url:l.apiRoot.replace(/\/$/,"")+"/ccf/v1/forms",formsFetching:{},initialize:function(){this.constructor.__super__.initialize(),this.formsFetching={}},sync:s,remove:function(e,t){t=t||{};var l=this.constructor.__super__.remove.call(this,e,t);return t.destroy&&(e instanceof Array?i.each(e,function(e){e.destroy()}):e.destroy()),l}}),wp.ccf.collections.Fields=wp.ccf.collections.Fields||wp.api.collections.Posts.extend({model:wp.ccf.models.Field,url:function(){return l.apiRoot+"/ccf/forms/"+this.formId+"/fields"},initialize:function(e,t){t&&t.formId&&(this.formId=t.formId)},sync:s}),wp.ccf.collections.PostFieldMappings=wp.ccf.collections.PostFieldMappings||t.Collection.extend({model:wp.ccf.models.PostFieldMapping}),wp.ccf.collections.FormNotificationAddresses=wp.ccf.collections.FormNotificationAddresses||t.Collection.extend({model:wp.ccf.models.FormNotificationAddress}),wp.ccf.collections.FormNotifications=wp.ccf.collections.FormNotifications||t.Collection.extend({model:wp.ccf.models.FormNotification}),wp.ccf.collections.Submissions=wp.ccf.collections.Submissions||wp.api.collections.Posts.extend({model:wp.ccf.models.Submission,url:function(){return l.apiRoot.replace(/\/$/,"")+"/ccf/v1/forms/"+this.formId+"/submissions"},initialize:function(e,t){this.constructor.__super__.initialize.apply(this,arguments),t&&t.formId&&(this.formId=t.formId)},sync:s}),wp.ccf.collections.FieldChoices=wp.ccf.collections.FieldChoices||t.Collection.extend({model:wp.ccf.models.FieldChoice}),wp.ccf.collections.FieldConditionals=wp.ccf.collections.FieldConditionals||t.Collection.extend({model:wp.ccf.models.FieldConditional})}(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",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.FieldConditional=t.View.extend({template:wp.ccf.utils.template("ccf-field-conditional-template"),className:"conditional",events:{"click .add":"triggerAdd","click .delete":"triggerDelete",saveConditional:"saveConditional"},initialize:function(e){this.field=e.field,this.fieldCollection=e.fieldCollection},destroy:function(){wp.ccf.dispatcher.off("mainViewChange",this.saveConditional),this.unbind()},saveConditional:function(){if(""!==this.el.innerHTML){var e=this.el.querySelectorAll(".conditional-field")[0].value,t=this.el.querySelectorAll(".conditional-value")[0].value,i=this.el.querySelectorAll(".conditional-compare")[0].value;return this.model.set("field",e),this.model.set("value",t),this.model.set("compare",i),this}},updateFields:function(){var e=this.el.querySelectorAll(".conditional-field")[0];e.innerHTML="",e.disabled=!1;var t,i=0,s=this.model.get("field");this.fieldCollection.length>=1&&(t=document.createElement("option"),t.innerHTML=l.chooseFormField,t.value="",e.appendChild(t),this.fieldCollection.each(function(l){if(this.field.get("slug")!==l.get("slug")){var o=l.get("type");"address"!==o&&"checkboxes"!==o&&"date"!==o&&"name"!==o&&"file"!==o&&"recaptcha"!==o&&"section-header"!==o&&"html"!==o&&(t=document.createElement("option"),t.innerHTML=l.get("slug"),t.value=l.get("slug"),l.get("slug")===s&&(t.selected=!0),e.appendChild(t),i++)}},this)),0===i&&(e.innerHTML="",t=document.createElement("option"),t.innerHTML=l.noAvailableFields,t.value="",e.appendChild(t),e.disabled=!0)},render:function(){var e={};return this.model&&(e.conditional=this.model.toJSON()),this.el.innerHTML=this.template(e),wp.ccf.dispatcher.on("mainViewChange",this.saveConditional,this),this.listenTo(this.fieldCollection,"add",this.updateFields,this),this.listenTo(this.fieldCollection,"remove",this.updateFields,this),this.updateFields(),this},triggerAdd:function(){this.field.get("conditionals").add(new wp.ccf.models.FieldConditional)},triggerDelete:function(){var e=this.field.get("conditionals");if(e.length>1)e.remove(this.model),this.destroy(),this.remove();else{var t=this.el.querySelectorAll(".conditional-value")[0],i=this.el.querySelectorAll(".conditional-field")[0];t.value="";for(var l=0;i.childNodes.length>l;l++)i.childNodes[l].selected=!1}}}),wp.ccf.views.EmptyFormNotificationTableRow=wp.ccf.views.EmptyFormNotificationTableRow||t.View.extend({tagName:"tr",template:wp.ccf.utils.template("ccf-empty-form-notification-row-template"),events:{"click .add":"triggerAdd"},initialize:function(e){this.form=e.form},destroy:function(){this.unbind()},render:function(){return this.$el.html(this.template()),this},triggerAdd:function(){var e=this.form.get("notifications");this.destroy(),e.add(new wp.ccf.models.FormNotification)}}),wp.ccf.views.EmptyFormTableRow=wp.ccf.views.EmptyFormTableRow||t.View.extend({tagName:"tr",template:wp.ccf.utils.template("ccf-empty-form-table-row-template"),render:function(){return this.$el.html(this.template()),this}}),wp.ccf.views.FormNotificationAddress=t.View.extend({template:wp.ccf.utils.template("ccf-form-notification-address-template"),className:"address",events:{"click .add":"triggerAdd","click .delete":"triggerDelete","blur input":"save","change select":"save"},initialize:function(e){this.notification=e.notification,this.parent=e.parent,this.form=e.form},destroy:function(){this.unbind()},save:function(){if(""!==this.el.innerHTML){var e=this.el.querySelectorAll(".form-notification-address-type")[0].value,t=this.el.querySelectorAll(".form-notification-address-email"),i=this.el.querySelectorAll(".form-notification-address-field"),l=this.model.get("type");return t.length&&this.model.set("email",t[0].value),i.length&&this.model.set("field",i[0].value),this.model.set("type",e),l!==e&&this.render(),this}},updateFromFieldField:function(){if("edit"===this.parent.context&&"field"===this.model.get("type")){var e=this.el.querySelectorAll(".form-notification-address-field")[0];e.innerHTML="",e.disabled=!1;var t,i=this.form.get("fields"),s=0,o=this.model.get("field");i.length>=1&&i.each(function(i){("email"===i.get("type")||"dropdown"===i.get("type")||"radio"===i.get("type")||"single-line-text"===i.get("type"))&&(t=document.createElement("option"),t.innerHTML=i.get("slug"),t.value=i.get("slug"),i.get("slug")===o&&(t.selected=!0),e.appendChild(t),s++)}),0===s&&(t=document.createElement("option"),t.innerHTML=l.noApplicableFields,t.value="",e.appendChild(t),e.disabled=!0)}},render:function(){var e={};this.model&&(e.address=this.model.toJSON()),this.el.innerHTML=this.template(e);var t=this.form.get("fields");return this.listenTo(t,"add",this.updateFromFieldField,this),this.listenTo(t,"remove",this.updateFromFieldField,this),"field"===this.model.get("type")&&this.updateFromFieldField(),this},triggerAdd:function(){this.notification.get("addresses").add(new wp.ccf.models.FormNotificationAddress)},triggerDelete:function(){var e=this.notification.get("addresses");e.length>1?this.parent.deleteAddress(this):(this.model.clear().set(wp.ccf.models.FormNotificationAddress.prototype.defaults),this.destroy(),this.render())}}),wp.ccf.views.ExistingFormNotificationRow=t.View.extend({template:wp.ccf.utils.template("ccf-existing-form-notification-table-row-template"),tagName:"tr",events:{"change select.form-email-notification-from-type":"toggleNotificationFields","change select.form-email-notification-from-name-type":"toggleNotificationFields","change select.form-email-notification-subject-type":"toggleNotificationFields","click .close-notification":"changeContext","click .edit-notification":"changeContext","click .delete-notification":"triggerDelete","blur input":"save","change select":"save"},addressViews:[],initialize:function(e){this.form=e.form,this.addressViews=[],this.parent=e.parent,this.context=e.context!==void 0?e.context:"view";var t=this.model.get("addresses");this.listenTo(t,"add",this.addAddress)},deleteAddress:function(e){i.each(this.addressViews,function(t){if(e.cid===t.cid){var l=i.indexOf(this.addressViews,t);this.model.get("addresses").remove(e.model),this.addressViews[l].remove(),this.addressViews.splice(l,1)}},this)},addAddress:function(e){var t=this.el.querySelectorAll(".addresses")[0],i=new wp.ccf.views.FormNotificationAddress({model:e,parent:this,notification:this.model,form:this.form});this.addressViews.push(i),t.appendChild(i.render().el)},destroy:function(){this.unbind()},changeContext:function(e,t){"edit"===this.context&&this.save(),t?this.context=t:("view"===this.context&&this.parent.closeAllNotifications(),this.context="edit"===this.context?"view":"edit"),this.destroy(),this.render()},updateFieldVariables:function(){if("edit"===this.context){var e,t=this.el.querySelectorAll(".field-variables")[0],i="",l=this.form.get("fields");l.each(function(t){e=t.get("type"),"html"!==e&&"section-header"!==e&&"recaptcha"!==e&&(i+="["+t.get("slug")+"] ")}),t.innerText=i}},updateFromFieldField:function(){if("edit"===this.context){var e=this.el.querySelectorAll(".form-email-notification-from-field")[0];e.innerHTML="",e.disabled=!1;var t=this.el.querySelectorAll(".form-email-notification-subject-field")[0];t.innerHTML="",t.disabled=!1;var i=this.el.querySelectorAll(".form-email-notification-from-name-field")[0];i.innerHTML="",i.disabled=!1;var s,o=this.form.get("fields"),n=0,c=0,r=0,a=this.model.get("emailNotificationFromField"),d=this.model.get("emailNotificationSubjectField"),u=this.model.get("emailNotificationFromNameField");o.length>=1&&o.each(function(l){("email"===l.get("type")||"dropdown"===l.get("type")||"radio"===l.get("type")||"single-line-text"===l.get("type"))&&(s=document.createElement("option"),s.innerHTML=l.get("slug"),s.value=l.get("slug"),l.get("slug")===a&&(s.selected=!0),e.appendChild(s),n++),("name"===l.get("type")||"single-line-text"===l.get("type")||"radio"===l.get("type")||"dropdown"===l.get("type"))&&(s=document.createElement("option"),s.innerHTML=l.get("slug"),s.value=l.get("slug"),l.get("slug")===u&&(s.selected=!0),i.appendChild(s),c++),("single-line-text"===l.get("type")||"radio"===l.get("type")||"dropdown"===l.get("type"))&&(s=document.createElement("option"),s.innerHTML=l.get("slug"),s.value=l.get("slug"),l.get("slug")===d&&(s.selected=!0),t.appendChild(s),r++)}),0===n&&(s=document.createElement("option"),s.innerHTML=l.noEmailFields,s.value="",e.appendChild(s),e.disabled=!0),0===c&&(s=document.createElement("option"),s.innerHTML=l.noNameFields,s.value="",i.appendChild(s),i.disabled=!0),0===r&&(s=document.createElement("option"),s.innerHTML=l.noApplicableFields,s.value="",t.appendChild(s),t.disabled=!0)}},toggleNotificationFields:function(){var e=this.el.querySelectorAll(".email-notification-from-address")[0],t=this.el.querySelectorAll(".email-notification-from-field")[0],i=this.el.querySelectorAll(".form-email-notification-from-type")[0],l=this.el.querySelectorAll(".email-notification-subject")[0],s=this.el.querySelectorAll(".email-notification-subject-field")[0],o=this.el.querySelectorAll(".form-email-notification-subject-type")[0],n=this.el.querySelectorAll(".email-notification-from-name")[0],c=this.el.querySelectorAll(".email-notification-from-name-field")[0],r=this.el.querySelectorAll(".form-email-notification-from-name-type")[0];e.style.display="none",t.style.display="none","custom"===i.value?e.style.display="block":"field"===i.value&&(t.style.display="block"),l.style.display="none",s.style.display="none","custom"===o.value?l.style.display="block":"field"===o.value&&(s.style.display="block"),n.style.display="none",c.style.display="none","custom"===r.value?n.style.display="block":"field"===r.value&&(c.style.display="block")},save:function(){if(""!==this.el.innerHTML&&"edit"===this.context){var e=this.el.querySelectorAll(".form-email-notification-title")[0].value;this.model.set("title",e);var t=this.el.querySelectorAll(".form-email-notification-content")[0].value;this.model.set("content",t);var i=this.el.querySelectorAll(".form-email-notification-active")[0].value;this.model.set("active","1"===i?!0:!1);var l=this.el.querySelectorAll(".form-email-notification-from-type")[0].value;this.model.set("fromType",l);var s=this.el.querySelectorAll(".form-email-notification-from-address")[0].value;this.model.set("fromAddress",s);var o=this.el.querySelectorAll(".form-email-notification-from-field")[0].value;this.model.set("fromField",o);var n=this.el.querySelectorAll(".form-email-notification-from-name-type")[0].value;this.model.set("fromNameType",n);var c=this.el.querySelectorAll(".form-email-notification-from-name")[0].value;this.model.set("fromName",c);var r=this.el.querySelectorAll(".form-email-notification-from-name-field")[0].value;this.model.set("fromNameField",r);var a=this.el.querySelectorAll(".form-email-notification-subject-type")[0].value;this.model.set("subjectType",a);var d=this.el.querySelectorAll(".form-email-notification-subject")[0].value;this.model.set("subject",d);var u=this.el.querySelectorAll(".form-email-notification-subject-field")[0].value;this.model.set("subjectField",u);for(var f=0;this.addressViews.length>f;f++)this.addressViews[f].save();return this}},render:function(){var e={context:this.context,form:this.form.toJSON()};if(this.model&&(e.notification=this.model.toJSON()),this.el.innerHTML=this.template(e),"edit"===this.context){this.toggleNotificationFields(),this.updateFromFieldField(),this.updateFieldVariables();var t=this.el.querySelectorAll(".addresses")[0],i=this.model.get("addresses");if(i.length>=1)i.each(function(e){var i=new wp.ccf.views.FormNotificationAddress({model:e,parent:this,notification:this.model,form:this.form}).render();t.appendChild(i.el),this.addressViews.push(i)},this);else{var l=new wp.ccf.models.FormNotificationAddress;i.add(l)}}var s=this.form.get("fields");return this.listenTo(s,"add",this.updateFromFieldField,this),this.listenTo(s,"remove",this.updateFromFieldField,this),this.listenTo(s,"add",this.updateFieldVariables,this),this.listenTo(s,"remove",this.updateFieldVariables,this),this},triggerDelete:function(){this.parent.deleteNotification(this)}}),wp.ccf.views.FieldBase=wp.ccf.views.FieldBase||t.View.extend({events:{"blur input":"saveField","blur input.field-slug":"checkSlug","blur textarea":"saveField","change select":"saveField",'change input[type="checkbox"]':"saveField"},initialize:function(){var e=this.model.get("conditionals");this.listenTo(e,"add",this.addConditional)},addConditional:function(e){var t=new wp.ccf.views.FieldConditional({model:e,field:this.model,fieldCollection:this.collection}).render(),i=this.el.querySelectorAll(".conditionals")[0];i.appendChild(t.el)},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)
2
+ },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()},saveField:function(){var t=this.el.querySelectorAll(".conditionals")[0].querySelectorAll(".conditional");i.each(t,function(t){e(t).trigger("saveConditional")}),this.model.set("conditionalType",this.el.querySelectorAll(".field-conditional-type")[0].value),this.model.set("conditionalFieldsRequired",this.el.querySelectorAll(".field-conditional-fields-required")[0].value);var l=this.model.get("conditionalsEnabled");this.model.set("conditionalsEnabled",1==this.el.querySelectorAll(".field-conditionals-enabled")[0].value?!0:!1),l!==this.model.get("conditionalsEnabled")&&this.render("advanced")},render:function(e){e=e?e:"basic",this.el.innerHTML=this.template({field:this.model.toJSON(),startPanel:e}),this.checkSlug();var t=this.model.get("conditionals"),i=this.el.querySelectorAll(".conditionals")[0];if(t.length>=1)t.each(function(e){var t=new wp.ccf.views.FieldConditional({model:e,field:this.model,fieldCollection:this.collection}).render();i.appendChild(t.el)},this);else{var l=new wp.ccf.models.FieldConditional;t.add(l)}return 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"),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.constructor.__super__.saveField.apply(this,arguments),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"),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.constructor.__super__.saveField.apply(this,arguments),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"),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.constructor.__super__.saveField.apply(this,arguments),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"),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.constructor.__super__.saveField.apply(this,arguments),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"),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.constructor.__super__.saveField.apply(this,arguments),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.constructor.__super__.saveField.apply(this,arguments),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.constructor.__super__.saveField.apply(this,arguments),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),this.constructor.__super__.saveField.apply(this,arguments);var e=this.el.querySelectorAll(".field-value");e.length>0&&this.model.set("value",e[0].value);var t=this.el.querySelectorAll(".field-date-format");t.length&&this.model.set("dateFormat",t[0].value);var i=this.model.get("showDate"),l=this.el.querySelectorAll(".field-show-date")[0].checked?!0:!1;this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("showDate",l);var s=this.model.get("showTime"),o=this.el.querySelectorAll(".field-show-time")[0].checked?!0:!1;return this.model.set("showTime",o),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1),(o!=s||l!=i)&&this.render(),this}}}),wp.ccf.views.Fields.name=wp.ccf.views.Fields.name||wp.ccf.views.FieldBase.extend({template:wp.ccf.utils.template("ccf-name-template"),saveField:function(){return""!==this.el.innerHTML?(this.model.set("slug",this.el.querySelectorAll(".field-slug")[0].value),this.model.set("label",this.el.querySelectorAll(".field-label")[0].value),this.model.set("description",this.el.querySelectorAll(".field-description")[0].value),this.model.set("className",this.el.querySelectorAll(".field-class-name")[0].value),this.model.set("required",1==this.el.querySelectorAll(".field-required")[0].value?!0:!1),this.constructor.__super__.saveField.apply(this,arguments),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.constructor.__super__.saveField.apply(this,arguments),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.constructor.__super__.saveField.apply(this,arguments),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.constructor.__super__.saveField.apply(this,arguments),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),this.constructor.__super__.saveField.apply(this,arguments);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),wp.ccf.views.ChoiceableField.__super__.saveField.apply(this,arguments);var t=this.el.querySelectorAll(".repeatable-choices")[0].querySelectorAll(".choice");return i.each(t,function(t){e(t).trigger("saveChoice")}),this}},render:function(t){var i=this;t=t?t:"basic",i.el.innerHTML=i.template({field:i.model.toJSON(),startPanel:t}),i.checkSlug();var l=i.model.get("choices"),s=this.el.querySelectorAll(".repeatable-choices")[0];if(l.length>=1)l.each(function(e){var t=new wp.ccf.views.FieldChoice({model:e,field:i.model}).render();s.appendChild(t.el)});else{var o=new wp.ccf.models.FieldChoice;l.add(o)}s=this.el.querySelectorAll(".repeatable-choices")[0],e(s).sortable({handle:".move",axis:"y",stop:function(e,t){t.item.trigger("sorted",t.item.index())}});var n=this.model.get("conditionals"),c=this.el.querySelectorAll(".conditionals")[0];if(n.length>=1)n.each(function(e){var t=new wp.ccf.views.FieldConditional({model:e,field:this.model,fieldCollection:this.collection}).render();c.appendChild(t.el)},this);else{var r=new wp.ccf.models.FieldConditional;n.add(r)}return i}}),wp.ccf.views.Fields.dropdown=wp.ccf.views.Fields.dropdown||wp.ccf.views.ChoiceableField.extend({template:wp.ccf.utils.template("ccf-dropdown-template"),events:function(){return this.constructor.__super__.events}}),wp.ccf.views.Fields.radio=wp.ccf.views.Fields.radio||wp.ccf.views.ChoiceableField.extend({template:wp.ccf.utils.template("ccf-radio-template"),events:function(){return this.constructor.__super__.events}}),wp.ccf.views.Fields.checkboxes=wp.ccf.views.Fields.checkboxes||wp.ccf.views.ChoiceableField.extend({template:wp.ccf.utils.template("ccf-checkboxes-template"),events:function(){return this.constructor.__super__.events}}),wp.ccf.views.FieldSidebar=wp.ccf.views.FieldSidebar||t.View.extend({initialize:function(e){this.currentFieldView=null,this.form=e.form},save:function(e){this.currentFieldView&&""!==this.currentFieldView.el.innerHTML&&this.currentFieldView.saveField(),e&&e instanceof Object&&e.resolve()},fieldRemoved:function(){this.currentFieldView&&(this.form.get("fields").get(this.currentFieldView.model)||this.render())},destroy:function(){wp.ccf.dispatcher.off("saveField",this.save),wp.ccf.dispatcher.off("mainViewChange",this.save),this.unbind()},render:function(e){var t={};if(e){var i=e.get("type");this.currentFieldView&&(this.currentFieldView.saveField(),this.currentFieldView.destroy&&this.currentFieldView.destroy()),this.currentFieldView=new wp.ccf.views.Fields[i]({model:e,collection:this.form.get("fields")}),this.currentFieldView.render(),this.el.innerHTML="",this.el.appendChild(this.currentFieldView.el);var l=this.form.get("fields");this.listenTo(l,"remove",this.fieldRemoved)}else{var s=wp.ccf.utils.template("ccf-empty-field-template");this.el.innerHTML=s(t)}return wp.ccf.dispatcher.on("saveField",this.save,this),wp.ccf.dispatcher.on("mainViewChange",this.save,this),this}}),wp.ccf.views.FieldRowPlaceholder=wp.ccf.views.FieldRowPlaceholder||t.View.extend({template:wp.ccf.utils.template("ccf-field-row-template"),tagName:"div",className:"field",initialize:function(e){this.type=e.type},render:function(){return this.el.innerHTML=this.template({label:l.allLabels[this.type]}),this.el.setAttribute("data-field-type",this.type),this.el.className+=" "+this.type,this}}),wp.ccf.views.FieldRow=wp.ccf.views.FieldRow||t.View.extend({template:wp.ccf.utils.template("ccf-field-row-template"),tagName:"div",className:"field",events:{"click .delete":"triggerDelete","click h4":"triggerEdit",sorted:"triggerUpdateSort"},initialize:function(e){i.bindAll(this,"triggerDelete"),this.form=e.form,this.listenTo(this.model,"change",this.handleChange,this),this.listenTo(this.model,"requirementsNotMet",this.requirementsNotMet,this),this.listenTo(this.model,"requirementsMet",this.requirementsMet,this),this.listenTo(this.model,"duplicateSlug",this.duplicateSlug,this),this.model.attributes.choices&&this.listenTo(this.model.attributes.choices,"change",this.handleChange,this)},duplicateSlug:function(){this.requirementsMet(),this.el.className+=" field-duplicate-slug"},requirementsNotMet:function(){this.requirementsMet(),this.el.className+=" field-incomplete"},requirementsMet:function(){this.el.className=this.el.className.replace(/(field-incomplete|field-duplicate-slug)/i,"")},triggerUpdateSort:function(e,t){this.form.get("fields").remove(this.model),this.form.get("fields").add(this.model,{at:t})},handleChange:function(){this.render()},triggerDelete:function(e){e.stopPropagation(),this.form.get("fields").remove(this.model),this.undelegateEvents(),this.remove()},triggerEdit:function(){var e=this.el.parentNode.querySelectorAll(".ccf-editing");i.each(e,function(e){e.className=e.className.replace(/ccf-editing/i,"")}),this.el.className=this.el.className.replace(/ccf-editing/i,"")+" ccf-editing",wp.ccf.dispatcher.trigger("openEditField",this.model)},render:function(e){this.el.innerHTML=this.template({label:l.allLabels[this.model.get("type")]}),this.el.setAttribute("data-field-type",this.model.get("type"));var t=RegExp(" "+this.model.get("type"),"i");this.el.className=this.el.className.replace(t,"")+" "+this.model.get("type"),e&&(this.el.className=this.el.className.replace(/ instantiated/i,"")+" instantiated");var i=document.getElementById("ccf-"+this.model.get("type")+"-preview-template");if(i){var s=this.el.querySelectorAll(".preview")[0];s.style.display="block",s.innerHTML=wp.ccf.utils.template("ccf-"+this.model.get("type")+"-preview-template")({field:this.model.toJSON()})}return this}}),wp.ccf.views.PostFieldMapping=t.View.extend({template:wp.ccf.utils.template("ccf-post-field-mapping"),className:"field-mapping",events:{"click .add":"triggerAdd","click .delete":"triggerDelete","blur input":"save","change select":"save"},initialize:function(e){this.parent=e.parent,this.form=e.form},destroy:function(){this.unbind()},save:function(){if(""!==this.el.innerHTML){var e=this.el.querySelectorAll(".field-form-field")[0].value,t=this.el.querySelectorAll(".field-post-field")[0].value,i=this.el.querySelectorAll(".field-custom-field-key"),l=this.model.get("postField");return this.model.set("formField",e),this.model.set("postField",t),i.length&&this.model.set("customFieldKey",i[0].value),l!==t&&this.render(),this}},updateFormFieldField:function(){var e=this.el.querySelectorAll(".field-form-field")[0];e.innerHTML="",e.disabled=!1;var t,i=this.form.get("fields"),s=0,o=this.model.get("formField");i.length>=1&&(t=document.createElement("option"),t.innerHTML=l.chooseFormField,t.value="",e.appendChild(t),i.each(function(i){t=document.createElement("option"),t.innerHTML=i.get("slug"),t.value=i.get("slug"),i.get("slug")===o&&(t.selected=!0),e.appendChild(t),s++})),0===s&&(t=document.createElement("option"),t.innerHTML=l.noAvailableFields,t.value="",e.appendChild(t),e.disabled=!0)},updatePostFields:function(){var e,t=this.el.querySelectorAll(".field-post-field")[0];e=document.createElement("option"),e.value="",e.innerText=l.choosePostField,t.appendChild(e);var s=this.form.get("postFieldMappings"),o=[];s.each(function(e){e!==this.model&&o.push(e.get("postField"))},this),i.each(l.postFields.single,function(i,l){-1===o.indexOf(l)&&(e=document.createElement("option"),e.value=l,e.innerText=i,this.model.get("postField")===l&&(e.selected=!0),t.appendChild(e))},this),i.each(l.postFields.repeatable,function(i,l){e=document.createElement("option"),e.value=l,e.innerText=i,this.model.get("postField")===l&&(e.selected=!0),t.appendChild(e)},this)},render:function(){var e={};this.model&&(e.mapping=this.model.toJSON()),this.el.innerHTML=this.template(e);var t=this.form.get("fields");return this.listenTo(t,"add",this.updateFormFieldField,this),this.listenTo(t,"remove",this.updateFormFieldField,this),this.updateFormFieldField(),this.updatePostFields(),this},triggerAdd:function(){this.form.get("postFieldMappings").add(new wp.ccf.models.PostFieldMapping)},triggerDelete:function(){var e=this.form.get("postFieldMappings");e.length>1?this.parent.deletePostFieldMapping(this):(this.model.clear().set(wp.ccf.models.PostFieldMapping.prototype.defaults),this.destroy(),this.render())}}),wp.ccf.views.FormSettings=wp.ccf.views.FormSettings||t.View.extend({template:wp.ccf.utils.template("ccf-form-settings-template"),events:{"blur input":"save","change select":"save","change select.form-completion-action-type":"toggleCompletionFields","change select.form-pause":"togglePauseFields","change select.form-post-creation":"togglePostCreationFields","click .add-notification":"triggerAddNotification"},notificationViews:[],mappingViews:[],initialize:function(e){this.model=e.form,this.notificationViews=[],this.mappingViews=[];var t=this.model.get("notifications");this.listenTo(t,"add",this.addNotification);var i=this.model.get("postFieldMappings");this.listenTo(i,"add",this.addPostFieldMapping)},deletePostFieldMapping:function(e){i.each(this.mappingViews,function(t){if(e.cid===t.cid){var l=i.indexOf(this.mappingViews,t);this.model.get("postFieldMappings").remove(e.model),this.mappingViews[l].remove(),this.mappingViews.splice(l,1)}},this)},addPostFieldMapping:function(e){var t=this.el.querySelectorAll(".post-creation-mapping")[0],i=new wp.ccf.views.PostFieldMapping({model:e,parent:this,form:this.model});this.mappingViews.push(i),t.appendChild(i.render().el)},triggerAddNotification:function(){var e=this.model.get("notifications");e.add(new wp.ccf.models.FormNotification)},closeAllNotifications:function(){i.each(this.notificationViews,function(e){e.changeContext(null,"view")})},addNotification:function(e){var t=new wp.ccf.views.ExistingFormNotificationRow({model:e,form:this.model,context:"edit",parent:this}).render(),l=this.el.querySelectorAll(".ccf-form-notifications .rows")[0];l.querySelectorAll(".no-notifications").length>0&&l.removeChild(l.firstChild),i.each(this.notificationViews,function(e){e.changeContext(null,"view")}),this.notificationViews.push(t),l.appendChild(t.el)},toggleCompletionFields:function(){var e=this.el.querySelectorAll(".form-completion-action-type")[0].value,t=this.el.querySelectorAll(".completion-message")[0],i=this.el.querySelectorAll(".completion-redirect-url")[0];"text"===e?(t.style.display="block",i.style.display="none"):(t.style.display="none",i.style.display="block")},togglePauseFields:function(){var e=this.el.querySelectorAll(".form-pause")[0].value,t=this.el.querySelectorAll(".pause-message")[0];t.style.display=parseInt(e)?"block":"none"},togglePostCreationFields:function(){var t=this.el.querySelectorAll(".form-post-creation")[0].value,i=e(this.el.querySelectorAll(".post-creation-mapping-field"));parseInt(t)?i.show():i.hide()},save:function(){if(""!==this.el.innerHTML){var e=this.el.querySelectorAll(".form-title")[0].value;this.model.set("title",{raw:e});var t=this.el.querySelectorAll(".form-description")[0].value;this.model.set("description",t);var i=this.el.querySelectorAll(".form-button-text")[0].value;this.model.set("buttonText",i);var l=this.el.querySelectorAll(".form-button-class")[0].value;this.model.set("buttonClass",l);var s=this.el.querySelectorAll(".form-pause")[0].value;this.model.set("pause",parseInt(s)?!0:!1);var o=this.el.querySelectorAll(".form-post-creation")[0].value;this.model.set("postCreation",parseInt(o)?!0:!1);var n=this.el.querySelectorAll(".form-post-creation-type")[0].value;this.model.set("postCreationType",n);var c=this.el.querySelectorAll(".form-post-creation-status")[0].value;this.model.set("postCreationStatus",c);var r=this.el.querySelectorAll(".form-pause-message")[0].value;this.model.set("pauseMessage",r);var a=this.el.querySelectorAll(".form-completion-message")[0].value;this.model.set("completionMessage",a);var d=this.el.querySelectorAll(".form-completion-redirect-url")[0].value;this.model.set("completionRedirectUrl",d);var u=this.el.querySelectorAll(".form-completion-action-type")[0].value;this.model.set("completionActionType",u);var f=this.el.querySelectorAll(".form-theme")[0].value;this.model.set("theme",f)}},fullSave:function(e){""!==this.el.innerHTML&&(this.save(),i.each(this.notificationViews,function(e){e.save()}),i.each(this.mappingViews,function(e){e.save()}),e!==void 0&&e.promise!==void 0&&e.resolve())},destroy:function(){wp.ccf.dispatcher.off("saveFormSettings",this.fullSave),wp.ccf.dispatcher.off("mainViewChange",this.fullSave)},deleteNotification:function(e){if(i.each(this.notificationViews,function(t){if(e.cid===t.cid){var l=i.indexOf(this.notificationViews,t);this.model.get("notifications").remove(e.model),this.notificationViews[l].remove(),this.notificationViews.splice(l,1)}},this),!this.notificationViews.length){var t=this.el.querySelectorAll(".ccf-form-notifications .rows")[0];t.appendChild(new wp.ccf.views.EmptyFormNotificationTableRow({form:this.model}).render().el)}},render:function(){var e={form:this.model.toJSON()};this.model.get("fields");var t=this.model.get("notifications");this.el.innerHTML=this.template(e),this.toggleCompletionFields(),this.togglePostCreationFields(),this.togglePauseFields();var i=this.el.querySelectorAll(".ccf-form-notifications .rows")[0],l=document.createElement("tbody");l.className="rows",t.length>=1?t.each(function(e){var t=new wp.ccf.views.ExistingFormNotificationRow({model:e,form:this.model,parent:this}).render();l.appendChild(t.el),this.notificationViews.push(t)},this):l.appendChild(new wp.ccf.views.EmptyFormNotificationTableRow({form:this.model}).render().el),i.parentNode.replaceChild(l,i);var s=this.el.querySelectorAll(".post-creation-mapping")[0],o=this.model.get("postFieldMappings");if(o.length>=1)o.each(function(e){var t=new wp.ccf.views.PostFieldMapping({model:e,parent:this,form:this.model}).render();s.appendChild(t.el),this.mappingViews.push(t)},this);else{var n=new wp.ccf.models.PostFieldMapping;o.add(n)}return wp.ccf.dispatcher.on("mainViewChange",this.fullSave,this),wp.ccf.dispatcher.on("saveFormSettings",this.fullSave,this),this}}),wp.ccf.views.FormPane=wp.ccf.views.FormPane||t.View.extend(i.defaults({template:wp.ccf.utils.template("ccf-form-pane-template"),subViews:{"field-sidebar":wp.ccf.views.FieldSidebar,"form-settings":wp.ccf.views.FormSettings},events:{"click .save-button":"sync","click .signup-button":"signup","click .accordion-heading":"accordionClick","click .form-settings-heading":"accordionClick","click .insert-form-button":"insertForm"},initialize:function(){wp.ccf.dispatcher.on("openEditField",this.openEditField,this)},insertForm:function(){wp.ccf.utils.insertFormShortcode(this.model),wp.ccf.toggle()},signup:function(){var t=this.el.querySelectorAll(".email-signup-field")[0].value,i=this.el.querySelectorAll(".bottom .left.signup")[0];i.className="left signup",t?e.ajax({url:"//taylorlovett.us8.list-manage.com/subscribe/post-json?u=66118f9a5b0ab0414e83f043a&amp;id=b4ed816a24&c=?",method:"post",dataType:"jsonp",data:{EMAIL:t}}).done(function(){i.className="left signup signup-success"}):i.className="left signup signup-error"},accordionClick:function(t){var l=e(t.currentTarget).parents(".accordion-container")[0],s=l.querySelectorAll(".accordion-section");t.currentTarget.parentNode.className.match(/expanded/i)?t.currentTarget.parentNode.className=t.currentTarget.parentNode.className.replace(/expanded/i,""):t.currentTarget.parentNode.className+=" expanded",i.each(s,function(e){e!=t.currentTarget.parentNode&&e.className.match(/expanded/i)&&(e.className=e.className.replace(/expanded/i,""))}),t.currentTarget.className.match(/form-settings-heading/i)?this.el.className.match(/show-form-settings/i)?this.el.className=this.el.className.replace(/show-form-settings/i,""):this.el.className+=" show-form-settings":this.el.className=this.el.className.replace(/show-form-settings/i,"")},openEditField:function(e){this.renderedSubViews["field-sidebar"].render(e).el.style.display="block"},disable:function(){this.el.querySelectorAll(".save-button")[0].setAttribute("disabled","disabled"),this.el.querySelectorAll(".disabled-overlay")[0].style.display="block"},enable:function(){this.el.querySelectorAll(".save-button")[0].removeAttribute("disabled"),this.el.querySelectorAll(".disabled-overlay")[0].style.display="none"},sync:function(){var t=this,i=e(this.el.querySelectorAll(".spinner")[0]);i.fadeIn(),t.disable();var s=e.Deferred(),o=e.Deferred();wp.ccf.dispatcher.trigger("saveFormSettings",s),wp.ccf.dispatcher.trigger("saveField",o),e.when(s,o).then(function(){var e=t.model.get("fields"),s=!0,o={};e.each(function(e){var t=e.get("slug");e.hasRequiredAttributes()?t&&!t.match(/^[a-zA-Z0-9\-_]+$/)?(s=!1,e.trigger("requirementsNotMet")):o[e.get("slug")]!==void 0?(s=!1,e.trigger("duplicateSlug"),o[e.get("slug")].trigger("duplicateSlug")):e.trigger("requirementsMet"):(s=!1,e.trigger("requirementsNotMet")),e.get("slug")&&(o[e.get("slug")]=e)}),s?t.model.save({},{context:"edit"}).error(function(){var e="sync";wp.ccf.errorModal.render(e).show()}).done(function(){l.single&&!l.postId&&(window.location=l.adminUrl+"post.php?post="+t.model.get("id")+"&action=edit#ccf-form/"+t.model.get("id"))}).complete(function(){i.fadeOut(),t.enable(),wp.ccf.dispatcher.trigger("saveFormComplete",t.model)}):(t.enable(),i.fadeOut())})},enableDisableInsert:function(){var e=this.el.querySelectorAll(".insert-form-button")[0];this.model.get("id")?e.removeAttribute("disabled"):e.setAttribute("disabled","disabled")},getNextFieldOrd:function(){var e=this.model.get("fields"),t=e.length+1;return e.each(function(e){var i=e.get("slug"),l=/\-([0-9]+)$/g,s=l.exec(i);if(s&&s[1]){var o=parseInt(s[1]);o>=t&&(t=o+1)}}),t},render:function(t){var s=this;s.model=t?t:new wp.ccf.models.Form,this.listenTo(s.model,"change",this.enableDisableInsert,this);var o={labels:l.fieldLabels,form:s.model.toJSON()};window.form=s.model,s.el.innerHTML=this.template(o),s.el.className=s.el.className.replace(/show-form-settings/i,"");var n=s.el.querySelectorAll(".fields")[0];i.each(l.fieldLabels,function(e,t){n.appendChild(new wp.ccf.views.FieldRowPlaceholder({type:t}).render().el)});var c=s.el.querySelectorAll(".structure-fields")[0];i.each(l.structureFieldLabels,function(e,t){c.appendChild(new wp.ccf.views.FieldRowPlaceholder({type:t}).render().el)});var r=s.el.querySelectorAll(".special-fields")[0];i.each(l.specialFieldLabels,function(e,t){r.appendChild(new wp.ccf.views.FieldRowPlaceholder({type:t}).render().el)});var a=s.model.get("fields"),d=s.el.querySelectorAll(".form-content")[0],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 o=new wp.ccf.models.Fields[i](l),n=s.model.get("fields");n.add(o),new wp.ccf.views.FieldRow({model:o,el:t.item,form:s.model}).render(!0),t.item.attr("style","")}t.item.trigger("sorted",t.item.index())}}),s.initRenderSubViews(!1,!0,{form:s.model}),s.enableDisableInsert(),s}},wp.ccf.mixins.subViewable)),wp.ccf.views.ExistingFormTableRow=wp.ccf.views.ExistingFormTableRow||t.View.extend({tagName:"tr",template:wp.ccf.utils.template("ccf-existing-form-table-row-template"),events:{"click .edit":"triggerMainViewChange","click .delete":"triggerDelete","click .duplicate":"triggerDuplicate","click .insert-form-button":"insertForm"},initialize:function(e){this.parent=e.parent
3
+ },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()})})},triggerDuplicate:function(){var e=this,t=e.parent.collection.state.currentPage;e.model.clone().set("title",{raw:e.model.get("title").raw+" (Duplicate)"}).unset("id").save().done(function(){e.parent.showPage(t).done(function(){e.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,o=document.querySelectorAll(".ccf-open-form-manager")[0];if(!o)return!1;i.extend(this.dispatcher,t.Events),new wp.ccf.router,s.initErrorModal();var n=!1;if(l.single)if(n=!0,l.postId){var c=parseInt(l.postId);if(s.forms.formsFetching[c]===void 0){var r=new wp.ccf.models.Form({id:c}),a=r.fetch();s.forms.formsFetching[c]=a,s._currentFormDeferred=a,a.done(function(){delete s.forms.formsFetching[c],s.forms.add(r),s.currentForm=r})}else s._currentFormDeferred=s.forms.formsFetching[c],s._currentFormDeferred.done(function(){s.currentForm=s.forms.findWhere({id:c})});e.when(s._currentFormDeferred).then(function(){s._setupMainModal(!0),o.style.display="inline-block";var e=document.getElementById("ccf-submissions");if(e){var t=e.querySelectorAll(".inside")[0],i=document.createElement("div");i.className="ccf-submission-icon",i.setAttribute("data-icon","");var n=document.createElement("a");n.href="?action=edit&post="+parseInt(l.postId)+"&download_submissions=1&download_submissions_nonce="+l.downloadSubmissionsNonce,n.className="ccf-submission-icon",n.setAttribute("data-icon","");var c=document.getElementById("show-settings-link");i.onclick=function(){c.click()},e.insertBefore(i,e.firstChild.nextSibling.nextSibling),e.insertBefore(n,e.firstChild.nextSibling.nextSibling),wp.ccf.createSubmissionsTable(t);var r=document.querySelectorAll("#major-publishing-actions .duplicate")[0],a=function(e){e=e||window.event,e.preventDefault(),s.currentForm.clone().set("title",{raw:s.currentForm.get("title").raw+" (duplicate)"}).unset("id").save().done(function(e){document.location=l.adminUrl+"/post.php?action=edit&post="+e.id})};r.addEventListener?r.addEventListener("click",a,!1):r.attachEvent("onclick",a)}})}else s._setupMainModal(!0),o.style.display="inline-block";else s._setupMainModal();var d=function(e){e=e||window.event;var t=e.currentTarget?e.currentTarget:e.srcElement,i=t.getAttribute("data-form-id");wp.ccf.toggle(i)};o.addEventListener?o.addEventListener("click",d,!1):o.attachEvent("onclick",d)}}),wp.ccf.createManager()}(jQuery,Backbone,_,ccfSettings);
assets/js/manager/app.js CHANGED
@@ -189,6 +189,27 @@
189
  metabox.insertBefore( download, metabox.firstChild.nextSibling.nextSibling );
190
 
191
  wp.ccf.createSubmissionsTable( container );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
192
  }
193
  });
194
  } else {
189
  metabox.insertBefore( download, metabox.firstChild.nextSibling.nextSibling );
190
 
191
  wp.ccf.createSubmissionsTable( container );
192
+
193
+ var duplicateButton = document.querySelectorAll( '#major-publishing-actions .duplicate')[0];
194
+
195
+ var duplicateClick = function( evnt ) {
196
+ evnt = evnt || window.event;
197
+ evnt.preventDefault();
198
+
199
+ SELF.currentForm.clone()
200
+ .set( 'title', { raw: SELF.currentForm.get( 'title' ).raw + ' (duplicate)' } )
201
+ .unset( 'id' )
202
+ .save()
203
+ .done( function( newForm ) {
204
+ document.location = ccfSettings.adminUrl + '/post.php?action=edit&post=' + newForm.id;
205
+ });
206
+ };
207
+
208
+ if ( duplicateButton.addEventListener ) {
209
+ duplicateButton.addEventListener( 'click', duplicateClick, false );
210
+ } else {
211
+ duplicateButton.attachEvent( 'onclick', duplicateClick );
212
+ }
213
  }
214
  });
215
  } else {
assets/js/manager/models.js CHANGED
@@ -196,6 +196,7 @@
196
  status: 'publish',
197
  description: '',
198
  buttonText: 'Submit Form',
 
199
  completionActionType: 'text',
200
  completionRedirectUrl: '',
201
  completionMessage: '',
196
  status: 'publish',
197
  description: '',
198
  buttonText: 'Submit Form',
199
+ buttonClass: '',
200
  completionActionType: 'text',
201
  completionRedirectUrl: '',
202
  completionMessage: '',
assets/js/manager/views.js CHANGED
@@ -1791,6 +1791,9 @@
1791
  var buttonText = this.el.querySelectorAll( '.form-button-text' )[0].value;
1792
  this.model.set( 'buttonText', buttonText );
1793
 
 
 
 
1794
  var pause = this.el.querySelectorAll( '.form-pause' )[0].value;
1795
  this.model.set( 'pause', ( parseInt( pause ) ) ? true : false );
1796
 
@@ -2213,6 +2216,7 @@
2213
  events: {
2214
  'click .edit': 'triggerMainViewChange',
2215
  'click .delete': 'triggerDelete',
 
2216
  'click .insert-form-button': 'insertForm'
2217
  },
2218
 
@@ -2248,6 +2252,22 @@
2248
  });
2249
  },
2250
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2251
  render: function() {
2252
  this.$el.html( this.template( { form: this.model.toJSON(), utils: { getPrettyPostDate: wp.ccf.utils.getPrettyPostDate } } ) );
2253
  return this;
1791
  var buttonText = this.el.querySelectorAll( '.form-button-text' )[0].value;
1792
  this.model.set( 'buttonText', buttonText );
1793
 
1794
+ var buttonClass = this.el.querySelectorAll( '.form-button-class' )[0].value;
1795
+ this.model.set( 'buttonClass', buttonClass );
1796
+
1797
  var pause = this.el.querySelectorAll( '.form-pause' )[0].value;
1798
  this.model.set( 'pause', ( parseInt( pause ) ) ? true : false );
1799
 
2216
  events: {
2217
  'click .edit': 'triggerMainViewChange',
2218
  'click .delete': 'triggerDelete',
2219
+ 'click .duplicate': 'triggerDuplicate',
2220
  'click .insert-form-button': 'insertForm'
2221
  },
2222
 
2252
  });
2253
  },
2254
 
2255
+ triggerDuplicate: function() {
2256
+ var SELF = this,
2257
+ currentPage = SELF.parent.collection.state.currentPage;
2258
+
2259
+ SELF.model
2260
+ .clone()
2261
+ .set( 'title', { raw: SELF.model.get( 'title' ).raw + ' (Duplicate)' } )
2262
+ .unset( 'id' )
2263
+ .save()
2264
+ .done( function() {
2265
+ SELF.parent.showPage( currentPage ).done( function() {
2266
+ SELF.parent.renderPagination();
2267
+ });
2268
+ });
2269
+ },
2270
+
2271
  render: function() {
2272
  this.$el.html( this.template( { form: this.model.toJSON(), utils: { getPrettyPostDate: wp.ccf.utils.getPrettyPostDate } } ) );
2273
  return this;
assets/scss/form-cpt.scss CHANGED
@@ -78,6 +78,10 @@
78
  color: #a00;
79
  text-decoration: none;
80
  padding: 1px 2px;
 
 
 
 
81
  }
82
 
83
  .export-button {
78
  color: #a00;
79
  text-decoration: none;
80
  padding: 1px 2px;
81
+
82
+ &.duplicate {
83
+ color: #0073aa;
84
+ }
85
  }
86
 
87
  .export-button {
build/js/form-manager.js CHANGED
@@ -461,6 +461,7 @@
461
  status: 'publish',
462
  description: '',
463
  buttonText: 'Submit Form',
 
464
  completionActionType: 'text',
465
  completionRedirectUrl: '',
466
  completionMessage: '',
@@ -3022,6 +3023,9 @@
3022
  var buttonText = this.el.querySelectorAll( '.form-button-text' )[0].value;
3023
  this.model.set( 'buttonText', buttonText );
3024
 
 
 
 
3025
  var pause = this.el.querySelectorAll( '.form-pause' )[0].value;
3026
  this.model.set( 'pause', ( parseInt( pause ) ) ? true : false );
3027
 
461
  status: 'publish',
462
  description: '',
463
  buttonText: 'Submit Form',
464
+ buttonClass: '',
465
  completionActionType: 'text',
466
  completionRedirectUrl: '',
467
  completionMessage: '',
3023
  var buttonText = this.el.querySelectorAll( '.form-button-text' )[0].value;
3024
  this.model.set( 'buttonText', buttonText );
3025
 
3026
+ var buttonClass = this.el.querySelectorAll( '.form-button-class' )[0].value;
3027
+ this.model.set( 'buttonClass', buttonClass );
3028
+
3029
  var pause = this.el.querySelectorAll( '.form-pause' )[0].value;
3030
  this.model.set( 'pause', ( parseInt( pause ) ) ? true : false );
3031
 
classes/class-ccf-api-form-controller.php CHANGED
@@ -448,6 +448,10 @@ class CCF_API_Form_Controller extends WP_REST_Controller {
448
  update_post_meta( $result, 'ccf_form_buttonText', sanitize_text_field( $data['buttonText'] ) );
449
  }
450
 
 
 
 
 
451
  if ( isset( $data['description'] ) ) {
452
  update_post_meta( $result, 'ccf_form_description', sanitize_text_field( $data['description'] ) );
453
  }
@@ -999,6 +1003,7 @@ class CCF_API_Form_Controller extends WP_REST_Controller {
999
  $data['fields'] = $this->_get_fields( $data['id'] );
1000
 
1001
  $data['buttonText'] = esc_attr( get_post_meta( $data['id'], 'ccf_form_buttonText', true ) );
 
1002
  $data['description'] = esc_html( get_post_meta( $data['id'], 'ccf_form_description', true ) );
1003
  $data['completionActionType'] = esc_attr( get_post_meta( $data['id'], 'ccf_form_completion_action_type', true ) );
1004
  $data['completionRedirectUrl'] = esc_url_raw( get_post_meta( $data['id'], 'ccf_form_completion_redirect_url', true ) );
448
  update_post_meta( $result, 'ccf_form_buttonText', sanitize_text_field( $data['buttonText'] ) );
449
  }
450
 
451
+ if ( isset( $data['buttonText'] ) ) {
452
+ update_post_meta( $result, 'ccf_form_buttonClass', sanitize_text_field( $data['buttonClass'] ) );
453
+ }
454
+
455
  if ( isset( $data['description'] ) ) {
456
  update_post_meta( $result, 'ccf_form_description', sanitize_text_field( $data['description'] ) );
457
  }
1003
  $data['fields'] = $this->_get_fields( $data['id'] );
1004
 
1005
  $data['buttonText'] = esc_attr( get_post_meta( $data['id'], 'ccf_form_buttonText', true ) );
1006
+ $data['buttonClass'] = esc_attr( get_post_meta( $data['id'], 'ccf_form_buttonClass', true ) );
1007
  $data['description'] = esc_html( get_post_meta( $data['id'], 'ccf_form_description', true ) );
1008
  $data['completionActionType'] = esc_attr( get_post_meta( $data['id'], 'ccf_form_completion_action_type', true ) );
1009
  $data['completionRedirectUrl'] = esc_url_raw( get_post_meta( $data['id'], 'ccf_form_completion_redirect_url', true ) );
classes/class-ccf-field-renderer.php CHANGED
@@ -1172,6 +1172,14 @@ endif; ?>
1172
 
1173
  return $field_html;
1174
  }
 
 
 
 
 
 
 
 
1175
  /**
1176
  * Return singleton instance of class
1177
  *
1172
 
1173
  return $field_html;
1174
  }
1175
+
1176
+ /**
1177
+ * Resets the instance defaults
1178
+ */
1179
+ public function reset() {
1180
+ $this->section_open = false;
1181
+ }
1182
+
1183
  /**
1184
  * Return singleton instance of class
1185
  *
classes/class-ccf-form-cpt.php CHANGED
@@ -408,7 +408,8 @@ class CCF_Form_CPT {
408
 
409
  <div id="major-publishing-actions">
410
  <div id="delete-action">
411
- <a class="submitdelete deletion" href="<?php echo get_delete_post_link( $post->ID ); ?>"><?php esc_html_e( 'Move to Trash', 'custom-contact-forms' ); ?></a>
 
412
  <div class="clear"></div>
413
  </div>
414
 
408
 
409
  <div id="major-publishing-actions">
410
  <div id="delete-action">
411
+ <a class="submitdelete deletion" href="<?php echo get_delete_post_link( $post->ID ); ?>"><?php esc_html_e( 'Move to Trash', 'custom-contact-forms' ); ?></a><br>
412
+ <a class="submitdelete duplicate" href=""><?php esc_html_e( 'Duplicate', 'custom-contact-forms' ); ?></a>
413
  <div class="clear"></div>
414
  </div>
415
 
classes/class-ccf-form-manager.php CHANGED
@@ -351,6 +351,11 @@ class CCF_Form_Manager {
351
  <input class="widefat form-button-text" id="ccf_form_button_text" name="text" type="text" value="{{ form.buttonText }}">
352
  </p>
353
 
 
 
 
 
 
354
  <p>
355
  <label for="ccf_form_theme"><?php esc_html_e( 'Form Theme:', 'custom-contact-forms' ); ?></label>
356
 
@@ -1894,6 +1899,7 @@ class CCF_Form_Manager {
1894
  <div class="actions">
1895
  <a class="edit edit-form" data-view="form-pane" data-form-id="{{ form.id }}" href="#form-pane-{{ form.id }}"><?php esc_html_e( 'Edit', 'custom-contact-forms' ); ?></a> |
1896
  <a class="insert-form-button"><?php esc_html_e( 'Insert into post', 'custom-contact-forms' ); ?></a> |
 
1897
  <a class="delete"><?php esc_html_e( 'Trash', 'custom-contact-forms' ); ?></a>
1898
  </div>
1899
  </td>
351
  <input class="widefat form-button-text" id="ccf_form_button_text" name="text" type="text" value="{{ form.buttonText }}">
352
  </p>
353
 
354
+ <p>
355
+ <label for="ccf_form_button_class"><?php esc_html_e( 'Button Class:', 'custom-contact-forms' ); ?></label>
356
+ <input class="widefat form-button-class" id="ccf_form_button_class" name="class" type="text" value="{{ form.buttonClass }}">
357
+ </p>
358
+
359
  <p>
360
  <label for="ccf_form_theme"><?php esc_html_e( 'Form Theme:', 'custom-contact-forms' ); ?></label>
361
 
1899
  <div class="actions">
1900
  <a class="edit edit-form" data-view="form-pane" data-form-id="{{ form.id }}" href="#form-pane-{{ form.id }}"><?php esc_html_e( 'Edit', 'custom-contact-forms' ); ?></a> |
1901
  <a class="insert-form-button"><?php esc_html_e( 'Insert into post', 'custom-contact-forms' ); ?></a> |
1902
+ <a class="duplicate"><?php esc_html_e( 'Duplicate form', 'custom-contact-forms' ); ?></a> |
1903
  <a class="delete"><?php esc_html_e( 'Trash', 'custom-contact-forms' ); ?></a>
1904
  </div>
1905
  </td>
classes/class-ccf-form-renderer.php CHANGED
@@ -255,7 +255,7 @@ class CCF_Form_Renderer {
255
 
256
  <?php echo $fields_html; ?>
257
 
258
- <div class="form-submit">
259
  <input type="submit" class="btn btn-primary ccf-submit-button" value="<?php echo esc_attr( get_post_meta( $form_id, 'ccf_form_buttonText', true ) ); ?>">
260
  <img class="loading-img" src="<?php echo esc_url( site_url( '/wp-admin/images/wpspin_light.gif' ) ); ?>">
261
  </div>
@@ -281,6 +281,8 @@ class CCF_Form_Renderer {
281
  }
282
 
283
  $form_html = ob_get_clean();
 
 
284
 
285
  return $form_html;
286
  }
255
 
256
  <?php echo $fields_html; ?>
257
 
258
+ <div class="form-submit <?php echo esc_attr( get_post_meta( $form_id, 'ccf_form_buttonClass', true ) ); ?>">
259
  <input type="submit" class="btn btn-primary ccf-submit-button" value="<?php echo esc_attr( get_post_meta( $form_id, 'ccf_form_buttonText', true ) ); ?>">
260
  <img class="loading-img" src="<?php echo esc_url( site_url( '/wp-admin/images/wpspin_light.gif' ) ); ?>">
261
  </div>
281
  }
282
 
283
  $form_html = ob_get_clean();
284
+
285
+ CCF_Field_Renderer::factory()->reset();
286
 
287
  return $form_html;
288
  }
custom-contact-forms.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin URI: http://www.taylorlovett.com
5
  * Description: Build beautiful custom forms and manage submissions the WordPress way. View live previews of your forms while you build them. Contact forms, subscription forms, payment forms, etc.
6
  * Author: Taylor Lovett
7
- * Version: 7.5
8
  * Text Domain: custom-contact-forms
9
  * Domain Path: /languages
10
  * Author URI: http://www.taylorlovett.com
@@ -14,7 +14,7 @@
14
  * Include plugin reqs
15
  */
16
 
17
- define( 'CCF_VERSION', '7.5' );
18
 
19
  require_once( dirname( __FILE__ ) . '/classes/class-ccf-constants.php' );
20
  require_once( dirname( __FILE__ ) . '/classes/class-ccf-custom-contact-forms.php' );
4
  * Plugin URI: http://www.taylorlovett.com
5
  * Description: Build beautiful custom forms and manage submissions the WordPress way. View live previews of your forms while you build them. Contact forms, subscription forms, payment forms, etc.
6
  * Author: Taylor Lovett
7
+ * Version: 7.6
8
  * Text Domain: custom-contact-forms
9
  * Domain Path: /languages
10
  * Author URI: http://www.taylorlovett.com
14
  * Include plugin reqs
15
  */
16
 
17
+ define( 'CCF_VERSION', '7.6' );
18
 
19
  require_once( dirname( __FILE__ ) . '/classes/class-ccf-constants.php' );
20
  require_once( dirname( __FILE__ ) . '/classes/class-ccf-custom-contact-forms.php' );
languages/custom-contact-forms.mo CHANGED
Binary file
languages/custom-contact-forms.po CHANGED
@@ -5,8 +5,8 @@ msgstr ""
5
  "Project-Id-Version: Custom Contact Forms\n"
6
  "Report-Msgid-Bugs-To: https://github.com/tlovett1/custom-contact-forms/"
7
  "issues\n"
8
- "POT-Creation-Date: 2016-02-03 00:48-0500\n"
9
- "PO-Revision-Date: 2016-02-03 00:49-0500\n"
10
  "Last-Translator: Taylor Lovett <tlovett88@gmail.com>\n"
11
  "Language-Team: \n"
12
  "Language: en\n"
@@ -23,23 +23,23 @@ msgstr ""
23
  "X-Textdomain-Support: yes\n"
24
  "X-Poedit-SearchPath-0: ..\n"
25
 
26
- #: ../classes/class-ccf-api-form-controller.php:653
27
  msgid "Form not found"
28
  msgstr ""
29
 
30
- #: ../classes/class-ccf-api-form-controller.php:679
31
  msgid "Could not create form"
32
  msgstr ""
33
 
34
- #: ../classes/class-ccf-api-form-controller.php:709
35
  msgid "Could not update form"
36
  msgstr ""
37
 
38
- #: ../classes/class-ccf-api-form-controller.php:737
39
  msgid "Could not delete form"
40
  msgstr ""
41
 
42
- #: ../classes/class-ccf-api-form-controller.php:766
43
  msgid "Could not delete submission"
44
  msgstr ""
45
 
@@ -59,7 +59,7 @@ msgstr ""
59
  msgid "<a href=\"%s\">Forms and Submissions</a>"
60
  msgstr ""
61
 
62
- #: ../classes/class-ccf-export.php:58 ../classes/class-ccf-form-cpt.php:573
63
  msgid "Forms and Submissions"
64
  msgstr ""
65
 
@@ -82,111 +82,111 @@ msgid "Max file size is %d MB. "
82
  msgstr ""
83
 
84
  #: ../classes/class-ccf-field-renderer.php:575
85
- #: ../classes/class-ccf-form-manager.php:1797
86
- #: ../classes/class-ccf-form-manager.php:1822
87
  msgid "Street Address"
88
  msgstr ""
89
 
90
  #: ../classes/class-ccf-field-renderer.php:579
91
- #: ../classes/class-ccf-form-manager.php:1801
92
- #: ../classes/class-ccf-form-manager.php:1826
93
  msgid "Address Line 2"
94
  msgstr ""
95
 
96
  #: ../classes/class-ccf-field-renderer.php:586
97
- #: ../classes/class-ccf-form-manager.php:1805
98
- #: ../classes/class-ccf-form-manager.php:1830
99
  msgid "City"
100
  msgstr ""
101
 
102
  #: ../classes/class-ccf-field-renderer.php:599
103
- #: ../classes/class-ccf-form-manager.php:1813
104
  msgid "State"
105
  msgstr ""
106
 
107
  #: ../classes/class-ccf-field-renderer.php:607
108
- #: ../classes/class-ccf-form-manager.php:1817
109
  msgid "ZIP Code"
110
  msgstr ""
111
 
112
  #: ../classes/class-ccf-field-renderer.php:617
113
- #: ../classes/class-ccf-form-manager.php:1834
114
  msgid "State / Region / Province"
115
  msgstr ""
116
 
117
  #: ../classes/class-ccf-field-renderer.php:625
118
- #: ../classes/class-ccf-form-manager.php:1838
119
  msgid "ZIP / Postal Code"
120
  msgstr ""
121
 
122
  #: ../classes/class-ccf-field-renderer.php:637
123
- #: ../classes/class-ccf-form-manager.php:1846
124
  msgid "Country"
125
  msgstr ""
126
 
127
  #: ../classes/class-ccf-field-renderer.php:815
128
- #: ../classes/class-ccf-form-manager.php:1857
129
  msgid "email@example.com"
130
  msgstr ""
131
 
132
  #: ../classes/class-ccf-field-renderer.php:827
133
  #: ../classes/class-ccf-form-manager.php:327
134
- #: ../classes/class-ccf-form-manager.php:1861
135
- #: ../classes/class-ccf-form-manager.php:2166
136
  msgid "Email"
137
  msgstr ""
138
 
139
  #: ../classes/class-ccf-field-renderer.php:834
140
- #: ../classes/class-ccf-form-manager.php:1865
141
  msgid "Confirm Email"
142
  msgstr ""
143
 
144
  #: ../classes/class-ccf-field-renderer.php:900
145
- #: ../classes/class-ccf-form-manager.php:1733
146
  msgid "First"
147
  msgstr ""
148
 
149
  #: ../classes/class-ccf-field-renderer.php:907
150
- #: ../classes/class-ccf-form-manager.php:1737
151
  msgid "Last"
152
  msgstr ""
153
 
154
  #: ../classes/class-ccf-field-renderer.php:981
155
  #: ../classes/class-ccf-field-renderer.php:1002
156
- #: ../classes/class-ccf-form-manager.php:1752
157
- #: ../classes/class-ccf-form-manager.php:1773
158
  msgid "HH"
159
  msgstr ""
160
 
161
  #: ../classes/class-ccf-field-renderer.php:985
162
  #: ../classes/class-ccf-field-renderer.php:1006
163
- #: ../classes/class-ccf-form-manager.php:1756
164
- #: ../classes/class-ccf-form-manager.php:1777
165
  msgid "MM"
166
  msgstr ""
167
 
168
  #: ../classes/class-ccf-field-renderer.php:989
169
  #: ../classes/class-ccf-field-renderer.php:1010
170
- #: ../classes/class-ccf-form-manager.php:1760
171
- #: ../classes/class-ccf-form-manager.php:1781
172
  msgid "AM"
173
  msgstr ""
174
 
175
  #: ../classes/class-ccf-field-renderer.php:990
176
  #: ../classes/class-ccf-field-renderer.php:1011
177
- #: ../classes/class-ccf-form-manager.php:1761
178
- #: ../classes/class-ccf-form-manager.php:1782
179
  msgid "PM"
180
  msgstr ""
181
 
182
  #: ../classes/class-ccf-field-renderer.php:997
183
- #: ../classes/class-ccf-form-cpt.php:508
184
- #: ../classes/class-ccf-form-manager.php:508
185
- #: ../classes/class-ccf-form-manager.php:521
186
- #: ../classes/class-ccf-form-manager.php:1768
187
- #: ../classes/class-ccf-form-manager.php:1951
188
- #: ../classes/class-ccf-form-manager.php:1965
189
- #: ../classes/class-ccf-form-manager.php:2108
190
  msgid "Date"
191
  msgstr ""
192
 
@@ -195,9 +195,9 @@ msgid "Form Submission Columns"
195
  msgstr ""
196
 
197
  #: ../classes/class-ccf-form-cpt.php:324 ../classes/class-ccf-form-cpt.php:342
198
- #: ../classes/class-ccf-form-cpt.php:506
199
- #: ../classes/class-ccf-form-manager.php:511
200
- #: ../classes/class-ccf-form-manager.php:524
201
  msgid "Submissions"
202
  msgstr ""
203
 
@@ -233,86 +233,90 @@ msgstr ""
233
  msgid "Move to Trash"
234
  msgstr ""
235
 
236
- #: ../classes/class-ccf-form-cpt.php:415
 
 
 
 
237
  msgid "Export"
238
  msgstr ""
239
 
240
- #: ../classes/class-ccf-form-cpt.php:444
241
- #: ../classes/class-ccf-form-manager.php:1893
242
  msgid "(No title)"
243
  msgstr ""
244
 
245
- #: ../classes/class-ccf-form-cpt.php:449
246
  msgid "Manage Form"
247
  msgstr ""
248
 
249
- #: ../classes/class-ccf-form-cpt.php:504
250
  msgid "Form Title"
251
  msgstr ""
252
 
253
- #: ../classes/class-ccf-form-cpt.php:505
254
- #: ../classes/class-ccf-form-manager.php:509
255
- #: ../classes/class-ccf-form-manager.php:522
256
  msgid "Author"
257
  msgstr ""
258
 
259
- #: ../classes/class-ccf-form-cpt.php:507
260
- #: ../classes/class-ccf-form-manager.php:510
261
- #: ../classes/class-ccf-form-manager.php:523
262
  msgid "Number of Fields"
263
  msgstr ""
264
 
265
- #: ../classes/class-ccf-form-cpt.php:541
266
  msgid "Unpublished"
267
  msgstr ""
268
 
269
- #: ../classes/class-ccf-form-cpt.php:543
270
  msgid "Y/m/d g:i:s A"
271
  msgstr ""
272
 
273
- #: ../classes/class-ccf-form-cpt.php:550
274
  #, php-format
275
  msgid "%s ago"
276
  msgstr ""
277
 
278
- #: ../classes/class-ccf-form-cpt.php:551
279
  msgid "Y/m/d"
280
  msgstr ""
281
 
282
- #: ../classes/class-ccf-form-cpt.php:567 ../classes/class-ccf-form-cpt.php:579
283
  msgid "Forms"
284
  msgstr ""
285
 
286
- #: ../classes/class-ccf-form-cpt.php:568
287
  msgid "Form"
288
  msgstr ""
289
 
290
- #: ../classes/class-ccf-form-cpt.php:569 ../classes/class-ccf-form-cpt.php:572
291
  #: ../classes/class-ccf-form-manager.php:88
292
  msgid "New Form"
293
  msgstr ""
294
 
295
- #: ../classes/class-ccf-form-cpt.php:570
296
  msgid "Add New Form"
297
  msgstr ""
298
 
299
- #: ../classes/class-ccf-form-cpt.php:571
300
  msgid "Edit Form"
301
  msgstr ""
302
 
303
- #: ../classes/class-ccf-form-cpt.php:574
304
  msgid "View Form"
305
  msgstr ""
306
 
307
- #: ../classes/class-ccf-form-cpt.php:575
308
  msgid "Search Forms"
309
  msgstr ""
310
 
311
- #: ../classes/class-ccf-form-cpt.php:576
312
  msgid "No forms found."
313
  msgstr ""
314
 
315
- #: ../classes/class-ccf-form-cpt.php:577
316
  msgid "No forms found in trash."
317
  msgstr ""
318
 
@@ -528,7 +532,7 @@ msgid "&larr; Drag fields from the left here."
528
  msgstr ""
529
 
530
  #: ../classes/class-ccf-form-manager.php:152
531
- #: ../classes/class-ccf-form-manager.php:1896
532
  msgid "Insert into post"
533
  msgstr ""
534
 
@@ -549,7 +553,7 @@ msgid "(Untitled)"
549
  msgstr ""
550
 
551
  #: ../classes/class-ccf-form-manager.php:172
552
- #: ../classes/class-ccf-form-manager.php:1895
553
  msgid "Edit"
554
  msgstr ""
555
 
@@ -558,7 +562,7 @@ msgid "Delete"
558
  msgstr ""
559
 
560
  #: ../classes/class-ccf-form-manager.php:179
561
- #: ../classes/class-ccf-form-manager.php:2213
562
  msgid "Form Submission"
563
  msgstr ""
564
 
@@ -606,73 +610,73 @@ msgid "Activate Notification:"
606
  msgstr ""
607
 
608
  #: ../classes/class-ccf-form-manager.php:244
609
- #: ../classes/class-ccf-form-manager.php:386
610
- #: ../classes/class-ccf-form-manager.php:434
611
- #: ../classes/class-ccf-form-manager.php:562
612
- #: ../classes/class-ccf-form-manager.php:581
613
- #: ../classes/class-ccf-form-manager.php:636
614
- #: ../classes/class-ccf-form-manager.php:651
615
- #: ../classes/class-ccf-form-manager.php:711
616
- #: ../classes/class-ccf-form-manager.php:760
617
- #: ../classes/class-ccf-form-manager.php:779
618
- #: ../classes/class-ccf-form-manager.php:824
619
- #: ../classes/class-ccf-form-manager.php:873
620
- #: ../classes/class-ccf-form-manager.php:922
621
- #: ../classes/class-ccf-form-manager.php:941
622
- #: ../classes/class-ccf-form-manager.php:990
623
- #: ../classes/class-ccf-form-manager.php:1035
624
- #: ../classes/class-ccf-form-manager.php:1050
625
- #: ../classes/class-ccf-form-manager.php:1101
626
- #: ../classes/class-ccf-form-manager.php:1139
627
- #: ../classes/class-ccf-form-manager.php:1195
628
- #: ../classes/class-ccf-form-manager.php:1214
629
- #: ../classes/class-ccf-form-manager.php:1266
630
- #: ../classes/class-ccf-form-manager.php:1281
631
- #: ../classes/class-ccf-form-manager.php:1332
632
- #: ../classes/class-ccf-form-manager.php:1339
633
- #: ../classes/class-ccf-form-manager.php:1360
634
- #: ../classes/class-ccf-form-manager.php:1431
635
- #: ../classes/class-ccf-form-manager.php:1453
636
- #: ../classes/class-ccf-form-manager.php:1498
637
- #: ../classes/class-ccf-form-manager.php:1520
638
- #: ../classes/class-ccf-form-manager.php:1565
639
- #: ../classes/class-ccf-form-manager.php:1587
640
  #: ../classes/class-ccf-settings.php:103
641
  msgid "No"
642
  msgstr ""
643
 
644
  #: ../classes/class-ccf-form-manager.php:245
645
- #: ../classes/class-ccf-form-manager.php:387
646
- #: ../classes/class-ccf-form-manager.php:435
647
- #: ../classes/class-ccf-form-manager.php:561
648
- #: ../classes/class-ccf-form-manager.php:582
649
- #: ../classes/class-ccf-form-manager.php:635
650
- #: ../classes/class-ccf-form-manager.php:652
651
- #: ../classes/class-ccf-form-manager.php:712
652
- #: ../classes/class-ccf-form-manager.php:759
653
- #: ../classes/class-ccf-form-manager.php:780
654
- #: ../classes/class-ccf-form-manager.php:825
655
- #: ../classes/class-ccf-form-manager.php:874
656
- #: ../classes/class-ccf-form-manager.php:921
657
- #: ../classes/class-ccf-form-manager.php:942
658
- #: ../classes/class-ccf-form-manager.php:991
659
- #: ../classes/class-ccf-form-manager.php:1034
660
- #: ../classes/class-ccf-form-manager.php:1051
661
- #: ../classes/class-ccf-form-manager.php:1100
662
- #: ../classes/class-ccf-form-manager.php:1140
663
- #: ../classes/class-ccf-form-manager.php:1194
664
- #: ../classes/class-ccf-form-manager.php:1215
665
- #: ../classes/class-ccf-form-manager.php:1265
666
- #: ../classes/class-ccf-form-manager.php:1282
667
- #: ../classes/class-ccf-form-manager.php:1331
668
- #: ../classes/class-ccf-form-manager.php:1338
669
- #: ../classes/class-ccf-form-manager.php:1361
670
- #: ../classes/class-ccf-form-manager.php:1430
671
- #: ../classes/class-ccf-form-manager.php:1454
672
- #: ../classes/class-ccf-form-manager.php:1497
673
- #: ../classes/class-ccf-form-manager.php:1521
674
- #: ../classes/class-ccf-form-manager.php:1564
675
- #: ../classes/class-ccf-form-manager.php:1588
676
  #: ../classes/class-ccf-settings.php:104
677
  msgid "Yes"
678
  msgstr ""
@@ -780,388 +784,392 @@ msgid "Button Text:"
780
  msgstr ""
781
 
782
  #: ../classes/class-ccf-form-manager.php:355
 
 
 
 
783
  msgid "Form Theme:"
784
  msgstr ""
785
 
786
- #: ../classes/class-ccf-form-manager.php:358
787
  msgid "None"
788
  msgstr ""
789
 
790
- #: ../classes/class-ccf-form-manager.php:359
791
  msgid "Light"
792
  msgstr ""
793
 
794
- #: ../classes/class-ccf-form-manager.php:360
795
  msgid "Dark"
796
  msgstr ""
797
 
798
- #: ../classes/class-ccf-form-manager.php:363
799
  msgid "\"None\" will have your form inherit styles from your theme."
800
  msgstr ""
801
 
802
- #: ../classes/class-ccf-form-manager.php:367
803
  msgid "On form completion:"
804
  msgstr ""
805
 
806
- #: ../classes/class-ccf-form-manager.php:370
807
  msgid "Show text"
808
  msgstr ""
809
 
810
- #: ../classes/class-ccf-form-manager.php:371
811
  msgid "Redirect"
812
  msgstr ""
813
 
814
- #: ../classes/class-ccf-form-manager.php:375
815
  msgid "Redirect URL:"
816
  msgstr ""
817
 
818
- #: ../classes/class-ccf-form-manager.php:379
819
  msgid "Completion Message:"
820
  msgstr ""
821
 
822
- #: ../classes/class-ccf-form-manager.php:383
823
  msgid "Pause form:"
824
  msgstr ""
825
 
826
- #: ../classes/class-ccf-form-manager.php:391
827
  msgid "Pause Message:"
828
  msgstr ""
829
 
830
- #: ../classes/class-ccf-form-manager.php:395
831
  msgid "Email Notifications"
832
  msgstr ""
833
 
834
- #: ../classes/class-ccf-form-manager.php:401
835
- #: ../classes/class-ccf-form-manager.php:412
836
- #: ../classes/class-ccf-form-manager.php:507
837
- #: ../classes/class-ccf-form-manager.php:520
838
  msgid "Title"
839
  msgstr ""
840
 
841
- #: ../classes/class-ccf-form-manager.php:402
842
- #: ../classes/class-ccf-form-manager.php:413
843
  msgid "Subject"
844
  msgstr ""
845
 
846
- #: ../classes/class-ccf-form-manager.php:403
847
- #: ../classes/class-ccf-form-manager.php:414
848
  msgid "To"
849
  msgstr ""
850
 
851
- #: ../classes/class-ccf-form-manager.php:404
852
- #: ../classes/class-ccf-form-manager.php:415
853
  msgid "Active"
854
  msgstr ""
855
 
856
- #: ../classes/class-ccf-form-manager.php:420
857
  msgid "New Notification"
858
  msgstr ""
859
 
860
- #: ../classes/class-ccf-form-manager.php:423
861
  msgid ""
862
  "For notification changes to take affect (updating, adding, deleting, etc.), "
863
  "you will need to save the form."
864
  msgstr ""
865
 
866
- #: ../classes/class-ccf-form-manager.php:427
867
  msgid "Post Creation"
868
  msgstr ""
869
 
870
- #: ../classes/class-ccf-form-manager.php:428
871
  msgid ""
872
  "You can have Custom Contact Forms create a post (or custom post type) "
873
  "whenever someone submits your form."
874
  msgstr ""
875
 
876
- #: ../classes/class-ccf-form-manager.php:431
877
  msgid "Enable Post Creation:"
878
  msgstr ""
879
 
880
- #: ../classes/class-ccf-form-manager.php:440
881
  msgid "Post Type:"
882
  msgstr ""
883
 
884
- #: ../classes/class-ccf-form-manager.php:450
885
  msgid "Post Status:"
886
  msgstr ""
887
 
888
- #: ../classes/class-ccf-form-manager.php:460
889
  msgid "Field Mappings:"
890
  msgstr ""
891
 
892
- #: ../classes/class-ccf-form-manager.php:465
893
  msgid ""
894
  "You can map as few or as many fields as you like. However, if no form fields "
895
  "are mapped, no post will be created. Mapping a field to post_title is "
896
  "required."
897
  msgstr ""
898
 
899
- #: ../classes/class-ccf-form-manager.php:477
900
  msgid "Custom Field Key"
901
  msgstr ""
902
 
903
- #: ../classes/class-ccf-form-manager.php:491
904
  msgid "items"
905
  msgstr ""
906
 
907
- #: ../classes/class-ccf-form-manager.php:506
908
- #: ../classes/class-ccf-form-manager.php:519
909
  msgid "ID"
910
  msgstr ""
911
 
912
- #: ../classes/class-ccf-form-manager.php:534
913
  msgid "<span>&larr;</span> Click on a field to edit it."
914
  msgstr ""
915
 
916
- #: ../classes/class-ccf-form-manager.php:543
917
- #: ../classes/class-ccf-form-manager.php:611
918
- #: ../classes/class-ccf-form-manager.php:741
919
- #: ../classes/class-ccf-form-manager.php:903
920
  msgid "Internal Unique Slug"
921
  msgstr ""
922
 
923
- #: ../classes/class-ccf-form-manager.php:547
924
- #: ../classes/class-ccf-form-manager.php:615
925
- #: ../classes/class-ccf-form-manager.php:682
926
- #: ../classes/class-ccf-form-manager.php:745
927
- #: ../classes/class-ccf-form-manager.php:907
928
- #: ../classes/class-ccf-form-manager.php:1024
929
- #: ../classes/class-ccf-form-manager.php:1084
930
- #: ../classes/class-ccf-form-manager.php:1173
931
- #: ../classes/class-ccf-form-manager.php:1248
932
- #: ../classes/class-ccf-form-manager.php:1315
933
- #: ../classes/class-ccf-form-manager.php:1420
934
- #: ../classes/class-ccf-form-manager.php:1487
935
- #: ../classes/class-ccf-form-manager.php:1554
936
  msgid "Label:"
937
  msgstr ""
938
 
939
- #: ../classes/class-ccf-form-manager.php:551
940
- #: ../classes/class-ccf-form-manager.php:619
941
- #: ../classes/class-ccf-form-manager.php:686
942
- #: ../classes/class-ccf-form-manager.php:749
943
- #: ../classes/class-ccf-form-manager.php:911
944
- #: ../classes/class-ccf-form-manager.php:1028
945
- #: ../classes/class-ccf-form-manager.php:1088
946
- #: ../classes/class-ccf-form-manager.php:1177
947
- #: ../classes/class-ccf-form-manager.php:1252
948
- #: ../classes/class-ccf-form-manager.php:1319
949
- #: ../classes/class-ccf-form-manager.php:1424
950
- #: ../classes/class-ccf-form-manager.php:1491
951
- #: ../classes/class-ccf-form-manager.php:1558
952
- msgid "Description:"
953
- msgstr ""
954
-
955
- #: ../classes/class-ccf-form-manager.php:555
956
- #: ../classes/class-ccf-form-manager.php:753
957
- #: ../classes/class-ccf-form-manager.php:915
958
- #: ../classes/class-ccf-form-manager.php:975
959
  #: ../classes/class-ccf-form-manager.php:1093
960
- #: ../classes/class-ccf-form-manager.php:1181
 
961
  #: ../classes/class-ccf-form-manager.php:1324
962
- msgid "Initial Value:"
 
 
 
963
  msgstr ""
964
 
965
- #: ../classes/class-ccf-form-manager.php:559
966
- #: ../classes/class-ccf-form-manager.php:633
967
- #: ../classes/class-ccf-form-manager.php:757
968
- #: ../classes/class-ccf-form-manager.php:919
969
- #: ../classes/class-ccf-form-manager.php:1032
970
  #: ../classes/class-ccf-form-manager.php:1098
971
- #: ../classes/class-ccf-form-manager.php:1192
972
- #: ../classes/class-ccf-form-manager.php:1263
973
  #: ../classes/class-ccf-form-manager.php:1329
974
- #: ../classes/class-ccf-form-manager.php:1428
975
- #: ../classes/class-ccf-form-manager.php:1495
976
- #: ../classes/class-ccf-form-manager.php:1562
977
- msgid "Required:"
978
  msgstr ""
979
 
980
- #: ../classes/class-ccf-form-manager.php:568
981
- #: ../classes/class-ccf-form-manager.php:642
982
- #: ../classes/class-ccf-form-manager.php:702
983
- #: ../classes/class-ccf-form-manager.php:766
984
- #: ../classes/class-ccf-form-manager.php:815
985
- #: ../classes/class-ccf-form-manager.php:864
986
- #: ../classes/class-ccf-form-manager.php:928
987
- #: ../classes/class-ccf-form-manager.php:981
988
- #: ../classes/class-ccf-form-manager.php:1041
989
- #: ../classes/class-ccf-form-manager.php:1124
990
- #: ../classes/class-ccf-form-manager.php:1201
991
- #: ../classes/class-ccf-form-manager.php:1272
992
- #: ../classes/class-ccf-form-manager.php:1345
993
- #: ../classes/class-ccf-form-manager.php:1444
994
- #: ../classes/class-ccf-form-manager.php:1511
995
- #: ../classes/class-ccf-form-manager.php:1578
996
- msgid "Advanced"
997
  msgstr ""
998
 
999
- #: ../classes/class-ccf-form-manager.php:571
1000
- #: ../classes/class-ccf-form-manager.php:645
1001
- #: ../classes/class-ccf-form-manager.php:705
1002
- #: ../classes/class-ccf-form-manager.php:769
1003
- #: ../classes/class-ccf-form-manager.php:818
1004
- #: ../classes/class-ccf-form-manager.php:867
1005
- #: ../classes/class-ccf-form-manager.php:931
1006
- #: ../classes/class-ccf-form-manager.php:984
1007
- #: ../classes/class-ccf-form-manager.php:1044
1008
- #: ../classes/class-ccf-form-manager.php:1127
1009
- #: ../classes/class-ccf-form-manager.php:1204
1010
- #: ../classes/class-ccf-form-manager.php:1275
1011
- #: ../classes/class-ccf-form-manager.php:1348
1012
- #: ../classes/class-ccf-form-manager.php:1447
1013
- #: ../classes/class-ccf-form-manager.php:1514
1014
- #: ../classes/class-ccf-form-manager.php:1581
1015
- msgid "Class Name:"
1016
  msgstr ""
1017
 
1018
- #: ../classes/class-ccf-form-manager.php:575
1019
- #: ../classes/class-ccf-form-manager.php:773
1020
- #: ../classes/class-ccf-form-manager.php:935
 
 
 
 
 
 
1021
  #: ../classes/class-ccf-form-manager.php:1132
1022
- #: ../classes/class-ccf-form-manager.php:1208
 
1023
  #: ../classes/class-ccf-form-manager.php:1353
1024
- msgid "Placeholder Text:"
 
 
 
1025
  msgstr ""
1026
 
1027
- #: ../classes/class-ccf-form-manager.php:579
1028
- #: ../classes/class-ccf-form-manager.php:649
1029
- #: ../classes/class-ccf-form-manager.php:709
1030
- #: ../classes/class-ccf-form-manager.php:777
1031
- #: ../classes/class-ccf-form-manager.php:822
1032
- #: ../classes/class-ccf-form-manager.php:871
1033
- #: ../classes/class-ccf-form-manager.php:939
1034
- #: ../classes/class-ccf-form-manager.php:988
1035
- #: ../classes/class-ccf-form-manager.php:1048
1036
  #: ../classes/class-ccf-form-manager.php:1137
1037
- #: ../classes/class-ccf-form-manager.php:1212
1038
- #: ../classes/class-ccf-form-manager.php:1279
1039
  #: ../classes/class-ccf-form-manager.php:1358
1040
- #: ../classes/class-ccf-form-manager.php:1451
1041
- #: ../classes/class-ccf-form-manager.php:1518
1042
- #: ../classes/class-ccf-form-manager.php:1585
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1043
  msgid "Enable Conditional Logic:"
1044
  msgstr ""
1045
 
1046
- #: ../classes/class-ccf-form-manager.php:587
1047
- #: ../classes/class-ccf-form-manager.php:657
1048
- #: ../classes/class-ccf-form-manager.php:717
1049
- #: ../classes/class-ccf-form-manager.php:785
1050
- #: ../classes/class-ccf-form-manager.php:830
1051
- #: ../classes/class-ccf-form-manager.php:879
1052
- #: ../classes/class-ccf-form-manager.php:947
1053
- #: ../classes/class-ccf-form-manager.php:996
1054
- #: ../classes/class-ccf-form-manager.php:1056
1055
- #: ../classes/class-ccf-form-manager.php:1145
1056
- #: ../classes/class-ccf-form-manager.php:1220
1057
- #: ../classes/class-ccf-form-manager.php:1287
1058
- #: ../classes/class-ccf-form-manager.php:1366
1059
- #: ../classes/class-ccf-form-manager.php:1459
1060
- #: ../classes/class-ccf-form-manager.php:1526
1061
- #: ../classes/class-ccf-form-manager.php:1593
1062
  msgid "Hide"
1063
  msgstr ""
1064
 
1065
- #: ../classes/class-ccf-form-manager.php:588
1066
- #: ../classes/class-ccf-form-manager.php:658
1067
- #: ../classes/class-ccf-form-manager.php:718
1068
- #: ../classes/class-ccf-form-manager.php:786
1069
- #: ../classes/class-ccf-form-manager.php:831
1070
- #: ../classes/class-ccf-form-manager.php:880
1071
- #: ../classes/class-ccf-form-manager.php:948
1072
- #: ../classes/class-ccf-form-manager.php:997
1073
- #: ../classes/class-ccf-form-manager.php:1057
1074
- #: ../classes/class-ccf-form-manager.php:1146
1075
- #: ../classes/class-ccf-form-manager.php:1221
1076
- #: ../classes/class-ccf-form-manager.php:1288
1077
- #: ../classes/class-ccf-form-manager.php:1367
1078
- #: ../classes/class-ccf-form-manager.php:1460
1079
- #: ../classes/class-ccf-form-manager.php:1527
1080
- #: ../classes/class-ccf-form-manager.php:1594
1081
  msgid "Show"
1082
  msgstr ""
1083
 
1084
- #: ../classes/class-ccf-form-manager.php:591
1085
- #: ../classes/class-ccf-form-manager.php:661
1086
- #: ../classes/class-ccf-form-manager.php:721
1087
- #: ../classes/class-ccf-form-manager.php:789
1088
- #: ../classes/class-ccf-form-manager.php:834
1089
- #: ../classes/class-ccf-form-manager.php:883
1090
- #: ../classes/class-ccf-form-manager.php:951
1091
- #: ../classes/class-ccf-form-manager.php:1000
1092
- #: ../classes/class-ccf-form-manager.php:1060
1093
- #: ../classes/class-ccf-form-manager.php:1149
1094
- #: ../classes/class-ccf-form-manager.php:1224
1095
- #: ../classes/class-ccf-form-manager.php:1291
1096
- #: ../classes/class-ccf-form-manager.php:1370
1097
- #: ../classes/class-ccf-form-manager.php:1463
1098
- #: ../classes/class-ccf-form-manager.php:1530
1099
- #: ../classes/class-ccf-form-manager.php:1597
1100
  msgid "this field if"
1101
  msgstr ""
1102
 
1103
- #: ../classes/class-ccf-form-manager.php:594
1104
- #: ../classes/class-ccf-form-manager.php:664
1105
- #: ../classes/class-ccf-form-manager.php:724
1106
- #: ../classes/class-ccf-form-manager.php:792
1107
- #: ../classes/class-ccf-form-manager.php:837
1108
- #: ../classes/class-ccf-form-manager.php:886
1109
- #: ../classes/class-ccf-form-manager.php:954
1110
- #: ../classes/class-ccf-form-manager.php:1003
1111
- #: ../classes/class-ccf-form-manager.php:1063
1112
- #: ../classes/class-ccf-form-manager.php:1152
1113
- #: ../classes/class-ccf-form-manager.php:1227
1114
- #: ../classes/class-ccf-form-manager.php:1294
1115
- #: ../classes/class-ccf-form-manager.php:1373
1116
- #: ../classes/class-ccf-form-manager.php:1466
1117
- #: ../classes/class-ccf-form-manager.php:1533
1118
- #: ../classes/class-ccf-form-manager.php:1600
1119
  msgid "All"
1120
  msgstr ""
1121
 
1122
- #: ../classes/class-ccf-form-manager.php:595
1123
- #: ../classes/class-ccf-form-manager.php:665
1124
- #: ../classes/class-ccf-form-manager.php:725
1125
- #: ../classes/class-ccf-form-manager.php:793
1126
- #: ../classes/class-ccf-form-manager.php:838
1127
- #: ../classes/class-ccf-form-manager.php:887
1128
- #: ../classes/class-ccf-form-manager.php:955
1129
- #: ../classes/class-ccf-form-manager.php:1004
1130
- #: ../classes/class-ccf-form-manager.php:1064
1131
- #: ../classes/class-ccf-form-manager.php:1153
1132
- #: ../classes/class-ccf-form-manager.php:1228
1133
- #: ../classes/class-ccf-form-manager.php:1295
1134
- #: ../classes/class-ccf-form-manager.php:1374
1135
- #: ../classes/class-ccf-form-manager.php:1467
1136
- #: ../classes/class-ccf-form-manager.php:1534
1137
- #: ../classes/class-ccf-form-manager.php:1601
1138
  msgid "Any"
1139
  msgstr ""
1140
 
1141
- #: ../classes/class-ccf-form-manager.php:598
1142
- #: ../classes/class-ccf-form-manager.php:668
1143
- #: ../classes/class-ccf-form-manager.php:728
1144
- #: ../classes/class-ccf-form-manager.php:796
1145
- #: ../classes/class-ccf-form-manager.php:841
1146
- #: ../classes/class-ccf-form-manager.php:890
1147
- #: ../classes/class-ccf-form-manager.php:958
1148
- #: ../classes/class-ccf-form-manager.php:1007
1149
- #: ../classes/class-ccf-form-manager.php:1067
1150
- #: ../classes/class-ccf-form-manager.php:1156
1151
- #: ../classes/class-ccf-form-manager.php:1231
1152
- #: ../classes/class-ccf-form-manager.php:1298
1153
- #: ../classes/class-ccf-form-manager.php:1377
1154
- #: ../classes/class-ccf-form-manager.php:1470
1155
- #: ../classes/class-ccf-form-manager.php:1537
1156
- #: ../classes/class-ccf-form-manager.php:1604
1157
  msgid "of these conditions are true:"
1158
  msgstr ""
1159
 
1160
- #: ../classes/class-ccf-form-manager.php:623
1161
  msgid "Allowed File Extensions (comma separate):"
1162
  msgstr ""
1163
 
1164
- #: ../classes/class-ccf-form-manager.php:625
1165
  msgid ""
1166
  "If left blank, will default to all extensions registered by WordPress. If "
1167
  "you use a file extension or mime type not <a href=\"http://codex.wordpress."
@@ -1169,322 +1177,326 @@ msgid ""
1169
  "a>, you will need to filter and manually whitelist the new extension."
1170
  msgstr ""
1171
 
1172
- #: ../classes/class-ccf-form-manager.php:628
1173
  msgid "Max File Size (in MB):"
1174
  msgstr ""
1175
 
1176
- #: ../classes/class-ccf-form-manager.php:630
1177
  #, php-format
1178
  msgid ""
1179
  "If left blank, will default to %d MB. Maximum allowed by server is %d MB."
1180
  msgstr ""
1181
 
1182
- #: ../classes/class-ccf-form-manager.php:680
1183
  msgid ""
1184
  "reCAPTCHA is a simple captcha service provided by Google. <a target=\"_blank"
1185
  "\" href=\"https://www.google.com/recaptcha/intro/index.html\">Learn more</a>"
1186
  msgstr ""
1187
 
1188
- #: ../classes/class-ccf-form-manager.php:690
1189
  msgid "Site Key:"
1190
  msgstr ""
1191
 
1192
- #: ../classes/class-ccf-form-manager.php:692
1193
  #: ../classes/class-ccf-form-manager.php:697
 
1194
  msgid "Don't have one?"
1195
  msgstr ""
1196
 
1197
- #: ../classes/class-ccf-form-manager.php:695
1198
  msgid "Secret Key:"
1199
  msgstr ""
1200
 
1201
- #: ../classes/class-ccf-form-manager.php:806
1202
- #: ../classes/class-ccf-form-manager.php:851
1203
- #: ../classes/class-ccf-form-manager.php:900
1204
- #: ../classes/class-ccf-form-manager.php:968
1205
- #: ../classes/class-ccf-form-manager.php:1017
1206
- #: ../classes/class-ccf-form-manager.php:1077
1207
- #: ../classes/class-ccf-form-manager.php:1166
1208
- #: ../classes/class-ccf-form-manager.php:1241
1209
- #: ../classes/class-ccf-form-manager.php:1308
1210
- #: ../classes/class-ccf-form-manager.php:1413
1211
- #: ../classes/class-ccf-form-manager.php:1480
1212
- #: ../classes/class-ccf-form-manager.php:1547
1213
  msgid "Basic"
1214
  msgstr ""
1215
 
1216
- #: ../classes/class-ccf-form-manager.php:809
1217
  msgid "HTML Content:"
1218
  msgstr ""
1219
 
1220
- #: ../classes/class-ccf-form-manager.php:854
1221
  msgid "Heading:"
1222
  msgstr ""
1223
 
1224
- #: ../classes/class-ccf-form-manager.php:858
1225
  msgid "Sub Heading:"
1226
  msgstr ""
1227
 
1228
- #: ../classes/class-ccf-form-manager.php:971
1229
- #: ../classes/class-ccf-form-manager.php:1020
1230
- #: ../classes/class-ccf-form-manager.php:1080
1231
- #: ../classes/class-ccf-form-manager.php:1169
1232
- #: ../classes/class-ccf-form-manager.php:1244
1233
- #: ../classes/class-ccf-form-manager.php:1311
1234
- #: ../classes/class-ccf-form-manager.php:1416
1235
- #: ../classes/class-ccf-form-manager.php:1483
1236
- #: ../classes/class-ccf-form-manager.php:1550
1237
  msgid "Internal Unique Slug (a-z, 0-9, -, _):"
1238
  msgstr ""
1239
 
1240
- #: ../classes/class-ccf-form-manager.php:1106
1241
  msgid "Enable Date Select"
1242
  msgstr ""
1243
 
1244
- #: ../classes/class-ccf-form-manager.php:1110
1245
  msgid "Enable Time Select"
1246
  msgstr ""
1247
 
1248
- #: ../classes/class-ccf-form-manager.php:1114
1249
  msgid "Date Format:"
1250
  msgstr ""
1251
 
1252
- #: ../classes/class-ccf-form-manager.php:1185
1253
  msgid "Format:"
1254
  msgstr ""
1255
 
1256
- #: ../classes/class-ccf-form-manager.php:1188
1257
- #: ../classes/class-ccf-form-manager.php:1259
1258
  msgid "International"
1259
  msgstr ""
1260
 
1261
- #: ../classes/class-ccf-form-manager.php:1256
1262
  msgid "Type:"
1263
  msgstr ""
1264
 
1265
- #: ../classes/class-ccf-form-manager.php:1258
1266
  msgid "United States"
1267
  msgstr ""
1268
 
1269
- #: ../classes/class-ccf-form-manager.php:1336
1270
  msgid "Require Confirmation:"
1271
  msgstr ""
1272
 
1273
- #: ../classes/class-ccf-form-manager.php:1388
1274
  msgid "Label"
1275
  msgstr ""
1276
 
1277
- #: ../classes/class-ccf-form-manager.php:1389
1278
  msgid "Value"
1279
  msgstr ""
1280
 
1281
- #: ../classes/class-ccf-form-manager.php:1402
1282
  msgid "is"
1283
  msgstr ""
1284
 
1285
- #: ../classes/class-ccf-form-manager.php:1403
1286
  msgid "is not"
1287
  msgstr ""
1288
 
1289
- #: ../classes/class-ccf-form-manager.php:1404
1290
  msgid ">"
1291
  msgstr ""
1292
 
1293
- #: ../classes/class-ccf-form-manager.php:1405
1294
  msgid "<"
1295
  msgstr ""
1296
 
1297
- #: ../classes/class-ccf-form-manager.php:1406
1298
  msgid "contains"
1299
  msgstr ""
1300
 
1301
- #: ../classes/class-ccf-form-manager.php:1408
1302
  msgid "Field value"
1303
  msgstr ""
1304
 
1305
- #: ../classes/class-ccf-form-manager.php:1435
1306
- #: ../classes/class-ccf-form-manager.php:1502
1307
- #: ../classes/class-ccf-form-manager.php:1569
1308
  msgid "Manage field choices:"
1309
  msgstr ""
1310
 
1311
- #: ../classes/class-ccf-form-manager.php:1439
1312
- #: ../classes/class-ccf-form-manager.php:1506
1313
- #: ../classes/class-ccf-form-manager.php:1573
1314
  msgid ""
1315
  "Note: If an option does not have a \"value\", it will not be considered a "
1316
  "valid selection if the field is required. The \"value\" is what's read, "
1317
  "stored, and displayed in the submission."
1318
  msgstr ""
1319
 
1320
- #: ../classes/class-ccf-form-manager.php:1614
1321
  msgid "You currently have no forms. Add some!"
1322
  msgstr ""
1323
 
1324
- #: ../classes/class-ccf-form-manager.php:1637
1325
  msgid "Allowed file extensions are {{ extensions }}. "
1326
  msgstr ""
1327
 
1328
- #: ../classes/class-ccf-form-manager.php:1639
1329
  msgid "Max file size is {{ file_size }} MB. "
1330
  msgstr ""
1331
 
1332
- #: ../classes/class-ccf-form-manager.php:1664
1333
- #: ../classes/class-ccf-form-manager.php:1680
1334
- #: ../classes/class-ccf-form-manager.php:1698
1335
  msgid "An example choice"
1336
  msgstr ""
1337
 
1338
- #: ../classes/class-ccf-form-manager.php:1717
1339
  msgid "Arbitrary block of HTML."
1340
  msgstr ""
1341
 
1342
- #: ../classes/class-ccf-form-manager.php:1724
1343
  msgid "Section Heading"
1344
  msgstr ""
1345
 
1346
- #: ../classes/class-ccf-form-manager.php:1726
1347
  msgid "This is the sub-heading text."
1348
  msgstr ""
1349
 
1350
- #: ../classes/class-ccf-form-manager.php:1897
 
 
 
 
1351
  msgid "Trash"
1352
  msgstr ""
1353
 
1354
- #: ../classes/class-ccf-form-manager.php:1940
1355
  msgid "There is a problem with this form. Is it trashed or deleted?"
1356
  msgstr ""
1357
 
1358
- #: ../classes/class-ccf-form-manager.php:2087
1359
  msgid "IP Address"
1360
  msgstr ""
1361
 
1362
- #: ../classes/class-ccf-form-manager.php:2099
1363
  msgid "There are no submissions."
1364
  msgstr ""
1365
 
1366
- #: ../classes/class-ccf-form-manager.php:2128
1367
  msgid "Add Form"
1368
  msgstr ""
1369
 
1370
- #: ../classes/class-ccf-form-manager.php:2151
1371
  msgid "Single Line Text"
1372
  msgstr ""
1373
 
1374
- #: ../classes/class-ccf-form-manager.php:2152
1375
  msgid "Dropdown"
1376
  msgstr ""
1377
 
1378
- #: ../classes/class-ccf-form-manager.php:2153
1379
  msgid "Checkboxes"
1380
  msgstr ""
1381
 
1382
- #: ../classes/class-ccf-form-manager.php:2154
1383
  msgid "Radio Buttons"
1384
  msgstr ""
1385
 
1386
- #: ../classes/class-ccf-form-manager.php:2155
1387
  msgid "Paragraph Text"
1388
  msgstr ""
1389
 
1390
- #: ../classes/class-ccf-form-manager.php:2156
1391
  msgid "Hidden"
1392
  msgstr ""
1393
 
1394
- #: ../classes/class-ccf-form-manager.php:2157
1395
  msgid "File Upload"
1396
  msgstr ""
1397
 
1398
- #: ../classes/class-ccf-form-manager.php:2161
1399
  msgid "HTML"
1400
  msgstr ""
1401
 
1402
- #: ../classes/class-ccf-form-manager.php:2162
1403
  msgid "Section"
1404
  msgstr ""
1405
 
1406
- #: ../classes/class-ccf-form-manager.php:2167
1407
  msgid "Name"
1408
  msgstr ""
1409
 
1410
- #: ../classes/class-ccf-form-manager.php:2168
1411
  msgid "Date/Time"
1412
  msgstr ""
1413
 
1414
- #: ../classes/class-ccf-form-manager.php:2169
1415
  msgid "Website"
1416
  msgstr ""
1417
 
1418
- #: ../classes/class-ccf-form-manager.php:2170
1419
  msgid "Address"
1420
  msgstr ""
1421
 
1422
- #: ../classes/class-ccf-form-manager.php:2171
1423
  msgid "Phone"
1424
  msgstr ""
1425
 
1426
- #: ../classes/class-ccf-form-manager.php:2172
1427
  msgid "reCAPTCHA"
1428
  msgstr ""
1429
 
1430
- #: ../classes/class-ccf-form-manager.php:2205
1431
  msgid "You have no email fields"
1432
  msgstr ""
1433
 
1434
- #: ../classes/class-ccf-form-manager.php:2206
1435
  msgid "No available fields"
1436
  msgstr ""
1437
 
1438
- #: ../classes/class-ccf-form-manager.php:2207
1439
  msgid "You have no name fields"
1440
  msgstr ""
1441
 
1442
- #: ../classes/class-ccf-form-manager.php:2208
1443
  msgid "You have no applicable fields"
1444
  msgstr ""
1445
 
1446
- #: ../classes/class-ccf-form-manager.php:2209
1447
  msgid "Choose a Form Field"
1448
  msgstr ""
1449
 
1450
- #: ../classes/class-ccf-form-manager.php:2210
1451
  msgid "Invalid date"
1452
  msgstr ""
1453
 
1454
- #: ../classes/class-ccf-form-manager.php:2212
1455
  msgid "Field Label"
1456
  msgstr ""
1457
 
1458
- #: ../classes/class-ccf-form-manager.php:2214
1459
  #: ../classes/class-ccf-form-renderer.php:174
1460
  msgid "This form is paused right now. Check back later!"
1461
  msgstr ""
1462
 
1463
- #: ../classes/class-ccf-form-manager.php:2216
1464
  msgid "Choose a Post Field"
1465
  msgstr ""
1466
 
1467
- #: ../classes/class-ccf-form-manager.php:2219
1468
  msgid "Post Title"
1469
  msgstr ""
1470
 
1471
- #: ../classes/class-ccf-form-manager.php:2220
1472
  msgid "Post Content"
1473
  msgstr ""
1474
 
1475
- #: ../classes/class-ccf-form-manager.php:2221
1476
  msgid "Post Excerpt"
1477
  msgstr ""
1478
 
1479
- #: ../classes/class-ccf-form-manager.php:2222
1480
  msgid "Post Date"
1481
  msgstr ""
1482
 
1483
- #: ../classes/class-ccf-form-manager.php:2225
1484
  msgid "Post Tags"
1485
  msgstr ""
1486
 
1487
- #: ../classes/class-ccf-form-manager.php:2226
1488
  msgid "Custom Field"
1489
  msgstr ""
1490
 
5
  "Project-Id-Version: Custom Contact Forms\n"
6
  "Report-Msgid-Bugs-To: https://github.com/tlovett1/custom-contact-forms/"
7
  "issues\n"
8
+ "POT-Creation-Date: 2016-02-18 00:29-0500\n"
9
+ "PO-Revision-Date: 2016-02-18 00:29-0500\n"
10
  "Last-Translator: Taylor Lovett <tlovett88@gmail.com>\n"
11
  "Language-Team: \n"
12
  "Language: en\n"
23
  "X-Textdomain-Support: yes\n"
24
  "X-Poedit-SearchPath-0: ..\n"
25
 
26
+ #: ../classes/class-ccf-api-form-controller.php:657
27
  msgid "Form not found"
28
  msgstr ""
29
 
30
+ #: ../classes/class-ccf-api-form-controller.php:683
31
  msgid "Could not create form"
32
  msgstr ""
33
 
34
+ #: ../classes/class-ccf-api-form-controller.php:713
35
  msgid "Could not update form"
36
  msgstr ""
37
 
38
+ #: ../classes/class-ccf-api-form-controller.php:741
39
  msgid "Could not delete form"
40
  msgstr ""
41
 
42
+ #: ../classes/class-ccf-api-form-controller.php:770
43
  msgid "Could not delete submission"
44
  msgstr ""
45
 
59
  msgid "<a href=\"%s\">Forms and Submissions</a>"
60
  msgstr ""
61
 
62
+ #: ../classes/class-ccf-export.php:58 ../classes/class-ccf-form-cpt.php:574
63
  msgid "Forms and Submissions"
64
  msgstr ""
65
 
82
  msgstr ""
83
 
84
  #: ../classes/class-ccf-field-renderer.php:575
85
+ #: ../classes/class-ccf-form-manager.php:1802
86
+ #: ../classes/class-ccf-form-manager.php:1827
87
  msgid "Street Address"
88
  msgstr ""
89
 
90
  #: ../classes/class-ccf-field-renderer.php:579
91
+ #: ../classes/class-ccf-form-manager.php:1806
92
+ #: ../classes/class-ccf-form-manager.php:1831
93
  msgid "Address Line 2"
94
  msgstr ""
95
 
96
  #: ../classes/class-ccf-field-renderer.php:586
97
+ #: ../classes/class-ccf-form-manager.php:1810
98
+ #: ../classes/class-ccf-form-manager.php:1835
99
  msgid "City"
100
  msgstr ""
101
 
102
  #: ../classes/class-ccf-field-renderer.php:599
103
+ #: ../classes/class-ccf-form-manager.php:1818
104
  msgid "State"
105
  msgstr ""
106
 
107
  #: ../classes/class-ccf-field-renderer.php:607
108
+ #: ../classes/class-ccf-form-manager.php:1822
109
  msgid "ZIP Code"
110
  msgstr ""
111
 
112
  #: ../classes/class-ccf-field-renderer.php:617
113
+ #: ../classes/class-ccf-form-manager.php:1839
114
  msgid "State / Region / Province"
115
  msgstr ""
116
 
117
  #: ../classes/class-ccf-field-renderer.php:625
118
+ #: ../classes/class-ccf-form-manager.php:1843
119
  msgid "ZIP / Postal Code"
120
  msgstr ""
121
 
122
  #: ../classes/class-ccf-field-renderer.php:637
123
+ #: ../classes/class-ccf-form-manager.php:1851
124
  msgid "Country"
125
  msgstr ""
126
 
127
  #: ../classes/class-ccf-field-renderer.php:815
128
+ #: ../classes/class-ccf-form-manager.php:1862
129
  msgid "email@example.com"
130
  msgstr ""
131
 
132
  #: ../classes/class-ccf-field-renderer.php:827
133
  #: ../classes/class-ccf-form-manager.php:327
134
+ #: ../classes/class-ccf-form-manager.php:1866
135
+ #: ../classes/class-ccf-form-manager.php:2172
136
  msgid "Email"
137
  msgstr ""
138
 
139
  #: ../classes/class-ccf-field-renderer.php:834
140
+ #: ../classes/class-ccf-form-manager.php:1870
141
  msgid "Confirm Email"
142
  msgstr ""
143
 
144
  #: ../classes/class-ccf-field-renderer.php:900
145
+ #: ../classes/class-ccf-form-manager.php:1738
146
  msgid "First"
147
  msgstr ""
148
 
149
  #: ../classes/class-ccf-field-renderer.php:907
150
+ #: ../classes/class-ccf-form-manager.php:1742
151
  msgid "Last"
152
  msgstr ""
153
 
154
  #: ../classes/class-ccf-field-renderer.php:981
155
  #: ../classes/class-ccf-field-renderer.php:1002
156
+ #: ../classes/class-ccf-form-manager.php:1757
157
+ #: ../classes/class-ccf-form-manager.php:1778
158
  msgid "HH"
159
  msgstr ""
160
 
161
  #: ../classes/class-ccf-field-renderer.php:985
162
  #: ../classes/class-ccf-field-renderer.php:1006
163
+ #: ../classes/class-ccf-form-manager.php:1761
164
+ #: ../classes/class-ccf-form-manager.php:1782
165
  msgid "MM"
166
  msgstr ""
167
 
168
  #: ../classes/class-ccf-field-renderer.php:989
169
  #: ../classes/class-ccf-field-renderer.php:1010
170
+ #: ../classes/class-ccf-form-manager.php:1765
171
+ #: ../classes/class-ccf-form-manager.php:1786
172
  msgid "AM"
173
  msgstr ""
174
 
175
  #: ../classes/class-ccf-field-renderer.php:990
176
  #: ../classes/class-ccf-field-renderer.php:1011
177
+ #: ../classes/class-ccf-form-manager.php:1766
178
+ #: ../classes/class-ccf-form-manager.php:1787
179
  msgid "PM"
180
  msgstr ""
181
 
182
  #: ../classes/class-ccf-field-renderer.php:997
183
+ #: ../classes/class-ccf-form-cpt.php:509
184
+ #: ../classes/class-ccf-form-manager.php:513
185
+ #: ../classes/class-ccf-form-manager.php:526
186
+ #: ../classes/class-ccf-form-manager.php:1773
187
+ #: ../classes/class-ccf-form-manager.php:1957
188
+ #: ../classes/class-ccf-form-manager.php:1971
189
+ #: ../classes/class-ccf-form-manager.php:2114
190
  msgid "Date"
191
  msgstr ""
192
 
195
  msgstr ""
196
 
197
  #: ../classes/class-ccf-form-cpt.php:324 ../classes/class-ccf-form-cpt.php:342
198
+ #: ../classes/class-ccf-form-cpt.php:507
199
+ #: ../classes/class-ccf-form-manager.php:516
200
+ #: ../classes/class-ccf-form-manager.php:529
201
  msgid "Submissions"
202
  msgstr ""
203
 
233
  msgid "Move to Trash"
234
  msgstr ""
235
 
236
+ #: ../classes/class-ccf-form-cpt.php:412
237
+ msgid "Duplicate"
238
+ msgstr ""
239
+
240
+ #: ../classes/class-ccf-form-cpt.php:416
241
  msgid "Export"
242
  msgstr ""
243
 
244
+ #: ../classes/class-ccf-form-cpt.php:445
245
+ #: ../classes/class-ccf-form-manager.php:1898
246
  msgid "(No title)"
247
  msgstr ""
248
 
249
+ #: ../classes/class-ccf-form-cpt.php:450
250
  msgid "Manage Form"
251
  msgstr ""
252
 
253
+ #: ../classes/class-ccf-form-cpt.php:505
254
  msgid "Form Title"
255
  msgstr ""
256
 
257
+ #: ../classes/class-ccf-form-cpt.php:506
258
+ #: ../classes/class-ccf-form-manager.php:514
259
+ #: ../classes/class-ccf-form-manager.php:527
260
  msgid "Author"
261
  msgstr ""
262
 
263
+ #: ../classes/class-ccf-form-cpt.php:508
264
+ #: ../classes/class-ccf-form-manager.php:515
265
+ #: ../classes/class-ccf-form-manager.php:528
266
  msgid "Number of Fields"
267
  msgstr ""
268
 
269
+ #: ../classes/class-ccf-form-cpt.php:542
270
  msgid "Unpublished"
271
  msgstr ""
272
 
273
+ #: ../classes/class-ccf-form-cpt.php:544
274
  msgid "Y/m/d g:i:s A"
275
  msgstr ""
276
 
277
+ #: ../classes/class-ccf-form-cpt.php:551
278
  #, php-format
279
  msgid "%s ago"
280
  msgstr ""
281
 
282
+ #: ../classes/class-ccf-form-cpt.php:552
283
  msgid "Y/m/d"
284
  msgstr ""
285
 
286
+ #: ../classes/class-ccf-form-cpt.php:568 ../classes/class-ccf-form-cpt.php:580
287
  msgid "Forms"
288
  msgstr ""
289
 
290
+ #: ../classes/class-ccf-form-cpt.php:569
291
  msgid "Form"
292
  msgstr ""
293
 
294
+ #: ../classes/class-ccf-form-cpt.php:570 ../classes/class-ccf-form-cpt.php:573
295
  #: ../classes/class-ccf-form-manager.php:88
296
  msgid "New Form"
297
  msgstr ""
298
 
299
+ #: ../classes/class-ccf-form-cpt.php:571
300
  msgid "Add New Form"
301
  msgstr ""
302
 
303
+ #: ../classes/class-ccf-form-cpt.php:572
304
  msgid "Edit Form"
305
  msgstr ""
306
 
307
+ #: ../classes/class-ccf-form-cpt.php:575
308
  msgid "View Form"
309
  msgstr ""
310
 
311
+ #: ../classes/class-ccf-form-cpt.php:576
312
  msgid "Search Forms"
313
  msgstr ""
314
 
315
+ #: ../classes/class-ccf-form-cpt.php:577
316
  msgid "No forms found."
317
  msgstr ""
318
 
319
+ #: ../classes/class-ccf-form-cpt.php:578
320
  msgid "No forms found in trash."
321
  msgstr ""
322
 
532
  msgstr ""
533
 
534
  #: ../classes/class-ccf-form-manager.php:152
535
+ #: ../classes/class-ccf-form-manager.php:1901
536
  msgid "Insert into post"
537
  msgstr ""
538
 
553
  msgstr ""
554
 
555
  #: ../classes/class-ccf-form-manager.php:172
556
+ #: ../classes/class-ccf-form-manager.php:1900
557
  msgid "Edit"
558
  msgstr ""
559
 
562
  msgstr ""
563
 
564
  #: ../classes/class-ccf-form-manager.php:179
565
+ #: ../classes/class-ccf-form-manager.php:2219
566
  msgid "Form Submission"
567
  msgstr ""
568
 
610
  msgstr ""
611
 
612
  #: ../classes/class-ccf-form-manager.php:244
613
+ #: ../classes/class-ccf-form-manager.php:391
614
+ #: ../classes/class-ccf-form-manager.php:439
615
+ #: ../classes/class-ccf-form-manager.php:567
616
+ #: ../classes/class-ccf-form-manager.php:586
617
+ #: ../classes/class-ccf-form-manager.php:641
618
+ #: ../classes/class-ccf-form-manager.php:656
619
+ #: ../classes/class-ccf-form-manager.php:716
620
+ #: ../classes/class-ccf-form-manager.php:765
621
+ #: ../classes/class-ccf-form-manager.php:784
622
+ #: ../classes/class-ccf-form-manager.php:829
623
+ #: ../classes/class-ccf-form-manager.php:878
624
+ #: ../classes/class-ccf-form-manager.php:927
625
+ #: ../classes/class-ccf-form-manager.php:946
626
+ #: ../classes/class-ccf-form-manager.php:995
627
+ #: ../classes/class-ccf-form-manager.php:1040
628
+ #: ../classes/class-ccf-form-manager.php:1055
629
+ #: ../classes/class-ccf-form-manager.php:1106
630
+ #: ../classes/class-ccf-form-manager.php:1144
631
+ #: ../classes/class-ccf-form-manager.php:1200
632
+ #: ../classes/class-ccf-form-manager.php:1219
633
+ #: ../classes/class-ccf-form-manager.php:1271
634
+ #: ../classes/class-ccf-form-manager.php:1286
635
+ #: ../classes/class-ccf-form-manager.php:1337
636
+ #: ../classes/class-ccf-form-manager.php:1344
637
+ #: ../classes/class-ccf-form-manager.php:1365
638
+ #: ../classes/class-ccf-form-manager.php:1436
639
+ #: ../classes/class-ccf-form-manager.php:1458
640
+ #: ../classes/class-ccf-form-manager.php:1503
641
+ #: ../classes/class-ccf-form-manager.php:1525
642
+ #: ../classes/class-ccf-form-manager.php:1570
643
+ #: ../classes/class-ccf-form-manager.php:1592
644
  #: ../classes/class-ccf-settings.php:103
645
  msgid "No"
646
  msgstr ""
647
 
648
  #: ../classes/class-ccf-form-manager.php:245
649
+ #: ../classes/class-ccf-form-manager.php:392
650
+ #: ../classes/class-ccf-form-manager.php:440
651
+ #: ../classes/class-ccf-form-manager.php:566
652
+ #: ../classes/class-ccf-form-manager.php:587
653
+ #: ../classes/class-ccf-form-manager.php:640
654
+ #: ../classes/class-ccf-form-manager.php:657
655
+ #: ../classes/class-ccf-form-manager.php:717
656
+ #: ../classes/class-ccf-form-manager.php:764
657
+ #: ../classes/class-ccf-form-manager.php:785
658
+ #: ../classes/class-ccf-form-manager.php:830
659
+ #: ../classes/class-ccf-form-manager.php:879
660
+ #: ../classes/class-ccf-form-manager.php:926
661
+ #: ../classes/class-ccf-form-manager.php:947
662
+ #: ../classes/class-ccf-form-manager.php:996
663
+ #: ../classes/class-ccf-form-manager.php:1039
664
+ #: ../classes/class-ccf-form-manager.php:1056
665
+ #: ../classes/class-ccf-form-manager.php:1105
666
+ #: ../classes/class-ccf-form-manager.php:1145
667
+ #: ../classes/class-ccf-form-manager.php:1199
668
+ #: ../classes/class-ccf-form-manager.php:1220
669
+ #: ../classes/class-ccf-form-manager.php:1270
670
+ #: ../classes/class-ccf-form-manager.php:1287
671
+ #: ../classes/class-ccf-form-manager.php:1336
672
+ #: ../classes/class-ccf-form-manager.php:1343
673
+ #: ../classes/class-ccf-form-manager.php:1366
674
+ #: ../classes/class-ccf-form-manager.php:1435
675
+ #: ../classes/class-ccf-form-manager.php:1459
676
+ #: ../classes/class-ccf-form-manager.php:1502
677
+ #: ../classes/class-ccf-form-manager.php:1526
678
+ #: ../classes/class-ccf-form-manager.php:1569
679
+ #: ../classes/class-ccf-form-manager.php:1593
680
  #: ../classes/class-ccf-settings.php:104
681
  msgid "Yes"
682
  msgstr ""
784
  msgstr ""
785
 
786
  #: ../classes/class-ccf-form-manager.php:355
787
+ msgid "Button Class:"
788
+ msgstr ""
789
+
790
+ #: ../classes/class-ccf-form-manager.php:360
791
  msgid "Form Theme:"
792
  msgstr ""
793
 
794
+ #: ../classes/class-ccf-form-manager.php:363
795
  msgid "None"
796
  msgstr ""
797
 
798
+ #: ../classes/class-ccf-form-manager.php:364
799
  msgid "Light"
800
  msgstr ""
801
 
802
+ #: ../classes/class-ccf-form-manager.php:365
803
  msgid "Dark"
804
  msgstr ""
805
 
806
+ #: ../classes/class-ccf-form-manager.php:368
807
  msgid "\"None\" will have your form inherit styles from your theme."
808
  msgstr ""
809
 
810
+ #: ../classes/class-ccf-form-manager.php:372
811
  msgid "On form completion:"
812
  msgstr ""
813
 
814
+ #: ../classes/class-ccf-form-manager.php:375
815
  msgid "Show text"
816
  msgstr ""
817
 
818
+ #: ../classes/class-ccf-form-manager.php:376
819
  msgid "Redirect"
820
  msgstr ""
821
 
822
+ #: ../classes/class-ccf-form-manager.php:380
823
  msgid "Redirect URL:"
824
  msgstr ""
825
 
826
+ #: ../classes/class-ccf-form-manager.php:384
827
  msgid "Completion Message:"
828
  msgstr ""
829
 
830
+ #: ../classes/class-ccf-form-manager.php:388
831
  msgid "Pause form:"
832
  msgstr ""
833
 
834
+ #: ../classes/class-ccf-form-manager.php:396
835
  msgid "Pause Message:"
836
  msgstr ""
837
 
838
+ #: ../classes/class-ccf-form-manager.php:400
839
  msgid "Email Notifications"
840
  msgstr ""
841
 
842
+ #: ../classes/class-ccf-form-manager.php:406
843
+ #: ../classes/class-ccf-form-manager.php:417
844
+ #: ../classes/class-ccf-form-manager.php:512
845
+ #: ../classes/class-ccf-form-manager.php:525
846
  msgid "Title"
847
  msgstr ""
848
 
849
+ #: ../classes/class-ccf-form-manager.php:407
850
+ #: ../classes/class-ccf-form-manager.php:418
851
  msgid "Subject"
852
  msgstr ""
853
 
854
+ #: ../classes/class-ccf-form-manager.php:408
855
+ #: ../classes/class-ccf-form-manager.php:419
856
  msgid "To"
857
  msgstr ""
858
 
859
+ #: ../classes/class-ccf-form-manager.php:409
860
+ #: ../classes/class-ccf-form-manager.php:420
861
  msgid "Active"
862
  msgstr ""
863
 
864
+ #: ../classes/class-ccf-form-manager.php:425
865
  msgid "New Notification"
866
  msgstr ""
867
 
868
+ #: ../classes/class-ccf-form-manager.php:428
869
  msgid ""
870
  "For notification changes to take affect (updating, adding, deleting, etc.), "
871
  "you will need to save the form."
872
  msgstr ""
873
 
874
+ #: ../classes/class-ccf-form-manager.php:432
875
  msgid "Post Creation"
876
  msgstr ""
877
 
878
+ #: ../classes/class-ccf-form-manager.php:433
879
  msgid ""
880
  "You can have Custom Contact Forms create a post (or custom post type) "
881
  "whenever someone submits your form."
882
  msgstr ""
883
 
884
+ #: ../classes/class-ccf-form-manager.php:436
885
  msgid "Enable Post Creation:"
886
  msgstr ""
887
 
888
+ #: ../classes/class-ccf-form-manager.php:445
889
  msgid "Post Type:"
890
  msgstr ""
891
 
892
+ #: ../classes/class-ccf-form-manager.php:455
893
  msgid "Post Status:"
894
  msgstr ""
895
 
896
+ #: ../classes/class-ccf-form-manager.php:465
897
  msgid "Field Mappings:"
898
  msgstr ""
899
 
900
+ #: ../classes/class-ccf-form-manager.php:470
901
  msgid ""
902
  "You can map as few or as many fields as you like. However, if no form fields "
903
  "are mapped, no post will be created. Mapping a field to post_title is "
904
  "required."
905
  msgstr ""
906
 
907
+ #: ../classes/class-ccf-form-manager.php:482
908
  msgid "Custom Field Key"
909
  msgstr ""
910
 
911
+ #: ../classes/class-ccf-form-manager.php:496
912
  msgid "items"
913
  msgstr ""
914
 
915
+ #: ../classes/class-ccf-form-manager.php:511
916
+ #: ../classes/class-ccf-form-manager.php:524
917
  msgid "ID"
918
  msgstr ""
919
 
920
+ #: ../classes/class-ccf-form-manager.php:539
921
  msgid "<span>&larr;</span> Click on a field to edit it."
922
  msgstr ""
923
 
924
+ #: ../classes/class-ccf-form-manager.php:548
925
+ #: ../classes/class-ccf-form-manager.php:616
926
+ #: ../classes/class-ccf-form-manager.php:746
927
+ #: ../classes/class-ccf-form-manager.php:908
928
  msgid "Internal Unique Slug"
929
  msgstr ""
930
 
931
+ #: ../classes/class-ccf-form-manager.php:552
932
+ #: ../classes/class-ccf-form-manager.php:620
933
+ #: ../classes/class-ccf-form-manager.php:687
934
+ #: ../classes/class-ccf-form-manager.php:750
935
+ #: ../classes/class-ccf-form-manager.php:912
936
+ #: ../classes/class-ccf-form-manager.php:1029
937
+ #: ../classes/class-ccf-form-manager.php:1089
938
+ #: ../classes/class-ccf-form-manager.php:1178
939
+ #: ../classes/class-ccf-form-manager.php:1253
940
+ #: ../classes/class-ccf-form-manager.php:1320
941
+ #: ../classes/class-ccf-form-manager.php:1425
942
+ #: ../classes/class-ccf-form-manager.php:1492
943
+ #: ../classes/class-ccf-form-manager.php:1559
944
  msgid "Label:"
945
  msgstr ""
946
 
947
+ #: ../classes/class-ccf-form-manager.php:556
948
+ #: ../classes/class-ccf-form-manager.php:624
949
+ #: ../classes/class-ccf-form-manager.php:691
950
+ #: ../classes/class-ccf-form-manager.php:754
951
+ #: ../classes/class-ccf-form-manager.php:916
952
+ #: ../classes/class-ccf-form-manager.php:1033
 
 
 
 
 
 
 
 
 
 
 
 
 
 
953
  #: ../classes/class-ccf-form-manager.php:1093
954
+ #: ../classes/class-ccf-form-manager.php:1182
955
+ #: ../classes/class-ccf-form-manager.php:1257
956
  #: ../classes/class-ccf-form-manager.php:1324
957
+ #: ../classes/class-ccf-form-manager.php:1429
958
+ #: ../classes/class-ccf-form-manager.php:1496
959
+ #: ../classes/class-ccf-form-manager.php:1563
960
+ msgid "Description:"
961
  msgstr ""
962
 
963
+ #: ../classes/class-ccf-form-manager.php:560
964
+ #: ../classes/class-ccf-form-manager.php:758
965
+ #: ../classes/class-ccf-form-manager.php:920
966
+ #: ../classes/class-ccf-form-manager.php:980
 
967
  #: ../classes/class-ccf-form-manager.php:1098
968
+ #: ../classes/class-ccf-form-manager.php:1186
 
969
  #: ../classes/class-ccf-form-manager.php:1329
970
+ msgid "Initial Value:"
 
 
 
971
  msgstr ""
972
 
973
+ #: ../classes/class-ccf-form-manager.php:564
974
+ #: ../classes/class-ccf-form-manager.php:638
975
+ #: ../classes/class-ccf-form-manager.php:762
976
+ #: ../classes/class-ccf-form-manager.php:924
977
+ #: ../classes/class-ccf-form-manager.php:1037
978
+ #: ../classes/class-ccf-form-manager.php:1103
979
+ #: ../classes/class-ccf-form-manager.php:1197
980
+ #: ../classes/class-ccf-form-manager.php:1268
981
+ #: ../classes/class-ccf-form-manager.php:1334
982
+ #: ../classes/class-ccf-form-manager.php:1433
983
+ #: ../classes/class-ccf-form-manager.php:1500
984
+ #: ../classes/class-ccf-form-manager.php:1567
985
+ msgid "Required:"
 
 
 
 
986
  msgstr ""
987
 
988
+ #: ../classes/class-ccf-form-manager.php:573
989
+ #: ../classes/class-ccf-form-manager.php:647
990
+ #: ../classes/class-ccf-form-manager.php:707
991
+ #: ../classes/class-ccf-form-manager.php:771
992
+ #: ../classes/class-ccf-form-manager.php:820
993
+ #: ../classes/class-ccf-form-manager.php:869
994
+ #: ../classes/class-ccf-form-manager.php:933
995
+ #: ../classes/class-ccf-form-manager.php:986
996
+ #: ../classes/class-ccf-form-manager.php:1046
997
+ #: ../classes/class-ccf-form-manager.php:1129
998
+ #: ../classes/class-ccf-form-manager.php:1206
999
+ #: ../classes/class-ccf-form-manager.php:1277
1000
+ #: ../classes/class-ccf-form-manager.php:1350
1001
+ #: ../classes/class-ccf-form-manager.php:1449
1002
+ #: ../classes/class-ccf-form-manager.php:1516
1003
+ #: ../classes/class-ccf-form-manager.php:1583
1004
+ msgid "Advanced"
1005
  msgstr ""
1006
 
1007
+ #: ../classes/class-ccf-form-manager.php:576
1008
+ #: ../classes/class-ccf-form-manager.php:650
1009
+ #: ../classes/class-ccf-form-manager.php:710
1010
+ #: ../classes/class-ccf-form-manager.php:774
1011
+ #: ../classes/class-ccf-form-manager.php:823
1012
+ #: ../classes/class-ccf-form-manager.php:872
1013
+ #: ../classes/class-ccf-form-manager.php:936
1014
+ #: ../classes/class-ccf-form-manager.php:989
1015
+ #: ../classes/class-ccf-form-manager.php:1049
1016
  #: ../classes/class-ccf-form-manager.php:1132
1017
+ #: ../classes/class-ccf-form-manager.php:1209
1018
+ #: ../classes/class-ccf-form-manager.php:1280
1019
  #: ../classes/class-ccf-form-manager.php:1353
1020
+ #: ../classes/class-ccf-form-manager.php:1452
1021
+ #: ../classes/class-ccf-form-manager.php:1519
1022
+ #: ../classes/class-ccf-form-manager.php:1586
1023
+ msgid "Class Name:"
1024
  msgstr ""
1025
 
1026
+ #: ../classes/class-ccf-form-manager.php:580
1027
+ #: ../classes/class-ccf-form-manager.php:778
1028
+ #: ../classes/class-ccf-form-manager.php:940
 
 
 
 
 
 
1029
  #: ../classes/class-ccf-form-manager.php:1137
1030
+ #: ../classes/class-ccf-form-manager.php:1213
 
1031
  #: ../classes/class-ccf-form-manager.php:1358
1032
+ msgid "Placeholder Text:"
1033
+ msgstr ""
1034
+
1035
+ #: ../classes/class-ccf-form-manager.php:584
1036
+ #: ../classes/class-ccf-form-manager.php:654
1037
+ #: ../classes/class-ccf-form-manager.php:714
1038
+ #: ../classes/class-ccf-form-manager.php:782
1039
+ #: ../classes/class-ccf-form-manager.php:827
1040
+ #: ../classes/class-ccf-form-manager.php:876
1041
+ #: ../classes/class-ccf-form-manager.php:944
1042
+ #: ../classes/class-ccf-form-manager.php:993
1043
+ #: ../classes/class-ccf-form-manager.php:1053
1044
+ #: ../classes/class-ccf-form-manager.php:1142
1045
+ #: ../classes/class-ccf-form-manager.php:1217
1046
+ #: ../classes/class-ccf-form-manager.php:1284
1047
+ #: ../classes/class-ccf-form-manager.php:1363
1048
+ #: ../classes/class-ccf-form-manager.php:1456
1049
+ #: ../classes/class-ccf-form-manager.php:1523
1050
+ #: ../classes/class-ccf-form-manager.php:1590
1051
  msgid "Enable Conditional Logic:"
1052
  msgstr ""
1053
 
1054
+ #: ../classes/class-ccf-form-manager.php:592
1055
+ #: ../classes/class-ccf-form-manager.php:662
1056
+ #: ../classes/class-ccf-form-manager.php:722
1057
+ #: ../classes/class-ccf-form-manager.php:790
1058
+ #: ../classes/class-ccf-form-manager.php:835
1059
+ #: ../classes/class-ccf-form-manager.php:884
1060
+ #: ../classes/class-ccf-form-manager.php:952
1061
+ #: ../classes/class-ccf-form-manager.php:1001
1062
+ #: ../classes/class-ccf-form-manager.php:1061
1063
+ #: ../classes/class-ccf-form-manager.php:1150
1064
+ #: ../classes/class-ccf-form-manager.php:1225
1065
+ #: ../classes/class-ccf-form-manager.php:1292
1066
+ #: ../classes/class-ccf-form-manager.php:1371
1067
+ #: ../classes/class-ccf-form-manager.php:1464
1068
+ #: ../classes/class-ccf-form-manager.php:1531
1069
+ #: ../classes/class-ccf-form-manager.php:1598
1070
  msgid "Hide"
1071
  msgstr ""
1072
 
1073
+ #: ../classes/class-ccf-form-manager.php:593
1074
+ #: ../classes/class-ccf-form-manager.php:663
1075
+ #: ../classes/class-ccf-form-manager.php:723
1076
+ #: ../classes/class-ccf-form-manager.php:791
1077
+ #: ../classes/class-ccf-form-manager.php:836
1078
+ #: ../classes/class-ccf-form-manager.php:885
1079
+ #: ../classes/class-ccf-form-manager.php:953
1080
+ #: ../classes/class-ccf-form-manager.php:1002
1081
+ #: ../classes/class-ccf-form-manager.php:1062
1082
+ #: ../classes/class-ccf-form-manager.php:1151
1083
+ #: ../classes/class-ccf-form-manager.php:1226
1084
+ #: ../classes/class-ccf-form-manager.php:1293
1085
+ #: ../classes/class-ccf-form-manager.php:1372
1086
+ #: ../classes/class-ccf-form-manager.php:1465
1087
+ #: ../classes/class-ccf-form-manager.php:1532
1088
+ #: ../classes/class-ccf-form-manager.php:1599
1089
  msgid "Show"
1090
  msgstr ""
1091
 
1092
+ #: ../classes/class-ccf-form-manager.php:596
1093
+ #: ../classes/class-ccf-form-manager.php:666
1094
+ #: ../classes/class-ccf-form-manager.php:726
1095
+ #: ../classes/class-ccf-form-manager.php:794
1096
+ #: ../classes/class-ccf-form-manager.php:839
1097
+ #: ../classes/class-ccf-form-manager.php:888
1098
+ #: ../classes/class-ccf-form-manager.php:956
1099
+ #: ../classes/class-ccf-form-manager.php:1005
1100
+ #: ../classes/class-ccf-form-manager.php:1065
1101
+ #: ../classes/class-ccf-form-manager.php:1154
1102
+ #: ../classes/class-ccf-form-manager.php:1229
1103
+ #: ../classes/class-ccf-form-manager.php:1296
1104
+ #: ../classes/class-ccf-form-manager.php:1375
1105
+ #: ../classes/class-ccf-form-manager.php:1468
1106
+ #: ../classes/class-ccf-form-manager.php:1535
1107
+ #: ../classes/class-ccf-form-manager.php:1602
1108
  msgid "this field if"
1109
  msgstr ""
1110
 
1111
+ #: ../classes/class-ccf-form-manager.php:599
1112
+ #: ../classes/class-ccf-form-manager.php:669
1113
+ #: ../classes/class-ccf-form-manager.php:729
1114
+ #: ../classes/class-ccf-form-manager.php:797
1115
+ #: ../classes/class-ccf-form-manager.php:842
1116
+ #: ../classes/class-ccf-form-manager.php:891
1117
+ #: ../classes/class-ccf-form-manager.php:959
1118
+ #: ../classes/class-ccf-form-manager.php:1008
1119
+ #: ../classes/class-ccf-form-manager.php:1068
1120
+ #: ../classes/class-ccf-form-manager.php:1157
1121
+ #: ../classes/class-ccf-form-manager.php:1232
1122
+ #: ../classes/class-ccf-form-manager.php:1299
1123
+ #: ../classes/class-ccf-form-manager.php:1378
1124
+ #: ../classes/class-ccf-form-manager.php:1471
1125
+ #: ../classes/class-ccf-form-manager.php:1538
1126
+ #: ../classes/class-ccf-form-manager.php:1605
1127
  msgid "All"
1128
  msgstr ""
1129
 
1130
+ #: ../classes/class-ccf-form-manager.php:600
1131
+ #: ../classes/class-ccf-form-manager.php:670
1132
+ #: ../classes/class-ccf-form-manager.php:730
1133
+ #: ../classes/class-ccf-form-manager.php:798
1134
+ #: ../classes/class-ccf-form-manager.php:843
1135
+ #: ../classes/class-ccf-form-manager.php:892
1136
+ #: ../classes/class-ccf-form-manager.php:960
1137
+ #: ../classes/class-ccf-form-manager.php:1009
1138
+ #: ../classes/class-ccf-form-manager.php:1069
1139
+ #: ../classes/class-ccf-form-manager.php:1158
1140
+ #: ../classes/class-ccf-form-manager.php:1233
1141
+ #: ../classes/class-ccf-form-manager.php:1300
1142
+ #: ../classes/class-ccf-form-manager.php:1379
1143
+ #: ../classes/class-ccf-form-manager.php:1472
1144
+ #: ../classes/class-ccf-form-manager.php:1539
1145
+ #: ../classes/class-ccf-form-manager.php:1606
1146
  msgid "Any"
1147
  msgstr ""
1148
 
1149
+ #: ../classes/class-ccf-form-manager.php:603
1150
+ #: ../classes/class-ccf-form-manager.php:673
1151
+ #: ../classes/class-ccf-form-manager.php:733
1152
+ #: ../classes/class-ccf-form-manager.php:801
1153
+ #: ../classes/class-ccf-form-manager.php:846
1154
+ #: ../classes/class-ccf-form-manager.php:895
1155
+ #: ../classes/class-ccf-form-manager.php:963
1156
+ #: ../classes/class-ccf-form-manager.php:1012
1157
+ #: ../classes/class-ccf-form-manager.php:1072
1158
+ #: ../classes/class-ccf-form-manager.php:1161
1159
+ #: ../classes/class-ccf-form-manager.php:1236
1160
+ #: ../classes/class-ccf-form-manager.php:1303
1161
+ #: ../classes/class-ccf-form-manager.php:1382
1162
+ #: ../classes/class-ccf-form-manager.php:1475
1163
+ #: ../classes/class-ccf-form-manager.php:1542
1164
+ #: ../classes/class-ccf-form-manager.php:1609
1165
  msgid "of these conditions are true:"
1166
  msgstr ""
1167
 
1168
+ #: ../classes/class-ccf-form-manager.php:628
1169
  msgid "Allowed File Extensions (comma separate):"
1170
  msgstr ""
1171
 
1172
+ #: ../classes/class-ccf-form-manager.php:630
1173
  msgid ""
1174
  "If left blank, will default to all extensions registered by WordPress. If "
1175
  "you use a file extension or mime type not <a href=\"http://codex.wordpress."
1177
  "a>, you will need to filter and manually whitelist the new extension."
1178
  msgstr ""
1179
 
1180
+ #: ../classes/class-ccf-form-manager.php:633
1181
  msgid "Max File Size (in MB):"
1182
  msgstr ""
1183
 
1184
+ #: ../classes/class-ccf-form-manager.php:635
1185
  #, php-format
1186
  msgid ""
1187
  "If left blank, will default to %d MB. Maximum allowed by server is %d MB."
1188
  msgstr ""
1189
 
1190
+ #: ../classes/class-ccf-form-manager.php:685
1191
  msgid ""
1192
  "reCAPTCHA is a simple captcha service provided by Google. <a target=\"_blank"
1193
  "\" href=\"https://www.google.com/recaptcha/intro/index.html\">Learn more</a>"
1194
  msgstr ""
1195
 
1196
+ #: ../classes/class-ccf-form-manager.php:695
1197
  msgid "Site Key:"
1198
  msgstr ""
1199
 
 
1200
  #: ../classes/class-ccf-form-manager.php:697
1201
+ #: ../classes/class-ccf-form-manager.php:702
1202
  msgid "Don't have one?"
1203
  msgstr ""
1204
 
1205
+ #: ../classes/class-ccf-form-manager.php:700
1206
  msgid "Secret Key:"
1207
  msgstr ""
1208
 
1209
+ #: ../classes/class-ccf-form-manager.php:811
1210
+ #: ../classes/class-ccf-form-manager.php:856
1211
+ #: ../classes/class-ccf-form-manager.php:905
1212
+ #: ../classes/class-ccf-form-manager.php:973
1213
+ #: ../classes/class-ccf-form-manager.php:1022
1214
+ #: ../classes/class-ccf-form-manager.php:1082
1215
+ #: ../classes/class-ccf-form-manager.php:1171
1216
+ #: ../classes/class-ccf-form-manager.php:1246
1217
+ #: ../classes/class-ccf-form-manager.php:1313
1218
+ #: ../classes/class-ccf-form-manager.php:1418
1219
+ #: ../classes/class-ccf-form-manager.php:1485
1220
+ #: ../classes/class-ccf-form-manager.php:1552
1221
  msgid "Basic"
1222
  msgstr ""
1223
 
1224
+ #: ../classes/class-ccf-form-manager.php:814
1225
  msgid "HTML Content:"
1226
  msgstr ""
1227
 
1228
+ #: ../classes/class-ccf-form-manager.php:859
1229
  msgid "Heading:"
1230
  msgstr ""
1231
 
1232
+ #: ../classes/class-ccf-form-manager.php:863
1233
  msgid "Sub Heading:"
1234
  msgstr ""
1235
 
1236
+ #: ../classes/class-ccf-form-manager.php:976
1237
+ #: ../classes/class-ccf-form-manager.php:1025
1238
+ #: ../classes/class-ccf-form-manager.php:1085
1239
+ #: ../classes/class-ccf-form-manager.php:1174
1240
+ #: ../classes/class-ccf-form-manager.php:1249
1241
+ #: ../classes/class-ccf-form-manager.php:1316
1242
+ #: ../classes/class-ccf-form-manager.php:1421
1243
+ #: ../classes/class-ccf-form-manager.php:1488
1244
+ #: ../classes/class-ccf-form-manager.php:1555
1245
  msgid "Internal Unique Slug (a-z, 0-9, -, _):"
1246
  msgstr ""
1247
 
1248
+ #: ../classes/class-ccf-form-manager.php:1111
1249
  msgid "Enable Date Select"
1250
  msgstr ""
1251
 
1252
+ #: ../classes/class-ccf-form-manager.php:1115
1253
  msgid "Enable Time Select"
1254
  msgstr ""
1255
 
1256
+ #: ../classes/class-ccf-form-manager.php:1119
1257
  msgid "Date Format:"
1258
  msgstr ""
1259
 
1260
+ #: ../classes/class-ccf-form-manager.php:1190
1261
  msgid "Format:"
1262
  msgstr ""
1263
 
1264
+ #: ../classes/class-ccf-form-manager.php:1193
1265
+ #: ../classes/class-ccf-form-manager.php:1264
1266
  msgid "International"
1267
  msgstr ""
1268
 
1269
+ #: ../classes/class-ccf-form-manager.php:1261
1270
  msgid "Type:"
1271
  msgstr ""
1272
 
1273
+ #: ../classes/class-ccf-form-manager.php:1263
1274
  msgid "United States"
1275
  msgstr ""
1276
 
1277
+ #: ../classes/class-ccf-form-manager.php:1341
1278
  msgid "Require Confirmation:"
1279
  msgstr ""
1280
 
1281
+ #: ../classes/class-ccf-form-manager.php:1393
1282
  msgid "Label"
1283
  msgstr ""
1284
 
1285
+ #: ../classes/class-ccf-form-manager.php:1394
1286
  msgid "Value"
1287
  msgstr ""
1288
 
1289
+ #: ../classes/class-ccf-form-manager.php:1407
1290
  msgid "is"
1291
  msgstr ""
1292
 
1293
+ #: ../classes/class-ccf-form-manager.php:1408
1294
  msgid "is not"
1295
  msgstr ""
1296
 
1297
+ #: ../classes/class-ccf-form-manager.php:1409
1298
  msgid ">"
1299
  msgstr ""
1300
 
1301
+ #: ../classes/class-ccf-form-manager.php:1410
1302
  msgid "<"
1303
  msgstr ""
1304
 
1305
+ #: ../classes/class-ccf-form-manager.php:1411
1306
  msgid "contains"
1307
  msgstr ""
1308
 
1309
+ #: ../classes/class-ccf-form-manager.php:1413
1310
  msgid "Field value"
1311
  msgstr ""
1312
 
1313
+ #: ../classes/class-ccf-form-manager.php:1440
1314
+ #: ../classes/class-ccf-form-manager.php:1507
1315
+ #: ../classes/class-ccf-form-manager.php:1574
1316
  msgid "Manage field choices:"
1317
  msgstr ""
1318
 
1319
+ #: ../classes/class-ccf-form-manager.php:1444
1320
+ #: ../classes/class-ccf-form-manager.php:1511
1321
+ #: ../classes/class-ccf-form-manager.php:1578
1322
  msgid ""
1323
  "Note: If an option does not have a \"value\", it will not be considered a "
1324
  "valid selection if the field is required. The \"value\" is what's read, "
1325
  "stored, and displayed in the submission."
1326
  msgstr ""
1327
 
1328
+ #: ../classes/class-ccf-form-manager.php:1619
1329
  msgid "You currently have no forms. Add some!"
1330
  msgstr ""
1331
 
1332
+ #: ../classes/class-ccf-form-manager.php:1642
1333
  msgid "Allowed file extensions are {{ extensions }}. "
1334
  msgstr ""
1335
 
1336
+ #: ../classes/class-ccf-form-manager.php:1644
1337
  msgid "Max file size is {{ file_size }} MB. "
1338
  msgstr ""
1339
 
1340
+ #: ../classes/class-ccf-form-manager.php:1669
1341
+ #: ../classes/class-ccf-form-manager.php:1685
1342
+ #: ../classes/class-ccf-form-manager.php:1703
1343
  msgid "An example choice"
1344
  msgstr ""
1345
 
1346
+ #: ../classes/class-ccf-form-manager.php:1722
1347
  msgid "Arbitrary block of HTML."
1348
  msgstr ""
1349
 
1350
+ #: ../classes/class-ccf-form-manager.php:1729
1351
  msgid "Section Heading"
1352
  msgstr ""
1353
 
1354
+ #: ../classes/class-ccf-form-manager.php:1731
1355
  msgid "This is the sub-heading text."
1356
  msgstr ""
1357
 
1358
+ #: ../classes/class-ccf-form-manager.php:1902
1359
+ msgid "Duplicate form"
1360
+ msgstr ""
1361
+
1362
+ #: ../classes/class-ccf-form-manager.php:1903
1363
  msgid "Trash"
1364
  msgstr ""
1365
 
1366
+ #: ../classes/class-ccf-form-manager.php:1946
1367
  msgid "There is a problem with this form. Is it trashed or deleted?"
1368
  msgstr ""
1369
 
1370
+ #: ../classes/class-ccf-form-manager.php:2093
1371
  msgid "IP Address"
1372
  msgstr ""
1373
 
1374
+ #: ../classes/class-ccf-form-manager.php:2105
1375
  msgid "There are no submissions."
1376
  msgstr ""
1377
 
1378
+ #: ../classes/class-ccf-form-manager.php:2134
1379
  msgid "Add Form"
1380
  msgstr ""
1381
 
1382
+ #: ../classes/class-ccf-form-manager.php:2157
1383
  msgid "Single Line Text"
1384
  msgstr ""
1385
 
1386
+ #: ../classes/class-ccf-form-manager.php:2158
1387
  msgid "Dropdown"
1388
  msgstr ""
1389
 
1390
+ #: ../classes/class-ccf-form-manager.php:2159
1391
  msgid "Checkboxes"
1392
  msgstr ""
1393
 
1394
+ #: ../classes/class-ccf-form-manager.php:2160
1395
  msgid "Radio Buttons"
1396
  msgstr ""
1397
 
1398
+ #: ../classes/class-ccf-form-manager.php:2161
1399
  msgid "Paragraph Text"
1400
  msgstr ""
1401
 
1402
+ #: ../classes/class-ccf-form-manager.php:2162
1403
  msgid "Hidden"
1404
  msgstr ""
1405
 
1406
+ #: ../classes/class-ccf-form-manager.php:2163
1407
  msgid "File Upload"
1408
  msgstr ""
1409
 
1410
+ #: ../classes/class-ccf-form-manager.php:2167
1411
  msgid "HTML"
1412
  msgstr ""
1413
 
1414
+ #: ../classes/class-ccf-form-manager.php:2168
1415
  msgid "Section"
1416
  msgstr ""
1417
 
1418
+ #: ../classes/class-ccf-form-manager.php:2173
1419
  msgid "Name"
1420
  msgstr ""
1421
 
1422
+ #: ../classes/class-ccf-form-manager.php:2174
1423
  msgid "Date/Time"
1424
  msgstr ""
1425
 
1426
+ #: ../classes/class-ccf-form-manager.php:2175
1427
  msgid "Website"
1428
  msgstr ""
1429
 
1430
+ #: ../classes/class-ccf-form-manager.php:2176
1431
  msgid "Address"
1432
  msgstr ""
1433
 
1434
+ #: ../classes/class-ccf-form-manager.php:2177
1435
  msgid "Phone"
1436
  msgstr ""
1437
 
1438
+ #: ../classes/class-ccf-form-manager.php:2178
1439
  msgid "reCAPTCHA"
1440
  msgstr ""
1441
 
1442
+ #: ../classes/class-ccf-form-manager.php:2211
1443
  msgid "You have no email fields"
1444
  msgstr ""
1445
 
1446
+ #: ../classes/class-ccf-form-manager.php:2212
1447
  msgid "No available fields"
1448
  msgstr ""
1449
 
1450
+ #: ../classes/class-ccf-form-manager.php:2213
1451
  msgid "You have no name fields"
1452
  msgstr ""
1453
 
1454
+ #: ../classes/class-ccf-form-manager.php:2214
1455
  msgid "You have no applicable fields"
1456
  msgstr ""
1457
 
1458
+ #: ../classes/class-ccf-form-manager.php:2215
1459
  msgid "Choose a Form Field"
1460
  msgstr ""
1461
 
1462
+ #: ../classes/class-ccf-form-manager.php:2216
1463
  msgid "Invalid date"
1464
  msgstr ""
1465
 
1466
+ #: ../classes/class-ccf-form-manager.php:2218
1467
  msgid "Field Label"
1468
  msgstr ""
1469
 
1470
+ #: ../classes/class-ccf-form-manager.php:2220
1471
  #: ../classes/class-ccf-form-renderer.php:174
1472
  msgid "This form is paused right now. Check back later!"
1473
  msgstr ""
1474
 
1475
+ #: ../classes/class-ccf-form-manager.php:2222
1476
  msgid "Choose a Post Field"
1477
  msgstr ""
1478
 
1479
+ #: ../classes/class-ccf-form-manager.php:2225
1480
  msgid "Post Title"
1481
  msgstr ""
1482
 
1483
+ #: ../classes/class-ccf-form-manager.php:2226
1484
  msgid "Post Content"
1485
  msgstr ""
1486
 
1487
+ #: ../classes/class-ccf-form-manager.php:2227
1488
  msgid "Post Excerpt"
1489
  msgstr ""
1490
 
1491
+ #: ../classes/class-ccf-form-manager.php:2228
1492
  msgid "Post Date"
1493
  msgstr ""
1494
 
1495
+ #: ../classes/class-ccf-form-manager.php:2231
1496
  msgid "Post Tags"
1497
  msgstr ""
1498
 
1499
+ #: ../classes/class-ccf-form-manager.php:2232
1500
  msgid "Custom Field"
1501
  msgstr ""
1502
 
readme.txt CHANGED
@@ -26,6 +26,7 @@ Custom Contact Forms enables you to build forms and manage submissions the WordP
26
  * Pre-setup for Twitter Bootstrap
27
  * Multiple themes to choose from
28
  * No custom database tables
 
29
  * Forms can show customizable completion text or redirect to a URL.
30
  * Temporarily pause forms with a customizable pause message.
31
  * Create and manage multiple notifications for each form. Notifications can send emails to one or more administrators or form submittors. Customize notification email subject, from email address, from email name, and email body. Map form fields to email subject, from name, and from email address. Easily activate and deactivate notifications.
@@ -57,6 +58,10 @@ For full documentation, questions, feature requests, and support concerning the
57
 
58
  == Changelog ==
59
 
 
 
 
 
60
  = 7.5 =
61
  * Conditional fields and sections
62
  * [current_date_time] notification variable
26
  * Pre-setup for Twitter Bootstrap
27
  * Multiple themes to choose from
28
  * No custom database tables
29
+ * Easy form duplication
30
  * Forms can show customizable completion text or redirect to a URL.
31
  * Temporarily pause forms with a customizable pause message.
32
  * Create and manage multiple notifications for each form. Notifications can send emails to one or more administrators or form submittors. Customize notification email subject, from email address, from email name, and email body. Map form fields to email subject, from name, and from email address. Easily activate and deactivate notifications.
58
 
59
  == Changelog ==
60
 
61
+ = 7.6 =
62
+ * Form duplication
63
+ * Fix multiple section header bug
64
+
65
  = 7.5 =
66
  * Conditional fields and sections
67
  * [current_date_time] notification variable