Skip to content

Commit

Permalink
Merge pull request #7446 from mdctleo/pr/7283
Browse files Browse the repository at this point in the history
  • Loading branch information
jonboiser authored Aug 17, 2020
2 parents 4364fb0 + 275de13 commit 3c707d8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
1 change: 1 addition & 0 deletions AUTHORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,4 @@ Please feel free to add your name to this list if you make a PR
* Julián Duque (julianduque)
* Brian Kwon (br-kwon)
* Jacob Pierce (nucleogenesis)
* Leo Lin (mdctleo)
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,14 @@
:key="setting"
:label="$tr('learnerNeedPasswordToLogin')"
:checked="!settings['learner_can_login_with_no_password']"
@change="toggleSetting('learner_can_login_with_no_password')"
@change="toggleLearnerLoginPassword()"
/>
<KCheckbox
:key="setting + 'learner_can_edit_password'"
:disabled="enableChangePassword"
:label="$tr('learnerCanEditPassword')"
:checked="settings['learner_can_edit_password']"
:checked="!settings['learner_can_login_with_no_password']
&& settings['learner_can_edit_password']"
class="checkbox-password"
@change="toggleSetting('learner_can_edit_password')"
/>
Expand Down Expand Up @@ -208,6 +209,16 @@
value: !this.settings[settingName],
});
},
toggleLearnerLoginPassword() {
this.toggleSetting('learner_can_login_with_no_password');
if (
this.settings['learner_can_edit_password'] &&
!this.settings['learner_can_login_with_no_password']
) {
this.toggleSetting('learner_can_edit_password');
}
},
dismissNotification() {
this.$store.commit('facilityConfig/CONFIG_PAGE_NOTIFY', null);
},
Expand Down

0 comments on commit 3c707d8

Please sign in to comment.