From 1ee57cf8137650ead29e1930dd002f3e592ad9ee Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Thu, 2 Nov 2023 10:23:49 -0500 Subject: [PATCH] Force a recalculation of whether to show site templates panel after changing template category dropdown. See #3268. --- wp-content/themes/openlab/js/group-create.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wp-content/themes/openlab/js/group-create.js b/wp-content/themes/openlab/js/group-create.js index 226284f8d2..d70d17a552 100644 --- a/wp-content/themes/openlab/js/group-create.js +++ b/wp-content/themes/openlab/js/group-create.js @@ -655,6 +655,11 @@ jQuery( document ).ready( setTimeout( maybeShowSiteTemplates, 1500 ) + // We must also run maybeShowSiteTemplates after a category change. + $( '.site-template-categories' ).on( 'change', function() { + setTimeout( maybeShowSiteTemplates, 1500 ) + } ); + if ( 'course' === group_type && ! $setuptoggle.is( ':checked' ) ) { $setuptoggle.trigger( 'click' ); }