-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🚧(dashboard) refactor and modularize consent management templates
Streamline consent management by splitting a large template into reusable modular components. Introduced new partial templates for representative and company info, authorizations, and consent date/place. Updated the forms and structure to improve maintainability and reusability across views.
- Loading branch information
Showing
12 changed files
with
390 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,3 +29,5 @@ DASHBOARD_CONTROL_AUTHORITY_REPRESENTED_BY=John Doe | |
[email protected] | ||
|
||
DASHBOARD_CONSENT_DONE_AT=Paris | ||
|
||
[email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
71 changes: 71 additions & 0 deletions
71
src/dashboard/apps/consent/templates/consent/includes/_manage_authorisations.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
{% load i18n %} | ||
|
||
<div class="fr-fieldset__element fr-my-4w"> | ||
<legend class="fr-fieldset__legend" id="text-legend"> | ||
D. Données à transmettre à la DGEC | ||
</legend> | ||
|
||
<p>Par la signature de ce document, <strong>le Client autorise expressément le Tiers à | ||
demander et à recevoir communication auprès d'Enedis</strong>, SA à directoire et à | ||
conseil de surveillance, au capital de 270 037 000 euros, immatriculés au R.C.S | ||
de Nanterre sous le numéro 444 608 442 et dont le siège social est situé Tour | ||
Enedis, 34 place des Corolles, 92070 Paris La Défense Cedex, <strong>des données | ||
cochées ci-dessous, sous réserve de disponibilité</strong> : | ||
</p> | ||
|
||
{% for field in form %} | ||
|
||
{% if forloop.last %} | ||
{% comment %} | ||
Ce paragraphe se situe juste avant La case à cocher de consentement global | ||
Attention: la case à cocher 'consent_agreed' doit toujours se trouver en dernière | ||
position dans le form correspondant | ||
{% endcomment %} | ||
<p> | ||
Usage des données : Suivi de la mise en œuvre de la politique énergétique. | ||
</p> | ||
<p> | ||
La présente autorisation ne peut être cédée et pourra être retirée à tout moment. | ||
Elle est consentie pour toute la période du contrat ou à défaut pour la durée de | ||
12 mois à compter de la date de signature. Les données ainsi acquises sont | ||
détruites dès la fin de validité de la présente autorisation. | ||
<br /> | ||
La présente autorisation est conservée pendant <strong>5 ans</strong> à compter | ||
de sa signature conformément à l’article 2224 du code civil et sont destinées à | ||
Enedis qui s’engage à ne pas communiquer ces informations à des tiers sauf | ||
obligation réglementaire. | ||
<br /> | ||
Conformément à la loi n°78-17 du 6 janvier 1978 modifiée et au règlement (UE) | ||
n°2016/679 du 27 avril 2016, les informations recueillies sont enregistrées dans | ||
un fichier informatisé par ENEDIS en sa qualité de responsable du traitement à | ||
des fins de gestion et de traçabilité des demandes. | ||
<br /> | ||
Vous disposez d’un droit d’accès à vos données, de rectification, d’opposition et | ||
d’effacement pour motifs légitimes. | ||
Vous disposez, également, d’un droit à la limitation du traitement et à la | ||
portabilité des données à caractère personnel vous concernant. | ||
Vous pouvez exercer vos droits à l’adresse suivante : Enedis, 34 place des | ||
Corolles, 92079 Paris La Défense Cedex. | ||
Conformément à la loi "informatique et libertés", vous disposez de la faculté | ||
d’introduire une réclamation auprès de la CNIL. | ||
</p> | ||
|
||
{% include "consent/includes/_manage_consents_date_place.html" %} | ||
{% endif %} | ||
|
||
<div class="{% if field.errors %}fr-pl-3v{% endif %} fr-mb-6v"> | ||
<div class="fr-checkbox-group {% if field.errors %}fr-checkbox-group--error{% endif %}"> | ||
{{ field }} | ||
<div class="fr-messages-group" id="consent_agreed-messages" aria-live="assertive"> | ||
{% if field.errors %} | ||
{% for error in field.errors %} | ||
<p class="fr-message fr-message--error" id="checkboxes-error-message-error"> | ||
{{ error }} | ||
</p> | ||
{% endfor %} | ||
{% endif %} | ||
</div> | ||
</div> | ||
</div> | ||
{% endfor %} | ||
</div> |
71 changes: 71 additions & 0 deletions
71
src/dashboard/apps/consent/templates/consent/includes/_manage_company_informations.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
{% load i18n %} | ||
|
||
{% for entity in entities %} | ||
<div class="fr-fieldset__element fr-my-4w"> | ||
<legend class="fr-fieldset__legend"> | ||
B. Client raccordé | ||
</legend> | ||
|
||
<p> | ||
Merci de vérifier l'exactitude des informations concernant votre structure et le | ||
signataire de ce présent formulaire. | ||
<br /> | ||
En cas d'informations erronées, merci de nous contacter : | ||
<a class="fr-link fr-link--icon-left fr-icon-mail-line" | ||
href="mailto:{{ mailto }}?subject=[QualiCharge] Informations erronées dans le formulaire de gestion des autorisations"> | ||
{{ mailto }} | ||
</a> | ||
</p> | ||
<div class="fr-table fr-table--bordered" id="table-bordered-component"> | ||
<div class="fr-table__wrapper"> | ||
<div class="fr-table__container"> | ||
<div class="fr-table__content"> | ||
<table> | ||
<caption> | ||
{% trans "Informations sur l'entreprise et le représentant" %} | ||
</caption> | ||
<thead> | ||
<tr> | ||
<th scope="col"> | ||
Libellé | ||
</th> | ||
<th scope="col"> | ||
Valeur | ||
</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{% with row_number=0 %} | ||
<tr class="fr-table__section"> | ||
<td colspan="2"><strong>Informations sur la structure</strong></td> | ||
</tr> | ||
{% include "consent/includes/_table_row.html" with label="Dénomination sociale" value=entity.name row_number=row_number|add:"1" %} | ||
{% include "consent/includes/_table_row.html" with label="Type de structure" value=entity.company_type row_number=row_number|add:"1" %} | ||
{% include "consent/includes/_table_row.html" with label="Forme juridique" value=entity.legal_form row_number=row_number|add:"1" %} | ||
{% include "consent/includes/_table_row.html" with label="Nom commercial" value=entity.trade_name row_number=row_number|add:"1" %} | ||
{% include "consent/includes/_table_row.html" with label="N° d'identification SIRET" value=entity.siret row_number=row_number|add:"1" %} | ||
{% include "consent/includes/_table_row.html" with label="Activité NAF" value=entity.naf row_number=row_number|add:"1" %} | ||
{% include "consent/includes/_table_row.html" with label="Adresse" value=entity.address_1 row_number=row_number|add:"1" %} | ||
{% include "consent/includes/_table_row.html" with label="Complément d'adresse" value=entity.address_2 row_number=row_number|add:"1" %} | ||
{% include "consent/includes/_table_row.html" with label="Code Postale" value=entity.address_zip_code row_number=row_number|add:"1" %} | ||
{% include "consent/includes/_table_row.html" with label="Commune" value=entity.address_city row_number=row_number|add:"1" %} | ||
{% include "consent/includes/_table_row.html" with label="Nom du titulaire du contrat" value="-" row_number=row_number|add:"1" %} | ||
|
||
<tr class="fr-table__section"> | ||
<td colspan="2"> | ||
<strong>Informations sur le signataire du présent formulaire</strong> | ||
</td> | ||
</tr> | ||
{% include "consent/includes/_table_row.html" with label="Nom" value=request.user.last_name row_number=row_number|add:"1" %} | ||
{% include "consent/includes/_table_row.html" with label="Prénom" value=request.user.first_name row_number=row_number|add:"1" %} | ||
{% include "consent/includes/_table_row.html" with label="E-mail" value=request.user.email row_number=row_number|add:"1" %} | ||
{% endwith %} | ||
</tbody> | ||
</table> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
</div> | ||
{% endfor %} |
57 changes: 57 additions & 0 deletions
57
src/dashboard/apps/consent/templates/consent/includes/_manage_consents.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
{% load i18n %} | ||
|
||
<div class="fr-fieldset__element fr-my-4w"> | ||
<legend class="fr-fieldset__legend" id="text-legend"> | ||
A. Points de livraison à valider | ||
</legend> | ||
|
||
<p> | ||
Cochez les lignes correspondant aux PRM pour lesquelles vous autorisez expressément | ||
la DGEC à demander et à recevoir communication des données mentionnées au point D. | ||
</p> | ||
|
||
{# toggle button #} | ||
<div class="fr-checkbox-group fr-mb-2v"> | ||
<input type="checkbox" id="toggle-all" name="toggle-all" | ||
aria-describedby="toggle-all-messages" | ||
data-fr-js-checkbox-input="true" | ||
data-fr-js-checkbox-actionee="true"> | ||
<label class="fr-label" for="toggle-all"><strong>{% trans "Toggle All" %}</strong></label> | ||
</div> | ||
|
||
{# delivery points #} | ||
<div class="consent-wrapper fr-py-6v fr-mb-6v"> | ||
<div class="consent-wrapper__inner"> | ||
{% for entity in entities %} | ||
<fieldset class="fr-fieldset" id="checkboxes" aria-labelledby="checkboxes-legend checkboxes-messages"> | ||
<legend class="fr-fieldset__legend--regular fr-fieldset__legend" id="checkboxes-legend">{{ entity.name }}</legend> | ||
|
||
{% for consent in entity.get_consents %} | ||
<div class="fr-fieldset__element"> | ||
<div class="fr-checkbox-group"> | ||
<input type="checkbox" | ||
name="status" | ||
value="{{ consent.id }}" | ||
id="{{ consent.id }}" | ||
{% if consent.status == 'VALIDATED' %} checked="checked" disabled="disabled"{% endif %} | ||
aria-describedby="{{ consent.id }}-messages" | ||
data-fr-js-checkbox-input="true" | ||
data-fr-js-checkbox-actionee="true" /> | ||
<label class="fr-label" for="{{ consent.id }}" | ||
{% if consent.status == 'VALIDATED' %} | ||
title="{% trans "Delivery point is already validated" %}" | ||
{% elif consent.status == 'AWAITING' %} | ||
title="{% trans "Delivery point awaiting consent" %}" | ||
{% endif %}> | ||
{{ consent.delivery_point.provider_assigned_id }} | ||
</label> | ||
<div class="fr-messages-group" id="{{ consent.id }}-messages" aria-live="assertive"></div> | ||
</div> | ||
</div> | ||
{% endfor %} | ||
|
||
</fieldset> | ||
{% endfor %} | ||
</div> | ||
</div> | ||
</div> |
43 changes: 43 additions & 0 deletions
43
...dashboard/apps/consent/templates/consent/includes/_manage_consents_control_authority.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{% load i18n %} | ||
|
||
<div class="fr-fieldset__element fr-my-4w"> | ||
<legend class="fr-fieldset__legend"> | ||
C. Tiers | ||
</legend> | ||
|
||
<div class="fr-table fr-table--bordered" id="table-bordered-component"> | ||
<div class="fr-table__wrapper"> | ||
<div class="fr-table__container"> | ||
<div class="fr-table__content"> | ||
<table> | ||
<caption> | ||
{% trans "Informations sur le tiers" %} | ||
</caption> | ||
<thead> | ||
<tr> | ||
<th scope="col"> | ||
Libellé | ||
</th> | ||
<th scope="col"> | ||
Valeur | ||
</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{% with row_number=0 %} | ||
{% include "consent/includes/_table_row.html" with label="Dénomination sociale" value=control_authority.name row_number=row_number|add:"1" %} | ||
{% with control_authority.address_1|add:"<br />"|add:control_authority.address_2|add:"<br />"|add:control_authority.zip_code|add:" "|add:control_authority.city as control_authority_address %} | ||
{% include "consent/includes/_table_row.html" with label="Adresse" value=control_authority_address|safe row_number=row_number|add:"1" %} | ||
{% endwith %} | ||
{% include "consent/includes/_table_row.html" with label="Représenté par" value=control_authority.represented_by row_number=row_number|add:"1" %} | ||
{% include "consent/includes/_table_row.html" with label="E-mail" value=control_authority.email row_number=row_number|add:"1" %} | ||
{% endwith %} | ||
</tbody> | ||
</table> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
</div> | ||
|
14 changes: 14 additions & 0 deletions
14
src/dashboard/apps/consent/templates/consent/includes/_manage_consents_date_place.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{% load i18n %} | ||
|
||
<p> | ||
<strong>Fait à : </strong>{{ consent_done_at }} | ||
<br /> | ||
<strong>Le :</strong> {% now "d/m/Y" %} | ||
</p> | ||
|
||
<input class="fr-input" | ||
type="hidden" | ||
id="text-input-entity-name" | ||
name="text-input-entity-name" | ||
value="{% now "d/m/Y" %}" | ||
readonly="readonly"> |
8 changes: 8 additions & 0 deletions
8
src/dashboard/apps/consent/templates/consent/includes/_table_row.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<tr> | ||
<th class="fr-cell--fixed" id="complex-row-{{ row_number }}"> | ||
{{ label }} | ||
</th> | ||
<td headers="complex-row-{{ row_number }}"> | ||
{{ value }} | ||
</td> | ||
</tr> |
Oops, something went wrong.