Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

Commit

Permalink
Special case for class attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
kmmbvnr committed Mar 13, 2016
1 parent 6c4e3d6 commit f3e0ff7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions material/templatetags/material_form.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,11 @@ def render(self, context):
widget_attrs = self.widget_attrs.resolve(context)

result = build_in_attrs.copy()

if 'class' in result and 'class' in widget_attrs:
result['class'] += ' ' + widget_attrs.pop('class')
result.update(widget_attrs)

for attr, (value, action) in override.items():
if action == 'override':
result[attr] = value
Expand Down

0 comments on commit f3e0ff7

Please sign in to comment.