Update Common.hs

bitte gegen #46 testen
This commit is contained in:
Wolf 2015-04-20 00:24:23 +02:00
parent f8e5d0e8a2
commit 464aecc662

View file

@ -50,7 +50,7 @@ currencyField = Field
Right (a, "") -> Right $ floor $ 100 * a Right (a, "") -> Right $ floor $ 100 * a
_ -> Left $ MsgInvalidNumber rawVals _ -> Left $ MsgInvalidNumber rawVals
, fieldView = \theId name attr val req -> toWidget [hamlet|$newline never , fieldView = \theId name attr val req -> toWidget [hamlet|$newline never
<input id=#{theId} name=#{name} *{attr} type="number" step=0.01 min=0 :req:required="" value=#{showVal val}> <input id=#{theId} name=#{name} *{attr} type="number" step=0.01 min=0 :req:required="required" value=#{showVal val}>
|] |]
, fieldEnctype = UrlEncoded , fieldEnctype = UrlEncoded
} }
@ -65,7 +65,7 @@ amountField = Field
Right (a, "") -> Right a Right (a, "") -> Right a
_ -> Left $ MsgInvalidInteger s _ -> Left $ MsgInvalidInteger s
, fieldView = \theId name attr val req -> toWidget [hamlet|$newline never , fieldView = \theId name attr val req -> toWidget [hamlet|$newline never
<input id="crement" id=#{theId} name=#{name} *{attr} type="number" step=1 min=1 :req:required="" value="#{showVal val}"> <input id="crement" id=#{theId} name=#{name} *{attr} type="number" step=1 min=0 :req:required="required" value="#{showVal val}">
|] |]
, fieldEnctype = UrlEncoded , fieldEnctype = UrlEncoded
} }