Support 3
This commit is contained in:
parent
f755e6d3c9
commit
fc757b43ce
Binary file not shown.
Binary file not shown.
|
|
@ -102,8 +102,9 @@ class UserAreaTaskForm(forms.Form):
|
|||
class SupportForm(forms.Form):
|
||||
|
||||
def __init__(self, user, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
self.fields['mail'] = forms.EmailField(required=True, label="E-Mail")
|
||||
self.fields['name'] = forms.CharField(required=True, label="Ihr Name")
|
||||
super().__init__(*args, **kwargs)
|
||||
user_name = user.first_name + " " + user.last_name
|
||||
self.fields['name'] = forms.CharField(required=True, label="Ihr Name", initial=user_name)
|
||||
self.fields['mail'] = forms.EmailField(required=True, label="E-Mail", initial=user.email)
|
||||
self.fields['problemconc'] = forms.CharField(required=True, label="Problemzusammenfassung")
|
||||
self.fields['problem'] = forms.CharField(required=True, widget=forms.Textarea, label="Ausführliche Beschreibung")
|
||||
|
|
|
|||
|
|
@ -401,4 +401,9 @@ def support(request):
|
|||
'active_link' : 'support',
|
||||
'form' : SupportForm(request.user)
|
||||
}
|
||||
return render(request, 'users/support.html', context)
|
||||
|
||||
if request.method == 'POST':
|
||||
|
||||
return render(request, 'users/support.html', context)
|
||||
else:
|
||||
return render(request, 'users/support.html', context)
|
||||
|
|
|
|||
Loading…
Reference in New Issue