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
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
Grégoire Locqueville
purescript-gargantext
Commits
e1cf1abf
Commit
e1cf1abf
authored
Dec 06, 2022
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/445-dev-doc-upload-language' into dev-merge
parents
34ac667f
a0999426
Changes
1
Show 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 @
e1cf1abf
...
@@ -142,6 +142,45 @@ component = R.hooksComponent "documentFormCreation" cpt where
...
@@ -142,6 +142,45 @@ component = R.hooksComponent "documentFormCreation" cpt where
[ H.text "Please enter at least one author" ]
[ H.text "Please enter at least one author" ]
]
]
]
]
,
-- 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
-- Date
H.div
H.div
...
@@ -218,6 +257,7 @@ type FormData =
...
@@ -218,6 +257,7 @@ type FormData =
, authors :: String
, authors :: String
, date :: String
, date :: String
, abstract :: String
, abstract :: String
, language :: String
)
)
defaultData :: Record FormData
defaultData :: Record FormData
...
@@ -227,6 +267,7 @@ defaultData =
...
@@ -227,6 +267,7 @@ defaultData =
, authors : ""
, authors : ""
, date : ""
, date : ""
, abstract : ""
, abstract : ""
, language : "EN"
}
}
documentFormValidation :: Record FormData -> Effect VForm
documentFormValidation :: Record FormData -> Effect VForm
...
@@ -236,6 +277,7 @@ documentFormValidation r = foldl append mempty rules
...
@@ -236,6 +277,7 @@ documentFormValidation r = foldl append mempty rules
[ FV.nonEmpty "title" r.title
[ FV.nonEmpty "title" r.title
, FV.nonEmpty "source" r.source
, FV.nonEmpty "source" r.source
, FV.nonEmpty "authors" r.authors
, FV.nonEmpty "authors" r.authors
, FV.nonEmpty "language" r.language
, FV.date "date" r.date
, 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