Skip to content

Commit ebb8458

Browse files
author
Yuri Kovsher
committed
MAGETWO-49537: Default Quantity field in assigned grouped products is set to decimal number after saving Grouped Product
1 parent 6054320 commit ebb8458

File tree

1 file changed

+11
-11
lines changed
  • app/code/Magento/GroupedProduct/Ui/DataProvider/Product/Form/Modifier

1 file changed

+11
-11
lines changed

app/code/Magento/GroupedProduct/Ui/DataProvider/Product/Form/Modifier/Grouped.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
use Magento\Catalog\Model\Locator\LocatorInterface;
99
use Magento\Catalog\Ui\DataProvider\Product\Form\Modifier\AbstractModifier;
10+
use Magento\Framework\Phrase;
1011
use Magento\Ui\Component\Modal;
1112
use Magento\Ui\Component\Form;
1213
use Magento\GroupedProduct\Model\Product\Type\Grouped as GroupedProductType;
@@ -469,11 +470,11 @@ protected function getRows()
469470
],
470471
],
471472
],
472-
'name' => $this->getTextColumn('name', false, 'Name', 30),
473-
'attribute_set' => $this->getTextColumn('attribute_set', false, 'Attribute Set', 40),
474-
'status' => $this->getTextColumn('status', true, 'Status', 50),
475-
'sku' => $this->getTextColumn('sku', false, 'SKU', 60),
476-
'price' => $this->getTextColumn('price', true, 'Price', 70),
473+
'name' => $this->getTextColumn('name', false, __('Name'), 30),
474+
'attribute_set' => $this->getTextColumn('attribute_set', false, __('Attribute Set'), 40),
475+
'status' => $this->getTextColumn('status', true, __('Status'), 50),
476+
'sku' => $this->getTextColumn('sku', false, __('SKU'), 60),
477+
'price' => $this->getTextColumn('price', true, __('Price'), 70),
477478
'qty' => [
478479
'arguments' => [
479480
'data' => [
@@ -487,8 +488,7 @@ protected function getRows()
487488
'additionalClasses' => 'admin__field-small',
488489
'sortOrder' => 80,
489490
'validation' => [
490-
'validate-number' => true,
491-
'validate-digits' => true,
491+
'validate-zero-or-greater' => true
492492
],
493493
],
494494
],
@@ -531,12 +531,12 @@ protected function getRows()
531531
* Returns text column configuration for the dynamic grid
532532
*
533533
* @param string $dataScope
534-
* @param boolean $fit
535-
* @param string $label
534+
* @param bool $fit
535+
* @param Phrase $label
536536
* @param int $sortOrder
537537
* @return array
538538
*/
539-
protected function getTextColumn($dataScope, $fit, $label, $sortOrder)
539+
protected function getTextColumn($dataScope, $fit, Phrase $label, $sortOrder)
540540
{
541541
$column = [
542542
'arguments' => [
@@ -548,7 +548,7 @@ protected function getTextColumn($dataScope, $fit, $label, $sortOrder)
548548
'dataType' => Form\Element\DataType\Text::NAME,
549549
'dataScope' => $dataScope,
550550
'fit' => $fit,
551-
'label' => __($label),
551+
'label' => $label,
552552
'sortOrder' => $sortOrder,
553553
],
554554
],

0 commit comments

Comments
 (0)