mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-20 18:26: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-content">
|
||||||
<div class="tab-pane show active" id="edit-form" role="tabpanel" aria-labelledby="object-list-tab">
|
<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 #}
|
{# Link to model documentation #}
|
||||||
{% if object and settings.DOCS_ROOT %}
|
{% if object and settings.DOCS_ROOT %}
|
||||||
<div class="float-end">
|
<div class="float-end">
|
||||||
@ -40,10 +45,6 @@ Context:
|
|||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if prerequisite_model %}
|
|
||||||
{% include 'inc/missing_prerequisites.html' %}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<form action="" method="post" enctype="multipart/form-data" class="form-object-edit mt-5">
|
<form action="" method="post" enctype="multipart/form-data" class="form-object-edit mt-5">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
|
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
{% load buttons %}
|
{% load buttons %}
|
||||||
|
|
||||||
<div class="alert alert-warning" role="alert">
|
<div class="alert alert-warning text-end" role="alert">
|
||||||
<i class="mdi mdi-alert"></i> Before you can add a {{ model|meta:"verbose_name" }} you must first create a
|
<div class="float-start">
|
||||||
<strong>{{ prerequisite_model|meta:"verbose_name"|title }}</strong> which can be added here: {% add_button prerequisite_model %}
|
<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" }}</strong>.
|
||||||
|
</div>
|
||||||
|
{% add_button prerequisite_model %}
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user