72 lines
2.7 KiB
Twig
Executable File
72 lines
2.7 KiB
Twig
Executable File
{% extends '@CadolesCore/base.html.twig' %}
|
|
|
|
{% block pagewrapper %}
|
|
{{ form_start(form) }}
|
|
<h1 class="page-header">Modification Configuration Générale = {{config.id}}</h1>
|
|
|
|
{{ form_widget(form.submit) }} <a class="btn btn-default" href={{ path('cadoles_core_config_commun') }}>Annuler</a>
|
|
|
|
<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="panel panel-primary">
|
|
<div class="panel-heading">
|
|
<i class="fa fa-pencil fa-fw"></i> Informations
|
|
</div>
|
|
|
|
<div class="panel-body">
|
|
{{ form_label(form.id) }}
|
|
{{ form_widget(form.id) }}
|
|
|
|
{% if type=="logo" %}
|
|
<div style="width:90px; margin:10px auto;">
|
|
<img id="config_value_img" src="/{{ alias }}/{{ config.value }}" style="width:90px;height:auto;margin:auto;display:block;margin-bottom:5px;">
|
|
{{ form_widget(form.value) }}
|
|
<a class="btn btn-info" style="width:90px" data-toggle="modal" data-target="#mymodal" onClick="ModalLoad('mymodal','Logo','{{ path('cadoles_core_config_logo') }}');" title='Ajouter un Logo'>Modifier</a>
|
|
</div>
|
|
|
|
{% elseif type=="header" %}
|
|
<div style="margin:10px auto;">
|
|
<img id="config_value_img" src="/{{ alias }}/{{ config.value }}" style="width:100%;margin:auto;display:block;">
|
|
{{ form_widget(form.value) }}
|
|
<a class="btn btn-info" style="width:100%" data-toggle="modal" data-target="#mymodal" onClick="ModalLoad('mymodal','header','{{ path('cadoles_core_config_header') }}');" title='Ajouter un Header'>Modifier</a>
|
|
</div>
|
|
|
|
{% else %}
|
|
{{ form_label(form.value) }}
|
|
{{ form_widget(form.value) }}
|
|
{% endif %}
|
|
|
|
{{ form_widget(form.help) }}
|
|
</div>
|
|
</div>
|
|
|
|
{{ form_end(form) }}
|
|
{% endblock %}
|
|
|
|
{% block localjavascript %}
|
|
$('#mymodal').on('hidden.bs.modal', function () {
|
|
var imgSrc = $("#config_value_img").attr('src');
|
|
$("#config_value_img").attr('src',imgSrc);
|
|
});
|
|
|
|
|
|
{% endblock %}
|