forked from jazzband/django-floppyforms
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ClearableFileInput that works for real
- Loading branch information
Showing
3 changed files
with
24 additions
and
7 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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
{% if value.url %}{{ initial_text }}: <a target="_blank" href="{{ value.url }}">{{ value }}</a> | ||
{% if not required %} | ||
<input type="checkbox" name="{{ name }}-clear" id="{{ name }}-clear_id"> | ||
<label for="{{ name }}-clear_id">{{ clear_checkbox_label }}</label><br/> | ||
{% endif %} | ||
<input type="checkbox" name="{{ checkbox_name }}" id="{{ checkbox_id }}"> | ||
<label for="{{ checkbox_id }}">{{ clear_checkbox_label }}</label> | ||
{% endif %}<br /> | ||
{{ input_text }}: | ||
{% endif %} | ||
<input type="{{ type }}" name="{{ name }}"{% if value %} value="{{ value }}"{% endif %}{% if required %} required{% endif %}{% for attr in attrs.items %} {{ attr.0 }}="{{ attr.1 }}"{% endfor %}> | ||
<input type="{{ type }}" name="{{ name }}"{% if required and not value %} required{% endif %}{% for attr in attrs.items %} {{ attr.0 }}="{{ attr.1 }}"{% 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