From d6cbd848dcd0e1f9d0b456456e9dd1db6fe8d85b Mon Sep 17 00:00:00 2001 From: Benni Mack <benni@typo3.org> Date: Wed, 17 Mar 2021 08:39:50 +0100 Subject: [PATCH] [BUGFIX] Hide radio button in upgrade wizard's buttons Since the upgrade of bootstrap, the radio button inside the upgrade wizards' buttons are shown. The change utilizes btn-check functionality from Bootstrap 5 Resolves: #93653 Releases: master Change-Id: I718ff5390c039ba5c14881ecdbca7d29817ce8d1 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/68187 Tested-by: TYPO3com <noreply@typo3.com> Tested-by: core-ci <typo3@b13.com> Tested-by: Oliver Bartsch <bo@cedev.de> Tested-by: Richard Haeser <richard@richardhaeser.com> Reviewed-by: Oliver Bartsch <bo@cedev.de> Reviewed-by: Richard Haeser <richard@richardhaeser.com> --- .../install/Classes/Service/UpgradeWizardsService.php | 7 +++++-- .../Private/Templates/Upgrade/UpgradeWizards.html | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/typo3/sysext/install/Classes/Service/UpgradeWizardsService.php b/typo3/sysext/install/Classes/Service/UpgradeWizardsService.php index cbe49fe5eecb..22266a3a96e1 100644 --- a/typo3/sysext/install/Classes/Service/UpgradeWizardsService.php +++ b/typo3/sysext/install/Classes/Service/UpgradeWizardsService.php @@ -321,6 +321,7 @@ class UpgradeWizardsService $markup = []; $radioAttributes = [ 'type' => 'radio', + 'class' => 'btn-check', 'name' => 'install[values][' . $updateObject->getIdentifier() . '][install]', 'value' => '0' ]; @@ -332,10 +333,12 @@ class UpgradeWizardsService $markup[] = ' <p>' . nl2br(htmlspecialchars($updateObject->getConfirmation()->getMessage())) . '</p>'; $markup[] = ' <div class="btn-group" data-bs-toggle="buttons">'; if (!$updateObject->getConfirmation()->isRequired()) { - $markup[] = ' <label class="btn btn-default active"><input ' . GeneralUtility::implodeAttributes($radioAttributes, true) . ' checked="checked" />' . $updateObject->getConfirmation()->getDeny() . '</label>'; + $markup[] = ' <input ' . GeneralUtility::implodeAttributes($radioAttributes, true) . ' checked id="upgrade-wizard-deny">'; + $markup[] = ' <label class="btn btn-default" for="upgrade-wizard-deny">' . $updateObject->getConfirmation()->getDeny() . '</label>'; } $radioAttributes['value'] = '1'; - $markup[] = ' <label class="btn btn-default"><input ' . GeneralUtility::implodeAttributes($radioAttributes, true) . ' />' . $updateObject->getConfirmation()->getConfirm() . '</label>'; + $markup[] = ' <input ' . GeneralUtility::implodeAttributes($radioAttributes, true) . ' id="upgrade-wizard-confirm">'; + $markup[] = ' <label class="btn btn-default" for="upgrade-wizard-confirm">' . $updateObject->getConfirmation()->getConfirm() . '</label>'; $markup[] = ' </div>'; $markup[] = ' </div>'; $markup[] = '</div>'; diff --git a/typo3/sysext/install/Resources/Private/Templates/Upgrade/UpgradeWizards.html b/typo3/sysext/install/Resources/Private/Templates/Upgrade/UpgradeWizards.html index 4a16725bb9cc..f3538e06d1b5 100644 --- a/typo3/sysext/install/Resources/Private/Templates/Upgrade/UpgradeWizards.html +++ b/typo3/sysext/install/Resources/Private/Templates/Upgrade/UpgradeWizards.html @@ -49,7 +49,7 @@ </div> <div class="t3js-upgradeWizards-list-rows"></div> </div> - <div class="t3js-upgradeWizards-list-row-template"> + <div class="t3js-upgradeWizards-list-row-template mt-3"> <h4 class="t3js-upgradeWizards-list-row-title"></h4> <div class="row-explanation t3js-upgradeWizards-list-row-explanation"></div> <button class="btn btn-default t3js-upgradeWizards-list-row-execute" type="button"> -- GitLab