Index: jsdomenu.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/jsdomenu/jsdomenu.module,v retrieving revision 1.17 diff -u -r1.17 jsdomenu.module --- jsdomenu.module 26 Nov 2005 06:47:14 -0000 1.17 +++ jsdomenu.module 4 Sep 2006 20:50:38 -0000 @@ -27,13 +27,55 @@ foreach ($vocabularies as $vocabulary) { $vocabs[$vocabulary->vid] = $vocabulary->name; } - $output .= form_select(t('jsdomenu style'), 'jsdomenu_css', variable_get('jsdomenu_css', 'default'), jsdomenu_available_themes(), t('Choose the menu theme.')); - $output .= form_select(t("Menu placement"), "jsdomenu_placement", variable_get("jsdomenu_placement", 'absolute'), array('absolute' => t('Compressed in jsDoMenu block'), 'static' => t('Visible in jsDoMenu block'), 'cursor' => t('Appears at cursor position on click')), t("Placement of the menu on the page).")); - $output .= form_select(t("Menu vocabulary"), "jsdomenu_navigation_vocab", variable_get("jsdomenu_navigation_vocab", 1), $vocabs, t("Vocabulary from which navigation links will be generated (one link for each first-level term in vocabulary).")); - $output .= form_textfield(t("Block title"), 'jsdomenu_block_title', variable_get("jsdomenu_block_title", 'Shortcuts'), 30, 30, t("This title will be the block heading if a placement other than cursor positioning is used"), NULL, TRUE); - $output .= form_textfield(t("Block instructions"), 'jsdomenu_block_instructions', variable_get("jsdomenu_block_instructions", 'Click here for menu'), 30, 30, t("These instructions will appear in the block, and MUST be present if you select the placement mode 'Compressed in jsDoMenu block"), NULL, TRUE); - $output .= form_checkbox("Nodes included in menu", 'jsdomenu_navigation_nodes', TRUE, variable_get('jsdomenu_navigation_nodes', FALSE), "Check this box if you want to return nodes in the menus as well as taxonomy terms"); - return $output; + $form['jsdomenu_css'] = array( + '#type' => 'select', + '#title' => t('jsdomenu style'), + '#default_value' => variable_get('jsdomenu_css', 'default'), + '#options' => jsdomenu_available_themes(), + '#description' => t('Choose the menu theme.'), +); + $form["jsdomenu_placement"] = array( + '#type' => 'select', + '#title' => t("Menu placement"), + '#default_value' => variable_get("jsdomenu_placement", 'absolute'), + '#options' => array('absolute' => t('Compressed in jsDoMenu block'), 'static' => t('Visible in jsDoMenu block'), 'cursor' => t('Appears at cursor position on click')), + '#description' => t("Placement of the menu on the page)."), +); + $form["jsdomenu_navigation_vocab"] = array( + '#type' => 'select', + '#title' => t("Menu vocabulary"), + '#default_value' => variable_get("jsdomenu_navigation_vocab", 1), + '#options' => $vocabs, + '#description' => t("Vocabulary from which navigation links will be generated (one link for each first-level term in vocabulary)."), +); + $form['jsdomenu_block_title'] = array( + '#type' => 'textfield', + '#title' => t("Block title"), + '#default_value' => variable_get("jsdomenu_block_title", 'Shortcuts'), + '#size' => 30, + '#maxlength' => 30, + '#description' => t("This title will be the block heading if a placement other than cursor positioning is used"), + '#attributes' => NULL, + '#required' => TRUE, +); + $form['jsdomenu_block_instructions'] = array( + '#type' => 'textfield', + '#title' => t("Block instructions"), + '#default_value' => variable_get("jsdomenu_block_instructions", 'Click here for menu'), + '#size' => 30, + '#maxlength' => 30, + '#description' => t("These instructions will appear in the block, and MUST be present if you select the placement mode 'Compressed in jsDoMenu block"), + '#attributes' => NULL, + '#required' => TRUE, +); + $form['jsdomenu_navigation_nodes'] = array( + '#type' => 'checkbox', + '#title' => "Nodes included in menu", + '#return_value' => TRUE, + '#default_value' => variable_get('jsdomenu_navigation_nodes', FALSE), + '#description' => "Check this box if you want to return nodes in the menus as well as taxonomy terms", +); + return $form; } /**