dordogne-cd24: add extra json cell for commune RGPD contact (#43427)

This commit is contained in:
Serghei Mihai 2020-06-18 11:25:56 +02:00
parent cd34468cd6
commit 56c0f7947e
4 changed files with 55 additions and 3 deletions

View File

@ -593,7 +593,7 @@ div.cell.contact-service {
}
/* customize json contact commune cell */
div.cell.contact-commune {
div.cell.contact-commune, div.cell.contact-commune-rgpd {
> div > div {
padding-top: 0.4em;
margin-top: 10px;
@ -605,7 +605,8 @@ div.cell.contact-commune {
}
}
div.cell.contact-service, div.cell.contact-commune {
div.cell.contact-service, div.cell.contact-commune,
div.cell.contact-commune-rgpd {
h3.service-title {
margin-left: 1em;
margin-right: 1em;

View File

@ -36,6 +36,18 @@
"required": true
}
]
},
"contact-commune-rgpd": {
"cache_duration": 60,
"name": "Cellule coordonnées communes RGPD",
"url": "{{ webservice_url }}",
"form": [
{
"label": "URL du webservice",
"varname": "webservice_url",
"required": true
}
]
}
},
"COMBO_PUBLIC_TEMPLATES.update": {

View File

@ -1,6 +1,6 @@
$(function() {
$(document).on('combo:cell-loaded', function() {
$('div.contact-commune select').on('change', function() {
$('div.contact-commune select, div.contact-commune-rgpd select').on('change', function() {
var $parent = $(this).parent();
$parent.find('> div').hide();
$parent.find('div#commune-' + this.value).show();

View File

@ -0,0 +1,39 @@
<h3>Contacter l'organisme</h3>
<p>Veuillez choisir votre commune</p>
<select id="listeCommune">
<option value="---">---</option>
{% for contact in json.data %}
<option value="{{contact.id}}">{{contact.organisme}}</option>
{% endfor %}
</select>
{% for contact in json.data %}
<div id="commune-{{contact.id}}"style="display:none;">
<h3 class="service-title" style="background-image: url('{{ contact.logo }}')">CONTACT</h3>
<div class="commune-details">
<div>
{% if contact.formulaire %}
<p><strong><a class="file-link" href="{{contact.formulaire}}" target="_blank">Télécharger le formulaire de demande d'exercice de vos droits</a></strong></p>
<p><strong>Veuillez adresser votre demande soit à l'attention du représentant légal de l'organisme, soit à l'attention de son délégué à la protection des données aux coordonnées suivantes :</strong></p>
{% endif %}
{% if not contact.formulaire %}
<p><strong>Veuillez adresser votre demande soit à l'attention du représentant légal de l'organisme, soit à l'attention de son délégué à la protection des données aux coordonnées suivantes :</strong></p>
{% endif %}
<p>{{contact.lieu}}<br>
{{contact.service}}<br>
{{contact.adressePhysiqueLigne}}<br>
{% if contact.adressePhysiqueComplementaire %}
{{contact.adressePhysiqueComplementaire}}
{% endif %}
{{contact.adressePhysiqueVille}}</p>
<p>Tél : {{contact.telephone}}</p>
<p>Adresse mail : <a href="mailto:{{contact.mail}}">{{contact.mail}}</a></p>
</div>
<div>
<p class="title">Horaires d'accueil du public</p>
<p>{{contact.horaires}}</p>
</div>
</div>
</div>
{% endfor %}