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 modules/system/system.admin.inc
Menu callback. Display blocked IP addresses.

File

modules/system/system.admin.inc, line 1433
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;
}