diff options
author | quidtum <quidtum> | 2020-12-07 18:07:14 -0500 |
---|---|---|
committer | quidtum <quidtum> | 2020-12-07 18:07:14 -0500 |
commit | 76d101b58f1ea60ed9fe130718ba1bae39458bca (patch) | |
tree | 10ac6e90cbcdfdc7b071bb61fa97488abff76fde | |
parent | 8ebc8839a2f76f6a61e1b0041f554c68f3a4eb88 (diff) |
require form input
-rw-r--r-- | src/Lib.hs | 8 |
1 files changed, 2 insertions, 6 deletions
@@ -46,10 +46,6 @@ import Servant.HTML.Lucid import System.Random.Stateful import Web.FormUrlEncoded --- TODO --- nginx rate limiting --- stats report exe? - newtype DomainIden = DomainIden Integer deriving (FromField, FromHttpApiData, ToHttpApiData, ToField) newtype LineIden = LineIden Integer deriving (Eq, Ord, FromField, FromHttpApiData, ToHttpApiData, ToField, Generic, Num) newtype Color = Color T.Text deriving (FromField, ToHttpApiData, ToField) @@ -636,7 +632,7 @@ instance ToHtml DomainWriteView where Nothing -> div_ "" div_ $ do label_ [for_ "txt", class_ "focus"] "your line: " - input_ [type_ "text", name_ "txt", id_ "txt", value_ "", maxlength_ "100"] + input_ [type_ "text", name_ "txt", id_ "txt", value_ "", maxlength_ "120", required_ "1"] div_ $ do label_ [for_ "color", class_ "focus"] "your color: " input_ [type_ "color", name_ "color", id_ "color", value_ ("#" <> color)] @@ -647,7 +643,7 @@ instance ToHtml DomainWriteView where span_ $ toHtml (DomainedLine domainName dst) Nothing -> div_ "" div_ $ - button_ [type_ "submit"] "Submit" + input_ [type_ "submit", value_ "Submit"] ) toHtmlRaw = toHtml |