mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-18 05:28:16 -06:00
Clean up object edit template
This commit is contained in:
parent
1b0182b787
commit
13265ebd2c
@ -22,6 +22,19 @@ Context:
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock title %}
|
{% endblock title %}
|
||||||
|
|
||||||
|
{% block controls %}
|
||||||
|
<div class="btn-list">
|
||||||
|
|
||||||
|
{# Link to model documentation #}
|
||||||
|
{% if settings.DOCS_ROOT and object.docs_url %}
|
||||||
|
<a href="{{ object.docs_url }}" target="_blank" class="btn btn-outline-secondary" title="{% trans "View model documentation" %}">
|
||||||
|
<i class="mdi mdi-help-circle"></i> {% trans "Help" %}
|
||||||
|
</a>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
{% endblock controls %}
|
||||||
|
|
||||||
{% block tabs %}
|
{% block tabs %}
|
||||||
<ul class="nav nav-tabs px-3">
|
<ul class="nav nav-tabs px-3">
|
||||||
<li class="nav-item" role="presentation">
|
<li class="nav-item" role="presentation">
|
||||||
@ -41,15 +54,6 @@ Context:
|
|||||||
{% include 'inc/missing_prerequisites.html' %}
|
{% include 'inc/missing_prerequisites.html' %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{# Link to model documentation #}
|
|
||||||
{% if settings.DOCS_ROOT and object.docs_url %}
|
|
||||||
<div class="float-end">
|
|
||||||
<a href="{{ object.docs_url }}" target="_blank" class="btn btn-sm btn-outline-secondary" title="{% trans "View model documentation" %}">
|
|
||||||
<i class="mdi mdi-help-circle"></i> {% trans "Help" %}
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
{% 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 %}
|
||||||
|
|
||||||
@ -61,6 +65,7 @@ Context:
|
|||||||
|
|
||||||
<div class="text-end my-3">
|
<div class="text-end my-3">
|
||||||
{% block buttons %}
|
{% block buttons %}
|
||||||
|
<a href="{{ return_url }}" class="btn btn-outline-secondary">{% trans "Cancel" %}</a>
|
||||||
{% if object.pk %}
|
{% if object.pk %}
|
||||||
<button type="submit" name="_update" class="btn btn-primary">
|
<button type="submit" name="_update" class="btn btn-primary">
|
||||||
{% trans "Save" %}
|
{% trans "Save" %}
|
||||||
@ -73,7 +78,6 @@ Context:
|
|||||||
{% trans "Create & Add Another" %}
|
{% trans "Create & Add Another" %}
|
||||||
</button>
|
</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a class="btn btn-outline-danger" href="{{ return_url }}">{% trans "Cancel" %}</a>
|
|
||||||
{% endblock buttons %}
|
{% endblock buttons %}
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
Loading…
Reference in New Issue
Block a user