digestive-functors-heist 0.8.4.1 → 0.8.5.0
raw patch · 3 files changed
+14/−2 lines, 3 files
Files
+ CHANGELOG view
@@ -0,0 +1,2 @@+- 0.8.5.0+ * Support disabling in compiled heist
digestive-functors-heist.cabal view
@@ -1,5 +1,5 @@ Name: digestive-functors-heist-Version: 0.8.4.1+Version: 0.8.5.0 Synopsis: Heist frontend for the digestive-functors library Description: Heist frontend for the digestive-functors library Homepage: http://github.com/jaspervdj/digestive-functors@@ -10,6 +10,9 @@ Category: Web Build-type: Simple Cabal-version: >= 1.6++Extra-source-files:+ CHANGELOG Library Hs-source-dirs: src
src/Text/Digestive/Heist/Compiled.hs view
@@ -152,6 +152,12 @@ --------------------------------------------------------------------------------+-- |+setDisabled :: Text -> View v -> [(Text, Text)] -> [(Text, Text)]+setDisabled ref view = if viewDisabled ref view then (("disabled",""):) else id+++-------------------------------------------------------------------------------- getRefAttributes :: X.Node -> Maybe Text -- ^ Optional default ref -> (Text, [(Text, Text)]) -- ^ (Ref, other attrs)@@ -195,7 +201,8 @@ -- If there is no bang pattern on value, then for some reason it -- doesn't get forced and errors aren't displayed properly. !value = fieldInputText ref view- return $ X.renderHtmlFragment X.UTF8 $ f ref' attrs value+ attrs' = setDisabled ref view attrs+ return $ X.renderHtmlFragment X.UTF8 $ f ref' attrs' value dfInputGeneric :: Monad m