Skip to content

Commit

Permalink
Merge pull request earle#40 from jterrace/css_class_fix
Browse files Browse the repository at this point in the history
Fixed incorrect placement of css_class optional parameter
  • Loading branch information
earle committed Mar 9, 2012
2 parents 24d3182 + 83584f5 commit 8e432d0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bootstrap/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,10 @@ def __unicode__(self):
class Fieldset(object):
""" Fieldset container. Renders to a <fieldset>. """

def __init__(self, legend, css_class=None, *fields):
def __init__(self, legend, *fields, **kwargs):
self.legend_html = legend and ('<legend>%s</legend>' % legend) or ''
self.fields = fields
self.css_class = css_class
self.css_class = kwargs.get('css_class')

def as_html(self, form):
class_str = self.css_class and (' class="%s"' % self.css_class) or ''
Expand Down

0 comments on commit 8e432d0

Please sign in to comment.