Gravity PDF - Version 4.2.2

Version Description

  • Bug: Fix empty Master Sassword regression introduced in 4.2 (GH#664)
  • Bug: Fix Javascript errors when plugin translation files used (GH#667)
  • Bug: Fix PDF Conditional Logic saving problem when using 'Less than' (GH#668)
  • Bug: Fix PHP Notices when using custom font (GH#669)
  • Bug: Merge Mpdf upstream patches (includes Chrome Viewer Yellow hover fix)
Download this release

Release Info

Developer Blue Liquid Designs
Plugin Icon 128x128 Gravity PDF
Version 4.2.2
Comparing to
See all releases

Code changes from version 4.2.1 to 4.2.2

README.txt CHANGED
@@ -5,7 +5,7 @@ Donate link: https://gravitypdf.com/donate-to-plugin/
5
  Tags: gravity, forms, pdf, automation, attachment, email
6
  Requires at least: 4.4
7
  Tested up to: 4.8
8
- Stable tag: 4.2.1
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl.txt
11
 
@@ -85,6 +85,13 @@ Also, if you enjoy using the software [we'd love it if you could give us a revie
85
 
86
  == Changelog ==
87
 
 
 
 
 
 
 
 
88
  = 4.2.1 =
89
  * Bug: Fix fatal DateTimeZone error for older versions of PHP (GH#654)
90
 
5
  Tags: gravity, forms, pdf, automation, attachment, email
6
  Requires at least: 4.4
7
  Tested up to: 4.8
8
+ Stable tag: 4.2.2
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl.txt
11
 
85
 
86
  == Changelog ==
87
 
88
+ = 4.2.2 =
89
+ * Bug: Fix empty Master Sassword regression introduced in 4.2 (GH#664)
90
+ * Bug: Fix Javascript errors when plugin translation files used (GH#667)
91
+ * Bug: Fix PDF Conditional Logic saving problem when using 'Less than' (GH#668)
92
+ * Bug: Fix PHP Notices when using custom font (GH#669)
93
+ * Bug: Merge Mpdf upstream patches (includes Chrome Viewer Yellow hover fix)
94
+
95
  = 4.2.1 =
96
  * Bug: Fix fatal DateTimeZone error for older versions of PHP (GH#654)
97
 
dist/assets/js/gfpdf-backbone.min.js CHANGED
@@ -1 +1 @@
1
- !function(e){e(function(){function u(){this.init=function(){this.is_settings()&&this.processSettings()},this.is_settings=function(){return e("#tab_PDF").length},this.processSettings=function(){switch(e(".nav-tab-wrapper a.nav-tab-active:first").text()){case"Tools":this.tools_settings();break;case"Help":this.help_settings()}},this.help_settings=function(){new n.ContainerView},this.tools_settings=function(){var e=JSON.parse(GFPDF.customFontData),u=new i.Collection.Core(e),t=new i.View.Container({collection:u});new i.View.Add({collection:u,container:t})}}var t={evaluate:/\{\{(.+?)\}\}/gim,interpolate:/\{\{=(.+?)\}\}/gim,escape:/\{\{-(.+?)\}\}/gim},i={Model:{},Collection:{},View:{},Misc:{}};i.Model.Core=Backbone.Model.extend({defaults:{font_name:"",regular:"",bold:"",italics:"",bolditalics:"",disabled:!1},url:GFPDF.ajaxUrl,save:function(u,t){var i={emulateHTTP:!0,emulateJSON:!0,data:{action:"gfpdf_font_save",nonce:u.nonce,payload:this.toJSON()}};return e.extend(i,t),Backbone.sync("update",this,i)},destroy:function(u,t){var i={emulateHTTP:!0,emulateJSON:!0,data:{action:"gfpdf_font_delete",nonce:u.nonce,id:this.get("id")}};return e.extend(i,t),Backbone.sync("update",this,i)},validate:function(e,u){var t=new RegExp("^[A-Za-z0-9 ]+$");if(e.font_name.length>0){if(!t.test(e.font_name))return"invalid_characters";this.trigger("valid_name")}if(!1===this.validateFonts(e))return"invalid_font";this.trigger("validation_passed",this)},validateFonts:function(u){var t=!0,i={regular:u.regular,bold:u.bold,italics:u.italics,bolditalics:u.bolditalics};return e.each(i,e.proxy(function(e,u){u.length>0&&!1===this.isValidFile(u)?(t=!1,this.trigger("invalid_font",this,!0,e)):this.trigger("valid_font",this,!1,e)},this)),t},isValidFile:function(e){if(e.length<5)return!1;if(".ttf"===e.substr(e.length-4).toLowerCase()&&new RegExp(/^[a-z](?:[-a-z0-9\+\.])*:(?:\/\/(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\._~!\$&'\(\)\*\+,;=:\xA0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[\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uD900-\uD93E\uD940-\uD97E\uD980-\uD9BE\uD9C0-\uD9FE\uDA00-\uDA3E\uDA40-\uDA7E\uDA80-\uDABE\uDAC0-\uDAFE\uDB00-\uDB3E\uDB44-\uDB7E][\uDC00-\uDFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F][\uDC00-\uDFFD])))(?:\?(?:%[0-9a-f][0-9a-f]|[-a-z0-9\._~!\$&'\(\)\*\+,;=:@\/\?\xA0-\uD7FF\uE000-\uFDCF\uFDF0-\uFFEF]|[\uD800-\uD83E\uD840-\uD87E\uD880-\uD8BE\uD8C0-\uD8FE\uD900-\uD93E\uD940-\uD97E\uD980-\uD9BE\uD9C0-\uD9FE\uDA00-\uDA3E\uDA40-\uDA7E\uDA80-\uDABE\uDAC0-\uDAFE\uDB00-\uDB3E\uDB44-\uDB7E\uDB80-\uDBBE\uDBC0-\uDBFE][\uDC00-\uDFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDC00-\uDFFD])*)?(?:\#(?:%[0-9a-f][0-9a-f]|[-a-z0-9\._~!\$&'\(\)\*\+,;=:@\/\?\xA0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[\uD800-\uD83E\uD840-\uD87E\uD880-\uD8BE\uD8C0-\uD8FE\uD900-\uD93E\uD940-\uD97E\uD980-\uD9BE\uD9C0-\uD9FE\uDA00-\uDA3E\uDA40-\uDA7E\uDA80-\uDABE\uDAC0-\uDAFE\uDB00-\uDB3E\uDB44-\uDB7E][\uDC00-\uDFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F][\uDC00-\uDFFD])*)?$/gim).test(e))return!0;return!1},cssDeclaration:function(e,u,t,i){return'font-family: "'+u+'", '+i.getShortname(u)+", sans-serif;"},getShortname:function(e){return e=e.toLowerCase(),e=e.replace(" ","")}}),i.Collection.Core=Backbone.Collection.extend({model:i.Model.Core}),i.View.Container=Backbone.View.extend({el:"#font-list",tagName:"ul",initialize:function(e){this.listenTo(this.collection,"add",this.addRender),this.listenTo(this.collection,"remove",this.render),this.render()},render:function(){return this.collection.length>0?(this.$el.empty(),this.collection.each(function(e){this.addRender(e)},this)):this.$el.html(_.template(e("#GravityPDFFontsEmpty").html(),null,t)),this},addRender:function(e){1===this.collection.length&&this.$el.empty();var u=new i.View.Item({model:e,collection:this.collection});return this.$el.append(u.render().el),this}}),i.View.Item=Backbone.View.extend({template:"#GravityPDFFonts",tagName:"li",events:{"click .font-name":"toggleView","click .delete-font":"deleteModel","submit form":"formSubmission"},initialize:function(){this.modelBinder=new Backbone.ModelBinder,this.listenTo(this.model,"invalid valid_name",this.nameError),this.listenTo(this.model,"invalid_font valid_font",this.fontError),this.listenTo(this.model,"invalid",this.disableSubmitButton),this.listenTo(this.model,"validation_passed",this.enableSubmitButton)},render:function(){return this.template=_.template(e(this.template).html(),null,t),this.$el.html(this.template({model:this.model})),this.modelBinder.bind(this.model,this.el,{font_name:[{selector:"[name=font_name]"},{selector:"[name=usage]",converter:this.model.cssDeclaration}],regular:"[name=regular]",bold:"[name=bold]",italics:"[name=italics]",bolditalics:"[name=bolditalics]"},{changeTriggers:{"":"change",".font-name-field":"keyup"},modelSetOptions:{validate:!0}}),this},toggleView:function(u){u.preventDefault(),e(u.currentTarget).next().toggle()},nameError:function(e,u){u&&"invalid_characters"==u?this.$el.find('input[name="font_name"]').css("border-color","red"):this.$el.find('input[name="font_name"]').removeAttr("style")},fontError:function(u,t,i){$input=this.$el.find('input[name="'+i+'"]'),t?($error=e('<span class="gf_settings_description"><label>Only TTF font files are supported.</label></span>'),$input.hasClass("invalid")||$input.addClass("invalid").next().after($error.clone())):$input.hasClass("invalid")&&$input.removeClass("invalid").next().next().remove()},disableSubmitButton:function(e){this.$el.find(".font-submit button").prop("disabled",!0),e.set("disabled",!0)},enableSubmitButton:function(e){this.$el.find(".font-submit button").prop("disabled",!1),e.set("disabled",!1)},formSubmission:function(u){u.preventDefault();e(u.currentTarget);u.currentTarget.checkValidity()&&!1===this.model.get("disabled")&&(this.addSpinner(),this.removeMessage(),console.log(this.model),this.model.save({nonce:this.$el.find("input[name=wpnonce]").val()},{success:e.proxy(function(e,u,t){this.removeSpinner(),this.displayMessage(GFPDF.updateSuccess),this.model.set(e)},this),error:e.proxy(function(e,u,t){this.removeSpinner(),e.responseJSON.error&&this.displayMessage(e.responseJSON.error,!0)},this)}))},deleteModel:function(u){u.preventDefault();var t=e("#delete-confirm"),n=[{text:GFPDF.delete,click:e.proxy(function(){t.wpdialog("destroy"),this.model.get("id")?(this.addSpinner(),this.removeMessage(),this.$el.hide(),this.model.destroy({nonce:this.$el.find("input[name=wpnonce]").val()},{success:e.proxy(function(e,u,t){this.removeSpinner(),this.displayMessage(GFPDF.deleteSuccess),this.collection.remove(this.model)},this),error:e.proxy(function(e,u,t){this.removeSpinner(),this.collection.remove(this.model),e.responseJSON.error&&this.displayMessage(e.responseJSON.error,!0)},this)})):this.collection.remove(this.model)},this)},{text:GFPDF.cancel,click:function(){t.wpdialog("destroy")}}];i.Misc.Dialog(t,n,300,175),t.wpdialog("open")},addSpinner:function(){var u=e('<img alt="Loading" src="'+GFPDF.spinnerUrl+'" class="gfpdf-spinner" style="margin-top: 4px;" />');this.$el.find(".font-submit button").after(u)},removeSpinner:function(){this.$el.find(".gfpdf-spinner").remove()},displayMessage:function(u,t){var i=e('<div class="updated notice">');!0===t&&i.addClass("error"),i.html("<p>"+u+"</p>"),this.$el.find("form").before(i)},removeMessage:function(){this.$el.find("div.notice").slideUp(function(){e(this).remove()})}}),i.View.Add=Backbone.View.extend({el:"#font-add-list",events:{click:"addFont"},initialize:function(e){this.container=e.container,this.render()},render:function(){this.$el.html('<i class="fa fa-plus fa-4x"></i><span>Add Font</span>')},addFont:function(e){var u=new i.Model.Core;this.collection.add(u),this.container.$el.find("li:last .font-settings").toggle().find('input[type="text"]:first').focus()}}),i.Misc.Dialog=function(u,t,i,n){u.wpdialog({autoOpen:!1,resizable:!1,draggable:!1,width:i,height:n,modal:!0,dialogClass:"wp-dialog",zIndex:3e5,buttons:t,open:function(){e(this).siblings(".ui-dialog-buttonpane").find("button:eq(1)").focus(),e(".ui-widget-overlay").bind("click",function(){u.wpdialog("close")})}})};var n={};n.SearchModel=Backbone.Model.extend({}),n.SearchCollection=Backbone.Collection.extend({model:n.SearchModel,initialize:function(e,u){this.url=u.url}}),n.ContainerView=Backbone.View.extend({el:"#search-knowledgebase",events:{"keyup #search-help-input":"doSearch","change #search-help-input":"doSearch"},initialize:function(){this.timer=!0,this.render()},render:function(){return this.addSearchBar(),this},addSearchBar:function(){var u=e("<input>").attr("type","text").attr("placeholder"," "+GFPDF.searchPlaceholder).attr("id","search-help-input");this.$el.prepend(u),u.tooltip({items:"input",content:"The search must be more than 3 characters.",tooltipClass:"ui-state-error"}).tooltip("disable"),u.focus()},doSearch:function(u){var t=e(u.currentTarget);window.clearTimeout(this.timer);var i=e.trim(t.val());t.data("currentValue");i.length>3&&t.data("previousValue")!==i?(t.tooltip("disable"),t.data("currentValue",i),this.timer=window.setTimeout(_.bind(function(){this.processSearch(i)},this),500)):i.length<=3&&13==u.keyCode&&t.tooltip("enable").tooltip("open")},processSearch:function(e){console.log("Searching our collection..."),new n.DocsView({s:e})}}),n.MainView=Backbone.View.extend({callAPI:function(e){this.collection.fetch({success:_.bind(this.renderSearch,this),error:_.bind(this.renderSearchError)})},renderSearch:function(e,u){console.log("Rendering Search Results"),this.hideSpinner();var t=this.$el.find(".inside ul");t.html(this.template({collection:this.collection.toJSON(),url:this.url}));var i=t.parent();i.is(":visible")||i.slideDown(500)},renderSearchError:function(e,u){console.log("Search Failed"),console.log(e),console.log(u)},showSpinner:function(){this.$el.find(".spinner").addClass("is-active"),this.$el.is(":visible")||this.$el.slideDown(500)},hideSpinner:function(){this.$el.find(".spinner").removeClass("is-active")}}),n.DocsView=n.MainView.extend({el:"#documentation-api",template:"#GravityPDFSearchResultsDocumentation",initialize:function(e){this.url="https://gravitypdf.com/wp-json/wp/v2/v4_docs/",this.s=e.s,this.render()},render:function(){this.template=_.template(e(this.template).html(),null,t),this.showSpinner();var u=encodeURIComponent(this.s),i=this.url+"?search="+u;return this.collection=new n.SearchCollection([],{url:i}),this.callAPI(i),this}}),(new u).init()})}(jQuery);
1
+ !function(e){e(function(){function u(){this.init=function(){this.is_settings()&&this.processSettings()},this.is_settings=function(){return e("#tab_PDF").length},this.processSettings=function(){switch(e(".nav-tab-wrapper a.nav-tab-active:first").data("id")){case"tools":this.tools_settings();break;case"help":this.help_settings()}},this.help_settings=function(){new n.ContainerView},this.tools_settings=function(){var e=JSON.parse(GFPDF.customFontData),u=new i.Collection.Core(e),t=new i.View.Container({collection:u});new i.View.Add({collection:u,container:t})}}var t={evaluate:/\{\{(.+?)\}\}/gim,interpolate:/\{\{=(.+?)\}\}/gim,escape:/\{\{-(.+?)\}\}/gim},i={Model:{},Collection:{},View:{},Misc:{}};i.Model.Core=Backbone.Model.extend({defaults:{font_name:"",regular:"",bold:"",italics:"",bolditalics:"",disabled:!1},url:GFPDF.ajaxUrl,save:function(u,t){var i={emulateHTTP:!0,emulateJSON:!0,data:{action:"gfpdf_font_save",nonce:u.nonce,payload:this.toJSON()}};return e.extend(i,t),Backbone.sync("update",this,i)},destroy:function(u,t){var i={emulateHTTP:!0,emulateJSON:!0,data:{action:"gfpdf_font_delete",nonce:u.nonce,id:this.get("id")}};return e.extend(i,t),Backbone.sync("update",this,i)},validate:function(e,u){var t=new RegExp("^[A-Za-z0-9 ]+$");if(e.font_name.length>0){if(!t.test(e.font_name))return"invalid_characters";this.trigger("valid_name")}if(!1===this.validateFonts(e))return"invalid_font";this.trigger("validation_passed",this)},validateFonts:function(u){var t=!0,i={regular:u.regular,bold:u.bold,italics:u.italics,bolditalics:u.bolditalics};return e.each(i,e.proxy(function(e,u){u.length>0&&!1===this.isValidFile(u)?(t=!1,this.trigger("invalid_font",this,!0,e)):this.trigger("valid_font",this,!1,e)},this)),t},isValidFile:function(e){if(e.length<5)return!1;if(".ttf"===e.substr(e.length-4).toLowerCase()&&new RegExp(/^[a-z](?:[-a-z0-9\+\.])*:(?:\/\/(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\._~!\$&'\(\)\*\+,;=:\xA0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[\uD800-\uD83E\uD840-\uD87E\uD880-\uD8BE\uD8C0-\uD8FE\uD900-\uD93E\uD940-\uD97E\uD980-\uD9BE\uD9C0-\uD9FE\uDA00-\uDA3E\uDA40-\uDA7E\uDA80-\uDABE\uDAC0-\uDAFE\uDB00-\uDB3E\uDB44-\uDB7E][\uDC00-\uDFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F][\uDC00-\uDFFD])*@)?(?:\[(?:(?:(?:[0-9a-f]{1,4}:){6}(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?:\.(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3})|::(?:[0-9a-f]{1,4}:){5}(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?:\.(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3})|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?:\.(?:[0-9]|[1-9][0-9]|1[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-f][0-9a-f]|[-a-z0-9\._~!\$&'\(\)\*\+,;=@\xA0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[\uD800-\uD83E\uD840-\uD87E\uD880-\uD8BE\uD8C0-\uD8FE\uD900-\uD93E\uD940-\uD97E\uD980-\uD9BE\uD9C0-\uD9FE\uDA00-\uDA3E\uDA40-\uDA7E\uDA80-\uDABE\uDAC0-\uDAFE\uDB00-\uDB3E\uDB44-\uDB7E][\uDC00-\uDFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F][\uDC00-\uDFFD])*)(?::[0-9]*)?(?:\/(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\._~!\$&'\(\)\*\+,;=:@\xA0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[\uD800-\uD83E\uD840-\uD87E\uD880-\uD8BE\uD8C0-\uD8FE\uD900-\uD93E\uD940-\uD97E\uD980-\uD9BE\uD9C0-\uD9FE\uDA00-\uDA3E\uDA40-\uDA7E\uDA80-\uDABE\uDAC0-\uDAFE\uDB00-\uDB3E\uDB44-\uDB7E][\uDC00-\uDFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F][\uDC00-\uDFFD]))*)*|\/(?:(?:(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\._~!\$&'\(\)\*\+,;=:@\xA0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[\uD800-\uD83E\uD840-\uD87E\uD880-\uD8BE\uD8C0-\uD8FE\uD900-\uD93E\uD940-\uD97E\uD980-\uD9BE\uD9C0-\uD9FE\uDA00-\uDA3E\uDA40-\uDA7E\uDA80-\uDABE\uDAC0-\uDAFE\uDB00-\uDB3E\uDB44-\uDB7E][\uDC00-\uDFFF]|[\uD83F\uD87F\uD8BF\uD8FF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83E\uD840-\uD87E\uD880-\uD8BE\uD8C0-\uD8FE\uD900-\uD93E\uD940-\uD97E\uD980-\uD9BE\uD9C0-\uD9FE\uDA00-\uDA3E\uDA40-\uDA7E\uDA80-\uDABE\uDAC0-\uDAFE\uDB00-\uDB3E\uDB44-\uDB7E][\uDC00-\uDFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F][\uDC00-\uDFFD])*)?$/gim).test(e))return!0;return!1},cssDeclaration:function(e,u,t,i){return'font-family: "'+u+'", '+i.getShortname(u)+", sans-serif;"},getShortname:function(e){return e=e.toLowerCase(),e=e.replace(" ","")}}),i.Collection.Core=Backbone.Collection.extend({model:i.Model.Core}),i.View.Container=Backbone.View.extend({el:"#font-list",tagName:"ul",initialize:function(e){this.listenTo(this.collection,"add",this.addRender),this.listenTo(this.collection,"remove",this.render),this.render()},render:function(){return this.collection.length>0?(this.$el.empty(),this.collection.each(function(e){this.addRender(e)},this)):this.$el.html(_.template(e("#GravityPDFFontsEmpty").html(),null,t)),this},addRender:function(e){1===this.collection.length&&this.$el.empty();var u=new i.View.Item({model:e,collection:this.collection});return this.$el.append(u.render().el),this}}),i.View.Item=Backbone.View.extend({template:"#GravityPDFFonts",tagName:"li",events:{"click .font-name":"toggleView","click .delete-font":"deleteModel","submit form":"formSubmission"},initialize:function(){this.modelBinder=new Backbone.ModelBinder,this.listenTo(this.model,"invalid valid_name",this.nameError),this.listenTo(this.model,"invalid_font valid_font",this.fontError),this.listenTo(this.model,"invalid",this.disableSubmitButton),this.listenTo(this.model,"validation_passed",this.enableSubmitButton)},render:function(){return this.template=_.template(e(this.template).html(),null,t),this.$el.html(this.template({model:this.model})),this.modelBinder.bind(this.model,this.el,{font_name:[{selector:"[name=font_name]"},{selector:"[name=usage]",converter:this.model.cssDeclaration}],regular:"[name=regular]",bold:"[name=bold]",italics:"[name=italics]",bolditalics:"[name=bolditalics]"},{changeTriggers:{"":"change",".font-name-field":"keyup"},modelSetOptions:{validate:!0}}),this},toggleView:function(u){u.preventDefault(),e(u.currentTarget).next().toggle()},nameError:function(e,u){u&&"invalid_characters"==u?this.$el.find('input[name="font_name"]').css("border-color","red"):this.$el.find('input[name="font_name"]').removeAttr("style")},fontError:function(u,t,i){$input=this.$el.find('input[name="'+i+'"]'),t?($error=e('<span class="gf_settings_description"><label>Only TTF font files are supported.</label></span>'),$input.hasClass("invalid")||$input.addClass("invalid").next().after($error.clone())):$input.hasClass("invalid")&&$input.removeClass("invalid").next().next().remove()},disableSubmitButton:function(e){this.$el.find(".font-submit button").prop("disabled",!0),e.set("disabled",!0)},enableSubmitButton:function(e){this.$el.find(".font-submit button").prop("disabled",!1),e.set("disabled",!1)},formSubmission:function(u){u.preventDefault();e(u.currentTarget);u.currentTarget.checkValidity()&&!1===this.model.get("disabled")&&(this.addSpinner(),this.removeMessage(),console.log(this.model),this.model.save({nonce:this.$el.find("input[name=wpnonce]").val()},{success:e.proxy(function(e,u,t){this.removeSpinner(),this.displayMessage(GFPDF.updateSuccess),this.model.set(e)},this),error:e.proxy(function(e,u,t){this.removeSpinner(),e.responseJSON.error&&this.displayMessage(e.responseJSON.error,!0)},this)}))},deleteModel:function(u){u.preventDefault();var t=e("#delete-confirm"),n=[{text:GFPDF.delete,click:e.proxy(function(){t.wpdialog("destroy"),this.model.get("id")?(this.addSpinner(),this.removeMessage(),this.$el.hide(),this.model.destroy({nonce:this.$el.find("input[name=wpnonce]").val()},{success:e.proxy(function(e,u,t){this.removeSpinner(),this.displayMessage(GFPDF.deleteSuccess),this.collection.remove(this.model)},this),error:e.proxy(function(e,u,t){this.removeSpinner(),this.collection.remove(this.model),e.responseJSON.error&&this.displayMessage(e.responseJSON.error,!0)},this)})):this.collection.remove(this.model)},this)},{text:GFPDF.cancel,click:function(){t.wpdialog("destroy")}}];i.Misc.Dialog(t,n,300,175),t.wpdialog("open")},addSpinner:function(){var u=e('<img alt="Loading" src="'+GFPDF.spinnerUrl+'" class="gfpdf-spinner" style="margin-top: 4px;" />');this.$el.find(".font-submit button").after(u)},removeSpinner:function(){this.$el.find(".gfpdf-spinner").remove()},displayMessage:function(u,t){var i=e('<div class="updated notice">');!0===t&&i.addClass("error"),i.html("<p>"+u+"</p>"),this.$el.find("form").before(i)},removeMessage:function(){this.$el.find("div.notice").slideUp(function(){e(this).remove()})}}),i.View.Add=Backbone.View.extend({el:"#font-add-list",events:{click:"addFont"},initialize:function(e){this.container=e.container,this.render()},render:function(){this.$el.html('<i class="fa fa-plus fa-4x"></i><span>Add Font</span>')},addFont:function(e){var u=new i.Model.Core;this.collection.add(u),this.container.$el.find("li:last .font-settings").toggle().find('input[type="text"]:first').focus()}}),i.Misc.Dialog=function(u,t,i,n){u.wpdialog({autoOpen:!1,resizable:!1,draggable:!1,width:i,height:n,modal:!0,dialogClass:"wp-dialog",zIndex:3e5,buttons:t,open:function(){e(this).siblings(".ui-dialog-buttonpane").find("button:eq(1)").focus(),e(".ui-widget-overlay").bind("click",function(){u.wpdialog("close")})}})};var n={};n.SearchModel=Backbone.Model.extend({}),n.SearchCollection=Backbone.Collection.extend({model:n.SearchModel,initialize:function(e,u){this.url=u.url}}),n.ContainerView=Backbone.View.extend({el:"#search-knowledgebase",events:{"keyup #search-help-input":"doSearch","change #search-help-input":"doSearch"},initialize:function(){this.timer=!0,this.render()},render:function(){return this.addSearchBar(),this},addSearchBar:function(){var u=e("<input>").attr("type","text").attr("placeholder"," "+GFPDF.searchPlaceholder).attr("id","search-help-input");this.$el.prepend(u),u.tooltip({items:"input",content:"The search must be more than 3 characters.",tooltipClass:"ui-state-error"}).tooltip("disable"),u.focus()},doSearch:function(u){var t=e(u.currentTarget);window.clearTimeout(this.timer);var i=e.trim(t.val());t.data("currentValue");i.length>3&&t.data("previousValue")!==i?(t.tooltip("disable"),t.data("currentValue",i),this.timer=window.setTimeout(_.bind(function(){this.processSearch(i)},this),500)):i.length<=3&&13==u.keyCode&&t.tooltip("enable").tooltip("open")},processSearch:function(e){console.log("Searching our collection..."),new n.DocsView({s:e})}}),n.MainView=Backbone.View.extend({callAPI:function(e){this.collection.fetch({success:_.bind(this.renderSearch,this),error:_.bind(this.renderSearchError)})},renderSearch:function(e,u){console.log("Rendering Search Results"),this.hideSpinner();var t=this.$el.find(".inside ul");t.html(this.template({collection:this.collection.toJSON(),url:this.url}));var i=t.parent();i.is(":visible")||i.slideDown(500)},renderSearchError:function(e,u){console.log("Search Failed"),console.log(e),console.log(u)},showSpinner:function(){this.$el.find(".spinner").addClass("is-active"),this.$el.is(":visible")||this.$el.slideDown(500)},hideSpinner:function(){this.$el.find(".spinner").removeClass("is-active")}}),n.DocsView=n.MainView.extend({el:"#documentation-api",template:"#GravityPDFSearchResultsDocumentation",initialize:function(e){this.url="https://gravitypdf.com/wp-json/wp/v2/v4_docs/",this.s=e.s,this.render()},render:function(){this.template=_.template(e(this.template).html(),null,t),this.showSpinner();var u=encodeURIComponent(this.s),i=this.url+"?search="+u;return this.collection=new n.SearchCollection([],{url:i}),this.callAPI(i),this}}),(new u).init()})}(jQuery);
dist/assets/js/gfpdf-settings.min.js CHANGED
@@ -1 +1 @@
1
- !function(t){t(function(){function e(){var e=this;this.init=function(){this.initCommon(),this.isSettings()&&this.processSettings(),this.isFormSettings()&&this.processFormSettings()},this.initCommon=function(){this.setupGravityForms(),this.doUploadListener(),this.doColorPicker(),this.setupSelectBoxes(),this.showTooltips(),this.setupCustomPaperSize(),this.setupToggledFields(),this.setupDynamicTemplateFields(),this.setupLicenseDeactivation()},this.setupGravityForms=function(){"undefined"!=typeof gf_vars&&(gf_vars.thisFormButton=GFPDF.conditionalText,gf_vars.show=GFPDF.enable,gf_vars.hide=GFPDF.disable),window.gfMergeTags&&"undefined"!=typeof form&&(window.gfMergeTags.getTargetElement=this.resetGfMergeTags)},this.isSettings=function(){return t("#tab_PDF").length},this.isFormSettings=function(){return t("#tab_pdf").length},this.isFormSettingsList=function(){return t("#gfpdf_list_form").length},this.isFormSettingsEdit=function(){return t("#gfpdf_pdf_form").length},this.getCurrentSettingsPage=function(){return this.isSettings()?t(".nav-tab-wrapper a.nav-tab-active:first").text():""},this.processSettings=function(){switch(this.cleanupGFNavigation(),this.runPDFAccessCheck(),this.getCurrentSettingsPage()){case"General":this.generalSettings();break;case"Tools":this.toolsSettings()}},this.processFormSettings=function(){this.isFormSettingsList()&&this.doFormSettingsListPage(),this.isFormSettingsEdit()&&this.doFormSettingsEditPage()},this.doFormSettingsEditPage=function(){this.setupRequiredFields(t("#gfpdf_pdf_form")),this.setupPdfTabs(),this.handleSecurityConditionals(),this.handlePDFConditionalLogic(),this.handleOwnerRestriction(),this.toggleFontAppearance(t("#gfpdf_settings\\[template\\]").data("template_group")),this.toggleAppearanceTab(),t("#gfpdf_pdf_form").submit(function(){try{tinyMCE.triggerSave()}catch(t){}}),t("#gfpdf_pdf_form").submit(function(){t("#gfpdf_settings\\[conditionalLogic\\]").val(jQuery.toJSON(window.gfpdf_current_pdf.conditionalLogic))})},this.handleSecurityConditionals=function(){var e=t("#pdf-general-advanced"),i=e.find('input[name="gfpdf_settings[security]"]'),n=e.find('input[name="gfpdf_settings[format]"]');i.change(function(){if(t(this).is(":checked")){var i=n.filter(":checked").val();t(this).val()===GFPDF.no||i!==GFPDF.standard?e.find("tr:nth-child(3),tr:nth-child(4),tr:nth-child(5):not(.gfpdf-hidden)").hide():e.find("tr:nth-child(3),tr:nth-child(4),tr:nth-child(5):not(.gfpdf-hidden)").show(),i!==GFPDF.standard?e.find("tr:nth-child(2)").hide():e.find("tr:nth-child(2)").show()}}).trigger("change"),n.change(function(){t(this).is(":checked")&&i.trigger("change")}).trigger("change")},this.handlePDFConditionalLogic=function(){gform.addFilter("gform_conditional_object",function(t,e){return"gfpdf"===e?window.gfpdf_current_pdf:t}),t("#gfpdf_conditional_logic").change(function(){void 0===window.gfpdf_current_pdf.conditionalLogic&&t(this).prop("checked")?window.gfpdf_current_pdf.conditionalLogic=new ConditionalLogic:t(this).prop("checked")||(window.gfpdf_current_pdf.conditionalLogic=null),ToggleConditionalLogic(!1,"gfpdf")}).trigger("change")},this.handleOwnerRestriction=function(){var e=t("#gfpdf-advanced-pdf-options");e.find('input[name="gfpdf_settings[public_access]"]').change(function(){t(this).is(":checked")&&("Yes"===t(this).val()?e.find("tr:nth-child(8)").hide():e.find("tr:nth-child(8)").show())}).trigger("change")},this.doFormSettingsListPage=function(){this.setupAJAXListDeleteListener(),this.setupAJAXListDuplicateListener(),this.setupAJAXListStateListener()},this.setupAJAXListStateListener=function(){t("#gfpdf_list_form").on("click",".check-column img",function(){var i=String(t(this).data("id")),n=this;if(i.length>0){n.src.indexOf("active1.png")>=0?(n.src=n.src.replace("active1.png","active0.png"),t(n).attr("title",GFPDF.inactive).attr("alt",GFPDF.inactive)):(n.src=n.src.replace("active0.png","active1.png"),t(n).attr("title",GFPDF.active).attr("alt",GFPDF.active));var a={action:"gfpdf_change_state",nonce:t(this).data("nonce"),fid:t(this).data("fid"),pid:t(this).data("id")};e.ajax(a,function(t){})}})},this.setupAJAXListDuplicateListener=function(){t("#gfpdf_list_form").on("click","a.submitduplicate",function(){var i=String(t(this).data("id")),n=this,a=t('<img alt="'+GFPDF.spinnerAlt+'" src="'+GFPDF.spinnerUrl+'" class="gfpdf-spinner gfpdf-spinner-small" />');if(t(this).after(a).parent().parent().attr("style","position:static; visibility: visible;"),i.length>0){var s={action:"gfpdf_list_duplicate",nonce:t(this).data("nonce"),fid:t(this).data("fid"),pid:t(this).data("id")};e.ajax(s,function(a){if(a.msg){t(n).parent().parent().attr("style","").find(".gfpdf-spinner").remove(),e.show_message(a.msg);var s=t(n).parents("tr"),o=s.clone().css("background","#baffb8");o.find(".column-name > a, .edit a").each(function(){var i=t(this).attr("href");i=e.updateURLParameter(i,"pid",a.pid),t(this).attr("href",i)}),o.find(".column-name > a").html(a.name);var d=o.find(".duplicate a"),r=o.find(".delete a"),c=o.find(".check-column img"),f=o.find(".column-shortcode input");d.data("id",a.pid),d.data("nonce",a.dup_nonce),r.data("id",a.pid),r.data("nonce",a.del_nonce),c.data("id",a.pid),c.data("nonce",a.state_nonce);var l=f.val();l=l.replace(i,a.pid),f.val(l);var p="";s.hasClass("alternate")?(o.removeClass("alternate"),p="#FFF"):(o.addClass("alternate"),p="#f9f9f9");var g=c.attr("src");c.attr("title",GFPDF.inactive).attr("alt",GFPDF.inactive).attr("src",g.replace("active1.png","active0.png")),o.hide().insertAfter(s).fadeIn().animate({backgroundColor:p})}})}})},this.maybeShowEmptyRow=function(){var e=t("#gfpdf_list_form tbody");if(0===e.find("tr").length){var i=t("<tr>").addClass("no-items"),n=t("<td>").attr("colspan","5").addClass("colspanchange"),a=t("<a>").attr("href",t("#add-new-pdf").attr("href")).append(GFPDF.letsGoCreateOne+".");n.append(GFPDF.thisFormHasNoPdfs).append(" ").append(a),i.append(n),e.append(i)}},this.setupAJAXListDeleteListener=function(){var i=t("#delete-confirm"),n=[{text:GFPDF.delete,click:function(){i.wpdialog("close"),$elm=t(i.data("elm"));var n=t('<img alt="'+GFPDF.spinnerAlt+'" src="'+GFPDF.spinnerUrl+'" class="gfpdf-spinner gfpdf-spinner-small" />');$elm.append(n).parent().parent().attr("style","position:static; visibility: visible;");var a={action:"gfpdf_list_delete",nonce:$elm.data("nonce"),fid:$elm.data("fid"),pid:$elm.data("id")};e.ajax(a,function(t){if(t.msg){$elm.parent().parent().attr("style","").find(".gfpdf-spinner").remove(),e.show_message(t.msg);$elm.parents("tr").css("background","#ffb8b8").fadeOut(400,function(){this.remove(),e.maybeShowEmptyRow()})}i.data("elm",null)})}},{text:GFPDF.cancel,click:function(){i.wpdialog("close").data("elm",null)}}];this.wp_dialog(i,n,300,175),t("#gfpdf_list_form").on("click","a.submitdelete",function(){String(t(this).data("id")).length>0&&!i.data("elm")&&(e.resizeDialogIfNeeded(i,300,175),i.wpdialog("open").data("elm",this))})},this.setupPdfTabs=function(){t(".gfpdf-tab-container").not(":eq(0)").hide(),t(".gfpdf-tab-wrapper a").click(function(){return t(this).parents("ul").find("a").removeClass("current"),t(this).addClass("current").blur(),t(".gfpdf-tab-container").hide(),t(t(this).attr("href")).show(),!1})},this.setupToggledFields=function(){t("form").off("change",".gfpdf-input-toggle").on("change",".gfpdf-input-toggle",function(){var e=t(this).parent().next();t(this).prop("checked")?e.slideDown("slow"):(e.slideUp("slow"),e.find(".wp-editor-area").each(function(){var e=tinyMCE.get(t(this).attr("id"));null!==e&&e.setContent("")}),e.find("textarea").each(function(){t(this).val("")}))})},this.setupDynamicTemplateFields=function(){t("#gfpdf_settings\\[template\\]").off("change").change(function(){var i=t('<img alt="'+GFPDF.spinnerAlt+'" src="'+GFPDF.spinnerUrl+'" class="gfpdf-spinner" />');t(this).next().after(i);var n={action:"gfpdf_get_template_fields",nonce:GFPDF.ajaxNonce,template:t(this).val(),type:t(this).attr("id"),id:t("#gform_id").val(),gform_pdf_id:t("#gform_pdf_id").val()};e.ajax(n,function(n){i.remove(),t('input[name="gfpdf_settings[advanced_template]"][value="No"]').prop("checked",!0).trigger("change"),n.fields?(window.gfMergeTags&&(t(".merge-tag-support").removeClass("merge-tag-support"),t(".all-merge-tags a.open-list").off("click")),t.each(n.editors,function(t,e){var i=tinyMCE.get(e);if(null!==i)try{tinyMCE.remove(i)}catch(t){}}),t("#pdf-custom-appearance").hide().html(n.fields).fadeIn(),t("#gfpdf-custom-appearance-nav").show(),e.loadTinyMCEEditor(n.editors,n.editor_init),e.initCommon(),e.doMergetags()):(t("#gfpdf-custom-appearance-nav").hide(),t("#pdf-custom-appearance").html("")),n.template_type&&e.toggleFontAppearance(n.template_type)})})},this.setupLicenseDeactivation=function(){t(".gfpdf-deactivate-license").click(function(){var i=t(this).parent();i.find(".gf_settings_description label").html("");var n=t('<img alt="'+GFPDF.spinnerAlt+'" src="'+GFPDF.spinnerUrl+'" class="gfpdf-spinner" />');t(this).append(n);var a=t(this).data("addon-name"),s={action:"gfpdf_deactivate_license",addon_name:a,license:t(this).data("license"),nonce:t(this).data("nonce")};return e.ajax(s,function(e){n.remove(),e.success?(t("#gfpdf_settings\\[license_"+a+"\\]").val(""),t("#gfpdf_settings\\[license_"+a+"_message\\]").val(""),t("#gfpdf_settings\\[license_"+a+"_status\\]").val(""),i.find("i").remove(),i.find("a").remove(),i.find(".gf_settings_description label").html(e.success)):i.find(".gf_settings_description label").html(e.error)}),!1})},this.toggleFontAppearance=function(e){var i=t("#pdf-general-appearance").find("tr.gfpdf_font_type, tr.gfpdf_font_size, tr.gfpdf_font_colour");"legacy"==e?i.hide():i.show()},this.toggleAppearanceTab=function(){t('input[name="gfpdf_settings[advanced_template]"]').change(function(){"Yes"==t(this).val()?t("#gfpdf-appearance-nav").hide():t("#gfpdf-appearance-nav").show()}),t('input[name="gfpdf_settings[advanced_template]"]:checked').trigger("change")},this.loadTinyMCEEditor=function(e,i){null!=i&&(i.body_class="id post-type-post post-status-publish post-format-standard",i.formats={alignleft:[{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"left"}},{selector:"img,table,dl.wp-caption",classes:"alignleft"}],aligncenter:[{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"center"}},{selector:"img,table,dl.wp-caption",classes:"aligncenter"}],alignright:[{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"right"}},{selector:"img,table,dl.wp-caption",classes:"alignright"}],strikethrough:{inline:"del"}}),t.each(e,function(t,e){i.selector="#"+e,tinyMCE.init(i),tinyMCE.execCommand("mceAddEditor",!1,e),"function"==typeof QTags&&(QTags({id:e}),QTags._buttonsInit(),"function"==typeof switchEditors.switchto&&switchEditors.switchto(jQuery("#wp-"+e+"-wrap").find(".wp-switch-editor.switch-"+("html"==getUserSetting("editor")?"html":"tmce"))[0]))})},this.doUploadListener=function(){var e;window.formfield="",t("body").off("click",".gfpdf_settings_upload_button").on("click",".gfpdf_settings_upload_button",function(i){i.preventDefault();var n=t(this);if(window.formfield=t(this).parent().prev(),e)return void e.open();e=wp.media.frames.file_frame=wp.media({title:n.data("uploader-title"),button:{text:n.data("uploader-button-text")},multiple:!1}),e.on("select",function(){e.state().get("selection").each(function(t,e){t=t.toJSON(),window.formfield.val(t.url).change()})}),e.open()})},this.doColorPicker=function(){t(".gfpdf-color-picker").each(function(){t(this).wpColorPicker()})},this.doMergetags=function(){window.gfMergeTags&&"undefined"!=typeof form&&(window.gfMergeTags=new gfMergeTagsObj(form),window.gfMergeTags.getTargetElement=this.resetGfMergeTags),!window.gfMergeTags&&"undefined"!=typeof form&&t(".merge-tag-support").length>=0&&t(".merge-tag-support").each(function(){new gfMergeTagsObj(form,t(this))})},this.resetGfMergeTags=function(e){var i=t(e),n=i.parents("span.all-merge-tags").data("targetElement");return n=n.replace(/[!"#$%&'()*+,.\/:;<=>?@[\\\]^`{|}~]/g,"\\$&"),t("#"+n)},this.setupCustomPaperSize=function(){t(".gfpdf_paper_size").each(function(){var e=t(this).nextAll(".gfpdf_paper_size_other").first();t(this).find("select").off("change").change(function(){"CUSTOM"===t(this).val()?e.fadeIn():e.fadeOut()}).trigger("change")})},this.cleanupGFNavigation=function(){t("#gform_tabs a").each(function(){var e=t(this).attr("href"),i=new RegExp("&tab=[^&;]*","g");t(this).attr("href",e.replace(i,""))})},this.runPDFAccessCheck=function(){var e=t("#gfpdf-direct-pdf-protection-check");if(e.length>0){var i=t('<img alt="'+GFPDF.spinnerAlt+'" src="'+GFPDF.spinnerUrl+'" class="gfpdf-spinner" />');e.append(i);var n={action:"gfpdf_has_pdf_protection",nonce:e.data("nonce")};this.ajax(n,function(t){i.remove(),!0===t?e.find("#gfpdf-direct-pdf-check-protected").show():e.find("#gfpdf-direct-pdf-check-unprotected").show()})}},this.setupRequiredFields=function(e){e.attr("novalidate","novalidate"),e.find('tr input[type="submit"]').click(function(){e.addClass("formSubmitted")}),e.find("tr").each(function(){t(this).find(':input[required=""]:first, :input[required]:first').parents("tr").find("th").append('<span class="gfield_required">*</span>')})},this.showTooltips=function(){"function"==typeof gform_initialize_tooltips&&(t(".gf_hidden_tooltip").each(function(){t(this).parent().siblings("th:first").append(" ").append(e.get_tooltip(t(this).html())),t(this).remove()}),gform_initialize_tooltips())},this.setupSelectBoxes=function(){t(".gfpdf-chosen").each(function(){t(this).chosen({disable_search_threshold:5,width:"100%"})})},this.setup_advanced_options=function(){var e=t(".gfpdf-advanced-options"),i=e.prev();e.find("a").click(function(){var e=this;return i.slideToggle(600,function(){var i=t(e).text();t(e).text(i==GFPDF.showAdvancedOptions?GFPDF.hideAdvancedOptions:GFPDF.showAdvancedOptions)}),!1}),t(".gfpdf-advanced-options").prev().find(".gfield_error").length&&i.show()},this.generalSettings=function(){this.setupRequiredFields(t("#pdfextended-settings > form"));var e=t("#pdf-general-security");e.find('input[name="gfpdf_settings[default_restrict_owner]"]').change(function(){t(this).is(":checked")&&("Yes"===t(this).val()?e.find("tr:nth-child(3)").hide():e.find("tr:nth-child(3)").show())}).trigger("change"),this.setup_advanced_options()},this.toolsSettings=function(){this.setupToolsTemplateInstallerDialog(),this.setupToolsFontsDialog(),this.setupToolsUninstallDialog()},this.setupToolsTemplateInstallerDialog=function(){var i=t("#gfpdf_settings\\[setup_templates\\]"),n=t("#setup-templates-confirm"),a=[{text:GFPDF.continue,click:function(){i.unbind().click()}},{text:GFPDF.cancel,click:function(){n.wpdialog("close")}}];n.length&&(this.wp_dialog(n,a,500,350),i.click(function(){return e.resizeDialogIfNeeded(n,500,350),n.wpdialog("open"),!1}))},this.setupToolsFontsDialog=function(){var i=t("#gfpdf_settings\\[manage_fonts\\]"),n=t("#manage-font-files");this.wp_dialog(n,[],500,500),i.click(function(){return e.resizeDialogIfNeeded(n,500,500),n.wpdialog("open"),!1}),window.location.hash&&"#manage_fonts"==window.location.hash&&i.click()},this.setupToolsUninstallDialog=function(){var i=t("#gfpdf-uninstall"),n=t("#uninstall-confirm"),a=[{text:GFPDF.uninstall,click:function(){i.parents("form").submit()}},{text:GFPDF.cancel,click:function(){n.wpdialog("close")}}];this.wp_dialog(n,a,500,175),i.click(function(){return e.resizeDialogIfNeeded(n,500,175),n.wpdialog("open"),!1})},this.resizeDialogIfNeeded=function(e,i,n){var a=t(window).width(),s=t(window).height(),o=a<500?a-20:i,d=s<500?s-50:n;e.wpdialog("option","width",o),e.wpdialog("option","height",d)},this.wp_dialog=function(e,i,n,a){e.wpdialog({autoOpen:!1,resizable:!1,draggable:!1,width:n,height:a,modal:!0,dialogClass:"wp-dialog",zIndex:3e5,buttons:i,open:function(){t(this).siblings(".ui-dialog-buttonpane").find("button:eq(1)").focus(),t(".ui-widget-overlay").bind("click",function(){e.wpdialog("close")})}})},this.get_tooltip=function(e){var i=t("<a>"),n=t('<i class="fa fa-question-circle">');return i.append(n),i.addClass("gf_tooltip tooltip"),i.click(function(){return!1}),i.attr("title",e),i},this.ajax=function(e,i){t.ajax({type:"post",dataType:"json",url:GFPDF.ajaxUrl,data:e,success:i,error:this.ajax_error})},this.ajax_error=function(t,e,i){console.log(e),console.log(i)},this.show_message=function(e,i,n){i=void 0!==i?i:4500,n=void 0!==n&&n;var a=t('<div id="message">').html("<p>"+e+"</p>");!0===n?a.addClass("error"):a.addClass("updated"),t(".wrap > h2").after(a),setTimeout(function(){a.slideUp()},i)},this.updateURLParameter=function(t,e,n){var a="",s=t.split("?"),o=s[0],d=s[1],r="";if(d)for(s=d.split("&"),i=0;i<s.length;i++)s[i].split("=")[0]!=e&&(a+=r+s[i],r="&");return o+"?"+a+r+e+"="+n}}(new e).init()})}(jQuery);
1
+ !function(t){t(function(){function e(){var e=this;this.init=function(){this.initCommon(),this.isSettings()&&this.processSettings(),this.isFormSettings()&&this.processFormSettings()},this.initCommon=function(){this.setupGravityForms(),this.doUploadListener(),this.doColorPicker(),this.setupSelectBoxes(),this.showTooltips(),this.setupCustomPaperSize(),this.setupToggledFields(),this.setupDynamicTemplateFields(),this.setupLicenseDeactivation()},this.setupGravityForms=function(){"undefined"!=typeof gf_vars&&(gf_vars.thisFormButton=GFPDF.conditionalText,gf_vars.show=GFPDF.enable,gf_vars.hide=GFPDF.disable),window.gfMergeTags&&"undefined"!=typeof form&&(window.gfMergeTags.getTargetElement=this.resetGfMergeTags)},this.isSettings=function(){return t("#tab_PDF").length},this.isFormSettings=function(){return t("#tab_pdf").length},this.isFormSettingsList=function(){return t("#gfpdf_list_form").length},this.isFormSettingsEdit=function(){return t("#gfpdf_pdf_form").length},this.getCurrentSettingsPage=function(){return this.isSettings()?t(".nav-tab-wrapper a.nav-tab-active:first").data("id"):""},this.processSettings=function(){switch(this.cleanupGFNavigation(),this.runPDFAccessCheck(),this.getCurrentSettingsPage()){case"general":this.generalSettings();break;case"tools":this.toolsSettings()}},this.processFormSettings=function(){this.isFormSettingsList()&&this.doFormSettingsListPage(),this.isFormSettingsEdit()&&this.doFormSettingsEditPage()},this.doFormSettingsEditPage=function(){this.setupRequiredFields(t("#gfpdf_pdf_form")),this.setupPdfTabs(),this.handleSecurityConditionals(),this.handlePDFConditionalLogic(),this.handleOwnerRestriction(),this.toggleFontAppearance(t("#gfpdf_settings\\[template\\]").data("template_group")),this.toggleAppearanceTab(),t("#gfpdf_pdf_form").submit(function(){try{tinyMCE.triggerSave()}catch(t){}}),t("#gfpdf_pdf_form").submit(function(){t("#gfpdf_settings\\[conditionalLogic\\]").val(jQuery.toJSON(window.gfpdf_current_pdf.conditionalLogic))})},this.handleSecurityConditionals=function(){var e=t("#pdf-general-advanced"),i=e.find('input[name="gfpdf_settings[security]"]'),n=e.find('input[name="gfpdf_settings[format]"]');i.change(function(){if(t(this).is(":checked")){var i=n.filter(":checked").val();t(this).val()===GFPDF.no||i!==GFPDF.standard?e.find("tr:nth-child(3),tr:nth-child(4),tr:nth-child(5):not(.gfpdf-hidden)").hide():e.find("tr:nth-child(3),tr:nth-child(4),tr:nth-child(5):not(.gfpdf-hidden)").show(),i!==GFPDF.standard?e.find("tr:nth-child(2)").hide():e.find("tr:nth-child(2)").show()}}).trigger("change"),n.change(function(){t(this).is(":checked")&&i.trigger("change")}).trigger("change")},this.handlePDFConditionalLogic=function(){gform.addFilter("gform_conditional_object",function(t,e){return"gfpdf"===e?window.gfpdf_current_pdf:t}),t("#gfpdf_conditional_logic").change(function(){void 0===window.gfpdf_current_pdf.conditionalLogic&&t(this).prop("checked")?window.gfpdf_current_pdf.conditionalLogic=new ConditionalLogic:t(this).prop("checked")||(window.gfpdf_current_pdf.conditionalLogic=null),ToggleConditionalLogic(!1,"gfpdf")}).trigger("change")},this.handleOwnerRestriction=function(){var e=t("#gfpdf-advanced-pdf-options");e.find('input[name="gfpdf_settings[public_access]"]').change(function(){t(this).is(":checked")&&("Yes"===t(this).val()?e.find("tr:nth-child(8)").hide():e.find("tr:nth-child(8)").show())}).trigger("change")},this.doFormSettingsListPage=function(){this.setupAJAXListDeleteListener(),this.setupAJAXListDuplicateListener(),this.setupAJAXListStateListener()},this.setupAJAXListStateListener=function(){t("#gfpdf_list_form").on("click",".check-column img",function(){var i=String(t(this).data("id")),n=this;if(i.length>0){n.src.indexOf("active1.png")>=0?(n.src=n.src.replace("active1.png","active0.png"),t(n).attr("title",GFPDF.inactive).attr("alt",GFPDF.inactive)):(n.src=n.src.replace("active0.png","active1.png"),t(n).attr("title",GFPDF.active).attr("alt",GFPDF.active));var a={action:"gfpdf_change_state",nonce:t(this).data("nonce"),fid:t(this).data("fid"),pid:t(this).data("id")};e.ajax(a,function(t){})}})},this.setupAJAXListDuplicateListener=function(){t("#gfpdf_list_form").on("click","a.submitduplicate",function(){var i=String(t(this).data("id")),n=this,a=t('<img alt="'+GFPDF.spinnerAlt+'" src="'+GFPDF.spinnerUrl+'" class="gfpdf-spinner gfpdf-spinner-small" />');if(t(this).after(a).parent().parent().attr("style","position:static; visibility: visible;"),i.length>0){var s={action:"gfpdf_list_duplicate",nonce:t(this).data("nonce"),fid:t(this).data("fid"),pid:t(this).data("id")};e.ajax(s,function(a){if(a.msg){t(n).parent().parent().attr("style","").find(".gfpdf-spinner").remove(),e.show_message(a.msg);var s=t(n).parents("tr"),o=s.clone().css("background","#baffb8");o.find(".column-name > a, .edit a").each(function(){var i=t(this).attr("href");i=e.updateURLParameter(i,"pid",a.pid),t(this).attr("href",i)}),o.find(".column-name > a").html(a.name);var d=o.find(".duplicate a"),r=o.find(".delete a"),c=o.find(".check-column img"),f=o.find(".column-shortcode input");d.data("id",a.pid),d.data("nonce",a.dup_nonce),r.data("id",a.pid),r.data("nonce",a.del_nonce),c.data("id",a.pid),c.data("nonce",a.state_nonce);var l=f.val();l=l.replace(i,a.pid),f.val(l);var p="";s.hasClass("alternate")?(o.removeClass("alternate"),p="#FFF"):(o.addClass("alternate"),p="#f9f9f9");var g=c.attr("src");c.attr("title",GFPDF.inactive).attr("alt",GFPDF.inactive).attr("src",g.replace("active1.png","active0.png")),o.hide().insertAfter(s).fadeIn().animate({backgroundColor:p})}})}})},this.maybeShowEmptyRow=function(){var e=t("#gfpdf_list_form tbody");if(0===e.find("tr").length){var i=t("<tr>").addClass("no-items"),n=t("<td>").attr("colspan","5").addClass("colspanchange"),a=t("<a>").attr("href",t("#add-new-pdf").attr("href")).append(GFPDF.letsGoCreateOne+".");n.append(GFPDF.thisFormHasNoPdfs).append(" ").append(a),i.append(n),e.append(i)}},this.setupAJAXListDeleteListener=function(){var i=t("#delete-confirm"),n=[{text:GFPDF.delete,click:function(){i.wpdialog("close"),$elm=t(i.data("elm"));var n=t('<img alt="'+GFPDF.spinnerAlt+'" src="'+GFPDF.spinnerUrl+'" class="gfpdf-spinner gfpdf-spinner-small" />');$elm.append(n).parent().parent().attr("style","position:static; visibility: visible;");var a={action:"gfpdf_list_delete",nonce:$elm.data("nonce"),fid:$elm.data("fid"),pid:$elm.data("id")};e.ajax(a,function(t){if(t.msg){$elm.parent().parent().attr("style","").find(".gfpdf-spinner").remove(),e.show_message(t.msg);$elm.parents("tr").css("background","#ffb8b8").fadeOut(400,function(){this.remove(),e.maybeShowEmptyRow()})}i.data("elm",null)})}},{text:GFPDF.cancel,click:function(){i.wpdialog("close").data("elm",null)}}];this.wp_dialog(i,n,300,175),t("#gfpdf_list_form").on("click","a.submitdelete",function(){String(t(this).data("id")).length>0&&!i.data("elm")&&(e.resizeDialogIfNeeded(i,300,175),i.wpdialog("open").data("elm",this))})},this.setupPdfTabs=function(){t(".gfpdf-tab-container").not(":eq(0)").hide(),t(".gfpdf-tab-wrapper a").click(function(){return t(this).parents("ul").find("a").removeClass("current"),t(this).addClass("current").blur(),t(".gfpdf-tab-container").hide(),t(t(this).attr("href")).show(),!1})},this.setupToggledFields=function(){t("form").off("change",".gfpdf-input-toggle").on("change",".gfpdf-input-toggle",function(){var e=t(this).parent().next();t(this).prop("checked")?e.slideDown("slow"):(e.slideUp("slow"),e.find(".wp-editor-area").each(function(){var e=tinyMCE.get(t(this).attr("id"));null!==e&&e.setContent("")}),e.find("textarea").each(function(){t(this).val("")}))})},this.setupDynamicTemplateFields=function(){t("#gfpdf_settings\\[template\\]").off("change").change(function(){var i=t('<img alt="'+GFPDF.spinnerAlt+'" src="'+GFPDF.spinnerUrl+'" class="gfpdf-spinner" />');t(this).next().after(i);var n={action:"gfpdf_get_template_fields",nonce:GFPDF.ajaxNonce,template:t(this).val(),type:t(this).attr("id"),id:t("#gform_id").val(),gform_pdf_id:t("#gform_pdf_id").val()};e.ajax(n,function(n){i.remove(),t('input[name="gfpdf_settings[advanced_template]"][value="No"]').prop("checked",!0).trigger("change"),n.fields?(window.gfMergeTags&&(t(".merge-tag-support").removeClass("merge-tag-support"),t(".all-merge-tags a.open-list").off("click")),t.each(n.editors,function(t,e){var i=tinyMCE.get(e);if(null!==i)try{tinyMCE.remove(i)}catch(t){}}),t("#pdf-custom-appearance").hide().html(n.fields).fadeIn(),t("#gfpdf-custom-appearance-nav").show(),e.loadTinyMCEEditor(n.editors,n.editor_init),e.initCommon(),e.doMergetags()):(t("#gfpdf-custom-appearance-nav").hide(),t("#pdf-custom-appearance").html("")),n.template_type&&e.toggleFontAppearance(n.template_type)})})},this.setupLicenseDeactivation=function(){t(".gfpdf-deactivate-license").click(function(){var i=t(this).parent();i.find(".gf_settings_description label").html("");var n=t('<img alt="'+GFPDF.spinnerAlt+'" src="'+GFPDF.spinnerUrl+'" class="gfpdf-spinner" />');t(this).append(n);var a=t(this).data("addon-name"),s={action:"gfpdf_deactivate_license",addon_name:a,license:t(this).data("license"),nonce:t(this).data("nonce")};return e.ajax(s,function(e){n.remove(),e.success?(t("#gfpdf_settings\\[license_"+a+"\\]").val(""),t("#gfpdf_settings\\[license_"+a+"_message\\]").val(""),t("#gfpdf_settings\\[license_"+a+"_status\\]").val(""),i.find("i").remove(),i.find("a").remove(),i.find(".gf_settings_description label").html(e.success)):i.find(".gf_settings_description label").html(e.error)}),!1})},this.toggleFontAppearance=function(e){var i=t("#pdf-general-appearance").find("tr.gfpdf_font_type, tr.gfpdf_font_size, tr.gfpdf_font_colour");"legacy"==e?i.hide():i.show()},this.toggleAppearanceTab=function(){t('input[name="gfpdf_settings[advanced_template]"]').change(function(){"Yes"==t(this).val()?t("#gfpdf-appearance-nav").hide():t("#gfpdf-appearance-nav").show()}),t('input[name="gfpdf_settings[advanced_template]"]:checked').trigger("change")},this.loadTinyMCEEditor=function(e,i){null!=i&&(i.body_class="id post-type-post post-status-publish post-format-standard",i.formats={alignleft:[{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"left"}},{selector:"img,table,dl.wp-caption",classes:"alignleft"}],aligncenter:[{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"center"}},{selector:"img,table,dl.wp-caption",classes:"aligncenter"}],alignright:[{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"right"}},{selector:"img,table,dl.wp-caption",classes:"alignright"}],strikethrough:{inline:"del"}}),t.each(e,function(t,e){i.selector="#"+e,tinyMCE.init(i),tinyMCE.execCommand("mceAddEditor",!1,e),"function"==typeof QTags&&(QTags({id:e}),QTags._buttonsInit(),"function"==typeof switchEditors.switchto&&switchEditors.switchto(jQuery("#wp-"+e+"-wrap").find(".wp-switch-editor.switch-"+("html"==getUserSetting("editor")?"html":"tmce"))[0]))})},this.doUploadListener=function(){var e;window.formfield="",t("body").off("click",".gfpdf_settings_upload_button").on("click",".gfpdf_settings_upload_button",function(i){i.preventDefault();var n=t(this);if(window.formfield=t(this).parent().prev(),e)return void e.open();e=wp.media.frames.file_frame=wp.media({title:n.data("uploader-title"),button:{text:n.data("uploader-button-text")},multiple:!1}),e.on("select",function(){e.state().get("selection").each(function(t,e){t=t.toJSON(),window.formfield.val(t.url).change()})}),e.open()})},this.doColorPicker=function(){t(".gfpdf-color-picker").each(function(){t(this).wpColorPicker()})},this.doMergetags=function(){window.gfMergeTags&&"undefined"!=typeof form&&(window.gfMergeTags=new gfMergeTagsObj(form),window.gfMergeTags.getTargetElement=this.resetGfMergeTags),!window.gfMergeTags&&"undefined"!=typeof form&&t(".merge-tag-support").length>=0&&t(".merge-tag-support").each(function(){new gfMergeTagsObj(form,t(this))})},this.resetGfMergeTags=function(e){var i=t(e),n=i.parents("span.all-merge-tags").data("targetElement");return n=n.replace(/[!"#$%&'()*+,.\/:;<=>?@[\\\]^`{|}~]/g,"\\$&"),t("#"+n)},this.setupCustomPaperSize=function(){t(".gfpdf_paper_size").each(function(){var e=t(this).nextAll(".gfpdf_paper_size_other").first();t(this).find("select").off("change").change(function(){"CUSTOM"===t(this).val()?e.fadeIn():e.fadeOut()}).trigger("change")})},this.cleanupGFNavigation=function(){t("#gform_tabs a").each(function(){var e=t(this).attr("href"),i=new RegExp("&tab=[^&;]*","g");t(this).attr("href",e.replace(i,""))})},this.runPDFAccessCheck=function(){var e=t("#gfpdf-direct-pdf-protection-check");if(e.length>0){var i=t('<img alt="'+GFPDF.spinnerAlt+'" src="'+GFPDF.spinnerUrl+'" class="gfpdf-spinner" />');e.append(i);var n={action:"gfpdf_has_pdf_protection",nonce:e.data("nonce")};this.ajax(n,function(t){i.remove(),!0===t?e.find("#gfpdf-direct-pdf-check-protected").show():e.find("#gfpdf-direct-pdf-check-unprotected").show()})}},this.setupRequiredFields=function(e){e.attr("novalidate","novalidate"),e.find('tr input[type="submit"]').click(function(){e.addClass("formSubmitted")}),e.find("tr").each(function(){t(this).find(':input[required=""]:first, :input[required]:first').parents("tr").find("th").append('<span class="gfield_required">*</span>')})},this.showTooltips=function(){"function"==typeof gform_initialize_tooltips&&(t(".gf_hidden_tooltip").each(function(){t(this).parent().siblings("th:first").append(" ").append(e.get_tooltip(t(this).html())),t(this).remove()}),gform_initialize_tooltips())},this.setupSelectBoxes=function(){t(".gfpdf-chosen").each(function(){t(this).chosen({disable_search_threshold:5,width:"100%"})})},this.setup_advanced_options=function(){var e=t(".gfpdf-advanced-options"),i=e.prev();e.find("a").click(function(){var e=this;return i.slideToggle(600,function(){var i=t(e).text();t(e).text(i==GFPDF.showAdvancedOptions?GFPDF.hideAdvancedOptions:GFPDF.showAdvancedOptions)}),!1}),t(".gfpdf-advanced-options").prev().find(".gfield_error").length&&i.show()},this.generalSettings=function(){this.setupRequiredFields(t("#pdfextended-settings > form"));var e=t("#pdf-general-security");e.find('input[name="gfpdf_settings[default_restrict_owner]"]').change(function(){t(this).is(":checked")&&("Yes"===t(this).val()?e.find("tr:nth-child(3)").hide():e.find("tr:nth-child(3)").show())}).trigger("change"),this.setup_advanced_options()},this.toolsSettings=function(){this.setupToolsTemplateInstallerDialog(),this.setupToolsFontsDialog(),this.setupToolsUninstallDialog()},this.setupToolsTemplateInstallerDialog=function(){var i=t("#gfpdf_settings\\[setup_templates\\]"),n=t("#setup-templates-confirm"),a=[{text:GFPDF.continue,click:function(){i.unbind().click()}},{text:GFPDF.cancel,click:function(){n.wpdialog("close")}}];n.length&&(this.wp_dialog(n,a,500,350),i.click(function(){return e.resizeDialogIfNeeded(n,500,350),n.wpdialog("open"),!1}))},this.setupToolsFontsDialog=function(){var i=t("#gfpdf_settings\\[manage_fonts\\]"),n=t("#manage-font-files");this.wp_dialog(n,[],500,500),i.click(function(){return e.resizeDialogIfNeeded(n,500,500),n.wpdialog("open"),!1}),window.location.hash&&"#manage_fonts"==window.location.hash&&i.click()},this.setupToolsUninstallDialog=function(){var i=t("#gfpdf-uninstall"),n=t("#uninstall-confirm"),a=[{text:GFPDF.uninstall,click:function(){i.parents("form").submit()}},{text:GFPDF.cancel,click:function(){n.wpdialog("close")}}];this.wp_dialog(n,a,500,175),i.click(function(){return e.resizeDialogIfNeeded(n,500,175),n.wpdialog("open"),!1})},this.resizeDialogIfNeeded=function(e,i,n){var a=t(window).width(),s=t(window).height(),o=a<500?a-20:i,d=s<500?s-50:n;e.wpdialog("option","width",o),e.wpdialog("option","height",d)},this.wp_dialog=function(e,i,n,a){e.wpdialog({autoOpen:!1,resizable:!1,draggable:!1,width:n,height:a,modal:!0,dialogClass:"wp-dialog",zIndex:3e5,buttons:i,open:function(){t(this).siblings(".ui-dialog-buttonpane").find("button:eq(1)").focus(),t(".ui-widget-overlay").bind("click",function(){e.wpdialog("close")})}})},this.get_tooltip=function(e){var i=t("<a>"),n=t('<i class="fa fa-question-circle">');return i.append(n),i.addClass("gf_tooltip tooltip"),i.click(function(){return!1}),i.attr("title",e),i},this.ajax=function(e,i){t.ajax({type:"post",dataType:"json",url:GFPDF.ajaxUrl,data:e,success:i,error:this.ajax_error})},this.ajax_error=function(t,e,i){console.log(e),console.log(i)},this.show_message=function(e,i,n){i=void 0!==i?i:4500,n=void 0!==n&&n;var a=t('<div id="message">').html("<p>"+e+"</p>");!0===n?a.addClass("error"):a.addClass("updated"),t(".wrap > h2").after(a),setTimeout(function(){a.slideUp()},i)},this.updateURLParameter=function(t,e,n){var a="",s=t.split("?"),o=s[0],d=s[1],r="";if(d)for(s=d.split("&"),i=0;i<s.length;i++)s[i].split("=")[0]!=e&&(a+=r+s[i],r="&");return o+"?"+a+r+e+"="+n}}(new e).init()})}(jQuery);
pdf.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /*
3
  Plugin Name: Gravity PDF
4
- Version: 4.2.1
5
  Description: Automatically generate highly-customisable PDF documents using Gravity Forms.
6
  Author: Gravity PDF
7
  Author URI: https://gravitypdf.com
@@ -37,7 +37,7 @@ if ( ! defined( 'ABSPATH' ) ) {
37
  /*
38
  * Set base constants we'll use throughout the plugin
39
  */
40
- define( 'PDF_EXTENDED_VERSION', '4.2.1' ); /* the current plugin version */
41
  define( 'PDF_PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); /* plugin directory path */
42
  define( 'PDF_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); /* plugin directory url */
43
  define( 'PDF_PLUGIN_BASENAME', plugin_basename( __FILE__ ) ); /* the plugin basename */
1
  <?php
2
  /*
3
  Plugin Name: Gravity PDF
4
+ Version: 4.2.2
5
  Description: Automatically generate highly-customisable PDF documents using Gravity Forms.
6
  Author: Gravity PDF
7
  Author URI: https://gravitypdf.com
37
  /*
38
  * Set base constants we'll use throughout the plugin
39
  */
40
+ define( 'PDF_EXTENDED_VERSION', '4.2.2' ); /* the current plugin version */
41
  define( 'PDF_PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); /* plugin directory path */
42
  define( 'PDF_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); /* plugin directory url */
43
  define( 'PDF_PLUGIN_BASENAME', plugin_basename( __FILE__ ) ); /* the plugin basename */
src/assets/js/gfpdf-backbone.js CHANGED
@@ -1055,14 +1055,14 @@
1055
  };
1056
 
1057
  this.processSettings = function() {
1058
- var active = $('.nav-tab-wrapper a.nav-tab-active:first').text();
1059
 
1060
  switch (active) {
1061
- case 'Tools':
1062
  this.tools_settings();
1063
  break;
1064
 
1065
- case 'Help':
1066
  this.help_settings();
1067
  break;
1068
  }
1055
  };
1056
 
1057
  this.processSettings = function() {
1058
+ var active = $('.nav-tab-wrapper a.nav-tab-active:first').data('id');
1059
 
1060
  switch (active) {
1061
+ case 'tools':
1062
  this.tools_settings();
1063
  break;
1064
 
1065
+ case 'help':
1066
  this.help_settings();
1067
  break;
1068
  }
src/assets/js/gfpdf-settings.js CHANGED
@@ -157,7 +157,7 @@
157
  */
158
  this.getCurrentSettingsPage = function () {
159
  if (this.isSettings()) {
160
- return $('.nav-tab-wrapper a.nav-tab-active:first').text()
161
  }
162
  return ''
163
  }
@@ -177,11 +177,11 @@
177
 
178
  /* Run the appropriate settings page */
179
  switch (this.getCurrentSettingsPage()) {
180
- case 'General':
181
  this.generalSettings()
182
  break
183
 
184
- case 'Tools':
185
  this.toolsSettings()
186
  break
187
  }
@@ -485,7 +485,7 @@
485
  .attr('src', toggle_src.replace('active1.png', 'active0.png'))
486
 
487
  /* Add row to node and fade in */
488
- $newRow.hide().insertAfter($row).fadeIn().animate({ backgroundColor: background })
489
  }
490
  })
491
  }
@@ -518,7 +518,7 @@
518
  /* Set up our delete dialog */
519
  var $deleteDialog = $('#delete-confirm')
520
 
521
- var deleteButtons = [ {
522
  text: GFPDF.delete,
523
  click: function () {
524
  /* handle ajax call */
@@ -562,7 +562,7 @@
562
  /* cancel */
563
  $deleteDialog.wpdialog('close').data('elm', null)
564
  }
565
- } ]
566
 
567
  /* Add our delete dialog box */
568
  this.wp_dialog($deleteDialog, deleteButtons, 300, 175)
@@ -826,18 +826,18 @@
826
  settings.body_class = 'id post-type-post post-status-publish post-format-standard'
827
  settings.formats = {
828
  alignleft: [
829
- { selector: 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li', styles: { textAlign: 'left' } },
830
- { selector: 'img,table,dl.wp-caption', classes: 'alignleft' }
831
  ],
832
  aligncenter: [
833
- { selector: 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li', styles: { textAlign: 'center' } },
834
- { selector: 'img,table,dl.wp-caption', classes: 'aligncenter' }
835
  ],
836
  alignright: [
837
- { selector: 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li', styles: { textAlign: 'right' } },
838
- { selector: 'img,table,dl.wp-caption', classes: 'alignright' }
839
  ],
840
- strikethrough: { inline: 'del' }
841
  }
842
  }
843
 
@@ -855,12 +855,12 @@
855
 
856
  /* Enable WP quick tags */
857
  if (typeof(QTags) == 'function') {
858
- QTags({ 'id': fullId })
859
  QTags._buttonsInit()
860
 
861
  /* remember last tab selected */
862
  if (typeof switchEditors.switchto === 'function') {
863
- switchEditors.switchto(jQuery('#wp-' + fullId + '-wrap').find('.wp-switch-editor.switch-' + ( getUserSetting('editor') == 'html' ? 'html' : 'tmce' ))[ 0 ])
864
  }
865
  }
866
 
@@ -942,7 +942,7 @@
942
  if (!window.gfMergeTags && typeof form != 'undefined' && $('.merge-tag-support').length >= 0) {
943
  $('.merge-tag-support').each(function () {
944
  new gfMergeTagsObj(form, $(this))
945
- });
946
  }
947
  }
948
 
@@ -1195,7 +1195,7 @@
1195
  var $copyDialog = $('#setup-templates-confirm')
1196
 
1197
  /* Set up copy dialog */
1198
- var copyButtons = [ {
1199
  text: GFPDF.continue,
1200
  click: function () {
1201
  /* submit form */
@@ -1208,7 +1208,7 @@
1208
  /* cancel */
1209
  $copyDialog.wpdialog('close')
1210
  }
1211
- } ]
1212
 
1213
  if ($copyDialog.length) {
1214
  this.wp_dialog($copyDialog, copyButtons, 500, 350)
@@ -1262,7 +1262,7 @@
1262
  var $uninstallDialog = $('#uninstall-confirm')
1263
 
1264
  /* Set up uninstall dialog */
1265
- var uninstallButtons = [ {
1266
  text: GFPDF.uninstall,
1267
  click: function () {
1268
  /* submit form */
@@ -1275,7 +1275,7 @@
1275
  /* cancel */
1276
  $uninstallDialog.wpdialog('close')
1277
  }
1278
- } ]
1279
 
1280
  this.wp_dialog($uninstallDialog, uninstallButtons, 500, 175)
1281
 
@@ -1428,14 +1428,14 @@
1428
  this.updateURLParameter = function (url, param, paramVal) {
1429
  var newAdditionalURL = ""
1430
  var tempArray = url.split("?")
1431
- var baseURL = tempArray[ 0 ]
1432
- var additionalURL = tempArray[ 1 ]
1433
  var temp = ""
1434
  if (additionalURL) {
1435
  tempArray = additionalURL.split("&")
1436
  for (i = 0; i < tempArray.length; i++) {
1437
- if (tempArray[ i ].split('=')[ 0 ] != param) {
1438
- newAdditionalURL += temp + tempArray[ i ]
1439
  temp = "&"
1440
  }
1441
  }
157
  */
158
  this.getCurrentSettingsPage = function () {
159
  if (this.isSettings()) {
160
+ return $('.nav-tab-wrapper a.nav-tab-active:first').data('id')
161
  }
162
  return ''
163
  }
177
 
178
  /* Run the appropriate settings page */
179
  switch (this.getCurrentSettingsPage()) {
180
+ case 'general':
181
  this.generalSettings()
182
  break
183
 
184
+ case 'tools':
185
  this.toolsSettings()
186
  break
187
  }
485
  .attr('src', toggle_src.replace('active1.png', 'active0.png'))
486
 
487
  /* Add row to node and fade in */
488
+ $newRow.hide().insertAfter($row).fadeIn().animate({backgroundColor: background})
489
  }
490
  })
491
  }
518
  /* Set up our delete dialog */
519
  var $deleteDialog = $('#delete-confirm')
520
 
521
+ var deleteButtons = [{
522
  text: GFPDF.delete,
523
  click: function () {
524
  /* handle ajax call */
562
  /* cancel */
563
  $deleteDialog.wpdialog('close').data('elm', null)
564
  }
565
+ }]
566
 
567
  /* Add our delete dialog box */
568
  this.wp_dialog($deleteDialog, deleteButtons, 300, 175)
826
  settings.body_class = 'id post-type-post post-status-publish post-format-standard'
827
  settings.formats = {
828
  alignleft: [
829
+ {selector: 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li', styles: {textAlign: 'left'}},
830
+ {selector: 'img,table,dl.wp-caption', classes: 'alignleft'}
831
  ],
832
  aligncenter: [
833
+ {selector: 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li', styles: {textAlign: 'center'}},
834
+ {selector: 'img,table,dl.wp-caption', classes: 'aligncenter'}
835
  ],
836
  alignright: [
837
+ {selector: 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li', styles: {textAlign: 'right'}},
838
+ {selector: 'img,table,dl.wp-caption', classes: 'alignright'}
839
  ],
840
+ strikethrough: {inline: 'del'}
841
  }
842
  }
843
 
855
 
856
  /* Enable WP quick tags */
857
  if (typeof(QTags) == 'function') {
858
+ QTags({'id': fullId})
859
  QTags._buttonsInit()
860
 
861
  /* remember last tab selected */
862
  if (typeof switchEditors.switchto === 'function') {
863
+ switchEditors.switchto(jQuery('#wp-' + fullId + '-wrap').find('.wp-switch-editor.switch-' + ( getUserSetting('editor') == 'html' ? 'html' : 'tmce' ))[0])
864
  }
865
  }
866
 
942
  if (!window.gfMergeTags && typeof form != 'undefined' && $('.merge-tag-support').length >= 0) {
943
  $('.merge-tag-support').each(function () {
944
  new gfMergeTagsObj(form, $(this))
945
+ })
946
  }
947
  }
948
 
1195
  var $copyDialog = $('#setup-templates-confirm')
1196
 
1197
  /* Set up copy dialog */
1198
+ var copyButtons = [{
1199
  text: GFPDF.continue,
1200
  click: function () {
1201
  /* submit form */
1208
  /* cancel */
1209
  $copyDialog.wpdialog('close')
1210
  }
1211
+ }]
1212
 
1213
  if ($copyDialog.length) {
1214
  this.wp_dialog($copyDialog, copyButtons, 500, 350)
1262
  var $uninstallDialog = $('#uninstall-confirm')
1263
 
1264
  /* Set up uninstall dialog */
1265
+ var uninstallButtons = [{
1266
  text: GFPDF.uninstall,
1267
  click: function () {
1268
  /* submit form */
1275
  /* cancel */
1276
  $uninstallDialog.wpdialog('close')
1277
  }
1278
+ }]
1279
 
1280
  this.wp_dialog($uninstallDialog, uninstallButtons, 500, 175)
1281
 
1428
  this.updateURLParameter = function (url, param, paramVal) {
1429
  var newAdditionalURL = ""
1430
  var tempArray = url.split("?")
1431
+ var baseURL = tempArray[0]
1432
+ var additionalURL = tempArray[1]
1433
  var temp = ""
1434
  if (additionalURL) {
1435
  tempArray = additionalURL.split("&")
1436
  for (i = 0; i < tempArray.length; i++) {
1437
+ if (tempArray[i].split('=')[0] != param) {
1438
+ newAdditionalURL += temp + tempArray[i]
1439
  temp = "&"
1440
  }
1441
  }
src/assets/languages/gravity-forms-pdf-extended.pot CHANGED
@@ -245,15 +245,15 @@ msgstr ""
245
  msgid "Select"
246
  msgstr ""
247
 
248
- #: src/helper/Helper_Data.php:249, src/helper/Helper_Templates.php:409
249
  msgid "Version"
250
  msgstr ""
251
 
252
- #: src/helper/Helper_Data.php:250, src/helper/Helper_Templates.php:413
253
  msgid "Group"
254
  msgstr ""
255
 
256
- #: src/helper/Helper_Data.php:251, src/helper/Helper_Templates.php:415
257
  msgid "Tags"
258
  msgstr ""
259
 
@@ -921,26 +921,6 @@ msgstr ""
921
  msgid "Legacy"
922
  msgstr ""
923
 
924
- #: src/helper/Helper_Templates.php:408
925
- msgid "Template Name"
926
- msgstr ""
927
-
928
- #: src/helper/Helper_Templates.php:410
929
- msgid "Description"
930
- msgstr ""
931
-
932
- #: src/helper/Helper_Templates.php:411
933
- msgid "Author"
934
- msgstr ""
935
-
936
- #: src/helper/Helper_Templates.php:412
937
- msgid "Author URI"
938
- msgstr ""
939
-
940
- #: src/helper/Helper_Templates.php:414
941
- msgid "Required PDF Version"
942
- msgstr ""
943
-
944
  #: src/model/Model_Actions.php:347
945
  msgid "No configuration.php file found for site #%s"
946
  msgstr ""
@@ -1341,75 +1321,75 @@ msgstr ""
1341
  msgid "User-Defined Fonts"
1342
  msgstr ""
1343
 
1344
- #: src/helper/abstract/Helper_Abstract_Options.php:1072
1345
  msgid "Copy"
1346
  msgstr ""
1347
 
1348
- #: src/helper/abstract/Helper_Abstract_Options.php:1073
1349
  msgid "Print - Low Resolution"
1350
  msgstr ""
1351
 
1352
- #: src/helper/abstract/Helper_Abstract_Options.php:1074
1353
  msgid "Print - High Resolution"
1354
  msgstr ""
1355
 
1356
- #: src/helper/abstract/Helper_Abstract_Options.php:1075
1357
  msgid "Modify"
1358
  msgstr ""
1359
 
1360
- #: src/helper/abstract/Helper_Abstract_Options.php:1076
1361
  msgid "Annotate"
1362
  msgstr ""
1363
 
1364
- #: src/helper/abstract/Helper_Abstract_Options.php:1077
1365
  msgid "Fill Forms"
1366
  msgstr ""
1367
 
1368
- #: src/helper/abstract/Helper_Abstract_Options.php:1078
1369
  msgid "Extract"
1370
  msgstr ""
1371
 
1372
- #: src/helper/abstract/Helper_Abstract_Options.php:1079
1373
  msgid "Assemble"
1374
  msgstr ""
1375
 
1376
- #: src/helper/abstract/Helper_Abstract_Options.php:1204
1377
  msgid "Settings updated."
1378
  msgstr ""
1379
 
1380
- #: src/helper/abstract/Helper_Abstract_Options.php:1334, src/helper/abstract/Helper_Abstract_Options.php:1342, src/helper/abstract/Helper_Abstract_Options.php:1350
1381
  msgid "PDF Settings could not be saved. Please enter all required information below."
1382
  msgstr ""
1383
 
1384
- #: src/helper/abstract/Helper_Abstract_Options.php:1666
1385
  msgid "Deactivate License"
1386
  msgstr ""
1387
 
1388
- #: src/helper/abstract/Helper_Abstract_Options.php:1957, src/helper/abstract/Helper_Abstract_Options.php:1958
1389
  msgid "Select Media"
1390
  msgstr ""
1391
 
1392
- #: src/helper/abstract/Helper_Abstract_Options.php:1959
1393
  msgid "Upload File"
1394
  msgstr ""
1395
 
1396
- #: src/helper/abstract/Helper_Abstract_Options.php:2116
1397
  msgid "Width"
1398
  msgstr ""
1399
 
1400
- #: src/helper/abstract/Helper_Abstract_Options.php:2117
1401
  msgid "Height"
1402
  msgstr ""
1403
 
1404
- #: src/helper/abstract/Helper_Abstract_Options.php:2120
1405
  msgid "mm"
1406
  msgstr ""
1407
 
1408
- #: src/helper/abstract/Helper_Abstract_Options.php:2121
1409
  msgid "inches"
1410
  msgstr ""
1411
 
1412
- #: src/helper/abstract/Helper_Abstract_Options.php:2181
1413
  msgid "The callback used for the %s setting is missing."
1414
  msgstr ""
1415
 
245
  msgid "Select"
246
  msgstr ""
247
 
248
+ #: src/helper/Helper_Data.php:249
249
  msgid "Version"
250
  msgstr ""
251
 
252
+ #: src/helper/Helper_Data.php:250
253
  msgid "Group"
254
  msgstr ""
255
 
256
+ #: src/helper/Helper_Data.php:251
257
  msgid "Tags"
258
  msgstr ""
259
 
921
  msgid "Legacy"
922
  msgstr ""
923
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
924
  #: src/model/Model_Actions.php:347
925
  msgid "No configuration.php file found for site #%s"
926
  msgstr ""
1321
  msgid "User-Defined Fonts"
1322
  msgstr ""
1323
 
1324
+ #: src/helper/abstract/Helper_Abstract_Options.php:1075
1325
  msgid "Copy"
1326
  msgstr ""
1327
 
1328
+ #: src/helper/abstract/Helper_Abstract_Options.php:1076
1329
  msgid "Print - Low Resolution"
1330
  msgstr ""
1331
 
1332
+ #: src/helper/abstract/Helper_Abstract_Options.php:1077
1333
  msgid "Print - High Resolution"
1334
  msgstr ""
1335
 
1336
+ #: src/helper/abstract/Helper_Abstract_Options.php:1078
1337
  msgid "Modify"
1338
  msgstr ""
1339
 
1340
+ #: src/helper/abstract/Helper_Abstract_Options.php:1079
1341
  msgid "Annotate"
1342
  msgstr ""
1343
 
1344
+ #: src/helper/abstract/Helper_Abstract_Options.php:1080
1345
  msgid "Fill Forms"
1346
  msgstr ""
1347
 
1348
+ #: src/helper/abstract/Helper_Abstract_Options.php:1081
1349
  msgid "Extract"
1350
  msgstr ""
1351
 
1352
+ #: src/helper/abstract/Helper_Abstract_Options.php:1082
1353
  msgid "Assemble"
1354
  msgstr ""
1355
 
1356
+ #: src/helper/abstract/Helper_Abstract_Options.php:1207
1357
  msgid "Settings updated."
1358
  msgstr ""
1359
 
1360
+ #: src/helper/abstract/Helper_Abstract_Options.php:1356, src/helper/abstract/Helper_Abstract_Options.php:1364, src/helper/abstract/Helper_Abstract_Options.php:1372
1361
  msgid "PDF Settings could not be saved. Please enter all required information below."
1362
  msgstr ""
1363
 
1364
+ #: src/helper/abstract/Helper_Abstract_Options.php:1688
1365
  msgid "Deactivate License"
1366
  msgstr ""
1367
 
1368
+ #: src/helper/abstract/Helper_Abstract_Options.php:1979, src/helper/abstract/Helper_Abstract_Options.php:1980
1369
  msgid "Select Media"
1370
  msgstr ""
1371
 
1372
+ #: src/helper/abstract/Helper_Abstract_Options.php:1981
1373
  msgid "Upload File"
1374
  msgstr ""
1375
 
1376
+ #: src/helper/abstract/Helper_Abstract_Options.php:2138
1377
  msgid "Width"
1378
  msgstr ""
1379
 
1380
+ #: src/helper/abstract/Helper_Abstract_Options.php:2139
1381
  msgid "Height"
1382
  msgstr ""
1383
 
1384
+ #: src/helper/abstract/Helper_Abstract_Options.php:2142
1385
  msgid "mm"
1386
  msgstr ""
1387
 
1388
+ #: src/helper/abstract/Helper_Abstract_Options.php:2143
1389
  msgid "inches"
1390
  msgstr ""
1391
 
1392
+ #: src/helper/abstract/Helper_Abstract_Options.php:2203
1393
  msgid "The callback used for the %s setting is missing."
1394
  msgstr ""
1395
 
src/helper/Helper_PDF.php CHANGED
@@ -896,7 +896,12 @@ class Helper_PDF {
896
 
897
  $password = ( isset( $this->settings['password'] ) ) ? $this->gform->process_tags( $this->settings['password'], $this->form, $this->entry ) : '';
898
  $privileges = ( isset( $this->settings['privileges'] ) ) ? $this->settings['privileges'] : [];
899
- $master_password = ( isset( $this->settings['master_password'] ) ) ? $this->gform->process_tags( $this->settings['master_password'], $this->form, $this->entry ) : null;
 
 
 
 
 
900
 
901
  $this->mpdf->SetProtection( $privileges, $password, $master_password, 128 );
902
  }
896
 
897
  $password = ( isset( $this->settings['password'] ) ) ? $this->gform->process_tags( $this->settings['password'], $this->form, $this->entry ) : '';
898
  $privileges = ( isset( $this->settings['privileges'] ) ) ? $this->settings['privileges'] : [];
899
+ $master_password = ( isset( $this->settings['master_password'] ) ) ? $this->gform->process_tags( $this->settings['master_password'], $this->form, $this->entry ) : '';
900
+
901
+ /* GitHub Issue #662 - Fix issue with possibility of blank master password being set */
902
+ if ( strlen( $master_password ) === 0 ) {
903
+ $master_password = null;
904
+ }
905
 
906
  $this->mpdf->SetProtection( $privileges, $password, $master_password, 128 );
907
  }
src/helper/Helper_Templates.php CHANGED
@@ -405,14 +405,14 @@ class Helper_Templates {
405
  * @var array
406
  */
407
  return apply_filters( 'gfpdf_template_header_details', [
408
- 'template' => esc_html__( 'Template Name', 'gravity-forms-pdf-extended' ),
409
- 'version' => esc_html__( 'Version', 'gravity-forms-pdf-extended' ),
410
- 'description' => esc_html__( 'Description', 'gravity-forms-pdf-extended' ),
411
- 'author' => esc_html__( 'Author', 'gravity-forms-pdf-extended' ),
412
- 'author uri' => esc_html__( 'Author URI', 'gravity-forms-pdf-extended' ),
413
- 'group' => esc_html__( 'Group', 'gravity-forms-pdf-extended' ),
414
- 'required_pdf_version' => esc_html__( 'Required PDF Version', 'gravity-forms-pdf-extended' ),
415
- 'tags' => esc_html__( 'Tags', 'gravity-forms-pdf-extended' ),
416
  ] );
417
  }
418
 
405
  * @var array
406
  */
407
  return apply_filters( 'gfpdf_template_header_details', [
408
+ 'template' => 'Template Name',
409
+ 'version' => 'Version',
410
+ 'description' => 'Description',
411
+ 'author' => 'Author',
412
+ 'author uri' => 'Author URI',
413
+ 'group' => 'Group',
414
+ 'required_pdf_version' => 'Required PDF Version',
415
+ 'tags' => 'Tags',
416
  ] );
417
  }
418
 
src/helper/abstract/Helper_Abstract_Options.php CHANGED
@@ -990,7 +990,7 @@ abstract class Helper_Abstract_Options implements Helper_Interface_Filters {
990
 
991
  $custom_fonts = $this->get_custom_fonts();
992
 
993
- if ( sizeof( $custom_fonts ) > 0 ) {
994
 
995
  $user_defined_fonts = [];
996
 
@@ -1016,9 +1016,12 @@ abstract class Helper_Abstract_Options implements Helper_Interface_Filters {
1016
  public function get_custom_fonts() {
1017
  $fonts = $this->get_option( 'custom_fonts' );
1018
 
1019
- if ( is_array( $fonts ) && sizeof( $fonts ) > 0 ) {
1020
  foreach ( $fonts as &$font ) {
1021
- $font['shortname'] = $this->get_font_short_name( $font['font_name'] );
 
 
 
1022
  }
1023
 
1024
  return $fonts;
@@ -1277,6 +1280,25 @@ abstract class Helper_Abstract_Options implements Helper_Interface_Filters {
1277
  $settings['type'] = '';
1278
  }
1279
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1280
  switch ( $settings['type'] ) {
1281
  case 'rich_editor':
1282
  /**
@@ -2113,8 +2135,8 @@ abstract class Helper_Abstract_Options implements Helper_Interface_Filters {
2113
  $class = ( isset( $args['inputClass'] ) ) ? esc_attr( $args['inputClass'] ) : '';
2114
  $size = ( isset( $args['size'] ) && ! is_null( $args['size'] ) ) ? esc_attr( $args['size'] ) : 'regular';
2115
 
2116
- $html = '<input type="number" class="' . $size . '-text gfpdf_settings_' . $args['id'] . '" id="gfpdf_settings[' . $args['id'] . ']_width" min="1" name="gfpdf_settings[' . $args['id'] . '][]" value="' . esc_attr( stripslashes( $value[0] ) ) . '" required /> ' . esc_html__( 'Width', 'gravity-forms-pdf-extended' );
2117
- $html .= ' <input type="number" class="' . $size . '-text gfpdf_settings_' . $args['id'] . '" id="gfpdf_settings[' . $args['id'] . ']_height" min="1" name="gfpdf_settings[' . $args['id'] . '][]" value="' . esc_attr( stripslashes( $value[1] ) ) . '" required /> ' . esc_html__( 'Height', 'gravity-forms-pdf-extended' );
2118
 
2119
  $measurement = apply_filters( 'gfpdf_paper_size_dimensions', [
2120
  'millimeters' => esc_html__( 'mm', 'gravity-forms-pdf-extended' ),
990
 
991
  $custom_fonts = $this->get_custom_fonts();
992
 
993
+ if ( count( $custom_fonts ) > 0 ) {
994
 
995
  $user_defined_fonts = [];
996
 
1016
  public function get_custom_fonts() {
1017
  $fonts = $this->get_option( 'custom_fonts' );
1018
 
1019
+ if ( is_array( $fonts ) && count( $fonts ) > 0 ) {
1020
  foreach ( $fonts as &$font ) {
1021
+ $font['shortname'] = $this->get_font_short_name( $font['font_name'] );
1022
+ $font['italics'] = ( isset( $font['italics'] ) ) ? $font['italics'] : '';
1023
+ $font['bold'] = ( isset( $font['bold'] ) ) ? $font['bold'] : '';
1024
+ $font['bolditalics'] = ( isset( $font['bolditalics'] ) ) ? $font['bolditalics'] : '';
1025
  }
1026
 
1027
  return $fonts;
1280
  $settings['type'] = '';
1281
  }
1282
 
1283
+ /*
1284
+ * Skip over any fields that shouldn't have sanitisation
1285
+ * By default, that's the JSON-encoded conditionalLogic field
1286
+ *
1287
+ * @since 4.2.2
1288
+ */
1289
+ $ignored_fields = apply_filters(
1290
+ 'gfpdf_sanitize_ignored_fields',
1291
+ [ 'conditionalLogic' ],
1292
+ $value,
1293
+ $key,
1294
+ $input,
1295
+ $settings
1296
+ );
1297
+
1298
+ if ( in_array( $key, $ignored_fields ) ) {
1299
+ return $value;
1300
+ }
1301
+
1302
  switch ( $settings['type'] ) {
1303
  case 'rich_editor':
1304
  /**
2135
  $class = ( isset( $args['inputClass'] ) ) ? esc_attr( $args['inputClass'] ) : '';
2136
  $size = ( isset( $args['size'] ) && ! is_null( $args['size'] ) ) ? esc_attr( $args['size'] ) : 'regular';
2137
 
2138
+ $html = '<input type="number" class="' . $size . '-text gfpdf_settings_' . $args['id'] . '" id="gfpdf_settings[' . $args['id'] . ']_width" min="0" name="gfpdf_settings[' . $args['id'] . '][]" value="' . esc_attr( stripslashes( $value[0] ) ) . '" /> ' . esc_html__( 'Width', 'gravity-forms-pdf-extended' );
2139
+ $html .= ' <input type="number" class="' . $size . '-text gfpdf_settings_' . $args['id'] . '" id="gfpdf_settings[' . $args['id'] . ']_height" min="0" name="gfpdf_settings[' . $args['id'] . '][]" value="' . esc_attr( stripslashes( $value[1] ) ) . '" /> ' . esc_html__( 'Height', 'gravity-forms-pdf-extended' );
2140
 
2141
  $measurement = apply_filters( 'gfpdf_paper_size_dimensions', [
2142
  'millimeters' => esc_html__( 'mm', 'gravity-forms-pdf-extended' ),
src/view/html/Settings/tabs.php CHANGED
@@ -38,6 +38,6 @@ if ( ! defined( 'ABSPATH' ) ) {
38
 
39
  <h2 class="nav-tab-wrapper">
40
  <?php foreach ( $args['tabs'] as $tab ): ?>
41
- <a class="nav-tab <?php echo ( $args['selected'] == $tab['id'] ) ? 'nav-tab-active' : ''; ?>" href="<?php echo $args['data']->settings_url . '&amp;tab=' . $tab['id']; ?>"><?php echo $tab['name']; ?></a>
42
  <?php endforeach; ?>
43
  </h2>
38
 
39
  <h2 class="nav-tab-wrapper">
40
  <?php foreach ( $args['tabs'] as $tab ): ?>
41
+ <a data-id="<?php echo esc_attr( $tab['id'] ); ?>" class="nav-tab <?php echo ( $args['selected'] == $tab['id'] ) ? 'nav-tab-active' : ''; ?>" href="<?php echo $args['data']->settings_url . '&amp;tab=' . $tab['id']; ?>"><?php echo $tab['name']; ?></a>
42
  <?php endforeach; ?>
43
  </h2>
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInitfe9e5b51941cafd836fe28a6375b8e31::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInit11ca64afadb515307ce04aaa5c3263ad::getLoader();
vendor/blueliquiddesigns/mpdf/Tag.php CHANGED
@@ -1910,6 +1910,17 @@ class Tag
1910
  /* -- BORDER-RADIUS -- */
1911
  // Automatically increase padding if required for border-radius
1912
  if ($this->mpdf->autoPadding && !$this->mpdf->ColActive) {
 
 
 
 
 
 
 
 
 
 
 
1913
  if ($currblk['border_radius_TL_H'] > $currblk['padding_left'] && $currblk['border_radius_TL_V'] > $currblk['padding_top']) {
1914
  if ($currblk['border_radius_TL_H'] > $currblk['border_radius_TL_V']) {
1915
  $this->mpdf->_borderPadding($currblk['border_radius_TL_H'], $currblk['border_radius_TL_V'], $currblk['padding_left'], $currblk['padding_top']);
@@ -4963,7 +4974,7 @@ class Tag
4963
  $objattr = array();
4964
  $objattr['type'] = 'toc';
4965
  $objattr['toclevel'] = $this->mpdf->h2toc[$tag];
4966
- $objattr['CONTENT'] = htmlspecialchars($content);
4967
  $e = "\xbb\xa4\xactype=toc,objattr=" . serialize($objattr) . "\xbb\xa4\xac";
4968
  array_unshift($this->mpdf->textbuffer, array($e));
4969
  }
1910
  /* -- BORDER-RADIUS -- */
1911
  // Automatically increase padding if required for border-radius
1912
  if ($this->mpdf->autoPadding && !$this->mpdf->ColActive) {
1913
+
1914
+ /* Fix PHP Notices when these array keys aren't set */
1915
+ $currblk['border_radius_TL_H'] = ( isset( $currblk['border_radius_TL_H'] ) ) ? $currblk['border_radius_TL_H'] : 0;
1916
+ $currblk['border_radius_TL_V'] = ( isset( $currblk['border_radius_TL_V'] ) ) ? $currblk['border_radius_TL_V'] : 0;
1917
+ $currblk['border_radius_TR_H'] = ( isset( $currblk['border_radius_TR_H'] ) ) ? $currblk['border_radius_TR_H'] : 0;
1918
+ $currblk['border_radius_TR_V'] = ( isset( $currblk['border_radius_TR_V'] ) ) ? $currblk['border_radius_TR_V'] : 0;
1919
+ $currblk['border_radius_BL_H'] = ( isset( $currblk['border_radius_BL_H'] ) ) ? $currblk['border_radius_BL_H'] : 0;
1920
+ $currblk['border_radius_BL_V'] = ( isset( $currblk['border_radius_BL_V'] ) ) ? $currblk['border_radius_BL_V'] : 0;
1921
+ $currblk['border_radius_BR_H'] = ( isset( $currblk['border_radius_BR_H'] ) ) ? $currblk['border_radius_BR_H'] : 0;
1922
+ $currblk['border_radius_BR_V'] = ( isset( $currblk['border_radius_BR_V'] ) ) ? $currblk['border_radius_BR_V'] : 0;
1923
+
1924
  if ($currblk['border_radius_TL_H'] > $currblk['padding_left'] && $currblk['border_radius_TL_V'] > $currblk['padding_top']) {
1925
  if ($currblk['border_radius_TL_H'] > $currblk['border_radius_TL_V']) {
1926
  $this->mpdf->_borderPadding($currblk['border_radius_TL_H'], $currblk['border_radius_TL_V'], $currblk['padding_left'], $currblk['padding_top']);
4974
  $objattr = array();
4975
  $objattr['type'] = 'toc';
4976
  $objattr['toclevel'] = $this->mpdf->h2toc[$tag];
4977
+ $objattr['CONTENT'] = htmlspecialchars(utf8_encode($content));
4978
  $e = "\xbb\xa4\xactype=toc,objattr=" . serialize($objattr) . "\xbb\xa4\xac";
4979
  array_unshift($this->mpdf->textbuffer, array($e));
4980
  }
vendor/blueliquiddesigns/mpdf/classes/cssmgr.php CHANGED
@@ -920,7 +920,7 @@ class cssmgr
920
  }
921
  }
922
  }
923
- if (!$new['col']) {
924
  $new['col'] = $this->mpdf->ConvertColor('#888888');
925
  }
926
  if (isset($new['y'])) {
920
  }
921
  }
922
  }
923
+ if (empty($new['col'])) {
924
  $new['col'] = $this->mpdf->ConvertColor('#888888');
925
  }
926
  if (isset($new['y'])) {
vendor/blueliquiddesigns/mpdf/classes/directw.php CHANGED
@@ -10,7 +10,7 @@ class directw
10
  $this->mpdf = $mpdf;
11
  }
12
 
13
- function Write($h, $txt, $currentx = 0, $link = '', $directionality = 'ltr', $align = '')
14
  {
15
  if (!$align) {
16
  if ($directionality == 'rtl') {
10
  $this->mpdf = $mpdf;
11
  }
12
 
13
+ function Write($h, $txt, $currentx = 0, $link = '', $directionality = 'ltr', $align = '', $fill = 0)
14
  {
15
  if (!$align) {
16
  if ($directionality == 'rtl') {
vendor/blueliquiddesigns/mpdf/classes/svg.php CHANGED
@@ -3496,7 +3496,9 @@ class SVG
3496
  $last_gradid = '';
3497
  break;
3498
  case "text":
3499
- $svg_class->txt_data[2] = rtrim($svg_class->txt_data[2]); // mPDF 5.7.4
 
 
3500
  $path_cmd = $svg_class->svgText();
3501
  $svg_class->textoutput .= $path_cmd; // mPDF 5.7.4
3502
  $tmp = count($svg_class->svg_style) - 1;
@@ -3537,7 +3539,7 @@ class SVG
3537
  $svg_class->textoutput .= $p_cmd;
3538
  $tmp = count($svg_class->svg_style) - 1;
3539
  $current_style = $svg_class->svg_style[$tmp];
3540
- if ($current_style['transformations']) {
3541
  $svg_class->textoutput .= " Q\n";
3542
  }
3543
  array_pop($svg_class->svg_style);
3496
  $last_gradid = '';
3497
  break;
3498
  case "text":
3499
+ if (!empty($svg_class->txt_data[2])) {
3500
+ $svg_class->txt_data[2] = rtrim( $svg_class->txt_data[2] ); // mPDF 5.7.4
3501
+ }
3502
  $path_cmd = $svg_class->svgText();
3503
  $svg_class->textoutput .= $path_cmd; // mPDF 5.7.4
3504
  $tmp = count($svg_class->svg_style) - 1;
3539
  $svg_class->textoutput .= $p_cmd;
3540
  $tmp = count($svg_class->svg_style) - 1;
3541
  $current_style = $svg_class->svg_style[$tmp];
3542
+ if (!empty($current_style['transformations'])) {
3543
  $svg_class->textoutput .= " Q\n";
3544
  }
3545
  array_pop($svg_class->svg_style);
vendor/blueliquiddesigns/mpdf/config.php CHANGED
@@ -113,8 +113,14 @@ $this->ICCProfile = ''; // Colour profile OutputIntent
113
  // Must be CMYK for PDFX, or appropriate type for PDFA(RGB or CMYK)
114
 
115
  // DEBUGGING & DEVELOPERS
116
- $this->showStats = (defined('WP_DEBUG') && WP_DEBUG === true) ? true : false;;
117
- $this->debug = (defined('WP_DEBUG') && WP_DEBUG === true) ? true : false;;
 
 
 
 
 
 
118
  $this->debugfonts = false;; // Checks and reports on errors when parsing TTF files - adds significantly to processing time
119
  $this->showImageErrors = false;
120
  $this->table_error_report = false; // Die and report error if table is too wide to contain whole words
113
  // Must be CMYK for PDFX, or appropriate type for PDFA(RGB or CMYK)
114
 
115
  // DEBUGGING & DEVELOPERS
116
+ if ( defined( 'WP_DEBUG' ) && defined( 'WP_DEBUG_DISPLAY' ) && WP_DEBUG && WP_DEBUG_DISPLAY ) {
117
+ $this->showStats = true;
118
+ $this->debug = true;
119
+ } else {
120
+ $this->showStats = false;
121
+ $this->debug = false;
122
+ }
123
+
124
  $this->debugfonts = false;; // Checks and reports on errors when parsing TTF files - adds significantly to processing time
125
  $this->showImageErrors = false;
126
  $this->table_error_report = false; // Die and report error if table is too wide to contain whole words
vendor/blueliquiddesigns/mpdf/mpdf.php CHANGED
@@ -5985,7 +5985,7 @@ class mPDF
5985
 
5986
  /* -- DIRECTW -- */
5987
 
5988
- function Write($h, $txt, $currentx = 0, $link = '', $directionality = 'ltr', $align = '')
5989
  {
5990
  if (!class_exists('directw', false)) {
5991
  include(_MPDF_PATH . 'classes/directw.php');
@@ -5993,7 +5993,7 @@ class mPDF
5993
  if (empty($this->directw)) {
5994
  $this->directw = new directw($this);
5995
  }
5996
- $this->directw->Write($h, $txt, $currentx, $link, $directionality, $align);
5997
  }
5998
 
5999
  /* -- END DIRECTW -- */
@@ -9709,7 +9709,6 @@ class mPDF
9709
  $annot = '';
9710
  $rect = sprintf('%.3F %.3F %.3F %.3F', $pl[0], $pl[1], $pl[0] + $pl[2], $pl[1] - $pl[3]);
9711
  $annot .= '<</Type /Annot /Subtype /Link /Rect [' . $rect . ']';
9712
- $annot .= ' /Contents ' . $this->_UTF16BEtextstring($pl[4]);
9713
  $annot .= ' /NM ' . $this->_textstring(sprintf('%04u-%04u', $n, $key));
9714
  $annot .= ' /M ' . $this->_textstring('D:' . date('YmdHis'));
9715
  $annot .= ' /Border [0 0 0]';
@@ -12768,6 +12767,7 @@ class mPDF
12768
  curl_setopt($ch, CURLOPT_NOBODY, 0);
12769
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
12770
  curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
 
12771
  $data = curl_exec($ch);
12772
  curl_close($ch);
12773
  }
@@ -12801,7 +12801,7 @@ class mPDF
12801
  if (!$s) {
12802
  return false;
12803
  }
12804
- $httpheader .= $s;
12805
  while (!feof($fh)) {
12806
  $s = fgets($fh, 1024);
12807
  if ($s == "\r\n") {
@@ -23203,10 +23203,10 @@ class mPDF
23203
  else {
23204
  $xadj2 = $Tw / 2 - $bsh / 2;
23205
  }
23206
- if (!$bSeparate && $details['mbw']['TL']) {
23207
  $xadj = ($Tw - $details['mbw']['TL']) / 2;
23208
  }
23209
- if (!$bSeparate && $details['mbw']['TR']) {
23210
  $xadj2 = ($Tw - $details['mbw']['TR']) / 2;
23211
  }
23212
  $print = true;
@@ -23269,10 +23269,10 @@ class mPDF
23269
  $yadj2 = $Rw / 2 - $bsv / 2;
23270
  }
23271
 
23272
- if (!$bSeparate && $details['mbw']['RT']) {
23273
  $yadj = ($Rw - $details['mbw']['RT']) / 2;
23274
  }
23275
- if (!$bSeparate && $details['mbw']['RB']) {
23276
  $yadj2 = ($Rw - $details['mbw']['RB']) / 2;
23277
  }
23278
  $print = true;
@@ -23301,10 +23301,10 @@ class mPDF
23301
  else {
23302
  $xadj2 = $Bw / 2 - $bsh / 2;
23303
  }
23304
- if (!$bSeparate && $details['mbw']['BL']) {
23305
  $xadj = ($Bw - $details['mbw']['BL']) / 2;
23306
  }
23307
- if (!$bSeparate && $details['mbw']['BR']) {
23308
  $xadj2 = ($Bw - $details['mbw']['BR']) / 2;
23309
  }
23310
  $print = true;
@@ -23857,7 +23857,7 @@ class mPDF
23857
 
23858
 
23859
  // Style set on cell vs. table
23860
- elseif ($celladj['border_details']['T']['dom'] > $cbord['border_details']['B']['dom']) {
23861
  if ($ccolsp < 2) { // don't overwrite this cell if it spans
23862
  $cbord['border_details']['B'] = $celladj['border_details']['T'];
23863
  $this->setBorder($celladj['border'], _BORDER_TOP);
@@ -25641,12 +25641,12 @@ class mPDF
25641
  $this->_out('/Subtype /Form');
25642
  $this->_out('/FormType 1');
25643
  // Left/Bottom/Right/Top
25644
- $this->_out(sprintf('/BBox [%.2F %.2F %.2F %.2F]', $tpl['box']['x'] * _MPDFK, $tpl['box']['y'] * _MPDFK, ($tpl['box']['x'] + $tpl['box']['w']) * _MPDFK, ($tpl['box']['y'] + $tpl['box']['h']) * _MPDFK)
25645
- );
25646
 
 
 
 
25647
 
25648
- if (isset($tpl['box']))
25649
- $this->_out(sprintf('/Matrix [1 0 0 1 %.5F %.5F]', -$tpl['box']['x'] * _MPDFK, -$tpl['box']['y'] * _MPDFK));
25650
  $this->_out('/Resources ');
25651
 
25652
  if (isset($tpl['resources'])) {
@@ -30846,6 +30846,8 @@ class mPDF
30846
  }
30847
 
30848
  $this->enableImports = true;
 
 
30849
  }
30850
 
30851
  // from mPDFI
@@ -30859,6 +30861,70 @@ class mPDF
30859
  return current(unpack("H*", $str));
30860
  }
30861
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30862
  function pdf_write_value(&$value)
30863
  {
30864
  switch ($value[0]) {
@@ -30912,6 +30978,7 @@ class mPDF
30912
 
30913
  case pdf_parser::TYPE_STRING :
30914
  if ($this->encrypted) {
 
30915
  $value[1] = $this->_RC4($this->_objectkey($this->_current_obj_id), $value[1]);
30916
  $value[1] = $this->_escape($value[1]);
30917
  }
5985
 
5986
  /* -- DIRECTW -- */
5987
 
5988
+ function Write($h, $txt, $currentx = 0, $link = '', $directionality = 'ltr', $align = '', $fill = 0)
5989
  {
5990
  if (!class_exists('directw', false)) {
5991
  include(_MPDF_PATH . 'classes/directw.php');
5993
  if (empty($this->directw)) {
5994
  $this->directw = new directw($this);
5995
  }
5996
+ $this->directw->Write($h, $txt, $currentx, $link, $directionality, $align, $fill);
5997
  }
5998
 
5999
  /* -- END DIRECTW -- */
9709
  $annot = '';
9710
  $rect = sprintf('%.3F %.3F %.3F %.3F', $pl[0], $pl[1], $pl[0] + $pl[2], $pl[1] - $pl[3]);
9711
  $annot .= '<</Type /Annot /Subtype /Link /Rect [' . $rect . ']';
 
9712
  $annot .= ' /NM ' . $this->_textstring(sprintf('%04u-%04u', $n, $key));
9713
  $annot .= ' /M ' . $this->_textstring('D:' . date('YmdHis'));
9714
  $annot .= ' /Border [0 0 0]';
12767
  curl_setopt($ch, CURLOPT_NOBODY, 0);
12768
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
12769
  curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
12770
+ curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
12771
  $data = curl_exec($ch);
12772
  curl_close($ch);
12773
  }
12801
  if (!$s) {
12802
  return false;
12803
  }
12804
+
12805
  while (!feof($fh)) {
12806
  $s = fgets($fh, 1024);
12807
  if ($s == "\r\n") {
23203
  else {
23204
  $xadj2 = $Tw / 2 - $bsh / 2;
23205
  }
23206
+ if (!$bSeparate && !empty($details['mbw']) && !empty($details['mbw']['TL'])) {
23207
  $xadj = ($Tw - $details['mbw']['TL']) / 2;
23208
  }
23209
+ if (!$bSeparate && !empty($details['mbw']) && !empty($details['mbw']['TR'])) {
23210
  $xadj2 = ($Tw - $details['mbw']['TR']) / 2;
23211
  }
23212
  $print = true;
23269
  $yadj2 = $Rw / 2 - $bsv / 2;
23270
  }
23271
 
23272
+ if (!$bSeparate && !empty($details['mbw']) && !empty($details['mbw']['RT'])) {
23273
  $yadj = ($Rw - $details['mbw']['RT']) / 2;
23274
  }
23275
+ if (!$bSeparate && !empty($details['mbw']) && !empty($details['mbw']['RB'])) {
23276
  $yadj2 = ($Rw - $details['mbw']['RB']) / 2;
23277
  }
23278
  $print = true;
23301
  else {
23302
  $xadj2 = $Bw / 2 - $bsh / 2;
23303
  }
23304
+ if (!$bSeparate && isset($details['mbw']) && isset($details['mbw']['BL'])) {
23305
  $xadj = ($Bw - $details['mbw']['BL']) / 2;
23306
  }
23307
+ if (!$bSeparate && isset($details['mbw']) && isset($details['mbw']['BR'])) {
23308
  $xadj2 = ($Bw - $details['mbw']['BR']) / 2;
23309
  }
23310
  $print = true;
23857
 
23858
 
23859
  // Style set on cell vs. table
23860
+ elseif (isset($celladj['border_details']['T']['dom']) && isset($cbord['border_details']['B']['dom']) && $celladj['border_details']['T']['dom'] > $cbord['border_details']['B']['dom']) {
23861
  if ($ccolsp < 2) { // don't overwrite this cell if it spans
23862
  $cbord['border_details']['B'] = $celladj['border_details']['T'];
23863
  $this->setBorder($celladj['border'], _BORDER_TOP);
25641
  $this->_out('/Subtype /Form');
25642
  $this->_out('/FormType 1');
25643
  // Left/Bottom/Right/Top
25644
+ $this->_out(sprintf('/BBox [%.2F %.2F %.2F %.2F]', floatval($tpl['box']['x']) * _MPDFK, floatval($tpl['box']['y']) * _MPDFK, (floatval($tpl['box']['x']) + floatval($tpl['box']['w'])) * _MPDFK, (floatval($tpl['box']['y']) + floatval($tpl['box']['h'])) * _MPDFK));
 
25645
 
25646
+ if (isset($tpl['box'])) {
25647
+ $this->_out( sprintf( '/Matrix [1 0 0 1 %.5F %.5F]', -1 * floatval( $tpl['box']['x'] ) * _MPDFK, -1 * floatval( $tpl['box']['y'] ) * _MPDFK ) );
25648
+ }
25649
 
 
 
25650
  $this->_out('/Resources ');
25651
 
25652
  if (isset($tpl['resources'])) {
30846
  }
30847
 
30848
  $this->enableImports = true;
30849
+
30850
+ apply_filters( 'mpdf_import_use', $this );
30851
  }
30852
 
30853
  // from mPDFI
30861
  return current(unpack("H*", $str));
30862
  }
30863
 
30864
+ /**
30865
+ * Un-escapes a PDF string
30866
+ *
30867
+ * @param string $s
30868
+ * @return string
30869
+ */
30870
+ function _unescape($s)
30871
+ {
30872
+ $out = '';
30873
+ for ($count = 0, $n = strlen($s); $count < $n; $count++) {
30874
+ if ($s[$count] != '\\' || $count == $n-1) {
30875
+ $out .= $s[$count];
30876
+ } else {
30877
+ switch ($s[++$count]) {
30878
+ case ')':
30879
+ case '(':
30880
+ case '\\':
30881
+ $out .= $s[$count];
30882
+ break;
30883
+ case 'f':
30884
+ $out .= chr(0x0C);
30885
+ break;
30886
+ case 'b':
30887
+ $out .= chr(0x08);
30888
+ break;
30889
+ case 't':
30890
+ $out .= chr(0x09);
30891
+ break;
30892
+ case 'r':
30893
+ $out .= chr(0x0D);
30894
+ break;
30895
+ case 'n':
30896
+ $out .= chr(0x0A);
30897
+ break;
30898
+ case "\r":
30899
+ if ($count != $n-1 && $s[$count+1] == "\n") {
30900
+ $count++;
30901
+ }
30902
+ break;
30903
+ case "\n":
30904
+ break;
30905
+ default:
30906
+ // Octal-Values
30907
+ if (ord($s[$count]) >= ord('0') &&
30908
+ ord($s[$count]) <= ord('9')) {
30909
+ $oct = ''. $s[$count];
30910
+ if (ord($s[$count+1]) >= ord('0') &&
30911
+ ord($s[$count+1]) <= ord('9')) {
30912
+ $oct .= $s[++$count];
30913
+ if (ord($s[$count+1]) >= ord('0') &&
30914
+ ord($s[$count+1]) <= ord('9')) {
30915
+ $oct .= $s[++$count];
30916
+ }
30917
+ }
30918
+ $out .= chr(octdec($oct));
30919
+ } else {
30920
+ $out .= $s[$count];
30921
+ }
30922
+ }
30923
+ }
30924
+ }
30925
+ return $out;
30926
+ }
30927
+
30928
  function pdf_write_value(&$value)
30929
  {
30930
  switch ($value[0]) {
30978
 
30979
  case pdf_parser::TYPE_STRING :
30980
  if ($this->encrypted) {
30981
+ $value[1] = $this->_unescape($value[1]);
30982
  $value[1] = $this->_RC4($this->_objectkey($this->_current_obj_id), $value[1]);
30983
  $value[1] = $this->_escape($value[1]);
30984
  }
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInitfe9e5b51941cafd836fe28a6375b8e31
6
  {
7
  private static $loader;
8
 
@@ -19,15 +19,15 @@ class ComposerAutoloaderInitfe9e5b51941cafd836fe28a6375b8e31
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInitfe9e5b51941cafd836fe28a6375b8e31', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInitfe9e5b51941cafd836fe28a6375b8e31', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
- call_user_func(\Composer\Autoload\ComposerStaticInitfe9e5b51941cafd836fe28a6375b8e31::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
@@ -48,19 +48,19 @@ class ComposerAutoloaderInitfe9e5b51941cafd836fe28a6375b8e31
48
  $loader->register(true);
49
 
50
  if ($useStaticLoader) {
51
- $includeFiles = Composer\Autoload\ComposerStaticInitfe9e5b51941cafd836fe28a6375b8e31::$files;
52
  } else {
53
  $includeFiles = require __DIR__ . '/autoload_files.php';
54
  }
55
  foreach ($includeFiles as $fileIdentifier => $file) {
56
- composerRequirefe9e5b51941cafd836fe28a6375b8e31($fileIdentifier, $file);
57
  }
58
 
59
  return $loader;
60
  }
61
  }
62
 
63
- function composerRequirefe9e5b51941cafd836fe28a6375b8e31($fileIdentifier, $file)
64
  {
65
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
66
  require $file;
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInit11ca64afadb515307ce04aaa5c3263ad
6
  {
7
  private static $loader;
8
 
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInit11ca64afadb515307ce04aaa5c3263ad', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInit11ca64afadb515307ce04aaa5c3263ad', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
+ call_user_func(\Composer\Autoload\ComposerStaticInit11ca64afadb515307ce04aaa5c3263ad::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
48
  $loader->register(true);
49
 
50
  if ($useStaticLoader) {
51
+ $includeFiles = Composer\Autoload\ComposerStaticInit11ca64afadb515307ce04aaa5c3263ad::$files;
52
  } else {
53
  $includeFiles = require __DIR__ . '/autoload_files.php';
54
  }
55
  foreach ($includeFiles as $fileIdentifier => $file) {
56
+ composerRequire11ca64afadb515307ce04aaa5c3263ad($fileIdentifier, $file);
57
  }
58
 
59
  return $loader;
60
  }
61
  }
62
 
63
+ function composerRequire11ca64afadb515307ce04aaa5c3263ad($fileIdentifier, $file)
64
  {
65
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
66
  require $file;
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInitfe9e5b51941cafd836fe28a6375b8e31
8
  {
9
  public static $files = array (
10
  'e9b046393eb3376a21bcc1a30bd2fe64' => __DIR__ . '/..' . '/querypath/querypath/src/qp_functions.php',
@@ -383,10 +383,10 @@ class ComposerStaticInitfe9e5b51941cafd836fe28a6375b8e31
383
  public static function getInitializer(ClassLoader $loader)
384
  {
385
  return \Closure::bind(function () use ($loader) {
386
- $loader->prefixLengthsPsr4 = ComposerStaticInitfe9e5b51941cafd836fe28a6375b8e31::$prefixLengthsPsr4;
387
- $loader->prefixDirsPsr4 = ComposerStaticInitfe9e5b51941cafd836fe28a6375b8e31::$prefixDirsPsr4;
388
- $loader->prefixesPsr0 = ComposerStaticInitfe9e5b51941cafd836fe28a6375b8e31::$prefixesPsr0;
389
- $loader->classMap = ComposerStaticInitfe9e5b51941cafd836fe28a6375b8e31::$classMap;
390
 
391
  }, null, ClassLoader::class);
392
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInit11ca64afadb515307ce04aaa5c3263ad
8
  {
9
  public static $files = array (
10
  'e9b046393eb3376a21bcc1a30bd2fe64' => __DIR__ . '/..' . '/querypath/querypath/src/qp_functions.php',
383
  public static function getInitializer(ClassLoader $loader)
384
  {
385
  return \Closure::bind(function () use ($loader) {
386
+ $loader->prefixLengthsPsr4 = ComposerStaticInit11ca64afadb515307ce04aaa5c3263ad::$prefixLengthsPsr4;
387
+ $loader->prefixDirsPsr4 = ComposerStaticInit11ca64afadb515307ce04aaa5c3263ad::$prefixDirsPsr4;
388
+ $loader->prefixesPsr0 = ComposerStaticInit11ca64afadb515307ce04aaa5c3263ad::$prefixesPsr0;
389
+ $loader->classMap = ComposerStaticInit11ca64afadb515307ce04aaa5c3263ad::$classMap;
390
 
391
  }, null, ClassLoader::class);
392
  }
vendor/composer/installed.json CHANGED
@@ -57,12 +57,12 @@
57
  "source": {
58
  "type": "git",
59
  "url": "https://github.com/GravityPDF/mpdf.git",
60
- "reference": "20be3b67427d474a672bca531988a956d9e58d12"
61
  },
62
  "dist": {
63
  "type": "zip",
64
- "url": "https://api.github.com/repos/GravityPDF/mpdf/zipball/20be3b67427d474a672bca531988a956d9e58d12",
65
- "reference": "20be3b67427d474a672bca531988a956d9e58d12",
66
  "shasum": ""
67
  },
68
  "require": {
@@ -76,7 +76,7 @@
76
  "suggest": {
77
  "ext-zlib": "Needed for compression of embedded resources, such as fonts"
78
  },
79
- "time": "2017-01-24T12:09:58+00:00",
80
  "type": "library",
81
  "installation-source": "dist",
82
  "autoload": {
57
  "source": {
58
  "type": "git",
59
  "url": "https://github.com/GravityPDF/mpdf.git",
60
+ "reference": "143e0e2e431fd62e09364cfdae36081e5b7daf7d"
61
  },
62
  "dist": {
63
  "type": "zip",
64
+ "url": "https://api.github.com/repos/GravityPDF/mpdf/zipball/143e0e2e431fd62e09364cfdae36081e5b7daf7d",
65
+ "reference": "143e0e2e431fd62e09364cfdae36081e5b7daf7d",
66
  "shasum": ""
67
  },
68
  "require": {
76
  "suggest": {
77
  "ext-zlib": "Needed for compression of embedded resources, such as fonts"
78
  },
79
+ "time": "2017-08-07T05:52:58+00:00",
80
  "type": "library",
81
  "installation-source": "dist",
82
  "autoload": {