CKEditor Plugin angelegt, aber nicht eingebunden.
Organigramm sichtbar/nicht sichtbar bei User eingestellt Bereichspriorisierung eingestellt und im Main-Organigramm übernommen Rechtschreibfehler bei Mail geklärt Passwort-Reset-Mail
This commit is contained in:
parent
590d207429
commit
184e1b6a54
|
|
@ -23,7 +23,7 @@
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" id="userown" data-toggle="tab" href="#t_userown" role="tab" aria-controls="t_userown" aria-selected="false">Eigene Standards</a>
|
<a class="nav-link" id="userown" data-toggle="tab" href="#t_userown" role="tab" aria-controls="t_userown" aria-selected="false">Eigene Standards</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
|
|
@ -49,7 +49,8 @@
|
||||||
</legend>
|
</legend>
|
||||||
<!-- FORMS LADEN -->
|
<!-- FORMS LADEN -->
|
||||||
{{ profileform_form|crispy }}
|
{{ profileform_form|crispy }}
|
||||||
</fieldset>
|
<button type="button" id="" onclick="javascript:sendPassMail({{prof_user.pk}})" class="btn btn-success">E-Mail mit Link zur Passworterstellung senden</button> <span class="alert alert-success" id="mailsend" role="alert" style="display: none;"> E-Mail gesendet!</span>
|
||||||
|
</fieldset>
|
||||||
Übergeordneter Mitarbeiter: <span id="ps_act">{{prof_user.profile.parent.first_name}} {{prof_user.profile.parent.last_name}}</span>
|
Übergeordneter Mitarbeiter: <span id="ps_act">{{prof_user.profile.parent.first_name}} {{prof_user.profile.parent.last_name}}</span>
|
||||||
<div class="input-group mb-3">
|
<div class="input-group mb-3">
|
||||||
<input class="form-control" name="puser" id="puser" list="parentuser" type="text" onkeyup="javascript:checkValueAddParent()">
|
<input class="form-control" name="puser" id="puser" list="parentuser" type="text" onkeyup="javascript:checkValueAddParent()">
|
||||||
|
|
@ -73,6 +74,25 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
//Call Function in view to send e-mail with pass-reset-data
|
||||||
|
function sendPassMail(id){
|
||||||
|
$.ajax(
|
||||||
|
{
|
||||||
|
type: "GET",
|
||||||
|
url: "/dashboard/sendpassmail",
|
||||||
|
data:{
|
||||||
|
userid : {{prof_user.pk}}
|
||||||
|
},
|
||||||
|
success: function( data )
|
||||||
|
{
|
||||||
|
if(data["message"] == 0){
|
||||||
|
$("#mailsend").fadeIn().delay(4000).fadeOut();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
tempid = null;
|
tempid = null;
|
||||||
function clearSearchfield(){
|
function clearSearchfield(){
|
||||||
$("#puser").val("");
|
$("#puser").val("");
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,9 @@ urlpatterns = [
|
||||||
path('globalsearch/', views.GlobalSearch, name="globalsearch"),
|
path('globalsearch/', views.GlobalSearch, name="globalsearch"),
|
||||||
path('standardrout/', views.searchStandardRouter, name="standardrouter"),
|
path('standardrout/', views.searchStandardRouter, name="standardrouter"),
|
||||||
path('support/', views.support, name="supportda"),
|
path('support/', views.support, name="supportda"),
|
||||||
path('setuserparent/', views.setuserparent, name="users-setuserparent")
|
path('setuserparent/', views.setuserparent, name="users-setuserparent"),
|
||||||
|
path('sendpassmail/', views.sendpassmail, name="users-sendpassmail")
|
||||||
|
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,11 +5,10 @@ from django.conf import settings
|
||||||
from .usersforms import UsersAddNewUser, UsersAddProfileForm, UsersChangeProfil, AgencyUpdateForm, UsersPermForm, UserAreaTaskForm, SupportForm
|
from .usersforms import UsersAddNewUser, UsersAddProfileForm, UsersChangeProfil, AgencyUpdateForm, UsersPermForm, UserAreaTaskForm, SupportForm
|
||||||
from django.views.generic import CreateView, ListView, UpdateView, DetailView, DeleteView, View
|
from django.views.generic import CreateView, ListView, UpdateView, DetailView, DeleteView, View
|
||||||
from django.contrib import messages
|
from django.contrib import messages
|
||||||
from django.contrib.auth.models import User
|
from django.contrib.auth.models import User, Permission
|
||||||
from django.db import models
|
from django.db import models
|
||||||
from .models import Profile, Agency
|
from .models import Profile, Agency
|
||||||
from django.core.mail import send_mail
|
from django.core.mail import send_mail
|
||||||
from django.contrib.auth.models import Permission
|
|
||||||
from django.http import HttpResponseRedirect,HttpResponse, JsonResponse
|
from django.http import HttpResponseRedirect,HttpResponse, JsonResponse
|
||||||
from areas.models import Areas
|
from areas.models import Areas
|
||||||
from tasks.models import Tasks
|
from tasks.models import Tasks
|
||||||
|
|
@ -22,6 +21,7 @@ import requests
|
||||||
import json
|
import json
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
from django.template.loader import render_to_string
|
from django.template.loader import render_to_string
|
||||||
|
from django.contrib.auth.forms import PasswordResetForm
|
||||||
'''
|
'''
|
||||||
|
|
||||||
DASHBOARD-View
|
DASHBOARD-View
|
||||||
|
|
@ -547,4 +547,20 @@ def support(request):
|
||||||
return render(request, 'users/support_done.html', context)
|
return render(request, 'users/support_done.html', context)
|
||||||
else:
|
else:
|
||||||
|
|
||||||
return render(request, 'users/support.html', context)
|
return render(request, 'users/support.html', context)
|
||||||
|
|
||||||
|
'''
|
||||||
|
|
||||||
|
Schickt eine E-Mail an den User inkl. Passwortlink zum zurücksetzen.
|
||||||
|
|
||||||
|
'''
|
||||||
|
def sendpassmail(request):
|
||||||
|
if(request.method == 'GET'):
|
||||||
|
userid = request.GET['userid']
|
||||||
|
tempuser = User.objects.get(pk=userid)
|
||||||
|
form = PasswordResetForm({'email': tempuser.email})
|
||||||
|
if form.is_valid():
|
||||||
|
request.META['SERVER_NAME'] = 'digitale-agentur.com'
|
||||||
|
request.META['SERVER_PORT'] = '443'
|
||||||
|
form.save(request= request,use_https=True,from_email="support@digitale-agentur.com",email_template_name='users/password_reset_mail.html')
|
||||||
|
return JsonResponse({'message' : 0})
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue