57 lines
2.4 KiB
HTML
57 lines
2.4 KiB
HTML
{% extends "base.html" %}
|
||
{% block title %}Редактирование задачи — {{ project.title }}{% endblock %}
|
||
{% block main_class %}container container-narrow{% endblock %}
|
||
|
||
{% block content %}
|
||
<a href="/projects/{{ project.id }}/board" style="display:inline-block;margin-bottom:20px;color:#8b949e;text-decoration:none;">← К доске</a>
|
||
<h2 class="page-title">Редактирование задачи</h2>
|
||
|
||
<form method="POST" class="form-card">
|
||
<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="form-actions">
|
||
<button type="submit" class="btn btn-primary">Сохранить</button>
|
||
<a href="/projects/{{ project.id }}/board" class="btn btn-default">Отмена</a>
|
||
</div>
|
||
</form>
|
||
{% endblock %}
|