webapp: Fix bad interaction between required fields and modals.
This commit is contained in:
parent
c941523b63
commit
7b032dbbc8
14 changed files with 50 additions and 13 deletions
|
@ -5,7 +5,7 @@
|
|||
- Licensed under the GNU AGPL version 3 or higher.
|
||||
-}
|
||||
|
||||
{-# LANGUAGE CPP, TypeFamilies, QuasiQuotes, MultiParamTypeClasses, TemplateHaskell, OverloadedStrings, RankNTypes #-}
|
||||
{-# LANGUAGE CPP, FlexibleContexts, TypeFamilies, QuasiQuotes, MultiParamTypeClasses, TemplateHaskell, OverloadedStrings, RankNTypes #-}
|
||||
|
||||
module Assistant.WebApp.Configurators.AWS where
|
||||
|
||||
|
@ -23,7 +23,6 @@ import Types.Remote (RemoteConfig)
|
|||
import Types.StandardGroups
|
||||
import Logs.PreferredContent
|
||||
|
||||
import Yesod
|
||||
import qualified Data.Text as T
|
||||
import qualified Data.Map as M
|
||||
|
||||
|
@ -74,6 +73,15 @@ s3InputAForm = AWSInput
|
|||
, ("Reduced redundancy (costs less)", ReducedRedundancy)
|
||||
]
|
||||
|
||||
textField' :: RenderMessage master FormMessage => Field sub master Text
|
||||
textField' = Field
|
||||
{ fieldParse = fieldParse textField
|
||||
, fieldView = \theId name attrs val _isReq ->
|
||||
[whamlet|
|
||||
<input id="#{theId}" name="#{name}" *{attrs} type="text" value="#{either id id val}">
|
||||
|]
|
||||
}
|
||||
|
||||
glacierInputAForm :: AForm WebApp WebApp AWSInput
|
||||
glacierInputAForm = AWSInput
|
||||
<$> areq textField "Access Key ID" Nothing
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue