Skip to content

Commit

Permalink
Fixes #6979: Don't show 'Create & Add Another' button when editing/cr…
Browse files Browse the repository at this point in the history
…eating a circuit
  • Loading branch information
thatmattlove committed Aug 18, 2021
1 parent 09d745d commit 9a8d33e
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions netbox/templates/circuits/circuittermination_edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,17 @@ <h4 class="mb-3">Termination Details</h4>
{% render_field form.description %}
</div>
{% endblock %}

{# Override buttons block, 'Create & Add Another'/'_addanother' is not needed on a circuit. #}
{% block buttons %}
<a class="btn btn-outline-danger" href="{{ return_url }}">Cancel</a>
{% if obj.pk %}
<button type="submit" name="_update" class="btn btn-primary">
Save
</button>
{% else %}
<button type="submit" name="_create" class="btn btn-primary">
Create
</button>
{% endif %}
{% endblock buttons %}

0 comments on commit 9a8d33e

Please sign in to comment.