-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement FileInput and ClearableFileInput
- Loading branch information
Showing
7 changed files
with
85 additions
and
21 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
20 changes: 20 additions & 0 deletions
20
src/django_bootstrap5/templates/django_bootstrap5/widgets/clearable_file_input.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,20 @@ | ||
<input type="{{ widget.type }}" name="{{ widget.name }}"{% include "django/forms/widgets/attrs.html" %}> | ||
{% if widget.is_initial %} | ||
<div class="row mt-1"> | ||
<div class="col-auto"> | ||
{{ widget.initial_text }}: <a href="{{ widget.value.url }}">{{ widget.value }}</a> | ||
</div> | ||
{% if not widget.required %} | ||
<div class="col-auto"> | ||
<div class="form-check"> | ||
<input type="checkbox" name="{{ widget.checkbox_name }}" id="{{ widget.checkbox_id }}" | ||
class="form-check-input" | ||
{% if widget.attrs.disabled %} disabled{% endif %}> | ||
<label for="{{ widget.checkbox_id }}" | ||
class="form-check-label">{{ widget.clear_checkbox_label }}</label> | ||
</div> | ||
</div> | ||
{% endif %} | ||
</div> | ||
{% endif %} | ||
|
Empty file.
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