Просмотр исходного кода

Fixes #6979: Don't show 'Create & Add Another' button when editing/creating a circuit

Matt 4 лет назад
Родитель
Сommit
9a8d33e6bf
1 измененных файлов с 14 добавлено и 0 удалено
  1. 14 0
      netbox/templates/circuits/circuittermination_edit.html

+ 14 - 0
netbox/templates/circuits/circuittermination_edit.html

@@ -56,3 +56,17 @@
         {% render_field form.description %}
         {% render_field form.description %}
   </div>
   </div>
 {% endblock %}
 {% 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 %}