Skip to content

Commit

Permalink
Issue #6103: Hide revision by default if revisions disabled, and clar…
Browse files Browse the repository at this point in the history
…ify description.

By @herbdool, @kswan, @klonos, @izmeez, and @yorkshire-pudding.
  • Loading branch information
herbdool committed Mar 8, 2024
1 parent 7f93e61 commit 3860f5a
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion core/modules/node/node.types.inc
Expand Up @@ -418,16 +418,25 @@ function node_type_form($form, &$form_state, $type = NULL) {
);
$form['revision']['revision']['revision_enabled'] = array(
'#type' => 'checkbox',
'#title' => t('Show option to create new revisions'),
'#title' => t('Enable option to create revisions'),
'#default_value' => $type->settings['revision_enabled'],
'#parents' => array('revision_enabled'),
'#description' => t('Revisions allow content editors to view changes over time and revert changes if needed.'),
);
$form['revision']['revision']['revision_default'] = array(
'#type' => 'checkbox',
'#title' => t('Create new revision by default'),
'#description' => t('If enabled, revisions to content will be created by default. People with the "Administer content" permission will see an option to create a revision.'),
'#default_value' => $type->settings['revision_default'],
'#parents' => array('revision_default'),
'#states' => array(
'visible' => array(
'input[name="revision_enabled"]' => array('checked' => TRUE),
),
'enabled' => array(
'input[name="revision_enabled"]' => array('checked' => TRUE),
),
),
);

// Menu settings.
Expand Down

0 comments on commit 3860f5a

Please sign in to comment.