From 2001b81dd9d0e90d86484fa09e6ddaebb5340c0a Mon Sep 17 00:00:00 2001 From: Jason Woofenden Date: Tue, 2 Dec 2008 23:56:52 -0500 Subject: [PATCH] added "mark paid" link in mostly the right places --- tasks.html | 2 ++ tasks.php | 12 ++++++++++++ 2 files changed, 14 insertions(+) diff --git a/tasks.html b/tasks.html index 448e989..af09c86 100644 --- a/tasks.html +++ b/tasks.html @@ -24,6 +24,8 @@

Price: ~price.money~

+

Mark as paid

+

Approve price

Edit this task

diff --git a/tasks.php b/tasks.php index 779cb31..561c1d9 100644 --- a/tasks.php +++ b/tasks.php @@ -126,6 +126,7 @@ function tasks_display_main() { case TASK_NEEDS_TESTING: case TASK_FINISHED: tem_show('price_row'); + tem_show('mark_paid_link'); # FIXME break; } } else { @@ -188,6 +189,17 @@ function tasks_edit_main() { $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);; -- 1.7.10.4