Merge pull request #47 from vv01f/patch-13

Update Common.hs
This commit is contained in:
rys ostrovid 2015-04-23 03:47:00 +02:00
commit 28e2ac1a3f

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
} }