In the taxonomy_manager_form declaration there is a small "glitch" which makes it annoyingly hard to alter the form. I encountered the problem when trying to use hook_form_alter on the form, wanting to add a new toolbar button.
The #suffix =

should not be placed on the last button, but used in #prefix in the wrapper. If not, the last button is suddenly made into a "special case" button, which it is not. The wrapper is the one to hold such values.

This is how it is now:

  $form['toolbar']['export_show'] = array( 
    '#type' => 'button', 
    '#attributes' => array('class' => 'taxonomy-manager-buttons export'),
    '#value' => t('CSV Export'), 
    '#theme' => 'no_submit_button', 
    '#suffix' => '</div>'
  );
  $form['toolbar']['wrapper'] = array( 
    '#type' => 'markup', 
    '#value' => '<div id="taxonomy-manager-toolbar-throbber"></div><div class="clear"></div>', 
    '#weight' => 20,
  );

This is how it should be:

  $form['toolbar']['export_show'] = array( 
    '#type' => 'button', 
    '#attributes' => array('class' => 'taxonomy-manager-buttons export'),
    '#value' => t('CSV Export'), 
    '#theme' => 'no_submit_button', 
  );
  $form['toolbar']['wrapper'] = array( 
    '#type' => 'markup', 
    '#value' => '<div id="taxonomy-manager-toolbar-throbber"></div><div class="clear"></div>', 
    '#weight' => 20,
    '#prefix' => '</div>'
  );

Comments

mh86’s picture

Status: Active » Fixed

committed changes :)
thanks for your help

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.