Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Commit

Permalink
Merge pull request #1932 from alti21/master
Browse files Browse the repository at this point in the history
fix(#1915):  Mark Given Name as required for new/edit Patient
  • Loading branch information
jackcmeyer authored Mar 19, 2020
2 parents e43e74a + b43facf commit 8afecaa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/input/TextInputWithLabelFormGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@ interface Props {
type: 'text' | 'email' | 'number' | 'tel'
placeholder?: string
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void
isRequired?: boolean
}

const TextInputWithLabelFormGroup = (props: Props) => {
const { value, label, name, isEditable, onChange, placeholder, type } = props
const { value, label, name, isEditable, onChange, placeholder, type, isRequired } = props
const id = `${name}TextInput`
return (
<div className="form-group">
<Label text={label} htmlFor={id} />
<Label text={label} htmlFor={id} isRequired={isRequired} />
<TextInput
id={id}
value={value}
Expand Down
1 change: 1 addition & 0 deletions src/patients/GeneralInformation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ const GeneralInformation = (props: Props) => {
onChange={(event: React.ChangeEvent<HTMLInputElement>) => {
onInputElementChange(event, 'givenName')
}}
isRequired
/>
</div>
<div className="col-md-4">
Expand Down

1 comment on commit 8afecaa

@vercel
Copy link

@vercel vercel bot commented on 8afecaa Mar 19, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.