avoid using Assistant.WebApp.Bootstrap3 when building with current yesod

Only use that when building with ancient yesod, which does not include it.

This also let me remove ifdefs in the file to support building with the new
version of yesod.
This commit is contained in:
Joey Hess 2014-10-09 15:19:24 -04:00
parent 55c7eb78ee
commit dd667844b6
3 changed files with 4 additions and 26 deletions

View file

@ -18,15 +18,16 @@ import Assistant.Gpg
#if MIN_VERSION_yesod(1,2,0)
import Yesod hiding (textField, passwordField)
import Yesod.Form.Fields as F
import Yesod.Form.Bootstrap3 hiding (bfs)
#else
import Yesod hiding (textField, passwordField, selectField, selectFieldList)
import Yesod.Form.Fields as F hiding (selectField, selectFieldList)
import Data.String (IsString (..))
import Control.Monad (unless)
import Data.Maybe (listToMaybe)
import Assistant.WebApp.Bootstrap3 hiding (bfs)
#endif
import Data.Text (Text)
import Assistant.WebApp.Bootstrap3 hiding (bfs)
{- Yesod's textField sets the required attribute for required fields.
- We don't want this, because many of the forms used in this webapp