def _process(self): form = ReferenceTypeForm(obj=FormDefaults(self.reference_type), reference_type=self.reference_type) if form.validate_on_submit(): update_reference_type(self.reference_type, form.data) flash(_("External ID type '{}' successfully updated").format(self.reference_type.name), 'success') return jsonify_data(html=_render_reference_type_list()) return jsonify_form(form)
def _process(self): form = ReferenceTypeForm(obj=FormDefaults(self.reference_type), reference_type=self.reference_type) if form.validate_on_submit(): update_reference_type(self.reference_type, form.data) flash(_("External ID type '{}' successfully updated").format(self.reference_type.name), 'success') return jsonify_data(html=_render_reference_type_list()) return jsonify_form(form)