-// Do we need to show checkboxes?
-if ($bean->getAttribute('chpaid') ||
- ($client_id && $bean->getAttribute('chinvoice') && ('no_grouping' == $bean->getAttribute('group_by')) && !$user->isClient())) {
- if ($user->can('manage_invoices'))
- $smarty->assign('use_checkboxes', true);
+$use_checkboxes = $useMarkApproved || $useMarkPaid || $useAssignToInvoice || $useAssignToTimesheet;
+if ($use_checkboxes)
+ $smarty->assign('use_checkboxes', true);
+
+// Controls for "Mark approved" block.
+if ($useMarkApproved) {
+ $mark_approved_select_options = array('1'=>$i18n->get('dropdown.all'),'2'=>$i18n->get('dropdown.select'));
+ $form->addInput(array('type'=>'combobox',
+ 'name'=>'mark_approved_select_options',
+ 'data'=>$mark_approved_select_options,
+ 'value'=>$cl_mark_approved_select_option));
+ $mark_approved_action_options = array('1'=>$i18n->get('dropdown.approved'),'2'=>$i18n->get('dropdown.not_approved'));
+ $form->addInput(array('type'=>'combobox',
+ 'name'=>'mark_approved_action_options',
+ 'data'=>$mark_approved_action_options,
+ 'value'=>$cl_mark_approved_action_option));
+ $form->addInput(array('type'=>'submit','name'=>'btn_mark_approved','value'=>$i18n->get('button.submit')));
+ $smarty->assign('use_mark_approved', true);