Exemplo n.º 1
0
</textarea></td>
</tr>
<tr>
	<td class="form_field_header_cell">Items:</td>
	<td class="form_field_cell"><?php 
echo $task->getTaskItemsHTML($task_activity->id);
?>
</td>
</tr>
<tr>
	<td class="form_field_header_cell">New Task:</td>
	<td class="form_field_cell">
		<select name="new_item_parent" class="input_text" tabindex="11">
			<option value="0">No Parent</option>
			<?php 
echo SI_TaskItem::getParentSelectTags($task->id);
?>
		</select>
		<input name="new_item" class="input_text" size="70" type="text">
	</td>
</tr>
<? } //if type 
?>
<tr>
	<td class="form_field_header_cell">Add Expense:</td>
	<td class="form_field_cell">
		<table cellpadding="2" cellspacing="0">
		<tr>
			<td><b>Item Code:</b></td>
			<td>
				<select name="expense[item_code_id]" id="expense[item_code_id]" tabindex="11" class="input_text" onchange="updateExpense()">
Exemplo n.º 2
0
	}
}else if($_REQUEST['mode'] == 'delete_item'){
	$title = "Delete Task Item";
	if(!$task->get($_REQUEST['id'])){
		fatal_error("Could not retreive task!");
		debug_message($task->getLastError());
	}
	if($project->get($task->project_id) === FALSE){
		fatal_error("Could not retreive project!");
		debug_message($project->getLastError());
	}
	if(!$project->hasRights(PROJECT_RIGHT_EDIT)){
		fatal_error('Insufficent access rights for this project!');
	}

	$ti = new SI_TaskItem();
	if($ti->delete($_REQUEST['item_id'])){
		header("Location: ".getCurrentURL(null, false)."?mode=edit&id=".$_REQUEST['id']."\r\n");
		exit();
	}else{
		$error_msg .= "Error deleting Task Item!\n";
	}
}else if($_REQUEST['mode'] == 'delete_attachment'){
	$title = "Delete Attachment";
	if(empty($_REQUEST['id'])){
		$error_msg .= "Error: No ID specified!\n";
	}else{
		if(!$task->get($_REQUEST['id'])){
			fatal_error("Could not retreive task!");
			debug_message($task->getLastError());
		}
Exemplo n.º 3
0
	function getCompletedItems(){
		if(empty($this->id) || empty($this->task_id)){
			$this->error = "SI_TaskActivity::getCompletedItems(): Invalid Task!\n";
			return FALSE;
		}

		$ti = new SI_TaskItem();
		$items = $ti->getCompletedTaskItems($this->task_id, $this->id);
		if($items === FALSE){
			$this->error = "SI_TaskActivity::getCompletedItems(): Error getting items:\n".$ti->getLastError();
			return FALSE;
		}else{
			$this->completed_items = $items;
		}

		return TRUE;
	}