File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -215,7 +215,8 @@ protected function renderElements($template)
215
215
if (this.value) {
216
216
var ids = $('# {$ this ->grid }').yiiGridView('getSelectedRows'),
217
217
dataConfirm = this.options[this.selectedIndex].getAttribute('data-confirm'),
218
- url = this.options[this.selectedIndex].getAttribute('url');
218
+ opts = this.options[this.selectedIndex],
219
+ url = opts.getAttribute('url');
219
220
220
221
if (!ids.length) {
221
222
alert(' " . $ this ->t ('widget ' , 'Please select one or more items from the list. ' ) . "');
@@ -232,7 +233,7 @@ protected function renderElements($template)
232
233
form.append('<input type= \"hidden \" name=' + csrfParam + ' value=' + csrfToken + ' />');
233
234
}
234
235
$.each(ids, function(index, id) {
235
- form.append('<input type= \"hidden \" name= \"ids[] \" value=' + id + ' />');
236
+ form.append('<input type= \"hidden \" name= \"' + (opts.getAttribute('name') ? opts.getAttribute('name') : ' ids') + ' [] \" value=' + id + ' />');
236
237
});
237
238
form.appendTo('body').submit();
238
239
}
You can’t perform that action at this time.
0 commit comments