def update(self):
     self.request.set('disable_plone.rightcolumn', 1)
     if self.request.get('method', '') == 'POST':
         bulletin = self.save()
         message = _('Gorde da eskatutako elementuak dituen buletina. Hemen bere edukia')
         IStatusMessage(self.request).add(message)
         return self.request.response.redirect(bulletin.absolute_url())
示例#2
0
    def send(self, fr, to, cc, subject):
        context = aq_inner(self.context)

        data = HTML_HEADER + context.text.output + HTML_FOOTER
        mail = create_html_mail(subject,
                         data.decode('utf-8'),
                         from_addr=fr,
                         to_addr=to,
                         cc_addrs=cc)
        mailhost = getToolByName(context, 'MailHost')
        mailhost.send(mail.as_string())
        message = _('Bidalketa ondo egin da.')
        IStatusMessage(self.request).add(message)
        return self.request.response.redirect(context.absolute_url())