Esempio n. 1
0
 def _process(self):
     defaults = FormDefaults(obj=self.question, **self.question.field_data)
     form = self.question.field.create_config_form(obj=defaults)
     if form.validate_on_submit():
         update_reviewing_question(self.question, form)
         return jsonify_data(flash=False)
     return jsonify_form(form, fields=getattr(form, '_order', None))
Esempio n. 2
0
 def _process(self):
     defaults = FormDefaults(obj=self.question, **self.question.field_data)
     form = self.question.field.create_config_form(obj=defaults)
     if form.validate_on_submit():
         update_reviewing_question(self.question, form)
         return jsonify_data(flash=False)
     return jsonify_form(form, fields=getattr(form, '_order', None))