You are here

function image_gallery_admin_submit in Image 5

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

File

contrib/image_gallery/image_gallery.module, line 256

Code

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