Cars cz. 2

This commit is contained in:
aplikacje committed 2026-10-29 10:50:30 +01:00
1 parent d60f8a91a7
commit 3b96ac1be8
9 files changed
+265 -23

No files matched your search

+40
View File
@@ -0,0 +1,40 @@
<h2>delete cars</h2>
<section>
<form method="post">
<input type="submit" value="Delete Selected"><button onclick=" event.preventDefault();
const res = confirm('Confirm deletion');
if(res) {
window.location='/deleteAll';
}" style="margin-left: 1rem;">Delete
All</button><br><br>
<table>
<tr>
<th>_id</th>
<th>model</th>
<th>ubezpieczony</th>
<th>benzyna</th>
<th>uszkodzony</th>
<th>naped4x4</th>
<th></th>
<th></th>
</tr>
{{#each car}}
<tr>
<td>{{_id}}</td>
<td>{{model}}</td>
<td>{{ubezpieczony}}</td>
<td>{{benzyna}}</td>
<td>{{uszkodzony}}</td>
<td>{{naped4x4}}</td>
<td style="text-align: center;">
<button
onclick="event.preventDefault(); window.location='/deleteSpecific?id={{_id}}';">DELETE</button>
</td>
<td>
<input type="checkbox" name="deletions" id="del_{{_id}}" value="{{_id}}">
</td>
</tr>
{{/each}}
</table>
</form>
</section>