new build
All checks were successful
Deploy / deploy (push) Successful in 51s

This commit is contained in:
2026-07-22 21:40:34 +02:00
parent eb16827fdf
commit 2e800d4839
11 changed files with 674 additions and 98 deletions

View File

@@ -462,6 +462,11 @@ $allowNoKidsChecked = $editEvent ? ((int)$editEvent['allow_kids'] === 0) : false
let map, marker;
function ensureLeaflet(callback) {
if (!window.PKTConsent || !window.PKTConsent.has('external_services')) {
alert('Für Karten und Adresssuche bitte zuerst die externen Dienste in den Cookie-Einstellungen erlauben.');
window.PKTConsent?.openPreferences?.();
return;
}
if (window.L) { callback(); return; }
const css = document.createElement('link');
css.rel = 'stylesheet';
@@ -508,6 +513,7 @@ $allowNoKidsChecked = $editEvent ? ((int)$editEvent['allow_kids'] === 0) : false
}
function reverseGeocode(lat, lng) {
if (!window.PKTConsent || !window.PKTConsent.has('external_services')) return;
fetch(`https://nominatim.openstreetmap.org/reverse?format=jsonv2&lat=${encodeURIComponent(lat)}&lon=${encodeURIComponent(lng)}`, {
headers: { 'Accept-Language': 'de', 'User-Agent': 'papa-kind-treff/1.0' },
})
@@ -517,6 +523,11 @@ $allowNoKidsChecked = $editEvent ? ((int)$editEvent['allow_kids'] === 0) : false
}
function geocodeAndPlace(query) {
if (!window.PKTConsent || !window.PKTConsent.has('external_services')) {
alert('Für Karten und Adresssuche bitte zuerst die externen Dienste in den Cookie-Einstellungen erlauben.');
window.PKTConsent?.openPreferences?.();
return;
}
fetch('https://nominatim.openstreetmap.org/search?format=jsonv2&limit=1&q=' + encodeURIComponent(query), {
headers: { 'Accept-Language': 'de', 'User-Agent': 'papa-kind-treff/1.0' },
})

View File

@@ -140,6 +140,11 @@ if ($pdo && ($q !== '' || $loc !== '' || ($lat !== null && $lng !== null))) {
}
function ensureLeaflet(cb) {
if (!window.PKTConsent || !window.PKTConsent.has('external_services')) {
alert('Für Karten- und Standortfunktionen bitte zuerst die externen Dienste in den Cookie-Einstellungen erlauben.');
window.PKTConsent?.openPreferences?.();
return;
}
if (window.L) { cb(); return; }
const css = document.createElement('link');
css.rel = 'stylesheet';
@@ -188,6 +193,11 @@ if ($pdo && ($q !== '' || $loc !== '' || ($lat !== null && $lng !== null))) {
});
btnGeo?.addEventListener('click', () => {
if (!window.PKTConsent || !window.PKTConsent.has('external_services')) {
alert('Für Standortfunktionen bitte zuerst die externen Dienste in den Cookie-Einstellungen erlauben.');
window.PKTConsent?.openPreferences?.();
return;
}
if (!navigator.geolocation) {
alert('Geolocation wird nicht unterstützt.');
return;