Помогите разобраться - не понимаю где ошибка
Хочу добавить новый пункт (вкладку) рядом с изменить ноду.
добавляю следующие строчки:
..
'node/%node/cancel_lot' => array(
'title' => 'Cancel lot',
'page callback' => 'drupal_get_form',
'page arguments' => array('lot_cancel_lot', 1),
'weight' => 1,
'type' => MENU_LOCAL_TASK
),
..
И собственно сама функция:
function lot_cancel_lot(&$form_state, $node) {
$form['nid'] = array(
'#type' => 'value',
'#value' => $node->nid,
);
return confirm_form($form,
t('Are you sure you want to cancel this lot?', array('%title' => $node->title)),
isset($_GET['destination']) ? $_GET['destination'] : 'node/'. $node->nid,
t('This action cannot be undone.'),
t('Cancel lot'),
t('Cancel')
);
}
function lot_cancel_lot_submit($form, &$form_state) {
if ($form_state['values']['confirm']) {
drupal_set_message(t('The order is canceled'),'status', False);
// действия
}
$form_state['redirect'] = '';
}
Отключаю и включаю модуль - пункт меню не появляется.
Спасибо