Confirm before deleting a post
This commit is contained in:
parent
e8a1f51fb6
commit
0bc9cd83b4
@ -1,4 +1,10 @@
|
|||||||
{{ define "body" }}
|
{{ define "body" }}
|
||||||
|
<script>
|
||||||
|
function confirmDelete(event) {
|
||||||
|
if (!confirm("Are you sure you want to delete this post?"))
|
||||||
|
event.preventDefault();
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<a href="{{ BlogURL "admin" }}">Back to Admin</a>
|
<a href="{{ BlogURL "admin" }}">Back to Admin</a>
|
||||||
@ -34,7 +40,11 @@
|
|||||||
action="{{ PostURL .ID }}?method=delete"
|
action="{{ PostURL .ID }}?method=delete"
|
||||||
method="POST"
|
method="POST"
|
||||||
>
|
>
|
||||||
<input type="submit" value="Delete" />
|
<input
|
||||||
|
type="submit"
|
||||||
|
value="Delete"
|
||||||
|
onclick="confirmDelete(event)"
|
||||||
|
/>
|
||||||
</form>
|
</form>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
Loading…
Reference in New Issue
Block a user