From: Mischa POSLAWSKY Date: Thu, 7 Nov 2019 04:23:30 +0000 (+0100) Subject: issue: admin option to close or reopen X-Git-Tag: v4.2~25 X-Git-Url: http://git.shiar.net/minimedit.git/commitdiff_plain/fc5ac7212dade29d2d12ddad934c1dcfe4653794 issue: admin option to close or reopen --- diff --git a/widget/reply.php b/widget/reply.php index 1071976..328a58f 100644 --- a/widget/reply.php +++ b/widget/reply.php @@ -23,6 +23,12 @@ if ($_POST) { if (!isset($_POST[$col])) continue; $row[$col] = $_POST[$col] ?: NULL; } + if (isset($_POST['status'])) { + $reset = !empty($_POST['status']); + if (isset($Issue->closed) !== $reset) { + $row['closed'] = $reset ? ['now()'] : NULL; + } + } $Db->set('issues', $row, ['id = ?', $Issue->id]); } $_POST['reply'] = NULL; @@ -58,6 +64,15 @@ if ($User) { 'Toegewezen aan', htmlspecialchars($Issue->assign ?? '') ); + printf( + '' . + '' + . ''."\n", + 'status', + 'resolved', + isset($Issue->closed) ? ' checked' : '', + 'Gesloten' + ); print "

\n"; } printf(''."\n",