From 179f003c321d82738b17b72f748a7a873e173c5a Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Thu, 22 Nov 2018 22:18:39 +0100 Subject: [PATCH] Ajax'ed authpreds --- src/Handler/Home.hs | 6 +++--- templates/authpreds.hamlet | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Handler/Home.hs b/src/Handler/Home.hs index 430583bf8..f6f329951 100644 --- a/src/Handler/Home.hs +++ b/src/Handler/Home.hs @@ -290,11 +290,11 @@ postAuthPredsR = do <$> funcForm taForm (fslI MsgActiveAuthTags) True <* submitButton - formResult authActiveRes $ \authTagActive -> do + formResultModal authActiveRes AuthPredsR $ \authTagActive -> do setSessionJson SessionActiveAuthTags authTagActive - addMessageI Success MsgAuthPredsActiveChanged - redirect AuthPredsR + tell . pure =<< messageI Success MsgAuthPredsActiveChanged defaultLayout $ do setTitleI MsgAuthPredsActive + isModal <- hasCustomHeader HeaderIsModal $(widgetFile "authpreds") diff --git a/templates/authpreds.hamlet b/templates/authpreds.hamlet index 4f04f04b7..abb3042c3 100644 --- a/templates/authpreds.hamlet +++ b/templates/authpreds.hamlet @@ -1,2 +1,2 @@ -
+ ^{authActiveWidget}