@@ -851,17 +878,17 @@ radioGroupField optMsg mkOpts = Field{..}
fieldParse (s:_) _
| s == "" = return $ Right Nothing
| otherwise = do
- OptionList{olReadExternal} <- liftHandler mkOpts
- return . maybe (Left . SomeMessage $ MsgInvalidEntry s) (Right . Just) $ olReadExternal s
+ readExternal <- view _olReadExternal <$> liftHandler mkOpts
+ return . maybe (Left . SomeMessage $ MsgInvalidEntry s) (Right . Just) $ readExternal s
fieldView theId name attrs val isReq = do
- OptionList{olOptions} <- liftHandler mkOpts
+ options <- toListOf _olOptions <$> liftHandler mkOpts -- TODO: Support grouped?
let
rendered = case val of
Left _ -> ""
- Right a -> maybe "" optionExternalValue $ find ((== a) . optionInternalValue) olOptions
+ Right a -> maybe "" optionExternalValue $ find ((== a) . optionInternalValue) options
- isSel Nothing = rendered `notElem` map optionExternalValue olOptions
+ isSel Nothing = rendered `notElem` map optionExternalValue options
isSel (Just opt) = rendered == optionExternalValue opt
[whamlet|
$newline never
@@ -872,7 +899,7 @@ radioGroupField optMsg mkOpts = Field{..}