Form builder to get in touch with visitors, grow your email list and collect payments — Happyforms - Version 1.13.6

Version Description

  • Improvement: Legacy Forms widgets can now be transformed into blocks.
Download this release

Release Info

Developer happyforms
Plugin Icon 128x128 Form builder to get in touch with visitors, grow your email list and collect payments — Happyforms
Version 1.13.6
Comparing to
See all releases

Code changes from version 1.13.5 to 1.13.6

core/assets/jsx/build/admin/block.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-server-side-render'), 'version' => '393949c2eb41deea19eb0e325ed81471');
1
+ <?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-server-side-render'), 'version' => '839aabbca0a3e1e5a07356f3b406b4be');
core/assets/jsx/build/admin/block.js CHANGED
@@ -188,6 +188,29 @@ __webpack_require__.r(__webpack_exports__);
188
  anchor: true,
189
  html: false
190
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
191
  edit: function (props) {
192
  if (!props.attributes.id && settings.forms.length === 1) {
193
  props.attributes.id = String(settings.forms[0].ID);
188
  anchor: true,
189
  html: false
190
  },
191
+ transforms: {
192
+ from: [{
193
+ type: 'block',
194
+ blocks: ['core/legacy-widget'],
195
+ isMatch: ({
196
+ idBase,
197
+ instance
198
+ }) => {
199
+ if (!(instance !== null && instance !== void 0 && instance.raw)) {
200
+ return false;
201
+ }
202
+
203
+ return idBase === 'happyforms_widget';
204
+ },
205
+ transform: ({
206
+ instance
207
+ }) => {
208
+ return Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_4__["createBlock"])(blockID, {
209
+ id: instance.raw.form_id
210
+ });
211
+ }
212
+ }]
213
+ },
214
  edit: function (props) {
215
  if (!props.attributes.id && settings.forms.length === 1) {
216
  props.attributes.id = String(settings.forms[0].ID);
core/assets/jsx/build/admin/block.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./build/core/assets/jsx/src/admin/block.js","webpack:///external [\"wp\",\"blockEditor\"]","webpack:///external [\"wp\",\"blocks\"]","webpack:///external [\"wp\",\"components\"]","webpack:///external [\"wp\",\"element\"]","webpack:///external [\"wp\",\"i18n\"]","webpack:///external [\"wp\",\"serverSideRender\"]"],"names":["settings","blockID","options","forms","map","form","label","post_title","value","ID","reverse","unshift","__","ComponentPlaceholder","props","setForm","useState","block","icon","marginRight","title","length","v","setAttributes","id","ComponentForm","attributes","ComponentInspector","registerBlockType","description","category","keywords","supports","anchor","html","edit","String","blockComponent","inspectorComponent","component","save","_happyFormsBlockSettings"],"mappings":";QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;;;;;;;;;;;;;;;;AClFA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAE,UAAUA,QAAV,EAAqB;AAEtB,MAAIC,OAAO,GAAG,4BAAd;AACA,MAAIC,OAAO,GAAGF,QAAQ,CAACG,KAAT,CACZC,GADY,CACP,UAAUC,IAAV,EAAiB;AACtB,WAAO;AAAEC,WAAK,EAAED,IAAI,CAACE,UAAd;AAA0BC,WAAK,EAAEH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CAACG,KAAT,CAAe,CAAf,EAAkBM,EAApB,CAA5B;AACA;;AAED,UAAI4B,cAAc,GACjBvB,KAAK,CAACY,UAAN,CAAiBF,EAAjB,GACAC,aAAa,CAAEX,KAAF,CADb,GAEAD,oBAAoB,CAAEC,KAAF,CAHrB;AAMA,UAAIwB,kBAAkB,GACrBtC,QAAQ,CAACG,KAAT,CAAekB,MAAf,GAAwB,CAAxB,GACAM,kBAAkB,CAAEb,KAAF,CADlB,GAEA,KAHD;AAMA,UAAIyB,SAAS,GACZD,kBAAkB,GAClB,CAAED,cAAF,EAAkBC,kBAAlB,CADkB,GAElB,CAAED,cAAF,CAHD;AAMA,aAAOE,SAAP;AACA,KAnC0B;AAqC3BC,QAAI,EAAE,YAAW;AAChB,aAAO,IAAP;AACA;AAvC0B,GAAX,CAAjB;AA0CA,CArGD,EAsGCC,wBAtGD,E;;;;;;;;;;;ACPA,aAAa,8CAA8C,EAAE,I;;;;;;;;;;;ACA7D,aAAa,yCAAyC,EAAE,I;;;;;;;;;;;ACAxD,aAAa,6CAA6C,EAAE,I;;;;;;;;;;;ACA5D,aAAa,0CAA0C,EAAE,I;;;;;;;;;;;ACAzD,aAAa,uCAAuC,EAAE,I;;;;;;;;;;;ACAtD,aAAa,mDAAmD,EAAE,I","file":"block.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./build/core/assets/jsx/src/admin/block.js\");\n","import { Placeholder, SelectControl, PanelBody, Icon, Button } from '@wordpress/components';\nimport ServerSideRender from '@wordpress/server-side-render';\nimport { InspectorControls } from '@wordpress/block-editor';\nimport { registerBlockType } from '@wordpress/blocks';\nimport { useState } from '@wordpress/element';\nimport { __, sprintf } from '@wordpress/i18n';\n\n( function( settings ) {\n\n\tvar blockID = 'thethemefoundry/happyforms';\n\tvar options = settings.forms\n\t\t.map( function( form ) {\n\t\t\treturn { label: form.post_title, value: form.ID };\n\t\t} )\n\toptions.reverse().unshift( { label: __( 'Choose', 'happyforms' ), value: '' } );\n\n\tvar ComponentPlaceholder = function( props ) {\n\t\tconst [ form, setForm ] = useState( '' );\n\n\t\treturn (\n\t\t\t<Placeholder \n\t\t\t\ticon={ <Icon icon={ settings.block.icon } style={{ marginRight: \"14.66px\" }} /> } \n\t\t\t\tlabel={ settings.block.title }\n\t\t\t\tinstructions={ \n\t\t\t\t\tsettings.forms.length > 0 ? \n\t\t\t\t\t__( 'Pick a form to display on your site.', 'happyforms' ) :\n\t\t\t\t\t__( 'No forms found.', 'happyforms' )\n\t\t\t\t}\n\t\t\t\tclassName=\"happyforms-block-form-selector-wrap\"\n\t\t\t\tkey=\"happyforms-component-placeholder\">\n\n\t\t\t\t{ \n\t\t\t\t\tsettings.forms.length > 0 &&\n\t\t\t\t\t<div className=\"happyforms-block-placeholder__control-group\">\n\t\t\t\t\t\t<SelectControl value={ form } options={ options } onChange={ ( v ) => setForm( v ) } />\n\t\t\t\t\t\t<Button isPrimary=\"true\" onClick={ ( v ) => props.setAttributes( { id: form } ) }>{ __( 'Insert', 'happyforms' ) }</Button>\n\t\t\t\t\t</div>\n\t\t\t\t}\n\n\t\t\t</Placeholder>\n\t\t);\n\t};\n\n\tvar ComponentForm = function( props ) {\n\t\treturn [\n\t\t\t<ServerSideRender\n\t\t\t\tblock={ blockID }\n\t\t\t\tattributes={ props.attributes }\n\t\t\t\tkey=\"happyforms-component-form\" />\n\t\t];\n\t};\n\n\tvar ComponentInspector = function( props ) {\n\t\treturn (\n\t\t\t<InspectorControls key=\"happyforms-inspector-controls\">\n\t\t\t\t<PanelBody title={ __( 'Settings', 'happyforms' ) }>\n\t\t\t\t\t<SelectControl\n\t\t\t\t\t\tlabel={ __( 'Pick a form', 'happyforms' ) }\n\t\t\t\t\t\tvalue={ props.attributes.id } \n\t\t\t\t\t\toptions={ options } \n\t\t\t\t\t\tonChange={ ( v ) => props.setAttributes( { id : v } ) } />\n\t\t\t\t</PanelBody>\n\t\t\t</InspectorControls>\n\t\t);\n\t};\n\n\tregisterBlockType( blockID, {\n\t\ttitle: settings.block.title,\n\t\tdescription: settings.block.description,\n\t\tcategory: settings.block.category,\n\t\ticon: settings.block.icon,\n\t\tkeywords: settings.block.keywords,\n\t\tsupports: {\n\t\t\tanchor: true,\n\t\t\thtml: false\n\t\t},\n\n\t\tedit: function( props ) {\n\t\t\tif ( ! props.attributes.id && settings.forms.length === 1 ) {\n\t\t\t\tprops.attributes.id = String( settings.forms[0].ID );\n\t\t\t}\n\n\t\t\tlet blockComponent = (\n\t\t\t\tprops.attributes.id ?\n\t\t\t\tComponentForm( props ) :\n\t\t\t\tComponentPlaceholder( props )\n\t\t\t);\n\n\t\t\tlet inspectorComponent = (\n\t\t\t\tsettings.forms.length > 1 ?\n\t\t\t\tComponentInspector( props ) :\n\t\t\t\tfalse\n\t\t\t);\n\t\t\t\n\t\t\tlet component = (\n\t\t\t\tinspectorComponent ? \n\t\t\t\t[ blockComponent, inspectorComponent ] :\n\t\t\t\t[ blockComponent ]\n\t\t\t);\n\n\t\t\treturn component;\n\t\t},\n\n\t\tsave: function() {\n\t\t\treturn null;\n\t\t},\n\t} );\n\n} )(\n\t_happyFormsBlockSettings,\n);","(function() { module.exports = window[\"wp\"][\"blockEditor\"]; }());","(function() { module.exports = window[\"wp\"][\"blocks\"]; }());","(function() { module.exports = window[\"wp\"][\"components\"]; }());","(function() { module.exports = window[\"wp\"][\"element\"]; }());","(function() { module.exports = window[\"wp\"][\"i18n\"]; }());","(function() { module.exports = window[\"wp\"][\"serverSideRender\"]; }());"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./build/core/assets/jsx/src/admin/block.js","webpack:///external [\"wp\",\"blockEditor\"]","webpack:///external [\"wp\",\"blocks\"]","webpack:///external [\"wp\",\"components\"]","webpack:///external [\"wp\",\"element\"]","webpack:///external [\"wp\",\"i18n\"]","webpack:///external [\"wp\",\"serverSideRender\"]"],"names":["settings","blockID","options","forms","map","form","label","post_title","value","ID","reverse","unshift","__","ComponentPlaceholder","props","setForm","useState","block","icon","marginRight","title","length","v","setAttributes","id","ComponentForm","attributes","ComponentInspector","registerBlockType","description","category","keywords","supports","anchor","html","transforms","from","type","blocks","isMatch","idBase","instance","raw","transform","createBlock","form_id","edit","String","blockComponent","inspectorComponent","component","save","_happyFormsBlockSettings"],"mappings":";QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;;;;;;;;;;;;;;;;AClFA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAE,UAAUA,QAAV,EAAqB;AAEtB,MAAIC,OAAO,GAAG,4BAAd;AACA,MAAIC,OAAO,GAAGF,QAAQ,CAACG,KAAT,CACZC,GADY,CACP,UAAUC,IAAV,EAAiB;AAC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Aa,6CAA6C,EAAE,I;;;;;;;;;;;ACA5D,aAAa,0CAA0C,EAAE,I;;;;;;;;;;;ACAzD,aAAa,uCAAuC,EAAE,I;;;;;;;;;;;ACAtD,aAAa,mDAAmD,EAAE,I","file":"block.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./build/core/assets/jsx/src/admin/block.js\");\n","import { Placeholder, SelectControl, PanelBody, Icon, Button } from '@wordpress/components';\nimport ServerSideRender from '@wordpress/server-side-render';\nimport { InspectorControls } from '@wordpress/block-editor';\nimport { registerBlockType, createBlock } from '@wordpress/blocks';\nimport { useState } from '@wordpress/element';\nimport { __, sprintf } from '@wordpress/i18n';\n\n( function( settings ) {\n\n\tvar blockID = 'thethemefoundry/happyforms';\n\tvar options = settings.forms\n\t\t.map( function( form ) {\n\t\t\treturn { label: form.post_title, value: form.ID };\n\t\t} )\n\toptions.reverse().unshift( { label: __( 'Choose', 'happyforms' ), value: '' } );\n\n\tvar ComponentPlaceholder = function( props ) {\n\t\tconst [ form, setForm ] = useState( '' );\n\n\t\treturn (\n\t\t\t<Placeholder\n\t\t\t\ticon={ <Icon icon={ settings.block.icon } style={{ marginRight: \"14.66px\" }} /> }\n\t\t\t\tlabel={ settings.block.title }\n\t\t\t\tinstructions={\n\t\t\t\t\tsettings.forms.length > 0 ?\n\t\t\t\t\t__( 'Pick a form to display on your site.', 'happyforms' ) :\n\t\t\t\t\t__( 'No forms found.', 'happyforms' )\n\t\t\t\t}\n\t\t\t\tclassName=\"happyforms-block-form-selector-wrap\"\n\t\t\t\tkey=\"happyforms-component-placeholder\">\n\n\t\t\t\t{\n\t\t\t\t\tsettings.forms.length > 0 &&\n\t\t\t\t\t<div className=\"happyforms-block-placeholder__control-group\">\n\t\t\t\t\t\t<SelectControl value={ form } options={ options } onChange={ ( v ) => setForm( v ) } />\n\t\t\t\t\t\t<Button isPrimary=\"true\" onClick={ ( v ) => props.setAttributes( { id: form } ) }>{ __( 'Insert', 'happyforms' ) }</Button>\n\t\t\t\t\t</div>\n\t\t\t\t}\n\n\t\t\t</Placeholder>\n\t\t);\n\t};\n\n\tvar ComponentForm = function( props ) {\n\t\treturn [\n\t\t\t<ServerSideRender\n\t\t\t\tblock={ blockID }\n\t\t\t\tattributes={ props.attributes }\n\t\t\t\tkey=\"happyforms-component-form\" />\n\t\t];\n\t};\n\n\tvar ComponentInspector = function( props ) {\n\t\treturn (\n\t\t\t<InspectorControls key=\"happyforms-inspector-controls\">\n\t\t\t\t<PanelBody title={ __( 'Settings', 'happyforms' ) }>\n\t\t\t\t\t<SelectControl\n\t\t\t\t\t\tlabel={ __( 'Pick a form', 'happyforms' ) }\n\t\t\t\t\t\tvalue={ props.attributes.id }\n\t\t\t\t\t\toptions={ options }\n\t\t\t\t\t\tonChange={ ( v ) => props.setAttributes( { id : v } ) } />\n\t\t\t\t</PanelBody>\n\t\t\t</InspectorControls>\n\t\t);\n\t};\n\n\tregisterBlockType( blockID, {\n\t\ttitle: settings.block.title,\n\t\tdescription: settings.block.description,\n\t\tcategory: settings.block.category,\n\t\ticon: settings.block.icon,\n\t\tkeywords: settings.block.keywords,\n\t\tsupports: {\n\t\t\tanchor: true,\n\t\t\thtml: false\n\t\t},\n\n\t\ttransforms: {\n\t\t\tfrom: [ {\n\t\t\t\ttype: 'block',\n\t\t\t\tblocks: [ 'core/legacy-widget' ],\n\n\t\t\t\tisMatch: ( { idBase, instance } ) => {\n\t\t\t\t\tif ( ! instance?.raw ) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\treturn idBase === 'happyforms_widget';\n\t\t\t\t},\n\t\t\t\t\n\t\t\t\ttransform: ( { instance } ) => {\n\t\t\t\t\treturn createBlock( blockID, {\n\t\t\t\t\t\tid: instance.raw.form_id,\n\t\t\t\t\t} );\n\t\t\t\t},\n\t\t\t} ],\n\t\t},\n\n\t\tedit: function( props ) {\n\t\t\tif ( ! props.attributes.id && settings.forms.length === 1 ) {\n\t\t\t\tprops.attributes.id = String( settings.forms[0].ID );\n\t\t\t}\n\n\t\t\tlet blockComponent = (\n\t\t\t\tprops.attributes.id ?\n\t\t\t\tComponentForm( props ) :\n\t\t\t\tComponentPlaceholder( props )\n\t\t\t);\n\n\t\t\tlet inspectorComponent = (\n\t\t\t\tsettings.forms.length > 1 ?\n\t\t\t\tComponentInspector( props ) :\n\t\t\t\tfalse\n\t\t\t);\n\n\t\t\tlet component = (\n\t\t\t\tinspectorComponent ?\n\t\t\t\t[ blockComponent, inspectorComponent ] :\n\t\t\t\t[ blockComponent ]\n\t\t\t);\n\n\t\t\treturn component;\n\t\t},\n\n\t\tsave: function() {\n\t\t\treturn null;\n\t\t},\n\t} );\n\n} )(\n\t_happyFormsBlockSettings,\n);\n","(function() { module.exports = window[\"wp\"][\"blockEditor\"]; }());","(function() { module.exports = window[\"wp\"][\"blocks\"]; }());","(function() { module.exports = window[\"wp\"][\"components\"]; }());","(function() { module.exports = window[\"wp\"][\"element\"]; }());","(function() { module.exports = window[\"wp\"][\"i18n\"]; }());","(function() { module.exports = window[\"wp\"][\"serverSideRender\"]; }());"],"sourceRoot":""}
core/assets/jsx/src/admin/block.js CHANGED
@@ -1,7 +1,7 @@
1
  import { Placeholder, SelectControl, PanelBody, Icon, Button } from '@wordpress/components';
2
  import ServerSideRender from '@wordpress/server-side-render';
3
  import { InspectorControls } from '@wordpress/block-editor';
4
- import { registerBlockType } from '@wordpress/blocks';
5
  import { useState } from '@wordpress/element';
6
  import { __, sprintf } from '@wordpress/i18n';
7
 
@@ -18,18 +18,18 @@ import { __, sprintf } from '@wordpress/i18n';
18
  const [ form, setForm ] = useState( '' );
19
 
20
  return (
21
- <Placeholder
22
- icon={ <Icon icon={ settings.block.icon } style={{ marginRight: "14.66px" }} /> }
23
  label={ settings.block.title }
24
- instructions={
25
- settings.forms.length > 0 ?
26
  __( 'Pick a form to display on your site.', 'happyforms' ) :
27
  __( 'No forms found.', 'happyforms' )
28
  }
29
  className="happyforms-block-form-selector-wrap"
30
  key="happyforms-component-placeholder">
31
 
32
- {
33
  settings.forms.length > 0 &&
34
  <div className="happyforms-block-placeholder__control-group">
35
  <SelectControl value={ form } options={ options } onChange={ ( v ) => setForm( v ) } />
@@ -56,8 +56,8 @@ import { __, sprintf } from '@wordpress/i18n';
56
  <PanelBody title={ __( 'Settings', 'happyforms' ) }>
57
  <SelectControl
58
  label={ __( 'Pick a form', 'happyforms' ) }
59
- value={ props.attributes.id }
60
- options={ options }
61
  onChange={ ( v ) => props.setAttributes( { id : v } ) } />
62
  </PanelBody>
63
  </InspectorControls>
@@ -75,6 +75,27 @@ import { __, sprintf } from '@wordpress/i18n';
75
  html: false
76
  },
77
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
78
  edit: function( props ) {
79
  if ( ! props.attributes.id && settings.forms.length === 1 ) {
80
  props.attributes.id = String( settings.forms[0].ID );
@@ -91,9 +112,9 @@ import { __, sprintf } from '@wordpress/i18n';
91
  ComponentInspector( props ) :
92
  false
93
  );
94
-
95
  let component = (
96
- inspectorComponent ?
97
  [ blockComponent, inspectorComponent ] :
98
  [ blockComponent ]
99
  );
@@ -108,4 +129,4 @@ import { __, sprintf } from '@wordpress/i18n';
108
 
109
  } )(
110
  _happyFormsBlockSettings,
111
- );
1
  import { Placeholder, SelectControl, PanelBody, Icon, Button } from '@wordpress/components';
2
  import ServerSideRender from '@wordpress/server-side-render';
3
  import { InspectorControls } from '@wordpress/block-editor';
4
+ import { registerBlockType, createBlock } from '@wordpress/blocks';
5
  import { useState } from '@wordpress/element';
6
  import { __, sprintf } from '@wordpress/i18n';
7
 
18
  const [ form, setForm ] = useState( '' );
19
 
20
  return (
21
+ <Placeholder
22
+ icon={ <Icon icon={ settings.block.icon } style={{ marginRight: "14.66px" }} /> }
23
  label={ settings.block.title }
24
+ instructions={
25
+ settings.forms.length > 0 ?
26
  __( 'Pick a form to display on your site.', 'happyforms' ) :
27
  __( 'No forms found.', 'happyforms' )
28
  }
29
  className="happyforms-block-form-selector-wrap"
30
  key="happyforms-component-placeholder">
31
 
32
+ {
33
  settings.forms.length > 0 &&
34
  <div className="happyforms-block-placeholder__control-group">
35
  <SelectControl value={ form } options={ options } onChange={ ( v ) => setForm( v ) } />
56
  <PanelBody title={ __( 'Settings', 'happyforms' ) }>
57
  <SelectControl
58
  label={ __( 'Pick a form', 'happyforms' ) }
59
+ value={ props.attributes.id }
60
+ options={ options }
61
  onChange={ ( v ) => props.setAttributes( { id : v } ) } />
62
  </PanelBody>
63
  </InspectorControls>
75
  html: false
76
  },
77
 
78
+ transforms: {
79
+ from: [ {
80
+ type: 'block',
81
+ blocks: [ 'core/legacy-widget' ],
82
+
83
+ isMatch: ( { idBase, instance } ) => {
84
+ if ( ! instance?.raw ) {
85
+ return false;
86
+ }
87
+
88
+ return idBase === 'happyforms_widget';
89
+ },
90
+
91
+ transform: ( { instance } ) => {
92
+ return createBlock( blockID, {
93
+ id: instance.raw.form_id,
94
+ } );
95
+ },
96
+ } ],
97
+ },
98
+
99
  edit: function( props ) {
100
  if ( ! props.attributes.id && settings.forms.length === 1 ) {
101
  props.attributes.id = String( settings.forms[0].ID );
112
  ComponentInspector( props ) :
113
  false
114
  );
115
+
116
  let component = (
117
+ inspectorComponent ?
118
  [ blockComponent, inspectorComponent ] :
119
  [ blockComponent ]
120
  );
129
 
130
  } )(
131
  _happyFormsBlockSettings,
132
+ );
core/classes/class-dashboard-modals.php CHANGED
@@ -21,6 +21,7 @@ class HappyForms_Dashboard_Modals {
21
  public function hook() {
22
  add_action( "wp_ajax_{$this->dismiss_action}", [ $this, 'dismiss_modal' ] );
23
  add_action( 'admin_enqueue_scripts', [ $this, 'admin_enqueue_scripts' ] );
 
24
  add_action( 'in_admin_footer', [ $this, 'output_modal_area' ] );
25
  add_action( 'customize_controls_print_footer_scripts', [ $this, 'output_modal_area' ] );
26
  }
@@ -87,13 +88,47 @@ class HappyForms_Dashboard_Modals {
87
  $dependencies, $asset_file['version'], true
88
  );
89
 
 
 
 
 
 
 
90
  wp_enqueue_style(
91
  'happyforms-dashboard-modals',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
92
  happyforms_get_plugin_url() . 'core/assets/css/dashboard-modals.css',
93
  array( 'wp-components' ), HAPPYFORMS_VERSION
94
  );
95
 
 
 
 
 
 
 
96
  wp_localize_script( 'happyforms-dashboard-modals', '_happyFormsDashboardModalsSettings', $this->get_script_settings() );
 
 
 
 
97
  }
98
 
99
  public function get_script_settings() {
21
  public function hook() {
22
  add_action( "wp_ajax_{$this->dismiss_action}", [ $this, 'dismiss_modal' ] );
23
  add_action( 'admin_enqueue_scripts', [ $this, 'admin_enqueue_scripts' ] );
24
+ add_filter( 'happyforms_customize_enqueue_scripts', [ $this, 'customize_enqueue_scripts' ] );
25
  add_action( 'in_admin_footer', [ $this, 'output_modal_area' ] );
26
  add_action( 'customize_controls_print_footer_scripts', [ $this, 'output_modal_area' ] );
27
  }
88
  $dependencies, $asset_file['version'], true
89
  );
90
 
91
+ wp_register_style(
92
+ 'happyforms-dashboard-modals-core',
93
+ happyforms_get_plugin_url() . 'core/assets/css/dashboard-modals.css',
94
+ array( 'wp-components' ), HAPPYFORMS_VERSION
95
+ );
96
+
97
  wp_enqueue_style(
98
  'happyforms-dashboard-modals',
99
+ happyforms_get_plugin_url() . 'inc/assets/css/dashboard-modals.css',
100
+ array( 'happyforms-dashboard-modals-core' ), HAPPYFORMS_VERSION
101
+ );
102
+
103
+ wp_localize_script( 'happyforms-dashboard-modals', '_happyFormsDashboardModalsSettings', $this->get_script_settings() );
104
+ }
105
+
106
+ public function customize_enqueue_scripts() {
107
+ $asset_file = require( happyforms_get_include_folder() . '/assets/jsx/build/admin/dashboard-modals.asset.php' );
108
+
109
+ wp_enqueue_script(
110
+ 'happyforms-dashboard-modals',
111
+ happyforms_get_plugin_url() . 'inc/assets/jsx/build/admin/dashboard-modals.js',
112
+ $asset_file['dependencies'], $asset_file['version'], true
113
+ );
114
+
115
+ wp_register_style(
116
+ 'happyforms-dashboard-modals-core',
117
  happyforms_get_plugin_url() . 'core/assets/css/dashboard-modals.css',
118
  array( 'wp-components' ), HAPPYFORMS_VERSION
119
  );
120
 
121
+ wp_enqueue_style(
122
+ 'happyforms-dashboard-modals',
123
+ happyforms_get_plugin_url() . 'inc/assets/css/dashboard-modals.css',
124
+ array( 'happyforms-dashboard-modals-core' ), HAPPYFORMS_VERSION
125
+ );
126
+
127
  wp_localize_script( 'happyforms-dashboard-modals', '_happyFormsDashboardModalsSettings', $this->get_script_settings() );
128
+
129
+ $deps[] = 'happyforms-dashboard-modals';
130
+
131
+ return $deps;
132
  }
133
 
134
  public function get_script_settings() {
core/classes/class-form-controller.php CHANGED
@@ -56,6 +56,7 @@ class HappyForms_Form_Controller {
56
 
57
  add_filter( 'happyforms_get_form_attributes', array( $this, 'set_form_autocomplete_off' ), 10, 1);
58
  add_filter( 'happyforms_part_attributes', array( $this, 'set_parts_autocomplete_off' ), 10, 1);
 
59
  }
60
 
61
  /**
@@ -869,6 +870,12 @@ class HappyForms_Form_Controller {
869
  return $attrs;
870
  }
871
 
 
 
 
 
 
 
872
  }
873
 
874
  if ( ! function_exists( 'happyforms_get_form_controller' ) ):
56
 
57
  add_filter( 'happyforms_get_form_attributes', array( $this, 'set_form_autocomplete_off' ), 10, 1);
58
  add_filter( 'happyforms_part_attributes', array( $this, 'set_parts_autocomplete_off' ), 10, 1);
59
+ add_filter( 'happyforms_part_attributes', array( $this, 'set_parts_spellcheck_off' ), 10, 1);
60
  }
61
 
62
  /**
870
  return $attrs;
871
  }
872
 
873
+ public function set_parts_spellcheck_off( $attrs ) {
874
+ $attrs[] = 'spellcheck="false"';
875
+
876
+ return $attrs;
877
+ }
878
+
879
  }
880
 
881
  if ( ! function_exists( 'happyforms_get_form_controller' ) ):
core/classes/class-happyforms-core.php CHANGED
@@ -116,6 +116,9 @@ class HappyForms_Core {
116
  add_action( 'wp_footer', array( $this, 'enqueue_scripts_preview' ) );
117
  add_action( 'customize_preview_init', array( $this, 'customize_preview_init' ) );
118
 
 
 
 
119
  // Deactivation
120
  require_once( happyforms_get_core_folder() . '/classes/class-deactivation.php' );
121
  }
@@ -126,6 +129,12 @@ class HappyForms_Core {
126
  add_action( 'happyforms_form_before', array( happyforms_get_admin_notices(), 'display_preview_notices' ), 20 );
127
  }
128
 
 
 
 
 
 
 
129
  /**
130
  * Action: initialize Customize screen logic.
131
  *
116
  add_action( 'wp_footer', array( $this, 'enqueue_scripts_preview' ) );
117
  add_action( 'customize_preview_init', array( $this, 'customize_preview_init' ) );
118
 
119
+ // Hide legacy widget in new block-based Widgets screen
120
+ add_filter( 'widget_types_to_hide_from_legacy_widget_block', array( $this, 'hide_legacy_form_widget' ) );
121
+
122
  // Deactivation
123
  require_once( happyforms_get_core_folder() . '/classes/class-deactivation.php' );
124
  }
129
  add_action( 'happyforms_form_before', array( happyforms_get_admin_notices(), 'display_preview_notices' ), 20 );
130
  }
131
 
132
+ public function hide_legacy_form_widget( $widget_types ) {
133
+ $widget_types[] = 'happyforms_widget';
134
+
135
+ return $widget_types;
136
+ }
137
+
138
  /**
139
  * Action: initialize Customize screen logic.
140
  *
core/classes/class-happyforms-widget.php CHANGED
@@ -12,7 +12,8 @@ class HappyForms_Widget extends WP_Widget {
12
  'happyforms_widget',
13
  __( 'Forms', 'happyforms' ),
14
  array(
15
- 'description' => __( 'Displays a form.', 'happyforms' )
 
16
  )
17
  );
18
  }
12
  'happyforms_widget',
13
  __( 'Forms', 'happyforms' ),
14
  array(
15
+ 'description' => __( 'Displays a form.', 'happyforms' ),
16
+ 'show_instance_in_rest' => true,
17
  )
18
  );
19
  }
core/helpers/helper-form-templates.php CHANGED
@@ -1663,3 +1663,13 @@ function happyforms_get_prefixed_css( $css, $prefix ) {
1663
  }
1664
 
1665
  endif;
 
 
 
 
 
 
 
 
 
 
1663
  }
1664
 
1665
  endif;
1666
+
1667
+ if ( ! function_exists( 'happyforms_parts_autocorrect_attribute' ) ):
1668
+
1669
+ function happyforms_parts_autocorrect_attribute( $part ) {
1670
+ if ( apply_filters( 'happyforms_add_autocorrect_attribute', true, $part ) ) {
1671
+ echo 'autocorrect="off"';
1672
+ }
1673
+ }
1674
+
1675
+ endif;
core/templates/parts/frontend-checkbox-other-option.php CHANGED
@@ -27,5 +27,5 @@ $checkmark_content = '<svg xmlns="http://www.w3.org/2000/svg" width="12" height=
27
  <span class="checkmark"><?php echo $checkmark_content; ?></span>
28
  <span class="label" id="hf-label-<?php happyforms_the_part_name( $part, $form ); ?>"><?php echo $part['other_option_label']; ?></span>
29
  </label>
30
- <input <?php echo ( $checked ) ? 'class="hf-show"' : ''; ?> type="text" aria-labelledby="hf-label-<?php happyforms_the_part_name( $part, $form ); ?>" placeholder="<?php echo $part['other_option_placeholder']; ?>" value="<?php echo $text_value; ?>" <?php happyforms_the_part_attributes( $part, $form ); ?>>
31
  </div>
27
  <span class="checkmark"><?php echo $checkmark_content; ?></span>
28
  <span class="label" id="hf-label-<?php happyforms_the_part_name( $part, $form ); ?>"><?php echo $part['other_option_label']; ?></span>
29
  </label>
30
+ <input <?php echo ( $checked ) ? 'class="hf-show"' : ''; ?> type="text" aria-labelledby="hf-label-<?php happyforms_the_part_name( $part, $form ); ?>" placeholder="<?php echo $part['other_option_placeholder']; ?>" value="<?php echo $text_value; ?>" <?php happyforms_the_part_attributes( $part, $form ); ?> <?php happyforms_parts_autocorrect_attribute( $part ); ?> />
31
  </div>
core/templates/parts/frontend-email.php CHANGED
@@ -35,7 +35,7 @@
35
  <?php endif; ?>
36
 
37
  <div class="happyforms-input">
38
- <input type="email" name="<?php happyforms_the_part_name( $part, $form ); ?>" id="<?php happyforms_the_part_id( $part, $form ); ?>" value="<?php happyforms_the_part_value( $part, $form ); ?>" placeholder="<?php echo esc_attr( $part['placeholder'] ); ?>" <?php happyforms_the_part_attributes( $part, $form, 0 ); ?> />
39
  <?php if ( 'as_placeholder' === $part['label_placement'] ) : ?>
40
  <?php happyforms_the_part_label( $part, $form ); ?>
41
  <?php endif; ?>
35
  <?php endif; ?>
36
 
37
  <div class="happyforms-input">
38
+ <input type="email" name="<?php happyforms_the_part_name( $part, $form ); ?>" id="<?php happyforms_the_part_id( $part, $form ); ?>" value="<?php happyforms_the_part_value( $part, $form ); ?>" placeholder="<?php echo esc_attr( $part['placeholder'] ); ?>" <?php happyforms_the_part_attributes( $part, $form, 0 ); ?> <?php happyforms_parts_autocorrect_attribute( $part ); ?> />
39
  <?php if ( 'as_placeholder' === $part['label_placement'] ) : ?>
40
  <?php happyforms_the_part_label( $part, $form ); ?>
41
  <?php endif; ?>
core/templates/parts/frontend-multi-line-text.php CHANGED
@@ -15,7 +15,7 @@
15
  <div class="happyforms-visual-editor">
16
  <?php endif; ?>
17
 
18
- <textarea id="<?php happyforms_the_part_id( $part, $form ); ?>" name="<?php happyforms_the_part_name( $part, $form ); ?>" rows="<?php echo $part['rows']; ?>" placeholder="<?php echo esc_attr( $part['placeholder'] ); ?>" <?php happyforms_the_part_attributes( $part, $form ); ?>><?php happyforms_the_part_value( $part, $form ); ?></textarea>
19
  <?php if ( 'as_placeholder' === $part['label_placement'] ) : ?>
20
  <?php happyforms_the_part_label( $part, $form ); ?>
21
  <?php endif; ?>
15
  <div class="happyforms-visual-editor">
16
  <?php endif; ?>
17
 
18
+ <textarea id="<?php happyforms_the_part_id( $part, $form ); ?>" name="<?php happyforms_the_part_name( $part, $form ); ?>" rows="<?php echo $part['rows']; ?>" placeholder="<?php echo esc_attr( $part['placeholder'] ); ?>" <?php happyforms_the_part_attributes( $part, $form ); ?> <?php happyforms_parts_autocorrect_attribute( $part ); ?> ><?php happyforms_the_part_value( $part, $form ); ?></textarea>
19
  <?php if ( 'as_placeholder' === $part['label_placement'] ) : ?>
20
  <?php happyforms_the_part_label( $part, $form ); ?>
21
  <?php endif; ?>
core/templates/parts/frontend-radio-other-option.php CHANGED
@@ -22,5 +22,5 @@ $checkmark_content = '<span class="happyforms-radio-circle"></span>';
22
  <span class="checkmark"><?php echo $checkmark_content; ?></span>
23
  <span class="label" id="hf-label-<?php happyforms_the_part_name( $part, $form ); ?>"><?php echo $part['other_option_label']; ?></span>
24
  </label>
25
- <input type="text" name="<?php happyforms_the_part_name( $part, $form ); ?>" placeholder="<?php echo $part['other_option_placeholder']; ?>" aria-labelledby="hf-label-<?php happyforms_the_part_name( $part, $form ); ?>" value="<?php echo $text_value; ?>" class="<?php echo ( $checked ) ? 'hf-show' : ''; ?>" <?php happyforms_the_part_attributes( $part, $form ); ?>>
26
  </div>
22
  <span class="checkmark"><?php echo $checkmark_content; ?></span>
23
  <span class="label" id="hf-label-<?php happyforms_the_part_name( $part, $form ); ?>"><?php echo $part['other_option_label']; ?></span>
24
  </label>
25
+ <input type="text" name="<?php happyforms_the_part_name( $part, $form ); ?>" placeholder="<?php echo $part['other_option_placeholder']; ?>" aria-labelledby="hf-label-<?php happyforms_the_part_name( $part, $form ); ?>" value="<?php echo $text_value; ?>" class="<?php echo ( $checked ) ? 'hf-show' : ''; ?>" <?php happyforms_the_part_attributes( $part, $form ); ?> <?php happyforms_parts_autocorrect_attribute( $part ); ?> />
26
  </div>
core/templates/parts/frontend-select-other-option.php CHANGED
@@ -18,5 +18,5 @@ if ( is_array( $value ) ) {
18
  ?>
19
 
20
  <div class="happyforms-part__option happyforms-part-option happyforms-part-option--other" id="<?php echo $part['id']; ?>_other">
21
- <input type="text" name="<?php happyforms_the_part_name( $part, $form ); ?>" placeholder="<?php echo $part['other_option_placeholder']; ?>" aria-labelledby="hf-label-<?php happyforms_the_part_name( $part, $form ); ?>" value="<?php echo $text_value; ?>" class="happyforms-select-dropdown-other <?php echo ( $selected ) ? 'hf-show' : ''; ?>" <?php happyforms_the_part_attributes( $part, $form ); ?>>
22
  </div>
18
  ?>
19
 
20
  <div class="happyforms-part__option happyforms-part-option happyforms-part-option--other" id="<?php echo $part['id']; ?>_other">
21
+ <input type="text" name="<?php happyforms_the_part_name( $part, $form ); ?>" placeholder="<?php echo $part['other_option_placeholder']; ?>" aria-labelledby="hf-label-<?php happyforms_the_part_name( $part, $form ); ?>" value="<?php echo $text_value; ?>" class="happyforms-select-dropdown-other <?php echo ( $selected ) ? 'hf-show' : ''; ?>" <?php happyforms_the_part_attributes( $part, $form ); ?> <?php happyforms_parts_autocorrect_attribute( $part ); ?> />
22
  </div>
core/templates/parts/frontend-single-line-text.php CHANGED
@@ -45,7 +45,7 @@
45
  <?php happyforms_the_part_label( $part, $form ); ?>
46
  <?php endif; ?>
47
 
48
- <input id="<?php happyforms_the_part_id( $part, $form ); ?>" type="text" name="<?php happyforms_the_part_name( $part, $form ); ?>" value="<?php happyforms_the_part_value( $part, $form ); ?>" placeholder="<?php echo esc_attr( $part['placeholder'] ); ?>" <?php happyforms_the_part_attributes( $part, $form ); ?> />
49
  <?php if ( 'as_placeholder' === $part['label_placement'] ) : ?>
50
  <?php happyforms_the_part_label( $part, $form ); ?>
51
  <?php endif; ?>
45
  <?php happyforms_the_part_label( $part, $form ); ?>
46
  <?php endif; ?>
47
 
48
+ <input id="<?php happyforms_the_part_id( $part, $form ); ?>" type="text" name="<?php happyforms_the_part_name( $part, $form ); ?>" value="<?php happyforms_the_part_value( $part, $form ); ?>" placeholder="<?php echo esc_attr( $part['placeholder'] ); ?>" <?php happyforms_the_part_attributes( $part, $form ); ?> <?php happyforms_parts_autocorrect_attribute( $part ); ?> />
49
  <?php if ( 'as_placeholder' === $part['label_placement'] ) : ?>
50
  <?php happyforms_the_part_label( $part, $form ); ?>
51
  <?php endif; ?>
happyforms.php CHANGED
@@ -5,7 +5,7 @@
5
  * Plugin URI: https://happyforms.io
6
  * Description: We're changin' WordPress forms.
7
  * Author: Happyforms
8
- * Version: 1.13.5
9
  * Author URI: https://happyforms.io
10
  * Upgrade URI: https://happyforms.io/upgrade
11
  */
@@ -22,7 +22,7 @@ if ( defined( 'HAPPYFORMS_UPGRADE_VERSION' ) ) {
22
  /**
23
  * The current version of the plugin.
24
  */
25
- define( 'HAPPYFORMS_VERSION', '1.13.5' );
26
 
27
  if ( ! function_exists( 'happyforms_plugin_file' ) ):
28
  /**
5
  * Plugin URI: https://happyforms.io
6
  * Description: We're changin' WordPress forms.
7
  * Author: Happyforms
8
+ * Version: 1.13.6
9
  * Author URI: https://happyforms.io
10
  * Upgrade URI: https://happyforms.io/upgrade
11
  */
22
  /**
23
  * The current version of the plugin.
24
  */
25
+ define( 'HAPPYFORMS_VERSION', '1.13.6' );
26
 
27
  if ( ! function_exists( 'happyforms_plugin_file' ) ):
28
  /**
inc/assets/css/dashboard-modals.css CHANGED
@@ -1,55 +1,59 @@
1
  /**
2
  *
3
- * Upgrade modal
4
  *
5
  */
6
- .happyforms-modal.happyforms-modal--upgrade .components-modal__content {
7
- padding-bottom: 32px;
8
- }
9
-
10
- /**
11
- *
12
- * Onboarding modal
13
- *
14
- */
15
- .happyforms-modal--onboarding {
16
  box-sizing: border-box;
17
  overflow-x: hidden;
18
  }
19
 
20
- .happyforms-modal--onboarding .components-guide__page {
 
21
  justify-content: flex-start;
22
  }
23
 
24
  .happyforms-modal--onboarding .happyforms-modal__header,
25
- .happyforms-modal--onboarding .happyforms-modal__body {
 
 
26
  padding: 24px 32px 0;
27
  }
28
 
29
- .happyforms-modal--onboarding .happyforms-modal__body {
 
30
  display: flex;
31
  flex-flow: column;
32
  justify-content: flex-start;
33
  }
34
 
35
- .happyforms-modal--onboarding img {
 
36
  display: block;
37
  }
38
 
39
- .happyforms-modal--onboarding h1 {
 
40
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
41
  font-size: 24px;
42
  line-height: 1.4;
43
  margin: 0 0 8px 0;
44
  }
45
 
 
 
 
 
46
  .happyforms-modal--onboarding label {
47
  display: block;
48
  margin: 0 0 4px;
49
  }
50
 
51
  .happyforms-modal--onboarding .happyforms-modal__header p,
52
- .happyforms-modal--onboarding .happyforms-modal__body p {
 
 
53
  margin: 0;
54
  }
55
 
@@ -59,15 +63,27 @@
59
  margin-top: 20px;
60
  }
61
 
62
- .happyforms-modal--onboarding .components-base-control__field .components-button {
 
 
 
 
 
 
63
  width: 100%;
64
  justify-content: center;
65
  }
66
 
67
- .happyforms-modal--onboarding .components-guide__footer {
 
 
 
 
 
68
  display: none;
69
  }
70
 
71
- .happyforms-modal--onboarding .happyforms-modal__footer {
 
72
  padding: 0 32px 32px;
73
  }
1
  /**
2
  *
3
+ * Onboarding and upgrade modals
4
  *
5
  */
6
+ .happyforms-modal--onboarding,
7
+ .happyforms-modal--upgrade {
 
 
 
 
 
 
 
 
8
  box-sizing: border-box;
9
  overflow-x: hidden;
10
  }
11
 
12
+ .happyforms-modal--onboarding .components-guide__page,
13
+ .happyforms-modal--upgrade .components-guide__page {
14
  justify-content: flex-start;
15
  }
16
 
17
  .happyforms-modal--onboarding .happyforms-modal__header,
18
+ .happyforms-modal--onboarding .happyforms-modal__body,
19
+ .happyforms-modal--upgrade .happyforms-modal__header,
20
+ .happyforms-modal--upgrade .happyforms-modal__body {
21
  padding: 24px 32px 0;
22
  }
23
 
24
+ .happyforms-modal--onboarding .happyforms-modal__body,
25
+ .happyforms-modal--upgrade .happyforms-modal__body {
26
  display: flex;
27
  flex-flow: column;
28
  justify-content: flex-start;
29
  }
30
 
31
+ .happyforms-modal--onboarding img,
32
+ .happyforms-modal--upgrade img {
33
  display: block;
34
  }
35
 
36
+ .happyforms-modal--onboarding h1,
37
+ .happyforms-modal--upgrade h1 {
38
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
39
  font-size: 24px;
40
  line-height: 1.4;
41
  margin: 0 0 8px 0;
42
  }
43
 
44
+ .happyforms-modal--upgrade h1 {
45
+ margin-bottom: 0;
46
+ }
47
+
48
  .happyforms-modal--onboarding label {
49
  display: block;
50
  margin: 0 0 4px;
51
  }
52
 
53
  .happyforms-modal--onboarding .happyforms-modal__header p,
54
+ .happyforms-modal--onboarding .happyforms-modal__body p,
55
+ .happyforms-modal--upgrade .happyforms-modal__header p,
56
+ .happyforms-modal--upgrade .happyforms-modal__body p {
57
  margin: 0;
58
  }
59
 
63
  margin-top: 20px;
64
  }
65
 
66
+ .happyforms-modal--upgrade .happyforms-modal__body ul {
67
+ margin: 16px 0;
68
+ list-style: disc inside;
69
+ }
70
+
71
+ .happyforms-modal--onboarding .components-base-control__field .components-button,
72
+ .happyforms-modal--upgrade .components-base-control__field .components-button {
73
  width: 100%;
74
  justify-content: center;
75
  }
76
 
77
+ .happyforms-modal--upgrade .components-base-control__field .components-button.is-primary {
78
+ margin-bottom: 10px;
79
+ }
80
+
81
+ .happyforms-modal--onboarding .components-guide__footer,
82
+ .happyforms-modal--upgrade .components-guide__footer {
83
  display: none;
84
  }
85
 
86
+ .happyforms-modal--onboarding .happyforms-modal__footer,
87
+ .happyforms-modal--upgrade .happyforms-modal__footer {
88
  padding: 0 32px 32px;
89
  }
inc/assets/img/alrighty.gif ADDED
Binary file
inc/assets/jsx/build/admin/dashboard-modals.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('wp-components', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '2047e42fce51ae5a6e52eeebcb14dd39');
1
+ <?php return array('dependencies' => array('wp-components', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '549fb648f66ad64ae57358a9d66a7773');
inc/assets/jsx/build/admin/dashboard-modals.js CHANGED
@@ -307,26 +307,34 @@ __webpack_require__.r(__webpack_exports__);
307
 
308
 
309
  const UpgradeModal = props => {
310
- return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__["Modal"], {
 
 
311
  className: "happyforms-modal happyforms-modal--upgrade",
312
- title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__["__"])('You\’ll need to upgrade to access this', 'happyforms'),
313
- onRequestClose: props.onRequestClose
314
- }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", {
315
- className: "happyforms-modal__body"
316
- }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("p", null, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__["__"])('We offer several, affordable paid plans that include our best features. Upgrade today and increase your customer interactions.', 'happyforms'))), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", {
317
- className: "happyforms-modal__footer"
318
- }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", {
319
- className: "happyforms-modal__footer-button-group"
320
- }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__["Button"], {
321
- isPrimary: true,
322
- href: "https://happyforms.io/upgrade",
323
- target: "_blank",
324
- text: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__["__"])('Start Your Risk-Free 14-Day Trial', 'happyforms')
325
- })), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("p", null, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__["__"])('Or', 'happyforms'), " ", Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__["Button"], {
326
- isLink: true,
327
- onClick: props.onRequestClose,
328
- text: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__["__"])('continue with free version', 'happyforms')
329
- }), ".")));
 
 
 
 
 
 
330
  };
331
 
332
  const DashboardModalsBaseClass = Object(_happyforms_core_jsx_src_admin_dashboard_modals__WEBPACK_IMPORTED_MODULE_1__["default"])($, settings);
307
 
308
 
309
  const UpgradeModal = props => {
310
+ const imageURL = `${settings.pluginURL}/inc/assets/img/alrighty.gif`;
311
+ return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__["Guide"], {
312
+ onFinish: props.onRequestClose,
313
  className: "happyforms-modal happyforms-modal--upgrade",
314
+ pages: [{
315
+ image: Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("picture", null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("img", {
316
+ src: imageURL,
317
+ width: "450",
318
+ height: "276"
319
+ })),
320
+ content: Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["Fragment"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", {
321
+ className: "happyforms-modal__header"
322
+ }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("h1", null, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__["__"])('Start with a free 7-day trial', 'happyforms'))), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", {
323
+ className: "happyforms-modal__body"
324
+ }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("p", null, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__["__"])('You\'re just a mouse click and a few key taps away from building better forms for your site. And don\'t sweat it, you can upgrade, downgrade or cancel your trial anytime.', 'happyforms')), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("ul", null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("li", null, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__["__"])('Advanced features and integrations', 'happyforms')), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("li", null, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__["__"])('Help from the friendliest support team around', 'happyforms')), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("li", null, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__["__"])('Automatically transfer over your free forms', 'happyforms')), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("li", null, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__["__"])('New goodies released every second week', 'happyforms'))), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("p", null, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__["__"])('So whattaya say? Ready to build better forms today?', 'happyforms'))), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", {
325
+ className: "happyforms-modal__footer"
326
+ }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__["BaseControl"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__["Button"], {
327
+ isPrimary: true,
328
+ href: "https://happyforms.io/upgrade",
329
+ target: "_blank",
330
+ text: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__["__"])('Start a Free 7-day Trial', 'happyforms')
331
+ }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__["Button"], {
332
+ isSecondary: true,
333
+ onClick: props.onRequestClose,
334
+ text: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__["__"])('Nope, Maybe Later', 'happyforms')
335
+ }))))
336
+ }]
337
+ });
338
  };
339
 
340
  const DashboardModalsBaseClass = Object(_happyforms_core_jsx_src_admin_dashboard_modals__WEBPACK_IMPORTED_MODULE_1__["default"])($, settings);
inc/assets/jsx/build/admin/dashboard-modals.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./build/core/assets/jsx/src/admin/dashboard-modals.js","webpack:///./build/inc/assets/jsx/src/admin/dashboard-modals.js","webpack:///./node_modules/@babel/runtime/helpers/defineProperty.js","webpack:///external [\"wp\",\"components\"]","webpack:///external [\"wp\",\"element\"]","webpack:///external [\"wp\",\"i18n\"]"],"names":["$","settings","render","wp","element","DeactivateModal","props","option","setOption","useState","onChange","e","target","value","onSubmit","post","ajaxurl","action","deactivateModalAction","_wpnonce","deactivateModalNonce","keep_data","window","location","href","redirectURL","onRequestClose","__","ModalProvider","modal","DashboardModals","constructor","area","document","getElementById","openDeactivateModal","closeModal","bind","openModal","actionModalDismiss","id","OnboardingModal","imageURL","pluginURL","email","setEmail","poweredBy","setPoweredBy","onEmailChange","onboardingModalAction","onboardingModalNonce","powered_by","image","content","UpgradeModal","DashboardModalsBaseClass","DashboardModalsClass","openOnboardingModal","trackingStatus","openUpgradeModal","happyForms","modals","jQuery","_happyFormsDashboardModalsSettings"],"mappings":";QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;Q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;;;;;ACAzD,aAAa,uCAAuC,EAAE,I","file":"dashboard-modals.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./build/inc/assets/jsx/src/admin/dashboard-modals.js\");\n","import { SlotFillProvider, Button, Modal, Guide, Popover, Notice, ExternalLink, TextControl, CheckboxControl, BaseControl } from '@wordpress/components';\nimport { useState, useReducer, useRef } from '@wordpress/element';\nimport { __, sprintf } from '@wordpress/i18n';\n\n/**\n *\n * Modal handler class\n *\n */\nexport default function( $, settings ) {\n\n\tconst { render } = wp.element;\n\n\t/**\n\t *\n\t * Deactivation modal\n\t *\n\t */\n\tconst DeactivateModal = ( props ) => {\n\t\tconst [ option, setOption ] = useState( 'yes' );\n\n\t\tconst onChange = ( e ) => {\n\t\t\tsetOption( e.target.value );\n\t\t};\n\n\t\tconst onSubmit = () => {\n\t\t\t$.post( ajaxurl, {\n\t\t\t\taction: settings.deactivateModalAction,\n\t\t\t\t_wpnonce: settings.deactivateModalNonce,\n\t\t\t\tkeep_data: option, \n\t\t\t}, function() {\n\t\t\t\twindow.location.href = props.redirectURL;\n\t\t\t} );\n\t\t\t\n\t\t\treturn props.onRequestClose();\n\t\t}\n\n\t\treturn (\n\t\t\t<Modal className=\"happyforms-modal happyforms-modal--deactivate\" title=\"What about your data?\" onRequestClose={ props.onRequestClose }>\n\t\t\t\t<div className=\"happyforms-modal__body\" onChange={ onChange }>\n\t\t\t\t\t<label htmlFor=\"happyforms-keep-data-yes\">\n\t\t\t\t\t\t<input \n\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\tid=\"happyforms-keep-data-yes\"\n\t\t\t\t\t\t\tname=\"happyforms-keep-data\" \n\t\t\t\t\t\t\tvalue=\"yes\"\n\t\t\t\t\t\t\tdefaultChecked\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<span>{ __( 'Keep plugin data (recommended)', 'happyforms' ) }</span>\n\t\t\t\t\t</label>\n\t\t\t\t\t<label htmlFor=\"happyforms-keep-data-no\">\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\tid=\"happyforms-keep-data-no\"\n\t\t\t\t\t\t\tname=\"happyforms-keep-data\"\n\t\t\t\t\t\t\tvalue=\"no\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<span>{ __( 'Permanently delete plugin data', 'happyforms' ) }</span>\n\t\t\t\t\t</label>\n\t\t\t\t</div>\n\t\t\t\t<div className=\"happyforms-modal__footer\">\n\t\t\t\t\t<div className=\"happyforms-modal__footer-button-group\">\n\t\t\t\t\t\t<Button \n\t\t\t\t\t\t\tisPrimary={true} \n\t\t\t\t\t\t\tonClick={ onSubmit } \n\t\t\t\t\t\t\ttext={ option == 'yes' ? \n\t\t\t\t\t\t\t\t__( 'Deactivate Plugin', 'happyforms' ) : \n\t\t\t\t\t\t\t\t__( 'Delete Data and Deactivate Plugin', 'happyforms' ) }>\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</Modal>\n\t\t);\n\t};\n\n\t/**\n\t *\n\t * Modal wrapper\n\t *\n\t */\n\tconst ModalProvider = ( props ) => {\n\t\treturn (\n\t\t\t<SlotFillProvider>\n\t\t\t\t{ props.modal }\n\t\t\t\t<Popover.Slot />\n\t\t\t</SlotFillProvider>\n\t\t);\n\t};\n\t\n\treturn class DashboardModals {\n\n\t\tarea = null;\n\t\t\n\t\tconstructor() {\n\t\t\tthis.area = document.getElementById( 'happyforms-modals-area' );\n\t\t}\n\n\t\topenDeactivateModal( redirectURL ) {\n\t\t\tvar modal = <DeactivateModal onRequestClose={ this.closeModal.bind( this, 'deactivate' ) } redirectURL={ redirectURL } />\n\n\t\t\tthis.openModal( modal );\n\t\t}\n\n\t\topenModal( modal ) {\n\t\t\trender( <ModalProvider modal={modal}></ModalProvider>, this.area );\n\t\t}\n\n\t\tcloseModal( modal ) {\n\t\t\trender( <></>, this.area );\n\n\t\t\t$.post( ajaxurl, {\n\t\t\t\taction: settings.actionModalDismiss,\n\t\t\t\tid: modal, \n\t\t\t} );\n\t\t}\n\n\t};\n\n}","import DashboardModals from '@happyforms/core/jsx/src/admin/dashboard-modals';\nimport { SlotFillProvider, Button, Modal, Guide, Popover, Notice, ExternalLink, TextControl, CheckboxControl, BaseControl } from '@wordpress/components';\nimport { useState, useReducer, useRef } from '@wordpress/element';\nimport { __, sprintf } from '@wordpress/i18n';\n\n( function( $, settings ) {\n\n\t/**\n\t *\n\t * Onboarding modal\n\t *\n\t */\n\tconst OnboardingModal = ( props ) => {\n\t\tconst imageURL = `${settings.pluginURL}/inc/assets/img/welcome.gif`;\n\t\tconst [ email, setEmail ] = useState( '' );\n\t\tconst [ poweredBy, setPoweredBy ] = useState( false );\n\n\t\tconst onEmailChange = ( e ) => {\n\t\t\tsetEmail( e.target.value );\n\t\t};\n\n\t\tconst onRequestClose = () => {\n\t\t\t$.post( ajaxurl, {\n\t\t\t\taction: settings.onboardingModalAction,\n\t\t\t\t_wpnonce: settings.onboardingModalNonce,\n\t\t\t\temail: email,\n\t\t\t\tpowered_by: poweredBy ? 1 : 0,\n\t\t\t} );\n\n\t\t\treturn props.onRequestClose();\n\t\t}\n\n\t\treturn(\n\t\t\t<Guide\n\t\t\t\tonFinish={ onRequestClose }\n\t\t\t\tclassName=\"happyforms-modal happyforms-modal--onboarding\"\n\t\t\t\tpages={ [\n\t\t\t\t\t{\n\t\t\t\t\t\timage: (\n\t\t\t\t\t\t\t<picture>\n\t\t\t\t\t\t\t\t<img src={imageURL} width=\"450\" height=\"276\" />\n\t\t\t\t\t\t\t</picture>\n\t\t\t\t\t\t),\n\t\t\t\t\t\tcontent: (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<div className=\"happyforms-modal__header\">\n\t\t\t\t\t\t\t\t<h1>{ __( 'Welcome to Happyforms', 'happyforms' ) }</h1>\n\t\t\t\t\t\t\t\t<p>{ __( 'We\\'ll send you a few emails each month about plugin updates. And don\\'t sweat it, you can unsubscribe anytime.', 'happyforms' ) }</p>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div className=\"happyforms-modal__body\">\n\t\t\t\t\t\t\t\t<label>{ __( 'Email address', 'happyforms' ) }</label>\n\t\t\t\t\t\t\t\t<input type=\"email\" value={ email } onChange={ onEmailChange } autoFocus />\n\t\t\t\t\t\t\t\t<label className=\"happyforms-radio-label\">\n\t\t\t\t\t\t\t\t\t<CheckboxControl checked={ poweredBy } onChange={ setPoweredBy } />\n\t\t\t\t\t\t\t\t\t<span>{ __( 'Yes, I want to help support the free plugin by adding a powered by link in the footer of my forms and emails.', 'happyforms' ) }</span>\n\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div className=\"happyforms-modal__footer\">\n\t\t\t\t\t\t\t\t<BaseControl>\n\t\t\t\t\t\t\t\t\t<Button isPrimary={true} onClick={ onRequestClose } text={ __( 'Continue', 'happyforms' ) }></Button>\n\t\t\t\t\t\t\t\t</BaseControl>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t),\n\t\t\t\t\t},\n\t\t\t\t] }\n\t\t\t/>\n\t\t);\n\t}\n\n\t/**\n\t *\n\t * Upgrade modal\n\t *\n\t */\n\tconst UpgradeModal = ( props ) => {\n\t\treturn (\n\t\t\t<Modal \n\t\t\t\tclassName=\"happyforms-modal happyforms-modal--upgrade\" \n\t\t\t\ttitle={ __( 'You\\’ll need to upgrade to access this', 'happyforms' ) } \n\t\t\t\tonRequestClose={ props.onRequestClose }>\n\t\t\t\t<div className=\"happyforms-modal__body\">\n\t\t\t\t\t<p>{ __( 'We offer several, affordable paid plans that include our best features. Upgrade today and increase your customer interactions.', 'happyforms' ) }</p>\n\t\t\t\t</div>\n\t\t\t\t<div className=\"happyforms-modal__footer\">\n\t\t\t\t\t<div className=\"happyforms-modal__footer-button-group\">\n\t\t\t\t\t\t<Button \n\t\t\t\t\t\t\tisPrimary={ true } \n\t\t\t\t\t\t\thref=\"https://happyforms.io/upgrade\" \n\t\t\t\t\t\t\ttarget=\"_blank\" \n\t\t\t\t\t\t\ttext={ __( 'Start Your Risk-Free 14-Day Trial', 'happyforms' ) }>\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</div>\n\t\t\t\t\t<p>{ __( 'Or', 'happyforms' ) } <Button isLink={ true } onClick={ props.onRequestClose } text={ __( 'continue with free version', 'happyforms' ) }></Button>.</p>\n\t\t\t\t</div>\n\t\t\t</Modal>\n\t\t);\n\t}\n\n\tconst DashboardModalsBaseClass = DashboardModals( $, settings );\n\t\n\tclass DashboardModalsClass extends DashboardModalsBaseClass {\n\n\t\topenOnboardingModal() {\n\t\t\tvar modal = (\n\t\t\t\t<OnboardingModal \n\t\t\t\t\tonRequestClose={ this.closeModal.bind( this, 'onboarding' ) } \n\t\t\t\t\tstatus={ settings.trackingStatus } />\n\t\t\t);\n\n\t\t\tthis.openModal( modal );\n\t\t}\n\n\t\topenUpgradeModal() {\n\t\t\tvar modal = <UpgradeModal onRequestClose={ this.closeModal.bind( this, 'upgrade' ) } />\n\n\t\t\tthis.openModal( modal );\n\t\t}\n\n\t};\n\n\tvar happyForms = window.happyForms || {};\n\twindow.happyForms = happyForms;\n\t\n\thappyForms.modals = new DashboardModalsClass();\n\n} )( jQuery, _happyFormsDashboardModalsSettings );","function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nmodule.exports = _defineProperty;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","(function() { module.exports = window[\"wp\"][\"components\"]; }());","(function() { module.exports = window[\"wp\"][\"element\"]; }());","(function() { module.exports = window[\"wp\"][\"i18n\"]; }());"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./build/core/assets/jsx/src/admin/dashboard-modals.js","webpack:///./build/inc/assets/jsx/src/admin/dashboard-modals.js","webpack:///./node_modules/@babel/runtime/helpers/defineProperty.js","webpack:///external [\"wp\",\"components\"]","webpack:///external [\"wp\",\"element\"]","webpack:///external [\"wp\",\"i18n\"]"],"names":["$","settings","render","wp","element","DeactivateModal","props","option","setOption","useState","onChange","e","target","value","onSubmit","post","ajaxurl","action","deactivateModalAction","_wpnonce","deactivateModalNonce","keep_data","window","location","href","redirectURL","onRequestClose","__","ModalProvider","modal","DashboardModals","constructor","area","document","getElementById","openDeactivateModal","closeModal","bind","openModal","actionModalDismiss","id","OnboardingModal","imageURL","pluginURL","email","setEmail","poweredBy","setPoweredBy","onEmailChange","onboardingModalAction","onboardingModalNonce","powered_by","image","content","UpgradeModal","DashboardModalsBaseClass","DashboardModalsClass","openOnboardingModal","trackingStatus","openUpgradeModal","happyForms","modals","jQuery","_happyFormsDashboardModalsSettings"],"mappings":";QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAA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pC,QAAQ,CAACyD;AAFnB,QADD;AAMA,WAAKpB,SAAL,CAAgBT,KAAhB;AACA;;AAED8B,oBAAgB,GAAG;AAClB,UAAI9B,KAAK,GAAG,yEAAC,YAAD;AAAc,sBAAc,EAAG,KAAKO,UAAL,CAAgBC,IAAhB,CAAsB,IAAtB,EAA4B,SAA5B;AAA/B,QAAZ;AAEA,WAAKC,SAAL,CAAgBT,KAAhB;AACA;;AAhB0D;;AAkB3D;AAED,MAAI+B,UAAU,GAAGtC,MAAM,CAACsC,UAAP,IAAqB,EAAtC;AACAtC,QAAM,CAACsC,UAAP,GAAoBA,UAApB;AAEAA,YAAU,CAACC,MAAX,GAAoB,IAAIL,oBAAJ,EAApB;AAEA,CA5ID,EA4IKM,MA5IL,EA4IaC,kCA5Ib,E;;;;;;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA,6E;;;;;;;;;;;AChBA,aAAa,6CAA6C,EAAE,I;;;;;;;;;;;ACA5D,aAAa,0CAA0C,EAAE,I;;;;;;;;;;;ACAzD,aAAa,uCAAuC,EAAE,I","file":"dashboard-modals.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./build/inc/assets/jsx/src/admin/dashboard-modals.js\");\n","import { SlotFillProvider, Button, Modal, Guide, Popover, Notice, ExternalLink, TextControl, CheckboxControl, BaseControl } from '@wordpress/components';\nimport { useState, useReducer, useRef } from '@wordpress/element';\nimport { __, sprintf } from '@wordpress/i18n';\n\n/**\n *\n * Modal handler class\n *\n */\nexport default function( $, settings ) {\n\n\tconst { render } = wp.element;\n\n\t/**\n\t *\n\t * Deactivation modal\n\t *\n\t */\n\tconst DeactivateModal = ( props ) => {\n\t\tconst [ option, setOption ] = useState( 'yes' );\n\n\t\tconst onChange = ( e ) => {\n\t\t\tsetOption( e.target.value );\n\t\t};\n\n\t\tconst onSubmit = () => {\n\t\t\t$.post( ajaxurl, {\n\t\t\t\taction: settings.deactivateModalAction,\n\t\t\t\t_wpnonce: settings.deactivateModalNonce,\n\t\t\t\tkeep_data: option, \n\t\t\t}, function() {\n\t\t\t\twindow.location.href = props.redirectURL;\n\t\t\t} );\n\t\t\t\n\t\t\treturn props.onRequestClose();\n\t\t}\n\n\t\treturn (\n\t\t\t<Modal className=\"happyforms-modal happyforms-modal--deactivate\" title=\"What about your data?\" onRequestClose={ props.onRequestClose }>\n\t\t\t\t<div className=\"happyforms-modal__body\" onChange={ onChange }>\n\t\t\t\t\t<label htmlFor=\"happyforms-keep-data-yes\">\n\t\t\t\t\t\t<input \n\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\tid=\"happyforms-keep-data-yes\"\n\t\t\t\t\t\t\tname=\"happyforms-keep-data\" \n\t\t\t\t\t\t\tvalue=\"yes\"\n\t\t\t\t\t\t\tdefaultChecked\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<span>{ __( 'Keep plugin data (recommended)', 'happyforms' ) }</span>\n\t\t\t\t\t</label>\n\t\t\t\t\t<label htmlFor=\"happyforms-keep-data-no\">\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\tid=\"happyforms-keep-data-no\"\n\t\t\t\t\t\t\tname=\"happyforms-keep-data\"\n\t\t\t\t\t\t\tvalue=\"no\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<span>{ __( 'Permanently delete plugin data', 'happyforms' ) }</span>\n\t\t\t\t\t</label>\n\t\t\t\t</div>\n\t\t\t\t<div className=\"happyforms-modal__footer\">\n\t\t\t\t\t<div className=\"happyforms-modal__footer-button-group\">\n\t\t\t\t\t\t<Button \n\t\t\t\t\t\t\tisPrimary={true} \n\t\t\t\t\t\t\tonClick={ onSubmit } \n\t\t\t\t\t\t\ttext={ option == 'yes' ? \n\t\t\t\t\t\t\t\t__( 'Deactivate Plugin', 'happyforms' ) : \n\t\t\t\t\t\t\t\t__( 'Delete Data and Deactivate Plugin', 'happyforms' ) }>\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</Modal>\n\t\t);\n\t};\n\n\t/**\n\t *\n\t * Modal wrapper\n\t *\n\t */\n\tconst ModalProvider = ( props ) => {\n\t\treturn (\n\t\t\t<SlotFillProvider>\n\t\t\t\t{ props.modal }\n\t\t\t\t<Popover.Slot />\n\t\t\t</SlotFillProvider>\n\t\t);\n\t};\n\t\n\treturn class DashboardModals {\n\n\t\tarea = null;\n\t\t\n\t\tconstructor() {\n\t\t\tthis.area = document.getElementById( 'happyforms-modals-area' );\n\t\t}\n\n\t\topenDeactivateModal( redirectURL ) {\n\t\t\tvar modal = <DeactivateModal onRequestClose={ this.closeModal.bind( this, 'deactivate' ) } redirectURL={ redirectURL } />\n\n\t\t\tthis.openModal( modal );\n\t\t}\n\n\t\topenModal( modal ) {\n\t\t\trender( <ModalProvider modal={modal}></ModalProvider>, this.area );\n\t\t}\n\n\t\tcloseModal( modal ) {\n\t\t\trender( <></>, this.area );\n\n\t\t\t$.post( ajaxurl, {\n\t\t\t\taction: settings.actionModalDismiss,\n\t\t\t\tid: modal, \n\t\t\t} );\n\t\t}\n\n\t};\n\n}","import DashboardModals from '@happyforms/core/jsx/src/admin/dashboard-modals';\nimport { SlotFillProvider, Button, Modal, Guide, Popover, Notice, ExternalLink, TextControl, CheckboxControl, BaseControl } from '@wordpress/components';\nimport { useState, useReducer, useRef } from '@wordpress/element';\nimport { __, sprintf } from '@wordpress/i18n';\n\n( function( $, settings ) {\n\n\t/**\n\t *\n\t * Onboarding modal\n\t *\n\t */\n\tconst OnboardingModal = ( props ) => {\n\t\tconst imageURL = `${settings.pluginURL}/inc/assets/img/welcome.gif`;\n\t\tconst [ email, setEmail ] = useState( '' );\n\t\tconst [ poweredBy, setPoweredBy ] = useState( false );\n\n\t\tconst onEmailChange = ( e ) => {\n\t\t\tsetEmail( e.target.value );\n\t\t};\n\n\t\tconst onRequestClose = () => {\n\t\t\t$.post( ajaxurl, {\n\t\t\t\taction: settings.onboardingModalAction,\n\t\t\t\t_wpnonce: settings.onboardingModalNonce,\n\t\t\t\temail: email,\n\t\t\t\tpowered_by: poweredBy ? 1 : 0,\n\t\t\t} );\n\n\t\t\treturn props.onRequestClose();\n\t\t}\n\n\t\treturn(\n\t\t\t<Guide\n\t\t\t\tonFinish={ onRequestClose }\n\t\t\t\tclassName=\"happyforms-modal happyforms-modal--onboarding\"\n\t\t\t\tpages={ [\n\t\t\t\t\t{\n\t\t\t\t\t\timage: (\n\t\t\t\t\t\t\t<picture>\n\t\t\t\t\t\t\t\t<img src={imageURL} width=\"450\" height=\"276\" />\n\t\t\t\t\t\t\t</picture>\n\t\t\t\t\t\t),\n\t\t\t\t\t\tcontent: (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<div className=\"happyforms-modal__header\">\n\t\t\t\t\t\t\t\t<h1>{ __( 'Welcome to Happyforms', 'happyforms' ) }</h1>\n\t\t\t\t\t\t\t\t<p>{ __( 'We\\'ll send you a few emails each month about plugin updates. And don\\'t sweat it, you can unsubscribe anytime.', 'happyforms' ) }</p>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div className=\"happyforms-modal__body\">\n\t\t\t\t\t\t\t\t<label>{ __( 'Email address', 'happyforms' ) }</label>\n\t\t\t\t\t\t\t\t<input type=\"email\" value={ email } onChange={ onEmailChange } autoFocus />\n\t\t\t\t\t\t\t\t<label className=\"happyforms-radio-label\">\n\t\t\t\t\t\t\t\t\t<CheckboxControl checked={ poweredBy } onChange={ setPoweredBy } />\n\t\t\t\t\t\t\t\t\t<span>{ __( 'Yes, I want to help support the free plugin by adding a powered by link in the footer of my forms and emails.', 'happyforms' ) }</span>\n\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div className=\"happyforms-modal__footer\">\n\t\t\t\t\t\t\t\t<BaseControl>\n\t\t\t\t\t\t\t\t\t<Button isPrimary={true} onClick={ onRequestClose } text={ __( 'Continue', 'happyforms' ) }></Button>\n\t\t\t\t\t\t\t\t</BaseControl>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t),\n\t\t\t\t\t},\n\t\t\t\t] }\n\t\t\t/>\n\t\t);\n\t}\n\n\t/**\n\t *\n\t * Upgrade modal\n\t *\n\t */\n\tconst UpgradeModal = ( props ) => {\n\t\tconst imageURL = `${settings.pluginURL}/inc/assets/img/alrighty.gif`;\n\n\t\treturn(\n\t\t\t<Guide\n\t\t\t\tonFinish={ props.onRequestClose }\n\t\t\t\tclassName=\"happyforms-modal happyforms-modal--upgrade\"\n\t\t\t\tpages={ [\n\t\t\t\t\t{\n\t\t\t\t\t\timage: (\n\t\t\t\t\t\t\t<picture>\n\t\t\t\t\t\t\t\t<img src={imageURL} width=\"450\" height=\"276\" />\n\t\t\t\t\t\t\t</picture>\n\t\t\t\t\t\t),\n\t\t\t\t\t\tcontent: (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<div className=\"happyforms-modal__header\">\n\t\t\t\t\t\t\t\t<h1>{ __( 'Start with a free 7-day trial', 'happyforms' ) }</h1>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div className=\"happyforms-modal__body\">\n\t\t\t\t\t\t\t\t<p>{ __( 'You\\'re just a mouse click and a few key taps away from building better forms for your site. And don\\'t sweat it, you can upgrade, downgrade or cancel your trial anytime.', 'happyforms' ) }</p>\n\t\t\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t\t\t<li>{ __( 'Advanced features and integrations', 'happyforms' ) }</li>\n\t\t\t\t\t\t\t\t\t<li>{ __( 'Help from the friendliest support team around', 'happyforms' ) }</li>\n\t\t\t\t\t\t\t\t\t<li>{ __( 'Automatically transfer over your free forms', 'happyforms' ) }</li>\n\t\t\t\t\t\t\t\t\t<li>{ __( 'New goodies released every second week', 'happyforms' ) }</li>\n\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t<p>{ __( 'So whattaya say? Ready to build better forms today?', 'happyforms' ) }</p>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div className=\"happyforms-modal__footer\">\n\t\t\t\t\t\t\t\t<BaseControl>\n\t\t\t\t\t\t\t\t\t<Button isPrimary={true} href=\"https://happyforms.io/upgrade\" target=\"_blank\" text={ __( 'Start a Free 7-day Trial', 'happyforms' ) }></Button>\n\t\t\t\t\t\t\t\t\t<Button isSecondary={true} onClick={ props.onRequestClose } text={ __( 'Nope, Maybe Later', 'happyforms' ) }></Button>\n\t\t\t\t\t\t\t\t</BaseControl>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t),\n\t\t\t\t\t},\n\t\t\t\t] }\n\t\t\t/>\n\t\t);\n\t}\n\n\tconst DashboardModalsBaseClass = DashboardModals( $, settings );\n\t\n\tclass DashboardModalsClass extends DashboardModalsBaseClass {\n\n\t\topenOnboardingModal() {\n\t\t\tvar modal = (\n\t\t\t\t<OnboardingModal \n\t\t\t\t\tonRequestClose={ this.closeModal.bind( this, 'onboarding' ) } \n\t\t\t\t\tstatus={ settings.trackingStatus } />\n\t\t\t);\n\n\t\t\tthis.openModal( modal );\n\t\t}\n\n\t\topenUpgradeModal() {\n\t\t\tvar modal = <UpgradeModal onRequestClose={ this.closeModal.bind( this, 'upgrade' ) } />\n\n\t\t\tthis.openModal( modal );\n\t\t}\n\n\t};\n\n\tvar happyForms = window.happyForms || {};\n\twindow.happyForms = happyForms;\n\t\n\thappyForms.modals = new DashboardModalsClass();\n\n} )( jQuery, _happyFormsDashboardModalsSettings );","function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nmodule.exports = _defineProperty;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","(function() { module.exports = window[\"wp\"][\"components\"]; }());","(function() { module.exports = window[\"wp\"][\"element\"]; }());","(function() { module.exports = window[\"wp\"][\"i18n\"]; }());"],"sourceRoot":""}
inc/assets/jsx/src/admin/dashboard-modals.js CHANGED
@@ -74,26 +74,45 @@ import { __, sprintf } from '@wordpress/i18n';
74
  *
75
  */
76
  const UpgradeModal = ( props ) => {
77
- return (
78
- <Modal
79
- className="happyforms-modal happyforms-modal--upgrade"
80
- title={ __( 'You\’ll need to upgrade to access this', 'happyforms' ) }
81
- onRequestClose={ props.onRequestClose }>
82
- <div className="happyforms-modal__body">
83
- <p>{ __( 'We offer several, affordable paid plans that include our best features. Upgrade today and increase your customer interactions.', 'happyforms' ) }</p>
84
- </div>
85
- <div className="happyforms-modal__footer">
86
- <div className="happyforms-modal__footer-button-group">
87
- <Button
88
- isPrimary={ true }
89
- href="https://happyforms.io/upgrade"
90
- target="_blank"
91
- text={ __( 'Start Your Risk-Free 14-Day Trial', 'happyforms' ) }>
92
- </Button>
93
- </div>
94
- <p>{ __( 'Or', 'happyforms' ) } <Button isLink={ true } onClick={ props.onRequestClose } text={ __( 'continue with free version', 'happyforms' ) }></Button>.</p>
95
- </div>
96
- </Modal>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
97
  );
98
  }
99
 
74
  *
75
  */
76
  const UpgradeModal = ( props ) => {
77
+ const imageURL = `${settings.pluginURL}/inc/assets/img/alrighty.gif`;
78
+
79
+ return(
80
+ <Guide
81
+ onFinish={ props.onRequestClose }
82
+ className="happyforms-modal happyforms-modal--upgrade"
83
+ pages={ [
84
+ {
85
+ image: (
86
+ <picture>
87
+ <img src={imageURL} width="450" height="276" />
88
+ </picture>
89
+ ),
90
+ content: (
91
+ <>
92
+ <div className="happyforms-modal__header">
93
+ <h1>{ __( 'Start with a free 7-day trial', 'happyforms' ) }</h1>
94
+ </div>
95
+ <div className="happyforms-modal__body">
96
+ <p>{ __( 'You\'re just a mouse click and a few key taps away from building better forms for your site. And don\'t sweat it, you can upgrade, downgrade or cancel your trial anytime.', 'happyforms' ) }</p>
97
+ <ul>
98
+ <li>{ __( 'Advanced features and integrations', 'happyforms' ) }</li>
99
+ <li>{ __( 'Help from the friendliest support team around', 'happyforms' ) }</li>
100
+ <li>{ __( 'Automatically transfer over your free forms', 'happyforms' ) }</li>
101
+ <li>{ __( 'New goodies released every second week', 'happyforms' ) }</li>
102
+ </ul>
103
+ <p>{ __( 'So whattaya say? Ready to build better forms today?', 'happyforms' ) }</p>
104
+ </div>
105
+ <div className="happyforms-modal__footer">
106
+ <BaseControl>
107
+ <Button isPrimary={true} href="https://happyforms.io/upgrade" target="_blank" text={ __( 'Start a Free 7-day Trial', 'happyforms' ) }></Button>
108
+ <Button isSecondary={true} onClick={ props.onRequestClose } text={ __( 'Nope, Maybe Later', 'happyforms' ) }></Button>
109
+ </BaseControl>
110
+ </div>
111
+ </>
112
+ ),
113
+ },
114
+ ] }
115
+ />
116
  );
117
  }
118
 
inc/classes/class-happyforms.php CHANGED
@@ -83,9 +83,6 @@ class HappyForms extends HappyForms_Core {
83
  require_once( happyforms_get_include_folder() . '/classes/parts/class-part-rating-dummy.php' );
84
  $part_library->register_part( 'HappyForms_Part_Rating_Dummy', 20 );
85
 
86
- require_once( happyforms_get_include_folder() . '/classes/parts/class-part-narrative-dummy.php' );
87
- $part_library->register_part( 'HappyForms_Part_Narrative_Dummy', 21 );
88
-
89
  require_once( happyforms_get_include_folder() . '/classes/parts/class-part-optin-dummy.php' );
90
  $part_library->register_part( 'HappyForms_Part_OptIn_Dummy', 22 );
91
 
@@ -155,16 +152,10 @@ class HappyForms extends HappyForms_Core {
155
  'label' => __( 'Limit submissions', 'happyforms' ),
156
  );
157
 
158
- $controls[3000] = array(
159
- 'type' => 'checkbox_dummy',
160
- 'dummy_id' => 'schedule_visibility',
161
- 'label' => __( 'Schedule visibility', 'happyforms' ),
162
- );
163
-
164
  $controls[3190] = array(
165
  'type' => 'checkbox_dummy',
166
  'dummy_id' => 'save_submissions',
167
- 'label' => __( 'Store activity in database', 'happyforms' ),
168
  );
169
 
170
  $controls[3191] = array(
@@ -382,8 +373,8 @@ class HappyForms extends HappyForms_Core {
382
  return;
383
  }
384
 
385
- wp_add_inline_script(
386
- 'happyforms-dashboard-modals',
387
  "( function( $ ) { $( function() { happyForms.modals.openOnboardingModal(); } ); } )( jQuery );"
388
  );
389
  }
83
  require_once( happyforms_get_include_folder() . '/classes/parts/class-part-rating-dummy.php' );
84
  $part_library->register_part( 'HappyForms_Part_Rating_Dummy', 20 );
85
 
 
 
 
86
  require_once( happyforms_get_include_folder() . '/classes/parts/class-part-optin-dummy.php' );
87
  $part_library->register_part( 'HappyForms_Part_OptIn_Dummy', 22 );
88
 
152
  'label' => __( 'Limit submissions', 'happyforms' ),
153
  );
154
 
 
 
 
 
 
 
155
  $controls[3190] = array(
156
  'type' => 'checkbox_dummy',
157
  'dummy_id' => 'save_submissions',
158
+ 'label' => __( 'Store replies and attachments in database', 'happyforms' ),
159
  );
160
 
161
  $controls[3191] = array(
373
  return;
374
  }
375
 
376
+ wp_add_inline_script(
377
+ 'happyforms-dashboard-modals',
378
  "( function( $ ) { $( function() { happyForms.modals.openOnboardingModal(); } ); } )( jQuery );"
379
  );
380
  }
inc/classes/parts/class-part-narrative-dummy.php DELETED
@@ -1,12 +0,0 @@
1
- <?php
2
-
3
- class HappyForms_Part_Narrative_Dummy extends HappyForms_Form_Part {
4
-
5
- public $type = 'narrative_dummy';
6
-
7
- public function __construct() {
8
- $this->label = __( 'Blanks', 'happyforms' );
9
- $this->description = __( 'For adding fill-in-the-blank style inputs to a paragraph of text.', 'happyforms' );
10
- }
11
-
12
- }
 
 
 
 
 
 
 
 
 
 
 
 
languages/happyforms.pot CHANGED
@@ -2,14 +2,14 @@
2
  # This file is distributed under the same license as the Happyforms (free) plugin.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Happyforms (free) 1.13.5\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/happyforms/\n"
7
  "Last-Translator: The Theme Foundry\n"
8
  "Language-Team: The Theme Foundry\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "POT-Creation-Date: 2021-10-12T09:07:52+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.4.0\n"
15
  "X-Domain: happyforms\n"
@@ -32,9 +32,9 @@ msgid "Happyforms"
32
  msgstr ""
33
 
34
  #: core/classes/class-block.php:52
35
- #: core/classes/class-form-controller.php:72
36
- #: core/classes/class-happyforms-core.php:173
37
- #: core/classes/class-happyforms-core.php:174
38
  #: core/classes/class-happyforms-widget.php:13
39
  #: core/helpers/helper-misc.php:1017
40
  msgid "Forms"
@@ -88,59 +88,58 @@ msgstr ""
88
  msgid "Undo"
89
  msgstr ""
90
 
91
- #: core/classes/class-form-controller.php:73
92
  msgid "Form"
93
  msgstr ""
94
 
95
- #: core/classes/class-form-controller.php:74
96
- #: core/classes/class-happyforms-core.php:189
97
- #: core/classes/class-happyforms-core.php:190
98
  msgid "Add New"
99
  msgstr ""
100
 
101
- #: core/classes/class-form-controller.php:75
102
- #: core/classes/class-form-controller.php:77
103
  msgid "Build form"
104
  msgstr ""
105
 
106
- #: core/classes/class-form-controller.php:76
107
  msgid "Edit form"
108
  msgstr ""
109
 
110
- #: core/classes/class-form-controller.php:78
111
  msgid "View form"
112
  msgstr ""
113
 
114
- #: core/classes/class-form-controller.php:79
115
  msgid "View forms"
116
  msgstr ""
117
 
118
- #: core/classes/class-form-controller.php:80
119
  msgid "Search Forms"
120
  msgstr ""
121
 
122
- #: core/classes/class-form-controller.php:81
123
  #: core/assets/jsx/build/admin/block.js:141
124
- #: core/assets/jsx/src/admin/block.js:27
125
  msgid "No forms found."
126
  msgstr ""
127
 
128
- #: core/classes/class-form-controller.php:82
129
  msgid "No forms found in Trash."
130
  msgstr ""
131
 
132
- #: core/classes/class-form-controller.php:83
133
  #: core/classes/class-form-controller.php:84
134
- #: core/classes/class-happyforms-core.php:181
135
- #: core/classes/class-happyforms-core.php:182
 
136
  msgid "All Forms"
137
  msgstr ""
138
 
139
- #: core/classes/class-form-controller.php:531
140
  msgid "(no title)"
141
  msgstr ""
142
 
143
- #: core/classes/class-form-controller.php:637
144
  msgid " Copy"
145
  msgstr ""
146
 
@@ -395,7 +394,7 @@ msgid "Submit form"
395
  msgstr ""
396
 
397
  #: core/classes/class-form-shuffle.php:43
398
- #: inc/classes/class-happyforms.php:125
399
  msgid "Randomize fields to prevent bias"
400
  msgstr ""
401
 
@@ -844,35 +843,34 @@ msgstr ""
844
  msgid "Additional CSS"
845
  msgstr ""
846
 
847
- #: core/classes/class-happyforms-core.php:197
848
- #: core/classes/class-happyforms-core.php:198
849
  #: inc/classes/class-message-controller.php:584
850
  #: inc/classes/class-message-controller.php:585
851
  msgid "Activity"
852
  msgstr ""
853
 
854
- #: core/classes/class-happyforms-core.php:206
855
- #: core/classes/class-happyforms-core.php:207
856
  #: integrations/templates/admin-integrations.php:3
857
  msgid "Integrations"
858
  msgstr ""
859
 
860
- #: core/classes/class-happyforms-core.php:215
861
- #: core/classes/class-happyforms-core.php:216
862
  #: core/assets/jsx/build/admin/block.js:170
863
- #: core/assets/jsx/src/admin/block.js:56
864
  msgid "Settings"
865
  msgstr ""
866
 
867
- #: core/classes/class-happyforms-core.php:455
868
  msgid "Add Form"
869
  msgstr ""
870
 
871
- #: core/classes/class-happyforms-widget.php:79
872
  msgid "Title:"
873
  msgstr ""
874
 
875
- #: core/classes/class-happyforms-widget.php:83
876
  msgid "Form:"
877
  msgstr ""
878
 
@@ -1029,7 +1027,6 @@ msgstr ""
1029
 
1030
  #: core/classes/parts/class-part-select.php:56
1031
  #: core/assets/jsx/build/admin/block.js:127
1032
- #: core/assets/jsx/src/admin/block.js:15
1033
  msgid "Choose"
1034
  msgstr ""
1035
 
@@ -2996,7 +2993,6 @@ msgstr ""
2996
 
2997
  #: core/templates/admin-form-modal.php:12
2998
  #: core/assets/jsx/build/admin/block.js:155
2999
- #: core/assets/jsx/src/admin/block.js:36
3000
  msgid "Insert"
3001
  msgstr ""
3002
 
@@ -3069,7 +3065,7 @@ msgid "Clear Results"
3069
  msgstr ""
3070
 
3071
  #: core/templates/customize-form-parts-drawer.php:38
3072
- #: inc/classes/class-happyforms.php:117
3073
  #: inc/templates/customize-controls/checkbox_dummy.php:7
3074
  #: inc/templates/customize-controls/email-parts-list-dummy.php:11
3075
  msgid "Upgrade"
@@ -3266,7 +3262,7 @@ msgstr ""
3266
  #: core/templates/parts/customize-checkbox.php:141
3267
  #: core/templates/parts/customize-radio.php:115
3268
  #: core/templates/parts/customize-select.php:113
3269
- #: inc/classes/class-happyforms.php:155
3270
  msgid "Limit submissions"
3271
  msgstr ""
3272
 
@@ -3351,65 +3347,61 @@ msgstr ""
3351
  msgid "Click to edit this part."
3352
  msgstr ""
3353
 
3354
- #: inc/classes/class-happyforms.php:131
3355
  msgid "Use reCAPTCHA"
3356
  msgstr ""
3357
 
3358
- #: inc/classes/class-happyforms.php:137
3359
  msgid "Save incomplete and abandoned submissions"
3360
  msgstr ""
3361
 
3362
- #: inc/classes/class-happyforms.php:143
3363
  msgid "Let respondents save a draft submission and come back to it later"
3364
  msgstr ""
3365
 
3366
- #: inc/classes/class-happyforms.php:149
3367
  msgid "Require respondents to review a submission before submitting"
3368
  msgstr ""
3369
 
3370
- #: inc/classes/class-happyforms.php:161
3371
- msgid "Schedule visibility"
3372
- msgstr ""
3373
-
3374
- #: inc/classes/class-happyforms.php:167
3375
- msgid "Store activity in database"
3376
  msgstr ""
3377
 
3378
- #: inc/classes/class-happyforms.php:173
3379
  msgid "Capture user metadata (IP, language, platform, time and timezone)"
3380
  msgstr ""
3381
 
3382
- #: inc/classes/class-happyforms.php:179
3383
  msgid "Block these email addresses, email domains and email partials"
3384
  msgstr ""
3385
 
3386
- #: inc/classes/class-happyforms.php:185
3387
  msgid "Block these words, phrases and letters"
3388
  msgstr ""
3389
 
3390
- #: inc/classes/class-happyforms.php:195
3391
  msgid "Include reply link"
3392
  msgstr ""
3393
 
3394
- #: inc/classes/class-happyforms.php:201
3395
  msgid "Include referral web address"
3396
  msgstr ""
3397
 
3398
- #: inc/classes/class-happyforms.php:207
3399
- #: inc/classes/class-happyforms.php:219
3400
  msgid "Attach .pdf"
3401
  msgstr ""
3402
 
3403
- #: inc/classes/class-happyforms.php:213
3404
  msgid "To email address"
3405
  msgstr ""
3406
 
3407
- #: inc/classes/class-happyforms.php:225
3408
  msgid "Send abandonment email"
3409
  msgstr ""
3410
 
3411
- #: inc/classes/class-happyforms.php:436
3412
- #: inc/classes/class-happyforms.php:454
3413
  msgid "Build your own WordPress form with Happyforms"
3414
  msgstr ""
3415
 
@@ -3518,14 +3510,6 @@ msgstr ""
3518
  msgid "For adding a single image, video, animated gif or audio clip."
3519
  msgstr ""
3520
 
3521
- #: inc/classes/parts/class-part-narrative-dummy.php:8
3522
- msgid "Blanks"
3523
- msgstr ""
3524
-
3525
- #: inc/classes/parts/class-part-narrative-dummy.php:9
3526
- msgid "For adding fill-in-the-blank style inputs to a paragraph of text."
3527
- msgstr ""
3528
-
3529
  #: inc/classes/parts/class-part-optin-dummy.php:8
3530
  msgid "Opt-In Choice"
3531
  msgstr ""
@@ -3854,12 +3838,10 @@ msgid "Publishable key"
3854
  msgstr ""
3855
 
3856
  #: core/assets/jsx/build/admin/block.js:141
3857
- #: core/assets/jsx/src/admin/block.js:26
3858
  msgid "Pick a form to display on your site."
3859
  msgstr ""
3860
 
3861
  #: core/assets/jsx/build/admin/block.js:172
3862
- #: core/assets/jsx/src/admin/block.js:58
3863
  msgid "Pick a form"
3864
  msgstr ""
3865
 
@@ -3899,27 +3881,47 @@ msgstr ""
3899
  msgid "Continue"
3900
  msgstr ""
3901
 
3902
- #: inc/assets/jsx/build/admin/dashboard-modals.js:312
3903
- #: inc/assets/jsx/src/admin/dashboard-modals.js:80
3904
- msgid "You’ll need to upgrade to access this"
3905
  msgstr ""
3906
 
3907
- #: inc/assets/jsx/build/admin/dashboard-modals.js:316
3908
- #: inc/assets/jsx/src/admin/dashboard-modals.js:83
3909
- msgid "We offer several, affordable paid plans that include our best features. Upgrade today and increase your customer interactions."
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3910
  msgstr ""
3911
 
3912
  #: inc/assets/jsx/build/admin/dashboard-modals.js:324
3913
- #: inc/assets/jsx/src/admin/dashboard-modals.js:91
3914
- msgid "Start Your Risk-Free 14-Day Trial"
3915
  msgstr ""
3916
 
3917
- #: inc/assets/jsx/build/admin/dashboard-modals.js:325
3918
- #: inc/assets/jsx/src/admin/dashboard-modals.js:94
3919
- msgid "Or"
3920
  msgstr ""
3921
 
3922
- #: inc/assets/jsx/build/admin/dashboard-modals.js:328
3923
- #: inc/assets/jsx/src/admin/dashboard-modals.js:94
3924
- msgid "continue with free version"
3925
  msgstr ""
2
  # This file is distributed under the same license as the Happyforms (free) plugin.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Happyforms (free) 1.13.6\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/happyforms/\n"
7
  "Last-Translator: The Theme Foundry\n"
8
  "Language-Team: The Theme Foundry\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "POT-Creation-Date: 2021-10-20T14:07:05+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.4.0\n"
15
  "X-Domain: happyforms\n"
32
  msgstr ""
33
 
34
  #: core/classes/class-block.php:52
35
+ #: core/classes/class-form-controller.php:73
36
+ #: core/classes/class-happyforms-core.php:182
37
+ #: core/classes/class-happyforms-core.php:183
38
  #: core/classes/class-happyforms-widget.php:13
39
  #: core/helpers/helper-misc.php:1017
40
  msgid "Forms"
88
  msgid "Undo"
89
  msgstr ""
90
 
91
+ #: core/classes/class-form-controller.php:74
92
  msgid "Form"
93
  msgstr ""
94
 
95
+ #: core/classes/class-form-controller.php:75
96
+ #: core/classes/class-happyforms-core.php:198
97
+ #: core/classes/class-happyforms-core.php:199
98
  msgid "Add New"
99
  msgstr ""
100
 
101
+ #: core/classes/class-form-controller.php:76
102
+ #: core/classes/class-form-controller.php:78
103
  msgid "Build form"
104
  msgstr ""
105
 
106
+ #: core/classes/class-form-controller.php:77
107
  msgid "Edit form"
108
  msgstr ""
109
 
110
+ #: core/classes/class-form-controller.php:79
111
  msgid "View form"
112
  msgstr ""
113
 
114
+ #: core/classes/class-form-controller.php:80
115
  msgid "View forms"
116
  msgstr ""
117
 
118
+ #: core/classes/class-form-controller.php:81
119
  msgid "Search Forms"
120
  msgstr ""
121
 
122
+ #: core/classes/class-form-controller.php:82
123
  #: core/assets/jsx/build/admin/block.js:141
 
124
  msgid "No forms found."
125
  msgstr ""
126
 
127
+ #: core/classes/class-form-controller.php:83
128
  msgid "No forms found in Trash."
129
  msgstr ""
130
 
 
131
  #: core/classes/class-form-controller.php:84
132
+ #: core/classes/class-form-controller.php:85
133
+ #: core/classes/class-happyforms-core.php:190
134
+ #: core/classes/class-happyforms-core.php:191
135
  msgid "All Forms"
136
  msgstr ""
137
 
138
+ #: core/classes/class-form-controller.php:532
139
  msgid "(no title)"
140
  msgstr ""
141
 
142
+ #: core/classes/class-form-controller.php:638
143
  msgid " Copy"
144
  msgstr ""
145
 
394
  msgstr ""
395
 
396
  #: core/classes/class-form-shuffle.php:43
397
+ #: inc/classes/class-happyforms.php:122
398
  msgid "Randomize fields to prevent bias"
399
  msgstr ""
400
 
843
  msgid "Additional CSS"
844
  msgstr ""
845
 
846
+ #: core/classes/class-happyforms-core.php:206
847
+ #: core/classes/class-happyforms-core.php:207
848
  #: inc/classes/class-message-controller.php:584
849
  #: inc/classes/class-message-controller.php:585
850
  msgid "Activity"
851
  msgstr ""
852
 
853
+ #: core/classes/class-happyforms-core.php:215
854
+ #: core/classes/class-happyforms-core.php:216
855
  #: integrations/templates/admin-integrations.php:3
856
  msgid "Integrations"
857
  msgstr ""
858
 
859
+ #: core/classes/class-happyforms-core.php:224
860
+ #: core/classes/class-happyforms-core.php:225
861
  #: core/assets/jsx/build/admin/block.js:170
 
862
  msgid "Settings"
863
  msgstr ""
864
 
865
+ #: core/classes/class-happyforms-core.php:464
866
  msgid "Add Form"
867
  msgstr ""
868
 
869
+ #: core/classes/class-happyforms-widget.php:80
870
  msgid "Title:"
871
  msgstr ""
872
 
873
+ #: core/classes/class-happyforms-widget.php:84
874
  msgid "Form:"
875
  msgstr ""
876
 
1027
 
1028
  #: core/classes/parts/class-part-select.php:56
1029
  #: core/assets/jsx/build/admin/block.js:127
 
1030
  msgid "Choose"
1031
  msgstr ""
1032
 
2993
 
2994
  #: core/templates/admin-form-modal.php:12
2995
  #: core/assets/jsx/build/admin/block.js:155
 
2996
  msgid "Insert"
2997
  msgstr ""
2998
 
3065
  msgstr ""
3066
 
3067
  #: core/templates/customize-form-parts-drawer.php:38
3068
+ #: inc/classes/class-happyforms.php:114
3069
  #: inc/templates/customize-controls/checkbox_dummy.php:7
3070
  #: inc/templates/customize-controls/email-parts-list-dummy.php:11
3071
  msgid "Upgrade"
3262
  #: core/templates/parts/customize-checkbox.php:141
3263
  #: core/templates/parts/customize-radio.php:115
3264
  #: core/templates/parts/customize-select.php:113
3265
+ #: inc/classes/class-happyforms.php:152
3266
  msgid "Limit submissions"
3267
  msgstr ""
3268
 
3347
  msgid "Click to edit this part."
3348
  msgstr ""
3349
 
3350
+ #: inc/classes/class-happyforms.php:128
3351
  msgid "Use reCAPTCHA"
3352
  msgstr ""
3353
 
3354
+ #: inc/classes/class-happyforms.php:134
3355
  msgid "Save incomplete and abandoned submissions"
3356
  msgstr ""
3357
 
3358
+ #: inc/classes/class-happyforms.php:140
3359
  msgid "Let respondents save a draft submission and come back to it later"
3360
  msgstr ""
3361
 
3362
+ #: inc/classes/class-happyforms.php:146
3363
  msgid "Require respondents to review a submission before submitting"
3364
  msgstr ""
3365
 
3366
+ #: inc/classes/class-happyforms.php:158
3367
+ msgid "Store replies and attachments in database"
 
 
 
 
3368
  msgstr ""
3369
 
3370
+ #: inc/classes/class-happyforms.php:164
3371
  msgid "Capture user metadata (IP, language, platform, time and timezone)"
3372
  msgstr ""
3373
 
3374
+ #: inc/classes/class-happyforms.php:170
3375
  msgid "Block these email addresses, email domains and email partials"
3376
  msgstr ""
3377
 
3378
+ #: inc/classes/class-happyforms.php:176
3379
  msgid "Block these words, phrases and letters"
3380
  msgstr ""
3381
 
3382
+ #: inc/classes/class-happyforms.php:186
3383
  msgid "Include reply link"
3384
  msgstr ""
3385
 
3386
+ #: inc/classes/class-happyforms.php:192
3387
  msgid "Include referral web address"
3388
  msgstr ""
3389
 
3390
+ #: inc/classes/class-happyforms.php:198
3391
+ #: inc/classes/class-happyforms.php:210
3392
  msgid "Attach .pdf"
3393
  msgstr ""
3394
 
3395
+ #: inc/classes/class-happyforms.php:204
3396
  msgid "To email address"
3397
  msgstr ""
3398
 
3399
+ #: inc/classes/class-happyforms.php:216
3400
  msgid "Send abandonment email"
3401
  msgstr ""
3402
 
3403
+ #: inc/classes/class-happyforms.php:427
3404
+ #: inc/classes/class-happyforms.php:445
3405
  msgid "Build your own WordPress form with Happyforms"
3406
  msgstr ""
3407
 
3510
  msgid "For adding a single image, video, animated gif or audio clip."
3511
  msgstr ""
3512
 
 
 
 
 
 
 
 
 
3513
  #: inc/classes/parts/class-part-optin-dummy.php:8
3514
  msgid "Opt-In Choice"
3515
  msgstr ""
3838
  msgstr ""
3839
 
3840
  #: core/assets/jsx/build/admin/block.js:141
 
3841
  msgid "Pick a form to display on your site."
3842
  msgstr ""
3843
 
3844
  #: core/assets/jsx/build/admin/block.js:172
 
3845
  msgid "Pick a form"
3846
  msgstr ""
3847
 
3881
  msgid "Continue"
3882
  msgstr ""
3883
 
3884
+ #: inc/assets/jsx/build/admin/dashboard-modals.js:322
3885
+ #: inc/assets/jsx/src/admin/dashboard-modals.js:93
3886
+ msgid "Start with a free 7-day trial"
3887
  msgstr ""
3888
 
3889
+ #: inc/assets/jsx/build/admin/dashboard-modals.js:324
3890
+ #: inc/assets/jsx/src/admin/dashboard-modals.js:96
3891
+ msgid "You're just a mouse click and a few key taps away from building better forms for your site. And don't sweat it, you can upgrade, downgrade or cancel your trial anytime."
3892
+ msgstr ""
3893
+
3894
+ #: inc/assets/jsx/build/admin/dashboard-modals.js:324
3895
+ #: inc/assets/jsx/src/admin/dashboard-modals.js:98
3896
+ msgid "Advanced features and integrations"
3897
+ msgstr ""
3898
+
3899
+ #: inc/assets/jsx/build/admin/dashboard-modals.js:324
3900
+ #: inc/assets/jsx/src/admin/dashboard-modals.js:99
3901
+ msgid "Help from the friendliest support team around"
3902
+ msgstr ""
3903
+
3904
+ #: inc/assets/jsx/build/admin/dashboard-modals.js:324
3905
+ #: inc/assets/jsx/src/admin/dashboard-modals.js:100
3906
+ msgid "Automatically transfer over your free forms"
3907
+ msgstr ""
3908
+
3909
+ #: inc/assets/jsx/build/admin/dashboard-modals.js:324
3910
+ #: inc/assets/jsx/src/admin/dashboard-modals.js:101
3911
+ msgid "New goodies released every second week"
3912
  msgstr ""
3913
 
3914
  #: inc/assets/jsx/build/admin/dashboard-modals.js:324
3915
+ #: inc/assets/jsx/src/admin/dashboard-modals.js:103
3916
+ msgid "So whattaya say? Ready to build better forms today?"
3917
  msgstr ""
3918
 
3919
+ #: inc/assets/jsx/build/admin/dashboard-modals.js:330
3920
+ #: inc/assets/jsx/src/admin/dashboard-modals.js:107
3921
+ msgid "Start a Free 7-day Trial"
3922
  msgstr ""
3923
 
3924
+ #: inc/assets/jsx/build/admin/dashboard-modals.js:334
3925
+ #: inc/assets/jsx/src/admin/dashboard-modals.js:108
3926
+ msgid "Nope, Maybe Later"
3927
  msgstr ""
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: contact form, contact form plugin, forms, form builder, custom form, intak
5
  Requires at least: 5.0
6
  Tested up to: 5.8
7
  Requires PHP: 7.0
8
- Stable tag: 1.13.5
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -151,6 +151,9 @@ Aw, honestly, the thought that you're writing about our contact form builder is
151
 
152
  == Changelog ==
153
 
 
 
 
154
  = 1.13.5 =
155
  * Bugfix: Jetpack synchronization was triggering a fatal error.
156
 
@@ -863,6 +866,9 @@ Aw, honestly, the thought that you're writing about our contact form builder is
863
 
864
  == Upgrade Notice ==
865
 
 
 
 
866
  = 1.13.5 =
867
  * Minor bugfixes.
868
 
5
  Requires at least: 5.0
6
  Tested up to: 5.8
7
  Requires PHP: 7.0
8
+ Stable tag: 1.13.6
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
151
 
152
  == Changelog ==
153
 
154
+ = 1.13.6 =
155
+ * Improvement: Legacy Forms widgets can now be transformed into blocks.
156
+
157
  = 1.13.5 =
158
  * Bugfix: Jetpack synchronization was triggering a fatal error.
159
 
866
 
867
  == Upgrade Notice ==
868
 
869
+ = 1.13.6 =
870
+ * Legacy widget block transforms.
871
+
872
  = 1.13.5 =
873
  * Minor bugfixes.
874