Standard mit Ansprechpartner
This commit is contained in:
parent
3a1fabed73
commit
9b67853193
|
|
@ -15,6 +15,13 @@
|
||||||
| <a href="{% url 'standard-update' standard.pk %}">Bearbeiten</a>
|
| <a href="{% url 'standard-update' standard.pk %}">Bearbeiten</a>
|
||||||
{% endif%}
|
{% endif%}
|
||||||
</small>
|
</small>
|
||||||
|
<small><br />
|
||||||
|
Ansprechpartner:
|
||||||
|
{% for taskuser in standard.task.usersfield.all %}
|
||||||
|
|
||||||
|
<span class="badge badge-pill badge-primary" style="font-size: 1.1em; background-color: {{standard.task.area.color}}"><a href="{% url 'orga-single' taskuser.pk%}" style="color: #ffffff">{{taskuser.first_name}} {{taskuser.last_name}}</a></span>
|
||||||
|
{% endfor %}
|
||||||
|
</small>
|
||||||
<hr>
|
<hr>
|
||||||
{{standard.media}}
|
{{standard.media}}
|
||||||
{{standard.content|safe}}
|
{{standard.content|safe}}
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
|
|
@ -50,15 +50,14 @@
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item" href="{% url 'users-perm-update' item.profile.pk %}">Rechte</a>
|
<a class="dropdown-item" href="{% url 'users-perm-update' item.profile.pk %}">Rechte</a>
|
||||||
<!--<div class="dropdown-header"></div>-->
|
<!--<div class="dropdown-header"></div>-->
|
||||||
<a class="dropdown-item" href="{% url 'users-areataskupdate' item.pk %}">Zuständigkeitenn</a>
|
<a class="dropdown-item" href="{% url 'users-areataskupdate' item.pk %}">Zuständigkeiten</a>
|
||||||
{% if item != request.user %}
|
{% if item != request.user %}
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item text-danger" href="{% url 'users-delete' item.pk %}" >Löschen</a>
|
<a class="dropdown-item text-danger" href="{% url 'users-delete' item.pk %}" >Löschen</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
|
|
|
||||||
|
|
@ -107,4 +107,4 @@ class SupportForm(forms.Form):
|
||||||
self.fields['name'] = forms.CharField(required=True, label="Ihr Name", initial=user_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['mail'] = forms.EmailField(required=True, label="E-Mail", initial=user.email)
|
||||||
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 Beschreibung")
|
self.fields['problem'] = forms.CharField(required=True, widget=forms.Textarea, label="Ausführliche Beschreibung")
|
||||||
|
|
@ -406,17 +406,17 @@ def support(request):
|
||||||
if request.method == 'POST':
|
if request.method == 'POST':
|
||||||
form = request.POST
|
form = request.POST
|
||||||
supportdata = dict(form)
|
supportdata = dict(form)
|
||||||
|
# Data from Form to JSON-Format
|
||||||
name = str(supportdata['name'][0])
|
name = str(supportdata['name'][0])
|
||||||
mail = str(supportdata['mail'][0])
|
mail = str(supportdata['mail'][0])
|
||||||
problemconc = str(supportdata['problemconc'][0])
|
problemconc = str(supportdata['problemconc'][0])
|
||||||
problem = str(supportdata['problem'][0])
|
problem = str(supportdata['problem'][0])
|
||||||
|
|
||||||
|
# HEADERS CURL
|
||||||
headers = {'X-API-Key': 'F025A238EB74914E3653BA2989BFF7C4'}
|
headers = {'X-API-Key': 'F025A238EB74914E3653BA2989BFF7C4'}
|
||||||
subject = "Digitale Agentur: " + str(problemconc)
|
subject = "Digitale Agentur: " + str(problemconc)
|
||||||
|
|
||||||
|
# DataJSON
|
||||||
ostdata = {
|
ostdata = {
|
||||||
"topicId" : '12',
|
"topicId" : '12',
|
||||||
"name": name,
|
"name": name,
|
||||||
|
|
@ -424,12 +424,10 @@ def support(request):
|
||||||
"subject": 'Digitale Agentur: '+problemconc,
|
"subject": 'Digitale Agentur: '+problemconc,
|
||||||
"ip": "1.1.1.1",
|
"ip": "1.1.1.1",
|
||||||
"message": problem,
|
"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)
|
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):
|
if(r.status_code != 201):
|
||||||
messages.warning(request, f'Supportanfrage fehlgeschlagen!')
|
messages.warning(request, f'Supportanfrage fehlgeschlagen!')
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue