Do not show bidi button if there is an error
authorJoachim Breitner <mail@joachim-breitner.de>
Wed, 15 Sep 2010 13:57:24 +0000 (13:57 +0000)
committerJoachim Breitner <mail@joachim-breitner.de>
Wed, 15 Sep 2010 13:57:24 +0000 (13:57 +0000)
b18n-combined-cgi.hs

index b28a464..7593a22 100644 (file)
@@ -113,14 +113,15 @@ page (PageInfo {..}) =
                        ) 
                        
                ) +++
-                ( htmlMB astError $ \err -> 
+                ( case astError of 
+                  Just err -> 
                      maindiv << p << (
                         "There was an error with the view function:" +++ br +++
                         pre << err +++ br +++
-                        mkSubmit True Check)
-                ) +++
-               -- p << astInfo mbAST +++
-               maindiv ! [ identifier "output" ]<< (
+                        mkSubmit True Check
+                     )
+                 Nothing -> 
+                     maindiv ! [ identifier "output" ]<< (
                        p << ( "You can try all three bidirectionalization methods." ) +++
                        p << (  concatHtml (map (\mode -> 
                                  radio "b18nMode" (show mode) 
@@ -141,6 +142,7 @@ page (PageInfo {..}) =
                             )
 
                         )
+                     )
                ) +++
                 ( htmlMB playCodeMB $ \playCode -> maindiv << ( 
                     p << (  "You can now play with the code. You can modify the " +++