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

Fixes #8763: Fix inventory item component assignment

This commit is contained in:
jeremystretch
2022-03-03 11:52:36 -05:00
parent e6072a51f8
commit 62a1d4b3e0
6 changed files with 31 additions and 11 deletions

View File

@@ -2,6 +2,8 @@
{% load form_helpers %}
{% block form %}
{% render_form replication_form %}
{% block replication_fields %}
{% render_form replication_form %}
{% endblock replication_fields %}
{{ block.super }}
{% endblock form %}

View File

@@ -1,4 +1,4 @@
{% extends 'dcim/component_template_create.html' %}
{% extends 'dcim/component_create.html' %}
{% load helpers %}
{% load form_helpers %}

View File

@@ -0,0 +1,17 @@
{% extends 'dcim/component_template_create.html' %}
{% load helpers %}
{% load form_helpers %}
{% block replication_fields %}
{{ block.super }}
{% if object.component %}
<div class="row mb-3">
<label class="col-sm-3 col-form-label text-lg-end">
{{ object.component|meta:"verbose_name"|bettertitle }}
</label>
<div class="col">
<input class="form-control" value="{{ object.component }}" disabled />
</div>
</div>
{% endif %}
{% endblock replication_fields %}