Commentaires d'un POI et correction booléens

This commit is contained in:
leosw
2026-01-19 20:16:54 +01:00
parent f8662f69bd
commit e1aa647fce
3 changed files with 183 additions and 34 deletions

View File

@@ -95,10 +95,10 @@ function updateForm(type) {
case 'b':
var cls = 'intermediate';
var val = 1;
if (existing === 0 || existing === "0") {
if (existing == 0) {
cls = 'uncheck';
val = 0;
} else if (existing === 2 || existing === "2") {
} else if (existing == 2) {
cls = 'check';
val = 2;
}
@@ -121,7 +121,8 @@ function updateForm(type) {
case 't':
html_form +=
'<textarea name="' + index + '" id="' + index + '" placeholder="' + value + '">';
'<label for="' + index + '">' + value + '</label>' +
'<textarea name="' + index + '" id="' + index + '">';
if (existing !== null) {
html_form += String(existing)
.replace(/&/g, "&amp;")
@@ -160,6 +161,10 @@ $(document).ready(function(){
updateForm(current_poi_type);
}
if (poi_mode === "edit") {
unsaved = true;
}
$('#type_selector label').click(function(){
if (unsaved === true) {