If somebody needs this feature I figured out how it could be implemented. I tested it and it works perfect for me.
Solution:
Edit two files in ./modules/tasks
tasks.class.php
tasks.php
tasks.class.php in function showtask near line 2415 (between section //percent complete and priority and section //dots add the following lines:
PHP Code:
//one click complete
if ($a['task_dynamic'] != 1) {
//task complete 100% ??
if (intval($a['task_percent_complete']) < 100){
$s .= "\n\t<td align=\"center\" width=\"15\">";
$s .= "<form name='taskCompleteForm".$a['task_id']."' action='?m=tasks&a=view' method='post'>";
$s .= "<input name='dosql' type='hidden' value='do_task_aed' />";
$s .= "<input type = 'hidden' name='task_id' value='".$a['task_id']."'>";
$s .= "<input type = 'hidden' name='task_percent_complete' value='100'>";
$s .= "<input type='checkbox' name='completeIt' onclick='document.taskCompleteForm".$a['task_id'].".submit();'>";
//$s .= intval( $a["task_percent_complete"] ).'%';
$s .= "</form>";
}
else {
$s .= "\n\t<td align=\"center\" width=\"15\">";
$s .= '<img src="./images/log-notice.gif" alt="F" />';//intval( $a["task_percent_complete"] ).'%';
}
} else {
$s .= "\n\t<td align=\"center\" width=\"15\">";
$s .= ' - ';//intval( $a["task_percent_complete"] ).'%';
}
and in tasks.php after line 485
PHP Code:
<th width="20"><?php echo $AppUI->_('One Click complete');?></th>