Add the task editor as a separate page/route, task sorting?
This commit is contained in:
parent
15b5bd63e1
commit
ec2eb211cd
4 changed files with 217 additions and 59 deletions
39
templates/edit_task.html
Normal file
39
templates/edit_task.html
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Edit Task</title>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container mt-5">
|
||||
<h1>Edit Task</h1>
|
||||
<form method="POST">
|
||||
<div class="mb-3">
|
||||
<label for="name" class="form-label">Task Name</label>
|
||||
<input type="text" id="name" name="name" class="form-control" value="{{ task.name }}" required>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="priority" class="form-label">Priority</label>
|
||||
<select id="priority" name="priority" class="form-select" required>
|
||||
<option value="A" {% if task.priority == 'A' %}selected{% endif %}>A</option>
|
||||
<option value="B" {% if task.priority == 'B' %}selected{% endif %}>B</option>
|
||||
<option value="C" {% if task.priority == 'C' %}selected{% endif %}>C</option>
|
||||
<option value="D" {% if task.priority == 'D' %}selected{% endif %}>D</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="duration" class="form-label">Duration</label>
|
||||
<input type="text" id="duration" name="duration" class="form-control" value="{{ task.duration }}M" required>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="due_date" class="form-label">Due Date</label>
|
||||
<input type="date" id="due_date" name="due_date" class="form-control" value="{{ task.due_date }}">
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Save Changes</button>
|
||||
<a href="/" class="btn btn-secondary">Cancel</a>
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue