Skip to content

Commit

Permalink
FIX: honeypot protection breaks the form on frontend
Browse files Browse the repository at this point in the history
Crocoblock/issues-tracker#9507
  • Loading branch information
girafffee committed May 30, 2024
1 parent 1d82bf0 commit 2f29471
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 11 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ Advanced form builder plugin for Gutenberg. Create forms from the ground up, cus

# ChangeLog

## 3.3.4.1
* FIX: Advanced Validation with Server-Side callback does not work on frontend
* FIX: Honeypot protection breaks the form on frontend

## 3.3.4
* ADD: Eye-icon for password field
* ADD: Gap controls for Checkbox / Radio fields (props [@stijnvanouplines](https://github.com/stijnvanouplines))
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array(), 'version' => '6d381aba3d76144f0544');
<?php return array('dependencies' => array(), 'version' => 'fdcba2bd90226fb98b82');

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
const {
InputData,
} = JetFormBuilderAbstract;

InputData,
} = JetFormBuilderAbstract;

function TextFieldData() {
InputData.call( this );
Expand All @@ -15,20 +14,23 @@ function TextFieldData() {

const [ node ] = this.nodes;

const wrapper = this.getWrapperNode();
const button = wrapper.querySelector( '.jfb-eye-icon' );
const button = this.getWrapperNode()?.querySelector?.(
'.jfb-eye-icon',
);

// show eye icon is disabled
if ( !button ) {
return;
}

button.addEventListener( 'click', function () {
button.classList.toggle( 'seen' );
button.classList.toggle( 'seen' );
let isPressed = this.getAttribute( 'aria-pressed' ) === 'true';
this.setAttribute( 'aria-pressed', !isPressed );

node.type = button.classList.contains( 'seen' ) ? 'password' : 'text';
node.type = button.classList.contains( 'seen' )
? 'password'
: 'text';
} );

button.addEventListener( 'keydown', function ( event ) {
Expand All @@ -43,7 +45,7 @@ function TextFieldData() {
event.preventDefault();
}
} );
}
};
}

TextFieldData.prototype = Object.create( InputData.prototype );
Expand Down
6 changes: 5 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Tags: blocks, forms, form builder, contact form, gutenberg, gutenberg forms, mul
Requires at least: 6.0
Tested up to: 6.5.3
Requires PHP: 7.0
Stable tag: 3.3.4
Stable tag: 3.3.4.1
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -272,6 +272,10 @@ Once you set the <a href="https://jetformbuilder.com/features/how-to-use-store-f

== Changelog ==

**3.3.4.1**
- FIX: Advanced Validation with Server-Side callback does not work on frontend
- FIX: Honeypot protection breaks the form on frontend

**3.3.4**
- ADD: Eye-icon for password field
- ADD: Gap controls for Checkbox / Radio fields (props [@stijnvanouplines](https://github.com/stijnvanouplines))
Expand Down

0 comments on commit 2f29471

Please sign in to comment.