You are here

function profile2_diff_block_configure in Profile 2 7.2

Implements hook_block_configure().

File

contrib/profile2_diff.module, line 245
Provides functionality to show a diff between two profile2 revisions.

Code

function profile2_diff_block_configure($delta = '') {
  $form = array();
  switch ($delta) {
    case 'inline':
      $options = array();
      foreach (profile2_get_types() as $name => $type) {
        $options[$name] = $type->label;
      }
      $form['profile_types'] = array(
        '#type' => 'checkboxes',
        '#title' => t('Enabled profile types'),
        '#default_value' => variable_get('profile2_diff_show_diff_inline_types', array()),
        '#options' => $options,
        '#description' => t('Show this block only on pages that display profiles of the given type(s).'),
      );
      break;
  }
  return $form;
}