示例#1
0
 def _process(self):
     form = PaperTemplateForm()
     if form.validate_on_submit():
         template = create_paper_template(self.event, form.data)
         flash(_('Paper template "{}" added.').format(template.name), 'success')
         return _render_teplate_list(self.event)
     return jsonify_form(form, form_header_kwargs={'action': request.relative_url})
示例#2
0
 def _process(self):
     form = PaperTemplateForm()
     if form.validate_on_submit():
         template = create_paper_template(self.event, form.data)
         flash(
             _('Paper template "{}" added.').format(template.name),
             'success')
         return _render_teplate_list(self.event)
     return jsonify_form(
         form, form_header_kwargs={'action': request.relative_url})