fix(activeuser): user isactive & adress niveau & route all
Some checks reported warnings
Cadoles/nineskeletor/pipeline/head This commit is unstable
Cadoles/nineskeletor/pipeline/pr-master This commit is unstable

This commit is contained in:
2022-10-02 14:50:48 +02:00
parent 2cad98ca86
commit 84230eb347
35 changed files with 749 additions and 214 deletions

View File

@ -49,7 +49,7 @@
{% if app.user %}
$.ajax({
method: "POST",
url: "{{ path('app_user_preference') }}",
url: "{{ path('app_all_preference') }}",
data: {
id:0,
key:'fgaudit',

View File

@ -66,7 +66,7 @@
{% elseif config.type=="header" %}
<div style="margin:10px auto;">
<img id="config_value_img" src="{{ path("app_minio_image",{file:"header/"~config.value}) }}" style="width:100%;margin:auto;display:block;">
<a class="btn btn-info btn-modal" style="width:100%" data-modalid="mymodallarge" data-modaltitle="Bannière" data-modalurl="{{ path('app_user_crop01', {"type": "header", "reportinput": "#config_value" }) }}" title='Ajouter une Bannière'>Modifier</a>
<a class="btn btn-info btn-modal" style="width:100%" data-modalid="mymodallarge" data-modaltitle="Bannière" data-modalurl="{{ path('app_all_crop01', {"type": "header", "reportinput": "#config_value" }) }}" title='Ajouter une Bannière'>Modifier</a>
</div>
{% endif %}
{{ form_row(form.help) }}

View File

@ -26,7 +26,7 @@
window.parent.$(".modal-title").html("ETAPE 1 - Téléchargez votre image");
function dropzonesuccess( file, response ) {
$(location).attr('href',"{{ path('app_user_crop02', {"type": type, "reportinput": reportinput }) }}?file="+response["file"]);
$(location).attr('href',"{{ path('app_all_crop02', {"type": type, "reportinput": reportinput }) }}?file="+response["file"]);
}
function closeModal() {

View File

@ -6,7 +6,7 @@
<p>
{%if access=="admin" %}
<a class="btn btn-success" href={{ path('app_'~access~'_group_submit') }}>Ajouter</a>
{%elseif access=="user" and app.session.get("submitgroup") %}
{%elseif access=="all" and app.session.get("submitgroup") %}
<a class="btn btn-success" href={{ path('app_'~access~'_group_submit') }}>Ajouter</a>
{% endif %}

View File

@ -45,6 +45,11 @@
Caractères interdits = caractères spéciaux sauf ' @ . - _<br>
</div>
{{ form_row(form.code) }}
{{ form_row(form.email) }}
{{ form_row(form.telephonenumber) }}
{{ form_row(form.postaladress) }}
{% if form.ldapfilter is defined %}
{{ form_row(form.fgassocldap) }}

View File

@ -47,6 +47,12 @@
Caractères interdits = caractères spéciaux sauf ' @ . - _<br>
</div>
{{ form_row(form.code) }}
{{ form_row(form.email) }}
{{ form_row(form.telephonenumber) }}
{{ form_row(form.postaladress) }}
{% if form.ldapfilter is defined %}
{{ form_row(form.ldapfilter) }}
{% endif %}

View File

@ -48,6 +48,11 @@
Caractères interdits = caractères spéciaux sauf ' @ . - _<br>
</div>
{{ form_row(form.code) }}
{{ form_row(form.email) }}
{{ form_row(form.telephonenumber) }}
{{ form_row(form.postaladress) }}
{% if form.ldapfilter is defined %}
{{ form_row(form.ldapfilter) }}
{% endif %}

View File

@ -49,6 +49,11 @@
Caractères interdits = caractères spéciaux sauf ' @ . - _<br>
</div>
{{ form_row(form.code) }}
{{ form_row(form.email) }}
{{ form_row(form.telephonenumber) }}
{{ form_row(form.postaladress) }}
{% if form.ldapfilter is defined %}
{{ form_row(form.ldapfilter) }}
{% endif %}

View File

@ -67,7 +67,12 @@
{% endif %}
<img id="user_avatar_img" src="{{ path('app_minio_image',{file:"avatar/"~avatar}) }}" style="max-width:90px;background-color:var(--colorbgbodydark);">
{{ form_widget(form.avatar) }}
<a class="btn btn-info btn-modal" style="width:100%" data-modalid="mymodallarge" data-modaltitle="Avatar" data-modalurl="{{ path('app_user_crop01', {"type": "avatar", "reportinput": "#user_avatar" }) }}" title='Ajouter un Avatar'>Modifier</a>
<a class="btn btn-info btn-modal" style="width:100%" data-modalid="mymodallarge" data-modaltitle="Avatar" data-modalurl="{{ path('app_all_crop01', {"type": "avatar", "reportinput": "#user_avatar" }) }}" title='Ajouter un Avatar'>Modifier</a>
{% if form.isactive is defined %}
<center>{{ form_row(form.isactive) }}</center>
{% endif %}
</div>
</div>

View File

@ -1,7 +1,7 @@
{% extends 'base.html.twig' %}
{% block body %}
{% if access=="admin" or access=="modo" %}
{% if access!="all" %}
<h1 class="page-header">Gestion des Utilisateurs</h1>
{% if appMasteridentity=="SQL" or not appSynchroPurgeUser %}
<a class="btn btn-success" href={{ path('app_'~access~'_user_submit') }}>Ajouter</a>
@ -9,9 +9,17 @@
{% endif %}
{% if auditUse and (access=="admin" or access=="audit") %}
<a class="btn btn-secondary float-end" href="{{ path("app_"~access~"_audit_render",{entityname:"User"}) }}"><i class="fas fa-eye fa-fw"></i> Audit</a>
<a class="btn btn-secondary float-end ms-3" href="{{ path("app_"~access~"_audit_render",{entityname:"User"}) }}"><i class="fas fa-eye fa-fw"></i> Audit</a>
{% endif %}
{% if access!="all" %}
<div class="form-check form-switch float-end mt-2">
<input class="form-check-input" type="checkbox" role="switch" id="checkisactivate" {% if isactive %}checked{%endif%}>
<label class="form-check-label" for="checkisactivate">{% if isactive %}Utilisateurs Actif{%else%}Utilisateurs Inactif{%endif%}</label>
</div>
{%endif%}
<div class="card mt-4">
<div class="card-header">
<i class="fa fa-table fa-fw"></i> Liste des Utilisateurs
@ -61,9 +69,26 @@
ajax: "{{ path('app_modo_user_tablelist') }}",
{% else %}
order: [[ 1, "asc" ]],
ajax: "{{ path('app_user_user_tablelist') }}",
ajax: "{{ path('app_all_user_tablelist') }}",
{% endif %}
});
{% if access!="all" %}
$('#checkisactivate').change(function() {
$.ajax({
method: "POST",
url: "{{ path('app_all_preference') }}",
data: {
id:0,
key:'userisactive',
value: ($("#checkisactivate").is(":checked"))
},
success: function() {
location.reload();
}
});
});
{% endif %}
});
</script>
{% endblock %}

View File

@ -39,7 +39,7 @@
<div class="pe-3">
<nav class="nav">
{% if app.user %}
<a class="nav-link" href="{{path("app_user_user")}}" title="Mon Profil">
<a class="nav-link" href="{{path("app_all_user")}}" title="Mon Profil">
<img src="{{ path('app_minio_image',{file:"avatar/"~app.user.avatar}) }}" class="avatar" style="width:35px;height:35px;">
</a>
@ -50,11 +50,11 @@
{% endif %}
{% if app.session.get("showannuaire") %}
<a class="nav-link" href="{{path("app_user_users")}}" title="Annuaire des Utilisateurs"><i class="fas fa-address-book fa-2x"></i></a>
<a class="nav-link" href="{{path("app_all_users")}}" title="Annuaire des Utilisateurs"><i class="fas fa-address-book fa-2x"></i></a>
{% endif %}
{% if appGroupuse %}
<a class="nav-link" href="{{path("app_user_group")}}" title="Gestion des Groupes de Travail"><i class="fas fa-users fa-2x"></i></a>
<a class="nav-link" href="{{path("app_all_group")}}" title="Gestion des Groupes de Travail"><i class="fas fa-users fa-2x"></i></a>
{% endif %}
<a id="switchHeader" class="nav-link" onclick="switchHeader()" title="Cacher / Afficher Bannière"><i class="fa fa-chevron-up fa-2x"></i></a>
@ -68,7 +68,7 @@
</nav>
{% if app.user %}
<div id="nameuser" style="text-align:right; margin-top:5px"><a href="{{ path('app_user_user') }}" title="Mon Profil">{{ app.user.firstname }} {{ app.user.lastname }}</a></div>
<div id="nameuser" style="text-align:right; margin-top:5px"><a href="{{ path('app_all_user') }}" title="Mon Profil">{{ app.user.firstname }} {{ app.user.lastname }}</a></div>
{% endif %}
</div>
</div>
@ -99,7 +99,7 @@
<ul id="menulink" class="nav navbar-right pe-3" style="display:none;">
{% if app.user %}
<a href="{{path("app_user_user")}}">
<a href="{{path("app_all_user")}}">
<img src="{{ path('app_minio_image',{file:"avatar/"~app.user.avatar}) }}" class="avatar" style="width:25px; height:25px; margin-top:-3px; margin-right:3px;">
</a>
@ -110,11 +110,13 @@
{% endif %}
{% if app.session.get("showannuaire") %}
<a href="{{path("app_user_users")}}"><i class="fas fa-address-book fa-fw"></i></a>
<a href="{{path("app_all_users")}}"><i class="fas fa-address-book fa-fw"></i></a>
{% endif %}
<a href="{{path("app_user_group")}}"><i class="fas fa-users fa-fw"></i></a>
{% if appGroupuse %}
<a href="{{path("app_all_group")}}"><i class="fas fa-users fa-fw"></i></a>
{% endif %}
<a id="switchHeader" class="btn-link" onclick="switchHeader()" title="Cacher / Afficher Bannière"><i class="fa fa-chevron-down fa-fw"></i></a>
<a href="{{path("app_logout")}}"><i class="fa fa-sign-out-alt fa-fw"></i></a>
@ -180,7 +182,7 @@
{% if app.user %}
$.ajax({
method: "POST",
url: "{{ path('app_user_preference') }}",
url: "{{ path('app_all_preference') }}",
data: {
id:0,
key:'fgheader',