Ejemplo n.º 1
0
 def _process(self):
     form = AbstractCommentForm(obj=self.comment, abstract=self.abstract, user=session.user,
                                prefix='edit-comment-{}-'.format(self.comment.id))
     if form.validate_on_submit():
         update_abstract_comment(self.comment, form.data)
         return jsonify_data(flash=False, html=render_abstract_page(self.abstract, management=self.management))
     tpl = get_template_module('events/reviews/forms.html')
     return jsonify(html=tpl.render_comment_form(form, proposal=self.abstract, comment=self.comment, edit=True))
Ejemplo n.º 2
0
 def _process(self):
     form = AbstractCommentForm(obj=self.comment, abstract=self.abstract, user=session.user,
                                prefix='edit-comment-{}-'.format(self.comment.id))
     if form.validate_on_submit():
         update_abstract_comment(self.comment, form.data)
         return jsonify_data(flash=False, html=render_abstract_page(self.abstract, management=self.management))
     tpl = get_template_module('events/reviews/forms.html')
     return jsonify(html=tpl.render_comment_form(form, proposal=self.abstract, comment=self.comment, edit=True))