mirror of
https://github.com/strapi/strapi.git
synced 2025-08-18 13:45:25 +00:00
Merge branch 'front/dz-post-data' of github.com:strapi/strapi into ctb/events
This commit is contained in:
commit
a01112df00
@ -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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user