Esempio n. 1
0
def _clear_boa_cache(sender, obj=None, **kwargs):
    from indico.modules.events.abstracts.util import clear_boa_cache
    if isinstance(obj, Break):
        # breaks do not show up in the BoA
        return
    event = (obj or sender).event
    clear_boa_cache(event)
Esempio n. 2
0
def _clear_boa_cache(sender, obj=None, **kwargs):
    from indico.modules.events.abstracts.util import clear_boa_cache
    if isinstance(obj, Break):
        # breaks do not show up in the BoA
        return
    event = (obj or sender).event
    clear_boa_cache(event)
Esempio n. 3
0
 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)
Esempio n. 4
0
 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)
Esempio n. 5
0
 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)