Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: added

Forms: add time field
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import {
hasFeatureFlag,
getJetpackBlocksVariation,
} from '@automattic/jetpack-shared-extension-utils';
import { hasFeatureFlag } from '@automattic/jetpack-shared-extension-utils';
import DeprecatedOptionCheckbox from '../deprecated/field-option-checkbox';
import DeprecatedOptionRadio from '../deprecated/field-option-radio';
import JetpackDropzone from '../dropzone';
Expand Down Expand Up @@ -60,6 +57,7 @@ export const childBlocks = [
JetpackUrlField,
JetpackTelephoneField,
JetpackTextareaField,
JetpackTimeField,
JetpackFieldFile,
JetpackRatingField,
JetpackRatingInput,
Expand All @@ -68,7 +66,6 @@ export const childBlocks = [
JetpackImageSelectField,
JetpackImageOptionsFieldset,
JetpackImageOptionInput,
...( getJetpackBlocksVariation() === 'beta' ? [ JetpackTimeField ] : [] ),

// The following are required for these blocks to be parsed correctly in block
// deprecations. They have been flagged with `supports.inserter: false` to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -473,15 +473,13 @@ public static function register_child_blocks() {
)
);

if ( Blocks::get_variation() === 'beta' ) {
Blocks::jetpack_register_block(
'jetpack/field-time',
array(
'render_callback' => array( Contact_Form_Plugin::class, 'gutenblock_render_field_time' ),
'provides_context' => array( 'jetpack/field-required' => 'required' ),
)
);
}
Blocks::jetpack_register_block(
'jetpack/field-time',
array(
'render_callback' => array( Contact_Form_Plugin::class, 'gutenblock_render_field_time' ),
'provides_context' => array( 'jetpack/field-required' => 'required' ),
)
);

// Paid file field block
add_action(
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: enhancement

Forms: add time field
Loading