function get_tripal_organism_admin_form_reindex_set

1.x tripal_organism.admin.inc get_tripal_organism_admin_form_reindex_set(&$form)

Related topics

1 call to get_tripal_organism_admin_form_reindex_set()
tripal_organism_admin in tripal_organism/includes/tripal_organism.admin.inc
Administrative settings for chado_orgnism

File

tripal_organism/includes/tripal_organism.admin.inc, line 113

Code

function get_tripal_organism_admin_form_reindex_set(&$form) {
  // define the fieldsets
  $form['reindex'] = array(
    '#type' => 'fieldset',
    '#title' => t('Reindex Organism Features')
  );

  // get the list of libraries
  $sql = "SELECT * FROM {Organism} ORDER BY genus,species";
  $org_rset = chado_query($sql);

  // iterate through all of the libraries
  $org_boxes = array();
  while ($organism = db_fetch_object($org_rset)) {
    $org_boxes[$organism->organism_id] = "$organism->genus $organism->species";
  }
  $form['reindex']['description'] = array(
    '#type' => 'item',
    '#value' => t("This option allows for reindexing of only those features that belong to the selected organisms below. All other features will be unaffected.  To reindex all features in the site see the Feature Administration page."),
    '#weight' => 1,
  );

  $form['reindex']['re-organisms'] = array(
    '#title' => t('Organisms'),
    '#type' => t('checkboxes'),
    '#description' => t("Check the organisms whoee features you want to reindex. Note: this list contains all organisms, even those that may not be synced."),
    '#required' => FALSE,
    '#prefix' => '<div id="lib_boxes">',
    '#suffix' => '</div>',
    '#options' => $org_boxes,
    '#weight' => 2,
  );
  $form['reindex']['re-button'] = array(
    '#type' => 'submit',
    '#value' => t('Reindex Features'),
    '#weight' => 3,
  );
}