braincrafted / bootstrap-bundle

BraincraftedBootstrapBundle integrates Bootstrap into Symfony2 by providing templates, Twig extensions, services and commands.
http://bootstrap.braincrafted.com
MIT License
399 stars 182 forks source link

Add a supplementary class for input-group #429

Closed fklee closed 8 years ago

fklee commented 8 years ago

I just add some lines to add class and id to input-group to use calendar from http://eonasdan.github.io/bootstrap-datetimepicker/

in /braincrafted/bootstrap-bundle/Braincrafted/Bundle/BootstrapBundle/Resources/views/Form/bootstrap.html.twig

add this : line 663 {% if input_group.class is defined %} {% set ig_size_class = (ig_size_class ~ ' ' ~ input_group.class) %} {% endif %} {% if input_group.id is defined %} {% set ig_id = ('id=' ~ input_group.id ~ '') %} {% else %} {% set ig_id = '' %} {% endif %} <div class="input-group{{ ig_size_class }}" {{ ig_id }}>

last line is modified to add {{ ig_id }}

Sorry, didn't have time to add a pull request :-(

fklee commented 8 years ago

Sorry, didn't see I could add a custom twig template :-)

So I close the issue,

The only supp idea should be to add "attr" to all created element to add much more customization possibilities :+1: