81 lines
4.0 KiB
HTML
81 lines
4.0 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="zh-TW">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>編輯任務</title>
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet">
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.7.2/font/bootstrap-icons.css" rel="stylesheet">
|
|
<style>
|
|
body {
|
|
background-color: #f8f9fa;
|
|
}
|
|
.navbar {
|
|
background-color: #007bff;
|
|
}
|
|
.card {
|
|
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<nav class="navbar navbar-expand-lg navbar-dark mb-4">
|
|
<div class="container">
|
|
<a class="navbar-brand" href="{{ url_for('index') }}">
|
|
<i class="bi bi-list-check"></i> 任務管理器
|
|
</a>
|
|
</div>
|
|
</nav>
|
|
|
|
<div class="container mt-4">
|
|
<div class="row">
|
|
<div class="col-md-6 offset-md-3">
|
|
<div class="card">
|
|
<div class="card-header">
|
|
<h4 class="mb-0"><i class="bi bi-pencil"></i> 編輯任務</h4>
|
|
</div>
|
|
<div class="card-body">
|
|
<form action="{{ url_for('edit_task', task_id=task.id) }}" method="post">
|
|
<div class="mb-3">
|
|
<label for="title" class="form-label">任務標題:</label>
|
|
<input type="text" class="form-control" id="title" name="title" value="{{ task.title }}" required>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="description" class="form-label">描述:</label>
|
|
<textarea class="form-control" id="description" name="description" rows="3">{{ task.description }}</textarea>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="status" class="form-label">狀態:</label>
|
|
<select class="form-select" id="status" name="status">
|
|
<option value="待辦" {% if task.status == '待辦' %}selected{% endif %}>待辦</option>
|
|
<option value="進行中" {% if task.status == '進行中' %}selected{% endif %}>進行中</option>
|
|
<option value="已完成" {% if task.status == '已完成' %}selected{% endif %}>已完成</option>
|
|
</select>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="priority" class="form-label">優先級:</label>
|
|
<select class="form-select" id="priority" name="priority">
|
|
<option value="低" {% if task.priority == '低' %}selected{% endif %}>低</option>
|
|
<option value="中" {% if task.priority == '中' %}selected{% endif %}>中</option>
|
|
<option value="高" {% if task.priority == '高' %}selected{% endif %}>高</option>
|
|
</select>
|
|
</div>
|
|
<div class="text-end">
|
|
<a href="{{ url_for('index') }}" class="btn btn-secondary">
|
|
<i class="bi bi-x-circle"></i> 取消
|
|
</a>
|
|
<button type="submit" class="btn btn-primary">
|
|
<i class="bi bi-check-circle"></i> 更新任務
|
|
</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
|
|
</body>
|
|
</html>
|