mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-20 10:16:42 -06:00
Tweak display of prerequisite model warning
This commit is contained in:
parent
32615befd5
commit
1379b9c9fb
@ -31,6 +31,11 @@ Context:
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane show active" id="edit-form" role="tabpanel" aria-labelledby="object-list-tab">
|
||||
|
||||
{# Warn about missing prerequisite objects #}
|
||||
{% if prerequisite_model %}
|
||||
{% include 'inc/missing_prerequisites.html' %}
|
||||
{% endif %}
|
||||
|
||||
{# Link to model documentation #}
|
||||
{% if object and settings.DOCS_ROOT %}
|
||||
<div class="float-end">
|
||||
@ -40,10 +45,6 @@ Context:
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if prerequisite_model %}
|
||||
{% include 'inc/missing_prerequisites.html' %}
|
||||
{% endif %}
|
||||
|
||||
<form action="" method="post" enctype="multipart/form-data" class="form-object-edit mt-5">
|
||||
{% csrf_token %}
|
||||
|
||||
|
@ -1,6 +1,9 @@
|
||||
{% load buttons %}
|
||||
|
||||
<div class="alert alert-warning" role="alert">
|
||||
<div class="alert alert-warning text-end" role="alert">
|
||||
<div class="float-start">
|
||||
<i class="mdi mdi-alert"></i> Before you can add a {{ model|meta:"verbose_name" }} you must first create a
|
||||
<strong>{{ prerequisite_model|meta:"verbose_name"|title }}</strong> which can be added here: {% add_button prerequisite_model %}
|
||||
<strong>{{ prerequisite_model|meta:"verbose_name" }}</strong>.
|
||||
</div>
|
||||
{% add_button prerequisite_model %}
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user