57 lines
2.1 KiB
Twig
57 lines
2.1 KiB
Twig
{% 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>
|
|
{%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%}
|
|
|
|
{% include('include/error.html.twig') %}
|
|
|
|
<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>
|
|
|
|
<div class="row">
|
|
<div class="col-md-6 mx-auto">
|
|
<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>
|
|
</div>
|
|
|
|
{%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>
|
|
</div>
|
|
</div>
|
|
{%endif%}
|
|
</div>
|
|
{{ form_end(form) }}
|
|
|
|
{% endblock %}
|
|
|
|
{% block localscript %}
|
|
<script>
|
|
$(document).ready(function() {
|
|
$("#user_username").focus();
|
|
});
|
|
</script>
|
|
{% endblock %}
|