Comutator accounts.auto_send_enabled per cont: Auto OFF (default) tine randurile
la ingestie (submissions.held=1), worker-ul (claim_one AND held=0) le sare pana la
eliberare umana (per rand/bulk/auto-release OFF->ON). Snapshot held prin chokepoint
unic held_for_account pe toate caile de ingestie (API, import, reresolve, reactivare).
- schema/migrare: coloana held + index partial idx_submissions_held; auto_send_enabled
- API: echo onest held+motiv (US-010), ruta /prezentari/{id}/trimite-acum
- web: toggle header, modal confirmare tipata, buton Trimite per rand + Trimite toate,
banner coada tinuta imbatranita (L.142), contor "In asteptare (manual)"
- worker: expire_held (US-008, inchide gaura retentie PII), metrics held gauges
- ops: tools/carantina_held + runbook rollback (R4)
Nota review (/code-review high): re-snapshot held lipseste pe caile repune/corectie
(requeue_submission, post_corectie, bulk-fix) — de aliniat separat cu create_prezentari.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
68 lines
3.6 KiB
HTML
68 lines
3.6 KiB
HTML
{#
|
|
_modal_confirma_trimitere.html — modal REAL de confirmare tipata (PRD 5.19 D4/F4/F5).
|
|
|
|
`hx-confirm` nativ (doar OK/Cancel) NU e suficient pentru o actiune ireversibila care
|
|
trimite N prezentari catre RAR. Acest modal arata numarul + mediul tinta (Testare /
|
|
PRODUCTIE) si — pentru PRODUCTIE — cere o confirmare tipata ("TRIMIT") inainte de a
|
|
activa butonul. Reutilizat din:
|
|
- _auto_send_toggle.html (auto-release OFF->ON), injectat OOB in #modal-confirma-slot;
|
|
- _coada.html (bulk "Trimite toate (N)"), randat inline ascuns si aratat la click.
|
|
|
|
Parametri (context):
|
|
cf_id, cf_titlu, cf_count, cf_env ('prod'/'test'), cf_url, cf_vals (json string),
|
|
cf_target, cf_swap, cf_confirm_label, cf_deschis (bool), csrf_token.
|
|
#}
|
|
{% set _prod = (cf_env == 'prod') %}
|
|
{% set _eb = eticheta_env(cf_env) %}
|
|
<div id="{{ cf_id }}" class="modal-overlay" role="dialog" aria-modal="true"
|
|
aria-labelledby="{{ cf_id }}-titlu"{% if not cf_deschis %} hidden{% endif %}>
|
|
<div class="modal-backdrop"
|
|
onclick="this.closest('.modal-overlay').hidden=true"></div>
|
|
<div class="modal-dialog" role="document" style="max-width:440px;">
|
|
<button type="button" class="modal-close" aria-label="Anuleaza"
|
|
onclick="this.closest('.modal-overlay').hidden=true">×</button>
|
|
<h2 id="{{ cf_id }}-titlu" style="margin:0 0 10px; font-size:var(--fs-lg);">{{ cf_titlu }}</h2>
|
|
<p style="margin:0 0 8px; font-size:var(--fs-sm);">
|
|
Se trimit imediat <strong>{{ cf_count }}</strong>
|
|
{{ 'prezentare' if cf_count == 1 else 'prezentari' }} catre
|
|
<span class="{{ _eb[1] }}">{{ _eb[0] }}</span>.
|
|
</p>
|
|
<p style="margin:0 0 12px; font-size:var(--fs-sm); color:var(--warn); font-weight:600;">
|
|
Declararea la RAR este ireversibila (FINALIZATA nu se poate anula).
|
|
</p>
|
|
|
|
{% if _prod %}
|
|
{# Type-to-confirm DOAR pe PRODUCTIE: butonul ramane dezactivat pana se scrie TRIMIT. #}
|
|
<label for="{{ cf_id }}-typ" style="display:block; font-size:var(--fs-xs); color:var(--muted); margin-bottom:4px;">
|
|
Scrie <strong>TRIMIT</strong> pentru a confirma:
|
|
</label>
|
|
<input type="text" id="{{ cf_id }}-typ" autocomplete="off" autocapitalize="characters"
|
|
style="width:100%; margin-bottom:12px; font-size:14px; padding:5px 8px;
|
|
border:1px solid var(--line); border-radius:5px; background:var(--card2); color:var(--ink);"
|
|
oninput="document.getElementById('{{ cf_id }}-ok').disabled = (this.value.trim().toUpperCase() !== 'TRIMIT');">
|
|
{% endif %}
|
|
|
|
<div style="display:flex; gap:8px; justify-content:flex-end; flex-wrap:wrap;">
|
|
<button type="button"
|
|
onclick="this.closest('.modal-overlay').hidden=true"
|
|
style="background:var(--card); color:var(--muted); border:1px solid var(--line);
|
|
padding:6px 14px; border-radius:6px; cursor:pointer; font-size:13px;">
|
|
Anuleaza
|
|
</button>
|
|
<button type="button" id="{{ cf_id }}-ok"{% if _prod %} disabled{% endif %}
|
|
hx-post="{{ cf_url }}"
|
|
hx-vals='{{ cf_vals }}'
|
|
hx-target="{{ cf_target }}"
|
|
hx-swap="{{ cf_swap }}"
|
|
hx-include="#{{ cf_id }}-csrf"
|
|
onclick="this.closest('.modal-overlay').hidden=true"
|
|
style="background:{% if _prod %}var(--err){% else %}var(--accent){% endif %};
|
|
color:#fff; border:none; padding:6px 14px; border-radius:6px;
|
|
cursor:pointer; font-size:13px; font-weight:600;">
|
|
{{ cf_confirm_label }}
|
|
</button>
|
|
<input type="hidden" id="{{ cf_id }}-csrf" name="csrf_token" value="{{ csrf_token }}">
|
|
</div>
|
|
</div>
|
|
</div>
|