Cancel Branch Protection form doesn't cancel #25038
Labels
issue/confirmed
Issue has been reviewed and confirmed to be present or accepted to be implemented
type/bug
Milestone
Description
Simplest way to reproduce is to add a new protection rule, enter a branch name pattern & scroll down to click 'Cancel'.
The result is a new rule with that name, I expected that no rule would be added.
The same goes for editing existing rules and clicking 'Cancel', it always tries to persist the changes instead of actually cancelling.
I've reproduced this on the Gitea demo site:
https://try.gitea.io/tester-bob/branch_prot_test/settings/branches
But the same issue is also present on version 1.19.2.
Gitea Version
1.20.0+dev-973-g5d23c885e
Can you reproduce the bug on the Gitea demo site?
Yes
Log Gist
No response
Screenshots
Before:

Add new rule:


&Cancel:
After:

Git Version
2.40.1
Operating System
FreeBSD 13.2
How are you running Gitea?
Gitea is running within a FreeBSD jail and installed through the FreeBSD package manager.
Database
PostgreSQL
The text was updated successfully, but these errors were encountered: