File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed
app/code/Magento/Review/Block/Adminhtml/Rating/Edit/Tab Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change 3
3
* Copyright © Magento, Inc. All rights reserved.
4
4
* See COPYING.txt for license details.
5
5
*/
6
+ declare (strict_types = 1 );
7
+
6
8
namespace Magento \Review \Block \Adminhtml \Rating \Edit \Tab ;
7
9
10
+ /**
11
+ * Class Magento\Review\Block\Adminhtml\Rating\Edit\Tab\Form
12
+ */
8
13
class Form extends \Magento \Backend \Block \Widget \Form \Generic
9
14
{
10
15
/**
@@ -227,7 +232,15 @@ protected function addVisibilityFieldset()
227
232
['label ' => __ ('Is Active ' ), 'name ' => 'is_active ' , 'value ' => 1 ]
228
233
);
229
234
$ this ->getFieldset ('visibility_form ' )
230
- ->addField ('position ' , 'text ' , ['label ' => __ ('Sort Order ' ), 'name ' => 'position ' ]);
235
+ ->addField (
236
+ 'position ' ,
237
+ 'text ' ,
238
+ [
239
+ 'label ' => __ ('Sort Order ' ),
240
+ 'name ' => 'position ' ,
241
+ 'class ' => 'validate-not-negative-number '
242
+ ]
243
+ );
231
244
}
232
245
233
246
/**
@@ -242,8 +255,6 @@ protected function initFieldset($formId, array $config)
242
255
if (!isset ($ this ->fieldset [$ formId ])) {
243
256
if (!$ this ->getForm ()->getElement ($ formId )) {
244
257
$ this ->fieldset [$ formId ] = $ this ->getForm ()->addFieldset ($ formId , $ config );
245
- } elseif ($ this ->getForm ()->getElement ($ formId )) {
246
- //do nothing
247
258
}
248
259
}
249
260
}
You can’t perform that action at this time.
0 commit comments