Allow modification of confirmation email page
This commit is contained in:
parent
01738f354f
commit
e420705b07
@ -164,6 +164,14 @@ class (YesodAuth site, PathPiece (AuthEmailId site)) => YesodAuthEmail site wher
|
|||||||
| TS.length x >= 3 = return $ Right ()
|
| TS.length x >= 3 = return $ Right ()
|
||||||
| otherwise = return $ Left "Password must be at least three characters"
|
| otherwise = return $ Left "Password must be at least three characters"
|
||||||
|
|
||||||
|
-- | Response after sending a confirmation email.
|
||||||
|
--
|
||||||
|
-- Since 1.2.2
|
||||||
|
confirmationEmailSentResponse :: Text -> HandlerT site IO Html
|
||||||
|
confirmationEmailSentResponse identifier = defaultLayout $ do
|
||||||
|
setTitleI Msg.ConfirmationEmailSentTitle
|
||||||
|
[whamlet|<p>_{Msg.ConfirmationEmailSent identifier}|]
|
||||||
|
|
||||||
authEmail :: YesodAuthEmail m => AuthPlugin m
|
authEmail :: YesodAuthEmail m => AuthPlugin m
|
||||||
authEmail =
|
authEmail =
|
||||||
AuthPlugin "email" dispatch $ \tm ->
|
AuthPlugin "email" dispatch $ \tm ->
|
||||||
@ -249,9 +257,7 @@ registerHelper allowUsername dest = do
|
|||||||
render <- getUrlRender
|
render <- getUrlRender
|
||||||
let verUrl = render $ verify (toPathPiece lid) verKey
|
let verUrl = render $ verify (toPathPiece lid) verKey
|
||||||
lift $ sendVerifyEmail email verKey verUrl
|
lift $ sendVerifyEmail email verKey verUrl
|
||||||
lift $ defaultLayout $ do
|
lift $ confirmationEmailSentResponse identifier
|
||||||
setTitleI Msg.ConfirmationEmailSentTitle
|
|
||||||
[whamlet|<p>_{Msg.ConfirmationEmailSent identifier}|]
|
|
||||||
|
|
||||||
postRegisterR :: YesodAuthEmail master => HandlerT Auth (HandlerT master IO) Html
|
postRegisterR :: YesodAuthEmail master => HandlerT Auth (HandlerT master IO) Html
|
||||||
postRegisterR = registerHelper False registerR
|
postRegisterR = registerHelper False registerR
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
name: yesod-auth
|
name: yesod-auth
|
||||||
version: 1.2.1
|
version: 1.2.2
|
||||||
license: MIT
|
license: MIT
|
||||||
license-file: LICENSE
|
license-file: LICENSE
|
||||||
author: Michael Snoyman, Patrick Brisbin
|
author: Michael Snoyman, Patrick Brisbin
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user