Browse Source

Changed URL path for sequence retrieval

spficklin 12 years ago
parent
commit
57e4e62025
2 changed files with 7 additions and 8 deletions
  1. 4 5
      tripal_feature/includes/seq_extract.inc
  2. 3 3
      tripal_feature/tripal_feature.module

+ 4 - 5
tripal_feature/includes/seq_extract.inc

@@ -148,7 +148,7 @@ function tripal_feature_seq_extract_form(&$form_state = NULL) {
     '#multiple'      => FALSE,
     '#description'   => t('The organism\'s genus. If specified, features for all organism with this genus will be retrieved.'),
     '#ahah' => array(
-      'path'    => 'seq_extract/update',
+      'path'    => 'find/sequences/ajax',
       'wrapper' => 'tripal-feature-seq-extract-form-block',
       'event'   => 'change',
       'method'  => 'replace',
@@ -177,7 +177,7 @@ function tripal_feature_seq_extract_form(&$form_state = NULL) {
     '#multiple'      => FALSE,
     '#description'   => t('The organism\'s species name. If specified, features for all organisms with this species will be retrieved.  Please first select a genus'),
     '#ahah' => array(
-      'path'    => 'seq_extract/update',
+      'path'    => 'find/sequences/ajax',
       'wrapper' => 'tripal-feature-seq-extract-form-block',
       'event'   => 'change',
       'method'  => 'replace',
@@ -361,7 +361,7 @@ function tripal_feature_seq_extract_form_validate($form, &$form_state) {
   $agg_types  = $form_state['values']['agg_types'];  
   $op         = $form_state['values']['op'];
   
-  if ($op == 'Retreive') {
+  if ($op == 'Retrieve') {
     if ($upstream and !preg_match('/^\d+$/', $upstream)) {
       form_set_error('upstream', 'Please enter a positive numeric value for the upstream bases');
     }
@@ -391,14 +391,13 @@ function tripal_feature_seq_extract_form_submit($form, &$form_state) {
   $agg_types  = $form_state['values']['agg_types'];
   $op         = $form_state['values']['op'];
 
-
   // we must use the parent sequence if the user has selected 
   // the upstream, downstream or to aggregate
   if ($upstream or $downstream or $aggregate) {
     $use_parent = 1;
   }
   
-  if ($op == 'Retreive') {
+  if ($op == 'Retrieve') {
     $_SESSION['tripal_feature_seq_extract']['genus']      = $genus;
     $_SESSION['tripal_feature_seq_extract']['species']    = $species;
     $_SESSION['tripal_feature_seq_extract']['analysis']   = $analysis;

+ 3 - 3
tripal_feature/tripal_feature.module

@@ -156,7 +156,7 @@ function tripal_feature_menu() {
   $items = array();
 
   // the administative settings menu
-  $items['seq_extract'] = array(
+  $items['find/sequences'] = array(
     'title' => 'Sequence Retrieval',
     'description' => 'Download a file of sequences',
     'page callback' => 'tripal_feature_seq_extract_page',
@@ -164,7 +164,7 @@ function tripal_feature_menu() {
     'type' => MENU_CALLBACK,
   );
   
-  $items['seq_extract/update'] = array(
+  $items['find/sequences/ajax'] = array(
     'title' => 'Sequence Retrieval',
     'page callback' => 'tripal_feature_seq_extract_form_ahah_update',
     'access arguments' => array('access chado_feature content'),
@@ -2340,6 +2340,6 @@ function tripal_feature_form_alter(&$form, &$form_state, $form_id) {
     // updating the form through the ahah callback sets the action of
     // the form to the ahah callback URL. We need to set it back
     // to the normal form URL
-    $form['#action'] = url("seq_extract");
+    $form['#action'] = url("find/sequences");
   }
 }