Fix shift creation

Regression introduced by changing the angeltype count field IDs
This commit is contained in:
Michael Weimann 2022-12-10 18:55:45 +01:00 committed by Igor Scheller
parent 5604176675
commit 4c3dc1e081
1 changed files with 3 additions and 3 deletions

View File

@ -153,8 +153,8 @@ function admin_shifts()
$angelmode = 'location'; $angelmode = 'location';
} elseif ($request->input('angelmode') == 'manually') { } elseif ($request->input('angelmode') == 'manually') {
foreach ($types as $type) { foreach ($types as $type) {
if (preg_match('/^\d+$/', 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('type_' . $type->id, 0)); $needed_angel_types[$type->id] = trim($request->input('angeltype_count_' . $type->id, 0));
} else { } else {
$valid = false; $valid = false;
error(sprintf(__('Please check the needed angels for team %s.'), $type->name)); error(sprintf(__('Please check the needed angels for team %s.'), $type->name));
@ -333,7 +333,7 @@ function admin_shifts()
$hidden_types = ''; $hidden_types = '';
foreach ($needed_angel_types as $type_id => $count) { 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'), [ return page_with_title(__('Preview'), [
form([ form([