PROD-2127

This commit is contained in:
azanbinzahid
2020-12-01 15:57:58 +05:00
committed by Ali-D-Akbar
parent c675ec9883
commit 67395683af

View File

@@ -7,8 +7,9 @@
'moment',
'support/js/views/enrollment_modal',
'support/js/collections/enrollment',
'text!support/templates/enrollment.underscore'
], function(Backbone, _, moment, EnrollmentModal, EnrollmentCollection, enrollmentTemplate) {
'text!support/templates/enrollment.underscore',
'edx-ui-toolkit/js/utils/html-utils'
], function(Backbone, _, moment, EnrollmentModal, EnrollmentCollection, enrollmentTemplate, HtmlUtils) {
return Backbone.View.extend({
ENROLLMENT_CHANGE_REASONS: {
@@ -35,14 +36,16 @@
render: function() {
var user = this.enrollments.user;
this.$el.html(_.template(enrollmentTemplate)({
user: user,
enrollments: this.enrollments,
formatDate: function(date) {
return date ? moment.utc(date).format('lll z') : 'N/A';
}
}));
HtmlUtils.setHtml(
this.$el,
HtmlUtils.template(enrollmentTemplate)({
user: user,
enrollments: this.enrollments,
formatDate: function(date) {
return date ? moment.utc(date).format('lll z') : 'N/A';
}
})
);
this.checkInitialSearch();
return this;
},