<!--~price_row start~--><p><strong>Price</strong>: ~price.money~</p><!--~end~-->
+ <!--~mark_paid_link start~--><p><a href="tasks?tasks_mark_paid_id=~task_id.attr~">Mark as paid</a></p><!--~end~-->
+
<!--~approve_price_link start~--><p><a href="tasks?tasks_approve_price_id=~task_id.attr~">Approve price</a></p><!--~end~-->
<!--~normal_edit_link start~--><p><a href="tasks?tasks_edit_id=~task_id.attr~">Edit this task</a></p><!--~end~-->
case TASK_NEEDS_TESTING:
case TASK_FINISHED:
tem_show('price_row');
+ tem_show('mark_paid_link'); # FIXME
break;
}
} else {
$state = TASK_BUG;
}
+ if(isset($_REQUEST['tasks_mark_paid_id'])) {
+ if(!logged_in_as_contractor()) {
+ message("Error: only Jason can mark tasks as paid.");
+ return './';
+ }
+ $id = $_REQUEST['tasks_mark_paid_id'];
+ db_update('tasks', 'paid', 1, 'where id=%i', $id);
+ message('Marked as paid.');
+ return './';
+ }
+
if(isset($_REQUEST['tasks_approve_price_id'])) {
$id = $_REQUEST['tasks_approve_price_id'];
$owner = db_get_value('tasks', 'client_id', 'where id=%i', $id);;