Добавил первые файлы приложения

This commit is contained in:
2025-06-29 16:27:10 +03:00
parent 1e9cc84c8a
commit e5b217c5b7
7 changed files with 711 additions and 0 deletions

60
templates/edit.html Normal file
View File

@@ -0,0 +1,60 @@
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Редактировать операцию</title>
<link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
</head>
<body>
<div class="container form-container">
<header>
<h1><i class="fas fa-edit"></i> Редактировать операцию</h1>
<a href="{{ url_for('index') }}" class="btn back-btn">
<i class="fas fa-arrow-left"></i> Назад
</a>
</header>
<form method="POST">
<div class="form-group">
<label for="type">Тип операции:</label>
<div class="radio-group">
<label class="radio-label">
<input type="radio" name="type" value="income" {% if transaction.type == 'income' %}checked{% endif %}>
<span class="radio-custom income">Доход</span>
</label>
<label class="radio-label">
<input type="radio" name="type" value="expense" {% if transaction.type == 'expense' %}checked{% endif %}>
<span class="radio-custom expense">Расход</span>
</label>
</div>
</div>
<div class="form-group">
<label for="amount">Сумма (₽):</label>
<input type="number" step="0.01" min="0.01" name="amount" value="{{ transaction.amount }}" required>
</div>
<div class="form-group">
<label for="category">Категория:</label>
<input type="text" name="category" value="{{ transaction.category }}" required>
</div>
<div class="form-group">
<label for="date">Дата:</label>
<input type="date" name="date" value="{{ transaction.date }}" required>
</div>
<div class="form-group">
<label for="description">Описание:</label>
<textarea name="description" rows="3">{{ transaction.description }}</textarea>
</div>
<button type="submit" class="btn save-btn">
<i class="fas fa-save"></i> Сохранить изменения
</button>
</form>
</div>
</body>
</html>