From 13d322b6338c626911b590b21196dbf91dd51bd4 Mon Sep 17 00:00:00 2001 From: "Beau Beauchamp, WebTigers" Date: Fri, 25 Sep 2026 11:49:22 -0400 Subject: [PATCH] Modules: notice when activating a theme while another theme is active MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Activating a second theme is allowed — a theme may be built to coexist — but it can be unpredictable, so surface a modal NOTICE (TigerModal, not an alert/warning) before it runs, and proceed on OK. Active themes are the rows already tagged with a data-theme="1" Deactivate button, so the check is client-side with no new server round-trip. - modules/system/views/scripts/modules/index.phtml: in the activate path of handleToggle, when activating a theme and another active theme exists, show the notice, then run() on OK. - modules/system/languages/en/system.php: system.js.activate_theme_multi(_title). Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01ASauLLscjqdsNqBNsx2Typ --- modules/system/languages/en/system.php | 2 ++ .../system/views/scripts/modules/index.phtml | 21 +++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/modules/system/languages/en/system.php b/modules/system/languages/en/system.php index b207e8a..122cfbf 100644 --- a/modules/system/languages/en/system.php +++ b/modules/system/languages/en/system.php @@ -390,6 +390,8 @@ 'system.js.deactivate_ok' => 'Deactivate', 'system.js.deactivate_required' => 'This module is required by %1$s to function. Deactivate anyway?', 'system.js.deactivate_theme' => 'Deactivate the "%1$s" theme? The public site reverts to the default theme.', + 'system.js.activate_theme_multi_title' => 'Multiple active themes', + 'system.js.activate_theme_multi' => 'Another theme is already active. Activating more than one theme at a time can have unpredictable results — unless the theme is designed to work alongside others. Activate anyway?', 'system.js.deactivate_confirm' => 'Deactivate "%1$s"? Its routes stop working until you reactivate it. Nothing is deleted.', 'system.js.confirm_install_title' => 'Install module', 'system.js.confirm_install_body' => 'This module’s code will run in your app once active.', diff --git a/modules/system/views/scripts/modules/index.phtml b/modules/system/views/scripts/modules/index.phtml index d4cbf6f..522e849 100644 --- a/modules/system/views/scripts/modules/index.phtml +++ b/modules/system/views/scripts/modules/index.phtml @@ -166,6 +166,8 @@ $this->i18n([ 'deactivateRequired' => 'system.js.deactivate_required', 'deactivateTheme' => 'system.js.deactivate_theme', 'deactivateConfirm' => 'system.js.deactivate_confirm', + 'activateThemeMultiTitle' => 'system.js.activate_theme_multi_title', + 'activateThemeMulti' => 'system.js.activate_theme_multi', ]); ?>