nineskeletor/templates/Icon/edit.html.twig

79 lines
2.9 KiB
Twig
Raw Permalink Normal View History

2023-01-10 11:13:28 +01:00
{% extends 'base.html.twig' %}
{% block body %}
{{ form_start(form) }}
{% if not inframe %}
<h1 class="page-header">
{% if mode=="update" %}
Modification Icône
{% elseif mode=="submit" %}
Création Icône
{% endif %}
</h1>
{%endif%}
{{ form_widget(form.submit) }}
<a class="btn btn-secondary" href={{ path('app_'~access~'_icon',{'inframe':inframe}) }}>Annuler</a>
{% if mode=="update" and not issystem %}
<a href={{ path('app_'~access~'_icon_delete',{'id':icon.id,'inframe':inframe}) }}
class="btn btn-danger float-end"
data-method="delete" data-csrf="_token:{{ 'csrf' }}"
data-confirm="Êtes-vous sûr de vouloir supprimer cet icône ?">
Supprimer
</a>
{% endif %}
<br><br>
{% 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">
<div class="card-header">
<i class="fa fa-pencil fa-fw"></i> Informations
</div>
<div class="card-body">
<div style="width:110px; margin:10px auto;">
<img id="icon_label_img" src="{{ path("app_minio_image",{file:icon.label}) }}" style="padding:10px; width:110px;height:auto;margin:auto;display:block;margin-bottom:5px;background-color: var(--colorbgbodydark)">
{{ form_widget(form.label) }}
{% if mode=="submit" or not issystem %}
<a class="btn btn-info btn-modal" style="width:110px" data-modalid="mymodallarge" data-modaltitle="Icône" data-modalurl="{{ path('app_'~access~'_icon_upload', {"type": "icon", "reportinput": "#icon_label" }) }}" title='Ajouter un Icône'>Modifier</a>
{%endif%}
</div>
{% if mode=="submit" or not issystem %}
<div style="width:200px; margin: 10px auto;text-align:center;">
Privilégiez des images carrées de minimum 90px par 90px et avec un fond transparent
</div>
{%endif%}
{{ form_row(form.tags) }}
</div>
</div>
{% if auditUse and mode=="update" and (access=="admin" or access=="modo" or access=="audit") %}
<div class="float-end" style="width:700px;max-width:100%">
{{ render(path("app_"~access~"_audit_renderid",{entityname:"Icon",entityid:icon.id})) }}
</div>
{% endif %}
{{ form_end(form) }}
{% endblock %}