You are here

function media_watermark_delete_form in Media watermark 7

Form constructor for the media watermark delete form.

See also

media_watermark_delete_form_submit()

1 string reference to 'media_watermark_delete_form'
media_watermark_menu in ./media_watermark.module
Implements hook_menu().

File

includes/media_watermark_delete.admin.inc, line 17
Media watermark module integration.

Code

function media_watermark_delete_form($form, &$form_state) {
  $form_state['watermark_arg'] = arg(5);
  $name = media_watermark_get_name($form_state['watermark_arg']);
  if (!empty($name)) {
    $question = t('Are you sure you want to delete %name?', array(
      '%name' => $name,
    ));
    $path = 'admin/config/media/watermark';
    return confirm_form($form, $question, $path, NULL, t('Delete'), NULL, 'confirm');
  }
  else {
    return t('There is no watermark with this id, or it is misconfigured.');
  }
}