Fix submit button

This commit is contained in:
soupette 2019-12-05 17:52:57 +01:00
parent 559548ef33
commit 6b0d0c2e6e

View File

@ -1249,7 +1249,7 @@ const FormModal = () => {
<div style={{ margin: 'auto 0' }}> <div style={{ margin: 'auto 0' }}>
{isCreatingAttribute && !isInFirstComponentStep && ( {isCreatingAttribute && !isInFirstComponentStep && (
<Button <Button
type="button" type={isCreating ? 'button' : 'submit'}
color="success" color="success"
onClick={e => { onClick={e => {
handleSubmit(e, false); handleSubmit(e, false);
@ -1287,7 +1287,7 @@ const FormModal = () => {
</Button> </Button>
)} )}
<Button <Button
type="submit" type={isCreating ? 'submit' : 'button'}
color={ color={
(isCreatingContentType || (isCreatingContentType ||
isCreatingComponent || isCreatingComponent ||
@ -1296,7 +1296,7 @@ const FormModal = () => {
? 'success' ? 'success'
: 'primary' : 'primary'
} }
onClick={handleSubmit} onClick={e => handleSubmit(e, true)}
icon={ icon={
(isCreatingAttribute && (isCreatingAttribute &&
!isCreatingComponentFromAView && !isCreatingComponentFromAView &&