Contact Form 7 Multi-Step Forms - Version 4.1.8

Version Description

  • security update: HTML is now escaped when being output using the multiform tag. Added additional sanitization changes.
Download this release

Release Info

Developer webheadllc
Plugin Icon 128x128 Contact Form 7 Multi-Step Forms
Version 4.1.8
Comparing to
See all releases

Code changes from version 4.1.7 to 4.1.8

cf7msm-admin.php CHANGED
@@ -107,7 +107,7 @@ function cf7msm_review_notice() {
107
  <div class="notice notice-info cf7msm-notice cf7msm-notice-review">
108
  <div class="cf7msm-notice-inner">
109
  <div class="cf7msm-notice-icon">
110
- <img src="https://ps.w.org/contact-form-7-multi-step-module/assets/icon-256x256.png" width="64">
111
  </div>
112
  <div class="cf7msm-notice-content">
113
  <?php if ( $notice_num == 1 ) : ?>
@@ -165,7 +165,7 @@ function cf7msm_big_cookie_notice() {
165
  <div class="notice notice-error cf7msm-notice cf7msm-notice-cookie">
166
  <div class="cf7msm-notice-inner">
167
  <div class="cf7msm-notice-icon">
168
- <img src="https://ps.w.org/contact-form-7-multi-step-module/assets/icon-256x256.png" width="64">
169
  </div>
170
  <div class="cf7msm-notice-content">
171
  <h3><?php _e( 'Your Multi-Step Forms are in danger of losing data!', 'contact-form-7-multi-step-module' ); ?></h3>
@@ -290,9 +290,9 @@ function cf7msm_notice_response() {
290
  if ( !isset( $_POST['request_type'] ) ) {
291
  wp_send_json( 0 );
292
  }
293
- $data = $_POST['request_type'];
294
  $stats = get_option( '_cf7msm_stats', array() );
295
- if ( empty( $data ) ) {
296
  $notice = !empty( $stats['notice'] ) ? $stats['notice'] : '';
297
  if ( empty( $notice ) ) {
298
  $stats['notice'] = time();
@@ -301,7 +301,7 @@ function cf7msm_notice_response() {
301
  $stats['notice'] = 'no';
302
  }
303
  }
304
- elseif ( $data == 1 ) {
305
  $stats['notice'] = 'yes';
306
  }
307
  update_option( '_cf7msm_stats', $stats );
@@ -320,17 +320,17 @@ function cf7msm_notice_response_big_cookie() {
320
  if ( !isset( $_POST['request_type'] ) ) {
321
  wp_send_json( 0 );
322
  }
323
- $data = $_POST['request_type'];
324
  $stats = get_option( '_cf7msm_stats', array() );
325
  if ( empty( $stats['big_cookies'] ) ) {
326
  // shouldn't get here
327
  wp_send_json( 1 );
328
  }
329
- if ( empty( $data ) ) {
330
  // set the notice marker to the last seen number of big cookies.
331
  $stats['notice-big-cookie'] = $stats['big_cookies'];
332
  }
333
- elseif ( $data == 1 ) {
334
  $stats['notice-big-cookie'] = 'no';
335
  }
336
  update_option( '_cf7msm_stats', $stats );
107
  <div class="notice notice-info cf7msm-notice cf7msm-notice-review">
108
  <div class="cf7msm-notice-inner">
109
  <div class="cf7msm-notice-icon">
110
+ <img src="<?php echo cf7msm_url( '/resources/plugin-icon.png' ) ?>" width="64">
111
  </div>
112
  <div class="cf7msm-notice-content">
113
  <?php if ( $notice_num == 1 ) : ?>
165
  <div class="notice notice-error cf7msm-notice cf7msm-notice-cookie">
166
  <div class="cf7msm-notice-inner">
167
  <div class="cf7msm-notice-icon">
168
+ <img src="<?php echo cf7msm_url( '/resources/plugin-icon.png' ) ?>" width="64">
169
  </div>
170
  <div class="cf7msm-notice-content">
171
  <h3><?php _e( 'Your Multi-Step Forms are in danger of losing data!', 'contact-form-7-multi-step-module' ); ?></h3>
290
  if ( !isset( $_POST['request_type'] ) ) {
291
  wp_send_json( 0 );
292
  }
293
+ $data = !empty( $_POST['request_type'] );
294
  $stats = get_option( '_cf7msm_stats', array() );
295
+ if ( !$data ) {
296
  $notice = !empty( $stats['notice'] ) ? $stats['notice'] : '';
297
  if ( empty( $notice ) ) {
298
  $stats['notice'] = time();
301
  $stats['notice'] = 'no';
302
  }
303
  }
304
+ elseif ( $data ) {
305
  $stats['notice'] = 'yes';
306
  }
307
  update_option( '_cf7msm_stats', $stats );
320
  if ( !isset( $_POST['request_type'] ) ) {
321
  wp_send_json( 0 );
322
  }
323
+ $data = !empty( $_POST['request_type'] );
324
  $stats = get_option( '_cf7msm_stats', array() );
325
  if ( empty( $stats['big_cookies'] ) ) {
326
  // shouldn't get here
327
  wp_send_json( 1 );
328
  }
329
+ if ( !$data ) {
330
  // set the notice marker to the last seen number of big cookies.
331
  $stats['notice-big-cookie'] = $stats['big_cookies'];
332
  }
333
+ elseif ( $data ) {
334
  $stats['notice-big-cookie'] = 'no';
335
  }
336
  update_option( '_cf7msm_stats', $stats );
cf7msm.php CHANGED
@@ -191,9 +191,9 @@ function cf7msm_get( $var_name, $default = '' )
191
  $allow_session = apply_filters( 'cf7msm_allow_session', $force_session );
192
 
193
  if ( $allow_session && empty($_COOKIE['cf7msm_check']) ) {
194
- $ret = ( isset( $_SESSION[$var_name] ) ? $_SESSION[$var_name] : $default );
195
  } else {
196
- $ret = ( isset( $_COOKIE[$var_name] ) ? $_COOKIE[$var_name] : $default );
197
  $ret = json_decode( wp_unslash( $ret ), true );
198
  }
199
 
@@ -211,7 +211,7 @@ function cf7msm_get( $var_name, $default = '' )
211
  }
212
  }
213
 
214
- return cf7msm_sanitize_posted_data( $ret );
215
  }
216
 
217
  /**
@@ -710,7 +710,7 @@ function cf7msm_current_url()
710
  $page_url .= $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"];
711
  }
712
 
713
- return $page_url;
714
  }
715
 
716
  /**
191
  $allow_session = apply_filters( 'cf7msm_allow_session', $force_session );
192
 
193
  if ( $allow_session && empty($_COOKIE['cf7msm_check']) ) {
194
+ $ret = ( isset( $_SESSION[$var_name] ) ? cf7msm_sanitize_posted_data( $_SESSION[$var_name] ) : $default );
195
  } else {
196
+ $ret = ( isset( $_COOKIE[$var_name] ) ? cf7msm_sanitize_posted_data( $_COOKIE[$var_name] ) : $default );
197
  $ret = json_decode( wp_unslash( $ret ), true );
198
  }
199
 
211
  }
212
  }
213
 
214
+ return $ret;
215
  }
216
 
217
  /**
710
  $page_url .= $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"];
711
  }
712
 
713
+ return esc_url( $page_url );
714
  }
715
 
716
  /**
contact-form-7-multi-step-module.php CHANGED
@@ -6,7 +6,7 @@ Plugin URI: http://www.mymonkeydo.com/contact-form-7-multi-step-module/
6
  Description: Enables the Contact Form 7 plugin to create multi-page, multi-step forms.
7
  Author: Webhead LLC.
8
  Author URI: http://webheadcoder.com
9
- Version: 4.1.7
10
  Text Domain: contact-form-7-multi-step-module
11
  */
12
  /* Copyright 2021 Webhead LLC (email: info at webheadcoder.com)
@@ -68,7 +68,7 @@ if ( function_exists( 'cf7msm_fs' ) ) {
68
  cf7msm_fs();
69
  // Signal that SDK was initiated.
70
  do_action( 'cf7msm_fs_loaded' );
71
- define( 'CF7MSM_VERSION', '4.1.7' );
72
  define( 'CF7MSM_PLUGIN', __FILE__ );
73
  define( 'CF7MSM_FREE_TEXT_PREFIX_RADIO', '_wpcf7_radio_free_text_' );
74
  define( 'CF7MSM_FREE_TEXT_PREFIX_CHECKBOX', '_wpcf7_checkbox_free_text_' );
6
  Description: Enables the Contact Form 7 plugin to create multi-page, multi-step forms.
7
  Author: Webhead LLC.
8
  Author URI: http://webheadcoder.com
9
+ Version: 4.1.8
10
  Text Domain: contact-form-7-multi-step-module
11
  */
12
  /* Copyright 2021 Webhead LLC (email: info at webheadcoder.com)
68
  cf7msm_fs();
69
  // Signal that SDK was initiated.
70
  do_action( 'cf7msm_fs_loaded' );
71
+ define( 'CF7MSM_VERSION', '4.1.8' );
72
  define( 'CF7MSM_PLUGIN', __FILE__ );
73
  define( 'CF7MSM_FREE_TEXT_PREFIX_RADIO', '_wpcf7_radio_free_text_' );
74
  define( 'CF7MSM_FREE_TEXT_PREFIX_CHECKBOX', '_wpcf7_checkbox_free_text_' );
form-tags/module-session.php CHANGED
@@ -131,7 +131,7 @@ function cf7msm_multiform_shortcode_handler( $tag )
131
  $id_att,
132
  $value
133
  );
134
- return $value;
135
  }
136
 
137
  /**
131
  $id_att,
132
  $value
133
  );
134
+ return wp_kses( $value, 'post' );
135
  }
136
 
137
  /**
js_src/cf7msm-notice.js CHANGED
@@ -1,5 +1,3 @@
1
- import '../scss/cf7msm-notice.scss';
2
-
3
  jQuery(function($) {
4
  $( document ).on( 'click', '.cf7msm-notice-review .cf7msm-later', function ( e ) {
5
  e.preventDefault();
 
 
1
  jQuery(function($) {
2
  $( document ).on( 'click', '.cf7msm-notice-review .cf7msm-later', function ( e ) {
3
  e.preventDefault();
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate Link: https://webheadcoder.com/donate-cf7-multi-step-forms
4
  Tags: contact form 7, multistep form, form, multiple pages, contact, multi, step
5
  Requires at least: 4.7
6
  Tested up to: 5.8
7
- Stable tag: 4.1.7
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -135,6 +135,9 @@ When checkboxes are not checked they aren't submitted through the form so the la
135
 
136
  == Changelog ==
137
 
 
 
 
138
  = 4.1.7 =
139
  * fixed next url to support external urls.
140
 
4
  Tags: contact form 7, multistep form, form, multiple pages, contact, multi, step
5
  Requires at least: 4.7
6
  Tested up to: 5.8
7
+ Stable tag: 4.1.8
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
135
 
136
  == Changelog ==
137
 
138
+ = 4.1.8 =
139
+ * security update: HTML is now escaped when being output using the multiform tag. Added additional sanitization changes.
140
+
141
  = 4.1.7 =
142
  * fixed next url to support external urls.
143
 
resources/cf7msm-admin.css CHANGED
@@ -1 +1 @@
1
- #upgradediv{padding:8px}#upgradediv h3{border-bottom:1px solid #ccc}#upgradediv .aligncenter{text-align:center}#upgradediv a.external{font-size:17px}#upgradediv.hide{display:none}.cf7msm-freemius-purchase{position:relative;display:inline-block;padding:6px 8px;color:#0073aa;font-size:13px;border:1px solid #ccc;border-radius:2px;cursor:pointer;outline:0;text-decoration:none;margin-bottom:6px}
1
+ .cf7msm-notice{padding:20px}.cf7msm-notice .cf7msm-notice-inner{display:table;width:100%}.cf7msm-notice .cf7msm-notice-icon{display:table-cell;vertical-align:middle;width:64px}.cf7msm-notice .cf7msm-notice-content{display:table-cell;vertical-align:middle;padding:0 40px 0 20px}.cf7msm-notice .cf7msm-notice-content h3{margin:0 0 5px}.cf7msm-notice .cf7msm-notice-content p{margin-top:0}.cf7msm-notice .cf7msm-notice-actions{display:table-cell;vertical-align:middle}.cf7msm-notice .cf7msm-notice-actions a.cf7msm-review-button{display:block;padding:6px 50px;line-height:20px;height:auto;margin-bottom:8px}.cf7msm-notice .cf7msm-notice-actions .spacer{padding:0 5px;color:#90959a}.cf7msm-notice .cf7msm-notice-actions .other-buttons{text-align:center}.cf7msm-notice .cf7msm-notice-actions a.cf7msm-did,.cf7msm-notice .cf7msm-notice-actions a.cf7msm-later{text-decoration:none;color:#616569;font-size:.95em}.cf7msm-notice .cf7msm-notice-actions a.cf7msm-did.trash,.cf7msm-notice .cf7msm-notice-actions a.cf7msm-later.trash{color:#a00}.cf7msm-notice-cookie .cf7msm-notice-actions a:first-child{margin-bottom:10px}.cf7msm-notice-cookie .cf7msm-notice-actions a{display:block}@media screen and (max-width:787px){.cf7msm-notice .cf7msm-notice-icon{display:none}.cf7msm-notice .cf7msm-notice-content{display:block;width:100%;padding:0 0 10px}.cf7msm-notice .cf7msm-notice-actions{display:block}.cf7msm-notice .cf7msm-notice-actions a.cf7msm-review-button{display:inline-block;width:170px;padding-left:0;padding-right:0;text-align:center}.cf7msm-notice .cf7msm-notice-actions .other-buttons{display:inline-block;margin-left:15px;text-align:left;width:170px}}#upgradediv{padding:8px}#upgradediv h3{border-bottom:1px solid #ccc}#upgradediv .aligncenter{text-align:center}#upgradediv a.external{font-size:17px}#upgradediv.hide{display:none}.cf7msm-freemius-purchase{position:relative;display:inline-block;padding:6px 8px;color:#0073aa;font-size:13px;border:1px solid #ccc;border-radius:2px;cursor:pointer;outline:0;text-decoration:none;margin-bottom:6px}
resources/cf7msm-notice.css CHANGED
@@ -1 +1,4 @@
1
- .cf7msm-notice{padding:20px}.cf7msm-notice .cf7msm-notice-inner{display:table;width:100%}.cf7msm-notice .cf7msm-notice-icon{display:table-cell;vertical-align:middle;width:64px}.cf7msm-notice .cf7msm-notice-content{display:table-cell;vertical-align:middle;padding:0 40px 0 20px}.cf7msm-notice .cf7msm-notice-content h3{margin:0 0 5px}.cf7msm-notice .cf7msm-notice-content p{margin-top:0}.cf7msm-notice .cf7msm-notice-actions{display:table-cell;vertical-align:middle}.cf7msm-notice .cf7msm-notice-actions a.cf7msm-review-button{display:block;padding:6px 50px;line-height:20px;height:auto;margin-bottom:8px}.cf7msm-notice .cf7msm-notice-actions .spacer{padding:0 5px;color:#90959a}.cf7msm-notice .cf7msm-notice-actions .other-buttons{text-align:center}.cf7msm-notice .cf7msm-notice-actions a.cf7msm-did,.cf7msm-notice .cf7msm-notice-actions a.cf7msm-later{text-decoration:none;color:#616569;font-size:.95em}.cf7msm-notice .cf7msm-notice-actions a.cf7msm-did.trash,.cf7msm-notice .cf7msm-notice-actions a.cf7msm-later.trash{color:#a00}.cf7msm-notice-cookie .cf7msm-notice-actions a:first-child{margin-bottom:10px}.cf7msm-notice-cookie .cf7msm-notice-actions a{display:block}@media screen and (max-width:787px){.cf7msm-notice .cf7msm-notice-icon{display:none}.cf7msm-notice .cf7msm-notice-content{display:block;width:100%;padding:0 0 10px}.cf7msm-notice .cf7msm-notice-actions{display:block}.cf7msm-notice .cf7msm-notice-actions a.cf7msm-review-button{display:inline-block;width:170px;padding-left:0;padding-right:0;text-align:center}.cf7msm-notice .cf7msm-notice-actions .other-buttons{display:inline-block;margin-left:15px;text-align:left;width:170px}}
 
 
 
1
+ .cf7msm-notice{padding:20px}.cf7msm-notice .cf7msm-notice-inner{display:table;width:100%}.cf7msm-notice .cf7msm-notice-icon{display:table-cell;vertical-align:middle;width:64px}.cf7msm-notice .cf7msm-notice-content{display:table-cell;vertical-align:middle;padding:0 40px 0 20px}.cf7msm-notice .cf7msm-notice-content h3{margin:0 0 5px}.cf7msm-notice .cf7msm-notice-content p{margin-top:0}.cf7msm-notice .cf7msm-notice-actions{display:table-cell;vertical-align:middle}.cf7msm-notice .cf7msm-notice-actions a.cf7msm-review-button{display:block;padding:6px 50px;line-height:20px;height:auto;margin-bottom:8px}.cf7msm-notice .cf7msm-notice-actions .spacer{padding:0 5px;color:#90959a}.cf7msm-notice .cf7msm-notice-actions .other-buttons{text-align:center}.cf7msm-notice .cf7msm-notice-actions a.cf7msm-did,.cf7msm-notice .cf7msm-notice-actions a.cf7msm-later{text-decoration:none;color:#616569;font-size:.95em}.cf7msm-notice .cf7msm-notice-actions a.cf7msm-did.trash,.cf7msm-notice .cf7msm-notice-actions a.cf7msm-later.trash{color:#a00}.cf7msm-notice-cookie .cf7msm-notice-actions a:first-child{margin-bottom:10px}.cf7msm-notice-cookie .cf7msm-notice-actions a{display:block}@media screen and (max-width: 787px){.cf7msm-notice .cf7msm-notice-icon{display:none}.cf7msm-notice .cf7msm-notice-content{display:block;width:100%;padding:0 0 10px}.cf7msm-notice .cf7msm-notice-actions{display:block}.cf7msm-notice .cf7msm-notice-actions a.cf7msm-review-button{display:inline-block;width:170px;padding-left:0;padding-right:0;text-align:center}.cf7msm-notice .cf7msm-notice-actions .other-buttons{display:inline-block;margin-left:15px;text-align:left;width:170px}}
2
+
3
+
4
+ /*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9hc3NldHMtc3JjL3Njc3MvY2Y3bXNtLW5vdGljZS5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGVBQWUsYUFBYSxvQ0FBb0MsY0FBYyxXQUFXLG1DQUFtQyxtQkFBbUIsc0JBQXNCLFdBQVcsc0NBQXNDLG1CQUFtQixzQkFBc0Isc0JBQXNCLHlDQUF5QyxlQUFlLHdDQUF3QyxhQUFhLHNDQUFzQyxtQkFBbUIsc0JBQXNCLDZEQUE2RCxjQUFjLGlCQUFpQixpQkFBaUIsWUFBWSxrQkFBa0IsOENBQThDLGNBQWMsY0FBYyxxREFBcUQsa0JBQWtCLHdHQUF3RyxxQkFBcUIsY0FBYyxn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t9LmNmN21zbS1ub3RpY2UgLmNmN21zbS1ub3RpY2UtYWN0aW9ucyBhLmNmN21zbS1yZXZpZXctYnV0dG9ue2Rpc3BsYXk6aW5saW5lLWJsb2NrO3dpZHRoOjE3MHB4O3BhZGRpbmctbGVmdDowO3BhZGRpbmctcmlnaHQ6MDt0ZXh0LWFsaWduOmNlbnRlcn0uY2Y3bXNtLW5vdGljZSAuY2Y3bXNtLW5vdGljZS1hY3Rpb25zIC5vdGhlci1idXR0b25ze2Rpc3BsYXk6aW5saW5lLWJsb2NrO21hcmdpbi1sZWZ0OjE1cHg7dGV4dC1hbGlnbjpsZWZ0O3dpZHRoOjE3MHB4fX1cbiJdLCJzb3VyY2VSb290IjoiIn0=*/
resources/cf7msm-notice.min.js CHANGED
@@ -1 +1 @@
1
- !function(e,n){for(var t in n)e[t]=n[t]}(window,function(e){var n={};function t(o){if(n[o])return n[o].exports;var c=n[o]={i:o,l:!1,exports:{}};return e[o].call(c.exports,c,c.exports,t),c.l=!0,c.exports}return t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:o})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(t.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var c in e)t.d(o,c,function(n){return e[n]}.bind(null,c));return o},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=3)}([,,,function(e,n,t){e.exports=t(4)},function(e,n,t){"use strict";t.r(n);t(5);jQuery((function(e){function n(n){e.post(ajaxurl,{action:"cf7msm-notice-response",request_type:n,nonce:cf7msm_admin.nonce},(function(n){0!=n&&e(".cf7msm-notice-review").hide()}),"json")}function t(n){e.post(ajaxurl,{action:"cf7msm-notice-response-big-cookie",request_type:n,nonce:cf7msm_admin.nonce},(function(n){0!=n&&e(".cf7msm-notice-cookie").hide()}),"json")}e(document).on("click",".cf7msm-notice-review .cf7msm-later",(function(e){e.preventDefault(),n(0)})),e(document).on("click",".cf7msm-notice-review .cf7msm-did, .cf7msm-notice-review .cf7msm-review-button",(function(e){e.preventDefault(),n(1)})),e(document).on("click",".cf7msm-notice-cookie .cf7msm-later",(function(e){e.preventDefault(),t(0)})),e(document).on("click",".cf7msm-notice-cookie .trash",(function(e){e.preventDefault(),window.confirm("Are you sure you don't want to be notified when your form submissions may be losing data?")&&t(1)}))}))},function(e,n,t){}]));
1
+ !function(e,n){for(var t in n)e[t]=n[t]}(window,function(e){var n={};function t(o){if(n[o])return n[o].exports;var c=n[o]={i:o,l:!1,exports:{}};return e[o].call(c.exports,c,c.exports,t),c.l=!0,c.exports}return t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:o})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(t.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var c in e)t.d(o,c,function(n){return e[n]}.bind(null,c));return o},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=3)}([,,,function(e,n,t){e.exports=t(4)},function(e,n){jQuery((function(e){function n(n){e.post(ajaxurl,{action:"cf7msm-notice-response",request_type:n,nonce:cf7msm_admin.nonce},(function(n){0!=n&&e(".cf7msm-notice-review").hide()}),"json")}function t(n){e.post(ajaxurl,{action:"cf7msm-notice-response-big-cookie",request_type:n,nonce:cf7msm_admin.nonce},(function(n){0!=n&&e(".cf7msm-notice-cookie").hide()}),"json")}e(document).on("click",".cf7msm-notice-review .cf7msm-later",(function(e){e.preventDefault(),n(0)})),e(document).on("click",".cf7msm-notice-review .cf7msm-did, .cf7msm-notice-review .cf7msm-review-button",(function(e){e.preventDefault(),n(1)})),e(document).on("click",".cf7msm-notice-cookie .cf7msm-later",(function(e){e.preventDefault(),t(0)})),e(document).on("click",".cf7msm-notice-cookie .trash",(function(e){e.preventDefault(),window.confirm("Are you sure you don't want to be notified when your form submissions may be losing data?")&&t(1)}))}))}]));
resources/cf7msm.min.js CHANGED
@@ -1 +1 @@
1
- !function(e,t){for(var n in t)e[n]=t[n]}(window,function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=6)}({6:function(e,t,n){e.exports=n(7)},7:function(e,t,n){"use strict";n.r(t);var r,o;n(8);function i(){try{return sessionStorage.setItem("test","test"),sessionStorage.removeItem("test"),!0}catch(e){return!1}}o=jQuery,document.addEventListener("DOMContentLoaded",e=>{var t=cf7msm_posted_data,n=o("input[name='_cf7msm_multistep_tag']"),s=n.length>0;if(s||(s=(n=o("input[name='cf7msm-step']")).length>0),s){var a=n.closest("form"),f=a.find('input[name="_wpcf7"]').val();i()?null!=(r=sessionStorage.getObject("cf7msm"))&&o.each(r,(function(e,t){if("cf7msm_prev_urls"==e){var n=a.find(".wpcf7-back, .wpcf7-previous"),r=window.location.href,o=r.replace(/\/$/,""),i=!t.hasOwnProperty(r)||""==t[r];i&&(i=!t.hasOwnProperty(o)||""==t[o]),i&&(r=r.split("?")[0],o=r.replace(/\/$/,""),(i=!t.hasOwnProperty(r)||""==t[r])&&(i=!t.hasOwnProperty(o)||""==t[o])),i?n.hide():n.click((function(e){t.hasOwnProperty(r)&&""!=t[r]?window.location.href=t[r]:t.hasOwnProperty(o)&&""!=t[o]?window.location.href=t[o]:window.history.go(-1),e.preventDefault()}))}})):(o("input[name='cf7msm-no-ss']").val(1),o(".wpcf7-previous").hide());var c=wpcf7.submit;wpcf7.submit=function(e,t){!function(e){!function(e){var t=e;t instanceof jQuery||(t=o(e));var n=t.find("input[name='_cf7msm_multistep_tag']");0!=n.length&&(n.length>1&&(n=n.last()),o("<input />",{type:"hidden",name:"cf7msm_options",value:n.val()}).appendTo(t))}(e)}(e),c(e,t)},window.addEventListener("load",(function(){t&&(o.each(t,(function(e,t){if(e.indexOf("[]")===e.length-2&&(e=e.substring(0,e.length-2)),(0!=e.indexOf("_")||0==e.indexOf("_wpcf7_radio_free_text_")||0==e.indexOf("_wpcf7_checkbox_free_text_"))&&"cf7msm-step"!=e&&"cf7msm_options"!=e){var n=a.find('*[name="'+e+'"]:not([data-cf7msm-previous])'),r=a.find('input[name="'+e+'[]"]:not([data-cf7msm-previous])'),i=a.find('select[name="'+e+'[]"]:not([data-cf7msm-previous])');n.length>0?"radio"==n.prop("type")||"checkbox"==n.prop("type")?n.filter((function(){return o(this).val()==t})).prop("checked",!0):n.is("select")?n.find("option").filter((function(){return this.value==t})).attr("selected","selected"):n.val(t):r.length>0&&t.constructor===Array?""!=t&&t.length>0&&o.each(t,(function(e,t){r.filter((function(){return o(this).val()==t})).prop("checked",!0)})):i.length>0&&t.constructor===Array&&""!=t&&t.length>0&&o.each(t,(function(e,t){i.find("option").filter((function(){return this.value==t})).attr("selected","selected")}))}})),a.find('input[name="_wpcf7cf_options"]').trigger("change"))})),document.addEventListener("wpcf7mailsent",(function(e){if(i()){var t=0,n=0,s=[],a={};(r=sessionStorage.getObject("cf7msm"))||(r={});var c=!1,u=!1,p=!0,l=!1,d=null,m=!1;if(o.each(e.detail.inputs,(function(r){var i=e.detail.inputs[r].name,h=e.detail.inputs[r].value;if(i.indexOf("[]")===i.length-2?(-1===o.inArray(i,s)&&(a[i]=[]),a[i].push(h)):a[i]=h,"cf7msm-step"===i){if(-1!==h.indexOf("-")){c=!0,u=!1;var v=h.split("-");t=parseInt(v[0]),n=parseInt(v[1]),void 0!==cf7msm_redirect_urls[f]&&(d=cf7msm_redirect_urls[f]),t<n?p=!1:t===n&&(l=!0)}}else if("cf7msm_options"===i){c=!0,u=!0,p=!1;var w=JSON.parse(h);w.hasOwnProperty("next_url")&&(d=w.next_url),w.hasOwnProperty("last_step")&&(m=!0,d&&""!==d||(l=!0,p=!0))}else s.push(i)})),!c)return;if(!p){var h=o("#"+e.detail.unitTag).find("div.wpcf7-mail-sent-ok");0==h.length&&(h=o("#"+e.detail.unitTag).find(".wpcf7-response-output")),h.remove()}if(l){var v=o("#"+e.detail.unitTag+" form");v.find("*").not("div.wpcf7-response-output").hide(),v.find("div.wpcf7-response-output").parentsUntil("form").show()}if(u?m&&(r={}):0!=t&&t===n&&(r={}),d&&""!=d){var w=document.createElement("a");w.href=d;var _=w.hostname?w.hostname:"",g={};r&&r.cf7msm_prev_urls&&(g=r.cf7msm_prev_urls);var y=window.location.protocol+"//"+window.location.host;0===d.indexOf(y)||""!=_&&_!=window.location.host||(0!==d.indexOf("/")&&(y+="/"),d=y+d),g[d]=window.location.href;var O=d.split("?")[0];d!=O&&(g[O]=window.location.href),r.cf7msm_prev_urls=g}sessionStorage.setObject("cf7msm",r),d&&""!=d&&(window.location.href=d)}}),!1)}}),Storage.prototype.setObject=function(e,t){this.setItem(e,JSON.stringify(t))},Storage.prototype.getObject=function(e){var t=this.getItem(e);return t&&JSON.parse(t)}},8:function(e,t,n){}}));
1
+ !function(e,t){for(var n in t)e[n]=t[n]}(window,function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=5)}([,,,,,function(e,t,n){e.exports=n(6)},function(e,t,n){"use strict";n.r(t);var r,o;n(7);function i(){try{return sessionStorage.setItem("test","test"),sessionStorage.removeItem("test"),!0}catch(e){return!1}}o=jQuery,document.addEventListener("DOMContentLoaded",e=>{var t=cf7msm_posted_data,n=o("input[name='_cf7msm_multistep_tag']"),s=n.length>0;if(s||(s=(n=o("input[name='cf7msm-step']")).length>0),s){var a=n.closest("form"),f=a.find('input[name="_wpcf7"]').val();i()?null!=(r=sessionStorage.getObject("cf7msm"))&&o.each(r,(function(e,t){if("cf7msm_prev_urls"==e){var n=a.find(".wpcf7-back, .wpcf7-previous"),r=window.location.href,o=r.replace(/\/$/,""),i=!t.hasOwnProperty(r)||""==t[r];i&&(i=!t.hasOwnProperty(o)||""==t[o]),i&&(r=r.split("?")[0],o=r.replace(/\/$/,""),(i=!t.hasOwnProperty(r)||""==t[r])&&(i=!t.hasOwnProperty(o)||""==t[o])),i?n.hide():n.click((function(e){t.hasOwnProperty(r)&&""!=t[r]?window.location.href=t[r]:t.hasOwnProperty(o)&&""!=t[o]?window.location.href=t[o]:window.history.go(-1),e.preventDefault()}))}})):(o("input[name='cf7msm-no-ss']").val(1),o(".wpcf7-previous").hide());var c=wpcf7.submit;wpcf7.submit=function(e,t){!function(e){!function(e){var t=e;t instanceof jQuery||(t=o(e));var n=t.find("input[name='_cf7msm_multistep_tag']");0!=n.length&&(n.length>1&&(n=n.last()),o("<input />",{type:"hidden",name:"cf7msm_options",value:n.val()}).appendTo(t))}(e)}(e),c(e,t)},window.addEventListener("load",(function(){t&&(o.each(t,(function(e,t){if(e.indexOf("[]")===e.length-2&&(e=e.substring(0,e.length-2)),(0!=e.indexOf("_")||0==e.indexOf("_wpcf7_radio_free_text_")||0==e.indexOf("_wpcf7_checkbox_free_text_"))&&"cf7msm-step"!=e&&"cf7msm_options"!=e){var n=a.find('*[name="'+e+'"]:not([data-cf7msm-previous])'),r=a.find('input[name="'+e+'[]"]:not([data-cf7msm-previous])'),i=a.find('select[name="'+e+'[]"]:not([data-cf7msm-previous])');n.length>0?"radio"==n.prop("type")||"checkbox"==n.prop("type")?n.filter((function(){return o(this).val()==t})).prop("checked",!0):n.is("select")?n.find("option").filter((function(){return this.value==t})).attr("selected","selected"):n.val(t):r.length>0&&t.constructor===Array?""!=t&&t.length>0&&o.each(t,(function(e,t){r.filter((function(){return o(this).val()==t})).prop("checked",!0)})):i.length>0&&t.constructor===Array&&""!=t&&t.length>0&&o.each(t,(function(e,t){i.find("option").filter((function(){return this.value==t})).attr("selected","selected")}))}})),a.find('input[name="_wpcf7cf_options"]').trigger("change"))})),document.addEventListener("wpcf7mailsent",(function(e){if(i()){var t=0,n=0,s=[],a={};(r=sessionStorage.getObject("cf7msm"))||(r={});var c=!1,u=!1,p=!0,l=!1,d=null,m=!1;if(o.each(e.detail.inputs,(function(r){var i=e.detail.inputs[r].name,h=e.detail.inputs[r].value;if(i.indexOf("[]")===i.length-2?(-1===o.inArray(i,s)&&(a[i]=[]),a[i].push(h)):a[i]=h,"cf7msm-step"===i){if(-1!==h.indexOf("-")){c=!0,u=!1;var v=h.split("-");t=parseInt(v[0]),n=parseInt(v[1]),void 0!==cf7msm_redirect_urls[f]&&(d=cf7msm_redirect_urls[f]),t<n?p=!1:t===n&&(l=!0)}}else if("cf7msm_options"===i){c=!0,u=!0,p=!1;var w=JSON.parse(h);w.hasOwnProperty("next_url")&&(d=w.next_url),w.hasOwnProperty("last_step")&&(m=!0,d&&""!==d||(l=!0,p=!0))}else s.push(i)})),!c)return;if(!p){var h=o("#"+e.detail.unitTag).find("div.wpcf7-mail-sent-ok");0==h.length&&(h=o("#"+e.detail.unitTag).find(".wpcf7-response-output")),h.remove()}if(l){var v=o("#"+e.detail.unitTag+" form");v.find("*").not("div.wpcf7-response-output").hide(),v.find("div.wpcf7-response-output").parentsUntil("form").show()}if(u?m&&(r={}):0!=t&&t===n&&(r={}),d&&""!=d){var w=document.createElement("a");w.href=d;var _=w.hostname?w.hostname:"",g={};r&&r.cf7msm_prev_urls&&(g=r.cf7msm_prev_urls);var y=window.location.protocol+"//"+window.location.host;0===d.indexOf(y)||""!=_&&_!=window.location.host||(0!==d.indexOf("/")&&(y+="/"),d=y+d),g[d]=window.location.href;var O=d.split("?")[0];d!=O&&(g[O]=window.location.href),r.cf7msm_prev_urls=g}sessionStorage.setObject("cf7msm",r),d&&""!=d&&(window.location.href=d)}}),!1)}}),Storage.prototype.setObject=function(e,t){this.setItem(e,JSON.stringify(t))},Storage.prototype.getObject=function(e){var t=this.getItem(e);return t&&JSON.parse(t)}},function(e,t,n){}]));
resources/plugin-icon.png ADDED
Binary file
scss/_cf7msm-notice.scss ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .cf7msm-notice {
2
+ padding: 20px;
3
+ .cf7msm-notice-inner {
4
+ display: table;
5
+ width: 100%;
6
+ }
7
+ .cf7msm-notice-icon {
8
+ display: table-cell;
9
+ vertical-align: middle;
10
+ width: 64px;
11
+ }
12
+ .cf7msm-notice-content {
13
+ display: table-cell;
14
+ vertical-align: middle;
15
+ padding: 0 40px 0 20px;
16
+ h3 {
17
+ margin: 0 0 5px;
18
+ }
19
+ p {
20
+ margin-top: 0;
21
+ }
22
+ }
23
+ .cf7msm-notice-actions {
24
+ display: table-cell;
25
+ vertical-align: middle;
26
+
27
+ a.cf7msm-review-button {
28
+ display: block;
29
+ padding: 6px 50px;
30
+ line-height: 20px;
31
+ height: auto;
32
+ margin-bottom: 8px;
33
+ }
34
+ .spacer {
35
+ padding: 0 5px;
36
+ color: #90959a;
37
+ }
38
+ .other-buttons {
39
+ text-align: center;
40
+ }
41
+ a.cf7msm-did, a.cf7msm-later {
42
+ text-decoration: none;
43
+ color: #616569;
44
+ font-size: .95em;
45
+ &.trash {
46
+ color: #a00;
47
+ }
48
+ }
49
+ }
50
+ }
51
+
52
+ .cf7msm-notice-cookie {
53
+ .cf7msm-notice-actions {
54
+ a:first-child {
55
+ margin-bottom: 10px;
56
+ }
57
+ a {
58
+ display: block;
59
+ }
60
+ }
61
+ }
62
+
63
+ @media screen and (max-width:787px) {
64
+ .cf7msm-notice {
65
+ .cf7msm-notice-icon {
66
+ display: none;
67
+ }
68
+ .cf7msm-notice-content {
69
+ display: block;
70
+ width: 100%;
71
+ padding: 0 0 10px;
72
+ }
73
+ .cf7msm-notice-actions {
74
+ display: block;
75
+ a.cf7msm-review-button {
76
+ display: inline-block;
77
+ width: 170px;
78
+ padding-left: 0;
79
+ padding-right: 0;
80
+ text-align: center;
81
+ }
82
+ .other-buttons {
83
+ display: inline-block;
84
+ margin-left: 15px;
85
+ text-align: left;
86
+ width: 170px;
87
+ }
88
+ }
89
+ }
90
+ }
scss/cf7msm-admin.scss CHANGED
@@ -1,3 +1,5 @@
 
 
1
  #upgradediv {
2
  padding: 8px;
3
  h3 {
1
+ @import 'cf7msm-notice';
2
+
3
  #upgradediv {
4
  padding: 8px;
5
  h3 {