You are here

function image_gallery_admin_submit in Image 7

Same name and namespace in other branches
  1. 5.2 contrib/image_gallery/image_gallery.module \image_gallery_admin_submit()
  2. 5 contrib/image_gallery/image_gallery.module \image_gallery_admin_submit()
  3. 6 contrib/image_gallery/image_gallery.admin.inc \image_gallery_admin_submit()

Form submit handler.

1 string reference to 'image_gallery_admin_submit'
image_gallery_admin_form in contrib/image_gallery/image_gallery.admin.inc
Form for editing or adding a gallery.

File

contrib/image_gallery/image_gallery.admin.inc, line 211
Contains menu callbacks for image_gallery admin pages.

Code

function image_gallery_admin_submit($form, &$form_state) {
  $status = taxonomy_save_term($form_state['values']);
  switch ($status) {
    case SAVED_NEW:
      drupal_set_message(t('Created new gallery %term.', array(
        '%term' => $form_state['values']['name'],
      )));
      break;
    case SAVED_UPDATED:
      drupal_set_message(t('The gallery %term has been updated.', array(
        '%term' => $form_state['values']['name'],
      )));
      break;
    case SAVED_DELETED:
      drupal_set_message(t('The gallery %term has been deleted.', array(
        '%term' => $form_state['values']['name'],
      )));
      break;
  }
  return 'admin/content/image';
}