You are here

function ldap_api_activate_server_form in Lightweight Directory Access Protocol (LDAP) 6

activate Server implimentation of hook_form(). Creating the actual form itself happens here.

See also

http://api.drupal.org/api/file/developer/topics/forms_api.html/6

http://api.drupal.org/api/file/developer/topics/forms_api_reference.html/6

1 string reference to 'ldap_api_activate_server_form'
ldap_api_activate_server in ./ldap_server.admin.inc
Page callback created in the implementation of hook_menu.

File

./ldap_server.admin.inc, line 319

Code

function ldap_api_activate_server_form($form_state) {
  $sid = $form_state['sid'];
  $name = db_result(db_query("SELECT name from {ldap_servers} WHERE sid = %d", $sid));
  $form['sid'] = array(
    '#type' => 'hidden',
    '#value' => $sid,
  );
  $form['text'] = array(
    '#value' => t('Are you sure you want to activate the server %name?<br/>', array(
      '%name' => $name,
    )),
  );
  $form['activate'] = array(
    '#type' => 'submit',
    '#value' => t('Activate'),
  );
  $form['cancel'] = array(
    '#type' => 'submit',
    '#value' => t('Cancel'),
    '#submit' => array(
      '_submit_cancel',
    ),
  );
  return $form;
}