From 975dfb980861703370107851fd37888fd6823a85 Mon Sep 17 00:00:00 2001 From: zaxtax Date: Mon, 1 Mar 2021 16:25:50 +0000 Subject: [PATCH] Disable registration bug fixes (#669) * Display correct html * Fixed precedence bug --- src/Network/Gitit/Authentication.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Network/Gitit/Authentication.hs b/src/Network/Gitit/Authentication.hs index 1457a84a1..4c240e7f5 100644 --- a/src/Network/Gitit/Authentication.hs +++ b/src/Network/Gitit/Authentication.hs @@ -350,18 +350,18 @@ loginForm dest = do , textfield "destination" ! [thestyle "display: none;", value dest] , submit "login" "Login" ! [intAttr "tabindex" 3] ] +++ - if not (disableRegistration cfg) + (if disableRegistration cfg then noHtml else p << [ stringToHtml "If you do not have an account, " , anchor ! [href $ base' ++ "/_register?" ++ urlEncodeVars [("destination", encodeString dest)]] << "click here to get one." - ] +++ - if null (mailCommand cfg) + ]) +++ + (if null (mailCommand cfg) then noHtml else p << [ stringToHtml "If you forgot your password, " , anchor ! [href $ base' ++ "/_resetPassword"] << "click here to get a new one." - ] + ]) loginUserForm :: Handler loginUserForm = withData $ \params -> do