diff --git a/src/Handler/MailCenter.hs b/src/Handler/MailCenter.hs index 251f84108..82abaf504 100644 --- a/src/Handler/MailCenter.hs +++ b/src/Handler/MailCenter.hs @@ -105,8 +105,8 @@ mkMCTable = do dbtRowKey = queryMail >>> (E.^. SentMailId) dbtProj = dbtProjId dbtColonnade = mconcat - [ dbSelect (applying _2) id (return . view (resultMail . _entityKey)) - , sortable (Just "sent") (i18nCell MsgPrintJobCreated) $ \( view $ resultMail . _entityVal . _sentMailSentAt -> t) -> dateTimeCell t + [ -- dbSelect (applying _2) id (return . view (resultMail . _entityKey)) + sortable (Just "sent") (i18nCell MsgPrintJobCreated) $ \( view $ resultMail . _entityVal . _sentMailSentAt -> t) -> dateTimeCell t , sortable (Just "recipient") (i18nCell MsgPrintRecipient) $ \(preview resultRecipient -> u) -> maybeCell u $ cellHasUserLink AdminUserR , sortable Nothing (i18nCell MsgCommSubject) $ \(view resultMail -> Entity k v) -> let subject = v ^? _sentMailHeaders . _mailHeaders' . _mailHeader' "Subject" @@ -139,15 +139,17 @@ mkMCTable = do { dbParamsFormMethod = POST , dbParamsFormAction = Nothing -- Just $ SomeRoute currentRoute , dbParamsFormAttrs = [] - , dbParamsFormSubmit = FormSubmit - , dbParamsFormAdditional - = let acts :: Map MCTableAction (AForm Handler MCTableActionData) - acts = mconcat - [ singletonMap MCActDummy $ pure MCActDummyData - ] - in renderAForm FormStandard - $ (, mempty) . First . Just - <$> multiActionA acts (fslI MsgTableAction) Nothing + , dbParamsFormSubmit = FormNoSubmit + , dbParamsFormAdditional = \_csrf -> return (FormMissing, mempty) + -- , dbParamsFormSubmit = FormSubmit + -- , dbParamsFormAdditional + -- = let acts :: Map MCTableAction (AForm Handler MCTableActionData) + -- acts = mconcat + -- [ singletonMap MCActDummy $ pure MCActDummyData + -- ] + -- in renderAForm FormStandard + -- $ (, mempty) . First . Just + -- <$> multiActionA acts (fslI MsgTableAction) Nothing , dbParamsFormEvaluate = liftHandler . runFormPost , dbParamsFormResult = id , dbParamsFormIdent = def @@ -267,4 +269,9 @@ part2widget Part{partContent=PartContent (LB.toStrict -> pc), partType=pt, partD -- | decode the MIME encoded-word format, which is used in email headers to encode non-ASCII text. This format is specified in RFC 2047. decodeMime :: Text -> Text -decodeMime = id -- TODO \ No newline at end of file +decodeMime t = t +-- decodeMime t +-- | Just r <- T.stripPrefix "=?utf-8?Q?" t +-- = T.replace "_" " " $ T.replace "?=" "" r -- TODO: this only works in plain cases without special characters; e.g. umlauts are not handled correctly +-- | otherwise +-- = t diff --git a/src/Handler/Utils/Qualification.hs b/src/Handler/Utils/Qualification.hs index a2074d5da..50f3a9384 100644 --- a/src/Handler/Utils/Qualification.hs +++ b/src/Handler/Utils/Qualification.hs @@ -307,7 +307,7 @@ qualificationOption (Entity qid Qualification{..}) = qualificationsOptionList :: [Entity Qualification] -> OptionList QualificationId qualificationsOptionList = mkOptionList . map qualificationOption -{- Should we encrypt the external value or simply rely on uniqueness? +{- Should we encrypt the external value or simply rely on uniqueness? --TODO: still used in Handler.Admin.Avs qualOpt :: Entity Qualification -> Handler (Option QualificationId) qualOpt (Entity qualId qual) = do cQualId :: CryptoUUIDQualification <- encrypt qualId