per-IA-item content directories

This commit is contained in:
Joey Hess 2013-04-25 23:44:55 -04:00
parent 3c7f4d2bd1
commit 0ae8c82c53
12 changed files with 156 additions and 97 deletions

View file

@ -47,6 +47,18 @@ withNote field note = field { fieldView = newview }
let fieldwidget = (fieldView field) theId name attrs val isReq
in [whamlet|^{fieldwidget}&nbsp;&nbsp;<span>^{note}</span>|]
{- 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 (toggle, note) = withNote field expandablenote
where
ident = "toggle_" ++ toggle
expandablenote = [whamlet|
<a .btn data-toggle="collapse" data-target="##{ident}">
#{toggle}
<div ##{ident} .collapse>
^{note}
|]
data EnableEncryption = SharedEncryption | NoEncryption
deriving (Eq)