mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
feat(FastAPI): add /pkgbase/{name}/request (post)
This change implements the FastAPI version of the /pkgbase/{name}/request form's action. Changes from PHP: - Additional errors are now displayed for the **merge_into** field, which are only displayed when the Merge type is selected. - If the **merge_into** field is empty, a new error is displayed: 'The "Merge into" field must not be empty.' - If the **merge_into** field is given the name of a package base which does not exist, a new error is displayed: "The package base you want to merge into does not exist." - If the **merge_into** field is given the name of the package base that a request is being created for, a new error is displayed: "You cannot merge a package base into itself." - When an error is encountered, users are now brought back to the request form which they submitted and an error is displayed at the top of the page. - If an invalid type is provided, users are returned to a BAD_REQUEST status rendering of the request form. Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
ad8369395e
commit
1c031638c6
4 changed files with 247 additions and 1 deletions
|
@ -1,8 +1,17 @@
|
|||
{% 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>{{ "Submit Request" | tr }}: {{ pkgbase.Name }}</h2>
|
||||
|
||||
<p>
|
||||
{{ "Use this form to file a request against package base "
|
||||
"%s%s%s which includes the following packages:"
|
||||
|
@ -15,7 +24,8 @@
|
|||
</ul>
|
||||
|
||||
{# Request form #}
|
||||
<form id="request-form" action="/pkgbase/{{ pkgbase.Name }}/request">
|
||||
<form id="request-form" action="/pkgbase/{{ pkgbase.Name }}/request"
|
||||
method="post">
|
||||
<fieldset>
|
||||
<p>
|
||||
<label for="id_type">{{ "Request type" | tr }}:</label>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue