Procházet zdrojové kódy

ensure 'Create & Assign IP Address' button is only shown when the component_type is 'interface'

checktheroads před 4 roky
rodič
revize
04cc43b2f0
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      netbox/templates/dcim/device_component_add.html

+ 1 - 1
netbox/templates/dcim/device_component_add.html

@@ -20,7 +20,7 @@
         <div class="col-md-8 text-end">
         {% block buttons %}
         <a class="btn btn-outline-danger" href="{{ return_url }}">Cancel</a>
-        {% if perms.ipam.add_ipaddress %}
+        {% if component_type == 'interface' and perms.ipam.add_ipaddress %}
         <button type="submit" name="_assignip" class="btn btn-outline-success">
             Create & Assign IP Address
         </button>