mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Allow for selecting a reason when closing a request
When closing a package request, Trusted Users can now pick a reason ("Accepted" or "Rejected"). This allows for marking a request as accepted, even if the corresponding package base has already been deleted. Also, the notification email now always explicitly states whether a request has been accepted or closed in the message body. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
parent
61d70c1fa5
commit
8a465182ba
7 changed files with 80 additions and 22 deletions
24
web/template/pkgreq_close_form.php
Normal file
24
web/template/pkgreq_close_form.php
Normal file
|
@ -0,0 +1,24 @@
|
|||
<div class="box">
|
||||
<h2><?= __('Close Request: %s', htmlspecialchars($pkgbase_name)) ?></h2>
|
||||
<p>
|
||||
<?= __('Use this form to close the request for package base %s%s%s.',
|
||||
'<strong>', htmlspecialchars($pkgbase_name), '</strong>'); ?>
|
||||
</p>
|
||||
<form action="<?= get_uri('/pkgbase/'); ?>" method="post">
|
||||
<fieldset>
|
||||
<input type="hidden" name="reqid" value="<?= $pkgreq_id ?>" />
|
||||
<input type="hidden" name="token" value="<?= htmlspecialchars($_COOKIE['AURSID']) ?>" />
|
||||
<p>
|
||||
<label for="id_reason"><?= __("Reason") ?>:</label>
|
||||
<select name="reason" id="id_reason">
|
||||
<option value="accepted"><?= __('Accepted') ?></option>
|
||||
<option value="rejected"><?= __('Rejected') ?></option>
|
||||
</select>
|
||||
</p>
|
||||
<p>
|
||||
<input type="submit" class="button" name="do_CloseRequest" value="<?= __("Close Request") ?>" />
|
||||
</p>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
|
|
@ -51,8 +51,10 @@
|
|||
<?php if ($row['BaseID']): ?>
|
||||
<?php if ($row['Type'] == 'deletion'): ?>
|
||||
<a href="<?= get_pkgbase_uri($row['Name']) ?>delete/?via=<?= intval($row['ID']) ?>"><?= __('Accept') ?></a>
|
||||
<br/ >
|
||||
<?php elseif ($row['Type'] == 'merge'): ?>
|
||||
<a href="<?= get_pkgbase_uri($row['Name']) ?>merge/?into=<?= urlencode($row['MergeInto']) ?>&via=<?= intval($row['ID']) ?>"><?= __('Accept') ?></a>
|
||||
<br />
|
||||
<?php elseif ($row['Type'] == 'orphan'): ?>
|
||||
<form action="<?= get_pkgbase_uri($row['Name']) . 'disown/'; ?>" method="post">
|
||||
<input type="hidden" name="token" value="<?= htmlspecialchars($_COOKIE['AURSID']) ?>" />
|
||||
|
@ -61,17 +63,7 @@
|
|||
</form>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<form action="<?= get_uri('/pkgbase/'); ?>" method="post">
|
||||
<fieldset>
|
||||
<input type="hidden" name="IDs[<?= $row['BaseID'] ?>]" value="1" />
|
||||
<input type="hidden" name="ID" value="<?= $row['BaseID'] ?>" />
|
||||
<input type="hidden" name="token" value="<?= htmlspecialchars($_COOKIE['AURSID']) ?>" />
|
||||
<input type="hidden" name="reqid" value="<?= $row['ID'] ?>" />
|
||||
<div>
|
||||
<input type="submit" class="button text-button" name="do_CloseRequest" value="<?= __("Close") ?>" />
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
<a href="<?= get_pkgreq_route() . '/' . intval($row['ID']) ?>/close/"><?= __('Close') ?></a>
|
||||
</td>
|
||||
<?php else: ?>
|
||||
<td><?= __("Closed") ?></td>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue