Only submit import definitions if a file has been selected
rabbitmq-management#389
This commit is contained in:
		
							parent
							
								
									fc7f5183c7
								
							
						
					
					
						commit
						efedce7c99
					
				|  | @ -522,6 +522,7 @@ function show_popup(type, text, mode) { | |||
| 
 | ||||
| 
 | ||||
| function submit_import(form) { | ||||
|     if (form.file.value) { | ||||
|         var confirm_upload = confirm('Are you sure? Vhost configuration will be overriden.'); | ||||
|         if (confirm_upload == true) { | ||||
|             var idx = $("select[name='vhost-upload'] option:selected").index(); | ||||
|  | @ -532,6 +533,9 @@ function submit_import(form) { | |||
|         } else { | ||||
|             return false; | ||||
|         } | ||||
|     } else { | ||||
|         return false; | ||||
|     } | ||||
| }; | ||||
| 
 | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue