PluginProbe
User Profile Builder – Beautiful User Registration Forms, User Profiles & User Role Editor / 4.0.3
User Profile Builder – Beautiful User Registration Forms, User Profiles & User Role Editor v4.0.3
4.0.3 4.0.2 4.0.1 4.0.0 3.16.6 3.16.5 3.16.4 3.16.3 3.16.2 3.16.1 3.16.0 3.15.9 3.9.9 3.9.5 3.9.6 3.9.7 3.9.8 1.1.7 1.1.8 1.1.9 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 All 341 releases
profile-builder / form-builder / blocks / src / blocks / field-validation / edit.js

edit.js in User Profile Builder – Beautiful User Registration Forms, User Profiles & User Role Editor 4.0.3, at form-builder/blocks/src/blocks/field-validation/edit.js

35 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import { __ } from '@wordpress/i18n';
2 import { PanelBody, TextControl, TextareaControl } from '@wordpress/components';
3 import BaseFieldEdit from '../../components/BaseFieldEdit';
4
5 export default function Edit( props ) {
6 const { attributes, setAttributes } = props;
7
8 const extraPanels = (
9 <PanelBody title={ __( 'Validation Settings', 'profile-builder' ) }>
10 <TextareaControl
11 label={ __( 'Possible Values', 'profile-builder' ) }
12 value={ attributes[ 'validation-possible-values' ] }
13 onChange={ ( val ) => setAttributes( { 'validation-possible-values': val } ) }
14 help={ __( 'Enter possible values separated by comma.', 'profile-builder' ) }
15 />
16 <TextControl
17 label={ __( 'Custom Error Message', 'profile-builder' ) }
18 value={ attributes[ 'custom-error-message' ] }
19 onChange={ ( val ) => setAttributes( { 'custom-error-message': val } ) }
20 />
21 </PanelBody>
22 );
23
24 return (
25 <BaseFieldEdit { ...props } inspectorPanels={ extraPanels }>
26 <input
27 type="text"
28 disabled
29 style={ { width: '100%' } }
30 placeholder={ __( 'Validation input...', 'profile-builder' ) }
31 />
32 </BaseFieldEdit>
33 );
34 }
35