You are here

function context_ui_form_submit in Context 6.2

Same name and namespace in other branches
  1. 5 context_ui/context_ui_admin.inc \context_ui_form_submit()
  2. 6.3 context_ui/export_ui/context_export_ui.class.php \context_ui_form_submit()
  3. 6 context_ui/context_ui.admin.inc \context_ui_form_submit()
  4. 6 context_ui/export_ui/context_export_ui.class.php \context_ui_form_submit()
  5. 7.3 context_ui/export_ui/context_export_ui.class.php \context_ui_form_submit()

Submit handler for main context_ui form.

File

context_ui/context_ui.admin.inc, line 940

Code

function context_ui_form_submit($form, &$form_state) {
  $context = context_ui_form_process($form_state['values']);
  $result = context_save_context($context);
  if ($result) {
    drupal_set_message(t('The context %title was saved successfully.', array(
      '%title' => $context->value,
    )));
  }
  else {
    drupal_set_message(t('An error occurred while attempting to save your context information.'), 'error');
  }
  $form_state['redirect'] = 'admin/build/context';
}