Supportformular mit Bereich
This commit is contained in:
parent
ac5c225ec1
commit
fe8b2edeff
|
|
@ -1610,8 +1610,7 @@ class BillPlanUpdate(UpdateView):
|
||||||
|
|
||||||
|
|
||||||
voucher_date_today = date.today().strftime("%Y-%m-%d")
|
voucher_date_today = date.today().strftime("%Y-%m-%d")
|
||||||
# TODO: Nachgebuchte Mitarbeiter
|
# TASK: Was passiert bei Änderungen der Agenturdaten?
|
||||||
# TODO: Was passiert bei Änderungen der Agenturdaten?
|
|
||||||
|
|
||||||
# DataJSON
|
# DataJSON
|
||||||
monthword = "Monate"
|
monthword = "Monate"
|
||||||
|
|
|
||||||
|
|
@ -26,4 +26,8 @@
|
||||||
});*/
|
});*/
|
||||||
</script>
|
</script>
|
||||||
{% endblock content %}
|
{% endblock content %}
|
||||||
|
<!--
|
||||||
|
|
||||||
|
TASK: Hier dann das DropDown noch einbinden warhscheinlich, wenn es nicht im Form gelandet ist?
|
||||||
|
|
||||||
|
-->
|
||||||
|
|
|
||||||
|
|
@ -151,7 +151,21 @@ class UserAreaTaskForm(forms.Form):
|
||||||
self.fields['task_'+str(task.pk)] = forms.BooleanField(required=False, initial=True, label="<h5>"+task.name+"</h5>")
|
self.fields['task_'+str(task.pk)] = forms.BooleanField(required=False, initial=True, label="<h5>"+task.name+"</h5>")
|
||||||
else:
|
else:
|
||||||
self.fields['task_'+str(task.pk)] = forms.BooleanField(required=False, initial=False, label="<h5>"+task.name+"</h5>")
|
self.fields['task_'+str(task.pk)] = forms.BooleanField(required=False, initial=False, label="<h5>"+task.name+"</h5>")
|
||||||
|
'''
|
||||||
|
TASK: DropDown hier einfügen
|
||||||
|
|
||||||
|
DropDown-Menü mit drei Optionen
|
||||||
|
1. Technischer Support
|
||||||
|
2. Abrechnung
|
||||||
|
3. Lob Kritik Anregung
|
||||||
|
|
||||||
|
'''
|
||||||
|
SUPPORT_DEP = (
|
||||||
|
('12', 'Technischer Support'),
|
||||||
|
('13', 'Abrechnung'),
|
||||||
|
('14', 'Lob, Kritik und Anregung'),
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
class SupportForm(forms.Form):
|
class SupportForm(forms.Form):
|
||||||
def __init__(self, user, *args, **kwargs):
|
def __init__(self, user, *args, **kwargs):
|
||||||
|
|
@ -159,6 +173,7 @@ class SupportForm(forms.Form):
|
||||||
user_name = user.first_name + " " + user.last_name
|
user_name = user.first_name + " " + user.last_name
|
||||||
self.fields['name'] = forms.CharField(required=True, label="Name", initial=user_name)
|
self.fields['name'] = forms.CharField(required=True, label="Name", initial=user_name)
|
||||||
self.fields['mail'] = forms.EmailField(required=True, label="E-Mail", initial=user.email)
|
self.fields['mail'] = forms.EmailField(required=True, label="E-Mail", initial=user.email)
|
||||||
|
self.fields['department'] = forms.ChoiceField(required=True, label="Bereich", choices=SUPPORT_DEP)
|
||||||
self.fields['problemconc'] = forms.CharField(required=True, label="Problemzusammenfassung")
|
self.fields['problemconc'] = forms.CharField(required=True, label="Problemzusammenfassung")
|
||||||
self.fields['problem'] = forms.CharField(required=True, widget=forms.Textarea, label="Ausführliche Problembeschreibung")
|
self.fields['problem'] = forms.CharField(required=True, widget=forms.Textarea, label="Ausführliche Problembeschreibung")
|
||||||
self.fields['name'].widget.attrs['readonly'] = True
|
self.fields['name'].widget.attrs['readonly'] = True
|
||||||
|
|
|
||||||
|
|
@ -857,9 +857,12 @@ def support(request):
|
||||||
headers = {'X-API-Key': 'F025A238EB74914E3653BA2989BFF7C4'}
|
headers = {'X-API-Key': 'F025A238EB74914E3653BA2989BFF7C4'}
|
||||||
subject = "Digitale Agentur: " + str(problemconc)
|
subject = "Digitale Agentur: " + str(problemconc)
|
||||||
|
|
||||||
|
|
||||||
|
# TASK: Hier die Auswahl des DropDown in die API mit einbauen, damit das Ticket in das entsprechende Department läuft
|
||||||
|
|
||||||
# DataJSON
|
# DataJSON
|
||||||
ostdata = {
|
ostdata = {
|
||||||
"topicId" : '12',
|
"topicId" : str(supportdata['department'][0]),
|
||||||
"name": name,
|
"name": name,
|
||||||
"email": mail,
|
"email": mail,
|
||||||
"subject": 'Digitale Agentur: '+problemconc,
|
"subject": 'Digitale Agentur: '+problemconc,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue