PluginProbe ʕ •ᴥ•ʔ
JetFormBuilder — Dynamic Blocks Form Builder / 3.1.2
JetFormBuilder — Dynamic Blocks Form Builder v3.1.2
3.6.3.1 3.6.3 3.6.2.2 3.6.2.1 3.6.2 3.6.1.1 3.6.1 3.6.0.1 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.3.0 1.3.1 1.3.2 1.3.3 1.4.0 1.4.1 1.4.2 1.4.3 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.1.0 2.1.1 2.1.10 2.1.11 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 3.0.0 3.0.0.1 3.0.0.2 3.0.0.3 3.0.1 3.0.1.1 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.0.1 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 3.1.8 3.1.9 3.2.0 3.2.1 3.2.2 3.2.3 3.3.0 3.3.1 3.3.2 3.3.3 3.3.3.1 3.3.4 3.3.4.1 3.3.4.2 3.4.0 3.4.1 3.4.2 3.4.3 3.4.4 3.4.5 3.4.5.1 3.4.5.2 3.4.6 3.4.7 3.4.7.1 3.5.0 3.5.1 3.5.1.1 3.5.1.2 3.5.2 3.5.2.1 3.5.3 3.5.4 3.5.5 3.5.6 3.5.6.1 3.5.6.2 3.5.6.3 3.6.0
jetformbuilder / assets / src / editor / blocks / checkbox-field / edit.js
jetformbuilder / assets / src / editor / blocks / checkbox-field Last commit date
edit.js 2 years ago index.js 2 years ago preview.js 2 years ago
edit.js
91 lines
1 import { SelectRadioCheckPlaceholder } from '../../components/base-select-check-radio/select-radio-check-placeholder';
2 import SelectRadioCheck
3 from '../../components/base-select-check-radio/select-radio-check';
4 import CustomTemplateControls
5 from '../../components/base-select-check-radio/custom-template';
6 import preview from './preview';
7
8 const {
9 AdvancedFields,
10 ToolBarFields,
11 FieldControl,
12 BlockName,
13 BlockLabel,
14 BlockDescription,
15 BlockAdvancedValue,
16 } = JetFBComponents;
17 const {
18 useUniqueNameOnDuplicate,
19 } = JetFBHooks;
20 const {
21 __,
22 } = wp.i18n;
23 const {
24 InspectorControls,
25 useBlockProps,
26 } = wp.blockEditor;
27 const {
28 PanelBody,
29 } = wp.components;
30
31 const localized = window.JetFormCheckboxFieldData;
32
33 export default function CheckboxEdit( props ) {
34
35 const blockProps = useBlockProps();
36 useUniqueNameOnDuplicate();
37
38 const {
39 isSelected,
40 editProps: { uniqKey },
41 attributes,
42 } = props;
43
44 if ( attributes.isPreview ) {
45 return <div style={ {
46 width: '100%',
47 display: 'flex',
48 justifyContent: 'center',
49 } }>
50 { preview }
51 </div>;
52 }
53
54 return [
55 <ToolBarFields
56 key={ uniqKey( 'JetForm-toolbar' ) }
57 { ...props }
58 />,
59 isSelected && <InspectorControls
60 key={ uniqKey( 'InspectorControls' ) }
61 >
62 <PanelBody title={ __( 'General', 'jet-form-builder' ) }>
63 <BlockLabel/>
64 <BlockName/>
65 <BlockDescription/>
66 </PanelBody>
67 <PanelBody title={ __( 'Value', 'jet-form-builder' ) }>
68 <BlockAdvancedValue/>
69 </PanelBody>
70 <AdvancedFields/>
71 </InspectorControls>,
72 <div { ...blockProps } key={ uniqKey( 'viewBlock' ) }>
73 <SelectRadioCheckPlaceholder
74 key={ uniqKey( 'SelectRadioCheckPlaceholder' ) }
75 scriptData={ localized }
76 { ...props }
77 />
78 <SelectRadioCheck { ...props }>
79 <CustomTemplateControls
80 listingTypes={ localized.listings_list }
81 { ...props }
82 />
83 <FieldControl
84 type="custom_settings"
85 key={ uniqKey( 'customSettingsFields' ) }
86 { ...props }
87 />
88 </SelectRadioCheck>
89 </div>,
90 ];
91 }