Example #1
0
 def _process(self):
     form = CreateEmailTemplateForm(event=self.event_new)
     if form.validate_on_submit():
         new_tpl = build_default_email_template(self.event_new, form.default_tpl.data)
         form.populate_obj(new_tpl)
         self.event_new.abstract_email_templates.append(new_tpl)
         db.session.flush()
         return _render_notification_list(self.event_new)
     return jsonify_template('events/abstracts/management/notification_tpl_form.html', form=form)
Example #2
0
 def _process(self):
     form = CreateEmailTemplateForm(event=self.event_new)
     if form.validate_on_submit():
         new_tpl = build_default_email_template(self.event_new, form.default_tpl.data)
         form.populate_obj(new_tpl)
         self.event_new.abstract_email_templates.append(new_tpl)
         db.session.flush()
         return _render_notification_list(self.event_new)
     return jsonify_template('events/abstracts/management/notification_tpl_form.html', form=form)