Commit 4f875e54 authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Merge branch 'EditMembers-BugFix' into 'v1.0.4'

EditMembers accessibility (#764)

See merge request !589
parents cbdc5a0a fa44f94d
Pipeline #126187 passed with stages
in 32 minutes and 44 seconds
...@@ -331,6 +331,7 @@ DeleteAction.propTypes = { ...@@ -331,6 +331,7 @@ DeleteAction.propTypes = {
function EditMembersDialog({...props}) { function EditMembersDialog({...props}) {
const classes = useStyles() const classes = useStyles()
const {disabled} = props
const {api} = useApi() const {api} = useApi()
const {raiseError} = useErrors() const {raiseError} = useErrors()
const {upload, setUpload} = useContext(uploadPageContext) const {upload, setUpload} = useContext(uploadPageContext)
...@@ -409,7 +410,7 @@ function EditMembersDialog({...props}) { ...@@ -409,7 +410,7 @@ function EditMembersDialog({...props}) {
return <editMembersDialogContext.Provider value={contextValue}> return <editMembersDialogContext.Provider value={contextValue}>
<React.Fragment> <React.Fragment>
<IconButton onClick={handleOpenDialog}> <IconButton onClick={handleOpenDialog} disabled={disabled} data-testid='edit-members-action'>
<Tooltip title="Manage upload members"> <Tooltip title="Manage upload members">
<MembersIcon/> <MembersIcon/>
</Tooltip> </Tooltip>
...@@ -454,5 +455,8 @@ function EditMembersDialog({...props}) { ...@@ -454,5 +455,8 @@ function EditMembersDialog({...props}) {
</React.Fragment> </React.Fragment>
</editMembersDialogContext.Provider> </editMembersDialogContext.Provider>
} }
EditMembersDialog.propTypes = {
disabled: PropTypes.bool
}
export default EditMembersDialog export default EditMembersDialog
...@@ -495,7 +495,7 @@ function UploadPage() { ...@@ -495,7 +495,7 @@ function UploadPage() {
</WithButton> </WithButton>
</Grid> </Grid>
<Grid> <Grid>
<EditMembersDialog/> <EditMembersDialog disabled={!isWriter}/>
<UploadDownloadButton tooltip="Download files" query={{'upload_id': uploadId}} /> <UploadDownloadButton tooltip="Download files" query={{'upload_id': uploadId}} />
<IconButton disabled={isPublished || !isWriter} onClick={handleReprocess}> <IconButton disabled={isPublished || !isWriter} onClick={handleReprocess}>
<Tooltip title="Reprocess"> <Tooltip title="Reprocess">
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment