auth: Fix authentication methods checkboxes disabling.

Apparently, there were not correctly disabled if you clicked on
"authentication methods" after opening the settings UI another way.
Everything worked fine if you just clicked them, already.
This commit is contained in:
Tim Abbott 2017-05-17 11:54:09 -07:00
parent b00f7f09bc
commit 6e66495c38
1 changed files with 4 additions and 1 deletions

View File

@ -97,6 +97,10 @@ exports.populate_auth_methods = function (auth_methods) {
})); }));
}); });
loading.destroy_indicator($('#admin_page_auth_methods_loading_indicator')); loading.destroy_indicator($('#admin_page_auth_methods_loading_indicator'));
if (!page_params.is_admin) {
$(".organization-box [data-name='auth-methods']")
.find("input, button, select, checked").attr("disabled", true);
}
}; };
exports.set_up = function () { exports.set_up = function () {
@ -110,7 +114,6 @@ exports.set_up = function () {
// Populate authentication methods table // Populate authentication methods table
exports.populate_auth_methods(page_params.realm_authentication_methods); exports.populate_auth_methods(page_params.realm_authentication_methods);
$("#id_realm_invite_required").change(function () { $("#id_realm_invite_required").change(function () {
if (this.checked) { if (this.checked) {
$("#id_realm_invite_by_admins_only").removeAttr("disabled"); $("#id_realm_invite_by_admins_only").removeAttr("disabled");