def _process(self): form = BOASettingsForm(obj=FormDefaults(**boa_settings.get_all(self.event))) if form.validate_on_submit(): boa_settings.set_multi(self.event, form.data) clear_boa_cache(self.event) flash(_('Book of Abstract settings have been saved'), 'success') return jsonify_data() return jsonify_form(form)
def _process(self): form = BOASettingsForm(obj=FormDefaults( **boa_settings.get_all(self.event))) if form.validate_on_submit(): boa_settings.set_multi(self.event, form.data) clear_boa_cache(self.event) flash(_('Book of Abstract settings have been saved'), 'success') return jsonify_data() return jsonify_form(form)
def _process(self): form = BOASettingsForm(obj=FormDefaults(**boa_settings.get_all(self.event))) if form.validate_on_submit(): boa_settings.set_multi(self.event, form.data) clear_boa_cache(self.event) flash(_('Book of Abstract settings have been saved'), 'success') return jsonify_data() if self.event.has_custom_boa: if config.LATEX_ENABLED: message = _('You are currently using a custom Book of Abstracts. Please note that any change ' 'in the settings below will only affect the LaTeX files and not the custom PDF. ' 'You need to rebuild the Book of Abstracts and upload the new version yourself.') else: message = _('Please note that any change in the settings below will only affect the LaTeX files ' 'and not the Book of Abstracts itself. You need to rebuild it and upload the new ' 'version yourself.') return jsonify_form(form, message=message) return jsonify_form(form)