diff --git a/Foundation.hs b/Foundation.hs
index 13d59cc..659308c 100755
--- a/Foundation.hs
+++ b/Foundation.hs
@@ -14,7 +14,7 @@
-- You should have received a copy of the GNU Affero General Public License
-- along with this program. If not, see .
-{-# LANGUAGE FlexibleInstances #-}
+{-# LANGUAGE FlexibleInstances, PackageImports #-}
module Foundation where
@@ -39,6 +39,9 @@ import Network.Wai
import Helper hiding (hmacKeccak)
import Yesod.Auth
import Yesod.Auth.HmacKeccak
+import "yesod-auth-hmac-keccak" Yesod.Auth.Types (gimmeFile)
+import "yesod-auth-hmac-keccak" Yesod.Auth.Message as Auth
+import Yesod.Form.Bootstrap3
import System.IO.Unsafe (unsafePerformIO)
-- | The site argument for your application. This can be a good place to
@@ -273,6 +276,74 @@ instance RenderMessage App FormMessage where
instance YesodHmacKeccak (HmacPersistDB App User Token) App where
runHmacDB = runHmacPersistDB
rawLoginRoute = Just LoginRawR
+ getNewAccountR = do
+ master <- lift $ getYesod
+ if not (appSignupBlocked $ appSettings master)
+ then do
+ tm <- getRouteToParent
+ lift $ defaultLayout $ do
+ ((_, widget), enctype) <- liftHandlerT $ runFormPost $
+ renderBootstrap3 BootstrapBasicForm $ eidolonAccountForm
+ (appTos1 $ appSettings master)
+ (appTos2 $ appSettings master)
+ render <- getUrlRenderParams
+ toWidgetHead $ gimmeFile render
+ setTitleI MsgRegisterLong
+ [whamlet|
+
+