diff --git a/src/App/Page/DomainList.purs b/src/App/Page/DomainList.purs index 44f7fb1..88ba0be 100644 --- a/src/App/Page/DomainList.purs +++ b/src/App/Page/DomainList.purs @@ -16,6 +16,7 @@ import Prelude (Unit, bind, discard, map, otherwise, pure, ($), (/=), (<<<), (<> import Data.Array as A import Data.ArrayBuffer.Types (ArrayBuffer) import Data.Either (Either(..)) +import Data.String (toLower) import Data.Maybe (Maybe(..), maybe) import Data.String.Utils (endsWith) import Effect.Aff.Class (class MonadAff) @@ -226,7 +227,7 @@ handleAction = case _ of HandleNewDomainInput adduserinp -> do case adduserinp of INP_newdomain v -> do - H.modify_ _ { newDomainForm { new_domain = v } } + H.modify_ _ { newDomainForm { new_domain = toLower v } } case v of "" -> H.modify_ _ { newDomainForm { _errors = [] } } _ -> case Validation.label v of diff --git a/src/App/Page/Zone.purs b/src/App/Page/Zone.purs index 433f7ab..ece6b11 100644 --- a/src/App/Page/Zone.purs +++ b/src/App/Page/Zone.purs @@ -31,6 +31,7 @@ import Data.Tuple (Tuple(..)) import Data.ArrayBuffer.Types (ArrayBuffer) import Data.Array.NonEmpty as NonEmpty import Data.Either (Either(..)) +import Data.String (toLower) import Data.String.CodePoints as CP -- import Data.Foldable as Foldable import Data.Maybe (Maybe(..), fromMaybe, maybe) @@ -1027,7 +1028,7 @@ loopE f a = case (A.head a) of update_field :: ResourceRecord -> Field -> ResourceRecord update_field rr updated_field = case updated_field of - Field_Domain val -> rr { name = val } + Field_Domain val -> rr { name = toLower val } Field_Target val -> rr { target = val } Field_TTL val -> rr { ttl = fromMaybe 0 (fromString val) } Field_Priority val -> rr { priority = fromString val }