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

Version Description

  • New feature: "Screen Options" tab now includes "View mode" for better consistency with core WordPress.
  • Improvement: Installation data is now deleted automatically on plugin removal for easier deactivation.
  • Improvement: Better linear spacing for all choice-based field controls.
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.15.2
Comparing to
See all releases

Code changes from version 1.15.1 to 1.15.2

core/assets/css/customize.css CHANGED
@@ -910,7 +910,7 @@ body.adding-happyforms-parts #customize-preview iframe {
910
  display: none;
911
  }
912
 
913
- .happyforms-part-widget .options p {
914
  display: none;
915
  }
916
 
910
  display: none;
911
  }
912
 
913
+ .happyforms-part-widget .options p.no-options {
914
  display: none;
915
  }
916
 
core/assets/js/admin/dashboard.js CHANGED
@@ -11,7 +11,6 @@
11
  $( document ).on( 'click', '.happyforms-editor-button', this.onEditorButton.bind( this ) );
12
  $( '.happyforms-dialog__button' ).on( 'click', this.onDialogButton.bind( this ) );
13
  $( '.happyforms-notice:not(.one-time)' ).on( 'click', '.notice-dismiss', this.onNoticeDismiss.bind( this ) );
14
- $( document ).on( 'click', 'a[id^="deactivate-happyforms"]', this.openDeactivateModal );
15
  $( document ).on( 'click', 'button.happyforms-shortcode-clipboard__button', this.copyShortcodeToClipboard );
16
  },
17
 
@@ -88,12 +87,6 @@
88
  );
89
  },
90
 
91
- openDeactivateModal: function( e ) {
92
- e.preventDefault();
93
-
94
- happyForms.modals.openDeactivateModal( e.target.href );
95
- },
96
-
97
  copyShortcodeToClipboard: function( e ) {
98
  var $target = $( e.target );
99
  var $success = $target.next();
11
  $( document ).on( 'click', '.happyforms-editor-button', this.onEditorButton.bind( this ) );
12
  $( '.happyforms-dialog__button' ).on( 'click', this.onDialogButton.bind( this ) );
13
  $( '.happyforms-notice:not(.one-time)' ).on( 'click', '.notice-dismiss', this.onNoticeDismiss.bind( this ) );
 
14
  $( document ).on( 'click', 'button.happyforms-shortcode-clipboard__button', this.copyShortcodeToClipboard );
15
  },
16
 
87
  );
88
  },
89
 
 
 
 
 
 
 
90
  copyShortcodeToClipboard: function( e ) {
91
  var $target = $( e.target );
92
  var $success = $target.next();
core/assets/jsx/src/admin/dashboard-modals.js CHANGED
@@ -11,68 +11,6 @@ export default function( $, settings ) {
11
 
12
  const { render } = wp.element;
13
 
14
- /**
15
- *
16
- * Deactivation modal
17
- *
18
- */
19
- const DeactivateModal = ( props ) => {
20
- const [ option, setOption ] = useState( 'yes' );
21
-
22
- const onChange = ( e ) => {
23
- setOption( e.target.value );
24
- };
25
-
26
- const onSubmit = () => {
27
- $.post( ajaxurl, {
28
- action: settings.deactivateModalAction,
29
- _wpnonce: settings.deactivateModalNonce,
30
- keep_data: option,
31
- }, function() {
32
- window.location.href = props.redirectURL;
33
- } );
34
-
35
- return props.onRequestClose();
36
- }
37
-
38
- return (
39
- <Modal className="happyforms-modal happyforms-modal--deactivate" title="What about your data?" onRequestClose={ props.onRequestClose }>
40
- <div className="happyforms-modal__body" onChange={ onChange }>
41
- <label htmlFor="happyforms-keep-data-yes">
42
- <input
43
- type="radio"
44
- id="happyforms-keep-data-yes"
45
- name="happyforms-keep-data"
46
- value="yes"
47
- defaultChecked
48
- />
49
- <span>{ __( 'Keep plugin data (recommended)', 'happyforms' ) }</span>
50
- </label>
51
- <label htmlFor="happyforms-keep-data-no">
52
- <input
53
- type="radio"
54
- id="happyforms-keep-data-no"
55
- name="happyforms-keep-data"
56
- value="no"
57
- />
58
- <span>{ __( 'Permanently delete plugin data', 'happyforms' ) }</span>
59
- </label>
60
- </div>
61
- <div className="happyforms-modal__footer">
62
- <div className="happyforms-modal__footer-button-group">
63
- <Button
64
- isPrimary={true}
65
- onClick={ onSubmit }
66
- text={ option == 'yes' ?
67
- __( 'Deactivate Plugin', 'happyforms' ) :
68
- __( 'Delete Data and Deactivate Plugin', 'happyforms' ) }>
69
- </Button>
70
- </div>
71
- </div>
72
- </Modal>
73
- );
74
- };
75
-
76
  /**
77
  *
78
  * Modal wrapper
@@ -95,12 +33,6 @@ export default function( $, settings ) {
95
  this.area = document.getElementById( 'happyforms-modals-area' );
96
  }
97
 
98
- openDeactivateModal( redirectURL ) {
99
- var modal = <DeactivateModal onRequestClose={ this.closeModal.bind( this, 'deactivate' ) } redirectURL={ redirectURL } />
100
-
101
- this.openModal( modal );
102
- }
103
-
104
  openModal( modal ) {
105
  render( <ModalProvider modal={modal}></ModalProvider>, this.area );
106
  }
11
 
12
  const { render } = wp.element;
13
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  /**
15
  *
16
  * Modal wrapper
33
  this.area = document.getElementById( 'happyforms-modals-area' );
34
  }
35
 
 
 
 
 
 
 
36
  openModal( modal ) {
37
  render( <ModalProvider modal={modal}></ModalProvider>, this.area );
38
  }
core/classes/class-form-admin.php CHANGED
@@ -78,7 +78,7 @@ class HappyForms_Form_Admin {
78
  if ( 'edit.php' === $pagenow && $post_type === get_post_type() ) : ?>
79
  <style>
80
  .alignleft.actions { height: 32px; }
81
- fieldset.view-mode { display: none; }
82
  </style>
83
  <?php endif;
84
  }
78
  if ( 'edit.php' === $pagenow && $post_type === get_post_type() ) : ?>
79
  <style>
80
  .alignleft.actions { height: 32px; }
81
+ fieldset.view-mode { display: block; }
82
  </style>
83
  <?php endif;
84
  }
core/helpers/helper-activation.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /**
3
  *
4
- * Core activation/deactivation/remove hooks
5
  *
6
  */
7
  if ( ! function_exists( 'happyforms_first_run' ) ):
@@ -20,17 +20,8 @@ function happyforms_deactivate() {
20
 
21
  endif;
22
 
23
- if ( ! function_exists( 'happyforms_uninstall' ) ) :
24
-
25
- function happyforms_uninstall() {
26
- do_action( 'happyforms_uninstall' );
27
- }
28
-
29
- endif;
30
-
31
  register_activation_hook( happyforms_plugin_file(), 'happyforms_activate' );
32
  register_deactivation_hook( happyforms_plugin_file(), 'happyforms_deactivate' );
33
- register_uninstall_hook( happyforms_plugin_file(), 'happyforms_uninstall' );
34
 
35
  /**
36
  *
@@ -200,70 +191,3 @@ function happyforms_create_samples() {
200
  endif;
201
 
202
  add_action( 'happyforms_activate', 'happyforms_create_samples' );
203
-
204
- if ( ! function_exists( 'happyforms_cleanup_on_deactivation' ) ) :
205
-
206
- function happyforms_cleanup_on_deactivation() {
207
- $cleanup_on_deactivation = happyforms_get_deactivation()->cleanup_on_deactivation();
208
-
209
- return apply_filters( 'happyforms_cleanup_on_deactivation', $cleanup_on_deactivation );
210
- }
211
-
212
- endif;
213
-
214
- if ( ! function_exists( 'happyforms_cleanup' ) ) :
215
-
216
- function happyforms_cleanup() {
217
- if ( ! happyforms_cleanup_on_deactivation() ) {
218
- return;
219
- }
220
-
221
- // Forms
222
- $forms = get_posts( array(
223
- 'post_type' => 'happyform',
224
- 'post_status' => array_values( get_post_stati() ),
225
- 'numberposts' => -1,
226
- ) );
227
-
228
- foreach( $forms as $form ) {
229
- wp_delete_post( $form->ID, true );
230
- }
231
-
232
- // General options
233
- delete_option( 'widget_happyforms_widget' );
234
- delete_option( 'happyforms-tracking' );
235
- delete_option( 'ttf_updates_key_happyforms' );
236
-
237
- // User meta
238
- $users = get_users();
239
-
240
- foreach( $users as $user ) {
241
- delete_user_meta( $user->ID, 'happyforms-dismissed-notices' );
242
- delete_transient( 'happyforms_admin_notices_' . md5( $user->user_login ) );
243
- delete_user_meta( $user->ID, 'happyforms-settings-sections-states' );
244
- }
245
-
246
- // Migrations
247
- delete_option( 'happyforms-data-version' );
248
- }
249
-
250
- endif;
251
-
252
- add_action( 'happyforms_deactivate', 'happyforms_cleanup' );
253
-
254
- /**
255
- *
256
- * Late removal of deactivation settings.
257
- * Allows for other code to rely on these settings.
258
- *
259
- */
260
- if ( ! function_exists( 'happyforms_cleanup_deactivation_flag' ) ) :
261
-
262
- function happyforms_cleanup_deactivation_flag() {
263
- // Deactivation
264
- delete_option( '_happyforms_cleanup_on_deactivate' );
265
- }
266
-
267
- endif;
268
-
269
- add_action( 'happyforms_deactivate', 'happyforms_cleanup_deactivation_flag', PHP_INT_MAX );
1
  <?php
2
  /**
3
  *
4
+ * Core activation/deactivation hooks
5
  *
6
  */
7
  if ( ! function_exists( 'happyforms_first_run' ) ):
20
 
21
  endif;
22
 
 
 
 
 
 
 
 
 
23
  register_activation_hook( happyforms_plugin_file(), 'happyforms_activate' );
24
  register_deactivation_hook( happyforms_plugin_file(), 'happyforms_deactivate' );
 
25
 
26
  /**
27
  *
191
  endif;
192
 
193
  add_action( 'happyforms_activate', 'happyforms_create_samples' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
core/templates/parts/customize-checkbox.php CHANGED
@@ -105,7 +105,7 @@
105
  <input type="checkbox" class="checkbox" value="1" <% if ( instance.required ) { %>checked="checked"<% } %> data-bind="required" /> <?php _e( 'Require an answer', 'happyforms' ); ?>
106
  </label>
107
  </p>
108
-
109
  <?php happyforms_customize_part_width_control(); ?>
110
 
111
  <?php do_action( 'happyforms_part_customize_checkbox_after_advanced_options' ); ?>
@@ -132,17 +132,23 @@
132
  <input type="text" class="widefat" name="label" value="<%= label %>">
133
  </label>
134
  <div class="happyforms-part-item-advanced">
135
- <label>
136
- <?php _e( 'Hint', 'happyforms' ); ?>:
137
- <textarea name="description" data-option-attribute="description"><%= description %></textarea>
138
- </label><br>
139
- <label>
140
- <?php _e( 'Max submissions', 'happyforms' ); ?>:
141
- <input type="number" class="widefat" name="limit_submissions_amount" min="0" value="<%= typeof limit_submissions_amount !== 'undefined' ? limit_submissions_amount : '' %>">
142
- </label>
143
- <label>
144
- <input type="checkbox" name="is_default" value="1" <% if (is_default == 1) { %> checked="checked"<% } %>> <?php _e( 'Make this choice default', 'happyforms' ); ?>
145
- </label><br>
 
 
 
 
 
 
146
  </div>
147
  <div class="option-actions">
148
  <a href="#" class="delete-option"><?php _e( 'Delete', 'happyforms' ); ?></a> |
105
  <input type="checkbox" class="checkbox" value="1" <% if ( instance.required ) { %>checked="checked"<% } %> data-bind="required" /> <?php _e( 'Require an answer', 'happyforms' ); ?>
106
  </label>
107
  </p>
108
+
109
  <?php happyforms_customize_part_width_control(); ?>
110
 
111
  <?php do_action( 'happyforms_part_customize_checkbox_after_advanced_options' ); ?>
132
  <input type="text" class="widefat" name="label" value="<%= label %>">
133
  </label>
134
  <div class="happyforms-part-item-advanced">
135
+ <p>
136
+ <label>
137
+ <?php _e( 'Hint', 'happyforms' ); ?>:
138
+ <textarea name="description" data-option-attribute="description"><%= description %></textarea>
139
+ </label>
140
+ </p>
141
+ <p>
142
+ <label>
143
+ <?php _e( 'Max submissions', 'happyforms' ); ?>:
144
+ <input type="number" class="widefat" name="limit_submissions_amount" min="0" value="<%= typeof limit_submissions_amount !== 'undefined' ? limit_submissions_amount : '' %>">
145
+ </label>
146
+ </p>
147
+ <p>
148
+ <label>
149
+ <input type="checkbox" name="is_default" value="1" <% if (is_default == 1) { %> checked="checked"<% } %>> <?php _e( 'Make this choice default', 'happyforms' ); ?>
150
+ </label>
151
+ </p>
152
  </div>
153
  <div class="option-actions">
154
  <a href="#" class="delete-option"><?php _e( 'Delete', 'happyforms' ); ?></a> |
core/templates/parts/customize-radio.php CHANGED
@@ -117,17 +117,23 @@
117
  <input type="text" class="widefat" name="label" value="<%= label %>" data-option-attribute="label">
118
  </label>
119
  <div class="happyforms-part-item-advanced">
120
- <label>
121
- <?php _e( 'Hint', 'happyforms' ); ?>:
122
- <textarea name="description" data-option-attribute="description"><%= description %></textarea>
123
- </label><br>
124
- <label>
125
- <?php _e( 'Max number of submissions', 'happyforms' ); ?>:
126
- <input type="number" class="widefat" name="limit_submissions_amount" min="0" value="<%= typeof limit_submissions_amount !== 'undefined' ? limit_submissions_amount : '' %>">
127
- </label>
128
- <label>
129
- <input type="checkbox" name="is_default" value="1" class="default-option-switch"<% if (is_default == 1) { %> checked="checked"<% } %>> <?php _e( 'Make this choice default', 'happyforms' ); ?>
130
- </label><br>
 
 
 
 
 
 
131
  </div>
132
  <div class="option-actions">
133
  <a href="#" class="delete-option"><?php _e( 'Delete', 'happyforms' ); ?></a> |
117
  <input type="text" class="widefat" name="label" value="<%= label %>" data-option-attribute="label">
118
  </label>
119
  <div class="happyforms-part-item-advanced">
120
+ <p>
121
+ <label>
122
+ <?php _e( 'Hint', 'happyforms' ); ?>:
123
+ <textarea name="description" data-option-attribute="description"><%= description %></textarea>
124
+ </label>
125
+ </p>
126
+ <p>
127
+ <label>
128
+ <?php _e( 'Max number of submissions', 'happyforms' ); ?>:
129
+ <input type="number" class="widefat" name="limit_submissions_amount" min="0" value="<%= typeof limit_submissions_amount !== 'undefined' ? limit_submissions_amount : '' %>">
130
+ </label>
131
+ </p>
132
+ <p>
133
+ <label>
134
+ <input type="checkbox" name="is_default" value="1" class="default-option-switch"<% if (is_default == 1) { %> checked="checked"<% } %>> <?php _e( 'Make this choice default', 'happyforms' ); ?>
135
+ </label>
136
+ </p>
137
  </div>
138
  <div class="option-actions">
139
  <a href="#" class="delete-option"><?php _e( 'Delete', 'happyforms' ); ?></a> |
core/templates/parts/customize-select.php CHANGED
@@ -109,13 +109,17 @@
109
  <input type="text" class="widefat" name="label" value="<%= label %>" data-option-attribute="label">
110
  </label>
111
  <div class="happyforms-part-item-advanced">
112
- <label>
113
- <?php _e( 'Max number of submissions', 'happyforms' ); ?>:
114
- <input type="number" class="widefat" name="limit_submissions_amount" min="0" value="<%= typeof limit_submissions_amount !== 'undefined' ? limit_submissions_amount : '' %>">
115
- </label>
116
- <label>
117
- <input type="checkbox" name="is_default" value="1" class="default-option-switch"<% if (is_default == 1) { %> checked="checked"<% } %>> <?php _e( 'Make this choice default', 'happyforms' ); ?>
118
- </label><br>
 
 
 
 
119
  </div>
120
  <div class="option-actions">
121
  <a href="#" class="delete-option"><?php _e( 'Delete', 'happyforms' ); ?></a> |
109
  <input type="text" class="widefat" name="label" value="<%= label %>" data-option-attribute="label">
110
  </label>
111
  <div class="happyforms-part-item-advanced">
112
+ <p>
113
+ <label>
114
+ <?php _e( 'Max number of submissions', 'happyforms' ); ?>:
115
+ <input type="number" class="widefat" name="limit_submissions_amount" min="0" value="<%= typeof limit_submissions_amount !== 'undefined' ? limit_submissions_amount : '' %>">
116
+ </label>
117
+ </p>
118
+ <p>
119
+ <label>
120
+ <input type="checkbox" name="is_default" value="1" class="default-option-switch"<% if (is_default == 1) { %> checked="checked"<% } %>> <?php _e( 'Make this choice default', 'happyforms' ); ?>
121
+ </label>
122
+ </p>
123
  </div>
124
  <div class="option-actions">
125
  <a href="#" class="delete-option"><?php _e( 'Delete', 'happyforms' ); ?></a> |
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.15.1
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.15.1' );
26
 
27
  if ( ! function_exists( 'happyforms_get_version' ) ):
28
 
@@ -117,14 +117,8 @@ require_once( happyforms_get_core_folder() . '/helpers/helper-activation.php' );
117
  * Core
118
  */
119
  require_once( happyforms_get_core_folder() . '/classes/class-happyforms-core.php' );
120
-
121
  require_once( happyforms_get_include_folder() . '/classes/class-happyforms.php' );
122
 
123
- /**
124
- * Helpers
125
- */
126
- require_once( happyforms_get_include_folder() . '/helpers/helper-activation.php' );
127
-
128
  /**
129
  * Main handler
130
  */
5
  * Plugin URI: https://happyforms.io
6
  * Description: We're changin' WordPress forms.
7
  * Author: Happyforms
8
+ * Version: 1.15.2
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.15.2' );
26
 
27
  if ( ! function_exists( 'happyforms_get_version' ) ):
28
 
117
  * Core
118
  */
119
  require_once( happyforms_get_core_folder() . '/classes/class-happyforms-core.php' );
 
120
  require_once( happyforms_get_include_folder() . '/classes/class-happyforms.php' );
121
 
 
 
 
 
 
122
  /**
123
  * Main handler
124
  */
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' => 'b592a27b6f1ec43f3c768fb654e3b2d2');
1
+ <?php return array('dependencies' => array('wp-components', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '4d5408b850a6efcc5345ba70609ec699');
inc/assets/jsx/build/admin/dashboard-modals.js CHANGED
@@ -118,69 +118,12 @@ __webpack_require__.r(__webpack_exports__);
118
  const {
119
  render
120
  } = wp.element;
121
- /**
122
- *
123
- * Deactivation modal
124
- *
125
- */
126
-
127
- const DeactivateModal = props => {
128
- const [option, setOption] = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["useState"])('yes');
129
-
130
- const onChange = e => {
131
- setOption(e.target.value);
132
- };
133
-
134
- const onSubmit = () => {
135
- $.post(ajaxurl, {
136
- action: settings.deactivateModalAction,
137
- _wpnonce: settings.deactivateModalNonce,
138
- keep_data: option
139
- }, function () {
140
- window.location.href = props.redirectURL;
141
- });
142
- return props.onRequestClose();
143
- };
144
-
145
- return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__["Modal"], {
146
- className: "happyforms-modal happyforms-modal--deactivate",
147
- title: "What about your data?",
148
- onRequestClose: props.onRequestClose
149
- }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])("div", {
150
- className: "happyforms-modal__body",
151
- onChange: onChange
152
- }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])("label", {
153
- htmlFor: "happyforms-keep-data-yes"
154
- }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])("input", {
155
- type: "radio",
156
- id: "happyforms-keep-data-yes",
157
- name: "happyforms-keep-data",
158
- value: "yes",
159
- defaultChecked: true
160
- }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])("span", null, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__["__"])('Keep plugin data (recommended)', 'happyforms'))), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])("label", {
161
- htmlFor: "happyforms-keep-data-no"
162
- }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])("input", {
163
- type: "radio",
164
- id: "happyforms-keep-data-no",
165
- name: "happyforms-keep-data",
166
- value: "no"
167
- }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])("span", null, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__["__"])('Permanently delete plugin data', 'happyforms')))), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])("div", {
168
- className: "happyforms-modal__footer"
169
- }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])("div", {
170
- className: "happyforms-modal__footer-button-group"
171
- }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__["Button"], {
172
- isPrimary: true,
173
- onClick: onSubmit,
174
- text: option == 'yes' ? Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__["__"])('Deactivate Plugin', 'happyforms') : Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__["__"])('Delete Data and Deactivate Plugin', 'happyforms')
175
- }))));
176
- };
177
  /**
178
  *
179
  * Modal wrapper
180
  *
181
  */
182
 
183
-
184
  const ModalProvider = props => {
185
  return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__["SlotFillProvider"], null, props.modal, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__["Popover"].Slot, null));
186
  };
@@ -192,14 +135,6 @@ __webpack_require__.r(__webpack_exports__);
192
  this.area = document.getElementById('happyforms-modals-area');
193
  }
194
 
195
- openDeactivateModal(redirectURL) {
196
- var modal = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(DeactivateModal, {
197
- onRequestClose: this.closeModal.bind(this, 'deactivate'),
198
- redirectURL: redirectURL
199
- });
200
- this.openModal(modal);
201
- }
202
-
203
  openModal(modal) {
204
  render(Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(ModalProvider, {
205
  modal: modal
@@ -380,7 +315,8 @@ function _defineProperty(obj, key, value) {
380
  return obj;
381
  }
382
 
383
- module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports;
 
384
 
385
  /***/ }),
386
 
118
  const {
119
  render
120
  } = wp.element;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
121
  /**
122
  *
123
  * Modal wrapper
124
  *
125
  */
126
 
 
127
  const ModalProvider = props => {
128
  return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__["SlotFillProvider"], null, props.modal, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__["Popover"].Slot, null));
129
  };
135
  this.area = document.getElementById('happyforms-modals-area');
136
  }
137
 
 
 
 
 
 
 
 
 
138
  openModal(modal) {
139
  render(Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(ModalProvider, {
140
  modal: modal
315
  return obj;
316
  }
317
 
318
+ module.exports = _defineProperty;
319
+ module.exports["default"] = module.exports, module.exports.__esModule = true;
320
 
321
  /***/ }),
322
 
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","onEmailChange","onboardingModalAction","onboardingModalNonce","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,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,UAAU,GAAGnC,MAAM,CAACmC,UAAP,IAAqB,EAAtC;AACAnC,QAAM,CAACmC,UAAP,GAAoBA,UAApB;AAEAA,YAAU,CAACC,MAAX,GAAoB,IAAIL,oBAAJ,EAApB;AAEA,CAtID,EAsIKM,MAtIL,EAsIaC,kCAtIb,E;;;;;;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;;AAEA;AACA;;AAEA,+G;;;;;;;;;;;ACfA,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';\r\nimport { useState, useReducer, useRef } from '@wordpress/element';\r\nimport { __, sprintf } from '@wordpress/i18n';\r\n\r\n/**\r\n *\r\n * Modal handler class\r\n *\r\n */\r\nexport default function( $, settings ) {\r\n\r\n\tconst { render } = wp.element;\r\n\r\n\t/**\r\n\t *\r\n\t * Deactivation modal\r\n\t *\r\n\t */\r\n\tconst DeactivateModal = ( props ) => {\r\n\t\tconst [ option, setOption ] = useState( 'yes' );\r\n\r\n\t\tconst onChange = ( e ) => {\r\n\t\t\tsetOption( e.target.value );\r\n\t\t};\r\n\r\n\t\tconst onSubmit = () => {\r\n\t\t\t$.post( ajaxurl, {\r\n\t\t\t\taction: settings.deactivateModalAction,\r\n\t\t\t\t_wpnonce: settings.deactivateModalNonce,\r\n\t\t\t\tkeep_data: option, \r\n\t\t\t}, function() {\r\n\t\t\t\twindow.location.href = props.redirectURL;\r\n\t\t\t} );\r\n\t\t\t\r\n\t\t\treturn props.onRequestClose();\r\n\t\t}\r\n\r\n\t\treturn (\r\n\t\t\t<Modal className=\"happyforms-modal happyforms-modal--deactivate\" title=\"What about your data?\" onRequestClose={ props.onRequestClose }>\r\n\t\t\t\t<div className=\"happyforms-modal__body\" onChange={ onChange }>\r\n\t\t\t\t\t<label htmlFor=\"happyforms-keep-data-yes\">\r\n\t\t\t\t\t\t<input \r\n\t\t\t\t\t\t\ttype=\"radio\"\r\n\t\t\t\t\t\t\tid=\"happyforms-keep-data-yes\"\r\n\t\t\t\t\t\t\tname=\"happyforms-keep-data\" \r\n\t\t\t\t\t\t\tvalue=\"yes\"\r\n\t\t\t\t\t\t\tdefaultChecked\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t<span>{ __( 'Keep plugin data (recommended)', 'happyforms' ) }</span>\r\n\t\t\t\t\t</label>\r\n\t\t\t\t\t<label htmlFor=\"happyforms-keep-data-no\">\r\n\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\ttype=\"radio\"\r\n\t\t\t\t\t\t\tid=\"happyforms-keep-data-no\"\r\n\t\t\t\t\t\t\tname=\"happyforms-keep-data\"\r\n\t\t\t\t\t\t\tvalue=\"no\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t<span>{ __( 'Permanently delete plugin data', 'happyforms' ) }</span>\r\n\t\t\t\t\t</label>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div className=\"happyforms-modal__footer\">\r\n\t\t\t\t\t<div className=\"happyforms-modal__footer-button-group\">\r\n\t\t\t\t\t\t<Button \r\n\t\t\t\t\t\t\tisPrimary={true} \r\n\t\t\t\t\t\t\tonClick={ onSubmit } \r\n\t\t\t\t\t\t\ttext={ option == 'yes' ? \r\n\t\t\t\t\t\t\t\t__( 'Deactivate Plugin', 'happyforms' ) : \r\n\t\t\t\t\t\t\t\t__( 'Delete Data and Deactivate Plugin', 'happyforms' ) }>\r\n\t\t\t\t\t\t</Button>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</Modal>\r\n\t\t);\r\n\t};\r\n\r\n\t/**\r\n\t *\r\n\t * Modal wrapper\r\n\t *\r\n\t */\r\n\tconst ModalProvider = ( props ) => {\r\n\t\treturn (\r\n\t\t\t<SlotFillProvider>\r\n\t\t\t\t{ props.modal }\r\n\t\t\t\t<Popover.Slot />\r\n\t\t\t</SlotFillProvider>\r\n\t\t);\r\n\t};\r\n\t\r\n\treturn class DashboardModals {\r\n\r\n\t\tarea = null;\r\n\t\t\r\n\t\tconstructor() {\r\n\t\t\tthis.area = document.getElementById( 'happyforms-modals-area' );\r\n\t\t}\r\n\r\n\t\topenDeactivateModal( redirectURL ) {\r\n\t\t\tvar modal = <DeactivateModal onRequestClose={ this.closeModal.bind( this, 'deactivate' ) } redirectURL={ redirectURL } />\r\n\r\n\t\t\tthis.openModal( modal );\r\n\t\t}\r\n\r\n\t\topenModal( modal ) {\r\n\t\t\trender( <ModalProvider modal={modal}></ModalProvider>, this.area );\r\n\t\t}\r\n\r\n\t\tcloseModal( modal ) {\r\n\t\t\trender( <></>, this.area );\r\n\r\n\t\t\t$.post( ajaxurl, {\r\n\t\t\t\taction: settings.actionModalDismiss,\r\n\t\t\t\tid: modal, \r\n\t\t\t} );\r\n\t\t}\r\n\r\n\t};\r\n\r\n}","import DashboardModals from '@happyforms/core/jsx/src/admin/dashboard-modals';\r\nimport { SlotFillProvider, Button, Modal, Guide, Popover, Notice, ExternalLink, TextControl, CheckboxControl, BaseControl } from '@wordpress/components';\r\nimport { useState, useReducer, useRef } from '@wordpress/element';\r\nimport { __, sprintf } from '@wordpress/i18n';\r\n\r\n( function( $, settings ) {\r\n\r\n\t/**\r\n\t *\r\n\t * Onboarding modal\r\n\t *\r\n\t */\r\n\tconst OnboardingModal = ( props ) => {\r\n\t\tconst imageURL = `${settings.pluginURL}/inc/assets/img/welcome.gif`;\r\n\t\tconst [ email, setEmail ] = useState( '' );\r\n\r\n\t\tconst onEmailChange = ( e ) => {\r\n\t\t\tsetEmail( e.target.value );\r\n\t\t};\r\n\r\n\t\tconst onRequestClose = () => {\r\n\t\t\t$.post( ajaxurl, {\r\n\t\t\t\taction: settings.onboardingModalAction,\r\n\t\t\t\t_wpnonce: settings.onboardingModalNonce,\r\n\t\t\t\temail: email,\r\n\t\t\t} );\r\n\r\n\t\t\treturn props.onRequestClose();\r\n\t\t}\r\n\r\n\t\treturn(\r\n\t\t\t<Guide\r\n\t\t\t\tonFinish={ onRequestClose }\r\n\t\t\t\tclassName=\"happyforms-modal happyforms-modal--onboarding\"\r\n\t\t\t\tpages={ [\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\timage: (\r\n\t\t\t\t\t\t\t<picture>\r\n\t\t\t\t\t\t\t\t<img src={imageURL} width=\"450\" height=\"276\" />\r\n\t\t\t\t\t\t\t</picture>\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\tcontent: (\r\n\t\t\t\t\t\t\t<>\r\n\t\t\t\t\t\t\t<div className=\"happyforms-modal__header\">\r\n\t\t\t\t\t\t\t\t<h1>{ __( 'Welcome to Happyforms', 'happyforms' ) }</h1>\r\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>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t<div className=\"happyforms-modal__body\">\r\n\t\t\t\t\t\t\t\t<label>{ __( 'Email address', 'happyforms' ) }</label>\r\n\t\t\t\t\t\t\t\t<input type=\"email\" value={ email } onChange={ onEmailChange } autoFocus />\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t<div className=\"happyforms-modal__footer\">\r\n\t\t\t\t\t\t\t\t<BaseControl>\r\n\t\t\t\t\t\t\t\t\t<Button isPrimary={true} onClick={ onRequestClose } text={ __( 'Continue', 'happyforms' ) }></Button>\r\n\t\t\t\t\t\t\t\t</BaseControl>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</>\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t},\r\n\t\t\t\t] }\r\n\t\t\t/>\r\n\t\t);\r\n\t}\r\n\r\n\t/**\r\n\t *\r\n\t * Upgrade modal\r\n\t *\r\n\t */\r\n\tconst UpgradeModal = ( props ) => {\r\n\t\tconst imageURL = `${settings.pluginURL}/inc/assets/img/alrighty.gif`;\r\n\r\n\t\treturn(\r\n\t\t\t<Guide\r\n\t\t\t\tonFinish={ props.onRequestClose }\r\n\t\t\t\tclassName=\"happyforms-modal happyforms-modal--upgrade\"\r\n\t\t\t\tpages={ [\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\timage: (\r\n\t\t\t\t\t\t\t<picture>\r\n\t\t\t\t\t\t\t\t<img src={imageURL} width=\"450\" height=\"276\" />\r\n\t\t\t\t\t\t\t</picture>\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\tcontent: (\r\n\t\t\t\t\t\t\t<>\r\n\t\t\t\t\t\t\t<div className=\"happyforms-modal__header\">\r\n\t\t\t\t\t\t\t\t<h1>{ __( 'Start with a free 7-day trial', 'happyforms' ) }</h1>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t<div className=\"happyforms-modal__body\">\r\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>\r\n\t\t\t\t\t\t\t\t<ul>\r\n\t\t\t\t\t\t\t\t\t<li>{ __( 'Advanced features and integrations', 'happyforms' ) }</li>\r\n\t\t\t\t\t\t\t\t\t<li>{ __( 'Help from the friendliest support team around', 'happyforms' ) }</li>\r\n\t\t\t\t\t\t\t\t\t<li>{ __( 'Automatically transfer over your free forms', 'happyforms' ) }</li>\r\n\t\t\t\t\t\t\t\t\t<li>{ __( 'New goodies released every second week', 'happyforms' ) }</li>\r\n\t\t\t\t\t\t\t\t</ul>\r\n\t\t\t\t\t\t\t\t<p>{ __( 'So whattaya say? Ready to build better forms today?', 'happyforms' ) }</p>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t<div className=\"happyforms-modal__footer\">\r\n\t\t\t\t\t\t\t\t<BaseControl>\r\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>\r\n\t\t\t\t\t\t\t\t\t<Button isSecondary={true} onClick={ props.onRequestClose } text={ __( 'Nope, Maybe Later', 'happyforms' ) }></Button>\r\n\t\t\t\t\t\t\t\t</BaseControl>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</>\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t},\r\n\t\t\t\t] }\r\n\t\t\t/>\r\n\t\t);\r\n\t}\r\n\r\n\tconst DashboardModalsBaseClass = DashboardModals( $, settings );\r\n\r\n\tclass DashboardModalsClass extends DashboardModalsBaseClass {\r\n\r\n\t\topenOnboardingModal() {\r\n\t\t\tvar modal = (\r\n\t\t\t\t<OnboardingModal\r\n\t\t\t\t\tonRequestClose={ this.closeModal.bind( this, 'onboarding' ) }\r\n\t\t\t\t\tstatus={ settings.trackingStatus } />\r\n\t\t\t);\r\n\r\n\t\t\tthis.openModal( modal );\r\n\t\t}\r\n\r\n\t\topenUpgradeModal() {\r\n\t\t\tvar modal = <UpgradeModal onRequestClose={ this.closeModal.bind( this, 'upgrade' ) } />\r\n\r\n\t\t\tthis.openModal( modal );\r\n\t\t}\r\n\r\n\t};\r\n\r\n\tvar happyForms = window.happyForms || {};\r\n\twindow.happyForms = happyForms;\r\n\r\n\thappyForms.modals = new DashboardModalsClass();\r\n\r\n} )( jQuery, _happyFormsDashboardModalsSettings );\r\n","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, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","(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","ModalProvider","props","modal","DashboardModals","constructor","area","document","getElementById","openModal","closeModal","post","ajaxurl","action","actionModalDismiss","id","OnboardingModal","imageURL","pluginURL","email","setEmail","useState","onEmailChange","e","target","value","onRequestClose","onboardingModalAction","_wpnonce","onboardingModalNonce","image","content","__","UpgradeModal","DashboardModalsBaseClass","DashboardModalsClass","openOnboardingModal","bind","trackingStatus","openUpgradeModal","happyForms","window","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/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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 * 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\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\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} );\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</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\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\n\thappyForms.modals = new DashboardModalsClass();\n\n} )( jQuery, _happyFormsDashboardModalsSettings );\n","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/classes/class-happyforms.php CHANGED
@@ -41,9 +41,6 @@ class HappyForms extends HappyForms_Core {
41
  require_once( happyforms_get_include_folder() . '/classes/parts/class-part-attachment-dummy.php' );
42
  $part_library->register_part( 'HappyForms_Part_Attachment_Dummy', 6 );
43
 
44
- require_once( happyforms_get_include_folder() . '/classes/parts/class-part-table-dummy.php' );
45
- $part_library->register_part( 'HappyForms_Part_Table_Dummy', 7 );
46
-
47
  require_once( happyforms_get_include_folder() . '/classes/parts/class-part-poll-dummy.php' );
48
  $part_library->register_part( 'HappyForms_Part_Poll_Dummy', 10 );
49
 
41
  require_once( happyforms_get_include_folder() . '/classes/parts/class-part-attachment-dummy.php' );
42
  $part_library->register_part( 'HappyForms_Part_Attachment_Dummy', 6 );
43
 
 
 
 
44
  require_once( happyforms_get_include_folder() . '/classes/parts/class-part-poll-dummy.php' );
45
  $part_library->register_part( 'HappyForms_Part_Poll_Dummy', 10 );
46
 
inc/classes/parts/class-part-attachment-dummy.php CHANGED
@@ -6,7 +6,7 @@ class HappyForms_Part_Attachment_Dummy extends HappyForms_Form_Part {
6
 
7
  public function __construct() {
8
  $this->label = __( 'File Upload', 'happyforms' );
9
- $this->description = __( 'For allowing file uploads with easy drag and drop zone.', 'happyforms' );
10
  }
11
 
12
  }
6
 
7
  public function __construct() {
8
  $this->label = __( 'File Upload', 'happyforms' );
9
+ $this->description = __( 'For allowing files to be uploaded with specific requirements.', 'happyforms' );
10
  }
11
 
12
  }
inc/classes/parts/class-part-table-dummy.php DELETED
@@ -1,12 +0,0 @@
1
- <?php
2
-
3
- class HappyForms_Part_Table_Dummy extends HappyForms_Form_Part {
4
-
5
- public $type = 'table_dummy';
6
-
7
- public function __construct() {
8
- $this->label = __( 'Matrix', 'happyforms' );
9
- $this->description = __( 'For radios and checkboxes displaying in a grid of rows and columns.', 'happyforms' );
10
- }
11
-
12
- }
 
 
 
 
 
 
 
 
 
 
 
 
inc/helpers/helper-activation.php DELETED
@@ -1,14 +0,0 @@
1
- <?php
2
-
3
- function happyforms_free_cleanup() {
4
- if ( ! happyforms_cleanup_on_deactivation() ) {
5
- return;
6
- }
7
-
8
- delete_transient( 'happyforms_review_notice_recommend' );
9
- delete_option( 'happyforms_modal_dismissed_onboarding' );
10
- delete_option( 'happyforms_show_powered_by' );
11
- delete_option( '_happyforms_received_submissions' );
12
- }
13
-
14
- add_action( 'happyforms_deactivate', 'happyforms_free_cleanup' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
languages/happyforms.pot CHANGED
@@ -2,16 +2,16 @@
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.15.1\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: 2022-04-25T07:12:32+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
- "X-Generator: WP-CLI 2.5.0\n"
15
  "X-Domain: happyforms\n"
16
 
17
  #. Plugin Name of the plugin
@@ -129,7 +129,6 @@ msgstr ""
129
 
130
  #: core/classes/class-form-controller.php:82
131
  #: core/assets/jsx/build/admin/block.js:144
132
- #: core/assets/jsx/src/admin/block.js:32
133
  msgid "No forms found."
134
  msgstr ""
135
 
@@ -169,7 +168,7 @@ msgid "Email me a copy of each submission"
169
  msgstr ""
170
 
171
  #: core/classes/class-form-email.php:96
172
- #: inc/assets/jsx/build/admin/dashboard-modals.js:280
173
  #: inc/assets/jsx/src/admin/dashboard-modals.js:49
174
  msgid "Email address"
175
  msgstr ""
@@ -403,7 +402,7 @@ msgid "Submit form"
403
  msgstr ""
404
 
405
  #: core/classes/class-form-shuffle.php:43
406
- #: inc/classes/class-happyforms.php:112
407
  msgid "Shuffle order of fields"
408
  msgstr ""
409
 
@@ -717,12 +716,12 @@ msgstr ""
717
 
718
  #: core/classes/class-form-styles.php:731
719
  #: core/templates/parts/customize-checkbox.php:20
720
- #: core/templates/parts/customize-checkbox.php:136
721
  #: core/templates/parts/customize-email.php:28
722
  #: core/templates/parts/customize-multi-line-text.php:28
723
  #: core/templates/parts/customize-number.php:28
724
  #: core/templates/parts/customize-radio.php:20
725
- #: core/templates/parts/customize-radio.php:121
726
  #: core/templates/parts/customize-select.php:24
727
  #: core/templates/parts/customize-single-line-text.php:28
728
  msgid "Hint"
@@ -843,7 +842,6 @@ msgstr ""
843
  #: core/classes/class-happyforms-core.php:227
844
  #: core/classes/class-happyforms-core.php:228
845
  #: core/assets/jsx/build/admin/block.js:173
846
- #: core/assets/jsx/src/admin/block.js:61
847
  msgid "Settings"
848
  msgstr ""
849
 
@@ -966,107 +964,107 @@ msgstr ""
966
  msgid "For single line text fields."
967
  msgstr ""
968
 
969
- #: core/helpers/helper-activation.php:73
970
  msgid "Sample Form"
971
  msgstr ""
972
 
973
- #: core/helpers/helper-activation.php:74
974
  msgid "Get in touch"
975
  msgstr ""
976
 
977
- #: core/helpers/helper-activation.php:79
978
  msgid "Full name"
979
  msgstr ""
980
 
981
- #: core/helpers/helper-activation.php:83
982
  msgid "Work email"
983
  msgstr ""
984
 
985
- #: core/helpers/helper-activation.php:88
986
  msgid "Job title"
987
  msgstr ""
988
 
989
- #: core/helpers/helper-activation.php:94
990
  msgid "Company name"
991
  msgstr ""
992
 
993
- #: core/helpers/helper-activation.php:99
994
  msgid "Industry"
995
  msgstr ""
996
 
997
- #: core/helpers/helper-activation.php:101
998
  msgid "Choose from this list"
999
  msgstr ""
1000
 
1001
- #: core/helpers/helper-activation.php:104
1002
  msgid "Agriculture, animals and food"
1003
  msgstr ""
1004
 
1005
- #: core/helpers/helper-activation.php:107
1006
  msgid "Science, environment and construction"
1007
  msgstr ""
1008
 
1009
- #: core/helpers/helper-activation.php:110
1010
  msgid "Healthcare, wellbeing and sport"
1011
  msgstr ""
1012
 
1013
- #: core/helpers/helper-activation.php:113
1014
  msgid "Creative arts, fashion and media"
1015
  msgstr ""
1016
 
1017
- #: core/helpers/helper-activation.php:116
1018
  msgid "Government, law and education"
1019
  msgstr ""
1020
 
1021
- #: core/helpers/helper-activation.php:119
1022
  msgid "Accountancy, finance and insurance"
1023
  msgstr ""
1024
 
1025
- #: core/helpers/helper-activation.php:122
1026
  msgid "Business, sales and tourism"
1027
  msgstr ""
1028
 
1029
- #: core/helpers/helper-activation.php:125
1030
  msgid "Charity, social work and religion"
1031
  msgstr ""
1032
 
1033
- #: core/helpers/helper-activation.php:128
1034
  msgid "Something else"
1035
  msgstr ""
1036
 
1037
- #: core/helpers/helper-activation.php:134
1038
  msgid "Tell us about your project"
1039
  msgstr ""
1040
 
1041
- #: core/helpers/helper-activation.php:139
1042
  msgid "How might you describe your company size?"
1043
  msgstr ""
1044
 
1045
- #: core/helpers/helper-activation.php:142
1046
  msgid "It's just me"
1047
  msgstr ""
1048
 
1049
- #: core/helpers/helper-activation.php:145
1050
  msgid "There's two of us"
1051
  msgstr ""
1052
 
1053
- #: core/helpers/helper-activation.php:148
1054
  msgid "We're a small group"
1055
  msgstr ""
1056
 
1057
- #: core/helpers/helper-activation.php:151
1058
  msgid "We're a big team"
1059
  msgstr ""
1060
 
1061
- #: core/helpers/helper-activation.php:157
1062
  msgid "How did you hear about us?"
1063
  msgstr ""
1064
 
1065
- #: core/helpers/helper-activation.php:162
1066
  msgid "Privacy compliance"
1067
  msgstr ""
1068
 
1069
- #: core/helpers/helper-activation.php:166
1070
  msgid "I agree to the storage and handling of my data by this website"
1071
  msgstr ""
1072
 
@@ -2989,7 +2987,6 @@ msgstr ""
2989
 
2990
  #: core/templates/admin-form-modal.php:12
2991
  #: core/assets/jsx/build/admin/block.js:158
2992
- #: core/assets/jsx/src/admin/block.js:41
2993
  msgid "Insert"
2994
  msgstr ""
2995
 
@@ -3046,12 +3043,12 @@ msgstr ""
3046
 
3047
  #: core/templates/customize-form-item.php:33
3048
  #: core/templates/customize-form-part-footer.php:3
3049
- #: core/templates/parts/customize-checkbox.php:148
3050
- #: core/templates/parts/customize-checkbox.php:163
3051
- #: core/templates/parts/customize-radio.php:133
3052
- #: core/templates/parts/customize-radio.php:148
3053
- #: core/templates/parts/customize-select.php:121
3054
- #: core/templates/parts/customize-select.php:136
3055
  msgid "Delete"
3056
  msgstr ""
3057
 
@@ -3252,25 +3249,25 @@ msgstr ""
3252
  msgid "Additional CSS class(es)"
3253
  msgstr ""
3254
 
3255
- #: core/templates/parts/customize-checkbox.php:140
3256
  msgid "Max submissions"
3257
  msgstr ""
3258
 
3259
- #: core/templates/parts/customize-checkbox.php:144
3260
- #: core/templates/parts/customize-radio.php:129
3261
- #: core/templates/parts/customize-select.php:117
3262
  msgid "Make this choice default"
3263
  msgstr ""
3264
 
3265
- #: core/templates/parts/customize-checkbox.php:149
3266
- #: core/templates/parts/customize-radio.php:134
3267
- #: core/templates/parts/customize-select.php:122
3268
  msgid "More"
3269
  msgstr ""
3270
 
3271
- #: core/templates/parts/customize-checkbox.php:159
3272
- #: core/templates/parts/customize-radio.php:144
3273
- #: core/templates/parts/customize-select.php:132
3274
  #: inc/classes/parts/class-part-layout-title-dummy.php:8
3275
  msgid "Heading"
3276
  msgstr ""
@@ -3330,8 +3327,8 @@ msgstr ""
3330
  msgid "Decimal"
3331
  msgstr ""
3332
 
3333
- #: core/templates/parts/customize-radio.php:125
3334
- #: core/templates/parts/customize-select.php:113
3335
  msgid "Max number of submissions"
3336
  msgstr ""
3337
 
@@ -3343,55 +3340,55 @@ msgstr ""
3343
  msgid "Max times the same answer is allowed"
3344
  msgstr ""
3345
 
3346
- #: inc/classes/class-happyforms.php:104
3347
  msgid "Upgrade"
3348
  msgstr ""
3349
 
3350
- #: inc/classes/class-happyforms.php:118
3351
  msgid "Use reCAPTCHA"
3352
  msgstr ""
3353
 
3354
- #: inc/classes/class-happyforms.php:124
3355
  msgid "Save incomplete and abandoned submissions"
3356
  msgstr ""
3357
 
3358
- #: inc/classes/class-happyforms.php:130
3359
  msgid "Let respondents save a draft submission and come back to it later"
3360
  msgstr ""
3361
 
3362
- #: inc/classes/class-happyforms.php:136
3363
  msgid "Require respondents to review a submission before submitting"
3364
  msgstr ""
3365
 
3366
- #: inc/classes/class-happyforms.php:142
3367
  msgid "Limit submissions"
3368
  msgstr ""
3369
 
3370
- #: inc/classes/class-happyforms.php:148
3371
  msgid "Delete permanently replies and attachments after set number of days"
3372
  msgstr ""
3373
 
3374
- #: inc/classes/class-happyforms.php:154
3375
  msgid "Capture user metadata (IP, language, platform, time and timezone)"
3376
  msgstr ""
3377
 
3378
- #: inc/classes/class-happyforms.php:160
3379
  msgid "Show an error message if field contains words in Disallowed Comment Keys"
3380
  msgstr ""
3381
 
3382
- #: inc/classes/class-happyforms.php:170
3383
  msgid "Include reply link"
3384
  msgstr ""
3385
 
3386
- #: inc/classes/class-happyforms.php:176
3387
  msgid "Include referral web address"
3388
  msgstr ""
3389
 
3390
- #: inc/classes/class-happyforms.php:182
3391
  msgid "To email address"
3392
  msgstr ""
3393
 
3394
- #: inc/classes/class-happyforms.php:188
3395
  msgid "Send abandonment email"
3396
  msgstr ""
3397
 
@@ -3445,7 +3442,7 @@ msgid "File Upload"
3445
  msgstr ""
3446
 
3447
  #: inc/classes/parts/class-part-attachment-dummy.php:9
3448
- msgid "For allowing file uploads with easy drag and drop zone."
3449
  msgstr ""
3450
 
3451
  #: inc/classes/parts/class-part-date-dummy.php:8
@@ -3568,14 +3565,6 @@ msgstr ""
3568
  msgid "For requiring a signature before accepting submission."
3569
  msgstr ""
3570
 
3571
- #: inc/classes/parts/class-part-table-dummy.php:8
3572
- msgid "Matrix"
3573
- msgstr ""
3574
-
3575
- #: inc/classes/parts/class-part-table-dummy.php:9
3576
- msgid "For radios and checkboxes displaying in a grid of rows and columns."
3577
- msgstr ""
3578
-
3579
  #: inc/classes/parts/class-part-title-dummy.php:9
3580
  msgid "For displaying personal honorifics."
3581
  msgstr ""
@@ -3830,97 +3819,77 @@ msgid "Publishable key"
3830
  msgstr ""
3831
 
3832
  #: core/assets/jsx/build/admin/block.js:127
3833
- #: core/assets/jsx/src/admin/block.js:15
3834
  msgid "Choose"
3835
  msgstr ""
3836
 
3837
  #: core/assets/jsx/build/admin/block.js:144
3838
- #: core/assets/jsx/src/admin/block.js:27
3839
  msgid "The form previously added has been trashed or deleted."
3840
  msgstr ""
3841
 
3842
  #: core/assets/jsx/build/admin/block.js:144
3843
- #: core/assets/jsx/src/admin/block.js:31
3844
  msgid "Pick a form to display on your site."
3845
  msgstr ""
3846
 
3847
  #: core/assets/jsx/build/admin/block.js:175
3848
- #: core/assets/jsx/src/admin/block.js:63
3849
  msgid "Pick a form"
3850
  msgstr ""
3851
 
3852
- #: inc/assets/jsx/build/admin/dashboard-modals.js:160
3853
- msgid "Keep plugin data (recommended)"
3854
- msgstr ""
3855
-
3856
- #: inc/assets/jsx/build/admin/dashboard-modals.js:167
3857
- msgid "Permanently delete plugin data"
3858
- msgstr ""
3859
-
3860
- #: inc/assets/jsx/build/admin/dashboard-modals.js:174
3861
- msgid "Deactivate Plugin"
3862
- msgstr ""
3863
-
3864
- #: inc/assets/jsx/build/admin/dashboard-modals.js:174
3865
- msgid "Delete Data and Deactivate Plugin"
3866
- msgstr ""
3867
-
3868
- #: inc/assets/jsx/build/admin/dashboard-modals.js:278
3869
  #: inc/assets/jsx/src/admin/dashboard-modals.js:45
3870
  msgid "Welcome to Happyforms"
3871
  msgstr ""
3872
 
3873
- #: inc/assets/jsx/build/admin/dashboard-modals.js:278
3874
  #: inc/assets/jsx/src/admin/dashboard-modals.js:46
3875
  msgid "We'll send you a few emails each month about plugin updates. And don't sweat it, you can unsubscribe anytime."
3876
  msgstr ""
3877
 
3878
- #: inc/assets/jsx/build/admin/dashboard-modals.js:290
3879
  #: inc/assets/jsx/src/admin/dashboard-modals.js:54
3880
  msgid "Continue"
3881
  msgstr ""
3882
 
3883
- #: inc/assets/jsx/build/admin/dashboard-modals.js:315
3884
  #: inc/assets/jsx/src/admin/dashboard-modals.js:87
3885
  msgid "Start with a free 7-day trial"
3886
  msgstr ""
3887
 
3888
- #: inc/assets/jsx/build/admin/dashboard-modals.js:317
3889
  #: inc/assets/jsx/src/admin/dashboard-modals.js:90
3890
  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."
3891
  msgstr ""
3892
 
3893
- #: inc/assets/jsx/build/admin/dashboard-modals.js:317
3894
  #: inc/assets/jsx/src/admin/dashboard-modals.js:92
3895
  msgid "Advanced features and integrations"
3896
  msgstr ""
3897
 
3898
- #: inc/assets/jsx/build/admin/dashboard-modals.js:317
3899
  #: inc/assets/jsx/src/admin/dashboard-modals.js:93
3900
  msgid "Help from the friendliest support team around"
3901
  msgstr ""
3902
 
3903
- #: inc/assets/jsx/build/admin/dashboard-modals.js:317
3904
  #: inc/assets/jsx/src/admin/dashboard-modals.js:94
3905
  msgid "Automatically transfer over your free forms"
3906
  msgstr ""
3907
 
3908
- #: inc/assets/jsx/build/admin/dashboard-modals.js:317
3909
  #: inc/assets/jsx/src/admin/dashboard-modals.js:95
3910
  msgid "New goodies released every second week"
3911
  msgstr ""
3912
 
3913
- #: inc/assets/jsx/build/admin/dashboard-modals.js:317
3914
  #: inc/assets/jsx/src/admin/dashboard-modals.js:97
3915
  msgid "So whattaya say? Ready to build better forms today?"
3916
  msgstr ""
3917
 
3918
- #: inc/assets/jsx/build/admin/dashboard-modals.js:323
3919
  #: inc/assets/jsx/src/admin/dashboard-modals.js:101
3920
  msgid "Start a Free 7-day Trial"
3921
  msgstr ""
3922
 
3923
- #: inc/assets/jsx/build/admin/dashboard-modals.js:327
3924
  #: inc/assets/jsx/src/admin/dashboard-modals.js:102
3925
  msgid "Nope, Maybe Later"
3926
  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.15.2\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: 2022-05-10T11:51:07+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"
16
 
17
  #. Plugin Name of the plugin
129
 
130
  #: core/classes/class-form-controller.php:82
131
  #: core/assets/jsx/build/admin/block.js:144
 
132
  msgid "No forms found."
133
  msgstr ""
134
 
168
  msgstr ""
169
 
170
  #: core/classes/class-form-email.php:96
171
+ #: inc/assets/jsx/build/admin/dashboard-modals.js:215
172
  #: inc/assets/jsx/src/admin/dashboard-modals.js:49
173
  msgid "Email address"
174
  msgstr ""
402
  msgstr ""
403
 
404
  #: core/classes/class-form-shuffle.php:43
405
+ #: inc/classes/class-happyforms.php:109
406
  msgid "Shuffle order of fields"
407
  msgstr ""
408
 
716
 
717
  #: core/classes/class-form-styles.php:731
718
  #: core/templates/parts/customize-checkbox.php:20
719
+ #: core/templates/parts/customize-checkbox.php:137
720
  #: core/templates/parts/customize-email.php:28
721
  #: core/templates/parts/customize-multi-line-text.php:28
722
  #: core/templates/parts/customize-number.php:28
723
  #: core/templates/parts/customize-radio.php:20
724
+ #: core/templates/parts/customize-radio.php:122
725
  #: core/templates/parts/customize-select.php:24
726
  #: core/templates/parts/customize-single-line-text.php:28
727
  msgid "Hint"
842
  #: core/classes/class-happyforms-core.php:227
843
  #: core/classes/class-happyforms-core.php:228
844
  #: core/assets/jsx/build/admin/block.js:173
 
845
  msgid "Settings"
846
  msgstr ""
847
 
964
  msgid "For single line text fields."
965
  msgstr ""
966
 
967
+ #: core/helpers/helper-activation.php:64
968
  msgid "Sample Form"
969
  msgstr ""
970
 
971
+ #: core/helpers/helper-activation.php:65
972
  msgid "Get in touch"
973
  msgstr ""
974
 
975
+ #: core/helpers/helper-activation.php:70
976
  msgid "Full name"
977
  msgstr ""
978
 
979
+ #: core/helpers/helper-activation.php:74
980
  msgid "Work email"
981
  msgstr ""
982
 
983
+ #: core/helpers/helper-activation.php:79
984
  msgid "Job title"
985
  msgstr ""
986
 
987
+ #: core/helpers/helper-activation.php:85
988
  msgid "Company name"
989
  msgstr ""
990
 
991
+ #: core/helpers/helper-activation.php:90
992
  msgid "Industry"
993
  msgstr ""
994
 
995
+ #: core/helpers/helper-activation.php:92
996
  msgid "Choose from this list"
997
  msgstr ""
998
 
999
+ #: core/helpers/helper-activation.php:95
1000
  msgid "Agriculture, animals and food"
1001
  msgstr ""
1002
 
1003
+ #: core/helpers/helper-activation.php:98
1004
  msgid "Science, environment and construction"
1005
  msgstr ""
1006
 
1007
+ #: core/helpers/helper-activation.php:101
1008
  msgid "Healthcare, wellbeing and sport"
1009
  msgstr ""
1010
 
1011
+ #: core/helpers/helper-activation.php:104
1012
  msgid "Creative arts, fashion and media"
1013
  msgstr ""
1014
 
1015
+ #: core/helpers/helper-activation.php:107
1016
  msgid "Government, law and education"
1017
  msgstr ""
1018
 
1019
+ #: core/helpers/helper-activation.php:110
1020
  msgid "Accountancy, finance and insurance"
1021
  msgstr ""
1022
 
1023
+ #: core/helpers/helper-activation.php:113
1024
  msgid "Business, sales and tourism"
1025
  msgstr ""
1026
 
1027
+ #: core/helpers/helper-activation.php:116
1028
  msgid "Charity, social work and religion"
1029
  msgstr ""
1030
 
1031
+ #: core/helpers/helper-activation.php:119
1032
  msgid "Something else"
1033
  msgstr ""
1034
 
1035
+ #: core/helpers/helper-activation.php:125
1036
  msgid "Tell us about your project"
1037
  msgstr ""
1038
 
1039
+ #: core/helpers/helper-activation.php:130
1040
  msgid "How might you describe your company size?"
1041
  msgstr ""
1042
 
1043
+ #: core/helpers/helper-activation.php:133
1044
  msgid "It's just me"
1045
  msgstr ""
1046
 
1047
+ #: core/helpers/helper-activation.php:136
1048
  msgid "There's two of us"
1049
  msgstr ""
1050
 
1051
+ #: core/helpers/helper-activation.php:139
1052
  msgid "We're a small group"
1053
  msgstr ""
1054
 
1055
+ #: core/helpers/helper-activation.php:142
1056
  msgid "We're a big team"
1057
  msgstr ""
1058
 
1059
+ #: core/helpers/helper-activation.php:148
1060
  msgid "How did you hear about us?"
1061
  msgstr ""
1062
 
1063
+ #: core/helpers/helper-activation.php:153
1064
  msgid "Privacy compliance"
1065
  msgstr ""
1066
 
1067
+ #: core/helpers/helper-activation.php:157
1068
  msgid "I agree to the storage and handling of my data by this website"
1069
  msgstr ""
1070
 
2987
 
2988
  #: core/templates/admin-form-modal.php:12
2989
  #: core/assets/jsx/build/admin/block.js:158
 
2990
  msgid "Insert"
2991
  msgstr ""
2992
 
3043
 
3044
  #: core/templates/customize-form-item.php:33
3045
  #: core/templates/customize-form-part-footer.php:3
3046
+ #: core/templates/parts/customize-checkbox.php:154
3047
+ #: core/templates/parts/customize-checkbox.php:169
3048
+ #: core/templates/parts/customize-radio.php:139
3049
+ #: core/templates/parts/customize-radio.php:154
3050
+ #: core/templates/parts/customize-select.php:125
3051
+ #: core/templates/parts/customize-select.php:140
3052
  msgid "Delete"
3053
  msgstr ""
3054
 
3249
  msgid "Additional CSS class(es)"
3250
  msgstr ""
3251
 
3252
+ #: core/templates/parts/customize-checkbox.php:143
3253
  msgid "Max submissions"
3254
  msgstr ""
3255
 
3256
+ #: core/templates/parts/customize-checkbox.php:149
3257
+ #: core/templates/parts/customize-radio.php:134
3258
+ #: core/templates/parts/customize-select.php:120
3259
  msgid "Make this choice default"
3260
  msgstr ""
3261
 
3262
+ #: core/templates/parts/customize-checkbox.php:155
3263
+ #: core/templates/parts/customize-radio.php:140
3264
+ #: core/templates/parts/customize-select.php:126
3265
  msgid "More"
3266
  msgstr ""
3267
 
3268
+ #: core/templates/parts/customize-checkbox.php:165
3269
+ #: core/templates/parts/customize-radio.php:150
3270
+ #: core/templates/parts/customize-select.php:136
3271
  #: inc/classes/parts/class-part-layout-title-dummy.php:8
3272
  msgid "Heading"
3273
  msgstr ""
3327
  msgid "Decimal"
3328
  msgstr ""
3329
 
3330
+ #: core/templates/parts/customize-radio.php:128
3331
+ #: core/templates/parts/customize-select.php:114
3332
  msgid "Max number of submissions"
3333
  msgstr ""
3334
 
3340
  msgid "Max times the same answer is allowed"
3341
  msgstr ""
3342
 
3343
+ #: inc/classes/class-happyforms.php:101
3344
  msgid "Upgrade"
3345
  msgstr ""
3346
 
3347
+ #: inc/classes/class-happyforms.php:115
3348
  msgid "Use reCAPTCHA"
3349
  msgstr ""
3350
 
3351
+ #: inc/classes/class-happyforms.php:121
3352
  msgid "Save incomplete and abandoned submissions"
3353
  msgstr ""
3354
 
3355
+ #: inc/classes/class-happyforms.php:127
3356
  msgid "Let respondents save a draft submission and come back to it later"
3357
  msgstr ""
3358
 
3359
+ #: inc/classes/class-happyforms.php:133
3360
  msgid "Require respondents to review a submission before submitting"
3361
  msgstr ""
3362
 
3363
+ #: inc/classes/class-happyforms.php:139
3364
  msgid "Limit submissions"
3365
  msgstr ""
3366
 
3367
+ #: inc/classes/class-happyforms.php:145
3368
  msgid "Delete permanently replies and attachments after set number of days"
3369
  msgstr ""
3370
 
3371
+ #: inc/classes/class-happyforms.php:151
3372
  msgid "Capture user metadata (IP, language, platform, time and timezone)"
3373
  msgstr ""
3374
 
3375
+ #: inc/classes/class-happyforms.php:157
3376
  msgid "Show an error message if field contains words in Disallowed Comment Keys"
3377
  msgstr ""
3378
 
3379
+ #: inc/classes/class-happyforms.php:167
3380
  msgid "Include reply link"
3381
  msgstr ""
3382
 
3383
+ #: inc/classes/class-happyforms.php:173
3384
  msgid "Include referral web address"
3385
  msgstr ""
3386
 
3387
+ #: inc/classes/class-happyforms.php:179
3388
  msgid "To email address"
3389
  msgstr ""
3390
 
3391
+ #: inc/classes/class-happyforms.php:185
3392
  msgid "Send abandonment email"
3393
  msgstr ""
3394
 
3442
  msgstr ""
3443
 
3444
  #: inc/classes/parts/class-part-attachment-dummy.php:9
3445
+ msgid "For allowing files to be uploaded with specific requirements."
3446
  msgstr ""
3447
 
3448
  #: inc/classes/parts/class-part-date-dummy.php:8
3565
  msgid "For requiring a signature before accepting submission."
3566
  msgstr ""
3567
 
 
 
 
 
 
 
 
 
3568
  #: inc/classes/parts/class-part-title-dummy.php:9
3569
  msgid "For displaying personal honorifics."
3570
  msgstr ""
3819
  msgstr ""
3820
 
3821
  #: core/assets/jsx/build/admin/block.js:127
 
3822
  msgid "Choose"
3823
  msgstr ""
3824
 
3825
  #: core/assets/jsx/build/admin/block.js:144
 
3826
  msgid "The form previously added has been trashed or deleted."
3827
  msgstr ""
3828
 
3829
  #: core/assets/jsx/build/admin/block.js:144
 
3830
  msgid "Pick a form to display on your site."
3831
  msgstr ""
3832
 
3833
  #: core/assets/jsx/build/admin/block.js:175
 
3834
  msgid "Pick a form"
3835
  msgstr ""
3836
 
3837
+ #: inc/assets/jsx/build/admin/dashboard-modals.js:213
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3838
  #: inc/assets/jsx/src/admin/dashboard-modals.js:45
3839
  msgid "Welcome to Happyforms"
3840
  msgstr ""
3841
 
3842
+ #: inc/assets/jsx/build/admin/dashboard-modals.js:213
3843
  #: inc/assets/jsx/src/admin/dashboard-modals.js:46
3844
  msgid "We'll send you a few emails each month about plugin updates. And don't sweat it, you can unsubscribe anytime."
3845
  msgstr ""
3846
 
3847
+ #: inc/assets/jsx/build/admin/dashboard-modals.js:225
3848
  #: inc/assets/jsx/src/admin/dashboard-modals.js:54
3849
  msgid "Continue"
3850
  msgstr ""
3851
 
3852
+ #: inc/assets/jsx/build/admin/dashboard-modals.js:250
3853
  #: inc/assets/jsx/src/admin/dashboard-modals.js:87
3854
  msgid "Start with a free 7-day trial"
3855
  msgstr ""
3856
 
3857
+ #: inc/assets/jsx/build/admin/dashboard-modals.js:252
3858
  #: inc/assets/jsx/src/admin/dashboard-modals.js:90
3859
  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."
3860
  msgstr ""
3861
 
3862
+ #: inc/assets/jsx/build/admin/dashboard-modals.js:252
3863
  #: inc/assets/jsx/src/admin/dashboard-modals.js:92
3864
  msgid "Advanced features and integrations"
3865
  msgstr ""
3866
 
3867
+ #: inc/assets/jsx/build/admin/dashboard-modals.js:252
3868
  #: inc/assets/jsx/src/admin/dashboard-modals.js:93
3869
  msgid "Help from the friendliest support team around"
3870
  msgstr ""
3871
 
3872
+ #: inc/assets/jsx/build/admin/dashboard-modals.js:252
3873
  #: inc/assets/jsx/src/admin/dashboard-modals.js:94
3874
  msgid "Automatically transfer over your free forms"
3875
  msgstr ""
3876
 
3877
+ #: inc/assets/jsx/build/admin/dashboard-modals.js:252
3878
  #: inc/assets/jsx/src/admin/dashboard-modals.js:95
3879
  msgid "New goodies released every second week"
3880
  msgstr ""
3881
 
3882
+ #: inc/assets/jsx/build/admin/dashboard-modals.js:252
3883
  #: inc/assets/jsx/src/admin/dashboard-modals.js:97
3884
  msgid "So whattaya say? Ready to build better forms today?"
3885
  msgstr ""
3886
 
3887
+ #: inc/assets/jsx/build/admin/dashboard-modals.js:258
3888
  #: inc/assets/jsx/src/admin/dashboard-modals.js:101
3889
  msgid "Start a Free 7-day Trial"
3890
  msgstr ""
3891
 
3892
+ #: inc/assets/jsx/build/admin/dashboard-modals.js:262
3893
  #: inc/assets/jsx/src/admin/dashboard-modals.js:102
3894
  msgid "Nope, Maybe Later"
3895
  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.9.3
7
  Requires PHP: 7.0
8
- Stable tag: 1.15.1
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -129,7 +129,7 @@ Note: you'll need to upgrade to our paid contact form builder plugin to get some
129
 
130
  = What types of forms can I build? =
131
 
132
- Just about anything. A contact form, intake form, registration form, survey form, quiz form, payment form, newsletter form, giveaway form, fundraising form, donation form, nomination form, order form, questionnaire form, onboarding form, contract form, estimate form, research form, qualitative form, quantitative form, membership form, mobile form, feedback form, release form, inquiry form, request form, evaluation form, RSVP form, reservation form, sales lead form, popup form, quote form, event form, booking form, application form, agreement form, safety form, pdf form, compliance form, assessment form, sponsorship form, report form, file upload form, satisfaction form, volunteer registration form, personality quiz form, calculator form — you name it.
133
 
134
  Note: you'll need to upgrade to our paid contact form builder plugin to get some of the best goodies mentioned here.
135
 
@@ -151,6 +151,11 @@ Aw, honestly, the thought that you're writing about our contact form builder is
151
 
152
  == Changelog ==
153
 
 
 
 
 
 
154
  = 1.15.1 =
155
  * New feature: Checksum-based verification system against repeated spam submissions.
156
  * New feature: Added "Headings" for Radio, Checkbox, and Dropdown field choices.
@@ -933,6 +938,9 @@ Aw, honestly, the thought that you're writing about our contact form builder is
933
 
934
  == Upgrade Notice ==
935
 
 
 
 
936
  = 1.15.1 =
937
  * New checksum-based verification system against spam, headings for choice-based fields, miscellaneous improvements and bugfixes
938
 
5
  Requires at least: 5.0
6
  Tested up to: 5.9.3
7
  Requires PHP: 7.0
8
+ Stable tag: 1.15.2
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
129
 
130
  = What types of forms can I build? =
131
 
132
+ Just about anything. A contact form, intake form, registration form, survey form, quiz form, payment form, newsletter form, giveaway form, fundraising form, donation form, nomination form, order form, questionnaire form, onboarding form, contract form, estimate form, research form, qualitative form, quantitative form, membership form, mobile form, feedback form, release form, inquiry form, request form, evaluation form, RSVP form, reservation form, sales lead form, popup form, quote form, event form, booking form, application form, agreement form, safety form, compliance form, assessment form, sponsorship form, report form, file upload form, satisfaction form, volunteer registration form, personality quiz form, calculator form — you name it.
133
 
134
  Note: you'll need to upgrade to our paid contact form builder plugin to get some of the best goodies mentioned here.
135
 
151
 
152
  == Changelog ==
153
 
154
+ = 1.15.2 =
155
+ * New feature: "Screen Options" tab now includes "View mode" for better consistency with core WordPress.
156
+ * Improvement: Installation data is now deleted automatically on plugin removal for easier deactivation.
157
+ * Improvement: Better linear spacing for all choice-based field controls.
158
+
159
  = 1.15.1 =
160
  * New feature: Checksum-based verification system against repeated spam submissions.
161
  * New feature: Added "Headings" for Radio, Checkbox, and Dropdown field choices.
938
 
939
  == Upgrade Notice ==
940
 
941
+ = 1.15.2 =
942
+ * New "View Mode" control in "Screen Options" tab, automatic cleanup on plugin removal, visual improvements.
943
+
944
  = 1.15.1 =
945
  * New checksum-based verification system against spam, headings for choice-based fields, miscellaneous improvements and bugfixes
946
 
uninstall.php ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
4
+ die;
5
+ }
6
+
7
+ // Free version specific options
8
+ delete_transient( 'happyforms_review_notice_recommend' );
9
+ delete_option( 'happyforms_modal_dismissed_onboarding' );
10
+ delete_option( 'happyforms_show_powered_by' );
11
+ delete_option( '_happyforms_received_submissions' );
12
+
13
+ // Stop cleanup if upgrade version is currently active.
14
+ if ( defined( 'HAPPYFORMS_UPGRADE_VERSION' ) ) {
15
+ return;
16
+ }
17
+
18
+ // Forms
19
+ $statuses = array( 'publish', 'trash', 'any' );
20
+
21
+ foreach( $statuses as $status ) {
22
+ $form_ids = get_posts( array(
23
+ 'post_type' => 'happyform',
24
+ 'post_status' => $status,
25
+ 'numberposts' => -1,
26
+ 'fields' => 'ids',
27
+ ) );
28
+
29
+ foreach( $form_ids as $form_id ) {
30
+ wp_delete_post( $form_id, true );
31
+ }
32
+ }
33
+
34
+ // General options
35
+ delete_option( 'widget_happyforms_widget' );
36
+ delete_option( 'happyforms-tracking' );
37
+ delete_option( 'ttf_updates_key_happyforms' );
38
+
39
+ // User meta
40
+ $users = get_users();
41
+
42
+ foreach( $users as $user ) {
43
+ delete_user_meta( $user->ID, 'happyforms-dismissed-notices' );
44
+ delete_transient( 'happyforms_admin_notices_' . md5( $user->user_login ) );
45
+ delete_user_meta( $user->ID, 'happyforms-settings-sections-states' );
46
+ }
47
+
48
+ // Migrations
49
+ delete_option( 'happyforms-data-version' );
50
+
51
+ // Old deactivation flag
52
+ delete_option( '_happyforms_cleanup_on_deactivate' );