summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorquidtum <quidtum>2020-12-07 18:07:14 -0500
committerquidtum <quidtum>2020-12-07 18:07:14 -0500
commit76d101b58f1ea60ed9fe130718ba1bae39458bca (patch)
tree10ac6e90cbcdfdc7b071bb61fa97488abff76fde
parent8ebc8839a2f76f6a61e1b0041f554c68f3a4eb88 (diff)
require form input
-rw-r--r--src/Lib.hs8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/Lib.hs b/src/Lib.hs
index 517a8d0..ca879f7 100644
--- a/src/Lib.hs
+++ b/src/Lib.hs
@@ -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