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

[bootstrap v4] styling for file upload

parent 8b43996a
...@@ -71,22 +71,29 @@ type UploadFile = ...@@ -71,22 +71,29 @@ 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 =
[ R2.row
[ H.div { className:"col-12 flex-space-around"}
[ H.div { className: "form-group" }
[ H.input { type: "file" [ H.input { type: "file"
, className: "form-control"
, placeholder: "Choose file" , placeholder: "Choose file"
, on: {change: onChangeContents mFile} , on: {change: onChangeContents mFile}
} }
] ]
, H.div {className:"col-md-3 flex-space-around"} ]
]
, R2.row
[ H.div {className:"col-6 flex-space-around"}
[ formChoiceSafe [ CSV [ formChoiceSafe [ CSV
, CSV_HAL , CSV_HAL
, WOS , WOS
...@@ -94,10 +101,12 @@ uploadFileViewCpt = R.hooksComponentWithModule thisModule "uploadFileView" cpt ...@@ -94,10 +101,12 @@ uploadFileViewCpt = R.hooksComponentWithModule thisModule "uploadFileView" cpt
, Arbitrary , Arbitrary
] CSV setFileType ] CSV setFileType
] ]
]
, H.div {className:"col-md-3 flex-space-around"} , R2.row
[ H.div {className:"col-6 flex-space-around"}
[ formChoiceSafe [EN, FR, No_extraction, Universal] EN setLang ] [ 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