Skip to content

Commit

Permalink
222 - hide status fields and delete btn. Added Cancel btn.
Browse files Browse the repository at this point in the history
  • Loading branch information
gurjinder12 authored and lkmorlan committed Nov 22, 2023
1 parent e74af15 commit 7f668e2
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions html/modules/custom/bc_dc/bc_dc.module
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,24 @@ function bc_dc_form_node_data_set_edit_form_alter(array &$form, FormStateInterfa
$form['field_columns']['widget']['header_actions']['actions']['edit_all']['#access'] = FALSE;
// Remove the "Collapse all" action.
$form['field_columns']['widget']['header_actions']['dropdown_actions']['collapse_all']['#access'] = FALSE;
// Remove revision & content translation info section.
$form['content_translation']['#access'] = FALSE;
$form['revision_information']['#access'] = FALSE;
// Remove Advanced which display status of node.
$form['advanced']['#access'] = FALSE;
// Remove delete btn from node edit page.
$form['actions']['delete']['#access'] = FALSE;
// Add Cancel btn.
$form['actions']['cancel'] = [
'#type' => 'button',
'#value' => t('Cancel'),
'#weight' => 100,
'#attributes' => [
'class' => ['btn btn-danger'],
'onclick' => 'history.back(); return false;',
],
];


// Disable if no review interval is set.
if (isset($form['field_is_complete_review'])) {
Expand Down

0 comments on commit 7f668e2

Please sign in to comment.