Skip to content

Commit

Permalink
fix(settings): disallow "none" in customs country of origin
Browse files Browse the repository at this point in the history
  • Loading branch information
EdieLemoine authored and myparcel-bot[bot] committed Nov 27, 2023
1 parent 10130eb commit d5f97e8
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 13 deletions.
6 changes: 1 addition & 5 deletions src/Frontend/View/CustomsSettingsView.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,11 @@ protected function createElements(): ?array
['options' => $this->toSelectOptions(CustomsSettings::PACKAGE_CONTENTS_LIST)]
),
new InteractiveElement(CustomsSettings::CUSTOMS_CODE, Components::INPUT_TEXT),

new InteractiveElement(
CustomsSettings::COUNTRY_OF_ORIGIN,
Components::INPUT_SELECT,
[
'options' => $this->toSelectOptions(
$this->countryService->getAllTranslatable(),
AbstractSettingsView::SELECT_INCLUDE_OPTION_NONE
),
'options' => $this->toSelectOptions($this->countryService->getAllTranslatable()),
'sort' => ElementBuilderWithOptionsInterface::SORT_ASC_VALUE,
]
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -468,10 +468,6 @@
"name": "countryOfOrigin",
"$component": "SelectInput",
"options": [
{
"value": -1,
"label": "settings_none"
},
{
"value": "AD",
"label": "country_ad"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@
"name": "countryOfOrigin",
"$component": "SelectInput",
"options": [
{
"value": -1,
"label": "settings_none"
},
{
"value": "AD",
"label": "country_ad"
Expand Down

0 comments on commit d5f97e8

Please sign in to comment.