refactor(notifications): notifications don't support custom icons
This commit is contained in:
parent
864338174a
commit
bdaa9c6ecf
@ -741,16 +741,15 @@ wformMessage :: (MonadHandler m) => Message -> WForm m ()
|
|||||||
wformMessage = void . aFormToWForm . aformMessage
|
wformMessage = void . aFormToWForm . aformMessage
|
||||||
|
|
||||||
formMessage :: (MonadHandler m) => Message -> MForm m (FormResult (), FieldView site)
|
formMessage :: (MonadHandler m) => Message -> MForm m (FormResult (), FieldView site)
|
||||||
formMessage Message{..} = do
|
formMessage Message{ messageIcon = _, ..} = do -- custom icons are not currently implemented for `.notification`
|
||||||
let icn = maybeAttribute "data-icon" iconJS messageIcon
|
return (FormSuccess (), FieldView
|
||||||
return (FormSuccess (), FieldView
|
{ fvLabel = mempty
|
||||||
{ fvLabel = mempty
|
, fvTooltip = Nothing
|
||||||
, fvTooltip = Nothing
|
, fvId = idFormMessageNoinput
|
||||||
, fvId = idFormMessageNoinput
|
, fvErrors = Nothing
|
||||||
, fvErrors = Nothing
|
, fvRequired = False
|
||||||
, fvRequired = False
|
, fvInput = [whamlet|<div .notification .notification-#{toPathPiece messageStatus}>#{messageContent}|]
|
||||||
, fvInput = [whamlet|<div .notification .notification-#{toPathPiece messageStatus} *{icn}>#{messageContent}|]
|
})
|
||||||
})
|
|
||||||
|
|
||||||
---------------------
|
---------------------
|
||||||
-- Form evaluation --
|
-- Form evaluation --
|
||||||
|
|||||||
Reference in New Issue
Block a user