Kotti / deform_bootstrap

Bootstrap compatible templates for the deform form library. (Merged into deform 2.)
http://pypi.python.org/pypi/deform_bootstrap
34 stars 30 forks source link

Including Button's __init__ css_class argument on form template #48

Closed damianrr closed 11 years ago

damianrr commented 11 years ago

Hi, First i'd like to thank you for all the great work and effort you have put in this distribution. It's a great time saver and I really love what you have done. That said, i've found an small issue with the custom classes of buttons (those passed through the css_class argument in init method). Currently the code ignores that argument (none of the classes passed as arguments gets to the html) and i've found that when you override the deform's form.pt template you don't include, in the fields.buttons block, the button's css_class content. That impedes user from giving custom classes to form buttons, i've added a small snippet that fix this issue, please review it whenever you have the time and if you have any comments i've be glad to be of any help.

disko commented 11 years ago

Thanks.

disko commented 11 years ago

@dnouri: could you please make a new release? We could use this in Kotti e.g. here: https://github.com/Kotti/Kotti/blob/master/kotti/views/users.py#L437 (to get rid of this: https://github.com/Kotti/Kotti/blob/master/kotti/static/kotti.js#L105)

/cc @j23d

disko commented 11 years ago

@dnouri FYI: I just released 0.2.6.

dnouri commented 11 years ago

Thanks, you rock!

damianrr commented 11 years ago

No problem ;)