$CheckGrupo y comprobaciones de cada grupo
authorPlatonides <platonides@gmail.com>
Mon, 21 May 2018 22:57:15 +0000 (00:57 +0200)
committerPlatonides <platonides@gmail.com>
Mon, 21 May 2018 22:57:15 +0000 (00:57 +0200)
html/inscripcion.php

index 0186b9013d2d8e8fd21114339b71ff80bff9ca70..d258bf83200cfd1e2afce68e692b6edc8254438d 100755 (executable)
@@ -408,7 +408,6 @@ if (count ($Grupos) > 1) {
     }
 
     foreach ($Grupos as $G) {
-        if ($_POST["_{$G}"]) $CheckGrupo[$G] = "CHECKED";
         if (substr ($G, 0, 2) != $BloqueAnt) {
             $Fila = 0;
             $MaxF = max ($MaxF, count ($D[$Col++]));
@@ -418,7 +417,7 @@ if (count ($Grupos) > 1) {
         $Plazas = plazas ($G, $Org, $DE, $DI);
         $Disabled = (intval ($Plazas) == 0 ? "disabled" : "");
         $Info = infogrupo ($G, $DE, $DI, $DP, $DT, $MostrarLoc) . ($DE["ocultarplazas"] != "sí" ? " ({$Plazas})" : "");
-        $D[$Col][++$Fila] = "<INPUT TYPE=Checkbox NAME=\"_{$G}\" id=\"_{$G}\" {$CheckGrupo[$G]} {$Disabled}><label for=\"_{$G}\">{$Info}</label>";
+        $D[$Col][++$Fila] = "<INPUT TYPE=Checkbox NAME=\"_{$G}\" id=\"_{$G}\" " . (isset($_POST["_{$G}"]) ? "CHECKED" : "") . " {$Disabled}><label for=\"_{$G}\">{$Info}</label>";
     }
     $MaxF = max ($MaxF, count ($D[$Col++]));