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

Commit

Permalink
fix(#1915): ark required fields as required for new/edit Patient
Browse files Browse the repository at this point in the history
  • Loading branch information
alti21 committed Mar 19, 2020
1 parent e43e74a commit b43facf
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
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
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

0 comments on commit b43facf

Please sign in to comment.