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

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

{{ form_widget(form.submit) }} {% if by=="admin" %} Annuler {% elseif by=="update" %} Annuler {% elseif by=="profil" %} Annuler {% endif %} {% if mode=="update" and category.id >= 0 %} 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.user) }} {{ form_row(form.order) }} {{ form_row(form.name) }} {{ form_row(form.usecategoryconfig) }}
{{ form_row(form.appthumbwidth) }} {{ form_row(form.appthumbheight) }} {{ form_row(form.appthumbfilter) }}
{{ form_row(form.appthumbfiltergrayscale) }} {{ form_row(form.appthumbfilteropacity) }} {{ form_row(form.appthumbfiltersepia) }}
{{ form_end(form) }} {% endblock %} {% block localjavascript %} function showhide() { if($("#category_usecategoryconfig").val()==0) { $("#blockconfig").hide(); } else { $("#blockconfig").show(); if($("#category_appthumbfilter").val()==0) { $("#blockfilter").hide(); } else { $("#blockfilter").show(); } } } $( "#category_usecategoryconfig" ).change(function() { showhide(); }); $( "#category_appthumbfilter" ).change(function() { showhide(); }); $(document).ready(function() { showhide(); $("#category_order").focus(); }); {% endblock %}