RCS file: /cvs/drupal-contrib/contributions/modules/views/modules/taxonomy/views_plugin_argument_default_taxonomy_tid.inc,v
retrieving revision 1.1.6.3
diff -u -r1.1.6.3 views_plugin_argument_default_taxonomy_tid.inc
--- modules/taxonomy/views_plugin_argument_default_taxonomy_tid.inc 13 Aug 2010 19:52:16 -0000  1.1.6.3
+++ modules/taxonomy/views_plugin_argument_default_taxonomy_tid.inc 16 Aug 2010 21:44:46 -0000
@@ -12,31 +12,33 @@
     $options['term_page'] = array('default' => TRUE);
     $options['node'] = array('default' => FALSE);
     $options['limit'] = array('default' => FALSE);
-    $options['vids'] = array('default' => NULL);
+    $options['vids'] = array('default' => array());

     return $options;
   }

-  function options_form(&$form, &$form_state) {
+  function argument_form(&$form, &$form_state) {
     $form['term_page'] = array(
       '#type' => 'checkbox',
       '#title' => t('Load default argument from term page'),
-      '#default_value' => $this->options['term_page'],
+      '#default_value' => $this->argument->options['term_page'],
+      '#process' => array('views_process_dependency'),
+      '#dependency' => array(
+        'radio:options[default_action]' => array('default'),
+        'radio:options[default_argument_type]' => array($this->id)
+      ),
+      '#dependency_count' => 2,
     );
     $form['node'] = array(
       '#type' => 'checkbox',
       '#title' => t('Load default argument from node page. Good for related taxonomy blocks.'),
-      '#default_value' => $this->options['node'],
-    );
-
-    $form['limit'] = array(
-      '#type' => 'checkbox',
-      '#title' => t('Limit terms by vocabulary'),
-      '#default_value'=> $this->options['limit'],
-      '#process' => array('expand_checkboxes', 'views_process_dependency'),
+      '#default_value' => $this->argument->options['node'],
+      '#process' => array('views_process_dependency'),
       '#dependency' => array(
-        'edit-options-argument-default-taxonomy-tid-node' => array(1),
+        'radio:options[default_action]' => array('default'),
+        'radio:options[default_argument_type]' => array($this->id)
       ),
+      '#dependency_count' => 2,
     );

     $options = array();
@@ -50,14 +52,17 @@
       '#suffix' => '</div></div>',
       '#type' => 'checkboxes',
       '#title' => t('Vocabularies'),
+      '#description' => t('If you wish to limit terms for specific vocabularies, check them; if none are checked, all terms will be included.'),
       '#options' => $options,
-      '#default_value' => $this->options['vids'],
+      '#default_value' => isset($this->argument->options['vids']) ? $this->argument->options['vids'] : array(),
       '#process' => array('expand_checkboxes', 'views_process_dependency'),
       '#dependency' => array(
-        //'edit-options-argument-default-taxonomy-tid-limit' => array(1),
-        'edit-options-argument-default-taxonomy-tid-node' => array(1),
+        'radio:options[default_action]' => array('default'),
+        'radio:options[default_argument_type]' => array($this->id),
       ),
+      '#dependency_count' => 2,
     );
+
   }

   function options_submit(&$form, &$form_state, &$options) {
@@ -67,13 +72,13 @@

   function get_argument() {
     // Load default argument from taxonomy page.
-    if (!empty($this->options['term_page'])) {
+    if (!empty($this->argument->options['term_page'])) {
       if (arg(0) == 'taxonomy' && arg(1) == 'term' && is_numeric(arg(2))) {
         return arg(2);
       }
     }
     // Load default argument from node.
-    if (!empty($this->options['node'])) {
+    if (!empty($this->argument->options['node'])) {
       foreach (range(1, 3) as $i) {
         $node = menu_get_object('node', $i);
         if (!empty($node)) {
@@ -82,11 +87,11 @@
       }
       // Just check, if a node could be detected.
       if ($node) {
-        if (!empty($this->options['limit'])) {
+        if (!empty($this->argument->options['limit'])) {
           $tids = array();
-          // filter by vid
+          // Filter by vid.
           foreach ($node->taxonomy as $tid => $term) {
-            if (!empty($this->options['vids'][$term->vid])) {
+            if (!empty($this->argument->options['vids'][$term->vid])) {
               $tids[] = $tid;
             }
           }
