Skip to content

Commit

Permalink
feat(shs-5892): remove elements from used edit form
Browse files Browse the repository at this point in the history
  • Loading branch information
cienvaras committed Nov 7, 2024
1 parent 9e5401e commit efc4f47
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ function su_humsci_profile_page_attachments(array &$attachments) {
if ($current_user->hasPermission('access toolbar') && !$current_user->hasPermission('view toolbar manage')) {
// HSD8-771 Roll back hide manage toolbar. Lets keep this here in case we
// come back to it at a later date.
// $attachments['#attached']['library'][] = 'su_humsci_profile/hide_manage';
// $attachments['#attached']['library'][] = 'su_humsci_profile/hide_manage';.
}
}

Expand Down Expand Up @@ -910,3 +910,13 @@ function su_humsci_profile_ckeditor5_plugin_info_alter(array &$plugin_definition
$plugin_definitions['ckeditor5_table'] = new CKEditor5PluginDefinition($tableDefinition);
}
}

/**
* Implements hook_form_FORM_ID_alter().
*/
function su_humsci_profile_form_user_form_alter(&$form, FormStateInterface $form_state) {
// Remove unnecessary URL alias fields from the user edit form.
unset($form['path']);
// Remove Delete account button, it isn't necessary as we're using SSO.
unset($form['actions']['delete']); .
}

0 comments on commit efc4f47

Please sign in to comment.