Add delete confirmation page before removing repository
The Delete Repository button now navigates to a confirmation page asking 'Are you sure?' with Yes/No options. Only the Yes button performs the actual delete POST. No JavaScript required. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org">
|
||||
<head>
|
||||
<title th:text="'Confirm Delete - ' + ${name}">Confirm Delete</title>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Are you sure?</h2>
|
||||
<p>This will permanently delete the repository <b th:text="${name}"></b> and its working tree.</p>
|
||||
<table border="0" cellpadding="4" cellspacing="0">
|
||||
<tr>
|
||||
<td>
|
||||
<form method="post" th:action="@{/repo/{name}/delete(name=${name})}" target="_top">
|
||||
<input type="submit" value="Yes">
|
||||
</form>
|
||||
</td>
|
||||
<td>
|
||||
<a th:href="@{/repo/{name}/manage(name=${name})}">No</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user