mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
feat: cancel button for comment editing
Adds button that allows cancellation while editing a comment Signed-off-by: moson-mo <mo-son@mailbox.org>
This commit is contained in:
parent
52c962a590
commit
7d1827ffc5
4 changed files with 35 additions and 0 deletions
|
@ -293,8 +293,14 @@ async def pkgbase_comment_post(
|
|||
comment: str = Form(default=str()),
|
||||
enable_notifications: bool = Form(default=False),
|
||||
next: str = Form(default=None),
|
||||
cancel: bool = Form(default=False),
|
||||
):
|
||||
"""Edit an existing comment."""
|
||||
if cancel:
|
||||
return RedirectResponse(
|
||||
f"/pkgbase/{name}#comment-{id}", status_code=HTTPStatus.SEE_OTHER
|
||||
)
|
||||
|
||||
pkgbase = get_pkg_or_base(name, PackageBase)
|
||||
db_comment = get_pkgbase_comment(pkgbase, id)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue