Skip to content

Instantly share code, notes, and snippets.

@karlwestin
Created January 13, 2014 23:55
Show Gist options
  • Save karlwestin/8410366 to your computer and use it in GitHub Desktop.
Save karlwestin/8410366 to your computer and use it in GitHub Desktop.
/*
* Billpay review
*
* Controls effects / agree to fee subviews
* Stops user from saving accelerations w/o
* agreeing to the acc. fee + showing/hiding error for that
*/
define([
"widgets/simulation/model",
"widgets/bplib/bplib",
"./helpers",
"widgets/subscription/model",
"widgets/simulation/simple",
"hbs!./billpay-review"
], function(
Model,
Lib,
Helpers,
Sub,
Effects,
reviewTmpl
) {
return Lib.View.extend({
attributes: {
"data-qa": "billpay-review"
},
prepare: function() {
return Helpers.preparePayment(this.model, true);
},
preRender: function(data) {
this.subviews = { effects: new Effects({model : new Model(data.effect)}).render() };
},
save: function() {
this.model.save();
},
template: reviewTmpl
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment