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>
|
<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 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>
|
<script>
|
||||||
window.MAP_STYLE_LIGHT = "{{ MAP_STYLE_LIGHT|escapejs }}";
|
window.MAP_STYLE_LIGHT = "{{ MAP_STYLE_LIGHT|escapejs }}";
|
||||||
|
|
@ -639,19 +638,21 @@
|
||||||
// Type warning
|
// Type warning
|
||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
const typeWarning = document.getElementById('type-warning');
|
const typeWarning = document.getElementById('type-warning');
|
||||||
document.querySelectorAll('#id_type input[type="radio"], input[name="type"]').forEach(function (radio) {
|
function updateTypeWarning(val) {
|
||||||
radio.addEventListener('change', function () {
|
|
||||||
const val = parseInt(this.value);
|
|
||||||
if (val === 2) {
|
if (val === 2) {
|
||||||
typeWarning.textContent = '{{ msgAssurance|escapejs }}';
|
typeWarning.textContent = '{{ msgAssurance|escapejs }}';
|
||||||
typeWarning.style.display = 'block';
|
typeWarning.style.display = 'block';
|
||||||
} else if ([32, 33].includes(val)) {
|
|
||||||
typeWarning.textContent = '{{ msgCommune|escapejs }}';
|
|
||||||
typeWarning.style.display = 'block';
|
|
||||||
} else {
|
} else {
|
||||||
typeWarning.style.display = 'none';
|
typeWarning.style.display = 'none';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
document.querySelectorAll('#id_type input[type="radio"], input[name="type"]').forEach(function (radio) {
|
||||||
|
radio.addEventListener('change', function () {
|
||||||
|
updateTypeWarning(parseInt(this.value));
|
||||||
});
|
});
|
||||||
|
if (radio.checked) {
|
||||||
|
updateTypeWarning(parseInt(radio.value));
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue