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})
def _process(self): form = PaperTemplateForm(template=self.template, obj=FormDefaults(self.template, template=self.template)) if form.validate_on_submit(): old_name = self.template.name update_paper_template(self.template, form.data) flash(_('Paper template "{}" updated.').format(old_name), 'success') return _render_teplate_list(self.event) return jsonify_form(form, form_header_kwargs={'action': request.relative_url})
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})
def _process(self): form = PaperTemplateForm(template=self.template, obj=FormDefaults(self.template, template=self.template)) if form.validate_on_submit(): old_name = self.template.name update_paper_template(self.template, form.data) flash( _('Paper template "{}" updated.').format(old_name), 'success') return _render_teplate_list(self.event) return jsonify_form( form, form_header_kwargs={'action': request.relative_url})