Add mandatory option to First Name field
[MAILPOET-2452]
This commit is contained in:
committed by
Rostislav Wolný
parent
612f436dba
commit
0c1ca572ed
@@ -25,6 +25,11 @@ const FirstNameEdit = ({ attributes, setAttributes }) => {
|
||||
checked={attributes.labelWithinInput}
|
||||
onChange={(labelWithinInput) => (setAttributes({ labelWithinInput }))}
|
||||
/>
|
||||
<ToggleControl
|
||||
label={MailPoet.I18n.t('blockMandatory')}
|
||||
checked={attributes.mandatory}
|
||||
onChange={(mandatory) => (setAttributes({ mandatory }))}
|
||||
/>
|
||||
</PanelBody>
|
||||
</Panel>
|
||||
|
||||
@@ -61,6 +66,7 @@ FirstNameEdit.propTypes = {
|
||||
attributes: PropTypes.shape({
|
||||
label: PropTypes.string.isRequired,
|
||||
labelWithinInput: PropTypes.bool.isRequired,
|
||||
mandatory: PropTypes.bool.isRequired,
|
||||
}).isRequired,
|
||||
setAttributes: PropTypes.func.isRequired,
|
||||
};
|
||||
|
@@ -20,7 +20,7 @@ export const settings = {
|
||||
},
|
||||
mandatory: {
|
||||
type: 'boolean',
|
||||
default: true,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
supports: {
|
||||
|
Reference in New Issue
Block a user