Map last name field
[MAILPOET-2452]
This commit is contained in:
committed by
Rostislav Wolný
parent
5ce2a2d918
commit
9460006727
@@ -38,6 +38,20 @@ export default (blocks) => {
|
||||
mapped.params.label_within = '1';
|
||||
}
|
||||
break;
|
||||
case 'mailpoet-form/last-name-input':
|
||||
mapped.id = 'last_name';
|
||||
mapped.type = 'text';
|
||||
mapped.unique = '1';
|
||||
mapped.static = '0';
|
||||
mapped.name = 'Last name';
|
||||
mapped.params.label = block.attributes.label;
|
||||
if (block.attributes.mandatory) {
|
||||
mapped.params.required = '1';
|
||||
}
|
||||
if (block.attributes.labelWithinInput) {
|
||||
mapped.params.label_within = '1';
|
||||
}
|
||||
break;
|
||||
case 'mailpoet-form/submit-button':
|
||||
mapped.id = 'submit';
|
||||
mapped.type = 'submit';
|
||||
|
@@ -28,6 +28,14 @@ export default (data) => {
|
||||
mandatory: !!item.params.required,
|
||||
};
|
||||
return mapped;
|
||||
case 'last_name':
|
||||
mapped.name = 'mailpoet-form/last-name-input';
|
||||
mapped.attributes = {
|
||||
label: item.params.label,
|
||||
labelWithinInput: !!item.params.label_within,
|
||||
mandatory: !!item.params.required,
|
||||
};
|
||||
return mapped;
|
||||
case 'submit':
|
||||
mapped.name = 'mailpoet-form/submit-button';
|
||||
mapped.attributes = {
|
||||
|
Reference in New Issue
Block a user