<?php
+# Copyright (C) 2008 Jason Woofenden
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
require_once('code/tasks.php');
$GLOBALS['tasks_form_recipient'] = "fixme@example.com";
case TASK_NEEDS_TESTING:
case TASK_FINISHED:
tem_show('price_row');
+ tem_show('mark_paid_link'); # FIXME
break;
}
} else {
case TASK_NEEDS_GO_AHEAD:
tem_show('price_row');
tem_show('approve_price_link');
- tem_show('warning_edit_link');
+ tem_show('normal_edit_link');
break;
case TASK_QUEUED:
tem_show('price_row');
$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);;