Commit 143696db authored by Ibnu Daru Aji's avatar Ibnu Daru Aji

login layout.

parent f21104e9
......@@ -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
......
<.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
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