Merge pull request #1783 from cblp/fix-radio

Fix according to Bootstrap 3 docs
This commit is contained in:
Michael Snoyman 2022-10-06 06:36:25 +03:00 committed by GitHub
commit e3381d590f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 25 additions and 19 deletions

View File

@ -1,5 +1,9 @@
# ChangeLog for yesod-form # ChangeLog for yesod-form
## 1.7.3
* Fixed `radioField` according to Bootstrap 3 docs. [#1783](https://github.com/yesodweb/yesod/pull/1783)
## 1.7.2 ## 1.7.2
* Added `withRadioField` and re-express `radioField` into that. [#1775](https://github.com/yesodweb/yesod/pull/1775) * Added `withRadioField` and re-express `radioField` into that. [#1775](https://github.com/yesodweb/yesod/pull/1775)

View File

@ -534,17 +534,19 @@ radioField :: (Eq a, RenderMessage site FormMessage)
radioField = withRadioField radioField = withRadioField
(\theId optionWidget -> [whamlet| (\theId optionWidget -> [whamlet|
$newline never $newline never
<label .radio for=#{theId}-none> <div .radio>
<div> <label for=#{theId}-none>
^{optionWidget} <div>
_{MsgSelectNone} ^{optionWidget}
_{MsgSelectNone}
|]) |])
(\theId value _isSel text optionWidget -> [whamlet| (\theId value _isSel text optionWidget -> [whamlet|
$newline never $newline never
<label .radio for=#{theId}-#{value}> <div .radio>
<div> <label for=#{theId}-#{value}>
^{optionWidget} <div>
\#{text} ^{optionWidget}
\#{text}
|]) |])

View File

@ -1,6 +1,6 @@
cabal-version: >= 1.10 cabal-version: >= 1.10
name: yesod-form name: yesod-form
version: 1.7.2 version: 1.7.3
license: MIT license: MIT
license-file: LICENSE license-file: LICENSE
author: Michael Snoyman <michael@snoyman.com> author: Michael Snoyman <michael@snoyman.com>