diff options
author | Lukas Fleischer <archlinux@cryptocrack.de> | 2014-06-25 11:29:17 +0200 |
---|---|---|
committer | Lukas Fleischer <archlinux@cryptocrack.de> | 2014-06-25 11:38:02 +0200 |
commit | 91e6b5cb2f3d531ce40cd0331e2261d30766de47 (patch) | |
tree | 1b901e6000b44569123a51fd2dd2aa371d92f443 /web/html/pkgreq.php | |
parent | 959c61a77dd6a41bf82cc12b5eb873c9cfb0ffb8 (diff) | |
download | aur-91e6b5cb2f3d531ce40cd0331e2261d30766de47.tar.gz aur-91e6b5cb2f3d531ce40cd0331e2261d30766de47.tar.xz |
Add support for merge requests
This adds a new "Merge" category to the list of available request types
and also adds a new "Merge into" field that is hidden via JavaScript
when "Deletion" or "Orphan" is selected.
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'web/html/pkgreq.php')
-rw-r--r-- | web/html/pkgreq.php | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/web/html/pkgreq.php b/web/html/pkgreq.php index 05eeb51b..2b46b02b 100644 --- a/web/html/pkgreq.php +++ b/web/html/pkgreq.php @@ -90,11 +90,30 @@ if (!isset($base_id)) { <input type="hidden" name="token" value="<?= htmlspecialchars($_COOKIE['AURSID']) ?>" /> <p> <label for="id_type"><?= __("Request type") ?>:</label> - <select name="type" id="id_type"> + <select name="type" id="id_type" onchange="showHideMergeSection()"> <option value="deletion"><?= __('Deletion') ?></option> + <option value="merge"><?= __('Merge') ?></option> <option value="orphan"><?= __('Orphan') ?></option> </select> </p> + <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> + <script type="text/javascript"> + function showHideMergeSection() { + if ($('#id_type').val() == 'merge') { + $('#merge_section').show(); + } else { + $('#merge_section').hide(); + } + } + + $(document).ready(function() { + showHideMergeSection(); + }); + </script> + <p id="merge_section"> + <label for="id_merge_into"><?= __("Merge into") ?>:</label> + <input type="text" name="merge_into" id="id_merge_into" /> + </p> <p> <label for="id_comments"><?= __("Comments") ?>:</label> <textarea name="comments" id="id_comments" rows="5" cols="50"></textarea> |