├── .gitignore ├── index.php ├── js ├── index.php ├── floatmenu_init.min.js ├── tooltip_init.min.js ├── floatmenu_init.js ├── tooltip_init.js ├── forms.min.js ├── menu.min.js ├── datepicker.min.js ├── preview.min.js ├── menu.js ├── jquery.json-1.3.min.js ├── forms.js ├── jquery.json.min.js ├── jquery.textareaCounter.plugin.min.js ├── datepicker.js └── preview.js ├── css ├── index.php ├── shortcode-ui-editor-styles.min.css ├── chosen-sprite.png ├── shortcode-ui-editor-styles.css ├── chosen-sprite@2x.png ├── reset.min.css ├── forms.css ├── dashicons.min.css ├── dashicons.css ├── tooltip.min.css ├── ui.min.css ├── shortcode-ui.min.css ├── blocks.min.css ├── reset.css ├── shortcode-ui.css ├── blocks.min.css.map ├── jquery-ui.min.css ├── ui.tabs.css ├── tooltip.css └── jquery-ui.custom.css ├── fonts ├── index.php ├── FontAwesome.otf ├── dashicons.eot ├── dashicons.ttf ├── dashicons.woff ├── gravityfont.eot ├── gravityfont.ttf ├── gravityfont.woff ├── fontawesome-webfont.eot ├── fontawesome-webfont.ttf ├── fontawesome-webfont.woff ├── fontawesome-webfont.woff2 └── dashicons.svg ├── images ├── index.php ├── datepicker │ ├── index.php │ ├── arrow.png │ ├── ui-icons_222222_256x240.png │ ├── ui-icons_454545_256x240.png │ ├── ui-icons_888888_256x240.png │ └── ui-icons_cd0a0a_256x240.png ├── doctypes │ ├── index.php │ ├── icon_css.gif │ ├── icon_doc.gif │ ├── icon_fla.gif │ ├── icon_js.gif │ ├── icon_log.gif │ ├── icon_mov.gif │ ├── icon_pdf.gif │ ├── icon_php.gif │ ├── icon_ppt.gif │ ├── icon_psd.gif │ ├── icon_sql.gif │ ├── icon_swf.gif │ ├── icon_txt.gif │ ├── icon_xls.gif │ ├── icon_xml.gif │ ├── icon_zip.gif │ ├── icon_audio.gif │ ├── icon_html.gif │ ├── icon_image.gif │ ├── icon_video.gif │ └── icon_generic.gif ├── add.png ├── color.png ├── star0.png ├── star1.png ├── tick.png ├── xit.gif ├── active0.png ├── active1.png ├── delete.png ├── remove.png ├── spinner.gif ├── blankspace.png ├── calendar.png ├── download.png ├── prodlist.png ├── arrow-right.png ├── captcha_dark.jpg ├── exclamation.png ├── preview_grid.gif ├── arrow-rightleft.png ├── captcha_large.png ├── captcha_light.jpg ├── captcha_medium.png ├── captcha_small.png ├── icon-drop-list.png ├── prodlist-last.png ├── prodlist_last.png ├── gf-new-option-bg.png ├── gf-nofields-steps.png ├── gf-pagebreak-end.png ├── icon-submenu-down.png ├── rich-text-editor.png ├── gf-creditcard-icons.png ├── gf-media-button-bg.jpg ├── gf-pagebreak-first.png ├── gf-pagebreak-inline.png ├── captcha_invisible_dark.jpg ├── gf-expand-title-bg-rtl.png ├── webkit-enhanced-select.png ├── captcha_invisible_light.jpg ├── gf-fieldsettings-header.jpg ├── gravityforms-business-upgrade.png ├── gravityforms-developer-upgrade.png ├── list-remove.svg ├── list-add.svg └── note-placeholder.svg ├── includes ├── index.php ├── addon │ ├── index.php │ ├── js │ │ ├── index.php │ │ ├── gaddon_selectcustom.min.js │ │ ├── gaddon_selectcustom.js │ │ ├── gaddon_payment.min.js │ │ ├── gaddon_feedorder.min.js │ │ ├── gaddon_token.min.js │ │ ├── gaddon_payment.js │ │ ├── gaddon_fieldmap.min.js │ │ ├── gaddon_genericmap.min.js │ │ ├── gaddon_feedorder.js │ │ ├── gaddon_frontend.min.js │ │ ├── gaddon_token.js │ │ └── repeater.min.js │ ├── css │ │ ├── index.php │ │ ├── gaddon_form_settings.min.css │ │ ├── gaddon_form_settings.css │ │ └── gaddon_results.min.css │ ├── images │ │ ├── field-map-reset.png │ │ └── field-map-buttons.png │ └── class-gf-addon-locking.php ├── fields │ ├── index.php │ ├── class-gf-field-shipping.php │ ├── class-gf-field-product.php │ ├── class-gf-field-option.php │ ├── class-gf-field-quantity.php │ ├── class-gf-field-post-category.php │ ├── class-gf-field-section.php │ ├── class-gf-field-post-content.php │ ├── class-gf-field-page.php │ ├── class-gf-field-post-tags.php │ ├── class-gf-field-post-custom-field.php │ ├── class-gf-field-singleshipping.php │ ├── class-gf-field-price.php │ ├── class-gf-field-html.php │ ├── class-gf-field-donation.php │ ├── class-gf-field-hidden.php │ ├── class-gf-fields.php │ ├── class-gf-field-total.php │ └── class-gf-field-post-title.php ├── locking │ ├── index.php │ ├── css │ │ ├── index.php │ │ ├── locking-list.min.css │ │ ├── locking-list.css │ │ ├── locking.min.css │ │ └── locking.css │ ├── js │ │ ├── index.php │ │ ├── locking-view.min.js │ │ ├── locking-list.min.js │ │ ├── locking-view.js │ │ ├── locking-list.js │ │ └── locking.min.js │ └── images │ │ ├── index.php │ │ └── lock.png ├── webapi │ ├── index.php │ ├── css │ │ ├── index.php │ │ ├── gfwebapi_settings.min.css │ │ └── gfwebapi_settings.css │ ├── js │ │ ├── index.php │ │ ├── enc-base64-min.min.js │ │ ├── enc-base64-min.js │ │ ├── gfwebapi_settings.min.js │ │ └── gfwebapi_settings.js │ └── v2 │ │ ├── index.php │ │ ├── includes │ │ ├── index.php │ │ └── controllers │ │ │ ├── index.php │ │ │ └── class-controller-form-results.php │ │ ├── class-gf-rest-api.php │ │ └── restapi.php ├── phpqrcode │ └── index.php ├── wizard │ ├── steps │ │ ├── class-gf-installation-wizard-step-complete.php │ │ └── class-gf-installation-wizard-step-license-key.php │ └── class-gf-upgrade-wizard.php ├── query │ ├── class-gf-query-json-literal.php │ ├── class-gf-query-series.php │ └── class-gf-query-literal.php ├── blocks │ └── class-gf-blocks.php └── class-gf-background-upgrader.php ├── languages ├── index.php ├── gravityforms-af.mo ├── gravityforms-ar.mo ├── gravityforms-ca.mo ├── gravityforms-fi.mo ├── gravityforms-ja.mo ├── gravityforms-bg_BG.mo ├── gravityforms-bn_BD.mo ├── gravityforms-cs_CZ.mo ├── gravityforms-da_DK.mo ├── gravityforms-de_DE.mo ├── gravityforms-en_AU.mo ├── gravityforms-en_GB.mo ├── gravityforms-en_NZ.mo ├── gravityforms-en_ZA.mo ├── gravityforms-es_ES.mo ├── gravityforms-fr_CA.mo ├── gravityforms-fr_FR.mo ├── gravityforms-he_IL.mo ├── gravityforms-hi_IN.mo ├── gravityforms-hu_HU.mo ├── gravityforms-it_IT.mo ├── gravityforms-ka_GE.mo ├── gravityforms-nb_NO.mo ├── gravityforms-nl_NL.mo ├── gravityforms-nl_be.mo ├── gravityforms-pt_BR.mo ├── gravityforms-pt_PT.mo ├── gravityforms-ro_RO.mo ├── gravityforms-ru_RU.mo ├── gravityforms-sk_SK.mo ├── gravityforms-sv_SE.mo ├── gravityforms-tr_TR.mo ├── gravityforms-zh_CN.mo ├── gravityforms-de_DE_formal.mo ├── gravityforms-nl_BE-4431109f2b52f456221198b68f96424a.json ├── gravityforms-en_GB-4431109f2b52f456221198b68f96424a.json ├── gravityforms-fi-4431109f2b52f456221198b68f96424a.json ├── gravityforms-nb_NO-4431109f2b52f456221198b68f96424a.json ├── gravityforms-da_DK-4431109f2b52f456221198b68f96424a.json ├── gravityforms-de_DE_formal-4431109f2b52f456221198b68f96424a.json ├── gravityforms-fr_CA-4431109f2b52f456221198b68f96424a.json ├── gravityforms-hu_HU-4431109f2b52f456221198b68f96424a.json ├── gravityforms-zh_CN-4431109f2b52f456221198b68f96424a.json ├── gravityforms-ca-4431109f2b52f456221198b68f96424a.json ├── gravityforms-ja-4431109f2b52f456221198b68f96424a.json ├── gravityforms-en_AU-4431109f2b52f456221198b68f96424a.json ├── gravityforms-it_IT-4431109f2b52f456221198b68f96424a.json ├── gravityforms-nl_NL-4431109f2b52f456221198b68f96424a.json ├── gravityforms-de_DE-4431109f2b52f456221198b68f96424a.json ├── gravityforms-es_ES-4431109f2b52f456221198b68f96424a.json ├── gravityforms-tr_TR-4431109f2b52f456221198b68f96424a.json ├── gravityforms-sv_SE-4431109f2b52f456221198b68f96424a.json ├── gravityforms-fr_FR-4431109f2b52f456221198b68f96424a.json ├── gravityforms-pt_BR-4431109f2b52f456221198b68f96424a.json ├── gravityforms-pt_PT-4431109f2b52f456221198b68f96424a.json ├── gravityforms-ar-4431109f2b52f456221198b68f96424a.json ├── gravityforms-he_IL-4431109f2b52f456221198b68f96424a.json ├── gravityforms-hi_IN-4431109f2b52f456221198b68f96424a.json └── gravityforms-ru_RU-4431109f2b52f456221198b68f96424a.json ├── composer.json └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | 3 | composer.lock 4 | -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | e||self.pageYOffset>e?t.css({position:"fixed",top:"40px"}):t.css({position:"static",top:"40px"})}}; -------------------------------------------------------------------------------- /includes/locking/css/locking.min.css: -------------------------------------------------------------------------------- 1 | #gform-lock-dialog .gform-locked-message,#gform-lock-dialog .gform-taken-over{margin:25px}#gform-lock-dialog .gform-locked-message a.button{margin-right:10px}#gform-lock-dialog .gform-locked-avatar{float:left;margin:0 20px 20px 0}#gform-lock-dialog .wp-tab-first{outline:0} -------------------------------------------------------------------------------- /images/list-remove.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "wp-premium/gravityforms", 3 | "type": "wordpress-plugin", 4 | "description": "Gravity Forms, composer-ified", 5 | "version": "2.4.21", 6 | "minimum-stability": "stable", 7 | "require": { 8 | "composer/installers": "~2.0|~1.0" 9 | }, 10 | "autoload": { 11 | "classmap": [ 12 | "." 13 | ] 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /images/list-add.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Gravity Forms 2 | 3 | Forked from wp-premium/gravityforms, with an added composer.json file and minor bugfixes 4 | 5 | Note: This project was flagged by roave for security concerns, so the version has been increased to 2.4.21. 6 | It really should be synced with the pronamic version instead 7 | 8 |

🚚 Original moved to https://github.com/pronamic/gravityforms.

9 | -------------------------------------------------------------------------------- /includes/locking/css/locking.css: -------------------------------------------------------------------------------- 1 | 2 | #gform-lock-dialog .gform-locked-message, 3 | #gform-lock-dialog .gform-taken-over { 4 | margin: 25px; 5 | } 6 | 7 | #gform-lock-dialog .gform-locked-message a.button { 8 | margin-right: 10px; 9 | } 10 | 11 | #gform-lock-dialog .gform-locked-avatar { 12 | float: left; 13 | margin: 0 20px 20px 0; 14 | } 15 | 16 | #gform-lock-dialog .wp-tab-first { 17 | outline: 0; 18 | } 19 | 20 | 21 | -------------------------------------------------------------------------------- /css/forms.css: -------------------------------------------------------------------------------- 1 | @import url('formreset.css'); 2 | @import url('datepicker.css'); 3 | @import url('formsmain.css'); 4 | @import url('readyclass.css'); 5 | @import url('browsers.css'); 6 | @import url('rtl.css'); 7 | 8 | 9 | /* 10 | 11 | Note: October 2, 2014 3:51 PM 12 | All CSS files are now enqueued directly for better minification support. 13 | This file has been left in place temporarily for anyone who may have manually referenced this file in their theme. 14 | 15 | */ -------------------------------------------------------------------------------- /js/tooltip_init.min.js: -------------------------------------------------------------------------------- 1 | function gform_initialize_tooltips(){jQuery(".gf_tooltip").tooltip({show:500,content:function(){return jQuery(this).prop("title")},open:function(t,o){if(void 0===t.originalEvent)return!1;var i=jQuery(o.tooltip).attr("id");jQuery("div.ui-tooltip").not("#"+i).remove()},close:function(t,o){o.tooltip.hover(function(){jQuery(this).stop(!0).fadeTo(400,1)},function(){jQuery(this).fadeOut("500",function(){jQuery(this).remove()})})}})}jQuery(document).ready(function(){gform_initialize_tooltips()}); -------------------------------------------------------------------------------- /css/dashicons.min.css: -------------------------------------------------------------------------------- 1 | @font-face{font-family:gravityforms;src:url( '../fonts/dashicons.eot' );src:url( '../fonts/dashicons.eot?#iefix' ) format( 'embedded-opentype' ),url( '../fonts/dashicons.woff' ) format( 'woff' ),url( '../fonts/dashicons.ttf' ) format( 'truetype' ),url( '../fonts/dashicons.svg#gravityforms' ) format( 'svg' );font-weight:400;font-style:normal}.dashicons-gravityforms:before{display:inline-block;font-family:gravityforms;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:'a'} -------------------------------------------------------------------------------- /includes/addon/js/gaddon_selectcustom.min.js: -------------------------------------------------------------------------------- 1 | jQuery(document).ready(function(s){s(".gaddon-setting-select-custom").on("change",function(){"gf_custom"==s(this).val()&&s(this).hide().siblings(".gaddon-setting-select-custom-container").show()}),s(".gaddon-setting-select-custom-container .select-custom-reset").on("click",function(t){t.preventDefault();var e=s(this).closest(".gaddon-setting-select-custom-container"),n=e.prev("select.gaddon-setting-select-custom");e.fadeOut(function(){e.find("input").val("").change(),n.fadeIn().focus().val("")})})}); -------------------------------------------------------------------------------- /css/dashicons.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'gravityforms'; 3 | src: url( '../fonts/dashicons.eot' ); 4 | src: url( '../fonts/dashicons.eot?#iefix' ) format( 'embedded-opentype' ), 5 | url( '../fonts/dashicons.woff' ) format( 'woff' ), 6 | url( '../fonts/dashicons.ttf' ) format( 'truetype' ), 7 | url( '../fonts/dashicons.svg#gravityforms' ) format( 'svg' ); 8 | font-weight: normal; 9 | font-style: normal; 10 | 11 | } 12 | 13 | .dashicons-gravityforms:before { 14 | display: inline-block; 15 | font-family: 'gravityforms'; 16 | line-height: 1; 17 | -webkit-font-smoothing: antialiased; 18 | -moz-osx-font-smoothing: grayscale; 19 | content: 'a'; 20 | } 21 | -------------------------------------------------------------------------------- /languages/gravityforms-nl_BE-4431109f2b52f456221198b68f96424a.json: -------------------------------------------------------------------------------- 1 | {"translation-revision-date":"2018-05-21 08:46+0000","generator":"WP-CLI\/2.4.0","source":"js\/blocks.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"nl_BE","plural-forms":"nplurals=2; plural=(n != 1);"},"Form Title":["Titel formulier"],"Advanced":["Geavanceerd"],"Preview":[""],"Form Description":[""],"Form Settings":[""],"Form":[""],"Select a Form":[""],"AJAX":[""],"Field Values":[""],"Tabindex":[""],"The selected form has been deleted or trashed. Please select a new form.":[""],"You must have at least one form to use the block.":[""],"Select a form below to add it to your page.":[""]}}} -------------------------------------------------------------------------------- /includes/locking/js/locking-view.min.js: -------------------------------------------------------------------------------- 1 | !function(t,r){var i,a;r(document).ready(function(){i=gflockingVars.objectID,a=gflockingVars.objectType,t.init()}),t.init=function(){!function(){wp.heartbeat.interval(30);var c="gform-check-locked-objects-"+a;r(document).on("heartbeat-tick."+c,function(t,a){var e=a[c]||{};if(e.hasOwnProperty(i)){var n=e[i];if(r(".locked-text").text(n.text),n.avatar_src){var o=r('').attr("src",n.avatar_src.replace(/&/g,"&"));r(".locked-avatar").empty().append(o)}}else r(".locked-info span").empty()}).on("heartbeat-send."+c,function(t,a){var e=[];e.push(i),a[c]=e})}()}}(window.gflocking=window.gflocking||{},jQuery); -------------------------------------------------------------------------------- /js/floatmenu_init.js: -------------------------------------------------------------------------------- 1 | // change the menu position based on the scroll position 2 | window.onscroll = function() { 3 | 4 | var toolbar = jQuery( '#gf_form_toolbar' ); 5 | var floatMenu = jQuery( '#floatMenu' ); 6 | 7 | if( window.XMLHttpRequest && toolbar.length > 0 ) { 8 | 9 | var basePosition = toolbar.offset().top; 10 | 11 | if( document.documentElement.scrollTop > basePosition || self.pageYOffset > basePosition ) { 12 | floatMenu.css( { position: 'fixed', top: '40px' } ); 13 | } else { 14 | floatMenu.css( { position: 'static', top: '40px' } ); 15 | } 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /css/tooltip.min.css: -------------------------------------------------------------------------------- 1 | a.tooltip,a.tooltip_bottomleft,a.tooltip_left{width:16px;text-decoration:none;color:#424242;zoom:1;opacity:.5}a.tooltip:hover,a.tooltip_bottomleft:hover,a.tooltip_left:hover{color:#0074a2;zoom:1;opacity:1}.ui-tooltip{padding:18px;position:absolute;z-index:9999999;max-width:300px;color:#000;text-shadow:1px 1px 1px #fff;font-size:1em;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 8px 6px -6px rgba(0,0,0,.3);-moz-box-shadow:0 8px 6px -6px rgba(0,0,0,.3);box-shadow:0 8px 6px -6px rgba(0,0,0,.3)}body .ui-tooltip{border:4px solid #999;background-color:#ededed}body .ui-tooltip h6{color:#0e6085;font-size:1.1em;font-weight:700;margin:0 0 3px 0!important;padding:0!important} -------------------------------------------------------------------------------- /includes/wizard/steps/class-gf-installation-wizard-step-complete.php: -------------------------------------------------------------------------------- 1 | 10 |

11 | 14 |

15 | >>2]>>>24-i%4*8&255)<<16|(a[i+1>>>2]>>>24-(i+1)%4*8&255)<<8|a[i+2>>>2]>>>24-(i+2)%4*8&255,f=0;f<4&&i+.75*f>>6*(3-f)&63));if(a=n.charAt(64))for(;r.length%4;)r.push(a);return r.join("")},parse:function(r){var a=r.length,t=this._map;!(n=t.charAt(64))||-1!=(n=r.indexOf(n))&&(a=n);for(var n=[],i=0,e=0;e>>6-e%4*2;n[i>>>2]|=(f|c)<<24-i%4*8,i++}return h.create(n,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(); -------------------------------------------------------------------------------- /languages/gravityforms-fi-4431109f2b52f456221198b68f96424a.json: -------------------------------------------------------------------------------- 1 | {"translation-revision-date":"2018-05-21 08:45+0000","generator":"WP-CLI\/2.4.0","source":"js\/blocks.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"fi","plural-forms":"nplurals=2; plural=(n != 1);"},"Form Title":["Lomakkeen otsikko"],"Advanced":["Lis\u00e4asetukset"],"Preview":["Esikatsele"],"Form Description":["Lomakkeen kuvaus"],"Form Settings":["Lomakeasetukset"],"Form":["Lomake"],"Select a Form":["Valitse lomake"],"AJAX":[""],"Field Values":[""],"Tabindex":[""],"The selected form has been deleted or trashed. Please select a new form.":[""],"You must have at least one form to use the block.":[""],"Select a form below to add it to your page.":[""]}}} -------------------------------------------------------------------------------- /languages/gravityforms-nb_NO-4431109f2b52f456221198b68f96424a.json: -------------------------------------------------------------------------------- 1 | {"translation-revision-date":"2018-05-21 08:46+0000","generator":"WP-CLI\/2.4.0","source":"js\/blocks.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"nb_NO","plural-forms":"nplurals=2; plural=(n != 1);"},"Form Title":["Navn p\u00e5 skjema"],"Advanced":["Avansert"],"Preview":["Forh\u00e5ndsvisning"],"Form Description":["Skjemabeskrivelse"],"Form Settings":["Skjemavalg"],"Form":["Skjema"],"Select a Form":["Velg et skjema"],"AJAX":[""],"Field Values":[""],"Tabindex":[""],"The selected form has been deleted or trashed. Please select a new form.":[""],"You must have at least one form to use the block.":[""],"Select a form below to add it to your page.":[""]}}} -------------------------------------------------------------------------------- /includes/fields/class-gf-field-shipping.php: -------------------------------------------------------------------------------- 1 | 1);"},"Form Title":["Titre du formulaire"],"Advanced":["Avanc\u00e9"],"Preview":["Pr\u00e9visualisation"],"Form Description":["Description du formulaire"],"Form Settings":["R\u00e9glages du formulaire"],"Form":["Formulaire"],"Select a Form":["S\u00e9lectionnez un formulaire"],"AJAX":[""],"Field Values":[""],"Tabindex":[""],"The selected form has been deleted or trashed. Please select a new form.":[""],"You must have at least one form to use the block.":[""],"Select a form below to add it to your page.":[""]}}} -------------------------------------------------------------------------------- /languages/gravityforms-hu_HU-4431109f2b52f456221198b68f96424a.json: -------------------------------------------------------------------------------- 1 | {"translation-revision-date":"2018-05-21 08:46+0000","generator":"WP-CLI\/2.4.0","source":"js\/blocks.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"hu_HU","plural-forms":"nplurals=2; plural=(n != 1);"},"Form Title":["\u0170rlap neve"],"Advanced":["Speci\u00e1lis"],"Preview":["El\u0151n\u00e9zet"],"Form Description":["\u0170rlap le\u00edr\u00e1sa"],"Form Settings":["Be\u00e1ll\u00edt\u00e1sok"],"Form":["\u0170rlap"],"Select a Form":["\u0170rlap v\u00e1laszt\u00e1sa"],"AJAX":[""],"Field Values":[""],"Tabindex":[""],"The selected form has been deleted or trashed. Please select a new form.":[""],"You must have at least one form to use the block.":[""],"Select a form below to add it to your page.":[""]}}} -------------------------------------------------------------------------------- /languages/gravityforms-zh_CN-4431109f2b52f456221198b68f96424a.json: -------------------------------------------------------------------------------- 1 | {"translation-revision-date":"2018-05-26 08:31+0000","generator":"WP-CLI\/2.4.0","source":"js\/blocks.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"zh_Hans_CN","plural-forms":"nplurals=1; plural=0;"},"Form Title":["\u8868\u5355\u6807\u9898"],"Advanced":["\u9ad8\u7ea7"],"Preview":["\u9884\u89c8"],"Form Description":["\u8868\u5355\u63cf\u8ff0"],"Form Settings":["\u8868\u5355\u8bbe\u7f6e"],"Form":["\u5f62\u5f0f"],"Select a Form":["\u9009\u62e9\u4e00\u4e2a\u8868\u5355"],"AJAX":[""],"Field Values":[""],"Tabindex":[""],"The selected form has been deleted or trashed. Please select a new form.":[""],"You must have at least one form to use the block.":[""],"Select a form below to add it to your page.":[""]}}} -------------------------------------------------------------------------------- /languages/gravityforms-ca-4431109f2b52f456221198b68f96424a.json: -------------------------------------------------------------------------------- 1 | {"translation-revision-date":"2019-02-22 08:25+0000","generator":"WP-CLI\/2.4.0","source":"js\/blocks.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"ca","plural-forms":"nplurals=2; plural=(n != 1);"},"Form Title":["T\u00edtol del formulari"],"Advanced":["Avan\u00e7at"],"Preview":["Visualitzaci\u00f3 pr\u00e8via"],"Form Description":["Descripci\u00f3 del formulari"],"Form Settings":["Configuraci\u00f3 del formulari"],"Form":["Formulari"],"Select a Form":["Selecciona un formulari"],"AJAX":[""],"Field Values":[""],"Tabindex":[""],"The selected form has been deleted or trashed. Please select a new form.":[""],"You must have at least one form to use the block.":[""],"Select a form below to add it to your page.":[""]}}} -------------------------------------------------------------------------------- /includes/fields/class-gf-field-product.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Generated by Fontastic.me 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /includes/fields/class-gf-field-option.php: -------------------------------------------------------------------------------- 1 | "+o+""}r.html(t)}}function cancel_subscription(n){confirm(gaddon_payment_strings.subscriptionCancelWarning)&&(jQuery("#subscription_cancel_spinner").show(),jQuery("#cancelsub").prop("disabled",!0),jQuery.post(ajaxurl,{action:"gaddon_cancel_subscription",entry_id:n,gaddon_cancel_subscription:gaddon_payment_strings.subscriptionCancelNonce},function(n){jQuery("#subscription_cancel_spinner").hide(),!0===n.success?(jQuery("#gform_payment_status").html(gaddon_payment_strings.subscriptionCanceled),jQuery("#cancelsub").hide()):(jQuery("#cancelsub").prop("disabled",!1),!1===n.success&&alert(gaddon_payment_strings.subscriptionError))}))} -------------------------------------------------------------------------------- /includes/webapi/js/enc-base64-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | (function(){var h=CryptoJS,j=h.lib.WordArray;h.enc.Base64={stringify:function(b){var e=b.words,f=b.sigBytes,c=this._map;b.clamp();b=[];for(var a=0;a>>2]>>>24-8*(a%4)&255)<<16|(e[a+1>>>2]>>>24-8*((a+1)%4)&255)<<8|e[a+2>>>2]>>>24-8*((a+2)%4)&255,g=0;4>g&&a+0.75*g>>6*(3-g)&63));if(e=c.charAt(64))for(;b.length%4;)b.push(e);return b.join("")},parse:function(b){var e=b.length,f=this._map,c=f.charAt(64);c&&(c=b.indexOf(c),-1!=c&&(e=c));for(var c=[],a=0,d=0;d< 8 | e;d++)if(d%4){var g=f.indexOf(b.charAt(d-1))<<2*(d%4),h=f.indexOf(b.charAt(d))>>>6-2*(d%4);c[a>>>2]|=(g|h)<<24-8*(a%4);a++}return j.create(c,a)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}})(); 9 | -------------------------------------------------------------------------------- /languages/gravityforms-it_IT-4431109f2b52f456221198b68f96424a.json: -------------------------------------------------------------------------------- 1 | {"translation-revision-date":"2019-11-10 07:30+0000","generator":"WP-CLI\/2.4.0","source":"js\/blocks.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"it_IT","plural-forms":"nplurals=2; plural=(n != 1);"},"Form Title":["Titolo del modulo"],"Advanced":["Avanzato"],"Preview":["Anteprima"],"Form Description":["Descrizione modulo"],"Form Settings":["Impostazioni modulo"],"Form":["Modulo"],"Select a Form":["Seleziona un Modulo"],"AJAX":["AJAX"],"Field Values":["Valori dei campi"],"Tabindex":["Tabindex"],"The selected form has been deleted or trashed. Please select a new form.":["Il modulo selezionato \u00e8 stato eliminato o si trova nel cestino. Scegli un nuovo modulo."],"You must have at least one form to use the block.":[""],"Select a form below to add it to your page.":["Seleziona un modulo sotto da aggiungere alla tua pagina."]}}} -------------------------------------------------------------------------------- /css/shortcode-ui.min.css: -------------------------------------------------------------------------------- 1 | .gf-edit-shortcode-form{padding:5px 15px}.gf-edit-shortcode-form input,.gf-edit-shortcode-form textarea{border:1px solid #ddd;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.07);box-shadow:inset 0 1px 2px rgba(0,0,0,.07);background-color:#fff;color:#333;outline:0;-webkit-transition:50ms border-color ease-in-out;transition:50ms border-color ease-in-out;max-width:100%}.gf-edit-shortcode-form textarea{width:100%;max-width:100%;min-height:100px}.gf-edit-shortcode-form .gf-edit-shortcode-form-fields>div{margin-bottom:10px}.gf-edit-shortcode-form .field-block label{display:block;margin-bottom:5px}.gf-edit-shortcode-form .field-inline{padding-top:10px}.gf-edit-shortcode-form .field-inline label{display:inline-block}.gf-edit-shortcode-form-standard-attrs div{display:inline;margin-right:15px}#gf-edit-shortcode-form-advanced-attrs div{margin-bottom:5px}#gf-edit-shortcode-form-advanced-attrs{margin-left:15px}#TB_ajaxContent{min-height:92%!important} -------------------------------------------------------------------------------- /includes/locking/js/locking-list.min.js: -------------------------------------------------------------------------------- 1 | !function(a,d){var e;d(document).ready(function(){e=gflockingVars.objectType,a.init()}),a.init=function(){var c;c="gform-check-locked-objects-"+e,wp.heartbeat.interval(30),d(document).on("heartbeat-tick."+c,function(a,e){var i=e[c]||{};d(".gf-locking").each(function(a,e){var t,c,n,o=d(e);t=o.data("id"),i.hasOwnProperty(t)?o.hasClass("wp-locked")||(c=i[t],o.find(".locked-text").text(c.text),o.find(".check-column input[type=checkbox]").prop("checked",!1),c.avatar_src&&(n=d('').attr("src",c.avatar_src.replace(/&/g,"&")),o.find(".locked-avatar").empty().append(n)),o.addClass("wp-locked")):o.hasClass("wp-locked")&&o.removeClass("wp-locked").delay(1e3).find(".locked-info span").empty()})}).on("heartbeat-send."+c,function(a,e){var t=[];d(".gf-locking").each(function(a,e){t.push(d(e).data("id"))}),t.length&&(e[c]=t)})}}(window.gflocking=window.gflocking||{},jQuery); -------------------------------------------------------------------------------- /languages/gravityforms-nl_NL-4431109f2b52f456221198b68f96424a.json: -------------------------------------------------------------------------------- 1 | {"translation-revision-date":"2019-11-04 03:49+0000","generator":"WP-CLI\/2.4.0","source":"js\/blocks.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"nl_NL","plural-forms":"nplurals=2; plural=(n != 1);"},"Form Title":["Titel formulier"],"Advanced":["Geavanceerd"],"Preview":["Voorbeeld"],"Form Description":["Beschrijving formulier"],"Form Settings":["Formulierinstellingen"],"Form":["Formulier"],"Select a Form":["Selecteer een formulier"],"AJAX":["AJAX"],"Field Values":["Veldwaarden"],"Tabindex":["Tabindex"],"The selected form has been deleted or trashed. Please select a new form.":["Het geselecteerde formulier is verwijderd of in de prullenmand geplaatst. Selecteer een nieuw formulier."],"You must have at least one form to use the block.":[""],"Select a form below to add it to your page.":["Selecteer een formulier hieronder om het toe te voegen aan je pagina."]}}} -------------------------------------------------------------------------------- /js/forms.min.js: -------------------------------------------------------------------------------- 1 | function Form(){this.id=0,this.title=gf_vars.formTitle,this.description=gf_vars.formDescription,this.labelPlacement="top_label",this.subLabelPlacement="below",this.maxEntriesMessage="",this.confirmation=new Confirmation,this.button=new Button,this.fields=new Array}function Confirmation(){this.type="message",this.message=gf_vars.formConfirmationMessage,this.url="",this.pageId="",this.queryString=""}function Button(){this.type="text",this.text=gf_vars.buttonText,this.imageUrl=""}function Field(i,t){this.id=i,this.label="",this.adminLabel="",this.type=t,this.isRequired=!1,this.size="medium",this.errorMessage="",this.visibility="visible"}function Choice(i,t,s){this.text=i,this.value=t||i,this.isSelected=!1,this.price=s||""}function Input(i,t){this.id=i,this.label=t,this.name=""}function ConditionalLogic(){this.actionType="show",this.logicType="all",this.rules=[new ConditionalRule]}function ConditionalRule(){this.fieldId=0,this.operator="is",this.value=""} -------------------------------------------------------------------------------- /css/blocks.min.css: -------------------------------------------------------------------------------- 1 | .gform-block__placeholder{padding:2em}.gform-block__placeholder .components-placeholder__fieldset,.gform-block__placeholder .components-placeholder__fieldset form{justify-content:center}.gform-block__placeholder select{min-width:300px}.gform-block__placeholder-brand{text-align:center}.gform-block__placeholder-brand p{font-family:inherit;margin:.5em 0}.gform-block__panel{border-top:1px solid #e2e4e7!important}.gform_wrapper .gform_fields,.gform_wrapper .gform_footer{pointer-events:none;user-select:none}.gform-block__placeholder .gform-icon svg{width:110px;fill:#82878c}.gform-block__alert{margin-bottom:2px}.gform-block__alert p{font-size:.8125em;font-weight:600;margin:0!important}.gform-block__alert.gform-block__alert-error{background:#fff0f0;color:#fc1d1d;padding:.75em 1em}.gform-block__tabindex{width:100%}.gform-block__tabindex .components-base-control__field{display:flex;justify-content:space-between;align-items:center}.gform-block__tabindex input{width:66px} -------------------------------------------------------------------------------- /languages/gravityforms-de_DE-4431109f2b52f456221198b68f96424a.json: -------------------------------------------------------------------------------- 1 | {"translation-revision-date":"2019-10-30 07:33+0000","generator":"WP-CLI\/2.4.0","source":"js\/blocks.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"de_DE","plural-forms":"nplurals=2; plural=(n != 1);"},"Form Title":["Formulartitel"],"Advanced":["Erweitert"],"Preview":["Vorschau"],"Form Description":["Formularbeschreibung"],"Form Settings":["Formulareinstellungen"],"Form":["Formular"],"Select a Form":["Ein Formular ausw\u00e4hlen"],"AJAX":["AJAX"],"Field Values":["Feld-Werte"],"Tabindex":["Tabindex"],"The selected form has been deleted or trashed. Please select a new form.":["Das ausgew\u00e4hlte Formular wurde gel\u00f6scht oder in den Papierkorb gelegt. Bitte ein neues Formular ausw\u00e4hlen."],"You must have at least one form to use the block.":[""],"Select a form below to add it to your page.":["W\u00e4hle unten ein Formular aus, um es deiner Seite hinzuzuf\u00fcgen."]}}} -------------------------------------------------------------------------------- /languages/gravityforms-es_ES-4431109f2b52f456221198b68f96424a.json: -------------------------------------------------------------------------------- 1 | {"translation-revision-date":"2019-10-30 07:34+0000","generator":"WP-CLI\/2.4.0","source":"js\/blocks.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"es_ES","plural-forms":"nplurals=2; plural=(n != 1);"},"Form Title":["T\u00edtulo del formulario"],"Advanced":["Avanzado"],"Preview":["Previsualizar"],"Form Description":["Descripci\u00f3n del formulario"],"Form Settings":["Ajustes del formulario"],"Form":["Formulario"],"Select a Form":["Selecciona un formulario"],"AJAX":["AJAX"],"Field Values":["Valores de campo"],"Tabindex":["Tabindex"],"The selected form has been deleted or trashed. Please select a new form.":["El formulario seleccionado ha sido borrado o enviado a la papelera. Por favor, elige un nuevo formulario "],"You must have at least one form to use the block.":[""],"Select a form below to add it to your page.":["Elige un formulario de abajo para a\u00f1adirlo a tu p\u00e1gina."]}}} -------------------------------------------------------------------------------- /js/menu.min.js: -------------------------------------------------------------------------------- 1 | function initMenus(){jQuery("ul.menu ul").hide(),jQuery.each(jQuery("ul.menu"),function(){jQuery("#"+this.id+".expandfirst ul:first").show()}),jQuery("ul.menu li .button-title-link").click(function(){var e=jQuery(this).next(),i=this.parentNode.parentNode.id;return jQuery("#"+i).hasClass("noaccordion")?(jQuery(this).next().slideToggle("normal"),!1):e.is("ul")&&e.is(":visible")?(jQuery("#"+i).hasClass("collapsible")&&jQuery("#"+i+" ul:visible").slideUp("normal",function(){jQuery(this).prev().removeClass("gf_button_title_active")}),!1):e.is("ul")&&!e.is(":visible")?(jQuery("#"+i+" ul:visible").slideUp("normal",function(){jQuery(this).prev().removeClass("gf_button_title_active")}),e.slideDown("normal",function(){jQuery(this).prev().addClass("gf_button_title_active")}),!1):void 0})}jQuery(document).ready(function(){initMenus()}),jQuery(document).ready(function(){jQuery("div.add-buttons-title").append('')}); -------------------------------------------------------------------------------- /languages/gravityforms-tr_TR-4431109f2b52f456221198b68f96424a.json: -------------------------------------------------------------------------------- 1 | {"translation-revision-date":"2020-03-10 11:21+0000","generator":"WP-CLI\/2.4.0","source":"js\/blocks.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"tr_TR","plural-forms":"nplurals=2; plural=(n > 1);"},"Form Title":["Form ba\u015fl\u0131\u011f\u0131"],"Advanced":["Geli\u015fmi\u015f"],"Preview":["\u00d6n izleme"],"Form Description":["Form a\u00e7\u0131klamas\u0131"],"Form Settings":["Form ayarlar\u0131"],"Form":["Form"],"Select a Form":["Bir form se\u00e7in"],"AJAX":["AJAX"],"Field Values":["Alan de\u011ferleri"],"Tabindex":["Sekme indisi"],"The selected form has been deleted or trashed. Please select a new form.":["Se\u00e7ili form silindi veya \u00e7\u00f6pe at\u0131ld\u0131. L\u00fctfen yeni bir form se\u00e7in."],"You must have at least one form to use the block.":[""],"Select a form below to add it to your page.":["Sayfan\u0131za eklemek i\u00e7in a\u015fa\u011f\u0131dan bir form se\u00e7in."]}}} -------------------------------------------------------------------------------- /includes/fields/class-gf-field-post-category.php: -------------------------------------------------------------------------------- 1 | 1);"},"Form Title":["Titre du formulaire"],"Advanced":["Avanc\u00e9"],"Preview":["Pr\u00e9visualisation"],"Form Description":["Description du formulaire"],"Form Settings":["R\u00e9glages du formulaire"],"Form":["Formulaire"],"Select a Form":["S\u00e9lectionnez un formulaire"],"AJAX":["AJAX"],"Field Values":["Valeurs du champ"],"Tabindex":["Tabindex"],"The selected form has been deleted or trashed. Please select a new form.":["Le formulaire s\u00e9lectionn\u00e9 a \u00e9t\u00e9 supprim\u00e9 ou mis \u00e0 la corbeille. Veuillez s\u00e9lectionner un nouveau formulaire."],"You must have at least one form to use the block.":[""],"Select a form below to add it to your page.":["S\u00e9lectionnez un formulaire ci-dessous pour l\u2019ajouter dans votre page."]}}} -------------------------------------------------------------------------------- /languages/gravityforms-pt_BR-4431109f2b52f456221198b68f96424a.json: -------------------------------------------------------------------------------- 1 | {"translation-revision-date":"2019-11-06 12:32+0000","generator":"WP-CLI\/2.4.0","source":"js\/blocks.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"pt_BR","plural-forms":"nplurals=2; plural=(n > 1);"},"Form Title":["T\u00edtulo do Formul\u00e1rio"],"Advanced":["Avan\u00e7ado"],"Preview":["Visualizar"],"Form Description":["Descri\u00e7\u00e3o do formul\u00e1rio"],"Form Settings":["Configura\u00e7\u00f5es do formul\u00e1rio"],"Form":["Formul\u00e1rio"],"Select a Form":["Selecione um formul\u00e1rio"],"AJAX":["AJAX"],"Field Values":["Valores de campo"],"Tabindex":["Tabindex"],"The selected form has been deleted or trashed. Please select a new form.":["O formul\u00e1rio selecionado foi exclu\u00eddo ou est\u00e1 na lixeira. Selecione um novo formul\u00e1rio."],"You must have at least one form to use the block.":[""],"Select a form below to add it to your page.":["Selecione um formul\u00e1rio abaixo para adicion\u00e1-lo \u00e0 sua p\u00e1gina."]}}} -------------------------------------------------------------------------------- /languages/gravityforms-pt_PT-4431109f2b52f456221198b68f96424a.json: -------------------------------------------------------------------------------- 1 | {"translation-revision-date":"2019-12-29 08:54+0000","generator":"WP-CLI\/2.4.0","source":"js\/blocks.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"pt_PT","plural-forms":"nplurals=2; plural=(n != 1);"},"Form Title":["T\u00edtulo do formul\u00e1rio"],"Advanced":["Avan\u00e7ado"],"Preview":["Pr\u00e9-visualizar"],"Form Description":["Descri\u00e7\u00e3o do formul\u00e1rio"],"Form Settings":["Defini\u00e7\u00f5es do formul\u00e1rio"],"Form":["Formul\u00e1rio"],"Select a Form":["Seleccione um formul\u00e1rio"],"AJAX":["AJAX"],"Field Values":["Valores do campo"],"Tabindex":["Tabindex"],"The selected form has been deleted or trashed. Please select a new form.":["O formul\u00e1rio seleccionado foi eliminado ou movido para o lixo. Por favor seleccione outro formul\u00e1rio."],"You must have at least one form to use the block.":[""],"Select a form below to add it to your page.":["Seleccione um formul\u00e1rio abaixo para adicionar \u00e0 sua p\u00e1gina."]}}} -------------------------------------------------------------------------------- /css/reset.css: -------------------------------------------------------------------------------- 1 | /* 2 | ---------------------------------------------------------------- 3 | 4 | reset.css 5 | Gravity Forms CSS Reset 6 | http://www.gravityforms.com 7 | updated: March 15, 2015 1:36 PM 8 | 9 | Gravity Forms is a Rocketgenius project 10 | copyright 2008-2015 Rocketgenius Inc. 11 | http: //www.rocketgenius.com 12 | this may not be redistributed without the 13 | express written permission of the author. 14 | 15 | NOTE: DO NOT EDIT THIS FILE! MAKE ANY MODIFICATIONS IN YOUR 16 | THEME STYLESHEET. THIS FILE IS REPLACED DURING AUTO-UPDATES 17 | AND ANY CHANGES MADE HERE WILL BE OVERWRITTEN. 18 | 19 | ---------------------------------------------------------------- 20 | */ 21 | 22 | html, body, fieldset, form, label, legend { 23 | margin: 0; 24 | padding: 0; 25 | border: 0; 26 | outline: 0; 27 | font-weight: inherit; 28 | font-style: inherit; 29 | font-size: 100%; 30 | font-family: inherit; 31 | vertical-align: baseline; 32 | } 33 | ul { 34 | margin: 0; 35 | padding: 0; 36 | } 37 | body { 38 | font-size: 62.5%; 39 | line-height: 1.5; 40 | } -------------------------------------------------------------------------------- /js/datepicker.min.js: -------------------------------------------------------------------------------- 1 | function gformInitDatepicker(){jQuery(".datepicker").each(function(){gformInitSingleDatepicker(jQuery(this))})}function gformInitSingleDatepicker(e){var t=e.attr("id")?e.attr("id"):"",a={yearRange:"-100:+20",showOn:"focus",dateFormat:"mm/dd/yy",changeMonth:!0,changeYear:!0,suppressDatePicker:!1,onClose:function(){e.focus();var t=this;this.suppressDatePicker=!0,setTimeout(function(){t.suppressDatePicker=!1},200)},beforeShow:function(t,e){return!this.suppressDatePicker}};e.hasClass("dmy")?a.dateFormat="dd/mm/yy":e.hasClass("dmy_dash")?a.dateFormat="dd-mm-yy":e.hasClass("dmy_dot")?a.dateFormat="dd.mm.yy":e.hasClass("ymd_slash")?a.dateFormat="yy/mm/dd":e.hasClass("ymd_dash")?a.dateFormat="yy-mm-dd":e.hasClass("ymd_dot")&&(a.dateFormat="yy.mm.dd"),e.hasClass("datepicker_with_icon")&&(a.showOn="both",a.buttonImage=e.parent().siblings("[id^='gforms_calendar_icon_input']").val(),a.buttonImageOnly=!0,a.buttonText=""),t=t.split("_"),a=gform.applyFilters("gform_datepicker_options_pre_init",a,t[1],t[2]),e.datepicker(a),e.is(":input")&&e.click(function(){e.datepicker("show")})}jQuery(document).ready(gformInitDatepicker); -------------------------------------------------------------------------------- /includes/fields/class-gf-field-section.php: -------------------------------------------------------------------------------- 1 | get_field_label( $force_frontend_label, $value ); 28 | 29 | $admin_buttons = $this->get_admin_buttons(); 30 | 31 | $description = $this->get_description( $this->description, 'gsection_description' ); 32 | $field_content = sprintf( "%s

%s

%s", $admin_buttons, esc_html( $field_label ), $description ); 33 | 34 | return $field_content; 35 | } 36 | 37 | } 38 | 39 | GF_Fields::register( new GF_Field_Section() ); -------------------------------------------------------------------------------- /languages/gravityforms-ar-4431109f2b52f456221198b68f96424a.json: -------------------------------------------------------------------------------- 1 | {"translation-revision-date":"2018-05-21 08:46+0000","generator":"WP-CLI\/2.4.0","source":"js\/blocks.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"ar","plural-forms":"nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;"},"Form Title":["\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0646\u0645\u0648\u0630\u062c"],"Advanced":["\u0627\u0644\u062e\u0635\u0627\u0626\u0635 \u0627\u0644\u0645\u062a\u0642\u062f\u0645\u0629"],"Preview":["\u0645\u0634\u0627\u0647\u062f\u0629"],"Form Description":["\u0648\u0635\u0641 \u0627\u0644\u0646\u0645\u0648\u0630\u062c"],"Form Settings":["\u0627\u0639\u062f\u0627\u062f\u0627\u062a \u0627\u0644\u0646\u0645\u0648\u0630\u062c"],"Form":["\u0646\u0645\u0648\u0630\u062c"],"Select a Form":["\u0627\u062e\u062a\u0627\u0631 \u0646\u0645\u0648\u0630\u062c"],"AJAX":[""],"Field Values":[""],"Tabindex":[""],"The selected form has been deleted or trashed. Please select a new form.":[""],"You must have at least one form to use the block.":[""],"Select a form below to add it to your page.":[""]}}} -------------------------------------------------------------------------------- /includes/addon/js/gaddon_feedorder.min.js: -------------------------------------------------------------------------------- 1 | var GFFeedOrder=function(e){var o=this,d=jQuery;o.init=function(){o.options=e;d(".wp-list-table thead tr, .wp-list-table tfoot tr").append(''),d(".wp-list-table tbody tr").append(''),o.initSorting()},o.initSorting=function(){d(".wp-list-table tbody").sortable({cursor:"move",handle:".feed-sort-handle",placeholder:"feed-placeholder",tolerance:"pointer",create:function(){d(".wp-list-table").addClass("feed-list-sortable")},helper:o.fixSortableColumnWidths,start:o.setPlaceholderHeight,update:o.updateFeedOrder})},o.fixSortableColumnWidths=function(e,t){var o=t.children(),n=t.clone();return n.children().each(function(e){d(this).width(o.eq(e).width())}),n},o.getFeedOrder=function(){return d('.wp-list-table tbody .check-column input[type="checkbox"]').map(function(){return d(this).val()}).get()},o.setPlaceholderHeight=function(e,t){d(".wp-list-table .feed-placeholder").height(t.item.height())},o.updateFeedOrder=function(e,t){d.ajax(ajaxurl,{method:"POST",dataType:"JSON",data:{action:"gf_save_feed_order",addon:o.options.addon,form_id:o.options.formId,feed_order:o.getFeedOrder(),nonce:o.options.nonce}})},this.init()}; -------------------------------------------------------------------------------- /includes/query/class-gf-query-json-literal.php: -------------------------------------------------------------------------------- 1 | _value = $value; 20 | } 21 | } 22 | 23 | /** 24 | * Get SQL for this. 25 | * 26 | * @param GF_Query $query The query. 27 | * @param string $delimiter The delimiter for arrays. 28 | * 29 | * @return string The SQL. 30 | */ 31 | public function sql( $query, $delimiter = '' ) { 32 | global $wpdb; 33 | 34 | if ( is_string( $this->value ) ) { 35 | $value = trim( json_encode( $this->value ), '"' ); 36 | $value = str_replace( '\\', '\\\\', $value ); 37 | 38 | return $wpdb->prepare( '%s', $value ); 39 | } 40 | 41 | return ''; 42 | } 43 | 44 | /** 45 | * Proxy read-only values. 46 | */ 47 | public function __get( $key ) { 48 | switch ( $key ) : 49 | case 'value': 50 | return $this->_value; 51 | endswitch; 52 | } 53 | 54 | public function __isset( $key ) { 55 | return in_array( $key, array( 'value' ) ); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /css/shortcode-ui.css: -------------------------------------------------------------------------------- 1 | .gf-edit-shortcode-form { 2 | padding: 5px 15px; } 3 | .gf-edit-shortcode-form input, .gf-edit-shortcode-form textarea { 4 | border: 1px solid #ddd; 5 | -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.07); 6 | box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.07); 7 | background-color: #fff; 8 | color: #333; 9 | outline: none; 10 | -webkit-transition: 0.05s border-color ease-in-out; 11 | transition: 0.05s border-color ease-in-out; 12 | max-width: 100%; } 13 | .gf-edit-shortcode-form textarea { 14 | width: 100%; 15 | max-width: 100%; 16 | min-height: 100px; } 17 | .gf-edit-shortcode-form .gf-edit-shortcode-form-fields > div { 18 | margin-bottom: 10px; } 19 | .gf-edit-shortcode-form .field-block label { 20 | display: block; 21 | margin-bottom: 5px; } 22 | .gf-edit-shortcode-form .field-inline { 23 | padding-top: 10px; } 24 | .gf-edit-shortcode-form .field-inline label { 25 | display: inline-block; } 26 | 27 | 28 | .gf-edit-shortcode-form-standard-attrs div{ 29 | display: inline; 30 | margin-right:15px; 31 | } 32 | #gf-edit-shortcode-form-advanced-attrs div{ 33 | margin-bottom:5px; 34 | } 35 | 36 | #gf-edit-shortcode-form-advanced-attrs{ 37 | margin-left:15px; 38 | } 39 | 40 | #TB_ajaxContent { 41 | min-height:92%!important; 42 | } 43 | -------------------------------------------------------------------------------- /css/blocks.min.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["webpack:///./js/src/blocks/form/block.scss"],"names":[],"mappings":"AAAA,0BAA0B,YAAY,6HAA6H,uBAAuB,iCAAiC,gBAAgB,gCAAgC,kBAAkB,kCAAkC,oBAAoB,cAAc,oBAAoB,uCAAuC,0DAA0D,oBAAoB,iBAAiB,0CAA0C,YAAY,aAAa,oBAAoB,kBAAkB,sBAAsB,kBAAkB,gBAAgB,mBAAmB,6CAA6C,mBAAmB,cAAc,kBAAkB,uBAAuB,WAAW,uDAAuD,aAAa,8BAA8B,mBAAmB,6BAA6B,W","file":"css/blocks.min.css","sourcesContent":[".gform-block__placeholder{padding:2em}.gform-block__placeholder .components-placeholder__fieldset,.gform-block__placeholder .components-placeholder__fieldset form{justify-content:center}.gform-block__placeholder select{min-width:300px}.gform-block__placeholder-brand{text-align:center}.gform-block__placeholder-brand p{font-family:inherit;margin:.5em 0}.gform-block__panel{border-top:1px solid #e2e4e7!important}.gform_wrapper .gform_fields,.gform_wrapper .gform_footer{pointer-events:none;user-select:none}.gform-block__placeholder .gform-icon svg{width:110px;fill:#82878c}.gform-block__alert{margin-bottom:2px}.gform-block__alert p{font-size:.8125em;font-weight:600;margin:0!important}.gform-block__alert.gform-block__alert-error{background:#fff0f0;color:#fc1d1d;padding:.75em 1em}.gform-block__tabindex{width:100%}.gform-block__tabindex .components-base-control__field{display:flex;justify-content:space-between;align-items:center}.gform-block__tabindex input{width:66px}"],"sourceRoot":""} -------------------------------------------------------------------------------- /includes/query/class-gf-query-series.php: -------------------------------------------------------------------------------- 1 | _values = array_filter( $values, array( 'GF_Query_Condition', 'is_valid_expression_type' ) ); 22 | } 23 | } 24 | 25 | /** 26 | * Get SQL for this. 27 | * 28 | * @param GF_Query $query The query. 29 | * @param string $delimiter The delimiter to stick the series values with. 30 | * 31 | * @return string The SQL. 32 | */ 33 | public function sql( $query, $delimiter = '' ) { 34 | $values = array(); 35 | 36 | foreach( $this->_values as $value ) { 37 | $values[] = $value->sql( $query ); 38 | } 39 | 40 | $chunks = array_filter( $values, 'strlen' ); 41 | 42 | return implode( $delimiter, $chunks); 43 | } 44 | 45 | /** 46 | * Proxy read-only values. 47 | */ 48 | public function __get( $key ) { 49 | switch ( $key ): 50 | case 'values': 51 | return $this->_values; 52 | endswitch; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /js/preview.min.js: -------------------------------------------------------------------------------- 1 | jQuery(document).ready(function(){function r(e){for(var i=document.cookie.split("; "),r=0;r_value = $value; 20 | } 21 | } 22 | 23 | /** 24 | * Get SQL for this. 25 | * 26 | * @param GF_Query $query The query. 27 | * @param string $delimiter The delimiter for arrays. 28 | * 29 | * @return string The SQL. 30 | */ 31 | public function sql( $query, $delimiter = '' ) { 32 | global $wpdb; 33 | 34 | if ( is_int( $this->value ) ) { 35 | return $wpdb->prepare( '%d', $this->value ); 36 | } elseif ( is_double( $this->value ) ) { 37 | return $this->value; 38 | } elseif ( is_string( $this->value ) || is_float( $this->value ) ) { 39 | return $wpdb->prepare( '%s', $this->value ); 40 | } 41 | 42 | /** 43 | * @todo Add support for Column, Call 44 | */ 45 | 46 | return ''; 47 | } 48 | 49 | /** 50 | * Proxy read-only values. 51 | */ 52 | public function __get( $key ) { 53 | switch ( $key ) : 54 | case 'value': 55 | return $this->_value; 56 | endswitch; 57 | } 58 | 59 | public function __isset( $key ) { 60 | return in_array( $key, array( 'value' ) ); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /languages/gravityforms-he_IL-4431109f2b52f456221198b68f96424a.json: -------------------------------------------------------------------------------- 1 | {"translation-revision-date":"2020-03-12 03:40+0000","generator":"WP-CLI\/2.4.0","source":"js\/blocks.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"he_IL","plural-forms":"nplurals=2; plural=n != 1;"},"Form Title":["\u05db\u05d5\u05ea\u05e8\u05ea \u05d8\u05d5\u05e4\u05e1"],"Advanced":["\u05d0\u05e4\u05e9\u05e8\u05d5\u05d9\u05d5\u05ea \u05e0\u05d5\u05e1\u05e4\u05d5\u05ea"],"Preview":["\u05ea\u05e6\u05d5\u05d2\u05d4 \u05de\u05e7\u05d3\u05d9\u05de\u05d4"],"Form Description":["\u05ea\u05d9\u05d0\u05d5\u05e8 \u05d8\u05d5\u05e4\u05e1"],"Form Settings":["\u05d4\u05d2\u05d3\u05e8\u05d5\u05ea \u05d8\u05d5\u05e4\u05e1"],"Form":["\u05d8\u05d5\u05e4\u05e1"],"Select a Form":["\u05d1\u05d7\u05d9\u05e8\u05ea \u05d8\u05d5\u05e4\u05e1"],"AJAX":["AJAX"],"Field Values":["\u05e2\u05e8\u05db\u05d9 \u05e9\u05d3\u05d4"],"Tabindex":["Tabindex"],"The selected form has been deleted or trashed. Please select a new form.":["\u05d4\u05d8\u05d5\u05e4\u05e1 \u05e9\u05e0\u05d1\u05d7\u05e8 \u05e0\u05de\u05d7\u05e7 \u05d0\u05d5 \u05d4\u05d5\u05e2\u05d1\u05e8 \u05dc\u05e4\u05d7. \u05e0\u05d0 \u05dc\u05d1\u05d7\u05d5\u05e8 \u05d8\u05d5\u05e4\u05e1 \u05d0\u05d7\u05e8."],"You must have at least one form to use the block.":[""],"Select a form below to add it to your page.":["\u05d1\u05d7\u05e8 \u05d8\u05d5\u05e4\u05e1 \u05db\u05d3\u05d9 \u05dc\u05d4\u05d5\u05e1\u05d9\u05e3 \u05d0\u05d5\u05ea\u05d5 \u05dc\u05e2\u05de\u05d5\u05d3 \u05e9\u05dc\u05da."]}}} -------------------------------------------------------------------------------- /includes/addon/css/gaddon_form_settings.min.css: -------------------------------------------------------------------------------- 1 | .settings-field-map-table thead th{font-weight:700;border-bottom:1px solid #ccc}.settings-field-map-table tbody td{border-bottom:1px dotted #eee}.settings-field-map-table select{max-width:90%}.gaddon-setting-select-custom-container .select-custom-reset,.settings-field-map-table .custom-key-reset,.settings-field-map-table .custom-value-reset{background:url( ../../../images/xit.gif ) no-repeat scroll 0 0 transparent;cursor:pointer;display:none;position:absolute;text-indent:-9999px;width:10px;height:10px;-moz-transition:none;-webkit-transition:none;-o-transition:color 0 ease-in;transition:none}.settings-field-map-table .custom-key-reset{margin-top:10px;margin-left:165px}.settings-field-map-table .repeater th{padding-left:0}.gaddon-setting-select-custom-container .select-custom-reset:hover,.settings-field-map-table .custom-key-reset:hover,.settings-field-map-table .custom-value-reset:hover{background-position-x:-10px}.gaddon-setting-select-custom-container:hover .select-custom-reset,.settings-field-map-table .custom-key-container:hover .custom-key-reset,.settings-field-map-table .custom-key-container:hover .custom-value-reset{display:block}.gaddon-setting-select-custom-container{display:inline-block;position:relative}.gaddon-setting-select-custom-container .select-custom-reset{left:171px;top:10px}.gaddon-section .required{color:red}.gaddon-setting-inline{display:inline;margin-right:6px}.mt-gaddon-editor{float:right;position:relative;right:21px;top:70px}.mt-gaddon-editor~.wp-editor-wrap{margin-right:23px} -------------------------------------------------------------------------------- /js/menu.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2008 by Marco van Hylckama Vlieg 3 | web: http://www.i-marco.nl/weblog/ 4 | email: marco@i-marco.nl 5 | Free for use 6 | */ 7 | 8 | function initMenus() { 9 | jQuery('ul.menu ul').hide(); 10 | jQuery.each(jQuery('ul.menu'), function(){ 11 | jQuery('#' + this.id + '.expandfirst ul:first').show(); 12 | }); 13 | jQuery('ul.menu li .button-title-link').click( 14 | function() { 15 | var checkElement = jQuery(this).next(); 16 | var parent = this.parentNode.parentNode.id; 17 | 18 | if(jQuery('#' + parent).hasClass('noaccordion')) { 19 | jQuery(this).next().slideToggle('normal'); 20 | return false; 21 | } 22 | if((checkElement.is('ul')) && (checkElement.is(':visible'))) { 23 | if(jQuery('#' + parent).hasClass('collapsible')) { 24 | jQuery('#' + parent + ' ul:visible').slideUp('normal', function(){jQuery(this).prev().removeClass('gf_button_title_active')}); 25 | } 26 | return false; 27 | } 28 | if((checkElement.is('ul')) && (!checkElement.is(':visible'))) { 29 | jQuery('#' + parent + ' ul:visible').slideUp('normal', function(){jQuery(this).prev().removeClass('gf_button_title_active')}); 30 | checkElement.slideDown('normal', function(){jQuery(this).prev().addClass('gf_button_title_active')}); 31 | return false; 32 | } 33 | } 34 | ); 35 | } 36 | jQuery(document).ready(function() {initMenus();}); 37 | jQuery(document).ready(function() { 38 | jQuery('div.add-buttons-title').append(''); 39 | }); -------------------------------------------------------------------------------- /css/jquery-ui.min.css: -------------------------------------------------------------------------------- 1 | .ui-helper-hidden{display:none}.ui-helper-hidden-accessible{position:absolute;left:-99999999px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:after{content:".";display:block;height:0;clear:both;visibility:hidden}.ui-helper-clearfix{display:inline-block}* html .ui-helper-clearfix{height:1%}.ui-helper-clearfix{display:block}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-tabs{padding:.2em;zoom:1}.ui-tabs[style]{border:1px solid #c2d7ef!important;margin:6px 0 0!important;swidth:438px!important}.ui-tabs .ui-tabs-nav{list-style:none;position:relative;padding:.2em .2em 0 0}.ui-tabs .ui-tabs-nav li{position:relative;float:left;border-bottom-width:0!important;margin:0 .2em -1px 0;padding:0;text-align:center}.ui-tabs .ui-tabs-nav li a{display:block;text-decoration:none;padding:.5em 1em;text-align:center;font-size:12px}.ui-tabs .ui-tabs-nav li.ui-tabs-selected{padding-bottom:1px;border-bottom-width:0}.ui-tabs .ui-tabs-nav li.ui-state-disabled a,.ui-tabs .ui-tabs-nav li.ui-state-processing a,.ui-tabs .ui-tabs-nav li.ui-tabs-selected a{cursor:text}.ui-tabs .ui-tabs-nav li a,.ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a{cursor:pointer}.ui-tabs .ui-tabs-panel{padding:1em 1.4em;display:block;border-width:0;background:0 0}.ui-tabs .ui-tabs-hide{display:none!important} -------------------------------------------------------------------------------- /includes/locking/js/locking-view.js: -------------------------------------------------------------------------------- 1 | (function (gflocking, $) { 2 | var objectID, objectType; 3 | 4 | $(document).ready( function() { 5 | 6 | objectID = gflockingVars.objectID; 7 | objectType = gflockingVars.objectType; 8 | gflocking.init(); 9 | }); 10 | 11 | gflocking.init = function () { 12 | initHeartbeat(); 13 | }; 14 | 15 | function initHeartbeat() { 16 | wp.heartbeat.interval( 30 ); 17 | var checkLocksKey = 'gform-check-locked-objects-' + objectType; 18 | $( document ).on( 'heartbeat-tick.' + checkLocksKey, function( e, data ) { 19 | var locked = data[checkLocksKey] || {}; 20 | 21 | if ( locked.hasOwnProperty( objectID ) ) { 22 | var lock_data = locked[objectID]; 23 | $('.locked-text').text( lock_data.text ); 24 | if ( lock_data.avatar_src ) { 25 | var avatar = $('').attr( 'src', lock_data.avatar_src.replace(/&/g, '&') ); 26 | $('.locked-avatar').empty().append( avatar ); 27 | } 28 | } else { 29 | $(".locked-info span").empty(); 30 | } 31 | 32 | }).on( 'heartbeat-send.' + checkLocksKey, function( e, data ) { 33 | var check = []; 34 | 35 | check.push( objectID); 36 | 37 | data[checkLocksKey] = check; 38 | }); 39 | 40 | } 41 | 42 | }(window.gflocking = window.gflocking || {}, jQuery)); 43 | -------------------------------------------------------------------------------- /includes/fields/class-gf-field-post-content.php: -------------------------------------------------------------------------------- 1 | " + i + ""; 17 | } 18 | lengthField.html(str); 19 | } 20 | 21 | function cancel_subscription( entryId ) { 22 | 23 | if ( !confirm( gaddon_payment_strings.subscriptionCancelWarning ) ) 24 | return; 25 | 26 | jQuery( "#subscription_cancel_spinner" ).show(); 27 | jQuery( "#cancelsub" ).prop( "disabled", true ); 28 | jQuery.post( 29 | ajaxurl, 30 | { 31 | action: "gaddon_cancel_subscription", 32 | entry_id: entryId, 33 | gaddon_cancel_subscription: gaddon_payment_strings.subscriptionCancelNonce 34 | }, 35 | function ( response ) { 36 | jQuery( "#subscription_cancel_spinner" ).hide(); 37 | if ( response.success === true ) { 38 | jQuery( "#gform_payment_status" ).html( gaddon_payment_strings.subscriptionCanceled ); 39 | jQuery( "#cancelsub" ).hide(); 40 | } else { 41 | jQuery( "#cancelsub" ).prop( "disabled", false ); 42 | if ( response.success === false ) { 43 | alert( gaddon_payment_strings.subscriptionError ); 44 | } 45 | } 46 | } 47 | ); 48 | } 49 | -------------------------------------------------------------------------------- /includes/webapi/js/gfwebapi_settings.min.js: -------------------------------------------------------------------------------- 1 | function gfapiCalculateSig(e,r){var a=CryptoJS.HmacSHA1(e,r).toString(CryptoJS.enc.Base64);return encodeURIComponent(a)}jQuery(document).ready(function(){jQuery("#gfwebapi-qrbutton").click(function(){jQuery("#gfwebapi-qrcode-container").toggle();var e=jQuery("#gfwebapi-qrcode");return 0',removeButtonMarkup:'',callbacks:{add:function(e,t,n){var i=t.find('select[name="_gaddon_setting_'+a.options.keyFieldName+'"]');!n.custom_key&&0register_routes(); 70 | } 71 | } 72 | 73 | } 74 | -------------------------------------------------------------------------------- /js/jquery.textareaCounter.plugin.min.js: -------------------------------------------------------------------------------- 1 | !function(t){t.fn.textareaCount=function(o,r){var l,c=t(this),u=0,s=o.maxCharacterSize,f=0,h=0,d={};function p(r){var a,e=0;for(a=0;a=o.maxCharacterSize&&(n=n.substring(0,o.maxCharacterSize)),r=p(n),a=o.maxCharacterSize,g()&&(a=o.maxCharacterSize-r),o.truncate&&a ").insertAfter(c),(l=c.next(".charleft")).addClass(o.originalStyle),e(),c.bind("keyup",function(){e()}).bind("mouseover paste",function(){setTimeout(function(){e()},10)})}}(jQuery); -------------------------------------------------------------------------------- /includes/fields/class-gf-field-page.php: -------------------------------------------------------------------------------- 1 | get_admin_buttons(); 27 | $field_content = "{$admin_buttons}
" . esc_html__( 'end of page', 'gravityforms' ) . "
" . esc_html__( 'PAGE BREAK', 'gravityforms' ) . "
" . esc_html__( 'top of new page', 'gravityforms' ) . '
'; 28 | return $field_content; 29 | } 30 | 31 | public function sanitize_settings() { 32 | parent::sanitize_settings(); 33 | if ( $this->nextButton ) { 34 | $this->nextButton['imageUrl'] = wp_strip_all_tags( $this->nextButton['imageUrl'] ); 35 | $allowed_tags = wp_kses_allowed_html( 'post' ); 36 | $this->nextButton['text'] = wp_kses( $this->nextButton['text'], $allowed_tags ); 37 | $this->nextButton['type'] = wp_strip_all_tags( $this->nextButton['type'] ); 38 | if ( isset( $this->nextButton['conditionalLogic'] ) && is_array( $this->nextButton['conditionalLogic'] ) ) { 39 | $this->nextButton['conditionalLogic'] = $this->sanitize_settings_conditional_logic( $this->nextButton['conditionalLogic'] ); 40 | } 41 | } 42 | } 43 | 44 | } 45 | 46 | GF_Fields::register( new GF_Field_Page() ); -------------------------------------------------------------------------------- /includes/addon/class-gf-addon-locking.php: -------------------------------------------------------------------------------- 1 | 'contact', 17 | * "capabilities" => array("gravityforms_contacts_edit_contacts"), 18 | * "redirect_url" => admin_url("admin.php?page=gf_contacts"), 19 | * "edit_url" => admin_url(sprintf("admin.php?page=gf_contacts&id=%d", $contact_id)), 20 | * "strings" => $strings 21 | * ); 22 | * 23 | * @param array $config 24 | * @param GFAddOn $addon 25 | */ 26 | public function __construct( $config, $addon ) { 27 | $this->_addon = $addon; 28 | $capabilities = isset( $config['capabilities'] ) ? $config['capabilities'] : array(); 29 | $redirect_url = isset( $config['redirect_url'] ) ? $config['redirect_url'] : ''; 30 | $edit_url = isset( $config['edit_url'] ) ? $config['edit_url'] : ''; 31 | $object_type = isset( $config['object_type'] ) ? $config['object_type'] : ''; 32 | $this->_strings = isset( $config['strings'] ) ? $config['strings'] : array(); 33 | parent::__construct( $object_type, $redirect_url, $edit_url, $capabilities ); 34 | } 35 | 36 | public function get_strings() { 37 | return array_merge( parent::get_strings(), $this->_strings ); 38 | } 39 | 40 | protected function is_edit_page() { 41 | return $this->_addon->is_locking_edit_page(); 42 | } 43 | 44 | protected function is_list_page() { 45 | return $this->_addon->is_locking_list_page(); 46 | } 47 | 48 | protected function is_view_page() { 49 | return $this->_addon->is_locking_view_page(); 50 | } 51 | 52 | protected function get_object_id() { 53 | return $this->_addon->get_locking_object_id(); 54 | } 55 | 56 | protected function is_object_locked( $object_id ) { 57 | return $this->is_object_locked( $object_id ); 58 | } 59 | } -------------------------------------------------------------------------------- /includes/addon/css/gaddon_form_settings.css: -------------------------------------------------------------------------------- 1 | .settings-field-map-table { } 2 | .settings-field-map-table thead th { font-weight: bold; border-bottom: 1px solid #ccc; } 3 | .settings-field-map-table tbody td { border-bottom: 1px dotted #eee; } 4 | .settings-field-map-table select { max-width: 90%; } 5 | 6 | .settings-field-map-table .custom-key-reset, 7 | .settings-field-map-table .custom-value-reset, 8 | .gaddon-setting-select-custom-container .select-custom-reset { 9 | background: url( ../../../images/xit.gif ) no-repeat scroll 0 0 transparent; 10 | cursor:pointer; 11 | display:none; 12 | position:absolute; 13 | text-indent:-9999px; 14 | width:10px; 15 | height: 10px; 16 | -moz-transition: none; 17 | -webkit-transition: none; 18 | -o-transition: color 0 ease-in; 19 | transition: none; 20 | } 21 | .settings-field-map-table .custom-key-reset { 22 | margin-top: 10px; 23 | margin-left: 165px; 24 | } 25 | .settings-field-map-table .repeater th { padding-left: 0px; } 26 | 27 | .settings-field-map-table .custom-key-reset:hover, 28 | .settings-field-map-table .custom-value-reset:hover, 29 | .gaddon-setting-select-custom-container .select-custom-reset:hover { 30 | background-position-x: -10px; 31 | } 32 | 33 | .settings-field-map-table .custom-key-container:hover .custom-key-reset, 34 | .settings-field-map-table .custom-key-container:hover .custom-value-reset, 35 | .gaddon-setting-select-custom-container:hover .select-custom-reset { 36 | display:block; 37 | } 38 | 39 | .gaddon-setting-select-custom-container { display:inline-block;position:relative; } 40 | .gaddon-setting-select-custom-container .select-custom-reset { 41 | left: 171px; 42 | top: 10px; 43 | } 44 | 45 | .gaddon-section .required { color: #f00; } 46 | .gaddon-setting-inline{ 47 | display:inline; 48 | margin-right:6px; 49 | } 50 | 51 | .mt-gaddon-editor { 52 | float: right; 53 | position: relative; 54 | right: 21px; 55 | top: 70px; 56 | } 57 | 58 | .mt-gaddon-editor ~ .wp-editor-wrap { 59 | margin-right: 23px; 60 | } -------------------------------------------------------------------------------- /includes/webapi/v2/restapi.php: -------------------------------------------------------------------------------- 1 | =2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);"},"Form Title":["\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0444\u043e\u0440\u043c\u044b"],"Advanced":["\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u044b\u0435"],"Preview":["\u041f\u0440\u0435\u0434\u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440"],"Form Description":["\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0444\u043e\u0440\u043c\u044b"],"Form Settings":["\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0444\u043e\u0440\u043c\u044b"],"Form":["\u0424\u043e\u0440\u043c\u0430"],"Select a Form":["\u0412\u044b\u0431\u0440\u0430\u0442\u044c \u0444\u043e\u0440\u043c\u0443"],"AJAX":["AJAX"],"Field Values":["\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044f"],"Tabindex":["\u0418\u043d\u0434\u0435\u043a\u0441 \u0437\u0430\u043a\u043b\u0430\u0434\u043a\u0438"],"The selected form has been deleted or trashed. Please select a new form.":["\u0412\u044b\u0431\u0440\u0430\u043d\u043d\u0430\u044f \u0444\u043e\u0440\u043c\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u0430 \u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0430 \u0432 \u041a\u043e\u0440\u0437\u0438\u043d\u0443. \u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043d\u043e\u0432\u0443\u044e \u0444\u043e\u0440\u043c\u0443."],"You must have at least one form to use the block.":[""],"Select a form below to add it to your page.":["\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u043e\u0440\u043c\u0443 \u043d\u0438\u0436\u0435 \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443."]}}} -------------------------------------------------------------------------------- /includes/blocks/class-gf-blocks.php: -------------------------------------------------------------------------------- 1 | get_type(); 42 | 43 | if ( empty( $block_type ) ) { 44 | return new WP_Error( 'block_type_undefined', 'The type must be set' ); 45 | } 46 | 47 | if ( isset( self::$_blocks[ $block_type ] ) ) { 48 | return new WP_Error( 'block_already_registered', 'Block type already registered: ' . $block_type ); 49 | } 50 | 51 | // Register block. 52 | self::$_blocks[ $block_type ] = $block; 53 | 54 | // Initialize block. 55 | call_user_func( array( $block, 'init' ) ); 56 | 57 | return true; 58 | 59 | } 60 | 61 | /** 62 | * Get instance of block. 63 | * 64 | * @since 2.4.10 65 | * 66 | * @param string $block_type Block type. 67 | * 68 | * @return GF_Block|bool 69 | */ 70 | public static function get( $block_type ) { 71 | 72 | return isset( self::$_blocks[ $block_type ] ) ? self::$_blocks[ $block_type ] : false; 73 | 74 | } 75 | 76 | /** 77 | * Returns an array of registered block types. 78 | * 79 | * @since 2.4.18 80 | * 81 | * @return array 82 | */ 83 | public static function get_all_types() { 84 | return array_keys( self::$_blocks ); 85 | } 86 | 87 | } 88 | 89 | new GF_Blocks(); 90 | -------------------------------------------------------------------------------- /includes/locking/js/locking-list.js: -------------------------------------------------------------------------------- 1 | (function (gflocking, $) { 2 | var objectType; 3 | 4 | $(document).ready(function () { 5 | objectType = gflockingVars.objectType; 6 | gflocking.init(); 7 | 8 | }); 9 | 10 | gflocking.init = function () { 11 | initHeartbeat(); 12 | }; 13 | 14 | function initHeartbeat() { 15 | 16 | var checkLocksKey = 'gform-check-locked-objects-' + objectType; 17 | 18 | wp.heartbeat.interval( 30 ); 19 | 20 | $(document).on('heartbeat-tick.' + checkLocksKey,function (e, data) { 21 | var locked = data[checkLocksKey] || {}; 22 | 23 | $('.gf-locking').each(function (i, el) { 24 | var id , $row = $(el), lock_data, avatar; 25 | id = $row.data("id"); 26 | if (locked.hasOwnProperty(id)) { 27 | if (!$row.hasClass('wp-locked')) { 28 | lock_data = locked[id]; 29 | $row.find('.locked-text').text(lock_data.text); 30 | $row.find('.check-column input[type=checkbox]').prop('checked', false); 31 | 32 | if (lock_data.avatar_src) { 33 | avatar = $('').attr('src', lock_data.avatar_src.replace(/&/g, '&')); 34 | $row.find('.locked-avatar').empty().append(avatar); 35 | } 36 | $row.addClass('wp-locked'); 37 | } 38 | } else if ($row.hasClass('wp-locked')) { 39 | $row.removeClass('wp-locked').delay(1000).find('.locked-info span').empty(); 40 | } 41 | }); 42 | }).on('heartbeat-send.' + checkLocksKey, function (e, data) { 43 | var check = []; 44 | 45 | $('.gf-locking').each(function (i, row) { 46 | check.push($(row).data("id")); 47 | }); 48 | 49 | if (check.length) 50 | data[checkLocksKey] = check; 51 | }); 52 | 53 | } 54 | 55 | }(window.gflocking = window.gflocking || {}, jQuery)); 56 | -------------------------------------------------------------------------------- /js/datepicker.js: -------------------------------------------------------------------------------- 1 | jQuery(document).ready(gformInitDatepicker); 2 | 3 | function gformInitDatepicker() { 4 | jQuery('.datepicker').each(function () { 5 | var $element = jQuery(this); 6 | gformInitSingleDatepicker( $element) ; 7 | }); 8 | } 9 | 10 | function gformInitSingleDatepicker( $element ) { 11 | var inputId = $element.attr( 'id' ) ? $element.attr( 'id' ) : '', 12 | optionsObj = { 13 | yearRange: '-100:+20', 14 | showOn: 'focus', 15 | dateFormat: 'mm/dd/yy', 16 | changeMonth: true, 17 | changeYear: true, 18 | suppressDatePicker: false, 19 | onClose: function () { 20 | $element.focus(); 21 | var self = this; 22 | this.suppressDatePicker = true; 23 | setTimeout( function() { 24 | self.suppressDatePicker = false; 25 | }, 200 ); 26 | }, 27 | beforeShow: function( input, inst ) { 28 | return ! this.suppressDatePicker; 29 | } 30 | }; 31 | 32 | if ($element.hasClass('dmy')) { 33 | optionsObj.dateFormat = 'dd/mm/yy'; 34 | } else if ($element.hasClass('dmy_dash')) { 35 | optionsObj.dateFormat = 'dd-mm-yy'; 36 | } else if ($element.hasClass('dmy_dot')) { 37 | optionsObj.dateFormat = 'dd.mm.yy'; 38 | } else if ($element.hasClass('ymd_slash')) { 39 | optionsObj.dateFormat = 'yy/mm/dd'; 40 | } else if ($element.hasClass('ymd_dash')) { 41 | optionsObj.dateFormat = 'yy-mm-dd'; 42 | } else if ($element.hasClass('ymd_dot')) { 43 | optionsObj.dateFormat = 'yy.mm.dd'; 44 | } 45 | 46 | if ($element.hasClass('datepicker_with_icon')) { 47 | optionsObj.showOn = 'both'; 48 | optionsObj.buttonImage = $element.parent().siblings("[id^='gforms_calendar_icon_input']").val(); 49 | optionsObj.buttonImageOnly = true; 50 | optionsObj.buttonText = ''; 51 | } 52 | 53 | inputId = inputId.split('_'); 54 | 55 | // allow the user to override the datepicker options object 56 | optionsObj = gform.applyFilters('gform_datepicker_options_pre_init', optionsObj, inputId[1], inputId[2]); 57 | 58 | $element.datepicker(optionsObj); 59 | 60 | // We give the input focus after selecting a date which differs from default Datepicker behavior; this prevents 61 | // users from clicking on the input again to open the datepicker. Let's add a manual click event to handle this. 62 | if( $element.is( ':input' ) ) { 63 | $element.click( function() { 64 | $element.datepicker( 'show' ); 65 | } ); 66 | } 67 | 68 | } -------------------------------------------------------------------------------- /includes/fields/class-gf-field-post-tags.php: -------------------------------------------------------------------------------- 1 | is_entry_detail(); 41 | $is_form_editor = $this->is_form_editor(); 42 | 43 | $id = (int) $this->id; 44 | $field_id = $is_entry_detail || $is_form_editor || $form_id == 0 ? "input_$id" : 'input_' . $form_id . "_$id"; 45 | 46 | $value = esc_attr( $value ); 47 | $size = $this->size; 48 | $class_suffix = $is_entry_detail ? '_admin' : ''; 49 | $class = $size . $class_suffix; 50 | $class = esc_attr( $class ); 51 | 52 | $disabled_text = $is_form_editor ? 'disabled="disabled"' : ''; 53 | 54 | $tabindex = $this->get_tabindex(); 55 | $placeholder_attribute = $this->get_field_placeholder_attribute(); 56 | $required_attribute = $this->isRequired ? 'aria-required="true"' : ''; 57 | $invalid_attribute = $this->failed_validation ? 'aria-invalid="true"' : 'aria-invalid="false"'; 58 | $aria_describedby = $this->get_aria_describedby(); 59 | 60 | return ""; 63 | } 64 | 65 | public function allow_html() { 66 | return true; 67 | } 68 | } 69 | 70 | GF_Fields::register( new GF_Field_Post_Tags() ); -------------------------------------------------------------------------------- /includes/fields/class-gf-field-post-custom-field.php: -------------------------------------------------------------------------------- 1 | is_entry_detail(); 41 | $is_form_editor = $this->is_form_editor(); 42 | 43 | $id = (int) $this->id; 44 | $field_id = $is_entry_detail || $is_form_editor || $form_id == 0 ? "input_$id" : 'input_' . $form_id . "_$id"; 45 | 46 | $value = esc_attr( $value ); 47 | $size = $this->size; 48 | $class_suffix = $is_entry_detail ? '_admin' : ''; 49 | $class = $size . $class_suffix; 50 | $class = esc_attr( $class ); 51 | 52 | $disabled_text = $is_form_editor ? 'disabled="disabled"' : ''; 53 | 54 | $tabindex = $this->get_tabindex(); 55 | $placeholder_attribute = $this->get_field_placeholder_attribute(); 56 | $required_attribute = $this->isRequired ? 'aria-required="true"' : ''; 57 | $invalid_attribute = $this->failed_validation ? 'aria-invalid="true"' : 'aria-invalid="false"'; 58 | $aria_describedby = $this->get_aria_describedby(); 59 | 60 | return "
61 | 62 |
"; 63 | } 64 | 65 | public function allow_html() { 66 | return true; 67 | } 68 | } 69 | 70 | GF_Fields::register( new GF_Field_Post_Custom_Field() ); -------------------------------------------------------------------------------- /js/preview.js: -------------------------------------------------------------------------------- 1 | jQuery( document ).ready(function() { 2 | 3 | // toggle the helper classes that show the form structure 4 | jQuery('.toggle_helpers input[type=checkbox]').attr('checked',false); 5 | 6 | jQuery('#showgrid').click(function(){ 7 | if(jQuery(this).is(":checked")) { 8 | jQuery('#preview_form_container').addClass("showgrid"); 9 | } else { 10 | jQuery('#preview_form_container').removeClass("showgrid"); 11 | } 12 | }); 13 | 14 | jQuery('#showme').click(function(){ 15 | if(jQuery(this).is(":checked")) { 16 | jQuery('.gform_wrapper form').addClass("gf_showme"); 17 | jQuery('#helper_legend_container').css("display", "inline-block"); 18 | } else { 19 | jQuery('.gform_wrapper form').removeClass("gf_showme"); 20 | jQuery('#helper_legend_container').css("display", "none"); 21 | } 22 | }); 23 | 24 | // dismiss the alerts and set a cookie 25 | 26 | if (GetCookie("dismissed-notifications")) { 27 | jQuery(GetCookie("dismissed-notifications")).hide(); 28 | } 29 | jQuery(".hidenotice").click(function () { 30 | var alertId = jQuery(this).closest(".preview_notice").attr("id"); 31 | var dismissedNotifications = GetCookie("dismissed-notifications") + ",#" + alertId; 32 | jQuery(this).closest(".preview_notice").slideToggle('slow'); 33 | SetCookie("dismissed-notifications",dismissedNotifications.replace('null,','')) 34 | }); 35 | 36 | // Create the cookie 37 | function SetCookie(sName, sValue) 38 | { 39 | document.cookie = sName + "=" + escape(sValue); 40 | // Expires the cookie after a month 41 | var date = new Date(); 42 | date.setMonth(date.getMonth()+1); 43 | document.cookie += ("; expires=" + date.toUTCString()); 44 | } 45 | 46 | // Retrieve the value of the cookie. 47 | function GetCookie(sName) 48 | { 49 | var aCookie = document.cookie.split("; "); 50 | for (var i=0; i < aCookie.length; i++) 51 | { 52 | var aCrumb = aCookie[i].split("="); 53 | if (sName == aCrumb[0]) 54 | return unescape(aCrumb[1]); 55 | } 56 | return null; 57 | } 58 | 59 | // display the current viewport size 60 | 61 | jQuery('#browser_size_info').text('Viewport ( Width : ' 62 | + jQuery(window).width() + 'px , Height :' + jQuery(window).height() + 'px )'); 63 | 64 | jQuery(window).resize(function () { 65 | jQuery('#browser_size_info').text('Viewport ( Width : ' + jQuery(window).width() 66 | + 'px , Height :' + jQuery(window).height() + 'px )'); 67 | }); 68 | 69 | }); 70 | -------------------------------------------------------------------------------- /includes/fields/class-gf-field-singleshipping.php: -------------------------------------------------------------------------------- 1 | is_entry_detail(); 25 | $is_form_editor = $this->is_form_editor(); 26 | 27 | $id = (int) $this->id; 28 | $field_id = $is_entry_detail || $is_form_editor || $form_id == 0 ? "input_$id" : 'input_' . $form_id . "_$id"; 29 | 30 | $currency = $is_entry_detail && ! empty( $entry ) ? $entry['currency'] : ''; 31 | 32 | $price = ! empty( $value ) ? $value : $this->basePrice; 33 | if ( empty( $price ) ) { 34 | $price = 0; 35 | } 36 | 37 | $price = esc_attr( $price ); 38 | 39 | return "
40 | 41 | " . GFCommon::to_money( $price, $currency ) . ' 42 |
'; 43 | } 44 | 45 | public function get_value_entry_detail( $value, $currency = '', $use_text = false, $format = 'html', $media = 'screen' ) { 46 | return GFCommon::to_money( $value, $currency ); 47 | } 48 | 49 | public function sanitize_settings() { 50 | parent::sanitize_settings(); 51 | $price_number = GFCommon::to_number( $this->basePrice ); 52 | $this->basePrice = GFCommon::to_money( $price_number ); 53 | } 54 | 55 | public function get_value_default() { 56 | $value = $this->is_form_editor() ? $this->defaultValue : GFCommon::replace_variables_prepopulate( $this->defaultValue ); 57 | if( rgblank( $value ) ) { 58 | $value = $this->basePrice; 59 | } 60 | return $value; 61 | } 62 | 63 | /** 64 | * Actions to be performed after the field has been converted to an object. 65 | * 66 | * @since 2.4.8.2 67 | */ 68 | public function post_convert_field() { 69 | parent::post_convert_field(); 70 | 71 | // Ensure the choices property is not an array to prevent issues with some features such as the conditional logic reset to default. 72 | $this->choices = null; 73 | } 74 | 75 | } 76 | 77 | GF_Fields::register( new GF_Field_SingleShipping() ); -------------------------------------------------------------------------------- /includes/wizard/class-gf-upgrade-wizard.php: -------------------------------------------------------------------------------- 1 | 25 | 26 |
27 | 28 |

29 | 30 |
31 | 32 |

33 | 34 |

35 |

36 | 37 | 38 | 39 | 84 |
85 | 86 | failed_validation = true; 33 | $this->validation_message = empty( $this->errorMessage ) ? __( 'Please enter a valid amount.', 'gravityforms' ) : $this->errorMessage; 34 | } 35 | } 36 | 37 | public function get_field_input( $form, $value = '', $entry = null ) { 38 | $form_id = absint( $form['id'] ); 39 | $is_entry_detail = $this->is_entry_detail(); 40 | $is_form_editor = $this->is_form_editor(); 41 | 42 | $id = (int) $this->id; 43 | $field_id = $is_entry_detail || $is_form_editor || $form_id == 0 ? "input_$id" : 'input_' . $form_id . "_$id"; 44 | 45 | $value = esc_attr( $value ); 46 | 47 | $placeholder_attribute = $this->get_field_placeholder_attribute(); 48 | 49 | $size = $this->size; 50 | $class_suffix = $is_entry_detail ? '_admin' : ''; 51 | $class = $size . $class_suffix; 52 | $class = esc_attr( $class ); 53 | 54 | $disabled_text = $is_form_editor ? 'disabled="disabled"' : ''; 55 | $required_attribute = $this->isRequired ? 'aria-required="true"' : ''; 56 | $invalid_attribute = $this->failed_validation ? 'aria-invalid="true"' : 'aria-invalid="false"'; 57 | 58 | $tabindex = $this->get_tabindex(); 59 | 60 | return "
61 | 62 |
"; 63 | 64 | 65 | } 66 | 67 | public function get_value_entry_detail( $value, $currency = '', $use_text = false, $format = 'html', $media = 'screen' ) { 68 | return GFCommon::to_money( $value, $currency ); 69 | } 70 | 71 | 72 | } 73 | 74 | GF_Fields::register( new GF_Field_Price() ); -------------------------------------------------------------------------------- /images/note-placeholder.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /includes/fields/class-gf-field-html.php: -------------------------------------------------------------------------------- 1 | is_entry_detail(); 28 | $is_form_editor = $this->is_form_editor(); 29 | 30 | $content = $is_entry_detail || $is_form_editor ? "
31 | " . esc_html__( 'HTML Content', 'gravityforms' ) . 32 | '' . esc_html__( 'This is a content placeholder. HTML content is not displayed in the form admin. Preview this form to view the content.', 'gravityforms' ) . '
' 33 | : $this->content; 34 | $content = GFCommon::replace_variables_prepopulate( $content ); // adding support for merge tags 35 | 36 | // adding support for shortcodes 37 | $content = $this->do_shortcode( $content ); 38 | 39 | return $content; 40 | } 41 | 42 | public function get_field_content( $value, $force_frontend_label, $form ) { 43 | $form_id = $form['id']; 44 | $admin_buttons = $this->get_admin_buttons(); 45 | $is_entry_detail = $this->is_entry_detail(); 46 | $is_form_editor = $this->is_form_editor(); 47 | $is_admin = $is_entry_detail || $is_form_editor; 48 | $field_label = $this->get_field_label( $force_frontend_label, $value ); 49 | $field_id = $is_admin || $form_id == 0 ? "input_{$this->id}" : 'input_' . $form_id . "_{$this->id}"; 50 | $field_content = ! $is_admin ? '{FIELD}' : $field_content = sprintf( "%s{FIELD}", $admin_buttons, $field_id, esc_html( $field_label ) ); 51 | 52 | return $field_content; 53 | } 54 | 55 | public function sanitize_settings() { 56 | parent::sanitize_settings(); 57 | $this->content = GFCommon::maybe_wp_kses( $this->content ); 58 | } 59 | 60 | public function do_shortcode( $content ){ 61 | 62 | if( isset($GLOBALS['wp_embed']) ) { 63 | // adds support for the [embed] shortcode 64 | $content = $GLOBALS['wp_embed']->run_shortcode( $content ); 65 | } 66 | // executes all other shortcodes 67 | $content = do_shortcode( $content ); 68 | 69 | return $content; 70 | } 71 | } 72 | 73 | GF_Fields::register( new GF_Field_HTML() ); 74 | -------------------------------------------------------------------------------- /includes/addon/js/gaddon_genericmap.min.js: -------------------------------------------------------------------------------- 1 | var GFGenericMap=function(e){var s=this;return s.options=e,s.UI=jQuery("#gaddon-setting-row-"+s.options.fieldName),s.init=function(){s.bindEvents(),s.setupData(),s.setupRepeater()},s.bindEvents=function(){s.UI.on("change",'select[name="_gaddon_setting_'+s.options.keyFieldName+'"]',function(){var e=jQuery(this),n=e.data("chosen")?e.siblings(".chosen-container"):e.data("select2")?e.siblings(".select2-container"):e,t=e.siblings(".custom-key-container");"gf_custom"==e.val()&&n.fadeOut(function(){t.fadeIn().focus()})}),s.UI.on("change",'select[name="_gaddon_setting_'+s.options.valueFieldName+'"]',function(){var e=jQuery(this),n=e.data("chosen")?e.siblings(".chosen-container"):e.data("select2")?e.siblings(".select2-container"):e,t=e.siblings(".custom-value-container");"gf_custom"==e.val()&&n.fadeOut(function(){t.fadeIn().focus()})}),s.UI.on("click","a.custom-key-reset",function(e){e.preventDefault();var n=jQuery(this).parents(".custom-key-container"),t=n.siblings("select.key"),a=t.data("chosen")?t.siblings(".chosen-container"):t.data("select2")?t.siblings(".select2-container"):t;n.fadeOut(function(){n.find("input").val("").change(),t.val("").trigger("change"),a.fadeIn().focus()})}),s.UI.on("click","a.custom-value-reset",function(e){e.preventDefault();var n=jQuery(this).parents(".custom-value-container"),t=n.siblings("select.value"),a=t.data("chosen")?t.siblings(".chosen-container"):t.data("select2")?t.siblings(".select2-container"):t;n.fadeOut(function(){n.find("input").val("").change(),t.val("").trigger("change"),a.fadeIn().focus()})}),s.UI.closest("form").on("submit",function(e){jQuery('[name^="_gaddon_setting_'+s.options.fieldName+'_"]').each(function(e){jQuery(this).removeAttr("name")})})},s.setupData=function(){var e=jQuery("#"+s.options.fieldId).val();s.data=e?jQuery.parseJSON(e):null,s.data||(s.data=[{key:"",value:"",custom_key:"",custom_value:""}])},s.setupRepeater=function(){var e=0',removeButtonMarkup:'',callbacks:{add:function(e,n,t){var a=n.find('select[name="_gaddon_setting_'+s.options.keyFieldName+'"]');!t.custom_key&&0failed_validation = true; 41 | $this->validation_message = empty( $this->errorMessage ) ? esc_html__( 'Please enter a valid amount.', 'gravityforms' ) : $this->errorMessage; 42 | } 43 | } 44 | 45 | 46 | public function get_field_input( $form, $value = '', $entry = null ) { 47 | $form_id = absint( $form['id'] ); 48 | $is_entry_detail = $this->is_entry_detail(); 49 | $is_form_editor = $this->is_form_editor(); 50 | 51 | $id = absint( $this->id ); 52 | $field_id = $is_entry_detail || $is_form_editor || $form_id == 0 ? "input_$id" : 'input_' . $form_id . "_$id"; 53 | 54 | $value = esc_attr( $value ); 55 | 56 | $placeholder_attribute = $this->get_field_placeholder_attribute(); 57 | $required_attribute = $this->isRequired ? 'aria-required="true"' : ''; 58 | $invalid_attribute = $this->failed_validation ? 'aria-invalid="true"' : 'aria-invalid="false"'; 59 | 60 | $size = $this->size; 61 | $class_suffix = $is_entry_detail ? '_admin' : ''; 62 | $class = $size . $class_suffix; 63 | $class = esc_attr( $class ); 64 | 65 | $disabled_text = $is_form_editor ? 'disabled="disabled"' : ''; 66 | 67 | $tabindex = $this->get_tabindex(); 68 | 69 | return "
70 | 71 |
"; 72 | 73 | } 74 | 75 | public function get_value_entry_detail( $value, $currency = '', $use_text = false, $format = 'html', $media = 'screen' ) { 76 | return GFCommon::to_money( $value, $currency ); 77 | } 78 | 79 | } 80 | 81 | GF_Fields::register( new GF_Field_Donation() ); -------------------------------------------------------------------------------- /includes/class-gf-background-upgrader.php: -------------------------------------------------------------------------------- 1 | data; 40 | } 41 | 42 | /** 43 | * Is the queue empty for all blogs? 44 | * 45 | * @since 2.3 46 | * 47 | * @return bool 48 | */ 49 | public function is_queue_empty() { 50 | return parent::is_queue_empty(); 51 | } 52 | 53 | /** 54 | * Is the updater running? 55 | * @return boolean 56 | */ 57 | public function is_updating() { 58 | return false === $this->is_queue_empty(); 59 | } 60 | 61 | /** 62 | * Task 63 | * 64 | * Override this method to perform any actions required on each 65 | * queue item. Return the modified item for further processing 66 | * in the next pass through. Or, return false to remove the 67 | * item from the queue. 68 | * 69 | * @param string $callback Update callback function 70 | * @return mixed 71 | */ 72 | protected function task( $callback ) { 73 | if ( ! defined( 'GF_UPGRADING' ) ) { 74 | define( 'GF_UPGRADING', true ); 75 | } 76 | 77 | if ( is_callable( $callback ) ) { 78 | GFCommon::log_debug( sprintf( '%s(): Running callback: %s', __METHOD__, print_r( $callback, 1 ) ) ); 79 | $needs_more_time = call_user_func( $callback ); 80 | if ( $needs_more_time ) { 81 | GFCommon::log_debug( sprintf( '%s(): Callback needs another run: %s', __METHOD__, print_r( $callback, 1 ) ) ); 82 | return $callback; 83 | } else { 84 | GFCommon::log_debug( sprintf( '%s(): Finished callback: %s', __METHOD__, print_r( $callback, 1 ) ) ); 85 | } 86 | } else { 87 | GFCommon::log_debug( sprintf( '%s(): Could not find callback: %s', __METHOD__, print_r( $callback, 1 ) ) ); 88 | } 89 | 90 | return false; 91 | } 92 | 93 | /** 94 | * Complete 95 | * 96 | * Override if applicable, but ensure that the below actions are 97 | * performed, or, call parent::complete(). 98 | */ 99 | protected function complete() { 100 | parent::complete(); 101 | } 102 | 103 | } 104 | -------------------------------------------------------------------------------- /includes/fields/class-gf-field-hidden.php: -------------------------------------------------------------------------------- 1 | is_entry_detail(); 31 | $is_form_editor = $this->is_form_editor(); 32 | 33 | $id = (int) $this->id; 34 | $field_id = $is_entry_detail || $is_form_editor || $form_id == 0 ? "input_$id" : 'input_' . $form_id . "_$id"; 35 | 36 | $disabled_text = $is_form_editor ? 'disabled="disabled"' : ''; 37 | 38 | $field_type = $is_entry_detail || $is_form_editor ? 'text' : 'hidden'; 39 | $class_attribute = $is_entry_detail || $is_form_editor ? '' : "class='gform_hidden'"; 40 | $required_attribute = $this->isRequired ? 'aria-required="true"' : ''; 41 | $invalid_attribute = $this->failed_validation ? 'aria-invalid="true"' : 'aria-invalid="false"'; 42 | 43 | return sprintf( "", $id, $field_id, esc_attr( $value ), $disabled_text ); 44 | } 45 | 46 | public function get_field_content( $value, $force_frontend_label, $form ) { 47 | $form_id = $form['id']; 48 | $admin_buttons = $this->get_admin_buttons(); 49 | $is_entry_detail = $this->is_entry_detail(); 50 | $is_form_editor = $this->is_form_editor(); 51 | $is_admin = $is_entry_detail || $is_form_editor; 52 | $field_label = $this->get_field_label( $force_frontend_label, $value ); 53 | $field_id = $is_admin || $form_id == 0 ? "input_{$this->id}" : 'input_' . $form_id . "_{$this->id}"; 54 | $field_content = ! $is_admin ? '{FIELD}' : $field_content = sprintf( "%s{FIELD}", $admin_buttons, $field_id, esc_html( $field_label ) ); 55 | 56 | return $field_content; 57 | } 58 | 59 | // # FIELD FILTER UI HELPERS --------------------------------------------------------------------------------------- 60 | 61 | /** 62 | * Returns the filter operators for the current field. 63 | * 64 | * @since 2.4 65 | * 66 | * @return array 67 | */ 68 | public function get_filter_operators() { 69 | $operators = parent::get_filter_operators(); 70 | $operators[] = 'contains'; 71 | 72 | return $operators; 73 | } 74 | 75 | } 76 | 77 | GF_Fields::register( new GF_Field_Hidden() ); 78 | -------------------------------------------------------------------------------- /includes/addon/js/gaddon_feedorder.js: -------------------------------------------------------------------------------- 1 | var GFFeedOrder = function( args ) { 2 | 3 | var self = this, 4 | $ = jQuery; 5 | 6 | /** 7 | * Initialize Feed Ordering 8 | */ 9 | self.init = function() { 10 | 11 | // Assign options to instance. 12 | self.options = args; 13 | 14 | // Prepare sorting handle. 15 | var sortHandleMarkup = ''; 16 | 17 | // Add sorting handle to table. 18 | $( '.wp-list-table thead tr, .wp-list-table tfoot tr' ).append( '' ); 19 | $( '.wp-list-table tbody tr' ).append( sortHandleMarkup ); 20 | 21 | // Initialize sorting. 22 | self.initSorting(); 23 | 24 | }; 25 | 26 | /** 27 | * Initialize jQuery UI Sortable. 28 | */ 29 | self.initSorting = function() { 30 | 31 | $( '.wp-list-table tbody' ).sortable( 32 | { 33 | cursor: 'move', 34 | handle: '.feed-sort-handle', 35 | placeholder: 'feed-placeholder', 36 | tolerance: 'pointer', 37 | create: function() { $( '.wp-list-table' ).addClass( 'feed-list-sortable' ); }, 38 | helper: self.fixSortableColumnWidths, 39 | start: self.setPlaceholderHeight, 40 | update: self.updateFeedOrder, 41 | } 42 | ); 43 | 44 | } 45 | 46 | /** 47 | * Fix table column widths. 48 | */ 49 | self.fixSortableColumnWidths = function( event, tr ) { 50 | 51 | var $originals = tr.children(), 52 | $helper = tr.clone(); 53 | 54 | $helper.children().each( function( index ) { 55 | $( this ).width( $originals.eq( index ).width() ); 56 | } ); 57 | 58 | return $helper; 59 | 60 | } 61 | 62 | /** 63 | * Get order of feeds. 64 | */ 65 | self.getFeedOrder = function() { 66 | 67 | // Get all the checkboxes from the feed list table. 68 | var feed_checkboxes = $( '.wp-list-table tbody .check-column input[type="checkbox"]' ); 69 | 70 | // Map a function to the feed checkboxes array that returns the checkbox value. 71 | return feed_checkboxes.map( function() { 72 | return $( this ).val(); 73 | } ).get(); 74 | 75 | } 76 | 77 | /** 78 | * Set height of the placeholder draggable feed. 79 | */ 80 | self.setPlaceholderHeight = function( event, ui ) { 81 | 82 | // Set the height of the placeholder to the height of the feed being moved. 83 | $( '.wp-list-table .feed-placeholder' ).height( ui.item.height() ); 84 | 85 | } 86 | 87 | /** 88 | * Save the feed ordering to the database. 89 | */ 90 | self.updateFeedOrder = function( event, ui ) { 91 | 92 | $.ajax( 93 | ajaxurl, 94 | { 95 | method: 'POST', 96 | dataType: 'JSON', 97 | data: { 98 | action: 'gf_save_feed_order', 99 | addon: self.options.addon, 100 | form_id: self.options.formId, 101 | feed_order: self.getFeedOrder(), 102 | nonce: self.options.nonce, 103 | } 104 | } 105 | ); 106 | 107 | } 108 | 109 | this.init(); 110 | 111 | } 112 | -------------------------------------------------------------------------------- /includes/locking/js/locking.min.js: -------------------------------------------------------------------------------- 1 | !function(t,s){s(document).ready(function(){t.init()});var o,e,c,i,r,l,u=!1;function a(){s("#gform-lock-request-status").html(c.noResponse),s("#gform-lock-request-button").attr("disabled",!1).text(c.requestAgain),l=!!(u=!1),wp.heartbeat.interval(30)}t.init=function(){i=gflockingVars.hasLock,o=gflockingVars.objectID,e=gflockingVars.objectType,r=gflockingVars.lockUI,c=gflockingVars.strings,function(){wp.heartbeat.interval(30),s("#wpfooter").append(r);var n="gform-refresh-lock-"+e,a="gform-request-lock-"+e;s(document).on("heartbeat-send."+n,function(t,e){var r={};o&&s("#gform-lock-dialog").length&&0!=i&&(r.objectID=o,e[n]=r)}),s(document).on("heartbeat-send."+a,function(t,e){var r={};if(!u)return e;r.objectID=o,e[a]=r}),s(document).on("heartbeat-tick."+n,function(t,e){var r,o,a,c;if(e[n]&&((r=e[n]).lock_error||r.lock_request)){if(c=r.lock_error?r.lock_error:r.lock_request,!(o=s("#gform-lock-dialog")).length)return;o.is(":visible")?r.lock_error?s("#gform-reject-lock-request-button").is(":visible")&&(r.lock_error.avatar_src&&(a=s('').attr("src",r.lock_error.avatar_src.replace(/&/g,"&")),o.find("div.gform-locked-avatar").empty().append(a)),s("#gform-reject-lock-request-button").hide(),o.show().find(".currently-editing").text(r.lock_error.text)):r.lock_request&&s("#gform-lock-request-status").html(r.lock_request.text):(c.avatar_src&&(a=s('').attr("src",c.avatar_src.replace(/&/g,"&")),o.find("div.gform-locked-avatar").empty().append(a)),o.show().find(".currently-editing").text(c.text),r.lock_request?s("#gform-reject-lock-request-button").show():s("#gform-reject-lock-request-button").hide(),o.find(".wp-tab-first").focus())}}),s(document).on("heartbeat-tick."+a,function(t,e){var r,o;if(e[a]&&(r=e[a]).status){if(o=r.status,!s("#gform-lock-dialog").length)return;switch("pending"!=o&&(clearTimeout(l),u=l=!1),o){case"granted":s("#gform-lock-request-status").html(c.gainedControl),s("#gform-take-over-button").show(),s("#gform-lock-request-button").hide(),i=!0;break;case"deleted":s("#gform-lock-request-button").text(c.requestAgain).attr("disabled",!1),s("#gform-lock-request-status").html(c.rejected);break;case"pending":s("#gform-lock-request-status").html(c.pending)}}})}(),s("#gform-lock-request-button").click(function(){var t=s(this);t.text("Request sent"),t.attr("disabled",!0),s("#gform-lock-request-status").html(""),u=!!1,wp.heartbeat.interval(5),l=setTimeout(a,12e4),s.getJSON(ajaxurl,{action:"gf_lock_request_"+e,object_id:o}).done(function(t){s("#gform-lock-request-status").html(t.html)}).fail(function(t,e,r){var o=e+", "+r;s("#gform-lock-request-status").html(c.requestError+": "+o)})}),s("#gform-reject-lock-request-button").click(function(){s.getJSON(ajaxurl,{action:"gf_reject_lock_request_"+e,object_id:o,object_type:e}).done(function(t){s("#gform-lock-dialog").hide()}).fail(function(t,e,r){var o=e+", "+r;s("#gform-lock-request-status").html(c.requestError+": "+o),s("#gform-lock-dialog").hide()})})}}(window.gflocking=window.gflocking||{},jQuery); -------------------------------------------------------------------------------- /includes/fields/class-gf-fields.php: -------------------------------------------------------------------------------- 1 | type ) ) { 21 | throw new Exception( 'The type must be set' ); 22 | } 23 | if ( isset( self::$_fields[ $field->type ] ) ) { 24 | throw new Exception( 'Field type already registered: ' . $field->type ); 25 | } 26 | self::$_fields[ $field->type ] = $field; 27 | } 28 | 29 | public static function exists( $field_type ) { 30 | return isset( self::$_fields[ $field_type ] ); 31 | } 32 | 33 | /** 34 | * @param $field_type 35 | * 36 | * @return GF_Field 37 | */ 38 | public static function get_instance( $field_type ) { 39 | return isset( self::$_fields[ $field_type ] ) ? self::$_fields[ $field_type ] : false; 40 | } 41 | 42 | /** 43 | * Alias for get_instance() 44 | * 45 | * @param $field_type 46 | * 47 | * @return GF_Field 48 | */ 49 | public static function get( $field_type ) { 50 | return self::get_instance( $field_type ); 51 | } 52 | 53 | /** 54 | * Return all the registered field types. 55 | * 56 | * @return GF_Field[] 57 | */ 58 | public static function get_all() { 59 | return self::$_fields; 60 | } 61 | 62 | /** 63 | * Creates a Field object from an array of field properties. 64 | * 65 | * @param array|GF_Field $properties 66 | * 67 | * @return GF_Field | bool 68 | */ 69 | public static function create( $properties ) { 70 | if ( $properties instanceof GF_Field ) { 71 | $type = $properties->type; 72 | $type = empty( $properties->inputType ) ? $type : $properties->inputType; 73 | } else { 74 | $type = isset( $properties['type'] ) ? $properties['type'] : ''; 75 | $type = empty( $properties['inputType'] ) ? $type : $properties['inputType']; 76 | } 77 | 78 | if ( empty( $type ) || ! isset( self::$_fields[ $type ] ) ) { 79 | return new GF_Field( $properties ); 80 | } 81 | $class = self::$_fields[ $type ]; 82 | $class_name = get_class( $class ); 83 | $field = new $class_name( $properties ); 84 | 85 | /** 86 | * Filter the GF_Field object after it is created. 87 | * 88 | * @since 1.9.18.2 89 | * 90 | * @param GF_Field $field A GF_Field object. 91 | * @param array $properties An array of field properties used to generate the GF_Field object. 92 | * 93 | * @see https://docs.gravityforms.com/gform_gf_field_create/ 94 | */ 95 | return apply_filters( 'gform_gf_field_create', $field, $properties ); 96 | 97 | } 98 | } 99 | 100 | // Load all the field files automatically. 101 | GFCommon::glob_require_once( '/includes/fields/class-gf-field-*.php' ); 102 | -------------------------------------------------------------------------------- /includes/addon/js/gaddon_frontend.min.js: -------------------------------------------------------------------------------- 1 | var GFFrontendFeeds=function(e){var r=this,f=jQuery;r.init=function(){r.options=e,r.triggerInputIds=r.getTriggerInputIds(r.options.feeds),r.activeFeeds=[],r.evaluateFeeds(),r.bindEvents()},r.bindEvents=function(){gform.addAction("gform_input_change",function(e,o,t){var d=parseInt(t)+"",n=-1!==f.inArray(t,r.triggerInputIds)||-1!==f.inArray(d,r.triggerInputIds);r.options.formId==o&&n&&r.evaluateFeeds()})},r.evaluateFeeds=function(){var e,o,t;for(i=0;i 0) 13 | $img.attr('src', ajaxurl + '?action=gfwebapi_qrcode&rnd=' + Date.now()); 14 | 15 | return false; 16 | }); 17 | 18 | jQuery("#public_key, #private_key").on("keyup", function () { 19 | jQuery("#gfwebapi-qrcode-container").html("The keys have changes. Please save the changes and try again.") 20 | }); 21 | 22 | jQuery("#gfapi-url-builder-button").click(function (e) { 23 | e.preventDefault(); 24 | var publicKey, privateKey, expiration, method, route, stringToSign, url, sig; 25 | publicKey = jQuery("#public_key").val(); 26 | privateKey = jQuery("#private_key").val(); 27 | expiration = parseInt(jQuery("#gfapi-url-builder-expiration").val()); 28 | method = jQuery("#gfapi-url-builder-method").val(); 29 | route = jQuery("#gfapi-url-builder-route").val(); 30 | route = route.replace(/\/$/, ""); // remove trailing slash 31 | var d = new Date; 32 | var unixtime = parseInt(d.getTime() / 1000); 33 | var future_unixtime = unixtime + expiration; 34 | 35 | stringToSign = publicKey + ":" + method + ":" + route + ":" + future_unixtime; 36 | sig = gfapiCalculateSig(stringToSign, privateKey); 37 | url = gfapiBaseUrl + "/" + route + "/?api_key=" + publicKey + "&signature=" + sig + "&expires=" + future_unixtime; 38 | jQuery('#gfapi-url-builder-generated-url').val(url); 39 | return false; 40 | }); 41 | var gfapiTesterAjaxRequest; 42 | jQuery("#gfapi-url-tester-button").click(function (e) { 43 | var $button = jQuery(this); 44 | var $loading = jQuery("#gfapi-url-tester-loading"); 45 | var $results = jQuery("#gfapi-url-tester-results"); 46 | var url = jQuery('#gfapi-url-tester-url').val(); 47 | var method = jQuery('#gfapi-url-tester-method').val(); 48 | gfapiTesterAjaxRequest = jQuery.ajax({ 49 | url : url + "&test=1", 50 | type : method, 51 | dataType : 'json', 52 | data : {}, 53 | beforeSend: function (xhr, opts) { 54 | $button.attr('disabled', 'disabled'); 55 | $loading.show(); 56 | } 57 | }) 58 | .done(function (data, textStatus, xhr) { 59 | $button.removeAttr('disabled'); 60 | $loading.hide(); 61 | $results.html(xhr.status); 62 | $results.fadeTo("fast", 1); 63 | }) 64 | .fail(function (jqXHR) { 65 | 66 | $button.removeAttr('disabled'); 67 | $loading.hide(); 68 | $results.fadeTo("fast", 1); 69 | var msg; 70 | $loading.hide(); 71 | if (msg == "abort") { 72 | msg = "Request cancelled"; 73 | } else { 74 | msg = jqXHR.status + ": " + jqXHR.statusText; 75 | } 76 | $results.html(msg); 77 | }); 78 | return false; 79 | }); 80 | 81 | }); 82 | -------------------------------------------------------------------------------- /includes/addon/js/gaddon_token.js: -------------------------------------------------------------------------------- 1 | window.GFToken = null; 2 | 3 | ( function( $ ) { 4 | 5 | GFToken = function( args ) { 6 | 7 | for ( var prop in args ) { 8 | if ( args.hasOwnProperty( prop ) ) 9 | this[prop] = args[prop]; 10 | } 11 | 12 | this.form = $( '#gform_' + this.formId ); 13 | 14 | this.init = function() { 15 | 16 | var GFTokenObj = this; 17 | 18 | this.tokens = {}; 19 | 20 | /* Initialize spinner. */ 21 | if ( ! this.isAjax ) 22 | gformInitSpinner( this.formId ); 23 | 24 | /* If multipage form, run on gform_page_loaded. */ 25 | if ( this.hasPages ) { 26 | 27 | $( document ).bind( 'gform_page_loaded', function( event, form_id, current_page ) { 28 | 29 | if ( form_id != GFTokenObj.formId) 30 | return; 31 | 32 | if ( current_page != GFTokenObj.pageCount) 33 | GFTokenObj.saveEntryData(); 34 | 35 | } ); 36 | 37 | } 38 | 39 | this.form.submit( function() { 40 | GFTokenObj.onSubmit(); 41 | } ); 42 | 43 | }; 44 | 45 | this.onSubmit = function() { 46 | 47 | if ( this.form.data('gftokensubmitting') ) { 48 | return; 49 | } else { 50 | event.preventDefault(); 51 | this.form.data( 'gftokensubmitting', true ); 52 | } 53 | 54 | this.saveEntryData(); 55 | this.processTokens(); 56 | 57 | } 58 | 59 | this.processTokens = function() { 60 | 61 | /* Process feeds. */ 62 | for ( var feed_id in this.feeds ) { 63 | 64 | this.active_feed = this.feeds[feed_id]; 65 | 66 | /* Create new feed object so we can store the billing information. */ 67 | var feed = { 68 | 'billing_fields': {}, 69 | 'id': this.active_feed.id, 70 | 'name': this.active_feed.name 71 | }; 72 | 73 | /* Add billing information to feed object. */ 74 | for ( var billing_field in this.active_feed.billing_fields ) { 75 | 76 | field_id = this.active_feed.billing_fields[ billing_field ]; 77 | feed.billing_fields[ billing_field ] = this.entry_data[ field_id ]; 78 | 79 | } 80 | 81 | /* Get credit card token response. */ 82 | window[ this.callback ].createToken( feed, this ); 83 | 84 | } 85 | 86 | } 87 | 88 | this.saveEntryData = function() { 89 | 90 | var GFPaymentObj = this, 91 | input_prefix = 'input_' + this.formId + '_'; 92 | 93 | if ( ! this.entry_data ) 94 | this.entry_data = {}; 95 | 96 | this.form.find( 'input[id^="' + input_prefix + '"], select[id^="' + input_prefix + '"], textarea[id^="' + input_prefix + '"]' ).each( function() { 97 | 98 | var input_id = $( this ).attr( 'id' ).replace( input_prefix, '' ).replace( '_', '.' ); 99 | 100 | if ( $.inArray( input_id, GFPaymentObj.fields ) >= 0 ) 101 | GFPaymentObj.entry_data[ input_id ] = $( this ).val(); 102 | 103 | } ); 104 | 105 | } 106 | 107 | this.saveToken = function( token ) { 108 | 109 | /* Add token response to tokens array. */ 110 | this.tokens[ this.active_feed.id ] = { 111 | 'feed_id': this.active_feed.id, 112 | 'response': token 113 | }; 114 | 115 | if ( this.tokens.length == this.feeds.length ) { 116 | 117 | /* Add tokens to form. */ 118 | this.form.find( this.responseField ).val( $.toJSON( this.tokens ) ); 119 | 120 | /* Submit the form. */ 121 | this.form.submit(); 122 | 123 | } 124 | 125 | } 126 | 127 | this.init(); 128 | 129 | } 130 | 131 | } )( jQuery ); -------------------------------------------------------------------------------- /includes/fields/class-gf-field-total.php: -------------------------------------------------------------------------------- 1 | is_entry_detail(); 30 | $is_form_editor = $this->is_form_editor(); 31 | 32 | $id = (int) $this->id; 33 | $field_id = $is_entry_detail || $is_form_editor || $form_id == 0 ? "input_$id" : 'input_' . $form_id . "_$id"; 34 | 35 | if ( $is_entry_detail ) { 36 | return "
37 | 38 |
"; 39 | } else { 40 | return "
41 | " . GFCommon::to_money( '0' ) . " 42 | 43 |
"; 44 | } 45 | 46 | } 47 | 48 | public function get_value_entry_detail( $value, $currency = '', $use_text = false, $format = 'html', $media = 'screen' ) { 49 | return GFCommon::to_money( $value, $currency ); 50 | } 51 | 52 | public function get_value_save_entry( $value, $form, $input_name, $lead_id, $lead ) { 53 | $lead = empty( $lead ) ? RGFormsModel::get_lead( $lead_id ) : $lead; 54 | $value = GFCommon::get_order_total( $form, $lead ); 55 | 56 | return $value; 57 | } 58 | 59 | public function get_value_entry_list( $value, $entry, $field_id, $columns, $form ) { 60 | return GFCommon::to_money( $value, $entry['currency'] ); 61 | } 62 | 63 | /** 64 | * Gets merge tag values. 65 | * 66 | * @since Unknown 67 | * @access public 68 | * 69 | * @uses GFCommon::to_number() 70 | * @uses GFCommon::to_money() 71 | * @uses GFCommon::format_variable_value() 72 | * 73 | * @param array|string $value The value of the input. 74 | * @param string $input_id The input ID to use. 75 | * @param array $entry The Entry Object. 76 | * @param array $form The Form Object 77 | * @param string $modifier The modifier passed. 78 | * @param array|string $raw_value The raw value of the input. 79 | * @param bool $url_encode If the result should be URL encoded. 80 | * @param bool $esc_html If the HTML should be escaped. 81 | * @param string $format The format that the value should be. 82 | * @param bool $nl2br If the nl2br function should be used. 83 | * 84 | * @return string The processed merge tag. 85 | */ 86 | public function get_value_merge_tag( $value, $input_id, $entry, $form, $modifier, $raw_value, $url_encode, $esc_html, $format, $nl2br ) { 87 | $format_numeric = in_array( 'price', $this->get_modifiers() ); 88 | 89 | $value = $format_numeric ? GFCommon::to_number( $value ) : GFCommon::to_money( $value ); 90 | 91 | return GFCommon::format_variable_value( $value, $url_encode, $esc_html, $format ); 92 | } 93 | 94 | 95 | } 96 | 97 | GF_Fields::register( new GF_Field_Total() ); -------------------------------------------------------------------------------- /includes/wizard/steps/class-gf-installation-wizard-step-license-key.php: -------------------------------------------------------------------------------- 1 | '', 10 | 'accept_terms' => false, 11 | ); 12 | 13 | function display() { 14 | 15 | if ( ! $this->license_key && defined( 'GF_LICENSE_KEY' ) ) { 16 | $this->license_key = GF_LICENSE_KEY; 17 | } 18 | 19 | ?> 20 |

21 | ', '' ); ?> 22 | 23 |

24 |
25 | 26 | validation_message( 'license_key', false ); 28 | if ( $key_error ) { 29 | echo $key_error; 30 | } 31 | ?> 32 |
33 | 34 | validation_message( 'accept_terms', false ); 36 | if ( $message || $key_error || $this->accept_terms ) { 37 | ?> 38 |

39 | 40 |

41 |
42 | 46 | 47 |
48 | is_valid_key = true; 59 | $license_key = $this->license_key; 60 | 61 | if ( empty ( $license_key ) ) { 62 | $message = esc_html__( 'Please enter a valid license key.', 'gravityforms' ) . ''; 63 | $this->set_field_validation_result( 'license_key', $message ); 64 | $this->is_valid_key = false; 65 | } else { 66 | $key_info = GFCommon::get_key_info( $license_key ); 67 | if ( empty( $key_info ) || ( ! $key_info['is_active'] ) ){ 68 | $message = "  " . __( 'Invalid or Expired Key : Please make sure you have entered the correct value and that your key is not expired.', 'gravityforms' ) . ''; 69 | $this->set_field_validation_result( 'license_key', $message ); 70 | $this->is_valid_key = false; 71 | } 72 | } 73 | 74 | if ( ! $this->is_valid_key && ! $this->accept_terms ) { 75 | $this->set_field_validation_result( 'accept_terms', __( 'Please accept the terms', 'gravityforms' ) ); 76 | } 77 | 78 | $valid = $this->is_valid_key || ( ! $this->is_valid_key && $this->accept_terms ); 79 | return $valid; 80 | } 81 | 82 | function install() { 83 | if ( $this->license_key ) { 84 | 85 | GFFormsModel::save_key( $this->license_key ); 86 | 87 | $version_info = GFCommon::get_version_info( false ); 88 | } 89 | } 90 | 91 | function get_previous_button_text() { 92 | return ''; 93 | } 94 | 95 | } -------------------------------------------------------------------------------- /includes/fields/class-gf-field-post-title.php: -------------------------------------------------------------------------------- 1 | is_entry_detail(); 46 | $is_form_editor = $this->is_form_editor(); 47 | 48 | $id = (int) $this->id; 49 | $field_id = $is_entry_detail || $is_form_editor || $form_id == 0 ? "input_$id" : 'input_' . $form_id . "_$id"; 50 | 51 | $value = esc_attr( $value ); 52 | $size = $this->size; 53 | $class_suffix = $is_entry_detail ? '_admin' : ''; 54 | $class = $size . $class_suffix; 55 | $class = esc_attr( $class ); 56 | 57 | $disabled_text = $is_form_editor ? 'disabled="disabled"' : ''; 58 | 59 | $tabindex = $this->get_tabindex(); 60 | 61 | $placeholder_attribute = $this->get_field_placeholder_attribute(); 62 | $required_attribute = $this->isRequired ? 'aria-required="true"' : ''; 63 | $invalid_attribute = $this->failed_validation ? 'aria-invalid="true"' : 'aria-invalid="false"'; 64 | $aria_describedby = $this->get_aria_describedby(); 65 | 66 | return "
67 | 68 |
"; 69 | 70 | } 71 | 72 | public function allow_html() { 73 | return true; 74 | } 75 | 76 | /** 77 | * Sanitizes the field value before saving to the entry. 78 | * 79 | * @since 2.2.6.4 Switched to wp_strip_all_tags. 80 | * @see https://developer.wordpress.org/reference/functions/wp_insert_post/#security 81 | * 82 | * @param string $value The field value to be processed. 83 | * @param int $form_id The ID of the form currently being processed. 84 | * 85 | * @return string 86 | */ 87 | public function sanitize_entry_value( $value, $form_id ) { 88 | return wp_strip_all_tags( $value ); 89 | } 90 | 91 | // # FIELD FILTER UI HELPERS --------------------------------------------------------------------------------------- 92 | 93 | /** 94 | * Returns the filter operators for the current field. 95 | * 96 | * @since 2.4 97 | * 98 | * @return array 99 | */ 100 | public function get_filter_operators() { 101 | $operators = parent::get_filter_operators(); 102 | $operators[] = 'contains'; 103 | 104 | return $operators; 105 | } 106 | 107 | } 108 | 109 | GF_Fields::register( new GF_Field_Post_Title() ); 110 | -------------------------------------------------------------------------------- /includes/addon/js/repeater.min.js: -------------------------------------------------------------------------------- 1 | jQuery.fn.repeater=function(e){var l=this;return l.options=jQuery.extend(!0,{},{template:"",limit:5,items:[{}],saveEvents:"blur change",saveElements:"input, select",addButtonMarkup:"+",removeButtonMarkup:"-",minItemCount:1,callbacks:{save:function(){},beforeAdd:function(){},add:function(){},beforeAddNew:function(){},addNew:function(){},beforeRemove:function(){},remove:function(){},repeaterButtons:function(){return!1}}},e),l.elem=jQuery(this),l.items=l.options.items,l.callbacks=l.options.callbacks,l._template=l.options.template,l._baseObj=l.items[0],l.init=function(){return l.stashTemplate(),l.elem.addClass("repeater"),l.refresh(),l.bindEvents(),l},l.bindEvents=function(){l.options.saveEvents=l.getNamespacedEvents(l.options.saveEvents),l.elem.off("click.repeater","a.add-item"),l.elem.on("click.repeater","a.add-item:not(.inactive)",function(){l.addNewItem(this)}),l.elem.off("click.repeater","a.remove-item"),l.elem.on("click.repeater","a.remove-item",function(e){l.removeItem(this)}),l.elem.off(l.options.saveEvents,l.options.saveElements),l.elem.on(l.options.saveEvents,l.options.saveElements,function(){l.save()})},l.stashTemplate=function(){l._template||(l._template=l.elem.html()),l._template=jQuery.trim(l._template)},l.addItem=function(e,t){var n=l.getItemMarkup(e,t),a=jQuery(n).addClass("item-"+t);l.callbacks.beforeAdd(l,a,e,t),l.append(a),l.populateSelects(e,t),l.callbacks.add(l,a,e,t)},l.getItemMarkup=function(e,t){var n=l._template;for(var a in e)e.hasOwnProperty(a)&&(n=(n=(n=n.replace(/{i}/g,t)).replace("{buttons}",l.getRepeaterButtonsMarkup(t))).replace(new RegExp("{"+a+"}","g"),escapeAttr(e[a])));return n},l.getRepeaterButtonsMarkup=function(e){var t=l.callbacks.repeaterButtons(l,e);return t=t||l.getDefaultButtonsMarkup(e)},l.getDefaultButtonsMarkup=function(e){var t=''+l.options.addButtonMarkup+"";return l.items.length>l.options.minItemCount&&(t+=''+l.options.removeButtonMarkup+""),'
'+t+"
"},l.populateSelects=function(e,t){for(var n in e)if(e.hasOwnProperty(n)){var a=l.elem.find("."+n+"_"+t);a.is("select")&&(jQuery.isArray(e[n])?a.val(e[n]):a.find('option[value="'+e[n]+'"]').prop("selected",!0))}},l.addNewItem=function(e,t){var n=l.isElement(e),a=(t=parseInt(void 0!==t?t:n?parseInt(jQuery(e).attr("data-index"),10)+1:l.items.length,10),n?l.getBaseObject():e);return l.callbacks.beforeAddNew(l,t),l.items.splice(t,0,a),l.callbacks.addNew(l,t),l.refresh().save(),l},l.removeItem=function(e){var t=l.isElement(e)?jQuery(e).attr("data-index"):e;l.callbacks.beforeRemove(l,t),delete l.items[t],l.callbacks.remove(l,t),l.save().refresh()},l.refresh=function(){l.elem.empty();for(var e=0;enamespace; 24 | 25 | $base = $this->rest_base; 26 | 27 | register_rest_route( $namespace, '/' . $base, array( 28 | array( 29 | 'methods' => WP_REST_Server::READABLE, 30 | 'callback' => array( $this, 'get_items' ), 31 | 'permission_callback' => array( $this, 'get_items_permissions_check' ), 32 | 'args' => $this->get_collection_params(), 33 | ), 34 | ) ); 35 | 36 | register_rest_route( $namespace, '/' . $base . '/schema', array( 37 | 'methods' => WP_REST_Server::READABLE, 38 | 'callback' => array( $this, 'get_public_item_schema' ), 39 | ) ); 40 | } 41 | 42 | /** 43 | * Get a collection of results. 44 | * 45 | * @since 2.4-beta-1 46 | * 47 | * @param WP_REST_Request $request Full data about the request. 48 | * 49 | * @return WP_Error|WP_REST_Response 50 | */ 51 | public function get_items( $request ) { 52 | $form_id = $request['form_id']; 53 | $search_params = $this->parse_entry_search_params( $request ); 54 | $search_criteria = rgar( $search_params, 'search_criteria' ); 55 | $args = array( 56 | 'page_size' => 100, 57 | 'time_limit' => 5, 58 | 'wait' => 5, 59 | ); 60 | $data = gf_results_cache()->get_results( $form_id, $search_criteria, $args ); 61 | $response = $this->prepare_item_for_response( $data, $request ); 62 | return $response; 63 | } 64 | 65 | /** 66 | * Check if a given request has access to get items 67 | * 68 | * @since 2.4-beta-1 69 | * 70 | * @param WP_REST_Request $request Full data about the request. 71 | * 72 | * @return WP_Error|bool 73 | */ 74 | public function get_items_permissions_check( $request ) { 75 | /** 76 | * Filters the capability required to get form results via the web API. 77 | * 78 | * @since 2.0-beta-2 79 | * 80 | * @param string|array $capability The capability required for this endpoint. 81 | * @param WP_REST_Request $request Full data about the request. 82 | */ 83 | $capability = apply_filters( 'gform_rest_api_capability_get_results', 'gravityforms_view_entries', $request ); 84 | return $this->current_user_can_any( $capability, $request ); 85 | } 86 | 87 | 88 | /** 89 | * Prepare the item for the REST response 90 | * 91 | * @since 2.4-beta-1 92 | * 93 | * @param mixed $item WordPress representation of the item. 94 | * @param WP_REST_Request $request Request object. 95 | * 96 | * @return mixed 97 | */ 98 | public function prepare_item_for_response( $item, $request ) { 99 | 100 | $response = new WP_REST_Response( $item, 200 ); 101 | return $response; 102 | } 103 | 104 | /** 105 | * Get the query params for collections 106 | * 107 | * @since 2.4-beta-1 108 | * 109 | * @return array 110 | */ 111 | public function get_collection_params() { 112 | return array( 113 | 'search' => array( 114 | 'description' => 'The search criteria.', 115 | 'type' => 'string', 116 | 'sanitize_callback' => 'sanitize_text_field', 117 | ), 118 | ); 119 | } 120 | } 121 | 122 | --------------------------------------------------------------------------------