From 3c1acfab622d470aeb1f44a708d6023530e17ec8 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Sun, 10 Dec 2017 21:08:42 +0100 Subject: more desiiiiiiiign --- public/assets/js/vendor/view/formview.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'public/assets/js/vendor') diff --git a/public/assets/js/vendor/view/formview.js b/public/assets/js/vendor/view/formview.js index 485db7a..f71c550 100644 --- a/public/assets/js/vendor/view/formview.js +++ b/public/assets/js/vendor/view/formview.js @@ -37,8 +37,8 @@ var FormView = View.extend({ this.$("input[name], select[name], textarea[name]").each( function(){ if (this.type == "file") { - if (this.files.length > 0) { - fd.append(this.name, this.files[0]); + for (var i = 0; i < this.files.length; i++) { + fd.append(this.name, this.files[i]); } } else if (this.type == "password") { @@ -79,7 +79,7 @@ var FormView = View.extend({ var action = typeof this.action == "function" ? this.action() : this.action if (! action) return - + var request = $.ajax({ url: action, type: this.method, @@ -89,6 +89,7 @@ var FormView = View.extend({ processData: false, contentType: false, success: function(response){ + console.log(response) if (response.error) { var errors = [] for (var key in response.error.errors) { -- cgit v1.2.3-70-g09d2