Ejemplo 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)
Ejemplo 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)
     }
Ejemplo 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)
     }
Ejemplo 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)
Ejemplo n.º 6
0
 def is_visible(self):
     return is_feature_enabled(self.old_event, 'registration')
Ejemplo 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.'))
Ejemplo n.º 8
0
 def is_visible(self):
     return is_feature_enabled(self.old_event, 'images')
Ejemplo n.º 9
0
 def is_visible(self):
     return is_feature_enabled(self.old_event, 'images')
Ejemplo 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 {}
Ejemplo 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)
Ejemplo n.º 12
0
 def is_visible(self):
     return is_feature_enabled(self.old_event, 'registration')
Ejemplo 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 {}