diff --git a/Foundation.hs b/Foundation.hs index fd9cec6..4031f32 100755 --- a/Foundation.hs +++ b/Foundation.hs @@ -127,10 +127,6 @@ renderLayout widget = do withUrlRenderer $(hamletFile "templates/default-layout-wrapper.hamlet") -formLayout :: Widget -> Handler Html -formLayout widget = - renderLayout $(widgetFile "form-widget") - approotRequest :: App -> Request -> T.Text approotRequest master req = case requestHeaderHost req of diff --git a/Handler/Activate.hs b/Handler/Activate.hs index 2df1092..97e89fb 100755 --- a/Handler/Activate.hs +++ b/Handler/Activate.hs @@ -32,7 +32,7 @@ getActivateR token = do Just (Entity _ uToken) -> do user <- runDB $ getJust (fromJust $ tokenUser uToken) let hexSalt = toHex $ userSalt user - formLayout $ do + defaultLayout $ do setTitle "Activate your account" $(widgetFile "activate") _ -> do @@ -44,7 +44,7 @@ getActivateR token = do case mToken of Just (Entity _ _) -> do let hexSalt = toHex uSalt - formLayout $ + defaultLayout $ $(widgetFile "activate") _ -> do setMessage "Invalid token!" diff --git a/Handler/AdminAlbumSettings.hs b/Handler/AdminAlbumSettings.hs index 3724f88..97a1206 100755 --- a/Handler/AdminAlbumSettings.hs +++ b/Handler/AdminAlbumSettings.hs @@ -69,7 +69,7 @@ getAdminAlbumSettingsR albumId = do (adminAlbumSettingsWidget, enctype) <- generateFormPost $ renderBootstrap3 BootstrapBasicForm $ adminAlbumSettingsForm album albumId users - formLayout $ do + defaultLayout $ do setTitle "Administration: Album settings" $(widgetFile "adminAlbumSet") Nothing -> do diff --git a/Handler/AdminComments.hs b/Handler/AdminComments.hs index 3da0fea..64fb529 100755 --- a/Handler/AdminComments.hs +++ b/Handler/AdminComments.hs @@ -29,7 +29,7 @@ getAdminCommentR = do media <- runDB $ selectList [] [Desc MediumTime] comments <- runDB $ selectList [CommentParent ==. Nothing] [Desc CommentTime] replies <- runDB $ selectList [CommentParent !=. Nothing] [Desc CommentTime] - formLayout $ do + defaultLayout $ do setTitle "Administration: Comments" $(widgetFile "adminComments") Left (errorMsg, route) -> do diff --git a/Handler/AdminMediumSettings.hs b/Handler/AdminMediumSettings.hs index b976865..63529ae 100755 --- a/Handler/AdminMediumSettings.hs +++ b/Handler/AdminMediumSettings.hs @@ -47,7 +47,7 @@ getAdminMediumSettingsR mediumId = do (adminMediumSetWidget, enctype) <- generateFormPost $ renderBootstrap3 BootstrapBasicForm $ adminMediumSetForm medium - formLayout $ do + defaultLayout $ do setTitle "Administration: Medium Settings" $(widgetFile "adminMediumSet") Nothing -> do diff --git a/Handler/AdminProfileSettings.hs b/Handler/AdminProfileSettings.hs index 98cde02..66be74b 100755 --- a/Handler/AdminProfileSettings.hs +++ b/Handler/AdminProfileSettings.hs @@ -88,7 +88,7 @@ getAdminProfileSettingsR ownerId = do (adminProfileSetWidget, enctype) <- generateFormPost $ renderBootstrap3 BootstrapBasicForm $ adminProfileForm owner - formLayout $ do + defaultLayout $ do setTitle "Administration: Profile settings" $(widgetFile "adminProfileSettings") Nothing -> do diff --git a/Handler/AlbumSettings.hs b/Handler/AlbumSettings.hs index 1886bd2..0e7578e 100755 --- a/Handler/AlbumSettings.hs +++ b/Handler/AlbumSettings.hs @@ -41,7 +41,7 @@ getAlbumSettingsR albumId = do (albumSettingsWidget, enctype) <- generateFormPost $ renderBootstrap3 BootstrapBasicForm $ albumSettingsForm album albumId users - formLayout $ do + defaultLayout $ do setTitle "Eidolon :: Album Settings" $(widgetFile "albumSettings") False -> do @@ -152,7 +152,7 @@ getAlbumDeleteR albumId = do if userId == ownerId then do - formLayout $ do + defaultLayout $ do setTitle $ toHtml ("Eidolon :: Delete album" `T.append` (albumTitle album)) $(widgetFile "albumDelete") else do diff --git a/Handler/Medium.hs b/Handler/Medium.hs index b571ccf..6a9ef3e 100755 --- a/Handler/Medium.hs +++ b/Handler/Medium.hs @@ -138,7 +138,7 @@ getCommentReplyR commentId = do (replyWidget, enctype) <- generateFormPost $ renderBootstrap3 BootstrapBasicForm $ commentForm userId userSl mediumId (Just commentId) - formLayout $ do + defaultLayout $ do setTitle "Eidolon :: Reply to comment" $(widgetFile "commentReply") Nothing -> do @@ -217,7 +217,7 @@ getCommentDeleteR commentId = do if Just userId == Just (commentAuthor comment) then do - formLayout $ do + defaultLayout $ do setTitle "Eidolon :: Delete comment" $(widgetFile "commentDelete") else do diff --git a/Handler/MediumSettings.hs b/Handler/MediumSettings.hs index ea5f034..12ee17e 100755 --- a/Handler/MediumSettings.hs +++ b/Handler/MediumSettings.hs @@ -31,7 +31,7 @@ getMediumSettingsR mediumId = do (mediumSettingsWidget, enctype) <- generateFormPost $ renderBootstrap3 BootstrapBasicForm $ mediumSettingsForm medium - formLayout $ do + defaultLayout $ do setTitle "Eidolon :: Medium Settings" $(widgetFile "mediumSettings") Left (errorMsg, route) -> do @@ -81,7 +81,7 @@ getMediumDeleteR mediumId = do checkRes <- mediumCheck mediumId case checkRes of Right medium -> - formLayout $ do + defaultLayout $ do setTitle "Eidolon :: Delete Medium" $(widgetFile "mediumDelete") Left (errorMsg, route) -> do diff --git a/Handler/ProfileDelete.hs b/Handler/ProfileDelete.hs index ced25b7..388551d 100755 --- a/Handler/ProfileDelete.hs +++ b/Handler/ProfileDelete.hs @@ -29,7 +29,7 @@ getProfileDeleteR userId = do checkRes <- profileCheck userId case checkRes of Right user -> - formLayout $ do + defaultLayout $ do setTitle "Eidolon :: Delete user profile" $(widgetFile "profileDelete") Left (errorMsg, route) -> do diff --git a/Handler/ProfileSettings.hs b/Handler/ProfileSettings.hs index 42cbe44..4f7e31f 100755 --- a/Handler/ProfileSettings.hs +++ b/Handler/ProfileSettings.hs @@ -27,7 +27,7 @@ getProfileSettingsR userId = do Right user -> do (profileSettingsWidget, enctype) <- generateFormPost $ renderBootstrap3 BootstrapBasicForm $ profileSettingsForm user - formLayout $ do + defaultLayout $ do setTitle "Eidolon :: Profile settings" $(widgetFile "profileSettings") Left (errorMsg, route) -> do diff --git a/Handler/Reactivate.hs b/Handler/Reactivate.hs index a5a50cc..a24da32 100755 --- a/Handler/Reactivate.hs +++ b/Handler/Reactivate.hs @@ -23,7 +23,7 @@ import Data.Text.Encoding getReactivateR :: Handler Html getReactivateR = do (reactivateWidget, enctype) <- generateFormPost $ renderBootstrap3 BootstrapBasicForm $ reactivateForm - formLayout $ do + defaultLayout $ do setTitle "Eidolon :: Reactivate account" $(widgetFile "reactivate")