116 lines
3.8 KiB
HTML
116 lines
3.8 KiB
HTML
{% load crispy_forms_tags %}
|
|
<div class="media">
|
|
<img class="img-profile " width="17%" src="{{ user.profile.get_photo_url }}">
|
|
<div class="media-body col-5">
|
|
<h2 class="account-heading">Profil von {{ user.first_name }} {{ user.last_name }}</h2>
|
|
<hr>
|
|
<div class="row">
|
|
<div class="col-6">
|
|
<h6><b>Name</b></h6>
|
|
<p>
|
|
{{ user.first_name }} {{ user.last_name }}
|
|
</p>
|
|
<h6><b>E-Mail</b></h6>
|
|
<p>
|
|
{{ user.email }}
|
|
</p>
|
|
<h6><b>Agenturfunktion</b></h6>
|
|
<p>
|
|
{{ user.profile.func }}
|
|
</p>
|
|
</div>
|
|
<div class="col-6">
|
|
<h6><b>Tätigkeit</b></h6>
|
|
<p>
|
|
{{ user.profile.compfunc }}
|
|
</p>
|
|
<h6><b>Festnetz</b></h6>
|
|
<p>
|
|
{{ user.profile.phoneland }}
|
|
</p>
|
|
<h6><b>Mobil</b></h6>
|
|
<p>
|
|
{{ user.profile.phonemobile }}
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- Für das Speichern der Bilder enctype -->
|
|
<div class="col-8">
|
|
<form method="POST" enctype="multipart/form-data">
|
|
{% csrf_token %}
|
|
<input type="hidden" name="form_type" value="userform">
|
|
<input type="hidden" name="settings_area" value="profil">
|
|
<fieldset class="form-group mb-2">
|
|
<legend class="border-bottom mb-4">
|
|
Profil bearbeiten
|
|
</legend>
|
|
{% if request.user.profile.showtooltips %}
|
|
<div class="custom-control custom-checkbox mb-2" >
|
|
<input type="checkbox" class="custom-control-input" name="showtooltips" id="showtooltips" checked>
|
|
<label class="custom-control-label" for="showtooltips" >Tooltips anzeigen</label>
|
|
</div>
|
|
{% else %}
|
|
<div class="custom-control custom-checkbox mb-2">
|
|
<input type="checkbox" class="custom-control-input" name="showtooltips" id="showtooltips">
|
|
<label class="custom-control-label" for="showtooltips">Tooltips anzeigen</label>
|
|
</div>
|
|
{% endif %}
|
|
<!-- FORMS LADEN -->
|
|
{{ userform|crispy }}
|
|
</fieldset>
|
|
|
|
<small>Agenturrelevante Daten (Bild, Telefonnummer etc.) werden in der Benutzerverwaltung verändert.</small>
|
|
<div class="form-group mt-3">
|
|
<button type="submit" class="btn btn-success">E-Mailadresse aktualisieren</button>
|
|
</div>
|
|
</form>
|
|
<form method="POST" enctype="multipart/form-data">
|
|
{% csrf_token %}
|
|
<input type="hidden" name="form_type" value="passwordform">
|
|
<input type="hidden" name="settings_area" value="profil">
|
|
<fieldset class="form-group mb-2">
|
|
<!-- FORMS LADEN -->
|
|
{{ passwordform|crispy}}
|
|
</fieldset>
|
|
|
|
<div class="form-group mt-3">
|
|
<button type="submit" class="btn btn-success">Passwort ändern</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
<script>
|
|
$("#showtooltips").change(function(){
|
|
$.ajax(
|
|
{
|
|
type: "GET",
|
|
url: "/dasettings/ajax",
|
|
data:{
|
|
action : "change_showtooltips",
|
|
newtoolvalue : $("#showtooltips").prop("checked")
|
|
},
|
|
success: function( data )
|
|
{
|
|
if(data['success'])
|
|
{
|
|
$('#notchange_done').toast('show');
|
|
$("#toast_savecontent").html("Tooltipseinstellung erfolgreich gespeichert!");
|
|
|
|
if(data['data']['newttvalue']){
|
|
$('*').tooltip("enable");
|
|
}
|
|
else{
|
|
$('*').tooltip("disable");
|
|
}
|
|
}
|
|
else{
|
|
$('#notchange_err').toast('show');
|
|
$("#toast_errcontent").html("Tooltips konnten nicht gespeichert werden!");
|
|
}
|
|
|
|
}
|
|
});
|
|
})
|
|
</script>
|