You are here

function andromeda_slideshow_image_delete_form in Andromeda Slideshow 7.2

Same name and namespace in other branches
  1. 7 includes/andromeda_slideshow.forms.inc \andromeda_slideshow_image_delete_form()

Delete form for a slideshow image

1 string reference to 'andromeda_slideshow_image_delete_form'
andromeda_slideshow_menu in ./andromeda_slideshow.module
Implements hook_menu().

File

includes/andromeda_slideshow.forms.inc, line 324
Form definitions for andromeda slideshow module

Code

function andromeda_slideshow_image_delete_form($form, &$form_state, $slideshow = NULL, $image = NULL) {
  $form = array(
    '#slideshow' => isset($slideshow) ? $slideshow : andromeda_slideshow_new_slideshow(),
    '#image' => isset($image) ? $image : andromeda_slideshow_new_image(),
  );
  $form['title'] = array(
    '#markup' => '<h2>' . t('Are you sure you want to delete the image @title?', array(
      '@title' => $image->title,
    )) . '</h2>',
  );
  $form['actions'] = array();
  $form['actions']['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Delete'),
  );
  $form['actions']['cancel'] = array(
    '#markup' => l(t('Cancel'), 'admin/structure/slideshows/manage/' . $slideshow->sid),
  );
  return $form;
}