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