Contact Form Email - Version 1.2.67

Version Description

  • Gutenberg compatibility updates
Download this release

Release Info

Developer codepeople
Plugin Icon 128x128 Contact Form Email
Version 1.2.67
Comparing to
See all releases

Code changes from version 1.2.66 to 1.2.67

README.txt CHANGED
@@ -454,6 +454,9 @@ When you click a field already added into the contact form builder area, you can
454
 
455
  == Changelog ==
456
 
 
 
 
457
  = 1.2.66 =
458
  * Improved security in custom edition area (XSS and CSRF)
459
 
@@ -959,5 +962,5 @@ When you click a field already added into the contact form builder area, you can
959
 
960
  == Upgrade Notice ==
961
 
962
- = 1.2.66 =
963
- * Improved security in custom edition area (XSS and CSRF)
454
 
455
  == Changelog ==
456
 
457
+ = 1.2.67 =
458
+ * Gutenberg compatibility updates
459
+
460
  = 1.2.66 =
461
  * Improved security in custom edition area (XSS and CSRF)
462
 
962
 
963
  == Upgrade Notice ==
964
 
965
+ = 1.2.67 =
966
+ * Gutenberg compatibility updates
cp-main-class.inc.php CHANGED
@@ -453,19 +453,7 @@ class CP_ContactFormToEmail extends CP_CFTEMAIL_BaseClass {
453
  }
454
 
455
  function gutenberg_block() {
456
- if (function_exists('register_block_type'))
457
- {
458
- wp_register_script(
459
- 'cpcfte-step01',
460
- plugins_url( 'js/block.js', __FILE__ ),
461
- array( 'wp-blocks', 'wp-element' )
462
- );
463
-
464
-
465
- register_block_type( 'cpcfte/cp-contact-form-to-email-step-01', array(
466
- 'editor_script' => 'cpcfte-step01',
467
- ) );
468
- }
469
  }
470
 
471
 
453
  }
454
 
455
  function gutenberg_block() {
456
+ wp_enqueue_script( 'cpcfte_gutenberg_editor', plugins_url('/js/block.js', __FILE__));
 
 
 
 
 
 
 
 
 
 
 
 
457
  }
458
 
459
 
form-to-email.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Contact Form Email
4
  Plugin URI: https://form2email.dwbooster.com/download
5
  Description: Contact form that sends the data to email and also to a database list and CSV file.
6
- Version: 1.2.66
7
  Author: CodePeople
8
  Author URI: https://form2email.dwbooster.com
9
  Text Domain: contact-form-to-email
@@ -88,7 +88,7 @@ if ( is_admin() ) {
88
  add_action('admin_enqueue_scripts', array($cp_cfte_plugin,'insert_adminScripts'), 1);
89
  add_filter("plugin_action_links_".plugin_basename(__FILE__), array($cp_cfte_plugin,'plugin_page_links'));
90
  add_action('admin_menu', array($cp_cfte_plugin,'admin_menu') );
91
- add_action('init', array($cp_cfte_plugin,'gutenberg_block') );
92
  add_action('wp_loaded', array($cp_cfte_plugin, 'data_management_loaded') );
93
  } else {
94
  add_shortcode( $cp_cfte_plugin->shorttag, array($cp_cfte_plugin, 'filter_content') );
3
  Plugin Name: Contact Form Email
4
  Plugin URI: https://form2email.dwbooster.com/download
5
  Description: Contact form that sends the data to email and also to a database list and CSV file.
6
+ Version: 1.2.67
7
  Author: CodePeople
8
  Author URI: https://form2email.dwbooster.com
9
  Text Domain: contact-form-to-email
88
  add_action('admin_enqueue_scripts', array($cp_cfte_plugin,'insert_adminScripts'), 1);
89
  add_filter("plugin_action_links_".plugin_basename(__FILE__), array($cp_cfte_plugin,'plugin_page_links'));
90
  add_action('admin_menu', array($cp_cfte_plugin,'admin_menu') );
91
+ add_action('enqueue_block_editor_assets', array($cp_cfte_plugin,'gutenberg_block') );
92
  add_action('wp_loaded', array($cp_cfte_plugin, 'data_management_loaded') );
93
  } else {
94
  add_shortcode( $cp_cfte_plugin->shorttag, array($cp_cfte_plugin, 'filter_content') );
js/block.js CHANGED
@@ -1,78 +1,84 @@
1
- ( function( blocks, element ) {
2
- var el = wp.element.createElement,
3
- source = blocks.source,
4
- InspectorControls = wp.editor.InspectorControls,
5
- category = {slug:'contact-form-to-email', title : 'Contact Form to Email'};
6
-
7
- /* Plugin Category */
8
- blocks.getCategories().push({slug: 'cpcfte', title: 'Contact Form to Email'});
9
-
10
- /* ICONS */
11
- const iconCPCFTE = el('img', { width: 20, height: 20, src: "data:image/gif;base64,R0lGODlhFAAQAOYAAP//////AP8A//8AAAD//wD/AAAA/wAAAPH2+/T4/Ofw+Mne79Pk8t3q9d/r9ePu9wxrtQxstQ1stg1rtQ1stQ5ttg9ttg9uthBtthButhFuthhzuRl0uRx1uh11uh12uh52ux53ux93uyF4uyF5uyJ5uyN6vCR6vCd8vid7vSh9vSp+vi6AvzOEwTeFwjmHwz2JxECLxUCMxUSNxkSOxkWPxlOXy1SXy12czl6ezl+ezmCezmKfz2Kgz2Sh0Gai0Wai0Gei0Wej0Wij0Wum0mym02ym0nmt1nuv132w2H6x2ICx2ICy2IGz2YS02oa12oa22om424q424y53I+73Y663JG83pG83ZvC4ZrC4JzD4Z/F4qbJ5KjK5afJ5KjK5L3X68HZ7MTb7cne7uHt9uDs9evz+fL3+9Lk8eLu9uny+PD2+vj7/fP4+/b6/P///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAG8ALAAAAAAUABAAAAfhgACCg4SFhl84QUNDQoxCjY+MQztUAEpkPREQEZybnhCeNA5XGjBqWJqfoJucSAk3FSQRJgtiHxSaFJ8YXQ4uESEjoBlcZS66mhEUJ2NhHbogI8qgR2Y2uJovDlnYECAlERKrVgBJmzoAYMqcESCyFLg5DkxnWk1sT2hLuLjRrDxuYkRg0aBNDQgoFDgBRUGEsAhCEAgEtQEcPBUPpkCYEIIEBCFrZqiCgC3CijRSIniwAMSNDFDJSKbSlEJNlAtQ0rRAVhLeKlAcGGwB4MUHkSJIixgxohTp0iI/qhiaSjUQADs=" } );
12
-
13
- blocks.registerBlockType( 'cpcfte/cp-contact-form-to-email-step-01', {
14
- title: 'Contact Form to Email',
15
- icon: iconCPCFTE,
16
- category: 'cpcfte',
17
- supports: {
18
- customClassName: false,
19
- className: false
20
- },
21
- attributes: {
22
- shortcode : {
23
- type : 'string',
24
- source : 'text',
25
- default: '[CONTACT_FORM_TO_EMAIL]'
26
- }
27
- },
28
-
29
- edit: function( props ) {
30
- var focus = props.isSelected;
31
- return [
32
- !!focus && el(
33
- InspectorControls,
34
- {
35
- key: 'cpcfte_inspector'
36
- },
37
- [
38
- el(
39
- 'span',
40
  {
41
- key: 'cpcfte_inspector_help',
42
- style:{fontStyle: 'italic'}
43
  },
44
- 'If you need help: '
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
45
  ),
46
- el(
47
- 'a',
48
  {
49
- key : 'cpcfte_inspector_help_link',
50
- href : 'https://form2email.dwbooster.com/contact-us',
51
- target : '_blank'
52
- },
53
- 'CLICK HERE'
54
- ),
55
- ]
56
- ),
57
- el('textarea',
58
- {
59
- key: 'cpcfte_form_shortcode',
60
- value: props.attributes.shortcode,
61
- onChange: function(evt){
62
- props.setAttributes({shortcode: evt.target.value});
63
- },
64
- style: {width:"100%", resize: "vertical"}
65
- }
66
- )
67
- ];
68
- },
69
-
70
- save: function( props ) {
71
- return props.attributes.shortcode;
72
- },
73
- } );
74
 
75
- } )(
76
- window.wp.blocks,
77
- window.wp.element
 
 
78
  );
1
+ jQuery(function()
2
+ {
3
+ (function( blocks, element ) {
4
+ var el = wp.element.createElement,
5
+ source = blocks.source,
6
+ InspectorControls = wp.editor.InspectorControls,
7
+ category = {slug:'contact-form-to-email', title : 'Contact Form to Email'};
8
+
9
+ /* Plugin Category */
10
+ blocks.getCategories().push({slug: 'cpcfte', title: 'Contact Form to Email'}) ;
11
+
12
+
13
+ /* ICONS */
14
+ const iconCPCFTE = el('img', { width: 20, height: 20, src: "data:image/gif;base64,R0lGODlhFAAQAOYAAP//////AP8A//8AAAD//wD/AAAA/wAAAPH2+/T4/Ofw+Mne79Pk8t3q9d/r9ePu9wxrtQxstQ1stg1rtQ1stQ5ttg9ttg9uthBtthButhFuthhzuRl0uRx1uh11uh12uh52ux53ux93uyF4uyF5uyJ5uyN6vCR6vCd8vid7vSh9vSp+vi6AvzOEwTeFwjmHwz2JxECLxUCMxUSNxkSOxkWPxlOXy1SXy12czl6ezl+ezmCezmKfz2Kgz2Sh0Gai0Wai0Gei0Wej0Wij0Wum0mym02ym0nmt1nuv132w2H6x2ICx2ICy2IGz2YS02oa12oa22om424q424y53I+73Y663JG83pG83ZvC4ZrC4JzD4Z/F4qbJ5KjK5afJ5KjK5L3X68HZ7MTb7cne7uHt9uDs9evz+fL3+9Lk8eLu9uny+PD2+vj7/fP4+/b6/P///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAG8ALAAAAAAUABAAAAfhgACCg4SFhl84QUNDQoxCjY+MQztUAEpkPREQEZybnhCeNA5XGjBqWJqfoJucSAk3FSQRJgtiHxSaFJ8YXQ4uESEjoBlcZS66mhEUJ2NhHbogI8qgR2Y2uJovDlnYECAlERKrVgBJmzoAYMqcESCyFLg5DkxnWk1sT2hLuLjRrDxuYkRg0aBNDQgoFDgBRUGEsAhCEAgEtQEcPBUPpkCYEIIEBCFrZqiCgC3CijRSIniwAMSNDFDJSKbSlEJNlAtQ0rRAVhLeKlAcGGwB4MUHkSJIixgxohTp0iI/qhiaSjUQADs=" } );
15
+
16
+ /* Form's shortcode */
17
+ blocks.registerBlockType( 'cpcfte/form-shortcode', {
18
+ title: 'Contact Form to Email',
19
+ icon: iconCPCFTE,
20
+ category: 'cpcfte',
21
+ supports: {
22
+ customClassName: false,
23
+ className: false
24
+ },
25
+ attributes: {
26
+ shortcode : {
27
+ type : 'string',
28
+ source : 'text',
29
+ default: '[CONTACT_FORM_TO_EMAIL]'
30
+ }
31
+ },
32
+
33
+ edit: function( props ) {
34
+ var focus = props.isSelected;
35
+ return [
36
+ !!focus && el(
37
+ InspectorControls,
 
 
38
  {
39
+ key: 'cpcfte_inspector'
 
40
  },
41
+ [
42
+ el(
43
+ 'span',
44
+ {
45
+ key: 'cpcfte_inspector_help',
46
+ style:{fontStyle: 'italic'}
47
+ },
48
+ 'If you need help: '
49
+ ),
50
+ el(
51
+ 'a',
52
+ {
53
+ key : 'cpcfte_inspector_help_link',
54
+ href : 'https://form2email.dwbooster.com/contact-us',
55
+ target : '_blank'
56
+ },
57
+ 'CLICK HERE'
58
+ )
59
+ ]
60
  ),
61
+ el('textarea',
 
62
  {
63
+ key: 'cpcfte_form_shortcode',
64
+ value: props.attributes.shortcode,
65
+ onChange: function(evt){
66
+ props.setAttributes({shortcode: evt.target.value});
67
+ },
68
+ style: {width:"100%", resize: "vertical"}
69
+ }
70
+ )
71
+ ];
72
+ },
73
+
74
+ save: function( props ) {
75
+ return props.attributes.shortcode;
76
+ }
77
+ });
 
 
 
 
 
 
 
 
 
 
78
 
79
+ } )(
80
+ window.wp.blocks,
81
+ window.wp.element
82
+ );
83
+ }
84
  );
js/fbuilderf.jquery.js CHANGED
@@ -643,7 +643,12 @@ jQuery(window).on('load', function(){
643
  return '<div class="fform" id="field"><div class="arrow ui-icon ui-icon-play "></div><h1>'+this.title+'</h1><span>'+this.description+'</span></div>';
644
  },
645
  show:function(){
646
- return '<div class="fform" id="field"><h1>'+this.title+'</h1><span>'+this.description+'</span></div>';
 
 
 
 
 
647
  },
648
  showAllSettings:function(){
649
  var str = "";
643
  return '<div class="fform" id="field"><div class="arrow ui-icon ui-icon-play "></div><h1>'+this.title+'</h1><span>'+this.description+'</span></div>';
644
  },
645
  show:function(){
646
+ var tmpstr = '';
647
+ if (this.title != '')
648
+ tmpstr += '<h1>'+this.title+'</h1>';
649
+ if (this.description != '')
650
+ tmpstr += '<span>'+this.description+'</span>';
651
+ return '<div class="fform" id="field">'+tmpstr+'</div>';
652
  },
653
  showAllSettings:function(){
654
  var str = "";