Skip to content

Commit

Permalink
add bootstrap 3 template
Browse files Browse the repository at this point in the history
  • Loading branch information
sadikoff committed Dec 27, 2017
1 parent c169ec2 commit 0da15a0
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions src/Resources/views/bootstrap_3_form.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{% block koff_i18n_widget %}
{{ form_errors(form) }}
<ul class="nav nav-tabs" role="tablist">
{% for translationsFields in form %}
{% set locale = translationsFields.vars.name %}
<li{% if app.request.locale == locale %} class="active"{% endif %}>
<a href="#{{ translationsFields.vars.id }}-{{ locale }}" aria-controls="{{ translationsFields.vars.id }}-{{ locale }}" role="tab" data-toggle="tab">
{{ translationsFields.vars.label|default(locale|humanize)|trans }}
{% if form.vars.default_locale == locale %}{{ '[Default]'|trans }}{% endif %}
{% if translationsFields.vars.required %}*{% endif %}
</a>
</li>
{% endfor %}
</ul>

<div class="tab-content">
{% for translationsFields in form %}
{% set locale = translationsFields.vars.name %}

<div class="tab-pane {% if app.request.locale == locale %}active{% endif %}" id="{{ translationsFields.vars.id }}-{{ locale }}" role="tabpanel">
{{ form_errors(translationsFields) }}
{{ form_widget(translationsFields) }}
</div>
{% endfor %}
</div>
{% endblock %}

{% block koff_i18n_forms_widget %}
{{ block('koff_i18n_widget') }}
{% endblock %}

0 comments on commit 0da15a0

Please sign in to comment.