Skip to content

Commit

Permalink
feat: implements SHOW_REGISTRATION_LINKS feature toggle
Browse files Browse the repository at this point in the history
(cherry picked from commit 3025ab5)
(cherry picked from commit 2ee57b7d59ed53fa928f9b19127038b4cf0b4620)
  • Loading branch information
viadanna authored and yusuf-musleh committed Aug 3, 2023
1 parent a30d849 commit 31cde6b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 5 additions & 1 deletion lms/static/js/student_account/views/FormView.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,14 @@
optionalStr: gettext('(optional)'),
submitButton: '',
isEnterpriseEnable: false,
showRegisterLinks: true,

initialize: function(data) {
this.model = data.model;
this.showRegisterLinks = data.showRegisterLinks;
this.showRegisterLinks = (
typeof data.showRegisterLinks !== 'undefined'
) ? data.showRegisterLinks : this.showRegisterLinks;

this.preRender(data);

this.tpl = $(this.tpl).html();
Expand Down
4 changes: 3 additions & 1 deletion lms/static/js/student_account/views/LoginView.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@
this.supportURL = data.supportURL;
this.passwordResetSupportUrl = data.passwordResetSupportUrl;
this.createAccountOption = data.createAccountOption;
this.showRegisterLinks = data.showRegisterLinks;
this.showRegisterLinks = (
typeof data.showRegisterLinks !== 'undefined'
) ? data.showRegisterLinks : this.showRegisterLinks;
this.accountActivationMessages = data.accountActivationMessages;
this.accountRecoveryMessages = data.accountRecoveryMessages;
this.hideAuthWarnings = data.hideAuthWarnings;
Expand Down

0 comments on commit 31cde6b

Please sign in to comment.