forked from pydanny/django-uni-form
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added MultiField class to helpers.py to support items such as day, mo…
…nth and year fields in a single row.
- Loading branch information
Showing
3 changed files
with
85 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,27 @@ | |||
{% load uni_form_field %} | |||
|
|||
{% if field.is_hidden %} | |||
{{ field }} | |||
{% else %} | |||
|
|||
{% if field.label %} | |||
<label for="{{ field.auto_id }}"{% if labelclass %} class="{{ labelclass }}"{% endif %}> | |||
{% endif %} | |||
|
|||
{% if field|is_checkbox %} | |||
{{ field|with_class }} | |||
{% endif %} | |||
|
|||
{% if field.label %} | |||
{{ field.label }} | |||
{% endif %} | |||
|
|||
{% if not field|is_checkbox %} | |||
{{ field|with_class }} | |||
{% endif %} | |||
|
|||
{% if field.label %} | |||
</label> | |||
{% endif %} | |||
|
|||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters