Commit f27e117f authored by xushu's avatar xushu

add persistence dependencies; show success page; cleaning up

parent a5ebcb08
......@@ -14,6 +14,10 @@ dependencies:
- yesod-core >=1.4.30 && <1.5
- yesod-static >=1.4.0.3 && <1.6
- yesod-form >=1.4.0 && <1.5
- yesod-persistent >=1.4.0.1
- persistent >= 2.2.4.0
- persistent-sqlite >=2.2.0
- persistent-template >=2.1.0
- classy-prelude >=0.10.2
- classy-prelude-conduit >=0.10.2
- bytestring >=0.9 && <0.11
......
......@@ -39,7 +39,7 @@ postHomeR = do
((result, formWidget), formEnctype) <- runFormPost $ renderBootstrap3 BootstrapBasicForm $ registrationForm Nothing
let submission = Nothing :: Maybe Registration
case result of
FormSuccess res -> do
FormSuccess registration -> do
redirect $ ResultR
_ -> defaultLayout $(widgetFile "homepage")
......
......@@ -12,4 +12,4 @@ import Yesod.Form.Bootstrap3 (BootstrapFormLayout (..), renderBootstrap3)
import Text.Julius (RawJS (..))
getResultR :: Handler Html
getResultR = error "TODO"
getResultR = defaultLayout $(widgetFile "success")
......@@ -23,13 +23,6 @@
<!-- Page Contents -->
<div .container>
$if not $ Just HomeR == mcurrentRoute
<ul .breadcrumb>
$forall bc <- parents
<li>
<a href="@{fst bc}">#{snd bc}
<li .active>#{title}
$maybe msg <- mmsg
<div .alert.alert-info #message>#{msg}
......
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