X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/40d96a9dafd0db3497a997a48ee223509de05de0..cbebc4630ca0e966b10193d77c41f3ed72567e7e:/src/views-components/sharing-dialog/sharing-invitation-form-component.tsx

diff --git a/src/views-components/sharing-dialog/sharing-invitation-form-component.tsx b/src/views-components/sharing-dialog/sharing-invitation-form-component.tsx
index b23ee6b6..201ddc7f 100644
--- a/src/views-components/sharing-dialog/sharing-invitation-form-component.tsx
+++ b/src/views-components/sharing-dialog/sharing-invitation-form-component.tsx
@@ -2,26 +2,42 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import * as React from 'react';
+import React from 'react';
 import { Field, WrappedFieldProps, FieldArray, WrappedFieldArrayProps } from 'redux-form';
-import { Grid, FormControl, InputLabel } from '@material-ui/core';
+import { Grid, FormControl, InputLabel, Tooltip, IconButton, StyleRulesCallback } from '@material-ui/core';
 import { PermissionSelect, parsePermissionLevel, formatPermissionLevel } from './permission-select';
 import { ParticipantSelect, Participant } from './participant-select';
+import { AddIcon } from 'components/icon/icon';
+import { WithStyles } from '@material-ui/core/styles';
+import withStyles from '@material-ui/core/styles/withStyles';
 
-export default () =>
-    <Grid container spacing={8}>
+const permissionManagementRowStyles: StyleRulesCallback<'root'> = theme => ({
+    root: {
+        padding: `${theme.spacing.unit}px 0`,
+    }
+});
+
+const SharingInvitationFormComponent = (props: { onSave: () => void, saveEnabled: boolean }) =>
+    <Grid container spacing={8} >
         <Grid data-cy="invite-people-field" item xs={8}>
             <InvitedPeopleField />
         </Grid>
-        <Grid data-cy="permission-select-field" item xs={4}>
+        <Grid data-cy="permission-select-field" item xs={4} container wrap='nowrap'>
             <PermissionSelectField />
+            <Tooltip title="Add authorization">
+                <IconButton onClick={props.onSave} disabled={!props.saveEnabled} color="primary">
+                    <AddIcon />
+                </IconButton>
+            </Tooltip>
         </Grid>
     </Grid>;
 
+export default SharingInvitationFormComponent;
+
 const InvitedPeopleField = () =>
     <FieldArray
         name='invitedPeople'
-        component={InvitedPeopleFieldComponent} />;
+        component={InvitedPeopleFieldComponent as any} />;
 
 
 const InvitedPeopleFieldComponent = ({ fields }: WrappedFieldArrayProps<Participant>) =>
