mirror of
https://github.com/Haiti-Distributed-Healthcare-System/hdhs.git
synced 2026-11-08 07:15:59 +00:00
removed option for radio buttons from the form, changed to checkboxes
This commit is contained in:
1 parent
41f952e504
commit
8f24ff081b
2 files changed
+21
-57
No files matched your search
@@ -73,16 +73,12 @@
|
||||
"id": "headache"
|
||||
},
|
||||
{
|
||||
"name": "Hernia",
|
||||
"group-title": "Hernia",
|
||||
"id": "hernia",
|
||||
"radio-buttons": {
|
||||
"radio-buttons-title": "Hernia Type",
|
||||
"radio-buttons": [
|
||||
{ "name": "Inguinal", "id": "inguinal" },
|
||||
{ "name": "Umbilical", "id": "umbilical" },
|
||||
{ "name": "Both", "id": "both" }
|
||||
]
|
||||
}
|
||||
"group": [
|
||||
{ "name": "Inguinal", "id": "inguinal" },
|
||||
{ "name": "Umbilical", "id": "umbilical" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "cardiovascular",
|
||||
@@ -99,41 +95,29 @@
|
||||
"id": "musculoskeletal"
|
||||
},
|
||||
{
|
||||
"name": "Otitis",
|
||||
"group-title": "Otitis",
|
||||
"id": "otitis",
|
||||
"radio-buttons": {
|
||||
"radio-buttons-title": "",
|
||||
"radio-buttons": [
|
||||
{ "name": "Right", "id": "right" },
|
||||
{ "name": "Left", "id": "left" },
|
||||
{ "name": "Both", "id": "both" }
|
||||
]
|
||||
}
|
||||
"group": [
|
||||
{ "name": "Right", "id": "right" },
|
||||
{ "name": "Left", "id": "left" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Pneumonia",
|
||||
"group-title": "Pneumonia",
|
||||
"id": "pneumonia",
|
||||
"radio-buttons": {
|
||||
"radio-buttons-title": "",
|
||||
"radio-buttons": [
|
||||
{ "name": "Right", "id": "right" },
|
||||
{ "name": "Left", "id": "left" },
|
||||
{ "name": "Both", "id": "both" }
|
||||
]
|
||||
}
|
||||
|
||||
"group": [
|
||||
{ "name": "Right", "id": "right" },
|
||||
{ "name": "Left", "id": "left" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Sinusitis",
|
||||
"id": "sinusitis",
|
||||
"group-title": "",
|
||||
"radio-buttons": {
|
||||
"radio-buttons-title": "",
|
||||
"radio-buttons": [
|
||||
{ "name": "Right", "id": "right" },
|
||||
{ "name": "Left", "id": "left" },
|
||||
{ "name": "Both", "id": "both" }
|
||||
]
|
||||
}
|
||||
"group-title": "Sinusitis",
|
||||
"group": [
|
||||
{ "name": "Right", "id": "right" },
|
||||
{ "name": "Left", "id": "left" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "URI",
|
||||
|
||||
@@ -77,26 +77,6 @@ export default function DiagnosisForm(): ReactElement {
|
||||
formElements.push(<WhiteSpace size="lg" />)
|
||||
}
|
||||
|
||||
// TODO: radio buttons displayed this way are indented badly
|
||||
if (field['radio-buttons'] != null) {
|
||||
{
|
||||
field['radio-buttons']['radio-buttons'].map((i) =>
|
||||
formElements.push(
|
||||
<RadioItem
|
||||
data-testid={i.id}
|
||||
id={i.id}
|
||||
key={i.name}
|
||||
name={i.name}
|
||||
// checked={sex === i.value}
|
||||
// onClick={() => setSex(i.value)}
|
||||
>
|
||||
{i.name}
|
||||
</RadioItem>,
|
||||
),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
return <> {formElements} </>
|
||||
})}
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user