Skip to content

Commit

Permalink
Display fixes related to bulk actions.
Browse files Browse the repository at this point in the history
  • Loading branch information
ADmad committed May 11, 2016
1 parent 2014b0f commit 36c84db
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 14 deletions.
7 changes: 3 additions & 4 deletions src/Template/Element/index/bulk_actions/form_end.ctp
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@ if (empty($bulkActions)) {
return;
}

$submitButton = $this->Form->input(__d('crud', 'Apply'), [
'label' => false,
'type' => 'submit',
'class' => 'btn btn-success btn-bulk-apply form-control',
$submitButton = $this->Form->button(__d('crud', 'Apply'), [
'class' => 'btn btn-primary btn-bulk-apply',
'name' => '_bulk',
]);

Expand All @@ -22,6 +20,7 @@ echo $this->Form->input('action', [
'select' => '<div class="col-sm-10"><select name="{{name}}"{{attrs}}>{{content}}</select>' . $submitButton . '</div>',
],
'type' => 'select',
'class' => 'no-selectize'
]);
echo $this->Form->end();
?>
6 changes: 2 additions & 4 deletions src/Template/Element/index/bulk_actions/record.ctp
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@ if (empty($bulkActions)) {
}
?>
<td class="bulk-action">
<?= $this->Form->input($primaryKey . '[' . $singularVar->id . ']', [
<?= $this->Form->checkbox($primaryKey . '[' . $singularVar->id . ']', [
'id' => $primaryKey . '-' . $singularVar->id,
'checked' => false,
'label' => '',
'type' => 'checkbox',
'value' => $singularVar->id,
]); ?>
]) ?>
</td>
7 changes: 1 addition & 6 deletions src/Template/Element/index/bulk_actions/table.ctp
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,5 @@ if (empty($bulkActions)) {
}
?>
<th class="bulk-action">
<?= $this->Form->input($primaryKey . '[_all]', [
'checked' => false,
'div' => false,
'label' => '',
'type' => 'checkbox',
]); ?>
<?= $this->Form->checkbox($primaryKey . '[_all]') ?>
</th>

0 comments on commit 36c84db

Please sign in to comment.