Skip to content

Commit

Permalink
Add hide_elements parameter that determine if we need to hide the htm…
Browse files Browse the repository at this point in the history
…l elements after finish auth process
  • Loading branch information
Vladyslav Tymofeiev committed Aug 16, 2024
1 parent a7c6b5f commit 71f0978
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lms/static/js/student_account/views/FinishAuthView.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@
courseId: $.url('?course_id'),
courseMode: $.url('?course_mode'),
emailOptIn: $.url('?email_opt_in'),
purchaseWorkflow: $.url('?purchase_workflow')
purchaseWorkflow: $.url('?purchase_workflow'),
hideElements: $.url('?hide_elements')
};
for (var key in queryParams) {
if (queryParams[key]) {
Expand All @@ -64,6 +65,7 @@
this.emailOptIn = queryParams.emailOptIn;
this.nextUrl = this.urls.defaultNextUrl;
this.purchaseWorkflow = queryParams.purchaseWorkflow;
this.hideElements = queryParams.hideElements;
if (queryParams.next) {
// Ensure that the next URL is internal for security reasons
if (! window.isExternal(queryParams.next)) {
Expand All @@ -76,6 +78,9 @@
try {
var next = _.bind(this.enrollment, this);
this.checkEmailOptIn(next);
if (this.hideElements) {
document.cookie = 'hideElements=' + this.hideElements + '; path=/';
}
} catch (err) {
this.updateTaskDescription(gettext('Error') + ': ' + err.message);
this.redirect(this.nextUrl);
Expand Down

0 comments on commit 71f0978

Please sign in to comment.