-
-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
30 changed files
with
80 additions
and
84 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
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
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 |
---|---|---|
@@ -1,44 +1,43 @@ | ||
{% load ui_extras %} | ||
|
||
{% for field in form %} | ||
{% if field in form.visible_fields %} | ||
<div class={% if field.widget_type == 'checkbox' %}"form-checkbox col me-2 mb-2 text-center"{% elif field.widget_type == 'text' %}"form-floating col{{ form.visible_fields|length|flex_field_width }} me-2 mb-2"{% else %}"form-floating col me-2 mb-2"{% endif %}> | ||
{% if field in form.visible_fields %} | ||
<div class="mb-2 {% if field.widget_type == 'checkbox' %}me-4 form-checkbox{% else %}me-2 form-floating{% endif %}"> | ||
{% if field.widget_type == 'select' %} | ||
<select class="form-select" | ||
{% elif field.widget_type == 'checkbox' %} | ||
{{ field.label_tag }} | ||
<input class="form-check-input" {% if field.value %} checked {% endif %} | ||
{% else %} | ||
<input class="form-control" | ||
{% endif %} | ||
|
||
{% if field.widget_type == 'select' %} | ||
<select class="form-select" | ||
{% elif field.widget_type == 'checkbox' %} | ||
{{ field.label_tag }} | ||
<input class="form-check-input" {% if field.value %} checked {% endif %} | ||
{% else %} | ||
<input class="form-control" | ||
{% endif %} | ||
{% if field.widget_type == 'text' %} | ||
{% if field.value %} | ||
value="{{ field.value }}" | ||
{% endif %} | ||
{% endif %} | ||
type="{{ field.widget_type }}" | ||
name="{{ field.html_name }}" | ||
id="{{ field.id_for_label }}" | ||
{% for name, value in field.field.widget.attrs.items %} | ||
{% comment %} We avoid "placeholder" because of bootstrap behavior with it {% endcomment %} | ||
{% if name != "placeholder" %} | ||
{{ name }}={{ value }} | ||
{% endif %} | ||
{% endfor %} | ||
> | ||
|
||
{% if field.widget_type == 'text' %} | ||
{% if field.value %} | ||
value="{{ field.value }}" | ||
{% endif %} | ||
{% endif %} | ||
type="{{ field.widget_type }}" | ||
name="{{ field.html_name }}" | ||
id="{{ field.id_for_label }}" | ||
{% for name, value in field.field.widget.attrs.items %} | ||
{% comment %} We avoid "placeholder" because of bootstrap behavior with it {% endcomment %} | ||
{% if name != "placeholder" %} | ||
{{ name }}={{ value }} | ||
{% endif %} | ||
{% endfor %} | ||
> | ||
|
||
{% if field.widget_type == 'select' %} | ||
{% for option, value in field.field.choices %} | ||
<option value="{{ option }}"{% if option|to_str == field.value %}selected="selected"{% endif %}>{{ value }}</option> | ||
{% endfor %} | ||
</select> | ||
{% endif %} | ||
|
||
{% if field.widget_type != 'checkbox' %} | ||
{{ field.label_tag }} | ||
{% endif %} | ||
</div> | ||
{% endif %} | ||
{% if field.widget_type == 'select' %} | ||
{% for option, value in field.field.choices %} | ||
<option value="{{ option }}"{% if option|to_str == field.value %}selected="selected"{% endif %}>{{ value }}</option> | ||
{% endfor %} | ||
</select> | ||
{% endif %} | ||
|
||
{% if field.widget_type != 'checkbox' %} | ||
{{ field.label_tag }} | ||
{% endif %} | ||
</div> | ||
{% endif %} | ||
{% endfor %} |
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
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
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
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
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
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
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
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
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
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
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
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
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