From 9b6785319320c186ee178ce7022a5fe0e1206382 Mon Sep 17 00:00:00 2001 From: Holger Trampe Date: Tue, 10 Dec 2019 22:37:43 +0100 Subject: [PATCH] Standard mit Ansprechpartner --- .../templates/standards/standards_single.html | 7 +++++++ users/__pycache__/usersforms.cpython-38.pyc | Bin 4704 -> 4704 bytes users/__pycache__/views.cpython-38.pyc | Bin 12579 -> 12579 bytes users/templates/users/users_management.html | 7 +++---- users/usersforms.py | 2 +- users/views.py | 14 ++++++-------- 6 files changed, 17 insertions(+), 13 deletions(-) diff --git a/standards/templates/standards/standards_single.html b/standards/templates/standards/standards_single.html index a995ef1..a4277e4 100644 --- a/standards/templates/standards/standards_single.html +++ b/standards/templates/standards/standards_single.html @@ -15,6 +15,13 @@  | Bearbeiten {% endif%} +
+ Ansprechpartner: + {% for taskuser in standard.task.usersfield.all %} + +  {{taskuser.first_name}} {{taskuser.last_name}} + {% endfor %} +

{{standard.media}} {{standard.content|safe}} diff --git a/users/__pycache__/usersforms.cpython-38.pyc b/users/__pycache__/usersforms.cpython-38.pyc index abe771a1e21d14e7826cbf42bff9a59b4ce8e5bc..043095a35852a2cc28822e67e453f840eb6eb4d0 100644 GIT binary patch delta 35 qcmaE$@<4?*l$V!_0SJEbeu$m0k=H11%fIVZ><~o5#i~zrO3d{fi diff --git a/users/__pycache__/views.cpython-38.pyc b/users/__pycache__/views.cpython-38.pyc index dba6ffdc54e1af804f1545f34ab5150a67033958..b2ed99c4adbcb280e2706e701d1a8c22f8a097a9 100644 GIT binary patch delta 31 lcmZ3Sv^a@3l$V!_0SMmme2Bfik=I6#nS+aQvya|&CIFEi2=V{` delta 31 lcmZ3Sv^a@3l$V!_0SK~qKE&2<^p92pIqX diff --git a/users/templates/users/users_management.html b/users/templates/users/users_management.html index aa1f18f..c991337 100644 --- a/users/templates/users/users_management.html +++ b/users/templates/users/users_management.html @@ -50,15 +50,14 @@ Rechte - Zuständigkeitenn + Zuständigkeiten {% if item != request.user %} - - Löschen + + Löschen {% endif %} - {% endfor %} diff --git a/users/usersforms.py b/users/usersforms.py index cb6032e..3ff256c 100644 --- a/users/usersforms.py +++ b/users/usersforms.py @@ -107,4 +107,4 @@ class SupportForm(forms.Form): 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") + self.fields['problem'] = forms.CharField(required=True, widget=forms.Textarea, label="Ausführliche Beschreibung") \ No newline at end of file diff --git a/users/views.py b/users/views.py index 5ef0273..7e636a8 100644 --- a/users/views.py +++ b/users/views.py @@ -406,17 +406,17 @@ def support(request): if request.method == 'POST': form = request.POST supportdata = dict(form) - + # Data from Form to JSON-Format name = str(supportdata['name'][0]) mail = str(supportdata['mail'][0]) problemconc = str(supportdata['problemconc'][0]) problem = str(supportdata['problem'][0]) - + # HEADERS CURL headers = {'X-API-Key': 'F025A238EB74914E3653BA2989BFF7C4'} subject = "Digitale Agentur: " + str(problemconc) - + # DataJSON ostdata = { "topicId" : '12', "name": name, @@ -424,12 +424,10 @@ def support(request): "subject": 'Digitale Agentur: '+problemconc, "ip": "1.1.1.1", "message": problem, - } - - json_data = json.dumps(ostdata) - + } + json_data = json.dumps(ostdata) r = requests.post("https://support.vh-solutions.de/api/http.php/tickets.json", data=json_data, headers=headers) - + # IF request FAILED error-Message if(r.status_code != 201): messages.warning(request, f'Supportanfrage fehlgeschlagen!') else: