From cc51b459beb71196e9fe26da651f2940378001a7 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Sat, 15 Apr 2017 08:07:57 -0700 Subject: [PATCH] admin: Show/hide menu items after setup. This allows disabling of UI elements in cases like the authentication methods checkboxes that are rendered during the setup method. --- static/js/admin.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/static/js/admin.js b/static/js/admin.js index 0898609ad1..752caa6260 100644 --- a/static/js/admin.js +++ b/static/js/admin.js @@ -62,8 +62,6 @@ function _setup_page() { exports.launch_page(tab); } - exports.show_or_hide_menu_item(); - $("#id_realm_default_language").val(page_params.realm_default_language); // We set this flag before we're fully loaded so that the populate @@ -76,6 +74,9 @@ function _setup_page() { settings_streams.set_up(); settings_filters.set_up(); + // Do this after calling the setup_up methods, so that we can + // disable any dynamically rendered elements. + exports.show_or_hide_menu_item(); } exports.launch_page = function (tab) {