From 356734715b09a5bf5207fd7f6a95fc683c8319cc Mon Sep 17 00:00:00 2001 From: Jose Antonio Gonzalez Date: Thu, 1 Feb 2018 08:28:30 +0200 Subject: [PATCH] fix layout in learner profile --- .../learner_profile/js/views/learner_profile_view.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/openedx/features/learner_profile/static/learner_profile/js/views/learner_profile_view.js b/openedx/features/learner_profile/static/learner_profile/js/views/learner_profile_view.js index 5510a03eb0..5bb9ad6da9 100644 --- a/openedx/features/learner_profile/static/learner_profile/js/views/learner_profile_view.js +++ b/openedx/features/learner_profile/static/learner_profile/js/views/learner_profile_view.js @@ -42,6 +42,8 @@ render: function() { var tabs, + $tabbedViewElement, + $wrapperProfileBioElement = this.$el.find('.wrapper-profile-bio'), self = this; this.sectionTwoView = new SectionTwoTab({ @@ -87,8 +89,11 @@ viewLabel: gettext('Profile') }); - this.tabbedView.render(); - this.$el.find('.account-settings-container').append(this.tabbedView.el); + $tabbedViewElement = this.tabbedView.render().el; + HtmlUtils.setHtml( + $wrapperProfileBioElement, + HtmlUtils.HTML($tabbedViewElement) + ); if (this.firstRender) { this.router.on('route:loadTab', _.bind(this.setActiveTab, this)); @@ -103,7 +108,7 @@ } } else { // xss-lint: disable=javascript-jquery-html - this.$el.find('.wrapper-profile-bio').html(this.sectionTwoView.render().el); + $wrapperProfileBioElement.html(this.sectionTwoView.render().el); } return this; },