Skip to content

Commit

Permalink
Make button labels consistent in form (#1256)
Browse files Browse the repository at this point in the history
# Make button labels consistent in form

## JIRA Ticket

None

## Description

We had one button with 'Save' and one with 'Publish'.

## Proposed Changes

Use 'Publish' in both buttons and restore the note that explains what
publish means.

## How to Test

View a form and see the consistent buttons.


## Checklist

- [x] I have confirmed all commits have been signed.
- [x] I have added JSDoc style comments to any new functions or classes.
- [x] Relevant documentation such as READMEs, guides, and class comments
are updated.
  • Loading branch information
stevecassidy authored Dec 16, 2024
2 parents fafc607 + 5b48c7a commit 0feda60
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions app/src/gui/components/record/formButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* - Publish and Close Record(TBD)
*/

import {Button} from '@mui/material';
import {Alert, AlertTitle, Button} from '@mui/material';
import CircularProgress from '@mui/material/CircularProgress';
import {CustomMobileStepper} from './recordStepper';

Expand Down Expand Up @@ -103,7 +103,7 @@ export default function FormButtonGroup(props: any) {
data-testid="publish-close-record"
disabled={disabled}
formProps={formProps}
text={`Save and close ${record_type}`}
text={`Publish and close ${record_type}`}
is_close={'close'}
handleFormSubmit={handleFormSubmit}
is_final_view={is_final_view}
Expand All @@ -118,6 +118,14 @@ export default function FormButtonGroup(props: any) {
is_final_view={is_final_view}
/>
</div>
{disabled !== true && (
<Alert severity={'info'} variant="outlined">
<AlertTitle>What does publishing mean?</AlertTitle>
Your response is being saved automatically as a draft. When you click
publish, your response will be uploaded once your device has an
internet connection.
</Alert>
)}
</div>
);
}

0 comments on commit 0feda60

Please sign in to comment.