From 9ca4895f79a99492654402dfd3c6e328eaae22f9 Mon Sep 17 00:00:00 2001 From: Bram de Leeuw Date: Fri, 30 Sep 2022 12:19:49 +0200 Subject: [PATCH] Reset ExtraClass on ViewModeSelector include Since silverstripe/silverstripe-admin version 1.11 the include `SilverStripe\\Admin\\LeftAndMain_ViewModeSelector` uses an [ExtraClass parameter](https://github.com/silverstripe/silverstripe-admin/blob/6d1998707d7cb96e888a83053c9d34b09d842ed2/templates/SilverStripe/Admin/Includes/LeftAndMain_ViewModeSelector.ss#L1). When this parameter is not explicitly set it inherits the ExtraClass of the template it's included in. In CMSMain this causes the ViewMode button to stretch. --- .../SilverStripe/CMS/Controllers/Includes/CMSMain_EditForm.ss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/SilverStripe/CMS/Controllers/Includes/CMSMain_EditForm.ss b/templates/SilverStripe/CMS/Controllers/Includes/CMSMain_EditForm.ss index b087d46a..3a85076f 100644 --- a/templates/SilverStripe/CMS/Controllers/Includes/CMSMain_EditForm.ss +++ b/templates/SilverStripe/CMS/Controllers/Includes/CMSMain_EditForm.ss @@ -28,7 +28,7 @@ <% end_if %> - <% include SilverStripe\\Admin\\LeftAndMain_ViewModeSelector SelectID="preview-mode-dropdown-in-content" %> + <% include SilverStripe\\Admin\\LeftAndMain_ViewModeSelector SelectID="preview-mode-dropdown-in-content", ExtraClass='' %> <% end_if %>