This works around a bug in the EvilSplicer
This commit is contained in:
Joey Hess 2013-04-26 15:20:31 -04:00
parent 31c7ddd648
commit 440d6e331f

View file

@ -49,15 +49,14 @@ withNote field note = field { fieldView = newview }
{- Note that the toggle string must be unique on the form. -} {- Note that the toggle string must be unique on the form. -}
withExpandableNote :: Field sub master v -> (String, GWidget sub master ()) -> Field sub master v withExpandableNote :: Field sub master v -> (String, GWidget sub master ()) -> Field sub master v
withExpandableNote field (toggle, note) = withNote field expandablenote withExpandableNote field (toggle, note) = withNote field $ [whamlet|
where
ident = "toggle_" ++ toggle
expandablenote = [whamlet|
<a .btn data-toggle="collapse" data-target="##{ident}"> <a .btn data-toggle="collapse" data-target="##{ident}">
#{toggle} #{toggle}
<div ##{ident} .collapse> <div ##{ident} .collapse>
^{note} ^{note}
|] |]
where
ident = "toggle_" ++ toggle
data EnableEncryption = SharedEncryption | NoEncryption data EnableEncryption = SharedEncryption | NoEncryption
deriving (Eq) deriving (Eq)