use sweetalert modals on delete server
This commit is contained in:
		
							parent
							
								
									abed57546b
								
							
						
					
					
						commit
						022143dd86
					
				| @ -321,9 +321,20 @@ $(document).ready(function () { | |||||||
|         $('select[name="remove_additional[]"]').find('option[value="' + $(this).val() + '"]').prop('disabled', true).prop('selected', false); |         $('select[name="remove_additional[]"]').find('option[value="' + $(this).val() + '"]').prop('disabled', true).prop('selected', false); | ||||||
|     }); |     }); | ||||||
|     $('form[data-attr="deleteServer"]').submit(function (event) { |     $('form[data-attr="deleteServer"]').submit(function (event) { | ||||||
|         if (confirm('Are you sure that you want to delete this server? There is no going back, all data will immediately be removed.')) { |         event.preventDefault(); | ||||||
|             event.submit(); |         swal({ | ||||||
|         } |             title: '', | ||||||
|  |             type: 'warning', | ||||||
|  |             text: 'Are you sure that you want to delete this server? There is no going back, all data will immediately be removed.', | ||||||
|  |             showCancelButton: true, | ||||||
|  |             confirmButtonText: 'Delete', | ||||||
|  |             confirmButtonColor: '#d9534f', | ||||||
|  |             closeOnConfirm: false | ||||||
|  |         }, function (confirmed) { | ||||||
|  |             if (confirmed) { | ||||||
|  |                 event.submit(); | ||||||
|  |             } | ||||||
|  |         }); | ||||||
|     }); |     }); | ||||||
| }); | }); | ||||||
| </script> | </script> | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Dane Everitt
						Dane Everitt