|
|
|
@ -42,8 +42,9 @@ from .models import (Member, Group, Freizeit, MemberNoteList, NewMemberOnList, K
|
|
|
|
from finance.models import Statement, BillOnExcursionProxy
|
|
|
|
from finance.models import Statement, BillOnExcursionProxy
|
|
|
|
from mailer.mailutils import send as send_mail, get_echo_link
|
|
|
|
from mailer.mailutils import send as send_mail, get_echo_link
|
|
|
|
from django.conf import settings
|
|
|
|
from django.conf import settings
|
|
|
|
from utils import get_member
|
|
|
|
from utils import get_member, RestrictedFileField
|
|
|
|
from schwifty import IBAN
|
|
|
|
from schwifty import IBAN
|
|
|
|
|
|
|
|
|
|
|
|
#from easy_select2 import apply_select2
|
|
|
|
#from easy_select2 import apply_select2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -230,10 +231,9 @@ class MemberAdmin(CommonAdminMixin, admin.ModelAdmin):
|
|
|
|
list_display_links = None
|
|
|
|
list_display_links = None
|
|
|
|
readonly_fields = ['echoed', 'good_conduct_certificate_valid']
|
|
|
|
readonly_fields = ['echoed', 'good_conduct_certificate_valid']
|
|
|
|
inlines = [EmergencyContactInline, TrainingOnMemberInline, PermissionOnMemberInline]
|
|
|
|
inlines = [EmergencyContactInline, TrainingOnMemberInline, PermissionOnMemberInline]
|
|
|
|
#formfield_overrides = {
|
|
|
|
formfield_overrides = {
|
|
|
|
# ManyToManyField: {'widget': forms.CheckboxSelectMultiple},
|
|
|
|
RestrictedFileField: {'widget': forms.ClearableFileInput(attrs={'accept': 'application/pdf,image/jpeg,image/png'})},
|
|
|
|
# ForeignKey: {'widget': apply_select2(forms.Select)}
|
|
|
|
}
|
|
|
|
#}
|
|
|
|
|
|
|
|
change_form_template = "members/change_member.html"
|
|
|
|
change_form_template = "members/change_member.html"
|
|
|
|
ordering = ('lastname',)
|
|
|
|
ordering = ('lastname',)
|
|
|
|
actions = ['request_echo', 'invite_as_user_action']
|
|
|
|
actions = ['request_echo', 'invite_as_user_action']
|
|
|
|
@ -788,7 +788,8 @@ class BillOnExcursionInline(CommonAdminInlineMixin, admin.TabularInline):
|
|
|
|
sortable_options = []
|
|
|
|
sortable_options = []
|
|
|
|
fields = ['short_description', 'explanation', 'amount', 'paid_by', 'proof']
|
|
|
|
fields = ['short_description', 'explanation', 'amount', 'paid_by', 'proof']
|
|
|
|
formfield_overrides = {
|
|
|
|
formfield_overrides = {
|
|
|
|
TextField: {'widget': Textarea(attrs={'rows': 1, 'cols': 40})}
|
|
|
|
TextField: {'widget': Textarea(attrs={'rows': 1, 'cols': 40})},
|
|
|
|
|
|
|
|
RestrictedFileField: {'widget': forms.ClearableFileInput(attrs={'accept': 'application/pdf,image/jpeg,image/png'})},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|