mirror of
				https://github.com/netbox-community/netbox.git
				synced 2024-05-10 07:54:54 +00:00 
			
		
		
		
	Fixes #2370: Redirect to parent device after deleting device bays
This commit is contained in:
		@@ -447,7 +447,7 @@
 | 
			
		||||
        <div class="col-md-12">
 | 
			
		||||
            {% if device_bays or device.device_type.is_parent_device %}
 | 
			
		||||
                {% if perms.dcim.delete_devicebay %}
 | 
			
		||||
                    <form method="post" action="{% url 'dcim:devicebay_bulk_delete' pk=device.pk %}">
 | 
			
		||||
                    <form method="post">
 | 
			
		||||
                    {% csrf_token %}
 | 
			
		||||
                {% endif %}
 | 
			
		||||
                <div class="panel panel-default">
 | 
			
		||||
@@ -483,7 +483,7 @@
 | 
			
		||||
                            </button>
 | 
			
		||||
                        {% endif %}
 | 
			
		||||
                        {% if device_bays and perms.dcim.delete_devicebay %}
 | 
			
		||||
                            <button type="submit" class="btn btn-danger btn-xs">
 | 
			
		||||
                            <button type="submit" formaction="{% url 'dcim:devicebay_bulk_delete' pk=device.pk  %}?return_url={{ device.get_absolute_url }}" class="btn btn-danger btn-xs">
 | 
			
		||||
                                <span class="glyphicon glyphicon-trash" aria-hidden="true"></span> Delete selected
 | 
			
		||||
                            </button>
 | 
			
		||||
                        {% endif %}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user