diff --git a/includes/force-zuteilung.php b/includes/force-zuteilung.php
index 94f24d5..72ff6b9 100644
--- a/includes/force-zuteilung.php
+++ b/includes/force-zuteilung.php
@@ -64,8 +64,7 @@ function kc_force_zuteilung_page() {
echo '';
echo '';
@@ -121,8 +120,9 @@ jQuery(function($){
$("#kc-force-workshop-dropdown").select2({placeholder:"Workshop auswählen…",allowClear:true});
function refreshPhaseSelect($wahlSelect, $phaseSelect, current) {
- var wid = parseInt($wahlSelect.val(),10);
- var max = (wid && kcWahlPhases[wid]) ? parseInt(kcWahlPhases[wid],10) : 1;
+ // prefer data attribute on the selected option; fall back to kcWahlPhases mapping
+ var selOpt = $wahlSelect.find('option:selected');
+ var max = parseInt(selOpt.data('einheiten') || kcWahlPhases[parseInt($wahlSelect.val(),10)] || 1, 10);
$phaseSelect.empty();
for(var i=1;i<=max;i++){
var opt = $("