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

fix(#1915): Mark Given Name as required for new/edit Patient #1932

Merged
merged 1 commit into from
Mar 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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