You are here

function password_policy_delete_confirm in Password Policy 5

1 string reference to 'password_policy_delete_confirm'
password_policy_delete in ./password_policy.module
Confirmation form for the deletion of a password policy. Deletion takes place in password_policy_delete_submit().

File

./password_policy.module, line 297

Code

function password_policy_delete_confirm($pid, $policy) {
  $form = array();
  $form['pid'] = array(
    '#type' => 'hidden',
    '#value' => $pid,
  );
  $form['name'] = array(
    '#type' => 'hidden',
    '#value' => $policy->name,
  );
  $description = count($policy->constraints) ? t('This policy has the following constraints:') . '<br />' . $policy
    ->getValidationErrorMessage() : t('There are no constraints specified for this policy.');
  return confirm_form($form, t('Are you sure you want to delete the policy \'%name\'?', array(
    '%name' => $policy->name,
  )), 'admin/user/password_policy', $description, t('Delete'));
}