Skip to content

Commit bcccd7b

Browse files
authored
Forms: release time field (#45665)
1 parent 1370086 commit bcccd7b

File tree

4 files changed

+17
-14
lines changed

4 files changed

+17
-14
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Significance: minor
2+
Type: added
3+
4+
Forms: add time field

projects/packages/forms/src/blocks/contact-form/child-blocks.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
import {
2-
hasFeatureFlag,
3-
getJetpackBlocksVariation,
4-
} from '@automattic/jetpack-shared-extension-utils';
1+
import { hasFeatureFlag } from '@automattic/jetpack-shared-extension-utils';
52
import DeprecatedOptionCheckbox from '../deprecated/field-option-checkbox';
63
import DeprecatedOptionRadio from '../deprecated/field-option-radio';
74
import JetpackDropzone from '../dropzone';
@@ -60,6 +57,7 @@ export const childBlocks = [
6057
JetpackUrlField,
6158
JetpackTelephoneField,
6259
JetpackTextareaField,
60+
JetpackTimeField,
6361
JetpackFieldFile,
6462
JetpackRatingField,
6563
JetpackRatingInput,
@@ -68,7 +66,6 @@ export const childBlocks = [
6866
JetpackImageSelectField,
6967
JetpackImageOptionsFieldset,
7068
JetpackImageOptionInput,
71-
...( getJetpackBlocksVariation() === 'beta' ? [ JetpackTimeField ] : [] ),
7269

7370
// The following are required for these blocks to be parsed correctly in block
7471
// deprecations. They have been flagged with `supports.inserter: false` to

projects/packages/forms/src/blocks/contact-form/class-contact-form-block.php

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -473,15 +473,13 @@ public static function register_child_blocks() {
473473
)
474474
);
475475

476-
if ( Blocks::get_variation() === 'beta' ) {
477-
Blocks::jetpack_register_block(
478-
'jetpack/field-time',
479-
array(
480-
'render_callback' => array( Contact_Form_Plugin::class, 'gutenblock_render_field_time' ),
481-
'provides_context' => array( 'jetpack/field-required' => 'required' ),
482-
)
483-
);
484-
}
476+
Blocks::jetpack_register_block(
477+
'jetpack/field-time',
478+
array(
479+
'render_callback' => array( Contact_Form_Plugin::class, 'gutenblock_render_field_time' ),
480+
'provides_context' => array( 'jetpack/field-required' => 'required' ),
481+
)
482+
);
485483

486484
// Paid file field block
487485
add_action(
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Significance: minor
2+
Type: enhancement
3+
4+
Forms: add time field

0 commit comments

Comments
 (0)