[added SingleLine and PickMany. Plus some other tweaks Jeremy Shaw **20110515224936 Ignore-this: 913b111e4c1d1b0b347a2de851195656 ] hunk ./Survey/Pages/EditSurvey.hs 40 +

Add Single Line

hunk ./Survey/Pages/EditSurvey.hs 43 +

Add Pick Many

hunk ./Survey/Pages/EditSurvey.hs 47 - (Alternative m, Happstack m, XMLGenerator m, Functor m, URL m ~ URL.SurveyURL, ShowURL m, EmbedAsChild m XML) => + (Alternative m, Happstack m, XMLGenerator m, Functor m, URL m ~ URL.SurveyURL, ShowURL m, EmbedAsChild m XML, EmbedAsAttr m (Attr String URL.SurveyURL)) => hunk ./Survey/Pages/EditSurvey.hs 70 -

Item successfully added. <% show item %>

+
+

Item successfully added. <% show item %>

+

Continue editing

+
hunk ./Survey/Pages/EditSurvey.hs 102 - pure $ ChoiceLongResponse Nothing Nothing -- <$> inputTextArea Nothing Nothing Nothing + pure $ ChoiceLongResponse (Just 80) (Just 20) + +singleLineForm :: (XMLGenerator x, Functor m, Monad m) => + Form m [Input] String [XMLGenT x (HSX.XML x)] Choices +singleLineForm = + pure $ ChoiceSingleLine Nothing hunk ./Survey/Pages/EditSurvey.hs 114 +pickManyForm :: (XMLGenerator x, Functor m, Monad m) => + Form m [Input] String [XMLGenT x (HSX.XML x)] Choices +pickManyForm = + ChoicePickMany [] <$> ((inputList inputHiddenInt inputText) Nothing) hunk ./Survey/Pages/TakeSurvey.hs 72 -
-

Take Survey

-

Survey <% show $ unSurveyId $ sid %>

+
+

Survey <% show $ unSurveyId $ sid %>

hunk ./Survey/Pages/TakeSurvey.hs 100 +choicesForm (ChoiceSingleLine _) = + AnsSingleLine <$> inputText Nothing hunk ./Survey/Pages/TakeSurvey.hs 104 +choicesForm (ChoicePickMany defs opts) = + AnsPickMany <$> inputCheckboxes False defs (zip opts opts) hunk ./Survey/Routing.hs 31 - URL.TrueFalse -> itemFormPage pageTemplate acid url sid trueFalseForm - URL.RangeInt -> itemFormPage pageTemplate acid url sid rangeIntForm + URL.TrueFalse -> itemFormPage pageTemplate acid url sid trueFalseForm + URL.RangeInt -> itemFormPage pageTemplate acid url sid rangeIntForm hunk ./Survey/Routing.hs 34 + URL.SingleLine -> itemFormPage pageTemplate acid url sid singleLineForm hunk ./Survey/Routing.hs 36 + URL.PickMany -> itemFormPage pageTemplate acid url sid pickManyForm hunk ./Survey/Types.hs 34 - | ChoiceLongResponse (Maybe Int) (Maybe Int) - | ChoicePickOne Text [Text] -- ^ default, all options + | ChoiceLongResponse (Maybe Int) (Maybe Int) + | ChoiceSingleLine (Maybe Int) + | ChoicePickOne Text [Text] -- ^ default, all options + | ChoicePickMany [Text] [Text] -- ^ default, all options hunk ./Survey/Types.hs 90 + | AnsSingleLine Text hunk ./Survey/Types.hs 92 + | AnsPickMany [Text] hunk ./Survey/URL.hs 11 + | SingleLine hunk ./Survey/URL.hs 14 + | PickMany hunk ./Survey/URL.hs 25 -