Spaces:
Sleeping
Sleeping
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Edit Cables</title> | |
<link rel="stylesheet" href="/static/styles.css"> | |
</head> | |
<body> | |
<header> | |
<h1>Edit Cables</h1> | |
</header> | |
<main class="edit-cables-main"> | |
<section class="add-cable-section"> | |
<h2>Add Cable</h2> | |
<form action="/add_cable" method="post" class="cable-form"> | |
<div class="form-row"> | |
<label for="type">Cable Type:</label> | |
<input type="text" id="type" name="type" required> | |
</div> | |
<div class="form-row"> | |
<label for="resistance">Resistance (mΩ/m):</label> | |
<input type="number" step="0.01" id="resistance" name="resistance" required> | |
</div> | |
<div class="form-group"> | |
<button type="submit" class="btn btn-add">Add Cable</button> | |
</div> | |
</form> | |
</section> | |
<hr class="section-divider"> | |
<section class="existing-cables-section"> | |
<h2>Existing Cables</h2> | |
<div class="cable-list"> | |
{% for cable in cables %} | |
<form action="/edit_cable/{{ cable.id }}" method="post" class="cable-form"> | |
<div class="form-row"> | |
<label for="type">Cable Type:</label> | |
<input type="text" id="type" name="type" value="{{ cable.type }}" required> | |
</div> | |
<div class="form-row"> | |
<label for="resistance">Resistance (mΩ/m):</label> | |
<input type="number" step="0.00001" id="resistance" name="resistance" value="{{ cable.resistance }}" required> | |
</div> | |
<div class="btn-group"> | |
<button type="submit" class="btn btn-save">Save</button> | |
<button formaction="/delete_cable/{{ cable.id }}" formmethod="post" class="btn btn-delete">Delete</button> | |
</div> | |
</form> | |
<hr class="cable-divider"> | |
{% endfor %} | |
</div> | |
</section> | |
<a href="/" class="btn btn-back">Back to Calculator</a> | |
</main> | |
</body> | |
</html> | |