function chado_add_admin_form_set_url_form_submit

2.x tripal_core.chado_nodes.title_and_path.api.inc chado_add_admin_form_set_url_form_submit($form, $form_state)
3.x tripal_core.chado_nodes.title_and_path.inc chado_add_admin_form_set_url_form_submit($form, $form_state)

Implements hook_form_submit(). SUBMIT: Actually add the format specified by chado_add_admin_form_set_title()

1 string reference to 'chado_add_admin_form_set_url_form_submit'
chado_add_admin_form_set_url in tripal_core/api/tripal_core.chado_nodes.title_and_path.api.inc
Generic "Set Node URL" sub-form for setting the url of any chado node

File

tripal_core/api/tripal_core.chado_nodes.title_and_path.api.inc, line 898
Contains API functions to set titles and paths for all chado nodes

Code

function chado_add_admin_form_set_url_form_submit($form, $form_state) {

  if ($form_state['values']['url_option'] == 'custom') {
    $format = $form_state['values']['custom_url'];
  }
  else {
    $format = $form_state['values']['url_option'];
  }

  // Add the format to the table for all new nodes.
  chado_node_add_token_format(
  'url', 
  $form_state['values']['content_type'], 
  $format, 
  $form_state['values']['tokens']
  );

  // Add a job to Update all existing nodes.
  global $user;
  tripal_add_job(
  "Set " . $form_state['values']['content_type'] . " URLs for all existing nodes.", 
  $form_state['values']['content_type'], 
  'chado_update_existing_node_urls', 
  array('content_type' => $form_state['values']['content_type']), 
  $user->uid
  );
}