Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Open sidebar
Ibnu Daru Aji
Cirkeltrek
Commits
143696db
Commit
143696db
authored
Apr 23, 2018
by
Ibnu Daru Aji
Browse files
login layout.
parent
f21104e9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
1 deletion
+17
-1
src/Foundation.hs
src/Foundation.hs
+4
-1
templates/login.hamlet
templates/login.hamlet
+13
-0
No files found.
src/Foundation.hs
View file @
143696db
...
...
@@ -105,7 +105,10 @@ instance YesodAuth App where
loginDest
_
=
HomeR
logoutDest
_
=
HomeR
redirectToReferer
_
=
False
authPlugins
_
=
[
authHashDB
(
Just
.
UniqueUsername
)]
authPlugins
_
=
[
authHashDBWithForm
loginform
(
Just
.
UniqueUsername
)]
where
loginform
::
Route
App
->
Widget
loginform
action
=
$
(
whamletFile
"templates/login.hamlet"
)
authenticate
creds
=
liftHandler
$
runDB
$
do
x
<-
getBy
$
UniqueUsername
$
credsIdent
creds
case
x
of
...
...
templates/login.hamlet
0 → 100644
View file @
143696db
<.container>
<.row>
<.column>
<.column.column-50>
<form action=@{action} method=post>
<fieldset>
<label for=username-field> Username
<input #username-field name=username placeholder="Your Username." type=text>
<label for=password-field> Password
<input #password-field name=password placeholder="Your Password." type=password>
<input .button-primary value=sign-in type=submit>
<.column>
\ No newline at end of file
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