@@ -70,7 +70,7 @@ public function init()
70
70
public function run ()
71
71
{
72
72
echo Html::beginTag ('div ' , [
73
- 'class ' => 'list-group list-group- ' . $ this ->getGroupId (),
73
+ 'class ' => 'list-group list-group- ' . $ this ->getId (),
74
74
]);
75
75
echo Html::beginTag ('table ' , [
76
76
'class ' => 'multiple-input-list table table-condensed '
@@ -210,7 +210,7 @@ private function getRowTemplate()
210
210
'type ' => '{btn_type} ' ,
211
211
'options ' => [
212
212
'id ' => $ this ->getElementId ('button ' ),
213
- 'class ' => "ps-button multiple-input-list__btn btn js- {$ this ->getGroupId ()}-input-{btn_action} " ,
213
+ 'class ' => "ps-button multiple-input-list__btn btn js- {$ this ->getId ()}-input-{btn_action} " ,
214
214
]
215
215
]
216
216
);
@@ -295,15 +295,7 @@ private function normalize($name) {
295
295
return str_replace (['[] ' , '][ ' , '[ ' , '] ' , ' ' , '. ' ], ['' , '- ' , '- ' , '' , '- ' , '- ' ], strtolower ($ name ));
296
296
}
297
297
298
- /**
299
- * @return mixed
300
- */
301
- private function getGroupId ()
302
- {
303
- return $ this ->normalize ($ this ->getName ()) . static ::$ counter ;
304
- }
305
-
306
- /**
298
+ /**
307
299
* @return string
308
300
*/
309
301
private function getName ()
@@ -336,7 +328,7 @@ public function registerClientScript()
336
328
MultipleInputAsset::register ($ view );
337
329
$ options = Json::encode (
338
330
[
339
- 'group_id ' => $ this ->getGroupId (),
331
+ 'group_id ' => $ this ->getId (),
340
332
'template ' => $ this ->getRowTemplate (),
341
333
'btn_action ' => self ::ACTION_REMOVE ,
342
334
'btn_type ' => Button::TYPE_DANGER ,
0 commit comments