function book_copy_copy_confirm in Book Copy 7.2
Menu callback. Ask for confirmation of book copy.
1 string reference to 'book_copy_copy_confirm'
- book_copy_menu in ./
book_copy.module - Implements hook_menu().
File
- ./
book_copy.module, line 106 - Book copy, copy book outlines
Code
function book_copy_copy_confirm($form, &$form_state, $node) {
// make sure we have a valid book or book item
if (isset($node->book['bid'])) {
$copytree = _book_copy_list($node->book);
$form['nid'] = array(
'#type' => 'value',
'#value' => $node->nid,
);
$form['new_title'] = array(
'#type' => 'textfield',
'#default_value' => $node->title,
'#description' => t('The new title for this book, this only applies to the top level book item being copied'),
'#title' => t('New Title'),
);
$form['book_title'] = array(
'#type' => 'value',
'#value' => $node->title,
);
return confirm_form($form, t('Are you sure you want to copy the outline below "%title"? (this is %count nodes)', array(
'%title' => $node->title,
'%count' => count($copytree),
)), 'admin/content/book', t('This action cannot be undone.'), t('Copy'), t('Cancel'));
}
return FALSE;
}