Skip to content

Instantly share code, notes, and snippets.

@dionisos2
Last active December 16, 2015 14:39
Show Gist options
  • Save dionisos2/5450645 to your computer and use it in GitHub Desktop.
Save dionisos2/5450645 to your computer and use it in GitHub Desktop.
Form theming problem.
{% extends 'form_div_layout.html.twig' %}
{% block TrouveTout_Element_widget %}
{% spaceless %}
{{ parent() }}
<div class="enligne">
{% for child in form.children %}
{% if child.name == 'childElement' %}
{{ form_row(child) }}
{% endif %}
{% endfor %}
</div>
<div class="enligne">
{{ form_rest(form) }}
</div>
{% endspaceless %}
{% endblock %}
{% block TrouveTout_Caract_widget %}
{% spaceless %}
aunrisetuanristeuarsitenruasite
{{ parent() }}
{{ form_row(form.name) }}
{{ form_row(form.type) }}
{% if form.value is defined %}
{{ form_row(form.value) }}
{% endif %}
{% if image is defined %}
<img src="{{ asset('img/')}}{{image}}" alt="caract image: {{image}}" height="100" width="100">
{% endif %}
{% if objects is defined %}
{% for object in objects %}
<a href="{{ path('edit_concept', {id: object.id}) }}">{{object.name}}</a>/
{% endfor %}
{% endif %}
<div class="enligne">
{% if form.prefix is defined %}
{{ form_row(form.prefix) }}
{{ form_row(form.unit) }}
{% endif %}
</div>
{{ form_rest(form) }}
{% endspaceless %}
{% endblock %}
{% block TrouveTout_ConceptConcept_widget %}
{% spaceless %}
{{ parent() }}
{{ form_row(form.moreGeneral) }}
{% if categoryName is defined %}
<a href="{{ path('edit_concept', {id: categoryId}) }}">{{categoryName}}</a>
{% endif %}
{{ form_rest(form) }}
{% endspaceless %}
{% endblock %}
{% block TrouveTout_Set_widget %}
{% spaceless %}
aunrietsunrastienruatiesrnuatesituarnisetusranteinrsate
{{ parent() }}
{% set attr = attr|merge({'prototype_specify_name': form_row(prototype_specify_name) }) %}
{% endspaceless %}
{% endblock %}
{% block TrouveTout_Category_widget %}
auetsrnuasiterusatie
{{ parent() }}
{% set attr = attr|merge({'prototype_specify_name': form_row(prototype_specify_name) }) %}
{% endblock %}
{% block TrouveTout_Research_widget %}
auinrstarnusiternuastieruastei
{{ parent() }}
{% set attr = attr|merge({'prototype_specify_name': form_row(prototype_specify_name) }) %}
{% endblock %}
class SetType extends ConceptType
{
public function getName()
{
return 'TrouveTout_Set';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment