Merge branch 'front/dz-post-data' of github.com:strapi/strapi into ctb/events

This commit is contained in:
soupette 2019-12-12 16:13:45 +01:00
commit a01112df00

View File

@ -1352,31 +1352,60 @@ const FormModal = () => {
{formatMessage({ id: getTrad('form.button.delete') })}
</Button>
)}
<CustomButton
type={isCreating ? 'submit' : 'button'}
color={
(isCreatingContentType ||
isCreatingComponent ||
isEditingCategory ||
{isCreating && state.attributeType === 'dynamiczone' && (
<CustomButton
type={isCreating ? 'submit' : 'button'}
color={
(isCreatingContentType ||
isCreatingComponent ||
isEditingCategory ||
(state.modalType === 'addComponentToDynamicZone' &&
state.step === '1' &&
!isCreatingComponentFromAView)) &&
!isCreating
? 'success'
: 'primary'
}
onClick={e => handleSubmit(e, true)}
icon={
(isCreatingAttribute &&
!isCreatingComponentFromAView &&
state.step !== '1') ||
(state.modalType === 'addComponentToDynamicZone' &&
state.step === '1' &&
!isCreatingComponentFromAView)) &&
!isCreating
? 'success'
: 'primary'
}
onClick={e => handleSubmit(e, true)}
icon={
(isCreatingAttribute &&
!isCreatingComponentFromAView &&
state.step !== '1') ||
(state.modalType === 'addComponentToDynamicZone' &&
isCreatingComponentFromAView) ||
(isCreatingComponentFromAView && state.step === '2')
}
>
{getButtonSubmitMessage()}
</CustomButton>
isCreatingComponentFromAView) ||
(isCreatingComponentFromAView && state.step === '2')
}
>
{getButtonSubmitMessage()}
</CustomButton>
)}
{state.attributeType !== 'dynamiczone' && (
<CustomButton
type={isCreating ? 'submit' : 'button'}
color={
(isCreatingContentType ||
isCreatingComponent ||
isEditingCategory ||
(state.modalType === 'addComponentToDynamicZone' &&
state.step === '1' &&
!isCreatingComponentFromAView)) &&
!isCreating
? 'success'
: 'primary'
}
onClick={e => handleSubmit(e, true)}
icon={
(isCreatingAttribute &&
!isCreatingComponentFromAView &&
state.step !== '1') ||
(state.modalType === 'addComponentToDynamicZone' &&
isCreatingComponentFromAView) ||
(isCreatingComponentFromAView && state.step === '2')
}
>
{getButtonSubmitMessage()}
</CustomButton>
)}
</div>
</section>
</ModalFooter>