Skip to content

Commit

Permalink
Disable registration bug fixes (#669)
Browse files Browse the repository at this point in the history
* Display correct html

* Fixed precedence bug
  • Loading branch information
zaxtax committed Mar 1, 2021
1 parent 5e3cc36 commit 975dfb9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Network/Gitit/Authentication.hs
Expand Up @@ -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
Expand Down

0 comments on commit 975dfb9

Please sign in to comment.