7
7
8
8
use Magento \Catalog \Model \Locator \LocatorInterface ;
9
9
use Magento \Catalog \Ui \DataProvider \Product \Form \Modifier \AbstractModifier ;
10
+ use Magento \Framework \Phrase ;
10
11
use Magento \Ui \Component \Modal ;
11
12
use Magento \Ui \Component \Form ;
12
13
use Magento \GroupedProduct \Model \Product \Type \Grouped as GroupedProductType ;
@@ -469,11 +470,11 @@ protected function getRows()
469
470
],
470
471
],
471
472
],
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 ),
477
478
'qty ' => [
478
479
'arguments ' => [
479
480
'data ' => [
@@ -487,8 +488,7 @@ protected function getRows()
487
488
'additionalClasses ' => 'admin__field-small ' ,
488
489
'sortOrder ' => 80 ,
489
490
'validation ' => [
490
- 'validate-number ' => true ,
491
- 'validate-digits ' => true ,
491
+ 'validate-zero-or-greater ' => true
492
492
],
493
493
],
494
494
],
@@ -531,12 +531,12 @@ protected function getRows()
531
531
* Returns text column configuration for the dynamic grid
532
532
*
533
533
* @param string $dataScope
534
- * @param boolean $fit
535
- * @param string $label
534
+ * @param bool $fit
535
+ * @param Phrase $label
536
536
* @param int $sortOrder
537
537
* @return array
538
538
*/
539
- protected function getTextColumn ($ dataScope , $ fit , $ label , $ sortOrder )
539
+ protected function getTextColumn ($ dataScope , $ fit , Phrase $ label , $ sortOrder )
540
540
{
541
541
$ column = [
542
542
'arguments ' => [
@@ -548,7 +548,7 @@ protected function getTextColumn($dataScope, $fit, $label, $sortOrder)
548
548
'dataType ' => Form \Element \DataType \Text::NAME ,
549
549
'dataScope ' => $ dataScope ,
550
550
'fit ' => $ fit ,
551
- 'label ' => __ ( $ label) ,
551
+ 'label ' => $ label ,
552
552
'sortOrder ' => $ sortOrder ,
553
553
],
554
554
],
0 commit comments