Fix download modal: use per-backup modals for CSP/Turbo compatibility

- Replace shared modal + inline JS with per-backup modals that have
  filename pre-set in hidden fields (no JavaScript needed)
- Add data-turbo="false" to download forms for native browser handling
- Add data-bs-dismiss="modal" to submit button to auto-close modal
- Add hidden username field for Chrome accessibility best practice
- Fix test: GET on POST-only route returns 404 not 405
This commit is contained in:
Sebastian Almberg 2026-03-06 08:41:43 +01:00
parent dd8698840d
commit 877e3005bc
2 changed files with 46 additions and 53 deletions

View file

@ -251,10 +251,10 @@ final class UpdateManagerControllerTest extends WebTestCase
$client = static::createClient();
$this->loginAsAdmin($client);
// GET should return 405 Method Not Allowed
// GET returns 404 since no GET route exists for this path
$client->request('GET', '/en/system/update-manager/backup/download');
$this->assertResponseStatusCodeSame(405);
$this->assertResponseStatusCodeSame(404);
}
public function testDownloadBackupRequiresAuth(): void