-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adds widgets and templates for the form renderer
- Loading branch information
Showing
8 changed files
with
364 additions
and
30 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 | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{% include "django/forms/widgets/input.html" %} | ||
<label class="check-label {{widget.attrs.label_class}}" for="{{widget.attrs.id}}">{{widget.attrs.label}}</label> |
6 changes: 6 additions & 0 deletions
6
project_name/apps/cruncher/templates/widgets/increment-control.html
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 | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{% load l10n %} | ||
<increment-control> | ||
<svg slot="decrement-button" viewbox="0 0 32 32" aria-hidden="true"><use href="#minus"></use></svg> | ||
<svg slot="increment-button" viewbox="0 0 32 32" aria-hidden="true"><use href="#plus"></use></svg> | ||
{% include "django/forms/widgets/number.html" %} | ||
</increment-control> |
2 changes: 2 additions & 0 deletions
2
project_name/apps/cruncher/templates/widgets/radio-button.html
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 | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{% include "django/forms/widgets/input.html" %} | ||
<label class="radio-label {{widget.attrs.label_class}}" for="{{widget.attrs.id}}">{{widget.label}}</label> |
9 changes: 9 additions & 0 deletions
9
project_name/apps/cruncher/templates/widgets/radio-select.html
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 | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{% load widget_tweaks_fork %} | ||
|
||
{% with id=widget.attrs.id %} | ||
{% for group, options, index in widget.optgroups %} | ||
{% for option in options %} | ||
{% include "./radio-button.html" with widget=option %} | ||
{% endfor %} | ||
{% endfor %} | ||
{% endwith %} |
5 changes: 5 additions & 0 deletions
5
project_name/apps/cruncher/templates/widgets/select-button.html
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 | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{% load widget_tweaks_fork %} | ||
|
||
<label class="select-button button {{widget.attrs.class|default:""}}" for="{{widget.attrs.id}}"> | ||
{% include "django/forms/widgets/select.html" %} | ||
</label> |
Oops, something went wrong.