if (!isset($start_date)) $start_date = substr ($now, 0, 10); $table->data[0][0] = print_input_text ('start_date', $start_date, '', 10, 20, true, __('Date')); // Profile or role if (dame_admin ($config['id_user'])) { $table->colspan[1][0] = 3; $table->data[1][0] = combo_roles (true, 'id_profile', __('Role'), true, true, $id_profile); //$table->data[0][1] = combo_roles_people_task ($id_task, $config['id_user'], __('Role')); } else { $table->colspan[1][0] = 3; $table->data[1][0] = combo_user_task_profile ($id_task, 'id_profile', $id_profile, false, true); } // Show task combo if none was given. if (! $id_task) { $table->data[0][1] = combo_task_user_participant ($wu_user, true, 0, true, __('Task')); } else { $table->data[0][1] = combo_task_user_participant ($wu_user, true, $id_task, true, __('Task')); } // Time used $table->data[2][0] = print_input_text ('duration', $duration, '', 7, 7, true, __('Time used'));
function workunits_print_table_massive_edition($id_task = 0, $id_profile = 0) { global $config; echo '<br><h2>' . __('Massive operations over selected items') . '</h2>'; $table = new StdClass(); $table->class = 'search-table-button'; $table->width = '99%'; $table->data = array(); $table->colspan = array(); // Profile or role if (dame_admin($config['id_user'])) { $table->data[0][0] = combo_roles(false, 'id_profile', __('Role'), true, true, '', true); } else { $table->data[0][0] = combo_user_task_profile($id_task, 'id_profile', $id_profile, false, true, true); } // Show task combo if none was given. if (!$id_task) { $table->data[0][1] = combo_task_user_participant($config['id_user'], true, 0, true, __('Task'), false, false, false, '', true); } else { $table->data[0][1] = combo_task_user_participant($config['id_user'], true, $id_task, true, __('Task'), false, false, false, true); } // Various checkboxes $table->data[2][0] = print_checkbox('have_cost', 1, '', true, __('Have cost')); $table->data[2][1] = print_checkbox('keep_cost', 1, '', true, __('Keep cost')); $table->data[3][0] = print_checkbox('public', 1, '', true, __('Public')); $table->data[3][1] = print_checkbox('keep_public', 1, '', true, __('Keep public')); $table->colspan[5][0] = 2; $table->data[5][0] = print_submit_button(__('Update'), 'update_btn', false, 'class="sub upd"', true); $table->data[5][0] .= print_submit_button(__('Delete'), 'delete_btn', false, 'class="sub delete"', true); print_table($table); }