From 96e63b0299fe256bd267bef0f48d09b00de151d3 Mon Sep 17 00:00:00 2001 From: Stefan Dresselhaus Date: Mon, 27 Apr 2015 17:31:06 +0200 Subject: [PATCH] changed handler --- Foundation.hs | 3 ++- Handler/Home.hs | 40 ++++++++++++++++++++++++++-------------- 2 files changed, 28 insertions(+), 15 deletions(-) diff --git a/Foundation.hs b/Foundation.hs index fd7b35f..0d292fd 100644 --- a/Foundation.hs +++ b/Foundation.hs @@ -135,7 +135,8 @@ instance YesodAuth App where } -- You can add other plugins like BrowserID, email or OAuth here - authPlugins _ = [authBrowserId def] + authPlugins _ = [ authBrowserId def + ] authHttpManager = getHttpManager diff --git a/Handler/Home.hs b/Handler/Home.hs index 200b442..288f1e7 100644 --- a/Handler/Home.hs +++ b/Handler/Home.hs @@ -14,6 +14,7 @@ import Yesod.Form.Bootstrap3 (BootstrapFormLayout (..), renderBootstrap3, -- inclined, or create a single monolithic file. getHomeR :: Handler Html getHomeR = do + maid <- maybeAuthId (loginWidget, loginEnctype) <- generateFormPost loginForm defaultLayout $ do setTitle "NEAT" @@ -21,11 +22,18 @@ getHomeR = do

Welcome to NEAT.
- Login -
- ^{loginWidget} -