mirror of
				https://git.collinwebdesigns.de/oscar.krause/fastapi-dls.git
				synced 2025-10-26 18:05:28 +03:00 
			
		
		
		
	dashboard_origins.html - implemented confirmation before deleting all origins
This commit is contained in:
		
							parent
							
								
									d708279480
								
							
						
					
					
						commit
						e4f5eb5910
					
				@ -13,7 +13,7 @@
 | 
			
		||||
                    <button type="button" class="btn btn-sm btn-outline-danger" onclick="deleteOrigin().finally(() => load())">
 | 
			
		||||
                        delete origin
 | 
			
		||||
                    </button>
 | 
			
		||||
                    <button type="button" class="btn btn-sm btn-outline-danger" onclick="deleteOrigins().finally(() => load())">
 | 
			
		||||
                    <button type="button" class="btn btn-sm btn-outline-danger" onclick="deleteOriginsWrapper()">
 | 
			
		||||
                        delete all
 | 
			
		||||
                    </button>
 | 
			
		||||
                </div>
 | 
			
		||||
@ -37,5 +37,12 @@
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        load()
 | 
			
		||||
 | 
			
		||||
        function deleteOriginsWrapper() {
 | 
			
		||||
            const response = confirm('Are you sure you want to delete all origins and their leases?');
 | 
			
		||||
 | 
			
		||||
            if (response)
 | 
			
		||||
                deleteOrigins().finally(() => load())
 | 
			
		||||
        }
 | 
			
		||||
    </script>
 | 
			
		||||
{% endblock %}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user