Skip to content

Commit

Permalink
Merge b0e40ee into b89b2aa
Browse files Browse the repository at this point in the history
  • Loading branch information
grahamu committed Feb 17, 2017
2 parents b89b2aa + b0e40ee commit a20bcbf
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
ChangeLog
=========

0.9.1
-----

- add `fieldtype` to PageForm field widget.attrs


0.9
---

Expand Down
2 changes: 2 additions & 0 deletions formly/forms/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ def __init__(self, *args, **kwargs):
super(PageForm, self).__init__(*args, **kwargs)
for field in self.page.fields.all():
self.fields[field.name] = field.form_field()
# Save field_type in widget attrs so presentation can adjust if needed
self.fields[field.name].widget.attrs["fieldtype"] = field.field_type
targets = field.choices.filter(target__isnull=False)
if targets.count() > 0:
self.fields[field.name].widget.attrs["data-reveal"] = ",".join([
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def read(*parts):
description="a dynamic form generator",
name="formly",
long_description=read("README.rst"),
version="0.9",
version="0.9.1",
url="https://github.com/eldarion/formly",
license="BSD",
packages=find_packages(),
Expand Down

0 comments on commit a20bcbf

Please sign in to comment.