|
|
|
@ -158,25 +158,52 @@ class RegistrationFilter(admin.SimpleListFilter):
|
|
|
|
|
|
|
|
|
|
|
|
# Register your models here.
|
|
|
|
# Register your models here.
|
|
|
|
class MemberAdmin(CommonAdminMixin, admin.ModelAdmin):
|
|
|
|
class MemberAdmin(CommonAdminMixin, admin.ModelAdmin):
|
|
|
|
fields = ['prename', 'lastname', 'email',
|
|
|
|
fieldsets = [
|
|
|
|
'alternative_email',
|
|
|
|
(None,
|
|
|
|
'street', 'plz', 'town', 'address_extra', 'country',
|
|
|
|
{
|
|
|
|
'phone_number', 'birth_date', 'gender',
|
|
|
|
'fields': [('prename', 'lastname'),
|
|
|
|
'dav_badge_no',
|
|
|
|
('email', 'alternative_email'),
|
|
|
|
'group',
|
|
|
|
'phone_number',
|
|
|
|
'swimming_badge', 'climbing_badge', 'alpine_experience', 'allergies',
|
|
|
|
'group', 'registration_form', 'image',
|
|
|
|
'medication', 'tetanus_vaccination', 'photos_may_be_taken', 'legal_guardians',
|
|
|
|
('join_date', 'leave_date'),
|
|
|
|
('good_conduct_certificate_presented_date', 'good_conduct_certificate_presentation_needed'),
|
|
|
|
'comments',
|
|
|
|
'iban', 'has_key', 'has_free_ticket_gym', 'gets_newsletter',
|
|
|
|
'legal_guardians',
|
|
|
|
'registration_form', 'image',
|
|
|
|
'dav_badge_no',
|
|
|
|
'active', 'echoed',
|
|
|
|
'active', 'echoed', 'gets_newsletter',
|
|
|
|
('join_date', 'leave_date'),
|
|
|
|
'user',
|
|
|
|
'comments', 'user']
|
|
|
|
]
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
(_("Contact information"),
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
'fields': ['street', 'plz', 'town', 'address_extra', 'country', 'iban']
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
(_("Skills"),
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
'fields': ['swimming_badge', 'climbing_badge', 'alpine_experience']
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
(_("Others"),
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
'fields': ['allergies', 'tetanus_vaccination', 'medication', 'photos_may_be_taken']
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
(_("Organizational"),
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
'fields': [
|
|
|
|
|
|
|
|
('good_conduct_certificate_presented_date',
|
|
|
|
|
|
|
|
'good_conduct_certificate_presentation_needed'),
|
|
|
|
|
|
|
|
'has_key', 'has_free_ticket_gym']
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
]
|
|
|
|
list_display = ('name_text_or_link', 'birth_date', 'age', 'get_group', 'gets_newsletter',
|
|
|
|
list_display = ('name_text_or_link', 'birth_date', 'age', 'get_group', 'gets_newsletter',
|
|
|
|
'registration_complete', 'active', 'echoed', 'comments', 'activity_score')
|
|
|
|
'registration_complete', 'active', 'echoed', 'comments', 'activity_score')
|
|
|
|
search_fields = ('prename', 'lastname', 'email')
|
|
|
|
search_fields = ('prename', 'lastname', 'email')
|
|
|
|
list_filter = ('group', 'gets_newsletter', RegistrationFilter, 'active')
|
|
|
|
list_filter = ('group', 'gets_newsletter', RegistrationFilter, 'active')
|
|
|
|
list_display_links = None
|
|
|
|
list_display_links = None
|
|
|
|
|
|
|
|
readonly_fields = ['echoed']
|
|
|
|
inlines = [EmergencyContactInline, TrainingOnMemberInline, PermissionOnMemberInline]
|
|
|
|
inlines = [EmergencyContactInline, TrainingOnMemberInline, PermissionOnMemberInline]
|
|
|
|
#formfield_overrides = {
|
|
|
|
#formfield_overrides = {
|
|
|
|
# ManyToManyField: {'widget': forms.CheckboxSelectMultiple},
|
|
|
|
# ManyToManyField: {'widget': forms.CheckboxSelectMultiple},
|
|
|
|
@ -256,12 +283,46 @@ class MemberAdmin(CommonAdminMixin, admin.ModelAdmin):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class MemberUnconfirmedAdmin(admin.ModelAdmin):
|
|
|
|
class MemberUnconfirmedAdmin(admin.ModelAdmin):
|
|
|
|
fields = ['prename', 'lastname',
|
|
|
|
fieldsets = [
|
|
|
|
('email', 'confirmed_mail'),
|
|
|
|
(None,
|
|
|
|
('alternative_email', 'confirmed_alternative_mail'),
|
|
|
|
{
|
|
|
|
'street', 'plz',
|
|
|
|
'fields': [('prename', 'lastname'),
|
|
|
|
'town', 'phone_number', 'birth_date', 'gender', 'group',
|
|
|
|
('email', 'alternative_email'),
|
|
|
|
'registration_form', 'comments']
|
|
|
|
'phone_number',
|
|
|
|
|
|
|
|
'group', 'registration_form', 'image',
|
|
|
|
|
|
|
|
('join_date', 'leave_date'),
|
|
|
|
|
|
|
|
'comments',
|
|
|
|
|
|
|
|
'legal_guardians',
|
|
|
|
|
|
|
|
'dav_badge_no',
|
|
|
|
|
|
|
|
'active', 'echoed', 'gets_newsletter',
|
|
|
|
|
|
|
|
'user',
|
|
|
|
|
|
|
|
]
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
(_("Contact information"),
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
'fields': ['street', 'plz', 'town', 'address_extra', 'country', 'iban']
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
(_("Skills"),
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
'fields': ['swimming_badge', 'climbing_badge', 'alpine_experience']
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
(_("Others"),
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
'fields': ['allergies', 'tetanus_vaccination', 'medication', 'photos_may_be_taken']
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
(_("Organizational"),
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
'fields': [
|
|
|
|
|
|
|
|
('good_conduct_certificate_presented_date',
|
|
|
|
|
|
|
|
'good_conduct_certificate_presentation_needed'),
|
|
|
|
|
|
|
|
'has_key', 'has_free_ticket_gym']
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
]
|
|
|
|
list_display = ('name', 'birth_date', 'age', 'get_group', 'confirmed_mail', 'confirmed_alternative_mail')
|
|
|
|
list_display = ('name', 'birth_date', 'age', 'get_group', 'confirmed_mail', 'confirmed_alternative_mail')
|
|
|
|
search_fields = ('prename', 'lastname', 'email')
|
|
|
|
search_fields = ('prename', 'lastname', 'email')
|
|
|
|
list_filter = ('group', 'confirmed_mail', 'confirmed_alternative_mail')
|
|
|
|
list_filter = ('group', 'confirmed_mail', 'confirmed_alternative_mail')
|
|
|
|
|