You are here

function userpoints_transaction_type_form_submit in User Points 7.2

Userpoints transaction type form submit.

File

./userpoints.admin.inc, line 1006
Admin menu callbacks for userpoints.module.

Code

function userpoints_transaction_type_form_submit($form, &$form_state) {
  $type = entity_ui_form_submit_build_entity($form, $form_state);
  try {
    $type
      ->save();
  } catch (Exception $e) {
    watchdog_exception('userpoints', $e);
  }
  drupal_set_message(t('Successfully saved transaction type %label', array(
    '%label' => $type->label,
  )));
  $form_state['redirect'] = array(
    'admin/config/people/userpoints/types',
  );
}