You are here

function user_rev_diff_form_user_revision_admin_settings_alter in User Revision 7.2

Implements hook_form_alter() for node_type_form.

File

diff/user_rev_diff.module, line 183
Provides functionality to show a diff between two user revisions.

Code

function user_rev_diff_form_user_revision_admin_settings_alter(&$form, $form_state) {

  // User revision settings form.
  // Add checkbox to activate 'View changes' button per node type.
  $form['user_rev_diff'] = array(
    '#type' => 'fieldset',
    '#title' => t('Revision differences'),
    '#collapsible' => FALSE,
    '#collapsed' => FALSE,
  );
  $form['user_rev_diff']['show_preview_user_changes'] = array(
    '#type' => 'checkbox',
    '#title' => t('Show %preview_changes button on user edit form', array(
      '%preview_changes' => t('View changes'),
    )),
    '#weight' => 10,
    '#default_value' => variable_get('show_preview_user_changes', TRUE),
  );
  $form['user_rev_diff']['show_user_rev_diff_inline'] = array(
    '#type' => 'checkbox',
    '#title' => t('Show diffs inline for users'),
    '#description' => t("You must enable the 'Inline User diff' block to use this feature"),
    '#weight' => 10,
    '#default_value' => variable_get('show_user_rev_diff_inline', FALSE),
  );
}