mirror of
https://github.com/simonmichael/hledger.git
synced 2024-09-19 18:29:36 +03:00
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
|
||||
master <- getYesod
|
||||
lastmsg <- getMessage
|
||||
vd@VD{..} <- getViewData
|
||||
|
||||
-- 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">×
|
||||
<h3 .modal-title #addLabel>Add a transaction
|
||||
<div .modal-body>
|
||||
$maybe m <- msg
|
||||
$maybe m <- lastmsg
|
||||
$if isPrefixOf "Errors" (renderHtml m)
|
||||
<div #message>#{m}
|
||||
^{addform staticRootUrl vd}
|
||||
|
@ -1,4 +1,4 @@
|
||||
$maybe m <- msg
|
||||
$maybe m <- lastmsg
|
||||
$if not $ isPrefixOf "Errors" (renderHtml m)
|
||||
<div #message>#{m}
|
||||
^{widget}
|
||||
|
Loading…
Reference in New Issue
Block a user