blob: 33ecab79b48c4346c9b31cef9b9b6dac9ad74717 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
var CreditCardView = View.extend({
template: $("#creditcard_template").html(),
events: {
},
initialize: function(opt){
this.parent = opt.parent
this.parent.$(".cc").html(this.template)
},
populate: function(data){
this.parent.$(".cc input").val("")
Object.keys(data).forEach(function(key){
this.parent$(".cc [name=" + key + "]").val(data[key])
}.bind(this))
},
validate_presence: {
},
validate_fields: function(data, errors){
},
})
|