first commit after reset
[mixstore.git] / app / Resources / views / Form / fields.html.twig
1 {# Global styles for forms (uniform display) #}
2
3 {% block form_widget_simple %}
4 {% set type = type|default('text') %}
5 <div class="col-sm-8">
6 <input class="form-control" type="{{ type }}" {{ block('widget_attributes') }} {% if value is not empty %}value="{{ value }}" {% endif %}/>
7 </div>
8 {% endblock form_widget_simple %}
9
10 {% block form_row %}
11 {% spaceless %}
12 <div class="form-group">
13 {{ form_label(form) }}
14 {{ form_widget(form) }}
15 {{ form_errors(form) }}
16 </div>
17 {% endspaceless %}
18 {% endblock form_row %}
19
20 {% block form_errors %}
21 {% spaceless %}
22 {% if errors|length > 0 %}
23 <div class="col-xs-12 col-sm-8 col-sm-offset-2">
24 <ul>
25 {% for error in errors %}
26 <li>{{ error.message }}</li>
27 {% endfor %}
28 </ul>
29 </div>
30 {% endif %}
31 {% endspaceless %}
32 {% endblock form_errors %}