diff options
Diffstat (limited to 'Handler')
| -rw-r--r-- | Handler/Common.hs | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/Handler/Common.hs b/Handler/Common.hs index 776d6ff..87496cb 100644 --- a/Handler/Common.hs +++ b/Handler/Common.hs | |||
| @@ -16,8 +16,6 @@ module Handler.Common | |||
| 16 | 16 | ||
| 17 | import Import hiding ((\\)) | 17 | import Import hiding ((\\)) |
| 18 | 18 | ||
| 19 | import Data.Unique | ||
| 20 | |||
| 21 | import qualified Data.Text as Text | 19 | import qualified Data.Text as Text |
| 22 | import qualified Data.ByteString.Char8 as CBS | 20 | import qualified Data.ByteString.Char8 as CBS |
| 23 | 21 | ||
| @@ -102,9 +100,9 @@ itemForm proto identView = do | |||
| 102 | 100 | ||
| 103 | let mWhen = bool (Nothing <$) (fmap Just) | 101 | let mWhen = bool (Nothing <$) (fmap Just) |
| 104 | 102 | ||
| 105 | neverBoxId <- ("check" <>) . show . hashUnique <$> liftIO newUnique | 103 | neverBoxId <- newIdent |
| 106 | unknownBoxId <- ("check" <>) . show . hashUnique <$> liftIO newUnique | 104 | unknownBoxId <- newIdent |
| 107 | groupId <- ("dateGroup" <>) . show . hashUnique <$> liftIO newUnique | 105 | groupId <- newIdent |
| 108 | 106 | ||
| 109 | dNever <- mWhen dfNever $ | 107 | dNever <- mWhen dfNever $ |
| 110 | mopt checkBoxField ("" { fsId = Just $ Text.pack neverBoxId }) . Just . Just . fromMaybe True $ fmap isNever proto | 108 | mopt checkBoxField ("" { fsId = Just $ Text.pack neverBoxId }) . Just . Just . fromMaybe True $ fmap isNever proto |
| @@ -202,12 +200,12 @@ typedKindField :: (Widget -> Widget -> Widget) -- ^ `\kindWidget typeWidget -> _ | |||
| 202 | -> (Maybe Text, Maybe Text) -- ^ `(kindProto, typeProto)` | 200 | -> (Maybe Text, Maybe Text) -- ^ `(kindProto, typeProto)` |
| 203 | -> MForm Handler ((FormResult Text, FormResult Text), Widget) -- ^ `((kindRes, typeRes), typedKindWidget)` | 201 | -> MForm Handler ((FormResult Text, FormResult Text), Widget) -- ^ `((kindRes, typeRes), typedKindWidget)` |
| 204 | typedKindField collate (kindProto, typeProto) = do | 202 | typedKindField collate (kindProto, typeProto) = do |
| 205 | tOptionId <- ("options" <>) . tshow . hashUnique <$> liftIO newUnique | 203 | tOptionId <- newIdent |
| 206 | let | 204 | let |
| 207 | tAttrs = [ ("list", tOptionId) | 205 | tAttrs = [ ("list", tOptionId) |
| 208 | , ("autocomplete", "off") | 206 | , ("autocomplete", "off") |
| 209 | ] | 207 | ] |
| 210 | kOptionId <- ("options" <>) . tshow . hashUnique <$> liftIO newUnique | 208 | kOptionId <- newIdent |
| 211 | let | 209 | let |
| 212 | kAttrs = [ ("list", kOptionId) | 210 | kAttrs = [ ("list", kOptionId) |
| 213 | , ("autocomplete", "off") | 211 | , ("autocomplete", "off") |
