You are here

function scald_admin_context_confirm_delete_form in Scald: Media Management made easy 7

Context delete confirm form.

1 string reference to 'scald_admin_context_confirm_delete_form'
scald_menu in ./scald.module
Implements hook_menu().

File

includes/scald.admin.inc, line 379

Code

function scald_admin_context_confirm_delete_form($form, &$form_state, $context_name) {

  // Delete a Scald custom context.
  $custom_contexts = variable_get('scald_custom_contexts', array());
  if (!array_key_exists($context_name, $custom_contexts)) {
    drupal_set_message(t('Custom context not found: %context', array(
      '%context' => $context_name,
    )), 'error');
    drupal_goto('admin/structure/scald');
  }
  $form['#context'] = $custom_contexts[$context_name];
  return confirm_form($form, t('Are you sure you want to delete the Scald context %context?', array(
    '%context' => $form['#context']['name'],
  )), 'admin/structure/scald', t('Any settings for this context will also be deleted. This action cannot be undone.'));
}