Esempio n. 1
0
 def _process(self):
     tpl = get_template_module('events/surveys/emails/survey_link_email.html', event=self.event)
     form = InvitationForm(body=tpl.get_html_body(), subject=tpl.get_subject(), event=self.event)
     if form.validate_on_submit():
         self._send_emails(form, form.recipients.data)
         num = len(form.recipients.data)
         flash(ngettext('Your email has been sent.', '{} emails have been sent.', num).format(num))
         return jsonify_data(flash=True)
     return jsonify_form(form)
Esempio n. 2
0
 def _process(self):
     tpl = get_template_module('events/surveys/emails/survey_link_email.html', event=self.event)
     form = InvitationForm(body=tpl.get_html_body(), subject=tpl.get_subject(), event=self.event)
     if form.validate_on_submit():
         self._send_emails(form, form.recipients.data)
         num = len(form.recipients.data)
         flash(ngettext('Your email has been sent.', '{} emails have been sent.', num).format(num))
         return jsonify_data(flash=True)
     return jsonify_form(form)