Example #1
0
function get_periodicity($recurrence)
{
    $recurrences = get_periodicities();
    return isset($recurrences[$recurrence]) ? $recurrences[$recurrence] : __('Unknown');
}
Example #2
0
$table->style[1] = 'vertical-align: top; width: 30%';
$table->style[2] = 'vertical-align: top; width: 30%';
$table->data = array();
$table->cellspacing = 2;
$table->cellpadding = 2;
$table->data[0][0] = print_input_text('name', $name, '', 60, 240, true, __('Name'));
$table->data[0][1] = print_select(get_priorities(), 'priority', $priority, '', '', '', true, false, false, __('Priority'));
if ($project_permission['manage'] || $operation == "view") {
    $combo_none = __('None');
} else {
    $combo_none = false;
}
$table->data[0][2] = combo_task_user_manager($config['id_user'], $parent, true, __('Parent'), 'parent', $combo_none, false, $id_project, $id_task);
$table->data[1][0] = print_input_text('start_date', $start, '', 15, 15, true, __('Start'));
$table->data[1][1] = print_input_text('end_date', $end, '', 15, 15, true, __('End'));
$table->data[1][2] = print_select(get_periodicities(), 'periodicity', $periodicity, '', __('None'), 'none', true, false, false, __('Recurrence'));
$table->data[2][0] = print_input_text('hours', $hours, '', 5, 5, true, __('Estimated hours'));
$table->data[2][0] .= "&nbsp;&nbsp;<a href='javascript: show_calculation();'>" . print_image('images/play.gif', true, array('title' => __('Calculate hours'))) . "</a>";
$table->data[2][1] = print_input_text('estimated_cost', $estimated_cost, '', 7, 11, true, __('Estimated cost'));
$table->data[2][1] .= ' ' . $config['currency'];
$table->data[2][2] = print_checkbox_extended('count_hours', 1, $count_hours, false, '', '', true, __('Completion based on hours')) . print_help_tip(__("Calculated task completion using workunits inserted by project members, if not it uses Completion field of this form"), true);
$table->data[3][0] = print_input_text('cc', $cc, '', 60, 240, true, __('CC') . print_help_tip(__("Email to notify changes in workunits"), true));
$table->colspan[4][0] = 3;
$completion_label = __('Completion') . " <em>(<span id=completion>" . $completion . "%</span>)</em>";
$table->data[4][0] = print_label($completion_label, '', '', true, '<div id="slider" style="margin-top: 5px;"><div class="ui-slider-handle"></div></div>');
$table->data[4][0] .= print_input_hidden('completion', $completion, true);
//////TABLA ADVANCED
$table_advanced->width = '98%';
$table_advanced->class = 'search-table';
$table_advanced->size = array();
$table_advanced->size[0] = '33%';