You are here

function taxonomy_access_role_delete_confirm in Taxonomy Access Control 7

Form constructor for a form to to delete access rules for a particular role.

Parameters

int $rid: The role ID to disable.

See also

taxonomy_access_role_delete_confirm_submit()

taxonomy_access_menu()

1 string reference to 'taxonomy_access_role_delete_confirm'
taxonomy_access_menu in ./taxonomy_access.module
Implements hook_menu().

File

./taxonomy_access.admin.inc, line 65
Administrative interface for taxonomy access control.

Code

function taxonomy_access_role_delete_confirm($form, &$form_state, $rid) {
  $roles = _taxonomy_access_user_roles();
  if (taxonomy_access_role_enabled($rid)) {
    $form['rid'] = array(
      '#type' => 'value',
      '#value' => $rid,
    );
    return confirm_form($form, t("Are you sure you want to delete all taxonomy access rules for the role %role?", array(
      '%role' => $roles[$rid],
    )), TAXONOMY_ACCESS_CONFIG . '/role/%/edit', t('This action cannot be undone.'), t('Delete all'), t('Cancel'));
  }
}