Skip to content

Commit

Permalink
Staff: updated Manage Staff to override required custom fields when m…
Browse files Browse the repository at this point in the history
…anually editing a staff member
  • Loading branch information
SKuipers committed Jul 31, 2024
1 parent 784ab8e commit 8de41de
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ v28.0.00
Markbook: updated markbook columns to grey out students who joined after the Go Live date
Messenger: limited the individual message target to a maximum of 50 people
Reports: added a Progress by Department report for viewing class criteria progress
Staff: updated Manage Staff to override required custom fields when manually editing a staff member
Students: added a notification event when student notes are edited
User Admin: added the names of users who made changes to the User Status Log
User Admin: updated Manage Users to override required custom fields when manually editing a user
Expand Down
2 changes: 1 addition & 1 deletion modules/Staff/staff_manage_add.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
$row->addTextArea('biography')->setRows(10);

// Custom Fields
$container->get(CustomFieldHandler::class)->addCustomFieldsToForm($form, 'Staff', []);
$container->get(CustomFieldHandler::class)->addCustomFieldsToForm($form, 'Staff', ['requiredOverride' => 'N']);

$row = $form->addRow();
$row->addFooter();
Expand Down
2 changes: 1 addition & 1 deletion modules/Staff/staff_manage_addProcess.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
}

$customRequireFail = false;
$fields = $container->get(CustomFieldHandler::class)->getFieldDataFromPOST('Staff', [], $customRequireFail);
$fields = $container->get(CustomFieldHandler::class)->getFieldDataFromPOST('Staff', ['requiredOverride' => 'N'], $customRequireFail);

if ($customRequireFail) {
$URL .= '&return=error1';
Expand Down
2 changes: 1 addition & 1 deletion modules/Staff/staff_manage_edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@
$row->addTextArea('biography')->setRows(10);

// Custom Fields
$customFieldHandler->addCustomFieldsToForm($form, 'Staff', [], $values['fields']);
$customFieldHandler->addCustomFieldsToForm($form, 'Staff', ['requiredOverride' => 'N'], $values['fields']);

$row = $form->addRow();
$row->addFooter();
Expand Down
2 changes: 1 addition & 1 deletion modules/Staff/staff_manage_editProcess.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
}

$customRequireFail = false;
$fields = $container->get(CustomFieldHandler::class)->getFieldDataFromPOST('Staff', [], $customRequireFail);
$fields = $container->get(CustomFieldHandler::class)->getFieldDataFromPOST('Staff', ['requiredOverride' => 'N'], $customRequireFail);

if ($customRequireFail) {
$URL .= '&return=error1';
Expand Down

0 comments on commit 8de41de

Please sign in to comment.