Commit 349f7110 authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

[bootstrap v4] styling for file upload

parent 8b43996a
...@@ -71,33 +71,42 @@ type UploadFile = ...@@ -71,33 +71,42 @@ type UploadFile =
uploadFileView :: Record Props -> R.Element uploadFileView :: Record Props -> R.Element
uploadFileView props = R.createElement uploadFileViewCpt props [] uploadFileView props = R.createElement uploadFileViewCpt props []
uploadFileViewCpt :: R.Component Props
uploadFileViewCpt = R.hooksComponentWithModule thisModule "uploadFileView" cpt
where where
uploadFileViewCpt :: R.Component Props
uploadFileViewCpt = R.hooksComponentWithModule thisModule "uploadFileView" cpt
cpt {dispatch, id, nodeType} _ = do cpt {dispatch, id, nodeType} _ = do
mFile :: R.State (Maybe UploadFile) <- R.useState' Nothing mFile :: R.State (Maybe UploadFile) <- R.useState' Nothing
fileType@(_ /\ setFileType) <- R.useState' CSV fileType@(_ /\ setFileType) <- R.useState' CSV
lang@( _chosenLang /\ setLang) <- R.useState' EN lang@( _chosenLang /\ setLang) <- R.useState' EN
let bodies = [ H.div { className:"col-md-6 flex-space-around"} let bodies =
[ H.input { type: "file" [ R2.row
, placeholder: "Choose file" [ H.div { className:"col-12 flex-space-around"}
, on: {change: onChangeContents mFile} [ H.div { className: "form-group" }
} [ H.input { type: "file"
] , className: "form-control"
, H.div {className:"col-md-3 flex-space-around"} , placeholder: "Choose file"
[ formChoiceSafe [ CSV , on: {change: onChangeContents mFile}
, CSV_HAL }
, WOS ]
, PresseRIS ]
, Arbitrary ]
] CSV setFileType , R2.row
] [ H.div {className:"col-6 flex-space-around"}
[ formChoiceSafe [ CSV
, H.div {className:"col-md-3 flex-space-around"} , CSV_HAL
[ formChoiceSafe [EN, FR, No_extraction, Universal] EN setLang ] , WOS
] , PresseRIS
, Arbitrary
] CSV setFileType
]
]
, R2.row
[ H.div {className:"col-6 flex-space-around"}
[ formChoiceSafe [EN, FR, No_extraction, Universal] EN setLang ]
]
]
let footer = H.div {} [ uploadButton { dispatch let footer = H.div {} [ uploadButton { dispatch
, fileType , fileType
......
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