mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Fixes #7153: Allow clearing of assigned device type images
This commit is contained in:
@@ -86,18 +86,28 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% elif field|widget_type == 'fileinput' or field|widget_type == 'clearablefileinput' %}
|
||||
<div class="input-group mb-3">
|
||||
<input
|
||||
class="form-control"
|
||||
type="file"
|
||||
name="{{ field.name }}"
|
||||
placeholder="{{ field.placeholder }}"
|
||||
id="id_{{ field.name }}"
|
||||
accept="{{ field.field.widget.attrs.accept }}"
|
||||
{% if field.is_required %}required{% endif %}
|
||||
/>
|
||||
<label for="{{ field.id_for_label }}" class="input-group-text">{{ field.label|bettertitle }}</label>
|
||||
{% elif field|widget_type == 'fileinput' %}
|
||||
<div class="input-group mb-3">
|
||||
<input
|
||||
class="form-control"
|
||||
type="file"
|
||||
name="{{ field.name }}"
|
||||
placeholder="{{ field.placeholder }}"
|
||||
id="id_{{ field.name }}"
|
||||
accept="{{ field.field.widget.attrs.accept }}"
|
||||
{% if field.is_required %}required{% endif %}
|
||||
/>
|
||||
<label for="{{ field.id_for_label }}" class="input-group-text">{{ field.label|bettertitle }}</label>
|
||||
</div>
|
||||
|
||||
{% elif field|widget_type == 'clearablefileinput' %}
|
||||
<div class="row mb-3">
|
||||
<label for="{{ field.id_for_label }}" class="form-label col col-md-3 text-lg-end{% if field.field.required %} required{% endif %}">
|
||||
{{ field.label }}
|
||||
</label>
|
||||
<div class="col col-md-9">
|
||||
{{ field }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% elif field|widget_type == 'selectmultiple' %}
|
||||
|
Reference in New Issue
Block a user