Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
purescript-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
142
Issues
142
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
purescript-gargantext
Commits
a0999426
Commit
a0999426
authored
Dec 01, 2022
by
Karen Konou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Document upload] Language setting
parent
4c07c92a
Pipeline
#3441
failed with stage
in 0 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
0 deletions
+42
-0
DocumentFormCreation.purs
...Gargantext/Components/DocsTable/DocumentFormCreation.purs
+42
-0
No files found.
src/Gargantext/Components/DocsTable/DocumentFormCreation.purs
View file @
a0999426
...
...
@@ -143,6 +143,45 @@ component = R.hooksComponent "documentFormCreation" cpt where
]
]
,
-- Language
H.div
{ className: intercalate " "
[ "form-group"
, (fv.hasError' "language") ?
"form-group--error" $
mempty
]
}
[
H.div { className: "form-group__label"}
[
H.label {} [ H.text "Language" ]
]
,
H.div { className: "form-group__field" }
[
B.formSelect (
bindStateKey "language"
)
[
H.option
{value: "EN"}
[ H.text "EN"]
,
H.option
{ value: "FR" }
[ H.text "FR"]
,
H.option
{ value: "Nothing" }
[ H.text "Nothing"]
, H.option
{ value: "All" }
[ H.text "All"]
]
]
]
,
-- Date
H.div
{ className: intercalate " "
...
...
@@ -218,6 +257,7 @@ type FormData =
, authors :: String
, date :: String
, abstract :: String
, language :: String
)
defaultData :: Record FormData
...
...
@@ -227,6 +267,7 @@ defaultData =
, authors : ""
, date : ""
, abstract : ""
, language : "EN"
}
documentFormValidation :: Record FormData -> Effect VForm
...
...
@@ -236,6 +277,7 @@ documentFormValidation r = foldl append mempty rules
[ FV.nonEmpty "title" r.title
, FV.nonEmpty "source" r.source
, FV.nonEmpty "authors" r.authors
, FV.nonEmpty "language" r.language
, FV.date "date" r.date
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment