wylaczenie sposob platnosci i porpawki ux
This commit is contained in:
@@ -17,14 +17,16 @@
|
||||
<!-- Nawigacja / powrót -->
|
||||
<div class="d-flex align-items-center gap-2 mb-3">
|
||||
{% if is_edit and zbiorka and zbiorka.id %}
|
||||
<a href="{{ url_for('zbiorka', zbiorka_id=zbiorka.id) }}" class="btn btn-sm btn-outline-light">← Szczegóły zbiórki</a>
|
||||
<a href="{{ url_for('zbiorka', zbiorka_id=zbiorka.id) }}" class="btn btn-sm btn-outline-light">← Szczegóły
|
||||
zbiórki</a>
|
||||
{% else %}
|
||||
<a href="{{ url_for('admin_dashboard') }}" class="btn btn-sm btn-outline-light">← Panel Admina</a>
|
||||
{% endif %}
|
||||
</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">
|
||||
<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">
|
||||
{{ 'Edytuj zbiórkę' if is_edit else 'Dodaj nową zbiórkę' }}
|
||||
</h3>
|
||||
@@ -48,19 +50,18 @@
|
||||
<span class="badge bg-dark border" style="border-color: var(--border);">
|
||||
Brakuje: {{ delta|round(2) }} PLN
|
||||
</span>
|
||||
{% elif delta < 0 %}
|
||||
<span class="badge bg-dark border" style="border-color: var(--border);">
|
||||
{% elif delta < 0 %} <span class="badge bg-dark border" style="border-color: var(--border);">
|
||||
Nadwyżka: {{ (-delta)|round(2) }} PLN
|
||||
</span>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</span>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if zbiorka.ukryj_kwote %}
|
||||
<span class="badge bg-secondary">Kwoty niepubliczne</span>
|
||||
{% else %}
|
||||
<span class="badge bg-success">Kwoty widoczne</span>
|
||||
{% endif %}
|
||||
{% if zbiorka.ukryj_kwote %}
|
||||
<span class="badge bg-secondary">Kwoty niepubliczne</span>
|
||||
{% else %}
|
||||
<span class="badge bg-success">Kwoty widoczne</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% else %}
|
||||
<small class="opacity-75">Uzupełnij podstawowe dane i dane płatności</small>
|
||||
@@ -77,30 +78,17 @@
|
||||
<div class="row g-3">
|
||||
<div class="col-12">
|
||||
<label for="nazwa" class="form-label">Nazwa zbiórki</label>
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
id="nazwa"
|
||||
name="nazwa"
|
||||
maxlength="120"
|
||||
<input type="text" class="form-control" id="nazwa" name="nazwa" maxlength="120"
|
||||
placeholder="{{ 'Krótki, zrozumiały tytuł' if is_edit else 'Np. Wsparcie dla schroniska Azor' }}"
|
||||
value="{{ (zbiorka.nazwa if zbiorka else request.form.get('nazwa','')) }}"
|
||||
required
|
||||
aria-describedby="nazwaHelp"
|
||||
>
|
||||
value="{{ (zbiorka.nazwa if zbiorka else request.form.get('nazwa','')) }}" required
|
||||
aria-describedby="nazwaHelp">
|
||||
<div id="nazwaHelp" class="form-text">Krótki, zrozumiały tytuł. Max 120 znaków.</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12">
|
||||
<label for="opis" class="form-label">Opis (Markdown)</label>
|
||||
<textarea
|
||||
class="form-control"
|
||||
id="opis"
|
||||
name="opis"
|
||||
rows="8"
|
||||
required
|
||||
aria-describedby="opisHelp"
|
||||
>{{ (zbiorka.opis if zbiorka else request.form.get('opis','')) }}</textarea>
|
||||
<textarea class="form-control" id="opis" name="opis" rows="8" required
|
||||
aria-describedby="opisHelp">{{ (zbiorka.opis if zbiorka else request.form.get('opis','')) }}</textarea>
|
||||
<div class="d-flex justify-content-between">
|
||||
<small id="opisHelp" class="form-text text-muted">
|
||||
Możesz używać Markdown (nagłówki, listy, linki). W edytorze włącz podgląd 👁️.
|
||||
@@ -139,32 +127,44 @@
|
||||
{% set i = loop.index0 %}
|
||||
<tr>
|
||||
<td>
|
||||
<input type="text" class="form-control" name="item_nazwa[]" value="{{ it.nazwa }}" placeholder="np. Karma Brit 10kg" required>
|
||||
<input type="text" class="form-control" name="item_nazwa[]"
|
||||
value="{{ it.nazwa }}" placeholder="np. Karma Brit 10kg" required>
|
||||
</td>
|
||||
<td>
|
||||
<input type="url" class="form-control" name="item_link[]" value="{{ it.link or '' }}" placeholder="https://...">
|
||||
<input type="url" class="form-control" name="item_link[]"
|
||||
value="{{ it.link or '' }}" placeholder="https://...">
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" inputmode="decimal" class="form-control text-end" name="item_cena[]" value="{{ (it.cena|round(2)) if it.cena is not none else '' }}" placeholder="0,00">
|
||||
<input type="text" inputmode="decimal" class="form-control text-end"
|
||||
name="item_cena[]"
|
||||
value="{{ (it.cena|round(2)) if it.cena is not none else '' }}"
|
||||
placeholder="0,00">
|
||||
</td>
|
||||
<td>
|
||||
<div class="form-check form-switch">
|
||||
<input class="form-check-input kupione-switch" type="checkbox" {% if it.kupione %}checked{% endif %}>
|
||||
<input type="hidden" name="item_kupione_val_{{ i }}" value="{{ 1 if it.kupione else 0 }}">
|
||||
<label class="form-check-label small">{{ 'Kupione' if it.kupione else 'Do kupienia' }}</label>
|
||||
<input class="form-check-input kupione-switch" type="checkbox" {% if
|
||||
it.kupione %}checked{% endif %}>
|
||||
<input type="hidden" name="item_kupione_val_{{ i }}"
|
||||
value="{{ 1 if it.kupione else 0 }}">
|
||||
<label class="form-check-label small">{{ 'Kupione' if it.kupione else 'Do
|
||||
kupienia' }}</label>
|
||||
</div>
|
||||
</td>
|
||||
<td class="text-end">
|
||||
<button type="button" class="btn btn-sm btn-outline-light remove-row" title="Usuń wiersz">✕</button>
|
||||
<button type="button" class="btn btn-sm btn-outline-light remove-row"
|
||||
title="Usuń wiersz">✕</button>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<!-- pusty wiersz startowy -->
|
||||
<tr>
|
||||
<td><input type="text" class="form-control" name="item_nazwa[]" placeholder="np. Karma Brit 10kg" required></td>
|
||||
<td><input type="url" class="form-control" name="item_link[]" placeholder="https://..."></td>
|
||||
<td><input type="text" inputmode="decimal" class="form-control text-end" name="item_cena[]" placeholder="0,00"></td>
|
||||
<td><input type="text" class="form-control" name="item_nazwa[]"
|
||||
placeholder="np. Karma Brit 10kg" required></td>
|
||||
<td><input type="url" class="form-control" name="item_link[]"
|
||||
placeholder="https://..."></td>
|
||||
<td><input type="text" inputmode="decimal" class="form-control text-end"
|
||||
name="item_cena[]" placeholder="0,00"></td>
|
||||
<td>
|
||||
<div class="form-check form-switch">
|
||||
<input class="form-check-input kupione-switch" type="checkbox">
|
||||
@@ -173,7 +173,8 @@
|
||||
</div>
|
||||
</td>
|
||||
<td class="text-end">
|
||||
<button type="button" class="btn btn-sm btn-outline-light remove-row" title="Usuń wiersz">✕</button>
|
||||
<button type="button" class="btn btn-sm btn-outline-light remove-row"
|
||||
title="Usuń wiersz">✕</button>
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
@@ -183,7 +184,8 @@
|
||||
|
||||
<div class="d-flex gap-2">
|
||||
<button type="button" class="btn btn-sm btn-outline-light" id="add-row">+ Dodaj pozycję</button>
|
||||
<button type="button" class="btn btn-sm btn-outline-light" id="clear-empty">Usuń puste wiersze</button>
|
||||
<button type="button" class="btn btn-sm btn-outline-light" id="clear-empty">Usuń puste
|
||||
wiersze</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -192,56 +194,68 @@
|
||||
<!-- SEKCJA: Dane płatności -->
|
||||
<div class="mb-4">
|
||||
<h6 class="text-muted mb-2">Dane płatności</h6>
|
||||
|
||||
<div class="row g-3">
|
||||
<div class="col-12">
|
||||
<label for="numer_konta" class="form-label">Numer konta (IBAN)</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-text">PL</span>
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
id="numer_konta"
|
||||
name="numer_konta"
|
||||
inputmode="numeric"
|
||||
autocomplete="off"
|
||||
placeholder="12 3456 7890 1234 5678 9012 3456"
|
||||
required
|
||||
aria-describedby="ibanHelp"
|
||||
value="{% if zbiorka and zbiorka.numer_konta %}{{ zbiorka.numer_konta }}{% elif global_settings %}{{ global_settings.numer_konta }}{% else %}{{ request.form.get('numer_konta','') }}{% endif %}"
|
||||
>
|
||||
<!-- Przełączniki kanałów -->
|
||||
<div class="col-12 col-md-6">
|
||||
<div class="form-check form-switch">
|
||||
<input class="form-check-input" type="checkbox" id="uzyj_konta" name="uzyj_konta" {% if
|
||||
zbiorka is none or zbiorka.uzyj_konta %}checked{% endif %}>
|
||||
<label class="form-check-label" for="uzyj_konta">Przelew na konto</label>
|
||||
</div>
|
||||
<div id="ibanHelp" class="form-text">Wpisz ciąg cyfr; spacje dodadzą się automatycznie dla czytelności.</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-md-6">
|
||||
<div class="form-check form-switch">
|
||||
<input class="form-check-input" type="checkbox" id="uzyj_blik" name="uzyj_blik" {% if
|
||||
zbiorka is none or zbiorka.uzyj_blik %}checked{% endif %}>
|
||||
<label class="form-check-label" for="uzyj_blik">BLIK</label>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div id="kanalyWarning" class="alert alert-warning d-none mt-2" role="alert">
|
||||
Musi być włączony co najmniej jeden kanał wpłat (konto lub BLIK).
|
||||
</div>
|
||||
|
||||
<!-- IBAN -->
|
||||
<div class="col-12" id="pole_konto">
|
||||
<label for="numer_konta" class="form-label">Numer konta (IBAN)</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-text">PL</span>
|
||||
<input type="text" class="form-control" id="numer_konta" name="numer_konta"
|
||||
inputmode="numeric" autocomplete="off"
|
||||
placeholder="12 3456 7890 1234 5678 9012 3456" {% if zbiorka and not
|
||||
zbiorka.uzyj_konta %}disabled{% endif %} {% if zbiorka is none or zbiorka.uzyj_konta
|
||||
%}required{% endif %} aria-describedby="ibanHelp"
|
||||
value="{% if zbiorka and zbiorka.numer_konta %}{{ zbiorka.numer_konta }}{% elif global_settings %}{{ global_settings.numer_konta }}{% else %}{{ request.form.get('numer_konta','') }}{% endif %}">
|
||||
</div>
|
||||
<div id="ibanHelp" class="form-text">Wpisz ciąg cyfr; spacje dodadzą się automatycznie dla
|
||||
czytelności.</div>
|
||||
</div>
|
||||
|
||||
<!-- BLIK -->
|
||||
<div class="col-12 col-md-6" id="pole_blik">
|
||||
<label for="numer_telefonu_blik" class="form-label">Numer telefonu BLIK</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-text">+48</span>
|
||||
<input
|
||||
type="tel"
|
||||
class="form-control"
|
||||
id="numer_telefonu_blik"
|
||||
name="numer_telefonu_blik"
|
||||
inputmode="tel"
|
||||
pattern="[0-9 ]{9,13}"
|
||||
placeholder="123 456 789"
|
||||
required
|
||||
<input type="tel" class="form-control" id="numer_telefonu_blik"
|
||||
name="numer_telefonu_blik" inputmode="tel" pattern="[0-9 ]{9,13}"
|
||||
placeholder="123 456 789" {% if zbiorka and not zbiorka.uzyj_blik %}disabled{% endif
|
||||
%} {% if zbiorka is none or zbiorka.uzyj_blik %}required{% endif %}
|
||||
aria-describedby="blikHelp"
|
||||
value="{% if zbiorka and zbiorka.numer_telefonu_blik %}{{ zbiorka.numer_telefonu_blik }}{% elif global_settings %}{{ global_settings.numer_telefonu_blik }}{% else %}{{ request.form.get('numer_telefonu_blik','') }}{% endif %}"
|
||||
>
|
||||
value="{% if zbiorka and zbiorka.numer_telefonu_blik %}{{ zbiorka.numer_telefonu_blik }}{% elif global_settings %}{{ global_settings.numer_telefonu_blik }}{% else %}{{ request.form.get('numer_telefonu_blik','') }}{% endif %}">
|
||||
</div>
|
||||
<div id="blikHelp" class="form-text">Dziewięć cyfr telefonu powiązanego z BLIK. Spacje opcjonalne.</div>
|
||||
<div id="blikHelp" class="form-text">Dziewięć cyfr telefonu powiązanego z BLIK. Spacje
|
||||
opcjonalne.</div>
|
||||
|
||||
</div>
|
||||
|
||||
{% if is_edit %}
|
||||
<div class="col-12 col-md-12 d-flex align-items-end">
|
||||
<button type="button" class="btn btn-sm btn-outline-light" id="ustaw-globalne"
|
||||
title="Wstaw wartości z ustawień globalnych"
|
||||
{% if global_settings %}
|
||||
title="Wstaw wartości z ustawień globalnych" {% if global_settings %}
|
||||
data-iban="{{ global_settings.numer_konta }}"
|
||||
data-blik="{{ global_settings.numer_telefonu_blik }}"
|
||||
{% endif %}
|
||||
>
|
||||
data-blik="{{ global_settings.numer_telefonu_blik }}" {% endif %}>
|
||||
Wstaw globalne ustawienia
|
||||
</button>
|
||||
</div>
|
||||
@@ -258,7 +272,8 @@
|
||||
<div id="celSyncBox" class="alert d-none py-2 px-3 mb-3" role="alert">
|
||||
<div class="d-flex flex-wrap align-items-center justify-content-between gap-2">
|
||||
<div id="celSyncMsg" class="small"></div>
|
||||
<button type="button" id="btnApplyCelFromSum" class="btn btn-sm btn-outline-light d-none"></button>
|
||||
<button type="button" id="btnApplyCelFromSum"
|
||||
class="btn btn-sm btn-outline-light d-none"></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -267,82 +282,56 @@
|
||||
<label for="cel" class="form-label">Cel zbiórki</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-text">PLN</span>
|
||||
<input
|
||||
type="text"
|
||||
inputmode="decimal"
|
||||
class="form-control"
|
||||
id="cel"
|
||||
name="cel"
|
||||
placeholder="0,00"
|
||||
required
|
||||
aria-describedby="celHelp"
|
||||
value="{% if zbiorka and zbiorka.cel is not none %}{{ zbiorka.cel }}{% else %}{{ request.form.get('cel','') }}{% endif %}"
|
||||
>
|
||||
<input type="text" inputmode="decimal" class="form-control" id="cel" name="cel"
|
||||
placeholder="0,00" required aria-describedby="celHelp"
|
||||
value="{% if zbiorka and zbiorka.cel is not none %}{{ zbiorka.cel }}{% else %}{{ request.form.get('cel','') }}{% endif %}">
|
||||
</div>
|
||||
<div id="celHelp" class="form-text">Minimalnie 0,01 PLN. Można później edytować.</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-md-12 d-flex align-items-end">
|
||||
<div class="form-check form-switch">
|
||||
<input
|
||||
class="form-check-input"
|
||||
type="checkbox"
|
||||
id="ukryj_kwote"
|
||||
name="ukryj_kwote"
|
||||
{% if zbiorka %}{% if zbiorka.ukryj_kwote %}checked{% endif %}{% endif %}
|
||||
>
|
||||
<input class="form-check-input" type="checkbox" id="ukryj_kwote" name="ukryj_kwote" {%
|
||||
if zbiorka %}{% if zbiorka.ukryj_kwote %}checked{% endif %}{% endif %}>
|
||||
<label class="form-check-label" for="ukryj_kwote">Ukryj kwoty (cel i stan)</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row g-3 mt-2">
|
||||
<div class="col-12 col-md-4">
|
||||
<div class="form-check form-switch">
|
||||
<input
|
||||
class="form-check-input"
|
||||
type="checkbox"
|
||||
id="pokaz_postep_finanse"
|
||||
name="pokaz_postep_finanse"
|
||||
data-group="postepy"
|
||||
{% if zbiorka %}{% if zbiorka.pokaz_postep_finanse %}checked{% endif %}{% else %}checked{% endif %}
|
||||
>
|
||||
<label class="form-check-label" for="pokaz_postep_finanse">Pokaż postęp: Finanse</label>
|
||||
<div class="col-12 col-md-4">
|
||||
<div class="form-check form-switch">
|
||||
<input class="form-check-input" type="checkbox" id="pokaz_postep_finanse"
|
||||
name="pokaz_postep_finanse" data-group="postepy" {% if zbiorka %}{% if
|
||||
zbiorka.pokaz_postep_finanse %}checked{% endif %}{% else %}checked{% endif %}>
|
||||
<label class="form-check-label" for="pokaz_postep_finanse">Pokaż postęp: Finanse</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-md-4">
|
||||
<div class="form-check form-switch">
|
||||
<input
|
||||
class="form-check-input"
|
||||
type="checkbox"
|
||||
id="pokaz_postep_pozycje"
|
||||
name="pokaz_postep_pozycje"
|
||||
data-group="postepy"
|
||||
{% if zbiorka %}{% if zbiorka.pokaz_postep_pozycje %}checked{% endif %}{% else %}checked{% endif %}
|
||||
>
|
||||
<label class="form-check-label" for="pokaz_postep_pozycje">Pokaż postęp: Zakupy (liczba)</label>
|
||||
<div class="col-12 col-md-4">
|
||||
<div class="form-check form-switch">
|
||||
<input class="form-check-input" type="checkbox" id="pokaz_postep_pozycje"
|
||||
name="pokaz_postep_pozycje" data-group="postepy" {% if zbiorka %}{% if
|
||||
zbiorka.pokaz_postep_pozycje %}checked{% endif %}{% else %}checked{% endif %}>
|
||||
<label class="form-check-label" for="pokaz_postep_pozycje">Pokaż postęp: Zakupy
|
||||
(liczba)</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-md-4">
|
||||
<div class="form-check form-switch">
|
||||
<input
|
||||
class="form-check-input"
|
||||
type="checkbox"
|
||||
id="pokaz_postep_kwotowo"
|
||||
name="pokaz_postep_kwotowo"
|
||||
data-group="postepy"
|
||||
{% if zbiorka %}{% if zbiorka.pokaz_postep_kwotowo %}checked{% endif %}{% else %}checked{% endif %}
|
||||
>
|
||||
<label class="form-check-label" for="pokaz_postep_kwotowo">Pokaż postęp: Zakupy (kwotowo)</label>
|
||||
<div class="col-12 col-md-4">
|
||||
<div class="form-check form-switch">
|
||||
<input class="form-check-input" type="checkbox" id="pokaz_postep_kwotowo"
|
||||
name="pokaz_postep_kwotowo" data-group="postepy" {% if zbiorka %}{% if
|
||||
zbiorka.pokaz_postep_kwotowo %}checked{% endif %}{% else %}checked{% endif %}>
|
||||
<label class="form-check-label" for="pokaz_postep_kwotowo">Pokaż postęp: Zakupy
|
||||
(kwotowo)</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div><br>
|
||||
<div id="postepyWarning" class="alert alert-warning d-none mt-2" role="alert">
|
||||
<div id="postepyWarning" class="alert alert-warning d-none mt-2" role="alert">
|
||||
Nie można wyłączyć wszystkich wskaźników postępu. Pozostaw przynajmniej jeden włączony.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- CTA -->
|
||||
<div class="d-flex flex-wrap gap-2">
|
||||
@@ -365,4 +354,5 @@
|
||||
<script src="{{ url_for('static', filename='js/produkty_formularz.js') }}?v={{ APP_VERSION }}"></script>
|
||||
<script src="{{ url_for('static', filename='js/kwoty_formularz.js') }}?v={{ APP_VERSION }}"></script>
|
||||
<script src="{{ url_for('static', filename='js/przelaczniki_zabezpieczenie.js') }}?v={{ APP_VERSION }}"></script>
|
||||
{% endblock %}
|
||||
<script src="{{ url_for('static', filename='js/sposoby_wplat.js') }}?v={{ APP_VERSION }}"></script>
|
||||
{% endblock %}
|
@@ -24,7 +24,7 @@ zbiórki{% endif %}{% endblock %}
|
||||
</div>
|
||||
|
||||
{% if zbiorki and zbiorki|length > 0 %}
|
||||
<div class="row g-4">
|
||||
<div class="row g-4 pb-5">
|
||||
{% for z in zbiorki %}
|
||||
{% set progress = (z.stan / z.cel * 100) if z.cel > 0 else 0 %}
|
||||
{% set progress_clamped = 100 if progress > 100 else (0 if progress < 0 else progress) %} <div
|
||||
@@ -85,10 +85,11 @@ zbiórki{% endif %}{% endblock %}
|
||||
<div class="mt-auto pt-2">
|
||||
|
||||
{# TO POWODUJE ZE BLOK JEST KLIKALNY #}
|
||||
<!-- <a href="{{ url_for('zbiorka', zbiorka_id=z.id) }}" class="stretched-link"></a> -->
|
||||
|
||||
<!-- <a href="{{ url_for('zbiorka', zbiorka_id=z.id) }}" class="stretched-link"></a> -->
|
||||
|
||||
<div class="d-grid">
|
||||
<a href="{{ url_for('zbiorka', zbiorka_id=z.id) }}" class="btn btn-outline-light btn-sm w-100 btn-opis">
|
||||
<a href="{{ url_for('zbiorka', zbiorka_id=z.id) }}"
|
||||
class="btn btn-outline-light btn-sm w-100 btn-opis">
|
||||
Otwórz opis
|
||||
</a>
|
||||
</div>
|
||||
|
@@ -62,8 +62,8 @@
|
||||
{% endif %}
|
||||
<span class="fw-semibold">{{ it.nazwa }}</span>
|
||||
{% if it.link %}
|
||||
<a href="{{ it.link }}" target="_blank" rel="noopener"
|
||||
class="btn btn-sm btn-outline-light ms-2">Sklep ↗</a>
|
||||
<a href="{{ it.link }}" target="_blank" rel="noopener" class="btn btn-sm btn-outline-light ms-2">Sklep
|
||||
↗</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div>
|
||||
@@ -165,6 +165,9 @@
|
||||
|
||||
</div>
|
||||
|
||||
{% set show_iban = zbiorka.uzyj_konta and zbiorka.numer_konta %}
|
||||
{% set show_blik = zbiorka.uzyj_blik and zbiorka.numer_telefonu_blik %}
|
||||
|
||||
<!-- Kolumna prawa: płatności (sticky) -->
|
||||
<div class="col-md-4">
|
||||
<div class="card shadow-sm wspomoz-card sticky-md" style="top: var(--sticky-offset, 1rem);">
|
||||
@@ -175,17 +178,15 @@
|
||||
{% if has_cel and not zbiorka.ukryj_kwote %}
|
||||
{% set brak = (zbiorka.cel - zbiorka.stan) %}
|
||||
{% if brak > 0 %}
|
||||
<span class="badge bg-warning text-dark border border-warning">
|
||||
Brakuje: {{ brak|round(2) }} PLN
|
||||
</span>
|
||||
<span class="badge bg-warning text-dark border border-warning">Brakuje: {{ brak|round(2) }} PLN</span>
|
||||
{% else %}
|
||||
<span class="badge rounded-pill" style="background: var(--accent); color:#111;">
|
||||
Zrealizowana
|
||||
</span>
|
||||
<span class="badge rounded-pill" style="background: var(--accent); color:#111;">Zrealizowana</span>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if show_iban or show_blik %}
|
||||
{% if show_iban %}
|
||||
<!-- Numer konta -->
|
||||
<div>
|
||||
<label for="ibanInput" class="form-label fw-semibold mb-1">Numer konta</label>
|
||||
@@ -198,7 +199,9 @@
|
||||
aria-label="Kopiuj numer konta">Kopiuj</button>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if show_blik %}
|
||||
<!-- Telefon BLIK -->
|
||||
<div>
|
||||
<label for="blikInput" class="form-label fw-semibold mb-1">Telefon BLIK</label>
|
||||
@@ -211,6 +214,12 @@
|
||||
aria-label="Kopiuj numer BLIK">Kopiuj</button>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<div class="alert alert-secondary mb-0">
|
||||
Kanały płatności są wyłączone dla tej zbiórki.
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if not zbiorka.ukryj_kwote %}
|
||||
<ul class="list-group list-group-flush small">
|
||||
@@ -243,7 +252,6 @@
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if current_user.is_authenticated and current_user.czy_admin %}
|
||||
<hr>
|
||||
<div class="d-grid gap-2 mt-2">
|
||||
@@ -271,8 +279,7 @@
|
||||
<small class="text-muted">Łącznie pozycji: {{ aktywnosci|length }}</small>
|
||||
{% endif %}
|
||||
{% if current_user.is_authenticated and current_user.czy_admin %}
|
||||
<a href="{{ url_for('transakcje_zbiorki', zbiorka_id=zbiorka.id) }}"
|
||||
class="btn btn-sm btn-outline-light">
|
||||
<a href="{{ url_for('transakcje_zbiorki', zbiorka_id=zbiorka.id) }}" class="btn btn-sm btn-outline-light">
|
||||
Zarządzaj
|
||||
</a>
|
||||
{% endif %}
|
||||
@@ -324,5 +331,4 @@
|
||||
{{ super() }}
|
||||
<script src="{{ url_for('static', filename='js/zbiorka.js') }}?v={{ APP_VERSION }}"></script>
|
||||
<script src="{{ url_for('static', filename='js/progress.js') }}?v={{ APP_VERSION }}"></script>
|
||||
<script src="{{ url_for('static', filename='js/progress.js') }}?v={{ APP_VERSION }}"></script>
|
||||
{% endblock %}
|
Reference in New Issue
Block a user