You are here

function video_admin_preset_delete_validate in Video 6.5

File

./video.admin.inc, line 360

Code

function video_admin_preset_delete_validate($form, $form_state) {
  $preset = $form['#preset'];

  // Selected presets can't be deleted
  $selected = video_get_presets();
  if (isset($selected[$preset->id])) {
    form_error($form['text'], t('You are not allowed to delete presets that are currently active.'));
  }
}