Co-Authored-By: LogicalPhallacy <44458166+LogicalPhallacy@users.noreply.github.com>
This commit is contained in:
Vasily 2019-03-27 10:02:48 -07:00 committed by GitHub
parent 82e0a2f7da
commit e01feca025
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -22,7 +22,11 @@ define(["jQuery", "loading", "libraryMenu", "fnchecked"], function($, loading, l
} }
function loadPasswordResetProviders(page, user, providers) { function loadPasswordResetProviders(page, user, providers) {
providers.length > 1 && !user.Policy.IsAdministrator ? page.querySelector(".fldSelectPasswordResetProvider").classList.remove("hide") : page.querySelector(".fldSelectPasswordResetProvider").classList.add("hide"); if (providers.length > 1 && !user.Policy.IsAdministrator) {
page.querySelector(".fldSelectPasswordResetProvider").classList.remove("hide");
} else {
page.querySelector(".fldSelectPasswordResetProvider").classList.add("hide");
}
var currentProviderId = user.Policy.PasswordResetProviderId; var currentProviderId = user.Policy.PasswordResetProviderId;
page.querySelector(".selectPasswordResetProvider").innerHTML = providers.map(function(provider) { page.querySelector(".selectPasswordResetProvider").innerHTML = providers.map(function(provider) {
var selected = provider.Id === currentProviderId || providers.length < 2 ? " selected" : ""; var selected = provider.Id === currentProviderId || providers.length < 2 ? " selected" : "";