From bdaa9c6ecf2bccdd2722ffea6c380ec76ceb1e2f Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Thu, 25 Jul 2019 08:49:58 +0200 Subject: [PATCH] refactor(notifications): notifications don't support custom icons --- src/Utils/Form.hs | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/Utils/Form.hs b/src/Utils/Form.hs index a888efb29..e7ae3b654 100644 --- a/src/Utils/Form.hs +++ b/src/Utils/Form.hs @@ -741,16 +741,15 @@ wformMessage :: (MonadHandler m) => Message -> WForm m () wformMessage = void . aFormToWForm . aformMessage formMessage :: (MonadHandler m) => Message -> MForm m (FormResult (), FieldView site) -formMessage Message{..} = do - let icn = maybeAttribute "data-icon" iconJS messageIcon - return (FormSuccess (), FieldView - { fvLabel = mempty - , fvTooltip = Nothing - , fvId = idFormMessageNoinput - , fvErrors = Nothing - , fvRequired = False - , fvInput = [whamlet|
#{messageContent}|] - }) +formMessage Message{ messageIcon = _, ..} = do -- custom icons are not currently implemented for `.notification` + return (FormSuccess (), FieldView + { fvLabel = mempty + , fvTooltip = Nothing + , fvId = idFormMessageNoinput + , fvErrors = Nothing + , fvRequired = False + , fvInput = [whamlet|
#{messageContent}|] + }) --------------------- -- Form evaluation --