function merci_build_accessory_form in MERCI (Manage Equipment Reservations, Checkout and Inventory) 6.2
Same name and namespace in other branches
- 7.2 merci.module \merci_build_accessory_form()
1 call to merci_build_accessory_form()
- merci_build_reservation_table_form in ./
merci.module - Builds the table of existing reserved items.
File
- ./
merci.module, line 1237 - MERCI - Managed Equipment Reservation Checkout and Inventory
Code
function merci_build_accessory_form($form_state, $node, $did) {
$vocabularies = taxonomy_get_vocabularies($node->type);
$form = array();
foreach ($node->taxonomy as $tid => $term) {
$value[] = $tid;
}
foreach ($vocabularies as $vocabulary) {
$taxonomy_form = taxonomy_form($vocabulary->vid, $value);
$taxonomy_form['#title'] = '';
unset($taxonomy_form['#theme']);
$taxonomy_form['#ahah'] = array(
'path' => 'merci/taxonomy/' . $node->nid . '/' . $vocabulary->vid . '/' . $did,
'wrapper' => 'merci-accessories-' . $node->nid,
'method' => 'prepend',
'effect' => 'fade',
);
$form[$vocabulary->vid] = $taxonomy_form;
}
return $form;
}