92 lines
2.9 KiB
Twig
92 lines
2.9 KiB
Twig
|
{% extends 'base.html.twig' %}
|
||
|
|
||
|
{% block body %}
|
||
|
{{ form_start(form) }}
|
||
|
<h1 class="page-header">
|
||
|
{% if mode=="update" %}
|
||
|
Modification ILLUSTRATION
|
||
|
{% elseif mode=="submit" %}
|
||
|
Création ILLUSTRATION
|
||
|
{% endif %}
|
||
|
</h1>
|
||
|
|
||
|
{{ form_widget(form.submit) }}
|
||
|
|
||
|
{% if by=="console" %}
|
||
|
<a class="btn btn-secondary" href={{ path('app_illustration') }}>Annuler</a>
|
||
|
{% else %}
|
||
|
<a class="btn btn-secondary" href={{ path('app_home') }}>Annuler</a>
|
||
|
{% endif %}
|
||
|
|
||
|
{% if mode=="update" %}
|
||
|
<a href="{{ path('app_illustration_delete',{'id':illustration.id, 'by':by}) }}"
|
||
|
class="btn btn-danger float-right"
|
||
|
data-method="delete"
|
||
|
data-confirm="Êtes-vous sûr de vouloir supprimer cet entregistrement ?">
|
||
|
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="row">
|
||
|
<div class="col-md-6">
|
||
|
<div class="card">
|
||
|
<div class="card-header">
|
||
|
<i class="fa fa-pencil-alt fa-fw"></i> Informations
|
||
|
</div>
|
||
|
|
||
|
<div class="card-body">
|
||
|
{{ form_row(form.name) }}
|
||
|
{{ form_row(form.category) }}
|
||
|
{{ form_row(form.description) }}
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div class="col-md-6">
|
||
|
<div class="card">
|
||
|
<div class="card-header">
|
||
|
<i class="fa fa-pencil-alt fa-fw"></i> Illustration
|
||
|
</div>
|
||
|
|
||
|
<div class="card-body">
|
||
|
{{ form_widget(form.illustration) }}
|
||
|
{{ form_widget(form.width) }}
|
||
|
{{ form_widget(form.height) }}
|
||
|
<a class="btn btn-info" style="width:100%; margin-bottom:10px" onClick="ModalLoad('extraLargeModal','Illustration','{{ path('app_illustration_upload') }}');" title='Ajouter une banière'>Télécharger une Illustration</a>
|
||
|
<img id="illustration_illustration_img" src="/{{ appAlias }}/uploads/illustration/{{illustration.illustration}}" style="width:100%;margin:auto;display:block;">
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
{{ form_end(form) }}
|
||
|
|
||
|
{% endblock %}
|
||
|
|
||
|
{% block localjavascript %}
|
||
|
$(document).ready(function() {
|
||
|
$("#illustration_order").focus();
|
||
|
});
|
||
|
{% endblock %}
|