Created
May 26, 2020 07:56
-
-
Save d-demirci/a5311fcb701b08df55827bf701155b36 to your computer and use it in GitHub Desktop.
clearable_file_input.html django/forms/widgets/ file upload bootstrap css
This file contains hidden or 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
<!-- https://stackoverflow.com/questions/44675550/django-widget-override-template --> | |
{% load i18n %}{% if widget.is_initial %}{{ widget.initial_text }}: <a href="{{ widget.value.url }}">{{ widget.value }}</a>{% if not widget.required %} | |
<input type="checkbox" name="{{ widget.checkbox_name }}" id="{{ widget.checkbox_id }}"> | |
<label for="{{ widget.checkbox_id }}">{{ widget.clear_checkbox_label }}</label>{% endif %}<br> | |
{{ widget.input_text }}:{% endif %} | |
<label class="btn btn-primary">{% trans 'Upload' %}<input type="{{ widget.type }}" name="{{ widget.name }}" hidden {% include "django/forms/widgets/attrs.html" %}> </label> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment