add a default RenderMessage for forms i18n
this adds the form dependency in the cabal file
This commit is contained in:
parent
9170ce37e4
commit
b9b48273d7
@ -50,6 +50,7 @@ executable ~project~
|
|||||||
, yesod >= 0.8 && < 0.9
|
, yesod >= 0.8 && < 0.9
|
||||||
, yesod-auth >= 0.4 && < 0.5
|
, yesod-auth >= 0.4 && < 0.5
|
||||||
, yesod-static >= 0.1 && < 0.2
|
, yesod-static >= 0.1 && < 0.2
|
||||||
|
, yesod-form
|
||||||
, mime-mail
|
, mime-mail
|
||||||
, clientsession
|
, clientsession
|
||||||
, wai-extra
|
, wai-extra
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
{-# LANGUAGE QuasiQuotes, TemplateHaskell, TypeFamilies #-}
|
{-# LANGUAGE QuasiQuotes, TemplateHaskell, TypeFamilies #-}
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings, MultiParamTypeClasses #-}
|
||||||
module ~sitearg~
|
module ~sitearg~
|
||||||
( ~sitearg~ (..)
|
( ~sitearg~ (..)
|
||||||
, ~sitearg~Route (..)
|
, ~sitearg~Route (..)
|
||||||
@ -16,6 +16,7 @@ module ~sitearg~
|
|||||||
) where
|
) where
|
||||||
|
|
||||||
import Yesod
|
import Yesod
|
||||||
|
import Yesod.Form (defaultFormMessage)
|
||||||
import Yesod.Helpers.Static
|
import Yesod.Helpers.Static
|
||||||
import Yesod.Helpers.Auth
|
import Yesod.Helpers.Auth
|
||||||
import Yesod.Helpers.Auth.OpenId
|
import Yesod.Helpers.Auth.OpenId
|
||||||
@ -211,3 +212,5 @@ instance YesodAuthEmail ~sitearg~ where
|
|||||||
}
|
}
|
||||||
getEmail = runDB . fmap (fmap emailEmail) . get
|
getEmail = runDB . fmap (fmap emailEmail) . get
|
||||||
|
|
||||||
|
instance RenderMessage ~sitearg~ FormMessage where
|
||||||
|
renderMessage _ _ = defaultFormMessage
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user