function system_ip_blocking_form

7.x system.admin.inc system_ip_blocking_form($form, $form_state, $default_ip)

Define the form for blocking IP addresses.

See also

system_ip_blocking_form_validate()

system_ip_blocking_form_submit()

Related topics

1 string reference to 'system_ip_blocking_form'
system_ip_blocking in drupal-7.x/modules/system/system.admin.inc
Menu callback. Display blocked IP addresses.

File

drupal-7.x/modules/system/system.admin.inc, line 1410
Admin page callbacks for the system module.

Code

function system_ip_blocking_form($form, $form_state, $default_ip) {
  $form['ip'] = array(
    '#title' => t('IP address'),
    '#type' => 'textfield',
    '#size' => 48,
    '#maxlength' => 40,
    '#default_value' => $default_ip,
    '#description' => t('Enter a valid IP address.'),
  );
  $form['actions'] = array('#type' => 'actions');
  $form['actions']['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Add'),
  );
  $form['#submit'][] = 'system_ip_blocking_form_submit';
  $form['#validate'][] = 'system_ip_blocking_form_validate';
  return $form;
}