Files
crm_ecosplay/templates/pdf/rgpd_access.html.twig
Serreau Jovann 5f144ba4d2 fix: resolve SonarQube accessibility and test issues across templates
- Add for/id attributes to all form labels for accessibility compliance
- Add <title> tags to PDF templates (rgpd_access, rgpd_no_data, rgpd_deletion, contrat_revendeur)
- Add role="presentation" to email layout tables
- Remove deprecated cellpadding/cellspacing attributes from all templates
- Fix PHPUnit notices by replacing createMock with createStub where no expectations are set

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 19:30:53 +02:00

106 lines
7.0 KiB
Twig

<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<title>Attestation RGPD - Acces aux donnees</title>
<style>
@page { margin: 0; size: A4; }
body { font-family: Arial, Helvetica, sans-serif; font-size: 10px; color: #111827; margin: 0; padding: 0; }
.banner { background: #fabf04; padding: 16px 32px; border-bottom: 4px solid #111827; }
.banner img { height: 36px; }
.banner-title { font-size: 8px; font-weight: 900; text-transform: uppercase; letter-spacing: 2px; color: #111827; margin-top: 4px; opacity: 0.7; }
.container { padding: 24px 32px 16px; }
.doc-type { display: inline-block; padding: 4px 12px; background: #4338ca; color: #fff; font-size: 8px; font-weight: 900; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 8px; }
h1 { font-size: 18px; font-weight: 900; text-transform: uppercase; letter-spacing: -0.5px; font-style: italic; margin: 0 0 4px 0; line-height: 1.1; }
h2 { font-size: 11px; font-weight: 900; text-transform: uppercase; margin: 16px 0 4px; padding: 4px 10px; background: #fabf04; border: 2px solid #111827; display: inline-block; }
.subtitle { font-size: 9px; color: #666; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 16px; }
.info-grid { width: 100%; margin-bottom: 12px; }
.info-grid td { padding: 6px 10px; vertical-align: top; }
.info-label { font-size: 7px; font-weight: 900; text-transform: uppercase; letter-spacing: 1.5px; color: #999; display: block; margin-bottom: 1px; }
.info-value { font-size: 11px; font-weight: 700; color: #111827; }
.info-cell { border-left: 3px solid #4338ca; }
.session-meta { font-size: 9px; color: #666; margin: 2px 0 6px; }
.session-meta strong { color: #111827; }
table.data { width: 100%; border-collapse: collapse; margin-top: 4px; font-size: 9px; border: 2px solid #111827; }
table.data th { background: #111827; color: #fff; padding: 4px 8px; text-align: left; text-transform: uppercase; font-size: 8px; font-weight: 900; letter-spacing: 0.5px; }
table.data td { padding: 3px 8px; border-bottom: 1px solid #e5e7eb; }
table.data tr:nth-child(even) td { background: #f9fafb; }
.no-data { padding: 8px; background: #f9fafb; border: 2px dashed #d1d5db; font-style: italic; color: #999; text-align: center; font-size: 9px; }
.verify-box { margin: 12px 0; border: 2px solid #111827; }
.verify-box table { width: 100%; }
.verify-box td { vertical-align: middle; }
.verify-qr { text-align: center; width: 100px; padding: 8px; border-right: 2px solid #111827; }
.verify-qr img { width: 72px; height: 72px; }
.verify-info { padding: 8px 12px; font-size: 9px; }
.verify-label { font-size: 7px; font-weight: 900; text-transform: uppercase; letter-spacing: 1.5px; color: #999; display: block; margin-bottom: 1px; }
.verify-url { font-size: 8px; font-family: monospace; color: #4338ca; word-break: break-all; }
.hmac { font-size: 7px; color: #aaa; word-break: break-all; margin: 8px 0; padding: 6px 8px; background: #f9fafb; border: 1px solid #e5e7eb; font-family: monospace; }
.dpo { font-size: 9px; margin: 8px 0 4px; }
.contact-box { display: inline-block; padding: 6px 16px; background: #111827; color: #fff; font-weight: 900; text-transform: uppercase; font-size: 9px; letter-spacing: 1px; }
</style>
</head>
<body>
<div class="banner">
{% if logo %}<img src="{{ logo }}" alt="CRM Ecosplay">{% endif %}
<div class="banner-title">Association E-Cosplay</div>
</div>
<div class="container">
<span class="doc-type">Droit d'acces</span>
<h1>Donnees personnelles</h1>
<div class="subtitle">RGPD &mdash; Article 15</div>
<table class="info-grid">
<tr>
<td class="info-cell" width="25%"><span class="info-label">Reference</span><span class="info-value">{{ attestation.reference }}</span></td>
<td class="info-cell" width="25%"><span class="info-label">Date</span><span class="info-value">{{ date|date('d/m/Y a H:i') }}</span></td>
<td class="info-cell" width="25%"><span class="info-label">Adresse IP</span><span class="info-value">{{ ip }}</span></td>
<td class="info-cell" width="25%"><span class="info-label">Sessions</span><span class="info-value">{{ data|length }}</span></td>
</tr>
</table>
{% for entry in data %}
<h2>Session #{{ loop.index }}</h2>
<div class="session-meta"><strong>ID :</strong> {{ entry.visitor.id }} &mdash; <strong>Visite :</strong> {{ entry.visitor.createdAt|date('d/m/Y H:i') }}</div>
{% if entry.events|length > 0 %}
<table class="data">
<thead><tr><th width="25%">Date</th><th width="20%">Type</th><th width="55%">Page</th></tr></thead>
<tbody>
{% for event in entry.events %}
<tr><td>{{ event.createdAt|date('d/m/Y H:i:s') }}</td><td>{{ event.type }}</td><td>{{ event.page }}</td></tr>
{% endfor %}
</tbody>
</table>
{% else %}
<div class="no-data">Aucun evenement enregistre.</div>
{% endif %}
{% endfor %}
<div class="verify-box">
<table>
<tr>
<td class="verify-qr"><img src="{{ qrcode }}" alt="QR Code"></td>
<td class="verify-info">
<span class="verify-label">Verifier ce document</span>
<p style="margin: 2px 0 4px; font-size: 9px; font-weight: 700;">Scannez le QR code ou consultez le lien ci-dessous.</p>
<span class="verify-label">URL</span>
<span class="verify-url">{{ verify_url }}</span>
</td>
</tr>
</table>
</div>
<div class="hmac">HMAC-SHA256 : {{ attestation.hmac }}</div>
<div style="margin-top: 16px;">
<p class="dpo"><strong>DPO (DPO-167945)</strong></p>
<span class="contact-box">contact@e-cosplay.fr</span>
</div>
<div style="margin-top: 12px; display: inline-block; border: 2px solid #111827; padding: 8px 12px; width: 180px; height: 80px;">
<div style="font-size: 1px; color: #fff;">{% verbatim %}{{Sign;type=signature;width=150;height=50}}{% endverbatim %}</div>
</div>
<div style="margin-top: 16px; padding-top: 8px; border-top: 1px solid #ddd; font-size: 7px; color: #999; line-height: 1.6;">
Association E-Cosplay &mdash; RNA W022006988 &mdash; SIREN 943121517<br>
42 rue de Saint-Quentin, 02800 Beautor, France &mdash; contact@e-cosplay.fr &mdash; 06 79 34 88 02<br>
<a href="https://www.e-cosplay.fr" style="color: #999;">www.e-cosplay.fr</a> &mdash; DPO : DPO-167945
</div>
</div>
</body>
</html>