mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
feat(FastAPI): add /pkgbase/{name}/disown (get, post)
Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
0a02df363a
commit
16d516c221
4 changed files with 186 additions and 7 deletions
55
templates/packages/disown.html
Normal file
55
templates/packages/disown.html
Normal file
|
@ -0,0 +1,55 @@
|
|||
{% extends "partials/layout.html" %}
|
||||
|
||||
{% block pageContent %}
|
||||
|
||||
{% if errors %}
|
||||
<ul class="errorlist">
|
||||
{% for error in errors %}
|
||||
<li>{{ error | tr }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
<div class="box">
|
||||
<h2>{{ "Disown Package" | tr }}: {{ pkgbase.Name }}</h2>
|
||||
|
||||
<p>
|
||||
{{
|
||||
"Use this form to disown the package base %s%s%s which "
|
||||
"includes the following packages: "
|
||||
| tr | format("<strong>", pkgbase.Name, "</strong>") | safe
|
||||
}}
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
{% for package in pkgbase.packages.all() %}
|
||||
<li>{{ package.Name }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
{{
|
||||
"By selecting the checkbox, you confirm that you want to "
|
||||
"disown the package." | tr
|
||||
}}
|
||||
</p>
|
||||
|
||||
<form action="/pkgbase/{{ pkgbase.Name }}/disown" method="post">
|
||||
<fieldset>
|
||||
<p>
|
||||
<label class="confirmation">
|
||||
<input type="checkbox" name="confirm" value="1" />
|
||||
{{ "Confirm to disown the package" | tr }}
|
||||
</label>
|
||||
</p>
|
||||
<p>
|
||||
<input class="button"
|
||||
type="submit"
|
||||
value="{{ 'Disown' | tr }}"
|
||||
/>
|
||||
</p>
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
|
@ -121,13 +121,9 @@
|
|||
{% endif %}
|
||||
{% if request.user.has_credential("CRED_PKGBASE_DISOWN", approved=[pkgbase.Maintainer]) %}
|
||||
<li>
|
||||
<form action="/pkgbase/{{ result.Name }}/disown/" method="post">
|
||||
<input type="submit"
|
||||
class="button text-button"
|
||||
name="do_Disown"
|
||||
value="{{ 'Disown Package' | tr }}"
|
||||
/>
|
||||
</form>
|
||||
<a href="/pkgbase/{{ result.Name }}/disown/">
|
||||
{{ "Disown Package" | tr }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue