update Wahlen
All checks were successful
Deploy Workshop-Wahlen (DEV / PROD) / deploy (push) Successful in 12s

This commit is contained in:
ProgrammGamer
2026-02-25 18:17:30 +01:00
parent 876223400e
commit ef874cd672

View File

@@ -24,7 +24,7 @@ function kc_teilnehmer_page() {
}
// CSV-Export (alle Teilnehmer oder gefiltert nach Wahl/Phase)
if (isset($_GET['export_csv']) && current_user_can('manage_options')) {
if (isset($_GET['export_teilnehmer_csv']) && current_user_can('manage_options')) {
$export_wahl_id = isset($_GET['wahl_id']) ? intval($_GET['wahl_id']) : 0;
$export_phase = isset($_GET['phase']) ? intval($_GET['phase']) : 0;
@@ -304,7 +304,7 @@ function kc_teilnehmer_page() {
// Map für Wahl-ID => Name ist bereits oben aufgebaut
echo '<div class="kc-admin-table-wrap">';
echo '<h2 style="margin-top:0;">Alle Teilnehmer</h2>';
echo '<a id="kc-export-current-view" class="kc-btn" style="float:right;margin-right:8px;margin-bottom:12px;background:#2da66a;color:#fff;" href="?page=kc_teilnehmer&export_csv=1">Teilnehmer-Export (Ansicht)</a>';
echo '<a id="kc-export-current-view" class="kc-btn" style="float:right;margin-right:8px;margin-bottom:12px;background:#2da66a;color:#fff;" href="?page=kc_teilnehmer&export_teilnehmer_csv=1">Teilnehmer-Export (Ansicht)</a>';
echo '<a class="kc-btn" style="float:right;margin-bottom:12px;" href="?page=kc_teilnehmer&new=1">+ Neuer Teilnehmer</a>';
// Wahl-Filter-Buttons sortiert nach KC1, KC2, KC3, dann Rest
@@ -349,7 +349,7 @@ function kc_teilnehmer_page() {
$wahl_disp = isset($wahl_name_map[$wid]) ? esc_html($wahl_name_map[$wid]) : $wid;
$csv_wahl_url = add_query_arg([
'page' => 'kc_teilnehmer',
'export_csv' => 1,
'export_teilnehmer_csv' => 1,
'wahl_id' => intval($wid)
], admin_url('admin.php'));
// Gesamtanzahl Teilnehmer für diese Wahl berechnen
@@ -408,7 +408,7 @@ function kc_teilnehmer_page() {
function updateExportButton() {
if (!exportBtn) return;
var href = "?page=kc_teilnehmer&export_csv=1";
var href = "?page=kc_teilnehmer&export_teilnehmer_csv=1";
if (currentWahl) href += "&wahl_id=" + encodeURIComponent(currentWahl);
if (currentPhase) href += "&phase=" + encodeURIComponent(currentPhase);
exportBtn.setAttribute("href", href);