function password_policy_delay_admin_form in Password Policy 7.2
Admin form callback for delay constraint.
File
- plugins/
constraint/ delay.inc, line 22
Code
function password_policy_delay_admin_form($form, &$form_state, $constraint) {
$sub_form['delay_fieldset'] = array(
'#type' => 'fieldset',
'#title' => t('Delay'),
);
$sub_form['delay_fieldset']['delay'] = array(
'#type' => 'textfield',
'#title' => t('Time period'),
'#default_value' => $constraint->config['delay'],
'#description' => t('Time period during which the number of password changes is restricted. (Use normal English, like 1 week or 24 hours.)'),
);
$sub_form['delay_fieldset']['threshold'] = array(
'#type' => 'textfield',
'#title' => t('Maximum number of times password can be changed per time period'),
'#required' => TRUE,
'#default_value' => $constraint->config['threshold'],
'#description' => t('Password can be changed this many times within period above.'),
'#element_validate' => array(
'element_validate_integer_positive',
),
);
return $sub_form;
}