Permalink
Browse files

Making edit form reset on submit

  • Loading branch information...
1 parent 98d34f1 commit bc636492ee39a24ccc500b2d73362cabaeca4381 Chris Bewick committed Dec 29, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 _js/drinklist.js
View
@@ -76,7 +76,7 @@
},
reset: function(e){
- e.preventDefault();
+ if(e) { e.preventDefault(); }
this.model.set(new Drink());
},
@@ -93,6 +93,7 @@
console.log('editing drink');
var data = this.$('form').serializeObject();
drinksList.get(this.model.id).save(data);
+ this.reset();
},
render: function(model) {

0 comments on commit bc63649

Please sign in to comment.