settings-org: Hide image upload button if user no longer admin.

Adds hiding any elements with the `image_upload_button` class in
the organization profile (icon and logos) to the live updates in
`settings_org.maybe_disable_widgets`, so that any role changes
that remove admin permissions will update these images so that
they no longer appear able to be updated / deleted.
This commit is contained in:
Lauryn Menard 2023-01-05 16:59:18 +01:00 committed by Tim Abbott
parent eef22e4e04
commit 55f34c3086
1 changed files with 2 additions and 0 deletions

View File

@ -55,6 +55,8 @@ export function maybe_disable_widgets() {
.find("input, textarea, button, select")
.prop("disabled", true);
$(".organization-box [data-name='organization-profile']").find(".image_upload_button").hide();
$(".organization-box [data-name='organization-settings']")
.find("input, textarea, button, select")
.prop("disabled", true);