You are here

function _spaces_taxonomy_form_submit in Spaces 6.2

Same name and namespace in other branches
  1. 6 spaces_taxonomy/spaces_taxonomy.module \_spaces_taxonomy_form_submit()

Submit handler for Spaces-enabled taxonomy terms.

1 string reference to '_spaces_taxonomy_form_submit'
spaces_taxonomy_form_alter in spaces_taxonomy/spaces_taxonomy.module

File

spaces_taxonomy/spaces_taxonomy.module, line 291

Code

function _spaces_taxonomy_form_submit($form, &$form_state) {
  $tid = $form_state['values']['tid'];
  if ($tid) {
    $space = spaces_load('taxonomy', $tid);
    if (isset($form_state['values']['purl']['value'])) {
      $space->purl = $form_state['values']['purl']['value'];
    }
    if (isset($form_state['values']['preset'])) {
      $space->preset = $form_state['values']['preset'];
    }
    $result = spaces_save($space);
  }
}