2021-05-23 06:12:00 +00:00
|
|
|
{% load i18n %}
|
2021-06-02 16:17:53 +00:00
|
|
|
{% load utilities %}
|
|
|
|
|
|
|
|
{% if widget.is_initial %}
|
|
|
|
<p class="mb-1">
|
2021-06-02 16:30:36 +00:00
|
|
|
{{ widget.initial_text }}:
|
|
|
|
<a href="{{ widget.value.url }}">{{ widget.value|truncatepath:10 }}</a>
|
2021-06-02 16:17:53 +00:00
|
|
|
</p>
|
|
|
|
{% if not widget.required %}
|
|
|
|
<p class="mb-1">
|
2021-06-02 16:30:36 +00:00
|
|
|
<label class="has-text-weight-normal">
|
|
|
|
<input type="checkbox" name="{{ widget.checkbox_name }}" id="{{ widget.checkbox_id }}"{% if widget.attrs.disabled %} disabled{% endif %}>
|
|
|
|
{{ widget.clear_checkbox_label }}
|
|
|
|
</label>{% endif %}
|
2021-06-02 16:17:53 +00:00
|
|
|
</p>
|
|
|
|
<p class="mb-1">
|
|
|
|
{{ widget.input_text }}:
|
|
|
|
{% else %}
|
|
|
|
<p class="mb-1">
|
|
|
|
{% endif %}
|
2021-06-02 16:30:36 +00:00
|
|
|
<input type="{{ widget.type }}" name="{{ widget.name }}"{% include "django/forms/widgets/attrs.html" %}>
|
|
|
|
<span class="help file-cta is-hidden file-too-big">{% trans "File exceeds maximum size: 10MB" %}</span>
|
2021-06-02 16:17:53 +00:00
|
|
|
</p>
|
|
|
|
|