Commit 432f16d5 authored by Gábor Hojtsy's avatar Gábor Hojtsy

#214058 by catch, Arancaytar: forum form alter was mistakenly dropping the...

#214058 by catch, Arancaytar: forum form alter was mistakenly dropping the parent field in all taxonomy forms
parent b107f9d7
......@@ -353,10 +353,10 @@ function forum_taxonomy($op, $type, $term = NULL) {
* Implementation of hook_form_alter().
*/
function forum_form_alter(&$form, $form_state, $form_id) {
// Hide critical options from forum vocabulary
if ($form_id == 'taxonomy_form_vocabulary') {
$vid = variable_get('forum_nav_vocabulary', '');
if (isset($form['vid']) && $form['vid']['#value'] == $vid) {
$vid = variable_get('forum_nav_vocabulary', '');
if (isset($form['vid']) && $form['vid']['#value'] == $vid) {
// Hide critical options from forum vocabulary.
if ($form_id == 'taxonomy_form_vocabulary') {
$form['help_forum_vocab'] = array(
'#value' => t('This is the designated forum vocabulary. Some of the normal vocabulary options have been removed.'),
'#weight' => -1,
......@@ -369,10 +369,10 @@ function forum_form_alter(&$form, $form_state, $form_id) {
$form['settings']['multiple'] = array('#type' => 'value', '#value' => FALSE);
unset($form['delete']);
}
}
// Hide multiple parents select from forum terms.
if ($form_id == 'taxonomy_form_term') {
unset($form['advanced']['parent']);
// Hide multiple parents select from forum terms.
elseif ($form_id == 'taxonomy_form_term') {
$form['advanced']['parent']['#access'] = FALSE;
}
}
if ($form_id == 'forum_node_form') {
// Make the vocabulary required for 'real' forum-nodes.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment