2024-11-26 20:42:13 +01:00
{% extends 'base.html.twig' %}
{% block title %} = {{ title }} {% endblock %}
{% block body %}
<h1> {{ title }} </h1>
{{ form_start ( form ) }}
{{ form_widget ( form .submit ) }}
<a href=" {{ path ( routecancel ) }} " class="btn btn-secondary ms-1">Annuler</a>
2024-12-24 17:29:37 +01:00
{% if mode == "update" %} <a href=" {{ path ( routedelete , { id : form .vars .value .id } ) }} " class="btn btn-danger float-end" onclick="return confirm('Confirmez-vous la suppression de cet enregistrement ?')">Supprimer</a> {% endif %}
2024-11-26 20:42:13 +01:00
2024-12-24 17:29:37 +01:00
{% include ( 'include/error.html.twig' ) %}
2024-12-06 08:09:07 +01:00
2024-12-24 17:29:37 +01:00
<div class="text-center d-flex flex-column align-items-center">
<img id="user_avatar_img" src=" {{ asset ( form .vars .value .avatar ) }} " class="bigavatar mb-2">
{{ form_row ( form .avatar ) }}
<a class="btn btn-info" style="max-width:100%; margin-bottom:15px;" data-bs-toggle="modal" data-bs-target="#mymodal" onClick="ModalLoad('mymodal','Avatar',' {{ path ( 'app_user_upload_crop01' , { endpoint :'avatar' , reportThumb :'user_avatar' } ) }} ');" title='Ajouter un avatar'>Modifier</a>
</div>
2024-12-06 08:09:07 +01:00
<div class="row">
2024-12-24 17:29:37 +01:00
<div class="col-md-6 mx-auto">
2024-12-06 08:09:07 +01:00
<div class="card mt-3">
<div class="card-header">Information</div>
<div class="card-body">
{{ form_row ( form .username ) }}
{{ form_row ( form .password ) }}
{{ form_row ( form .email ) }}
</div>
</div>
2024-11-26 20:42:13 +01:00
</div>
2024-12-06 08:09:07 +01:00
2024-12-24 17:29:37 +01:00
{% if form .roles is defined %}
<div class="col-md-6">
<div class="card mt-3">
<div class="card-header">Permissions</div>
<div class="card-body">
{{ form_row ( form .roles ) }}
{{ form_row ( form .companys ) }}
</div>
2024-12-06 08:09:07 +01:00
</div>
</div>
2024-12-24 17:29:37 +01:00
{% endif %}
2024-11-26 20:42:13 +01:00
</div>
{{ form_end ( form ) }}
{% endblock %}
{% block localscript %}
2024-12-24 17:29:37 +01:00
<script>
2024-11-26 20:42:13 +01:00
$(document).ready(function() {
$("#user_username").focus();
});
</script>
{% endblock %}