| [ Index ] |
PHP Cross Reference of Drupal 6 (gatewave) |
[Summary view] [Print] [Text view]
1 <?php 2 // $Id: menu_attributes.admin.inc,v 1.1 2009/04/20 23:00:50 schoonzie Exp $ 3 4 /** 5 * @file 6 * Creates the admin settings form for the Menu Attributes module. 7 */ 8 9 /** 10 * Form builder function for module settings. 11 */ 12 function menu_attributes_admin() { 13 14 // ID Attribute 15 $form['menu_attributes_id'] = array( 16 '#type' => 'fieldset', 17 '#title' => t('ID Attribute'), 18 '#collapsible' => TRUE, 19 '#collapsed' => FALSE 20 ); 21 $form['menu_attributes_id']['menu_attributes_id_enable'] = array( 22 '#type' => 'checkbox', 23 '#title' => t('Enable setting the ID attribute'), 24 '#default_value' => variable_get('menu_attributes_id_enable', 1) 25 ); 26 27 // Name Attrinute 28 $form['menu_attributes_name'] = array( 29 '#type' => 'fieldset', 30 '#title' => t('Name Attribute'), 31 '#collapsible' => TRUE, 32 '#collapsed' => FALSE 33 ); 34 $form['menu_attributes_name']['menu_attributes_name_enable'] = array( 35 '#type' => 'checkbox', 36 '#title' => t('Enable setting the Name attribute'), 37 '#default_value' => variable_get('menu_attributes_name_enable', 1) 38 ); 39 $form['menu_attributes_name']['menu_attributes_name_default'] = array( 40 '#type' => 'textfield', 41 '#title' => t('Name Attribute Default'), 42 '#default_value' => variable_get('menu_attributes_name_default', NULL), 43 '#required' => FALSE 44 ); 45 46 // Target Attribute 47 $form['menu_attributes_target'] = array( 48 '#type' => 'fieldset', 49 '#title' => t('Target Attribute'), 50 '#collapsible' => TRUE, 51 '#collapsed' => FALSE 52 ); 53 $form['menu_attributes_target']['menu_attributes_target_enable'] = array( 54 '#type' => 'checkbox', 55 '#title' => t('Enable setting the Target attribute'), 56 '#default_value' => variable_get('menu_attributes_target_enable', 1) 57 ); 58 $form['menu_attributes_target']['menu_attributes_target_default'] = array( 59 '#type' => 'select', 60 '#title' => t('Target Attribute Default'), 61 '#default_value' => variable_get('menu_attributes_target_default', NULL), 62 '#options' => array( 63 '' => '<none> (i.e. same window)', 64 '_blank' => 'New Window (_blank)', 65 '_top' => 'Top Window (_top)', 66 '_self' => 'Same Window (_self)', 67 '_parent' => 'Parent Window (_parent)', 68 ), 69 '#required' => FALSE, 70 ); 71 72 // Rel Attribute 73 $form['menu_attributes_rel'] = array( 74 '#type' => 'fieldset', 75 '#title' => t('Rel Attribute'), 76 '#collapsible' => TRUE, 77 '#collapsed' => FALSE 78 ); 79 $form['menu_attributes_rel']['menu_attributes_rel_enable'] = array( 80 '#type' => 'checkbox', 81 '#title' => t('Enable setting the Rel attribute'), 82 '#default_value' => variable_get('menu_attributes_rel_enable', 1) 83 ); 84 $form['menu_attributes_rel']['menu_attributes_rel_default'] = array( 85 '#type' => 'textfield', 86 '#title' => t('Rel Attribute Default'), 87 '#default_value' => variable_get('menu_attributes_rel_default', NULL), 88 '#required' => FALSE 89 ); 90 91 // Class Attribute 92 $form['menu_attributes_class'] = array( 93 '#type' => 'fieldset', 94 '#title' => t('Class Attribute'), 95 '#collapsible' => TRUE, 96 '#collapsed' => FALSE 97 ); 98 $form['menu_attributes_class']['menu_attributes_class_enable'] = array( 99 '#type' => 'checkbox', 100 '#title' => t('Enable setting the Class attribute'), 101 '#default_value' => variable_get('menu_attributes_class_enable', 1) 102 ); 103 $form['menu_attributes_class']['menu_attributes_class_default'] = array( 104 '#type' => 'textfield', 105 '#title' => t('Class Attribute Default'), 106 '#default_value' => variable_get('menu_attributes_class_default', NULL), 107 '#required' => FALSE 108 ); 109 110 // Style Attribute 111 $form['menu_attributes_style'] = array( 112 '#type' => 'fieldset', 113 '#title' => t('Style Attribute'), 114 '#collapsible' => TRUE, 115 '#collapsed' => FALSE 116 ); 117 $form['menu_attributes_style']['menu_attributes_style_enable'] = array( 118 '#type' => 'checkbox', 119 '#title' => t('Enable setting the Style attribute'), 120 '#default_value' => variable_get('menu_attributes_style_enable', 1) 121 ); 122 $form['menu_attributes_style']['menu_attributes_style_default'] = array( 123 '#type' => 'textfield', 124 '#title' => t('Style Attribute Default'), 125 '#default_value' => variable_get('menu_attributes_style_default', NULL), 126 '#required' => FALSE 127 ); 128 129 // Accesskey Attribute 130 $form['menu_attributes_accesskey'] = array( 131 '#type' => 'fieldset', 132 '#title' => t('Accesskey Attribute'), 133 '#collapsible' => TRUE, 134 '#collapsed' => FALSE 135 ); 136 $form['menu_attributes_accesskey']['menu_attributes_accesskey_enable'] = array( 137 '#type' => 'checkbox', 138 '#title' => t('Enable setting the Accesskey attribute'), 139 '#default_value' => variable_get('menu_attributes_accesskey_enable', 1) 140 ); 141 $form['menu_attributes_accesskey']['menu_attributes_accesskey_default'] = array( 142 '#type' => 'textfield', 143 '#title' => t('Accesskey Attribute Default'), 144 '#default_value' => variable_get('menu_attributes_accesskey_default', NULL), 145 '#required' => FALSE 146 ); 147 148 $form = system_settings_form($form); 149 150 return $form; 151 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Thu Mar 24 11:18:33 2011 | Cross-referenced by PHPXref 0.7 |