40 lines
1.4 KiB
Handlebars
40 lines
1.4 KiB
Handlebars
<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> |