taxonomy form alterations show on up delete term
hefox - September 29, 2009 - 16:07
| Project: | Edit term |
| Version: | 6.x-1.3 |
| Component: | Code |
| Category: | bug report |
| Priority: | minor |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
Changed to below and doesn't show up anymore (based on looking at http://api.drupal.org/api/function/taxonomy_form_term/6 ).
<?php
function edit_term_form_alter(&$form, $form_state, $form_id) {
if ($form_id == 'taxonomy_form_term' && !isset($form_state['confirm_delete']) && !isset($form_state['confirm_parents'])) {
?>
#1
That sounds familiar and makes sense. I remember running into that issue before.
I've not seen 'confirm_parents' before now, but yes, that code seems to do something with it.
We shall roll something like that in soon!
#2
cool, thanks
p.s.
I hadn't either, appears to be when adding the initial second level term to a non tag vocabulary? Shrug, never encountered it to my memory
<?php// Rebuild the form to confirm enabling multiple parents.
elseif ($form_state['clicked_button']['#value'] == t('Save') && !$form['#vocabulary']['tags'] && count($form_state['values']['parent']) > 1 && $form['#vocabulary']['hierarchy'] < 2) {
$form_state['rebuild'] = TRUE;
$form_state['confirm_parents'] = TRUE;
return;
}
?>