Esempio n. 1
0
def _check_if_payment_required(form, field):
    if not field.data:
        return
    if not is_feature_enabled(form.event, 'payment'):
        raise ValidationError(
            _('You have to enable the payment feature in order to set a registration fee.'
              ))
 def _handle_checkin(self, registration, **kwargs):
     if is_feature_enabled(registration.event,
                           'print_checkin') and registration.checked_in:
         mode = self._mode(registration)
         if self._mode(registration) == 'json':
             self._send_json(registration)
         elif mode == 'pdf':
             self._send_pdf(registration)
Esempio n. 3
0
 def get_options(self):
     if not is_feature_enabled(self.event, 'registration'):
         return {}
     forms_cloner_enabled = bool(self._find_registration_forms().count())
     regs_cloner_enabled = bool(self._find_registration_forms()
                                .filter(RegistrationForm.registrations.any(Registration.is_active))
                                .count())
     selected = self.event.getType() == 'meeting'
     return {
         'form': (_('Registration forms'), forms_cloner_enabled, False),
         'registrations': (_('Registrations'), regs_cloner_enabled, selected)
     }
Esempio n. 4
0
 def get_options(self):
     if not is_feature_enabled(self.event, 'registration'):
         return {}
     forms_cloner_enabled = bool(self._find_registration_forms().count())
     regs_cloner_enabled = bool(self._find_registration_forms().filter(
         RegistrationForm.registrations.any(
             Registration.is_active)).count())
     selected = self.event.getType() == 'meeting'
     return {
         'form': (_('Registration forms'), forms_cloner_enabled, False),
         'registrations':
         (_('Registrations'), regs_cloner_enabled, selected)
     }
Esempio n. 5
0
 def has_feature(self, feature):
     """Checks if a feature is enabled for the event"""
     from indico.modules.events.features.util import is_feature_enabled
     return is_feature_enabled(self, feature)
Esempio n. 6
0
 def is_visible(self):
     return is_feature_enabled(self.old_event, 'registration')
Esempio n. 7
0
def _check_if_payment_required(form, field):
    if not field.data:
        return
    if not is_feature_enabled(form.event, 'payment'):
        raise ValidationError(_('You have to enable payment feature in order to set the registration fee.'))
Esempio n. 8
0
 def is_visible(self):
     return is_feature_enabled(self.old_event, 'images')
Esempio n. 9
0
 def is_visible(self):
     return is_feature_enabled(self.old_event, 'images')
Esempio n. 10
0
 def get_options(self):
     if is_feature_enabled(self.event, 'images'):
         enabled = bool(self._find_images().count())
         return {'images': (_("Images"), enabled, False)}
     else:
         return {}
Esempio n. 11
0
 def has_feature(self, feature):
     """Checks if a feature is enabled for the event"""
     from indico.modules.events.features.util import is_feature_enabled
     return is_feature_enabled(self, feature)
Esempio n. 12
0
 def is_visible(self):
     return is_feature_enabled(self.old_event, 'registration')
Esempio n. 13
0
 def get_options(self):
     if is_feature_enabled(self.event, 'images'):
         enabled = bool(self._find_images().count())
         return {'images': (_("Images"), enabled, False)}
     else:
         return {}