cartodb-4.29/lib/assets/javascripts/dashboard/components/trial-notification/trial-notification-view.js
2020-06-15 10:58:47 +08:00

31 lines
636 B
JavaScript

const CoreView = require('backbone/core-view');
const template = require('./trial-notification.tpl');
const checkAndBuildOpts = require('builder/helpers/required-opts');
const REQUIRED_OPTS = [
'userModel',
'upgradeUrl',
'trialDays'
];
module.exports = CoreView.extend({
initialize: function (options) {
checkAndBuildOpts(options, REQUIRED_OPTS, this);
this.userAccount = this._userModel.get('account_type');
},
render: function () {
this.clearSubViews();
this.$el.html(
template({
upgradeUrl: this._upgradeUrl,
trialDays: this._trialDays
})
);
return this;
}
});