1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

#7846: Show assigned component (if any) when creating inventory item

This commit is contained in:
jeremystretch
2021-12-28 14:06:20 -05:00
parent e9910d1fe2
commit 21356b487a
5 changed files with 44 additions and 7 deletions

View File

@@ -0,0 +1,18 @@
{% extends 'dcim/component_create.html' %}
{% load helpers %}
{% block form %}
{% if obj.component %}
<div class="row mb-3">
<label class="col-sm-3 col-form-label text-lg-end required">
{{ obj.component|meta:"verbose_name"|bettertitle }}
</label>
<div class="col-sm-9">
<div class="form-control-plaintext">
<a href="{{ obj.component.get_absolute_url }}" class="">{{ obj.component }}</a>
</div>
</div>
</div>
{% endif %}
{{ block.super }}
{% endblock %}