web: fix error message being a bit too persistent
visiting ?add=1 afresh was still showing the previous visit's error
This commit is contained in:
parent
abe47e81c2
commit
d801eb1ab7
@ -105,6 +105,7 @@ instance Yesod App where
|
|||||||
|
|
||||||
defaultLayout widget = do
|
defaultLayout widget = do
|
||||||
master <- getYesod
|
master <- getYesod
|
||||||
|
lastmsg <- getMessage
|
||||||
vd@VD{..} <- getViewData
|
vd@VD{..} <- getViewData
|
||||||
|
|
||||||
-- We break up the default layout into two components:
|
-- We break up the default layout into two components:
|
||||||
|
|||||||
@ -100,7 +100,7 @@ $newline never
|
|||||||
<button type="button" .close data-dismiss="modal" aria-hidden="true">×
|
<button type="button" .close data-dismiss="modal" aria-hidden="true">×
|
||||||
<h3 .modal-title #addLabel>Add a transaction
|
<h3 .modal-title #addLabel>Add a transaction
|
||||||
<div .modal-body>
|
<div .modal-body>
|
||||||
$maybe m <- msg
|
$maybe m <- lastmsg
|
||||||
$if isPrefixOf "Errors" (renderHtml m)
|
$if isPrefixOf "Errors" (renderHtml m)
|
||||||
<div #message>#{m}
|
<div #message>#{m}
|
||||||
^{addform staticRootUrl vd}
|
^{addform staticRootUrl vd}
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
$maybe m <- msg
|
$maybe m <- lastmsg
|
||||||
$if not $ isPrefixOf "Errors" (renderHtml m)
|
$if not $ isPrefixOf "Errors" (renderHtml m)
|
||||||
<div #message>#{m}
|
<div #message>#{m}
|
||||||
^{widget}
|
^{widget}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user