Add ability to remove devices

This commit is contained in:
2025-03-24 15:35:26 +01:00
parent b799ac5aa6
commit 982943fac3
5 changed files with 69 additions and 9 deletions

9
templates/delete.gohtml Normal file
View File

@@ -0,0 +1,9 @@
{{- /*gotype: pcinv.DeleteVM*/ -}}
{{define "delete"}}
{{template "header" "Delete Device"}}
<h2>Are you sure you want to delete this device?</h2>
<form id="confirmForm" method="post" action="/delete?id={{.Qr}}"></form>
<a href="/device?id={{.Qr}}"><button><b>No</b></button></a>
<button form="confirmForm">Yes</button>
{{template "footer"}}
{{end}}

View File

@@ -30,5 +30,6 @@
{{end}}
</table>
<a href="/create?id={{.Qr}}&edit=true"><button>Edit</button></a>
<a href="/delete?id={{.Qr}}"><button>Delete</button></a>
{{template "footer"}}
{{end}}