Initial
This commit is contained in:
17
backend/common/templates/forms/audio-file.html
Normal file
17
backend/common/templates/forms/audio-file.html
Normal file
@@ -0,0 +1,17 @@
|
||||
<div style="width: 100%">
|
||||
{% if widget.is_initial %}
|
||||
<audio controls preload="none" style="width: 100%">
|
||||
<source src="{{MEDIA_URL}}{{widget.value}}" type="audio/mpeg">
|
||||
Browser does not support Audio
|
||||
</audio>
|
||||
{% if not widget.required %}
|
||||
<span class="clearable-file-input">
|
||||
<input type="checkbox" name="{{ widget.checkbox_name }}" id="{{ widget.checkbox_id }}"{% if widget.attrs.disabled %} disabled{% endif %}>
|
||||
<label for="{{ widget.checkbox_id }}">{{ widget.clear_checkbox_label }}</label>
|
||||
</span>
|
||||
{% endif %}
|
||||
<br>
|
||||
<span>{{ widget.input_text }}:</span>
|
||||
{% endif %}
|
||||
<input type="{{ widget.type }}" name="{{ widget.name }}"{% include "django/forms/widgets/attrs.html" %}>
|
||||
</div>
|
||||
14
backend/common/templates/forms/img-with-preview.html
Normal file
14
backend/common/templates/forms/img-with-preview.html
Normal file
@@ -0,0 +1,14 @@
|
||||
<div>
|
||||
{% if widget.is_initial %}
|
||||
<img src="{{MEDIA_URL}}{{widget.value}}" style="max-width: 150px; max-height: 150px; margin: 8px;" />
|
||||
{% if not widget.required %}
|
||||
<span class="clearable-file-input">
|
||||
<input type="checkbox" name="{{ widget.checkbox_name }}" id="{{ widget.checkbox_id }}"{% if widget.attrs.disabled %} disabled{% endif %}>
|
||||
<label for="{{ widget.checkbox_id }}">{{ widget.clear_checkbox_label }}</label>
|
||||
</span>
|
||||
{% endif %}
|
||||
<br>
|
||||
<span>{{ widget.input_text }}:</span>
|
||||
{% endif %}
|
||||
<input type="{{ widget.type }}" name="{{ widget.name }}"{% include "django/forms/widgets/attrs.html" %}>
|
||||
</div>
|
||||
Reference in New Issue
Block a user