コード例 #1
0
ファイル: invite.py プロジェクト: syslabcom/slc.eventinvite
 def email_all(self, action):
     data, errors = self.extractData()
     if errors:
         self.status = '\n'.join([error.error.__str__() for error in errors])
         return 
     data = utils.save_attendees(self.context, data)
     utils.email_recipients(self.context, data)
     addStatusMessage(self.request, 
                     "Attendees have been saved and notified",
                     type='info')
     self.request.response.redirect(self.context.REQUEST.get('URL'))
コード例 #2
0
ファイル: invite.py プロジェクト: syslabcom/slc.eventinvite
    def email_new(self, action):
        data, errors = self.extractData()
        if errors:
            self.status = '\n'.join([error.error.__str__() for error in errors])
            return 

        context = aq_inner(self.context)
        new_attendees = utils.get_new_attendees(context, data)
        utils.save_attendees(context, data)
        utils.email_recipients(context, new_attendees)
        if new_attendees['internal_attendees'] or \
                new_attendees['external_attendees']:
            addStatusMessage(self.request, 
                            "The new attendees have been added and notified.",
                            type='info')
        self.request.response.redirect(self.context.REQUEST.get('URL'))