Files
iface_ecosio/templates/edit_csv.html
T
2026-02-25 10:24:12 +01:00

45 lines
1.1 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<title>Maintain {{ csv }}</title>
<style>
table, th, td {
border: 1px solid black;
border-collapse: collapse;
padding: 5px;
}
input {
width: 100%;
}
</style>
</head>
<body>
<h2>Maintain {{ csv }}</h2>
<form method="POST">
<table>
<tr>
{% for col in header %}
<th>{{ col }}</th>
{% endfor %}
</tr>
{% for row_index in range(rows|length + 1) %}
<tr>
{% for col_index in range(header|length) %}
<td>
<input type="text"
name="row-{{ row_index }}-col-{{ col_index }}"
value="{{ rows[row_index][col_index] if row_index < rows|length else '' }}">
</td>
{% endfor %}
</tr>
{% endfor %}
</table>
<br>
<button type="submit">Save Changes</button>
</form>
</body>
</html>