1
0
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:
jeremystretch
2021-09-02 16:48:54 -04:00
parent a3069239e9
commit a1110b07de
6 changed files with 64 additions and 20 deletions

View File

@@ -0,0 +1,24 @@
<div class="row">
<div class="col-6">
{% if widget.is_initial %}
<a href="{{ widget.value.url }}">{{ widget.value }}</a>
{% if not widget.required %}
<br />
<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>
{% endif %}
{% else %}
<span class="text-muted">None assigned</span>
{% endif %}
</div>
<div class="col-6">
<input
class="form-control"
type="{{ widget.type }}"
name="{{ widget.name }}"
id="id_{{ widget.name }}"
accept="{{ widget.attrs.accept }}"
{% if widget.required %}required{% endif %}
/>
</div>
</div>