You are here

function google_calendar_block_delete in Google Calendar Block 7.2

Same name and namespace in other branches
  1. 7 google_calendar_block.admin.inc \google_calendar_block_delete()

Form constructor for the custom Google Calendar block deletion form.

Parameters

$delta: The unique ID of the block within the context of $module.

See also

google_calendar_block_delete_submit()

1 string reference to 'google_calendar_block_delete'
google_calendar_block_menu in ./google_calendar_block.module
Implements hook_menu().

File

./google_calendar_block.admin.inc, line 132
Admin page callbacks for the Google Calendar Block module.

Code

function google_calendar_block_delete($form, &$form_state, $delta) {
  $block = block_load('google_calendar_block', $delta);
  $google_calendar_block = google_calendar_block_block_get($block->delta);
  $form['info'] = array(
    '#type' => 'hidden',
    '#value' => $google_calendar_block['info'] ? $google_calendar_block['info'] : $google_calendar_block['title'],
  );
  $form['bid'] = array(
    '#type' => 'hidden',
    '#value' => $block->delta,
  );
  return confirm_form($form, t('Are you sure you want to delete the block %name?', array(
    '%name' => $google_calendar_block['info'],
  )), 'admin/structure/block', '', t('Delete'), t('Cancel'));
}