Skip to content

[Backport] Fixed Issue #22640 #22908

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions app/code/Magento/Tax/Block/Adminhtml/Rate/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
use Magento\Tax\Controller\RegistryConstants;

/**
* Tax rate form.
*
* @api
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
* @since 100.0.2
Expand Down Expand Up @@ -110,7 +112,7 @@ public function __construct(
}

/**
* @return void
* @inheritdoc
*/
protected function _construct()
{
Expand All @@ -119,6 +121,8 @@ protected function _construct()
}

/**
* Prepare form before rendering HTML.
*
* @return $this
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
* @SuppressWarnings(PHPMD.NPathComplexity)
Expand All @@ -132,8 +136,9 @@ protected function _prepareForm()
if ($taxRateId) {
$taxRateDataObject = $this->_taxRateRepository->get($taxRateId);
}
// phpcs:ignore Magento2.CodeAnalysis.EmptyBlock
} catch (NoSuchEntityException $e) {
/* tax rate not found */
//tax rate not found//
}

$sessionFormValues = (array)$this->_coreRegistry->registry(RegistryConstants::CURRENT_TAX_RATE_FORM_DATA);
Expand Down Expand Up @@ -176,7 +181,10 @@ protected function _prepareForm()
}

$legend = $this->getShowLegend() ? __('Tax Rate Information') : '';
$fieldset = $form->addFieldset('base_fieldset', ['legend' => $legend, 'class' => 'form-inline']);
$fieldset = $form->addFieldset(
'base_fieldset',
['legend' => $legend, 'class' => 'admin__scope-old form-inline']
);

if (isset($formData['tax_calculation_rate_id']) && $formData['tax_calculation_rate_id'] > 0) {
$fieldset->addField(
Expand Down