Skip to content
Snippets Groups Projects
Commit 7a6290a2 authored by Neil Drumm's avatar Neil Drumm :wave:
Browse files

Issue #2762837: Remove limit on book page migration

parent 9c2cb13c
No related branches found
No related tags found
2 merge requests!312Issue # 3494493: Documentation: Document Maintainer Widget,!299Remove heroes from components field. Update CTA section and add variants.
......@@ -234,27 +234,21 @@ function drupalorg_docs_migrate_form_edit($form, &$form_state) {
'#title' => t('Migrate @number child pages', ['@number' => count($children)]),
'#description' => t('<strong>Hierarchy will not be saved!</strong> All child pages will be on the same level with the parent page in relation to the documentation guide.'),
);
if (count($children) > 30) {
drupal_set_message(t('<strong>Migration cancelled.</strong> You tried to migrate over 30 child nodes. Usually a guide consists of a smaller number of pages. To prevent possible mistakes, please select a smaller sub-set of book pages for migration at a time.'), 'error');
$form_state['cancel'] = TRUE;
}
else {
$form['children_nodes'] = array(
'#type' => 'fieldset',
'#title' => t('Specific child pages to migrate'),
'#states' => array(
'visible' => array(
':input[name="children"]' => array('checked' => TRUE),
),
$form['children_nodes'] = array(
'#type' => 'fieldset',
'#title' => t('Specific child pages to migrate'),
'#states' => array(
'visible' => array(
':input[name="children"]' => array('checked' => TRUE),
),
);
$form['children_nodes']['migrate'] = array(
'#type' => 'checkboxes',
'#options' => $children,
'#default_value' => array_keys($children),
'#description' => t('Checked pages will be migrated. To see the page, click on the link. It will open a new window or tab.'),
);
}
),
);
$form['children_nodes']['migrate'] = array(
'#type' => 'checkboxes',
'#options' => $children,
'#default_value' => array_keys($children),
'#description' => t('Checked pages will be migrated. To see the page, click on the link. It will open a new window or tab.'),
);
}
return $form;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment