mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Add request type hints
Add a text that explains when the currently selected request type should be used. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
This commit is contained in:
parent
d273ee5eb2
commit
e17e88a2e2
1 changed files with 18 additions and 1 deletions
|
@ -16,7 +16,7 @@
|
||||||
<input type="hidden" name="token" value="<?= htmlspecialchars($_COOKIE['AURSID']) ?>" />
|
<input type="hidden" name="token" value="<?= htmlspecialchars($_COOKIE['AURSID']) ?>" />
|
||||||
<p>
|
<p>
|
||||||
<label for="id_type"><?= __("Request type") ?>:</label>
|
<label for="id_type"><?= __("Request type") ?>:</label>
|
||||||
<select name="type" id="id_type" onchange="showHideMergeSection()">
|
<select name="type" id="id_type" onchange="showHideMergeSection(); showHideRequestHints()">
|
||||||
<option value="deletion"><?= __('Deletion') ?></option>
|
<option value="deletion"><?= __('Deletion') ?></option>
|
||||||
<option value="merge"><?= __('Merge') ?></option>
|
<option value="merge"><?= __('Merge') ?></option>
|
||||||
<?php if (pkgbase_maintainer_uid($base_id)): ?>
|
<?php if (pkgbase_maintainer_uid($base_id)): ?>
|
||||||
|
@ -35,8 +35,16 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function showHideRequestHints() {
|
||||||
|
$('#deletion_hint').hide();
|
||||||
|
$('#merge_hint').hide();
|
||||||
|
$('#orphan_hint').hide();
|
||||||
|
$('#' + $('#id_type').val() + '_hint').show();
|
||||||
|
}
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
showHideMergeSection();
|
showHideMergeSection();
|
||||||
|
showHideRequestHints();
|
||||||
|
|
||||||
$('#id_merge_into').typeahead({
|
$('#id_merge_into').typeahead({
|
||||||
source: function(query, callback) {
|
source: function(query, callback) {
|
||||||
|
@ -59,6 +67,15 @@
|
||||||
<label for="id_comments"><?= __("Comments") ?>:</label>
|
<label for="id_comments"><?= __("Comments") ?>:</label>
|
||||||
<textarea name="comments" id="id_comments" rows="5" cols="50"></textarea>
|
<textarea name="comments" id="id_comments" rows="5" cols="50"></textarea>
|
||||||
</p>
|
</p>
|
||||||
|
<p id="deletion_hint">
|
||||||
|
<?= 'By submitting a deletion request, you ask a Trusted User to delete the package base. This type of request should be used for duplicates, software abandoned by upstream, as well as illegal and irreparably broken packages.' ?>
|
||||||
|
</p>
|
||||||
|
<p id="merge_hint">
|
||||||
|
<?= 'By submitting a merge request, you ask a Trusted User to delete the package base and transfer its votes and comments to another package base. Merging a package does not affect the corresponding Git repositories. Make sure you update the Git history of the target package yourself.' ?>
|
||||||
|
</p>
|
||||||
|
<p id="orphan_hint">
|
||||||
|
<?= 'By submitting an orphan request, you ask a Trusted User to disown the package base. Please only do this if the package needs maintainer action, the maintainer is MIA and you already tried to contact the maintainer previously.' ?>
|
||||||
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<input type="submit" class="button" name="do_FileRequest" value="<?= __("Submit Request") ?>" />
|
<input type="submit" class="button" name="do_FileRequest" value="<?= __("Submit Request") ?>" />
|
||||||
</p>
|
</p>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue