Duplicate save/invite button at top
Adds the Save / Invite User button at the top also
This commit is contained in:
parent
c370e08f65
commit
e0bc9ac50f
1 changed files with 40 additions and 31 deletions
|
@ -132,13 +132,22 @@ const EditSubuserModal = forwardRef<HTMLHeadingElement, Props>(({ subuser, ...pr
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Modal {...props} top={false} showSpinnerOverlay={isSubmitting}>
|
<Modal {...props} top={false} showSpinnerOverlay={isSubmitting}>
|
||||||
<h2 css={tw`text-2xl`} ref={ref}>
|
<div css={tw`flex justify-between`}>
|
||||||
|
<div>
|
||||||
|
<h2 css={tw`text-2xl mr-4`} ref={ref}>
|
||||||
{subuser ?
|
{subuser ?
|
||||||
`${canEditUser ? 'Modify' : 'View'} permissions for ${subuser.email}`
|
`${canEditUser ? 'Modify' : 'View'} permissions for ${subuser.email}`
|
||||||
:
|
:
|
||||||
'Create new subuser '
|
'Create new subuser '
|
||||||
}
|
}
|
||||||
</h2>
|
</h2>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<Button type={'submit'} css={tw`w-full sm:w-auto`}>
|
||||||
|
{subuser ? 'Save' : 'Invite User'}
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<FlashMessageRender byKey={'user:edit'} css={tw`mt-4`} />
|
<FlashMessageRender byKey={'user:edit'} css={tw`mt-4`} />
|
||||||
{(!user.rootAdmin && loggedInPermissions[0] !== '*') &&
|
{(!user.rootAdmin && loggedInPermissions[0] !== '*') &&
|
||||||
<div css={tw`mt-4 pl-4 py-2 border-l-4 border-cyan-400`}>
|
<div css={tw`mt-4 pl-4 py-2 border-l-4 border-cyan-400`}>
|
||||||
|
@ -149,7 +158,7 @@ const EditSubuserModal = forwardRef<HTMLHeadingElement, Props>(({ subuser, ...pr
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
{!subuser &&
|
{!subuser &&
|
||||||
<div css={tw`mt-6`}>
|
<div css={tw`mt-4`}>
|
||||||
<Field
|
<Field
|
||||||
name={'email'}
|
name={'email'}
|
||||||
label={'User Email'}
|
label={'User Email'}
|
||||||
|
|
Loading…
Reference in a new issue