{% extends 'base.html.twig' %} {% block body %} {{ form_start(form) }}

{% if mode=="update" %} Modification CONFIGURATION {% elseif mode=="submit" %} Création CONFIGURATION {% endif %}

{{ form_widget(form.submit) }} Annuler {% if mode=="update" and not config.required %} Supprimer {% endif %}

{% if app.session.flashbag.has('error') %}
Erreur
{% for flashMessage in app.session.flashbag.get('error') %} {{ flashMessage }}
{% endfor %}
{% endif %} {% if app.session.flashbag.has('notice') %}
Information
{% for flashMessage in app.session.flashbag.get('notice') %} {{ flashMessage }}
{% endfor %}
{% endif %}
Informations
{{ form_row(form.id) }} {{ form_row(form.value) }} {% if config.type=="logo" %}
{% set color = "" %} {% if config.id=='logodark' %} {% set color = app.session.get('colorbgbodydark') %} {% elseif config.id=='logolight' %} {% set color = app.session.get('colorbgbodylight') %} {% endif %} Modifier
{% elseif config.type=="hero" %}
Modifier
{% elseif config.type=="image" %}
Modifier
{% endif %} {{ form_row(form.help) }}
{{ form_end(form) }} {% endblock %} {% block localjavascript %} $("#config_value_img").on('error', function(){ var imgSrc = $(this).attr('src'); if(imgSrc!="/{{appAlias}}/uploads/{{config.type}}/") $(this).attr('src',imgSrc); }); $('#extraLargeModal').on('hidden.bs.modal', function () { var imgSrc = $("#config_value_img").attr('src'); $("#config_value_img").attr('src',imgSrc); }); {% endblock %}