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,6 +1352,7 @@ const FormModal = () => {
{formatMessage({ id: getTrad('form.button.delete') })} {formatMessage({ id: getTrad('form.button.delete') })}
</Button> </Button>
)} )}
{isCreating && state.attributeType === 'dynamiczone' && (
<CustomButton <CustomButton
type={isCreating ? 'submit' : 'button'} type={isCreating ? 'submit' : 'button'}
color={ color={
@ -1377,6 +1378,34 @@ const FormModal = () => {
> >
{getButtonSubmitMessage()} {getButtonSubmitMessage()}
</CustomButton> </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> </div>
</section> </section>
</ModalFooter> </ModalFooter>