mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-24 17:38:37 -06:00
#1344: Show object type & name when assigning a contact
This commit is contained in:
parent
a5024a65a0
commit
803e0bfe72
23
netbox/templates/tenancy/contactassignment_edit.html
Normal file
23
netbox/templates/tenancy/contactassignment_edit.html
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
{% extends 'generic/object_edit.html' %}
|
||||||
|
{% load helpers %}
|
||||||
|
{% load form_helpers %}
|
||||||
|
|
||||||
|
{% block form %}
|
||||||
|
<div class="field-group my-5">
|
||||||
|
<div class="row mb-2">
|
||||||
|
<h5 class="offset-sm-3">Contact Assignment</h5>
|
||||||
|
</div>
|
||||||
|
<div class="row mb-3">
|
||||||
|
<label class="col-sm-3 col-form-label text-lg-end">
|
||||||
|
{{ form.instance.object|meta:'verbose_name'|bettertitle }}
|
||||||
|
</label>
|
||||||
|
<div class="col">
|
||||||
|
<input class="form-control" value="{{ form.instance.object }}" disabled />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% render_field form.group %}
|
||||||
|
{% render_field form.contact %}
|
||||||
|
{% render_field form.role %}
|
||||||
|
{% render_field form.priority %}
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
@ -338,6 +338,7 @@ class ContactBulkDeleteView(generic.BulkDeleteView):
|
|||||||
class ContactAssignmentEditView(generic.ObjectEditView):
|
class ContactAssignmentEditView(generic.ObjectEditView):
|
||||||
queryset = ContactAssignment.objects.all()
|
queryset = ContactAssignment.objects.all()
|
||||||
model_form = forms.ContactAssignmentForm
|
model_form = forms.ContactAssignmentForm
|
||||||
|
template_name = 'tenancy/contactassignment_edit.html'
|
||||||
|
|
||||||
def alter_obj(self, instance, request, args, kwargs):
|
def alter_obj(self, instance, request, args, kwargs):
|
||||||
if not instance.pk:
|
if not instance.pk:
|
||||||
|
Loading…
Reference in New Issue
Block a user