From d33ced3d4aa9d4e3d842ebb9c3761276077f74b8 Mon Sep 17 00:00:00 2001 From: nek0 Date: Mon, 2 Jan 2017 13:26:02 +0100 Subject: [PATCH] fix memory leak --- Handler/AdminProfileSettings.hs | 4 +++- eidolon.cabal | 2 +- templates/adminProfileSettings.hamlet | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Handler/AdminProfileSettings.hs b/Handler/AdminProfileSettings.hs index 9cd1fe6..1131e26 100755 --- a/Handler/AdminProfileSettings.hs +++ b/Handler/AdminProfileSettings.hs @@ -138,8 +138,10 @@ adminProfileForm owner = User <*> pure (userSalted owner) <*> pure (userAlbums owner) <*> areq boolField (bfs ("Admin" :: T.Text)) (Just $ userAdmin owner) - <*> areq (selectField optionsEnum) (bfs ("Default licence" :: T.Text)) (Just $ userDefaultLicence owner) + <*> areq (selectField licenses) (bfs ("Default licence" :: T.Text)) (Just $ userDefaultLicence owner) <* bootstrapSubmit ("Change settings" :: BootstrapSubmit T.Text) + where + licenses = optionsPairs $ map (\a -> (T.pack (show (toEnum a :: Licence)), a)) [-2..6] getAdminProfileDeleteR :: UserId -> Handler Html getAdminProfileDeleteR ownerId = do diff --git a/eidolon.cabal b/eidolon.cabal index 1ba38eb..5ab6ce6 100755 --- a/eidolon.cabal +++ b/eidolon.cabal @@ -1,5 +1,5 @@ name: eidolon -version: 0.1.7.1 +version: 0.1.7.2 synopsis: Image gallery in Yesod homepage: https://eidolon.nek0.eu license: AGPL-3 diff --git a/templates/adminProfileSettings.hamlet b/templates/adminProfileSettings.hamlet index 7432032..63693cb 100755 --- a/templates/adminProfileSettings.hamlet +++ b/templates/adminProfileSettings.hamlet @@ -4,7 +4,7 @@ $newline always

Profile Settings ^{adminProfileSetWidget} - Delete user + Delete user