81 lines
3.8 KiB
HTML
81 lines
3.8 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="ru">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<title>Редактирование задачи — {{ project.title }}</title>
|
||
<style>
|
||
body { background: #0d1117; color: #e6edf3; font-family: sans-serif; padding: 40px 20px; }
|
||
.container { max-width: 600px; margin: 0 auto; }
|
||
h2 { color: #58a6ff; }
|
||
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 15px; }
|
||
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
|
||
label { color: #8b949e; font-size: .85rem; font-weight: 600; }
|
||
input, select, textarea { padding: 10px; background: #0d1117; color: #fff; border: 1px solid #30363d; border-radius: 5px; font-family: inherit; font-size: .95rem; }
|
||
input:focus, select:focus, textarea:focus { outline: none; border-color: #58a6ff; }
|
||
textarea { resize: vertical; min-height: 100px; }
|
||
.actions { display: flex; gap: 10px; margin-top: 20px; }
|
||
.btn { padding: 10px 20px; border-radius: 5px; border: none; cursor: pointer; font-weight: 600; font-size: .9rem; text-decoration: none; display: inline-block; }
|
||
.btn-primary { background: #238636; color: #fff; }
|
||
.btn-primary:hover { background: #2ea043; }
|
||
.btn-secondary { background: #21262d; color: #e6edf3; border: 1px solid #30363d; }
|
||
.btn-secondary:hover { background: #30363d; }
|
||
.back-link { display: inline-block; margin-bottom: 20px; color: #8b949e; text-decoration: none; }
|
||
.back-link:hover { color: #58a6ff; }
|
||
</style>
|
||
</head>
|
||
<body>
|
||
<div class="container">
|
||
<a href="/projects/{{ project.id }}/board" class="back-link">← К доске</a>
|
||
<h2>Редактирование задачи</h2>
|
||
<form method="POST">
|
||
<div class="form-group">
|
||
<label>Название *</label>
|
||
<input type="text" name="title" value="{{ task.title }}" required maxlength="200">
|
||
</div>
|
||
<div class="form-group">
|
||
<label>Описание</label>
|
||
<textarea name="description">{{ task.description or '' }}</textarea>
|
||
</div>
|
||
<div class="form-row">
|
||
<div class="form-group">
|
||
<label>Статус</label>
|
||
<select name="status">
|
||
{% for s in TASK_STATUSES %}
|
||
<option value="{{ s }}" {% if task.status == s %}selected{% endif %}>{{ TASK_STATUS_LABELS[s] }}</option>
|
||
{% endfor %}
|
||
</select>
|
||
</div>
|
||
<div class="form-group">
|
||
<label>Приоритет</label>
|
||
<select name="priority">
|
||
{% for p in TASK_PRIORITIES %}
|
||
<option value="{{ p }}" {% if task.priority == p %}selected{% endif %}>{{ p|capitalize }}</option>
|
||
{% endfor %}
|
||
</select>
|
||
</div>
|
||
</div>
|
||
<div class="form-row">
|
||
<div class="form-group">
|
||
<label>Дедлайн</label>
|
||
<input type="date" name="due_date" value="{{ task.due_date or '' }}">
|
||
</div>
|
||
<div class="form-group">
|
||
<label>Исполнитель</label>
|
||
<select name="assignee_id">
|
||
<option value="">— не назначено —</option>
|
||
{% for member_obj, user in members %}
|
||
<option value="{{ user.id }}" {% if task.assignee_id == user.id %}selected{% endif %}>{{ user.full_name or user.username }}</option>
|
||
{% endfor %}
|
||
</select>
|
||
</div>
|
||
</div>
|
||
<div class="actions">
|
||
<button type="submit" class="btn btn-primary">Сохранить</button>
|
||
<a href="/projects/{{ project.id }}/board" class="btn btn-secondary">Отмена</a>
|
||
</div>
|
||
</form>
|
||
</div>
|
||
</body>
|
||
</html>
|