summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2009-02-13 05:42:24 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2009-02-13 05:42:24 +0000
commit9cd3f79144546a64d3752d8729cc4aacf3b0dde0 (patch)
tree199e04bd8eccb19658f60b70a06a8bb15e64af0b
parentb83aa19bb29b7de0f16dcb25e8d7abeb8b10ac2f (diff)
downloadbrdo-9cd3f79144546a64d3752d8729cc4aacf3b0dde0.tar.gz
brdo-9cd3f79144546a64d3752d8729cc4aacf3b0dde0.tar.bz2
#367696 by drumm: Simplify the vocabulary edit form.
-rw-r--r--modules/forum/forum.test1
-rw-r--r--modules/taxonomy/taxonomy.admin.inc48
-rw-r--r--modules/taxonomy/taxonomy.test1
3 files changed, 21 insertions, 29 deletions
diff --git a/modules/forum/forum.test b/modules/forum/forum.test
index 426a5dccc..82e6ff1e0 100644
--- a/modules/forum/forum.test
+++ b/modules/forum/forum.test
@@ -127,7 +127,6 @@ class ForumTestCase extends DrupalWebTestCase {
'name' => $title,
'description' => $description,
'help' => '',
- 'weight' => -10
);
// Edit the vocabulary.
diff --git a/modules/taxonomy/taxonomy.admin.inc b/modules/taxonomy/taxonomy.admin.inc
index 1129e33c9..568267f54 100644
--- a/modules/taxonomy/taxonomy.admin.inc
+++ b/modules/taxonomy/taxonomy.admin.inc
@@ -120,35 +120,29 @@ function taxonomy_form_vocabulary(&$form_state, $edit = array()) {
if (isset($form_state['confirm_delete']) && isset($form_state['values']['vid'])) {
return taxonomy_vocabulary_confirm_delete($form_state, $form_state['values']['vid']);
}
- $form['identification'] = array(
- '#type' => 'fieldset',
- '#title' => t('Identification'),
- '#collapsible' => TRUE,
- );
- $form['identification']['name'] = array('#type' => 'textfield',
+ $form['name'] = array(
+ '#type' => 'textfield',
'#title' => t('Vocabulary name'),
'#default_value' => $edit['name'],
'#maxlength' => 255,
'#description' => t('The name for this vocabulary, e.g., <em>"Tags"</em>.'),
'#required' => TRUE,
);
- $form['identification']['description'] = array('#type' => 'textarea',
- '#title' => t('Description'),
- '#default_value' => $edit['description'],
- '#description' => t('Description of the vocabulary; can be used by modules.'),
- );
- $form['identification']['help'] = array('#type' => 'textfield',
+ $form['help'] = array(
+ '#type' => 'textfield',
'#title' => t('Help text'),
'#maxlength' => 255,
'#default_value' => $edit['help'],
'#description' => t('Instructions to present to the user when selecting terms, e.g., <em>"Enter a comma separated list of words"</em>.'),
);
- $form['content_types'] = array(
- '#type' => 'fieldset',
- '#title' => t('Content types'),
- '#collapsible' => TRUE,
+ $form['description'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Description'),
+ '#default_value' => $edit['description'],
+ '#description' => t('Description of the vocabulary; can be used by modules.'),
);
- $form['content_types']['nodes'] = array('#type' => 'checkboxes',
+ $form['nodes'] = array(
+ '#type' => 'checkboxes',
'#title' => t('Content types'),
'#default_value' => $edit['nodes'],
'#options' => array_map('check_plain', node_get_types('names')),
@@ -159,33 +153,33 @@ function taxonomy_form_vocabulary(&$form_state, $edit = array()) {
'#title' => t('Settings'),
'#collapsible' => TRUE,
);
- $form['settings']['tags'] = array('#type' => 'checkbox',
+ $form['settings']['tags'] = array(
+ '#type' => 'checkbox',
'#title' => t('Tags'),
'#default_value' => $edit['tags'],
'#description' => t('Terms are created by users when submitting posts by typing a comma separated list.'),
);
- $form['settings']['multiple'] = array('#type' => 'checkbox',
+ $form['settings']['multiple'] = array(
+ '#type' => 'checkbox',
'#title' => t('Multiple select'),
'#default_value' => $edit['multiple'],
'#description' => t('Allows posts to have more than one term from this vocabulary (always true for tags).'),
);
- $form['settings']['required'] = array('#type' => 'checkbox',
+ $form['settings']['required'] = array(
+ '#type' => 'checkbox',
'#title' => t('Required'),
'#default_value' => $edit['required'],
'#description' => t('At least one term in this vocabulary must be selected when submitting a post.'),
);
- $form['settings']['weight'] = array('#type' => 'weight',
- '#title' => t('Weight'),
- '#default_value' => $edit['weight'],
- '#description' => t('Vocabularies are displayed in ascending order by weight.'),
- );
// Set the hierarchy to "multiple parents" by default. This simplifies the
// vocabulary form and standardizes the term form.
- $form['hierarchy'] = array('#type' => 'value',
+ $form['hierarchy'] = array(
+ '#type' => 'value',
'#value' => '0',
);
// Enable "related terms" by default.
- $form['relations'] = array('#type' => 'value',
+ $form['relations'] = array(
+ '#type' => 'value',
'#value' => '1',
);
diff --git a/modules/taxonomy/taxonomy.test b/modules/taxonomy/taxonomy.test
index 8969027e1..287cbe057 100644
--- a/modules/taxonomy/taxonomy.test
+++ b/modules/taxonomy/taxonomy.test
@@ -75,7 +75,6 @@ class TaxonomyVocabularyFunctionalTest extends TaxonomyWebTestCase {
$edit['tags'] = 1;
$edit['multiple'] = 1;
$edit['required'] = 1;
- $edit['weight'] = 0;
$this->drupalPost(NULL, $edit, t('Save'));
$this->assertRaw(t('Created new vocabulary %name.', array('%name' => $edit['name'])), t('Vocabulary created successfully'));