You are here

function casetracker_case_state_edit_submit in Case Tracker 5

Same name and namespace in other branches
  1. 6 casetracker_admin.inc \casetracker_case_state_edit_submit()
  2. 7 casetracker_admin.inc \casetracker_case_state_edit_submit()

Processes the submitted results of our case state addition or editing.

File

./casetracker.module, line 655
Enables the handling of projects and their cases.

Code

function casetracker_case_state_edit_submit($form_id, $form_values) {
  $case_state = array(
    'name' => $form_values['name'],
    'realm' => $form_values['realm'],
    'weight' => $form_values['weight'],
  );
  $case_state['csid'] = $form_values['csid'] ? $form_values['csid'] : NULL;

  // add or edit, eh?
  drupal_set_message(t('The case state %name has been updated.', array(
    '%name' => $form_values['name'],
  )));
  casetracker_case_state_save($case_state);
  return 'admin/content/casetracker';
}