Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runSecureNavigation fails with submitButton widget #67

Open
nickgeoca opened this issue Sep 29, 2015 · 0 comments
Open

runSecureNavigation fails with submitButton widget #67

nickgeoca opened this issue Sep 29, 2015 · 0 comments

Comments

@nickgeoca
Copy link

Description: runSecureNavigation appears to fail with submitButton widget. Behavior is after submiting data, one expects next page to load, but repeats the same page with submitButton. It has behaved differently before in that it goes to next page, but then goes back to submitButton page when user tries to go forward.
Line: haskell <** submitButton "Submit"
Version:

  • GHC 7.10.2
  • MFlow-0.4.5.11
{-# LANGUAGE OverloadedStrings #-}

module Main
where
import MFlow.Wai.Blaze.Html.All hiding(main)
import qualified MFlow.Forms as F
import Data.Typeable
import System.IO.Unsafe


sitePages :: FlowM Html IO ()
sitePages = do 
  page $ wlink () << b "Here A"
  page $ wlink () << b "Here B"
  someVal <- page  
    $   getString Nothing <! hint "Test" 
    <++ br
    <** submitButton "Submit"
  page $ wlink () << b "Here 1"
  page $ wlink () << b "Here 2"
  where
  hint x = [("placeholder", x)]

main :: IO ()
main = do 
  setAdminUser ("admin"::String) (""::String)
  runSecureNavigation "" . transientNav $ do
      sitePages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant