Support Teil 1
This commit is contained in:
parent
318805d19d
commit
f755e6d3c9
Binary file not shown.
|
|
@ -114,7 +114,6 @@ CKEDITOR_CONFIGS = {
|
|||
}
|
||||
# Database
|
||||
# https://docs.djangoproject.com/en/2.2/ref/settings/#databases
|
||||
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.mysql',
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -160,6 +160,16 @@
|
|||
{%endif%}
|
||||
<!-- Divider -->
|
||||
<hr class="sidebar-divider d-none d-md-block">
|
||||
{% if active_link == 'support' %}
|
||||
<li class="nav-item active">
|
||||
{% else%}
|
||||
<li class="nav-item">
|
||||
{%endif%}
|
||||
<a class="nav-link " href="{% url 'supportda' %}" aria-expanded="true">
|
||||
<i class="fas fa-question"></i>
|
||||
<span>Support</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<!-- Sidebar Toggler (Sidebar) -->
|
||||
<div class="text-center d-none d-md-inline">
|
||||
|
|
|
|||
|
|
@ -0,0 +1,18 @@
|
|||
{% extends "users/base.html" %}
|
||||
{% load crispy_forms_tags %}
|
||||
{% block content %}
|
||||
<div class="content-section">
|
||||
<h3>Supportanfrage stellen</h3>
|
||||
<hr>
|
||||
<form methode="POST">
|
||||
{% csrf_token %}
|
||||
{{form|crispy}}
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-success">Supportanfrage verschicken</button>
|
||||
<a href="{% url 'users-management' %}" class="btn btn-success">Abbrechen</a>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
||||
|
|
@ -27,7 +27,8 @@ urlpatterns = [
|
|||
path('prioupdate/', views.UsersPrioUpdate, name="users-prioupdate"),
|
||||
path('areataskupdate/<int:pk>/', views.UsersAreaTaskUpdate, name="users-areataskupdate"),
|
||||
path('globalsearch/', views.GlobalSearch, name="globalsearch"),
|
||||
path('standardrout/', views.searchStandardRouter, name="standardrouter")
|
||||
path('standardrout/', views.searchStandardRouter, name="standardrouter"),
|
||||
path('supportda/', views.support, name="supportda")
|
||||
]
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -96,4 +96,14 @@ class UserAreaTaskForm(forms.Form):
|
|||
if user in task.usersfield.all():
|
||||
self.fields['task_'+str(task.pk)] = forms.BooleanField(required=False, initial=True, label="<h5>"+task.name+"</h5>")
|
||||
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>")
|
||||
|
||||
|
||||
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")
|
||||
self.fields['problemconc'] = forms.CharField(required=True, label="Problemzusammenfassung")
|
||||
self.fields['problem'] = forms.CharField(required=True, widget=forms.Textarea, label="Ausführliche Beschreibung")
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ from django.shortcuts import render, redirect, reverse
|
|||
from django.contrib.auth.mixins import LoginRequiredMixin, UserPassesTestMixin
|
||||
from django.contrib.auth.decorators import login_required
|
||||
from django.conf import settings
|
||||
from .usersforms import UsersAddNewUser, UsersAddProfileForm, UsersChangeProfil, AgencyUpdateForm, UsersPermForm, UserAreaTaskForm
|
||||
from .usersforms import UsersAddNewUser, UsersAddProfileForm, UsersChangeProfil, AgencyUpdateForm, UsersPermForm, UserAreaTaskForm, SupportForm
|
||||
from django.views.generic import CreateView, ListView, UpdateView, DetailView, DeleteView, View
|
||||
from django.contrib import messages
|
||||
from django.contrib.auth.models import User
|
||||
|
|
@ -396,3 +396,9 @@ def UsersAreaTaskUpdate(request, pk):
|
|||
|
||||
return render(request, 'users/users_areatasks.html', context)
|
||||
|
||||
def support(request):
|
||||
context = {
|
||||
'active_link' : 'support',
|
||||
'form' : SupportForm(request.user)
|
||||
}
|
||||
return render(request, 'users/support.html', context)
|
||||
|
|
|
|||
Loading…
Reference in New Issue