Skip to content

Commit

Permalink
222 - removed advanced, revision_info and delete from data_set node e…
Browse files Browse the repository at this point in the history
…dit form.
  • Loading branch information
gurjinder12 committed Nov 29, 2023
1 parent 05465d0 commit 438a840
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions html/modules/custom/bc_dc/bc_dc.module
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,14 @@ function bc_dc_form_node_data_set_edit_form_alter(array &$form, FormStateInterfa
// 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;

// Disable if no review interval is set.
if (isset($form['field_is_complete_review'])) {
$form['field_is_complete_review']['#states']['disabled'][':input[id="edit-field-review-interval-0-value"]'] = ['empty' => TRUE];
Expand Down

0 comments on commit 438a840

Please sign in to comment.