Esempio n. 1
0
 def __init__(self, *args, **kwargs):
     nodelicense_choices = get_nodelicense_choices()
     defaultlicense_choices = get_defaultlicense_choices()
     brand_choices = get_brand_choices()
     super(RegistrationProviderForm, self).__init__(*args, **kwargs)
     self.fields['licenses_acceptable'].choices = nodelicense_choices
     self.fields['default_license'].choices = defaultlicense_choices
     self.fields['brand'].choices = brand_choices
Esempio n. 2
0
 def __init__(self, *args, **kwargs):
     toplevel_choices = get_toplevel_subjects()
     nodelicense_choices = get_nodelicense_choices()
     defaultlicense_choices = get_defaultlicense_choices()
     super(PreprintProviderForm, self).__init__(*args, **kwargs)
     self.fields['toplevel_subjects'].choices = toplevel_choices
     self.fields['licenses_acceptable'].choices = nodelicense_choices
     self.fields['default_license'].choices = defaultlicense_choices
Esempio n. 3
0
 def __init__(self, *args, **kwargs):
     toplevel_choices = get_toplevel_subjects()
     nodelicense_choices = get_nodelicense_choices()
     defaultlicense_choices = get_defaultlicense_choices()
     super(PreprintProviderForm, self).__init__(*args, **kwargs)
     self.fields['toplevel_subjects'].choices = toplevel_choices
     self.fields['licenses_acceptable'].choices = nodelicense_choices
     self.fields['default_license'].choices = defaultlicense_choices
Esempio n. 4
0
 def __init__(self, *args, **kwargs):
     nodelicense_choices = get_nodelicense_choices()
     defaultlicense_choices = get_defaultlicense_choices()
     brand_choices = get_brand_choices()
     super(RegistrationProviderForm, self).__init__(*args, **kwargs)
     self.fields['licenses_acceptable'].choices = nodelicense_choices
     self.fields['default_license'].choices = defaultlicense_choices
     self.fields['brand'].choices = brand_choices
     if kwargs.get('initial', None) and kwargs.get('initial').get('_id', None):
         provider = RegistrationProvider.load(kwargs.get('initial').get('_id'))
         self.fields['default_schema'].choices = provider.schemas.filter(visible=True, active=True).values_list('id', 'name')
     else:
         self.fields['default_schema'].choices = RegistrationSchema.objects.filter(active=True).values_list('id', 'name')
Esempio n. 5
0
 def __init__(self, *args, **kwargs):
     nodelicense_choices = get_nodelicense_choices()
     defaultlicense_choices = get_defaultlicense_choices()
     super(CollectionProviderForm, self).__init__(*args, **kwargs)
     self.fields['licenses_acceptable'].choices = nodelicense_choices
     self.fields['default_license'].choices = defaultlicense_choices