first commit symfony 6
This commit is contained in:
120
templates/Niveau01/edit.html.twig
Executable file
120
templates/Niveau01/edit.html.twig
Executable file
@ -0,0 +1,120 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
{{ form_start(form) }}
|
||||
<h1 class="page-header">
|
||||
{% if mode=="update" %}
|
||||
Modification {{ appNiveau01label }} = {{niveau01.label}}
|
||||
{% elseif mode=="submit" %}
|
||||
Création {{ appNiveau01label }}
|
||||
{% endif %}
|
||||
</h1>
|
||||
|
||||
{{ form_widget(form.submit) }}
|
||||
<a class="btn btn-secondary" href={{ path('app_admin_niveau01') }}>Annuler</a>
|
||||
{% if mode=="update" %}
|
||||
<a class="btn btn-danger float-end" href={{ path('app_admin_niveau01_delete',{id:niveau01.id}) }} data-method="delete" data-confirm="Êtes-vous sûr de vouloir supprimer cet enregistrement ?">Supprimer</a>
|
||||
{% endif %}
|
||||
|
||||
{% if app.session.flashbag.has('error') %}
|
||||
<div class='alert alert-danger' style='margin: 5px 0px'>
|
||||
<strong>Erreur</strong><br>
|
||||
{% for flashMessage in app.session.flashbag.get('error') %}
|
||||
{{ flashMessage }}<br>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if app.session.flashbag.has('notice') %}
|
||||
<div class='alert alert-info' style='margin: 5px 0px'>
|
||||
<strong>Information</strong><br>
|
||||
{% for flashMessage in app.session.flashbag.get('notice') %}
|
||||
{{ flashMessage }}<br>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="card mt-4">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-pencil-alt fa-fw"></i> Informations
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
{{ form_row(form.label) }}
|
||||
<div class='alert alert-info' style='font-size: 80%;padding: 5px;margin-top:-2px; border-radius:0px 0px 0.25rem 0.25rem'>
|
||||
Caractères interdits = caractères spéciaux sauf ' @ . - _<br>
|
||||
</div>
|
||||
|
||||
{% if form.ldapfilter is defined %}
|
||||
{{ form_row(form.fgassocldap) }}
|
||||
|
||||
<div id="block_ldapfilter">
|
||||
{{ form_row(form.ldapfilter) }}
|
||||
<div class='alert alert-info' style='font-size: 80%;padding: 5px;margin-top:-2px; border-radius:0px 0px 0.25rem 0.25rem'>
|
||||
Exemple = (cn=monniveau01)<br>
|
||||
La recherche pour retrouver l'entrée annuaire se fera via la branche présente en parametre d'environnement LDAP_BASENIVEAU01<br>
|
||||
On rattachera les utilisateurs membres de cette entrée via le parametre d'environnement LDAP_GROUPMEMBER<br>
|
||||
Si aucun niveau01 est trouvé pour un utilisateur il sera rattaché au niveau01 avec l'id -1<br>
|
||||
Si un utilisateur est membre de plusieurs niveau01 annuaire, il sera rattaché au dernier niveau01 trouvé dans l'annuaire
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if form.attributes is defined %}
|
||||
{{ form_row(form.fgassocsso) }}
|
||||
|
||||
<div id="block_attributs">
|
||||
{{ form_row(form.attributes) }}
|
||||
<div class='alert alert-info' style='font-size: 80%;padding: 5px;margin-top:-2px; border-radius:0px 0px 0.25rem 0.25rem'>
|
||||
Exemple = {"user_groups" : "monniveau01"}<br>
|
||||
user_groups étant le parametre d'environnement CAS_GROUP
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block localscript %}
|
||||
<script>
|
||||
$('document').ready(function(){
|
||||
fgaff=($("#niveau01_ldapfilter").val()!="");
|
||||
if(!fgaff) {
|
||||
$("#block_ldapfilter").hide();
|
||||
$("#niveau01_fgassocldap").val(0);
|
||||
}
|
||||
|
||||
$( "#niveau01_fgassocldap").change(function() {
|
||||
|
||||
if($("#niveau01_fgassocldap").val()==0) {
|
||||
$("#block_ldapfilter").hide();
|
||||
$("#niveau01_ldapfilter").val("");
|
||||
}
|
||||
else {
|
||||
$("#block_ldapfilter").show();
|
||||
$("#label_niveau01_ldapfilter").show();
|
||||
}
|
||||
});
|
||||
|
||||
fgaff=($("#niveau01_attributes").val()!="");
|
||||
if(!fgaff) {
|
||||
$("#block_attributs").hide();
|
||||
$("#niveau01_fgassocsso").val(0);
|
||||
}
|
||||
|
||||
$( "#niveau01_fgassocsso").change(function() {
|
||||
|
||||
if($("#niveau01_fgassocsso").val()==0) {
|
||||
$("#block_attributs").hide();
|
||||
$("#niveau01_attributes").val("");
|
||||
}
|
||||
else {
|
||||
$("#block_attributs").show();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
{% endblock %}
|
47
templates/Niveau01/list.html.twig
Normal file
47
templates/Niveau01/list.html.twig
Normal file
@ -0,0 +1,47 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
<h1 class="page-header">Gestion des {{ appNiveau01label }}s </h1>
|
||||
|
||||
<p><a class="btn btn-success" href={{ path('app_admin_niveau01_submit') }}>Ajouter</a></p>
|
||||
|
||||
<div class="card mt-4">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-table fa-fw"></i> Liste des {{ appNiveau01label }}s
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<table class="table table-striped table-bordered table-hover" id="dataTables" style="width:100%; font-size:11px;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="70px" class="no-sort">Action</th>
|
||||
<th>{{appNiveau01label}}</th>
|
||||
{% if appMasteridentity=="LDAP" or appSynchro=="LDAP2NINE" %}
|
||||
<th class="no-sort">Filtre LDAP</th>
|
||||
{% endif %}
|
||||
|
||||
{% if appMasteridentity=="SSO" %}
|
||||
<th class="no-sort">Attributs SSO</th>
|
||||
{% endif %}
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block localscript %}
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#dataTables').DataTable({
|
||||
columnDefs: [ { "targets": 'no-sort', "orderable": false } ],
|
||||
responsive: true,
|
||||
iDisplayLength: 100,
|
||||
order: [[ 1, "asc" ]],
|
||||
processing: true,
|
||||
serverSide: true,
|
||||
ajax: "{{ path('app_admin_niveau01_tablelist') }}",
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
Reference in New Issue
Block a user