get('vocabulary');
$vocabulary = entity_load('taxonomy_vocabulary', $vid);
$form = taxonomy_overview_terms($form, $form_state, $vocabulary);
foreach (element_children($form['terms']) as $key) {
if (isset($form['terms'][$key]['#term'])) {
$term = $form['terms'][$key]['#term'];
$form['terms'][$key]['term']['#href'] = 'forum/' . $term->id();
unset($form['terms'][$key]['operations']['#links']['delete']);
if (in_array($form['terms'][$key]['#term']->id(), $config->get('containers'))) {
$form['terms'][$key]['operations']['#links']['edit']['title'] = t('edit container');
$form['terms'][$key]['operations']['#links']['edit']['href'] = 'admin/structure/forum/edit/container/' . $term->id();
// We don't want the redirect from the link so we can redirect the
// delete action.
unset($form['terms'][$key]['operations']['#links']['edit']['query']['destination']);
}
else {
$form['terms'][$key]['operations']['#links']['edit']['title'] = t('edit forum');
$form['terms'][$key]['operations']['#links']['edit']['href'] = 'admin/structure/forum/edit/forum/' . $term->id();
// We don't want the redirect from the link so we can redirect the
// delete action.
unset($form['terms'][$key]['operations']['#links']['edit']['query']['destination']);
}
}
}
// Remove the alphabetical reset.
unset($form['actions']['reset_alphabetical']);
// The form needs to have submit and validate handlers set explicitly.
$form['#submit'] = array('taxonomy_overview_terms_submit'); // Use the existing taxonomy overview submit handler.
$form['terms']['#empty'] = t('No containers or forums available. Add container or Add forum.', array('@container' => url('admin/structure/forum/add/container'), '@forum' => url('admin/structure/forum/add/forum')));
return $form;
}