summaryrefslogtreecommitdiff
path: root/public/assets/js/vendor/view/formview.js
diff options
context:
space:
mode:
Diffstat (limited to 'public/assets/js/vendor/view/formview.js')
-rw-r--r--public/assets/js/vendor/view/formview.js7
1 files changed, 4 insertions, 3 deletions
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) {