TwitterBootstrapBundle
TwitterBootstrapBundle copied to clipboard
Integrating Boostrap Form
Hi, Adding your bootstrav2_html.twig i got an error. "Variable "translation_domain" does not exist in RuianTwitterBootstrapBundle:Form:bootstrap_v2.html.twig at line 33"
Where and how should i set that variable?
Thank you very much.
Do you use the latest symfony2 build ? I'm looking if in previous version it was different.
Im using the 2.0.9.
Ok i see the problem, it's because i work with the latest version of sf 2.1.x. I will make a branch for 2.0.x symfony version. And it will resolve your issue.
So i create a branch 2.0.x
who change
{% block generic_label %}
{% set attr = attr|merge({'class': ''}) %}
{% spaceless %}
{% if required %}
{% set attr = attr|merge({'class': 'required'}) %}
{% endif %}
<label{% for attrname,attrvalue in attr %} {{attrname}}="{{attrvalue}}"{% endfor %}>{{ label|trans({}, translation_domain) }}</label>
{% endspaceless %}
{% endblock %}
to
{% block generic_label %}
{% set attr = attr|merge({'class': ''}) %}
{% spaceless %}
{% if required %}
{% set attr = attr|merge({'class': 'required'}) %}
{% endif %}
<label{% for attrname,attrvalue in attr %} {{attrname}}="{{attrvalue}}"{% endfor %}>{{ label|trans }}</label>
{% endspaceless %}
{% endblock %}
Test it and reply me if it resolve your problem :-)
Thanks! Seems to have fixed it for me :-)
@ruian , could you cherrypick my fixes for js order and images to 2.0.x branch? I'm on standart symfony and have the same problems too )
It's done ;-) https://github.com/ruian/TwitterBootstrapBundle/commit/11baa5d6c2eea9cbec0ae05e73f8ba8b6b84350d
It seems like this issue was fixed?
#closerequest