function tripal_pub_remote_alter_form_AGL

2.x tripal_pub.AGL.inc tripal_pub_remote_alter_form_AGL($form, $form_state, $num_criteria = 1)
3.x tripal_chado.pub_importer_AGL.inc tripal_pub_remote_alter_form_AGL($form, $form_state, $num_criteria = 1)
1.x AGL.inc tripal_pub_remote_alter_form_AGL($form, $form_state)

File

tripal_pub/includes/importers/AGL.inc, line 5

Code

function tripal_pub_remote_alter_form_AGL($form, $form_state) {

  $num_criteria = $form['num_criteria']['#default_value'];

  // So far we haven't been able to get AGL to filter results to only
  // include pubs by the XX number days in the past.  So, we will
  // change the 'days' element to be the year to query
  $form['days']['#title'] = t('Year');
  $form['days']['#description'] = t('Please enter a year to limit records by the year they were published, created or modified in the database.');

  // The Journal Name filter doesn't seem to work, so remove it
  for ($i = 1; $i <= $num_criteria; $i++) {
    unset($form['criteria'][$i]["scope-$i"]['#options']['journal']);
  }
  return $form;
}