diff options
Diffstat (limited to 'modules/book/book.pages.inc')
-rw-r--r-- | modules/book/book.pages.inc | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/modules/book/book.pages.inc b/modules/book/book.pages.inc index 1767dfe1a..3e682ef20 100644 --- a/modules/book/book.pages.inc +++ b/modules/book/book.pages.inc @@ -217,35 +217,3 @@ function book_remove_form_submit($form, &$form_state) { } $form_state['redirect'] = 'node/' . $node->nid; } - -/** - * Renders a new parent page select element when the book selection changes. - * - * This function is called via AJAX when the selected book is changed on a node - * or book outline form. It creates a new parent page select element, adds it - * to the cached form, and then returns the rendered element so it can be - * displayed on the form. - * - * @return - * The rendered parent page select element. - */ -function book_form_update() { - // Load the form based upon the $_POST data sent via the ajax call. - list($form, $form_state) = ajax_get_form(); - - $bid = $_POST['book']['bid']; - - // Validate the bid. - if (isset($form['book']['bid']['#options'][$bid])) { - $book_link = $form['#node']->book; - $book_link['bid'] = $bid; - // Get the new options and update the cache. - $form['book']['plid'] = _book_parent_select($book_link); - form_set_cache($form['values']['form_build_id'], $form, $form_state); - - // Build the new select element and return it. - $form_state = array(); - $form = form_builder($form['form_id']['#value'], $form, $form_state); - return $form['book']['plid']; - } -} |