function tripal_stock_admin_validate

2.x tripal_stock.admin.inc tripal_stock_admin_validate($form, &$form_state)
3.x tripal_stock.admin.inc tripal_stock_admin_validate($form, &$form_state)
1.x tripal_stock.admin.inc tripal_stock_admin_validate($form, &$form_state)

Implements hook_form_validate(): Validates user input

Parameters

$form: An array describing the form that was rendered

$form_state: An array describing the current state of the form including user input

Related topics

File

legacy/tripal_stock/includes/tripal_stock.admin.inc, line 94
Administration of stocks

Code

function tripal_stock_admin_validate($form, &$form_state) {
  global $user; // we need access to the user info
  $job_args = array();

  switch ($form_state['values']['op']) {
    case t('Set Controlled Vacabularies'):
      break;

    case t('Clean up orphaned stocks'):
      tripal_add_job('Cleanup orphaned stocks', 'tripal_stock', 
      'tripal_stock_cleanup', $job_args, $user->uid);
      break;

  }
}