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

Fix table links for adding new components

Jeremy Stretch 6 лет назад
Родитель
Сommit
b5344b0aa7
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      netbox/templates/dcim/inc/devicetype_component_table.html

+ 1 - 1
netbox/templates/dcim/inc/devicetype_component_table.html

@@ -20,7 +20,7 @@
                     {% endif %}
                     {% endif %}
                 {% endif %}
                 {% endif %}
                 <div class="pull-right">
                 <div class="pull-right">
-                    <a href="{% url add_url %}" class="btn btn-primary btn-xs">
+                    <a href="{% url add_url %}?device_type={{ devicetype.pk }}&return_url={{ devicetype.get_absolute_url }}" class="btn btn-primary btn-xs">
                         <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
                         <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
                         Add {{ title }}
                         Add {{ title }}
                     </a>
                     </a>