mirror of
				https://github.com/netbox-community/netbox.git
				synced 2024-05-10 07:54:54 +00:00 
			
		
		
		
	Fixes #7823: Properly handle return_url when Save & Continue button is present
This commit is contained in:
		@@ -46,7 +46,7 @@
 | 
			
		||||
{% block buttons %}
 | 
			
		||||
  <a href="{{ return_url }}" class="btn btn-outline-danger">Cancel</a>
 | 
			
		||||
  {% if obj.pk %}
 | 
			
		||||
    <button type="submit" formaction="?return_url={% url 'virtualization:vminterface_edit' pk=obj.pk %}" class="btn btn-outline-primary">Save & Continue Editing</button>
 | 
			
		||||
    <button type="button" return-url="?return_url={% url 'virtualization:vminterface_edit' pk=obj.pk %}" class="btn btn-outline-primary">Save & Continue Editing</button>
 | 
			
		||||
    <button type="submit" name="_update" class="btn btn-primary">Save</button>
 | 
			
		||||
  {% else %}
 | 
			
		||||
    <button type="submit" name="_addanother" class="btn btn-outline-primary">Create & Add Another</button>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user