From 4c3dc1e08119a2e540e7ab10b73debcfc5aba74a Mon Sep 17 00:00:00 2001 From: Michael Weimann Date: Sat, 10 Dec 2022 18:55:45 +0100 Subject: [PATCH] Fix shift creation Regression introduced by changing the angeltype count field IDs --- includes/pages/admin_shifts.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/pages/admin_shifts.php b/includes/pages/admin_shifts.php index 318cd393..e6ee9650 100644 --- a/includes/pages/admin_shifts.php +++ b/includes/pages/admin_shifts.php @@ -153,8 +153,8 @@ function admin_shifts() $angelmode = 'location'; } elseif ($request->input('angelmode') == 'manually') { foreach ($types as $type) { - if (preg_match('/^\d+$/', trim($request->input('type_' . $type->id, 0)))) { - $needed_angel_types[$type->id] = trim($request->input('type_' . $type->id, 0)); + if (preg_match('/^\d+$/', trim($request->input('angeltype_count_' . $type->id, 0)))) { + $needed_angel_types[$type->id] = trim($request->input('angeltype_count_' . $type->id, 0)); } else { $valid = false; error(sprintf(__('Please check the needed angels for team %s.'), $type->name)); @@ -333,7 +333,7 @@ function admin_shifts() $hidden_types = ''; foreach ($needed_angel_types as $type_id => $count) { - $hidden_types .= form_hidden('type_' . $type_id, $count); + $hidden_types .= form_hidden('angeltype_count_' . $type_id, $count); } return page_with_title(__('Preview'), [ form([