Fix azioni di gruppo

This commit is contained in:
Pek5892 2024-05-24 15:11:11 +02:00
parent 94b5d57b24
commit b9c2e7c903
1 changed files with 8 additions and 7 deletions

View File

@ -180,11 +180,12 @@ if (!empty($type) && $type != 'menu' && $type != 'custom') {
</div> </div>
<div class="col-md-2 dropup">'; <div class="col-md-2 dropup">';
if (!empty($bulk) && $structure->permission == 'rw' && empty($id_plugin)) { if (!empty($bulk) && $structure->permission == 'rw' && empty($id_plugin)) {
echo ' echo '
<button class="btn btn-primary btn-block dropdown-toggle actions-container disabled" type="button" data-toggle="dropdown" disabled>'.tr('Azioni di gruppo').' <span class="caret"></span></button> <div class="btn-group">
<div class="dropdown-menu dropup" data-target="'.$table_id.'" role="menu">';
<button class="btn btn-primary btn-lg dropdown-toggle dropdown-toggle-split" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> '.tr('Azioni di gruppo').' </button>
<div class="dropdown-menu dropdown-menu-right">';
foreach ($bulk as $key => $value) { foreach ($bulk as $key => $value) {
$text = is_array($value) ? $value['text'] : $value; $text = is_array($value) ? $value['text'] : $value;
@ -196,14 +197,14 @@ if (!empty($type) && $type != 'menu' && $type != 'custom') {
} }
echo ' echo '
<a class="bulk-action clickable dropdown-item" data-op="'.prepareToField($key).'" data-backto="record-list" '.implode(' ', $extra).'>'.$text.'</a></li>'; <a class="bulk-action clickable dropdown-item" data-op="'.prepareToField($key).'" data-backto="record-list" '.implode(' ', $extra).'>'.$text.'</a>';
} }
echo ' echo '
</div>
</div>'; </div>';
} }
echo'
echo '
</div> </div>
<div class="col-md-5 text-right"> <div class="col-md-5 text-right">