feat: create initial default HTML template for new public space occupation authorization requests
This commit is contained in:
parent
cb9e8a1c8b
commit
2a78cfc27b
1 changed files with 12 additions and 11 deletions
|
|
@ -380,7 +380,6 @@
|
|||
<script src="{% static 'common/bootstrap.bundle.min.js' %}"></script>
|
||||
|
||||
{% blocktranslate asvar msgAssurance %}Veillez à joindre en annexe l'attestation d'assurance couvrant tous les risques.{% endblocktranslate %}
|
||||
{% blocktranslate asvar msgCommune %}Veillez à joindre en annexe l'autorisation de la commune.{% endblocktranslate %}
|
||||
|
||||
<script>
|
||||
window.MAP_STYLE_LIGHT = "{{ MAP_STYLE_LIGHT|escapejs }}";
|
||||
|
|
@ -639,19 +638,21 @@
|
|||
// Type warning
|
||||
// -----------------------------------------------------------------------
|
||||
const typeWarning = document.getElementById('type-warning');
|
||||
function updateTypeWarning(val) {
|
||||
if (val === 2) {
|
||||
typeWarning.textContent = '{{ msgAssurance|escapejs }}';
|
||||
typeWarning.style.display = 'block';
|
||||
} else {
|
||||
typeWarning.style.display = 'none';
|
||||
}
|
||||
}
|
||||
document.querySelectorAll('#id_type input[type="radio"], input[name="type"]').forEach(function (radio) {
|
||||
radio.addEventListener('change', function () {
|
||||
const val = parseInt(this.value);
|
||||
if (val === 2) {
|
||||
typeWarning.textContent = '{{ msgAssurance|escapejs }}';
|
||||
typeWarning.style.display = 'block';
|
||||
} else if ([32, 33].includes(val)) {
|
||||
typeWarning.textContent = '{{ msgCommune|escapejs }}';
|
||||
typeWarning.style.display = 'block';
|
||||
} else {
|
||||
typeWarning.style.display = 'none';
|
||||
}
|
||||
updateTypeWarning(parseInt(this.value));
|
||||
});
|
||||
if (radio.checked) {
|
||||
updateTypeWarning(parseInt(radio.value));
|
||||
}
|
||||
});
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Reference in a new issue