From 2d9099de6f0eb96965993b46958d1e12d33c87da Mon Sep 17 00:00:00 2001 From: Blesilda Ramirez Date: Fri, 25 Oct 2024 02:33:08 +0800 Subject: [PATCH] pkp/pkp-lib#10529 Remove workaround to FieldOptions orderable bug --- .../forms/context/PKPAppearanceSetupForm.php | 23 ++++--------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/classes/components/forms/context/PKPAppearanceSetupForm.php b/classes/components/forms/context/PKPAppearanceSetupForm.php index 862a90c86b5..e4cd91d16a2 100644 --- a/classes/components/forms/context/PKPAppearanceSetupForm.php +++ b/classes/components/forms/context/PKPAppearanceSetupForm.php @@ -47,33 +47,18 @@ public function __construct($action, $locales, $context, $baseUrl, $temporaryFil $this->action = $action; $this->locales = $locales; $sidebarOptions = []; - $enabledOptions = []; - $disabledOptions = []; $currentBlocks = (array) $context->getData('sidebar'); $plugins = PluginRegistry::loadCategory('blocks', true); - foreach ($currentBlocks as $plugin) { - if (isset($plugins[$plugin])) { - $enabledOptions[] = [ - 'value' => $plugin, - 'label' => htmlspecialchars($plugins[$plugin]->getDisplayName()), - ]; - } - } - foreach ($plugins as $pluginName => $plugin) { - if (!in_array($pluginName, $currentBlocks)) { - $disabledOptions[] = [ - 'value' => $pluginName, - 'label' => htmlspecialchars($plugin->getDisplayName()), - ]; - } + $sidebarOptions[] = [ + 'value' => $pluginName, + 'label' => htmlspecialchars($plugin->getDisplayName()), + ]; } - $sidebarOptions = array_merge($enabledOptions, $disabledOptions); - $this->addField(new FieldUploadImage('pageHeaderLogoImage', [ 'label' => __('manager.setup.logo'), 'value' => $context->getData('pageHeaderLogoImage'),