60 lines
2.5 KiB
HTML
60 lines
2.5 KiB
HTML
<!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> |