-
-
Save anpleenko/03f90efb62845d39e285 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('form').submit(function(){ | |
event.preventDefault(); | |
var fd = new FormData($('.employee-file-form')[0]); | |
var btn = $(this).find('.js-upload-field-employee'); | |
btn.button('loading'); | |
$.ajax({ | |
url: '/api/v3/upload_field_employees/', | |
type: 'POST', | |
data: fd, | |
cache: false, | |
contentType: false, | |
processData: false, | |
success: function(response){console.log(reponse);}, | |
}).always(function() { | |
btn.button('reset'); | |
}); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment