Commit 8d608e2d authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

[Upload] types fix

parent e056a48d
......@@ -50,24 +50,28 @@ uploadFileViewCpt d = R.hooksComponent "UploadFileView" cpt
, H.div {} [ R2.select {className: "col-md-12 form-control"
, on: {change: onChangeFileType fileType}
}
( map renderOption [ CSV
, CSV_HAL
, WOS
, PresseRIS
]
( map renderOptionFT [ CSV
, CSV_HAL
, WOS
, PresseRIS
]
)
]
, H.div {} [ R2.select {className: "col-md-12 form-control"
, on: {change: onChangeLang lang}
} (map renderOption [EN, FR])
} (map renderOptionLang [EN, FR])
]
, H.div {} [ uploadButton d id mContents fileType lang ]
]
renderOption opt = H.option {} [ H.text $ show opt ]
renderOptionLang :: Lang -> R.Element
renderOptionLang opt = H.option {} [ H.text $ show opt ]
renderOptionFT :: FileType -> R.Element
renderOptionFT opt = H.option {} [ H.text $ show opt ]
onChangeContents (mContents /\ setMContents) e = do
blob <- R2.inputFileBlob e
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment