Ver Fonte

Added default option to the blast database drop-down

Lacey Sanderson há 11 anos atrás
pai
commit
a8e5628930
1 ficheiros alterados com 4 adições e 1 exclusões
  1. 4 1
      includes/blast_ui.blastn.inc

+ 4 - 1
includes/blast_ui.blastn.inc

@@ -54,7 +54,7 @@ $form['DB']['SELECT_DB'] = array(
  '#type' => 'select',
  '#type' => 'select',
  '#title' => t('Nucleotide BLAST Databases:'),
  '#title' => t('Nucleotide BLAST Databases:'),
  '#options' => $options,
  '#options' => $options,
- '#default_value' => t('Select a database'),
+ '#default_value' => 0,
 );
 );
   
   
 // Upload a file as an alternative to enter a query sequence 
 // Upload a file as an alternative to enter a query sequence 
@@ -377,6 +377,7 @@ function _validateFasta($sequence) {
 function _DB_options() {
 function _DB_options() {
    $type = 'blastdb';
    $type = 'blastdb';
    $nodes  = node_load_multiple(array(), array('type'=> $type));
    $nodes  = node_load_multiple(array(), array('type'=> $type));
+   $options = array();
 
 
    foreach ($nodes as $node) {
    foreach ($nodes as $node) {
       if ( isset($node) ) {
       if ( isset($node) ) {
@@ -385,5 +386,7 @@ function _DB_options() {
    }
    }
 
 
    asort($options);
    asort($options);
+   $options[0] = 'Select a Dataset';
+
    return $options;
    return $options;
 }
 }