summaryrefslogtreecommitdiff
path: root/Handler/Category.hs
diff options
context:
space:
mode:
authorClint Adams <clint@softwarefreedom.org>2013-10-24 15:34:15 -0400
committerClint Adams <clint@softwarefreedom.org>2013-10-24 17:39:13 -0400
commit515338784b8fc2fb5435ee4e061c092ff754d6cf (patch)
treeceb2c2660cacaa3b90a80836a9f1e0dd8941ffa2 /Handler/Category.hs
parent1725e252b7bd6bec9faecb0249961343bb27afb0 (diff)
Use newer persistent and newer Yesod
Diffstat (limited to 'Handler/Category.hs')
-rw-r--r--Handler/Category.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/Handler/Category.hs b/Handler/Category.hs
index 6a2c6df..73d9128 100644
--- a/Handler/Category.hs
+++ b/Handler/Category.hs
@@ -9,7 +9,7 @@ getCategoryR tcid = do
cat <- runDB $ get404 tcid
(formWidget, formEnctype) <- generateFormPost (timeCategoryForm cat)
defaultLayout $ do
- aDomId <- lift newIdent
+ aDomId <- newIdent
(setTitle . toHtml) ("Time category " `T.append` timeCategoryName cat)
$(widgetFile "categorypage")
@@ -22,14 +22,14 @@ postCategoryR tcid = do
_ -> return ()
defaultLayout $ do
- aDomId <- lift newIdent
+ aDomId <- newIdent
(setTitle . toHtml) ("Time category " `T.append` timeCategoryName cat)
$(widgetFile "categorypage")
-timeCategoryAForm :: TimeCategory -> AForm App App TimeCategory
+timeCategoryAForm :: TimeCategory -> AForm Handler TimeCategory
timeCategoryAForm tc = TimeCategory
<$> pure (timeCategoryName tc)
<*> areq checkBoxField "Disable" (Just (timeCategoryDisabled tc))
-timeCategoryForm :: TimeCategory -> Html -> MForm App App (FormResult TimeCategory, Widget)
+timeCategoryForm :: TimeCategory -> Html -> MForm Handler (FormResult TimeCategory, Widget)
timeCategoryForm tc h = renderDivs (timeCategoryAForm tc) h