| 1 |
<?php
|
| 2 |
// $Id: accountmenu.admin.inc,v 1.2 2009/06/23 19:44:34 mattyoung Exp $
|
| 3 |
/**
|
| 4 |
* @file accountmenu.admin.inc
|
| 5 |
* admin/settings/accountmenu form constructor
|
| 6 |
*/
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
function accountmenu_settings_form() {
|
| 11 |
$options = menu_get_menus();
|
| 12 |
$description = t('The Account menu links are currently in "!name". They can be moved to be part of another menu.',
|
| 13 |
array('!name' => $options[variable_get('accountmenu_menu_name', 'accountmenu')]));
|
| 14 |
// cannot choose the current value
|
| 15 |
unset($options[variable_get('accountmenu_menu_name', 'accountmenu')]);
|
| 16 |
if (variable_get('accountmenu_menu_name', 'accountmenu') != 'accountmenu') {
|
| 17 |
$description .= ' '. t('Or in the "!name" by themselves.', array('!name' => 'Account menu'));
|
| 18 |
}
|
| 19 |
$form['accountmenu_menu_name'] = array(
|
| 20 |
'#type' => 'select',
|
| 21 |
'#title' => t('Move the links to'),
|
| 22 |
'#options' => $options,
|
| 23 |
'#description' => $description,
|
| 24 |
);
|
| 25 |
|
| 26 |
$form = system_settings_form($form);
|
| 27 |
$form['#submit'][] = '_accountmenu_reset_menu';
|
| 28 |
return $form;
|
| 29 |
}
|