Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix display issue with TitledBox in Project Form #1658

Open
wants to merge 7 commits into
base: development
Choose a base branch
from
Open
34 changes: 32 additions & 2 deletions client/src/components/ProjectForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ export default function ProjectForm({
!isEdit ? 'secondary' : !editMode ? 'contained' : 'secondary'
}
cursor="pointer"
disabled={isEdit && !isLoading ? !editMode : false}
disabled={isEdit && isLoading ? !editMode : false}
>
{isLoading ? <CircularProgress /> : 'Save'}
</StyledButton>
Expand All @@ -302,7 +302,37 @@ export default function ProjectForm({
</Grid>
</Box>
) : (
''
<TitledBox title={'Project Information'}>
{' '}
<form
id="project-form"
onSubmit={handleSubmit((data) => {
isEdit ? submitEditProject(data) : submitNewProject(data);
})}
>
{arr.map((input) => (
<ValidatedTextField
key={input.name}
register={register}
isEdit={isEdit}
editMode={editMode}
locationType={locationType}
locationRadios={locationRadios}
errors={errors}
input={input}
/>
))}
<ChangesModal
open={isModalOpen}
onClose={handleClose}
destination={'/projects'}
aria-labelledby="modal-modal-title"
aria-describedby="modal-modal-description"
handleClose={handleClose}
/>
</form>
{''}
</TitledBox>
)}
</Box>
) : (
Expand Down
Loading