morozovka-portal/app/templates/project_form.html
2026-10-20 03:27:14 +03:00

58 lines
3.6 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<title>{{ 'Редактирование' if is_edit else 'Новый проект' }} — Morozovka Portal</title>
<style>
body { background: #0d1117; color: #e6edf3; font-family: sans-serif; padding: 40px; }
.container { max-width: 600px; margin: 0 auto; }
h2 { color: #58a6ff; }
.form-group { margin-bottom: 15px; display: flex; flex-direction: column; }
label { margin-bottom: 5px; color: #8b949e; font-size: 0.9rem; }
input, select, textarea { padding: 10px; background: #0d1117; color: white; border: 1px solid #30363d; border-radius: 5px; font-family: inherit; }
textarea { resize: vertical; min-height: 100px; }
button { padding: 10px 20px; background: #238636; color: white; border: none; border-radius: 5px; cursor: pointer; font-weight: bold; margin-top: 10px; }
button:hover { background: #2ea043; }
.back-link { display: block; margin-bottom: 20px; color: #8b949e; text-decoration: none; }
</style>
</head>
<body>
<div class="container">
<a href="{{ '/projects/' + project.id|string if is_edit else '/projects' }}" class="back-link">← Назад</a>
<h2>{{ 'Редактирование проекта' if is_edit else 'Создание нового проекта' }}</h2>
<form method="POST">
<div class="form-group">
<label>Название проекта *</label>
<input type="text" name="title" value="{{ project.title if is_edit else '' }}" required>
</div>
<div class="form-group">
<label>Описание</label>
<textarea name="description">{{ project.description if is_edit else '' }}</textarea>
</div>
<div class="form-group">
<label>Статус</label>
<select name="status">
<option value="idea" {% if is_edit and project.status == 'idea' %}selected{% endif %}>Идея</option>
<option value="in_progress" {% if is_edit and project.status == 'in_progress' %}selected{% endif %}>В работе</option>
<option value="completed" {% if is_edit and project.status == 'completed' %}selected{% endif %}>Завершён</option>
<option value="frozen" {% if is_edit and project.status == 'frozen' %}selected{% endif %}>Заморожен</option>
</select>
</div>
<div class="form-group">
<label>Видимость</label>
<select name="visibility">
<option value="public" {% if is_edit and project.visibility == 'public' %}selected{% endif %}>Публичный (видят все)</option>
<option value="internal" {% if is_edit and project.visibility == 'internal' %}selected{% endif %}>Внутренний (только для своих)</option>
<option value="private" {% if is_edit and project.visibility == 'private' %}selected{% endif %}>Приватный (только участники)</option>
</select>
</div>
<div class="form-group">
<label>Ссылка на репозиторий Gitea</label>
<input type="url" name="gitea_url" value="{{ project.gitea_url if is_edit and project.gitea_url else '' }}" placeholder="https://git.morozovka.space/user/repo">
</div>
<button type="submit">{{ 'Сохранить изменения' if is_edit else 'Создать проект' }}</button>
</form>
</div>
</body>
</html>