opcje wydatkow w zbiorce
This commit is contained in:
@@ -90,6 +90,11 @@
|
||||
href="{{ url_for('dodaj_wplate', zbiorka_id=z.id) }}">Dodaj
|
||||
wpłatę</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="dropdown-item"
|
||||
href="{{ url_for('dodaj_wydatek', zbiorka_id=z.id) }}">Dodaj
|
||||
wydatek</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="dropdown-item"
|
||||
href="{{ url_for('edytuj_stan', zbiorka_id=z.id) }}">Edytuj stan</a>
|
||||
@@ -198,6 +203,11 @@
|
||||
href="{{ url_for('dodaj_wplate', zbiorka_id=z.id) }}">Dodaj
|
||||
wpłatę</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="dropdown-item"
|
||||
href="{{ url_for('dodaj_wydatek', zbiorka_id=z.id) }}">Dodaj
|
||||
wydatek</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="dropdown-item"
|
||||
href="{{ url_for('edytuj_stan', zbiorka_id=z.id) }}">Edytuj stan</a>
|
||||
|
63
templates/admin/dodaj_wydatek.html
Normal file
63
templates/admin/dodaj_wydatek.html
Normal file
@@ -0,0 +1,63 @@
|
||||
{% extends 'base.html' %}
|
||||
{% block title %}Dodaj wydatek{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container my-4">
|
||||
|
||||
<div class="d-flex align-items-center gap-2 mb-3">
|
||||
<a href="{{ url_for('zbiorka', zbiorka_id=zbiorka.id) }}" class="btn btn-sm btn-outline-light border">← Powrót
|
||||
do zbiórki</a>
|
||||
</div>
|
||||
|
||||
<div class="card shadow-sm">
|
||||
<div
|
||||
class="card-header bg-secondary text-white d-flex flex-wrap align-items-center justify-content-between gap-2">
|
||||
<h3 class="card-title mb-0">Dodaj wydatek: <span class="fw-semibold">{{ zbiorka.nazwa }}</span></h3>
|
||||
<div class="d-flex align-items-center gap-2">
|
||||
{% if zbiorka.cel %}
|
||||
<span class="badge bg-dark border" style="border-color: var(--border);">Cel: {{ zbiorka.cel|round(2) }}
|
||||
PLN</span>
|
||||
{% endif %}
|
||||
<span class="badge bg-dark border" style="border-color: var(--border);">Stan: {{ zbiorka.stan|round(2)
|
||||
}} PLN</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<form method="post" novalidate>
|
||||
<div class="mb-3">
|
||||
<label for="kwota" class="form-label">Kwota wydatku</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-text">PLN</span>
|
||||
<input type="number" step="0.01" min="0.01" inputmode="decimal" class="form-control" id="kwota"
|
||||
name="kwota" placeholder="0,00" required aria-describedby="kwotaHelp">
|
||||
</div>
|
||||
<div id="kwotaHelp" class="form-text">Podaj kwotę w złotówkach (min. 0,01).</div>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="opis" class="form-label">Opis (opcjonalnie)</label>
|
||||
<textarea class="form-control" id="opis" name="opis" rows="3" maxlength="300"
|
||||
aria-describedby="opisHelp"></textarea>
|
||||
<div class="d-flex justify-content-between">
|
||||
<small id="opisHelp" class="form-text text-muted">Krótka notatka do wydatku (widoczna w
|
||||
systemie).</small>
|
||||
<small class="text-muted"><span id="opisCount">0</span>/300</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="d-flex flex-wrap gap-2">
|
||||
<button type="submit" class="btn btn-danger">Dodaj wydatek</button>
|
||||
<a href="{{ url_for('zbiorka', zbiorka_id=zbiorka.id) }}"
|
||||
class="btn btn-outline-light border">Anuluj</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_scripts %}
|
||||
{{ super() }}
|
||||
<script src="{{ url_for('static', filename='js/dodaj_wydatek.js') }}"></script>
|
||||
{% endblock %}
|
Reference in New Issue
Block a user