function get_tripal_library_admin_form_taxonomy_set

1.x tripal_library.admin.inc get_tripal_library_admin_form_taxonomy_set(&$form)

Related topics

1 call to get_tripal_library_admin_form_taxonomy_set()
tripal_library_admin in tripal_library/includes/tripal_library.admin.inc
Administrative settings form

File

tripal_library/includes/tripal_library.admin.inc, line 72

Code

function get_tripal_library_admin_form_taxonomy_set(&$form) {
  $form['taxonify'] = array(
    '#type' => 'fieldset',
    '#title' => t('Assign Drupal Taxonomy to Library Features')
  );

  // get the list of libraries
  $sql = "SELECT * FROM {Library} ORDER BY uniquename";
  $lib_rset = chado_query($sql);

  // iterate through all of the libraries
  $lib_boxes = array();
  while ($library = db_fetch_object($lib_rset)) {
    $lib_boxes[$library->library_id] = "$library->name";
  }

  $form['taxonify']['description'] = array(
    '#type' => 'item',
    '#value' => t("Drupal allows for assignment of \"taxonomy\" or catagorical terms to " .
      "nodes. These terms allow for advanced filtering during searching. This option allows " .
      "for setting taxonomy only for features that belong to the selected libraries below.  All other features will be unaffected.  To set taxonomy for all features in the site see the Feature Administration page."),
    '#weight' => 1,
  );

  $form['taxonify']['tx-libraries'] = array(
    '#title' => t('Libraries'),
    '#type' => t('checkboxes'),
    '#description' => t("Check the libraries whose features you want to reset taxonomy.  Note: this list contains all libraries, even those that may not be synced."),
    '#required' => FALSE,
    '#prefix' => '<div id="lib_boxes">',
    '#suffix' => '</div>',
    '#options' => $lib_boxes,
    '#weight' => 2
  );
  $form['taxonify']['tx-button'] = array(
    '#type' => 'submit',
    '#value' => t('Set Feature Taxonomy'),
    '#weight' => 3
  );
}