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
c81645ff
Commit
c81645ff
authored
Dec 31, 2020
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[bootstrap v4] login screen styling
parent
834f301c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
41 deletions
+38
-41
Tools.purs
src/Gargantext/Components/Forest/Tree/Node/Tools.purs
+1
-2
Login.purs
src/Gargantext/Components/Login.purs
+37
-39
No files found.
src/Gargantext/Components/Forest/Tree/Node/Tools.purs
View file @
c81645ff
...
@@ -232,10 +232,9 @@ submitButtonHref action href =
...
@@ -232,10 +232,9 @@ submitButtonHref action href =
checkbox :: R.State Boolean -> R.Element
checkbox :: R.State Boolean -> R.Element
checkbox ( val /\ set ) =
checkbox ( val /\ set ) =
H.input {
id: "checkbox-id
"
H.input {
className : "form-check-input
"
, type: "checkbox"
, type: "checkbox"
, value: val
, value: val
, className : "checkbox"
, on: { click: \_ -> set $ const $ not val}
, on: { click: \_ -> set $ const $ not val}
}
}
...
...
src/Gargantext/Components/Login.purs
View file @
c81645ff
...
@@ -73,12 +73,12 @@ modalCpt = R.hooksComponentWithModule thisModule "modal" cpt where
...
@@ -73,12 +73,12 @@ modalCpt = R.hooksComponentWithModule thisModule "modal" cpt where
elems =
elems =
[ H.div { id: "loginModal", className: modalClass (fst visible), key: 0
[ H.div { id: "loginModal", className: modalClass (fst visible), key: 0
, role: "dialog", "data": {show: true}, style: {display: "block"}}
, role: "dialog", "data": {show: true}, style: {display: "block"}}
[ H.div { className: "modal-dialog", role: "document"}
[ H.div { className: "modal-dialog
modal-lg
", role: "document"}
[ H.div { className: "modal-content" }
[ H.div { className: "modal-content" }
[ H.div { className: "modal-header" }
[ H.div { className: "modal-header" }
[
[ closing
logo
, logo
, closing
]
]
, H.div { className: "modal-body" } children ] ] ] ]
, H.div { className: "modal-body" } children ] ] ] ]
modalClass s = "modal myModal" <> if s then "" else " fade"
modalClass s = "modal myModal" <> if s then "" else " fade"
logo =
logo =
...
@@ -91,7 +91,7 @@ modalCpt = R.hooksComponentWithModule thisModule "modal" cpt where
...
@@ -91,7 +91,7 @@ modalCpt = R.hooksComponentWithModule thisModule "modal" cpt where
closing = H.button { "type": "button", className: "close"
closing = H.button { "type": "button", className: "close"
, "data": { dismiss: "modal" } }
, "data": { dismiss: "modal" } }
[ H.a { on: {click}
[ H.a { on: {click}
, className: "btn
glyphicon glyphicon-remove-circle"
, className: "btn
fa fa-times"
-- TODO , font-size : "50px"
-- TODO , font-size : "50px"
} []
} []
]
]
...
@@ -187,38 +187,33 @@ formCpt = R.hooksComponentWithModule thisModule "form" cpt where
...
@@ -187,38 +187,33 @@ formCpt = R.hooksComponentWithModule thisModule "form" cpt where
username <- R.useState' ""
username <- R.useState' ""
password <- R.useState' ""
password <- R.useState' ""
setBox@(checkBox /\ setCheckBox) <- R.useState' false
setBox@(checkBox /\ setCheckBox) <- R.useState' false
pure $ R2.row
pure $ R2.row [
[ cardGroup
H.form { className: "col-md-12" } [
[ cardBlock
H.h4 { className: "text-center" } {-className: "text-muted"-} [
[ center
H.text $ "Login to garg://" <> show backend
[ H.h4 {}{-className: "text-muted"-}
]
[ H.text $ "Login to garg://" <> show backend]
, requestAccessLink {}
, requestAccessLink {}
, csrfTokenInput {}
]
, formGroup [ H.p {} [ H.text (fst error) ], usernameInput username ]
, H.div {}
, formGroup [ passwordInput password, clearfix {} ]
[ csrfTokenInput {}
, H.div { className: "form-group form-check text-center" } [
, formGroup [ H.p {} [ H.text (fst error) ], usernameInput username ]
checkbox setBox
, formGroup [ passwordInput password, clearfix {} ]
, H.label { className: "form-check-label" } [
, center
H.text "I hereby accept "
[ H.label {}
, H.a { target: "_blank"
[ H.div {className: "checkbox"}
, href: "http://gitlab.iscpif.fr/humanities/tofu/tree/master"
[ checkbox setBox
} [ H.text "the terms of use" ]
, H.text "I hereby accept "
]
, H.a { target: "_blank"
]
, href: "http://gitlab.iscpif.fr/humanities/tofu/tree/master"
, if checkBox == true
} [ H.text "the terms of use" ]
&& fst username /= ""
]
&& fst password /= ""
]
then H.div { className: "text-center" } [
]
loginSubmit $ onClick props error username password
]
]
, if checkBox == true
else H.div {} []
&& fst username /= ""
&& fst password /= ""
then H.div {} [center [loginSubmit $ onClick props error username password]]
else H.div {} []
]
]
]
]
]
onClick {backend, sessions, visible} error username password e =
onClick {backend, sessions, visible} error username password e =
launchAff_ $ do
launchAff_ $ do
let req = AuthRequest {username: fst username, password: fst password}
let req = AuthRequest {username: fst username, password: fst password}
...
@@ -244,18 +239,21 @@ termsLink _ =
...
@@ -244,18 +239,21 @@ termsLink _ =
requestAccessLink :: {} -> R.Element
requestAccessLink :: {} -> R.Element
requestAccessLink _ =
requestAccessLink _ =
H.a { target: "_blank", href: applyUrl } [ H.text " request access" ]
H.div { className: "text-center" } [
H.a { href: applyUrl
, target: "_blank" } [ H.text " request access" ]
]
where applyUrl = "https://iscpif.fr/apply-for-a-services-account/"
where applyUrl = "https://iscpif.fr/apply-for-a-services-account/"
usernameInput :: R.State String -> R.Element
usernameInput :: R.State String -> R.Element
usernameInput username =
usernameInput username =
H.input { className: "form-control"
H.input { className: "form-control"
, defaultValue: (fst username)
, id: "id_username"
, id: "id_username"
, maxLength: "254"
, maxLength: "254"
, name: "username"
, name: "username"
, placeholder: "username"
, placeholder: "username"
, type: "text"
, type: "text"
, defaultValue: (fst username)
--, on: {input: \e -> dispatch (SetUserName $ R.unsafeEventValue e)}
--, on: {input: \e -> dispatch (SetUserName $ R.unsafeEventValue e)}
, on: {change: \e -> (snd username) $ const $ R.unsafeEventValue e} }
, on: {change: \e -> (snd username) $ const $ R.unsafeEventValue e} }
...
...
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