Skip to content

Commit

Permalink
fix for github issue: magento#32177
Browse files Browse the repository at this point in the history
  • Loading branch information
mark_rees authored and Sental committed Feb 7, 2022
1 parent 72239c5 commit db8f86d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ private function convertElementsToSelect($elements, $attributesToConvert)

foreach ($options as $key => $value) {
$elements[$code]['options'][] = [
'value' => $key,
'value' => $value,
'label' => $value,
];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,9 +235,13 @@ protected function _prepareForm()
if ($prefixElement) {
$prefixOptions = $this->options->getNamePrefixOptions($this->getStore());
if (!empty($prefixOptions)) {
$mappedPrefixOptions = array ();
foreach ($prefixOptions as $prefix) {
$mappedPrefixOptions[$prefix] = $prefix;
}
$fieldset->removeField($prefixElement->getId());
$prefixField = $fieldset->addField($prefixElement->getId(), 'select', $prefixElement->getData(), '^');
$prefixField->setValues($prefixOptions);
$prefixField->setValues($mappedPrefixOptions);
if ($this->getAddressId()) {
$prefixField->addElementValues($this->getAddress()->getPrefix());
}
Expand Down

0 comments on commit db8f86d

Please sign in to comment.